Version Description
Download this release
Release Info
Developer | jbutkus |
Plugin | All-in-One Event Calendar |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.13 to 2.1.1
- all-in-one-event-calendar.php +1 -1
- app/config/constants.php +15 -1
- app/controller/extension-license.php +1 -1
- app/controller/front.php +36 -16
- app/controller/javascript.php +18 -5
- app/model/event.php +18 -9
- app/model/event/creating.php +6 -0
- app/model/event/event-create-exception.php +14 -0
- app/model/event/parent.php +163 -20
- app/model/settings-view.php +38 -11
- app/model/settings.php +137 -33
- app/view/admin/abstract.php +36 -0
- app/view/admin/add-new-event.php +37 -34
- app/view/admin/settings.php +10 -9
- app/view/admin/theme-options.php +1 -0
- app/view/calendar/page.php +33 -20
- app/view/calendar/shortcode.php +16 -15
- app/view/calendar/view/abstract.php +15 -10
- app/view/calendar/view/agenda.php +74 -53
- app/view/calendar/view/month.php +14 -7
- app/view/calendar/view/oneday.php +22 -15
- app/view/calendar/view/week.php +20 -12
- app/view/event/location.php +6 -13
- app/view/event/single.php +24 -0
- app/view/event/taxonomy.php +4 -2
- app/view/event/ticket.php +8 -5
- language/all-in-one-event-calendar.mo +0 -0
- language/all-in-one-event-calendar.po +328 -229
- language/all-in-one-event-calendar.pot +280 -201
- lib/acl/aco.php +6 -2
- lib/bootstrap/loader-map.php +306 -0
- lib/bootstrap/loader.php +8 -4
- lib/cache/strategy/file.php +20 -12
- lib/cache/strategy/persistence-context.php +16 -9
- lib/calendar-feed/ics.php +63 -32
- lib/clone/renderer-helper.php +6 -1
- lib/command/abstract.php +2 -2
- lib/command/change-theme.php +1 -1
- lib/command/clone.php +45 -17
- lib/command/compile-core-css.php +52 -0
- lib/command/disable-gzip.php +1 -0
- lib/command/render-calendar.php +6 -0
- lib/command/render-event.php +11 -0
- lib/command/resolver.php +5 -0
- lib/command/save-settings.php +25 -4
- lib/compatibility/cli.php +50 -0
- lib/compatibility/ob.php +19 -1
- lib/css/frontend.php +130 -51
- lib/date/system.php +11 -4
- lib/date/time.php +63 -7
- lib/date/timezone.php +13 -11
- lib/factory/html.php +10 -6
- lib/factory/strategy.php +30 -11
- lib/filesystem/checker.php +95 -6
- lib/html/element/href.php +1 -0
- lib/html/element/setting/enabled-views.php +14 -1
- lib/html/element/setting/html.php +1 -0
- lib/html/element/setting/input.php +6 -1
- lib/http/request/parser.php +1 -0
- lib/http/response/render/strategy/html.php +41 -7
- lib/import-export/ics.php +22 -4
- lib/less/lessphp.php +27 -11
- lib/p28n/wpml.php +16 -0
- lib/post/custom-type.php +1 -1
- lib/request/redirect.php +61 -0
- lib/robots/helper.php +67 -33
- lib/routing/router.php +5 -3
- lib/theme/loader.php +61 -30
- lib/twig/ai1ec-extension.php +22 -0
- lib/twig/loader.php +36 -0
- public/admin/add_new_event_meta_box.php +3 -6
- public/admin/box_event_contact.php +1 -0
- public/admin/box_event_cost.php +1 -0
- public/admin/box_inline_warning.php +1 -0
- public/admin/box_publish_button.php +0 -5
- public/admin/box_time_and_date.php +24 -14
- public/admin/css/add_new_event.css +24 -36
- public/admin/css/datepicker.css +39 -26
- public/admin/css/settings.css +2 -1
- public/admin/twig/setting/embedding.twig +1 -0
- public/admin/twig/setting/enabled-views.twig +31 -8
- public/admin/twig/setting/input.twig +3 -2
- public/admin/twig/setting/textarea.twig +2 -2
- public/js/build.txt +7 -0
- public/js/external_libs/ai1ec_datepicker.js +1 -1
- public/js/external_libs/bootstrap/affix.js +4 -15
- public/js/pages/add_new_event.js +22 -1
- public/js/pages/admin_settings.js +1 -1
- public/js/pages/calendar.js +9 -1
- public/js/pages/calendar_feeds.js +1 -1
all-in-one-event-calendar.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
-
* Version: 2.
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
+
* Version: 2.1.1
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
app/config/constants.php
CHANGED
@@ -50,7 +50,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
-
define( 'AI1EC_VERSION', '2.0.
|
54 |
}
|
55 |
|
56 |
// ================
|
@@ -141,6 +141,16 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
141 |
);
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
// ==============
|
145 |
// = TWIG CACHE PATH =
|
146 |
// ==============
|
@@ -449,6 +459,10 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
449 |
if ( ! defined( 'AI1EC_CACHE' ) ) {
|
450 |
define( 'AI1EC_CACHE', true );
|
451 |
}
|
|
|
|
|
|
|
|
|
452 |
|
453 |
// A value identifying that cache is not available.
|
454 |
// Used in place of actual path for cache to use.
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
+
define( 'AI1EC_VERSION', '2.1.0.10.rc4' );
|
54 |
}
|
55 |
|
56 |
// ================
|
141 |
);
|
142 |
}
|
143 |
|
144 |
+
// ==============
|
145 |
+
// = CACHE URL =
|
146 |
+
// ==============
|
147 |
+
if ( ! defined( 'AI1EC_CACHE_URL' ) ) {
|
148 |
+
define(
|
149 |
+
'AI1EC_CACHE_URL',
|
150 |
+
AI1EC_URL . '/cache/'
|
151 |
+
);
|
152 |
+
}
|
153 |
+
|
154 |
// ==============
|
155 |
// = TWIG CACHE PATH =
|
156 |
// ==============
|
459 |
if ( ! defined( 'AI1EC_CACHE' ) ) {
|
460 |
define( 'AI1EC_CACHE', true );
|
461 |
}
|
462 |
+
|
463 |
+
if ( ! defined( 'AI1EC_DISABLE_FILE_CACHE' ) ) {
|
464 |
+
define( 'AI1EC_DISABLE_FILE_CACHE', false );
|
465 |
+
}
|
466 |
|
467 |
// A value identifying that cache is not available.
|
468 |
// Used in place of actual path for cache to use.
|
app/controller/extension-license.php
CHANGED
@@ -73,7 +73,7 @@ abstract class Ai1ec_Base_License_Controller extends Ai1ec_Base_Extension_Contro
|
|
73 |
$old_licence = $old_options[$this->_licence]['value'];
|
74 |
$new_licence = $new_options[$this->_licence]['value'];
|
75 |
$status = $old_options[$this->_licence_status]['value'];
|
76 |
-
if (
|
77 |
$license = trim( $new_licence );
|
78 |
// data to send in our API request
|
79 |
$api_params = array(
|
73 |
$old_licence = $old_options[$this->_licence]['value'];
|
74 |
$new_licence = $new_options[$this->_licence]['value'];
|
75 |
$status = $old_options[$this->_licence_status]['value'];
|
76 |
+
if ( $new_licence !== $old_licence ) {
|
77 |
$license = trim( $new_licence );
|
78 |
// data to send in our API request
|
79 |
$api_params = array(
|
app/controller/front.php
CHANGED
@@ -31,6 +31,11 @@ class Ai1ec_Front_Controller {
|
|
31 |
*/
|
32 |
protected $_request;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Initialize the controller.
|
36 |
*
|
@@ -39,6 +44,14 @@ class Ai1ec_Front_Controller {
|
|
39 |
* @return void
|
40 |
*/
|
41 |
public function initialize( $ai1ec_loader ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
ai1ec_start();
|
43 |
$this->_init( $ai1ec_loader );
|
44 |
$this->_compile_themes();
|
@@ -51,6 +64,15 @@ class Ai1ec_Front_Controller {
|
|
51 |
add_action( 'init', array( $lessphp, 'invalidate_css_cache_if_requested' ) );
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* Notify extensions and pass them instance of objects registry.
|
56 |
*
|
@@ -241,16 +263,9 @@ class Ai1ec_Front_Controller {
|
|
241 |
$option = $this->_registry->get( 'model.option' );
|
242 |
$theme = $option->get( 'ai1ec_current_theme', array() );
|
243 |
$update = false;
|
244 |
-
$default_theme = array(
|
245 |
-
'theme_dir' => AI1EC_DEFAULT_THEME_PATH,
|
246 |
-
'theme_root' => AI1EC_DEFAULT_THEME_ROOT,
|
247 |
-
'theme_url' => AI1EC_THEMES_URL . '/' . AI1EC_DEFAULT_THEME_NAME,
|
248 |
-
'stylesheet' => AI1EC_DEFAULT_THEME_NAME,
|
249 |
-
'legacy' => false,
|
250 |
-
);
|
251 |
// Theme setting is undefined; default to Vortex.
|
252 |
if ( empty( $theme ) ) {
|
253 |
-
$theme = $
|
254 |
$update = true;
|
255 |
}
|
256 |
// Legacy settings; in 1.x the active theme was stored as a bare string,
|
@@ -273,7 +288,7 @@ class Ai1ec_Front_Controller {
|
|
273 |
if ( ! is_dir( $root . DIRECTORY_SEPARATOR . $theme_name ) ) {
|
274 |
// It's missing; something is wrong with this theme. Reset theme to
|
275 |
// Vortex and warn the user accordingly.
|
276 |
-
$option->set( 'ai1ec_current_theme', $
|
277 |
$notification = $this->_registry->get( 'notification.admin' );
|
278 |
$notification->store(
|
279 |
sprintf(
|
@@ -401,6 +416,10 @@ class Ai1ec_Front_Controller {
|
|
401 |
'ai1ec_dbi_debug',
|
402 |
array( 'http.request', 'debug_filter' )
|
403 |
);
|
|
|
|
|
|
|
|
|
404 |
// editing a child instance
|
405 |
if ( basename( $_SERVER['SCRIPT_NAME'] ) === 'post.php' ) {
|
406 |
$dispatcher->register_action(
|
@@ -415,7 +434,6 @@ class Ai1ec_Front_Controller {
|
|
415 |
10,
|
416 |
2
|
417 |
);
|
418 |
-
|
419 |
// Category colors
|
420 |
$dispatcher->register_action(
|
421 |
'events_categories_add_form_fields',
|
@@ -554,6 +572,10 @@ class Ai1ec_Front_Controller {
|
|
554 |
'add_meta_boxes',
|
555 |
array( 'view.admin.add-new-event', 'event_meta_box_container' )
|
556 |
);
|
|
|
|
|
|
|
|
|
557 |
$dispatcher->register_action(
|
558 |
'save_post',
|
559 |
array( 'model.event.creating', 'save_post' ),
|
@@ -589,12 +611,6 @@ class Ai1ec_Front_Controller {
|
|
589 |
'plugin_action_links_' . AI1EC_PLUGIN_BASENAME,
|
590 |
array( 'view.admin.nav', 'plugin_action_links' )
|
591 |
);
|
592 |
-
if ( $this->_registry->get( 'robots.helper' )->pre_check() ) {
|
593 |
-
$dispatcher->register_action(
|
594 |
-
'admin_init',
|
595 |
-
array( 'robots.helper', 'install' )
|
596 |
-
);
|
597 |
-
}
|
598 |
$dispatcher->register_action(
|
599 |
'wp_ajax_ai1ec_rescan_cache',
|
600 |
array( 'twig.cache', 'rescan' )
|
@@ -617,6 +633,10 @@ class Ai1ec_Front_Controller {
|
|
617 |
array( 'post.content', 'check_content' ),
|
618 |
PHP_INT_MAX
|
619 |
);
|
|
|
|
|
|
|
|
|
620 |
}
|
621 |
}
|
622 |
/**
|
31 |
*/
|
32 |
protected $_request;
|
33 |
|
34 |
+
/**
|
35 |
+
* @var array
|
36 |
+
*/
|
37 |
+
protected $_default_theme;
|
38 |
+
|
39 |
/**
|
40 |
* Initialize the controller.
|
41 |
*
|
44 |
* @return void
|
45 |
*/
|
46 |
public function initialize( $ai1ec_loader ) {
|
47 |
+
// Initialize default theme.
|
48 |
+
$this->_default_theme = array(
|
49 |
+
'theme_dir' => AI1EC_DEFAULT_THEME_PATH,
|
50 |
+
'theme_root' => AI1EC_DEFAULT_THEME_ROOT,
|
51 |
+
'theme_url' => AI1EC_THEMES_URL . '/' . AI1EC_DEFAULT_THEME_NAME,
|
52 |
+
'stylesheet' => AI1EC_DEFAULT_THEME_NAME,
|
53 |
+
'legacy' => false,
|
54 |
+
);
|
55 |
ai1ec_start();
|
56 |
$this->_init( $ai1ec_loader );
|
57 |
$this->_compile_themes();
|
64 |
add_action( 'init', array( $lessphp, 'invalidate_css_cache_if_requested' ) );
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Let other objects access default theme
|
69 |
+
*
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public function get_default_theme() {
|
73 |
+
return $this->_default_theme;
|
74 |
+
}
|
75 |
+
|
76 |
/**
|
77 |
* Notify extensions and pass them instance of objects registry.
|
78 |
*
|
263 |
$option = $this->_registry->get( 'model.option' );
|
264 |
$theme = $option->get( 'ai1ec_current_theme', array() );
|
265 |
$update = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
// Theme setting is undefined; default to Vortex.
|
267 |
if ( empty( $theme ) ) {
|
268 |
+
$theme = $this->_default_theme;
|
269 |
$update = true;
|
270 |
}
|
271 |
// Legacy settings; in 1.x the active theme was stored as a bare string,
|
288 |
if ( ! is_dir( $root . DIRECTORY_SEPARATOR . $theme_name ) ) {
|
289 |
// It's missing; something is wrong with this theme. Reset theme to
|
290 |
// Vortex and warn the user accordingly.
|
291 |
+
$option->set( 'ai1ec_current_theme', $this->_default_theme );
|
292 |
$notification = $this->_registry->get( 'notification.admin' );
|
293 |
$notification->store(
|
294 |
sprintf(
|
416 |
'ai1ec_dbi_debug',
|
417 |
array( 'http.request', 'debug_filter' )
|
418 |
);
|
419 |
+
$dispatcher->register_filter(
|
420 |
+
'ai1ec_dbi_debug',
|
421 |
+
array( 'compatibility.cli', 'disable_db_debug' )
|
422 |
+
);
|
423 |
// editing a child instance
|
424 |
if ( basename( $_SERVER['SCRIPT_NAME'] ) === 'post.php' ) {
|
425 |
$dispatcher->register_action(
|
434 |
10,
|
435 |
2
|
436 |
);
|
|
|
437 |
// Category colors
|
438 |
$dispatcher->register_action(
|
439 |
'events_categories_add_form_fields',
|
572 |
'add_meta_boxes',
|
573 |
array( 'view.admin.add-new-event', 'event_meta_box_container' )
|
574 |
);
|
575 |
+
$dispatcher->register_action(
|
576 |
+
'edit_form_after_title',
|
577 |
+
array( 'view.admin.add-new-event', 'event_inline_alert' )
|
578 |
+
);
|
579 |
$dispatcher->register_action(
|
580 |
'save_post',
|
581 |
array( 'model.event.creating', 'save_post' ),
|
611 |
'plugin_action_links_' . AI1EC_PLUGIN_BASENAME,
|
612 |
array( 'view.admin.nav', 'plugin_action_links' )
|
613 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
$dispatcher->register_action(
|
615 |
'wp_ajax_ai1ec_rescan_cache',
|
616 |
array( 'twig.cache', 'rescan' )
|
633 |
array( 'post.content', 'check_content' ),
|
634 |
PHP_INT_MAX
|
635 |
);
|
636 |
+
$dispatcher->register_action(
|
637 |
+
'send_headers',
|
638 |
+
array( 'request.redirect', 'handle_categories_and_tags' )
|
639 |
+
);
|
640 |
}
|
641 |
}
|
642 |
/**
|
app/controller/javascript.php
CHANGED
@@ -193,7 +193,7 @@ class Ai1ec_Javascript_Controller {
|
|
193 |
}
|
194 |
|
195 |
// Create the config object for Require.js.
|
196 |
-
$require_config = $this->
|
197 |
|
198 |
// Load Require.js script.
|
199 |
$require = file_get_contents( $js_path . 'require.js' );
|
@@ -375,6 +375,7 @@ class Ai1ec_Javascript_Controller {
|
|
375 |
->get( 'gmt_offset' );
|
376 |
|
377 |
$data = array(
|
|
|
378 |
// ICS feed error messages
|
379 |
'duplicate_feed_message' => esc_html(
|
380 |
Ai1ec_I18n::__( 'This feed is already being imported.' )
|
@@ -406,8 +407,14 @@ class Ai1ec_Javascript_Controller {
|
|
406 |
'error_message_not_entered_long' => Ai1ec_I18n::__(
|
407 |
'When the "Input coordinates" checkbox is checked, "Longitude" is a required field.'
|
408 |
),
|
409 |
-
'
|
410 |
-
'The URL you have entered
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
),
|
412 |
'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
|
413 |
'ajax_url' => $ajax_url,
|
@@ -426,8 +433,14 @@ class Ai1ec_Javascript_Controller {
|
|
426 |
'blog_timezone' => $blog_timezone,
|
427 |
'show_tracking_popup' =>
|
428 |
current_user_can( 'manage_options' ) && $settings->get( 'show_tracking_popup' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
);
|
430 |
-
return $data;
|
431 |
}
|
432 |
|
433 |
/**
|
@@ -502,7 +515,7 @@ class Ai1ec_Javascript_Controller {
|
|
502 |
*
|
503 |
* @return string
|
504 |
*/
|
505 |
-
|
506 |
$js_url = AI1EC_ADMIN_THEME_JS_URL;
|
507 |
$version = AI1EC_VERSION;
|
508 |
$namespace = self::REQUIRE_NAMESPACE;
|
193 |
}
|
194 |
|
195 |
// Create the config object for Require.js.
|
196 |
+
$require_config = $this->create_require_js_config_object();
|
197 |
|
198 |
// Load Require.js script.
|
199 |
$require = file_get_contents( $js_path . 'require.js' );
|
375 |
->get( 'gmt_offset' );
|
376 |
|
377 |
$data = array(
|
378 |
+
'calendar_feeds_nonce' => wp_create_nonce( 'ai1ec_ics_feed_nonce'),
|
379 |
// ICS feed error messages
|
380 |
'duplicate_feed_message' => esc_html(
|
381 |
Ai1ec_I18n::__( 'This feed is already being imported.' )
|
407 |
'error_message_not_entered_long' => Ai1ec_I18n::__(
|
408 |
'When the "Input coordinates" checkbox is checked, "Longitude" is a required field.'
|
409 |
),
|
410 |
+
'ai1ec_contact_url_not_valid' => Ai1ec_I18n::__(
|
411 |
+
'The URL you have entered in the <b>Organizer Contact Info</b> > <b>External URL</b> seems to be invalid.'
|
412 |
+
),
|
413 |
+
'ai1ec_ticket_url_not_valid' => Ai1ec_I18n::__(
|
414 |
+
'The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy Tickets URL</b> seems to be invalid.'
|
415 |
+
),
|
416 |
+
'general_url_not_valid' => Ai1ec_I18n::__(
|
417 |
+
'Please remember that URLs must start with either "http://" or "https://".'
|
418 |
),
|
419 |
'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
|
420 |
'ajax_url' => $ajax_url,
|
433 |
'blog_timezone' => $blog_timezone,
|
434 |
'show_tracking_popup' =>
|
435 |
current_user_can( 'manage_options' ) && $settings->get( 'show_tracking_popup' ),
|
436 |
+
'affix_filter_menu' => $settings->get( 'affix_filter_menu' ),
|
437 |
+
'affix_vertical_offset_md' => $settings->get( 'affix_vertical_offset_md' ),
|
438 |
+
'affix_vertical_offset_lg' => $settings->get( 'affix_vertical_offset_lg' ),
|
439 |
+
'affix_vertical_offset_sm' => $settings->get( 'affix_vertical_offset_sm' ),
|
440 |
+
'affix_vertical_offset_xs' => $settings->get( 'affix_vertical_offset_xs' ),
|
441 |
+
'region' => ( $settings->get( 'geo_region_biasing' ) ) ? $locale->get_region() : '',
|
442 |
);
|
443 |
+
return apply_filters( 'ai1ec_js_translations', $data );
|
444 |
}
|
445 |
|
446 |
/**
|
515 |
*
|
516 |
* @return string
|
517 |
*/
|
518 |
+
public function create_require_js_config_object() {
|
519 |
$js_url = AI1EC_ADMIN_THEME_JS_URL;
|
520 |
$version = AI1EC_VERSION;
|
521 |
$namespace = self::REQUIRE_NAMESPACE;
|
app/model/event.php
CHANGED
@@ -110,7 +110,7 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
110 |
$start = $this->get( 'start' );
|
111 |
// reset time component
|
112 |
$start->set_time( 0, 0, 0 );
|
113 |
-
$end
|
114 |
// set the correct length
|
115 |
$end->adjust_day( $length );
|
116 |
$this->set( 'end', $end );
|
@@ -181,8 +181,8 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
181 |
'\' could not be retrieved from the database.'
|
182 |
);
|
183 |
}
|
184 |
-
$post_id
|
185 |
-
$dbi
|
186 |
|
187 |
$left_join = '';
|
188 |
$select_sql = '
|
@@ -220,12 +220,12 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
220 |
';
|
221 |
|
222 |
if ( false !== $instance && is_numeric( $instance ) ) {
|
223 |
-
$select_sql .=
|
224 |
-
|
225 |
|
226 |
$instance = (int)$instance;
|
227 |
$this->set( 'instance_id', $instance );
|
228 |
-
$left_join =
|
229 |
' aei ON aei.id = ' . $instance . ' AND e.post_id = aei.post_id ';
|
230 |
} else {
|
231 |
$select_sql .= ', e.start as start, e.end as end, e.allday ';
|
@@ -521,13 +521,22 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
521 |
* @return int The post_id of the new or existing event.
|
522 |
*/
|
523 |
function save( $update = false ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
$dbi = $this->_registry->get( 'dbi.dbi' );
|
525 |
$columns = $this->prepare_store_entity();
|
526 |
$format = $this->prepare_store_format( $columns );
|
527 |
$table_name = $dbi->get_table_name( 'ai1ec_events' );
|
528 |
$post_id = $columns['post_id'];
|
529 |
|
530 |
-
if ( $this->get( 'end' )->
|
531 |
$this->set_no_end_time();
|
532 |
}
|
533 |
if ( $post_id ) {
|
@@ -563,7 +572,7 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
563 |
$this->set( 'post_id', $post_id );
|
564 |
$columns['post_id'] = $post_id;
|
565 |
|
566 |
-
$taxonomy
|
567 |
'model.event.taxonomy',
|
568 |
$post_id
|
569 |
);
|
@@ -592,7 +601,7 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
592 |
$instance_model = $this->_registry->get( 'model.event.instance' );
|
593 |
$instance_model->recreate( $this );
|
594 |
|
595 |
-
do_action( 'ai1ec_event_saved', $post_id, $this );
|
596 |
return $post_id;
|
597 |
}
|
598 |
|
110 |
$start = $this->get( 'start' );
|
111 |
// reset time component
|
112 |
$start->set_time( 0, 0, 0 );
|
113 |
+
$end = $this->_registry->get( 'date.time', $start );
|
114 |
// set the correct length
|
115 |
$end->adjust_day( $length );
|
116 |
$this->set( 'end', $end );
|
181 |
'\' could not be retrieved from the database.'
|
182 |
);
|
183 |
}
|
184 |
+
$post_id = (int)$post_id;
|
185 |
+
$dbi = $this->_registry->get( 'dbi.dbi' );
|
186 |
|
187 |
$left_join = '';
|
188 |
$select_sql = '
|
220 |
';
|
221 |
|
222 |
if ( false !== $instance && is_numeric( $instance ) ) {
|
223 |
+
$select_sql .= ', IF( aei.start IS NOT NULL, aei.start, e.start ) as start,' .
|
224 |
+
' IF( aei.start IS NOT NULL, aei.end, e.end ) as end ';
|
225 |
|
226 |
$instance = (int)$instance;
|
227 |
$this->set( 'instance_id', $instance );
|
228 |
+
$left_join = 'LEFT JOIN ' . $dbi->get_table_name( 'ai1ec_event_instances' ) .
|
229 |
' aei ON aei.id = ' . $instance . ' AND e.post_id = aei.post_id ';
|
230 |
} else {
|
231 |
$select_sql .= ', e.start as start, e.end as end, e.allday ';
|
521 |
* @return int The post_id of the new or existing event.
|
522 |
*/
|
523 |
function save( $update = false ) {
|
524 |
+
if ( ! $update ) {
|
525 |
+
$response = apply_filters( 'ai1ec_event_save_new', $this );
|
526 |
+
if ( is_wp_error( $response ) ) {
|
527 |
+
throw new Ai1ec_Event_Create_Exception(
|
528 |
+
'Failed to create event: ' . $response->get_error_message()
|
529 |
+
);
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
$dbi = $this->_registry->get( 'dbi.dbi' );
|
534 |
$columns = $this->prepare_store_entity();
|
535 |
$format = $this->prepare_store_format( $columns );
|
536 |
$table_name = $dbi->get_table_name( 'ai1ec_events' );
|
537 |
$post_id = $columns['post_id'];
|
538 |
|
539 |
+
if ( $this->get( 'end' )->is_empty() ) {
|
540 |
$this->set_no_end_time();
|
541 |
}
|
542 |
if ( $post_id ) {
|
572 |
$this->set( 'post_id', $post_id );
|
573 |
$columns['post_id'] = $post_id;
|
574 |
|
575 |
+
$taxonomy = $this->_registry->get(
|
576 |
'model.event.taxonomy',
|
577 |
$post_id
|
578 |
);
|
601 |
$instance_model = $this->_registry->get( 'model.event.instance' );
|
602 |
$instance_model->recreate( $this );
|
603 |
|
604 |
+
do_action( 'ai1ec_event_saved', $post_id, $this, $update );
|
605 |
return $post_id;
|
606 |
}
|
607 |
|
app/model/event/creating.php
CHANGED
@@ -133,7 +133,13 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
|
|
133 |
$is_new = true;
|
134 |
$event = $this->_registry->get( 'model.event' );
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
136 |
|
|
|
137 |
$start_time_entry = $this->_registry
|
138 |
->get( 'date.time', $start_time, $timezone_name );
|
139 |
$end_time_entry = $this->_registry
|
133 |
$is_new = true;
|
134 |
$event = $this->_registry->get( 'model.event' );
|
135 |
}
|
136 |
+
$formatted_timezone = $this->_registry->get( 'date.timezone' )
|
137 |
+
->get_name( $timezone_name );
|
138 |
+
if ( empty( $timezone_name ) || ! $formatted_timezone ) {
|
139 |
+
$timezone_name = 'sys.default';
|
140 |
+
}
|
141 |
|
142 |
+
unset( $formatted_timezone );
|
143 |
$start_time_entry = $this->_registry
|
144 |
->get( 'date.time', $start_time, $timezone_name );
|
145 |
$end_time_entry = $this->_registry
|
app/model/event/event-create-exception.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Indicates a failure that happens during event save operation.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.Model
|
11 |
+
*/
|
12 |
+
class Ai1ec_Event_Create_Exception extends Exception {
|
13 |
+
|
14 |
+
}
|
app/model/event/parent.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @subpackage Ai1EC.Model
|
9 |
*/
|
10 |
class Ai1ec_Event_Parent extends Ai1ec_Base {
|
11 |
-
|
12 |
/**
|
13 |
* event_parent method
|
14 |
*
|
@@ -37,7 +37,7 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
37 |
) );
|
38 |
return add_post_meta( $event_id, $meta_key, $meta_value, true );
|
39 |
}
|
40 |
-
|
41 |
/**
|
42 |
* Get parent ID for given event
|
43 |
*
|
@@ -54,14 +54,14 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
54 |
if ( null === ( $parent_id = $parents->get( $current_id ) ) ) {
|
55 |
$db = $this->_registry->get( 'dbi.dbi' );
|
56 |
/* @var $db Ai1ec_Dbi */
|
57 |
-
$query
|
58 |
SELECT parent.ID, parent.post_status
|
59 |
FROM
|
60 |
' . $db->get_table_name( 'posts' ) . ' AS child
|
61 |
INNER JOIN ' . $db->get_table_name( 'posts' ) . ' AS parent
|
62 |
ON ( parent.ID = child.post_parent )
|
63 |
WHERE child.ID = ' . $current_id;
|
64 |
-
$parent
|
65 |
if (
|
66 |
empty( $parent ) ||
|
67 |
'trash' === $parent->post_status
|
@@ -75,7 +75,7 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
75 |
}
|
76 |
return $parent_id;
|
77 |
}
|
78 |
-
|
79 |
/**
|
80 |
* Returns a list of modified (children) event objects
|
81 |
*
|
@@ -93,9 +93,9 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
93 |
$parent_id = (int)$parent_id;
|
94 |
$sql_query = 'SELECT ID FROM ' . $db->get_table_name( 'posts' ) .
|
95 |
' WHERE post_parent = ' . $parent_id;
|
96 |
-
$
|
97 |
-
$objects
|
98 |
-
foreach ( $
|
99 |
try {
|
100 |
$instance = $this->_registry->get( 'model.event', $child_id );
|
101 |
if (
|
@@ -110,7 +110,7 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
110 |
}
|
111 |
return $objects;
|
112 |
}
|
113 |
-
|
114 |
/**
|
115 |
* admin_init_post method
|
116 |
*
|
@@ -126,13 +126,13 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
126 |
) {
|
127 |
$old_post_id = $_POST['post_ID'];
|
128 |
$instance_id = $_POST['ai1ec_instance_id'];
|
129 |
-
$post_id
|
130 |
->create_duplicate_post();
|
131 |
if ( false !== $post_id ) {
|
132 |
-
$
|
133 |
-
|
134 |
-
$old_post_id,
|
135 |
-
$
|
136 |
);
|
137 |
$this->_registry->get( 'model.event.instance' )->clean(
|
138 |
$old_post_id,
|
@@ -143,18 +143,18 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
143 |
1,
|
144 |
get_edit_post_link( $post_id, 'url' )
|
145 |
);
|
146 |
-
wp_redirect(
|
147 |
apply_filters(
|
148 |
'redirect_post_location',
|
149 |
$location,
|
150 |
$post_id
|
151 |
-
)
|
152 |
);
|
153 |
exit();
|
154 |
}
|
155 |
}
|
156 |
}
|
157 |
-
|
158 |
/**
|
159 |
* Inject base event edit link for modified instances
|
160 |
*
|
@@ -196,7 +196,7 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
196 |
}
|
197 |
return $actions;
|
198 |
}
|
199 |
-
|
200 |
/**
|
201 |
* add_exception_date method
|
202 |
*
|
@@ -208,8 +208,8 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
208 |
* @return bool Success
|
209 |
*/
|
210 |
public function add_exception_date( $post_id, Ai1ec_Date_Time $date ) {
|
211 |
-
$event
|
212 |
-
$dates_list
|
213 |
if ( empty( $dates_list[0] ) ) {
|
214 |
unset( $dates_list[0] );
|
215 |
}
|
@@ -220,4 +220,147 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
|
|
220 |
$event->set( 'exception_dates', implode( ',', $dates_list ) );
|
221 |
return $event->save( true );
|
222 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
}
|
8 |
* @subpackage Ai1EC.Model
|
9 |
*/
|
10 |
class Ai1ec_Event_Parent extends Ai1ec_Base {
|
11 |
+
|
12 |
/**
|
13 |
* event_parent method
|
14 |
*
|
37 |
) );
|
38 |
return add_post_meta( $event_id, $meta_key, $meta_value, true );
|
39 |
}
|
40 |
+
|
41 |
/**
|
42 |
* Get parent ID for given event
|
43 |
*
|
54 |
if ( null === ( $parent_id = $parents->get( $current_id ) ) ) {
|
55 |
$db = $this->_registry->get( 'dbi.dbi' );
|
56 |
/* @var $db Ai1ec_Dbi */
|
57 |
+
$query = '
|
58 |
SELECT parent.ID, parent.post_status
|
59 |
FROM
|
60 |
' . $db->get_table_name( 'posts' ) . ' AS child
|
61 |
INNER JOIN ' . $db->get_table_name( 'posts' ) . ' AS parent
|
62 |
ON ( parent.ID = child.post_parent )
|
63 |
WHERE child.ID = ' . $current_id;
|
64 |
+
$parent = $db->get_row( $query );
|
65 |
if (
|
66 |
empty( $parent ) ||
|
67 |
'trash' === $parent->post_status
|
75 |
}
|
76 |
return $parent_id;
|
77 |
}
|
78 |
+
|
79 |
/**
|
80 |
* Returns a list of modified (children) event objects
|
81 |
*
|
93 |
$parent_id = (int)$parent_id;
|
94 |
$sql_query = 'SELECT ID FROM ' . $db->get_table_name( 'posts' ) .
|
95 |
' WHERE post_parent = ' . $parent_id;
|
96 |
+
$children = (array)$db->get_col( $sql_query );
|
97 |
+
$objects = array();
|
98 |
+
foreach ( $children as $child_id ) {
|
99 |
try {
|
100 |
$instance = $this->_registry->get( 'model.event', $child_id );
|
101 |
if (
|
110 |
}
|
111 |
return $objects;
|
112 |
}
|
113 |
+
|
114 |
/**
|
115 |
* admin_init_post method
|
116 |
*
|
126 |
) {
|
127 |
$old_post_id = $_POST['post_ID'];
|
128 |
$instance_id = $_POST['ai1ec_instance_id'];
|
129 |
+
$post_id = $this->_registry->get( 'model.event.creating' )
|
130 |
->create_duplicate_post();
|
131 |
if ( false !== $post_id ) {
|
132 |
+
$this->_handle_instances(
|
133 |
+
$this->_registry->get( 'model.event', $post_id ),
|
134 |
+
$this->_registry->get( 'model.event', $old_post_id ),
|
135 |
+
$instance_id
|
136 |
);
|
137 |
$this->_registry->get( 'model.event.instance' )->clean(
|
138 |
$old_post_id,
|
143 |
1,
|
144 |
get_edit_post_link( $post_id, 'url' )
|
145 |
);
|
146 |
+
wp_redirect(
|
147 |
apply_filters(
|
148 |
'redirect_post_location',
|
149 |
$location,
|
150 |
$post_id
|
151 |
+
)
|
152 |
);
|
153 |
exit();
|
154 |
}
|
155 |
}
|
156 |
}
|
157 |
+
|
158 |
/**
|
159 |
* Inject base event edit link for modified instances
|
160 |
*
|
196 |
}
|
197 |
return $actions;
|
198 |
}
|
199 |
+
|
200 |
/**
|
201 |
* add_exception_date method
|
202 |
*
|
208 |
* @return bool Success
|
209 |
*/
|
210 |
public function add_exception_date( $post_id, Ai1ec_Date_Time $date ) {
|
211 |
+
$event = $this->_registry->get( 'model.event', $post_id );
|
212 |
+
$dates_list = explode( ',', $event->get( 'exception_dates' ) );
|
213 |
if ( empty( $dates_list[0] ) ) {
|
214 |
unset( $dates_list[0] );
|
215 |
}
|
220 |
$event->set( 'exception_dates', implode( ',', $dates_list ) );
|
221 |
return $event->save( true );
|
222 |
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Handles instances saving and switching if needed. If original event
|
226 |
+
* and created event have different start dates proceed in old style
|
227 |
+
* otherwise find next instance, switch original start date to next
|
228 |
+
* instance start date. If there are no next instances mark event as
|
229 |
+
* non recurring. Filter also exception dates if are past.
|
230 |
+
*
|
231 |
+
* @param Ai1ec_Event $created_event Created event object.
|
232 |
+
* @param Ai1ec_Event $original_event Original event object.
|
233 |
+
*
|
234 |
+
* @return void Method does not return.
|
235 |
+
*/
|
236 |
+
protected function _handle_instances(
|
237 |
+
Ai1ec_Event $created_event,
|
238 |
+
Ai1ec_Event $original_event,
|
239 |
+
$instance_id
|
240 |
+
) {
|
241 |
+
$ce_start = $created_event->get( 'start' );
|
242 |
+
$oe_start = $original_event->get( 'start' );
|
243 |
+
if (
|
244 |
+
$ce_start->format() !== $oe_start->format()
|
245 |
+
) {
|
246 |
+
$this->add_exception_date(
|
247 |
+
$original_event->get( 'post_id' ),
|
248 |
+
$ce_start
|
249 |
+
);
|
250 |
+
return;
|
251 |
+
}
|
252 |
+
$next_instance = $this->_find_next_instance(
|
253 |
+
$original_event->get( 'post_id' ),
|
254 |
+
$instance_id
|
255 |
+
);
|
256 |
+
if ( ! $next_instance ) {
|
257 |
+
$original_event->set( 'recurrence_rules', null );
|
258 |
+
$original_event->save( true );
|
259 |
+
return;
|
260 |
+
}
|
261 |
+
$original_event->set(
|
262 |
+
'start',
|
263 |
+
$this->_registry->get( 'date.time', $next_instance->get( 'start' ) )
|
264 |
+
);
|
265 |
+
$original_event->set(
|
266 |
+
'end',
|
267 |
+
$this->_registry->get( 'date.time', $next_instance->get( 'end' ) )
|
268 |
+
);
|
269 |
+
$edates = $this->_filter_exception_dates( $original_event );
|
270 |
+
$original_event->set( 'exception_dates', implode( ',', $edates ) );
|
271 |
+
$recurrence_rules = $original_event->get( 'recurrence_rules' );
|
272 |
+
$rules_info = $this->_registry->get( 'recurrence.rule' )
|
273 |
+
->build_recurrence_rules_array( $recurrence_rules );
|
274 |
+
if ( isset( $rules_info['COUNT'] ) ) {
|
275 |
+
$next_instances_count = $this->_count_next_instances(
|
276 |
+
$original_event->get( 'post_id' ),
|
277 |
+
$instance_id
|
278 |
+
);
|
279 |
+
$rules_info['COUNT'] = (int)$next_instances_count + count( $edates );
|
280 |
+
$rules = '';
|
281 |
+
if ( $rules_info['COUNT'] <= 1 ) {
|
282 |
+
$rules_info = array();
|
283 |
+
}
|
284 |
+
foreach ( $rules_info as $key => $value ) {
|
285 |
+
$rules .= $key . '=' . $value . ';';
|
286 |
+
}
|
287 |
+
$original_event->set(
|
288 |
+
'recurrence_rules',
|
289 |
+
$rules
|
290 |
+
);
|
291 |
+
}
|
292 |
+
$original_event->save( true );
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Returns next instance.
|
297 |
+
*
|
298 |
+
* @param int $post_id Post ID.
|
299 |
+
* @param int $instance_id Instance ID.
|
300 |
+
*
|
301 |
+
* @return null|Ai1ec_Event Result.
|
302 |
+
*/
|
303 |
+
protected function _find_next_instance( $post_id, $instance_id ) {
|
304 |
+
$dbi = $this->_registry->get( 'dbi.dbi' );
|
305 |
+
$table_instances = $dbi->get_table_name( 'ai1ec_event_instances' );
|
306 |
+
$table_posts = $dbi->get_table_name( 'posts' );
|
307 |
+
$query = $dbi->prepare(
|
308 |
+
'SELECT i.id FROM ' . $table_instances . ' i JOIN ' .
|
309 |
+
$table_posts . ' p ON (p.ID = i.post_id) ' .
|
310 |
+
'WHERE i.post_id = %d AND i.id > %d ' .
|
311 |
+
'AND p.post_status = \'publish\' ' .
|
312 |
+
'ORDER BY id ASC LIMIT 1',
|
313 |
+
$post_id,
|
314 |
+
$instance_id
|
315 |
+
);
|
316 |
+
$next_instance_id = $dbi->get_var( $query );
|
317 |
+
if ( ! $next_instance_id ) {
|
318 |
+
return null;
|
319 |
+
}
|
320 |
+
return $this->_registry->get( 'model.search' )
|
321 |
+
->get_event( $post_id, $next_instance_id );
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Counts future instances.
|
326 |
+
*
|
327 |
+
* @param int $post_id Post ID.
|
328 |
+
* @param int $instance_id Instance ID.
|
329 |
+
*
|
330 |
+
* @return int Result.
|
331 |
+
*/
|
332 |
+
protected function _count_next_instances( $post_id, $instance_id ) {
|
333 |
+
$dbi = $this->_registry->get( 'dbi.dbi' );
|
334 |
+
$table_instances = $dbi->get_table_name( 'ai1ec_event_instances' );
|
335 |
+
$table_posts = $dbi->get_table_name( 'posts' );
|
336 |
+
$query = $dbi->prepare(
|
337 |
+
'SELECT COUNT(i.id) FROM ' . $table_instances . ' i JOIN ' .
|
338 |
+
$table_posts . ' p ON (p.ID = i.post_id) ' .
|
339 |
+
'WHERE i.post_id = %d AND i.id > %d ' .
|
340 |
+
'AND p.post_status = \'publish\'',
|
341 |
+
$post_id,
|
342 |
+
$instance_id
|
343 |
+
);
|
344 |
+
return (int)$dbi->get_var( $query );
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Filters past or out of range exception dates.
|
349 |
+
*
|
350 |
+
* @param Ai1ec_Event $event Event.
|
351 |
+
*
|
352 |
+
* @return array Filtered exception dates.
|
353 |
+
*/
|
354 |
+
protected function _filter_exception_dates( Ai1ec_Event $event ) {
|
355 |
+
$start = (int)$event->get( 'start' )->format();
|
356 |
+
$exception_dates = explode( ',', $event->get( 'exception_dates' ) );
|
357 |
+
$dates = array();
|
358 |
+
foreach ( $exception_dates as $date ) {
|
359 |
+
$ex_date = (int)$this->_registry->get( 'date.time', $date )->format();
|
360 |
+
if ( $ex_date > $start ) {
|
361 |
+
$dates[] = $date;
|
362 |
+
}
|
363 |
+
}
|
364 |
+
return $dates;
|
365 |
+
}
|
366 |
}
|
app/model/settings-view.php
CHANGED
@@ -39,10 +39,16 @@ class Ai1ec_Settings_View extends Ai1ec_App {
|
|
39 |
if ( isset( $enabled_views[$view['name']] ) ) {
|
40 |
return;
|
41 |
}
|
|
|
|
|
42 |
$enabled_views[$view['name']] = array(
|
43 |
-
'enabled'
|
44 |
-
'default'
|
45 |
-
'
|
|
|
|
|
|
|
|
|
46 |
);
|
47 |
$this->_set( $enabled_views );
|
48 |
}
|
@@ -94,19 +100,40 @@ class Ai1ec_Settings_View extends Ai1ec_App {
|
|
94 |
|
95 |
/**
|
96 |
* Get default view to render.
|
97 |
-
*
|
98 |
-
*
|
99 |
-
* @return
|
100 |
*/
|
101 |
public function get_default() {
|
102 |
$enabled_views = $this->_get();
|
103 |
$default = null;
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
}
|
|
|
110 |
if ( null === $default ) {
|
111 |
$default = (string)current( array_keys( $enabled_views ) );
|
112 |
}
|
@@ -133,4 +160,4 @@ class Ai1ec_Settings_View extends Ai1ec_App {
|
|
133 |
return $this->_settings->set( self::SETTING_VIEWS_MAP, $enabled_views );
|
134 |
}
|
135 |
|
136 |
-
}
|
39 |
if ( isset( $enabled_views[$view['name']] ) ) {
|
40 |
return;
|
41 |
}
|
42 |
+
// Copy relevant settings to local view array; account for possible missing
|
43 |
+
// mobile settings during upgrade (assign defaults).
|
44 |
$enabled_views[$view['name']] = array(
|
45 |
+
'enabled' => $view['enabled'],
|
46 |
+
'default' => $view['default'],
|
47 |
+
'enabled_mobile' => isset( $view['enabled_mobile'] ) ?
|
48 |
+
$view['enabled_mobile'] : $view['enabled'],
|
49 |
+
'default_mobile' => isset( $view['default_mobile'] ) ?
|
50 |
+
$view['default_mobile'] : $view['default'],
|
51 |
+
'longname' => $view['longname'],
|
52 |
);
|
53 |
$this->_set( $enabled_views );
|
54 |
}
|
100 |
|
101 |
/**
|
102 |
* Get default view to render.
|
103 |
+
*
|
104 |
+
*
|
105 |
+
* @return
|
106 |
*/
|
107 |
public function get_default() {
|
108 |
$enabled_views = $this->_get();
|
109 |
$default = null;
|
110 |
+
// Check mobile settings first, if in mobile mode.
|
111 |
+
if (
|
112 |
+
! $this->_registry->get( 'compatibility.cli' )->is_cli() &&
|
113 |
+
wp_is_mobile()
|
114 |
+
) {
|
115 |
+
foreach ( $enabled_views as $view => $details ) {
|
116 |
+
if (
|
117 |
+
isset( $details['default_mobile'] ) &&
|
118 |
+
$details['default_mobile'] &&
|
119 |
+
$details['enabled_mobile']
|
120 |
+
) {
|
121 |
+
$default = $view;
|
122 |
+
break;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
// Either not in mobile mode or no mobile settings available; look up
|
127 |
+
// desktop settings.
|
128 |
+
if ( null === $default ) {
|
129 |
+
foreach ( $enabled_views as $view => $details ) {
|
130 |
+
if ( $details['default'] && $details['enabled'] ) {
|
131 |
+
$default = $view;
|
132 |
+
break;
|
133 |
+
}
|
134 |
}
|
135 |
}
|
136 |
+
// No enabled view found, but we need to pick one, so pick the first view.
|
137 |
if ( null === $default ) {
|
138 |
$default = (string)current( array_keys( $enabled_views ) );
|
139 |
}
|
160 |
return $this->_settings->set( self::SETTING_VIEWS_MAP, $enabled_views );
|
161 |
}
|
162 |
|
163 |
+
}
|
app/model/settings.php
CHANGED
@@ -45,9 +45,11 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
45 |
$value,
|
46 |
$type,
|
47 |
$renderer,
|
48 |
-
$version = '2.
|
49 |
) {
|
50 |
-
if (
|
|
|
|
|
51 |
! isset( $this->_options[$option] ) ||
|
52 |
! isset( $this->_options[$option]['version'] ) ||
|
53 |
(string)$this->_options[$option]['version'] !== (string)$version
|
@@ -264,6 +266,7 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
264 |
$test_version = $values['calendar_page_id']['version'];
|
265 |
}
|
266 |
}
|
|
|
267 |
if ( // process meta updates changes
|
268 |
empty( $values ) || (
|
269 |
false !== $test_version &&
|
@@ -272,16 +275,30 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
272 |
) {
|
273 |
$this->_register_standard_values();
|
274 |
$this->_change_update_status( true );
|
|
|
275 |
} else if ( $values instanceof Ai1ec_Settings ) { // process legacy
|
276 |
$this->_register_standard_values();
|
277 |
$this->_parse_legacy( $values );
|
278 |
$this->_change_update_status( true );
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
$this->_registry->get( 'controller.shutdown' )->register(
|
281 |
array( $this, 'shutdown' )
|
282 |
);
|
283 |
}
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
/**
|
286 |
* Set the standard values for the options of the core plugin.
|
287 |
*
|
@@ -349,24 +366,32 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
349 |
),
|
350 |
'default' => array(
|
351 |
'agenda' => array(
|
352 |
-
'enabled'
|
353 |
-
'default'
|
354 |
-
'
|
|
|
|
|
355 |
),
|
356 |
'oneday' => array(
|
357 |
-
'enabled'
|
358 |
-
'default'
|
359 |
-
'
|
|
|
|
|
360 |
),
|
361 |
'month' => array(
|
362 |
-
'enabled'
|
363 |
-
'default'
|
364 |
-
'
|
|
|
|
|
365 |
),
|
366 |
'week' => array(
|
367 |
-
'enabled'
|
368 |
-
'default'
|
369 |
-
'
|
|
|
|
|
370 |
),
|
371 |
),
|
372 |
),
|
@@ -553,6 +578,76 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
553 |
),
|
554 |
'default' => false,
|
555 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
'hide_featured_image' => array(
|
557 |
'type' => 'bool',
|
558 |
'renderer' => array(
|
@@ -568,15 +663,6 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
568 |
),
|
569 |
'default' => false,
|
570 |
),
|
571 |
-
'embedding' => array(
|
572 |
-
'type' => 'html',
|
573 |
-
'renderer' => array(
|
574 |
-
'class' => 'html',
|
575 |
-
'tab' => 'viewing-events',
|
576 |
-
'item' => 'embedded-views',
|
577 |
-
),
|
578 |
-
'default' => null,
|
579 |
-
),
|
580 |
'input_date_format' => array(
|
581 |
'type' => 'string',
|
582 |
'renderer' => array(
|
@@ -640,14 +726,8 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
640 |
'default' => false,
|
641 |
),
|
642 |
'show_publish_button' => array(
|
643 |
-
'type'
|
644 |
-
'renderer' =>
|
645 |
-
'class' => 'checkbox',
|
646 |
-
'tab' => 'editing-events',
|
647 |
-
'label' => Ai1ec_I18n::__(
|
648 |
-
'Display <strong>Publish</strong> at bottom of Edit Event form'
|
649 |
-
)
|
650 |
-
),
|
651 |
'default' => false,
|
652 |
),
|
653 |
'show_create_event_button' => array(
|
@@ -664,6 +744,15 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
664 |
),
|
665 |
'default' => false,
|
666 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
667 |
'calendar_css_selector' => array(
|
668 |
'type' => 'string',
|
669 |
'renderer' => array(
|
@@ -710,7 +799,22 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
710 |
'Disable <strong>gzip</strong> compression.'
|
711 |
),
|
712 |
'help' => Ai1ec_I18n::__(
|
713 |
-
'Use this option if calendar is
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
),
|
715 |
),
|
716 |
'default' => false,
|
@@ -810,4 +914,4 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
810 |
return $previous;
|
811 |
}
|
812 |
|
813 |
-
}
|
45 |
$value,
|
46 |
$type,
|
47 |
$renderer,
|
48 |
+
$version = '2.0.0'
|
49 |
) {
|
50 |
+
if ( 'deprecated' === $type ) {
|
51 |
+
unset( $this->_options[$option] );
|
52 |
+
} else if (
|
53 |
! isset( $this->_options[$option] ) ||
|
54 |
! isset( $this->_options[$option]['version'] ) ||
|
55 |
(string)$this->_options[$option]['version'] !== (string)$version
|
266 |
$test_version = $values['calendar_page_id']['version'];
|
267 |
}
|
268 |
}
|
269 |
+
$upgrade = false;
|
270 |
if ( // process meta updates changes
|
271 |
empty( $values ) || (
|
272 |
false !== $test_version &&
|
275 |
) {
|
276 |
$this->_register_standard_values();
|
277 |
$this->_change_update_status( true );
|
278 |
+
$upgrade = true;
|
279 |
} else if ( $values instanceof Ai1ec_Settings ) { // process legacy
|
280 |
$this->_register_standard_values();
|
281 |
$this->_parse_legacy( $values );
|
282 |
$this->_change_update_status( true );
|
283 |
+
$upgrade = true;
|
284 |
+
}
|
285 |
+
if ( true === $upgrade ) {
|
286 |
+
$this->_perform_upgrade_actions();
|
287 |
}
|
288 |
$this->_registry->get( 'controller.shutdown' )->register(
|
289 |
array( $this, 'shutdown' )
|
290 |
);
|
291 |
}
|
292 |
|
293 |
+
/**
|
294 |
+
* Do things needed on every plugin upgrade.
|
295 |
+
*/
|
296 |
+
protected function _perform_upgrade_actions() {
|
297 |
+
add_action( 'init', 'flush_rewrite_rules' );
|
298 |
+
$this->_registry->get( 'model.option' )
|
299 |
+
->set( 'ai1ec_invalidate_css_cache', true );
|
300 |
+
}
|
301 |
+
|
302 |
/**
|
303 |
* Set the standard values for the options of the core plugin.
|
304 |
*
|
366 |
),
|
367 |
'default' => array(
|
368 |
'agenda' => array(
|
369 |
+
'enabled' => true,
|
370 |
+
'default' => true,
|
371 |
+
'enabled_mobile' => true,
|
372 |
+
'default_mobile' => true,
|
373 |
+
'longname' => Ai1ec_I18n::__( 'Agenda' ),
|
374 |
),
|
375 |
'oneday' => array(
|
376 |
+
'enabled' => true,
|
377 |
+
'default' => false,
|
378 |
+
'enabled_mobile' => true,
|
379 |
+
'default_mobile' => false,
|
380 |
+
'longname' => Ai1ec_I18n::__( 'Day' ),
|
381 |
),
|
382 |
'month' => array(
|
383 |
+
'enabled' => true,
|
384 |
+
'default' => false,
|
385 |
+
'enabled_mobile' => true,
|
386 |
+
'default_mobile' => false,
|
387 |
+
'longname' => Ai1ec_I18n::__( 'Month' ),
|
388 |
),
|
389 |
'week' => array(
|
390 |
+
'enabled' => true,
|
391 |
+
'default' => false,
|
392 |
+
'enabled_mobile' => true,
|
393 |
+
'default_mobile' => false,
|
394 |
+
'longname' => Ai1ec_I18n::__( 'Week' ),
|
395 |
),
|
396 |
),
|
397 |
),
|
578 |
),
|
579 |
'default' => false,
|
580 |
),
|
581 |
+
'affix_filter_menu' => array(
|
582 |
+
'type' => 'bool',
|
583 |
+
'renderer' => array(
|
584 |
+
'class' => 'checkbox',
|
585 |
+
'tab' => 'viewing-events',
|
586 |
+
'item' => 'viewing-events',
|
587 |
+
'label' => Ai1ec_I18n::__(
|
588 |
+
' <strong>Affix filter menu</strong> to top of window when it scrolls out of view'
|
589 |
+
),
|
590 |
+
),
|
591 |
+
'default' => false,
|
592 |
+
),
|
593 |
+
'affix_vertical_offset_md' => array(
|
594 |
+
'type' => 'int',
|
595 |
+
'renderer' => array(
|
596 |
+
'class' => 'input',
|
597 |
+
'tab' => 'viewing-events',
|
598 |
+
'item' => 'viewing-events',
|
599 |
+
'label' => Ai1ec_I18n::__( 'Offset affixed filter bar vertically by' ),
|
600 |
+
'type' => 'append',
|
601 |
+
'append' => 'pixels',
|
602 |
+
'validator' => 'numeric',
|
603 |
+
),
|
604 |
+
'default' => 0,
|
605 |
+
),
|
606 |
+
'affix_vertical_offset_lg' => array(
|
607 |
+
'type' => 'int',
|
608 |
+
'renderer' => array(
|
609 |
+
'class' => 'input',
|
610 |
+
'tab' => 'viewing-events',
|
611 |
+
'item' => 'viewing-events',
|
612 |
+
'label' =>
|
613 |
+
'<i class="ai1ec-fa ai1ec-fa-lg ai1ec-fa-fw ai1ec-fa-desktop"></i> ' .
|
614 |
+
Ai1ec_I18n::__( 'Wide screens only (≥ 1200px)' ),
|
615 |
+
'type' => 'append',
|
616 |
+
'append' => 'pixels',
|
617 |
+
'validator' => 'numeric',
|
618 |
+
),
|
619 |
+
'default' => 0,
|
620 |
+
),
|
621 |
+
'affix_vertical_offset_sm' => array(
|
622 |
+
'type' => 'int',
|
623 |
+
'renderer' => array(
|
624 |
+
'class' => 'input',
|
625 |
+
'tab' => 'viewing-events',
|
626 |
+
'item' => 'viewing-events',
|
627 |
+
'label' =>
|
628 |
+
'<i class="ai1ec-fa ai1ec-fa-lg ai1ec-fa-fw ai1ec-fa-tablet"></i> ' .
|
629 |
+
Ai1ec_I18n::__( 'Tablets only (< 980px)' ),
|
630 |
+
'type' => 'append',
|
631 |
+
'append' => 'pixels',
|
632 |
+
'validator' => 'numeric',
|
633 |
+
),
|
634 |
+
'default' => 0,
|
635 |
+
),
|
636 |
+
'affix_vertical_offset_xs' => array(
|
637 |
+
'type' => 'int',
|
638 |
+
'renderer' => array(
|
639 |
+
'class' => 'input',
|
640 |
+
'tab' => 'viewing-events',
|
641 |
+
'item' => 'viewing-events',
|
642 |
+
'label' =>
|
643 |
+
'<i class="ai1ec-fa ai1ec-fa-lg ai1ec-fa-fw ai1ec-fa-mobile"></i> ' .
|
644 |
+
Ai1ec_I18n::__( 'Phones only (< 768px)' ),
|
645 |
+
'type' => 'append',
|
646 |
+
'append' => 'pixels',
|
647 |
+
'validator' => 'numeric',
|
648 |
+
),
|
649 |
+
'default' => 0,
|
650 |
+
),
|
651 |
'hide_featured_image' => array(
|
652 |
'type' => 'bool',
|
653 |
'renderer' => array(
|
663 |
),
|
664 |
'default' => false,
|
665 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
'input_date_format' => array(
|
667 |
'type' => 'string',
|
668 |
'renderer' => array(
|
726 |
'default' => false,
|
727 |
),
|
728 |
'show_publish_button' => array(
|
729 |
+
'type' => 'deprecated',
|
730 |
+
'renderer' => null,
|
|
|
|
|
|
|
|
|
|
|
|
|
731 |
'default' => false,
|
732 |
),
|
733 |
'show_create_event_button' => array(
|
744 |
),
|
745 |
'default' => false,
|
746 |
),
|
747 |
+
'embedding' => array(
|
748 |
+
'type' => 'html',
|
749 |
+
'renderer' => array(
|
750 |
+
'class' => 'html',
|
751 |
+
'tab' => 'advanced',
|
752 |
+
'item' => 'embedded-views',
|
753 |
+
),
|
754 |
+
'default' => null,
|
755 |
+
),
|
756 |
'calendar_css_selector' => array(
|
757 |
'type' => 'string',
|
758 |
'renderer' => array(
|
799 |
'Disable <strong>gzip</strong> compression.'
|
800 |
),
|
801 |
'help' => Ai1ec_I18n::__(
|
802 |
+
'Use this option if calendar is unresponsive. <a href="http://support.time.ly/disable-gzip-compression/">Read more</a> about the issue. (From version 2.1 onwards, gzip is disabled by default for maximum compatibility.)'
|
803 |
+
),
|
804 |
+
),
|
805 |
+
'default' => true,
|
806 |
+
),
|
807 |
+
'render_css_as_link' => array(
|
808 |
+
'type' => 'bool',
|
809 |
+
'renderer' => array(
|
810 |
+
'class' => 'checkbox',
|
811 |
+
'tab' => 'advanced',
|
812 |
+
'item' => 'advanced',
|
813 |
+
'label' => Ai1ec_I18n::__(
|
814 |
+
'<strong>Link CSS</strong> in <code><head></code> section when file cache is unavailable.'
|
815 |
+
),
|
816 |
+
'help' => Ai1ec_I18n::__(
|
817 |
+
'Use this option if file cache is unavailable and you would prefer to serve CSS as a link rather than have it output inline.'
|
818 |
),
|
819 |
),
|
820 |
'default' => false,
|
914 |
return $previous;
|
915 |
}
|
916 |
|
917 |
+
}
|
app/view/admin/abstract.php
CHANGED
@@ -11,6 +11,42 @@
|
|
11 |
*/
|
12 |
abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Adds the page to the correct menu.
|
16 |
*/
|
11 |
*/
|
12 |
abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
|
13 |
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
protected $_page_id;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
protected $_page_suffix;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Standard constructor
|
26 |
+
*
|
27 |
+
* @param Ai1ec_Registry_Object $registry
|
28 |
+
*/
|
29 |
+
public function __construct( Ai1ec_Registry_Object $registry ) {
|
30 |
+
parent::__construct( $registry );
|
31 |
+
$exploded_class = explode( '_', get_class( $this ) );
|
32 |
+
$this->_page_suffix = strtolower( end( $exploded_class ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get the url of the page
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function get_url() {
|
41 |
+
return add_query_arg(
|
42 |
+
array(
|
43 |
+
'post_type' => AI1EC_POST_TYPE,
|
44 |
+
'page' => AI1EC_PLUGIN_NAME . '-' . $this->_page_suffix,
|
45 |
+
),
|
46 |
+
get_admin_url() . 'edit.php'
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
/**
|
51 |
* Adds the page to the correct menu.
|
52 |
*/
|
app/view/admin/add-new-event.php
CHANGED
@@ -36,7 +36,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
36 |
*
|
37 |
* @return void
|
38 |
*/
|
39 |
-
public function meta_box_view() {
|
40 |
|
41 |
$theme_loader = $this->_registry->get( 'theme.loader' );
|
42 |
$empty_event = $this->_registry->get( 'model.event' );
|
@@ -52,6 +52,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
52 |
$start = $this->_registry->get( 'date.time' );
|
53 |
$end = $this->_registry->get( 'date.time', '+1 hour' );
|
54 |
$timezone_name = null;
|
|
|
55 |
$show_map = false;
|
56 |
$google_map = '';
|
57 |
$venue = '';
|
@@ -188,14 +189,23 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
188 |
}
|
189 |
|
190 |
// Time zone; display if set.
|
191 |
-
$timezone
|
|
|
|
|
192 |
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
if ( $timezone_string ) {
|
197 |
$timezone = $this->_registry->get( 'date.system' )
|
198 |
-
->get_gmt_offset_expr();
|
199 |
}
|
200 |
|
201 |
if ( empty( $timezone_name ) ) {
|
@@ -204,8 +214,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
204 |
* exposed to user in some mean. It's possible to use named const.
|
205 |
* `'sys.default'` only when passing value to date.time library.
|
206 |
*/
|
207 |
-
$timezone_name = $
|
208 |
-
->get_default_timezone();
|
209 |
}
|
210 |
|
211 |
// This will store each of the accordion tabs' markup, and passed as an
|
@@ -236,6 +245,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
236 |
'exdate' => $exdate,
|
237 |
'parent_event_id' => $parent_event_id,
|
238 |
'instance_id' => $instance_id,
|
|
|
239 |
);
|
240 |
|
241 |
$boxes[] = $theme_loader
|
@@ -293,31 +303,6 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
293 |
$boxes[] = $theme_loader
|
294 |
->get_file( 'box_event_contact.php', $args, true )
|
295 |
->get_content();
|
296 |
-
// ==================
|
297 |
-
// = Publish button =
|
298 |
-
// ==================
|
299 |
-
$publish_button = '';
|
300 |
-
if (
|
301 |
-
$this->_registry->get( 'model.settings' )
|
302 |
-
->get( 'show_publish_button' )
|
303 |
-
) {
|
304 |
-
$args = array();
|
305 |
-
$post_type_object = get_post_type_object(
|
306 |
-
get_post()->post_type
|
307 |
-
);
|
308 |
-
if ( current_user_can( $post_type_object->cap->publish_posts ) ) {
|
309 |
-
$args['button_value'] = is_null( $event )
|
310 |
-
? Ai1ec_I18n::__( 'Publish' )
|
311 |
-
: Ai1ec_I18n::__( 'Update' );
|
312 |
-
} else {
|
313 |
-
$args['button_value'] = Ai1ec_I18n::__( 'Submit for Review' );
|
314 |
-
}
|
315 |
-
|
316 |
-
$boxes[] = $theme_loader
|
317 |
-
->get_file( 'box_publish_button.php', $args, true )
|
318 |
-
->get_content();
|
319 |
-
|
320 |
-
}
|
321 |
|
322 |
// ==========================
|
323 |
// = Parent/Child relations =
|
@@ -337,7 +322,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
337 |
->get_child_event_objects( $event->get( 'post_id' ) );
|
338 |
$args = compact( 'parent', 'children' );
|
339 |
$args['registry'] = $this->_registry;
|
340 |
-
|
341 |
$boxes[] = $theme_loader->get_file(
|
342 |
'box_event_children.php',
|
343 |
$args,
|
@@ -351,7 +336,6 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
351 |
// Display the final view of the meta box.
|
352 |
$args = array(
|
353 |
'boxes' => $boxes,
|
354 |
-
'publish_button' => $publish_button,
|
355 |
);
|
356 |
echo $theme_loader
|
357 |
->get_file( 'add_new_event_meta_box.php', $args, true )
|
@@ -376,4 +360,23 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
376 |
return $input;
|
377 |
}
|
378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
}
|
36 |
*
|
37 |
* @return void
|
38 |
*/
|
39 |
+
public function meta_box_view( $post ) {
|
40 |
|
41 |
$theme_loader = $this->_registry->get( 'theme.loader' );
|
42 |
$empty_event = $this->_registry->get( 'model.event' );
|
52 |
$start = $this->_registry->get( 'date.time' );
|
53 |
$end = $this->_registry->get( 'date.time', '+1 hour' );
|
54 |
$timezone_name = null;
|
55 |
+
$timezones_list = $this->_registry->get( 'date.timezone' )->get_timezones( true );
|
56 |
$show_map = false;
|
57 |
$google_map = '';
|
58 |
$venue = '';
|
189 |
}
|
190 |
|
191 |
// Time zone; display if set.
|
192 |
+
$timezone = '';
|
193 |
+
$timezone_string = null;
|
194 |
+
$date_timezone = $this->_registry->get( 'date.timezone' );
|
195 |
|
196 |
+
if (
|
197 |
+
! empty( $timezone_name ) &&
|
198 |
+
$local_name = $date_timezone->get_name( $timezone_name )
|
199 |
+
) {
|
200 |
+
$timezone_string = $local_name;
|
201 |
+
}
|
202 |
+
if ( null === $timezone_string ) {
|
203 |
+
$timezone_string = $date_timezone->get_default_timezone();
|
204 |
+
}
|
205 |
|
206 |
if ( $timezone_string ) {
|
207 |
$timezone = $this->_registry->get( 'date.system' )
|
208 |
+
->get_gmt_offset_expr( $timezone_string );
|
209 |
}
|
210 |
|
211 |
if ( empty( $timezone_name ) ) {
|
214 |
* exposed to user in some mean. It's possible to use named const.
|
215 |
* `'sys.default'` only when passing value to date.time library.
|
216 |
*/
|
217 |
+
$timezone_name = $date_timezone->get_default_timezone();
|
|
|
218 |
}
|
219 |
|
220 |
// This will store each of the accordion tabs' markup, and passed as an
|
245 |
'exdate' => $exdate,
|
246 |
'parent_event_id' => $parent_event_id,
|
247 |
'instance_id' => $instance_id,
|
248 |
+
'timezones_list' => $timezones_list,
|
249 |
);
|
250 |
|
251 |
$boxes[] = $theme_loader
|
303 |
$boxes[] = $theme_loader
|
304 |
->get_file( 'box_event_contact.php', $args, true )
|
305 |
->get_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
// ==========================
|
308 |
// = Parent/Child relations =
|
322 |
->get_child_event_objects( $event->get( 'post_id' ) );
|
323 |
$args = compact( 'parent', 'children' );
|
324 |
$args['registry'] = $this->_registry;
|
325 |
+
|
326 |
$boxes[] = $theme_loader->get_file(
|
327 |
'box_event_children.php',
|
328 |
$args,
|
336 |
// Display the final view of the meta box.
|
337 |
$args = array(
|
338 |
'boxes' => $boxes,
|
|
|
339 |
);
|
340 |
echo $theme_loader
|
341 |
->get_file( 'add_new_event_meta_box.php', $args, true )
|
360 |
return $input;
|
361 |
}
|
362 |
|
363 |
+
/**
|
364 |
+
* Renders Bootstrap inline alert.
|
365 |
+
*
|
366 |
+
* @param WP_Post $post Post object.
|
367 |
+
*
|
368 |
+
* @return void Method does not return.
|
369 |
+
*/
|
370 |
+
public function event_inline_alert( $post ) {
|
371 |
+
if (
|
372 |
+
! isset( $post->post_type ) ||
|
373 |
+
AI1EC_POST_TYPE != $post->post_type
|
374 |
+
) {
|
375 |
+
return;
|
376 |
+
}
|
377 |
+
$theme_loader = $this->_registry->get( 'theme.loader' );
|
378 |
+
echo $theme_loader->get_file( 'box_inline_warning.php', null, true )
|
379 |
+
->get_content();
|
380 |
+
}
|
381 |
+
|
382 |
}
|
app/view/admin/settings.php
CHANGED
@@ -51,6 +51,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
51 |
$loader = $this->_registry->get( 'theme.loader' );
|
52 |
$file = $loader->get_file( 'setting/page.twig', $args, true );
|
53 |
$file->render();
|
|
|
54 |
}
|
55 |
|
56 |
/* (non-PHPdoc)
|
@@ -136,10 +137,6 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
136 |
$tabs = array(
|
137 |
'viewing-events' => array(
|
138 |
'name' => Ai1ec_I18n::__( 'Viewing Events' ),
|
139 |
-
'items' => array(
|
140 |
-
'viewing-events' => Ai1ec_I18n::__( 'Viewing Events' ),
|
141 |
-
'embedded-views' => Ai1ec_I18n::__( 'Embedded Views' ),
|
142 |
-
),
|
143 |
),
|
144 |
'editing-events' => array(
|
145 |
'name' => Ai1ec_I18n::__( 'Adding/Editing Events' ),
|
@@ -147,10 +144,11 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
147 |
'advanced' => array(
|
148 |
'name' => Ai1ec_I18n::__( 'Advanced' ),
|
149 |
'items' => array(
|
150 |
-
'advanced'
|
151 |
-
'
|
152 |
-
'
|
153 |
-
'
|
|
|
154 |
)
|
155 |
),
|
156 |
);
|
@@ -179,7 +177,10 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
179 |
'If the form below is not working please follow <a href="%s">this link</a>.'
|
180 |
) .
|
181 |
'</div>',
|
182 |
-
|
|
|
|
|
|
|
183 |
)
|
184 |
);
|
185 |
|
51 |
$loader = $this->_registry->get( 'theme.loader' );
|
52 |
$file = $loader->get_file( 'setting/page.twig', $args, true );
|
53 |
$file->render();
|
54 |
+
$this->_registry->get( 'robots.helper' )->install();
|
55 |
}
|
56 |
|
57 |
/* (non-PHPdoc)
|
137 |
$tabs = array(
|
138 |
'viewing-events' => array(
|
139 |
'name' => Ai1ec_I18n::__( 'Viewing Events' ),
|
|
|
|
|
|
|
|
|
140 |
),
|
141 |
'editing-events' => array(
|
142 |
'name' => Ai1ec_I18n::__( 'Adding/Editing Events' ),
|
144 |
'advanced' => array(
|
145 |
'name' => Ai1ec_I18n::__( 'Advanced' ),
|
146 |
'items' => array(
|
147 |
+
'advanced' => Ai1ec_I18n::__( 'Advanced Settings' ),
|
148 |
+
'embedded-views' => Ai1ec_I18n::__( 'Shortcodes' ),
|
149 |
+
'email' => Ai1ec_I18n::__( 'Email Templates' ),
|
150 |
+
'apis' => Ai1ec_I18n::__( 'External Services' ),
|
151 |
+
'cache' => Ai1ec_I18n::__( 'Cache Report' ),
|
152 |
)
|
153 |
),
|
154 |
);
|
177 |
'If the form below is not working please follow <a href="%s">this link</a>.'
|
178 |
) .
|
179 |
'</div>',
|
180 |
+
wp_nonce_url(
|
181 |
+
add_query_arg( 'ai1ec_disable_gzip_compression', '1' ),
|
182 |
+
'ai1ec_disable_gzip_compression'
|
183 |
+
)
|
184 |
)
|
185 |
);
|
186 |
|
app/view/admin/theme-options.php
CHANGED
@@ -110,6 +110,7 @@ class Ai1ec_View_Theme_Options extends Ai1ec_View_Admin_Abstract {
|
|
110 |
'?controller=front&action=ai1ec_save_theme_options&plugin=' . AI1EC_PLUGIN_NAME
|
111 |
);
|
112 |
|
|
|
113 |
|
114 |
$loader = $this->_registry->get( 'theme.loader' );
|
115 |
|
110 |
'?controller=front&action=ai1ec_save_theme_options&plugin=' . AI1EC_PLUGIN_NAME
|
111 |
);
|
112 |
|
113 |
+
$frontend = $this->_registry->get( 'css.frontend' );
|
114 |
|
115 |
$loader = $this->_registry->get( 'theme.loader' );
|
116 |
|
app/view/calendar/page.php
CHANGED
@@ -36,10 +36,13 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
36 |
// Are we loading a shortcode?
|
37 |
$shortcode = $request->get( 'shortcode' );
|
38 |
|
|
|
|
|
|
|
39 |
$view_args = $this->get_view_args_for_view( $request );
|
40 |
|
41 |
try {
|
42 |
-
$action
|
43 |
->get_configured( $view_args['action'] );
|
44 |
} catch ( Ai1ec_Settings_Exception $exception ) {
|
45 |
// short-circuit and return error message
|
@@ -51,27 +54,15 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
51 |
}
|
52 |
$type = $request->get( 'request_type' );
|
53 |
|
|
|
54 |
$exact_date = $this->get_exact_date( $request );
|
55 |
$view_obj = $this->_registry->get(
|
56 |
'view.calendar.view.' . $action,
|
57 |
$request
|
58 |
);
|
59 |
$view_args = $view_obj->get_extra_arguments( $view_args, $exact_date );
|
60 |
-
$view = $view_obj->get_content( $view_args );
|
61 |
-
$args = array(
|
62 |
-
'view' => $view,
|
63 |
-
'version' => AI1EC_VERSION,
|
64 |
-
'subscribe_buttons' => '',
|
65 |
-
);
|
66 |
-
$taxonomy = $this->_registry->get( 'view.calendar.taxonomy' );
|
67 |
-
$categories = $taxonomy->get_html_for_categories(
|
68 |
-
$view_args
|
69 |
-
);
|
70 |
|
71 |
-
|
72 |
-
$view_args,
|
73 |
-
true
|
74 |
-
);
|
75 |
$dropdown_args = $view_args;
|
76 |
if (
|
77 |
isset( $dropdown_args['time_limit'] ) &&
|
@@ -81,16 +72,33 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
81 |
}
|
82 |
$views_dropdown =
|
83 |
$this->get_html_for_views_dropdown( $dropdown_args, $view_obj );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$subscribe_buttons =
|
85 |
$this->get_html_for_subscribe_buttons( $view_args );
|
|
|
|
|
86 |
|
87 |
if (
|
88 |
( $view_args['no_navigation'] || $type !== 'html' ) &&
|
89 |
'true' !== $shortcode
|
90 |
) {
|
91 |
-
$args_for_filter = $view_args;
|
92 |
$router = $this->_registry->get( 'routing.router' );
|
93 |
-
$are_filters_set = $router->is_at_least_one_filter_set_in_request(
|
|
|
|
|
94 |
// send data both for json and jsonp as shortcodes are jsonp
|
95 |
return array(
|
96 |
'html' => $view,
|
@@ -155,7 +163,6 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
155 |
$calendar = $loader->get_file( 'calendar.twig', $calendar_args, false );
|
156 |
return $calendar->get_content();
|
157 |
}
|
158 |
-
|
159 |
}
|
160 |
|
161 |
/**
|
@@ -222,12 +229,17 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
222 |
$available_views = array();
|
223 |
$enabled_views = (array)$settings->get( 'enabled_views', array() );
|
224 |
$view_names = array();
|
|
|
225 |
foreach ( $enabled_views as $key => $val ) {
|
226 |
$view_names[$key] = $val['longname'];
|
227 |
-
|
|
|
|
|
|
|
|
|
228 |
$values = array();
|
229 |
$options = $view_args;
|
230 |
-
if ( $
|
231 |
if ( $view instanceof Ai1ec_Calendar_View_Agenda ) {
|
232 |
if (
|
233 |
isset( $options['exact_date'] ) &&
|
@@ -366,6 +378,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
366 |
'auth_ids',
|
367 |
'cat_ids',
|
368 |
'tag_ids',
|
|
|
369 |
) );
|
370 |
|
371 |
$add_defaults = array(
|
36 |
// Are we loading a shortcode?
|
37 |
$shortcode = $request->get( 'shortcode' );
|
38 |
|
39 |
+
// Get args for the current view; required to generate HTML for views
|
40 |
+
// dropdown list, categories, tags, subscribe buttons, and of course the
|
41 |
+
// view itself.
|
42 |
$view_args = $this->get_view_args_for_view( $request );
|
43 |
|
44 |
try {
|
45 |
+
$action = $this->_registry->get( 'model.settings-view' )
|
46 |
->get_configured( $view_args['action'] );
|
47 |
} catch ( Ai1ec_Settings_Exception $exception ) {
|
48 |
// short-circuit and return error message
|
54 |
}
|
55 |
$type = $request->get( 'request_type' );
|
56 |
|
57 |
+
// Add view-specific args to the current view args.
|
58 |
$exact_date = $this->get_exact_date( $request );
|
59 |
$view_obj = $this->_registry->get(
|
60 |
'view.calendar.view.' . $action,
|
61 |
$request
|
62 |
);
|
63 |
$view_args = $view_obj->get_extra_arguments( $view_args, $exact_date );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
// Get HTML for views dropdown list.
|
|
|
|
|
|
|
66 |
$dropdown_args = $view_args;
|
67 |
if (
|
68 |
isset( $dropdown_args['time_limit'] ) &&
|
72 |
}
|
73 |
$views_dropdown =
|
74 |
$this->get_html_for_views_dropdown( $dropdown_args, $view_obj );
|
75 |
+
// Add views dropdown markup to view args.
|
76 |
+
$view_args['views_dropdown'] = $views_dropdown;
|
77 |
+
|
78 |
+
// Get HTML for categories and for tags
|
79 |
+
$taxonomy = $this->_registry->get( 'view.calendar.taxonomy' );
|
80 |
+
$categories = $taxonomy->get_html_for_categories(
|
81 |
+
$view_args
|
82 |
+
);
|
83 |
+
$tags = $taxonomy->get_html_for_tags(
|
84 |
+
$view_args,
|
85 |
+
true
|
86 |
+
);
|
87 |
+
|
88 |
+
// Get HTML for subscribe buttons.
|
89 |
$subscribe_buttons =
|
90 |
$this->get_html_for_subscribe_buttons( $view_args );
|
91 |
+
// Get HTML for view itself.
|
92 |
+
$view = $view_obj->get_content( $view_args );
|
93 |
|
94 |
if (
|
95 |
( $view_args['no_navigation'] || $type !== 'html' ) &&
|
96 |
'true' !== $shortcode
|
97 |
) {
|
|
|
98 |
$router = $this->_registry->get( 'routing.router' );
|
99 |
+
$are_filters_set = $router->is_at_least_one_filter_set_in_request(
|
100 |
+
$view_args
|
101 |
+
);
|
102 |
// send data both for json and jsonp as shortcodes are jsonp
|
103 |
return array(
|
104 |
'html' => $view,
|
163 |
$calendar = $loader->get_file( 'calendar.twig', $calendar_args, false );
|
164 |
return $calendar->get_content();
|
165 |
}
|
|
|
166 |
}
|
167 |
|
168 |
/**
|
229 |
$available_views = array();
|
230 |
$enabled_views = (array)$settings->get( 'enabled_views', array() );
|
231 |
$view_names = array();
|
232 |
+
$mode = wp_is_mobile() ? '_mobile' : '';
|
233 |
foreach ( $enabled_views as $key => $val ) {
|
234 |
$view_names[$key] = $val['longname'];
|
235 |
+
// Find out if view is enabled in requested mode (mobile or desktop). If
|
236 |
+
// no mode-specific setting is available, fall back to desktop setting.
|
237 |
+
$view_enabled = isset( $enabled_views[$key]['enabled' . $mode] ) ?
|
238 |
+
$enabled_views[$key]['enabled' . $mode] :
|
239 |
+
$enabled_views[$key]['enabled'];
|
240 |
$values = array();
|
241 |
$options = $view_args;
|
242 |
+
if ( $view_enabled ) {
|
243 |
if ( $view instanceof Ai1ec_Calendar_View_Agenda ) {
|
244 |
if (
|
245 |
isset( $options['exact_date'] ) &&
|
378 |
'auth_ids',
|
379 |
'cat_ids',
|
380 |
'tag_ids',
|
381 |
+
'events_limit',
|
382 |
) );
|
383 |
|
384 |
$add_defaults = array(
|
app/view/calendar/shortcode.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @subpackage AI1EC.View
|
10 |
*/
|
11 |
class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
12 |
-
|
13 |
/**
|
14 |
* Generate replacement content for [ai1ec] shortcode.
|
15 |
*
|
@@ -22,13 +22,6 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
22 |
* @return string Replacement for shortcode entry
|
23 |
*/
|
24 |
public function shortcode( $atts, $content = '', $tag = 'ai1ec' ) {
|
25 |
-
static $call_count = 0;
|
26 |
-
|
27 |
-
++$call_count;
|
28 |
-
if ( $call_count > 1 ) { // not implemented
|
29 |
-
return false; // so far process only first request
|
30 |
-
}
|
31 |
-
|
32 |
$settings_view = $this->_registry->get( 'model.settings-view' );
|
33 |
$view_names_list = array_keys( $settings_view->get_all() );
|
34 |
$default_view = $settings_view->get_default();
|
@@ -38,8 +31,10 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
38 |
$view_names[$view_name] = true;
|
39 |
}
|
40 |
|
41 |
-
$view
|
42 |
-
$categories
|
|
|
|
|
43 |
if ( isset( $atts['view'] ) ) {
|
44 |
if ( 'ly' === substr( $atts['view'], -2 ) ) {
|
45 |
$atts['view'] = substr( $atts['view'], 0, -2 );
|
@@ -51,11 +46,12 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
51 |
}
|
52 |
|
53 |
$mappings = array(
|
54 |
-
'cat_name'
|
55 |
-
'cat_id'
|
56 |
-
'tag_name'
|
57 |
-
'tag_id'
|
58 |
-
'post_id'
|
|
|
59 |
);
|
60 |
foreach ( $mappings as $att_name => $type ) {
|
61 |
if ( ! isset( $atts[$att_name] ) ) {
|
@@ -103,6 +99,11 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
103 |
'action' => $view,
|
104 |
'request_type' => 'jsonp',
|
105 |
'shortcode' => 'true',
|
|
|
|
|
|
|
|
|
|
|
106 |
);
|
107 |
if ( isset( $atts['exact_date'] ) ) {
|
108 |
$query['exact_date'] = $atts['exact_date'];
|
9 |
* @subpackage AI1EC.View
|
10 |
*/
|
11 |
class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
12 |
+
|
13 |
/**
|
14 |
* Generate replacement content for [ai1ec] shortcode.
|
15 |
*
|
22 |
* @return string Replacement for shortcode entry
|
23 |
*/
|
24 |
public function shortcode( $atts, $content = '', $tag = 'ai1ec' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$settings_view = $this->_registry->get( 'model.settings-view' );
|
26 |
$view_names_list = array_keys( $settings_view->get_all() );
|
27 |
$default_view = $settings_view->get_default();
|
31 |
$view_names[$view_name] = true;
|
32 |
}
|
33 |
|
34 |
+
$view = $default_view;
|
35 |
+
$categories = $tags = $post_ids = array();
|
36 |
+
$events_limit = null;
|
37 |
+
|
38 |
if ( isset( $atts['view'] ) ) {
|
39 |
if ( 'ly' === substr( $atts['view'], -2 ) ) {
|
40 |
$atts['view'] = substr( $atts['view'], 0, -2 );
|
46 |
}
|
47 |
|
48 |
$mappings = array(
|
49 |
+
'cat_name' => 'categories',
|
50 |
+
'cat_id' => 'categories',
|
51 |
+
'tag_name' => 'tags',
|
52 |
+
'tag_id' => 'tags',
|
53 |
+
'post_id' => 'post_ids',
|
54 |
+
'events_limit' => 'events_limit',
|
55 |
);
|
56 |
foreach ( $mappings as $att_name => $type ) {
|
57 |
if ( ! isset( $atts[$att_name] ) ) {
|
99 |
'action' => $view,
|
100 |
'request_type' => 'jsonp',
|
101 |
'shortcode' => 'true',
|
102 |
+
'events_limit' => ( null !== $events_limit )
|
103 |
+
// definition above casts values as array, so we take first element,
|
104 |
+
// as there won't be others
|
105 |
+
? $events_limit[0]
|
106 |
+
: null,
|
107 |
);
|
108 |
if ( isset( $atts['exact_date'] ) ) {
|
109 |
$query['exact_date'] = $atts['exact_date'];
|
app/view/calendar/view/abstract.php
CHANGED
@@ -150,19 +150,19 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
|
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
-
*
|
154 |
*
|
155 |
-
* @param
|
156 |
-
*
|
157 |
* @return string
|
158 |
*/
|
159 |
-
protected function _get_navigation(
|
160 |
$loader = $this->_registry->get( 'theme.loader' );
|
161 |
$navigation = '';
|
162 |
-
if ( true !== $no_navigation ) {
|
163 |
$navigation = $loader->get_file(
|
164 |
'navigation.twig',
|
165 |
-
$
|
166 |
false
|
167 |
)->get_content();
|
168 |
}
|
@@ -170,12 +170,16 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
|
|
170 |
}
|
171 |
|
172 |
/**
|
173 |
-
*
|
|
|
|
|
|
|
|
|
174 |
* @return string
|
175 |
*/
|
176 |
-
protected function _get_pagination( array $args ) {
|
177 |
$method = 'get_' . $this->get_name() . '_pagination_links';
|
178 |
-
$pagination_links = $this->$method( $args );
|
179 |
$loader = $this->_registry->get( 'theme.loader' );
|
180 |
$pagination_links = $loader->get_file(
|
181 |
'pagination.twig',
|
@@ -209,7 +213,8 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
|
|
209 |
apply_filters(
|
210 |
'the_title',
|
211 |
$event->get( 'post' )->post_title,
|
212 |
-
$event->get( 'post_id' )
|
|
|
213 |
)
|
214 |
);
|
215 |
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
+
* Gets the navigation bar HTML.
|
154 |
*
|
155 |
+
* @param array $nav_args Args for the navigation bar template, including
|
156 |
+
* 'no_navigation' which determines whether to show it
|
157 |
* @return string
|
158 |
*/
|
159 |
+
protected function _get_navigation( array $nav_args ) {
|
160 |
$loader = $this->_registry->get( 'theme.loader' );
|
161 |
$navigation = '';
|
162 |
+
if ( true !== $nav_args['no_navigation'] ) {
|
163 |
$navigation = $loader->get_file(
|
164 |
'navigation.twig',
|
165 |
+
$nav_args,
|
166 |
false
|
167 |
)->get_content();
|
168 |
}
|
170 |
}
|
171 |
|
172 |
/**
|
173 |
+
* Calls the get_*_pagination_links method for the current view type and
|
174 |
+
* renders its result, returning the rendered pagination links.
|
175 |
+
*
|
176 |
+
* @param array $args Current request arguments
|
177 |
+
* @param string $title Title to display in datepicker button
|
178 |
* @return string
|
179 |
*/
|
180 |
+
protected function _get_pagination( array $args, $title ) {
|
181 |
$method = 'get_' . $this->get_name() . '_pagination_links';
|
182 |
+
$pagination_links = $this->$method( $args, $title );
|
183 |
$loader = $this->_registry->get( 'theme.loader' );
|
184 |
$pagination_links = $loader->get_file(
|
185 |
'pagination.twig',
|
213 |
apply_filters(
|
214 |
'the_title',
|
215 |
$event->get( 'post' )->post_title,
|
216 |
+
$event->get( 'post_id' ),
|
217 |
+
true
|
218 |
)
|
219 |
);
|
220 |
|
app/view/calendar/view/agenda.php
CHANGED
@@ -29,11 +29,14 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
29 |
|
30 |
// Get events, then classify into date array
|
31 |
$per_page_setting = $type . '_events_per_page';
|
32 |
-
$search
|
33 |
-
$settings
|
|
|
|
|
|
|
34 |
$results = $search->get_events_relative_to(
|
35 |
$timestamp,
|
36 |
-
$
|
37 |
$view_args['page_offset'],
|
38 |
array(
|
39 |
'post_ids' => $view_args['post_ids'],
|
@@ -49,17 +52,40 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
49 |
$view_args['request']
|
50 |
);
|
51 |
|
52 |
-
//
|
53 |
-
$
|
54 |
-
$
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
$view_args,
|
59 |
$results['prev'],
|
60 |
$results['next'],
|
61 |
$results['date_first'],
|
62 |
-
$results['date_last']
|
|
|
|
|
63 |
);
|
64 |
|
65 |
$pagination_links = $loader->get_file(
|
@@ -70,39 +96,40 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
70 |
),
|
71 |
false
|
72 |
)->get_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
-
|
75 |
-
$range_start = $results['date_first'] ? $results['date_first'] : $this->_registry->get( 'date.time', $timestamp );
|
76 |
-
$range_end = $results['date_last'] ? $results['date_last'] : $this->_registry->get( 'date.time', $timestamp );
|
77 |
-
$range_start = $this->_registry->get( 'date.time', $range_start );
|
78 |
-
$range_end = $this->_registry->get( 'date.time', $range_end );
|
79 |
-
$start_year = $range_start->format_i18n( 'Y' );
|
80 |
-
$end_year = $range_end->format_i18n( 'Y' );
|
81 |
-
$start_month = $range_start->format_i18n( 'F' );
|
82 |
-
$end_month = $range_end->format_i18n( 'F' );
|
83 |
-
if ( $start_year === $end_year && $start_month === $end_month ) {
|
84 |
-
$title_date_range = "$start_month $start_year";
|
85 |
-
} elseif ( $start_year === $end_year ) {
|
86 |
-
$title_date_range = "$start_month – $end_month $end_year";
|
87 |
-
} else {
|
88 |
-
$title_date_range = "$start_month $start_year – $end_month $end_year";
|
89 |
-
}
|
90 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_' . $type . '_ticket_button', false );
|
91 |
$args = array(
|
92 |
-
'title' => $
|
93 |
'dates' => $dates,
|
94 |
'type' => $type,
|
95 |
'show_year_in_agenda_dates' => $settings->get( 'show_year_in_agenda_dates' ),
|
96 |
'expanded' => $settings->get( 'agenda_events_expanded' ),
|
97 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
98 |
'page_offset' => $view_args['page_offset'],
|
99 |
-
'
|
100 |
'post_ids' => join( ',', $view_args['post_ids'] ),
|
101 |
'data_type' => $view_args['data_type'],
|
102 |
'data_type_events' => '',
|
103 |
'is_ticket_button_enabled' => $is_ticket_button_enabled,
|
104 |
-
'text_collapse_all' => __( 'Collapse All', AI1EC_PLUGIN_NAME ),
|
105 |
-
'text_expand_all' => __( 'Expand All', AI1EC_PLUGIN_NAME ),
|
106 |
'text_upcoming_events' => __( 'There are no upcoming events to display at this time.', AI1EC_PLUGIN_NAME ),
|
107 |
'text_edit' => __( 'Edit', AI1EC_PLUGIN_NAME ),
|
108 |
'text_read_more' => __( 'Read more', AI1EC_PLUGIN_NAME ),
|
@@ -110,23 +137,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
110 |
'text_tags' => __( 'Tags:', AI1EC_PLUGIN_NAME ),
|
111 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
112 |
);
|
113 |
-
if( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
114 |
$args['data_type_events'] = $view_args['data_type'];
|
115 |
}
|
116 |
-
// Add extra buttons to Agenda view if events were returned.
|
117 |
-
if ( $type === 'agenda' && $dates ) {
|
118 |
-
$args['before_pagination'] =
|
119 |
-
$loader->get_file( 'agenda-buttons.twig', $args, false )->get_content();
|
120 |
-
}
|
121 |
-
$navigation = '';
|
122 |
-
if ( true !== $view_args['no_navigation'] ) {
|
123 |
-
$navigation = $loader->get_file(
|
124 |
-
'navigation.twig',
|
125 |
-
$args,
|
126 |
-
false
|
127 |
-
)->get_content();
|
128 |
-
}
|
129 |
-
$args['navigation'] = $navigation;
|
130 |
|
131 |
// Allow child views to modify arguments passed to template.
|
132 |
$args = $this->get_extra_template_arguments( $args );
|
@@ -209,7 +222,7 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
209 |
$dates[$timestamp]['href'] = $href_for_date;
|
210 |
}
|
211 |
// Flag today
|
212 |
-
$today = $this->_registry->get( 'date.time' )
|
213 |
->set_time( 0, 0, 0 )
|
214 |
->format();
|
215 |
if ( isset( $dates[$today] ) ) {
|
@@ -229,19 +242,25 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
229 |
*
|
230 |
* @param array $args Current request arguments
|
231 |
*
|
232 |
-
* @param bool
|
233 |
-
*
|
|
|
|
|
234 |
* @param int|null $date_first
|
235 |
* @param int|null $date_last
|
|
|
|
|
236 |
*
|
237 |
* @return array Array of links
|
238 |
*/
|
239 |
protected function _get_agenda_like_pagination_links(
|
240 |
$args,
|
241 |
-
$prev
|
242 |
-
$next
|
243 |
-
$date_first
|
244 |
-
$date_last
|
|
|
|
|
245 |
) {
|
246 |
|
247 |
$links = array();
|
@@ -268,7 +287,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
268 |
$factory = $this->_registry->get( 'factory.html' );
|
269 |
$links[] = $factory->create_datepicker_link(
|
270 |
$args,
|
271 |
-
$date_first->format_to_gmt()
|
|
|
|
|
272 |
);
|
273 |
|
274 |
$args['page_offset'] = 1;
|
29 |
|
30 |
// Get events, then classify into date array
|
31 |
$per_page_setting = $type . '_events_per_page';
|
32 |
+
$search = $this->_registry->get( 'model.search' );
|
33 |
+
$settings = $this->_registry->get( 'model.settings' );
|
34 |
+
$events_limit = is_numeric( $view_args['events_limit'] )
|
35 |
+
? $view_args['events_limit']
|
36 |
+
: $settings->get( $per_page_setting );
|
37 |
$results = $search->get_events_relative_to(
|
38 |
$timestamp,
|
39 |
+
$events_limit,
|
40 |
$view_args['page_offset'],
|
41 |
array(
|
42 |
'post_ids' => $view_args['post_ids'],
|
52 |
$view_args['request']
|
53 |
);
|
54 |
|
55 |
+
// Generate title of view based on date range month & year.
|
56 |
+
$range_start = $results['date_first'] ? $results['date_first'] : $this->_registry->get( 'date.time', $timestamp );
|
57 |
+
$range_end = $results['date_last'] ? $results['date_last'] : $this->_registry->get( 'date.time', $timestamp );
|
58 |
+
$range_start = $this->_registry->get( 'date.time', $range_start );
|
59 |
+
$range_end = $this->_registry->get( 'date.time', $range_end );
|
60 |
+
$start_year = $range_start->format_i18n( 'Y' );
|
61 |
+
$end_year = $range_end->format_i18n( 'Y' );
|
62 |
+
$start_month = $range_start->format_i18n( 'F' );
|
63 |
+
$start_month_short = $range_start->format_i18n( 'M' );
|
64 |
+
$end_month = $range_end->format_i18n( 'F' );
|
65 |
+
$end_month_short = $range_end->format_i18n( 'M' );
|
66 |
+
if ( $start_year === $end_year && $start_month === $end_month ) {
|
67 |
+
$title = "$start_month $start_year";
|
68 |
+
$title_short = "$start_month_short $start_year";
|
69 |
+
} elseif ( $start_year === $end_year ) {
|
70 |
+
$title = "$start_month – $end_month $end_year";
|
71 |
+
$title_short = "$start_month_short – $end_month_short $end_year";
|
72 |
+
} else {
|
73 |
+
$title = "$start_month $start_year – $end_month $end_year";
|
74 |
+
$title_short = "$start_month_short $start_year – $end_month_short $end_year";
|
75 |
+
}
|
76 |
+
|
77 |
+
// Create navigation bar if requested.
|
78 |
+
$navigation = '';
|
79 |
+
$loader = $this->_registry->get( 'theme.loader' );
|
80 |
+
if ( ! $view_args['no_navigation'] ) {
|
81 |
+
$pagination_links = $this->_get_agenda_like_pagination_links(
|
82 |
$view_args,
|
83 |
$results['prev'],
|
84 |
$results['next'],
|
85 |
$results['date_first'],
|
86 |
+
$results['date_last'],
|
87 |
+
$title,
|
88 |
+
$title_short
|
89 |
);
|
90 |
|
91 |
$pagination_links = $loader->get_file(
|
96 |
),
|
97 |
false
|
98 |
)->get_content();
|
99 |
+
|
100 |
+
// Get HTML for navigation bar.
|
101 |
+
$nav_args = array(
|
102 |
+
'no_navigation' => $view_args['no_navigation'],
|
103 |
+
'pagination_links' => $pagination_links,
|
104 |
+
'views_dropdown' => $view_args['views_dropdown'],
|
105 |
+
);
|
106 |
+
// Add extra buttons to Agenda view's nav bar if events were returned.
|
107 |
+
if ( $type === 'agenda' && $dates ) {
|
108 |
+
$button_args = array(
|
109 |
+
'text_collapse_all' => __( 'Collapse All', AI1EC_PLUGIN_NAME ),
|
110 |
+
'text_expand_all' => __( 'Expand All', AI1EC_PLUGIN_NAME ),
|
111 |
+
);
|
112 |
+
$nav_args['after_pagination'] = $loader
|
113 |
+
->get_file( 'agenda-buttons.twig', $button_args, false )
|
114 |
+
->get_content();
|
115 |
+
}
|
116 |
+
$navigation = $this->_get_navigation( $nav_args );
|
117 |
}
|
118 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_' . $type . '_ticket_button', false );
|
120 |
$args = array(
|
121 |
+
'title' => $title,
|
122 |
'dates' => $dates,
|
123 |
'type' => $type,
|
124 |
'show_year_in_agenda_dates' => $settings->get( 'show_year_in_agenda_dates' ),
|
125 |
'expanded' => $settings->get( 'agenda_events_expanded' ),
|
126 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
127 |
'page_offset' => $view_args['page_offset'],
|
128 |
+
'navigation' => $navigation,
|
129 |
'post_ids' => join( ',', $view_args['post_ids'] ),
|
130 |
'data_type' => $view_args['data_type'],
|
131 |
'data_type_events' => '',
|
132 |
'is_ticket_button_enabled' => $is_ticket_button_enabled,
|
|
|
|
|
133 |
'text_upcoming_events' => __( 'There are no upcoming events to display at this time.', AI1EC_PLUGIN_NAME ),
|
134 |
'text_edit' => __( 'Edit', AI1EC_PLUGIN_NAME ),
|
135 |
'text_read_more' => __( 'Read more', AI1EC_PLUGIN_NAME ),
|
137 |
'text_tags' => __( 'Tags:', AI1EC_PLUGIN_NAME ),
|
138 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
139 |
);
|
140 |
+
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
141 |
$args['data_type_events'] = $view_args['data_type'];
|
142 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
// Allow child views to modify arguments passed to template.
|
145 |
$args = $this->get_extra_template_arguments( $args );
|
222 |
$dates[$timestamp]['href'] = $href_for_date;
|
223 |
}
|
224 |
// Flag today
|
225 |
+
$today = $this->_registry->get( 'date.time', 'now', 'sys.default' )
|
226 |
->set_time( 0, 0, 0 )
|
227 |
->format();
|
228 |
if ( isset( $dates[$today] ) ) {
|
242 |
*
|
243 |
* @param array $args Current request arguments
|
244 |
*
|
245 |
+
* @param bool $prev Whether there are more events before
|
246 |
+
* the current page
|
247 |
+
* @param bool $next Whether there are more events after
|
248 |
+
* the current page
|
249 |
* @param int|null $date_first
|
250 |
* @param int|null $date_last
|
251 |
+
* @param string $title Title to display in datepicker button
|
252 |
+
* @param string $title_short Short month names.
|
253 |
*
|
254 |
* @return array Array of links
|
255 |
*/
|
256 |
protected function _get_agenda_like_pagination_links(
|
257 |
$args,
|
258 |
+
$prev = false,
|
259 |
+
$next = false,
|
260 |
+
$date_first = null,
|
261 |
+
$date_last = null,
|
262 |
+
$title = '',
|
263 |
+
$title_short = ''
|
264 |
) {
|
265 |
|
266 |
$links = array();
|
287 |
$factory = $this->_registry->get( 'factory.html' );
|
288 |
$links[] = $factory->create_datepicker_link(
|
289 |
$args,
|
290 |
+
$date_first->format_to_gmt(),
|
291 |
+
$title,
|
292 |
+
$title_short
|
293 |
);
|
294 |
|
295 |
$args['page_offset'] = 1;
|
app/view/calendar/view/month.php
CHANGED
@@ -56,9 +56,9 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
56 |
$days_events
|
57 |
);
|
58 |
// Create pagination links.
|
59 |
-
$pagination_links = $this->_get_pagination( $args );
|
60 |
-
|
61 |
$title = $local_date->format_i18n( 'F Y' );
|
|
|
|
|
62 |
$is_ticket_button_enabled = apply_filters(
|
63 |
'ai1ec_month_ticket_button',
|
64 |
false
|
@@ -71,7 +71,6 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
71 |
'cell_array' => $cell_array,
|
72 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
73 |
'month_word_wrap' => $settings->get( 'month_word_wrap' ),
|
74 |
-
'pagination_links' => $pagination_links,
|
75 |
'post_ids' => join( ',', $args['post_ids'] ),
|
76 |
'data_type' => $args['data_type'],
|
77 |
'data_type_events' => '',
|
@@ -83,7 +82,13 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
83 |
}
|
84 |
|
85 |
// Add navigation if requested.
|
86 |
-
$view_args['navigation'] = $this->_get_navigation(
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
return $this->_get_view( $view_args );
|
89 |
}
|
@@ -96,11 +101,12 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
96 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
97 |
* link's href ['href'].
|
98 |
*
|
99 |
-
* @param array
|
|
|
100 |
*
|
101 |
* @return array Array of links
|
102 |
*/
|
103 |
-
function get_month_pagination_links( $args ) {
|
104 |
$links = array();
|
105 |
|
106 |
$local_date = $this->_registry
|
@@ -164,7 +170,8 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
164 |
$factory = $this->_registry->get( 'factory.html' );
|
165 |
$links[] = $factory->create_datepicker_link(
|
166 |
$args,
|
167 |
-
$args['exact_date']
|
|
|
168 |
);
|
169 |
|
170 |
// ==============
|
56 |
$days_events
|
57 |
);
|
58 |
// Create pagination links.
|
|
|
|
|
59 |
$title = $local_date->format_i18n( 'F Y' );
|
60 |
+
$pagination_links = $this->_get_pagination( $args, $title );
|
61 |
+
|
62 |
$is_ticket_button_enabled = apply_filters(
|
63 |
'ai1ec_month_ticket_button',
|
64 |
false
|
71 |
'cell_array' => $cell_array,
|
72 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
73 |
'month_word_wrap' => $settings->get( 'month_word_wrap' ),
|
|
|
74 |
'post_ids' => join( ',', $args['post_ids'] ),
|
75 |
'data_type' => $args['data_type'],
|
76 |
'data_type_events' => '',
|
82 |
}
|
83 |
|
84 |
// Add navigation if requested.
|
85 |
+
$view_args['navigation'] = $this->_get_navigation(
|
86 |
+
array(
|
87 |
+
'no_navigation' => $args['no_navigation'],
|
88 |
+
'pagination_links' => $pagination_links,
|
89 |
+
'views_dropdown' => $args['views_dropdown'],
|
90 |
+
)
|
91 |
+
);
|
92 |
|
93 |
return $this->_get_view( $view_args );
|
94 |
}
|
101 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
102 |
* link's href ['href'].
|
103 |
*
|
104 |
+
* @param array $args Current request arguments
|
105 |
+
* @param string $title Title to display in datepicker button
|
106 |
*
|
107 |
* @return array Array of links
|
108 |
*/
|
109 |
+
function get_month_pagination_links( $args, $title ) {
|
110 |
$links = array();
|
111 |
|
112 |
$local_date = $this->_registry
|
170 |
$factory = $this->_registry->get( 'factory.html' );
|
171 |
$links[] = $factory->create_datepicker_link(
|
172 |
$args,
|
173 |
+
$args['exact_date'],
|
174 |
+
$title
|
175 |
);
|
176 |
|
177 |
// ==============
|
app/view/calendar/view/oneday.php
CHANGED
@@ -49,21 +49,20 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
49 |
)
|
50 |
);
|
51 |
// Create pagination links.
|
52 |
-
$
|
53 |
-
|
54 |
-
$title = $local_date->format_i18n(
|
55 |
$this->_registry->get( 'model.option' )
|
56 |
->get( 'date_format', 'l, M j, Y' )
|
57 |
);
|
|
|
58 |
|
59 |
// Calculate today marker's position.
|
60 |
-
$now
|
61 |
-
$midnight
|
62 |
->set_time( 0, 0, 0 );
|
63 |
-
$now
|
64 |
-
$now_text
|
65 |
->get_short_time( $now );
|
66 |
-
$now
|
67 |
|
68 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_oneday_ticket_button', false );
|
69 |
$show_reveal_button = apply_filters( 'ai1ec_oneday_reveal_button', false );
|
@@ -78,7 +77,6 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
78 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
79 |
'now_top' => $now,
|
80 |
'now_text' => $now_text,
|
81 |
-
'pagination_links' => $pagination_links,
|
82 |
'time_format' => $time_format,
|
83 |
'done_allday_label' => false,// legacy
|
84 |
'done_grid' => false,// legacy
|
@@ -91,11 +89,18 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
91 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
92 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
93 |
);
|
|
|
|
|
|
|
94 |
|
95 |
// Add navigation if requested.
|
96 |
-
$view_args['
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
|
100 |
return $this->_get_view( $view_args );
|
101 |
}
|
@@ -107,11 +112,12 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
107 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
108 |
* link's href ['href'].
|
109 |
*
|
110 |
-
* @param array
|
|
|
111 |
*
|
112 |
* @return array Array of links.
|
113 |
*/
|
114 |
-
function get_oneday_pagination_links( $args ) {
|
115 |
$links = array();
|
116 |
$orig_date = $args['exact_date'];
|
117 |
|
@@ -138,7 +144,8 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
138 |
$factory = $this->_registry->get( 'factory.html' );
|
139 |
$links[] = $factory->create_datepicker_link(
|
140 |
$args,
|
141 |
-
$args['exact_date']
|
|
|
142 |
);
|
143 |
|
144 |
// ============
|
49 |
)
|
50 |
);
|
51 |
// Create pagination links.
|
52 |
+
$title = $local_date->format_i18n(
|
|
|
|
|
53 |
$this->_registry->get( 'model.option' )
|
54 |
->get( 'date_format', 'l, M j, Y' )
|
55 |
);
|
56 |
+
$pagination_links = $this->_get_pagination( $args, $title );
|
57 |
|
58 |
// Calculate today marker's position.
|
59 |
+
$now = $date_system->current_time();
|
60 |
+
$midnight = $this->_registry->get( 'date.time', $now )
|
61 |
->set_time( 0, 0, 0 );
|
62 |
+
$now = $this->_registry->get( 'date.time', $now );
|
63 |
+
$now_text = $this->_registry->get( 'view.event.time' )
|
64 |
->get_short_time( $now );
|
65 |
+
$now = $now->diff_sec( $midnight );
|
66 |
|
67 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_oneday_ticket_button', false );
|
68 |
$show_reveal_button = apply_filters( 'ai1ec_oneday_reveal_button', false );
|
77 |
'show_location_in_title' => $settings->get( 'show_location_in_title' ),
|
78 |
'now_top' => $now,
|
79 |
'now_text' => $now_text,
|
|
|
80 |
'time_format' => $time_format,
|
81 |
'done_allday_label' => false,// legacy
|
82 |
'done_grid' => false,// legacy
|
89 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
90 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
91 |
);
|
92 |
+
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
93 |
+
$view_args['data_type_events'] = $args['data_type'];
|
94 |
+
}
|
95 |
|
96 |
// Add navigation if requested.
|
97 |
+
$view_args['navigation'] = $this->_get_navigation(
|
98 |
+
array(
|
99 |
+
'no_navigation' => $args['no_navigation'],
|
100 |
+
'pagination_links' => $pagination_links,
|
101 |
+
'views_dropdown' => $args['views_dropdown'],
|
102 |
+
)
|
103 |
+
);
|
104 |
|
105 |
return $this->_get_view( $view_args );
|
106 |
}
|
112 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
113 |
* link's href ['href'].
|
114 |
*
|
115 |
+
* @param array $args Current request arguments.
|
116 |
+
* @param string $title Title to display in datepicker button
|
117 |
*
|
118 |
* @return array Array of links.
|
119 |
*/
|
120 |
+
function get_oneday_pagination_links( $args, $title ) {
|
121 |
$links = array();
|
122 |
$orig_date = $args['exact_date'];
|
123 |
|
144 |
$factory = $this->_registry->get( 'factory.html' );
|
145 |
$links[] = $factory->create_datepicker_link(
|
146 |
$args,
|
147 |
+
$args['exact_date'],
|
148 |
+
$title
|
149 |
);
|
150 |
|
151 |
// ============
|
app/view/calendar/view/week.php
CHANGED
@@ -52,15 +52,13 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
52 |
)
|
53 |
);
|
54 |
|
55 |
-
// Create pagination links.
|
56 |
-
$pagination_links = $this->_get_pagination( $args );
|
57 |
-
|
58 |
-
|
59 |
-
// Translators: "%s" below represents the week's start date.
|
60 |
$title = sprintf(
|
61 |
__( 'Week of %s', AI1EC_PLUGIN_NAME ),
|
62 |
$local_date->format_i18n( 'F j' )
|
63 |
);
|
|
|
|
|
64 |
$time_format = $this->_registry->get( 'model.option' )
|
65 |
->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
|
66 |
|
@@ -77,8 +75,10 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
77 |
break;
|
78 |
}
|
79 |
}
|
|
|
80 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_week_ticket_button', false );
|
81 |
$show_reveal_button = apply_filters( 'ai1ec_week_reveal_button', false );
|
|
|
82 |
$view_args = array(
|
83 |
'title' => $title,
|
84 |
'type' => 'week',
|
@@ -87,7 +87,6 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
87 |
'now_top' => $now,
|
88 |
'now_text' => $now_text,
|
89 |
'show_now' => $show_now,
|
90 |
-
'pagination_links' => $pagination_links,
|
91 |
'post_ids' => join( ',', $args['post_ids'] ),
|
92 |
'time_format' => $time_format,
|
93 |
'done_allday_label' => false,
|
@@ -101,11 +100,18 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
101 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
102 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
103 |
);
|
104 |
-
if( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
105 |
$view_args['data_type_events'] = $args['data_type'];
|
106 |
}
|
|
|
107 |
// Add navigation if requested.
|
108 |
-
$view_args['navigation'] = $this->_get_navigation(
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
return $this->_get_view( $view_args );
|
111 |
}
|
@@ -118,11 +124,12 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
118 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
119 |
* link's href ['href'].
|
120 |
*
|
121 |
-
* @param array
|
|
|
122 |
*
|
123 |
* @return array Array of links
|
124 |
*/
|
125 |
-
protected function get_week_pagination_links( $args ) {
|
126 |
$links = array();
|
127 |
|
128 |
$orig_date = $args['exact_date'];
|
@@ -151,7 +158,8 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
151 |
$factory = $this->_registry->get( 'factory.html' );
|
152 |
$links[] = $factory->create_datepicker_link(
|
153 |
$args,
|
154 |
-
$args['exact_date']
|
|
|
155 |
);
|
156 |
|
157 |
// =============
|
@@ -386,4 +394,4 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
386 |
return $entry;
|
387 |
}
|
388 |
|
389 |
-
}
|
52 |
)
|
53 |
);
|
54 |
|
55 |
+
// Create pagination links. (Translators: '%s' = week's start date.)
|
|
|
|
|
|
|
|
|
56 |
$title = sprintf(
|
57 |
__( 'Week of %s', AI1EC_PLUGIN_NAME ),
|
58 |
$local_date->format_i18n( 'F j' )
|
59 |
);
|
60 |
+
$pagination_links = $this->_get_pagination( $args, $title );
|
61 |
+
|
62 |
$time_format = $this->_registry->get( 'model.option' )
|
63 |
->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
|
64 |
|
75 |
break;
|
76 |
}
|
77 |
}
|
78 |
+
|
79 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_week_ticket_button', false );
|
80 |
$show_reveal_button = apply_filters( 'ai1ec_week_reveal_button', false );
|
81 |
+
|
82 |
$view_args = array(
|
83 |
'title' => $title,
|
84 |
'type' => 'week',
|
87 |
'now_top' => $now,
|
88 |
'now_text' => $now_text,
|
89 |
'show_now' => $show_now,
|
|
|
90 |
'post_ids' => join( ',', $args['post_ids'] ),
|
91 |
'time_format' => $time_format,
|
92 |
'done_allday_label' => false,
|
100 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
101 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
102 |
);
|
103 |
+
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
104 |
$view_args['data_type_events'] = $args['data_type'];
|
105 |
}
|
106 |
+
|
107 |
// Add navigation if requested.
|
108 |
+
$view_args['navigation'] = $this->_get_navigation(
|
109 |
+
array(
|
110 |
+
'no_navigation' => $args['no_navigation'],
|
111 |
+
'pagination_links' => $pagination_links,
|
112 |
+
'views_dropdown' => $args['views_dropdown'],
|
113 |
+
)
|
114 |
+
);
|
115 |
|
116 |
return $this->_get_view( $view_args );
|
117 |
}
|
124 |
* ['enabled'], CSS class ['class'], text ['text'] and value to assign to
|
125 |
* link's href ['href'].
|
126 |
*
|
127 |
+
* @param array $args Current request arguments
|
128 |
+
* @param string $title Title to display in datepicker button
|
129 |
*
|
130 |
* @return array Array of links
|
131 |
*/
|
132 |
+
protected function get_week_pagination_links( $args, $title ) {
|
133 |
$links = array();
|
134 |
|
135 |
$orig_date = $args['exact_date'];
|
158 |
$factory = $this->_registry->get( 'factory.html' );
|
159 |
$links[] = $factory->create_datepicker_link(
|
160 |
$args,
|
161 |
+
$args['exact_date'],
|
162 |
+
$title
|
163 |
);
|
164 |
|
165 |
// =============
|
394 |
return $entry;
|
395 |
}
|
396 |
|
397 |
+
}
|
app/view/event/location.php
CHANGED
@@ -120,27 +120,20 @@ class Ai1ec_View_Event_Location extends Ai1ec_Base {
|
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
* get_gmap_url function
|
124 |
-
*
|
125 |
* Returns the URL to the Google Map for the given event object.
|
126 |
*
|
127 |
* @param Ai1ec_Event $event The event object to display a map for
|
128 |
*
|
129 |
* @return string
|
130 |
-
|
131 |
public function get_gmap_url( Ai1ec_Event $event ) {
|
132 |
-
$
|
133 |
$location = $this->get_latlng( $event );
|
134 |
-
if ( $location ) {
|
135 |
-
$location .= $event->get( 'venue' ) ? '' : ' (' . $event->get( 'venue' ) . ')';
|
136 |
-
} else {
|
137 |
-
// Otherwise use the address
|
138 |
$location = $event->get( 'address' );
|
139 |
}
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
return 'https://www.google.com/maps?f=q&hl=' . $lang .
|
144 |
-
'&source=embed&q=' . urlencode( $location );
|
145 |
}
|
|
|
146 |
}
|
120 |
}
|
121 |
|
122 |
/**
|
|
|
|
|
123 |
* Returns the URL to the Google Map for the given event object.
|
124 |
*
|
125 |
* @param Ai1ec_Event $event The event object to display a map for
|
126 |
*
|
127 |
* @return string
|
128 |
+
*/
|
129 |
public function get_gmap_url( Ai1ec_Event $event ) {
|
130 |
+
$lang = $this->_registry->get( 'p28n.wpml' )->get_language();
|
131 |
$location = $this->get_latlng( $event );
|
132 |
+
if ( ! $location ) {
|
|
|
|
|
|
|
133 |
$location = $event->get( 'address' );
|
134 |
}
|
135 |
+
return 'https://www.google.com/maps?f=q&hl=' . urlencode( $lang ) .
|
136 |
+
'&source=embed&q=' . urlencode( $location );
|
|
|
|
|
|
|
137 |
}
|
138 |
+
|
139 |
}
|
app/view/event/single.php
CHANGED
@@ -118,5 +118,29 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
|
|
118 |
return $loader->get_file( 'event-single-footer.twig', $args, false )
|
119 |
->get_content();
|
120 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
}
|
118 |
return $loader->get_file( 'event-single-footer.twig', $args, false )
|
119 |
->get_content();
|
120 |
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Render the full article for the event
|
124 |
+
*
|
125 |
+
* @param Ai1ec_Event $event
|
126 |
+
*/
|
127 |
+
public function get_full_article( Ai1ec_Event $event ) {
|
128 |
+
$title = apply_filters(
|
129 |
+
'the_title',
|
130 |
+
$event->get( 'post' )->post_title,
|
131 |
+
$event->get( 'post_id' )
|
132 |
+
);
|
133 |
+
$content = $this->get_content( $event ) . wpautop(
|
134 |
+
apply_filters(
|
135 |
+
'the_content',
|
136 |
+
$event->get( 'post' )->post_content
|
137 |
+
)
|
138 |
+
);
|
139 |
+
$args = compact( 'title', 'content' );
|
140 |
+
$loader = $this->_registry->get( 'theme.loader' );
|
141 |
+
return $loader->get_file( 'event-single-full.twig', $args, false )
|
142 |
+
->get_content();
|
143 |
+
|
144 |
+
}
|
145 |
|
146 |
}
|
app/view/event/taxonomy.php
CHANGED
@@ -256,7 +256,7 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
|
|
256 |
}
|
257 |
|
258 |
$html .= '<a ' . $data_type . ' class="' . $class .
|
259 |
-
' ai1ec-term-id-' . $category->term_id . '" ' .
|
260 |
$title . $color_style . 'href="' . $href->generate_href() . '">';
|
261 |
|
262 |
if ( $format === 'blocks' ) {
|
@@ -269,7 +269,9 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
|
|
269 |
'class="ai1ec-fa ai1ec-fa-folder-open"></i>';
|
270 |
}
|
271 |
|
272 |
-
$html .=
|
|
|
|
|
273 |
$category = $html;
|
274 |
}
|
275 |
return implode( ' ', $categories );
|
256 |
}
|
257 |
|
258 |
$html .= '<a ' . $data_type . ' class="' . $class .
|
259 |
+
' ai1ec-term-id-' . $category->term_id . ' category" ' .
|
260 |
$title . $color_style . 'href="' . $href->generate_href() . '">';
|
261 |
|
262 |
if ( $format === 'blocks' ) {
|
269 |
'class="ai1ec-fa ai1ec-fa-folder-open"></i>';
|
270 |
}
|
271 |
|
272 |
+
$html .= '<span class="value">' .
|
273 |
+
esc_html( $category->name ) .
|
274 |
+
'</span></a>';
|
275 |
$category = $html;
|
276 |
}
|
277 |
return implode( ' ', $categories );
|
app/view/event/ticket.php
CHANGED
@@ -44,17 +44,17 @@ class Ai1ec_View_Event_Ticket {
|
|
44 |
* Contact info as HTML
|
45 |
*/
|
46 |
public function get_contact_html( Ai1ec_Event $event ) {
|
47 |
-
$contact = '';
|
48 |
if ( $event->get( 'contact_name' ) ) {
|
49 |
$contact .=
|
50 |
-
'<div class="ai1ec-contact-name">' .
|
51 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-user"></i> ' .
|
52 |
esc_html( $event->get( 'contact_name' ) ) .
|
53 |
'</div> ';
|
54 |
}
|
55 |
if ( $event->get( 'contact_phone' ) ) {
|
56 |
$contact .=
|
57 |
-
'<div class="ai1ec-contact-phone">' .
|
58 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-phone"></i> ' .
|
59 |
esc_html( $event->get( 'contact_phone' ) ) .
|
60 |
'</div> ';
|
@@ -62,14 +62,16 @@ class Ai1ec_View_Event_Ticket {
|
|
62 |
if ( $event->get( 'contact_email' ) ) {
|
63 |
$contact .=
|
64 |
'<div class="ai1ec-contact-email">' .
|
65 |
-
'<a href="mailto:' .
|
|
|
66 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-envelope-o"></i> ' .
|
67 |
__( 'Email', AI1EC_PLUGIN_NAME ) . '</a></div> ';
|
68 |
}
|
69 |
if ( $event->get( 'contact_url' ) ) {
|
70 |
$contact .=
|
71 |
'<div class="ai1ec-contact-url">' .
|
72 |
-
'<a target="_blank" href="' .
|
|
|
73 |
'"><i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-link"></i> ' .
|
74 |
apply_filters(
|
75 |
'ai1ec_contact_url',
|
@@ -77,6 +79,7 @@ class Ai1ec_View_Event_Ticket {
|
|
77 |
) .
|
78 |
' <i class="ai1ec-fa ai1ec-fa-external-link"></i></a></div>';
|
79 |
}
|
|
|
80 |
return $contact;
|
81 |
}
|
82 |
}
|
44 |
* Contact info as HTML
|
45 |
*/
|
46 |
public function get_contact_html( Ai1ec_Event $event ) {
|
47 |
+
$contact = '<div class="vcard">';
|
48 |
if ( $event->get( 'contact_name' ) ) {
|
49 |
$contact .=
|
50 |
+
'<div class="ai1ec-contact-name fn">' .
|
51 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-user"></i> ' .
|
52 |
esc_html( $event->get( 'contact_name' ) ) .
|
53 |
'</div> ';
|
54 |
}
|
55 |
if ( $event->get( 'contact_phone' ) ) {
|
56 |
$contact .=
|
57 |
+
'<div class="ai1ec-contact-phone tel">' .
|
58 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-phone"></i> ' .
|
59 |
esc_html( $event->get( 'contact_phone' ) ) .
|
60 |
'</div> ';
|
62 |
if ( $event->get( 'contact_email' ) ) {
|
63 |
$contact .=
|
64 |
'<div class="ai1ec-contact-email">' .
|
65 |
+
'<a class="email" href="mailto:' .
|
66 |
+
esc_attr( $event->get( 'contact_email' ) ) . '">' .
|
67 |
'<i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-envelope-o"></i> ' .
|
68 |
__( 'Email', AI1EC_PLUGIN_NAME ) . '</a></div> ';
|
69 |
}
|
70 |
if ( $event->get( 'contact_url' ) ) {
|
71 |
$contact .=
|
72 |
'<div class="ai1ec-contact-url">' .
|
73 |
+
'<a class="url" target="_blank" href="' .
|
74 |
+
esc_attr( $event->get( 'contact_url' ) ) .
|
75 |
'"><i class="ai1ec-fa ai1ec-fa-fw ai1ec-fa-link"></i> ' .
|
76 |
apply_filters(
|
77 |
'ai1ec_contact_url',
|
79 |
) .
|
80 |
' <i class="ai1ec-fa ai1ec-fa-external-link"></i></a></div>';
|
81 |
}
|
82 |
+
$contact .= '</div>';
|
83 |
return $contact;
|
84 |
}
|
85 |
}
|
language/all-in-one-event-calendar.mo
CHANGED
Binary file
|
language/all-in-one-event-calendar.po
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
@@ -24,7 +24,7 @@ msgstr "Licenses"
|
|
24 |
msgid "Licences"
|
25 |
msgstr "Licences"
|
26 |
|
27 |
-
#: app/controller/front.php:
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
@@ -34,12 +34,12 @@ msgstr ""
|
|
34 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
35 |
"theme manually."
|
36 |
|
37 |
-
#: app/controller/front.php:
|
38 |
#: app/view/admin/theme-switching.php:55
|
39 |
msgid "Calendar Themes"
|
40 |
msgstr "Calendar Themes"
|
41 |
|
42 |
-
#: app/controller/front.php:
|
43 |
msgid ""
|
44 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
45 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
@@ -49,33 +49,33 @@ msgstr ""
|
|
49 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
50 |
"<br>Following errors were found:<br>%s"
|
51 |
|
52 |
-
#: app/controller/javascript.php:
|
53 |
msgid "This feed is already being imported."
|
54 |
msgstr "This feed is already being imported."
|
55 |
|
56 |
-
#: app/controller/javascript.php:
|
57 |
msgid "Please enter a valid iCalendar URL."
|
58 |
msgstr "Please enter a valid iCalendar URL."
|
59 |
|
60 |
-
#: app/controller/javascript.php:
|
61 |
msgid "Please enter a valid email address."
|
62 |
msgstr "Please enter a valid email address."
|
63 |
|
64 |
-
#: app/controller/javascript.php:
|
65 |
msgid "Choose Image"
|
66 |
msgstr "Choose Image"
|
67 |
|
68 |
-
#: app/controller/javascript.php:
|
69 |
msgid "The value you have entered is not a valid CSS length."
|
70 |
msgstr "The value you have entered is not a valid CSS length."
|
71 |
|
72 |
-
#: app/controller/javascript.php:
|
73 |
msgid ""
|
74 |
"Are you sure you want to reset your theme options to their default values?"
|
75 |
msgstr ""
|
76 |
"Are you sure you want to reset your theme options to their default values?"
|
77 |
|
78 |
-
#: app/controller/javascript.php:
|
79 |
msgid ""
|
80 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
81 |
"-90."
|
@@ -83,7 +83,7 @@ msgstr ""
|
|
83 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
84 |
"-90."
|
85 |
|
86 |
-
#: app/controller/javascript.php:
|
87 |
msgid ""
|
88 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
89 |
"and -180."
|
@@ -91,7 +91,7 @@ msgstr ""
|
|
91 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
92 |
"and -180."
|
93 |
|
94 |
-
#: app/controller/javascript.php:
|
95 |
msgid ""
|
96 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
97 |
"required field."
|
@@ -99,7 +99,7 @@ msgstr ""
|
|
99 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
100 |
"required field."
|
101 |
|
102 |
-
#: app/controller/javascript.php:
|
103 |
msgid ""
|
104 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
105 |
"required field."
|
@@ -107,13 +107,27 @@ msgstr ""
|
|
107 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
108 |
"required field."
|
109 |
|
110 |
-
#: app/controller/javascript.php:
|
111 |
msgid ""
|
112 |
-
"The URL you have entered
|
113 |
-
"
|
114 |
msgstr ""
|
115 |
-
"The URL you have entered
|
116 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
#: app/model/event/parent.php:186
|
119 |
msgid "Edit “%s”"
|
@@ -123,44 +137,44 @@ msgstr "Edit “%s”"
|
|
123 |
msgid "Base Event"
|
124 |
msgstr "Base Event"
|
125 |
|
126 |
-
#: app/model/settings.php:
|
127 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
128 |
msgid "Calendar page"
|
129 |
msgstr "Calendar page"
|
130 |
|
131 |
-
#: app/model/settings.php:
|
132 |
msgid "Week starts on"
|
133 |
msgstr "Week starts on"
|
134 |
|
135 |
-
#: app/model/settings.php:
|
136 |
msgid "Available views"
|
137 |
msgstr "Available views"
|
138 |
|
139 |
-
#: app/model/settings.php:
|
140 |
msgid "Agenda"
|
141 |
msgstr "Agenda"
|
142 |
|
143 |
-
#: app/model/settings.php:
|
144 |
msgid "Day"
|
145 |
msgstr "Day"
|
146 |
|
147 |
-
#: app/model/settings.php:
|
148 |
msgid "Month"
|
149 |
msgstr "Month"
|
150 |
|
151 |
-
#: app/model/settings.php:
|
152 |
msgid "Week"
|
153 |
msgstr "Week"
|
154 |
|
155 |
-
#: app/model/settings.php:
|
156 |
msgid "Timezone"
|
157 |
msgstr "Timezone"
|
158 |
|
159 |
-
#: app/model/settings.php:
|
160 |
msgid "Preselected calendar filters"
|
161 |
msgstr "Preselected calendar filters"
|
162 |
|
163 |
-
#: app/model/settings.php:
|
164 |
msgid ""
|
165 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
166 |
"selection."
|
@@ -168,31 +182,31 @@ msgstr ""
|
|
168 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
169 |
"selection."
|
170 |
|
171 |
-
#: app/model/settings.php:
|
172 |
msgid "Default calendar start date (optional)"
|
173 |
msgstr "Default calendar start date (optional)"
|
174 |
|
175 |
-
#: app/model/settings.php:
|
176 |
msgid "Agenda pages show at most"
|
177 |
msgstr "Agenda pages show at most"
|
178 |
|
179 |
-
#: app/model/settings.php:
|
180 |
msgid "Week/Day view starts at"
|
181 |
msgstr "Week/Day view starts at"
|
182 |
|
183 |
-
#: app/model/settings.php:
|
184 |
msgid "Week/Day view ends at"
|
185 |
msgstr "Week/Day view ends at"
|
186 |
|
187 |
-
#: app/model/settings.php:
|
188 |
msgid "<strong>Word-wrap event stubs</strong> in Month view"
|
189 |
msgstr "<strong>Word-wrap event stubs</strong> in Month view"
|
190 |
|
191 |
-
#: app/model/settings.php:
|
192 |
msgid "Only applies to events that span a single day."
|
193 |
msgstr "Only applies to events that span a single day."
|
194 |
|
195 |
-
#: app/model/settings.php:
|
196 |
msgid ""
|
197 |
"In <span class=\"ai1ec-tooltip-toggle\"\n"
|
198 |
"\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
|
@@ -206,23 +220,23 @@ msgstr ""
|
|
206 |
"\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
|
207 |
"\t\t\t\t\t\tfrom last day shown</strong>"
|
208 |
|
209 |
-
#: app/model/settings.php:
|
210 |
msgid "Keep all events <strong>expanded</strong> in Agenda view"
|
211 |
msgstr "Keep all events <strong>expanded</strong> in Agenda view"
|
212 |
|
213 |
-
#: app/model/settings.php:
|
214 |
msgid "<strong>Show year</strong> in calendar date labels"
|
215 |
msgstr "<strong>Show year</strong> in calendar date labels"
|
216 |
|
217 |
-
#: app/model/settings.php:
|
218 |
msgid "<strong>Show location in event titles</strong> in calendar views"
|
219 |
msgstr "<strong>Show location in event titles</strong> in calendar views"
|
220 |
|
221 |
-
#: app/model/settings.php:
|
222 |
msgid "<strong>Exclude</strong> events from search results"
|
223 |
msgstr "<strong>Exclude</strong> events from search results"
|
224 |
|
225 |
-
#: app/model/settings.php:
|
226 |
msgid ""
|
227 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
228 |
"calendar and single event views "
|
@@ -230,49 +244,73 @@ msgstr ""
|
|
230 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
231 |
"calendar and single event views "
|
232 |
|
233 |
-
#: app/model/settings.php:
|
234 |
msgid " Hide <strong>Google Maps</strong> until clicked"
|
235 |
msgstr " Hide <strong>Google Maps</strong> until clicked"
|
236 |
|
237 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
msgid " <strong>Hide featured image</strong> from event details page"
|
239 |
msgstr " <strong>Hide featured image</strong> from event details page"
|
240 |
|
241 |
-
#: app/model/settings.php:
|
242 |
msgid ""
|
243 |
"Select this option if your theme already displays each post's featured image."
|
244 |
msgstr ""
|
245 |
"Select this option if your theme already displays each post's featured image."
|
246 |
|
247 |
-
#: app/model/settings.php:
|
248 |
msgid "Input dates in this format"
|
249 |
msgstr "Input dates in this format"
|
250 |
|
251 |
-
#: app/model/settings.php:
|
252 |
msgid "Default (d/m/yyyy)"
|
253 |
msgstr "Default (d/m/yyyy)"
|
254 |
|
255 |
-
#: app/model/settings.php:
|
256 |
msgid "US (m/d/yyyy)"
|
257 |
msgstr "US (m/d/yyyy)"
|
258 |
|
259 |
-
#: app/model/settings.php:
|
260 |
msgid "ISO 8601 (yyyy-m-d)"
|
261 |
msgstr "ISO 8601 (yyyy-m-d)"
|
262 |
|
263 |
-
#: app/model/settings.php:
|
264 |
msgid "Dotted (m.d.yyyy)"
|
265 |
msgstr "Dotted (m.d.yyyy)"
|
266 |
|
267 |
-
#: app/model/settings.php:
|
268 |
msgid " Use <strong>24h time</strong> in time pickers"
|
269 |
msgstr " Use <strong>24h time</strong> in time pickers"
|
270 |
|
271 |
-
#: app/model/settings.php:
|
272 |
msgid "<strong>Disable address autocomplete</strong> function"
|
273 |
msgstr "<strong>Disable address autocomplete</strong> function"
|
274 |
|
275 |
-
#: app/model/settings.php:
|
276 |
msgid ""
|
277 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
278 |
"address autocomplete function "
|
@@ -280,11 +318,7 @@ msgstr ""
|
|
280 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
281 |
"address autocomplete function "
|
282 |
|
283 |
-
#: app/model/settings.php:
|
284 |
-
msgid "Display <strong>Publish</strong> at bottom of Edit Event form"
|
285 |
-
msgstr "Display <strong>Publish</strong> at bottom of Edit Event form"
|
286 |
-
|
287 |
-
#: app/model/settings.php:658
|
288 |
msgid ""
|
289 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
290 |
"privileged users"
|
@@ -292,7 +326,7 @@ msgstr ""
|
|
292 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
293 |
"privileged users"
|
294 |
|
295 |
-
#: app/model/settings.php:
|
296 |
msgid ""
|
297 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
298 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
@@ -302,11 +336,11 @@ msgstr ""
|
|
302 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
303 |
"strong>."
|
304 |
|
305 |
-
#: app/model/settings.php:
|
306 |
msgid "Move calendar into this DOM element"
|
307 |
msgstr "Move calendar into this DOM element"
|
308 |
|
309 |
-
#: app/model/settings.php:
|
310 |
msgid ""
|
311 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
312 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
@@ -330,7 +364,7 @@ msgstr ""
|
|
330 |
"\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
|
331 |
"\t\t\t\t\t\tby the calendar."
|
332 |
|
333 |
-
#: app/model/settings.php:
|
334 |
msgid ""
|
335 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
336 |
"multiple calendar output"
|
@@ -338,7 +372,7 @@ msgstr ""
|
|
338 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
339 |
"multiple calendar output"
|
340 |
|
341 |
-
#: app/model/settings.php:
|
342 |
msgid ""
|
343 |
"Try enabling this option if your calendar does not appear on the calendar "
|
344 |
"page. It is needed for compatibility with a small number of themes that call "
|
@@ -348,23 +382,41 @@ msgstr ""
|
|
348 |
"page. It is needed for compatibility with a small number of themes that call "
|
349 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
350 |
|
351 |
-
#: app/model/settings.php:
|
352 |
msgid "Disable <strong>gzip</strong> compression."
|
353 |
msgstr "Disable <strong>gzip</strong> compression."
|
354 |
|
355 |
-
#: app/model/settings.php:
|
356 |
msgid ""
|
357 |
-
"Use this option if calendar is
|
358 |
-
"ly/disable-gzip-compression/\">Read more</a> about the issue."
|
|
|
359 |
msgstr ""
|
360 |
-
"Use this option if calendar is
|
361 |
-
"ly/disable-gzip-compression/\">Read more</a> about the issue."
|
|
|
362 |
|
363 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
msgid "Current <strong>robots.txt</strong> on this site"
|
365 |
msgstr "Current <strong>robots.txt</strong> on this site"
|
366 |
|
367 |
-
#: app/model/settings.php:
|
368 |
msgid ""
|
369 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
370 |
"or\n"
|
@@ -388,7 +440,7 @@ msgstr ""
|
|
388 |
"\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
|
389 |
"your root WordPress directory."
|
390 |
|
391 |
-
#: app/model/settings.php:
|
392 |
msgid ""
|
393 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
394 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
@@ -396,7 +448,7 @@ msgstr ""
|
|
396 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
397 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
398 |
|
399 |
-
#: app/model/settings.php:
|
400 |
msgid "Templates cache improves site performance"
|
401 |
msgstr "Templates cache improves site performance"
|
402 |
|
@@ -404,18 +456,6 @@ msgstr "Templates cache improves site performance"
|
|
404 |
msgid "Event Details"
|
405 |
msgstr "Event Details"
|
406 |
|
407 |
-
#: app/view/admin/add-new-event.php:310
|
408 |
-
msgid "Publish"
|
409 |
-
msgstr "Publish"
|
410 |
-
|
411 |
-
#: app/view/admin/add-new-event.php:311
|
412 |
-
msgid "Update"
|
413 |
-
msgstr "Update"
|
414 |
-
|
415 |
-
#: app/view/admin/add-new-event.php:313
|
416 |
-
msgid "Submit for Review"
|
417 |
-
msgstr "Submit for Review"
|
418 |
-
|
419 |
#: app/view/admin/all-events.php:16
|
420 |
msgid "Author"
|
421 |
msgstr "Author"
|
@@ -590,59 +630,59 @@ msgstr "<a href=\"%s\">Settings</a>"
|
|
590 |
msgid "All-in-One Event Calendar: Settings"
|
591 |
msgstr "All-in-One Event Calendar: Settings"
|
592 |
|
593 |
-
#: app/view/admin/settings.php:
|
594 |
#: lib/date/timezone.php:366
|
595 |
msgid "Settings"
|
596 |
msgstr "Settings"
|
597 |
|
598 |
-
#: app/view/admin/settings.php:
|
599 |
msgctxt "meta box"
|
600 |
msgid "General Settings"
|
601 |
msgstr "General Settings"
|
602 |
|
603 |
-
#: app/view/admin/settings.php:
|
604 |
msgctxt "meta box"
|
605 |
msgid "Timely"
|
606 |
msgstr "Timely"
|
607 |
|
608 |
-
#: app/view/admin/settings.php:
|
609 |
msgid "Viewing Events"
|
610 |
msgstr "Viewing Events"
|
611 |
|
612 |
-
#: app/view/admin/settings.php:
|
613 |
-
msgid "Embedded Views"
|
614 |
-
msgstr "Embedded Views"
|
615 |
-
|
616 |
-
#: app/view/admin/settings.php:145
|
617 |
msgid "Adding/Editing Events"
|
618 |
msgstr "Adding/Editing Events"
|
619 |
|
620 |
-
#: app/view/admin/settings.php:
|
621 |
msgid "Advanced"
|
622 |
msgstr "Advanced"
|
623 |
|
624 |
-
#: app/view/admin/settings.php:
|
625 |
msgid "Advanced Settings"
|
626 |
msgstr "Advanced Settings"
|
627 |
|
628 |
-
#: app/view/admin/settings.php:
|
|
|
|
|
|
|
|
|
629 |
msgid "Email Templates"
|
630 |
msgstr "Email Templates"
|
631 |
|
632 |
-
#: app/view/admin/settings.php:
|
633 |
msgid "External Services"
|
634 |
msgstr "External Services"
|
635 |
|
636 |
-
#: app/view/admin/settings.php:
|
637 |
msgid "Cache Report"
|
638 |
msgstr "Cache Report"
|
639 |
|
640 |
-
#: app/view/admin/settings.php:
|
641 |
#: public/admin/plugins/ics/display_feeds.php:24
|
642 |
msgid "Save Settings"
|
643 |
msgstr "Save Settings"
|
644 |
|
645 |
-
#: app/view/admin/settings.php:
|
646 |
msgid ""
|
647 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
648 |
msgstr ""
|
@@ -661,39 +701,39 @@ msgctxt "meta box"
|
|
661 |
msgid "Calendar Theme Options"
|
662 |
msgstr "Calendar Theme Options"
|
663 |
|
664 |
-
#: app/view/admin/theme-options.php:
|
665 |
msgid "General"
|
666 |
msgstr "General"
|
667 |
|
668 |
-
#: app/view/admin/theme-options.php:
|
669 |
msgid "Tables"
|
670 |
msgstr "Tables"
|
671 |
|
672 |
-
#: app/view/admin/theme-options.php:
|
673 |
msgid "Buttons"
|
674 |
msgstr "Buttons"
|
675 |
|
676 |
-
#: app/view/admin/theme-options.php:
|
677 |
msgid "Forms"
|
678 |
msgstr "Forms"
|
679 |
|
680 |
-
#: app/view/admin/theme-options.php:
|
681 |
msgid "Calendar general"
|
682 |
msgstr "Calendar general"
|
683 |
|
684 |
-
#: app/view/admin/theme-options.php:
|
685 |
msgid "Month/week/day view"
|
686 |
msgstr "Month/week/day view"
|
687 |
|
688 |
-
#: app/view/admin/theme-options.php:
|
689 |
msgid "Agenda view"
|
690 |
msgstr "Agenda view"
|
691 |
|
692 |
-
#: app/view/admin/theme-options.php:
|
693 |
msgid "Save Options"
|
694 |
msgstr "Save Options"
|
695 |
|
696 |
-
#: app/view/admin/theme-options.php:
|
697 |
msgid "Reset to Defaults"
|
698 |
msgstr "Reset to Defaults"
|
699 |
|
@@ -701,7 +741,7 @@ msgstr "Reset to Defaults"
|
|
701 |
msgid "All-in-One Event Calendar: Themes"
|
702 |
msgstr "All-in-One Event Calendar: Themes"
|
703 |
|
704 |
-
#: app/view/calendar/page.php:
|
705 |
msgid ""
|
706 |
"There was an error loading calendar. Please contact site administrator and "
|
707 |
"inform him to configure calendar views."
|
@@ -709,11 +749,11 @@ msgstr ""
|
|
709 |
"There was an error loading calendar. Please contact site administrator and "
|
710 |
"inform him to configure calendar views."
|
711 |
|
712 |
-
#: app/view/calendar/page.php:
|
713 |
msgid "Subscribe to filtered calendar"
|
714 |
msgstr "Subscribe to filtered calendar"
|
715 |
|
716 |
-
#: app/view/calendar/page.php:
|
717 |
msgid "Subscribe"
|
718 |
msgstr "Subscribe"
|
719 |
|
@@ -779,58 +819,61 @@ msgstr "Clear tag filter"
|
|
779 |
msgid "Tags"
|
780 |
msgstr "Tags"
|
781 |
|
782 |
-
#: app/view/calendar/view/agenda.php:
|
783 |
msgid "Collapse All"
|
784 |
msgstr "Collapse All"
|
785 |
|
786 |
-
#: app/view/calendar/view/agenda.php:
|
787 |
msgid "Expand All"
|
788 |
msgstr "Expand All"
|
789 |
|
790 |
-
#: app/view/calendar/view/agenda.php:
|
|
|
791 |
msgid "There are no upcoming events to display at this time."
|
792 |
msgstr "There are no upcoming events to display at this time."
|
793 |
|
794 |
-
#: app/view/calendar/view/agenda.php:
|
|
|
795 |
msgid "Edit"
|
796 |
msgstr "Edit"
|
797 |
|
798 |
-
#: app/view/calendar/view/agenda.php:
|
799 |
msgid "Read more"
|
800 |
msgstr "Read more"
|
801 |
|
802 |
-
#: app/view/calendar/view/agenda.php:
|
803 |
msgid "Categories:"
|
804 |
msgstr "Categories:"
|
805 |
|
806 |
-
#: app/view/calendar/view/agenda.php:
|
807 |
#: public/admin/themes.php:29
|
808 |
msgid "Tags:"
|
809 |
msgstr "Tags:"
|
810 |
|
811 |
-
#: app/view/calendar/view/agenda.php:
|
812 |
-
#: app/view/calendar/view/oneday.php:
|
813 |
#: app/view/calendar/widget.php:274
|
|
|
814 |
msgid "@ %s"
|
815 |
msgstr "@ %s"
|
816 |
|
817 |
-
#: app/view/calendar/view/oneday.php:
|
818 |
msgid "g a"
|
819 |
msgstr "g a"
|
820 |
|
821 |
-
#: app/view/calendar/view/oneday.php:
|
822 |
msgid "Reveal full day"
|
823 |
msgstr "Reveal full day"
|
824 |
|
825 |
-
#: app/view/calendar/view/oneday.php:
|
826 |
msgid "All-day"
|
827 |
msgstr "All-day"
|
828 |
|
829 |
-
#: app/view/calendar/view/oneday.php:
|
830 |
msgid "Now:"
|
831 |
msgstr "Now:"
|
832 |
|
833 |
-
#: app/view/calendar/view/week.php:
|
834 |
msgid "Week of %s"
|
835 |
msgstr "Week of %s"
|
836 |
|
@@ -985,11 +1028,11 @@ msgstr "Buy Tickets"
|
|
985 |
msgid "Tickets"
|
986 |
msgstr "Tickets"
|
987 |
|
988 |
-
#: app/view/event/ticket.php:
|
989 |
msgid "Email"
|
990 |
msgstr "Email"
|
991 |
|
992 |
-
#: app/view/event/ticket.php:
|
993 |
msgid "Event website"
|
994 |
msgstr "Event website"
|
995 |
|
@@ -1120,7 +1163,7 @@ msgstr ""
|
|
1120 |
"tab."
|
1121 |
|
1122 |
#: cache/twig/31/41/6a842b873aa15c2afe2fd664e027ecf1ba867877537f21b06052271bb848.php:133
|
1123 |
-
#: lib/html/element/setting/html.php:
|
1124 |
msgid "Warning:"
|
1125 |
msgstr "Warning:"
|
1126 |
|
@@ -1138,6 +1181,15 @@ msgstr ""
|
|
1138 |
msgid "Dismiss"
|
1139 |
msgstr "Dismiss"
|
1140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1141 |
#: lib/calendar-feed/ics.php:38
|
1142 |
msgid "ICS"
|
1143 |
msgstr "ICS"
|
@@ -1146,59 +1198,67 @@ msgstr "ICS"
|
|
1146 |
msgid "Another import process in progress. Please try again later."
|
1147 |
msgstr "Another import process in progress. Please try again later."
|
1148 |
|
1149 |
-
#: lib/calendar-feed/ics.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1150 |
msgid ""
|
1151 |
-
"
|
1152 |
-
"
|
1153 |
-
"
|
1154 |
-
"allow_url_fopen' target='_blank' >this</a> article"
|
1155 |
msgstr ""
|
1156 |
-
"
|
1157 |
-
"
|
1158 |
-
"
|
1159 |
-
"allow_url_fopen' target='_blank' >this</a> article"
|
1160 |
|
1161 |
-
#: lib/calendar-feed/ics.php:
|
1162 |
msgid "No events were found"
|
1163 |
msgstr "No events were found"
|
1164 |
|
1165 |
-
#: lib/calendar-feed/ics.php:
|
1166 |
msgid "Imported %s event"
|
1167 |
msgid_plural "Imported %s events"
|
1168 |
msgstr[0] "Imported %s event"
|
1169 |
msgstr[1] "Imported %s events"
|
1170 |
|
1171 |
-
#: lib/calendar-feed/ics.php:
|
1172 |
msgid "Invalid ICS feed ID"
|
1173 |
msgstr "Invalid ICS feed ID"
|
1174 |
|
1175 |
-
#: lib/calendar-feed/ics.php:
|
1176 |
msgid "Categories (optional)"
|
1177 |
msgstr "Categories (optional)"
|
1178 |
|
1179 |
-
#: lib/calendar-feed/ics.php:
|
1180 |
msgid ""
|
1181 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1182 |
msgstr ""
|
1183 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1184 |
|
1185 |
-
#: lib/calendar-feed/ics.php:
|
1186 |
msgid "Removing ICS Feed"
|
1187 |
msgstr "Removing ICS Feed"
|
1188 |
|
1189 |
-
#: lib/calendar-feed/ics.php:
|
1190 |
msgid "Keep Events"
|
1191 |
msgstr "Keep Events"
|
1192 |
|
1193 |
-
#: lib/calendar-feed/ics.php:
|
1194 |
msgid "Remove Events"
|
1195 |
msgstr "Remove Events"
|
1196 |
|
1197 |
-
#: lib/calendar-feed/ics.php:
|
1198 |
msgid "Deleted %d events"
|
1199 |
msgstr "Deleted %d events"
|
1200 |
|
1201 |
-
#: lib/calendar-feed/ics.php:
|
1202 |
msgid "Feed deleted"
|
1203 |
msgstr "Feed deleted"
|
1204 |
|
@@ -1229,7 +1289,7 @@ msgstr "Copy to a new draft"
|
|
1229 |
msgid "Clone to Draft"
|
1230 |
msgstr "Clone to Draft"
|
1231 |
|
1232 |
-
#: lib/command/clone.php:
|
1233 |
msgid ""
|
1234 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1235 |
"cloned event</a></p>"
|
@@ -1237,7 +1297,15 @@ msgstr ""
|
|
1237 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1238 |
"cloned event</a></p>"
|
1239 |
|
1240 |
-
#: lib/css/frontend.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1241 |
msgid ""
|
1242 |
"The LESS file compiled correctly but there was an error while saving the "
|
1243 |
"generated CSS to persistence."
|
@@ -1245,7 +1313,7 @@ msgstr ""
|
|
1245 |
"The LESS file compiled correctly but there was an error while saving the "
|
1246 |
"generated CSS to persistence."
|
1247 |
|
1248 |
-
#: lib/css/frontend.php:
|
1249 |
msgid ""
|
1250 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1251 |
"returned was: <em>%s</em></p>"
|
@@ -1253,7 +1321,7 @@ msgstr ""
|
|
1253 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1254 |
"returned was: <em>%s</em></p>"
|
1255 |
|
1256 |
-
#: lib/css/frontend.php:
|
1257 |
msgid ""
|
1258 |
"Theme options were successfully reset to their default values. <a "
|
1259 |
"href='%s'>Visit site</a>"
|
@@ -1261,10 +1329,18 @@ msgstr ""
|
|
1261 |
"Theme options were successfully reset to their default values. <a "
|
1262 |
"href='%s'>Visit site</a>"
|
1263 |
|
1264 |
-
#: lib/css/frontend.php:
|
1265 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1266 |
msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1268 |
#: lib/database/applicator.php:182
|
1269 |
msgid "Date columns in table %s have different types."
|
1270 |
msgstr "Date columns in table %s have different types."
|
@@ -1283,7 +1359,7 @@ msgstr ""
|
|
1283 |
msgid "Error encountered: %s"
|
1284 |
msgstr "Error encountered: %s"
|
1285 |
|
1286 |
-
#: lib/date/system.php:
|
1287 |
msgid "GMT%+d:%02d"
|
1288 |
msgstr "GMT%+d:%02d"
|
1289 |
|
@@ -1303,11 +1379,11 @@ msgstr ""
|
|
1303 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1304 |
msgstr "Selected timezone \"UTC%+d\" will be treated as %s."
|
1305 |
|
1306 |
-
#: lib/date/timezone.php:
|
1307 |
msgid "Manual Offset"
|
1308 |
msgstr "Manual Offset"
|
1309 |
|
1310 |
-
#: lib/date/timezone.php:
|
1311 |
msgid "Choose your timezone"
|
1312 |
msgstr "Choose your timezone"
|
1313 |
|
@@ -1347,11 +1423,11 @@ msgstr ""
|
|
1347 |
"<p>If you corrected the error and wish to try reactivating the plugin, <a "
|
1348 |
"href=\"%s\">click here</a>.</p>"
|
1349 |
|
1350 |
-
#: lib/factory/html.php:
|
1351 |
msgid "Choose a date using calendar"
|
1352 |
msgstr "Choose a date using calendar"
|
1353 |
|
1354 |
-
#: lib/factory/html.php:
|
1355 |
msgid "Tags (optional)"
|
1356 |
msgstr "Tags (optional)"
|
1357 |
|
@@ -1391,6 +1467,14 @@ msgstr "Enabled"
|
|
1391 |
msgid "Default"
|
1392 |
msgstr "Default"
|
1393 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1394 |
#: lib/html/element/setting/html.php:37
|
1395 |
msgid "Embed the calendar using a shortcode"
|
1396 |
msgstr "Embed the calendar using a shortcode"
|
@@ -1459,7 +1543,11 @@ msgstr "performing arts"
|
|
1459 |
msgid "Filter by event tag names/slugs (separate names by comma):"
|
1460 |
msgstr "Filter by event tag names/slugs (separate names by comma):"
|
1461 |
|
1462 |
-
#: lib/html/element/setting/html.php:
|
|
|
|
|
|
|
|
|
1463 |
msgid ""
|
1464 |
"It is currently not supported to embed more than one calendar in the same "
|
1465 |
"page. Do not attempt to embed the calendar via shortcode in a page that "
|
@@ -1536,8 +1624,8 @@ msgid "Events"
|
|
1536 |
msgstr "Events"
|
1537 |
|
1538 |
#: lib/post/custom-type.php:55
|
1539 |
-
msgid "
|
1540 |
-
msgstr "
|
1541 |
|
1542 |
#: lib/post/custom-type.php:85
|
1543 |
msgctxt "Event categories taxonomy"
|
@@ -1670,6 +1758,22 @@ msgstr "for %d occurrences"
|
|
1670 |
msgid "forever"
|
1671 |
msgstr "forever"
|
1672 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1673 |
#: lib/theme/list.php:152
|
1674 |
msgid ""
|
1675 |
"You only have one theme enabled for this site right now. Visit the Network "
|
@@ -1735,11 +1839,11 @@ msgstr ""
|
|
1735 |
msgid "All of this theme’s files are located in <code>%2$s</code>."
|
1736 |
msgstr "All of this theme’s files are located in <code>%2$s</code>."
|
1737 |
|
1738 |
-
#: lib/theme/loader.php:
|
1739 |
msgid "We couldn't find a suitable loader for filename with extension '%s'"
|
1740 |
msgstr "We couldn't find a suitable loader for filename with extension '%s'"
|
1741 |
|
1742 |
-
#: lib/theme/loader.php:
|
1743 |
msgid ""
|
1744 |
"We detected that your cache directory (%s) is not writable. This will make "
|
1745 |
"your calendar slow. Please contact your web host or server administrator to "
|
@@ -1835,19 +1939,19 @@ msgstr "Edit:"
|
|
1835 |
msgid "Organizer contact info"
|
1836 |
msgstr "Organizer contact info"
|
1837 |
|
1838 |
-
#: public/admin/box_event_contact.php:
|
1839 |
msgid "Contact name:"
|
1840 |
msgstr "Contact name:"
|
1841 |
|
1842 |
-
#: public/admin/box_event_contact.php:
|
1843 |
msgid "Phone:"
|
1844 |
msgstr "Phone:"
|
1845 |
|
1846 |
-
#: public/admin/box_event_contact.php:
|
1847 |
msgid "E-mail:"
|
1848 |
msgstr "E-mail:"
|
1849 |
|
1850 |
-
#: public/admin/box_event_contact.php:
|
1851 |
msgid "External URL:"
|
1852 |
msgstr "External URL:"
|
1853 |
|
@@ -1855,19 +1959,19 @@ msgstr "External URL:"
|
|
1855 |
msgid "Event cost and Tickets"
|
1856 |
msgstr "Event cost and Tickets"
|
1857 |
|
1858 |
-
#: public/admin/box_event_cost.php:
|
1859 |
msgid "Cost"
|
1860 |
msgstr "Cost"
|
1861 |
|
1862 |
-
#: public/admin/box_event_cost.php:
|
1863 |
msgid "Free event"
|
1864 |
msgstr "Free event"
|
1865 |
|
1866 |
-
#: public/admin/box_event_cost.php:
|
1867 |
msgid "Registration URL:"
|
1868 |
msgstr "Registration URL:"
|
1869 |
|
1870 |
-
#: public/admin/box_event_cost.php:
|
1871 |
msgid "Buy Tickets URL:"
|
1872 |
msgstr "Buy Tickets URL:"
|
1873 |
|
@@ -2082,35 +2186,39 @@ msgstr "No end time"
|
|
2082 |
msgid "Start date / time"
|
2083 |
msgstr "Start date / time"
|
2084 |
|
2085 |
-
#: public/admin/box_time_and_date.php:
|
2086 |
-
msgid "(Time zone: %s)"
|
2087 |
-
msgstr "(Time zone: %s)"
|
2088 |
-
|
2089 |
-
#: public/admin/box_time_and_date.php:69
|
2090 |
msgid "End date / time"
|
2091 |
msgstr "End date / time"
|
2092 |
|
2093 |
-
#: public/admin/box_time_and_date.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2094 |
msgid "Repeat"
|
2095 |
msgstr "Repeat"
|
2096 |
|
2097 |
-
#: public/admin/box_time_and_date.php:
|
2098 |
msgid "Exclude"
|
2099 |
msgstr "Exclude"
|
2100 |
|
2101 |
-
#: public/admin/box_time_and_date.php:
|
2102 |
msgid "Choose a rule for exclusion"
|
2103 |
msgstr "Choose a rule for exclusion"
|
2104 |
|
2105 |
-
#: public/admin/box_time_and_date.php:
|
2106 |
msgid "Exclude dates"
|
2107 |
msgstr "Exclude dates"
|
2108 |
|
2109 |
-
#: public/admin/box_time_and_date.php:
|
2110 |
-
msgid "
|
2111 |
-
msgstr "
|
2112 |
|
2113 |
-
#: public/admin/box_time_and_date.php:
|
2114 |
msgid "Choose specific dates to exclude"
|
2115 |
msgstr "Choose specific dates to exclude"
|
2116 |
|
@@ -2126,10 +2234,6 @@ msgstr ""
|
|
2126 |
"to the All-in-One Event Calendar by <a href=\"http://time.ly/\" target="
|
2127 |
"\"_blank\">Timely</a>"
|
2128 |
|
2129 |
-
#: public/admin/calendar_tasks.php:13
|
2130 |
-
msgid "Post Your Event"
|
2131 |
-
msgstr "Post Your Event"
|
2132 |
-
|
2133 |
#: public/admin/calendar_tasks.php:16
|
2134 |
msgid "Add a new event to the calendar."
|
2135 |
msgstr "Add a new event to the calendar."
|
@@ -2461,91 +2565,86 @@ msgstr "Input field placeholder text"
|
|
2461 |
|
2462 |
#: public/themes-ai1ec/umbra/less/user_variables.php:161
|
2463 |
#: public/themes-ai1ec/vortex/less/user_variables.php:161
|
2464 |
-
msgid "Calendar title"
|
2465 |
-
msgstr "Calendar title"
|
2466 |
-
|
2467 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:167
|
2468 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:167
|
2469 |
msgid "Today color"
|
2470 |
msgstr "Today color"
|
2471 |
|
2472 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2473 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2474 |
msgid "All-day badge color"
|
2475 |
msgstr "All-day badge color"
|
2476 |
|
2477 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2478 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2479 |
msgid "Event image shadow"
|
2480 |
msgstr "Event image shadow"
|
2481 |
|
2482 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2483 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2484 |
msgid "Event default color"
|
2485 |
msgstr "Event default color"
|
2486 |
|
2487 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2488 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2489 |
msgid "Event default color (hover)"
|
2490 |
msgstr "Event default color (hover)"
|
2491 |
|
2492 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2493 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2494 |
msgid "All-day/multi-day event stub text"
|
2495 |
msgstr "All-day/multi-day event stub text"
|
2496 |
|
2497 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2498 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2499 |
msgid "All-day/multi-day event stub text shadow"
|
2500 |
msgstr "All-day/multi-day event stub text shadow"
|
2501 |
|
2502 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2503 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2504 |
msgid "Event border"
|
2505 |
msgstr "Event border"
|
2506 |
|
2507 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2508 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2509 |
msgid "Event background"
|
2510 |
msgstr "Event background"
|
2511 |
|
2512 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2513 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2514 |
msgid "Event time background"
|
2515 |
msgstr "Event time background"
|
2516 |
|
2517 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2518 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2519 |
msgid "Event text"
|
2520 |
msgstr "Event text"
|
2521 |
|
2522 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2523 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2524 |
msgid "Month view date background"
|
2525 |
msgstr "Month view date background"
|
2526 |
|
2527 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2528 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2529 |
msgid "Week/day view now marker"
|
2530 |
msgstr "Week/day view now marker"
|
2531 |
|
2532 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2533 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2534 |
msgid "Date label accent color"
|
2535 |
msgstr "Date label accent color"
|
2536 |
|
2537 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2538 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2539 |
msgid "Date label background"
|
2540 |
msgstr "Date label background"
|
2541 |
|
2542 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2543 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2544 |
msgid "Date background"
|
2545 |
msgstr "Date background"
|
2546 |
|
2547 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:
|
2548 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:
|
2549 |
msgid "Today background"
|
2550 |
msgstr "Today background"
|
2551 |
|
@@ -2553,9 +2652,9 @@ msgstr "Today background"
|
|
2553 |
msgid "All-in-One Event Calendar by Time.ly"
|
2554 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2555 |
|
2556 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.
|
2557 |
#. Plugin URI of the plugin/theme
|
2558 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.
|
2559 |
#. Author URI of the plugin/theme
|
2560 |
msgid "http://time.ly/"
|
2561 |
msgstr "http://time.ly/"
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2014-08-05 15:44:42+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-08-05 18:44+0300\n"
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
24 |
msgid "Licences"
|
25 |
msgstr "Licences"
|
26 |
|
27 |
+
#: app/controller/front.php:295
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
34 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
35 |
"theme manually."
|
36 |
|
37 |
+
#: app/controller/front.php:299 app/view/admin/theme-switching.php:54
|
38 |
#: app/view/admin/theme-switching.php:55
|
39 |
msgid "Calendar Themes"
|
40 |
msgstr "Calendar Themes"
|
41 |
|
42 |
+
#: app/controller/front.php:847
|
43 |
msgid ""
|
44 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
45 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
49 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
50 |
"<br>Following errors were found:<br>%s"
|
51 |
|
52 |
+
#: app/controller/javascript.php:381
|
53 |
msgid "This feed is already being imported."
|
54 |
msgstr "This feed is already being imported."
|
55 |
|
56 |
+
#: app/controller/javascript.php:384
|
57 |
msgid "Please enter a valid iCalendar URL."
|
58 |
msgstr "Please enter a valid iCalendar URL."
|
59 |
|
60 |
+
#: app/controller/javascript.php:387
|
61 |
msgid "Please enter a valid email address."
|
62 |
msgstr "Please enter a valid email address."
|
63 |
|
64 |
+
#: app/controller/javascript.php:389
|
65 |
msgid "Choose Image"
|
66 |
msgstr "Choose Image"
|
67 |
|
68 |
+
#: app/controller/javascript.php:392
|
69 |
msgid "The value you have entered is not a valid CSS length."
|
70 |
msgstr "The value you have entered is not a valid CSS length."
|
71 |
|
72 |
+
#: app/controller/javascript.php:395
|
73 |
msgid ""
|
74 |
"Are you sure you want to reset your theme options to their default values?"
|
75 |
msgstr ""
|
76 |
"Are you sure you want to reset your theme options to their default values?"
|
77 |
|
78 |
+
#: app/controller/javascript.php:398
|
79 |
msgid ""
|
80 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
81 |
"-90."
|
83 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
84 |
"-90."
|
85 |
|
86 |
+
#: app/controller/javascript.php:401
|
87 |
msgid ""
|
88 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
89 |
"and -180."
|
91 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
92 |
"and -180."
|
93 |
|
94 |
+
#: app/controller/javascript.php:404
|
95 |
msgid ""
|
96 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
97 |
"required field."
|
99 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
100 |
"required field."
|
101 |
|
102 |
+
#: app/controller/javascript.php:407
|
103 |
msgid ""
|
104 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
105 |
"required field."
|
107 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
108 |
"required field."
|
109 |
|
110 |
+
#: app/controller/javascript.php:410
|
111 |
msgid ""
|
112 |
+
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
113 |
+
"<b>External URL</b> seems to be invalid."
|
114 |
msgstr ""
|
115 |
+
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
116 |
+
"<b>External URL</b> seems to be invalid."
|
117 |
+
|
118 |
+
#: app/controller/javascript.php:413
|
119 |
+
msgid ""
|
120 |
+
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
121 |
+
"Tickets URL</b> seems to be invalid."
|
122 |
+
msgstr ""
|
123 |
+
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
124 |
+
"Tickets URL</b> seems to be invalid."
|
125 |
+
|
126 |
+
#: app/controller/javascript.php:416
|
127 |
+
msgid ""
|
128 |
+
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
129 |
+
msgstr ""
|
130 |
+
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
131 |
|
132 |
#: app/model/event/parent.php:186
|
133 |
msgid "Edit “%s”"
|
137 |
msgid "Base Event"
|
138 |
msgstr "Base Event"
|
139 |
|
140 |
+
#: app/model/settings.php:342
|
141 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
142 |
msgid "Calendar page"
|
143 |
msgstr "Calendar page"
|
144 |
|
145 |
+
#: app/model/settings.php:352
|
146 |
msgid "Week starts on"
|
147 |
msgstr "Week starts on"
|
148 |
|
149 |
+
#: app/model/settings.php:365
|
150 |
msgid "Available views"
|
151 |
msgstr "Available views"
|
152 |
|
153 |
+
#: app/model/settings.php:373
|
154 |
msgid "Agenda"
|
155 |
msgstr "Agenda"
|
156 |
|
157 |
+
#: app/model/settings.php:380
|
158 |
msgid "Day"
|
159 |
msgstr "Day"
|
160 |
|
161 |
+
#: app/model/settings.php:387
|
162 |
msgid "Month"
|
163 |
msgstr "Month"
|
164 |
|
165 |
+
#: app/model/settings.php:394
|
166 |
msgid "Week"
|
167 |
msgstr "Week"
|
168 |
|
169 |
+
#: app/model/settings.php:404
|
170 |
msgid "Timezone"
|
171 |
msgstr "Timezone"
|
172 |
|
173 |
+
#: app/model/settings.php:418
|
174 |
msgid "Preselected calendar filters"
|
175 |
msgstr "Preselected calendar filters"
|
176 |
|
177 |
+
#: app/model/settings.php:419
|
178 |
msgid ""
|
179 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
180 |
"selection."
|
182 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
183 |
"selection."
|
184 |
|
185 |
+
#: app/model/settings.php:434
|
186 |
msgid "Default calendar start date (optional)"
|
187 |
msgstr "Default calendar start date (optional)"
|
188 |
|
189 |
+
#: app/model/settings.php:445
|
190 |
msgid "Agenda pages show at most"
|
191 |
msgstr "Agenda pages show at most"
|
192 |
|
193 |
+
#: app/model/settings.php:458
|
194 |
msgid "Week/Day view starts at"
|
195 |
msgstr "Week/Day view starts at"
|
196 |
|
197 |
+
#: app/model/settings.php:471
|
198 |
msgid "Week/Day view ends at"
|
199 |
msgstr "Week/Day view ends at"
|
200 |
|
201 |
+
#: app/model/settings.php:484
|
202 |
msgid "<strong>Word-wrap event stubs</strong> in Month view"
|
203 |
msgstr "<strong>Word-wrap event stubs</strong> in Month view"
|
204 |
|
205 |
+
#: app/model/settings.php:487
|
206 |
msgid "Only applies to events that span a single day."
|
207 |
msgstr "Only applies to events that span a single day."
|
208 |
|
209 |
+
#: app/model/settings.php:499
|
210 |
msgid ""
|
211 |
"In <span class=\"ai1ec-tooltip-toggle\"\n"
|
212 |
"\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
|
220 |
"\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
|
221 |
"\t\t\t\t\t\tfrom last day shown</strong>"
|
222 |
|
223 |
+
#: app/model/settings.php:515
|
224 |
msgid "Keep all events <strong>expanded</strong> in Agenda view"
|
225 |
msgstr "Keep all events <strong>expanded</strong> in Agenda view"
|
226 |
|
227 |
+
#: app/model/settings.php:527
|
228 |
msgid "<strong>Show year</strong> in calendar date labels"
|
229 |
msgstr "<strong>Show year</strong> in calendar date labels"
|
230 |
|
231 |
+
#: app/model/settings.php:539
|
232 |
msgid "<strong>Show location in event titles</strong> in calendar views"
|
233 |
msgstr "<strong>Show location in event titles</strong> in calendar views"
|
234 |
|
235 |
+
#: app/model/settings.php:551
|
236 |
msgid "<strong>Exclude</strong> events from search results"
|
237 |
msgstr "<strong>Exclude</strong> events from search results"
|
238 |
|
239 |
+
#: app/model/settings.php:563
|
240 |
msgid ""
|
241 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
242 |
"calendar and single event views "
|
244 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
245 |
"calendar and single event views "
|
246 |
|
247 |
+
#: app/model/settings.php:575
|
248 |
msgid " Hide <strong>Google Maps</strong> until clicked"
|
249 |
msgstr " Hide <strong>Google Maps</strong> until clicked"
|
250 |
|
251 |
+
#: app/model/settings.php:587
|
252 |
+
msgid ""
|
253 |
+
" <strong>Affix filter menu</strong> to top of window when it scrolls out of "
|
254 |
+
"view"
|
255 |
+
msgstr ""
|
256 |
+
" <strong>Affix filter menu</strong> to top of window when it scrolls out of "
|
257 |
+
"view"
|
258 |
+
|
259 |
+
#: app/model/settings.php:599
|
260 |
+
msgid "Offset affixed filter bar vertically by"
|
261 |
+
msgstr "Offset affixed filter bar vertically by"
|
262 |
+
|
263 |
+
#: app/model/settings.php:614
|
264 |
+
msgid "Wide screens only (≥ 1200px)"
|
265 |
+
msgstr "Wide screens only (≥ 1200px)"
|
266 |
+
|
267 |
+
#: app/model/settings.php:629
|
268 |
+
msgid "Tablets only (< 980px)"
|
269 |
+
msgstr "Tablets only (< 980px)"
|
270 |
+
|
271 |
+
#: app/model/settings.php:644
|
272 |
+
msgid "Phones only (< 768px)"
|
273 |
+
msgstr "Phones only (< 768px)"
|
274 |
+
|
275 |
+
#: app/model/settings.php:657
|
276 |
msgid " <strong>Hide featured image</strong> from event details page"
|
277 |
msgstr " <strong>Hide featured image</strong> from event details page"
|
278 |
|
279 |
+
#: app/model/settings.php:660
|
280 |
msgid ""
|
281 |
"Select this option if your theme already displays each post's featured image."
|
282 |
msgstr ""
|
283 |
"Select this option if your theme already displays each post's featured image."
|
284 |
|
285 |
+
#: app/model/settings.php:671
|
286 |
msgid "Input dates in this format"
|
287 |
msgstr "Input dates in this format"
|
288 |
|
289 |
+
#: app/model/settings.php:676
|
290 |
msgid "Default (d/m/yyyy)"
|
291 |
msgstr "Default (d/m/yyyy)"
|
292 |
|
293 |
+
#: app/model/settings.php:680
|
294 |
msgid "US (m/d/yyyy)"
|
295 |
msgstr "US (m/d/yyyy)"
|
296 |
|
297 |
+
#: app/model/settings.php:684
|
298 |
msgid "ISO 8601 (yyyy-m-d)"
|
299 |
msgstr "ISO 8601 (yyyy-m-d)"
|
300 |
|
301 |
+
#: app/model/settings.php:688
|
302 |
msgid "Dotted (m.d.yyyy)"
|
303 |
msgstr "Dotted (m.d.yyyy)"
|
304 |
|
305 |
+
#: app/model/settings.php:700
|
306 |
msgid " Use <strong>24h time</strong> in time pickers"
|
307 |
msgstr " Use <strong>24h time</strong> in time pickers"
|
308 |
|
309 |
+
#: app/model/settings.php:711
|
310 |
msgid "<strong>Disable address autocomplete</strong> function"
|
311 |
msgstr "<strong>Disable address autocomplete</strong> function"
|
312 |
|
313 |
+
#: app/model/settings.php:722
|
314 |
msgid ""
|
315 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
316 |
"address autocomplete function "
|
318 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
319 |
"address autocomplete function "
|
320 |
|
321 |
+
#: app/model/settings.php:738
|
|
|
|
|
|
|
|
|
322 |
msgid ""
|
323 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
324 |
"privileged users"
|
326 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
327 |
"privileged users"
|
328 |
|
329 |
+
#: app/model/settings.php:741
|
330 |
msgid ""
|
331 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
332 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
336 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
337 |
"strong>."
|
338 |
|
339 |
+
#: app/model/settings.php:762
|
340 |
msgid "Move calendar into this DOM element"
|
341 |
msgstr "Move calendar into this DOM element"
|
342 |
|
343 |
+
#: app/model/settings.php:764
|
344 |
msgid ""
|
345 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
346 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
364 |
"\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
|
365 |
"\t\t\t\t\t\tby the calendar."
|
366 |
|
367 |
+
#: app/model/settings.php:783
|
368 |
msgid ""
|
369 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
370 |
"multiple calendar output"
|
372 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
373 |
"multiple calendar output"
|
374 |
|
375 |
+
#: app/model/settings.php:786
|
376 |
msgid ""
|
377 |
"Try enabling this option if your calendar does not appear on the calendar "
|
378 |
"page. It is needed for compatibility with a small number of themes that call "
|
382 |
"page. It is needed for compatibility with a small number of themes that call "
|
383 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
384 |
|
385 |
+
#: app/model/settings.php:798
|
386 |
msgid "Disable <strong>gzip</strong> compression."
|
387 |
msgstr "Disable <strong>gzip</strong> compression."
|
388 |
|
389 |
+
#: app/model/settings.php:801
|
390 |
msgid ""
|
391 |
+
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
392 |
+
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
393 |
+
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
394 |
msgstr ""
|
395 |
+
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
396 |
+
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
397 |
+
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
398 |
|
399 |
+
#: app/model/settings.php:813
|
400 |
+
msgid ""
|
401 |
+
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
402 |
+
"cache is unavailable."
|
403 |
+
msgstr ""
|
404 |
+
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
405 |
+
"cache is unavailable."
|
406 |
+
|
407 |
+
#: app/model/settings.php:816
|
408 |
+
msgid ""
|
409 |
+
"Use this option if file cache is unavailable and you would prefer to serve "
|
410 |
+
"CSS as a link rather than have it output inline."
|
411 |
+
msgstr ""
|
412 |
+
"Use this option if file cache is unavailable and you would prefer to serve "
|
413 |
+
"CSS as a link rather than have it output inline."
|
414 |
+
|
415 |
+
#: app/model/settings.php:828
|
416 |
msgid "Current <strong>robots.txt</strong> on this site"
|
417 |
msgstr "Current <strong>robots.txt</strong> on this site"
|
418 |
|
419 |
+
#: app/model/settings.php:832
|
420 |
msgid ""
|
421 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
422 |
"or\n"
|
440 |
"\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
|
441 |
"your root WordPress directory."
|
442 |
|
443 |
+
#: app/model/settings.php:849
|
444 |
msgid ""
|
445 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
446 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
448 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
449 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
450 |
|
451 |
+
#: app/model/settings.php:872
|
452 |
msgid "Templates cache improves site performance"
|
453 |
msgstr "Templates cache improves site performance"
|
454 |
|
456 |
msgid "Event Details"
|
457 |
msgstr "Event Details"
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
#: app/view/admin/all-events.php:16
|
460 |
msgid "Author"
|
461 |
msgstr "Author"
|
630 |
msgid "All-in-One Event Calendar: Settings"
|
631 |
msgstr "All-in-One Event Calendar: Settings"
|
632 |
|
633 |
+
#: app/view/admin/settings.php:63 app/view/admin/settings.php:64
|
634 |
#: lib/date/timezone.php:366
|
635 |
msgid "Settings"
|
636 |
msgstr "Settings"
|
637 |
|
638 |
+
#: app/view/admin/settings.php:84
|
639 |
msgctxt "meta box"
|
640 |
msgid "General Settings"
|
641 |
msgstr "General Settings"
|
642 |
|
643 |
+
#: app/view/admin/settings.php:93
|
644 |
msgctxt "meta box"
|
645 |
msgid "Timely"
|
646 |
msgstr "Timely"
|
647 |
|
648 |
+
#: app/view/admin/settings.php:139
|
649 |
msgid "Viewing Events"
|
650 |
msgstr "Viewing Events"
|
651 |
|
652 |
+
#: app/view/admin/settings.php:142
|
|
|
|
|
|
|
|
|
653 |
msgid "Adding/Editing Events"
|
654 |
msgstr "Adding/Editing Events"
|
655 |
|
656 |
+
#: app/view/admin/settings.php:145
|
657 |
msgid "Advanced"
|
658 |
msgstr "Advanced"
|
659 |
|
660 |
+
#: app/view/admin/settings.php:147
|
661 |
msgid "Advanced Settings"
|
662 |
msgstr "Advanced Settings"
|
663 |
|
664 |
+
#: app/view/admin/settings.php:148
|
665 |
+
msgid "Shortcodes"
|
666 |
+
msgstr "Shortcodes"
|
667 |
+
|
668 |
+
#: app/view/admin/settings.php:149
|
669 |
msgid "Email Templates"
|
670 |
msgstr "Email Templates"
|
671 |
|
672 |
+
#: app/view/admin/settings.php:150
|
673 |
msgid "External Services"
|
674 |
msgstr "External Services"
|
675 |
|
676 |
+
#: app/view/admin/settings.php:151
|
677 |
msgid "Cache Report"
|
678 |
msgstr "Cache Report"
|
679 |
|
680 |
+
#: app/view/admin/settings.php:169
|
681 |
#: public/admin/plugins/ics/display_feeds.php:24
|
682 |
msgid "Save Settings"
|
683 |
msgstr "Save Settings"
|
684 |
|
685 |
+
#: app/view/admin/settings.php:176
|
686 |
msgid ""
|
687 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
688 |
msgstr ""
|
701 |
msgid "Calendar Theme Options"
|
702 |
msgstr "Calendar Theme Options"
|
703 |
|
704 |
+
#: app/view/admin/theme-options.php:133
|
705 |
msgid "General"
|
706 |
msgstr "General"
|
707 |
|
708 |
+
#: app/view/admin/theme-options.php:136
|
709 |
msgid "Tables"
|
710 |
msgstr "Tables"
|
711 |
|
712 |
+
#: app/view/admin/theme-options.php:139
|
713 |
msgid "Buttons"
|
714 |
msgstr "Buttons"
|
715 |
|
716 |
+
#: app/view/admin/theme-options.php:142
|
717 |
msgid "Forms"
|
718 |
msgstr "Forms"
|
719 |
|
720 |
+
#: app/view/admin/theme-options.php:145
|
721 |
msgid "Calendar general"
|
722 |
msgstr "Calendar general"
|
723 |
|
724 |
+
#: app/view/admin/theme-options.php:148
|
725 |
msgid "Month/week/day view"
|
726 |
msgstr "Month/week/day view"
|
727 |
|
728 |
+
#: app/view/admin/theme-options.php:151
|
729 |
msgid "Agenda view"
|
730 |
msgstr "Agenda view"
|
731 |
|
732 |
+
#: app/view/admin/theme-options.php:169
|
733 |
msgid "Save Options"
|
734 |
msgstr "Save Options"
|
735 |
|
736 |
+
#: app/view/admin/theme-options.php:177
|
737 |
msgid "Reset to Defaults"
|
738 |
msgstr "Reset to Defaults"
|
739 |
|
741 |
msgid "All-in-One Event Calendar: Themes"
|
742 |
msgstr "All-in-One Event Calendar: Themes"
|
743 |
|
744 |
+
#: app/view/calendar/page.php:50
|
745 |
msgid ""
|
746 |
"There was an error loading calendar. Please contact site administrator and "
|
747 |
"inform him to configure calendar views."
|
749 |
"There was an error loading calendar. Please contact site administrator and "
|
750 |
"inform him to configure calendar views."
|
751 |
|
752 |
+
#: app/view/calendar/page.php:186
|
753 |
msgid "Subscribe to filtered calendar"
|
754 |
msgstr "Subscribe to filtered calendar"
|
755 |
|
756 |
+
#: app/view/calendar/page.php:187
|
757 |
msgid "Subscribe"
|
758 |
msgstr "Subscribe"
|
759 |
|
819 |
msgid "Tags"
|
820 |
msgstr "Tags"
|
821 |
|
822 |
+
#: app/view/calendar/view/agenda.php:109
|
823 |
msgid "Collapse All"
|
824 |
msgstr "Collapse All"
|
825 |
|
826 |
+
#: app/view/calendar/view/agenda.php:110
|
827 |
msgid "Expand All"
|
828 |
msgstr "Expand All"
|
829 |
|
830 |
+
#: app/view/calendar/view/agenda.php:133
|
831 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:30
|
832 |
msgid "There are no upcoming events to display at this time."
|
833 |
msgstr "There are no upcoming events to display at this time."
|
834 |
|
835 |
+
#: app/view/calendar/view/agenda.php:134 app/view/calendar/widget.php:273
|
836 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:116
|
837 |
msgid "Edit"
|
838 |
msgstr "Edit"
|
839 |
|
840 |
+
#: app/view/calendar/view/agenda.php:135
|
841 |
msgid "Read more"
|
842 |
msgstr "Read more"
|
843 |
|
844 |
+
#: app/view/calendar/view/agenda.php:136
|
845 |
msgid "Categories:"
|
846 |
msgstr "Categories:"
|
847 |
|
848 |
+
#: app/view/calendar/view/agenda.php:137 lib/theme/list.php:323
|
849 |
#: public/admin/themes.php:29
|
850 |
msgid "Tags:"
|
851 |
msgstr "Tags:"
|
852 |
|
853 |
+
#: app/view/calendar/view/agenda.php:138 app/view/calendar/view/month.php:78
|
854 |
+
#: app/view/calendar/view/oneday.php:90 app/view/calendar/view/week.php:101
|
855 |
#: app/view/calendar/widget.php:274
|
856 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:153
|
857 |
msgid "@ %s"
|
858 |
msgstr "@ %s"
|
859 |
|
860 |
+
#: app/view/calendar/view/oneday.php:71 app/view/calendar/view/week.php:63
|
861 |
msgid "g a"
|
862 |
msgstr "g a"
|
863 |
|
864 |
+
#: app/view/calendar/view/oneday.php:87 app/view/calendar/view/week.php:98
|
865 |
msgid "Reveal full day"
|
866 |
msgstr "Reveal full day"
|
867 |
|
868 |
+
#: app/view/calendar/view/oneday.php:88 app/view/calendar/view/week.php:99
|
869 |
msgid "All-day"
|
870 |
msgstr "All-day"
|
871 |
|
872 |
+
#: app/view/calendar/view/oneday.php:89 app/view/calendar/view/week.php:100
|
873 |
msgid "Now:"
|
874 |
msgstr "Now:"
|
875 |
|
876 |
+
#: app/view/calendar/view/week.php:57
|
877 |
msgid "Week of %s"
|
878 |
msgstr "Week of %s"
|
879 |
|
1028 |
msgid "Tickets"
|
1029 |
msgstr "Tickets"
|
1030 |
|
1031 |
+
#: app/view/event/ticket.php:68
|
1032 |
msgid "Email"
|
1033 |
msgstr "Email"
|
1034 |
|
1035 |
+
#: app/view/event/ticket.php:78
|
1036 |
msgid "Event website"
|
1037 |
msgstr "Event website"
|
1038 |
|
1163 |
"tab."
|
1164 |
|
1165 |
#: cache/twig/31/41/6a842b873aa15c2afe2fd664e027ecf1ba867877537f21b06052271bb848.php:133
|
1166 |
+
#: lib/html/element/setting/html.php:65
|
1167 |
msgid "Warning:"
|
1168 |
msgstr "Warning:"
|
1169 |
|
1181 |
msgid "Dismiss"
|
1182 |
msgstr "Dismiss"
|
1183 |
|
1184 |
+
#: cache/twig/a0/43/95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php:31
|
1185 |
+
msgid "Add Your Feed"
|
1186 |
+
msgstr "Add Your Feed"
|
1187 |
+
|
1188 |
+
#: cache/twig/a0/43/95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php:57
|
1189 |
+
#: public/admin/calendar_tasks.php:13
|
1190 |
+
msgid "Post Your Event"
|
1191 |
+
msgstr "Post Your Event"
|
1192 |
+
|
1193 |
#: lib/calendar-feed/ics.php:38
|
1194 |
msgid "ICS"
|
1195 |
msgstr "ICS"
|
1198 |
msgid "Another import process in progress. Please try again later."
|
1199 |
msgstr "Another import process in progress. Please try again later."
|
1200 |
|
1201 |
+
#: lib/calendar-feed/ics.php:169
|
1202 |
+
msgid ""
|
1203 |
+
"A system error has prevented calendar data from being fetched. Something is "
|
1204 |
+
"preventing the plugin from functioning correctly. This message should "
|
1205 |
+
"provide a clue: %s"
|
1206 |
+
msgstr ""
|
1207 |
+
"A system error has prevented calendar data from being fetched. Something is "
|
1208 |
+
"preventing the plugin from functioning correctly. This message should "
|
1209 |
+
"provide a clue: %s"
|
1210 |
+
|
1211 |
+
#: lib/calendar-feed/ics.php:176
|
1212 |
msgid ""
|
1213 |
+
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1214 |
+
"iCalendar resource, this is likely the result of a temporary server error "
|
1215 |
+
"and time may resolve this issue"
|
|
|
1216 |
msgstr ""
|
1217 |
+
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1218 |
+
"iCalendar resource, this is likely the result of a temporary server error "
|
1219 |
+
"and time may resolve this issue"
|
|
|
1220 |
|
1221 |
+
#: lib/calendar-feed/ics.php:186
|
1222 |
msgid "No events were found"
|
1223 |
msgstr "No events were found"
|
1224 |
|
1225 |
+
#: lib/calendar-feed/ics.php:195
|
1226 |
msgid "Imported %s event"
|
1227 |
msgid_plural "Imported %s events"
|
1228 |
msgstr[0] "Imported %s event"
|
1229 |
msgstr[1] "Imported %s events"
|
1230 |
|
1231 |
+
#: lib/calendar-feed/ics.php:201 lib/calendar-feed/ics.php:640
|
1232 |
msgid "Invalid ICS feed ID"
|
1233 |
msgstr "Invalid ICS feed ID"
|
1234 |
|
1235 |
+
#: lib/calendar-feed/ics.php:343
|
1236 |
msgid "Categories (optional)"
|
1237 |
msgstr "Categories (optional)"
|
1238 |
|
1239 |
+
#: lib/calendar-feed/ics.php:360
|
1240 |
msgid ""
|
1241 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1242 |
msgstr ""
|
1243 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1244 |
|
1245 |
+
#: lib/calendar-feed/ics.php:366
|
1246 |
msgid "Removing ICS Feed"
|
1247 |
msgstr "Removing ICS Feed"
|
1248 |
|
1249 |
+
#: lib/calendar-feed/ics.php:369
|
1250 |
msgid "Keep Events"
|
1251 |
msgstr "Keep Events"
|
1252 |
|
1253 |
+
#: lib/calendar-feed/ics.php:372
|
1254 |
msgid "Remove Events"
|
1255 |
msgstr "Remove Events"
|
1256 |
|
1257 |
+
#: lib/calendar-feed/ics.php:632
|
1258 |
msgid "Deleted %d events"
|
1259 |
msgstr "Deleted %d events"
|
1260 |
|
1261 |
+
#: lib/calendar-feed/ics.php:667
|
1262 |
msgid "Feed deleted"
|
1263 |
msgstr "Feed deleted"
|
1264 |
|
1289 |
msgid "Clone to Draft"
|
1290 |
msgstr "Clone to Draft"
|
1291 |
|
1292 |
+
#: lib/command/clone.php:181
|
1293 |
msgid ""
|
1294 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1295 |
"cloned event</a></p>"
|
1297 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1298 |
"cloned event</a></p>"
|
1299 |
|
1300 |
+
#: lib/css/frontend.php:81
|
1301 |
+
msgid ""
|
1302 |
+
"Cache directories, <code>%s</code>, are not writable. Your calendar will "
|
1303 |
+
"perform more slowly until you make this directory writable by the web server."
|
1304 |
+
msgstr ""
|
1305 |
+
"Cache directories, <code>%s</code>, are not writable. Your calendar will "
|
1306 |
+
"perform more slowly until you make this directory writable by the web server."
|
1307 |
+
|
1308 |
+
#: lib/css/frontend.php:237
|
1309 |
msgid ""
|
1310 |
"The LESS file compiled correctly but there was an error while saving the "
|
1311 |
"generated CSS to persistence."
|
1313 |
"The LESS file compiled correctly but there was an error while saving the "
|
1314 |
"generated CSS to persistence."
|
1315 |
|
1316 |
+
#: lib/css/frontend.php:243
|
1317 |
msgid ""
|
1318 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1319 |
"returned was: <em>%s</em></p>"
|
1321 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1322 |
"returned was: <em>%s</em></p>"
|
1323 |
|
1324 |
+
#: lib/css/frontend.php:271
|
1325 |
msgid ""
|
1326 |
"Theme options were successfully reset to their default values. <a "
|
1327 |
"href='%s'>Visit site</a>"
|
1329 |
"Theme options were successfully reset to their default values. <a "
|
1330 |
"href='%s'>Visit site</a>"
|
1331 |
|
1332 |
+
#: lib/css/frontend.php:278
|
1333 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1334 |
msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1335 |
|
1336 |
+
#: lib/css/frontend.php:314
|
1337 |
+
msgid ""
|
1338 |
+
"Your CSS is being compiled on every request, which causes your calendar to "
|
1339 |
+
"perform slowly. The following error occurred: %s"
|
1340 |
+
msgstr ""
|
1341 |
+
"Your CSS is being compiled on every request, which causes your calendar to "
|
1342 |
+
"perform slowly. The following error occurred: %s"
|
1343 |
+
|
1344 |
#: lib/database/applicator.php:182
|
1345 |
msgid "Date columns in table %s have different types."
|
1346 |
msgstr "Date columns in table %s have different types."
|
1359 |
msgid "Error encountered: %s"
|
1360 |
msgstr "Error encountered: %s"
|
1361 |
|
1362 |
+
#: lib/date/system.php:177
|
1363 |
msgid "GMT%+d:%02d"
|
1364 |
msgstr "GMT%+d:%02d"
|
1365 |
|
1379 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1380 |
msgstr "Selected timezone \"UTC%+d\" will be treated as %s."
|
1381 |
|
1382 |
+
#: lib/date/timezone.php:475
|
1383 |
msgid "Manual Offset"
|
1384 |
msgstr "Manual Offset"
|
1385 |
|
1386 |
+
#: lib/date/timezone.php:478
|
1387 |
msgid "Choose your timezone"
|
1388 |
msgstr "Choose your timezone"
|
1389 |
|
1423 |
"<p>If you corrected the error and wish to try reactivating the plugin, <a "
|
1424 |
"href=\"%s\">click here</a>.</p>"
|
1425 |
|
1426 |
+
#: lib/factory/html.php:127
|
1427 |
msgid "Choose a date using calendar"
|
1428 |
msgstr "Choose a date using calendar"
|
1429 |
|
1430 |
+
#: lib/factory/html.php:269
|
1431 |
msgid "Tags (optional)"
|
1432 |
msgstr "Tags (optional)"
|
1433 |
|
1467 |
msgid "Default"
|
1468 |
msgstr "Default"
|
1469 |
|
1470 |
+
#: lib/html/element/setting/enabled-views.php:24
|
1471 |
+
msgid "Desktop"
|
1472 |
+
msgstr "Desktop"
|
1473 |
+
|
1474 |
+
#: lib/html/element/setting/enabled-views.php:25
|
1475 |
+
msgid "Mobile"
|
1476 |
+
msgstr "Mobile"
|
1477 |
+
|
1478 |
#: lib/html/element/setting/html.php:37
|
1479 |
msgid "Embed the calendar using a shortcode"
|
1480 |
msgstr "Embed the calendar using a shortcode"
|
1543 |
msgid "Filter by event tag names/slugs (separate names by comma):"
|
1544 |
msgstr "Filter by event tag names/slugs (separate names by comma):"
|
1545 |
|
1546 |
+
#: lib/html/element/setting/html.php:64
|
1547 |
+
msgid "Limit number of events per page:"
|
1548 |
+
msgstr "Limit number of events per page:"
|
1549 |
+
|
1550 |
+
#: lib/html/element/setting/html.php:66
|
1551 |
msgid ""
|
1552 |
"It is currently not supported to embed more than one calendar in the same "
|
1553 |
"page. Do not attempt to embed the calendar via shortcode in a page that "
|
1624 |
msgstr "Events"
|
1625 |
|
1626 |
#: lib/post/custom-type.php:55
|
1627 |
+
msgid "event"
|
1628 |
+
msgstr "event"
|
1629 |
|
1630 |
#: lib/post/custom-type.php:85
|
1631 |
msgctxt "Event categories taxonomy"
|
1758 |
msgid "forever"
|
1759 |
msgstr "forever"
|
1760 |
|
1761 |
+
#: lib/robots/helper.php:71
|
1762 |
+
msgid ""
|
1763 |
+
"<strong>ERROR:</strong> There was an error connecting to the server, Please "
|
1764 |
+
"verify the settings are correct."
|
1765 |
+
msgstr ""
|
1766 |
+
"<strong>ERROR:</strong> There was an error connecting to the server, Please "
|
1767 |
+
"verify the settings are correct."
|
1768 |
+
|
1769 |
+
#: lib/robots/helper.php:105
|
1770 |
+
msgid ""
|
1771 |
+
"<strong>ERROR:</strong> There was an error storing <strong>robots.txt</"
|
1772 |
+
"strong> to the server, the file could not be written."
|
1773 |
+
msgstr ""
|
1774 |
+
"<strong>ERROR:</strong> There was an error storing <strong>robots.txt</"
|
1775 |
+
"strong> to the server, the file could not be written."
|
1776 |
+
|
1777 |
#: lib/theme/list.php:152
|
1778 |
msgid ""
|
1779 |
"You only have one theme enabled for this site right now. Visit the Network "
|
1839 |
msgid "All of this theme’s files are located in <code>%2$s</code>."
|
1840 |
msgstr "All of this theme’s files are located in <code>%2$s</code>."
|
1841 |
|
1842 |
+
#: lib/theme/loader.php:300
|
1843 |
msgid "We couldn't find a suitable loader for filename with extension '%s'"
|
1844 |
msgstr "We couldn't find a suitable loader for filename with extension '%s'"
|
1845 |
|
1846 |
+
#: lib/theme/loader.php:403 lib/twig/environment.php:31
|
1847 |
msgid ""
|
1848 |
"We detected that your cache directory (%s) is not writable. This will make "
|
1849 |
"your calendar slow. Please contact your web host or server administrator to "
|
1939 |
msgid "Organizer contact info"
|
1940 |
msgstr "Organizer contact info"
|
1941 |
|
1942 |
+
#: public/admin/box_event_contact.php:17
|
1943 |
msgid "Contact name:"
|
1944 |
msgstr "Contact name:"
|
1945 |
|
1946 |
+
#: public/admin/box_event_contact.php:30
|
1947 |
msgid "Phone:"
|
1948 |
msgstr "Phone:"
|
1949 |
|
1950 |
+
#: public/admin/box_event_contact.php:43
|
1951 |
msgid "E-mail:"
|
1952 |
msgstr "E-mail:"
|
1953 |
|
1954 |
+
#: public/admin/box_event_contact.php:56
|
1955 |
msgid "External URL:"
|
1956 |
msgstr "External URL:"
|
1957 |
|
1959 |
msgid "Event cost and Tickets"
|
1960 |
msgstr "Event cost and Tickets"
|
1961 |
|
1962 |
+
#: public/admin/box_event_cost.php:17
|
1963 |
msgid "Cost"
|
1964 |
msgstr "Cost"
|
1965 |
|
1966 |
+
#: public/admin/box_event_cost.php:35
|
1967 |
msgid "Free event"
|
1968 |
msgstr "Free event"
|
1969 |
|
1970 |
+
#: public/admin/box_event_cost.php:43
|
1971 |
msgid "Registration URL:"
|
1972 |
msgstr "Registration URL:"
|
1973 |
|
1974 |
+
#: public/admin/box_event_cost.php:44
|
1975 |
msgid "Buy Tickets URL:"
|
1976 |
msgstr "Buy Tickets URL:"
|
1977 |
|
2186 |
msgid "Start date / time"
|
2187 |
msgstr "Start date / time"
|
2188 |
|
2189 |
+
#: public/admin/box_time_and_date.php:59
|
|
|
|
|
|
|
|
|
2190 |
msgid "End date / time"
|
2191 |
msgstr "End date / time"
|
2192 |
|
2193 |
+
#: public/admin/box_time_and_date.php:76
|
2194 |
+
msgid "Time zone"
|
2195 |
+
msgstr "Time zone"
|
2196 |
+
|
2197 |
+
#: public/admin/box_time_and_date.php:81
|
2198 |
+
msgid "Choose your time zone"
|
2199 |
+
msgstr "Choose your time zone"
|
2200 |
+
|
2201 |
+
#: public/admin/box_time_and_date.php:108
|
2202 |
msgid "Repeat"
|
2203 |
msgstr "Repeat"
|
2204 |
|
2205 |
+
#: public/admin/box_time_and_date.php:127
|
2206 |
msgid "Exclude"
|
2207 |
msgstr "Exclude"
|
2208 |
|
2209 |
+
#: public/admin/box_time_and_date.php:136
|
2210 |
msgid "Choose a rule for exclusion"
|
2211 |
msgstr "Choose a rule for exclusion"
|
2212 |
|
2213 |
+
#: public/admin/box_time_and_date.php:143
|
2214 |
msgid "Exclude dates"
|
2215 |
msgstr "Exclude dates"
|
2216 |
|
2217 |
+
#: public/admin/box_time_and_date.php:149
|
2218 |
+
msgid "Choose dates"
|
2219 |
+
msgstr "Choose dates"
|
2220 |
|
2221 |
+
#: public/admin/box_time_and_date.php:156
|
2222 |
msgid "Choose specific dates to exclude"
|
2223 |
msgstr "Choose specific dates to exclude"
|
2224 |
|
2234 |
"to the All-in-One Event Calendar by <a href=\"http://time.ly/\" target="
|
2235 |
"\"_blank\">Timely</a>"
|
2236 |
|
|
|
|
|
|
|
|
|
2237 |
#: public/admin/calendar_tasks.php:16
|
2238 |
msgid "Add a new event to the calendar."
|
2239 |
msgstr "Add a new event to the calendar."
|
2565 |
|
2566 |
#: public/themes-ai1ec/umbra/less/user_variables.php:161
|
2567 |
#: public/themes-ai1ec/vortex/less/user_variables.php:161
|
|
|
|
|
|
|
|
|
|
|
2568 |
msgid "Today color"
|
2569 |
msgstr "Today color"
|
2570 |
|
2571 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:167
|
2572 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:167
|
2573 |
msgid "All-day badge color"
|
2574 |
msgstr "All-day badge color"
|
2575 |
|
2576 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:173
|
2577 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:173
|
2578 |
msgid "Event image shadow"
|
2579 |
msgstr "Event image shadow"
|
2580 |
|
2581 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:179
|
2582 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:179
|
2583 |
msgid "Event default color"
|
2584 |
msgstr "Event default color"
|
2585 |
|
2586 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:185
|
2587 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:185
|
2588 |
msgid "Event default color (hover)"
|
2589 |
msgstr "Event default color (hover)"
|
2590 |
|
2591 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:191
|
2592 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:191
|
2593 |
msgid "All-day/multi-day event stub text"
|
2594 |
msgstr "All-day/multi-day event stub text"
|
2595 |
|
2596 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:197
|
2597 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:197
|
2598 |
msgid "All-day/multi-day event stub text shadow"
|
2599 |
msgstr "All-day/multi-day event stub text shadow"
|
2600 |
|
2601 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:203
|
2602 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:203
|
2603 |
msgid "Event border"
|
2604 |
msgstr "Event border"
|
2605 |
|
2606 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:209
|
2607 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:209
|
2608 |
msgid "Event background"
|
2609 |
msgstr "Event background"
|
2610 |
|
2611 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:215
|
2612 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:215
|
2613 |
msgid "Event time background"
|
2614 |
msgstr "Event time background"
|
2615 |
|
2616 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:221
|
2617 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:221
|
2618 |
msgid "Event text"
|
2619 |
msgstr "Event text"
|
2620 |
|
2621 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:227
|
2622 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:227
|
2623 |
msgid "Month view date background"
|
2624 |
msgstr "Month view date background"
|
2625 |
|
2626 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:233
|
2627 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:233
|
2628 |
msgid "Week/day view now marker"
|
2629 |
msgstr "Week/day view now marker"
|
2630 |
|
2631 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:239
|
2632 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:239
|
2633 |
msgid "Date label accent color"
|
2634 |
msgstr "Date label accent color"
|
2635 |
|
2636 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:245
|
2637 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:245
|
2638 |
msgid "Date label background"
|
2639 |
msgstr "Date label background"
|
2640 |
|
2641 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:251
|
2642 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:251
|
2643 |
msgid "Date background"
|
2644 |
msgstr "Date background"
|
2645 |
|
2646 |
+
#: public/themes-ai1ec/umbra/less/user_variables.php:257
|
2647 |
+
#: public/themes-ai1ec/vortex/less/user_variables.php:257
|
2648 |
msgid "Today background"
|
2649 |
msgstr "Today background"
|
2650 |
|
2652 |
msgid "All-in-One Event Calendar by Time.ly"
|
2653 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2654 |
|
2655 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.1) #-#-#-#-#
|
2656 |
#. Plugin URI of the plugin/theme
|
2657 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.1) #-#-#-#-#
|
2658 |
#. Author URI of the plugin/theme
|
2659 |
msgid "http://time.ly/"
|
2660 |
msgstr "http://time.ly/"
|
language/all-in-one-event-calendar.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -24,78 +24,89 @@ msgstr ""
|
|
24 |
msgid "Licences"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: app/controller/front.php:
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
31 |
"theme manually."
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: app/controller/front.php:
|
35 |
#: app/view/admin/theme-switching.php:55
|
36 |
msgid "Calendar Themes"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: app/controller/front.php:
|
40 |
msgid ""
|
41 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
42 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
43 |
"<br>Following errors were found:<br>%s"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: app/controller/javascript.php:
|
47 |
msgid "This feed is already being imported."
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: app/controller/javascript.php:
|
51 |
msgid "Please enter a valid iCalendar URL."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: app/controller/javascript.php:
|
55 |
msgid "Please enter a valid email address."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: app/controller/javascript.php:
|
59 |
msgid "Choose Image"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: app/controller/javascript.php:
|
63 |
msgid "The value you have entered is not a valid CSS length."
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: app/controller/javascript.php:
|
67 |
msgid ""
|
68 |
"Are you sure you want to reset your theme options to their default values?"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: app/controller/javascript.php:
|
72 |
msgid ""
|
73 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
74 |
"-90."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: app/controller/javascript.php:
|
78 |
msgid ""
|
79 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
80 |
"and -180."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: app/controller/javascript.php:
|
84 |
msgid ""
|
85 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
86 |
"required field."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: app/controller/javascript.php:
|
90 |
msgid ""
|
91 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
92 |
"required field."
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: app/controller/javascript.php:
|
96 |
msgid ""
|
97 |
-
"The URL you have entered
|
98 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
msgstr ""
|
100 |
|
101 |
#: app/model/event/parent.php:186
|
@@ -106,74 +117,74 @@ msgstr ""
|
|
106 |
msgid "Base Event"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: app/model/settings.php:
|
110 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
111 |
msgid "Calendar page"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: app/model/settings.php:
|
115 |
msgid "Week starts on"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: app/model/settings.php:
|
119 |
msgid "Available views"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: app/model/settings.php:
|
123 |
msgid "Agenda"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: app/model/settings.php:
|
127 |
msgid "Day"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: app/model/settings.php:
|
131 |
msgid "Month"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: app/model/settings.php:
|
135 |
msgid "Week"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: app/model/settings.php:
|
139 |
msgid "Timezone"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: app/model/settings.php:
|
143 |
msgid "Preselected calendar filters"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: app/model/settings.php:
|
147 |
msgid ""
|
148 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
149 |
"selection."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: app/model/settings.php:
|
153 |
msgid "Default calendar start date (optional)"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: app/model/settings.php:
|
157 |
msgid "Agenda pages show at most"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: app/model/settings.php:
|
161 |
msgid "Week/Day view starts at"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: app/model/settings.php:
|
165 |
msgid "Week/Day view ends at"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: app/model/settings.php:
|
169 |
msgid "<strong>Word-wrap event stubs</strong> in Month view"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: app/model/settings.php:
|
173 |
msgid "Only applies to events that span a single day."
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: app/model/settings.php:
|
177 |
msgid ""
|
178 |
"In <span class=\"ai1ec-tooltip-toggle\"\n"
|
179 |
"\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
|
@@ -182,97 +193,115 @@ msgid ""
|
|
182 |
"\t\t\t\t\t\tfrom last day shown</strong>"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: app/model/settings.php:
|
186 |
msgid "Keep all events <strong>expanded</strong> in Agenda view"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: app/model/settings.php:
|
190 |
msgid "<strong>Show year</strong> in calendar date labels"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: app/model/settings.php:
|
194 |
msgid "<strong>Show location in event titles</strong> in calendar views"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: app/model/settings.php:
|
198 |
msgid "<strong>Exclude</strong> events from search results"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: app/model/settings.php:
|
202 |
msgid ""
|
203 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
204 |
"calendar and single event views "
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: app/model/settings.php:
|
208 |
msgid " Hide <strong>Google Maps</strong> until clicked"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
msgid " <strong>Hide featured image</strong> from event details page"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: app/model/settings.php:
|
216 |
msgid ""
|
217 |
"Select this option if your theme already displays each post's featured image."
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: app/model/settings.php:
|
221 |
msgid "Input dates in this format"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: app/model/settings.php:
|
225 |
msgid "Default (d/m/yyyy)"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: app/model/settings.php:
|
229 |
msgid "US (m/d/yyyy)"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: app/model/settings.php:
|
233 |
msgid "ISO 8601 (yyyy-m-d)"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: app/model/settings.php:
|
237 |
msgid "Dotted (m.d.yyyy)"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: app/model/settings.php:
|
241 |
msgid " Use <strong>24h time</strong> in time pickers"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: app/model/settings.php:
|
245 |
msgid "<strong>Disable address autocomplete</strong> function"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: app/model/settings.php:
|
249 |
msgid ""
|
250 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
251 |
"address autocomplete function "
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: app/model/settings.php:
|
255 |
-
msgid "Display <strong>Publish</strong> at bottom of Edit Event form"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: app/model/settings.php:658
|
259 |
msgid ""
|
260 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
261 |
"privileged users"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: app/model/settings.php:
|
265 |
msgid ""
|
266 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
267 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
268 |
"strong>."
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: app/model/settings.php:
|
272 |
msgid "Move calendar into this DOM element"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: app/model/settings.php:
|
276 |
msgid ""
|
277 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
278 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
@@ -286,34 +315,47 @@ msgid ""
|
|
286 |
"\t\t\t\t\t\tby the calendar."
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: app/model/settings.php:
|
290 |
msgid ""
|
291 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
292 |
"multiple calendar output"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: app/model/settings.php:
|
296 |
msgid ""
|
297 |
"Try enabling this option if your calendar does not appear on the calendar "
|
298 |
"page. It is needed for compatibility with a small number of themes that call "
|
299 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: app/model/settings.php:
|
303 |
msgid "Disable <strong>gzip</strong> compression."
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: app/model/settings.php:
|
307 |
msgid ""
|
308 |
-
"Use this option if calendar is
|
309 |
-
"ly/disable-gzip-compression/\">Read more</a> about the issue."
|
|
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
msgid "Current <strong>robots.txt</strong> on this site"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: app/model/settings.php:
|
317 |
msgid ""
|
318 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
319 |
"or\n"
|
@@ -327,13 +369,13 @@ msgid ""
|
|
327 |
"your root WordPress directory."
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: app/model/settings.php:
|
331 |
msgid ""
|
332 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
333 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: app/model/settings.php:
|
337 |
msgid "Templates cache improves site performance"
|
338 |
msgstr ""
|
339 |
|
@@ -341,18 +383,6 @@ msgstr ""
|
|
341 |
msgid "Event Details"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: app/view/admin/add-new-event.php:310
|
345 |
-
msgid "Publish"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: app/view/admin/add-new-event.php:311
|
349 |
-
msgid "Update"
|
350 |
-
msgstr ""
|
351 |
-
|
352 |
-
#: app/view/admin/add-new-event.php:313
|
353 |
-
msgid "Submit for Review"
|
354 |
-
msgstr ""
|
355 |
-
|
356 |
#: app/view/admin/all-events.php:16
|
357 |
msgid "Author"
|
358 |
msgstr ""
|
@@ -525,59 +555,59 @@ msgstr ""
|
|
525 |
msgid "All-in-One Event Calendar: Settings"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: app/view/admin/settings.php:
|
529 |
#: lib/date/timezone.php:366
|
530 |
msgid "Settings"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: app/view/admin/settings.php:
|
534 |
msgctxt "meta box"
|
535 |
msgid "General Settings"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: app/view/admin/settings.php:
|
539 |
msgctxt "meta box"
|
540 |
msgid "Timely"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: app/view/admin/settings.php:
|
544 |
msgid "Viewing Events"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: app/view/admin/settings.php:
|
548 |
-
msgid "Embedded Views"
|
549 |
-
msgstr ""
|
550 |
-
|
551 |
-
#: app/view/admin/settings.php:145
|
552 |
msgid "Adding/Editing Events"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: app/view/admin/settings.php:
|
556 |
msgid "Advanced"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: app/view/admin/settings.php:
|
560 |
msgid "Advanced Settings"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: app/view/admin/settings.php:
|
|
|
|
|
|
|
|
|
564 |
msgid "Email Templates"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: app/view/admin/settings.php:
|
568 |
msgid "External Services"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: app/view/admin/settings.php:
|
572 |
msgid "Cache Report"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: app/view/admin/settings.php:
|
576 |
#: public/admin/plugins/ics/display_feeds.php:24
|
577 |
msgid "Save Settings"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: app/view/admin/settings.php:
|
581 |
msgid ""
|
582 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
583 |
msgstr ""
|
@@ -595,39 +625,39 @@ msgctxt "meta box"
|
|
595 |
msgid "Calendar Theme Options"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: app/view/admin/theme-options.php:
|
599 |
msgid "General"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: app/view/admin/theme-options.php:
|
603 |
msgid "Tables"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: app/view/admin/theme-options.php:
|
607 |
msgid "Buttons"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: app/view/admin/theme-options.php:
|
611 |
msgid "Forms"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: app/view/admin/theme-options.php:
|
615 |
msgid "Calendar general"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: app/view/admin/theme-options.php:
|
619 |
msgid "Month/week/day view"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: app/view/admin/theme-options.php:
|
623 |
msgid "Agenda view"
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: app/view/admin/theme-options.php:
|
627 |
msgid "Save Options"
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: app/view/admin/theme-options.php:
|
631 |
msgid "Reset to Defaults"
|
632 |
msgstr ""
|
633 |
|
@@ -635,17 +665,17 @@ msgstr ""
|
|
635 |
msgid "All-in-One Event Calendar: Themes"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: app/view/calendar/page.php:
|
639 |
msgid ""
|
640 |
"There was an error loading calendar. Please contact site administrator and "
|
641 |
"inform him to configure calendar views."
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: app/view/calendar/page.php:
|
645 |
msgid "Subscribe to filtered calendar"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: app/view/calendar/page.php:
|
649 |
msgid "Subscribe"
|
650 |
msgstr ""
|
651 |
|
@@ -709,58 +739,61 @@ msgstr ""
|
|
709 |
msgid "Tags"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: app/view/calendar/view/agenda.php:
|
713 |
msgid "Collapse All"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: app/view/calendar/view/agenda.php:
|
717 |
msgid "Expand All"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: app/view/calendar/view/agenda.php:
|
|
|
721 |
msgid "There are no upcoming events to display at this time."
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: app/view/calendar/view/agenda.php:
|
|
|
725 |
msgid "Edit"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: app/view/calendar/view/agenda.php:
|
729 |
msgid "Read more"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: app/view/calendar/view/agenda.php:
|
733 |
msgid "Categories:"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: app/view/calendar/view/agenda.php:
|
737 |
#: public/admin/themes.php:29
|
738 |
msgid "Tags:"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: app/view/calendar/view/agenda.php:
|
742 |
-
#: app/view/calendar/view/oneday.php:
|
743 |
#: app/view/calendar/widget.php:274
|
|
|
744 |
msgid "@ %s"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: app/view/calendar/view/oneday.php:
|
748 |
msgid "g a"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: app/view/calendar/view/oneday.php:
|
752 |
msgid "Reveal full day"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: app/view/calendar/view/oneday.php:
|
756 |
msgid "All-day"
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: app/view/calendar/view/oneday.php:
|
760 |
msgid "Now:"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: app/view/calendar/view/week.php:
|
764 |
msgid "Week of %s"
|
765 |
msgstr ""
|
766 |
|
@@ -910,11 +943,11 @@ msgstr ""
|
|
910 |
msgid "Tickets"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: app/view/event/ticket.php:
|
914 |
msgid "Email"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: app/view/event/ticket.php:
|
918 |
msgid "Event website"
|
919 |
msgstr ""
|
920 |
|
@@ -1038,7 +1071,7 @@ msgid ""
|
|
1038 |
msgstr ""
|
1039 |
|
1040 |
#: cache/twig/31/41/6a842b873aa15c2afe2fd664e027ecf1ba867877537f21b06052271bb848.php:133
|
1041 |
-
#: lib/html/element/setting/html.php:
|
1042 |
msgid "Warning:"
|
1043 |
msgstr ""
|
1044 |
|
@@ -1053,6 +1086,15 @@ msgstr ""
|
|
1053 |
msgid "Dismiss"
|
1054 |
msgstr ""
|
1055 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
#: lib/calendar-feed/ics.php:38
|
1057 |
msgid "ICS"
|
1058 |
msgstr ""
|
@@ -1061,54 +1103,60 @@ msgstr ""
|
|
1061 |
msgid "Another import process in progress. Please try again later."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: lib/calendar-feed/ics.php:
|
1065 |
msgid ""
|
1066 |
-
"
|
1067 |
-
"
|
1068 |
-
"
|
1069 |
-
"allow_url_fopen' target='_blank' >this</a> article"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: lib/calendar-feed/ics.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1073 |
msgid "No events were found"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: lib/calendar-feed/ics.php:
|
1077 |
msgid "Imported %s event"
|
1078 |
msgid_plural "Imported %s events"
|
1079 |
msgstr[0] ""
|
1080 |
msgstr[1] ""
|
1081 |
|
1082 |
-
#: lib/calendar-feed/ics.php:
|
1083 |
msgid "Invalid ICS feed ID"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: lib/calendar-feed/ics.php:
|
1087 |
msgid "Categories (optional)"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: lib/calendar-feed/ics.php:
|
1091 |
msgid ""
|
1092 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: lib/calendar-feed/ics.php:
|
1096 |
msgid "Removing ICS Feed"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
-
#: lib/calendar-feed/ics.php:
|
1100 |
msgid "Keep Events"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
-
#: lib/calendar-feed/ics.php:
|
1104 |
msgid "Remove Events"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: lib/calendar-feed/ics.php:
|
1108 |
msgid "Deleted %d events"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: lib/calendar-feed/ics.php:
|
1112 |
msgid "Feed deleted"
|
1113 |
msgstr ""
|
1114 |
|
@@ -1138,34 +1186,46 @@ msgstr ""
|
|
1138 |
msgid "Clone to Draft"
|
1139 |
msgstr ""
|
1140 |
|
1141 |
-
#: lib/command/clone.php:
|
1142 |
msgid ""
|
1143 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1144 |
"cloned event</a></p>"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: lib/css/frontend.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
1148 |
msgid ""
|
1149 |
"The LESS file compiled correctly but there was an error while saving the "
|
1150 |
"generated CSS to persistence."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: lib/css/frontend.php:
|
1154 |
msgid ""
|
1155 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1156 |
"returned was: <em>%s</em></p>"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: lib/css/frontend.php:
|
1160 |
msgid ""
|
1161 |
"Theme options were successfully reset to their default values. <a "
|
1162 |
"href='%s'>Visit site</a>"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
-
#: lib/css/frontend.php:
|
1166 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1167 |
msgstr ""
|
1168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1169 |
#: lib/database/applicator.php:182
|
1170 |
msgid "Date columns in table %s have different types."
|
1171 |
msgstr ""
|
@@ -1181,7 +1241,7 @@ msgstr ""
|
|
1181 |
msgid "Error encountered: %s"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
-
#: lib/date/system.php:
|
1185 |
msgid "GMT%+d:%02d"
|
1186 |
msgstr ""
|
1187 |
|
@@ -1199,11 +1259,11 @@ msgstr ""
|
|
1199 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: lib/date/timezone.php:
|
1203 |
msgid "Manual Offset"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: lib/date/timezone.php:
|
1207 |
msgid "Choose your timezone"
|
1208 |
msgstr ""
|
1209 |
|
@@ -1237,11 +1297,11 @@ msgid ""
|
|
1237 |
"href=\"%s\">click here</a>.</p>"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
-
#: lib/factory/html.php:
|
1241 |
msgid "Choose a date using calendar"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: lib/factory/html.php:
|
1245 |
msgid "Tags (optional)"
|
1246 |
msgstr ""
|
1247 |
|
@@ -1281,6 +1341,14 @@ msgstr ""
|
|
1281 |
msgid "Default"
|
1282 |
msgstr ""
|
1283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1284 |
#: lib/html/element/setting/html.php:37
|
1285 |
msgid "Embed the calendar using a shortcode"
|
1286 |
msgstr ""
|
@@ -1345,7 +1413,11 @@ msgstr ""
|
|
1345 |
msgid "Filter by event tag names/slugs (separate names by comma):"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
-
#: lib/html/element/setting/html.php:
|
|
|
|
|
|
|
|
|
1349 |
msgid ""
|
1350 |
"It is currently not supported to embed more than one calendar in the same "
|
1351 |
"page. Do not attempt to embed the calendar via shortcode in a page that "
|
@@ -1419,7 +1491,7 @@ msgid "Events"
|
|
1419 |
msgstr ""
|
1420 |
|
1421 |
#: lib/post/custom-type.php:55
|
1422 |
-
msgid "
|
1423 |
msgstr ""
|
1424 |
|
1425 |
#: lib/post/custom-type.php:85
|
@@ -1551,6 +1623,18 @@ msgstr ""
|
|
1551 |
msgid "forever"
|
1552 |
msgstr ""
|
1553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1554 |
#: lib/theme/list.php:152
|
1555 |
msgid ""
|
1556 |
"You only have one theme enabled for this site right now. Visit the Network "
|
@@ -1603,11 +1687,11 @@ msgstr ""
|
|
1603 |
msgid "All of this theme’s files are located in <code>%2$s</code>."
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: lib/theme/loader.php:
|
1607 |
msgid "We couldn't find a suitable loader for filename with extension '%s'"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: lib/theme/loader.php:
|
1611 |
msgid ""
|
1612 |
"We detected that your cache directory (%s) is not writable. This will make "
|
1613 |
"your calendar slow. Please contact your web host or server administrator to "
|
@@ -1693,19 +1777,19 @@ msgstr ""
|
|
1693 |
msgid "Organizer contact info"
|
1694 |
msgstr ""
|
1695 |
|
1696 |
-
#: public/admin/box_event_contact.php:
|
1697 |
msgid "Contact name:"
|
1698 |
msgstr ""
|
1699 |
|
1700 |
-
#: public/admin/box_event_contact.php:
|
1701 |
msgid "Phone:"
|
1702 |
msgstr ""
|
1703 |
|
1704 |
-
#: public/admin/box_event_contact.php:
|
1705 |
msgid "E-mail:"
|
1706 |
msgstr ""
|
1707 |
|
1708 |
-
#: public/admin/box_event_contact.php:
|
1709 |
msgid "External URL:"
|
1710 |
msgstr ""
|
1711 |
|
@@ -1713,19 +1797,19 @@ msgstr ""
|
|
1713 |
msgid "Event cost and Tickets"
|
1714 |
msgstr ""
|
1715 |
|
1716 |
-
#: public/admin/box_event_cost.php:
|
1717 |
msgid "Cost"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
-
#: public/admin/box_event_cost.php:
|
1721 |
msgid "Free event"
|
1722 |
msgstr ""
|
1723 |
|
1724 |
-
#: public/admin/box_event_cost.php:
|
1725 |
msgid "Registration URL:"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
-
#: public/admin/box_event_cost.php:
|
1729 |
msgid "Buy Tickets URL:"
|
1730 |
msgstr ""
|
1731 |
|
@@ -1934,35 +2018,39 @@ msgstr ""
|
|
1934 |
msgid "Start date / time"
|
1935 |
msgstr ""
|
1936 |
|
1937 |
-
#: public/admin/box_time_and_date.php:
|
1938 |
-
msgid "
|
1939 |
msgstr ""
|
1940 |
|
1941 |
-
#: public/admin/box_time_and_date.php:
|
1942 |
-
msgid "
|
|
|
|
|
|
|
|
|
1943 |
msgstr ""
|
1944 |
|
1945 |
-
#: public/admin/box_time_and_date.php:
|
1946 |
msgid "Repeat"
|
1947 |
msgstr ""
|
1948 |
|
1949 |
-
#: public/admin/box_time_and_date.php:
|
1950 |
msgid "Exclude"
|
1951 |
msgstr ""
|
1952 |
|
1953 |
-
#: public/admin/box_time_and_date.php:
|
1954 |
msgid "Choose a rule for exclusion"
|
1955 |
msgstr ""
|
1956 |
|
1957 |
-
#: public/admin/box_time_and_date.php:
|
1958 |
msgid "Exclude dates"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
-
#: public/admin/box_time_and_date.php:
|
1962 |
-
msgid "
|
1963 |
msgstr ""
|
1964 |
|
1965 |
-
#: public/admin/box_time_and_date.php:
|
1966 |
msgid "Choose specific dates to exclude"
|
1967 |
msgstr ""
|
1968 |
|
@@ -1976,10 +2064,6 @@ msgid ""
|
|
1976 |
"\"_blank\">Timely</a>"
|
1977 |
msgstr ""
|
1978 |
|
1979 |
-
#: public/admin/calendar_tasks.php:13
|
1980 |
-
msgid "Post Your Event"
|
1981 |
-
msgstr ""
|
1982 |
-
|
1983 |
#: public/admin/calendar_tasks.php:16
|
1984 |
msgid "Add a new event to the calendar."
|
1985 |
msgstr ""
|
@@ -2306,91 +2390,86 @@ msgstr ""
|
|
2306 |
|
2307 |
#: public/themes-ai1ec/umbra/less/user_variables.php:161
|
2308 |
#: public/themes-ai1ec/vortex/less/user_variables.php:161
|
2309 |
-
msgid "
|
2310 |
msgstr ""
|
2311 |
|
2312 |
#: public/themes-ai1ec/umbra/less/user_variables.php:167
|
2313 |
#: public/themes-ai1ec/vortex/less/user_variables.php:167
|
2314 |
-
msgid "
|
2315 |
msgstr ""
|
2316 |
|
2317 |
#: public/themes-ai1ec/umbra/less/user_variables.php:173
|
2318 |
#: public/themes-ai1ec/vortex/less/user_variables.php:173
|
2319 |
-
msgid "
|
2320 |
msgstr ""
|
2321 |
|
2322 |
#: public/themes-ai1ec/umbra/less/user_variables.php:179
|
2323 |
#: public/themes-ai1ec/vortex/less/user_variables.php:179
|
2324 |
-
msgid "Event
|
2325 |
msgstr ""
|
2326 |
|
2327 |
#: public/themes-ai1ec/umbra/less/user_variables.php:185
|
2328 |
#: public/themes-ai1ec/vortex/less/user_variables.php:185
|
2329 |
-
msgid "Event default color"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
#: public/themes-ai1ec/umbra/less/user_variables.php:191
|
2333 |
#: public/themes-ai1ec/vortex/less/user_variables.php:191
|
2334 |
-
msgid "
|
2335 |
msgstr ""
|
2336 |
|
2337 |
#: public/themes-ai1ec/umbra/less/user_variables.php:197
|
2338 |
#: public/themes-ai1ec/vortex/less/user_variables.php:197
|
2339 |
-
msgid "All-day/multi-day event stub text"
|
2340 |
msgstr ""
|
2341 |
|
2342 |
#: public/themes-ai1ec/umbra/less/user_variables.php:203
|
2343 |
#: public/themes-ai1ec/vortex/less/user_variables.php:203
|
2344 |
-
msgid "
|
2345 |
msgstr ""
|
2346 |
|
2347 |
#: public/themes-ai1ec/umbra/less/user_variables.php:209
|
2348 |
#: public/themes-ai1ec/vortex/less/user_variables.php:209
|
2349 |
-
msgid "Event
|
2350 |
msgstr ""
|
2351 |
|
2352 |
#: public/themes-ai1ec/umbra/less/user_variables.php:215
|
2353 |
#: public/themes-ai1ec/vortex/less/user_variables.php:215
|
2354 |
-
msgid "Event background"
|
2355 |
msgstr ""
|
2356 |
|
2357 |
#: public/themes-ai1ec/umbra/less/user_variables.php:221
|
2358 |
#: public/themes-ai1ec/vortex/less/user_variables.php:221
|
2359 |
-
msgid "Event
|
2360 |
msgstr ""
|
2361 |
|
2362 |
#: public/themes-ai1ec/umbra/less/user_variables.php:227
|
2363 |
#: public/themes-ai1ec/vortex/less/user_variables.php:227
|
2364 |
-
msgid "
|
2365 |
msgstr ""
|
2366 |
|
2367 |
#: public/themes-ai1ec/umbra/less/user_variables.php:233
|
2368 |
#: public/themes-ai1ec/vortex/less/user_variables.php:233
|
2369 |
-
msgid "
|
2370 |
msgstr ""
|
2371 |
|
2372 |
#: public/themes-ai1ec/umbra/less/user_variables.php:239
|
2373 |
#: public/themes-ai1ec/vortex/less/user_variables.php:239
|
2374 |
-
msgid "
|
2375 |
msgstr ""
|
2376 |
|
2377 |
#: public/themes-ai1ec/umbra/less/user_variables.php:245
|
2378 |
#: public/themes-ai1ec/vortex/less/user_variables.php:245
|
2379 |
-
msgid "Date label
|
2380 |
msgstr ""
|
2381 |
|
2382 |
#: public/themes-ai1ec/umbra/less/user_variables.php:251
|
2383 |
#: public/themes-ai1ec/vortex/less/user_variables.php:251
|
2384 |
-
msgid "Date
|
2385 |
msgstr ""
|
2386 |
|
2387 |
#: public/themes-ai1ec/umbra/less/user_variables.php:257
|
2388 |
#: public/themes-ai1ec/vortex/less/user_variables.php:257
|
2389 |
-
msgid "Date background"
|
2390 |
-
msgstr ""
|
2391 |
-
|
2392 |
-
#: public/themes-ai1ec/umbra/less/user_variables.php:263
|
2393 |
-
#: public/themes-ai1ec/vortex/less/user_variables.php:263
|
2394 |
msgid "Today background"
|
2395 |
msgstr ""
|
2396 |
|
@@ -2398,9 +2477,9 @@ msgstr ""
|
|
2398 |
msgid "All-in-One Event Calendar by Time.ly"
|
2399 |
msgstr ""
|
2400 |
|
2401 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.
|
2402 |
#. Plugin URI of the plugin/theme
|
2403 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.
|
2404 |
#. Author URI of the plugin/theme
|
2405 |
msgid "http://time.ly/"
|
2406 |
msgstr ""
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2014-08-05 15:44:42+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
24 |
msgid "Licences"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: app/controller/front.php:295
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
31 |
"theme manually."
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: app/controller/front.php:299 app/view/admin/theme-switching.php:54
|
35 |
#: app/view/admin/theme-switching.php:55
|
36 |
msgid "Calendar Themes"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: app/controller/front.php:847
|
40 |
msgid ""
|
41 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
42 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
43 |
"<br>Following errors were found:<br>%s"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: app/controller/javascript.php:381
|
47 |
msgid "This feed is already being imported."
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: app/controller/javascript.php:384
|
51 |
msgid "Please enter a valid iCalendar URL."
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: app/controller/javascript.php:387
|
55 |
msgid "Please enter a valid email address."
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: app/controller/javascript.php:389
|
59 |
msgid "Choose Image"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: app/controller/javascript.php:392
|
63 |
msgid "The value you have entered is not a valid CSS length."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: app/controller/javascript.php:395
|
67 |
msgid ""
|
68 |
"Are you sure you want to reset your theme options to their default values?"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: app/controller/javascript.php:398
|
72 |
msgid ""
|
73 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
74 |
"-90."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: app/controller/javascript.php:401
|
78 |
msgid ""
|
79 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
80 |
"and -180."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: app/controller/javascript.php:404
|
84 |
msgid ""
|
85 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
86 |
"required field."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: app/controller/javascript.php:407
|
90 |
msgid ""
|
91 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
92 |
"required field."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: app/controller/javascript.php:410
|
96 |
msgid ""
|
97 |
+
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
98 |
+
"<b>External URL</b> seems to be invalid."
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: app/controller/javascript.php:413
|
102 |
+
msgid ""
|
103 |
+
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
104 |
+
"Tickets URL</b> seems to be invalid."
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: app/controller/javascript.php:416
|
108 |
+
msgid ""
|
109 |
+
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
110 |
msgstr ""
|
111 |
|
112 |
#: app/model/event/parent.php:186
|
117 |
msgid "Base Event"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: app/model/settings.php:342
|
121 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
122 |
msgid "Calendar page"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: app/model/settings.php:352
|
126 |
msgid "Week starts on"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: app/model/settings.php:365
|
130 |
msgid "Available views"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: app/model/settings.php:373
|
134 |
msgid "Agenda"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: app/model/settings.php:380
|
138 |
msgid "Day"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: app/model/settings.php:387
|
142 |
msgid "Month"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: app/model/settings.php:394
|
146 |
msgid "Week"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: app/model/settings.php:404
|
150 |
msgid "Timezone"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: app/model/settings.php:418
|
154 |
msgid "Preselected calendar filters"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: app/model/settings.php:419
|
158 |
msgid ""
|
159 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
160 |
"selection."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: app/model/settings.php:434
|
164 |
msgid "Default calendar start date (optional)"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: app/model/settings.php:445
|
168 |
msgid "Agenda pages show at most"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: app/model/settings.php:458
|
172 |
msgid "Week/Day view starts at"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: app/model/settings.php:471
|
176 |
msgid "Week/Day view ends at"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: app/model/settings.php:484
|
180 |
msgid "<strong>Word-wrap event stubs</strong> in Month view"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: app/model/settings.php:487
|
184 |
msgid "Only applies to events that span a single day."
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: app/model/settings.php:499
|
188 |
msgid ""
|
189 |
"In <span class=\"ai1ec-tooltip-toggle\"\n"
|
190 |
"\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
|
193 |
"\t\t\t\t\t\tfrom last day shown</strong>"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: app/model/settings.php:515
|
197 |
msgid "Keep all events <strong>expanded</strong> in Agenda view"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: app/model/settings.php:527
|
201 |
msgid "<strong>Show year</strong> in calendar date labels"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: app/model/settings.php:539
|
205 |
msgid "<strong>Show location in event titles</strong> in calendar views"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: app/model/settings.php:551
|
209 |
msgid "<strong>Exclude</strong> events from search results"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: app/model/settings.php:563
|
213 |
msgid ""
|
214 |
"Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
|
215 |
"calendar and single event views "
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: app/model/settings.php:575
|
219 |
msgid " Hide <strong>Google Maps</strong> until clicked"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: app/model/settings.php:587
|
223 |
+
msgid ""
|
224 |
+
" <strong>Affix filter menu</strong> to top of window when it scrolls out of "
|
225 |
+
"view"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: app/model/settings.php:599
|
229 |
+
msgid "Offset affixed filter bar vertically by"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: app/model/settings.php:614
|
233 |
+
msgid "Wide screens only (≥ 1200px)"
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: app/model/settings.php:629
|
237 |
+
msgid "Tablets only (< 980px)"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: app/model/settings.php:644
|
241 |
+
msgid "Phones only (< 768px)"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: app/model/settings.php:657
|
245 |
msgid " <strong>Hide featured image</strong> from event details page"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: app/model/settings.php:660
|
249 |
msgid ""
|
250 |
"Select this option if your theme already displays each post's featured image."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: app/model/settings.php:671
|
254 |
msgid "Input dates in this format"
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: app/model/settings.php:676
|
258 |
msgid "Default (d/m/yyyy)"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: app/model/settings.php:680
|
262 |
msgid "US (m/d/yyyy)"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: app/model/settings.php:684
|
266 |
msgid "ISO 8601 (yyyy-m-d)"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: app/model/settings.php:688
|
270 |
msgid "Dotted (m.d.yyyy)"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: app/model/settings.php:700
|
274 |
msgid " Use <strong>24h time</strong> in time pickers"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: app/model/settings.php:711
|
278 |
msgid "<strong>Disable address autocomplete</strong> function"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: app/model/settings.php:722
|
282 |
msgid ""
|
283 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
284 |
"address autocomplete function "
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: app/model/settings.php:738
|
|
|
|
|
|
|
|
|
288 |
msgid ""
|
289 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
290 |
"privileged users"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: app/model/settings.php:741
|
294 |
msgid ""
|
295 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
296 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
297 |
"strong>."
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: app/model/settings.php:762
|
301 |
msgid "Move calendar into this DOM element"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: app/model/settings.php:764
|
305 |
msgid ""
|
306 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
307 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
315 |
"\t\t\t\t\t\tby the calendar."
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: app/model/settings.php:783
|
319 |
msgid ""
|
320 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
321 |
"multiple calendar output"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: app/model/settings.php:786
|
325 |
msgid ""
|
326 |
"Try enabling this option if your calendar does not appear on the calendar "
|
327 |
"page. It is needed for compatibility with a small number of themes that call "
|
328 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: app/model/settings.php:798
|
332 |
msgid "Disable <strong>gzip</strong> compression."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: app/model/settings.php:801
|
336 |
msgid ""
|
337 |
+
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
338 |
+
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
339 |
+
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: app/model/settings.php:813
|
343 |
+
msgid ""
|
344 |
+
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
345 |
+
"cache is unavailable."
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: app/model/settings.php:816
|
349 |
+
msgid ""
|
350 |
+
"Use this option if file cache is unavailable and you would prefer to serve "
|
351 |
+
"CSS as a link rather than have it output inline."
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: app/model/settings.php:828
|
355 |
msgid "Current <strong>robots.txt</strong> on this site"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: app/model/settings.php:832
|
359 |
msgid ""
|
360 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
361 |
"or\n"
|
369 |
"your root WordPress directory."
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: app/model/settings.php:849
|
373 |
msgid ""
|
374 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
375 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: app/model/settings.php:872
|
379 |
msgid "Templates cache improves site performance"
|
380 |
msgstr ""
|
381 |
|
383 |
msgid "Event Details"
|
384 |
msgstr ""
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
#: app/view/admin/all-events.php:16
|
387 |
msgid "Author"
|
388 |
msgstr ""
|
555 |
msgid "All-in-One Event Calendar: Settings"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: app/view/admin/settings.php:63 app/view/admin/settings.php:64
|
559 |
#: lib/date/timezone.php:366
|
560 |
msgid "Settings"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: app/view/admin/settings.php:84
|
564 |
msgctxt "meta box"
|
565 |
msgid "General Settings"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: app/view/admin/settings.php:93
|
569 |
msgctxt "meta box"
|
570 |
msgid "Timely"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: app/view/admin/settings.php:139
|
574 |
msgid "Viewing Events"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: app/view/admin/settings.php:142
|
|
|
|
|
|
|
|
|
578 |
msgid "Adding/Editing Events"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: app/view/admin/settings.php:145
|
582 |
msgid "Advanced"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: app/view/admin/settings.php:147
|
586 |
msgid "Advanced Settings"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: app/view/admin/settings.php:148
|
590 |
+
msgid "Shortcodes"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: app/view/admin/settings.php:149
|
594 |
msgid "Email Templates"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: app/view/admin/settings.php:150
|
598 |
msgid "External Services"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: app/view/admin/settings.php:151
|
602 |
msgid "Cache Report"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: app/view/admin/settings.php:169
|
606 |
#: public/admin/plugins/ics/display_feeds.php:24
|
607 |
msgid "Save Settings"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: app/view/admin/settings.php:176
|
611 |
msgid ""
|
612 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
613 |
msgstr ""
|
625 |
msgid "Calendar Theme Options"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: app/view/admin/theme-options.php:133
|
629 |
msgid "General"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: app/view/admin/theme-options.php:136
|
633 |
msgid "Tables"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: app/view/admin/theme-options.php:139
|
637 |
msgid "Buttons"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: app/view/admin/theme-options.php:142
|
641 |
msgid "Forms"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: app/view/admin/theme-options.php:145
|
645 |
msgid "Calendar general"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: app/view/admin/theme-options.php:148
|
649 |
msgid "Month/week/day view"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: app/view/admin/theme-options.php:151
|
653 |
msgid "Agenda view"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: app/view/admin/theme-options.php:169
|
657 |
msgid "Save Options"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: app/view/admin/theme-options.php:177
|
661 |
msgid "Reset to Defaults"
|
662 |
msgstr ""
|
663 |
|
665 |
msgid "All-in-One Event Calendar: Themes"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: app/view/calendar/page.php:50
|
669 |
msgid ""
|
670 |
"There was an error loading calendar. Please contact site administrator and "
|
671 |
"inform him to configure calendar views."
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: app/view/calendar/page.php:186
|
675 |
msgid "Subscribe to filtered calendar"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: app/view/calendar/page.php:187
|
679 |
msgid "Subscribe"
|
680 |
msgstr ""
|
681 |
|
739 |
msgid "Tags"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: app/view/calendar/view/agenda.php:109
|
743 |
msgid "Collapse All"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: app/view/calendar/view/agenda.php:110
|
747 |
msgid "Expand All"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: app/view/calendar/view/agenda.php:133
|
751 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:30
|
752 |
msgid "There are no upcoming events to display at this time."
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: app/view/calendar/view/agenda.php:134 app/view/calendar/widget.php:273
|
756 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:116
|
757 |
msgid "Edit"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: app/view/calendar/view/agenda.php:135
|
761 |
msgid "Read more"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: app/view/calendar/view/agenda.php:136
|
765 |
msgid "Categories:"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: app/view/calendar/view/agenda.php:137 lib/theme/list.php:323
|
769 |
#: public/admin/themes.php:29
|
770 |
msgid "Tags:"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: app/view/calendar/view/agenda.php:138 app/view/calendar/view/month.php:78
|
774 |
+
#: app/view/calendar/view/oneday.php:90 app/view/calendar/view/week.php:101
|
775 |
#: app/view/calendar/widget.php:274
|
776 |
+
#: cache/twig/85/1e/7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php:153
|
777 |
msgid "@ %s"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: app/view/calendar/view/oneday.php:71 app/view/calendar/view/week.php:63
|
781 |
msgid "g a"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: app/view/calendar/view/oneday.php:87 app/view/calendar/view/week.php:98
|
785 |
msgid "Reveal full day"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: app/view/calendar/view/oneday.php:88 app/view/calendar/view/week.php:99
|
789 |
msgid "All-day"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: app/view/calendar/view/oneday.php:89 app/view/calendar/view/week.php:100
|
793 |
msgid "Now:"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: app/view/calendar/view/week.php:57
|
797 |
msgid "Week of %s"
|
798 |
msgstr ""
|
799 |
|
943 |
msgid "Tickets"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: app/view/event/ticket.php:68
|
947 |
msgid "Email"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: app/view/event/ticket.php:78
|
951 |
msgid "Event website"
|
952 |
msgstr ""
|
953 |
|
1071 |
msgstr ""
|
1072 |
|
1073 |
#: cache/twig/31/41/6a842b873aa15c2afe2fd664e027ecf1ba867877537f21b06052271bb848.php:133
|
1074 |
+
#: lib/html/element/setting/html.php:65
|
1075 |
msgid "Warning:"
|
1076 |
msgstr ""
|
1077 |
|
1086 |
msgid "Dismiss"
|
1087 |
msgstr ""
|
1088 |
|
1089 |
+
#: cache/twig/a0/43/95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php:31
|
1090 |
+
msgid "Add Your Feed"
|
1091 |
+
msgstr ""
|
1092 |
+
|
1093 |
+
#: cache/twig/a0/43/95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php:57
|
1094 |
+
#: public/admin/calendar_tasks.php:13
|
1095 |
+
msgid "Post Your Event"
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
#: lib/calendar-feed/ics.php:38
|
1099 |
msgid "ICS"
|
1100 |
msgstr ""
|
1103 |
msgid "Another import process in progress. Please try again later."
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: lib/calendar-feed/ics.php:169
|
1107 |
msgid ""
|
1108 |
+
"A system error has prevented calendar data from being fetched. Something is "
|
1109 |
+
"preventing the plugin from functioning correctly. This message should "
|
1110 |
+
"provide a clue: %s"
|
|
|
1111 |
msgstr ""
|
1112 |
|
1113 |
+
#: lib/calendar-feed/ics.php:176
|
1114 |
+
msgid ""
|
1115 |
+
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1116 |
+
"iCalendar resource, this is likely the result of a temporary server error "
|
1117 |
+
"and time may resolve this issue"
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: lib/calendar-feed/ics.php:186
|
1121 |
msgid "No events were found"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: lib/calendar-feed/ics.php:195
|
1125 |
msgid "Imported %s event"
|
1126 |
msgid_plural "Imported %s events"
|
1127 |
msgstr[0] ""
|
1128 |
msgstr[1] ""
|
1129 |
|
1130 |
+
#: lib/calendar-feed/ics.php:201 lib/calendar-feed/ics.php:640
|
1131 |
msgid "Invalid ICS feed ID"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: lib/calendar-feed/ics.php:343
|
1135 |
msgid "Categories (optional)"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: lib/calendar-feed/ics.php:360
|
1139 |
msgid ""
|
1140 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: lib/calendar-feed/ics.php:366
|
1144 |
msgid "Removing ICS Feed"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
+
#: lib/calendar-feed/ics.php:369
|
1148 |
msgid "Keep Events"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
+
#: lib/calendar-feed/ics.php:372
|
1152 |
msgid "Remove Events"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
+
#: lib/calendar-feed/ics.php:632
|
1156 |
msgid "Deleted %d events"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: lib/calendar-feed/ics.php:667
|
1160 |
msgid "Feed deleted"
|
1161 |
msgstr ""
|
1162 |
|
1186 |
msgid "Clone to Draft"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: lib/command/clone.php:181
|
1190 |
msgid ""
|
1191 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1192 |
"cloned event</a></p>"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
+
#: lib/css/frontend.php:81
|
1196 |
+
msgid ""
|
1197 |
+
"Cache directories, <code>%s</code>, are not writable. Your calendar will "
|
1198 |
+
"perform more slowly until you make this directory writable by the web server."
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: lib/css/frontend.php:237
|
1202 |
msgid ""
|
1203 |
"The LESS file compiled correctly but there was an error while saving the "
|
1204 |
"generated CSS to persistence."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
+
#: lib/css/frontend.php:243
|
1208 |
msgid ""
|
1209 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1210 |
"returned was: <em>%s</em></p>"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
+
#: lib/css/frontend.php:271
|
1214 |
msgid ""
|
1215 |
"Theme options were successfully reset to their default values. <a "
|
1216 |
"href='%s'>Visit site</a>"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: lib/css/frontend.php:278
|
1220 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: lib/css/frontend.php:314
|
1224 |
+
msgid ""
|
1225 |
+
"Your CSS is being compiled on every request, which causes your calendar to "
|
1226 |
+
"perform slowly. The following error occurred: %s"
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
#: lib/database/applicator.php:182
|
1230 |
msgid "Date columns in table %s have different types."
|
1231 |
msgstr ""
|
1241 |
msgid "Error encountered: %s"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: lib/date/system.php:177
|
1245 |
msgid "GMT%+d:%02d"
|
1246 |
msgstr ""
|
1247 |
|
1259 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: lib/date/timezone.php:475
|
1263 |
msgid "Manual Offset"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: lib/date/timezone.php:478
|
1267 |
msgid "Choose your timezone"
|
1268 |
msgstr ""
|
1269 |
|
1297 |
"href=\"%s\">click here</a>.</p>"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
+
#: lib/factory/html.php:127
|
1301 |
msgid "Choose a date using calendar"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: lib/factory/html.php:269
|
1305 |
msgid "Tags (optional)"
|
1306 |
msgstr ""
|
1307 |
|
1341 |
msgid "Default"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: lib/html/element/setting/enabled-views.php:24
|
1345 |
+
msgid "Desktop"
|
1346 |
+
msgstr ""
|
1347 |
+
|
1348 |
+
#: lib/html/element/setting/enabled-views.php:25
|
1349 |
+
msgid "Mobile"
|
1350 |
+
msgstr ""
|
1351 |
+
|
1352 |
#: lib/html/element/setting/html.php:37
|
1353 |
msgid "Embed the calendar using a shortcode"
|
1354 |
msgstr ""
|
1413 |
msgid "Filter by event tag names/slugs (separate names by comma):"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
+
#: lib/html/element/setting/html.php:64
|
1417 |
+
msgid "Limit number of events per page:"
|
1418 |
+
msgstr ""
|
1419 |
+
|
1420 |
+
#: lib/html/element/setting/html.php:66
|
1421 |
msgid ""
|
1422 |
"It is currently not supported to embed more than one calendar in the same "
|
1423 |
"page. Do not attempt to embed the calendar via shortcode in a page that "
|
1491 |
msgstr ""
|
1492 |
|
1493 |
#: lib/post/custom-type.php:55
|
1494 |
+
msgid "event"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
#: lib/post/custom-type.php:85
|
1623 |
msgid "forever"
|
1624 |
msgstr ""
|
1625 |
|
1626 |
+
#: lib/robots/helper.php:71
|
1627 |
+
msgid ""
|
1628 |
+
"<strong>ERROR:</strong> There was an error connecting to the server, Please "
|
1629 |
+
"verify the settings are correct."
|
1630 |
+
msgstr ""
|
1631 |
+
|
1632 |
+
#: lib/robots/helper.php:105
|
1633 |
+
msgid ""
|
1634 |
+
"<strong>ERROR:</strong> There was an error storing <strong>robots.txt</"
|
1635 |
+
"strong> to the server, the file could not be written."
|
1636 |
+
msgstr ""
|
1637 |
+
|
1638 |
#: lib/theme/list.php:152
|
1639 |
msgid ""
|
1640 |
"You only have one theme enabled for this site right now. Visit the Network "
|
1687 |
msgid "All of this theme’s files are located in <code>%2$s</code>."
|
1688 |
msgstr ""
|
1689 |
|
1690 |
+
#: lib/theme/loader.php:300
|
1691 |
msgid "We couldn't find a suitable loader for filename with extension '%s'"
|
1692 |
msgstr ""
|
1693 |
|
1694 |
+
#: lib/theme/loader.php:403 lib/twig/environment.php:31
|
1695 |
msgid ""
|
1696 |
"We detected that your cache directory (%s) is not writable. This will make "
|
1697 |
"your calendar slow. Please contact your web host or server administrator to "
|
1777 |
msgid "Organizer contact info"
|
1778 |
msgstr ""
|
1779 |
|
1780 |
+
#: public/admin/box_event_contact.php:17
|
1781 |
msgid "Contact name:"
|
1782 |
msgstr ""
|
1783 |
|
1784 |
+
#: public/admin/box_event_contact.php:30
|
1785 |
msgid "Phone:"
|
1786 |
msgstr ""
|
1787 |
|
1788 |
+
#: public/admin/box_event_contact.php:43
|
1789 |
msgid "E-mail:"
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: public/admin/box_event_contact.php:56
|
1793 |
msgid "External URL:"
|
1794 |
msgstr ""
|
1795 |
|
1797 |
msgid "Event cost and Tickets"
|
1798 |
msgstr ""
|
1799 |
|
1800 |
+
#: public/admin/box_event_cost.php:17
|
1801 |
msgid "Cost"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: public/admin/box_event_cost.php:35
|
1805 |
msgid "Free event"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: public/admin/box_event_cost.php:43
|
1809 |
msgid "Registration URL:"
|
1810 |
msgstr ""
|
1811 |
|
1812 |
+
#: public/admin/box_event_cost.php:44
|
1813 |
msgid "Buy Tickets URL:"
|
1814 |
msgstr ""
|
1815 |
|
2018 |
msgid "Start date / time"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
+
#: public/admin/box_time_and_date.php:59
|
2022 |
+
msgid "End date / time"
|
2023 |
msgstr ""
|
2024 |
|
2025 |
+
#: public/admin/box_time_and_date.php:76
|
2026 |
+
msgid "Time zone"
|
2027 |
+
msgstr ""
|
2028 |
+
|
2029 |
+
#: public/admin/box_time_and_date.php:81
|
2030 |
+
msgid "Choose your time zone"
|
2031 |
msgstr ""
|
2032 |
|
2033 |
+
#: public/admin/box_time_and_date.php:108
|
2034 |
msgid "Repeat"
|
2035 |
msgstr ""
|
2036 |
|
2037 |
+
#: public/admin/box_time_and_date.php:127
|
2038 |
msgid "Exclude"
|
2039 |
msgstr ""
|
2040 |
|
2041 |
+
#: public/admin/box_time_and_date.php:136
|
2042 |
msgid "Choose a rule for exclusion"
|
2043 |
msgstr ""
|
2044 |
|
2045 |
+
#: public/admin/box_time_and_date.php:143
|
2046 |
msgid "Exclude dates"
|
2047 |
msgstr ""
|
2048 |
|
2049 |
+
#: public/admin/box_time_and_date.php:149
|
2050 |
+
msgid "Choose dates"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
+
#: public/admin/box_time_and_date.php:156
|
2054 |
msgid "Choose specific dates to exclude"
|
2055 |
msgstr ""
|
2056 |
|
2064 |
"\"_blank\">Timely</a>"
|
2065 |
msgstr ""
|
2066 |
|
|
|
|
|
|
|
|
|
2067 |
#: public/admin/calendar_tasks.php:16
|
2068 |
msgid "Add a new event to the calendar."
|
2069 |
msgstr ""
|
2390 |
|
2391 |
#: public/themes-ai1ec/umbra/less/user_variables.php:161
|
2392 |
#: public/themes-ai1ec/vortex/less/user_variables.php:161
|
2393 |
+
msgid "Today color"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
#: public/themes-ai1ec/umbra/less/user_variables.php:167
|
2397 |
#: public/themes-ai1ec/vortex/less/user_variables.php:167
|
2398 |
+
msgid "All-day badge color"
|
2399 |
msgstr ""
|
2400 |
|
2401 |
#: public/themes-ai1ec/umbra/less/user_variables.php:173
|
2402 |
#: public/themes-ai1ec/vortex/less/user_variables.php:173
|
2403 |
+
msgid "Event image shadow"
|
2404 |
msgstr ""
|
2405 |
|
2406 |
#: public/themes-ai1ec/umbra/less/user_variables.php:179
|
2407 |
#: public/themes-ai1ec/vortex/less/user_variables.php:179
|
2408 |
+
msgid "Event default color"
|
2409 |
msgstr ""
|
2410 |
|
2411 |
#: public/themes-ai1ec/umbra/less/user_variables.php:185
|
2412 |
#: public/themes-ai1ec/vortex/less/user_variables.php:185
|
2413 |
+
msgid "Event default color (hover)"
|
2414 |
msgstr ""
|
2415 |
|
2416 |
#: public/themes-ai1ec/umbra/less/user_variables.php:191
|
2417 |
#: public/themes-ai1ec/vortex/less/user_variables.php:191
|
2418 |
+
msgid "All-day/multi-day event stub text"
|
2419 |
msgstr ""
|
2420 |
|
2421 |
#: public/themes-ai1ec/umbra/less/user_variables.php:197
|
2422 |
#: public/themes-ai1ec/vortex/less/user_variables.php:197
|
2423 |
+
msgid "All-day/multi-day event stub text shadow"
|
2424 |
msgstr ""
|
2425 |
|
2426 |
#: public/themes-ai1ec/umbra/less/user_variables.php:203
|
2427 |
#: public/themes-ai1ec/vortex/less/user_variables.php:203
|
2428 |
+
msgid "Event border"
|
2429 |
msgstr ""
|
2430 |
|
2431 |
#: public/themes-ai1ec/umbra/less/user_variables.php:209
|
2432 |
#: public/themes-ai1ec/vortex/less/user_variables.php:209
|
2433 |
+
msgid "Event background"
|
2434 |
msgstr ""
|
2435 |
|
2436 |
#: public/themes-ai1ec/umbra/less/user_variables.php:215
|
2437 |
#: public/themes-ai1ec/vortex/less/user_variables.php:215
|
2438 |
+
msgid "Event time background"
|
2439 |
msgstr ""
|
2440 |
|
2441 |
#: public/themes-ai1ec/umbra/less/user_variables.php:221
|
2442 |
#: public/themes-ai1ec/vortex/less/user_variables.php:221
|
2443 |
+
msgid "Event text"
|
2444 |
msgstr ""
|
2445 |
|
2446 |
#: public/themes-ai1ec/umbra/less/user_variables.php:227
|
2447 |
#: public/themes-ai1ec/vortex/less/user_variables.php:227
|
2448 |
+
msgid "Month view date background"
|
2449 |
msgstr ""
|
2450 |
|
2451 |
#: public/themes-ai1ec/umbra/less/user_variables.php:233
|
2452 |
#: public/themes-ai1ec/vortex/less/user_variables.php:233
|
2453 |
+
msgid "Week/day view now marker"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
#: public/themes-ai1ec/umbra/less/user_variables.php:239
|
2457 |
#: public/themes-ai1ec/vortex/less/user_variables.php:239
|
2458 |
+
msgid "Date label accent color"
|
2459 |
msgstr ""
|
2460 |
|
2461 |
#: public/themes-ai1ec/umbra/less/user_variables.php:245
|
2462 |
#: public/themes-ai1ec/vortex/less/user_variables.php:245
|
2463 |
+
msgid "Date label background"
|
2464 |
msgstr ""
|
2465 |
|
2466 |
#: public/themes-ai1ec/umbra/less/user_variables.php:251
|
2467 |
#: public/themes-ai1ec/vortex/less/user_variables.php:251
|
2468 |
+
msgid "Date background"
|
2469 |
msgstr ""
|
2470 |
|
2471 |
#: public/themes-ai1ec/umbra/less/user_variables.php:257
|
2472 |
#: public/themes-ai1ec/vortex/less/user_variables.php:257
|
|
|
|
|
|
|
|
|
|
|
2473 |
msgid "Today background"
|
2474 |
msgstr ""
|
2475 |
|
2477 |
msgid "All-in-One Event Calendar by Time.ly"
|
2478 |
msgstr ""
|
2479 |
|
2480 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.1) #-#-#-#-#
|
2481 |
#. Plugin URI of the plugin/theme
|
2482 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.1) #-#-#-#-#
|
2483 |
#. Author URI of the plugin/theme
|
2484 |
msgid "http://time.ly/"
|
2485 |
msgstr ""
|
lib/acl/aco.php
CHANGED
@@ -55,8 +55,12 @@ class Ai1ec_Acl_Aco {
|
|
55 |
*
|
56 |
* @return boolean
|
57 |
*/
|
58 |
-
public function is_our_post_type( $
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
}
|
55 |
*
|
56 |
* @return boolean
|
57 |
*/
|
58 |
+
public function is_our_post_type( $post_to_check = null ) {
|
59 |
+
if ( null === $post_to_check ) {
|
60 |
+
global $post;
|
61 |
+
$post_to_check = $post;
|
62 |
+
}
|
63 |
+
return get_post_type( $post_to_check ) === AI1EC_POST_TYPE;
|
64 |
}
|
65 |
|
66 |
}
|
lib/bootstrap/loader-map.php
CHANGED
@@ -212,6 +212,13 @@
|
|
212 |
'i' => 'g',
|
213 |
'r' => 'y',
|
214 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
'Ai1ec_Command_Disable_Gzip' =>
|
216 |
array (
|
217 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'disable-gzip.php',
|
@@ -268,11 +275,18 @@
|
|
268 |
'i' => 'g',
|
269 |
'r' => 'y',
|
270 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
'Ai1ec_Compatibility_OutputBuffer' =>
|
272 |
array (
|
273 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'ob.php',
|
274 |
'c' => 'Ai1ec_Compatibility_OutputBuffer',
|
275 |
'i' => 'g',
|
|
|
276 |
),
|
277 |
'Ai1ec_Compatibility_Xguard' =>
|
278 |
array (
|
@@ -474,6 +488,12 @@
|
|
474 |
'i' => 'n',
|
475 |
'r' => 'y',
|
476 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
477 |
'Ai1ec_Event_Creating' =>
|
478 |
array (
|
479 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'creating.php',
|
@@ -1094,6 +1114,13 @@
|
|
1094 |
'i' => 'n',
|
1095 |
'r' => 'y',
|
1096 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
'Ai1ec_Rewrite_Helper' =>
|
1098 |
array (
|
1099 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'rewrite' . DIRECTORY_SEPARATOR . 'helper.php',
|
@@ -1232,6 +1259,12 @@
|
|
1232 |
'c' => 'Ai1ec_Twig_Environment',
|
1233 |
'i' => 'g',
|
1234 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
1235 |
'Ai1ec_Uri' =>
|
1236 |
array (
|
1237 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'routing' . DIRECTORY_SEPARATOR . 'uri.php',
|
@@ -2479,6 +2512,12 @@
|
|
2479 |
'c' => '__TwigTemplate_0390aeab35788b09647b9a02c8610d09925aabc8c355462d95b2a35074e72577',
|
2480 |
'i' => 'g',
|
2481 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2482 |
'__TwigTemplate_0d04fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb' =>
|
2483 |
array (
|
2484 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '0d' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . 'fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb.php',
|
@@ -2521,6 +2560,24 @@
|
|
2521 |
'c' => '__TwigTemplate_3f6c8cdc781204b2b1401ef907fcddb9c3cb7cd72d4b0b8f5abf450db9eaf16a',
|
2522 |
'i' => 'g',
|
2523 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2524 |
'__TwigTemplate_5528bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40' =>
|
2525 |
array (
|
2526 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '55' . DIRECTORY_SEPARATOR . '28' . DIRECTORY_SEPARATOR . 'bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40.php',
|
@@ -2533,36 +2590,114 @@
|
|
2533 |
'c' => '__TwigTemplate_5fd54eb14d711093fc6d960237fd8b483db342d780035d2e2e9c6e5632cde5b4',
|
2534 |
'i' => 'g',
|
2535 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2536 |
'__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9' =>
|
2537 |
array (
|
2538 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8c' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9.php',
|
2539 |
'c' => '__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9',
|
2540 |
'i' => 'g',
|
2541 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2542 |
'__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69' =>
|
2543 |
array (
|
2544 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69.php',
|
2545 |
'c' => '__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69',
|
2546 |
'i' => 'g',
|
2547 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2548 |
'__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758' =>
|
2549 |
array (
|
2550 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a6' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758.php',
|
2551 |
'c' => '__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758',
|
2552 |
'i' => 'g',
|
2553 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2554 |
'__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3' =>
|
2555 |
array (
|
2556 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . 'f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3.php',
|
2557 |
'c' => '__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3',
|
2558 |
'i' => 'g',
|
2559 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2560 |
'__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861' =>
|
2561 |
array (
|
2562 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861.php',
|
2563 |
'c' => '__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861',
|
2564 |
'i' => 'g',
|
2565 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2566 |
'__TwigTemplate_c3efa6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838' =>
|
2567 |
array (
|
2568 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c3' . DIRECTORY_SEPARATOR . 'ef' . DIRECTORY_SEPARATOR . 'a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838.php',
|
@@ -2575,18 +2710,36 @@
|
|
2575 |
'c' => '__TwigTemplate_ca440aa661b1c953233505b2506f7ca2ef971ece252f191fef784ea217b3981b',
|
2576 |
'i' => 'g',
|
2577 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2578 |
'__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201' =>
|
2579 |
array (
|
2580 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ce' . DIRECTORY_SEPARATOR . '72' . DIRECTORY_SEPARATOR . '4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201.php',
|
2581 |
'c' => '__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201',
|
2582 |
'i' => 'g',
|
2583 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2584 |
'__TwigTemplate_edbe11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967' =>
|
2585 |
array (
|
2586 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ed' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967.php',
|
2587 |
'c' => '__TwigTemplate_edbe11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967',
|
2588 |
'i' => 'g',
|
2589 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2590 |
'__TwigTemplate_f8b8d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a' =>
|
2591 |
array (
|
2592 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'd195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a.php',
|
@@ -2757,6 +2910,13 @@
|
|
2757 |
'i' => 'g',
|
2758 |
'r' => 'y',
|
2759 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2760 |
'command.disable-gzip' =>
|
2761 |
array (
|
2762 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'disable-gzip.php',
|
@@ -2813,11 +2973,18 @@
|
|
2813 |
'i' => 'g',
|
2814 |
'r' => 'y',
|
2815 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
2816 |
'compatibility.ob' =>
|
2817 |
array (
|
2818 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'ob.php',
|
2819 |
'c' => 'Ai1ec_Compatibility_OutputBuffer',
|
2820 |
'i' => 'g',
|
|
|
2821 |
),
|
2822 |
'compatibility.xguard' =>
|
2823 |
array (
|
@@ -3569,6 +3736,12 @@
|
|
3569 |
'i' => 'n',
|
3570 |
'r' => 'y',
|
3571 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3572 |
'model.event.instance' =>
|
3573 |
array (
|
3574 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'instance.php',
|
@@ -3815,6 +3988,13 @@
|
|
3815 |
'i' => 'g',
|
3816 |
'r' => 'y',
|
3817 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3818 |
'rewrite.helper' =>
|
3819 |
array (
|
3820 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'rewrite' . DIRECTORY_SEPARATOR . 'helper.php',
|
@@ -3946,6 +4126,12 @@
|
|
3946 |
'c' => '__TwigTemplate_0390aeab35788b09647b9a02c8610d09925aabc8c355462d95b2a35074e72577',
|
3947 |
'i' => 'g',
|
3948 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3949 |
'twig.0d.04.fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb' =>
|
3950 |
array (
|
3951 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '0d' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . 'fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb.php',
|
@@ -3988,6 +4174,24 @@
|
|
3988 |
'c' => '__TwigTemplate_3f6c8cdc781204b2b1401ef907fcddb9c3cb7cd72d4b0b8f5abf450db9eaf16a',
|
3989 |
'i' => 'g',
|
3990 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3991 |
'twig.55.28.bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40' =>
|
3992 |
array (
|
3993 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '55' . DIRECTORY_SEPARATOR . '28' . DIRECTORY_SEPARATOR . 'bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40.php',
|
@@ -4000,18 +4204,54 @@
|
|
4000 |
'c' => '__TwigTemplate_5fd54eb14d711093fc6d960237fd8b483db342d780035d2e2e9c6e5632cde5b4',
|
4001 |
'i' => 'g',
|
4002 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4003 |
'twig.8c.bf.5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9' =>
|
4004 |
array (
|
4005 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8c' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9.php',
|
4006 |
'c' => '__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9',
|
4007 |
'i' => 'g',
|
4008 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4009 |
'twig.9c.a0.debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69' =>
|
4010 |
array (
|
4011 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69.php',
|
4012 |
'c' => '__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69',
|
4013 |
'i' => 'g',
|
4014 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4015 |
'twig.Compiler' =>
|
4016 |
array (
|
4017 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'Compiler.php',
|
@@ -4948,18 +5188,48 @@
|
|
4948 |
'c' => 'Twig_TokenStream',
|
4949 |
'i' => 'g',
|
4950 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4951 |
'twig.a6.4d.88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758' =>
|
4952 |
array (
|
4953 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a6' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758.php',
|
4954 |
'c' => '__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758',
|
4955 |
'i' => 'g',
|
4956 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4957 |
'twig.ab.8f.f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3' =>
|
4958 |
array (
|
4959 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . 'f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3.php',
|
4960 |
'c' => '__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3',
|
4961 |
'i' => 'g',
|
4962 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4963 |
'twig.ai1ec-extension' =>
|
4964 |
array (
|
4965 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ai1ec-extension.php',
|
@@ -4972,6 +5242,18 @@
|
|
4972 |
'c' => '__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861',
|
4973 |
'i' => 'g',
|
4974 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4975 |
'twig.c3.ef.a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838' =>
|
4976 |
array (
|
4977 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c3' . DIRECTORY_SEPARATOR . 'ef' . DIRECTORY_SEPARATOR . 'a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838.php',
|
@@ -4991,12 +5273,24 @@
|
|
4991 |
'i' => 'g',
|
4992 |
'r' => 'y',
|
4993 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4994 |
'twig.ce.72.4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201' =>
|
4995 |
array (
|
4996 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ce' . DIRECTORY_SEPARATOR . '72' . DIRECTORY_SEPARATOR . '4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201.php',
|
4997 |
'c' => '__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201',
|
4998 |
'i' => 'g',
|
4999 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
5000 |
'twig.ed.be.11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967' =>
|
5001 |
array (
|
5002 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ed' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967.php',
|
@@ -5009,12 +5303,24 @@
|
|
5009 |
'c' => 'Ai1ec_Twig_Environment',
|
5010 |
'i' => 'g',
|
5011 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
5012 |
'twig.f8.b8.d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a' =>
|
5013 |
array (
|
5014 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'd195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a.php',
|
5015 |
'c' => '__TwigTemplate_f8b8d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a',
|
5016 |
'i' => 'g',
|
5017 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
5018 |
'valarm' =>
|
5019 |
array (
|
5020 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'iCal' . DIRECTORY_SEPARATOR . 'iCalcreator-2.20' . DIRECTORY_SEPARATOR . 'iCalcreator.class.php',
|
212 |
'i' => 'g',
|
213 |
'r' => 'y',
|
214 |
),
|
215 |
+
'Ai1ec_Command_Compile_Core_Css' =>
|
216 |
+
array (
|
217 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'compile-core-css.php',
|
218 |
+
'c' => 'Ai1ec_Command_Compile_Core_Css',
|
219 |
+
'i' => 'g',
|
220 |
+
'r' => 'y',
|
221 |
+
),
|
222 |
'Ai1ec_Command_Disable_Gzip' =>
|
223 |
array (
|
224 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'disable-gzip.php',
|
275 |
'i' => 'g',
|
276 |
'r' => 'y',
|
277 |
),
|
278 |
+
'Ai1ec_Compatibility_Cli' =>
|
279 |
+
array (
|
280 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
|
281 |
+
'c' => 'Ai1ec_Compatibility_Cli',
|
282 |
+
'i' => 'g',
|
283 |
+
),
|
284 |
'Ai1ec_Compatibility_OutputBuffer' =>
|
285 |
array (
|
286 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'ob.php',
|
287 |
'c' => 'Ai1ec_Compatibility_OutputBuffer',
|
288 |
'i' => 'g',
|
289 |
+
'r' => 'y',
|
290 |
),
|
291 |
'Ai1ec_Compatibility_Xguard' =>
|
292 |
array (
|
488 |
'i' => 'n',
|
489 |
'r' => 'y',
|
490 |
),
|
491 |
+
'Ai1ec_Event_Create_Exception' =>
|
492 |
+
array (
|
493 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'event-create-exception.php',
|
494 |
+
'c' => 'Ai1ec_Event_Create_Exception',
|
495 |
+
'i' => 'g',
|
496 |
+
),
|
497 |
'Ai1ec_Event_Creating' =>
|
498 |
array (
|
499 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'creating.php',
|
1114 |
'i' => 'n',
|
1115 |
'r' => 'y',
|
1116 |
),
|
1117 |
+
'Ai1ec_Request_Redirect' =>
|
1118 |
+
array (
|
1119 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR . 'redirect.php',
|
1120 |
+
'c' => 'Ai1ec_Request_Redirect',
|
1121 |
+
'i' => 'g',
|
1122 |
+
'r' => 'y',
|
1123 |
+
),
|
1124 |
'Ai1ec_Rewrite_Helper' =>
|
1125 |
array (
|
1126 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'rewrite' . DIRECTORY_SEPARATOR . 'helper.php',
|
1259 |
'c' => 'Ai1ec_Twig_Environment',
|
1260 |
'i' => 'g',
|
1261 |
),
|
1262 |
+
'Ai1ec_Twig_Loader_Filesystem' =>
|
1263 |
+
array (
|
1264 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
|
1265 |
+
'c' => 'Ai1ec_Twig_Loader_Filesystem',
|
1266 |
+
'i' => 'g',
|
1267 |
+
),
|
1268 |
'Ai1ec_Uri' =>
|
1269 |
array (
|
1270 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'routing' . DIRECTORY_SEPARATOR . 'uri.php',
|
2512 |
'c' => '__TwigTemplate_0390aeab35788b09647b9a02c8610d09925aabc8c355462d95b2a35074e72577',
|
2513 |
'i' => 'g',
|
2514 |
),
|
2515 |
+
'__TwigTemplate_07f208b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34' =>
|
2516 |
+
array (
|
2517 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '07' . DIRECTORY_SEPARATOR . 'f2' . DIRECTORY_SEPARATOR . '08b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34.php',
|
2518 |
+
'c' => '__TwigTemplate_07f208b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34',
|
2519 |
+
'i' => 'g',
|
2520 |
+
),
|
2521 |
'__TwigTemplate_0d04fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb' =>
|
2522 |
array (
|
2523 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '0d' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . 'fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb.php',
|
2560 |
'c' => '__TwigTemplate_3f6c8cdc781204b2b1401ef907fcddb9c3cb7cd72d4b0b8f5abf450db9eaf16a',
|
2561 |
'i' => 'g',
|
2562 |
),
|
2563 |
+
'__TwigTemplate_4439a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08' =>
|
2564 |
+
array (
|
2565 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '44' . DIRECTORY_SEPARATOR . '39' . DIRECTORY_SEPARATOR . 'a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08.php',
|
2566 |
+
'c' => '__TwigTemplate_4439a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08',
|
2567 |
+
'i' => 'g',
|
2568 |
+
),
|
2569 |
+
'__TwigTemplate_4c48648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9' =>
|
2570 |
+
array (
|
2571 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '4c' . DIRECTORY_SEPARATOR . '48' . DIRECTORY_SEPARATOR . '648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9.php',
|
2572 |
+
'c' => '__TwigTemplate_4c48648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9',
|
2573 |
+
'i' => 'g',
|
2574 |
+
),
|
2575 |
+
'__TwigTemplate_52a017e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e' =>
|
2576 |
+
array (
|
2577 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '52' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . '17e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e.php',
|
2578 |
+
'c' => '__TwigTemplate_52a017e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e',
|
2579 |
+
'i' => 'g',
|
2580 |
+
),
|
2581 |
'__TwigTemplate_5528bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40' =>
|
2582 |
array (
|
2583 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '55' . DIRECTORY_SEPARATOR . '28' . DIRECTORY_SEPARATOR . 'bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40.php',
|
2590 |
'c' => '__TwigTemplate_5fd54eb14d711093fc6d960237fd8b483db342d780035d2e2e9c6e5632cde5b4',
|
2591 |
'i' => 'g',
|
2592 |
),
|
2593 |
+
'__TwigTemplate_60c1556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663' =>
|
2594 |
+
array (
|
2595 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '60' . DIRECTORY_SEPARATOR . 'c1' . DIRECTORY_SEPARATOR . '556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663.php',
|
2596 |
+
'c' => '__TwigTemplate_60c1556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663',
|
2597 |
+
'i' => 'g',
|
2598 |
+
),
|
2599 |
+
'__TwigTemplate_6480840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1' =>
|
2600 |
+
array (
|
2601 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '64' . DIRECTORY_SEPARATOR . '80' . DIRECTORY_SEPARATOR . '840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1.php',
|
2602 |
+
'c' => '__TwigTemplate_6480840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1',
|
2603 |
+
'i' => 'g',
|
2604 |
+
),
|
2605 |
+
'__TwigTemplate_851e7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f' =>
|
2606 |
+
array (
|
2607 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '85' . DIRECTORY_SEPARATOR . '1e' . DIRECTORY_SEPARATOR . '7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php',
|
2608 |
+
'c' => '__TwigTemplate_851e7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f',
|
2609 |
+
'i' => 'g',
|
2610 |
+
),
|
2611 |
'__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9' =>
|
2612 |
array (
|
2613 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8c' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9.php',
|
2614 |
'c' => '__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9',
|
2615 |
'i' => 'g',
|
2616 |
),
|
2617 |
+
'__TwigTemplate_9697e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d' =>
|
2618 |
+
array (
|
2619 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '96' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . 'e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d.php',
|
2620 |
+
'c' => '__TwigTemplate_9697e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d',
|
2621 |
+
'i' => 'g',
|
2622 |
+
),
|
2623 |
+
'__TwigTemplate_972b1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161' =>
|
2624 |
+
array (
|
2625 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . '2b' . DIRECTORY_SEPARATOR . '1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161.php',
|
2626 |
+
'c' => '__TwigTemplate_972b1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161',
|
2627 |
+
'i' => 'g',
|
2628 |
+
),
|
2629 |
'__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69' =>
|
2630 |
array (
|
2631 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69.php',
|
2632 |
'c' => '__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69',
|
2633 |
'i' => 'g',
|
2634 |
),
|
2635 |
+
'__TwigTemplate_9df9ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95' =>
|
2636 |
+
array (
|
2637 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9d' . DIRECTORY_SEPARATOR . 'f9' . DIRECTORY_SEPARATOR . 'ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95.php',
|
2638 |
+
'c' => '__TwigTemplate_9df9ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95',
|
2639 |
+
'i' => 'g',
|
2640 |
+
),
|
2641 |
+
'__TwigTemplate_a04395a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c' =>
|
2642 |
+
array (
|
2643 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . '43' . DIRECTORY_SEPARATOR . '95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php',
|
2644 |
+
'c' => '__TwigTemplate_a04395a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c',
|
2645 |
+
'i' => 'g',
|
2646 |
+
),
|
2647 |
+
'__TwigTemplate_a24d818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1' =>
|
2648 |
+
array (
|
2649 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a2' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1.php',
|
2650 |
+
'c' => '__TwigTemplate_a24d818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1',
|
2651 |
+
'i' => 'g',
|
2652 |
+
),
|
2653 |
+
'__TwigTemplate_a2a8ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9' =>
|
2654 |
+
array (
|
2655 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a2' . DIRECTORY_SEPARATOR . 'a8' . DIRECTORY_SEPARATOR . 'ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9.php',
|
2656 |
+
'c' => '__TwigTemplate_a2a8ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9',
|
2657 |
+
'i' => 'g',
|
2658 |
+
),
|
2659 |
'__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758' =>
|
2660 |
array (
|
2661 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a6' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758.php',
|
2662 |
'c' => '__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758',
|
2663 |
'i' => 'g',
|
2664 |
),
|
2665 |
+
'__TwigTemplate_a86b35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589' =>
|
2666 |
+
array (
|
2667 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a8' . DIRECTORY_SEPARATOR . '6b' . DIRECTORY_SEPARATOR . '35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589.php',
|
2668 |
+
'c' => '__TwigTemplate_a86b35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589',
|
2669 |
+
'i' => 'g',
|
2670 |
+
),
|
2671 |
'__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3' =>
|
2672 |
array (
|
2673 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . 'f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3.php',
|
2674 |
'c' => '__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3',
|
2675 |
'i' => 'g',
|
2676 |
),
|
2677 |
+
'__TwigTemplate_acb1dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed' =>
|
2678 |
+
array (
|
2679 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ac' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . 'dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed.php',
|
2680 |
+
'c' => '__TwigTemplate_acb1dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed',
|
2681 |
+
'i' => 'g',
|
2682 |
+
),
|
2683 |
'__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861' =>
|
2684 |
array (
|
2685 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861.php',
|
2686 |
'c' => '__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861',
|
2687 |
'i' => 'g',
|
2688 |
),
|
2689 |
+
'__TwigTemplate_be971f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5' =>
|
2690 |
+
array (
|
2691 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . '1f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5.php',
|
2692 |
+
'c' => '__TwigTemplate_be971f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5',
|
2693 |
+
'i' => 'g',
|
2694 |
+
),
|
2695 |
+
'__TwigTemplate_c231192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d' =>
|
2696 |
+
array (
|
2697 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c2' . DIRECTORY_SEPARATOR . '31' . DIRECTORY_SEPARATOR . '192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d.php',
|
2698 |
+
'c' => '__TwigTemplate_c231192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d',
|
2699 |
+
'i' => 'g',
|
2700 |
+
),
|
2701 |
'__TwigTemplate_c3efa6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838' =>
|
2702 |
array (
|
2703 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c3' . DIRECTORY_SEPARATOR . 'ef' . DIRECTORY_SEPARATOR . 'a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838.php',
|
2710 |
'c' => '__TwigTemplate_ca440aa661b1c953233505b2506f7ca2ef971ece252f191fef784ea217b3981b',
|
2711 |
'i' => 'g',
|
2712 |
),
|
2713 |
+
'__TwigTemplate_cc10dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d' =>
|
2714 |
+
array (
|
2715 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'cc' . DIRECTORY_SEPARATOR . '10' . DIRECTORY_SEPARATOR . 'dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d.php',
|
2716 |
+
'c' => '__TwigTemplate_cc10dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d',
|
2717 |
+
'i' => 'g',
|
2718 |
+
),
|
2719 |
'__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201' =>
|
2720 |
array (
|
2721 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ce' . DIRECTORY_SEPARATOR . '72' . DIRECTORY_SEPARATOR . '4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201.php',
|
2722 |
'c' => '__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201',
|
2723 |
'i' => 'g',
|
2724 |
),
|
2725 |
+
'__TwigTemplate_e8702c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988' =>
|
2726 |
+
array (
|
2727 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e8' . DIRECTORY_SEPARATOR . '70' . DIRECTORY_SEPARATOR . '2c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988.php',
|
2728 |
+
'c' => '__TwigTemplate_e8702c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988',
|
2729 |
+
'i' => 'g',
|
2730 |
+
),
|
2731 |
'__TwigTemplate_edbe11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967' =>
|
2732 |
array (
|
2733 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ed' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967.php',
|
2734 |
'c' => '__TwigTemplate_edbe11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967',
|
2735 |
'i' => 'g',
|
2736 |
),
|
2737 |
+
'__TwigTemplate_f04e1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735' =>
|
2738 |
+
array (
|
2739 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '4e' . DIRECTORY_SEPARATOR . '1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735.php',
|
2740 |
+
'c' => '__TwigTemplate_f04e1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735',
|
2741 |
+
'i' => 'g',
|
2742 |
+
),
|
2743 |
'__TwigTemplate_f8b8d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a' =>
|
2744 |
array (
|
2745 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'd195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a.php',
|
2910 |
'i' => 'g',
|
2911 |
'r' => 'y',
|
2912 |
),
|
2913 |
+
'command.compile-core-css' =>
|
2914 |
+
array (
|
2915 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'compile-core-css.php',
|
2916 |
+
'c' => 'Ai1ec_Command_Compile_Core_Css',
|
2917 |
+
'i' => 'g',
|
2918 |
+
'r' => 'y',
|
2919 |
+
),
|
2920 |
'command.disable-gzip' =>
|
2921 |
array (
|
2922 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'command' . DIRECTORY_SEPARATOR . 'disable-gzip.php',
|
2973 |
'i' => 'g',
|
2974 |
'r' => 'y',
|
2975 |
),
|
2976 |
+
'compatibility.cli' =>
|
2977 |
+
array (
|
2978 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
|
2979 |
+
'c' => 'Ai1ec_Compatibility_Cli',
|
2980 |
+
'i' => 'g',
|
2981 |
+
),
|
2982 |
'compatibility.ob' =>
|
2983 |
array (
|
2984 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'ob.php',
|
2985 |
'c' => 'Ai1ec_Compatibility_OutputBuffer',
|
2986 |
'i' => 'g',
|
2987 |
+
'r' => 'y',
|
2988 |
),
|
2989 |
'compatibility.xguard' =>
|
2990 |
array (
|
3736 |
'i' => 'n',
|
3737 |
'r' => 'y',
|
3738 |
),
|
3739 |
+
'model.event.event-create-exception' =>
|
3740 |
+
array (
|
3741 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'event-create-exception.php',
|
3742 |
+
'c' => 'Ai1ec_Event_Create_Exception',
|
3743 |
+
'i' => 'g',
|
3744 |
+
),
|
3745 |
'model.event.instance' =>
|
3746 |
array (
|
3747 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'instance.php',
|
3988 |
'i' => 'g',
|
3989 |
'r' => 'y',
|
3990 |
),
|
3991 |
+
'request.redirect' =>
|
3992 |
+
array (
|
3993 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR . 'redirect.php',
|
3994 |
+
'c' => 'Ai1ec_Request_Redirect',
|
3995 |
+
'i' => 'g',
|
3996 |
+
'r' => 'y',
|
3997 |
+
),
|
3998 |
'rewrite.helper' =>
|
3999 |
array (
|
4000 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'rewrite' . DIRECTORY_SEPARATOR . 'helper.php',
|
4126 |
'c' => '__TwigTemplate_0390aeab35788b09647b9a02c8610d09925aabc8c355462d95b2a35074e72577',
|
4127 |
'i' => 'g',
|
4128 |
),
|
4129 |
+
'twig.07.f2.08b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34' =>
|
4130 |
+
array (
|
4131 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '07' . DIRECTORY_SEPARATOR . 'f2' . DIRECTORY_SEPARATOR . '08b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34.php',
|
4132 |
+
'c' => '__TwigTemplate_07f208b7518cfd80283103639681b422d583e3e025a0813e9aacc2301dda8f34',
|
4133 |
+
'i' => 'g',
|
4134 |
+
),
|
4135 |
'twig.0d.04.fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb' =>
|
4136 |
array (
|
4137 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '0d' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . 'fd8553709f7381252f5b9560ca2f467a3f832e7ef50112df9766d36955eb.php',
|
4174 |
'c' => '__TwigTemplate_3f6c8cdc781204b2b1401ef907fcddb9c3cb7cd72d4b0b8f5abf450db9eaf16a',
|
4175 |
'i' => 'g',
|
4176 |
),
|
4177 |
+
'twig.44.39.a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08' =>
|
4178 |
+
array (
|
4179 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '44' . DIRECTORY_SEPARATOR . '39' . DIRECTORY_SEPARATOR . 'a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08.php',
|
4180 |
+
'c' => '__TwigTemplate_4439a3031966e0b71741bead9ad17df2fbebb4db2bfdd27c5a504ee14d9edd08',
|
4181 |
+
'i' => 'g',
|
4182 |
+
),
|
4183 |
+
'twig.4c.48.648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9' =>
|
4184 |
+
array (
|
4185 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '4c' . DIRECTORY_SEPARATOR . '48' . DIRECTORY_SEPARATOR . '648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9.php',
|
4186 |
+
'c' => '__TwigTemplate_4c48648cad1f8ae4afa7dcc8cedb3e106e9aef1ac55ba000578e198e411bfae9',
|
4187 |
+
'i' => 'g',
|
4188 |
+
),
|
4189 |
+
'twig.52.a0.17e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e' =>
|
4190 |
+
array (
|
4191 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '52' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . '17e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e.php',
|
4192 |
+
'c' => '__TwigTemplate_52a017e67d20dd2f8b61fda191c165563d134d396c907c1a614bcb8c7501c81e',
|
4193 |
+
'i' => 'g',
|
4194 |
+
),
|
4195 |
'twig.55.28.bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40' =>
|
4196 |
array (
|
4197 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '55' . DIRECTORY_SEPARATOR . '28' . DIRECTORY_SEPARATOR . 'bfcb0e0fa8155e3469092a742b5dad7834ca41009ce1db3bfa8e0c5ebc40.php',
|
4204 |
'c' => '__TwigTemplate_5fd54eb14d711093fc6d960237fd8b483db342d780035d2e2e9c6e5632cde5b4',
|
4205 |
'i' => 'g',
|
4206 |
),
|
4207 |
+
'twig.60.c1.556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663' =>
|
4208 |
+
array (
|
4209 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '60' . DIRECTORY_SEPARATOR . 'c1' . DIRECTORY_SEPARATOR . '556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663.php',
|
4210 |
+
'c' => '__TwigTemplate_60c1556197758d53707b4c6143a82ecd06094ea7e38e236377115df48b106663',
|
4211 |
+
'i' => 'g',
|
4212 |
+
),
|
4213 |
+
'twig.64.80.840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1' =>
|
4214 |
+
array (
|
4215 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '64' . DIRECTORY_SEPARATOR . '80' . DIRECTORY_SEPARATOR . '840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1.php',
|
4216 |
+
'c' => '__TwigTemplate_6480840d3ed9630e9f0aa5fa68f67ce3de4a7b4b21e0be50c87ebea56c505da1',
|
4217 |
+
'i' => 'g',
|
4218 |
+
),
|
4219 |
+
'twig.85.1e.7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f' =>
|
4220 |
+
array (
|
4221 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '85' . DIRECTORY_SEPARATOR . '1e' . DIRECTORY_SEPARATOR . '7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f.php',
|
4222 |
+
'c' => '__TwigTemplate_851e7bfc6f173af53c3186c80a3237c80f1a2cbbe9307029c7a052378f9a918f',
|
4223 |
+
'i' => 'g',
|
4224 |
+
),
|
4225 |
'twig.8c.bf.5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9' =>
|
4226 |
array (
|
4227 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8c' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9.php',
|
4228 |
'c' => '__TwigTemplate_8cbf5b95ce3485f4c39e2038e1d56aaecf6420406be9fa1abc03d9da396d6ce9',
|
4229 |
'i' => 'g',
|
4230 |
),
|
4231 |
+
'twig.96.97.e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d' =>
|
4232 |
+
array (
|
4233 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '96' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . 'e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d.php',
|
4234 |
+
'c' => '__TwigTemplate_9697e7f7701499f4ab011a59b4adddfbb29dea8dcd6937362c312a45c919477d',
|
4235 |
+
'i' => 'g',
|
4236 |
+
),
|
4237 |
+
'twig.97.2b.1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161' =>
|
4238 |
+
array (
|
4239 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . '2b' . DIRECTORY_SEPARATOR . '1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161.php',
|
4240 |
+
'c' => '__TwigTemplate_972b1920bee3b857b152e754b9f920fe5065b8f9abc31051af675f88ead09161',
|
4241 |
+
'i' => 'g',
|
4242 |
+
),
|
4243 |
'twig.9c.a0.debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69' =>
|
4244 |
array (
|
4245 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69.php',
|
4246 |
'c' => '__TwigTemplate_9ca0debaa2f3fa1ae7019224e65bb591971fe6ba2eb3bf366d57ee776fa23b69',
|
4247 |
'i' => 'g',
|
4248 |
),
|
4249 |
+
'twig.9d.f9.ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95' =>
|
4250 |
+
array (
|
4251 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9d' . DIRECTORY_SEPARATOR . 'f9' . DIRECTORY_SEPARATOR . 'ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95.php',
|
4252 |
+
'c' => '__TwigTemplate_9df9ccbc48465f44b5f54705ced642619e2e55da2af985b398d2558890e40c95',
|
4253 |
+
'i' => 'g',
|
4254 |
+
),
|
4255 |
'twig.Compiler' =>
|
4256 |
array (
|
4257 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'Compiler.php',
|
5188 |
'c' => 'Twig_TokenStream',
|
5189 |
'i' => 'g',
|
5190 |
),
|
5191 |
+
'twig.a0.43.95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c' =>
|
5192 |
+
array (
|
5193 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . '43' . DIRECTORY_SEPARATOR . '95a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c.php',
|
5194 |
+
'c' => '__TwigTemplate_a04395a3f9f5062a7ed08df4edd35a1e23166998398abe4ac34f07bd89cf1a2c',
|
5195 |
+
'i' => 'g',
|
5196 |
+
),
|
5197 |
+
'twig.a2.4d.818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1' =>
|
5198 |
+
array (
|
5199 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a2' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1.php',
|
5200 |
+
'c' => '__TwigTemplate_a24d818dc4702b353c6a69928a68161667c84d4c73368bf9c52c94f40f74aeb1',
|
5201 |
+
'i' => 'g',
|
5202 |
+
),
|
5203 |
+
'twig.a2.a8.ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9' =>
|
5204 |
+
array (
|
5205 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a2' . DIRECTORY_SEPARATOR . 'a8' . DIRECTORY_SEPARATOR . 'ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9.php',
|
5206 |
+
'c' => '__TwigTemplate_a2a8ef2397dea5a359296657edc6d8eb9f97c684ead9fc566e38db90d8afd1e9',
|
5207 |
+
'i' => 'g',
|
5208 |
+
),
|
5209 |
'twig.a6.4d.88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758' =>
|
5210 |
array (
|
5211 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a6' . DIRECTORY_SEPARATOR . '4d' . DIRECTORY_SEPARATOR . '88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758.php',
|
5212 |
'c' => '__TwigTemplate_a64d88cdfa6f8bc13511e76d870e4326feee3c2172402687d71f852eb6b8c758',
|
5213 |
'i' => 'g',
|
5214 |
),
|
5215 |
+
'twig.a8.6b.35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589' =>
|
5216 |
+
array (
|
5217 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a8' . DIRECTORY_SEPARATOR . '6b' . DIRECTORY_SEPARATOR . '35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589.php',
|
5218 |
+
'c' => '__TwigTemplate_a86b35a9f886d658ec7ee224d897e05e63bf6bbe58b15eb30999f2031168f589',
|
5219 |
+
'i' => 'g',
|
5220 |
+
),
|
5221 |
'twig.ab.8f.f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3' =>
|
5222 |
array (
|
5223 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . 'f375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3.php',
|
5224 |
'c' => '__TwigTemplate_ab8ff375c058e5b3ddf71337cc5f39b08710362b0cb927ab047fc87531354ec3',
|
5225 |
'i' => 'g',
|
5226 |
),
|
5227 |
+
'twig.ac.b1.dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed' =>
|
5228 |
+
array (
|
5229 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ac' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . 'dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed.php',
|
5230 |
+
'c' => '__TwigTemplate_acb1dc54f347f71ad573b636d5218c41319836b385fd06ef014ed0db3e00b8ed',
|
5231 |
+
'i' => 'g',
|
5232 |
+
),
|
5233 |
'twig.ai1ec-extension' =>
|
5234 |
array (
|
5235 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ai1ec-extension.php',
|
5242 |
'c' => '__TwigTemplate_b8dc20c6d89f8151e76fcd838573c80d2fe6d63fa3b5f209fbb25455fcbaa861',
|
5243 |
'i' => 'g',
|
5244 |
),
|
5245 |
+
'twig.be.97.1f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5' =>
|
5246 |
+
array (
|
5247 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '97' . DIRECTORY_SEPARATOR . '1f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5.php',
|
5248 |
+
'c' => '__TwigTemplate_be971f89b546d8a8ca826202d67604600ec83eb6e47e2baf5b65497e60e5bfc5',
|
5249 |
+
'i' => 'g',
|
5250 |
+
),
|
5251 |
+
'twig.c2.31.192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d' =>
|
5252 |
+
array (
|
5253 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c2' . DIRECTORY_SEPARATOR . '31' . DIRECTORY_SEPARATOR . '192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d.php',
|
5254 |
+
'c' => '__TwigTemplate_c231192f70ac4b5bbbb70bb1749e10ce2c65befa01f3b220c9877a05504e476d',
|
5255 |
+
'i' => 'g',
|
5256 |
+
),
|
5257 |
'twig.c3.ef.a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838' =>
|
5258 |
array (
|
5259 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c3' . DIRECTORY_SEPARATOR . 'ef' . DIRECTORY_SEPARATOR . 'a6c892e192ab677abaa0a51f9dce404bdb09045156b1e62e6ad503db8838.php',
|
5273 |
'i' => 'g',
|
5274 |
'r' => 'y',
|
5275 |
),
|
5276 |
+
'twig.cc.10.dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d' =>
|
5277 |
+
array (
|
5278 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'cc' . DIRECTORY_SEPARATOR . '10' . DIRECTORY_SEPARATOR . 'dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d.php',
|
5279 |
+
'c' => '__TwigTemplate_cc10dc5dc5f1023bb6f4c34abec5e6d248d31528cd77edd057d783ded0650d7d',
|
5280 |
+
'i' => 'g',
|
5281 |
+
),
|
5282 |
'twig.ce.72.4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201' =>
|
5283 |
array (
|
5284 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ce' . DIRECTORY_SEPARATOR . '72' . DIRECTORY_SEPARATOR . '4c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201.php',
|
5285 |
'c' => '__TwigTemplate_ce724c7cb5cac3cffd05dcac960e0136a91e09c2281d281c2aa076bb92249201',
|
5286 |
'i' => 'g',
|
5287 |
),
|
5288 |
+
'twig.e8.70.2c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988' =>
|
5289 |
+
array (
|
5290 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e8' . DIRECTORY_SEPARATOR . '70' . DIRECTORY_SEPARATOR . '2c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988.php',
|
5291 |
+
'c' => '__TwigTemplate_e8702c6fd2a0133f36607cf92a43296fef11b5f520c2071953424829b55e5988',
|
5292 |
+
'i' => 'g',
|
5293 |
+
),
|
5294 |
'twig.ed.be.11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967' =>
|
5295 |
array (
|
5296 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ed' . DIRECTORY_SEPARATOR . 'be' . DIRECTORY_SEPARATOR . '11913727712f3aeca5bcd9308202e49470f0f1d80fdeeab130a9c38ae967.php',
|
5303 |
'c' => 'Ai1ec_Twig_Environment',
|
5304 |
'i' => 'g',
|
5305 |
),
|
5306 |
+
'twig.f0.4e.1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735' =>
|
5307 |
+
array (
|
5308 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '4e' . DIRECTORY_SEPARATOR . '1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735.php',
|
5309 |
+
'c' => '__TwigTemplate_f04e1d3fdae4e742e1f9371c7639deec50131968ecec180248e0e35e18490735',
|
5310 |
+
'i' => 'g',
|
5311 |
+
),
|
5312 |
'twig.f8.b8.d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a' =>
|
5313 |
array (
|
5314 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . 'b8' . DIRECTORY_SEPARATOR . 'd195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a.php',
|
5315 |
'c' => '__TwigTemplate_f8b8d195bb5bb7102497fc98dcb0702f082b666aaae80097e97d1302a5c5343a',
|
5316 |
'i' => 'g',
|
5317 |
),
|
5318 |
+
'twig.loader' =>
|
5319 |
+
array (
|
5320 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
|
5321 |
+
'c' => 'Ai1ec_Twig_Loader_Filesystem',
|
5322 |
+
'i' => 'g',
|
5323 |
+
),
|
5324 |
'valarm' =>
|
5325 |
array (
|
5326 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'iCal' . DIRECTORY_SEPARATOR . 'iCalcreator-2.20' . DIRECTORY_SEPARATOR . 'iCalcreator.class.php',
|
lib/bootstrap/loader.php
CHANGED
@@ -217,10 +217,14 @@ class Ai1ec_Loader {
|
|
217 |
$this->_paths = array_merge( $this->_paths, $names );
|
218 |
spl_autoload_register( array( $this, 'load' ) );
|
219 |
foreach ( $names as $classname => &$data ) {
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
$
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
}
|
226 |
return $names;
|
217 |
$this->_paths = array_merge( $this->_paths, $names );
|
218 |
spl_autoload_register( array( $this, 'load' ) );
|
219 |
foreach ( $names as $classname => &$data ) {
|
220 |
+
try {
|
221 |
+
$class = new ReflectionClass( $data['c'] );
|
222 |
+
$data['i'] = $this->_get_instantiator( $class );
|
223 |
+
if ( $this->_inject_registry( $class ) ) {
|
224 |
+
$data['r'] = 'y';
|
225 |
+
}
|
226 |
+
} catch ( ReflectionException $excpt ) { // unreachable class
|
227 |
+
$data['i'] = self::NEWINST;
|
228 |
}
|
229 |
}
|
230 |
return $names;
|
lib/cache/strategy/file.php
CHANGED
@@ -14,11 +14,14 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
17 |
-
private $
|
|
|
|
|
18 |
|
19 |
-
public function __construct( Ai1ec_Registry_Object $registry, $cache_dir ) {
|
20 |
parent::__construct( $registry );
|
21 |
-
$this->
|
|
|
22 |
}
|
23 |
|
24 |
/**
|
@@ -28,13 +31,13 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
28 |
*/
|
29 |
public function get_data( $file ) {
|
30 |
$file = $this->_safe_file_name( $file );
|
31 |
-
if ( ! file_exists( $this->
|
32 |
throw new Ai1ec_Cache_Not_Set_Exception(
|
33 |
'File \'' . $file . '\' does not exist'
|
34 |
);
|
35 |
}
|
36 |
return maybe_unserialize(
|
37 |
-
file_get_contents( $this->
|
38 |
);
|
39 |
}
|
40 |
|
@@ -44,17 +47,22 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
44 |
*
|
45 |
*/
|
46 |
public function write_data( $filename, $value ) {
|
47 |
-
$filename = $this->_safe_file_name( $filename );
|
48 |
$value = maybe_serialize( $value );
|
|
|
49 |
$result = $this->_registry->get( 'filesystem.checker' )->put_contents(
|
50 |
-
$this->
|
51 |
$value
|
52 |
);
|
53 |
if ( false === $result ) {
|
54 |
$message = 'An error occured while saving data to \'' .
|
55 |
-
$this->
|
56 |
throw new Ai1ec_Cache_Write_Exception( $message );
|
57 |
}
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -66,8 +74,8 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
66 |
// twice without never rendering the CSS
|
67 |
$filename = $this->_safe_file_name( $filename );
|
68 |
if (
|
69 |
-
file_exists( $this->
|
70 |
-
false === unlink( $this->
|
71 |
) {
|
72 |
return false;
|
73 |
}
|
@@ -79,14 +87,14 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
79 |
* @see Ai1ec_Write_Data_To_Cache::delete_matching()
|
80 |
*/
|
81 |
public function delete_matching( $pattern ) {
|
82 |
-
$dirhandle = opendir( $this->
|
83 |
if ( false === $dirhandle ) {
|
84 |
return 0;
|
85 |
}
|
86 |
$count = 0;
|
87 |
while ( false !== ( $entry = readdir( $dirhandle ) ) ) {
|
88 |
if ( '.' !== $entry{0} && false !== strpos( $entry, $pattern ) ) {
|
89 |
-
if ( unlink( $this->
|
90 |
++$count;
|
91 |
}
|
92 |
}
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
17 |
+
private $_cache_dir;
|
18 |
+
|
19 |
+
private $_cache_url;
|
20 |
|
21 |
+
public function __construct( Ai1ec_Registry_Object $registry, array $cache_dir ) {
|
22 |
parent::__construct( $registry );
|
23 |
+
$this->_cache_dir = $cache_dir['path'];
|
24 |
+
$this->_cache_url = $cache_dir['url'];
|
25 |
}
|
26 |
|
27 |
/**
|
31 |
*/
|
32 |
public function get_data( $file ) {
|
33 |
$file = $this->_safe_file_name( $file );
|
34 |
+
if ( ! file_exists( $this->_cache_dir . $file ) ) {
|
35 |
throw new Ai1ec_Cache_Not_Set_Exception(
|
36 |
'File \'' . $file . '\' does not exist'
|
37 |
);
|
38 |
}
|
39 |
return maybe_unserialize(
|
40 |
+
file_get_contents( $this->_cache_dir . $file )
|
41 |
);
|
42 |
}
|
43 |
|
47 |
*
|
48 |
*/
|
49 |
public function write_data( $filename, $value ) {
|
50 |
+
$filename = $this->_safe_file_name( $filename ) . '.css';
|
51 |
$value = maybe_serialize( $value );
|
52 |
+
|
53 |
$result = $this->_registry->get( 'filesystem.checker' )->put_contents(
|
54 |
+
$this->_cache_dir . $filename,
|
55 |
$value
|
56 |
);
|
57 |
if ( false === $result ) {
|
58 |
$message = 'An error occured while saving data to \'' .
|
59 |
+
$this->_cache_dir . $filename . '\'';
|
60 |
throw new Ai1ec_Cache_Write_Exception( $message );
|
61 |
}
|
62 |
+
return array(
|
63 |
+
'path' => $this->_cache_dir . $filename,
|
64 |
+
'url' => $this->_cache_url . $filename,
|
65 |
+
);
|
66 |
}
|
67 |
|
68 |
/**
|
74 |
// twice without never rendering the CSS
|
75 |
$filename = $this->_safe_file_name( $filename );
|
76 |
if (
|
77 |
+
file_exists( $this->_cache_dir . $filename ) &&
|
78 |
+
false === unlink( $this->_cache_dir . $filename )
|
79 |
) {
|
80 |
return false;
|
81 |
}
|
87 |
* @see Ai1ec_Write_Data_To_Cache::delete_matching()
|
88 |
*/
|
89 |
public function delete_matching( $pattern ) {
|
90 |
+
$dirhandle = opendir( $this->_cache_dir );
|
91 |
if ( false === $dirhandle ) {
|
92 |
return 0;
|
93 |
}
|
94 |
$count = 0;
|
95 |
while ( false !== ( $entry = readdir( $dirhandle ) ) ) {
|
96 |
if ( '.' !== $entry{0} && false !== strpos( $entry, $pattern ) ) {
|
97 |
+
if ( unlink( $this->_cache_dir . $entry ) ) {
|
98 |
++$count;
|
99 |
}
|
100 |
}
|
lib/cache/strategy/persistence-context.php
CHANGED
@@ -49,6 +49,15 @@ class Ai1ec_Persistence_Context {
|
|
49 |
return $data;
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/**
|
53 |
* write_data_to_persistence method
|
54 |
*
|
@@ -62,18 +71,16 @@ class Ai1ec_Persistence_Context {
|
|
62 |
* @return boll Success
|
63 |
*/
|
64 |
public function write_data_to_persistence( $data ) {
|
65 |
-
$
|
66 |
try {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
)
|
71 |
-
$success = false;
|
72 |
-
}
|
73 |
} catch ( Ai1ec_Cache_Write_Exception $e ) {
|
74 |
-
$
|
75 |
}
|
76 |
-
return $
|
77 |
}
|
78 |
|
79 |
/**
|
49 |
return $data;
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* Are we using file cache?
|
54 |
+
*
|
55 |
+
* @return boolean
|
56 |
+
*/
|
57 |
+
public function is_file_cache() {
|
58 |
+
return $this->cache_strategy instanceof Ai1ec_Cache_Strategy_File;
|
59 |
+
}
|
60 |
+
|
61 |
/**
|
62 |
* write_data_to_persistence method
|
63 |
*
|
71 |
* @return boll Success
|
72 |
*/
|
73 |
public function write_data_to_persistence( $data ) {
|
74 |
+
$return = true;
|
75 |
try {
|
76 |
+
$return = $this->cache_strategy->write_data(
|
77 |
+
$this->key_for_persistance,
|
78 |
+
$data
|
79 |
+
);
|
|
|
|
|
80 |
} catch ( Ai1ec_Cache_Write_Exception $e ) {
|
81 |
+
$return = false;
|
82 |
}
|
83 |
+
return $return;
|
84 |
}
|
85 |
|
86 |
/**
|
lib/calendar-feed/ics.php
CHANGED
@@ -104,8 +104,8 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
104 |
$output = array();
|
105 |
if ( $feed ) {
|
106 |
|
107 |
-
$count
|
108 |
-
$message
|
109 |
// reimport the feed
|
110 |
$response = wp_remote_get(
|
111 |
$feed->feed_url,
|
@@ -158,15 +158,23 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
158 |
wp_delete_post( $event_id, true );
|
159 |
}
|
160 |
} catch ( Ai1ec_Parse_Exception $e ) {
|
161 |
-
$message = "
|
162 |
} catch ( Ai1ec_Engine_Not_Set_Exception $e ) {
|
163 |
-
$message = "
|
|
|
|
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
} else {
|
166 |
$message = __(
|
167 |
-
"
|
168 |
-
You should set allow_url_fopen in php.ini as suggested in
|
169 |
-
<a href='http://forums.hostdime.com/showthread.php?8620-PHP-allow_url_fopen' target='_blank' >this</a> article",
|
170 |
AI1EC_PLUGIN_NAME
|
171 |
);
|
172 |
}
|
@@ -486,46 +494,62 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
486 |
*
|
487 |
*/
|
488 |
public function add_ics_feed() {
|
|
|
489 |
$db = $this->_registry->get( 'dbi.dbi' );
|
490 |
$table_name = $db->get_table_name( 'ai1ec_event_feeds' );
|
491 |
|
492 |
$feed_categories = empty( $_REQUEST['feed_category'] ) ? '' : implode(
|
493 |
',', $_REQUEST['feed_category'] );
|
494 |
$entry = array( 'feed_url' => $_REQUEST['feed_url'],
|
495 |
-
'feed_category'
|
496 |
-
'feed_tags'
|
497 |
-
'comments_enabled'
|
498 |
$_REQUEST['comments_enabled'] ),
|
499 |
-
'map_display_enabled'
|
500 |
$_REQUEST['map_display_enabled'] ),
|
501 |
'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
|
502 |
$_REQUEST['keep_tags_categories'] )
|
503 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
|
505 |
-
$format
|
506 |
-
);
|
507 |
-
|
508 |
-
$res = $db->insert( $table_name, $entry, $format );
|
509 |
-
$feed_id = $db->get_insert_id();
|
510 |
-
|
511 |
$categories = array();
|
512 |
|
513 |
if ( ! empty( $_REQUEST['feed_category'] ) ) {
|
514 |
foreach ( $_REQUEST['feed_category'] as $cat_id ) {
|
515 |
$feed_category = get_term( $cat_id, 'events_categories' );
|
516 |
-
$categories[]
|
517 |
}
|
518 |
}
|
519 |
|
520 |
-
$args = array(
|
521 |
-
'
|
522 |
-
'
|
523 |
-
'
|
524 |
-
|
525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
$_REQUEST['map_display_enabled']
|
527 |
),
|
528 |
-
'events'
|
529 |
'keep_tags_categories' => (bool) intval(
|
530 |
$_REQUEST['keep_tags_categories']
|
531 |
)
|
@@ -537,12 +561,13 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
537 |
$output = $file->get_content();
|
538 |
|
539 |
$output = array(
|
540 |
-
|
541 |
-
|
542 |
-
stripslashes( $output )
|
543 |
);
|
544 |
-
|
545 |
-
|
|
|
|
|
546 |
}
|
547 |
|
548 |
/**
|
@@ -556,7 +581,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
556 |
if ( $output['error'] === false ) {
|
557 |
$this->delete_ics_feed( false, $ics_id );
|
558 |
}
|
559 |
-
|
|
|
|
|
|
|
560 |
} else {
|
561 |
$this->delete_ics_feed( true, $ics_id );
|
562 |
}
|
@@ -640,7 +668,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
640 |
'ics_id' => $ics_id,
|
641 |
);
|
642 |
if ( $ajax ) {
|
643 |
-
|
|
|
|
|
|
|
644 |
}
|
645 |
}
|
646 |
|
104 |
$output = array();
|
105 |
if ( $feed ) {
|
106 |
|
107 |
+
$count = 0;
|
108 |
+
$message = false;
|
109 |
// reimport the feed
|
110 |
$response = wp_remote_get(
|
111 |
$feed->feed_url,
|
158 |
wp_delete_post( $event_id, true );
|
159 |
}
|
160 |
} catch ( Ai1ec_Parse_Exception $e ) {
|
161 |
+
$message = "The provided feed didn't return valid ics data";
|
162 |
} catch ( Ai1ec_Engine_Not_Set_Exception $e ) {
|
163 |
+
$message = "ICS import is not supported on this install.";
|
164 |
+
} catch ( Ai1ec_Event_Create_Exception $e ) {
|
165 |
+
$message = $e->getMessage();
|
166 |
}
|
167 |
+
} else if ( is_wp_error( $response ) ) {
|
168 |
+
$message = sprintf(
|
169 |
+
__(
|
170 |
+
'A system error has prevented calendar data from being fetched. Something is preventing the plugin from functioning correctly. This message should provide a clue: %s',
|
171 |
+
AI1EC_PLUGIN_NAME
|
172 |
+
),
|
173 |
+
$response->get_error_message()
|
174 |
+
);
|
175 |
} else {
|
176 |
$message = __(
|
177 |
+
"Calendar data could not be fetched. If your URL is valid and contains an iCalendar resource, this is likely the result of a temporary server error and time may resolve this issue",
|
|
|
|
|
178 |
AI1EC_PLUGIN_NAME
|
179 |
);
|
180 |
}
|
494 |
*
|
495 |
*/
|
496 |
public function add_ics_feed() {
|
497 |
+
check_ajax_referer( 'ai1ec_ics_feed_nonce', 'nonce' );
|
498 |
$db = $this->_registry->get( 'dbi.dbi' );
|
499 |
$table_name = $db->get_table_name( 'ai1ec_event_feeds' );
|
500 |
|
501 |
$feed_categories = empty( $_REQUEST['feed_category'] ) ? '' : implode(
|
502 |
',', $_REQUEST['feed_category'] );
|
503 |
$entry = array( 'feed_url' => $_REQUEST['feed_url'],
|
504 |
+
'feed_category' => $feed_categories,
|
505 |
+
'feed_tags' => $_REQUEST['feed_tags'],
|
506 |
+
'comments_enabled' => Ai1ec_Primitive_Int::db_bool(
|
507 |
$_REQUEST['comments_enabled'] ),
|
508 |
+
'map_display_enabled' => Ai1ec_Primitive_Int::db_bool(
|
509 |
$_REQUEST['map_display_enabled'] ),
|
510 |
'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
|
511 |
$_REQUEST['keep_tags_categories'] )
|
512 |
);
|
513 |
+
$entry = apply_filters( 'ai1ec_ics_feed_entry', $entry );
|
514 |
+
if ( is_wp_error( $entry ) ) {
|
515 |
+
$output = array(
|
516 |
+
'error' => true,
|
517 |
+
'message' => $entry->get_error_message()
|
518 |
+
);
|
519 |
+
$json_strategy = $this->_registry->get(
|
520 |
+
'http.response.render.strategy.json'
|
521 |
+
);
|
522 |
+
return $json_strategy->render( array( 'data' => $output ) );
|
523 |
+
}
|
524 |
|
525 |
+
$format = array( '%s', '%s', '%s', '%d', '%d', '%d' );
|
526 |
+
$res = $db->insert( $table_name, $entry, $format );
|
527 |
+
$feed_id = $db->get_insert_id();
|
|
|
|
|
|
|
528 |
$categories = array();
|
529 |
|
530 |
if ( ! empty( $_REQUEST['feed_category'] ) ) {
|
531 |
foreach ( $_REQUEST['feed_category'] as $cat_id ) {
|
532 |
$feed_category = get_term( $cat_id, 'events_categories' );
|
533 |
+
$categories[] = $feed_category->name;
|
534 |
}
|
535 |
}
|
536 |
|
537 |
+
$args = array(
|
538 |
+
'feed_url' => $_REQUEST['feed_url'],
|
539 |
+
'event_category' => implode( ', ', $categories ),
|
540 |
+
'tags' => str_replace(
|
541 |
+
',',
|
542 |
+
', ',
|
543 |
+
$_REQUEST['feed_tags']
|
544 |
+
),
|
545 |
+
'feed_id' => $feed_id,
|
546 |
+
'comments_enabled' => (bool) intval(
|
547 |
+
$_REQUEST['comments_enabled']
|
548 |
+
),
|
549 |
+
'map_display_enabled' => (bool) intval(
|
550 |
$_REQUEST['map_display_enabled']
|
551 |
),
|
552 |
+
'events' => 0,
|
553 |
'keep_tags_categories' => (bool) intval(
|
554 |
$_REQUEST['keep_tags_categories']
|
555 |
)
|
561 |
$output = $file->get_content();
|
562 |
|
563 |
$output = array(
|
564 |
+
'error' => false,
|
565 |
+
'message' => stripslashes( $output )
|
|
|
566 |
);
|
567 |
+
$json_strategy = $this->_registry->get(
|
568 |
+
'http.response.render.strategy.json'
|
569 |
+
);
|
570 |
+
return $json_strategy->render( array( 'data' => $output ) );
|
571 |
}
|
572 |
|
573 |
/**
|
581 |
if ( $output['error'] === false ) {
|
582 |
$this->delete_ics_feed( false, $ics_id );
|
583 |
}
|
584 |
+
$json_strategy = $this->_registry->get(
|
585 |
+
'http.response.render.strategy.json'
|
586 |
+
);
|
587 |
+
return $json_strategy->render( array( 'data' => $output ) );
|
588 |
} else {
|
589 |
$this->delete_ics_feed( true, $ics_id );
|
590 |
}
|
668 |
'ics_id' => $ics_id,
|
669 |
);
|
670 |
if ( $ajax ) {
|
671 |
+
$json_strategy = $this->_registry->get(
|
672 |
+
'http.response.render.strategy.json'
|
673 |
+
);
|
674 |
+
return $json_strategy->render( array( 'data' => $output ) );
|
675 |
}
|
676 |
}
|
677 |
|
lib/clone/renderer-helper.php
CHANGED
@@ -83,6 +83,11 @@ class Ai1ec_Clone_Renderer_Helper extends Ai1ec_Base {
|
|
83 |
return;
|
84 |
}
|
85 |
|
86 |
-
return apply_filters(
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
}
|
83 |
return;
|
84 |
}
|
85 |
|
86 |
+
return apply_filters(
|
87 |
+
'duplicate_post_get_clone_post_link',
|
88 |
+
wp_nonce_url( admin_url( "admin.php". $action ), 'ai1ec_clone_' . $post->ID ),
|
89 |
+
$post->ID,
|
90 |
+
$context
|
91 |
+
);
|
92 |
}
|
93 |
}
|
lib/command/abstract.php
CHANGED
@@ -68,10 +68,10 @@ abstract class Ai1ec_Command {
|
|
68 |
* @return void
|
69 |
*/
|
70 |
public function execute() {
|
71 |
-
// get the data from the concrete implementation
|
72 |
-
$data = $this->do_execute();
|
73 |
// Set the render strategy
|
74 |
$this->set_render_strategy( $this->_request );
|
|
|
|
|
75 |
// render it.
|
76 |
$this->_render_strategy->render( $data );
|
77 |
}
|
68 |
* @return void
|
69 |
*/
|
70 |
public function execute() {
|
|
|
|
|
71 |
// Set the render strategy
|
72 |
$this->set_render_strategy( $this->_request );
|
73 |
+
// get the data from the concrete implementation
|
74 |
+
$data = $this->do_execute();
|
75 |
// render it.
|
76 |
$this->_render_strategy->render( $data );
|
77 |
}
|
lib/command/change-theme.php
CHANGED
@@ -69,7 +69,7 @@ class Ai1ec_Command_Change_Theme extends Ai1ec_Command {
|
|
69 |
if (
|
70 |
isset( $_GET['ai1ec_action'] ) &&
|
71 |
$_GET['ai1ec_action'] === 'activate_theme' &&
|
72 |
-
current_user_can( '
|
73 |
is_dir( $_GET['ai1ec_theme_dir'] ) &&
|
74 |
is_dir( $_GET['ai1ec_theme_root'] )
|
75 |
) {
|
69 |
if (
|
70 |
isset( $_GET['ai1ec_action'] ) &&
|
71 |
$_GET['ai1ec_action'] === 'activate_theme' &&
|
72 |
+
current_user_can( 'switch_ai1ec_themes' ) &&
|
73 |
is_dir( $_GET['ai1ec_theme_dir'] ) &&
|
74 |
is_dir( $_GET['ai1ec_theme_root'] )
|
75 |
) {
|
lib/command/clone.php
CHANGED
@@ -94,12 +94,15 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
94 |
return true;
|
95 |
}
|
96 |
|
|
|
|
|
97 |
// duplicate single post
|
98 |
if (
|
99 |
isset( $_REQUEST['action'] ) &&
|
100 |
$_REQUEST['action'] === 'duplicate_post_save_as_new_post' &&
|
101 |
! empty( $_REQUEST['post'] )
|
102 |
) {
|
|
|
103 |
|
104 |
$this->_posts[] = array(
|
105 |
'status' => '',
|
@@ -114,6 +117,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
114 |
$_REQUEST['action'] === 'duplicate_post_save_as_new_post_draft' &&
|
115 |
! empty( $_REQUEST['post'] )
|
116 |
) {
|
|
|
117 |
$this->_posts[] = array(
|
118 |
'status' => 'draft',
|
119 |
'post' => get_post( $_REQUEST['post'] )
|
@@ -131,16 +135,18 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
131 |
*/
|
132 |
public function set_render_strategy( Ai1ec_Request_Parser $request ) {
|
133 |
if ( true === $this->_redirect ) {
|
134 |
-
$this->_render_strategy = $this->_registry
|
|
|
135 |
} else {
|
136 |
-
$this->_render_strategy = $this->_registry
|
|
|
137 |
}
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
* Create a duplicate from a posts' instance
|
142 |
*/
|
143 |
-
public function duplicate_post_create_duplicate( $post
|
144 |
$post = get_post( $post );
|
145 |
$new_post_author = $this->_duplicate_post_get_current_user();
|
146 |
$new_post_status = $status;
|
@@ -156,7 +162,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
156 |
'pinged' => $post->pinged,
|
157 |
'post_author' => $new_post_author->ID,
|
158 |
'post_content' => $post->post_content,
|
159 |
-
'post_date' => $post->post_date
|
160 |
'post_date_gmt' => get_gmt_from_date( $post->post_date ),
|
161 |
'post_excerpt' => $post->post_excerpt,
|
162 |
'post_parent' => $post->post_parent,
|
@@ -184,9 +190,14 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
184 |
|
185 |
if ( $this->_registry->get( 'acl.aco' )->is_our_post_type( $post ) ) {
|
186 |
try {
|
187 |
-
$old_event
|
188 |
-
$old_event->set( 'post_id',
|
189 |
-
$old_event->set( 'post',
|
|
|
|
|
|
|
|
|
|
|
190 |
$old_event->save();
|
191 |
} catch ( Ai1ec_Event_Not_Found_Exception $exception ) {
|
192 |
/* ignore */
|
@@ -224,7 +235,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
224 |
/**
|
225 |
* Copy the meta information of a post to another post
|
226 |
*/
|
227 |
-
protected function _duplicate_post_copy_post_meta_info( $new_id
|
228 |
$post_meta_keys = get_post_custom_keys( $post->ID );
|
229 |
if ( empty( $post_meta_keys ) ) return;
|
230 |
//$meta_blacklist = explode(",",get_option('duplicate_post_blacklist'));
|
@@ -245,16 +256,23 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
245 |
* Copy the attachments
|
246 |
* It simply copies the table entries, actual file won't be duplicated
|
247 |
*/
|
248 |
-
protected function _duplicate_post_copy_attachments( $new_id
|
249 |
//if (get_option('duplicate_post_copyattachments') == 0) return;
|
250 |
|
251 |
// get old attachments
|
252 |
-
$attachments = get_posts(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
// clone old attachments
|
254 |
foreach ( $attachments as $att ) {
|
255 |
$new_att_author = $this->_duplicate_post_get_current_user();
|
256 |
|
257 |
-
$new_att = array
|
258 |
'menu_order' => $att->menu_order,
|
259 |
'comment_status' => $att->comment_status,
|
260 |
'guid' => $att->guid,
|
@@ -262,7 +280,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
262 |
'pinged' => $att->pinged,
|
263 |
'post_author' => $new_att_author->ID,
|
264 |
'post_content' => $att->post_content,
|
265 |
-
'post_date' => $att->post_date
|
266 |
'post_date_gmt' => get_gmt_from_date( $att->post_date ),
|
267 |
'post_excerpt' => $att->post_excerpt,
|
268 |
'post_mime_type' => $att->post_mime_type,
|
@@ -273,13 +291,19 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
273 |
),
|
274 |
'post_title' => $att->post_title,
|
275 |
'post_type' => $att->post_type,
|
276 |
-
'to_ping' => $att->to_ping
|
277 |
);
|
278 |
|
279 |
$new_att_id = wp_insert_post( $new_att );
|
280 |
|
281 |
// get and apply a unique slug
|
282 |
-
$att_name = wp_unique_post_slug(
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
$new_att = array();
|
284 |
$new_att['ID'] = $new_att_id;
|
285 |
$new_att['post_name'] = $att_name;
|
@@ -293,7 +317,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
293 |
/**
|
294 |
* Copy the taxonomies of a post to another post
|
295 |
*/
|
296 |
-
protected function _duplicate_post_copy_post_taxonomies( $new_id
|
297 |
$db = $this->_registry->get( 'dbi.dbi' );
|
298 |
if ( $db->are_terms_set() ) {
|
299 |
// Clear default category (added by wp_insert_post)
|
@@ -304,9 +328,13 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
304 |
$taxonomies_blacklist = array();
|
305 |
$taxonomies = array_diff( $post_taxonomies , $taxonomies_blacklist );
|
306 |
foreach ( $taxonomies as $taxonomy ) {
|
307 |
-
$post_terms = wp_get_object_terms(
|
|
|
|
|
|
|
|
|
308 |
$terms = array();
|
309 |
-
for ( $i=0; $i<count( $post_terms ); $i++ ) {
|
310 |
$terms[] = $post_terms[ $i ]->slug;
|
311 |
}
|
312 |
wp_set_object_terms( $new_id , $terms , $taxonomy );
|
94 |
return true;
|
95 |
}
|
96 |
|
97 |
+
// other actions need the nonce to be verified
|
98 |
+
|
99 |
// duplicate single post
|
100 |
if (
|
101 |
isset( $_REQUEST['action'] ) &&
|
102 |
$_REQUEST['action'] === 'duplicate_post_save_as_new_post' &&
|
103 |
! empty( $_REQUEST['post'] )
|
104 |
) {
|
105 |
+
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
106 |
|
107 |
$this->_posts[] = array(
|
108 |
'status' => '',
|
117 |
$_REQUEST['action'] === 'duplicate_post_save_as_new_post_draft' &&
|
118 |
! empty( $_REQUEST['post'] )
|
119 |
) {
|
120 |
+
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
121 |
$this->_posts[] = array(
|
122 |
'status' => 'draft',
|
123 |
'post' => get_post( $_REQUEST['post'] )
|
135 |
*/
|
136 |
public function set_render_strategy( Ai1ec_Request_Parser $request ) {
|
137 |
if ( true === $this->_redirect ) {
|
138 |
+
$this->_render_strategy = $this->_registry
|
139 |
+
->get( 'http.response.render.strategy.redirect' );
|
140 |
} else {
|
141 |
+
$this->_render_strategy = $this->_registry
|
142 |
+
->get( 'http.response.render.strategy.void' );
|
143 |
}
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
* Create a duplicate from a posts' instance
|
148 |
*/
|
149 |
+
public function duplicate_post_create_duplicate( $post, $status = '' ) {
|
150 |
$post = get_post( $post );
|
151 |
$new_post_author = $this->_duplicate_post_get_current_user();
|
152 |
$new_post_status = $status;
|
162 |
'pinged' => $post->pinged,
|
163 |
'post_author' => $new_post_author->ID,
|
164 |
'post_content' => $post->post_content,
|
165 |
+
'post_date' => $post->post_date,
|
166 |
'post_date_gmt' => get_gmt_from_date( $post->post_date ),
|
167 |
'post_excerpt' => $post->post_excerpt,
|
168 |
'post_parent' => $post->post_parent,
|
190 |
|
191 |
if ( $this->_registry->get( 'acl.aco' )->is_our_post_type( $post ) ) {
|
192 |
try {
|
193 |
+
$old_event = $this->_registry->get( 'model.event', $post->ID );
|
194 |
+
$old_event->set( 'post_id', $new_post_id );
|
195 |
+
$old_event->set( 'post', null );
|
196 |
+
$old_event->set( 'ical_feed_url', null );
|
197 |
+
$old_event->set( 'ical_source_url', null );
|
198 |
+
$old_event->set( 'ical_organizer', null );
|
199 |
+
$old_event->set( 'ical_contact', null );
|
200 |
+
$old_event->set( 'ical_uid', null );
|
201 |
$old_event->save();
|
202 |
} catch ( Ai1ec_Event_Not_Found_Exception $exception ) {
|
203 |
/* ignore */
|
235 |
/**
|
236 |
* Copy the meta information of a post to another post
|
237 |
*/
|
238 |
+
protected function _duplicate_post_copy_post_meta_info( $new_id, $post ) {
|
239 |
$post_meta_keys = get_post_custom_keys( $post->ID );
|
240 |
if ( empty( $post_meta_keys ) ) return;
|
241 |
//$meta_blacklist = explode(",",get_option('duplicate_post_blacklist'));
|
256 |
* Copy the attachments
|
257 |
* It simply copies the table entries, actual file won't be duplicated
|
258 |
*/
|
259 |
+
protected function _duplicate_post_copy_attachments( $new_id, $post ) {
|
260 |
//if (get_option('duplicate_post_copyattachments') == 0) return;
|
261 |
|
262 |
// get old attachments
|
263 |
+
$attachments = get_posts(
|
264 |
+
array(
|
265 |
+
'post_type' => 'attachment',
|
266 |
+
'numberposts' => -1,
|
267 |
+
'post_status' => null,
|
268 |
+
'post_parent' => $post->ID,
|
269 |
+
)
|
270 |
+
);
|
271 |
// clone old attachments
|
272 |
foreach ( $attachments as $att ) {
|
273 |
$new_att_author = $this->_duplicate_post_get_current_user();
|
274 |
|
275 |
+
$new_att = array(
|
276 |
'menu_order' => $att->menu_order,
|
277 |
'comment_status' => $att->comment_status,
|
278 |
'guid' => $att->guid,
|
280 |
'pinged' => $att->pinged,
|
281 |
'post_author' => $new_att_author->ID,
|
282 |
'post_content' => $att->post_content,
|
283 |
+
'post_date' => $att->post_date,
|
284 |
'post_date_gmt' => get_gmt_from_date( $att->post_date ),
|
285 |
'post_excerpt' => $att->post_excerpt,
|
286 |
'post_mime_type' => $att->post_mime_type,
|
291 |
),
|
292 |
'post_title' => $att->post_title,
|
293 |
'post_type' => $att->post_type,
|
294 |
+
'to_ping' => $att->to_ping,
|
295 |
);
|
296 |
|
297 |
$new_att_id = wp_insert_post( $new_att );
|
298 |
|
299 |
// get and apply a unique slug
|
300 |
+
$att_name = wp_unique_post_slug(
|
301 |
+
$att->post_name,
|
302 |
+
$new_att_id,
|
303 |
+
$att->post_status,
|
304 |
+
$att->post_type,
|
305 |
+
$new_id
|
306 |
+
);
|
307 |
$new_att = array();
|
308 |
$new_att['ID'] = $new_att_id;
|
309 |
$new_att['post_name'] = $att_name;
|
317 |
/**
|
318 |
* Copy the taxonomies of a post to another post
|
319 |
*/
|
320 |
+
protected function _duplicate_post_copy_post_taxonomies( $new_id, $post ) {
|
321 |
$db = $this->_registry->get( 'dbi.dbi' );
|
322 |
if ( $db->are_terms_set() ) {
|
323 |
// Clear default category (added by wp_insert_post)
|
328 |
$taxonomies_blacklist = array();
|
329 |
$taxonomies = array_diff( $post_taxonomies , $taxonomies_blacklist );
|
330 |
foreach ( $taxonomies as $taxonomy ) {
|
331 |
+
$post_terms = wp_get_object_terms(
|
332 |
+
$post->ID ,
|
333 |
+
$taxonomy ,
|
334 |
+
array( 'orderby' => 'term_order' )
|
335 |
+
);
|
336 |
$terms = array();
|
337 |
+
for ( $i = 0; $i < count( $post_terms ); $i++ ) {
|
338 |
$terms[] = $post_terms[ $i ]->slug;
|
339 |
}
|
340 |
wp_set_object_terms( $new_id , $terms , $taxonomy );
|
lib/command/compile-core-css.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The concrete command that compiles CSS.
|
4 |
+
*
|
5 |
+
* @author Time.ly Network Inc.
|
6 |
+
* @since 2.1
|
7 |
+
*
|
8 |
+
* @package AI1EC
|
9 |
+
* @subpackage AI1EC.Command
|
10 |
+
*/
|
11 |
+
class Ai1ec_Command_Compile_Core_Css extends Ai1ec_Command {
|
12 |
+
|
13 |
+
/*
|
14 |
+
* (non-PHPdoc) @see Ai1ec_Command::is_this_to_execute()
|
15 |
+
*/
|
16 |
+
public function is_this_to_execute() {
|
17 |
+
if ( isset( $_GET['ai1ec_compile_css'] ) &&
|
18 |
+
$_SERVER['SERVER_ADDR'] === $_SERVER['REMOTE_ADDR'] &&
|
19 |
+
AI1EC_DEBUG
|
20 |
+
) {
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
return false;
|
24 |
+
}
|
25 |
+
|
26 |
+
/* (non-PHPdoc)
|
27 |
+
* @see Ai1ec_Command::set_render_strategy()
|
28 |
+
*/
|
29 |
+
public function set_render_strategy( Ai1ec_Request_Parser $request ) {
|
30 |
+
$this->_render_strategy = $this->_registry->get(
|
31 |
+
'http.response.render.strategy.void'
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
/* (non-PHPdoc)
|
36 |
+
* @see Ai1ec_Command::do_execute()
|
37 |
+
*/
|
38 |
+
public function do_execute() {
|
39 |
+
$less = $frontend = $this->_registry->get( 'less.lessphp' );
|
40 |
+
$css = $less->parse_less_files( null, true );
|
41 |
+
|
42 |
+
$filename = AI1EC_DEFAULT_THEME_PATH . DIRECTORY_SEPARATOR .
|
43 |
+
'css' . DIRECTORY_SEPARATOR . 'ai1ec_parsed_css.css';
|
44 |
+
if ( false === @file_put_contents( $filename, $css ) ) {
|
45 |
+
echo 'There has been an error writing core CSS';
|
46 |
+
} else {
|
47 |
+
echo 'Core CSS compiled succesfully and written in ' . $filename;
|
48 |
+
}
|
49 |
+
return array(
|
50 |
+
);
|
51 |
+
}
|
52 |
+
}
|
lib/command/disable-gzip.php
CHANGED
@@ -15,6 +15,7 @@ class Ai1ec_Command_Disable_Gzip extends Ai1ec_Command {
|
|
15 |
*/
|
16 |
public function is_this_to_execute() {
|
17 |
if ( isset( $_GET['ai1ec_disable_gzip_compression'] ) ) {
|
|
|
18 |
return true;
|
19 |
}
|
20 |
return false;
|
15 |
*/
|
16 |
public function is_this_to_execute() {
|
17 |
if ( isset( $_GET['ai1ec_disable_gzip_compression'] ) ) {
|
18 |
+
check_admin_referer( 'ai1ec_disable_gzip_compression' );
|
19 |
return true;
|
20 |
}
|
21 |
return false;
|
lib/command/render-calendar.php
CHANGED
@@ -10,6 +10,11 @@
|
|
10 |
* @subpackage AI1EC.Command
|
11 |
*/
|
12 |
class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Command::is_this_to_execute()
|
@@ -46,6 +51,7 @@ class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
|
46 |
if ( empty( $type ) ) {
|
47 |
$type = 'html';
|
48 |
}
|
|
|
49 |
$this->_render_strategy = $this->_registry->get(
|
50 |
'http.response.render.strategy.' . $type
|
51 |
);
|
10 |
* @subpackage AI1EC.Command
|
11 |
*/
|
12 |
class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
protected $_request_type;
|
18 |
|
19 |
/* (non-PHPdoc)
|
20 |
* @see Ai1ec_Command::is_this_to_execute()
|
51 |
if ( empty( $type ) ) {
|
52 |
$type = 'html';
|
53 |
}
|
54 |
+
$this->_request_type = $type;
|
55 |
$this->_render_strategy = $this->_registry->get(
|
56 |
'http.response.render.strategy.' . $type
|
57 |
);
|
lib/command/render-event.php
CHANGED
@@ -55,6 +55,17 @@ class Ai1ec_Command_Render_Event extends Ai1ec_Command_Render_Calendar {
|
|
55 |
}
|
56 |
$css = $this->_registry->get( 'css.frontend' )->add_link_to_html_for_frontend();
|
57 |
$js = $this->_registry->get( 'controller.javascript' )->load_frontend_js( false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
$to_return = array(
|
59 |
'data' => $event_page->get_content( $event ),
|
60 |
'is_event' => true,
|
55 |
}
|
56 |
$css = $this->_registry->get( 'css.frontend' )->add_link_to_html_for_frontend();
|
57 |
$js = $this->_registry->get( 'controller.javascript' )->load_frontend_js( false );
|
58 |
+
if ( 'html' !== $this->_request_type ) {
|
59 |
+
return array(
|
60 |
+
'data' => array(
|
61 |
+
'html' => $event_page->get_full_article( $event )
|
62 |
+
),
|
63 |
+
'callback' => Ai1ec_Request_Parser::get_param(
|
64 |
+
'callback',
|
65 |
+
null
|
66 |
+
),
|
67 |
+
);
|
68 |
+
}
|
69 |
$to_return = array(
|
70 |
'data' => $event_page->get_content( $event ),
|
71 |
'is_event' => true,
|
lib/command/resolver.php
CHANGED
@@ -89,6 +89,11 @@ class Ai1ec_Command_Resolver {
|
|
89 |
'command.clone', $request
|
90 |
)
|
91 |
);
|
|
|
|
|
|
|
|
|
|
|
92 |
$request->parse();
|
93 |
$this->_registry = $registry;
|
94 |
$this->_request = $request;
|
89 |
'command.clone', $request
|
90 |
)
|
91 |
);
|
92 |
+
$this->add_command(
|
93 |
+
$registry->get(
|
94 |
+
'command.compile-core-css', $request
|
95 |
+
)
|
96 |
+
);
|
97 |
$request->parse();
|
98 |
$this->_registry = $registry;
|
99 |
$this->_request = $request;
|
lib/command/save-settings.php
CHANGED
@@ -22,6 +22,7 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
22 |
isset( $_POST['default_categories'] )
|
23 |
);
|
24 |
$_POST['enabled_views'] = true;
|
|
|
25 |
foreach ( $options as $name => $data ) {
|
26 |
$value = null;
|
27 |
if ( isset( $_POST[$name] ) ) {
|
@@ -51,11 +52,27 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
51 |
break;
|
52 |
case 'array':
|
53 |
$method = '_handle_saving_' . $name;
|
54 |
-
$value =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
break;
|
56 |
case 'mixed':
|
57 |
$method = '_handle_saving_' . $name;
|
58 |
-
$value =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
break;
|
60 |
case 'wp_option': // set the corresponding WP option
|
61 |
$this->_registry->get( 'model.option' )
|
@@ -97,6 +114,11 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
97 |
foreach ( $enabled_views as $view => &$options ) {
|
98 |
$options['enabled'] = isset( $_POST['view_' . $view . '_enabled'] );
|
99 |
$options['default'] = $_POST['default_calendar_view'] === $view;
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
return $enabled_views;
|
102 |
}
|
@@ -141,5 +163,4 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
141 |
return (int)$calendar_page;
|
142 |
}
|
143 |
}
|
144 |
-
|
145 |
-
}
|
22 |
isset( $_POST['default_categories'] )
|
23 |
);
|
24 |
$_POST['enabled_views'] = true;
|
25 |
+
do_action( 'ai1ec_before_save_settings', $_POST );
|
26 |
foreach ( $options as $name => $data ) {
|
27 |
$value = null;
|
28 |
if ( isset( $_POST[$name] ) ) {
|
52 |
break;
|
53 |
case 'array':
|
54 |
$method = '_handle_saving_' . $name;
|
55 |
+
$value = null;
|
56 |
+
if ( method_exists( $this, $method ) ) {
|
57 |
+
$value = $this->$method();
|
58 |
+
}
|
59 |
+
$value = apply_filters(
|
60 |
+
'ai1ec' . $method,
|
61 |
+
$value,
|
62 |
+
$_REQUEST
|
63 |
+
);
|
64 |
break;
|
65 |
case 'mixed':
|
66 |
$method = '_handle_saving_' . $name;
|
67 |
+
$value = null;
|
68 |
+
if ( method_exists( $this, $method ) ) {
|
69 |
+
$value = $this->$method( $_POST[$name] );
|
70 |
+
}
|
71 |
+
$value = apply_filters(
|
72 |
+
'ai1ec' . $method,
|
73 |
+
$value,
|
74 |
+
$_REQUEST
|
75 |
+
);
|
76 |
break;
|
77 |
case 'wp_option': // set the corresponding WP option
|
78 |
$this->_registry->get( 'model.option' )
|
114 |
foreach ( $enabled_views as $view => &$options ) {
|
115 |
$options['enabled'] = isset( $_POST['view_' . $view . '_enabled'] );
|
116 |
$options['default'] = $_POST['default_calendar_view'] === $view;
|
117 |
+
$options['enabled_mobile'] =
|
118 |
+
isset( $_POST['view_' . $view . '_enabled_mobile'] );
|
119 |
+
$options['default_mobile'] =
|
120 |
+
isset( $_POST['default_calendar_view_mobile'] ) &&
|
121 |
+
$_POST['default_calendar_view_mobile'] === $view;
|
122 |
}
|
123 |
return $enabled_views;
|
124 |
}
|
163 |
return (int)$calendar_page;
|
164 |
}
|
165 |
}
|
166 |
+
}
|
|
lib/compatibility/cli.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Command line compatibility options.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network, Inc.
|
7 |
+
* @since 2.1
|
8 |
+
* @package Ai1EC
|
9 |
+
* @subpackage Ai1EC.Compatibility
|
10 |
+
*/
|
11 |
+
class Ai1ec_Compatibility_Cli {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var bool Whereas current session is command line.
|
15 |
+
*/
|
16 |
+
protected $_is_cli = false;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Check current SAPI.
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function __construct() {
|
24 |
+
$this->_is_cli = 'cli' === php_sapi_name();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Check if running command line session.
|
29 |
+
*
|
30 |
+
* @return bool Yes/No
|
31 |
+
*/
|
32 |
+
public function is_cli() {
|
33 |
+
return $this->_is_cli;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Disable DB debug when in command line session.
|
38 |
+
*
|
39 |
+
* @param bool $debug Current value.
|
40 |
+
*
|
41 |
+
* @return bool Optionally modified value.
|
42 |
+
*/
|
43 |
+
public function disable_db_debug( $debug ) {
|
44 |
+
if ( $this->_is_cli ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
return $debug;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
lib/compatibility/ob.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Wrapper for all the output buffer calls (ob_*)
|
5 |
*/
|
6 |
-
class Ai1ec_Compatibility_OutputBuffer {
|
7 |
|
8 |
/**
|
9 |
* Wrap the ob_end_flush() method:
|
@@ -64,6 +64,24 @@ class Ai1ec_Compatibility_OutputBuffer {
|
|
64 |
return ob_start( $output_callback, $chunk_size, $flags );
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* Check if zlib compression is activated.
|
69 |
*
|
3 |
/**
|
4 |
* Wrapper for all the output buffer calls (ob_*)
|
5 |
*/
|
6 |
+
class Ai1ec_Compatibility_OutputBuffer extends Ai1ec_Base {
|
7 |
|
8 |
/**
|
9 |
* Wrap the ob_end_flush() method:
|
64 |
return ob_start( $output_callback, $chunk_size, $flags );
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Gzip the content if possible.
|
69 |
+
*
|
70 |
+
* @param string $string
|
71 |
+
*/
|
72 |
+
public function gzip_if_possible( $string ) {
|
73 |
+
$gzip = $this->_registry->get( 'http.request' )->client_use_gzip();
|
74 |
+
// only use output buffering for gzip.
|
75 |
+
if ( $gzip ) {
|
76 |
+
$this->start( 'ob_gzhandler' );
|
77 |
+
header( 'Content-Encoding: gzip' );
|
78 |
+
}
|
79 |
+
echo $string;
|
80 |
+
if ( $gzip ) {
|
81 |
+
$this->end_flush();
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
/**
|
86 |
* Check if zlib compression is activated.
|
87 |
*
|
lib/css/frontend.php
CHANGED
@@ -18,7 +18,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
18 |
|
19 |
const KEY_FOR_PERSISTANCE = 'ai1ec_parsed_css';
|
20 |
/**
|
21 |
-
* @var
|
22 |
*/
|
23 |
private $persistance_context;
|
24 |
|
@@ -28,35 +28,89 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
28 |
private $lessphp_controller;
|
29 |
|
30 |
/**
|
31 |
-
* @var
|
32 |
*/
|
33 |
private $db_adapter;
|
34 |
|
35 |
/**
|
36 |
-
* @var
|
37 |
*/
|
38 |
-
private $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
/**
|
41 |
-
* @var
|
42 |
*/
|
43 |
-
|
44 |
|
45 |
public function __construct(
|
46 |
-
Ai1ec_Registry_Object $registry
|
47 |
-
$preview_mode = false
|
48 |
) {
|
49 |
parent::__construct( $registry );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
$this->persistance_context = $this->_registry->get(
|
51 |
'cache.strategy.persistence-context',
|
52 |
self::KEY_FOR_PERSISTANCE,
|
53 |
-
|
|
|
54 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
$this->lessphp_controller = $this->_registry->get( 'less.lessphp' );
|
56 |
$this->db_adapter = $this->_registry->get( 'model.option' );
|
57 |
-
$this->preview_mode = $preview_mode;
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
/**
|
61 |
* Renders the css for our frontend.
|
62 |
*
|
@@ -84,16 +138,8 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
84 |
$etag !== stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] )
|
85 |
) {
|
86 |
// compress data if possible
|
87 |
-
$
|
88 |
-
|
89 |
-
$compatibility_ob->start( 'ob_gzhandler' );
|
90 |
-
header( 'Content-Encoding: gzip' );
|
91 |
-
} else {
|
92 |
-
$compatibility_ob->start();
|
93 |
-
}
|
94 |
-
$content = $this->get_compiled_css();
|
95 |
-
echo $content;
|
96 |
-
$compatibility_ob->end_flush();
|
97 |
} else {
|
98 |
// Not modified!
|
99 |
status_header( 304 );
|
@@ -108,8 +154,8 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
108 |
* @throws Ai1ec_Cache_Write_Exception
|
109 |
*/
|
110 |
public function update_persistence_layer( $css ) {
|
111 |
-
$this->persistance_context->write_data_to_persistence( $css );
|
112 |
-
$this->save_less_parse_time();
|
113 |
}
|
114 |
|
115 |
|
@@ -119,26 +165,46 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
119 |
* @return string
|
120 |
*/
|
121 |
public function get_css_url() {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
* Create the link that will be added to the frontend
|
132 |
*/
|
133 |
public function add_link_to_html_for_frontend() {
|
134 |
-
$
|
135 |
-
if(
|
136 |
-
|
137 |
-
$now = strtotime( 'now' );
|
138 |
-
$preview = "&preview=1&nocache={$now}&ai1ec_stylesheet=" . $_GET['ai1ec_stylesheet'];
|
139 |
}
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
/**
|
@@ -154,13 +220,13 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
154 |
array $variables = null,
|
155 |
$update_persistence = false
|
156 |
) {
|
157 |
-
// Reset the parse time to force a browser reload of the CSS, whether we are
|
158 |
-
// updating persistence or not.
|
159 |
-
$this->save_less_parse_time();
|
160 |
$notification = $this->_registry->get( 'notification.admin' );
|
161 |
try {
|
162 |
// Try to parse the css
|
163 |
$css = $this->lessphp_controller->parse_less_files( $variables );
|
|
|
|
|
|
|
164 |
if ( $update_persistence ) {
|
165 |
$this->update_persistence_layer( $css );
|
166 |
} else {
|
@@ -225,10 +291,10 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
225 |
* If we are in preview mode, recompile the css using the theme present in the url.
|
226 |
*
|
227 |
*/
|
228 |
-
|
229 |
try {
|
230 |
// If we want to force a recompile, we throw an exception.
|
231 |
-
if(
|
232 |
throw new Ai1ec_Cache_Not_Set_Exception();
|
233 |
}else {
|
234 |
// This throws an exception if the key is not set
|
@@ -236,18 +302,28 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
236 |
return $css;
|
237 |
}
|
238 |
} catch ( Ai1ec_Cache_Not_Set_Exception $e ) {
|
239 |
-
|
240 |
-
if( $this->preview_mode ) {
|
241 |
-
return $this->lessphp_controller->parse_less_files(
|
242 |
-
$this->lessphp_controller->get_less_variable_data_from_config_file()
|
243 |
-
);
|
244 |
-
} else {
|
245 |
-
$css = $this->lessphp_controller->parse_less_files();
|
246 |
-
}
|
247 |
try {
|
248 |
$this->update_persistence_layer( $css );
|
249 |
return $css;
|
250 |
} catch ( Ai1ec_Cache_Write_Exception $e ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
// If something is really broken, still return the css.
|
252 |
// This means we parse it every time. This should never happen.
|
253 |
return $css;
|
@@ -256,12 +332,15 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
-
* Save the
|
260 |
*/
|
261 |
-
private function save_less_parse_time() {
|
|
|
|
|
|
|
262 |
$this->db_adapter->set(
|
263 |
self::QUERY_STRING_PARAM,
|
264 |
-
$
|
265 |
true
|
266 |
);
|
267 |
}
|
18 |
|
19 |
const KEY_FOR_PERSISTANCE = 'ai1ec_parsed_css';
|
20 |
/**
|
21 |
+
* @var Ai1ec_Persistence_Context
|
22 |
*/
|
23 |
private $persistance_context;
|
24 |
|
28 |
private $lessphp_controller;
|
29 |
|
30 |
/**
|
31 |
+
* @var Ai1ec_Option
|
32 |
*/
|
33 |
private $db_adapter;
|
34 |
|
35 |
/**
|
36 |
+
* @var Ai1ec_Template_Adapter
|
37 |
*/
|
38 |
+
private $template_adapter;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Possible paths/url for file cache
|
42 |
+
*
|
43 |
+
* @var array
|
44 |
+
*/
|
45 |
+
protected $_cache_paths = array();
|
46 |
|
47 |
/**
|
48 |
+
* @var array which have been checked and are not writable
|
49 |
*/
|
50 |
+
protected $_folders_not_writable = array();
|
51 |
|
52 |
public function __construct(
|
53 |
+
Ai1ec_Registry_Object $registry
|
|
|
54 |
) {
|
55 |
parent::__construct( $registry );
|
56 |
+
$this->_cache_paths[] = array(
|
57 |
+
'path' => AI1EC_CACHE_PATH,
|
58 |
+
'url' => AI1EC_CACHE_URL
|
59 |
+
);
|
60 |
+
$filesystem = $this->_registry->get( 'filesystem.checker' );
|
61 |
+
$wp_static_folder = $filesystem->get_ai1ec_static_dir_if_available();
|
62 |
+
if ( '' !== $wp_static_folder ) {
|
63 |
+
$this->_cache_paths[] = array(
|
64 |
+
'path' => $wp_static_folder,
|
65 |
+
'url' => content_url() . '/ai1ec_static/'
|
66 |
+
);
|
67 |
+
}
|
68 |
$this->persistance_context = $this->_registry->get(
|
69 |
'cache.strategy.persistence-context',
|
70 |
self::KEY_FOR_PERSISTANCE,
|
71 |
+
$this->_cache_paths,
|
72 |
+
true
|
73 |
);
|
74 |
+
if ( ! $this->persistance_context->is_file_cache() ) {
|
75 |
+
foreach ( $this->_cache_paths as $cache_path ) {
|
76 |
+
$this->_folders_not_writable[] = $cache_path['path'];
|
77 |
+
}
|
78 |
+
$this->_registry->get( 'notification.admin' )
|
79 |
+
->store(
|
80 |
+
sprintf(
|
81 |
+
__(
|
82 |
+
'Cache directories, <code>%s</code>, are not writable. Your calendar will perform more slowly until you make this directory writable by the web server.',
|
83 |
+
AI1EC_PLUGIN_NAME
|
84 |
+
),
|
85 |
+
implode( '</code><code>', $this->_folders_not_writable )
|
86 |
+
),
|
87 |
+
'error',
|
88 |
+
2,
|
89 |
+
array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
|
90 |
+
true
|
91 |
+
);
|
92 |
+
}
|
93 |
$this->lessphp_controller = $this->_registry->get( 'less.lessphp' );
|
94 |
$this->db_adapter = $this->_registry->get( 'model.option' );
|
|
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
*
|
99 |
+
* Get if file cache is enabled
|
100 |
+
* @return boolean
|
101 |
+
*/
|
102 |
+
public function is_file_cache_enabled() {
|
103 |
+
return $this->persistance_context->is_file_cache();
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get folders which are not writable
|
108 |
+
*
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
public function get_folders_not_writable() {
|
112 |
+
return $this->_folders_not_writable;
|
113 |
+
}
|
114 |
/**
|
115 |
* Renders the css for our frontend.
|
116 |
*
|
138 |
$etag !== stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] )
|
139 |
) {
|
140 |
// compress data if possible
|
141 |
+
$this->_registry->get( 'compatibility.ob' )
|
142 |
+
->gzip_if_possible( $this->get_compiled_css() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
} else {
|
144 |
// Not modified!
|
145 |
status_header( 304 );
|
154 |
* @throws Ai1ec_Cache_Write_Exception
|
155 |
*/
|
156 |
public function update_persistence_layer( $css ) {
|
157 |
+
$filename = $this->persistance_context->write_data_to_persistence( $css );
|
158 |
+
$this->save_less_parse_time( $filename['url'] );
|
159 |
}
|
160 |
|
161 |
|
165 |
* @return string
|
166 |
*/
|
167 |
public function get_css_url() {
|
168 |
+
// get what's saved. I t could be false, a int or a string.
|
169 |
+
// if it's false or a int, use PHP to render CSS
|
170 |
+
$saved_par = $this->db_adapter->get( self::QUERY_STRING_PARAM );
|
171 |
+
// if it's empty it's a new install probably. Return static css.
|
172 |
+
// if it's numeric, just consider it a new install
|
173 |
+
if ( empty( $saved_par ) ) {
|
174 |
+
return AI1EC_URL . '/public/themes-ai1ec/vortex/css/ai1ec_parsed_css.css';
|
175 |
+
}
|
176 |
+
if ( is_numeric( $saved_par ) ) {
|
177 |
+
if ( $this->_registry->get( 'model.settings' )->get( 'render_css_as_link' ) ) {
|
178 |
+
$time = (int) $saved_par;
|
179 |
+
$template_helper = $this->_registry->get( 'template.link.helper' );
|
180 |
+
return add_query_arg(
|
181 |
+
array( self::QUERY_STRING_PARAM => $time, ),
|
182 |
+
trailingslashit( $template_helper->get_site_url() )
|
183 |
+
);
|
184 |
+
} else {
|
185 |
+
add_action( 'wp_head', array( $this, 'echo_css' ) );
|
186 |
+
return '';
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
// otherwise return the string
|
191 |
+
return $saved_par;
|
192 |
}
|
193 |
|
194 |
/**
|
195 |
* Create the link that will be added to the frontend
|
196 |
*/
|
197 |
public function add_link_to_html_for_frontend() {
|
198 |
+
$url = $this->get_css_url();
|
199 |
+
if ( '' !== $url ) {
|
200 |
+
wp_enqueue_style( 'ai1ec_style', $url, array(), AI1EC_VERSION );
|
|
|
|
|
201 |
}
|
202 |
+
}
|
203 |
+
|
204 |
+
public function echo_css() {
|
205 |
+
echo '<style>';
|
206 |
+
echo $this->get_compiled_css();
|
207 |
+
echo '</style>';
|
208 |
}
|
209 |
|
210 |
/**
|
220 |
array $variables = null,
|
221 |
$update_persistence = false
|
222 |
) {
|
|
|
|
|
|
|
223 |
$notification = $this->_registry->get( 'notification.admin' );
|
224 |
try {
|
225 |
// Try to parse the css
|
226 |
$css = $this->lessphp_controller->parse_less_files( $variables );
|
227 |
+
// Reset the parse time to force a browser reload of the CSS, whether we are
|
228 |
+
// updating persistence or not. Do it here to be sure files compile ok.
|
229 |
+
$this->save_less_parse_time();
|
230 |
if ( $update_persistence ) {
|
231 |
$this->update_persistence_layer( $css );
|
232 |
} else {
|
291 |
* If we are in preview mode, recompile the css using the theme present in the url.
|
292 |
*
|
293 |
*/
|
294 |
+
public function get_compiled_css() {
|
295 |
try {
|
296 |
// If we want to force a recompile, we throw an exception.
|
297 |
+
if( self::PARSE_LESS_FILES_AT_EVERY_REQUEST === true ) {
|
298 |
throw new Ai1ec_Cache_Not_Set_Exception();
|
299 |
}else {
|
300 |
// This throws an exception if the key is not set
|
302 |
return $css;
|
303 |
}
|
304 |
} catch ( Ai1ec_Cache_Not_Set_Exception $e ) {
|
305 |
+
$css = $this->lessphp_controller->parse_less_files();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
try {
|
307 |
$this->update_persistence_layer( $css );
|
308 |
return $css;
|
309 |
} catch ( Ai1ec_Cache_Write_Exception $e ) {
|
310 |
+
if ( ! self::PARSE_LESS_FILES_AT_EVERY_REQUEST ) {
|
311 |
+
$this->_registry->get( 'notification.admin' )
|
312 |
+
->store(
|
313 |
+
sprintf(
|
314 |
+
__(
|
315 |
+
'Your CSS is being compiled on every request, which causes your calendar to perform slowly. The following error occurred: %s',
|
316 |
+
AI1EC_PLUGIN_NAME
|
317 |
+
),
|
318 |
+
$e->getMessage()
|
319 |
+
),
|
320 |
+
'error',
|
321 |
+
2,
|
322 |
+
array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
|
323 |
+
true
|
324 |
+
);
|
325 |
+
}
|
326 |
+
|
327 |
// If something is really broken, still return the css.
|
328 |
// This means we parse it every time. This should never happen.
|
329 |
return $css;
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
+
* Save the path to the CSS file or false to load standard CSS
|
336 |
*/
|
337 |
+
private function save_less_parse_time( $data = false ) {
|
338 |
+
$to_save = is_string( $data ) ?
|
339 |
+
$data :
|
340 |
+
$this->_registry->get( 'date.system' )->current_time();
|
341 |
$this->db_adapter->set(
|
342 |
self::QUERY_STRING_PARAM,
|
343 |
+
$to_save,
|
344 |
true
|
345 |
);
|
346 |
}
|
lib/date/system.php
CHANGED
@@ -165,10 +165,12 @@ class Ai1ec_Date_System extends Ai1ec_Base {
|
|
165 |
/**
|
166 |
* Returns human-readable version of the GMT offset.
|
167 |
*
|
|
|
|
|
168 |
* @return string GMT offset expression
|
169 |
*/
|
170 |
-
public function get_gmt_offset_expr() {
|
171 |
-
$timezone = $this->get_gmt_offset();
|
172 |
$offset_h = (int)( $timezone / 60 );
|
173 |
$offset_m = absint( $timezone - $offset_h * 60 );
|
174 |
$timezone = sprintf(
|
@@ -183,13 +185,18 @@ class Ai1ec_Date_System extends Ai1ec_Base {
|
|
183 |
/**
|
184 |
* Get current GMT offset in seconds.
|
185 |
*
|
|
|
|
|
186 |
* @return int Offset from GMT in seconds.
|
187 |
*/
|
188 |
-
public function get_gmt_offset() {
|
|
|
|
|
|
|
189 |
$current = $this->_registry->get(
|
190 |
'date.time',
|
191 |
'now',
|
192 |
-
$
|
193 |
);
|
194 |
return $current->get_gmt_offset();
|
195 |
}
|
165 |
/**
|
166 |
* Returns human-readable version of the GMT offset.
|
167 |
*
|
168 |
+
* @param string $timezone_name Olsen Timezone name [optional=null]
|
169 |
+
*
|
170 |
* @return string GMT offset expression
|
171 |
*/
|
172 |
+
public function get_gmt_offset_expr( $timezone_name = null ) {
|
173 |
+
$timezone = $this->get_gmt_offset( $timezone_name );
|
174 |
$offset_h = (int)( $timezone / 60 );
|
175 |
$offset_m = absint( $timezone - $offset_h * 60 );
|
176 |
$timezone = sprintf(
|
185 |
/**
|
186 |
* Get current GMT offset in seconds.
|
187 |
*
|
188 |
+
* @param string $timezone_name Olsen Timezone name [optional=null]
|
189 |
+
*
|
190 |
* @return int Offset from GMT in seconds.
|
191 |
*/
|
192 |
+
public function get_gmt_offset( $timezone_name = null ) {
|
193 |
+
if ( null === $timezone_name ) {
|
194 |
+
$timezone_name = 'sys.default';
|
195 |
+
}
|
196 |
$current = $this->_registry->get(
|
197 |
'date.time',
|
198 |
'now',
|
199 |
+
$timezone_name
|
200 |
);
|
201 |
return $current->get_gmt_offset();
|
202 |
}
|
lib/date/time.php
CHANGED
@@ -26,6 +26,11 @@ class Ai1ec_Date_Time {
|
|
26 |
*/
|
27 |
protected $_preferred_timezone = null;
|
28 |
|
|
|
|
|
|
|
|
|
|
|
29 |
/**
|
30 |
* Initialize local date entity.
|
31 |
*
|
@@ -66,6 +71,9 @@ class Ai1ec_Date_Time {
|
|
66 |
* @throws Ai1ec_Date_Timezone_Exception If timezone is not recognized.
|
67 |
*/
|
68 |
public function format( $format = 'U', $timezone = null ) {
|
|
|
|
|
|
|
69 |
if ( 'U' === $format ) { // performance cut
|
70 |
return $this->_date_time->format( 'U' );
|
71 |
}
|
@@ -107,10 +115,15 @@ class Ai1ec_Date_Time {
|
|
107 |
/**
|
108 |
* Create JavaScript ready date/time information string.
|
109 |
*
|
|
|
|
|
110 |
* @return string JavaScript date/time string.
|
111 |
*/
|
112 |
-
public function format_to_javascript() {
|
113 |
-
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
/**
|
@@ -202,6 +215,10 @@ class Ai1ec_Date_Time {
|
|
202 |
* @return int Number of seconds between two dates.
|
203 |
*/
|
204 |
public function diff_sec( Ai1ec_Date_Time $comparable, $timezone = null ) {
|
|
|
|
|
|
|
|
|
205 |
if ( version_compare( PHP_VERSION, '5.3.0' ) < 0 ) {
|
206 |
$difference = $this->_date_time->format( 'U' ) -
|
207 |
$comparable->_date_time->format( 'U' );
|
@@ -230,6 +247,7 @@ class Ai1ec_Date_Time {
|
|
230 |
*/
|
231 |
public function set_date( $year, $month, $day ) {
|
232 |
$this->_date_time->setDate( $year, $month, $day );
|
|
|
233 |
return $this;
|
234 |
}
|
235 |
|
@@ -244,6 +262,7 @@ class Ai1ec_Date_Time {
|
|
244 |
*/
|
245 |
public function set_time( $hour, $minute = 0, $second = 0 ) {
|
246 |
$this->_date_time->setTime( $hour, $minute, $second );
|
|
|
247 |
return $this;
|
248 |
}
|
249 |
|
@@ -255,6 +274,8 @@ class Ai1ec_Date_Time {
|
|
255 |
* @return Ai1ec_Date_Time Instance of self for chaining.
|
256 |
*/
|
257 |
public function adjust_day( $quantifier ) {
|
|
|
|
|
258 |
$this->adjust( $quantifier, 'day' );
|
259 |
return $this;
|
260 |
}
|
@@ -285,6 +306,7 @@ class Ai1ec_Date_Time {
|
|
285 |
*/
|
286 |
public function set_date_time( $time = 'now', $timezone = 'UTC' ) {
|
287 |
if ( $time instanceof self ) {
|
|
|
288 |
$this->_date_time = clone $time->_date_time;
|
289 |
$this->_preferred_timezone = $time->_preferred_timezone;
|
290 |
if ( 'UTC' !== $timezone && $timezone ) {
|
@@ -296,11 +318,12 @@ class Ai1ec_Date_Time {
|
|
296 |
$date_time_tz = $this->_registry->get( 'date.timezone' )
|
297 |
->get( $timezone );
|
298 |
$reset_tz = false;
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
|
|
304 |
$time = '@' . $time; // treat as UNIX timestamp
|
305 |
$reset_tz = true; // store intended TZ
|
306 |
}
|
@@ -312,6 +335,29 @@ class Ai1ec_Date_Time {
|
|
312 |
return $this;
|
313 |
}
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
/**
|
316 |
* Assert that current timezone is UTC.
|
317 |
*
|
@@ -351,4 +397,14 @@ class Ai1ec_Date_Time {
|
|
351 |
$this->_date_time->modify( $modifier );
|
352 |
return $this;
|
353 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
}
|
26 |
*/
|
27 |
protected $_preferred_timezone = null;
|
28 |
|
29 |
+
/**
|
30 |
+
* @var bool Set to true when `no value` is set.
|
31 |
+
*/
|
32 |
+
protected $_is_empty = false;
|
33 |
+
|
34 |
/**
|
35 |
* Initialize local date entity.
|
36 |
*
|
71 |
* @throws Ai1ec_Date_Timezone_Exception If timezone is not recognized.
|
72 |
*/
|
73 |
public function format( $format = 'U', $timezone = null ) {
|
74 |
+
if ( $this->_is_empty ) {
|
75 |
+
return null;
|
76 |
+
}
|
77 |
if ( 'U' === $format ) { // performance cut
|
78 |
return $this->_date_time->format( 'U' );
|
79 |
}
|
115 |
/**
|
116 |
* Create JavaScript ready date/time information string.
|
117 |
*
|
118 |
+
* @param bool $event_timezone Set to true to format in event timezone.
|
119 |
+
*
|
120 |
* @return string JavaScript date/time string.
|
121 |
*/
|
122 |
+
public function format_to_javascript( $event_timezone = false ) {
|
123 |
+
$event_timezone = ( $event_timezone )
|
124 |
+
? $this->get_timezone()
|
125 |
+
: null;
|
126 |
+
return $this->format( 'Y-m-d\TH:i:s', $event_timezone );
|
127 |
}
|
128 |
|
129 |
/**
|
215 |
* @return int Number of seconds between two dates.
|
216 |
*/
|
217 |
public function diff_sec( Ai1ec_Date_Time $comparable, $timezone = null ) {
|
218 |
+
// NOTICE: `$this->_is_empty` is not touched here intentionally
|
219 |
+
// because there is no meaningful difference to `empty` value.
|
220 |
+
// It is left to be handled at upper level - you are not likely to
|
221 |
+
// reach situation where you compare something against empty value.
|
222 |
if ( version_compare( PHP_VERSION, '5.3.0' ) < 0 ) {
|
223 |
$difference = $this->_date_time->format( 'U' ) -
|
224 |
$comparable->_date_time->format( 'U' );
|
247 |
*/
|
248 |
public function set_date( $year, $month, $day ) {
|
249 |
$this->_date_time->setDate( $year, $month, $day );
|
250 |
+
$this->_is_empty = false;
|
251 |
return $this;
|
252 |
}
|
253 |
|
262 |
*/
|
263 |
public function set_time( $hour, $minute = 0, $second = 0 ) {
|
264 |
$this->_date_time->setTime( $hour, $minute, $second );
|
265 |
+
$this->_is_empty = false;
|
266 |
return $this;
|
267 |
}
|
268 |
|
274 |
* @return Ai1ec_Date_Time Instance of self for chaining.
|
275 |
*/
|
276 |
public function adjust_day( $quantifier ) {
|
277 |
+
// NOTICE: `$this->_is_empty` is not touched here, because if you
|
278 |
+
// start adjusting value it's likely not empty by then.
|
279 |
$this->adjust( $quantifier, 'day' );
|
280 |
return $this;
|
281 |
}
|
306 |
*/
|
307 |
public function set_date_time( $time = 'now', $timezone = 'UTC' ) {
|
308 |
if ( $time instanceof self ) {
|
309 |
+
$this->_is_empty = $time->_is_empty;
|
310 |
$this->_date_time = clone $time->_date_time;
|
311 |
$this->_preferred_timezone = $time->_preferred_timezone;
|
312 |
if ( 'UTC' !== $timezone && $timezone ) {
|
318 |
$date_time_tz = $this->_registry->get( 'date.timezone' )
|
319 |
->get( $timezone );
|
320 |
$reset_tz = false;
|
321 |
+
$this->_is_empty = false;
|
322 |
+
if ( null === $time ) {
|
323 |
+
$this->_is_empty = true;
|
324 |
+
$time = '@' . ~PHP_INT_MAX;
|
325 |
+
$reset_tz = true;
|
326 |
+
} else if ( $this->is_timestamp( $time ) ) {
|
327 |
$time = '@' . $time; // treat as UNIX timestamp
|
328 |
$reset_tz = true; // store intended TZ
|
329 |
}
|
335 |
return $this;
|
336 |
}
|
337 |
|
338 |
+
/**
|
339 |
+
* Check if value should be treated as a UNIX timestamp.
|
340 |
+
*
|
341 |
+
* @param string $time Provided time value.
|
342 |
+
*
|
343 |
+
* @return bool True if seems like UNIX timestamp.
|
344 |
+
*/
|
345 |
+
public function is_timestamp( $time ) {
|
346 |
+
// '20001231T001559Z'
|
347 |
+
if ( isset( $time{8} ) && 'T' === $time{8} ) {
|
348 |
+
return false;
|
349 |
+
}
|
350 |
+
if ( (string)(int)$time !== (string)$time ) {
|
351 |
+
return false;
|
352 |
+
}
|
353 |
+
// 1000..2459 are treated as hours, 2460..9999 - as years
|
354 |
+
if ( $time > 999 && $time < 2460 ) {
|
355 |
+
return false;
|
356 |
+
}
|
357 |
+
return true;
|
358 |
+
|
359 |
+
}
|
360 |
+
|
361 |
/**
|
362 |
* Assert that current timezone is UTC.
|
363 |
*
|
397 |
$this->_date_time->modify( $modifier );
|
398 |
return $this;
|
399 |
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Explicitly check if value (date) is empty.
|
403 |
+
*
|
404 |
+
* @return bool Emptiness
|
405 |
+
*/
|
406 |
+
public function is_empty() {
|
407 |
+
return $this->_is_empty;
|
408 |
+
}
|
409 |
+
|
410 |
}
|
lib/date/timezone.php
CHANGED
@@ -464,25 +464,27 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
|
|
464 |
*
|
465 |
* @return array
|
466 |
*/
|
467 |
-
public function get_timezones() {
|
468 |
$zones = DateTimeZone::listIdentifiers();
|
469 |
if (
|
470 |
empty( $zones )
|
471 |
) {
|
472 |
return array();
|
473 |
}
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
'
|
481 |
-
|
482 |
-
|
|
|
|
|
483 |
foreach ( $zones as $zone ) {
|
484 |
$exploded_zone = explode( '/', $zone );
|
485 |
-
if ( ! isset( $exploded_zone[1] ) ) {
|
486 |
$exploded_zone[1] = $exploded_zone[0];
|
487 |
$exploded_zone[0] = $manual;
|
488 |
}
|
464 |
*
|
465 |
* @return array
|
466 |
*/
|
467 |
+
public function get_timezones( $only_zones = false ) {
|
468 |
$zones = DateTimeZone::listIdentifiers();
|
469 |
if (
|
470 |
empty( $zones )
|
471 |
) {
|
472 |
return array();
|
473 |
}
|
474 |
+
if ( ! $only_zones ) {
|
475 |
+
$manual = __( 'Manual Offset', AI1EC_PLUGIN_NAME );
|
476 |
+
$options = array();
|
477 |
+
$options[$manual][] = array(
|
478 |
+
'text' => __( 'Choose your timezone', AI1EC_PLUGIN_NAME ),
|
479 |
+
'value' => '',
|
480 |
+
'args' => array(
|
481 |
+
'selected' => 'selected'
|
482 |
+
)
|
483 |
+
);
|
484 |
+
}
|
485 |
foreach ( $zones as $zone ) {
|
486 |
$exploded_zone = explode( '/', $zone );
|
487 |
+
if ( ! isset( $exploded_zone[1] ) && ! $only_zones ) {
|
488 |
$exploded_zone[1] = $exploded_zone[0];
|
489 |
$exploded_zone[0] = $manual;
|
490 |
}
|
lib/factory/html.php
CHANGED
@@ -67,10 +67,12 @@ class Ai1ec_Factory_Html extends Ai1ec_Base {
|
|
67 |
*
|
68 |
* @param array $args Populated args for the view
|
69 |
* @param int|string|null $initial_date The datepicker's initially set date
|
|
|
|
|
70 |
* @return Ai1ec_Generic_Html_Tag
|
71 |
*/
|
72 |
public function create_datepicker_link(
|
73 |
-
array $args, $initial_date = null
|
74 |
) {
|
75 |
$settings = $this->_registry->get( 'model.settings' );
|
76 |
$date_system = $this->_registry->get( 'date.system' );
|
@@ -119,10 +121,12 @@ class Ai1ec_Factory_Html extends Ai1ec_Base {
|
|
119 |
$file = $loader->get_file( 'date-icon.png' );
|
120 |
|
121 |
$args = array(
|
122 |
-
'attributes'
|
123 |
-
'data_type'
|
124 |
-
'icon_url'
|
125 |
-
'text_date'
|
|
|
|
|
126 |
);
|
127 |
|
128 |
return $loader->get_file( 'datepicker_link.twig', $args );
|
@@ -278,4 +282,4 @@ class Ai1ec_Factory_Html extends Ai1ec_Base {
|
|
278 |
);
|
279 |
return $select2;
|
280 |
}
|
281 |
-
}
|
67 |
*
|
68 |
* @param array $args Populated args for the view
|
69 |
* @param int|string|null $initial_date The datepicker's initially set date
|
70 |
+
* @param string $title Title to display in datepicker button
|
71 |
+
* @param string $title_short Short names in title
|
72 |
* @return Ai1ec_Generic_Html_Tag
|
73 |
*/
|
74 |
public function create_datepicker_link(
|
75 |
+
array $args, $initial_date = null, $title = '', $title_short = ''
|
76 |
) {
|
77 |
$settings = $this->_registry->get( 'model.settings' );
|
78 |
$date_system = $this->_registry->get( 'date.system' );
|
121 |
$file = $loader->get_file( 'date-icon.png' );
|
122 |
|
123 |
$args = array(
|
124 |
+
'attributes' => $attributes,
|
125 |
+
'data_type' => $args['data_type'],
|
126 |
+
'icon_url' => $file->get_url(),
|
127 |
+
'text_date' => __( 'Choose a date using calendar', AI1EC_PLUGIN_NAME ),
|
128 |
+
'title' => $title,
|
129 |
+
'title_short' => $title_short,
|
130 |
);
|
131 |
|
132 |
return $loader->get_file( 'datepicker_link.twig', $args );
|
282 |
);
|
283 |
return $select2;
|
284 |
}
|
285 |
+
}
|
lib/factory/strategy.php
CHANGED
@@ -15,26 +15,27 @@ class Ai1ec_Factory_Strategy extends Ai1ec_Base {
|
|
15 |
*
|
16 |
* Method to instantiate new cache strategy object
|
17 |
*
|
18 |
-
* @param string $
|
19 |
-
* @param
|
20 |
* cache engines, as APC [optional=false]
|
21 |
*
|
22 |
* @return Ai1ec_Cache_Strategy Instantiated writer
|
23 |
*/
|
24 |
public function create_cache_strategy_instance(
|
25 |
-
$
|
26 |
$skip_small_bits = false
|
27 |
) {
|
28 |
-
$engine =
|
29 |
$name = '';
|
30 |
if ( true !== $skip_small_bits && Ai1ec_Cache_Strategy_Apc::is_available() ) {
|
31 |
$engine = $this->_registry->get( 'cache.strategy.apc' );
|
32 |
} else if (
|
33 |
-
|
34 |
-
|
|
|
35 |
) {
|
36 |
-
$engine = $this->_registry->get( 'cache.strategy.file', $
|
37 |
-
} else if ( true
|
38 |
$engine = $this->_registry->get(
|
39 |
'cache.strategy.db',
|
40 |
$this->_registry->get( 'model.option' )
|
@@ -50,20 +51,38 @@ class Ai1ec_Factory_Strategy extends Ai1ec_Base {
|
|
50 |
*
|
51 |
* @param string $key_for_persistance
|
52 |
* @param Ai1ec_Cache_Strategy $cache_strategy
|
53 |
-
* @param string $
|
54 |
*
|
55 |
* @return Ai1ec_Persistence_Context Instance of persistance context
|
56 |
*/
|
57 |
public function create_persistence_context(
|
58 |
$key_for_persistance,
|
59 |
-
$
|
|
|
60 |
) {
|
61 |
return new Ai1ec_Persistence_Context(
|
62 |
$key_for_persistance,
|
63 |
-
$this->create_cache_strategy_instance( $
|
64 |
);
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* _is_cache_dir_writable method
|
69 |
*
|
15 |
*
|
16 |
* Method to instantiate new cache strategy object
|
17 |
*
|
18 |
+
* @param string $cache_dirs Cache directory to use
|
19 |
+
* @param array $skip_small_bits Set to true, to ignore small entities
|
20 |
* cache engines, as APC [optional=false]
|
21 |
*
|
22 |
* @return Ai1ec_Cache_Strategy Instantiated writer
|
23 |
*/
|
24 |
public function create_cache_strategy_instance(
|
25 |
+
$cache_dirs = null,
|
26 |
$skip_small_bits = false
|
27 |
) {
|
28 |
+
$engine = null;
|
29 |
$name = '';
|
30 |
if ( true !== $skip_small_bits && Ai1ec_Cache_Strategy_Apc::is_available() ) {
|
31 |
$engine = $this->_registry->get( 'cache.strategy.apc' );
|
32 |
} else if (
|
33 |
+
false === AI1EC_DISABLE_FILE_CACHE &&
|
34 |
+
null !== $cache_dirs &&
|
35 |
+
$cache_dir = $this->_get_writable_cache_dir( $cache_dirs )
|
36 |
) {
|
37 |
+
$engine = $this->_registry->get( 'cache.strategy.file', $cache_dir );
|
38 |
+
} else if ( true === $skip_small_bits ) {
|
39 |
$engine = $this->_registry->get(
|
40 |
'cache.strategy.db',
|
41 |
$this->_registry->get( 'model.option' )
|
51 |
*
|
52 |
* @param string $key_for_persistance
|
53 |
* @param Ai1ec_Cache_Strategy $cache_strategy
|
54 |
+
* @param string $cache_dirs
|
55 |
*
|
56 |
* @return Ai1ec_Persistence_Context Instance of persistance context
|
57 |
*/
|
58 |
public function create_persistence_context(
|
59 |
$key_for_persistance,
|
60 |
+
$cache_dirs = null,
|
61 |
+
$skip_small_bits = false
|
62 |
) {
|
63 |
return new Ai1ec_Persistence_Context(
|
64 |
$key_for_persistance,
|
65 |
+
$this->create_cache_strategy_instance( $cache_dirs, $skip_small_bits )
|
66 |
);
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Get a writable directory if possible, falling back on wp_contet dir
|
71 |
+
*
|
72 |
+
* @param array $cache_dirs
|
73 |
+
* @return boolean|string
|
74 |
+
*/
|
75 |
+
protected function _get_writable_cache_dir( $cache_dirs ) {
|
76 |
+
$writable_folder = false;
|
77 |
+
foreach ( $cache_dirs as $cache_dir ) {
|
78 |
+
if ( $this->_is_cache_dir_writable( $cache_dir['path'] ) ) {
|
79 |
+
$writable_folder = $cache_dir;
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
return $writable_folder;
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
* _is_cache_dir_writable method
|
88 |
*
|
lib/filesystem/checker.php
CHANGED
@@ -10,6 +10,10 @@
|
|
10 |
*/
|
11 |
class Ai1ec_Filesystem_Checker {
|
12 |
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* check if the path is writable. To make the check .
|
15 |
*
|
@@ -18,15 +22,79 @@ class Ai1ec_Filesystem_Checker {
|
|
18 |
*/
|
19 |
public function is_writable( $path ) {
|
20 |
global $wp_filesystem;
|
21 |
-
|
22 |
-
//
|
23 |
-
if( ! function_exists( 'WP_Filesystem' ) ) {
|
24 |
-
return false;
|
25 |
-
}
|
26 |
$writable = WP_Filesystem( false, $path );
|
27 |
// We consider the directory as writable if it uses the direct transport,
|
28 |
// otherwise credentials would be needed
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -42,4 +110,25 @@ class Ai1ec_Filesystem_Checker {
|
|
42 |
$content
|
43 |
);
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
10 |
*/
|
11 |
class Ai1ec_Filesystem_Checker {
|
12 |
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
include_once ABSPATH . 'wp-admin/includes/file.php';
|
16 |
+
}
|
17 |
/**
|
18 |
* check if the path is writable. To make the check .
|
19 |
*
|
22 |
*/
|
23 |
public function is_writable( $path ) {
|
24 |
global $wp_filesystem;
|
25 |
+
|
26 |
+
// try without credentials
|
|
|
|
|
|
|
27 |
$writable = WP_Filesystem( false, $path );
|
28 |
// We consider the directory as writable if it uses the direct transport,
|
29 |
// otherwise credentials would be needed
|
30 |
+
if ( true === $writable ) {
|
31 |
+
return true;
|
32 |
+
}
|
33 |
+
// if the user has FTP and sockets defined
|
34 |
+
if (
|
35 |
+
$this->is_ftp_or_sockets( $wp_filesystem->method ) &&
|
36 |
+
$this->are_ftp_constants_defined()
|
37 |
+
) {
|
38 |
+
$creds = request_filesystem_credentials( '', $wp_filesystem->method, false, $path );
|
39 |
+
$writable = WP_Filesystem( $creds, $path );
|
40 |
+
if ( true === $writable ) {
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
if (
|
45 |
+
$this->is_ssh( $wp_filesystem->method ) &&
|
46 |
+
$this->are_ssh_constants_defined()
|
47 |
+
) {
|
48 |
+
$creds = request_filesystem_credentials( '', $wp_filesystem->method, false, $path );
|
49 |
+
$writable = WP_Filesystem( $creds, $path );
|
50 |
+
if ( true === $writable ) {
|
51 |
+
return true;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Check if method is ssh
|
59 |
+
*
|
60 |
+
* @param strin $method
|
61 |
+
* @return boolean
|
62 |
+
*/
|
63 |
+
public function is_ssh( $method ) {
|
64 |
+
return 'ssh2' === $method;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Check if method is ftp or sockets
|
69 |
+
*
|
70 |
+
* @param string $method
|
71 |
+
* @return boolean
|
72 |
+
*/
|
73 |
+
public function is_ftp_or_sockets( $method ) {
|
74 |
+
return 'ftpext' === $method ||
|
75 |
+
'ftpsockets' === $method;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Check if credentials for ssh are defined
|
80 |
+
*
|
81 |
+
* @return boolean
|
82 |
+
*/
|
83 |
+
public function are_ssh_constants_defined() {
|
84 |
+
return defined('FTP_HOST') &&
|
85 |
+
defined('FTP_PUBKEY') &&
|
86 |
+
defined('FTP_PRIKEY');
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Check if credentials for ftp are defined
|
91 |
+
*
|
92 |
+
* @return boolean
|
93 |
+
*/
|
94 |
+
public function are_ftp_constants_defined() {
|
95 |
+
return defined('FTP_HOST') &&
|
96 |
+
defined('FTP_USER') &&
|
97 |
+
defined('FTP_PASS');
|
98 |
}
|
99 |
|
100 |
/**
|
110 |
$content
|
111 |
);
|
112 |
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get the content folder from Wordpress if available
|
116 |
+
*
|
117 |
+
* @return string the folder to use or ''
|
118 |
+
*/
|
119 |
+
public function get_ai1ec_static_dir_if_available() {
|
120 |
+
global $wp_filesystem;
|
121 |
+
// reset the filesystem to it's standard.
|
122 |
+
WP_Filesystem();
|
123 |
+
$content_dir = $wp_filesystem->wp_content_dir();
|
124 |
+
$static_dir = trailingslashit( $content_dir . 'ai1ec_static' );
|
125 |
+
if (
|
126 |
+
! $wp_filesystem->is_dir( $static_dir ) &&
|
127 |
+
! $wp_filesystem->mkdir( $static_dir )
|
128 |
+
) {
|
129 |
+
return '';
|
130 |
+
}
|
131 |
+
return $static_dir;
|
132 |
+
}
|
133 |
+
|
134 |
}
|
lib/html/element/href.php
CHANGED
@@ -26,6 +26,7 @@ class Ai1ec_Html_Element_Href {
|
|
26 |
'auth_ids',
|
27 |
'post_ids',
|
28 |
'tag_ids',
|
|
|
29 |
);
|
30 |
|
31 |
/**
|
26 |
'auth_ids',
|
27 |
'post_ids',
|
28 |
'tag_ids',
|
29 |
+
'events_limit',
|
30 |
);
|
31 |
|
32 |
/**
|
lib/html/element/setting/enabled-views.php
CHANGED
@@ -21,6 +21,8 @@ class Ai1ec_Html_Element_Enabled_Views
|
|
21 |
'label' => $this->_args['renderer']['label'],
|
22 |
'text_enabled' => __( 'Enabled', AI1EC_PLUGIN_NAME ),
|
23 |
'text_default' => __( 'Default', AI1EC_PLUGIN_NAME ),
|
|
|
|
|
24 |
);
|
25 |
$loader = $this->_registry->get( 'theme.loader' );
|
26 |
return $loader->get_file( 'setting/enabled-views.twig', $args, true )
|
@@ -38,6 +40,17 @@ class Ai1ec_Html_Element_Enabled_Views
|
|
38 |
$view['default'] = $view['default'] ?
|
39 |
'checked="checked"' :
|
40 |
'';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
}
|
43 |
-
}
|
21 |
'label' => $this->_args['renderer']['label'],
|
22 |
'text_enabled' => __( 'Enabled', AI1EC_PLUGIN_NAME ),
|
23 |
'text_default' => __( 'Default', AI1EC_PLUGIN_NAME ),
|
24 |
+
'text_desktop' => __( 'Desktop', AI1EC_PLUGIN_NAME ),
|
25 |
+
'text_mobile' => __( 'Mobile', AI1EC_PLUGIN_NAME ),
|
26 |
);
|
27 |
$loader = $this->_registry->get( 'theme.loader' );
|
28 |
return $loader->get_file( 'setting/enabled-views.twig', $args, true )
|
40 |
$view['default'] = $view['default'] ?
|
41 |
'checked="checked"' :
|
42 |
'';
|
43 |
+
// Use mobile settings if available, else fall back to desktop settings.
|
44 |
+
$view['enabled_mobile'] = isset( $view['enabled_mobile'] ) ?
|
45 |
+
( $view['enabled_mobile'] ?
|
46 |
+
'checked="checked"' :
|
47 |
+
'' ) :
|
48 |
+
$view['enabled'];
|
49 |
+
$view['default_mobile'] = isset( $view['default_mobile'] ) ?
|
50 |
+
( $view['default_mobile'] ?
|
51 |
+
'checked="checked"' :
|
52 |
+
'' ) :
|
53 |
+
$view['default'];
|
54 |
}
|
55 |
}
|
56 |
+
}
|
lib/html/element/setting/html.php
CHANGED
@@ -61,6 +61,7 @@ class Ai1ec_Html_Setting_Html extends Ai1ec_Html_Element_Settings {
|
|
61 |
'text_filter_tag_id_comma' => __( 'Filter by event tag IDs (separate IDs by comma):', AI1EC_PLUGIN_NAME ),
|
62 |
'text_filter_post_id' => __( 'Filter by post ID:', AI1EC_PLUGIN_NAME ),
|
63 |
'text_filter_post_id_comma' => __( 'Filter by post IDs (separate IDs by comma):', AI1EC_PLUGIN_NAME ),
|
|
|
64 |
'text_warning' => __( 'Warning:', AI1EC_PLUGIN_NAME ),
|
65 |
'text_single_calendar' => __( 'It is currently not supported to embed more than one calendar in the same page. Do not attempt to embed the calendar via shortcode in a page that already displays the calendar.', AI1EC_PLUGIN_NAME ),
|
66 |
);
|
61 |
'text_filter_tag_id_comma' => __( 'Filter by event tag IDs (separate IDs by comma):', AI1EC_PLUGIN_NAME ),
|
62 |
'text_filter_post_id' => __( 'Filter by post ID:', AI1EC_PLUGIN_NAME ),
|
63 |
'text_filter_post_id_comma' => __( 'Filter by post IDs (separate IDs by comma):', AI1EC_PLUGIN_NAME ),
|
64 |
+
'text_events_limit' => __( 'Limit number of events per page:', AI1EC_PLUGIN_NAME ),
|
65 |
'text_warning' => __( 'Warning:', AI1EC_PLUGIN_NAME ),
|
66 |
'text_single_calendar' => __( 'It is currently not supported to embed more than one calendar in the same page. Do not attempt to embed the calendar via shortcode in a page that already displays the calendar.', AI1EC_PLUGIN_NAME ),
|
67 |
);
|
lib/html/element/setting/input.php
CHANGED
@@ -20,7 +20,7 @@ class Ai1ec_Html_Setting_Input extends Ai1ec_Html_Element_Settings {
|
|
20 |
$type = $this->_args['renderer']['type'];
|
21 |
$date = $append = false;
|
22 |
$class = '';
|
23 |
-
|
24 |
switch ( $type ) {
|
25 |
case 'date':
|
26 |
$date = true;
|
@@ -29,6 +29,10 @@ class Ai1ec_Html_Setting_Input extends Ai1ec_Html_Element_Settings {
|
|
29 |
case 'append':
|
30 |
$append = true;
|
31 |
break;
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
$input_args = array(
|
@@ -48,6 +52,7 @@ class Ai1ec_Html_Setting_Input extends Ai1ec_Html_Element_Settings {
|
|
48 |
'id' => $this->_args['id'],
|
49 |
'label' => $this->_args['renderer']['label'],
|
50 |
'input_args' => $input_args,
|
|
|
51 |
'value' => $this->_args['value'],
|
52 |
);
|
53 |
if ( isset( $this->_args['renderer']['status'] ) ) {
|
20 |
$type = $this->_args['renderer']['type'];
|
21 |
$date = $append = false;
|
22 |
$class = '';
|
23 |
+
$input_type = 'text';
|
24 |
switch ( $type ) {
|
25 |
case 'date':
|
26 |
$date = true;
|
29 |
case 'append':
|
30 |
$append = true;
|
31 |
break;
|
32 |
+
|
33 |
+
case 'email':
|
34 |
+
$input_type = 'email';
|
35 |
+
break;
|
36 |
}
|
37 |
|
38 |
$input_args = array(
|
52 |
'id' => $this->_args['id'],
|
53 |
'label' => $this->_args['renderer']['label'],
|
54 |
'input_args' => $input_args,
|
55 |
+
'input_type' => $input_type,
|
56 |
'value' => $this->_args['value'],
|
57 |
);
|
58 |
if ( isset( $this->_args['renderer']['status'] ) ) {
|
lib/http/request/parser.php
CHANGED
@@ -108,6 +108,7 @@ class Ai1ec_Request_Parser extends Ai1ec_Abstract_Query {
|
|
108 |
$this->add_rule( 'no_navigation' ,false, 'string', false, false );
|
109 |
$this->add_rule( 'applying_filters' ,false, 'string', false, false );
|
110 |
$this->add_rule( 'shortcode' ,false, 'string', false, false );
|
|
|
111 |
}
|
112 |
|
113 |
/**
|
108 |
$this->add_rule( 'no_navigation' ,false, 'string', false, false );
|
109 |
$this->add_rule( 'applying_filters' ,false, 'string', false, false );
|
110 |
$this->add_rule( 'shortcode' ,false, 'string', false, false );
|
111 |
+
$this->add_rule( 'events_limit', false, 'int', null, false );
|
112 |
}
|
113 |
|
114 |
/**
|
lib/http/response/render/strategy/html.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @subpackage AI1EC.Http.Response.Render.Strategy
|
10 |
*/
|
11 |
class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
12 |
-
|
13 |
/**
|
14 |
* @var string the event html.
|
15 |
*/
|
@@ -19,19 +19,21 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
|
19 |
* @var string The html for the footer of the event.
|
20 |
*/
|
21 |
protected $_html_footer;
|
22 |
-
|
23 |
public function render( array $params ) {
|
24 |
$this->_html = $params['data'];
|
25 |
if ( isset( $params['is_event'] ) ) {
|
26 |
// Filter event post content, in single- and multi-post views
|
27 |
add_filter( 'the_content', array( $this, 'event_content' ), PHP_INT_MAX - 1 );
|
|
|
|
|
28 |
return;
|
29 |
}
|
30 |
// Replace page content - make sure it happens at (almost) the very end of
|
31 |
// page content filters (some themes are overly ambitious here)
|
32 |
add_filter( 'the_content', array( $this, 'append_content' ), PHP_INT_MAX - 1 );
|
33 |
}
|
34 |
-
|
35 |
/**
|
36 |
* Append locally generated content to normal page content. By default,
|
37 |
* first checks if we are in The Loop before outputting to prevent multiple
|
@@ -42,7 +44,7 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
|
42 |
*/
|
43 |
public function append_content( $content ) {
|
44 |
$settings = $this->_registry->get( 'model.settings' );
|
45 |
-
|
46 |
// Include any admin-provided page content in the placeholder specified in
|
47 |
// the calendar theme template.
|
48 |
if ( $settings->get( 'skip_in_the_loop_check' ) || in_the_loop() ) {
|
@@ -65,10 +67,11 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
|
65 |
*
|
66 |
* @return string Post/Page content
|
67 |
**/
|
68 |
-
function event_content( $content ) {
|
69 |
|
70 |
// if we have modified the content, we return the modified version.
|
71 |
-
$to_return = $this->_html .
|
|
|
72 |
if ( isset( $this->_html_footer ) ) {
|
73 |
$to_return .= $this->_html_footer;
|
74 |
}
|
@@ -79,4 +82,35 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
|
79 |
$content
|
80 |
);
|
81 |
}
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
* @subpackage AI1EC.Http.Response.Render.Strategy
|
10 |
*/
|
11 |
class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
|
12 |
+
|
13 |
/**
|
14 |
* @var string the event html.
|
15 |
*/
|
19 |
* @var string The html for the footer of the event.
|
20 |
*/
|
21 |
protected $_html_footer;
|
22 |
+
|
23 |
public function render( array $params ) {
|
24 |
$this->_html = $params['data'];
|
25 |
if ( isset( $params['is_event'] ) ) {
|
26 |
// Filter event post content, in single- and multi-post views
|
27 |
add_filter( 'the_content', array( $this, 'event_content' ), PHP_INT_MAX - 1 );
|
28 |
+
add_filter( 'the_title', array( $this, 'event_title' ), PHP_INT_MAX - 1, 3 );
|
29 |
+
add_filter( 'post_class', array( $this, 'post_class' ), PHP_INT_MAX - 1 );
|
30 |
return;
|
31 |
}
|
32 |
// Replace page content - make sure it happens at (almost) the very end of
|
33 |
// page content filters (some themes are overly ambitious here)
|
34 |
add_filter( 'the_content', array( $this, 'append_content' ), PHP_INT_MAX - 1 );
|
35 |
}
|
36 |
+
|
37 |
/**
|
38 |
* Append locally generated content to normal page content. By default,
|
39 |
* first checks if we are in The Loop before outputting to prevent multiple
|
44 |
*/
|
45 |
public function append_content( $content ) {
|
46 |
$settings = $this->_registry->get( 'model.settings' );
|
47 |
+
|
48 |
// Include any admin-provided page content in the placeholder specified in
|
49 |
// the calendar theme template.
|
50 |
if ( $settings->get( 'skip_in_the_loop_check' ) || in_the_loop() ) {
|
67 |
*
|
68 |
* @return string Post/Page content
|
69 |
**/
|
70 |
+
public function event_content( $content ) {
|
71 |
|
72 |
// if we have modified the content, we return the modified version.
|
73 |
+
$to_return = $this->_html .
|
74 |
+
'<div class="description">' . $content . '</div>';
|
75 |
if ( isset( $this->_html_footer ) ) {
|
76 |
$to_return .= $this->_html_footer;
|
77 |
}
|
82 |
$content
|
83 |
);
|
84 |
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Add microformats class to title
|
88 |
+
*
|
89 |
+
* @param string $title
|
90 |
+
* @param id $post_id
|
91 |
+
* @param bool $is_view is the filter called from a calendar view?
|
92 |
+
* In that case do not render the extra markup
|
93 |
+
*/
|
94 |
+
public function event_title( $title, $post_id, $is_view = false ) {
|
95 |
+
if (
|
96 |
+
false === $is_view &&
|
97 |
+
true === $this->_registry->get( 'acl.aco' )->is_our_post_type()
|
98 |
+
) {
|
99 |
+
$title = '<span class="summary">' . $title . '</span>';
|
100 |
+
}
|
101 |
+
return $title;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Add vevent class to post
|
106 |
+
*
|
107 |
+
* @param array $classes
|
108 |
+
* @return array
|
109 |
+
*/
|
110 |
+
public function post_class( $classes ) {
|
111 |
+
if ( true === $this->_registry->get( 'acl.aco' )->is_our_post_type() ) {
|
112 |
+
$classes[] = 'vevent';
|
113 |
+
}
|
114 |
+
return $classes;
|
115 |
+
}
|
116 |
+
}
|
lib/import-export/ics.php
CHANGED
@@ -124,7 +124,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
124 |
$comment_status = isset( $args['comment_status'] ) ? $args['comment_status'] : 'open';
|
125 |
$do_show_map = isset( $args['do_show_map'] ) ? $args['do_show_map'] : 0;
|
126 |
$count = 0;
|
127 |
-
$events_in_db = $args['events_in_db'];
|
128 |
$v->sort();
|
129 |
// Reverse the sort order, so that RECURRENCE-IDs are listed before the
|
130 |
// defining recurrence events, and therefore take precedence during
|
@@ -137,6 +137,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
137 |
// Fetch default timezone in case individual properties don't define it
|
138 |
$timezone = $v->getProperty( 'X-WR-TIMEZONE' );
|
139 |
$timezone = (string)$timezone[1];
|
|
|
140 |
// go over each event
|
141 |
while ( $e = $v->getComponent( 'vevent' ) ) {
|
142 |
// Event data array.
|
@@ -441,6 +442,12 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
441 |
// Create event object.
|
442 |
$event = $this->_registry->get( 'model.event', $data );
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
$recurrence = $event->get( 'recurrence_rules' );
|
445 |
$search = $this->_registry->get( 'model.search' );
|
446 |
// first let's check by UID
|
@@ -463,7 +470,8 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
463 |
// =================================================
|
464 |
// = Event was not found, so store it and the post =
|
465 |
// =================================================
|
466 |
-
|
|
|
467 |
} else {
|
468 |
// ======================================================
|
469 |
// = Event was found, let's store the new event details =
|
@@ -481,17 +489,18 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
481 |
$event->set( 'post_id', $matching_event_id );
|
482 |
$event->set( 'post', $post );
|
483 |
$event->save( true );
|
|
|
484 |
}
|
485 |
|
486 |
}
|
487 |
// if the event was already present , unset it from the array so it's not deleted
|
488 |
unset( $events_in_db[$event->get( 'post_id' )] );
|
489 |
-
$count++;
|
490 |
}
|
491 |
|
492 |
return array(
|
493 |
-
'count'
|
494 |
'events_to_delete' => $events_in_db,
|
|
|
495 |
);
|
496 |
}
|
497 |
|
@@ -806,6 +815,15 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
806 |
)
|
807 |
);
|
808 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
|
810 |
// ====================================
|
811 |
// = Contact name, phone, e-mail, URL =
|
124 |
$comment_status = isset( $args['comment_status'] ) ? $args['comment_status'] : 'open';
|
125 |
$do_show_map = isset( $args['do_show_map'] ) ? $args['do_show_map'] : 0;
|
126 |
$count = 0;
|
127 |
+
$events_in_db = isset( $args['events_in_db'] ) ? $args['events_in_db'] : 0;
|
128 |
$v->sort();
|
129 |
// Reverse the sort order, so that RECURRENCE-IDs are listed before the
|
130 |
// defining recurrence events, and therefore take precedence during
|
137 |
// Fetch default timezone in case individual properties don't define it
|
138 |
$timezone = $v->getProperty( 'X-WR-TIMEZONE' );
|
139 |
$timezone = (string)$timezone[1];
|
140 |
+
$messages = array();
|
141 |
// go over each event
|
142 |
while ( $e = $v->getComponent( 'vevent' ) ) {
|
143 |
// Event data array.
|
442 |
// Create event object.
|
443 |
$event = $this->_registry->get( 'model.event', $data );
|
444 |
|
445 |
+
// Instant Event
|
446 |
+
$is_instant = $e->getProperty( 'X-INSTANT-EVENT' );
|
447 |
+
if ( $is_instant ) {
|
448 |
+
$event->set_no_end_time();
|
449 |
+
}
|
450 |
+
|
451 |
$recurrence = $event->get( 'recurrence_rules' );
|
452 |
$search = $this->_registry->get( 'model.search' );
|
453 |
// first let's check by UID
|
470 |
// =================================================
|
471 |
// = Event was not found, so store it and the post =
|
472 |
// =================================================
|
473 |
+
$event->save();
|
474 |
+
$count++;
|
475 |
} else {
|
476 |
// ======================================================
|
477 |
// = Event was found, let's store the new event details =
|
489 |
$event->set( 'post_id', $matching_event_id );
|
490 |
$event->set( 'post', $post );
|
491 |
$event->save( true );
|
492 |
+
$count++;
|
493 |
}
|
494 |
|
495 |
}
|
496 |
// if the event was already present , unset it from the array so it's not deleted
|
497 |
unset( $events_in_db[$event->get( 'post_id' )] );
|
|
|
498 |
}
|
499 |
|
500 |
return array(
|
501 |
+
'count' => $count,
|
502 |
'events_to_delete' => $events_in_db,
|
503 |
+
'messages' => $messages,
|
504 |
);
|
505 |
}
|
506 |
|
815 |
)
|
816 |
);
|
817 |
}
|
818 |
+
// =================
|
819 |
+
// = Instant Event =
|
820 |
+
// =================
|
821 |
+
if ( $event->is_instant() ) {
|
822 |
+
$e->setProperty(
|
823 |
+
'X-INSTANT-EVENT',
|
824 |
+
$this->_sanitize_value( $event->is_instant() )
|
825 |
+
);
|
826 |
+
}
|
827 |
|
828 |
// ====================================
|
829 |
// = Contact name, phone, e-mail, URL =
|
lib/less/lessphp.php
CHANGED
@@ -58,7 +58,8 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
58 |
$default_theme_url = AI1EC_DEFAULT_THEME_URL
|
59 |
) {
|
60 |
parent::__construct( $registry );
|
61 |
-
$this->lessc = $this->_registry->get( 'lessc' )
|
|
|
62 |
$this->default_theme_url = $this->sanitize_default_theme_url( $default_theme_url );
|
63 |
$this->parsed_css = '';
|
64 |
$this->files = array(
|
@@ -88,11 +89,12 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
88 |
* Parse all the less files resolving the dependencies.
|
89 |
*
|
90 |
* @param array $variables
|
|
|
91 |
* @throws Ai1ec_File_Not_Found_Exception|Exception
|
92 |
* @throws Exception
|
93 |
* @return string
|
94 |
*/
|
95 |
-
public function parse_less_files( array $variables = null ) {
|
96 |
// If no variables are passed, initialize from DB, config file, and
|
97 |
// extension injections in one call.
|
98 |
if ( empty( $variables ) ) {
|
@@ -100,21 +102,30 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
100 |
}
|
101 |
// convert the variables to key / value
|
102 |
$variables = $this->convert_less_variables_for_parsing( $variables );
|
103 |
-
// Inject additional constants from extensions.
|
104 |
-
|
|
|
|
|
|
|
|
|
105 |
|
106 |
// Load the static variables defined in the theme's variables.less file.
|
107 |
$this->load_static_theme_variables();
|
108 |
$loader = $this->_registry->get( 'theme.loader' );
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
113 |
|
114 |
// Find out the active theme URL.
|
115 |
$option = $this->_registry->get( 'model.option' );
|
116 |
$theme = $option->get( 'ai1ec_current_theme' );
|
117 |
-
|
|
|
|
|
|
|
|
|
118 |
$this->lessc->addImportDir(
|
119 |
$theme['theme_dir'] . DIRECTORY_SEPARATOR . 'less'
|
120 |
);
|
@@ -151,7 +162,12 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
151 |
$variables['fontdir_default'] = '~"' . $this->default_theme_url . 'font"';
|
152 |
$variables['imgdir'] = '~"' . $theme['theme_url'] . '/img"';
|
153 |
$variables['imgdir_default'] = '~"' . $this->default_theme_url . 'img"';
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
155 |
try {
|
156 |
$this->parsed_css = $this->lessc->parse(
|
157 |
$this->unparsed_variable_file,
|
@@ -195,7 +211,7 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
195 |
|
196 |
if ( $option->get( 'ai1ec_invalidate_css_cache' ) ) {
|
197 |
$css_controller = $this->_registry->get( 'css.frontend' );
|
198 |
-
$css_controller->invalidate_cache( null,
|
199 |
$option->delete( 'ai1ec_invalidate_css_cache' );
|
200 |
}
|
201 |
}
|
58 |
$default_theme_url = AI1EC_DEFAULT_THEME_URL
|
59 |
) {
|
60 |
parent::__construct( $registry );
|
61 |
+
$this->lessc = $this->_registry->get( 'lessc' );
|
62 |
+
$this->lessc->setFormatter( 'compressed' );
|
63 |
$this->default_theme_url = $this->sanitize_default_theme_url( $default_theme_url );
|
64 |
$this->parsed_css = '';
|
65 |
$this->files = array(
|
89 |
* Parse all the less files resolving the dependencies.
|
90 |
*
|
91 |
* @param array $variables
|
92 |
+
* @param bool $compile_core If set to true, it forces compilation of core CSS only, suitable for shipping.
|
93 |
* @throws Ai1ec_File_Not_Found_Exception|Exception
|
94 |
* @throws Exception
|
95 |
* @return string
|
96 |
*/
|
97 |
+
public function parse_less_files( array $variables = null, $compile_core = false ) {
|
98 |
// If no variables are passed, initialize from DB, config file, and
|
99 |
// extension injections in one call.
|
100 |
if ( empty( $variables ) ) {
|
102 |
}
|
103 |
// convert the variables to key / value
|
104 |
$variables = $this->convert_less_variables_for_parsing( $variables );
|
105 |
+
// Inject additional constants from extensions if not compiling core only.
|
106 |
+
if ( false === $compile_core ) {
|
107 |
+
|
108 |
+
$variables = apply_filters( 'ai1ec_less_constants', $variables );
|
109 |
+
}
|
110 |
+
|
111 |
|
112 |
// Load the static variables defined in the theme's variables.less file.
|
113 |
$this->load_static_theme_variables();
|
114 |
$loader = $this->_registry->get( 'theme.loader' );
|
115 |
+
//Allow extensions to add their own LESS files if not compiling core.
|
116 |
+
if ( false === $compile_core ) {
|
117 |
+
$this->files = apply_filters( 'ai1ec_less_files', $this->files );
|
118 |
+
$this->files[] = 'override.less';
|
119 |
+
}
|
120 |
|
121 |
// Find out the active theme URL.
|
122 |
$option = $this->_registry->get( 'model.option' );
|
123 |
$theme = $option->get( 'ai1ec_current_theme' );
|
124 |
+
// Get default theme for core compilation
|
125 |
+
if ( true === $compile_core ) {
|
126 |
+
$theme = $this->_registry->get( 'controller.front' )
|
127 |
+
->get_default_theme();
|
128 |
+
}
|
129 |
$this->lessc->addImportDir(
|
130 |
$theme['theme_dir'] . DIRECTORY_SEPARATOR . 'less'
|
131 |
);
|
162 |
$variables['fontdir_default'] = '~"' . $this->default_theme_url . 'font"';
|
163 |
$variables['imgdir'] = '~"' . $theme['theme_url'] . '/img"';
|
164 |
$variables['imgdir_default'] = '~"' . $this->default_theme_url . 'img"';
|
165 |
+
if ( true === $compile_core ) {
|
166 |
+
$variables['fontdir'] = '~"../font"';
|
167 |
+
$variables['fontdir_default'] = '~"../font"';
|
168 |
+
$variables['imgdir'] = '~"../img"';
|
169 |
+
$variables['imgdir_default'] = '~"../img"';
|
170 |
+
}
|
171 |
try {
|
172 |
$this->parsed_css = $this->lessc->parse(
|
173 |
$this->unparsed_variable_file,
|
211 |
|
212 |
if ( $option->get( 'ai1ec_invalidate_css_cache' ) ) {
|
213 |
$css_controller = $this->_registry->get( 'css.frontend' );
|
214 |
+
$css_controller->invalidate_cache( null, true );
|
215 |
$option->delete( 'ai1ec_invalidate_css_cache' );
|
216 |
}
|
217 |
}
|
lib/p28n/wpml.php
CHANGED
@@ -47,6 +47,22 @@ class Ai1ec_Localization_Helper {
|
|
47 |
return $matches;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* get_wpml_translations_of_page method
|
52 |
*
|
47 |
return $matches;
|
48 |
}
|
49 |
|
50 |
+
/**
|
51 |
+
* Returns the ISO-3166 part of the configured locale as a ccTLD.
|
52 |
+
*
|
53 |
+
* Used for region biasing in the GEO autocomplete plugin.
|
54 |
+
*
|
55 |
+
* @return string ISO-3166 locale name.
|
56 |
+
*/
|
57 |
+
public function get_region() {
|
58 |
+
$locale = explode( '_', get_locale() );
|
59 |
+
$region = ( isset( $locale[1] ) && $locale[1] != '' )
|
60 |
+
? strtolower( $locale[1] )
|
61 |
+
: '';
|
62 |
+
// Primary ccTLD for United Kingdom is uk.
|
63 |
+
return ( $region == 'gb' ) ? 'uk' : $region;
|
64 |
+
}
|
65 |
+
|
66 |
/**
|
67 |
* get_wpml_translations_of_page method
|
68 |
*
|
lib/post/custom-type.php
CHANGED
@@ -52,7 +52,7 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
|
|
52 |
$page_base = get_page_uri( $settings->get( 'calendar_page_id' ) );
|
53 |
}
|
54 |
|
55 |
-
$rewrite = array( 'slug' => Ai1ec_I18n::__( '
|
56 |
$has_archive = true;
|
57 |
if (
|
58 |
$settings->get( 'calendar_base_url_for_permalinks' ) &&
|
52 |
$page_base = get_page_uri( $settings->get( 'calendar_page_id' ) );
|
53 |
}
|
54 |
|
55 |
+
$rewrite = array( 'slug' => Ai1ec_I18n::__( 'event' ) );
|
56 |
$has_archive = true;
|
57 |
if (
|
58 |
$settings->get( 'calendar_base_url_for_permalinks' ) &&
|
lib/request/redirect.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Redirect for categories and tags.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.0
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.Request
|
11 |
+
*/
|
12 |
+
class Ai1ec_Request_Redirect extends Ai1ec_Base {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Checks if current request is direct for Events cats/tags and redirects
|
16 |
+
* to filtered calendar.
|
17 |
+
*
|
18 |
+
* @param WP $wpobj WP object.
|
19 |
+
*
|
20 |
+
* @return void Method does not return.
|
21 |
+
*/
|
22 |
+
public function handle_categories_and_tags( WP $wpobj ) {
|
23 |
+
$cats = Ai1ec_Event_Taxonomy::CATEGORIES;
|
24 |
+
$tags = Ai1ec_Event_Taxonomy::TAGS;
|
25 |
+
if (
|
26 |
+
! isset( $wpobj->query_vars ) || (
|
27 |
+
! isset( $wpobj->query_vars[$cats] ) &&
|
28 |
+
! isset( $wpobj->query_vars[$tags] )
|
29 |
+
)
|
30 |
+
) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
$is_cat = isset( $wpobj->query_vars[$cats] );
|
34 |
+
$is_tag = isset( $wpobj->query_vars[$tags] );
|
35 |
+
if ( $is_cat ) {
|
36 |
+
$query_ident = $cats;
|
37 |
+
$url_ident = 'cat_ids';
|
38 |
+
}
|
39 |
+
if ( $is_tag ) {
|
40 |
+
$query_ident = $tags;
|
41 |
+
$url_ident = 'tag_ids';
|
42 |
+
}
|
43 |
+
$term = get_term_by(
|
44 |
+
'slug',
|
45 |
+
$wpobj->query_vars[$query_ident],
|
46 |
+
$query_ident
|
47 |
+
);
|
48 |
+
if ( ! $term ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
$href = $this->_registry->get(
|
52 |
+
'html.element.href',
|
53 |
+
array( $url_ident => $term->term_id )
|
54 |
+
);
|
55 |
+
return Ai1ec_Http_Response_Helper::redirect(
|
56 |
+
$href->generate_href(),
|
57 |
+
301
|
58 |
+
);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
lib/robots/helper.php
CHANGED
@@ -11,18 +11,6 @@
|
|
11 |
*/
|
12 |
class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
13 |
|
14 |
-
/**
|
15 |
-
* Activation status.
|
16 |
-
*
|
17 |
-
* @return bool Whereas activation must be triggered.
|
18 |
-
*/
|
19 |
-
public function pre_check() {
|
20 |
-
if ( defined( 'FS_METHOD' ) && 'direct' === FS_METHOD ) {
|
21 |
-
return true;
|
22 |
-
}
|
23 |
-
return false; // disable until FS is properly resolved
|
24 |
-
}
|
25 |
-
|
26 |
/**
|
27 |
* Install robotx.txt into current Wordpress instance
|
28 |
*
|
@@ -32,34 +20,73 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
|
32 |
$option = $this->_registry->get( 'model.option' );
|
33 |
$settings = $this->_registry->get( 'model.settings' );
|
34 |
$robots = $option->get( 'ai1ec_robots_txt' );
|
35 |
-
|
36 |
if ( isset( $robots['page_id'] ) &&
|
37 |
-
! empty( $robots['is_installed'] ) &&
|
38 |
$robots['page_id'] == $settings->get( 'calendar_page_id' ) ) {
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
-
$
|
|
|
|
|
|
|
43 |
$robots_txt = array();
|
44 |
$is_installed = false;
|
45 |
$current_rules = null;
|
46 |
-
$custom_rules = $this->rules(
|
47 |
|
48 |
$url = wp_nonce_url(
|
49 |
'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings',
|
50 |
'ai1ec-nonce'
|
51 |
);
|
52 |
|
|
|
|
|
|
|
|
|
53 |
if ( ! function_exists( 'request_filesystem_credentials' ) ) {
|
54 |
return;
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
$creds = request_filesystem_credentials( $url, '', false, false, null );
|
58 |
if ( ! WP_Filesystem( $creds ) ) {
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
global $wp_filesystem;
|
|
|
|
|
|
|
|
|
|
|
63 |
if ( $wp_filesystem->exists( $robots_file )
|
64 |
&& $wp_filesystem->is_readable( $robots_file )
|
65 |
&& $wp_filesystem->is_writable( $robots_file ) ) {
|
@@ -67,20 +94,21 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
|
67 |
$current_rules = $wp_filesystem->get_contents( $robots_file );
|
68 |
|
69 |
// Update robots.txt
|
70 |
-
$custom_rules = $this->rules( $current_rules,
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
);
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
}
|
80 |
-
} else {
|
81 |
-
$robots_txt['is_installed'] = false;
|
82 |
}
|
83 |
-
|
84 |
// Set Page ID
|
85 |
$robots_txt['page_id'] = $settings->get( 'calendar_page_id' );
|
86 |
|
@@ -89,6 +117,12 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
|
89 |
|
90 |
// Update settings textarea
|
91 |
$settings->set( 'edit_robots_txt', $custom_rules );
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
/**
|
@@ -98,7 +132,7 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
|
98 |
* @param string $public Public flag
|
99 |
* @return array
|
100 |
*/
|
101 |
-
public function rules( $output, $public ) {
|
102 |
// Current rules
|
103 |
$current_rules = array_map(
|
104 |
'trim',
|
@@ -125,10 +159,10 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
|
125 |
}
|
126 |
|
127 |
$robots = array_merge( $current_rules, $custom_rules );
|
128 |
-
|
129 |
-
return implode(
|
130 |
PHP_EOL,
|
131 |
array_filter( array_unique( $robots ) )
|
132 |
);
|
|
|
133 |
}
|
134 |
}
|
11 |
*/
|
12 |
class Ai1ec_Robots_Helper extends Ai1ec_Base {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Install robotx.txt into current Wordpress instance
|
16 |
*
|
20 |
$option = $this->_registry->get( 'model.option' );
|
21 |
$settings = $this->_registry->get( 'model.settings' );
|
22 |
$robots = $option->get( 'ai1ec_robots_txt' );
|
|
|
23 |
if ( isset( $robots['page_id'] ) &&
|
|
|
24 |
$robots['page_id'] == $settings->get( 'calendar_page_id' ) ) {
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
+
$ftp_base_dir = defined( 'FTP_BASE' ) ? ( FTP_BASE . DIRECTORY_SEPARATOR ) : '';
|
29 |
+
// we can't use ABSPATH for ftp, if ftp user is not chrooted they need
|
30 |
+
// to define FTP_BASE in wp-config.php
|
31 |
+
$robots_file = $ftp_base_dir . 'robots.txt';
|
32 |
$robots_txt = array();
|
33 |
$is_installed = false;
|
34 |
$current_rules = null;
|
35 |
+
$custom_rules = $this->rules( '', false );
|
36 |
|
37 |
$url = wp_nonce_url(
|
38 |
'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings',
|
39 |
'ai1ec-nonce'
|
40 |
);
|
41 |
|
42 |
+
$redirect_url = admin_url(
|
43 |
+
'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings&noredirect=1'
|
44 |
+
);
|
45 |
+
|
46 |
if ( ! function_exists( 'request_filesystem_credentials' ) ) {
|
47 |
return;
|
48 |
}
|
49 |
+
$type = get_filesystem_method();
|
50 |
+
if ( 'direct' === $type ) {
|
51 |
+
// we have to use ABSPATH for direct
|
52 |
+
$robots_file = ABSPATH . 'robots.txt';
|
53 |
+
}
|
54 |
+
|
55 |
+
$creds = request_filesystem_credentials( $url, $type, false, false, null );
|
56 |
|
|
|
57 |
if ( ! WP_Filesystem( $creds ) ) {
|
58 |
+
$error_v = (
|
59 |
+
isset( $_POST['hostname'] ) ||
|
60 |
+
isset( $_POST['username'] ) ||
|
61 |
+
isset( $_POST['password'] ) ||
|
62 |
+
isset( $_POST['connection_type'] )
|
63 |
+
);
|
64 |
+
if ( $error_v ) {
|
65 |
+
// if credentials are given and we don't have access to
|
66 |
+
// wp filesystem show notice to user
|
67 |
+
// we could use request_filesystem_credentials with true error
|
68 |
+
// parameter but in this case second ftp credentials screen
|
69 |
+
// would appear
|
70 |
+
$notification = $this->_registry->get( 'notification.admin' );
|
71 |
+
$err_msg = Ai1ec_I18n::__(
|
72 |
+
'<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.'
|
73 |
+
);
|
74 |
+
$notification->store( $err_msg, 'error', 1 );
|
75 |
+
// we need to avoid infinity loop if FS_METHOD direct
|
76 |
+
// and robots.txt is not writable
|
77 |
+
if ( ! isset( $_REQUEST['noredirect'] ) ) {
|
78 |
+
Ai1ec_Http_Response_Helper::redirect( $redirect_url );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
return;
|
82 |
}
|
83 |
|
84 |
global $wp_filesystem;
|
85 |
+
// sometimes $wp_filesystem could be null
|
86 |
+
if ( null === $wp_filesystem ) {
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
$redirect = false;
|
90 |
if ( $wp_filesystem->exists( $robots_file )
|
91 |
&& $wp_filesystem->is_readable( $robots_file )
|
92 |
&& $wp_filesystem->is_writable( $robots_file ) ) {
|
94 |
$current_rules = $wp_filesystem->get_contents( $robots_file );
|
95 |
|
96 |
// Update robots.txt
|
97 |
+
$custom_rules = $this->rules( $current_rules, false );
|
98 |
+
}
|
99 |
+
$robots_txt['is_installed'] = $wp_filesystem->put_contents(
|
100 |
+
$robots_file,
|
101 |
+
$custom_rules,
|
102 |
+
FS_CHMOD_FILE
|
103 |
+
);
|
104 |
+
if ( false === $robots_txt['is_installed'] ) {
|
105 |
+
$err_msg = Ai1ec_I18n::__(
|
106 |
+
'<strong>ERROR:</strong> There was an error storing <strong>robots.txt</strong> to the server, the file could not be written.'
|
107 |
);
|
108 |
+
$this->_registry->get( 'notification.admin' )
|
109 |
+
->store( $err_msg, 'error' );
|
110 |
+
$redirect = true;
|
|
|
|
|
|
|
111 |
}
|
|
|
112 |
// Set Page ID
|
113 |
$robots_txt['page_id'] = $settings->get( 'calendar_page_id' );
|
114 |
|
117 |
|
118 |
// Update settings textarea
|
119 |
$settings->set( 'edit_robots_txt', $custom_rules );
|
120 |
+
|
121 |
+
// we need to avoid infinity loop if FS_METHOD direct
|
122 |
+
// and robots.txt is not writable
|
123 |
+
if ( $redirect && ! isset( $_REQUEST['noredirect'] ) ) {
|
124 |
+
Ai1ec_Http_Response_Helper::redirect( $redirect_url );
|
125 |
+
}
|
126 |
}
|
127 |
|
128 |
/**
|
132 |
* @param string $public Public flag
|
133 |
* @return array
|
134 |
*/
|
135 |
+
public function rules( $output = '', $public ) {
|
136 |
// Current rules
|
137 |
$current_rules = array_map(
|
138 |
'trim',
|
159 |
}
|
160 |
|
161 |
$robots = array_merge( $current_rules, $custom_rules );
|
162 |
+
$robots = implode(
|
|
|
163 |
PHP_EOL,
|
164 |
array_filter( array_unique( $robots ) )
|
165 |
);
|
166 |
+
return $robots;
|
167 |
}
|
168 |
}
|
lib/routing/router.php
CHANGED
@@ -44,18 +44,20 @@ class Ai1ec_Router extends Ai1ec_Base {
|
|
44 |
* @return boolean
|
45 |
*/
|
46 |
public function is_at_least_one_filter_set_in_request( array $view_args ) {
|
47 |
-
if( null === $this->at_least_one_filter_set_in_request ) {
|
48 |
$filter_set = false;
|
49 |
$ai1ec_settings = $this->_registry->get( 'model.settings' );
|
50 |
// check if something in the filters is set
|
51 |
foreach ( Ai1ec_Cookie_Utility::$types as $type ) {
|
52 |
-
if( ! empty( $view_args[$type] ) ) {
|
53 |
$filter_set = true;
|
54 |
break;
|
55 |
}
|
56 |
}
|
57 |
// check if the default view is set
|
58 |
-
|
|
|
|
|
59 |
$filter_set = true;
|
60 |
}
|
61 |
$this->at_least_one_filter_set_in_request = $filter_set;
|
44 |
* @return boolean
|
45 |
*/
|
46 |
public function is_at_least_one_filter_set_in_request( array $view_args ) {
|
47 |
+
if ( null === $this->at_least_one_filter_set_in_request ) {
|
48 |
$filter_set = false;
|
49 |
$ai1ec_settings = $this->_registry->get( 'model.settings' );
|
50 |
// check if something in the filters is set
|
51 |
foreach ( Ai1ec_Cookie_Utility::$types as $type ) {
|
52 |
+
if ( ! empty( $view_args[$type] ) ) {
|
53 |
$filter_set = true;
|
54 |
break;
|
55 |
}
|
56 |
}
|
57 |
// check if the default view is set
|
58 |
+
$mode = wp_is_mobile() ? '_mobile' : '';
|
59 |
+
$setting = 'default_calendar_view' . $mode;
|
60 |
+
if ( $ai1ec_settings->get( $setting ) !== $view_args['action'] ) {
|
61 |
$filter_set = true;
|
62 |
}
|
63 |
$this->at_least_one_filter_set_in_request = $filter_set;
|
lib/theme/loader.php
CHANGED
@@ -11,6 +11,11 @@
|
|
11 |
*/
|
12 |
class Ai1ec_Theme_Loader {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* @var array contains the admin and theme paths.
|
16 |
*/
|
@@ -244,6 +249,11 @@ class Ai1ec_Theme_Loader {
|
|
244 |
break;
|
245 |
|
246 |
case 'php':
|
|
|
|
|
|
|
|
|
|
|
247 |
if ( null === $paths ) {
|
248 |
$paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
|
249 |
$paths = array_keys( $paths ); // Values (URLs) not used for PHP
|
@@ -258,6 +268,11 @@ class Ai1ec_Theme_Loader {
|
|
258 |
break;
|
259 |
|
260 |
case 'twig':
|
|
|
|
|
|
|
|
|
|
|
261 |
if ( null === $paths ) {
|
262 |
$paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
|
263 |
$paths = array_keys( $paths ); // Values (URLs) not used for Twig
|
@@ -347,18 +362,18 @@ class Ai1ec_Theme_Loader {
|
|
347 |
$paths = array_keys( $paths ); // Values (URLs) not used for Twig
|
348 |
return $this->_get_twig_instance( $paths, $is_admin );
|
349 |
}
|
350 |
-
|
351 |
/**
|
352 |
* Get cache dir for Twig.
|
353 |
-
*
|
354 |
* @param bool $rescan Set to true to force rescan
|
355 |
-
*
|
356 |
* @return string|bool Cache directory or false
|
357 |
*/
|
358 |
public function get_cache_dir( $rescan = false ) {
|
359 |
$settings = $this->_registry->get( 'model.settings' );
|
360 |
$ai1ec_twig_cache = $settings->get( 'twig_cache' );
|
361 |
-
if (
|
362 |
! empty( $ai1ec_twig_cache ) &&
|
363 |
false === $rescan
|
364 |
) {
|
@@ -366,29 +381,17 @@ class Ai1ec_Theme_Loader {
|
|
366 |
? false
|
367 |
: $ai1ec_twig_cache;
|
368 |
}
|
369 |
-
$path
|
370 |
-
$scan_dirs
|
371 |
-
$
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
! $upload_dir['error']
|
376 |
-
) &&
|
377 |
-
! is_wp_error( $upload_dir )
|
378 |
-
) {
|
379 |
-
$scan_dirs[] = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'ai1ec_twig';
|
380 |
}
|
381 |
-
|
382 |
foreach ( $scan_dirs as $dir ) {
|
383 |
-
if (
|
384 |
-
|
385 |
-
|
386 |
-
mkdir( $dir, 0755, true )
|
387 |
-
) &&
|
388 |
-
is_writable( $dir )
|
389 |
-
) {
|
390 |
-
$path = $dir;
|
391 |
-
break;
|
392 |
}
|
393 |
}
|
394 |
|
@@ -428,7 +431,7 @@ class Ai1ec_Theme_Loader {
|
|
428 |
}
|
429 |
}
|
430 |
|
431 |
-
$loader = new
|
432 |
unset( $loader_path );
|
433 |
// TODO: Add cache support.
|
434 |
$environment = array(
|
@@ -449,11 +452,11 @@ class Ai1ec_Theme_Loader {
|
|
449 |
);
|
450 |
|
451 |
$ai1ec_twig_environment = new Ai1ec_Twig_Environment(
|
452 |
-
$loader,
|
453 |
-
$environment
|
454 |
);
|
455 |
$ai1ec_twig_environment->set_registry( $this->_registry );
|
456 |
-
|
457 |
$this->_twig[$instance] = $ai1ec_twig_environment;
|
458 |
if ( apply_filters( 'ai1ec_twig_add_debug', AI1EC_DEBUG ) ) {
|
459 |
$this->_twig[$instance]->addExtension( new Twig_Extension_Debug() );
|
@@ -479,4 +482,32 @@ class Ai1ec_Theme_Loader {
|
|
479 |
include( $functions );
|
480 |
}
|
481 |
}
|
482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
*/
|
12 |
class Ai1ec_Theme_Loader {
|
13 |
|
14 |
+
/**
|
15 |
+
* @const string Prefix for theme arguments filter name.
|
16 |
+
*/
|
17 |
+
const ARGS_FILTER_PREFIX = 'ai1ec_theme_args_';
|
18 |
+
|
19 |
/**
|
20 |
* @var array contains the admin and theme paths.
|
21 |
*/
|
249 |
break;
|
250 |
|
251 |
case 'php':
|
252 |
+
$args = apply_filters(
|
253 |
+
self::ARGS_FILTER_PREFIX . $filename,
|
254 |
+
$args,
|
255 |
+
$is_admin
|
256 |
+
);
|
257 |
if ( null === $paths ) {
|
258 |
$paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
|
259 |
$paths = array_keys( $paths ); // Values (URLs) not used for PHP
|
268 |
break;
|
269 |
|
270 |
case 'twig':
|
271 |
+
$args = apply_filters(
|
272 |
+
self::ARGS_FILTER_PREFIX . $filename,
|
273 |
+
$args,
|
274 |
+
$is_admin
|
275 |
+
);
|
276 |
if ( null === $paths ) {
|
277 |
$paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
|
278 |
$paths = array_keys( $paths ); // Values (URLs) not used for Twig
|
362 |
$paths = array_keys( $paths ); // Values (URLs) not used for Twig
|
363 |
return $this->_get_twig_instance( $paths, $is_admin );
|
364 |
}
|
365 |
+
|
366 |
/**
|
367 |
* Get cache dir for Twig.
|
368 |
+
*
|
369 |
* @param bool $rescan Set to true to force rescan
|
370 |
+
*
|
371 |
* @return string|bool Cache directory or false
|
372 |
*/
|
373 |
public function get_cache_dir( $rescan = false ) {
|
374 |
$settings = $this->_registry->get( 'model.settings' );
|
375 |
$ai1ec_twig_cache = $settings->get( 'twig_cache' );
|
376 |
+
if (
|
377 |
! empty( $ai1ec_twig_cache ) &&
|
378 |
false === $rescan
|
379 |
) {
|
381 |
? false
|
382 |
: $ai1ec_twig_cache;
|
383 |
}
|
384 |
+
$path = false;
|
385 |
+
$scan_dirs = array( AI1EC_TWIG_CACHE_PATH );
|
386 |
+
$filesystem = $this->_registry->get( 'filesystem.checker' );
|
387 |
+
$upload_folder = $filesystem->get_ai1ec_static_dir_if_available();
|
388 |
+
if ( '' !== $upload_folder ) {
|
389 |
+
$scan_dirs[] = $upload_folder;
|
|
|
|
|
|
|
|
|
|
|
390 |
}
|
|
|
391 |
foreach ( $scan_dirs as $dir ) {
|
392 |
+
if ( $this->_is_dir_writable( $dir ) ) {
|
393 |
+
$path = $dir;
|
394 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
}
|
396 |
}
|
397 |
|
431 |
}
|
432 |
}
|
433 |
|
434 |
+
$loader = new Ai1ec_Twig_Loader_Filesystem( $loader_path );
|
435 |
unset( $loader_path );
|
436 |
// TODO: Add cache support.
|
437 |
$environment = array(
|
452 |
);
|
453 |
|
454 |
$ai1ec_twig_environment = new Ai1ec_Twig_Environment(
|
455 |
+
$loader,
|
456 |
+
$environment
|
457 |
);
|
458 |
$ai1ec_twig_environment->set_registry( $this->_registry );
|
459 |
+
|
460 |
$this->_twig[$instance] = $ai1ec_twig_environment;
|
461 |
if ( apply_filters( 'ai1ec_twig_add_debug', AI1EC_DEBUG ) ) {
|
462 |
$this->_twig[$instance]->addExtension( new Twig_Extension_Debug() );
|
482 |
include( $functions );
|
483 |
}
|
484 |
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Safe checking for directory writeability.
|
488 |
+
*
|
489 |
+
* @param string $dir Path of likely directory.
|
490 |
+
*
|
491 |
+
* @return bool Writeability.
|
492 |
+
*/
|
493 |
+
private function _is_dir_writable( $dir ) {
|
494 |
+
$stack = array(
|
495 |
+
dirname( dirname( $dir ) ),
|
496 |
+
dirname( $dir ),
|
497 |
+
$dir,
|
498 |
+
);
|
499 |
+
foreach ( $stack as $element ) {
|
500 |
+
if ( is_dir( $element ) ) {
|
501 |
+
continue;
|
502 |
+
}
|
503 |
+
if ( ! is_writable( dirname( $element ) ) ) {
|
504 |
+
return false;
|
505 |
+
}
|
506 |
+
if ( ! mkdir( $dir, 0755, true ) ) {
|
507 |
+
return false;
|
508 |
+
}
|
509 |
+
}
|
510 |
+
return true;
|
511 |
+
}
|
512 |
+
|
513 |
+
}
|
lib/twig/ai1ec-extension.php
CHANGED
@@ -46,6 +46,7 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
|
|
46 |
new Twig_SimpleFilter( 'truncate', array( $this, 'truncate' ) ),
|
47 |
new Twig_SimpleFilter( 'timespan', array( $this, 'timespan' ) ),
|
48 |
new Twig_SimpleFilter( 'avatar', array( $this, 'avatar' ) ),
|
|
|
49 |
new Twig_SimpleFilter( 'hour_to_datetime', array( $this, 'hour_to_datetime' ) ),
|
50 |
new Twig_SimpleFilter( 'weekday', array( $this, 'weekday' ) ),
|
51 |
new Twig_SimpleFilter( 'day', array( $this, 'day' ) ),
|
@@ -99,6 +100,27 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
|
|
99 |
);
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* Check if provided value is a string.
|
104 |
*
|
46 |
new Twig_SimpleFilter( 'truncate', array( $this, 'truncate' ) ),
|
47 |
new Twig_SimpleFilter( 'timespan', array( $this, 'timespan' ) ),
|
48 |
new Twig_SimpleFilter( 'avatar', array( $this, 'avatar' ) ),
|
49 |
+
new Twig_SimpleFilter( 'avatar_url', array( $this, 'avatar_url' ) ),
|
50 |
new Twig_SimpleFilter( 'hour_to_datetime', array( $this, 'hour_to_datetime' ) ),
|
51 |
new Twig_SimpleFilter( 'weekday', array( $this, 'weekday' ) ),
|
52 |
new Twig_SimpleFilter( 'day', array( $this, 'day' ) ),
|
100 |
);
|
101 |
}
|
102 |
|
103 |
+
/**
|
104 |
+
* Get URL for avatar.
|
105 |
+
*
|
106 |
+
* Accepts an ordered array of named avatar $fallbacks.
|
107 |
+
* @param Ai1ec_Event $event The event to get the avatar for.
|
108 |
+
* @param array|null $fallback_order Order of fallback in searching for
|
109 |
+
* images, or null to use default.
|
110 |
+
*
|
111 |
+
* @return string URL if image is found.
|
112 |
+
*/
|
113 |
+
public function avatar_url(
|
114 |
+
Ai1ec_Event $event,
|
115 |
+
$fallback_order = null
|
116 |
+
) {
|
117 |
+
return $this->_registry->get( 'view.event.avatar' )
|
118 |
+
->get_event_avatar_url(
|
119 |
+
$event,
|
120 |
+
$fallback_order
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
/**
|
125 |
* Check if provided value is a string.
|
126 |
*
|
lib/twig/loader.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Wrapper for Twig_Loader_Filesystem
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.Twig
|
11 |
+
*/
|
12 |
+
class Ai1ec_Twig_Loader_Filesystem extends Twig_Loader_Filesystem {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Gets the cache key to use for the cache for a given template name.
|
16 |
+
*
|
17 |
+
* @param string $name The name of the template to load
|
18 |
+
*
|
19 |
+
* @return string The cache key
|
20 |
+
*
|
21 |
+
* @throws Twig_Error_Loader When $name is not found.
|
22 |
+
*/
|
23 |
+
public function getCacheKey( $name ) {
|
24 |
+
$cache_key = $this->findTemplate( $name );
|
25 |
+
// make path relative
|
26 |
+
$cache_key = str_replace(
|
27 |
+
WP_PLUGIN_DIR . DIRECTORY_SEPARATOR,
|
28 |
+
'',
|
29 |
+
$cache_key
|
30 |
+
);
|
31 |
+
// namespace style separators avoid OS colisions.
|
32 |
+
$cache_key = str_replace( '/', '\\', $cache_key );
|
33 |
+
return $cache_key;
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
public/admin/add_new_event_meta_box.php
CHANGED
@@ -2,11 +2,8 @@
|
|
2 |
id="ai1ec-add-new-event-accordion">
|
3 |
<?php foreach ( $boxes as $i => $box ) : ?>
|
4 |
<div class="ai1ec-panel ai1ec-panel-default
|
5 |
-
|
6 |
-
|
7 |
</div>
|
8 |
<?php endforeach; ?>
|
9 |
-
|
10 |
-
<?php echo $publish_button; ?>
|
11 |
-
<?php endif; ?>
|
12 |
-
</div>
|
2 |
id="ai1ec-add-new-event-accordion">
|
3 |
<?php foreach ( $boxes as $i => $box ) : ?>
|
4 |
<div class="ai1ec-panel ai1ec-panel-default
|
5 |
+
<?php echo 0 === $i ? 'ai1ec-overflow-visible' : '' ?>">
|
6 |
+
<?php echo $box; ?>
|
7 |
</div>
|
8 |
<?php endforeach; ?>
|
9 |
+
</div>
|
|
|
|
|
|
public/admin/box_event_contact.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
href="#ai1ec-event-contact-box">
|
5 |
<i class="ai1ec-fa ai1ec-fa-phone ai1ec-fa-fw"></i>
|
6 |
<?php _e( 'Organizer contact info', AI1EC_PLUGIN_NAME ); ?>
|
|
|
7 |
</a>
|
8 |
</div>
|
9 |
<div id="ai1ec-event-contact-box" class="ai1ec-panel-collapse ai1ec-collapse">
|
4 |
href="#ai1ec-event-contact-box">
|
5 |
<i class="ai1ec-fa ai1ec-fa-phone ai1ec-fa-fw"></i>
|
6 |
<?php _e( 'Organizer contact info', AI1EC_PLUGIN_NAME ); ?>
|
7 |
+
<i class="ai1ec-fa ai1ec-fa-warning ai1ec-fa-fw ai1ec-hidden"></i>
|
8 |
</a>
|
9 |
</div>
|
10 |
<div id="ai1ec-event-contact-box" class="ai1ec-panel-collapse ai1ec-collapse">
|
public/admin/box_event_cost.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
href="#ai1ec-event-cost-box">
|
5 |
<i class="ai1ec-fa ai1ec-fa-shopping-cart ai1ec-fa-fw"></i>
|
6 |
<?php _e( 'Event cost and Tickets', AI1EC_PLUGIN_NAME ); ?>
|
|
|
7 |
</a>
|
8 |
</div>
|
9 |
<div id="ai1ec-event-cost-box" class="ai1ec-panel-collapse ai1ec-collapse">
|
4 |
href="#ai1ec-event-cost-box">
|
5 |
<i class="ai1ec-fa ai1ec-fa-shopping-cart ai1ec-fa-fw"></i>
|
6 |
<?php _e( 'Event cost and Tickets', AI1EC_PLUGIN_NAME ); ?>
|
7 |
+
<i class="ai1ec-fa ai1ec-fa-warning ai1ec-fa-fw ai1ec-hidden"></i>
|
8 |
</a>
|
9 |
</div>
|
10 |
<div id="ai1ec-event-cost-box" class="ai1ec-panel-collapse ai1ec-collapse">
|
public/admin/box_inline_warning.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<div id="ai1ec_event_inline_alert" class="timely ai1ec-alert ai1ec-alert-danger ai1ec-hidden"></div>
|
public/admin/box_publish_button.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<input type="button"
|
2 |
-
name="ai1ec_bottom_publish"
|
3 |
-
id="ai1ec_bottom_publish"
|
4 |
-
class="button-primary ai1ec_bottom_publish"
|
5 |
-
value="<?php echo $button_value ?>" />
|
|
|
|
|
|
|
|
|
|
public/admin/box_time_and_date.php
CHANGED
@@ -47,20 +47,10 @@
|
|
47 |
id="ai1ec_start-date-input">
|
48 |
<input type="text" class="ai1ec-time-input ai1ec-form-control"
|
49 |
id="ai1ec_start-time-input">
|
50 |
-
<?php if ( $timezone_string ) : ?>
|
51 |
-
<small>
|
52 |
-
<?php printf(
|
53 |
-
__( '(Time zone: %s)', AI1EC_PLUGIN_NAME ),
|
54 |
-
'<abbr title="' . $timezone .
|
55 |
-
'" class="ai1ec-tooltip-toggle">' . $timezone_string .
|
56 |
-
'</abbr>'
|
57 |
-
); ?>
|
58 |
-
</small>
|
59 |
-
<?php endif; ?>
|
60 |
<input type="hidden"
|
61 |
name="ai1ec_start_time"
|
62 |
id="ai1ec_start-time"
|
63 |
-
value="<?php echo $start->format_to_javascript(); ?>">
|
64 |
</td>
|
65 |
</tr>
|
66 |
<tr>
|
@@ -77,7 +67,28 @@
|
|
77 |
<input type="hidden"
|
78 |
name="ai1ec_end_time"
|
79 |
id="ai1ec_end-time"
|
80 |
-
value="<?php echo $end->format_to_javascript(); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
</td>
|
82 |
</tr>
|
83 |
<?php
|
@@ -135,8 +146,7 @@
|
|
135 |
<td>
|
136 |
<div id="datepicker-widget">
|
137 |
<div id="widgetField">
|
138 |
-
<
|
139 |
-
<a href="#"><?php _e( 'Select date range', AI1EC_PLUGIN_NAME ); ?></a>
|
140 |
</div>
|
141 |
<div id="widgetCalendar"></div>
|
142 |
</div>
|
47 |
id="ai1ec_start-date-input">
|
48 |
<input type="text" class="ai1ec-time-input ai1ec-form-control"
|
49 |
id="ai1ec_start-time-input">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<input type="hidden"
|
51 |
name="ai1ec_start_time"
|
52 |
id="ai1ec_start-time"
|
53 |
+
value="<?php echo $start->format_to_javascript( true ); ?>">
|
54 |
</td>
|
55 |
</tr>
|
56 |
<tr>
|
67 |
<input type="hidden"
|
68 |
name="ai1ec_end_time"
|
69 |
id="ai1ec_end-time"
|
70 |
+
value="<?php echo $end->format_to_javascript( true ); ?>">
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td>
|
75 |
+
<label for="ai1ec_end-date-input">
|
76 |
+
<?php _e( 'Time zone', AI1EC_PLUGIN_NAME ); ?>:
|
77 |
+
</label>
|
78 |
+
</td>
|
79 |
+
<td>
|
80 |
+
<select name="ai1ec_timezone_name" id="timezone-select">
|
81 |
+
<option value=""><?php _e( 'Choose your time zone', AI1EC_PLUGIN_NAME ); ?></option>
|
82 |
+
<?php foreach ( $timezones_list as $group => $timezones ) : ?>
|
83 |
+
<optgroup label="<?php echo $group;?>">
|
84 |
+
<?php
|
85 |
+
foreach ( $timezones as $timezone ) : ?>
|
86 |
+
<option value="<?php echo $timezone['value'];?>"
|
87 |
+
<?php echo $timezone['value'] == $timezone_string ? 'selected' : '';?>><?php echo $timezone['text'];?></option>
|
88 |
+
<?php endforeach; ?>
|
89 |
+
</optgroup>
|
90 |
+
<?php endforeach; ?>
|
91 |
+
</select>
|
92 |
</td>
|
93 |
</tr>
|
94 |
<?php
|
146 |
<td>
|
147 |
<div id="datepicker-widget">
|
148 |
<div id="widgetField">
|
149 |
+
<a href="javascript:void(0)" id="ai1ec_exclude-dates-input" data-placeholder="<?php _e( 'Choose dates', AI1EC_PLUGIN_NAME ); ?>"></a>
|
|
|
150 |
</div>
|
151 |
<div id="widgetCalendar"></div>
|
152 |
</div>
|
public/admin/css/add_new_event.css
CHANGED
@@ -66,8 +66,15 @@
|
|
66 |
width: 5.5em;
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
/* Recurrence fields */
|
70 |
-
#ai1ec_repeat_text a,
|
|
|
|
|
71 |
text-decoration: none;
|
72 |
border-bottom: 1px dashed red;
|
73 |
}
|
@@ -313,45 +320,16 @@
|
|
313 |
#datepicker-widget {
|
314 |
position: relative;
|
315 |
}
|
316 |
-
#widgetField {
|
317 |
-
width: 290px;
|
318 |
-
height: 26px;
|
319 |
-
background: url(../img/field.png);
|
320 |
-
overflow: hidden;
|
321 |
-
position: relative;
|
322 |
-
}
|
323 |
-
#widgetField a {
|
324 |
-
display: block;
|
325 |
-
position: absolute;
|
326 |
-
width: 26px;
|
327 |
-
height: 26px;
|
328 |
-
top: 0;
|
329 |
-
right: 0;
|
330 |
-
text-decoration: none;
|
331 |
-
text-indent: -3000px;
|
332 |
-
}
|
333 |
-
#widgetField span {
|
334 |
-
font-size: 12px;
|
335 |
-
font-weight: bold;
|
336 |
-
color: #000;
|
337 |
-
position: absolute;
|
338 |
-
top: 0;
|
339 |
-
height: 26px;
|
340 |
-
line-height: 26px;
|
341 |
-
left: 5px;
|
342 |
-
width: 250px;
|
343 |
-
text-align: center;
|
344 |
-
cursor: pointer;
|
345 |
-
}
|
346 |
#widgetCalendar {
|
347 |
position: absolute;
|
348 |
top: 26px;
|
349 |
left: 0;
|
350 |
-
height:
|
351 |
overflow: hidden;
|
352 |
-
width:
|
353 |
-
background: #
|
354 |
z-index: 2;
|
|
|
355 |
}
|
356 |
#widgetCalendar .datepicker {
|
357 |
position: absolute;
|
@@ -369,8 +347,14 @@
|
|
369 |
#widgetCalendar .datepickerBorderBR {
|
370 |
background: transparent !important;
|
371 |
}
|
372 |
-
#widgetCalendar .datepicker
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
.ai1ec-info-text {
|
376 |
font-size: 10px;
|
@@ -401,3 +385,7 @@
|
|
401 |
width: 0;
|
402 |
}
|
403 |
|
|
|
|
|
|
|
|
66 |
width: 5.5em;
|
67 |
}
|
68 |
|
69 |
+
.timely .ai1ec-input-warn {
|
70 |
+
border-color: red;
|
71 |
+
background-color: #f5f5f5;
|
72 |
+
}
|
73 |
+
|
74 |
/* Recurrence fields */
|
75 |
+
#ai1ec_repeat_text a,
|
76 |
+
#ai1ec_exclude_text a,
|
77 |
+
#ai1ec_exclude-dates-input {
|
78 |
text-decoration: none;
|
79 |
border-bottom: 1px dashed red;
|
80 |
}
|
320 |
#datepicker-widget {
|
321 |
position: relative;
|
322 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
#widgetCalendar {
|
324 |
position: absolute;
|
325 |
top: 26px;
|
326 |
left: 0;
|
327 |
+
height: 186px;
|
328 |
overflow: hidden;
|
329 |
+
width: 648px !important;
|
330 |
+
background: #FFFFFF;
|
331 |
z-index: 2;
|
332 |
+
display: none;
|
333 |
}
|
334 |
#widgetCalendar .datepicker {
|
335 |
position: absolute;
|
347 |
#widgetCalendar .datepickerBorderBR {
|
348 |
background: transparent !important;
|
349 |
}
|
350 |
+
#widgetCalendar .ai1ec-datepicker-week,
|
351 |
+
#widgetCalendar .ai1ec-datepicker-header-week {
|
352 |
+
display: none;
|
353 |
+
}
|
354 |
+
#widgetField input {
|
355 |
+
width: 320px;
|
356 |
+
padding-right: 24px;
|
357 |
+
background-position: 99% 40%;
|
358 |
}
|
359 |
.ai1ec-info-text {
|
360 |
font-size: 10px;
|
385 |
width: 0;
|
386 |
}
|
387 |
|
388 |
+
#s2id_timezone-select {
|
389 |
+
width: 172px;
|
390 |
+
margin: 0;
|
391 |
+
}
|
public/admin/css/datepicker.css
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
div.datepicker {
|
2 |
position: relative;
|
3 |
-
font-family:
|
4 |
-
font-size:
|
5 |
-
width:
|
6 |
-
height:
|
7 |
position: absolute;
|
8 |
cursor: default;
|
9 |
top: 0;
|
10 |
left: 0;
|
|
|
11 |
display: none;
|
12 |
}
|
13 |
.datepickerContainer {
|
14 |
-
background: #121212;
|
15 |
position: absolute;
|
16 |
-
top:
|
17 |
-
left:
|
18 |
}
|
19 |
.datepickerBorderT {
|
20 |
position: absolute;
|
@@ -85,34 +85,34 @@ div.datepicker {
|
|
85 |
}
|
86 |
div.datepicker table {
|
87 |
border-collapse:collapse;
|
|
|
88 |
}
|
89 |
div.datepicker a {
|
90 |
-
color: #eee;
|
91 |
text-decoration: none;
|
92 |
-
cursor: default;
|
93 |
outline: none;
|
94 |
}
|
95 |
div.datepicker table td {
|
96 |
-
text-align:
|
|
|
97 |
padding: 0;
|
98 |
-
|
99 |
}
|
100 |
div.datepicker th {
|
101 |
text-align: center;
|
102 |
-
|
103 |
font-weight: normal;
|
104 |
}
|
105 |
div.datepicker tbody th {
|
106 |
-
text-align:
|
107 |
}
|
108 |
div.datepicker tbody a {
|
109 |
display: block;
|
110 |
}
|
111 |
.datepickerDays a {
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
.datepickerYears a,
|
118 |
.datepickerMonths a{
|
@@ -122,7 +122,7 @@ div.datepicker tbody a {
|
|
122 |
text-align: center;
|
123 |
}
|
124 |
td.datepickerNotInMonth a {
|
125 |
-
color: #
|
126 |
}
|
127 |
tbody.datepickerDays td.datepickerSelected{
|
128 |
background: #136A9F;
|
@@ -134,25 +134,35 @@ tbody.datepickerYears td.datepickerSelected,
|
|
134 |
tbody.datepickerMonths td.datepickerSelected{
|
135 |
background: #17384d;
|
136 |
}
|
137 |
-
div.datepicker a:hover,
|
138 |
div.datepicker a:hover {
|
139 |
-
color: #
|
140 |
}
|
141 |
-
|
142 |
-
|
143 |
}
|
144 |
div.datepicker tbody th {
|
145 |
-
text-align:
|
146 |
}
|
147 |
.datepickerSpace div {
|
148 |
width: 20px;
|
149 |
}
|
|
|
|
|
|
|
|
|
|
|
150 |
.datepickerGoNext a,
|
151 |
.datepickerGoPrev a,
|
152 |
.datepickerMonth a {
|
153 |
text-align: center;
|
154 |
height: 20px;
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
.datepickerGoNext a {
|
158 |
float: right;
|
@@ -162,6 +172,9 @@ div.datepicker tbody th {
|
|
162 |
float: left;
|
163 |
width: 20px;
|
164 |
}
|
|
|
|
|
|
|
165 |
table.datepickerViewDays tbody.datepickerMonths,
|
166 |
table.datepickerViewDays tbody.datepickerYears {
|
167 |
display: none;
|
@@ -186,6 +199,6 @@ td.datepickerDisabled a:hover {
|
|
186 |
td.datepickerSpecial a {
|
187 |
background: #700;
|
188 |
}
|
189 |
-
td.
|
190 |
-
background: #
|
191 |
}
|
1 |
div.datepicker {
|
2 |
position: relative;
|
3 |
+
font-family: 'Open Sans', Arial, sans-serif;
|
4 |
+
font-size: 13px;
|
5 |
+
width: 648px !important;
|
6 |
+
height: 186px !important;
|
7 |
position: absolute;
|
8 |
cursor: default;
|
9 |
top: 0;
|
10 |
left: 0;
|
11 |
+
border: 1px solid #999999;
|
12 |
display: none;
|
13 |
}
|
14 |
.datepickerContainer {
|
|
|
15 |
position: absolute;
|
16 |
+
top: 3px;
|
17 |
+
left: 3px;
|
18 |
}
|
19 |
.datepickerBorderT {
|
20 |
position: absolute;
|
85 |
}
|
86 |
div.datepicker table {
|
87 |
border-collapse:collapse;
|
88 |
+
width: 200px
|
89 |
}
|
90 |
div.datepicker a {
|
|
|
91 |
text-decoration: none;
|
|
|
92 |
outline: none;
|
93 |
}
|
94 |
div.datepicker table td {
|
95 |
+
text-align: center;
|
96 |
+
font-size: 12px;
|
97 |
padding: 0;
|
98 |
+
font-family: inherit;
|
99 |
}
|
100 |
div.datepicker th {
|
101 |
text-align: center;
|
102 |
+
padding: 2px 0;
|
103 |
font-weight: normal;
|
104 |
}
|
105 |
div.datepicker tbody th {
|
106 |
+
text-align: center;
|
107 |
}
|
108 |
div.datepicker tbody a {
|
109 |
display: block;
|
110 |
}
|
111 |
.datepickerDays a {
|
112 |
+
display: block;
|
113 |
+
color: black;
|
114 |
+
padding: 2px 2px;
|
115 |
+
text-decoration: none !important;
|
116 |
}
|
117 |
.datepickerYears a,
|
118 |
.datepickerMonths a{
|
122 |
text-align: center;
|
123 |
}
|
124 |
td.datepickerNotInMonth a {
|
125 |
+
color: #999;
|
126 |
}
|
127 |
tbody.datepickerDays td.datepickerSelected{
|
128 |
background: #136A9F;
|
134 |
tbody.datepickerMonths td.datepickerSelected{
|
135 |
background: #17384d;
|
136 |
}
|
|
|
137 |
div.datepicker a:hover {
|
138 |
+
color: #446e1d;
|
139 |
}
|
140 |
+
.datepickerDays a:hover {
|
141 |
+
background: #ccccff;
|
142 |
}
|
143 |
div.datepicker tbody th {
|
144 |
+
text-align: center;
|
145 |
}
|
146 |
.datepickerSpace div {
|
147 |
width: 20px;
|
148 |
}
|
149 |
+
.datepickerGoNext,
|
150 |
+
.datepickerGoPrev,
|
151 |
+
.datepickerMonth {
|
152 |
+
padding-bottom: 0;
|
153 |
+
}
|
154 |
.datepickerGoNext a,
|
155 |
.datepickerGoPrev a,
|
156 |
.datepickerMonth a {
|
157 |
text-align: center;
|
158 |
height: 20px;
|
159 |
+
font-size: 13px;
|
160 |
+
font-weight: bold;
|
161 |
+
}
|
162 |
+
.datepickerMonth a {
|
163 |
+
display: block;
|
164 |
+
float: left;
|
165 |
+
width: 150px;
|
166 |
}
|
167 |
.datepickerGoNext a {
|
168 |
float: right;
|
172 |
float: left;
|
173 |
width: 20px;
|
174 |
}
|
175 |
+
.datepickerDoW th {
|
176 |
+
width: 25px;
|
177 |
+
}
|
178 |
table.datepickerViewDays tbody.datepickerMonths,
|
179 |
table.datepickerViewDays tbody.datepickerYears {
|
180 |
display: none;
|
199 |
td.datepickerSpecial a {
|
200 |
background: #700;
|
201 |
}
|
202 |
+
td.datepickerSelected a {
|
203 |
+
background: #ccccff;
|
204 |
}
|
public/admin/css/settings.css
CHANGED
@@ -150,7 +150,8 @@
|
|
150 |
|
151 |
#show_front_end_create_form,
|
152 |
#allow_anonymous_submissions,
|
153 |
-
#allow_anonymous_uploads
|
|
|
154 |
margin-left: 17px;
|
155 |
}
|
156 |
.ai1ec-recaptcha-settings label {
|
150 |
|
151 |
#show_front_end_create_form,
|
152 |
#allow_anonymous_submissions,
|
153 |
+
#allow_anonymous_uploads,
|
154 |
+
#publish_anonymous_submissions {
|
155 |
margin-left: 17px;
|
156 |
}
|
157 |
.ai1ec-recaptcha-settings label {
|
public/admin/twig/setting/embedding.twig
CHANGED
@@ -31,6 +31,7 @@
|
|
31 |
|
32 |
<li>{{ text_filter_post_id }} <code class="ai1ec-autoselect">[ai1ec post_id="1"]</code></li>
|
33 |
<li>{{ text_filter_post_id_comma }} <code class="ai1ec-autoselect">[ai1ec post_id="1,2"]</code></li>
|
|
|
34 |
</ul>
|
35 |
<div class="ai1ec-alert ai1ec-alert-warning">
|
36 |
<strong>{{ text_warning }}</strong>
|
31 |
|
32 |
<li>{{ text_filter_post_id }} <code class="ai1ec-autoselect">[ai1ec post_id="1"]</code></li>
|
33 |
<li>{{ text_filter_post_id_comma }} <code class="ai1ec-autoselect">[ai1ec post_id="1,2"]</code></li>
|
34 |
+
<li>{{ text_events_limit }} <code class="ai1ec-autoselect">[ai1ec events_limit="5"]</code></li>
|
35 |
</ul>
|
36 |
<div class="ai1ec-alert ai1ec-alert-warning">
|
37 |
<strong>{{ text_warning }}</strong>
|
public/admin/twig/setting/enabled-views.twig
CHANGED
@@ -1,12 +1,25 @@
|
|
1 |
<div class="ai1ec-admin-view-settings ai1ec-form-group">
|
2 |
-
<label class="ai1ec-control-label ai1ec-col-
|
3 |
-
<div class="ai1ec-col-
|
4 |
<table class="ai1ec-table ai1ec-table-striped">
|
5 |
<thead>
|
6 |
<tr>
|
7 |
-
<th></th>
|
8 |
-
<th
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
</tr>
|
11 |
</thead>
|
12 |
<tbody>
|
@@ -15,16 +28,26 @@
|
|
15 |
<td>
|
16 |
{{ args.longname }}
|
17 |
</td>
|
18 |
-
<td
|
19 |
-
<input class="
|
20 |
name="view_{{ view }}_enabled" value="1"
|
21 |
{{ args.enabled }}>
|
22 |
</td>
|
23 |
-
<td
|
24 |
<input class="ai1ec-toggle-default-view" type="radio"
|
25 |
name="default_calendar_view" value="{{ view }}"
|
26 |
{{ args.default }}>
|
27 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
</tr>
|
29 |
{% endfor %}
|
30 |
</tbody>
|
1 |
<div class="ai1ec-admin-view-settings ai1ec-form-group">
|
2 |
+
<label class="ai1ec-control-label ai1ec-col-lg-5">{{ label }}</label>
|
3 |
+
<div class="ai1ec-col-lg-7">
|
4 |
<table class="ai1ec-table ai1ec-table-striped">
|
5 |
<thead>
|
6 |
<tr>
|
7 |
+
<th scope="row"></th>
|
8 |
+
<th scope="col" colspan="2" class="ai1ec-text-center">
|
9 |
+
<i class="ai1ec-fa ai1ec-fa-desktop ai1ec-fa-lg ai1ec-fa-fw"></i>
|
10 |
+
{{ text_desktop }}
|
11 |
+
</th>
|
12 |
+
<th scope="col" colspan="2" class="ai1ec-text-center">
|
13 |
+
<i class="ai1ec-fa ai1ec-fa-mobile ai1ec-fa-lg ai1ec-fa-fw"></i>
|
14 |
+
{{ text_mobile }}
|
15 |
+
</th>
|
16 |
+
</tr>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"></th>
|
19 |
+
<th scope="col" class="ai1ec-text-center"><small>{{ text_enabled }}</small></th>
|
20 |
+
<th scope="col" class="ai1ec-text-center"><small>{{ text_default }}</small></th>
|
21 |
+
<th scope="col" class="ai1ec-text-center"><small>{{ text_enabled }}</small></th>
|
22 |
+
<th scope="col" class="ai1ec-text-center"><small>{{ text_default }}</small></th>
|
23 |
</tr>
|
24 |
</thead>
|
25 |
<tbody>
|
28 |
<td>
|
29 |
{{ args.longname }}
|
30 |
</td>
|
31 |
+
<td>
|
32 |
+
<input class="ai1ec-toggle-view" type="checkbox"
|
33 |
name="view_{{ view }}_enabled" value="1"
|
34 |
{{ args.enabled }}>
|
35 |
</td>
|
36 |
+
<td>
|
37 |
<input class="ai1ec-toggle-default-view" type="radio"
|
38 |
name="default_calendar_view" value="{{ view }}"
|
39 |
{{ args.default }}>
|
40 |
</td>
|
41 |
+
<td>
|
42 |
+
<input class="ai1ec-toggle-view" type="checkbox"
|
43 |
+
name="view_{{ view }}_enabled_mobile" value="1"
|
44 |
+
{{ args.enabled_mobile }}>
|
45 |
+
</td>
|
46 |
+
<td>
|
47 |
+
<input class="ai1ec-toggle-default-view" type="radio"
|
48 |
+
name="default_calendar_view_mobile" value="{{ view }}"
|
49 |
+
{{ args.default_mobile }}>
|
50 |
+
</td>
|
51 |
</tr>
|
52 |
{% endfor %}
|
53 |
</tbody>
|
public/admin/twig/setting/input.twig
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
{{ label | raw }}
|
3 |
</label>
|
4 |
{% if append is defined or licence_valid is defined %}
|
5 |
-
<div class="{{ group_class is defined ?
|
|
|
6 |
<div class="ai1ec-input-group">
|
7 |
{% else %}
|
8 |
<div class="ai1ec-col-sm-7">
|
@@ -10,7 +11,7 @@
|
|
10 |
|
11 |
{% from 'form-elements/input.twig' import input %}
|
12 |
{% spaceless %}
|
13 |
-
{{ input( id, id, value,
|
14 |
|
15 |
|
16 |
{% if append is defined %}
|
2 |
{{ label | raw }}
|
3 |
</label>
|
4 |
{% if append is defined or licence_valid is defined %}
|
5 |
+
<div class="{{ group_class is defined ?
|
6 |
+
group_class : 'ai1ec-col-lg-3 ai1ec-col-md-4 ai1ec-col-sm-5' }}">
|
7 |
<div class="ai1ec-input-group">
|
8 |
{% else %}
|
9 |
<div class="ai1ec-col-sm-7">
|
11 |
|
12 |
{% from 'form-elements/input.twig' import input %}
|
13 |
{% spaceless %}
|
14 |
+
{{ input( id, id, value, input_type, input_args ) }}
|
15 |
|
16 |
|
17 |
{% if append is defined %}
|
public/admin/twig/setting/textarea.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
<label class="ai1ec-
|
2 |
{{ label | raw }}
|
3 |
</label>
|
4 |
-
<div class="ai1ec-col-sm-
|
5 |
{% if append is defined %}
|
6 |
<div class="ai1ec-input-group">
|
7 |
{% endif %}
|
1 |
+
<label class="ai1ec-col-sm-12" for="{{ id }}">
|
2 |
{{ label | raw }}
|
3 |
</label>
|
4 |
+
<div class="ai1ec-col-sm-12">
|
5 |
{% if append is defined %}
|
6 |
<div class="ai1ec-input-group">
|
7 |
{% endif %}
|
public/js/build.txt
CHANGED
@@ -9,6 +9,7 @@ libs/frontend_utils.js
|
|
9 |
external_libs/bootstrap/tab.js
|
10 |
libs/utils.js
|
11 |
domReady.js
|
|
|
12 |
scripts/common_scripts/frontend/common_event_handlers.js
|
13 |
external_libs/bootstrap/tooltip.js
|
14 |
external_libs/bootstrap/popover.js
|
@@ -52,6 +53,7 @@ external_libs/bootstrap_datepicker.js
|
|
52 |
external_libs/bootstrap/alert.js
|
53 |
external_libs/jquery_cookie.js
|
54 |
scripts/calendar/load_views.js
|
|
|
55 |
external_libs/bootstrap/transition.js
|
56 |
external_libs/bootstrap/modal.js
|
57 |
scripts/calendar.js
|
@@ -132,6 +134,7 @@ external_libs/bootstrap/transition.js
|
|
132 |
external_libs/bootstrap/collapse.js
|
133 |
external_libs/bootstrap/modal.js
|
134 |
external_libs/bootstrap/alert.js
|
|
|
135 |
scripts/add_new_event.js
|
136 |
pages/add_new_event.js
|
137 |
|
@@ -184,6 +187,7 @@ pages/less_variables_editing.js
|
|
184 |
pages/common_frontend.js
|
185 |
----------------
|
186 |
domReady.js
|
|
|
187 |
scripts/common_scripts/frontend/common_event_handlers.js
|
188 |
external_libs/modernizr.js
|
189 |
external_libs/bootstrap/tooltip.js
|
@@ -203,6 +207,7 @@ libs/frontend_utils.js
|
|
203 |
external_libs/bootstrap/tab.js
|
204 |
libs/utils.js
|
205 |
domReady.js
|
|
|
206 |
scripts/common_scripts/frontend/common_event_handlers.js
|
207 |
external_libs/bootstrap/tooltip.js
|
208 |
external_libs/bootstrap/popover.js
|
@@ -246,6 +251,7 @@ external_libs/bootstrap_datepicker.js
|
|
246 |
external_libs/bootstrap/alert.js
|
247 |
external_libs/jquery_cookie.js
|
248 |
scripts/calendar/load_views.js
|
|
|
249 |
external_libs/bootstrap/transition.js
|
250 |
external_libs/bootstrap/modal.js
|
251 |
scripts/calendar.js
|
@@ -253,6 +259,7 @@ scripts/calendar.js
|
|
253 |
scripts/common_scripts/frontend/common_frontend.js
|
254 |
----------------
|
255 |
domReady.js
|
|
|
256 |
scripts/common_scripts/frontend/common_event_handlers.js
|
257 |
external_libs/modernizr.js
|
258 |
external_libs/bootstrap/tooltip.js
|
9 |
external_libs/bootstrap/tab.js
|
10 |
libs/utils.js
|
11 |
domReady.js
|
12 |
+
external_libs/bootstrap/affix.js
|
13 |
scripts/common_scripts/frontend/common_event_handlers.js
|
14 |
external_libs/bootstrap/tooltip.js
|
15 |
external_libs/bootstrap/popover.js
|
53 |
external_libs/bootstrap/alert.js
|
54 |
external_libs/jquery_cookie.js
|
55 |
scripts/calendar/load_views.js
|
56 |
+
scripts/calendar/calendar-affix.js
|
57 |
external_libs/bootstrap/transition.js
|
58 |
external_libs/bootstrap/modal.js
|
59 |
scripts/calendar.js
|
134 |
external_libs/bootstrap/collapse.js
|
135 |
external_libs/bootstrap/modal.js
|
136 |
external_libs/bootstrap/alert.js
|
137 |
+
external_libs/select2.js
|
138 |
scripts/add_new_event.js
|
139 |
pages/add_new_event.js
|
140 |
|
187 |
pages/common_frontend.js
|
188 |
----------------
|
189 |
domReady.js
|
190 |
+
external_libs/bootstrap/affix.js
|
191 |
scripts/common_scripts/frontend/common_event_handlers.js
|
192 |
external_libs/modernizr.js
|
193 |
external_libs/bootstrap/tooltip.js
|
207 |
external_libs/bootstrap/tab.js
|
208 |
libs/utils.js
|
209 |
domReady.js
|
210 |
+
external_libs/bootstrap/affix.js
|
211 |
scripts/common_scripts/frontend/common_event_handlers.js
|
212 |
external_libs/bootstrap/tooltip.js
|
213 |
external_libs/bootstrap/popover.js
|
251 |
external_libs/bootstrap/alert.js
|
252 |
external_libs/jquery_cookie.js
|
253 |
scripts/calendar/load_views.js
|
254 |
+
scripts/calendar/calendar-affix.js
|
255 |
external_libs/bootstrap/transition.js
|
256 |
external_libs/bootstrap/modal.js
|
257 |
scripts/calendar.js
|
259 |
scripts/common_scripts/frontend/common_frontend.js
|
260 |
----------------
|
261 |
domReady.js
|
262 |
+
external_libs/bootstrap/affix.js
|
263 |
scripts/common_scripts/frontend/common_event_handlers.js
|
264 |
external_libs/modernizr.js
|
265 |
external_libs/bootstrap/tooltip.js
|
public/js/external_libs/ai1ec_datepicker.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
timely.define(["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="6" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">',"<th><span><%=week%></span></th>","<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B, Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend({},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}});
|
1 |
+
timely.define(["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}});
|
public/js/external_libs/bootstrap/affix.js
CHANGED
@@ -1,20 +1,9 @@
|
|
1 |
/* ========================================================================
|
2 |
-
* Bootstrap: affix.js v3.
|
3 |
* http://getbootstrap.com/javascript/#affix
|
4 |
* ========================================================================
|
5 |
-
* Copyright
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
* ======================================================================== */
|
19 |
|
20 |
-
timely.define(["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top()),typeof u=="function"&&(u=s.bottom());var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top",""),this.affixed=a,this.unpin=a=="bottom"?
|
1 |
/* ========================================================================
|
2 |
+
* Bootstrap: affix.js v3.1.1
|
3 |
* http://getbootstrap.com/javascript/#affix
|
4 |
* ========================================================================
|
5 |
+
* Copyright 2011-2014 Twitter, Inc.
|
6 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
* ======================================================================== */
|
8 |
|
9 |
+
timely.define(["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})});
|
public/js/pages/add_new_event.js
CHANGED
@@ -118,4 +118,25 @@
|
|
118 |
* limitations under the License.
|
119 |
* ======================================================================== */
|
120 |
|
121 |
-
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e(".coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("input.longitude").val(t.latLng.lng()),e("input.latitude").val(t.latLng.lat()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m())})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("input.latitude").val()),n=parseFloat(e("input.longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){e(this).is(":checked")?e(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast"):e(".ai1ec_box_map").slideUp("fast")},s=function(t){this.checked===!0?e("#ai1ec_table_coordinates").css({visibility:"visible"}):(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_table_coordinates input").val(""),e("div.ai1ec-error").remove())},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},s=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},o=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return l(i,s),!1})},u=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),l(i,s);else{this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").attr("disabled",!0),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},a=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},f=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(n)},l=function(t,n){var i=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",i);i.modal({backdrop:"static"}),e.post(r,t,function(e){e.error?(window.alert(e.message),i.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:l,init_modal_widgets:f,click_on_modal_cancel:a,click_on_checkbox:u,click_on_ics_rule_text:o,repeat_form_error:s,repeat_form_success:i}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">«</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">»</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";")}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){var n=e(this).data("state")===undefined?!1:e(this).data("state");return e("#widgetCalendar").stop().animate({height:n?0:e("#widgetCalendar div.datepicker").get(0).offsetHeight},500),e(this).data("state",!n),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/ai1ec_datepicker",["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="6" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">',"<th><span><%=week%></span></th>","<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B, Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend({},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/ai1ec_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r);var i=e("#ai1ec_exdate").val(),s=null,o=!1,u;if(i.length>=8){s=[];var f=[];e.each(i.split(","),function(e,t){var r=t.slice(0,8),i=r.substr(0,4),o=r.substr(4,2);u=r.substr(6,2),o=o.charAt(0)==="0"?"0"+(parseInt(o.charAt(1),10)-1):parseInt(o,10)-1,s.push(new Date(i,o,u)),f.push(a.formatDate(new Date(i,o,u),n.date_format,!0))}),e("#widgetField span:first").html(f.join(", "))}else s=new Date(n.now*1e3),o=!0;e("#widgetCalendar").DatePicker({flat:!0,calendars:3,mode:"multiple",start:1,date:s,onChange:function(t){t=t.toString();if(t.length>=8){var r="",i=[];e.each(t.split(","),function(e,t){i.push(a.formatDate(new Date(t),n.date_format)),r+=t.replace(/-/g,"")+"T000000Z,"}),e("#widgetField span").html(i.join(", ")),r=r.slice(0,r.length-1),e("#ai1ec_exdate").val(r)}else e("#ai1ec_exdate").val("")}}),o&&e("#widgetCalendar").DatePickerClear(),e("#widgetCalendar div.datepicker").css("position","absolute")},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){window.alert(n),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t)),e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var e=this.value;if(""!==e){var r=/(http|https):\/\//;r.test(e)||h(t,n.url_not_valid)}})},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a, #widgetField > span, #ai1ec_exclude_date_label").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free)},v=function(){e("#ai1ec_event").insertAfter("#titlediv"),e("#post").addClass("ai1ec-visible")},m=function(){c(),t(function(){l(),v(),d()})};return{start:m}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
* limitations under the License.
|
119 |
* ======================================================================== */
|
120 |
|
121 |
+
/*
|
122 |
+
Copyright 2012 Igor Vaynberg
|
123 |
+
|
124 |
+
Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
|
125 |
+
|
126 |
+
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
127 |
+
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
128 |
+
use of this software only upon the condition that you accept all of the terms of either the Apache
|
129 |
+
License or the GPL License.
|
130 |
+
|
131 |
+
You may obtain a copy of the Apache License and the GPL License at:
|
132 |
+
|
133 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
134 |
+
http://www.gnu.org/licenses/gpl-2.0.html
|
135 |
+
|
136 |
+
Unless required by applicable law or agreed to in writing, software distributed under the
|
137 |
+
Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
138 |
+
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
|
139 |
+
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
140 |
+
*/
|
141 |
+
|
142 |
+
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e(".coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("input.longitude").val(t.latLng.lng()),e("input.latitude").val(t.latLng.lat()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m())})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("input.latitude").val()),n=parseFloat(e("input.longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){e(this).is(":checked")?e(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast"):e(".ai1ec_box_map").slideUp("fast")},s=function(t){this.checked===!0?e("#ai1ec_table_coordinates").css({visibility:"visible"}):(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_table_coordinates input").val(""),e("div.ai1ec-error").remove())},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},s=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},o=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return l(i,s),!1})},u=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),l(i,s);else{this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").attr("disabled",!0),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},a=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},f=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(n)},l=function(t,n){var i=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",i);i.modal({backdrop:"static"}),e.post(r,t,function(e){e.error?(window.alert(e.message),i.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:l,init_modal_widgets:f,click_on_modal_cancel:a,click_on_checkbox:u,click_on_ics_rule_text:o,repeat_form_error:s,repeat_form_success:i}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">«</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">»</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";")}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){return e("#widgetCalendar").toggle(),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/ai1ec_datepicker",["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/ai1ec_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab","external_libs/select2"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r);var i=e("#ai1ec_exdate").val(),s=null,o=!1,u;if(i.length>=8){s=[];var f=[];e.each(i.split(","),function(e,t){var r=t.slice(0,8),i=r.substr(0,4),o=r.substr(4,2);u=r.substr(6,2),o=o.charAt(0)==="0"?"0"+(parseInt(o.charAt(1),10)-1):parseInt(o,10)-1,s.push(new Date(i,o,u)),f.push(a.formatDate(new Date(i,o,u),n.date_format,!0))}),e("#ai1ec_exclude-dates-input").text(f.join(", "))}else s=new Date(n.now*1e3),o=!0,e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"));e("#widgetCalendar").DatePicker({flat:!0,calendars:3,mode:"multiple",starts:n.week_start_day,date:s,onChange:function(t){t=t.toString();if(t.length>=8){var r="",i=[];e.each(t.split(","),function(e,t){i.push(a.formatDate(new Date(t),n.date_format)),r+=t.replace(/-/g,"")+"T000000Z,"}),e("#ai1ec_exclude-dates-input").text(i.join(", ")),r=r.slice(0,r.length-1),e("#ai1ec_exdate").val(r)}else e("#ai1ec_exdate").val(""),e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"))},prev:"«",next:"»",month_link_inactive:!0,locale:{daysMin:n.day_names.split(","),months:n.month_names.split(",")}}),o&&e("#widgetCalendar").DatePickerClear(),e(document).on("mousedown.exclude",function(t){var n=e("#widgetCalendar"),r=e("#ai1ec_exclude-dates-input");!n.is(t.target)&&!r.is(t.target)&&0===n.has(t.target).length&&e("#widgetCalendar").hide()})},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){var r=null;"[object Array]"===Object.prototype.toString.call(n)?r=n.join("<br>"):r=n,e("#ai1ec_event_inline_alert").html(r),e("#ai1ec_event_inline_alert").removeClass("ai1ec-hidden"),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").removeClass("disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t));var r=!1,i=[];e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn"),e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").addClass("ai1ec-hidden").parent().css("color","");if(""!==t){var s=/(http|https):\/\//;if(!s.test(t)){e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").removeClass("ai1ec-hidden").parent().css("color","rgb(255, 79, 79)"),r||e(this).closest(".ai1ec-panel-collapse").collapse("show"),r=!0;var o=e(this).attr("id")+"_not_valid";i.push(n[o]),e(this).addClass("ai1ec-input-warn")}}}),r&&(i.push(n.general_url_not_valid),h(t,i))},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free)},v=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},m=function(){e("#timezone-select").select2()},g=function(){c(),t(function(){l(),v(),d(),m()})};return{start:g}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
|
public/js/pages/admin_settings.js
CHANGED
@@ -141,4 +141,4 @@
|
|
141 |
* limitations under the License.
|
142 |
* ======================================================================== */
|
143 |
|
144 |
-
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/admin_settings",["jquery_timely","domReady","ai1ec_config","libs/utils","scripts/setting/cache/cache_event_handlers","external_libs/bootstrap/button","libs/collapse_helper","external_libs/bootstrap/tab","external_libs/bootstrap/dropdown","external_libs/bootstrap_datepicker","external_libs/bootstrap/tooltip","external_libs/jquery_cookie"],function(e,t,n,r,i){var s=function(){var t=!0;e("#ai1ec-plugins-settings input:text").each(function(){this.value!==""&&(t=!1)}),t===!0&&e("#ai1ec-plugins-settings").remove()},o=function(t){var n=e(this).attr("href");e.cookie("ai1ec_general_settings_active_tab",n)},u=function(){var t=e("#week_view_starts_at"),r=e("#week_view_ends_at"),i=parseInt(t.val(),10),s=parseInt(r.val(),10);if(s<i)return window.alert(n.end_must_be_after_start),r.focus(),!1;var o=s-i;if(o<6)return window.alert(n.show_at_least_six_hours),r.focus(),!1},a=function(){e(".ai1ec-gzip-causes-js-failure").remove()},f=function(){e("#ai1ec_save_settings").on("click",function(t){var r=e("#require_disclaimer").is(":checked"),i=e("#disclaimer").val();!0===r&&""===i&&(alert(n.require_desclaimer),e('#ai1ec-general-settings ul.ai1ec-nav a[href="#ai1ec-advanced"]').tab("show"),e("#disclaimer").focus(),t.preventDefault())})},l=function(){t(function(){f(),a(),r.activate_saved_tab_on_page_load(e.cookie("ai1ec_general_settings_active_tab")),e(document).on("click",'#ai1ec-general-settings .ai1ec-nav a[data-toggle="ai1ec-tab"]',o),e(document).on("click","#disable_standard_filter_menu_toggler",function(e){e.preventDefault()}),e(document).on("click","#ai1ec-button-refresh",i.perform_rescan);var t=e("#exact_date");t.datepicker({autoclose:!0}),s(),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-view",function(){var t=e(this),n=t.closest("tr"),r=e(".ai1ec-admin-view-settings .ai1ec-toggle-view:checked").length===0,i=n.find(".ai1ec-toggle-default-view:checked").length===1;if(r===!0||i===!0)return!1}),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-default-view",function(){e(this).closest("tr").find(".ai1ec-toggle-view:first").prop("checked",!0)}),e(document).on("click",".ai1ec-autoselect",function(t){console.log(t);if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))}),e("#ai1ec_save_settings").on("click",u),e("#show_create_event_button").trigger("ready")})};return{start:l}}),timely.require(["scripts/admin_settings"],function(e){e.start()}),timely.define("pages/admin_settings",function(){});
|
141 |
* limitations under the License.
|
142 |
* ======================================================================== */
|
143 |
|
144 |
+
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/admin_settings",["jquery_timely","domReady","ai1ec_config","libs/utils","scripts/setting/cache/cache_event_handlers","external_libs/bootstrap/button","libs/collapse_helper","external_libs/bootstrap/tab","external_libs/bootstrap/dropdown","external_libs/bootstrap_datepicker","external_libs/bootstrap/tooltip","external_libs/jquery_cookie"],function(e,t,n,r,i){var s=function(){var t=!0;e("#ai1ec-plugins-settings input:text").each(function(){this.value!==""&&(t=!1)}),t===!0&&e("#ai1ec-plugins-settings").remove()},o=function(t){var n=e(this).attr("href");e.cookie("ai1ec_general_settings_active_tab",n)},u=function(){var t=e("#week_view_starts_at"),r=e("#week_view_ends_at"),i=parseInt(t.val(),10),s=parseInt(r.val(),10);if(s<i)return window.alert(n.end_must_be_after_start),r.focus(),!1;var o=s-i;if(o<6)return window.alert(n.show_at_least_six_hours),r.focus(),!1},a=function(){e(".ai1ec-gzip-causes-js-failure").remove()},f=function(){e("#ai1ec_save_settings").on("click",function(t){var r=e("#require_disclaimer").is(":checked"),i=e("#disclaimer").val();!0===r&&""===i&&(alert(n.require_desclaimer),e('#ai1ec-general-settings ul.ai1ec-nav a[href="#ai1ec-advanced"]').tab("show"),e("#disclaimer").focus(),t.preventDefault())})},l=function(){t(function(){f(),a(),r.activate_saved_tab_on_page_load(e.cookie("ai1ec_general_settings_active_tab")),e(document).on("click",'#ai1ec-general-settings .ai1ec-nav a[data-toggle="ai1ec-tab"]',o),e(document).on("click","#disable_standard_filter_menu_toggler",function(e){e.preventDefault()}),e(document).on("click","#ai1ec-button-refresh",i.perform_rescan);var t=e("#exact_date");t.datepicker({autoclose:!0}),s(),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-view",function(){var t=e(this),n=t.parent().index()+1;if(0===t.closest("tr").siblings().find("td:nth-child("+n+") .ai1ec-toggle-view:checked").length)return!1;if(t.parent().next("td").find(".ai1ec-toggle-default-view").is(":checked"))return!1}),e(document).on("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))});var n=function(){var t=e(this).closest(".ai1ec-form-group").nextAll(".ai1ec-form-group").slice(0,4);e(this).prop("checked")?t.show():t.hide()};n.apply(e("#affix_filter_menu").on("click",n)[0]),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-default-view",function(){e(this).parent().prev("td").children(".ai1ec-toggle-view").prop("checked",!0)}),e("#ai1ec_save_settings").on("click",u),e("#show_create_event_button").trigger("ready")})};return{start:l}}),timely.require(["scripts/admin_settings"],function(e){e.start()}),timely.define("pages/admin_settings",function(){});
|
public/js/pages/calendar.js
CHANGED
@@ -23,6 +23,14 @@
|
|
23 |
* see: http://github.com/requirejs/domReady for details
|
24 |
*/
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/* ========================================================================
|
27 |
* Bootstrap: tooltip.js v3.0.3
|
28 |
* http://getbootstrap.com/javascript/#tooltip
|
@@ -304,4 +312,4 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
304 |
* limitations under the License.
|
305 |
* ======================================================================== */
|
306 |
|
307 |
-
timely.define("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e("#ai1ec-container").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),window.print(),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){e(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){e(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["­","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(){var t=e(".ai1ec-day"),n=e(".ai1ec-week:first .ai1ec-day").length;e(".ai1ec-month-view .ai1ec-multiday").each(function(){var n=this.parentNode,r=e(this).outerHeight(!0),i=parseInt(e(this).data("endDay"),10),u=e(".ai1ec-date",n),a=parseInt(u.text(),10),f=e(this).data("endTruncated");f&&(i=parseInt(e(t[t.length-1]).text(),10));var l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=i-a+1,d=p,v,m=0;t.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),u=r.index(),f=parseInt(n.text(),10);if(f>=a&&f<=i){f===a&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(u===0&&f>a&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&u===6&&h++}});if(f){var g=e("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:u.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&e(this).data("bs.tooltip")&&e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}}),timely.define("external_libs/jquery_history",["jquery_timely"],function(e){try{(function(t,n){var r=t.History=t.History||{};if(typeof r.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");r.Adapter={bind:function(t,n,r){e(t).bind(n,r)},trigger:function(t,n,r){e(t).trigger(n,r)},extractEventData:function(e,t,r){var i=t&&t.originalEvent&&t.originalEvent[e]||r&&r[e]||n;return i},onDomLoad:function(t){e(t)}},typeof r.init!="undefined"&&r.init()})(window),function(e,t){var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;var t="",r,i,u,a;return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash()||"",r=o.unescapeHash(i.contentWindow.document.location.hash)||"";return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash();return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var r=t&&t.newURL||n.location.href,i=o.getHashByUrl(r),s=null,u=null,a=null,f;return o.isLastHash(i)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(i),i&&o.isTraditionalAnchor(i)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(s=o.extractState(o.getFullUrl(i||n.location.href,!1),!0),o.isLastSavedState(s)?(o.busy(!1),!1):(u=o.getHashByState(s),f=o.discardedState(s),f?(o.getHashByIndex(-2)===o.getHashByState(f.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(s.data,s.title,s.url,!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,r,i,s){if(o.getHashByUrl(i))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:s}),!1;o.busy(!0);var u=o.createStateObject(t,r,i),a=o.getHashByState(u),f=o.getState(!1),l=o.getHashByState(f),c=o.getHash();return o.storeState(u),o.expectedStateId=u.id,o.recycleState(u),o.setTitle(u),a===l?(o.busy(!1),!1):a!==c&&a!==o.getShortUrl(n.location.href)?(o.setHash(a,!1),!1):(o.saveState(u),o.Adapter.trigger(e,"statechange"),o.busy(!1),!0)},o.replaceState=function(e,t,n,r){if(o.getHashByUrl(n))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(r!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:r}),!1;o.busy(!0);var i=o.createStateObject(e,t,n),s=o.getState(!1),u=o.getStateByIndex(-2);return o.discardState(s,i,u),o.pushState(i.data,i.title,i.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){var n=e.console||t,r=e.document,i=e.navigator,s=e.sessionStorage||!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||r.location.href,n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=r.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(h.unescapeString(e.url||r.location.href)),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data);if(t.title||n)t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id;return t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r;return n=/(.*)\&_suid=([0-9]+)$/.exec(e),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getHash=function(){var e=h.unescapeHash(r.location.hash);return e},h.unescapeString=function(t){var n=t,r;for(;;){r=e.unescape(n);if(r===n)break;n=r}return n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=h.unescapeString(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i,s;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(n=h.escapeHash(e),h.busy(!0),i=h.extractState(e,!0),i&&!h.emulated.pushState?h.pushState(i.data,i.title,i.url,!1):r.location.hash!==n&&(h.bugs.setHash?(s=h.getPageUrl(),h.pushState(null,null,s+"#"+n,!1)):r.location.hash=n),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.escape(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(r.location.href),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var d=function(){};h.pushState=h.pushState||d,h.replaceState=h.replaceState||d}else h.onPopState=function(t,n){var i=!1,s=!1,o,u;return h.doubleCheckComplete(),o=h.getHash(),o?(u=h.extractState(o||r.location.href,!0),u?h.replaceState(u.data,u.title,u.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(i=h.Adapter.extractEventData("state",t,n)||!1,i?s=h.getStateById(i):h.expectedStateId?s=h.getStateById(h.expectedStateId):s=h.extractState(r.location.href),s||(s=h.createStateObject(null,null,r.location.href)),h.expectedStateId=!1,h.isLastSavedState(s)?(h.busy(!1),!1):(h.storeState(s),h.saveState(s),h.setTitle(s),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(v){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"beforeunload",h.clearAllIntervals),h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(r.location.href,!0))),s&&(h.onUnload=function(){var e,t;try{e=l.parse(s.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),s.setItem("History.store",l.stringify(e))},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},h.init()}(window)}catch(t){}}),timely.define("external_libs/jquery.tablescroller",["jquery_timely"],function(e){function n(){if(t)return t;var n=e('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');e("body").append(n);var r=e("div",n).innerWidth();n.css("overflow-y","auto");var i=e("div",n).innerWidth();return e(n).remove(),t=r-i,t}var t=0;e.fn.tableScroll=function(t){if(t=="undo"){var r=e(this).parent().parent();r.hasClass("tablescroll_wrapper")&&(r.find(".tablescroll_head thead").prependTo(this),r.find(".tablescroll_foot tfoot").appendTo(this),r.before(this),r.empty());return}var i=e.extend({},e.fn.tableScroll.defaults,t);return i.scrollbarWidth=n(),this.each(function(){var t=i.flush,n=e(this).addClass("tablescroll_body"),r=e('<div class="tablescroll_wrapper ai1ec-popover-boundary"></div>').insertBefore(n).append(n);r.parent("div").hasClass(i.containerClass)||e("<div></div>").addClass(i.containerClass).insertBefore(r).append(r);var s=i.width?i.width:n.outerWidth(),o=i.scroll?"auto":"hidden";r.css({width:s+"px",height:i.height+"px",overflow:o}),n.css("width",s+"px");var u=r.outerWidth(),a=u-s;r.css({width:s-a-2+"px"}),n.css("width",s-a-i.scrollbarWidth+"px"),n.outerHeight()<=i.height&&(r.css({height:"auto",width:s-a+"px"}),t=!1);var f=e("thead",n).length?!0:!1,l=e("tfoot",n).length?!0:!1,c=e("thead tr:first",n),h=e("tbody tr:first",n),p=e("tfoot tr:first",n),d=0;e("th, td",c).each(function(t){d=e(this).width(),e("th:eq("+t+"), td:eq("+t+")",c).css("width",d+"px"),e("th:eq("+t+"), td:eq("+t+")",h).css("width",d+"px"),l&&e("th:eq("+t+"), td:eq("+t+")",p).css("width",d+"px")});if(f)var v=e('<table class="tablescroll_head" cellspacing="0"></table>').insertBefore(r).prepend(e("thead",n));if(l)var m=e('<table class="tablescroll_foot" cellspacing="0"></table>').insertAfter(r).prepend(e("tfoot",n));v!=undefined&&(v.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",v).css("width",d+i.scrollbarWidth+"px"),v.css("width",r.outerWidth()+"px"))),m!=undefined&&(m.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",m).css("width",d+i.scrollbarWidth+"px"),m.css("width",r.outerWidth()+"px")))}),this},e.fn.tableScroll.defaults={flush:!0,width:null,height:100,containerClass:"tablescroll",scroll:!0}}),timely.define("external_libs/jquery.scrollTo",["jquery_timely"],function(e){function n(e){return typeof e=="object"?e:{top:e,left:e}}var t=e.scrollTo=function(t,n,r){e(window).scrollTo(t,n,r)};t.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(t){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){var t=this,n=!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!n)return t;var r=(t.contentWindow||t).document||t.ownerDocument||t;return/webkit/i.test(navigator.userAgent)||r.compatMode=="BackCompat"?r.body:r.documentElement})},e.fn.scrollTo=function(r,i,s){return typeof i=="object"&&(s=i,i=0),typeof s=="function"&&(s={onAfter:s}),r=="max"&&(r=9e9),s=e.extend({},t.defaults,s),i=i||s.duration,s.queue=s.queue&&s.axis.length>1,s.queue&&(i/=2),s.offset=n(s.offset),s.over=n(s.over),this._scrollable().each(function(){function h(e){u.animate(l,i,s.easing,e&&function(){e.call(this,r,s)})}if(r==null)return;var o=this,u=e(o),a=r,f,l={},c=u.is("html,body");switch(typeof a){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(a)){a=n(a);break}a=e(a,this);if(!a.length)return;case"object":if(a.is||a.style)f=(a=e(a)).offset()}e.each(s.axis.split(""),function(e,n){var r=n=="x"?"Left":"Top",i=r.toLowerCase(),p="scroll"+r,d=o[p],v=t.max(o,n);if(f)l[p]=f[i]+(c?0:d-u.offset()[i]),s.margin&&(l[p]-=parseInt(a.css("margin"+r))||0,l[p]-=parseInt(a.css("border"+r+"Width"))||0),l[p]+=s.offset[i]||0,s.over[i]&&(l[p]+=a[n=="x"?"width":"height"]()*s.over[i]);else{var m=a[i];l[p]=m.slice&&m.slice(-1)=="%"?parseFloat(m)/100*v:m}s.limit&&/^\d+$/.test(l[p])&&(l[p]=l[p]<=0?0:Math.min(l[p],v)),!e&&s.queue&&(d!=l[p]&&h(s.onAfterFirst),delete l[p])}),h(s.onAfter)}).end()},t.max=function(t,n){var r=n=="x"?"Width":"Height",i="scroll"+r;if(!e(t).is("html,body"))return t[i]-e(t)[r.toLowerCase()]();var s="client"+r,o=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(o[i],u[i])-Math.min(o[s],u[s])}}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/calendar/load_views",["jquery_timely","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","libs/frontend_utils","libs/utils","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/select2_multiselect_helper","external_libs/jquery_history","external_libs/jquery.tablescroller","external_libs/jquery.scrollTo","external_libs/bootstrap_datepicker","external_libs/bootstrap/alert","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f){e.cookie.json=!0;var l="ai1ec_saved_filter",c=!e("#save_filtered_views").hasClass("ai1ec-hide"),h=function(){var t=e("#ai1ec-view-dropdown .ai1ec-dropdown-menu .ai1ec-active a"),n=u.week_view_ends_at-u.week_view_starts_at,i=n*60;e("table.ai1ec-week-view-original").tableScroll({height:i,containerClass:"ai1ec-week-view ai1ec-popover-boundary",scroll:!1}),e("table.ai1ec-oneday-view-original").tableScroll({height:i,containerClass:"ai1ec-oneday-view ai1ec-popover-boundary",scroll:!1});if(e(".ai1ec-week-view").length||e(".ai1ec-oneday-view").length)e(".ai1ec-oneday-view .tablescroll_wrapper, .ai1ec-week-view .tablescroll_wrapper").scrollTo(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")"),e(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")").addClass("ai1ec-first-visible");e(".ai1ec-month-view .ai1ec-multiday").length&&r.extend_multiday_events(),e("#ai1ec-calendar-view-container").trigger("initialize_view.ai1ec")},p=function(){e("#ai1ec-calendar-view-container").trigger("destroy_view.ai1ec");var t=e(".ai1ec-minical-trigger").data("datepicker");typeof t!="undefined"&&(t.picker.remove(),e(document).off("changeDate",".ai1ec-minical-trigger")),e(".ai1ec-tooltip.ai1ec-in, .ai1ec-popup").remove()},d=function(){var t=[],n=[],r=[],i;e(".ai1ec-category-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){t.push(e(this).data("term"))}),e(".ai1ec-tag-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){n.push(e(this).data("term"))}),e(".ai1ec-author-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){r.push(e(this).data("term"))});var s={};return s.cat_ids=t,s.tag_ids=n,s.auth_ids=r,i=e(".ai1ec-views-dropdown .ai1ec-dropdown-menu .ai1ec-active").data("action"),s.action=i,s},v=function(){var t=History.getState(),n=e.cookie(l);if(null===n||undefined===n)n={};var r=d();u.is_calendar_page?n.calendar_page=r:n[t.url]=r,e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").addClass("ai1ec-active").attr("data-original-title",u.clear_saved_filter_text);var i=s.make_alert(u.save_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},m=function(t){t.stopImmediatePropagation();var n=e.cookie(l);if(u.is_calendar_page)delete n.calendar_page;else{var r=History.getState();delete n[r.url]}e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").removeClass("ai1ec-active").attr("data-original-title",u.reset_saved_filter_text),c||e("#save_filtered_views").addClass("ai1ec-hide");var i=s.make_alert(u.remove_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},g=function(t,n){e("#ai1ec-calendar-view-loading").fadeIn("fast"),e("#ai1ec-calendar-view").fadeTo("fast",.3,function(){var r={request_type:n,ai1ec_doing_ajax:!0};e.ajax({url:t,dataType:n,data:r,method:"get",success:function(t){p(),typeof t.views_dropdown=="string"&&e(".ai1ec-views-dropdown").replaceWith(t.views_dropdown),typeof t.categories=="string"&&(e(".ai1ec-category-filter").replaceWith(t.categories),u.use_select2&&f.init(e(".ai1ec-category-filter"))),typeof t.authors=="string"&&(e(".ai1ec-author-filter").replaceWith(t.authors),u.use_select2&&f.init(e(".ai1ec-author-filter"))),typeof t.tags=="string"&&(e(".ai1ec-tag-filter").replaceWith(t.tags),u.use_select2&&f.init(e(".ai1ec-tag-filter"))),typeof t.subscribe_buttons=="string"&&e(".ai1ec-subscribe-container").replaceWith(t.subscribe_buttons),typeof t.save_view_btngroup=="string"&&e("#save_filtered_views").closest(".ai1ec-btn-group").replaceWith(t.save_view_btngroup),c=t.are_filters_set;var n=e("#ai1ec-calendar-view-container");n.height(n.height());var r=e("#ai1ec-calendar-view").html(t.html).height();n.animate({height:r},{complete:function(){n.height("auto")}}),e("#ai1ec-calendar-view-loading").fadeOut("fast"),e("#ai1ec-calendar-view").fadeTo("fast",1),h()}})})},y=!1,b=function(e){var t=History.getState();if(t.data.ai1ec!==undefined&&!0===t.data.ai1ec||!0===y)y=!0,g(t.url,"json")},w=function(e,t){if(e==="json"){var n={ai1ec:!0};History.pushState(n,document.title,decodeURI(t))}else g(t,"jsonp")},E=function(t){var n=e(this);t.preventDefault(),w(n.data("type"),n.attr("href"))},S=function(t){var n=e(this);t.preventDefault();if(typeof n.data("datepicker")=="undefined"){n.datepicker({todayBtn:"linked",todayHighlight:!0});var r=n.data("datepicker");r.picker.addClass("ai1ec-right-aligned");var i=r.place;r.place=function(){i.call(this);var t=this.component?this.component:this.element,n=t.offset();this.picker.css({left:"auto",right:e(document).width()-n.left-t.outerWidth()})},e(document).on("changeDate",".ai1ec-minical-trigger",x)}n.datepicker("show")},x=function(t){var n,r=e(this),i;r.datepicker("hide"),n=r.data("href"),i=t.format(),i=i.replace(/\//g,"-"),n=n.replace("__DATE__",i),w(r.data("type"),n)},T=function(t){var n;typeof t.added!="undefined"?n=e(t.added.element).data("href"):n=e("option[value="+t.removed.id+"]",t.target).data("href"),data={ai1ec:!0},History.pushState(data,null,n)},N=function(){w(e(this).data("type"),e(this).data("href"))};return{initialize_view:h,handle_click_on_link_to_load_view:E,handle_minical_trigger:S,handle_minical_change_date:x,clear_filters:N,handle_state_change:b,load_view:g,save_current_filter:v,remove_current_filter:m,load_view_from_select2_filter:T,load_view_according_to_datatype:w}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("scripts/calendar",["jquery_timely","scripts/calendar/load_views","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/utils","libs/select2_multiselect_helper","external_libs/bootstrap/transition","external_libs/bootstrap/modal","external_libs/jquery.scrollTo","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f){var l=function(){if(s.selector!==undefined&&s.selector!==""&&e(s.selector).length===1){var t=e(":header:contains("+s.title+"):first");t.length||(t=e('<h1 class="page-title"></h1>'),t.text(s.title));var n=e("#ai1ec-container").detach().before(t);e(s.selector).empty().append(n).hide().css("visibility","visible").fadeIn("fast")}},c=function(){var t=e(this).data("instanceId");e(".ai1ec-event-instance-id-"+t).addClass("ai1ec-hover")},h=function(){var t=e(this).data("instanceId");e(".ai1ec-event-instance-id-"+t).removeClass("ai1ec-hover")},p=function(){var t=e(this),n=t.data("instanceId");t.delay(500).queue(function(){e(".ai1ec-event-instance-id-"+n).addClass("ai1ec-raised")})},d=function(t){var n=e(this),r=n.data("instanceId"),i=e(t.toElement||t.relatedTarget);if(i.is(".ai1ec-event-instance-id-"+r)||i.parent().is(".ai1ec-event-instance-id-"+r))return;e(".ai1ec-event-instance-id-"+r).clearQueue().removeClass("ai1ec-raised")},v=function(){l()},m=function(){e(document).on({mouseenter:c,mouseleave:h},".ai1ec-event-container.ai1ec-multiday"),e(document).on({mouseenter:p,mouseleave:d},".ai1ec-oneday-view .ai1ec-oneday .ai1ec-event-container, .ai1ec-week-view .ai1ec-week .ai1ec-event-container"),e(document).on("click",".ai1ec-agenda-view .ai1ec-event-header",r.toggle_event),e(document).on("click","#ai1ec-agenda-expand-all",r.expand_all),e(document).on("click","#ai1ec-agenda-collapse-all",r.collapse_all),e(document).on("click","a.ai1ec-load-view",t.handle_click_on_link_to_load_view),e(document).on("click",".ai1ec-minical-trigger",t.handle_minical_trigger),e(document).on("click",".ai1ec-clear-filter",t.clear_filters),e(document).on("click","#ai1ec-print-button",n.handle_click_on_print_button),e(document).on("click",".ai1ec-reveal-full-day button",function(){e(this).fadeOut();var t=e(".ai1ec-oneday-view-original, .ai1ec-week-view-original"),n=e(".tablescroll_wrapper").offset().top-t.offset().top;e(window).scrollTo("+="+n+"px",400);var r=1442;e(".tablescroll_wrapper").scrollTo("-="+n+"px",400).animate({height:r+"px"})}),History.Adapter.bind(window,"statechange",t.handle_state_change),e(document).on("click","#ai1ec-calendar-view .ai1ec-load-event",function(t){t.preventDefault(),e.cookie.raw=!1,e.cookie("ai1ec_calendar_url",document.URL),window.location.href=this.href})},g=function(){f.init(e(".ai1ec-select2-filters")),e(document).on("change",".ai1ec-select2-multiselect-selector",t.load_view_from_select2_filter)},y=function(){e(document).on("page_ready.ai1ec",function(){v(),o.use_select2&&g(),m(),t.initialize_view()})};return{start:y}}),timely.require(["scripts/calendar"],function(e){e.start()}),timely.define("pages/calendar",function(){});
|
23 |
* see: http://github.com/requirejs/domReady for details
|
24 |
*/
|
25 |
|
26 |
+
/* ========================================================================
|
27 |
+
* Bootstrap: affix.js v3.1.1
|
28 |
+
* http://getbootstrap.com/javascript/#affix
|
29 |
+
* ========================================================================
|
30 |
+
* Copyright 2011-2014 Twitter, Inc.
|
31 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
32 |
+
* ======================================================================== */
|
33 |
+
|
34 |
/* ========================================================================
|
35 |
* Bootstrap: tooltip.js v3.0.3
|
36 |
* http://getbootstrap.com/javascript/#tooltip
|
312 |
* limitations under the License.
|
313 |
* ======================================================================== */
|
314 |
|
315 |
+
timely.define("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e(this).closest(".ai1ec-calendar").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),window.print(),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["­","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(t){var n=t.find(".ai1ec-day"),r=t.find(".ai1ec-week:first .ai1ec-day").length;t.find(".ai1ec-month-view .ai1ec-multiday").each(function(){var t=this.parentNode,r=e(this).outerHeight(!0),i=e(".ai1ec-date",t),u=parseInt(i.text(),10),a=e(this).data("endTruncated"),f=parseInt(a?e(n[n.length-1]).text():e(this).data("endDay"),10),l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=f-u+1,d=p,v,m=0;n.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),i=r.index(),a=parseInt(n.text(),10);if(a>=u&&a<=f){a===u&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(i===0&&a>u&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&i===6&&h++}});if(a){var g=l.find("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:i.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/affix",["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely","external_libs/bootstrap/affix"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&e(this).data("bs.tooltip")&&e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}}),timely.define("external_libs/jquery_history",["jquery_timely"],function(e){try{(function(t,n){var r=t.History=t.History||{};if(typeof r.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");r.Adapter={bind:function(t,n,r){e(t).bind(n,r)},trigger:function(t,n,r){e(t).trigger(n,r)},extractEventData:function(e,t,r){var i=t&&t.originalEvent&&t.originalEvent[e]||r&&r[e]||n;return i},onDomLoad:function(t){e(t)}},typeof r.init!="undefined"&&r.init()})(window),function(e,t){var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;var t="",r,i,u,a;return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash()||"",r=o.unescapeHash(i.contentWindow.document.location.hash)||"";return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash();return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var r=t&&t.newURL||n.location.href,i=o.getHashByUrl(r),s=null,u=null,a=null,f;return o.isLastHash(i)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(i),i&&o.isTraditionalAnchor(i)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(s=o.extractState(o.getFullUrl(i||n.location.href,!1),!0),o.isLastSavedState(s)?(o.busy(!1),!1):(u=o.getHashByState(s),f=o.discardedState(s),f?(o.getHashByIndex(-2)===o.getHashByState(f.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(s.data,s.title,s.url,!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,r,i,s){if(o.getHashByUrl(i))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:s}),!1;o.busy(!0);var u=o.createStateObject(t,r,i),a=o.getHashByState(u),f=o.getState(!1),l=o.getHashByState(f),c=o.getHash();return o.storeState(u),o.expectedStateId=u.id,o.recycleState(u),o.setTitle(u),a===l?(o.busy(!1),!1):a!==c&&a!==o.getShortUrl(n.location.href)?(o.setHash(a,!1),!1):(o.saveState(u),o.Adapter.trigger(e,"statechange"),o.busy(!1),!0)},o.replaceState=function(e,t,n,r){if(o.getHashByUrl(n))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(r!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:r}),!1;o.busy(!0);var i=o.createStateObject(e,t,n),s=o.getState(!1),u=o.getStateByIndex(-2);return o.discardState(s,i,u),o.pushState(i.data,i.title,i.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){var n=e.console||t,r=e.document,i=e.navigator,s=e.sessionStorage||!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||r.location.href,n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=r.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(h.unescapeString(e.url||r.location.href)),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data);if(t.title||n)t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id;return t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r;return n=/(.*)\&_suid=([0-9]+)$/.exec(e),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getHash=function(){var e=h.unescapeHash(r.location.hash);return e},h.unescapeString=function(t){var n=t,r;for(;;){r=e.unescape(n);if(r===n)break;n=r}return n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=h.unescapeString(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i,s;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(n=h.escapeHash(e),h.busy(!0),i=h.extractState(e,!0),i&&!h.emulated.pushState?h.pushState(i.data,i.title,i.url,!1):r.location.hash!==n&&(h.bugs.setHash?(s=h.getPageUrl(),h.pushState(null,null,s+"#"+n,!1)):r.location.hash=n),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.escape(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(r.location.href),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var d=function(){};h.pushState=h.pushState||d,h.replaceState=h.replaceState||d}else h.onPopState=function(t,n){var i=!1,s=!1,o,u;return h.doubleCheckComplete(),o=h.getHash(),o?(u=h.extractState(o||r.location.href,!0),u?h.replaceState(u.data,u.title,u.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(i=h.Adapter.extractEventData("state",t,n)||!1,i?s=h.getStateById(i):h.expectedStateId?s=h.getStateById(h.expectedStateId):s=h.extractState(r.location.href),s||(s=h.createStateObject(null,null,r.location.href)),h.expectedStateId=!1,h.isLastSavedState(s)?(h.busy(!1),!1):(h.storeState(s),h.saveState(s),h.setTitle(s),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(v){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"beforeunload",h.clearAllIntervals),h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(r.location.href,!0))),s&&(h.onUnload=function(){var e,t;try{e=l.parse(s.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),s.setItem("History.store",l.stringify(e))},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},h.init()}(window)}catch(t){}}),timely.define("external_libs/jquery.tablescroller",["jquery_timely"],function(e){function n(){if(t)return t;var n=e('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');e("body").append(n);var r=e("div",n).innerWidth();n.css("overflow-y","auto");var i=e("div",n).innerWidth();return e(n).remove(),t=r-i,t}var t=0;e.fn.tableScroll=function(t){if(t=="undo"){var r=e(this).parent().parent();r.hasClass("tablescroll_wrapper")&&(r.find(".tablescroll_head thead").prependTo(this),r.find(".tablescroll_foot tfoot").appendTo(this),r.before(this),r.empty());return}var i=e.extend({},e.fn.tableScroll.defaults,t);return i.scrollbarWidth=n(),this.each(function(){var t=i.flush,n=e(this).addClass("tablescroll_body"),r=e('<div class="tablescroll_wrapper ai1ec-popover-boundary"></div>').insertBefore(n).append(n);r.parent("div").hasClass(i.containerClass)||e("<div></div>").addClass(i.containerClass).insertBefore(r).append(r);var s=i.width?i.width:n.outerWidth(),o=i.scroll?"auto":"hidden";r.css({width:s+"px",height:i.height+"px",overflow:o}),n.css("width",s+"px");var u=r.outerWidth(),a=u-s;r.css({width:s-a-2+"px"}),n.css("width",s-a-i.scrollbarWidth+"px"),n.outerHeight()<=i.height&&(r.css({height:"auto",width:s-a+"px"}),t=!1);var f=e("thead",n).length?!0:!1,l=e("tfoot",n).length?!0:!1,c=e("thead tr:first",n),h=e("tbody tr:first",n),p=e("tfoot tr:first",n),d=0;e("th, td",c).each(function(t){d=e(this).width(),e("th:eq("+t+"), td:eq("+t+")",c).css("width",d+"px"),e("th:eq("+t+"), td:eq("+t+")",h).css("width",d+"px"),l&&e("th:eq("+t+"), td:eq("+t+")",p).css("width",d+"px")});if(f)var v=e('<table class="tablescroll_head" cellspacing="0"></table>').insertBefore(r).prepend(e("thead",n));if(l)var m=e('<table class="tablescroll_foot" cellspacing="0"></table>').insertAfter(r).prepend(e("tfoot",n));v!=undefined&&(v.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",v).css("width",d+i.scrollbarWidth+"px"),v.css("width",r.outerWidth()+"px"))),m!=undefined&&(m.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",m).css("width",d+i.scrollbarWidth+"px"),m.css("width",r.outerWidth()+"px")))}),this},e.fn.tableScroll.defaults={flush:!0,width:null,height:100,containerClass:"tablescroll",scroll:!0}}),timely.define("external_libs/jquery.scrollTo",["jquery_timely"],function(e){function n(e){return typeof e=="object"?e:{top:e,left:e}}var t=e.scrollTo=function(t,n,r){e(window).scrollTo(t,n,r)};t.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(t){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){var t=this,n=!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!n)return t;var r=(t.contentWindow||t).document||t.ownerDocument||t;return/webkit/i.test(navigator.userAgent)||r.compatMode=="BackCompat"?r.body:r.documentElement})},e.fn.scrollTo=function(r,i,s){return typeof i=="object"&&(s=i,i=0),typeof s=="function"&&(s={onAfter:s}),r=="max"&&(r=9e9),s=e.extend({},t.defaults,s),i=i||s.duration,s.queue=s.queue&&s.axis.length>1,s.queue&&(i/=2),s.offset=n(s.offset),s.over=n(s.over),this._scrollable().each(function(){function h(e){u.animate(l,i,s.easing,e&&function(){e.call(this,r,s)})}if(r==null)return;var o=this,u=e(o),a=r,f,l={},c=u.is("html,body");switch(typeof a){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(a)){a=n(a);break}a=e(a,this);if(!a.length)return;case"object":if(a.is||a.style)f=(a=e(a)).offset()}e.each(s.axis.split(""),function(e,n){var r=n=="x"?"Left":"Top",i=r.toLowerCase(),p="scroll"+r,d=o[p],v=t.max(o,n);if(f)l[p]=f[i]+(c?0:d-u.offset()[i]),s.margin&&(l[p]-=parseInt(a.css("margin"+r))||0,l[p]-=parseInt(a.css("border"+r+"Width"))||0),l[p]+=s.offset[i]||0,s.over[i]&&(l[p]+=a[n=="x"?"width":"height"]()*s.over[i]);else{var m=a[i];l[p]=m.slice&&m.slice(-1)=="%"?parseFloat(m)/100*v:m}s.limit&&/^\d+$/.test(l[p])&&(l[p]=l[p]<=0?0:Math.min(l[p],v)),!e&&s.queue&&(d!=l[p]&&h(s.onAfterFirst),delete l[p])}),h(s.onAfter)}).end()},t.max=function(t,n){var r=n=="x"?"Width":"Height",i="scroll"+r;if(!e(t).is("html,body"))return t[i]-e(t)[r.toLowerCase()]();var s="client"+r,o=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(o[i],u[i])-Math.min(o[s],u[s])}}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/calendar/load_views",["jquery_timely","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","libs/frontend_utils","libs/utils","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/select2_multiselect_helper","external_libs/jquery_history","external_libs/jquery.tablescroller","external_libs/jquery.scrollTo","external_libs/bootstrap_datepicker","external_libs/bootstrap/alert","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f){e.cookie.json=!0;var l="ai1ec_saved_filter",c=!e("#save_filtered_views").hasClass("ai1ec-hide"),h=function(e){var t=e.find("#ai1ec-view-dropdown .ai1ec-dropdown-menu .ai1ec-active a"),n=u.week_view_ends_at-u.week_view_starts_at,i=n*60;e.find("table.ai1ec-week-view-original").tableScroll({height:i,containerClass:"ai1ec-week-view ai1ec-popover-boundary",scroll:!1}),e.find("table.ai1ec-oneday-view-original").tableScroll({height:i,containerClass:"ai1ec-oneday-view ai1ec-popover-boundary",scroll:!1});if(e.find(".ai1ec-week-view").length||e.find(".ai1ec-oneday-view").length)e.find(".ai1ec-oneday-view .tablescroll_wrapper, .ai1ec-week-view .tablescroll_wrapper").scrollTo(e.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")")),e.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")").addClass("ai1ec-first-visible");e.find(".ai1ec-month-view .ai1ec-multiday").length&&r.extend_multiday_events(e),e.find(".ai1ec-calendar-view-container").trigger("initialize_view.ai1ec"),e.find(".ai1ec-calendar-toolbar").trigger("ai1ec-affix.reinit")},p=function(t){t.find(".ai1ec-calendar-view-container").trigger("destroy_view.ai1ec");var n=t.find(".ai1ec-minical-trigger").data("datepicker");typeof n!="undefined"&&(n.picker.remove(),e(document).off("changeDate",".ai1ec-minical-trigger")),t.find(".ai1ec-tooltip.ai1ec-in, .ai1ec-popup").remove(),t.find(".ai1ec-calendar-toolbar .ai1ec-btn-toolbar").remove()},d=function(){var t=[],n=[],r=[],i;e(".ai1ec-category-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){t.push(e(this).data("term"))}),e(".ai1ec-tag-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){n.push(e(this).data("term"))}),e(".ai1ec-author-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){r.push(e(this).data("term"))});var s={};return s.cat_ids=t,s.tag_ids=n,s.auth_ids=r,i=e(".ai1ec-views-dropdown .ai1ec-dropdown-menu .ai1ec-active").data("action"),s.action=i,s},v=function(){var t=History.getState(),n=e.cookie(l);if(null===n||undefined===n)n={};var r=d();u.is_calendar_page?n.calendar_page=r:n[t.url]=r,e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").addClass("ai1ec-active").attr("data-original-title",u.clear_saved_filter_text);var i=s.make_alert(u.save_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},m=function(t){t.stopImmediatePropagation();var n=e.cookie(l);if(u.is_calendar_page)delete n.calendar_page;else{var r=History.getState();delete n[r.url]}e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").removeClass("ai1ec-active").attr("data-original-title",u.reset_saved_filter_text),c||e("#save_filtered_views").addClass("ai1ec-hide");var i=s.make_alert(u.remove_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},g=function(t,n,r){t.find(".ai1ec-calendar-view-loading").fadeIn("fast").end().find(".ai1ec-calendar-view").fadeTo("fast",.3,function(){var i={request_type:r,ai1ec_doing_ajax:!0};e.ajax({url:n,dataType:r,data:i,method:"get",success:function(n){e(".ai1ec-subscribe-container").show(),p(t),typeof n.views_dropdown=="string"&&t.find(".ai1ec-views-dropdown").replaceWith(n.views_dropdown),typeof n.categories=="string"&&(t.find(".ai1ec-category-filter").replaceWith(n.categories),u.use_select2&&f.init(t.find(".ai1ec-category-filter"))),typeof n.authors=="string"&&(t.find(".ai1ec-author-filter").replaceWith(n.authors),u.use_select2&&f.init(t.find(".ai1ec-author-filter"))),typeof n.tags=="string"&&(t.find(".ai1ec-tag-filter").replaceWith(n.tags),u.use_select2&&f.init(t.find(".ai1ec-tag-filter"))),typeof n.subscribe_buttons=="string"&&t.find(".ai1ec-subscribe-container").replaceWith(n.subscribe_buttons),typeof n.save_view_btngroup=="string"&&t.find("#save_filtered_views").closest(".ai1ec-btn-group").replaceWith(n.save_view_btngroup),c=n.are_filters_set;var r=t.find(".ai1ec-calendar-view-container");r.height(r.height());var i=t.find(".ai1ec-calendar-view").html(n.html).height();r.animate({height:i},{complete:function(){r.height("auto")}}),t.find(".ai1ec-calendar-view-loading").fadeOut("fast"),t.find(".ai1ec-calendar-view").fadeTo("fast",1),h(t)}})})},y=!1,b=function(t){var n=History.getState(),r=e(".ai1ec-calendar:first");if(n.data.ai1ec!==undefined&&!0===n.data.ai1ec||!0===y)y=!0,g(r,n.url,"json")},w=function(e,t,n){if(t==="json"){var r={ai1ec:!0};History.pushState(r,document.title,decodeURI(n))}else g(e,n,"jsonp")},E=function(t){var n=e(this);$calendar=n.closest(".ai1ec-calendar"),t.preventDefault(),w($calendar,n.data("type"),n.attr("href"))},S=function(t){var n=e(this);t.preventDefault();if(typeof n.data("datepicker")=="undefined"){n.datepicker({todayBtn:"linked",todayHighlight:!0});var r=n.data("datepicker");if(n.closest(".ai1ec-pull-right").length>0){r.picker.addClass("ai1ec-right-aligned");var i=r.place;r.place=function(){i.call(this);var t=this.component?this.component:this.element,n=t.offset();this.picker.css({left:"auto",right:e(document).width()-n.left-t.outerWidth()})}}e(document).on("changeDate",".ai1ec-minical-trigger",x)}n.datepicker("show")},x=function(t){var n,r=e(this),i=r.closest(".ai1ec-calendar"),s;r.datepicker("hide"),n=r.data("href"),s=t.format(),s=s.replace(/\//g,"-"),n=n.replace("__DATE__",s),w(i,r.data("type"),n)},T=function(t){var n;typeof t.added!="undefined"?n=e(t.added.element).data("href"):n=e("option[value="+t.removed.id+"]",t.target).data("href"),data={ai1ec:!0},History.pushState(data,null,n)},N=function(){var t=e(this).closest(".ai1ec-calendar");w(t,e(this).data("type"),e(this).data("href"))};return{initialize_view:h,handle_click_on_link_to_load_view:E,handle_minical_trigger:S,handle_minical_change_date:x,clear_filters:N,handle_state_change:b,load_view:g,save_current_filter:v,remove_current_filter:m,load_view_from_select2_filter:T,load_view_according_to_datatype:w}}),timely.define("scripts/calendar/calendar-affix",["jquery_timely","ai1ec_config"],function(e,t){var n=function(n){var r=n.find(".ai1ec-calendar-toolbar");if(!r.length)return!1;var i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").css("clear","both"),s=r.find(".ai1ec-dropdown-toggle"),o=n.find("#ai1ec-calendar-view"),u=e("#wpadminbar"),a=r.offset().top,f=0,l=null,c=function(){return e("#ai1ec-bs-modes div:visible:first").text()},h=function(){var t=["xs","sm","md","lg"],n=e('<div id="ai1ec-bs-modes"></div>');for(var r in t)e('<div class="ai1ec-device-'+t[r]+" ai1ec-visible-"+t[r]+'">'+t[r]+"</div>").appendTo(n);n.appendTo("body")},p=function(){return parseInt(t["affix_vertical_offset_"+c()]||0)},d=function(){s.each(function(){e(this).contents().eq(-3).wrap('<div class="ai1ec-hidden" />')})},v=function(){s.find(".ai1ec-hidden").contents().unwrap()},m=function(){var e=0;"fixed"===u.css("position")&&(e=u.height()),r.css("top",e+p()+"px")},g=function(){return f},y=function(){f=a-("fixed"===u.css("position")?u.height():0)-p()},b=function(){r.height()>r.data("original_height")?(d(),r.height()>r.data("original_height")&&v()):v()},w=function(){n.find(".ai1ec-affix .ai1ec-views-dropdown").closest("div.ai1ec-clearfix").remove(),i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix"),s=r.find(".ai1ec-dropdown-toggle"),r.trigger("ai1ec-affix-top.bs.affix").find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").hide().end().end().data({original_height:r.height()}).find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").show().end().end().filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix")},E=function(){r.hasClass("ai1ec-affix")&&r.addClass("ai1ec-was-affixed"),y(),r.removeClass("ai1ec-affix").css("width",n.width()).find(".ai1ec-btn-toolbar").hide().end().data({original_height:r.height()}),m(),a=r.offset().top,r.filter(".ai1ec-was-affixed").addClass("ai1ec-affix").removeClass("ai1ec-was-affixed").find(".ai1ec-btn-toolbar").show(),l=null};return h(),y(),r.data({original_height:r.height()}).css("width",n.width()).affix({offset:{top:g,bottom:0}}).on("ai1ec-affix.bs.affix",function(){var e=o.offset().top;i.hide().appendTo(r).show().css("opacity",0).animate({opacity:1},400),b(),m(),o.css("margin-top",r.outerHeight(!0)+parseInt(r.css("margin-bottom"))+"px")}).on("ai1ec-affix-top.bs.affix",function(){i.hide(),o.prepend(i),i.show().css("opacity",0).animate({opacity:1},400),v(),m(),o.css("margin-top",0),r.data("original_height",r.height())}).on("ai1ec-affix.reinit",w).filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix"),e(window).on("resize.affix",function(){clearTimeout(l),l=setTimeout(E,100)}),n};return{initialize_affixed_toolbar:n}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("scripts/calendar",["jquery_timely","scripts/calendar/load_views","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","scripts/calendar/calendar-affix","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/utils","libs/select2_multiselect_helper","external_libs/bootstrap/transition","external_libs/bootstrap/modal","external_libs/jquery.scrollTo","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f,l){var c=function(){if(o.selector!==undefined&&o.selector!==""&&e(o.selector).length===1){var t=e(":header:contains("+o.title+"):first");t.length||(t=e('<h1 class="page-title"></h1>'),t.text(o.title));var n=e(".ai1ec-main-container:first").detach().before(t);e(o.selector).empty().append(n).hide().css("visibility","visible").fadeIn("fast")}},h=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).addClass("ai1ec-hover")},p=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).removeClass("ai1ec-hover")},d=function(){var t=e(this),n=t.closest(".ai1ec-calendar"),r=t.data("instanceId");t.delay(500).queue(function(){n.find(".ai1ec-event-instance-id-"+r).addClass("ai1ec-raised")})},v=function(t){var n=e(this),r=n.closest(".ai1ec-calendar"),i=n.data("instanceId"),s=e(t.toElement||t.relatedTarget),o=r.find(".ai1ec-event-instance-id-"+i);if(s.is(o)||s.parent().is(o))return;r.find(".ai1ec-event-instance-id-"+i).clearQueue().removeClass("ai1ec-raised")},m=function(){c()},g=function(){e(document).on({mouseenter:h,mouseleave:p},".ai1ec-event-container.ai1ec-multiday"),e(document).on({mouseenter:d,mouseleave:v},".ai1ec-oneday-view .ai1ec-oneday .ai1ec-event-container, .ai1ec-week-view .ai1ec-week .ai1ec-event-container"),e(document).on("click",".ai1ec-agenda-view .ai1ec-event-header",r.toggle_event),e(document).on("click","#ai1ec-agenda-expand-all",r.expand_all),e(document).on("click","#ai1ec-agenda-collapse-all",r.collapse_all),e(document).on("click","a.ai1ec-load-view",t.handle_click_on_link_to_load_view),e(document).on("click",".ai1ec-minical-trigger",t.handle_minical_trigger),e(document).on("click",".ai1ec-clear-filter",t.clear_filters),e(document).on("click","#ai1ec-print-button",n.handle_click_on_print_button),e(document).on("click",".ai1ec-reveal-full-day button",function(){var t=e(this).closest(".ai1ec-calendar");e(this).fadeOut();var n=t.find(".ai1ec-oneday-view-original, .ai1ec-week-view-original"),r=t.find(".tablescroll_wrapper").offset().top-n.offset().top;e(window).scrollTo("+="+r+"px",400);var i=1442;t.find(".tablescroll_wrapper").scrollTo("-="+r+"px",400).animate({height:i+"px"})}),History.Adapter.bind(window,"statechange",t.handle_state_change),e(document).on("click","#ai1ec-calendar-view .ai1ec-load-event",function(t){t.preventDefault(),e.cookie.raw=!1,e.cookie("ai1ec_calendar_url",document.URL),window.location.href=this.href})},y=function(){l.init(e(".ai1ec-select2-filters")),e(document).on("change",".ai1ec-select2-multiselect-selector",t.load_view_from_select2_filter)},b=function(){e(document).on("page_ready.ai1ec",function(){m(),u.use_select2&&y(),g(),e(".ai1ec-calendar").each(function(){t.initialize_view(e(this))}),u.affix_filter_menu&&1===e(".ai1ec-calendar").length&&s.initialize_affixed_toolbar(e(".ai1ec-calendar"))})};return{start:b}}),timely.require(["scripts/calendar"],function(e){e.start()}),timely.define("pages/calendar",function(){});
|
public/js/pages/calendar_feeds.js
CHANGED
@@ -101,4 +101,4 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
101 |
* limitations under the License.
|
102 |
* ======================================================================== */
|
103 |
|
104 |
-
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/calendar_feeds/ics/ics_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec_add_new_ics"),i=e("#ai1ec_feed_url");r.button("reset"),n.error?($alert=t.make_alert(n.message,"error"),e("#ics-alerts").append($alert)):(i.val(""),e("#ai1ec-feeds-after").after(n.message))},r=function(n){var r=e("input[value="+n.ics_id+"]").closest(".ai1ec-feed-container"),i=n.error?"error":"success",s=t.make_alert(n.message,i);n.error?e(".ai1ec_update_ics",r).button("reset"):r.remove(),e("#ics-alerts").append(s)},i=function(n){var r=e("input[value="+n.ics_id+"]").closest(".ai1ec-feed-container"),i=n.error?"error":"success",s=t.make_alert(n.message,i);e(".ai1ec_update_ics",r).button("reset"),e("#ics-alerts").append(s)};return{handle_add_new_ics:n,handle_delete_ics:r,handle_update_ics:i}}),timely.define("scripts/calendar_feeds/ics/ics_event_handlers",["jquery_timely","scripts/calendar_feeds/ics/ics_ajax_handlers","libs/utils","ai1ec_config"],function(e,t,n,r){var i=n.get_ajax_url(),s=function(){var s=e(this),o=e("#ai1ec_feed_url"),u=o.val().replace("webcal://","http://"),a=!1,f;e(".ai1ec-feed-url, #ai1ec_feed_url").css("border-color","#DFDFDF"),e("#ai1ec-feed-error").remove(),e(".ai1ec-feed-url").each(function(){this.value===u&&(e(this).css("border-color","#FF0000"),a=!0,f=r.duplicate_feed_message)}),n.isUrl(u)||(a=!0,f=r.invalid_url_message);if(a)o.addClass("input-error").focus().before(n.make_alert(f,"error"));else{s.button("loading");var l=e("#ai1ec_comments_enabled").is(":checked")?1:0,c=e("#ai1ec_map_display_enabled").is(":checked")?1:0,h=e("#ai1ec_add_tag_categories").is(":checked")?1:0,p={action:"ai1ec_add_ics",feed_url:u,feed_category:e("#ai1ec_feed_category").val(),feed_tags:e("#ai1ec_feed_tags").val(),comments_enabled:l,map_display_enabled:c,keep_tags_categories:h};e.post(i,p,t.handle_add_new_ics,"json")}},o=function(n){n.preventDefault();var r=e(this).hasClass("remove")?!0:!1,s=e(e(this).data("el")),o=s.closest(".ai1ec-feed-container"),u=e(".ai1ec_feed_id",o).val(),a={action:"ai1ec_delete_ics",ics_id:u,remove_events:r};s.button("loading"),e("#ai1ec-ics-modal").modal("hide"),e.post(i,a,t.handle_delete_ics,"json")},u=function(){e("#ai1ec-ics-modal .ai1ec-btn").data("el",this),e("#ai1ec-ics-modal").modal({backdrop:"static"})},a=function(){var n=e(this),r=n.closest(".ai1ec-feed-container"),s=e(".ai1ec_feed_id",r).val(),o={action:"ai1ec_update_ics",ics_id:s};n.button("loading"),e.post(i,o,t.handle_update_ics,"json")};return{add_new_feed:s,submit_delete_modal:o,open_delete_modal:u,update_feed:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}}),timely.define("libs/tags_select",["jquery_timely","external_libs/select2"],function(e){var t=function(t){typeof t=="undefined"&&(t=e(document)),e(".ai1ec-tags-selector",t).each(function(){var t=e(this);t.select2({tags:t.data("ai1ecTags"),tokenSeparators:[","]})})},n=function(t){e(".ai1ec-tags-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:t,refresh:n}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/calendar_feeds",["jquery_timely","domReady","scripts/calendar_feeds/ics/ics_event_handlers","libs/select2_multiselect_helper","libs/tags_select","libs/utils","external_libs/jquery_cookie","external_libs/bootstrap/tab","external_libs/bootstrap/alert","external_libs/bootstrap/modal","external_libs/bootstrap/button"],function(e,t,n,r,i,s){var o=function(){var t=e(this.hash);r.refresh(t),i.refresh(t)},u=function(t){var n=e(this).attr("href");e.cookie("feeds_active_tab",n)},a=function(){var t=e("#ai1ec-feeds-after"),s=e(".ai1ec_submit_wrapper"),a=e(".ai1ec_file_upload_tags_categories");r.init(t),i.init(t),r.init(s),i.init(s),r.init(a),i.init(a),e("ul.ai1ec-nav a").on("click",u),e("ul.ai1ec-nav a").on("shown",o),e("#ai1ec-ics-modal").on("click",".remove, .keep",n.submit_delete_modal),e(document).on("click","#ai1ec_add_new_ics",n.add_new_feed).on("click",".ai1ec_delete_ics",n.open_delete_modal).on("click",".ai1ec_update_ics",n.update_feed)},f=function(){t(function(){s.activate_saved_tab_on_page_load(e.cookie("feeds_active_tab")),a()})};return{start:f}}),timely.require(["scripts/calendar_feeds"],function(e){e.start()}),timely.define("pages/calendar_feeds",function(){});
|
101 |
* limitations under the License.
|
102 |
* ======================================================================== */
|
103 |
|
104 |
+
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/calendar_feeds/ics/ics_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec_add_new_ics"),i=e("#ai1ec_feed_url");r.button("reset"),n.error?($alert=t.make_alert(n.message,"error"),e("#ics-alerts").append($alert)):(i.val(""),e("#ai1ec-feeds-after").after(n.message))},r=function(n){var r=e("input[value="+n.ics_id+"]").closest(".ai1ec-feed-container"),i=n.error?"error":"success",s=t.make_alert(n.message,i);n.error?e(".ai1ec_update_ics",r).button("reset"):r.remove(),e("#ics-alerts").append(s)},i=function(n){var r=e("input[value="+n.ics_id+"]").closest(".ai1ec-feed-container"),i=n.error?"error":"success",s=t.make_alert(n.message,i);e(".ai1ec_update_ics",r).button("reset"),e("#ics-alerts").append(s)};return{handle_add_new_ics:n,handle_delete_ics:r,handle_update_ics:i}}),timely.define("scripts/calendar_feeds/ics/ics_event_handlers",["jquery_timely","scripts/calendar_feeds/ics/ics_ajax_handlers","libs/utils","ai1ec_config"],function(e,t,n,r){var i=n.get_ajax_url(),s=function(){var s=e(this),o=e("#ai1ec_feed_url"),u=o.val().replace("webcal://","http://"),a=!1,f;e(".ai1ec-feed-url, #ai1ec_feed_url").css("border-color","#DFDFDF"),e("#ai1ec-feed-error").remove(),e(".ai1ec-feed-url").each(function(){this.value===u&&(e(this).css("border-color","#FF0000"),a=!0,f=r.duplicate_feed_message)}),n.isUrl(u)||(a=!0,f=r.invalid_url_message);if(a)o.addClass("input-error").focus().before(n.make_alert(f,"error"));else{s.button("loading");var l=e("#ai1ec_comments_enabled").is(":checked")?1:0,c=e("#ai1ec_map_display_enabled").is(":checked")?1:0,h=e("#ai1ec_add_tag_categories").is(":checked")?1:0,p={action:"ai1ec_add_ics",nonce:r.calendar_feeds_nonce,feed_url:u,feed_category:e("#ai1ec_feed_category").val(),feed_tags:e("#ai1ec_feed_tags").val(),comments_enabled:l,map_display_enabled:c,keep_tags_categories:h};e.post(i,p,t.handle_add_new_ics,"json")}},o=function(n){n.preventDefault();var r=e(this).hasClass("remove")?!0:!1,s=e(e(this).data("el")),o=s.closest(".ai1ec-feed-container"),u=e(".ai1ec_feed_id",o).val(),a={action:"ai1ec_delete_ics",ics_id:u,remove_events:r};s.button("loading"),e("#ai1ec-ics-modal").modal("hide"),e.post(i,a,t.handle_delete_ics,"json")},u=function(){e("#ai1ec-ics-modal .ai1ec-btn").data("el",this),e("#ai1ec-ics-modal").modal({backdrop:"static"})},a=function(){var n=e(this),r=n.closest(".ai1ec-feed-container"),s=e(".ai1ec_feed_id",r).val(),o={action:"ai1ec_update_ics",ics_id:s};n.button("loading"),e.post(i,o,t.handle_update_ics,"json")};return{add_new_feed:s,submit_delete_modal:o,open_delete_modal:u,update_feed:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}}),timely.define("libs/tags_select",["jquery_timely","external_libs/select2"],function(e){var t=function(t){typeof t=="undefined"&&(t=e(document)),e(".ai1ec-tags-selector",t).each(function(){var t=e(this);t.select2({tags:t.data("ai1ecTags"),tokenSeparators:[","]})})},n=function(t){e(".ai1ec-tags-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:t,refresh:n}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i
|