Changeset 2445424
- Timestamp:
- 12/24/2020 08:55:27 AM (5 years ago)
- Location:
- support-hours
- Files:
-
- 43 added
- 1 deleted
- 20 edited
-
tags/1.7.0 (added)
-
tags/1.7.0/LICENSE.txt (added)
-
tags/1.7.0/README.txt (added)
-
tags/1.7.0/admin (added)
-
tags/1.7.0/admin/class-support-hours-admin.php (added)
-
tags/1.7.0/admin/index.php (added)
-
tags/1.7.0/admin/partials (added)
-
tags/1.7.0/admin/partials/common (added)
-
tags/1.7.0/admin/partials/common/bottom-message.php (added)
-
tags/1.7.0/admin/partials/common/notice-configure.php (added)
-
tags/1.7.0/admin/partials/common/notice-no-hours.php (added)
-
tags/1.7.0/admin/partials/settings (added)
-
tags/1.7.0/admin/partials/settings/general-settings-form.php (added)
-
tags/1.7.0/admin/partials/settings/work-table-fields.php (added)
-
tags/1.7.0/admin/partials/settings/work-table-form.php (added)
-
tags/1.7.0/admin/partials/widget (added)
-
tags/1.7.0/admin/partials/widget/widget-clock.php (added)
-
tags/1.7.0/admin/partials/widget/worktable.php (added)
-
tags/1.7.0/admin/support-hours-admin-functions.php (added)
-
tags/1.7.0/admin/support-hours-admin-overview.php (added)
-
tags/1.7.0/admin/support-hours-admin-settings.php (added)
-
tags/1.7.0/admin/support-hours-admin-widget.php (added)
-
tags/1.7.0/dist (added)
-
tags/1.7.0/dist/scripts (added)
-
tags/1.7.0/dist/scripts/support-hours-admin.js (added)
-
tags/1.7.0/dist/scripts/support-hours-admin.js.LICENSE.txt (added)
-
tags/1.7.0/dist/styles (added)
-
tags/1.7.0/dist/styles/support-hours-admin.css (added)
-
tags/1.7.0/includes (added)
-
tags/1.7.0/includes/class-support-hours-activator.php (added)
-
tags/1.7.0/includes/class-support-hours-deactivator.php (added)
-
tags/1.7.0/includes/class-support-hours-i18n.php (added)
-
tags/1.7.0/includes/class-support-hours-loader.php (added)
-
tags/1.7.0/includes/class-support-hours-uninstaller.php (added)
-
tags/1.7.0/includes/class-support-hours.php (added)
-
tags/1.7.0/includes/index.php (added)
-
tags/1.7.0/languages (added)
-
tags/1.7.0/languages/support-hours-nl_NL.mo (added)
-
tags/1.7.0/languages/support-hours-nl_NL.po (added)
-
tags/1.7.0/languages/support-hours.pot (added)
-
tags/1.7.0/support-hours.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-support-hours-admin.php (modified) (6 diffs)
-
trunk/admin/partials/common/bottom-message.php (modified) (3 diffs)
-
trunk/admin/partials/common/notice-configure.php (modified) (1 diff)
-
trunk/admin/partials/common/notice-no-hours.php (modified) (1 diff)
-
trunk/admin/partials/settings/general-settings-form.php (modified) (2 diffs)
-
trunk/admin/partials/widget/widget-clock.php (modified) (1 diff)
-
trunk/admin/partials/widget/worktable.php (modified) (2 diffs)
-
trunk/admin/support-hours-admin-functions.php (modified) (6 diffs)
-
trunk/admin/support-hours-admin-overview.php (modified) (4 diffs)
-
trunk/admin/support-hours-admin-settings.php (modified) (2 diffs)
-
trunk/admin/support-hours-admin-widget.php (modified) (2 diffs)
-
trunk/dist/scripts/support-hours-admin.js (modified) (1 diff)
-
trunk/dist/scripts/support-hours-admin.js.LICENSE.txt (added)
-
trunk/dist/styles/support-hours-admin.css (modified) (1 diff)
-
trunk/includes/class-support-hours-activator.php (modified) (3 diffs)
-
trunk/includes/class-support-hours-deactivator.php (modified) (3 diffs)
-
trunk/includes/class-support-hours-i18n.php (modified) (3 diffs)
-
trunk/includes/class-support-hours-loader.php (modified) (8 diffs)
-
trunk/includes/class-support-hours-uninstaller.php (added)
-
trunk/includes/class-support-hours.php (modified) (13 diffs)
-
trunk/support-hours.php (modified) (5 diffs)
-
trunk/uninstall.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
support-hours/trunk/README.txt
r2367690 r2445424 3 3 Tags: time, hours, tracking, client, pre-paid, freelance, support, development, developer 4 4 Requires at least: 4.6 5 Tested up to: 5. 56 Stable tag: 1. 6.25 Tested up to: 5.6 6 Stable tag: 1.7.0 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 46 46 47 47 == Changelog == 48 49 50 = 1.7.0 = 51 * Namespace plugin PHP files. 52 * Compatibility check with new WP version 53 * Compatibility check with PHP 8 54 * Fix jQuery deprecations 55 * Code cleanup 56 * Add proper uninstall hook 57 * Fix notices after installation 48 58 49 59 = 1.6.2 = -
support-hours/trunk/admin/class-support-hours-admin.php
r1999630 r2445424 1 1 <?php 2 2 3 namespace Support_Hours; 4 3 5 /** 4 * The admin-specific functionality of the plugin.5 *6 * @link http://basedonline.nl7 * @since 1.0.08 *9 * @package Support_Hours10 * @subpackage Support_Hours/admin11 */6 * The admin-specific functionality of the plugin. 7 * 8 * @link http://basedonline.nl 9 * @since 1.0.0 10 * 11 * @package Support_Hours 12 * @subpackage Support_Hours/admin 13 */ 12 14 /** 13 * The admin-specific functionality of the plugin. 14 * 15 * Defines the plugin name, version, and two examples hooks for how to 16 * enqueue the admin-specific stylesheet and JavaScript. 17 * 18 * @package Support_Hours 19 * @subpackage Support_Hours/admin 20 * @author Erik van der Bas <erik@basedonline.nl> 21 */ 22 class Support_Hours_Admin { 23 24 /** 25 * The ID of this plugin. 26 * 27 * @since 1.0.0 28 * @access private 29 * @var string $plugin_name The ID of this plugin. 30 */ 15 * The admin-specific functionality of the plugin. 16 * 17 * Defines the plugin name, version, and two examples hooks for how to 18 * enqueue the admin-specific stylesheet and JavaScript. 19 * 20 * @package Support_Hours 21 * @subpackage Support_Hours/admin 22 * @author Erik van der Bas <erik@basedonline.nl> 23 */ 24 class Support_Hours_Admin 25 { 26 27 /** 28 * The ID of this plugin. 29 * 30 * @since 1.0.0 31 * @access private 32 * @var string $plugin_name The ID of this plugin. 33 */ 31 34 private $plugin_name; 32 35 33 36 /** 34 * The version of this plugin.35 *36 * @since 1.0.037 * @access private38 * @var string $version The current version of this plugin.39 */37 * The version of this plugin. 38 * 39 * @since 1.0.0 40 * @access private 41 * @var string $version The current version of this plugin. 42 */ 40 43 private $version; 41 44 42 45 /** 43 * Initialize the class and set its properties. 44 * 45 * @since 1.0.0 46 * @param string $plugin_name The name of this plugin. 47 * @param string $version The version of this plugin. 48 */ 49 public function __construct( $plugin_name, $version ) { 46 * Plugin options 47 * 48 * @since 1.7.0 49 * @access private 50 * @var string $this->options The plugin options saved in the database. 51 */ 52 private $options; 53 54 55 /** 56 * Support Hours Managers 57 * 58 * @since 1.7.0 59 * @access private 60 * @var array $managers allowed users to manage Support Hours 61 */ 62 private $managers; 63 64 /** 65 * Support Hours E-mail address 66 * 67 * @since 1.7.0 68 * @access private 69 * @var $email Email address used to order more hours. 70 */ 71 private $email = false; 72 73 /** 74 * Support Hours work_fields 75 * 76 * @since 1.7.0 77 * @access private 78 * @var string $work_fields all work fields 79 */ 80 private $work_fields = null; 81 82 /** 83 * Support Hours used_minutes 84 * 85 * @since 1.7.0 86 * @access private 87 * @var int All used minutes 88 */ 89 private $used_minutes = 0; 90 91 /** 92 * Support Hours bought_minutes 93 * 94 * @since 1.7.0 95 * @access private 96 * @var int All bought minutes 97 */ 98 private $bought_minutes = 0; 99 100 /** 101 * Initialize the class and set its properties. 102 * 103 * @since 1.0.0 104 * @param string $plugin_name The name of this plugin. 105 * @param string $version The version of this plugin. 106 */ 107 public function __construct($plugin_name, $version) 108 { 50 109 51 110 $this->plugin_name = $plugin_name; 52 111 $this->version = $version; 53 54 } 55 public function options_update() { 112 $this->options = get_option($plugin_name); 113 114 115 if (!empty($this->options['users'])) { 116 $this->managers = $this->options['users']; 117 } 118 119 if (isset($this->options['email'])) { 120 $this->email = $this->options['email']; 121 } 122 123 if (isset($this->options['workFields'])) { 124 $this->work_fields = $this->options['workFields']; 125 $this->used_minutes = $this->add_time_entries('time-used'); 126 $this->bought_minutes = $this->add_time_entries('time-added'); 127 } 128 } 129 130 public function options_update() 131 { 56 132 register_setting($this->plugin_name, $this->plugin_name, array($this, 'validate')); 57 133 } 58 /** 59 * Register the stylesheets for the admin area. 60 * 61 * @since 1.0.0 62 */ 63 public function enqueue_styles() { 64 $current_page = get_current_screen()->base; 65 66 if (in_array($current_page, array('toplevel_page_support-hours','support-hours_page_support-hours-settings','dashboard'))): 67 wp_enqueue_style( $this->plugin_name, plugins_url($this->plugin_name). '/dist/styles/support-hours-admin.css', array(), $this->version, 'all' ); 134 135 /** 136 * Register the stylesheets for the admin area. 137 * 138 * @since 1.0.0 139 */ 140 public function enqueue_styles() 141 { 142 $current_page = get_current_screen()->base; 143 144 if (in_array($current_page, array('toplevel_page_support-hours', 'support-hours_page_support-hours-settings', 'dashboard'))) : 145 wp_enqueue_style($this->plugin_name, SH_PLUGIN_DIR_URI . 'dist/styles/support-hours-admin.css', array(), $this->version, 'all'); 68 146 endif; 69 147 } 70 148 71 149 /** 72 * Register the JavaScript for the admin area. 73 * 74 * @since 1.0.0 75 */ 76 public function enqueue_scripts() { 150 * Register the JavaScript for the admin area. 151 * 152 * @since 1.0.0 153 */ 154 public function enqueue_scripts() 155 { 77 156 $current_page = get_current_screen()->base; 78 157 79 if (in_array($current_page, array('toplevel_page_support-hours', 'support-hours_page_support-hours-settings','dashboard'))):80 wp_enqueue_script( $this->plugin_name, plugins_url($this->plugin_name). '/dist/scripts/support-hours-admin.js', array( 'jquery' ), $this->version, false);158 if (in_array($current_page, array('toplevel_page_support-hours', 'support-hours_page_support-hours-settings', 'dashboard'))) : 159 wp_enqueue_script($this->plugin_name, SH_PLUGIN_DIR_URI . 'dist/scripts/support-hours-admin.js', array('jquery'), $this->version, false); 81 160 endif; 82 161 } 83 public function add_plugin_admin_menu() { 84 85 /* 86 * Add a settings page for this plugin to the Settings menu. 87 * 88 * NOTE: Alternative menu locations are available via WordPress administration menu functions. 89 * 90 * Administration Menus: http://codex.wordpress.org/Administration_Menus 91 * 92 */ 162 163 public function add_plugin_admin_menu() 164 { 165 93 166 add_menu_page( 94 __( 'Support Hours overview', $this->plugin_name),95 __( 'Support Hours', $this->plugin_name),167 __('Support Hours overview', $this->plugin_name), 168 __('Support Hours', $this->plugin_name), 96 169 'publish_pages', 97 170 'support-hours', … … 99 172 'dashicons-clock' 100 173 ); 174 101 175 add_submenu_page( 102 176 'support-hours', 103 __( 'Support Hours overview', $this->plugin_name),104 __( 'Overview', $this->plugin_name),177 __('Support Hours overview', $this->plugin_name), 178 __('Overview', $this->plugin_name), 105 179 'publish_pages', 106 180 'support-hours', 107 181 array($this, 'display_plugin_page') 108 182 ); 183 109 184 add_submenu_page( 110 185 'support-hours', 111 __( 'Support Hours settings', $this->plugin_name),112 __( 'Settings', $this->plugin_name),113 ' manage_options',186 __('Support Hours settings', $this->plugin_name), 187 __('Settings', $this->plugin_name), 188 'publish_pages', 114 189 'support-hours-settings', 115 190 array($this, 'display_plugin_setup_page') … … 118 193 119 194 /** 120 * Add settings action link to the plugins page. 121 * 122 * @since 1.0.0 123 */ 124 public function add_action_links( $links ) { 195 * Add settings action link to the plugins page. 196 * 197 * @since 1.0.0 198 */ 199 public function add_action_links($links) 200 { 125 201 /* 126 202 * Documentation : https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name) … … 129 205 '<a href="' . admin_url('admin.php?page=support-hours-settings') . '">' . __('Settings', $this->plugin_name) . '</a>', 130 206 ); 131 return array_merge( $settings_link, $links ); 132 133 } 134 /** 135 * Render the settings page for this plugin. 136 * 137 * @since 1.0.0 138 */ 139 140 public function display_plugin_page() { 141 include_once( 'support-hours-admin-functions.php' ); 142 include_once( 'support-hours-admin-overview.php' ); 143 } 144 public function display_plugin_setup_page() { 145 include_once( 'support-hours-admin-settings.php' ); 146 } 147 148 149 public static function support_hours_date_compare($a, $b) 207 return array_merge($settings_link, $links); 208 } 209 /** 210 * Render the settings page for this plugin. 211 * 212 * @since 1.0.0 213 */ 214 215 public function display_plugin_page() 216 { 217 include_once('support-hours-admin-functions.php'); 218 include_once('support-hours-admin-overview.php'); 219 } 220 public function display_plugin_setup_page() 221 { 222 include_once('support-hours-admin-settings.php'); 223 } 224 225 226 public static function date_compare($a, $b) 150 227 { 151 228 $t1 = strtotime($a['date']); … … 154 231 } 155 232 156 public function validate($input) { 233 public function update_capabilities() 234 { 235 $managers = $this->managers; 236 $administrator_ids = get_users('fields=ID&role=administrator'); 237 $non_managers = array_diff($administrator_ids, $managers); 238 239 foreach ($this->managers as $user_id) { 240 $user = new \WP_User($user_id); 241 $user->add_cap('support_hours_manager'); 242 } 243 244 foreach ($non_managers as $non_manager_id) { 245 $non_manager = new \WP_User($non_manager_id); 246 $non_manager->remove_cap('support_hours_manager'); 247 } 248 } 249 250 public function validate($input) 251 { 157 252 $valid = array(); 158 253 $valid['users'] = array(); 159 254 160 255 $valid['email'] = sanitize_email($input['email']); 161 256 162 if (isset($input['users'])):257 if (isset($input['users'])) : 163 258 $valid['users'] = $input['users']; 164 else:165 $valid['users'] = array();166 259 endif; 167 if(!isset($input['workFields']) || $input['workFields'] == null){ 260 261 262 if (!isset($input['workFields']) || $input['workFields'] == null) { 168 263 $input['workFields'] = null; 169 } else {170 usort($input['workFields'], array('Support_Hours _Admin','support_hours_date_compare'));264 } else { 265 usort($input['workFields'], array('Support_Hours\Support_Hours_Admin', 'date_compare')); 171 266 } 172 267 … … 175 270 } 176 271 177 178 function support_hours_add_dashboard_widgets(){179 if ( current_user_can( 'publish_pages' )) {272 public function add_dashboard_widget() 273 { 274 if (current_user_can('publish_pages')) { 180 275 wp_add_dashboard_widget( 181 'support_hours_dashboard_widget', // Widget slug.182 __( 'Support Hours', $this->plugin_name), // Title.183 array($this, ' support_hours_dashboard_widget_function') // Display function.276 'support_hours_dashboard_widget', 277 __('Support Hours', $this->plugin_name), 278 array($this, 'widget_compose') 184 279 ); 185 280 global $wp_meta_boxes; 186 281 $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core']; 187 $support_hours_dashboard_widget_backup = array( 'support_hours_dashboard_widget' => $normal_dashboard['support_hours_dashboard_widget']);188 unset( $normal_dashboard['support_hours_dashboard_widget']);189 $sorted_dashboard = array_merge( $support_hours_dashboard_widget_backup, $normal_dashboard);282 $support_hours_dashboard_widget_backup = array('support_hours_dashboard_widget' => $normal_dashboard['support_hours_dashboard_widget']); 283 unset($normal_dashboard['support_hours_dashboard_widget']); 284 $sorted_dashboard = array_merge($support_hours_dashboard_widget_backup, $normal_dashboard); 190 285 $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; 191 286 } 192 287 } 193 function support_hours_dashboard_widget_function() { 194 include_once( 'support-hours-admin-functions.php' ); 195 include_once( 'support-hours-admin-widget.php' ); 288 289 public function widget_compose() 290 { 291 include_once('support-hours-admin-functions.php'); 292 include_once('support-hours-admin-widget.php'); 293 } 294 295 296 /** 297 * Checks the workfields array for the time fields. Adds all timefields and returns them. 298 * If no workfields and therefore no time fields are filled, returns 00:00 299 * @since 1.4 300 * @param string $type can be used or bought 301 * @return string Returns full hours format or total minutes of used or bought hours 302 */ 303 private function add_time_entries($type) 304 { 305 $minutes = 0; 306 307 if ($this->work_fields == null) { 308 return $minutes; 309 } 310 311 if (!isset($this->work_fields[0]['type'])) { 312 return $minutes; 313 } 314 315 $filtered_fields = array_filter($this->work_fields, function ($var) use ($type) { 316 return ($var['type'] == $type); 317 }); 318 319 foreach ($filtered_fields as $time) { 320 if ($time['type'] !== "") { 321 list($hour, $minute) = explode(':', $time['used']); 322 $minutes += $hour * 60; 323 $minutes += $minute; 324 } 325 } 326 327 return $minutes; 196 328 } 197 329 } -
support-hours/trunk/admin/partials/common/bottom-message.php
r2230254 r2445424 1 1 <?php 2 2 3 if (!empty($users) && in_array($user_ID, $users) && !empty($workFields[0]['date'])) : ?> 3 namespace Support_Hours; 4 5 if (!empty($this->managers) && in_array($user_ID, $this->managers) && !empty($workFields[0]['date'])) : ?> 4 6 <div class="support-hours-notices"> 5 7 … … 9 11 <?php endif; ?> 10 12 11 <?php elseif (!empty($ users) && in_array($user_ID, $users)) :13 <?php elseif (!empty($this->managers) && in_array($user_ID, $this->managers)) : 12 14 if ($pagenow == 'admin.php') : 13 15 $message = __('No activities added yet.', $this->plugin_name); 14 sh_the_notice($message);16 the_notice($message); 15 17 endif; ?> 16 18 <a class="button button-primary" href="<?php echo admin_url('admin.php?page=support-hours-settings'); ?>"><?php _e('Add first activity', $this->plugin_name); ?></a> … … 23 25 if ($percentage == 100) { 24 26 $message = __('your Support Hours are used.', $this->plugin_name); 25 sh_the_notice($welcome . $message, 'notice-error');27 the_notice($welcome . $message, 'notice-error'); 26 28 } elseif ($percentage >= 80) { 27 29 $message = __('your Support Hours are almost used.', $this->plugin_name); 28 sh_the_notice($welcome . $message, 'notice-warning');30 the_notice($welcome . $message, 'notice-warning'); 29 31 } else { 30 32 $message = __('you have plenty of hours left.', $this->plugin_name); 31 sh_the_notice($welcome . $message, 'notice-success');33 the_notice($welcome . $message, 'notice-success'); 32 34 } ?> 33 <a class="button button-primary" href="mailto:<?php echo $ email; ?>'?SUBJECT=<?php _e('Order Support Hours', $this->plugin_name); ?> - <?php echo bloginfo('name'); ?>"><?php _e('Order Support Hours', $this->plugin_name); ?></a>35 <a class="button button-primary" href="mailto:<?php echo $this->email; ?>'?SUBJECT=<?php _e('Order Support Hours', $this->plugin_name); ?> - <?php echo bloginfo('name'); ?>"><?php _e('Order Support Hours', $this->plugin_name); ?></a> 34 36 </div> 35 37 <?php endif; ?> -
support-hours/trunk/admin/partials/common/notice-configure.php
r2230254 r2445424 1 1 <?php 2 3 namespace Support_Hours; 4 2 5 $message = __('Support Hours is not configured.', $this->plugin_name); 3 6 4 sh_the_notice($message, 'notice-warning');7 the_notice($message, 'notice-warning'); 5 8 ?> 6 9 <p> -
support-hours/trunk/admin/partials/common/notice-no-hours.php
r2230234 r2445424 1 1 <?php 2 3 namespace Support_Hours; 4 2 5 $message = __('No Support Hours bought yet.', $this->plugin_name); 3 sh_the_notice($message, 'notice-warning');6 the_notice($message, 'notice-warning'); 4 7 ?> 5 <a class="button button-primary" href="mailto:<?php echo $ email; ?>'?SUBJECT=<?php _e('Order Support Hours', $this->plugin_name); ?> - <?php echo bloginfo('name'); ?>">8 <a class="button button-primary" href="mailto:<?php echo $this->email; ?>'?SUBJECT=<?php _e('Order Support Hours', $this->plugin_name); ?> - <?php echo bloginfo('name'); ?>"> 6 9 <?php _e('Order Support Hours', $this->plugin_name); ?> 7 10 </a> -
support-hours/trunk/admin/partials/settings/general-settings-form.php
r2189538 r2445424 2 2 <h3><?php _e('Select Support Hours managers', $name); ?>:</h3> 3 3 <?php 4 $ WPusers = get_users('orderby=nicename&role=administrator');5 foreach ($ WPusers as $user) {6 ?>7 <label for="<?php echo $name; ?>[users<?php echo $ user->ID; ?>]">8 <input type="checkbox" name="<?php echo $name; ?>[users][]" id="<?php echo $name; ?>[users<?php echo $ user->ID; ?>]" class="filled-in" value="<?php echo $user->ID; ?>" <?php if (!empty($users)) checked((in_array($user->ID, $users))); ?> />9 <span><?php echo $ user->display_name; ?></span>4 $administrators = get_users('orderby=nicename&role=administrator'); 5 foreach ($administrators as $administrator) { 6 ?> 7 <label for="<?php echo $name; ?>[users<?php echo $administrator->ID; ?>]"> 8 <input type="checkbox" name="<?php echo $name; ?>[users][]" id="<?php echo $name; ?>[users<?php echo $administrator->ID; ?>]" class="filled-in" value="<?php echo $administrator->ID; ?>" <?php if (!empty($this->managers)) checked((in_array($administrator->ID, $this->managers))); ?> /> 9 <span><?php echo $administrator->display_name; ?></span> 10 10 </label><br /> 11 11 <?php } ?> … … 17 17 </legend> 18 18 <div class="input-field"> 19 <input id="email" type="email" class="regular-text regular-text--email validate" id="<?php echo $name; ?>-email" name="<?php echo $name; ?>[email]" value="<?php if (!empty($ email)) echo $email; ?>" />19 <input id="email" type="email" class="regular-text regular-text--email validate" id="<?php echo $name; ?>-email" name="<?php echo $name; ?>[email]" value="<?php if (!empty($this->email)) echo $this->email; ?>" /> 20 20 <label for="email"><?php _e('E-mail', $name); ?></label> 21 21 </div> -
support-hours/trunk/admin/partials/widget/widget-clock.php
r2230234 r2445424 1 <?php 2 3 namespace Support_Hours; 4 ?> 1 5 <div class="sh-gauge" role="heading" aria-level="2" data-percent="<?php echo percentage($workFields, $used_minutes, $bought_minutes); ?>"> 2 6 <a href="<?php echo admin_url('admin.php?page=support-hours'); ?>" class="sh-gauge__wrapper sh-gauge__wrapper--average"> 3 <!-- Wrapper exists for the ::before plugin icon. Cannot create pseudo-elements on svgs. -->4 7 <div class="sh-gauge__svg-wrapper"> 5 8 <svg viewBox="0 0 120 120" class="sh-gauge__svg"> -
support-hours/trunk/admin/partials/widget/worktable.php
r2230234 r2445424 1 <?php 2 3 namespace Support_Hours; 4 ?> 1 5 <?php if ($workFields) : ?> 2 6 <div class="support-hours-time-table"> … … 38 42 <div class="total"> 39 43 <span class="bold"><?php _e('Total', $this->plugin_name); ?></span>: 40 <?php echo AddTime($workFields, 'time-used'); ?> / <?php echo AddTime($workFields, 'time-added'); ?>44 <?php echo calculate_hours_and_minutes_output($this->used_minutes); ?> / <?php echo calculate_hours_and_minutes_output($this->bought_minutes); ?> 41 45 </div> 42 46 </div> -
support-hours/trunk/admin/support-hours-admin-functions.php
r2230254 r2445424 1 1 <?php 2 2 3 $options = get_option($this->plugin_name); 3 namespace Support_Hours; 4 4 5 $name = $this->plugin_name; 5 $users = $options['users']; 6 $email = $options['email']; 7 //$static_time = $options['bought_hours']; 6 $options = $this->options; 8 7 $current_color = get_user_option('admin_color'); 9 $workFields = $options['workFields'];10 8 11 $used_minutes = AddTime($workFields, 'time-used', 'minutes'); 12 $bought_minutes = AddTime($workFields, 'time-added', 'minutes'); 13 14 /* 15 // NOTE: temp function to transform first set of hours to new hour system. 16 function transform_fixed_time($static_time, $workFields, $name, $options){ 17 if($options['bought_hours'] != '00:00'){ 18 echo "<h3>". __('Update of Support Hours complete, please refresh page', $name)."</h3>"; 19 $newdata = array ( 20 'date' => date('d-m-Y'), 21 'description' => __('First bought time - added by Support Hours', $name), 22 'used' => $static_time, 23 'type' => 'time-added' 24 ); 25 array_unshift($options['workFields'], $newdata); 26 //$options = array_diff_key($options, ['bought_hours' => "xy"]); 27 28 $options['workFields'] = array_map(function($arr){ 29 return $arr + ['type' =>'time-used']; 30 }, $options['workFields']); 31 32 update_option($name, $options); 33 } 34 } 35 echo transform_fixed_time($static_time, $workFields, $name, $options); 36 */ 37 38 /** 39 * Transforms $minutes to HH:MM 40 * @since 41 * @param int $minutes minutes, can be bought or used 42 * @return string HH:MM 43 */ 44 function minutestoTime($minutes) 45 { 46 return sprintf("%02d:%02d", floor($minutes / 60), $minutes % 60); // 01:37 47 } 48 49 /** 50 * function to strip the hours displayed in the clock of minutes if the hour is round. 51 * @since 52 * @param [type] $minutes minutes, can be bought or used 53 * @return string Retunrs full hour without zeros 54 */ 55 function minutestoTimeRound($minutes) 56 { 57 if ($minutes % 60 == 0) : 58 $time = $minutes / 60; 59 else : 60 $time = minutestoTime($minutes); 61 endif; 62 return $time; 63 } 64 65 66 67 /** 68 * Checks the workfields array for the time fields. Adds all timefields and returns them. 69 * If no workfields and therefore no time fields are filled, returns 00:00 70 * @since 1.4 71 * @param array $workFields The workfields from this plugin, contains bought and used hours 72 * @param string $type can be used or bought 73 * @param string $returns if minutes returns total minutes 74 * @return string Returns full hours format or total minutes of used or bought hours 75 */ 76 function AddTime($workFields, $type, $returns = null) 77 { 78 $output = 0; 79 $minutes = 0; 80 if ($workFields != null) { 81 if (isset($workFields[0]['type'])) : 82 $workFields = array_filter($workFields, function ($var) use ($type) { 83 return ($var['type'] == $type); 84 }); 85 foreach ($workFields as $time) { 86 // Check if the field is not empty. Else stay with 0. 87 if ($time['type'] !== "") { 88 list($hour, $minute) = explode(':', $time['used']); 89 $minutes += $hour * 60; 90 $minutes += $minute; 91 } 92 } 93 if ($returns == 'minutes') : 94 $output = $minutes; 95 else : 96 $hours = floor($minutes / 60); 97 $minutes -= $hours * 60; 98 $time = sprintf('%02d:%02d', $hours, $minutes); 99 $output = $time; 100 endif; 101 endif; 102 } 103 return $output; 104 } 9 $workFields = $this->work_fields; 10 $used_minutes = $this->used_minutes; 11 $bought_minutes = $this->bought_minutes; 105 12 106 13 … … 130 37 131 38 39 function calculate_minutes_output($workFields, $used_minutes, $bought_minutes) 40 { 41 $last_bought_minutes = last_bought($workFields); 42 $bought_minus_last = $bought_minutes - $last_bought_minutes; 43 $minutes_to_spent = $bought_minutes - $used_minutes; 132 44 133 /**134 * To not overcluther the interface we only show the time you actually care about in the widget.135 * If multiple time hours are bought, and most of it was spent, we only want to see the136 * last bought hours and the hours left calculated against that.137 * This function is used to return all used minutes minus all the minutes prior to the last bought hours138 * so we can display the used hours correctly. Used in percentage() and widget_output()139 * @since140 * @param array $workFields The workfields from this plugin, contains bought and used hours141 * @param int $bought_minutes Total bought minutes142 * @return int minutes143 */144 function bought_minus_last($workFields, $bought_minutes)145 {146 $output = 0;147 148 if ($workFields != null) {149 $output = $bought_minutes - last_bought($workFields);150 }151 152 return $output;153 }154 155 156 157 158 /**159 * This function is being used to display the hours in the widget.160 * Output depends on time spent, time bought and time bought the last time.161 * @since 1.4162 * @param array $workFields The workfields from this plugin, contains bought and used hours163 * @param int $used_minutes Total used minutes164 * @param int $bought_minutes Total bought minutes165 * @return string Returns hours in HH:MM format or HH format where the first is used time, the second the bought time.166 */167 function widget_output($workFields, $used_minutes, $bought_minutes)168 {169 $bought_minus_last = bought_minus_last($workFields, $bought_minutes);170 $minutes_to_spent = $bought_minutes - $used_minutes;171 $last_bought_minutes = last_bought($workFields);172 45 173 46 // NOTE: calculates used hours … … 185 58 } 186 59 187 $widget_hours = minutestoTimeRound($used_minutes) . ' / ' . minutestoTimeRound($bought_minutes); 60 return [ 61 'used_minutes' => $used_minutes, 62 'bought_minutes' => $bought_minutes 63 ]; 64 } 65 66 function calculate_hours_and_minutes_output($minutes) 67 { 68 $hours = floor($minutes / 60); 69 $minutes -= $hours * 60; 70 return sprintf('%02d:%02d', $hours, $minutes); 71 } 72 73 /** 74 * function to strip the hours displayed in the clock of minutes if the hour is round. 75 * @since 76 * @param [type] $minutes minutes, can be bought or used 77 * @return string Retunrs full hour without zeros 78 */ 79 function maybe_hide_minutes($minutes) 80 { 81 $time = sprintf("%02d:%02d", floor($minutes / 60), $minutes % 60); 82 83 if ($minutes % 60 == 0) : 84 $time = $minutes / 60; 85 endif; 86 87 return $time; 88 } 89 90 /** 91 * This function is being used to display the hours in the widget. 92 * Output depends on time spent, time bought and time bought the last time. 93 * @since 1.4 94 * @param array $workFields The workfields from this plugin, contains bought and used hours 95 * @param int $used_minutes Total used minutes 96 * @param int $bought_minutes Total bought minutes 97 * @return string Returns hours in HH:MM format or HH format where the first is used time, the second the bought time. 98 */ 99 function widget_output($workFields, $used_minutes, $bought_minutes) 100 { 101 $minutes = calculate_minutes_output($workFields, $used_minutes, $bought_minutes); 102 103 $widget_hours = maybe_hide_minutes($minutes['used_minutes']) . ' / ' . maybe_hide_minutes($minutes['bought_minutes']); 188 104 return $widget_hours; 189 105 } 190 191 192 106 193 107 … … 204 118 { 205 119 206 $bought_minus_last = bought_minus_last($workFields, $bought_minutes); 207 $minutes_to_spent = $bought_minutes - $used_minutes; 208 $last_bought_minutes = last_bought($workFields); 120 $minutes = calculate_minutes_output($workFields, $used_minutes, $bought_minutes); 209 121 210 // NOTE: calculates used hours 211 if ($used_minutes > $bought_minus_last) { 212 $used_minutes = $used_minutes - $bought_minus_last; 213 } else { 214 $used_minutes = $used_minutes; 215 } 216 217 // NOTE: calculates bought hours 218 if ($minutes_to_spent < $last_bought_minutes) { 219 $bought_minutes = $last_bought_minutes; 220 } else { 221 $bought_minutes = $bought_minutes; 222 } 223 224 $percentage = $used_minutes * 100 / $bought_minutes; 122 $percentage = $minutes['used_minutes'] * 100 / $minutes['bought_minutes']; 225 123 if ($percentage > 100) { 226 124 $percentage = 100; … … 253 151 254 152 255 function sh_get_notice($message, $notice_class = 'notice-alt')153 function get_notice($message, $notice_class = 'notice-alt') 256 154 { 257 155 $notice = ''; 258 $notice .= '<div class="warning-message notice support-hours-notice inline ' . $notice_class . '">';156 $notice .= '<div class="warning-message notice support-hours-notice inline ' . $notice_class . '">'; 259 157 $notice .= '<p>' . $message . '</p>'; 260 158 $notice .= '</div>'; … … 262 160 return $notice; 263 161 } 264 function sh_the_notice($message, $notice_class = 'notice-alt') 162 163 function the_notice($message, $notice_class = 'notice-alt') 265 164 { 266 echo sh_get_notice($message, $notice_class);165 echo get_notice($message, $notice_class); 267 166 } -
support-hours/trunk/admin/support-hours-admin-overview.php
r2230254 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 19 21 </p> 20 22 <?php 21 if (!empty($ users) && $bought_minutes !== '0' && !empty($email)) :23 if (!empty($this->managers) && $bought_minutes !== '0' && !empty($this->email)) : 22 24 $user_ID = get_current_user_id(); 23 25 $i = 0; … … 67 69 <div class="total"> 68 70 <span class="bold"><?php _e('Total', $this->plugin_name); ?></span>: 69 <?php echo AddTime($workFields, 'time-used'); ?> / <?php echo AddTime($workFields, 'time-added'); ?>71 <?php echo calculate_hours_and_minutes_output($this->used_minutes); ?> / <?php echo calculate_hours_and_minutes_output($this->bought_minutes); ?> 70 72 </div> 71 73 </div> … … 75 77 include_once('partials/common/bottom-message.php'); 76 78 77 elseif (empty($ users) || empty($email)) :79 elseif (empty($this->managers) || empty($this->email)) : 78 80 include_once('partials/common/notice-configure.php'); 79 81 -
support-hours/trunk/admin/support-hours-admin-settings.php
r2230234 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 12 14 13 15 $name = $this->plugin_name; 14 $options = get_option($name); 15 $users = $options['users']; 16 $email = $options['email']; 17 $workFields = $options['workFields']; 16 $options = $this->options; 17 $workFields = $this->work_fields; 18 18 $user_ID = get_current_user_id(); 19 19 $i = 0; 20 20 21 ?> 21 22 <div class="wrap"> 22 23 <h2><?php echo esc_html(get_admin_page_title()); ?></h2> 23 <?php if (empty($ users) || (!empty($users) && in_array($user_ID, $users))) { ?>24 <?php if (empty($this->managers) || (!empty($this->managers) && in_array($user_ID, $this->managers))) { ?> 24 25 25 26 <form method="post" name="cleanup_options" action="options.php" class="support-hours-settings shs"> -
support-hours/trunk/admin/support-hours-admin-widget.php
r2189538 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 14 16 $user_ID = get_current_user_id(); 15 17 $i = 0; 18 16 19 global $pagenow; 17 if (!empty($users) && !empty($email) && !empty($workFields[0]['date'])) : 20 21 if (!empty($this->managers) && !empty($this->email) && !empty($workFields[0]['date'])) : 18 22 include_once('partials/widget/widget-clock.php'); 19 23 include_once('partials/widget/worktable.php'); 20 24 include_once('partials/common/bottom-message.php'); 21 elseif (empty($ users) || empty($email)) :25 elseif (empty($this->managers) || empty($this->email)) : 22 26 include_once('partials/common/notice-configure.php'); 23 27 else : -
support-hours/trunk/dist/scripts/support-hours-admin.js
r2367690 r2445424 1 /******/ (function(modules) { // webpackBootstrap 2 /******/ // The module cache 3 /******/ var installedModules = {}; 4 /******/ 5 /******/ // The require function 6 /******/ function __webpack_require__(moduleId) { 7 /******/ 8 /******/ // Check if module is in cache 9 /******/ if(installedModules[moduleId]) { 10 /******/ return installedModules[moduleId].exports; 11 /******/ } 12 /******/ // Create a new module (and put it into the cache) 13 /******/ var module = installedModules[moduleId] = { 14 /******/ i: moduleId, 15 /******/ l: false, 16 /******/ exports: {} 17 /******/ }; 18 /******/ 19 /******/ // Execute the module function 20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 /******/ 22 /******/ // Flag the module as loaded 23 /******/ module.l = true; 24 /******/ 25 /******/ // Return the exports of the module 26 /******/ return module.exports; 27 /******/ } 28 /******/ 29 /******/ 30 /******/ // expose the modules object (__webpack_modules__) 31 /******/ __webpack_require__.m = modules; 32 /******/ 33 /******/ // expose the module cache 34 /******/ __webpack_require__.c = installedModules; 35 /******/ 36 /******/ // define getter function for harmony exports 37 /******/ __webpack_require__.d = function(exports, name, getter) { 38 /******/ if(!__webpack_require__.o(exports, name)) { 39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40 /******/ } 41 /******/ }; 42 /******/ 43 /******/ // define __esModule on exports 44 /******/ __webpack_require__.r = function(exports) { 45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47 /******/ } 48 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 49 /******/ }; 50 /******/ 51 /******/ // create a fake namespace object 52 /******/ // mode & 1: value is a module id, require it 53 /******/ // mode & 2: merge all properties of value into the ns 54 /******/ // mode & 4: return value when already ns object 55 /******/ // mode & 8|1: behave like require 56 /******/ __webpack_require__.t = function(value, mode) { 57 /******/ if(mode & 1) value = __webpack_require__(value); 58 /******/ if(mode & 8) return value; 59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60 /******/ var ns = Object.create(null); 61 /******/ __webpack_require__.r(ns); 62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64 /******/ return ns; 65 /******/ }; 66 /******/ 67 /******/ // getDefaultExport function for compatibility with non-harmony modules 68 /******/ __webpack_require__.n = function(module) { 69 /******/ var getter = module && module.__esModule ? 70 /******/ function getDefault() { return module['default']; } : 71 /******/ function getModuleExports() { return module; }; 72 /******/ __webpack_require__.d(getter, 'a', getter); 73 /******/ return getter; 74 /******/ }; 75 /******/ 76 /******/ // Object.prototype.hasOwnProperty.call 77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78 /******/ 79 /******/ // __webpack_public_path__ 80 /******/ __webpack_require__.p = ""; 81 /******/ 82 /******/ 83 /******/ // Load entry module and return exports 84 /******/ return __webpack_require__(__webpack_require__.s = 0); 85 /******/ }) 86 /************************************************************************/ 87 /******/ ({ 88 89 /***/ "../node_modules/webpack/buildin/global.js": 90 /***/ (function(module, exports) { 91 92 var g; 93 94 // This works in non-strict mode 95 g = (function() { 96 return this; 97 })(); 98 99 try { 100 // This works if eval is allowed (see CSP) 101 g = g || new Function("return this")(); 102 } catch (e) { 103 // This works if the window reference is available 104 if (typeof window === "object") g = window; 105 } 106 107 // g can still be undefined, but nothing to do about it... 108 // We return undefined, instead of nothing here, so it's 109 // easier to handle this case. if(!global) { ...} 110 111 module.exports = g; 112 113 114 /***/ }), 115 116 /***/ "./scripts/materialize.js": 117 /***/ (function(module, exports, __webpack_require__) { 118 119 /* WEBPACK VAR INJECTION */(function(jQuery, $, global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 120 * Materialize v1.0.0 (http://materializecss.com) 121 * Copyright 2014-2017 Materialize 122 * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE) 123 */ 124 var _get = function get(object, property, receiver) { 125 if (object === null) object = Function.prototype; 126 var desc = Object.getOwnPropertyDescriptor(object, property); 127 128 if (desc === undefined) { 129 var parent = Object.getPrototypeOf(object); 130 131 if (parent === null) { 132 return undefined; 133 } else { 134 return get(parent, property, receiver); 135 } 136 } else if ("value" in desc) { 137 return desc.value; 138 } else { 139 var getter = desc.get; 140 141 if (getter === undefined) { 142 return undefined; 143 } 144 145 return getter.call(receiver); 146 } 147 }; 148 149 var _createClass = function () { 150 function defineProperties(target, props) { 151 for (var i = 0; i < props.length; i++) { 152 var descriptor = props[i]; 153 descriptor.enumerable = descriptor.enumerable || false; 154 descriptor.configurable = true; 155 if ("value" in descriptor) descriptor.writable = true; 156 Object.defineProperty(target, descriptor.key, descriptor); 157 } 158 } 159 160 return function (Constructor, protoProps, staticProps) { 161 if (protoProps) defineProperties(Constructor.prototype, protoProps); 162 if (staticProps) defineProperties(Constructor, staticProps); 163 return Constructor; 164 }; 165 }(); 166 167 function _possibleConstructorReturn(self, call) { 168 if (!self) { 169 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 170 } 171 172 return call && (typeof call === "object" || typeof call === "function") ? call : self; 173 } 174 175 function _inherits(subClass, superClass) { 176 if (typeof superClass !== "function" && superClass !== null) { 177 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 178 } 179 180 subClass.prototype = Object.create(superClass && superClass.prototype, { 181 constructor: { 182 value: subClass, 183 enumerable: false, 184 writable: true, 185 configurable: true 186 } 187 }); 188 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 189 } 190 191 function _classCallCheck(instance, Constructor) { 192 if (!(instance instanceof Constructor)) { 193 throw new TypeError("Cannot call a class as a function"); 194 } 195 } 196 /*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */ 197 198 199 (function (factory) { 200 window.cash = factory(); 201 })(function () { 202 var doc = document, 203 win = window, 204 ArrayProto = Array.prototype, 205 slice = ArrayProto.slice, 206 filter = ArrayProto.filter, 207 push = ArrayProto.push; 208 209 var noop = function () {}, 210 isFunction = function (item) { 211 // @see https://crbug.com/568448 212 return typeof item === typeof noop && item.call; 213 }, 214 isString = function (item) { 215 return typeof item === typeof ""; 216 }; 217 218 var idMatch = /^#[\w-]*$/, 219 classMatch = /^\.[\w-]*$/, 220 htmlMatch = /<.+>/, 221 singlet = /^\w+$/; 222 223 function find(selector, context) { 224 context = context || doc; 225 var elems = classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector); 226 return elems; 227 } 228 229 var frag; 230 231 function parseHTML(str) { 232 if (!frag) { 233 frag = doc.implementation.createHTMLDocument(null); 234 var base = frag.createElement("base"); 235 base.href = doc.location.href; 236 frag.head.appendChild(base); 237 } 238 239 frag.body.innerHTML = str; 240 return frag.body.childNodes; 241 } 242 243 function onReady(fn) { 244 if (doc.readyState !== "loading") { 245 fn(); 246 } else { 247 doc.addEventListener("DOMContentLoaded", fn); 248 } 249 } 250 251 function Init(selector, context) { 252 if (!selector) { 253 return this; 254 } // If already a cash collection, don't do any further processing 255 256 257 if (selector.cash && selector !== win) { 258 return selector; 259 } 260 261 var elems = selector, 262 i = 0, 263 length; 264 265 if (isString(selector)) { 266 elems = idMatch.test(selector) ? // If an ID use the faster getElementById check 267 doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ? // If HTML, parse it into real elements 268 parseHTML(selector) : // else use `find` 269 find(selector, context); // If function, use as shortcut for DOM ready 270 } else if (isFunction(selector)) { 271 onReady(selector); 272 return this; 273 } 274 275 if (!elems) { 276 return this; 277 } // If a single DOM element is passed in or received via ID, return the single element 278 279 280 if (elems.nodeType || elems === win) { 281 this[0] = elems; 282 this.length = 1; 283 } else { 284 // Treat like an array and loop through each item. 285 length = this.length = elems.length; 286 287 for (; i < length; i++) { 288 this[i] = elems[i]; 289 } 290 } 291 292 return this; 293 } 294 295 function cash(selector, context) { 296 return new Init(selector, context); 297 } 298 299 var fn = cash.fn = cash.prototype = Init.prototype = { 300 // jshint ignore:line 301 cash: true, 302 length: 0, 303 push: push, 304 splice: ArrayProto.splice, 305 map: ArrayProto.map, 306 init: Init 307 }; 308 Object.defineProperty(fn, "constructor", { 309 value: cash 310 }); 311 cash.parseHTML = parseHTML; 312 cash.noop = noop; 313 cash.isFunction = isFunction; 314 cash.isString = isString; 315 316 cash.extend = fn.extend = function (target) { 317 target = target || {}; 318 var args = slice.call(arguments), 319 length = args.length, 320 i = 1; 321 322 if (args.length === 1) { 323 target = this; 324 i = 0; 325 } 326 327 for (; i < length; i++) { 328 if (!args[i]) { 329 continue; 330 } 331 332 for (var key in args[i]) { 333 if (args[i].hasOwnProperty(key)) { 334 target[key] = args[i][key]; 335 } 336 } 337 } 338 339 return target; 340 }; 341 342 function each(collection, callback) { 343 var l = collection.length, 344 i = 0; 345 346 for (; i < l; i++) { 347 if (callback.call(collection[i], collection[i], i, collection) === false) { 348 break; 349 } 350 } 351 } 352 353 function matches(el, selector) { 354 var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector); 355 return !!m && m.call(el, selector); 356 } 357 358 function getCompareFunction(selector) { 359 return ( 360 /* Use browser's `matches` function if string */ 361 isString(selector) ? matches : 362 /* Match a cash element */ 363 selector.cash ? function (el) { 364 return selector.is(el); 365 } : 366 /* Direct comparison */ 367 function (el, selector) { 368 return el === selector; 369 } 370 ); 371 } 372 373 function unique(collection) { 374 return cash(slice.call(collection).filter(function (item, index, self) { 375 return self.indexOf(item) === index; 376 })); 377 } 378 379 cash.extend({ 380 merge: function (first, second) { 381 var len = +second.length, 382 i = first.length, 383 j = 0; 384 385 for (; j < len; i++, j++) { 386 first[i] = second[j]; 387 } 388 389 first.length = i; 390 return first; 391 }, 392 each: each, 393 matches: matches, 394 unique: unique, 395 isArray: Array.isArray, 396 isNumeric: function (n) { 397 return !isNaN(parseFloat(n)) && isFinite(n); 398 } 399 }); 400 var uid = cash.uid = "_cash" + Date.now(); 401 402 function getDataCache(node) { 403 return node[uid] = node[uid] || {}; 404 } 405 406 function setData(node, key, value) { 407 return getDataCache(node)[key] = value; 408 } 409 410 function getData(node, key) { 411 var c = getDataCache(node); 412 413 if (c[key] === undefined) { 414 c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key); 415 } 416 417 return c[key]; 418 } 419 420 function removeData(node, key) { 421 var c = getDataCache(node); 422 423 if (c) { 424 delete c[key]; 425 } else if (node.dataset) { 426 delete node.dataset[key]; 427 } else { 428 cash(node).removeAttr("data-" + name); 429 } 430 } 431 432 fn.extend({ 433 data: function (name, value) { 434 if (isString(name)) { 435 return value === undefined ? getData(this[0], name) : this.each(function (v) { 436 return setData(v, name, value); 437 }); 438 } 439 440 for (var key in name) { 441 this.data(key, name[key]); 442 } 443 444 return this; 445 }, 446 removeData: function (key) { 447 return this.each(function (v) { 448 return removeData(v, key); 449 }); 450 } 451 }); 452 var notWhiteMatch = /\S+/g; 453 454 function getClasses(c) { 455 return isString(c) && c.match(notWhiteMatch); 456 } 457 458 function hasClass(v, c) { 459 return v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className); 460 } 461 462 function addClass(v, c, spacedName) { 463 if (v.classList) { 464 v.classList.add(c); 465 } else if (spacedName.indexOf(" " + c + " ")) { 466 v.className += " " + c; 467 } 468 } 469 470 function removeClass(v, c) { 471 if (v.classList) { 472 v.classList.remove(c); 473 } else { 474 v.className = v.className.replace(c, ""); 475 } 476 } 477 478 fn.extend({ 479 addClass: function (c) { 480 var classes = getClasses(c); 481 return classes ? this.each(function (v) { 482 var spacedName = " " + v.className + " "; 483 each(classes, function (c) { 484 addClass(v, c, spacedName); 485 }); 486 }) : this; 487 }, 488 attr: function (name, value) { 489 if (!name) { 490 return undefined; 491 } 492 493 if (isString(name)) { 494 if (value === undefined) { 495 return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined; 496 } 497 498 return this.each(function (v) { 499 if (v.setAttribute) { 500 v.setAttribute(name, value); 501 } else { 502 v[name] = value; 503 } 504 }); 505 } 506 507 for (var key in name) { 508 this.attr(key, name[key]); 509 } 510 511 return this; 512 }, 513 hasClass: function (c) { 514 var check = false, 515 classes = getClasses(c); 516 517 if (classes && classes.length) { 518 this.each(function (v) { 519 check = hasClass(v, classes[0]); 520 return !check; 521 }); 522 } 523 524 return check; 525 }, 526 prop: function (name, value) { 527 if (isString(name)) { 528 return value === undefined ? this[0][name] : this.each(function (v) { 529 v[name] = value; 530 }); 531 } 532 533 for (var key in name) { 534 this.prop(key, name[key]); 535 } 536 537 return this; 538 }, 539 removeAttr: function (name) { 540 return this.each(function (v) { 541 if (v.removeAttribute) { 542 v.removeAttribute(name); 543 } else { 544 delete v[name]; 545 } 546 }); 547 }, 548 removeClass: function (c) { 549 if (!arguments.length) { 550 return this.attr("class", ""); 551 } 552 553 var classes = getClasses(c); 554 return classes ? this.each(function (v) { 555 each(classes, function (c) { 556 removeClass(v, c); 557 }); 558 }) : this; 559 }, 560 removeProp: function (name) { 561 return this.each(function (v) { 562 delete v[name]; 563 }); 564 }, 565 toggleClass: function (c, state) { 566 if (state !== undefined) { 567 return this[state ? "addClass" : "removeClass"](c); 568 } 569 570 var classes = getClasses(c); 571 return classes ? this.each(function (v) { 572 var spacedName = " " + v.className + " "; 573 each(classes, function (c) { 574 if (hasClass(v, c)) { 575 removeClass(v, c); 576 } else { 577 addClass(v, c, spacedName); 578 } 579 }); 580 }) : this; 581 } 582 }); 583 fn.extend({ 584 add: function (selector, context) { 585 return unique(cash.merge(this, cash(selector, context))); 586 }, 587 each: function (callback) { 588 each(this, callback); 589 return this; 590 }, 591 eq: function (index) { 592 return cash(this.get(index)); 593 }, 594 filter: function (selector) { 595 if (!selector) { 596 return this; 597 } 598 599 var comparator = isFunction(selector) ? selector : getCompareFunction(selector); 600 return cash(filter.call(this, function (e) { 601 return comparator(e, selector); 602 })); 603 }, 604 first: function () { 605 return this.eq(0); 606 }, 607 get: function (index) { 608 if (index === undefined) { 609 return slice.call(this); 610 } 611 612 return index < 0 ? this[index + this.length] : this[index]; 613 }, 614 index: function (elem) { 615 var child = elem ? cash(elem)[0] : this[0], 616 collection = elem ? this : cash(child).parent().children(); 617 return slice.call(collection).indexOf(child); 618 }, 619 last: function () { 620 return this.eq(-1); 621 } 622 }); 623 624 var camelCase = function () { 625 var camelRegex = /(?:^\w|[A-Z]|\b\w)/g, 626 whiteSpace = /[\s-_]+/g; 627 return function (str) { 628 return str.replace(camelRegex, function (letter, index) { 629 return letter[index === 0 ? "toLowerCase" : "toUpperCase"](); 630 }).replace(whiteSpace, ""); 631 }; 632 }(); 633 634 var getPrefixedProp = function () { 635 var cache = {}, 636 doc = document, 637 div = doc.createElement("div"), 638 style = div.style; 639 return function (prop) { 640 prop = camelCase(prop); 641 642 if (cache[prop]) { 643 return cache[prop]; 644 } 645 646 var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), 647 prefixes = ["webkit", "moz", "ms", "o"], 648 props = (prop + " " + prefixes.join(ucProp + " ") + ucProp).split(" "); 649 each(props, function (p) { 650 if (p in style) { 651 cache[p] = prop = cache[prop] = p; 652 return false; 653 } 654 }); 655 return cache[prop]; 656 }; 657 }(); 658 659 cash.prefixedProp = getPrefixedProp; 660 cash.camelCase = camelCase; 661 fn.extend({ 662 css: function (prop, value) { 663 if (isString(prop)) { 664 prop = getPrefixedProp(prop); 665 return arguments.length > 1 ? this.each(function (v) { 666 return v.style[prop] = value; 667 }) : win.getComputedStyle(this[0])[prop]; 668 } 669 670 for (var key in prop) { 671 this.css(key, prop[key]); 672 } 673 674 return this; 675 } 676 }); 677 678 function compute(el, prop) { 679 return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0; 680 } 681 682 each(["Width", "Height"], function (v) { 683 var lower = v.toLowerCase(); 684 685 fn[lower] = function () { 686 return this[0].getBoundingClientRect()[lower]; 687 }; 688 689 fn["inner" + v] = function () { 690 return this[0]["client" + v]; 691 }; 692 693 fn["outer" + v] = function (margins) { 694 return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0); 695 }; 696 }); 697 698 function registerEvent(node, eventName, callback) { 699 var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {}); 700 eventCache[eventName] = eventCache[eventName] || []; 701 eventCache[eventName].push(callback); 702 node.addEventListener(eventName, callback); 703 } 704 705 function removeEvent(node, eventName, callback) { 706 var events = getData(node, "_cashEvents"), 707 eventCache = events && events[eventName], 708 index; 709 710 if (!eventCache) { 711 return; 712 } 713 714 if (callback) { 715 node.removeEventListener(eventName, callback); 716 index = eventCache.indexOf(callback); 717 718 if (index >= 0) { 719 eventCache.splice(index, 1); 720 } 721 } else { 722 each(eventCache, function (event) { 723 node.removeEventListener(eventName, event); 724 }); 725 eventCache = []; 726 } 727 } 728 729 fn.extend({ 730 off: function (eventName, callback) { 731 return this.each(function (v) { 732 return removeEvent(v, eventName, callback); 733 }); 734 }, 735 on: function (eventName, delegate, callback, runOnce) { 736 // jshint ignore:line 737 var originalCallback; 738 739 if (!isString(eventName)) { 740 for (var key in eventName) { 741 this.on(key, delegate, eventName[key]); 742 } 743 744 return this; 745 } 746 747 if (isFunction(delegate)) { 748 callback = delegate; 749 delegate = null; 750 } 751 752 if (eventName === "ready") { 753 onReady(callback); 754 return this; 755 } 756 757 if (delegate) { 758 originalCallback = callback; 759 760 callback = function (e) { 761 var t = e.target; 762 763 while (!matches(t, delegate)) { 764 if (t === this || t === null) { 765 return t = false; 766 } 767 768 t = t.parentNode; 769 } 770 771 if (t) { 772 originalCallback.call(t, e); 773 } 774 }; 775 } 776 777 return this.each(function (v) { 778 var finalCallback = callback; 779 780 if (runOnce) { 781 finalCallback = function () { 782 callback.apply(this, arguments); 783 removeEvent(v, eventName, finalCallback); 784 }; 785 } 786 787 registerEvent(v, eventName, finalCallback); 788 }); 789 }, 790 one: function (eventName, delegate, callback) { 791 return this.on(eventName, delegate, callback, true); 792 }, 793 ready: onReady, 794 795 /** 796 * Modified 797 * Triggers browser event 798 * @param String eventName 799 * @param Object data - Add properties to event object 800 */ 801 trigger: function (eventName, data) { 802 if (document.createEvent) { 803 var evt = document.createEvent('HTMLEvents'); 804 evt.initEvent(eventName, true, false); 805 evt = this.extend(evt, data); 806 return this.each(function (v) { 807 return v.dispatchEvent(evt); 808 }); 809 } 810 } 811 }); 812 813 function encode(name, value) { 814 return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+"); 815 } 816 817 function getSelectMultiple_(el) { 818 var values = []; 819 each(el.options, function (o) { 820 if (o.selected) { 821 values.push(o.value); 822 } 823 }); 824 return values.length ? values : null; 825 } 826 827 function getSelectSingle_(el) { 828 var selectedIndex = el.selectedIndex; 829 return selectedIndex >= 0 ? el.options[selectedIndex].value : null; 830 } 831 832 function getValue(el) { 833 var type = el.type; 834 835 if (!type) { 836 return null; 837 } 838 839 switch (type.toLowerCase()) { 840 case "select-one": 841 return getSelectSingle_(el); 842 843 case "select-multiple": 844 return getSelectMultiple_(el); 845 846 case "radio": 847 return el.checked ? el.value : null; 848 849 case "checkbox": 850 return el.checked ? el.value : null; 851 852 default: 853 return el.value ? el.value : null; 854 } 855 } 856 857 fn.extend({ 858 serialize: function () { 859 var query = ""; 860 each(this[0].elements || this, function (el) { 861 if (el.disabled || el.tagName === "FIELDSET") { 862 return; 863 } 864 865 var name = el.name; 866 867 switch (el.type.toLowerCase()) { 868 case "file": 869 case "reset": 870 case "submit": 871 case "button": 872 break; 873 874 case "select-multiple": 875 var values = getValue(el); 876 877 if (values !== null) { 878 each(values, function (value) { 879 query += encode(name, value); 880 }); 881 } 882 883 break; 884 885 default: 886 var value = getValue(el); 887 888 if (value !== null) { 889 query += encode(name, value); 890 } 891 892 } 893 }); 894 return query.substr(1); 895 }, 896 val: function (value) { 897 if (value === undefined) { 898 return getValue(this[0]); 899 } 900 901 return this.each(function (v) { 902 return v.value = value; 903 }); 904 } 905 }); 906 907 function insertElement(el, child, prepend) { 908 if (prepend) { 909 var first = el.childNodes[0]; 910 el.insertBefore(child, first); 911 } else { 912 el.appendChild(child); 913 } 914 } 915 916 function insertContent(parent, child, prepend) { 917 var str = isString(child); 918 919 if (!str && child.length) { 920 each(child, function (v) { 921 return insertContent(parent, v, prepend); 922 }); 923 return; 924 } 925 926 each(parent, str ? function (v) { 927 return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child); 928 } : function (v, i) { 929 return insertElement(v, i === 0 ? child : child.cloneNode(true), prepend); 930 }); 931 } 932 933 fn.extend({ 934 after: function (selector) { 935 cash(selector).insertAfter(this); 936 return this; 937 }, 938 append: function (content) { 939 insertContent(this, content); 940 return this; 941 }, 942 appendTo: function (parent) { 943 insertContent(cash(parent), this); 944 return this; 945 }, 946 before: function (selector) { 947 cash(selector).insertBefore(this); 948 return this; 949 }, 950 clone: function () { 951 return cash(this.map(function (v) { 952 return v.cloneNode(true); 953 })); 954 }, 955 empty: function () { 956 this.html(""); 957 return this; 958 }, 959 html: function (content) { 960 if (content === undefined) { 961 return this[0].innerHTML; 962 } 963 964 var source = content.nodeType ? content[0].outerHTML : content; 965 return this.each(function (v) { 966 return v.innerHTML = source; 967 }); 968 }, 969 insertAfter: function (selector) { 970 var _this = this; 971 972 cash(selector).each(function (el, i) { 973 var parent = el.parentNode, 974 sibling = el.nextSibling; 975 976 _this.each(function (v) { 977 parent.insertBefore(i === 0 ? v : v.cloneNode(true), sibling); 978 }); 979 }); 980 return this; 981 }, 982 insertBefore: function (selector) { 983 var _this2 = this; 984 985 cash(selector).each(function (el, i) { 986 var parent = el.parentNode; 987 988 _this2.each(function (v) { 989 parent.insertBefore(i === 0 ? v : v.cloneNode(true), el); 990 }); 991 }); 992 return this; 993 }, 994 prepend: function (content) { 995 insertContent(this, content, true); 996 return this; 997 }, 998 prependTo: function (parent) { 999 insertContent(cash(parent), this, true); 1000 return this; 1001 }, 1002 remove: function () { 1003 return this.each(function (v) { 1004 if (!!v.parentNode) { 1005 return v.parentNode.removeChild(v); 1006 } 1007 }); 1008 }, 1009 text: function (content) { 1010 if (content === undefined) { 1011 return this[0].textContent; 1012 } 1013 1014 return this.each(function (v) { 1015 return v.textContent = content; 1016 }); 1017 } 1018 }); 1019 var docEl = doc.documentElement; 1020 fn.extend({ 1021 position: function () { 1022 var el = this[0]; 1023 return { 1024 left: el.offsetLeft, 1025 top: el.offsetTop 1026 }; 1027 }, 1028 offset: function () { 1029 var rect = this[0].getBoundingClientRect(); 1030 return { 1031 top: rect.top + win.pageYOffset - docEl.clientTop, 1032 left: rect.left + win.pageXOffset - docEl.clientLeft 1033 }; 1034 }, 1035 offsetParent: function () { 1036 return cash(this[0].offsetParent); 1037 } 1038 }); 1039 fn.extend({ 1040 children: function (selector) { 1041 var elems = []; 1042 this.each(function (el) { 1043 push.apply(elems, el.children); 1044 }); 1045 elems = unique(elems); 1046 return !selector ? elems : elems.filter(function (v) { 1047 return matches(v, selector); 1048 }); 1049 }, 1050 closest: function (selector) { 1051 if (!selector || this.length < 1) { 1052 return cash(); 1053 } 1054 1055 if (this.is(selector)) { 1056 return this.filter(selector); 1057 } 1058 1059 return this.parent().closest(selector); 1060 }, 1061 is: function (selector) { 1062 if (!selector) { 1063 return false; 1064 } 1065 1066 var match = false, 1067 comparator = getCompareFunction(selector); 1068 this.each(function (el) { 1069 match = comparator(el, selector); 1070 return !match; 1071 }); 1072 return match; 1073 }, 1074 find: function (selector) { 1075 if (!selector || selector.nodeType) { 1076 return cash(selector && this.has(selector).length ? selector : null); 1077 } 1078 1079 var elems = []; 1080 this.each(function (el) { 1081 push.apply(elems, find(selector, el)); 1082 }); 1083 return unique(elems); 1084 }, 1085 has: function (selector) { 1086 var comparator = isString(selector) ? function (el) { 1087 return find(selector, el).length !== 0; 1088 } : function (el) { 1089 return el.contains(selector); 1090 }; 1091 return this.filter(comparator); 1092 }, 1093 next: function () { 1094 return cash(this[0].nextElementSibling); 1095 }, 1096 not: function (selector) { 1097 if (!selector) { 1098 return this; 1099 } 1100 1101 var comparator = getCompareFunction(selector); 1102 return this.filter(function (el) { 1103 return !comparator(el, selector); 1104 }); 1105 }, 1106 parent: function () { 1107 var result = []; 1108 this.each(function (item) { 1109 if (item && item.parentNode) { 1110 result.push(item.parentNode); 1111 } 1112 }); 1113 return unique(result); 1114 }, 1115 parents: function (selector) { 1116 var last, 1117 result = []; 1118 this.each(function (item) { 1119 last = item; 1120 1121 while (last && last.parentNode && last !== doc.body.parentNode) { 1122 last = last.parentNode; 1123 1124 if (!selector || selector && matches(last, selector)) { 1125 result.push(last); 1126 } 1127 } 1128 }); 1129 return unique(result); 1130 }, 1131 prev: function () { 1132 return cash(this[0].previousElementSibling); 1133 }, 1134 siblings: function (selector) { 1135 var collection = this.parent().children(selector), 1136 el = this[0]; 1137 return collection.filter(function (i) { 1138 return i !== el; 1139 }); 1140 } 1141 }); 1142 return cash; 1143 }); 1144 1145 ; 1146 1147 var Component = function () { 1148 /** 1149 * Generic constructor for all components 1150 * @constructor 1151 * @param {Element} el 1152 * @param {Object} options 1153 */ 1154 function Component(classDef, el, options) { 1155 _classCallCheck(this, Component); // Display error if el is valid HTML Element 1156 1157 1158 if (!(el instanceof Element)) { 1159 console.error(Error(el + ' is not an HTML Element')); 1160 } // If exists, destroy and reinitialize in child 1161 1162 1163 var ins = classDef.getInstance(el); 1164 1165 if (!!ins) { 1166 ins.destroy(); 1167 } 1168 1169 this.el = el; 1170 this.$el = cash(el); 1171 } 1172 /** 1173 * Initializes components 1174 * @param {class} classDef 1175 * @param {Element | NodeList | jQuery} els 1176 * @param {Object} options 1177 */ 1178 1179 1180 _createClass(Component, null, [{ 1181 key: "init", 1182 value: function init(classDef, els, options) { 1183 var instances = null; 1184 1185 if (els instanceof Element) { 1186 instances = new classDef(els, options); 1187 } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) { 1188 var instancesArr = []; 1189 1190 for (var i = 0; i < els.length; i++) { 1191 instancesArr.push(new classDef(els[i], options)); 1192 } 1193 1194 instances = instancesArr; 1195 } 1196 1197 return instances; 1198 } 1199 }]); 1200 1201 return Component; 1202 }(); 1203 1204 ; // Required for Meteor package, the use of window prevents export by Meteor 1205 1206 (function (window) { 1207 if (window.Package) { 1208 M = {}; 1209 } else { 1210 window.M = {}; 1211 } // Check for jQuery 1212 1213 1214 M.jQueryLoaded = !!window.jQuery; 1215 })(window); // AMD 1216 1217 1218 if (true) { 1219 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { 1220 return M; 1221 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 1222 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // Common JS 1223 } else {} 1224 1225 M.version = '1.0.0'; 1226 M.keys = { 1227 TAB: 9, 1228 ENTER: 13, 1229 ESC: 27, 1230 ARROW_UP: 38, 1231 ARROW_DOWN: 40 1232 }; 1233 /** 1234 * TabPress Keydown handler 1235 */ 1236 1237 M.tabPressed = false; 1238 M.keyDown = false; 1239 1240 var docHandleKeydown = function (e) { 1241 M.keyDown = true; 1242 1243 if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { 1244 M.tabPressed = true; 1245 } 1246 }; 1247 1248 var docHandleKeyup = function (e) { 1249 M.keyDown = false; 1250 1251 if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { 1252 M.tabPressed = false; 1253 } 1254 }; 1255 1256 var docHandleFocus = function (e) { 1257 if (M.keyDown) { 1258 document.body.classList.add('keyboard-focused'); 1259 } 1260 }; 1261 1262 var docHandleBlur = function (e) { 1263 document.body.classList.remove('keyboard-focused'); 1264 }; 1265 1266 document.addEventListener('keydown', docHandleKeydown, true); 1267 document.addEventListener('keyup', docHandleKeyup, true); 1268 document.addEventListener('focus', docHandleFocus, true); 1269 document.addEventListener('blur', docHandleBlur, true); 1270 /** 1271 * Initialize jQuery wrapper for plugin 1272 * @param {Class} plugin javascript class 1273 * @param {string} pluginName jQuery plugin name 1274 * @param {string} classRef Class reference name 1275 */ 1276 1277 M.initializeJqueryWrapper = function (plugin, pluginName, classRef) { 1278 jQuery.fn[pluginName] = function (methodOrOptions) { 1279 // Call plugin method if valid method name is passed in 1280 if (plugin.prototype[methodOrOptions]) { 1281 var params = Array.prototype.slice.call(arguments, 1); // Getter methods 1282 1283 if (methodOrOptions.slice(0, 3) === 'get') { 1284 var instance = this.first()[0][classRef]; 1285 return instance[methodOrOptions].apply(instance, params); 1286 } // Void methods 1287 1288 1289 return this.each(function () { 1290 var instance = this[classRef]; 1291 instance[methodOrOptions].apply(instance, params); 1292 }); // Initialize plugin if options or no argument is passed in 1293 } else if (typeof methodOrOptions === 'object' || !methodOrOptions) { 1294 plugin.init(this, arguments[0]); 1295 return this; 1296 } // Return error if an unrecognized method name is passed in 1297 1298 1299 jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName); 1300 }; 1301 }; 1302 /** 1303 * Automatically initialize components 1304 * @param {Element} context DOM Element to search within for components 1305 */ 1306 1307 1308 M.AutoInit = function (context) { 1309 // Use document.body if no context is given 1310 var root = !!context ? context : document.body; 1311 var registry = { 1312 Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'), 1313 Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'), 1314 Chips: root.querySelectorAll('.chips:not(.no-autoinit)'), 1315 Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'), 1316 Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'), 1317 Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), 1318 Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'), 1319 Modal: root.querySelectorAll('.modal:not(.no-autoinit)'), 1320 Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'), 1321 Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'), 1322 ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'), 1323 FormSelect: root.querySelectorAll('select:not(.no-autoinit)'), 1324 Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'), 1325 //Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'), 1326 TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'), 1327 Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'), 1328 Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'), 1329 FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)') 1330 }; 1331 1332 for (var pluginName in registry) { 1333 var plugin = M[pluginName]; 1334 plugin.init(registry[pluginName]); 1335 } 1336 }; 1337 /** 1338 * Generate approximated selector string for a jQuery object 1339 * @param {jQuery} obj jQuery object to be parsed 1340 * @returns {string} 1341 */ 1342 1343 1344 M.objectSelectorString = function (obj) { 1345 var tagStr = obj.prop('tagName') || ''; 1346 var idStr = obj.attr('id') || ''; 1347 var classStr = obj.attr('class') || ''; 1348 return (tagStr + idStr + classStr).replace(/\s/g, ''); 1349 }; // Unique Random ID 1350 1351 1352 M.guid = function () { 1353 function s4() { 1354 return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); 1355 } 1356 1357 return function () { 1358 return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); 1359 }; 1360 }(); 1361 /** 1362 * Escapes hash from special characters 1363 * @param {string} hash String returned from this.hash 1364 * @returns {string} 1365 */ 1366 1367 1368 M.escapeHash = function (hash) { 1369 return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1'); 1370 }; 1371 1372 M.elementOrParentIsFixed = function (element) { 1373 var $element = $(element); 1374 var $checkElements = $element.add($element.parents()); 1375 var isFixed = false; 1376 $checkElements.each(function () { 1377 if ($(this).css('position') === 'fixed') { 1378 isFixed = true; 1379 return false; 1380 } 1381 }); 1382 return isFixed; 1383 }; 1384 /** 1385 * @typedef {Object} Edges 1386 * @property {Boolean} top If the top edge was exceeded 1387 * @property {Boolean} right If the right edge was exceeded 1388 * @property {Boolean} bottom If the bottom edge was exceeded 1389 * @property {Boolean} left If the left edge was exceeded 1390 */ 1391 1392 /** 1393 * @typedef {Object} Bounding 1394 * @property {Number} left left offset coordinate 1395 * @property {Number} top top offset coordinate 1396 * @property {Number} width 1397 * @property {Number} height 1398 */ 1399 1400 /** 1401 * Escapes hash from special characters 1402 * @param {Element} container Container element that acts as the boundary 1403 * @param {Bounding} bounding element bounding that is being checked 1404 * @param {Number} offset offset from edge that counts as exceeding 1405 * @returns {Edges} 1406 */ 1407 1408 1409 M.checkWithinContainer = function (container, bounding, offset) { 1410 var edges = { 1411 top: false, 1412 right: false, 1413 bottom: false, 1414 left: false 1415 }; 1416 var containerRect = container.getBoundingClientRect(); // If body element is smaller than viewport, use viewport height instead. 1417 1418 var containerBottom = container === document.body ? Math.max(containerRect.bottom, window.innerHeight) : containerRect.bottom; 1419 var scrollLeft = container.scrollLeft; 1420 var scrollTop = container.scrollTop; 1421 var scrolledX = bounding.left - scrollLeft; 1422 var scrolledY = bounding.top - scrollTop; // Check for container and viewport for each edge 1423 1424 if (scrolledX < containerRect.left + offset || scrolledX < offset) { 1425 edges.left = true; 1426 } 1427 1428 if (scrolledX + bounding.width > containerRect.right - offset || scrolledX + bounding.width > window.innerWidth - offset) { 1429 edges.right = true; 1430 } 1431 1432 if (scrolledY < containerRect.top + offset || scrolledY < offset) { 1433 edges.top = true; 1434 } 1435 1436 if (scrolledY + bounding.height > containerBottom - offset || scrolledY + bounding.height > window.innerHeight - offset) { 1437 edges.bottom = true; 1438 } 1439 1440 return edges; 1441 }; 1442 1443 M.checkPossibleAlignments = function (el, container, bounding, offset) { 1444 var canAlign = { 1445 top: true, 1446 right: true, 1447 bottom: true, 1448 left: true, 1449 spaceOnTop: null, 1450 spaceOnRight: null, 1451 spaceOnBottom: null, 1452 spaceOnLeft: null 1453 }; 1454 var containerAllowsOverflow = getComputedStyle(container).overflow === 'visible'; 1455 var containerRect = container.getBoundingClientRect(); 1456 var containerHeight = Math.min(containerRect.height, window.innerHeight); 1457 var containerWidth = Math.min(containerRect.width, window.innerWidth); 1458 var elOffsetRect = el.getBoundingClientRect(); 1459 var scrollLeft = container.scrollLeft; 1460 var scrollTop = container.scrollTop; 1461 var scrolledX = bounding.left - scrollLeft; 1462 var scrolledYTopEdge = bounding.top - scrollTop; 1463 var scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop; // Check for container and viewport for left 1464 1465 canAlign.spaceOnRight = !containerAllowsOverflow ? containerWidth - (scrolledX + bounding.width) : window.innerWidth - (elOffsetRect.left + bounding.width); 1466 1467 if (canAlign.spaceOnRight < 0) { 1468 canAlign.left = false; 1469 } // Check for container and viewport for Right 1470 1471 1472 canAlign.spaceOnLeft = !containerAllowsOverflow ? scrolledX - bounding.width + elOffsetRect.width : elOffsetRect.right - bounding.width; 1473 1474 if (canAlign.spaceOnLeft < 0) { 1475 canAlign.right = false; 1476 } // Check for container and viewport for Top 1477 1478 1479 canAlign.spaceOnBottom = !containerAllowsOverflow ? containerHeight - (scrolledYTopEdge + bounding.height + offset) : window.innerHeight - (elOffsetRect.top + bounding.height + offset); 1480 1481 if (canAlign.spaceOnBottom < 0) { 1482 canAlign.top = false; 1483 } // Check for container and viewport for Bottom 1484 1485 1486 canAlign.spaceOnTop = !containerAllowsOverflow ? scrolledYBottomEdge - (bounding.height - offset) : elOffsetRect.bottom - (bounding.height + offset); 1487 1488 if (canAlign.spaceOnTop < 0) { 1489 canAlign.bottom = false; 1490 } 1491 1492 return canAlign; 1493 }; 1494 1495 M.getOverflowParent = function (element) { 1496 if (element == null) { 1497 return null; 1498 } 1499 1500 if (element === document.body || getComputedStyle(element).overflow !== 'visible') { 1501 return element; 1502 } 1503 1504 return M.getOverflowParent(element.parentElement); 1505 }; 1506 /** 1507 * Gets id of component from a trigger 1508 * @param {Element} trigger trigger 1509 * @returns {string} 1510 */ 1511 1512 1513 M.getIdFromTrigger = function (trigger) { 1514 var id = trigger.getAttribute('data-target'); 1515 1516 if (!id) { 1517 id = trigger.getAttribute('href'); 1518 1519 if (id) { 1520 id = id.slice(1); 1521 } else { 1522 id = ''; 1523 } 1524 } 1525 1526 return id; 1527 }; 1528 /** 1529 * Multi browser support for document scroll top 1530 * @returns {Number} 1531 */ 1532 1533 1534 M.getDocumentScrollTop = function () { 1535 return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; 1536 }; 1537 /** 1538 * Multi browser support for document scroll left 1539 * @returns {Number} 1540 */ 1541 1542 1543 M.getDocumentScrollLeft = function () { 1544 return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; 1545 }; 1546 /** 1547 * @typedef {Object} Edges 1548 * @property {Boolean} top If the top edge was exceeded 1549 * @property {Boolean} right If the right edge was exceeded 1550 * @property {Boolean} bottom If the bottom edge was exceeded 1551 * @property {Boolean} left If the left edge was exceeded 1552 */ 1553 1554 /** 1555 * @typedef {Object} Bounding 1556 * @property {Number} left left offset coordinate 1557 * @property {Number} top top offset coordinate 1558 * @property {Number} width 1559 * @property {Number} height 1560 */ 1561 1562 /** 1563 * Get time in ms 1564 * @license https://raw.github.com/jashkenas/underscore/master/LICENSE 1565 * @type {function} 1566 * @return {number} 1567 */ 1568 1569 1570 var getTime = Date.now || function () { 1571 return new Date().getTime(); 1572 }; 1573 /** 1574 * Returns a function, that, when invoked, will only be triggered at most once 1575 * during a given window of time. Normally, the throttled function will run 1576 * as much as it can, without ever going more than once per `wait` duration; 1577 * but if you'd like to disable the execution on the leading edge, pass 1578 * `{leading: false}`. To disable execution on the trailing edge, ditto. 1579 * @license https://raw.github.com/jashkenas/underscore/master/LICENSE 1580 * @param {function} func 1581 * @param {number} wait 1582 * @param {Object=} options 1583 * @returns {Function} 1584 */ 1585 1586 1587 M.throttle = function (func, wait, options) { 1588 var context = void 0, 1589 args = void 0, 1590 result = void 0; 1591 var timeout = null; 1592 var previous = 0; 1593 options || (options = {}); 1594 1595 var later = function () { 1596 previous = options.leading === false ? 0 : getTime(); 1597 timeout = null; 1598 result = func.apply(context, args); 1599 context = args = null; 1600 }; 1601 1602 return function () { 1603 var now = getTime(); 1604 if (!previous && options.leading === false) previous = now; 1605 var remaining = wait - (now - previous); 1606 context = this; 1607 args = arguments; 1608 1609 if (remaining <= 0) { 1610 clearTimeout(timeout); 1611 timeout = null; 1612 previous = now; 1613 result = func.apply(context, args); 1614 context = args = null; 1615 } else if (!timeout && options.trailing !== false) { 1616 timeout = setTimeout(later, remaining); 1617 } 1618 1619 return result; 1620 }; 1621 }; 1622 1623 ; 1624 /* 1625 v2.2.0 1626 2017 Julian Garnier 1627 Released under the MIT license 1628 */ 1629 1630 var $jscomp = { 1631 scope: {} 1632 }; 1633 $jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) { 1634 if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters."); 1635 e != Array.prototype && e != Object.prototype && (e[r] = p.value); 1636 }; 1637 1638 $jscomp.getGlobal = function (e) { 1639 return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e; 1640 }; 1641 1642 $jscomp.global = $jscomp.getGlobal(this); 1643 $jscomp.SYMBOL_PREFIX = "jscomp_symbol_"; 1644 1645 $jscomp.initSymbol = function () { 1646 $jscomp.initSymbol = function () {}; 1647 1648 $jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol); 1649 }; 1650 1651 $jscomp.symbolCounter_ = 0; 1652 1653 $jscomp.Symbol = function (e) { 1654 return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++; 1655 }; 1656 1657 $jscomp.initSymbolIterator = function () { 1658 $jscomp.initSymbol(); 1659 var e = $jscomp.global.Symbol.iterator; 1660 e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator")); 1661 "function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { 1662 configurable: !0, 1663 writable: !0, 1664 value: function () { 1665 return $jscomp.arrayIterator(this); 1666 } 1667 }); 1668 1669 $jscomp.initSymbolIterator = function () {}; 1670 }; 1671 1672 $jscomp.arrayIterator = function (e) { 1673 var r = 0; 1674 return $jscomp.iteratorPrototype(function () { 1675 return r < e.length ? { 1676 done: !1, 1677 value: e[r++] 1678 } : { 1679 done: !0 1680 }; 1681 }); 1682 }; 1683 1684 $jscomp.iteratorPrototype = function (e) { 1685 $jscomp.initSymbolIterator(); 1686 e = { 1687 next: e 1688 }; 1689 1690 e[$jscomp.global.Symbol.iterator] = function () { 1691 return this; 1692 }; 1693 1694 return e; 1695 }; 1696 1697 $jscomp.array = $jscomp.array || {}; 1698 1699 $jscomp.iteratorFromArray = function (e, r) { 1700 $jscomp.initSymbolIterator(); 1701 e instanceof String && (e += ""); 1702 var p = 0, 1703 m = { 1704 next: function () { 1705 if (p < e.length) { 1706 var u = p++; 1707 return { 1708 value: r(u, e[u]), 1709 done: !1 1710 }; 1711 } 1712 1713 m.next = function () { 1714 return { 1715 done: !0, 1716 value: void 0 1717 }; 1718 }; 1719 1720 return m.next(); 1721 } 1722 }; 1723 1724 m[Symbol.iterator] = function () { 1725 return m; 1726 }; 1727 1728 return m; 1729 }; 1730 1731 $jscomp.polyfill = function (e, r, p, m) { 1732 if (r) { 1733 p = $jscomp.global; 1734 e = e.split("."); 1735 1736 for (m = 0; m < e.length - 1; m++) { 1737 var u = e[m]; 1738 u in p || (p[u] = {}); 1739 p = p[u]; 1740 } 1741 1742 e = e[e.length - 1]; 1743 m = p[e]; 1744 r = r(m); 1745 r != m && null != r && $jscomp.defineProperty(p, e, { 1746 configurable: !0, 1747 writable: !0, 1748 value: r 1749 }); 1750 } 1751 }; 1752 1753 $jscomp.polyfill("Array.prototype.keys", function (e) { 1754 return e ? e : function () { 1755 return $jscomp.iteratorFromArray(this, function (e) { 1756 return e; 1757 }); 1758 }; 1759 }, "es6-impl", "es3"); 1760 var $jscomp$this = this; 1761 1762 (function (r) { 1763 M.anime = r(); 1764 })(function () { 1765 function e(a) { 1766 if (!h.col(a)) try { 1767 return document.querySelectorAll(a); 1768 } catch (c) {} 1769 } 1770 1771 function r(a, c) { 1772 for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) { 1773 if (n in a) { 1774 var k = a[n]; 1775 c.call(b, k, n, a) && f.push(k); 1776 } 1777 } 1778 1779 return f; 1780 } 1781 1782 function p(a) { 1783 return a.reduce(function (a, d) { 1784 return a.concat(h.arr(d) ? p(d) : d); 1785 }, []); 1786 } 1787 1788 function m(a) { 1789 if (h.arr(a)) return a; 1790 h.str(a) && (a = e(a) || a); 1791 return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a]; 1792 } 1793 1794 function u(a, c) { 1795 return a.some(function (a) { 1796 return a === c; 1797 }); 1798 } 1799 1800 function C(a) { 1801 var c = {}, 1802 d; 1803 1804 for (d in a) { 1805 c[d] = a[d]; 1806 } 1807 1808 return c; 1809 } 1810 1811 function D(a, c) { 1812 var d = C(a), 1813 b; 1814 1815 for (b in a) { 1816 d[b] = c.hasOwnProperty(b) ? c[b] : a[b]; 1817 } 1818 1819 return d; 1820 } 1821 1822 function z(a, c) { 1823 var d = C(a), 1824 b; 1825 1826 for (b in c) { 1827 d[b] = h.und(a[b]) ? c[b] : a[b]; 1828 } 1829 1830 return d; 1831 } 1832 1833 function T(a) { 1834 a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) { 1835 return c + c + d + d + k + k; 1836 }); 1837 var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a); 1838 a = parseInt(c[1], 16); 1839 var d = parseInt(c[2], 16), 1840 c = parseInt(c[3], 16); 1841 return "rgba(" + a + "," + d + "," + c + ",1)"; 1842 } 1843 1844 function U(a) { 1845 function c(a, c, b) { 1846 0 > b && (b += 1); 1847 1 < b && --b; 1848 return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a; 1849 } 1850 1851 var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a); 1852 a = parseInt(d[1]) / 360; 1853 var b = parseInt(d[2]) / 100, 1854 f = parseInt(d[3]) / 100, 1855 d = d[4] || 1; 1856 if (0 == b) f = b = a = f;else { 1857 var n = .5 > f ? f * (1 + b) : f + b - f * b, 1858 k = 2 * f - n, 1859 f = c(k, n, a + 1 / 3), 1860 b = c(k, n, a); 1861 a = c(k, n, a - 1 / 3); 1862 } 1863 return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")"; 1864 } 1865 1866 function y(a) { 1867 if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2]; 1868 } 1869 1870 function V(a) { 1871 if (-1 < a.indexOf("translate") || "perspective" === a) return "px"; 1872 if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg"; 1873 } 1874 1875 function I(a, c) { 1876 return h.fnc(a) ? a(c.target, c.id, c.total) : a; 1877 } 1878 1879 function E(a, c) { 1880 if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0"; 1881 } 1882 1883 function J(a, c) { 1884 if (h.dom(a) && u(W, c)) return "transform"; 1885 if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute"; 1886 if (h.dom(a) && "transform" !== c && E(a, c)) return "css"; 1887 if (null != a[c]) return "object"; 1888 } 1889 1890 function X(a, c) { 1891 var d = V(c), 1892 d = -1 < c.indexOf("scale") ? 1 : 0 + d; 1893 a = a.style.transform; 1894 if (!a) return d; 1895 1896 for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) { 1897 f.push(b[1]), n.push(b[2]); 1898 } 1899 1900 a = r(n, function (a, b) { 1901 return f[b] === c; 1902 }); 1903 return a.length ? a[0] : d; 1904 } 1905 1906 function K(a, c) { 1907 switch (J(a, c)) { 1908 case "transform": 1909 return X(a, c); 1910 1911 case "css": 1912 return E(a, c); 1913 1914 case "attribute": 1915 return a.getAttribute(c); 1916 } 1917 1918 return a[c] || 0; 1919 } 1920 1921 function L(a, c) { 1922 var d = /^(\*=|\+=|-=)/.exec(a); 1923 if (!d) return a; 1924 var b = y(a) || 0; 1925 c = parseFloat(c); 1926 a = parseFloat(a.replace(d[0], "")); 1927 1928 switch (d[0][0]) { 1929 case "+": 1930 return c + a + b; 1931 1932 case "-": 1933 return c - a + b; 1934 1935 case "*": 1936 return c * a + b; 1937 } 1938 } 1939 1940 function F(a, c) { 1941 return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2)); 1942 } 1943 1944 function M(a) { 1945 a = a.points; 1946 1947 for (var c = 0, d, b = 0; b < a.numberOfItems; b++) { 1948 var f = a.getItem(b); 1949 0 < b && (c += F(d, f)); 1950 d = f; 1951 } 1952 1953 return c; 1954 } 1955 1956 function N(a) { 1957 if (a.getTotalLength) return a.getTotalLength(); 1958 1959 switch (a.tagName.toLowerCase()) { 1960 case "circle": 1961 return 2 * Math.PI * a.getAttribute("r"); 1962 1963 case "rect": 1964 return 2 * a.getAttribute("width") + 2 * a.getAttribute("height"); 1965 1966 case "line": 1967 return F({ 1968 x: a.getAttribute("x1"), 1969 y: a.getAttribute("y1") 1970 }, { 1971 x: a.getAttribute("x2"), 1972 y: a.getAttribute("y2") 1973 }); 1974 1975 case "polyline": 1976 return M(a); 1977 1978 case "polygon": 1979 var c = a.points; 1980 return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0)); 1981 } 1982 } 1983 1984 function Y(a, c) { 1985 function d(b) { 1986 b = void 0 === b ? 0 : b; 1987 return a.el.getPointAtLength(1 <= c + b ? c + b : 0); 1988 } 1989 1990 var b = d(), 1991 f = d(-1), 1992 n = d(1); 1993 1994 switch (a.property) { 1995 case "x": 1996 return b.x; 1997 1998 case "y": 1999 return b.y; 2000 2001 case "angle": 2002 return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI; 2003 } 2004 } 2005 2006 function O(a, c) { 2007 var d = /-?\d*\.?\d+/g, 2008 b; 2009 b = h.pth(a) ? a.totalLength : a; 2010 2011 if (h.col(b)) { 2012 if (h.rgb(b)) { 2013 var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b); 2014 b = f ? "rgba(" + f[1] + ",1)" : b; 2015 } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0; 2016 } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f; 2017 2018 b += ""; 2019 return { 2020 original: b, 2021 numbers: b.match(d) ? b.match(d).map(Number) : [0], 2022 strings: h.str(a) || c ? b.split(d) : [] 2023 }; 2024 } 2025 2026 function P(a) { 2027 a = a ? p(h.arr(a) ? a.map(m) : m(a)) : []; 2028 return r(a, function (a, d, b) { 2029 return b.indexOf(a) === d; 2030 }); 2031 } 2032 2033 function Z(a) { 2034 var c = P(a); 2035 return c.map(function (a, b) { 2036 return { 2037 target: a, 2038 id: b, 2039 total: c.length 2040 }; 2041 }); 2042 } 2043 2044 function aa(a, c) { 2045 var d = C(c); 2046 2047 if (h.arr(a)) { 2048 var b = a.length; 2049 2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { 2050 value: a 2051 }; 2052 } 2053 2054 return m(a).map(function (a, b) { 2055 b = b ? 0 : c.delay; 2056 a = h.obj(a) && !h.pth(a) ? a : { 2057 value: a 2058 }; 2059 h.und(a.delay) && (a.delay = b); 2060 return a; 2061 }).map(function (a) { 2062 return z(a, d); 2063 }); 2064 } 2065 2066 function ba(a, c) { 2067 var d = {}, 2068 b; 2069 2070 for (b in a) { 2071 var f = I(a[b], c); 2072 h.arr(f) && (f = f.map(function (a) { 2073 return I(a, c); 2074 }), 1 === f.length && (f = f[0])); 2075 d[b] = f; 2076 } 2077 2078 d.duration = parseFloat(d.duration); 2079 d.delay = parseFloat(d.delay); 2080 return d; 2081 } 2082 2083 function ca(a) { 2084 return h.arr(a) ? A.apply(this, a) : Q[a]; 2085 } 2086 2087 function da(a, c) { 2088 var d; 2089 return a.tweens.map(function (b) { 2090 b = ba(b, c); 2091 var f = b.value, 2092 e = K(c.target, a.name), 2093 k = d ? d.to.original : e, 2094 k = h.arr(f) ? f[0] : k, 2095 w = L(h.arr(f) ? f[1] : f, k), 2096 e = y(w) || y(k) || y(e); 2097 b.from = O(k, e); 2098 b.to = O(w, e); 2099 b.start = d ? d.end : a.offset; 2100 b.end = b.start + b.delay + b.duration; 2101 b.easing = ca(b.easing); 2102 b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3; 2103 b.isPath = h.pth(f); 2104 b.isColor = h.col(b.from.original); 2105 b.isColor && (b.round = 1); 2106 return d = b; 2107 }); 2108 } 2109 2110 function ea(a, c) { 2111 return r(p(a.map(function (a) { 2112 return c.map(function (b) { 2113 var c = J(a.target, b.name); 2114 2115 if (c) { 2116 var d = da(b, a); 2117 b = { 2118 type: c, 2119 property: b.name, 2120 animatable: a, 2121 tweens: d, 2122 duration: d[d.length - 1].end, 2123 delay: d[0].delay 2124 }; 2125 } else b = void 0; 2126 2127 return b; 2128 }); 2129 })), function (a) { 2130 return !h.und(a); 2131 }); 2132 } 2133 2134 function R(a, c, d, b) { 2135 var f = "delay" === a; 2136 return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) { 2137 return b[a]; 2138 })) : f ? b.delay : d.offset + b.delay + b.duration; 2139 } 2140 2141 function fa(a) { 2142 var c = D(ga, a), 2143 d = D(S, a), 2144 b = Z(a.targets), 2145 f = [], 2146 e = z(c, d), 2147 k; 2148 2149 for (k in a) { 2150 e.hasOwnProperty(k) || "targets" === k || f.push({ 2151 name: k, 2152 offset: e.offset, 2153 tweens: aa(a[k], d) 2154 }); 2155 } 2156 2157 a = ea(b, f); 2158 return z(c, { 2159 children: [], 2160 animatables: b, 2161 animations: a, 2162 duration: R("duration", a, c, d), 2163 delay: R("delay", a, c, d) 2164 }); 2165 } 2166 2167 function q(a) { 2168 function c() { 2169 return window.Promise && new Promise(function (a) { 2170 return p = a; 2171 }); 2172 } 2173 2174 function d(a) { 2175 return g.reversed ? g.duration - a : a; 2176 } 2177 2178 function b(a) { 2179 for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) { 2180 var e = d[b], 2181 k = e.animatable, 2182 h = e.tweens, 2183 n = h.length - 1, 2184 l = h[n]; 2185 n && (l = r(h, function (b) { 2186 return a < b.end; 2187 })[0] || l); 2188 2189 for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) { 2190 var x = void 0, 2191 x = l.to.numbers[t], 2192 q = l.from.numbers[t], 2193 x = l.isPath ? Y(l.value, w * x) : q + w * (x - q); 2194 p && (l.isColor && 2 < t || (x = Math.round(x * p) / p)); 2195 n.push(x); 2196 } 2197 2198 if (l = h.length) for (m = h[0], w = 0; w < l; w++) { 2199 p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " ")); 2200 } else m = n[0]; 2201 ha[e.type](k.target, e.property, m, c, k.id); 2202 e.currentValue = m; 2203 b++; 2204 } 2205 2206 if (b = Object.keys(c).length) for (d = 0; d < b; d++) { 2207 H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" "); 2208 } 2209 g.currentTime = a; 2210 g.progress = a / g.duration * 100; 2211 } 2212 2213 function f(a) { 2214 if (g[a]) g[a](g); 2215 } 2216 2217 function e() { 2218 g.remaining && !0 !== g.remaining && g.remaining--; 2219 } 2220 2221 function k(a) { 2222 var k = g.duration, 2223 n = g.offset, 2224 w = n + g.delay, 2225 r = g.currentTime, 2226 x = g.reversed, 2227 q = d(a); 2228 2229 if (g.children.length) { 2230 var u = g.children, 2231 v = u.length; 2232 if (q >= g.currentTime) for (var G = 0; G < v; G++) { 2233 u[G].seek(q); 2234 } else for (; v--;) { 2235 u[v].seek(q); 2236 } 2237 } 2238 2239 if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run"); 2240 if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e(); 2241 f("update"); 2242 a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0); 2243 } 2244 2245 a = void 0 === a ? {} : a; 2246 var h, 2247 t, 2248 l = 0, 2249 p = null, 2250 m = c(), 2251 g = fa(a); 2252 2253 g.reset = function () { 2254 var a = g.direction, 2255 c = g.loop; 2256 g.currentTime = 0; 2257 g.progress = 0; 2258 g.paused = !0; 2259 g.began = !1; 2260 g.completed = !1; 2261 g.reversed = "reverse" === a; 2262 g.remaining = "alternate" === a && 1 === c ? 2 : c; 2263 b(0); 2264 2265 for (a = g.children.length; a--;) { 2266 g.children[a].reset(); 2267 } 2268 }; 2269 2270 g.tick = function (a) { 2271 h = a; 2272 t || (t = h); 2273 k((l + h - t) * q.speed); 2274 }; 2275 2276 g.seek = function (a) { 2277 k(d(a)); 2278 }; 2279 2280 g.pause = function () { 2281 var a = v.indexOf(g); 2282 -1 < a && v.splice(a, 1); 2283 g.paused = !0; 2284 }; 2285 2286 g.play = function () { 2287 g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia()); 2288 }; 2289 2290 g.reverse = function () { 2291 g.reversed = !g.reversed; 2292 t = 0; 2293 l = d(g.currentTime); 2294 }; 2295 2296 g.restart = function () { 2297 g.pause(); 2298 g.reset(); 2299 g.play(); 2300 }; 2301 2302 g.finished = m; 2303 g.reset(); 2304 g.autoplay && g.play(); 2305 return g; 2306 } 2307 2308 var ga = { 2309 update: void 0, 2310 begin: void 0, 2311 run: void 0, 2312 complete: void 0, 2313 loop: 1, 2314 direction: "normal", 2315 autoplay: !0, 2316 offset: 0 2317 }, 2318 S = { 2319 duration: 1E3, 2320 delay: 0, 2321 easing: "easeOutElastic", 2322 elasticity: 500, 2323 round: 0 2324 }, 2325 W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), 2326 H, 2327 h = { 2328 arr: function (a) { 2329 return Array.isArray(a); 2330 }, 2331 obj: function (a) { 2332 return -1 < Object.prototype.toString.call(a).indexOf("Object"); 2333 }, 2334 pth: function (a) { 2335 return h.obj(a) && a.hasOwnProperty("totalLength"); 2336 }, 2337 svg: function (a) { 2338 return a instanceof SVGElement; 2339 }, 2340 dom: function (a) { 2341 return a.nodeType || h.svg(a); 2342 }, 2343 str: function (a) { 2344 return "string" === typeof a; 2345 }, 2346 fnc: function (a) { 2347 return "function" === typeof a; 2348 }, 2349 und: function (a) { 2350 return "undefined" === typeof a; 2351 }, 2352 hex: function (a) { 2353 return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); 2354 }, 2355 rgb: function (a) { 2356 return /^rgb/.test(a); 2357 }, 2358 hsl: function (a) { 2359 return /^hsl/.test(a); 2360 }, 2361 col: function (a) { 2362 return h.hex(a) || h.rgb(a) || h.hsl(a); 2363 } 2364 }, 2365 A = function () { 2366 function a(a, d, b) { 2367 return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a; 2368 } 2369 2370 return function (c, d, b, f) { 2371 if (0 <= c && 1 >= c && 0 <= b && 1 >= b) { 2372 var e = new Float32Array(11); 2373 if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) { 2374 e[k] = a(.1 * k, c, b); 2375 } 2376 return function (k) { 2377 if (c === d && b === f) return k; 2378 if (0 === k) return 0; 2379 if (1 === k) return 1; 2380 2381 for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) { 2382 h += .1; 2383 } 2384 2385 --l; 2386 var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1, 2387 n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c; 2388 2389 if (.001 <= n) { 2390 for (h = 0; 4 > h; ++h) { 2391 n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c; 2392 if (0 === n) break; 2393 var m = a(l, c, b) - k, 2394 l = l - m / n; 2395 } 2396 2397 k = l; 2398 } else if (0 === n) k = l;else { 2399 var l = h, 2400 h = h + .1, 2401 g = 0; 2402 2403 do { 2404 m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m; 2405 } while (1e-7 < Math.abs(n) && 10 > ++g); 2406 2407 k = m; 2408 } 2409 2410 return a(k, d, f); 2411 }; 2412 } 2413 }; 2414 }(), 2415 Q = function () { 2416 function a(a, b) { 2417 return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b); 2418 } 2419 2420 var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "), 2421 d = { 2422 In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], 2423 Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) { 2424 return 1 - a(1 - b, c); 2425 }], 2426 InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) { 2427 return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2; 2428 }] 2429 }, 2430 b = { 2431 linear: A(.25, .25, .75, .75) 2432 }, 2433 f = {}, 2434 e; 2435 2436 for (e in d) { 2437 f.type = e, d[f.type].forEach(function (a) { 2438 return function (d, f) { 2439 b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d); 2440 }; 2441 }(f)), f = { 2442 type: f.type 2443 }; 2444 } 2445 2446 return b; 2447 }(), 2448 ha = { 2449 css: function (a, c, d) { 2450 return a.style[c] = d; 2451 }, 2452 attribute: function (a, c, d) { 2453 return a.setAttribute(c, d); 2454 }, 2455 object: function (a, c, d) { 2456 return a[c] = d; 2457 }, 2458 transform: function (a, c, d, b, f) { 2459 b[f] || (b[f] = []); 2460 b[f].push(c + "(" + d + ")"); 2461 } 2462 }, 2463 v = [], 2464 B = 0, 2465 ia = function () { 2466 function a() { 2467 B = requestAnimationFrame(c); 2468 } 2469 2470 function c(c) { 2471 var b = v.length; 2472 2473 if (b) { 2474 for (var d = 0; d < b;) { 2475 v[d] && v[d].tick(c), d++; 2476 } 2477 2478 a(); 2479 } else cancelAnimationFrame(B), B = 0; 2480 } 2481 2482 return a; 2483 }(); 2484 2485 q.version = "2.2.0"; 2486 q.speed = 1; 2487 q.running = v; 2488 2489 q.remove = function (a) { 2490 a = P(a); 2491 2492 for (var c = v.length; c--;) { 2493 for (var d = v[c], b = d.animations, f = b.length; f--;) { 2494 u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause()); 2495 } 2496 } 2497 }; 2498 2499 q.getValue = K; 2500 2501 q.path = function (a, c) { 2502 var d = h.str(a) ? e(a)[0] : a, 2503 b = c || 100; 2504 return function (a) { 2505 return { 2506 el: d, 2507 property: a, 2508 totalLength: N(d) * (b / 100) 2509 }; 2510 }; 2511 }; 2512 2513 q.setDashoffset = function (a) { 2514 var c = N(a); 2515 a.setAttribute("stroke-dasharray", c); 2516 return c; 2517 }; 2518 2519 q.bezier = A; 2520 q.easings = Q; 2521 2522 q.timeline = function (a) { 2523 var c = q(a); 2524 c.pause(); 2525 c.duration = 0; 2526 2527 c.add = function (d) { 2528 c.children.forEach(function (a) { 2529 a.began = !0; 2530 a.completed = !0; 2531 }); 2532 m(d).forEach(function (b) { 2533 var d = z(b, D(S, a || {})); 2534 d.targets = d.targets || a.targets; 2535 b = c.duration; 2536 var e = d.offset; 2537 d.autoplay = !1; 2538 d.direction = c.direction; 2539 d.offset = h.und(e) ? b : L(e, b); 2540 c.began = !0; 2541 c.completed = !0; 2542 c.seek(d.offset); 2543 d = q(d); 2544 d.began = !0; 2545 d.completed = !0; 2546 d.duration > b && (c.duration = d.duration); 2547 c.children.push(d); 2548 }); 2549 c.seek(0); 2550 c.reset(); 2551 c.autoplay && c.restart(); 2552 return c; 2553 }; 2554 2555 return c; 2556 }; 2557 2558 q.random = function (a, c) { 2559 return Math.floor(Math.random() * (c - a + 1)) + a; 2560 }; 2561 2562 return q; 2563 }); 2564 2565 ; 2566 2567 (function ($, anim) { 2568 'use strict'; 2569 2570 var _defaults = { 2571 alignment: 'left', 2572 autoFocus: true, 2573 constrainWidth: true, 2574 container: null, 2575 coverTrigger: true, 2576 closeOnClick: true, 2577 hover: false, 2578 inDuration: 150, 2579 outDuration: 250, 2580 onOpenStart: null, 2581 onOpenEnd: null, 2582 onCloseStart: null, 2583 onCloseEnd: null, 2584 onItemClick: null 2585 }; 2586 /** 2587 * @class 2588 */ 2589 2590 var Dropdown = function (_Component2) { 2591 _inherits(Dropdown, _Component2); 2592 2593 function Dropdown(el, options) { 2594 _classCallCheck(this, Dropdown); 2595 2596 var _this9 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options)); 2597 2598 _this9.el.M_Dropdown = _this9; 2599 2600 Dropdown._dropdowns.push(_this9); 2601 2602 _this9.id = M.getIdFromTrigger(el); 2603 _this9.dropdownEl = document.getElementById(_this9.id); 2604 _this9.$dropdownEl = $(_this9.dropdownEl); 2605 /** 2606 * Options for the dropdown 2607 * @member Dropdown#options 2608 * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to 2609 * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard 2610 * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button 2611 * @prop {Element} container - Container element to attach dropdown to (optional) 2612 * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger 2613 * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item 2614 * @prop {Boolean} [hover=false] - Open dropdown on hover 2615 * @prop {Number} [inDuration=150] - Duration of open animation in ms 2616 * @prop {Number} [outDuration=250] - Duration of close animation in ms 2617 * @prop {Function} onOpenStart - Function called when dropdown starts opening 2618 * @prop {Function} onOpenEnd - Function called when dropdown finishes opening 2619 * @prop {Function} onCloseStart - Function called when dropdown starts closing 2620 * @prop {Function} onCloseEnd - Function called when dropdown finishes closing 2621 */ 2622 2623 _this9.options = $.extend({}, Dropdown.defaults, options); 2624 /** 2625 * Describes open/close state of dropdown 2626 * @type {Boolean} 2627 */ 2628 2629 _this9.isOpen = false; 2630 /** 2631 * Describes if dropdown content is scrollable 2632 * @type {Boolean} 2633 */ 2634 2635 _this9.isScrollable = false; 2636 /** 2637 * Describes if touch moving on dropdown content 2638 * @type {Boolean} 2639 */ 2640 2641 _this9.isTouchMoving = false; 2642 _this9.focusedIndex = -1; 2643 _this9.filterQuery = []; // Move dropdown-content after dropdown-trigger 2644 2645 if (!!_this9.options.container) { 2646 $(_this9.options.container).append(_this9.dropdownEl); 2647 } else { 2648 _this9.$el.after(_this9.dropdownEl); 2649 } 2650 2651 _this9._makeDropdownFocusable(); 2652 2653 _this9._resetFilterQueryBound = _this9._resetFilterQuery.bind(_this9); 2654 _this9._handleDocumentClickBound = _this9._handleDocumentClick.bind(_this9); 2655 _this9._handleDocumentTouchmoveBound = _this9._handleDocumentTouchmove.bind(_this9); 2656 _this9._handleDropdownClickBound = _this9._handleDropdownClick.bind(_this9); 2657 _this9._handleDropdownKeydownBound = _this9._handleDropdownKeydown.bind(_this9); 2658 _this9._handleTriggerKeydownBound = _this9._handleTriggerKeydown.bind(_this9); 2659 2660 _this9._setupEventHandlers(); 2661 2662 return _this9; 2663 } 2664 2665 _createClass(Dropdown, [{ 2666 key: "destroy", 2667 2668 /** 2669 * Teardown component 2670 */ 2671 value: function destroy() { 2672 this._resetDropdownStyles(); 2673 2674 this._removeEventHandlers(); 2675 2676 Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1); 2677 2678 this.el.M_Dropdown = undefined; 2679 } 2680 /** 2681 * Setup Event Handlers 2682 */ 2683 2684 }, { 2685 key: "_setupEventHandlers", 2686 value: function _setupEventHandlers() { 2687 // Trigger keydown handler 2688 this.el.addEventListener('keydown', this._handleTriggerKeydownBound); // Item click handler 2689 2690 this.dropdownEl.addEventListener('click', this._handleDropdownClickBound); // Hover event handlers 2691 2692 if (this.options.hover) { 2693 this._handleMouseEnterBound = this._handleMouseEnter.bind(this); 2694 this.el.addEventListener('mouseenter', this._handleMouseEnterBound); 2695 this._handleMouseLeaveBound = this._handleMouseLeave.bind(this); 2696 this.el.addEventListener('mouseleave', this._handleMouseLeaveBound); 2697 this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound); // Click event handlers 2698 } else { 2699 this._handleClickBound = this._handleClick.bind(this); 2700 this.el.addEventListener('click', this._handleClickBound); 2701 } 2702 } 2703 /** 2704 * Remove Event Handlers 2705 */ 2706 2707 }, { 2708 key: "_removeEventHandlers", 2709 value: function _removeEventHandlers() { 2710 this.el.removeEventListener('keydown', this._handleTriggerKeydownBound); 2711 this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound); 2712 2713 if (this.options.hover) { 2714 this.el.removeEventListener('mouseenter', this._handleMouseEnterBound); 2715 this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound); 2716 this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound); 2717 } else { 2718 this.el.removeEventListener('click', this._handleClickBound); 2719 } 2720 } 2721 }, { 2722 key: "_setupTemporaryEventHandlers", 2723 value: function _setupTemporaryEventHandlers() { 2724 // Use capture phase event handler to prevent click 2725 document.body.addEventListener('click', this._handleDocumentClickBound, true); 2726 document.body.addEventListener('touchend', this._handleDocumentClickBound); 2727 document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound); 2728 this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound); 2729 } 2730 }, { 2731 key: "_removeTemporaryEventHandlers", 2732 value: function _removeTemporaryEventHandlers() { 2733 // Use capture phase event handler to prevent click 2734 document.body.removeEventListener('click', this._handleDocumentClickBound, true); 2735 document.body.removeEventListener('touchend', this._handleDocumentClickBound); 2736 document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound); 2737 this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound); 2738 } 2739 }, { 2740 key: "_handleClick", 2741 value: function _handleClick(e) { 2742 e.preventDefault(); 2743 this.open(); 2744 } 2745 }, { 2746 key: "_handleMouseEnter", 2747 value: function _handleMouseEnter() { 2748 this.open(); 2749 } 2750 }, { 2751 key: "_handleMouseLeave", 2752 value: function _handleMouseLeave(e) { 2753 var toEl = e.toElement || e.relatedTarget; 2754 var leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length; 2755 var leaveToActiveDropdownTrigger = false; 2756 var $closestTrigger = $(toEl).closest('.dropdown-trigger'); 2757 2758 if ($closestTrigger.length && !!$closestTrigger[0].M_Dropdown && $closestTrigger[0].M_Dropdown.isOpen) { 2759 leaveToActiveDropdownTrigger = true; 2760 } // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content 2761 2762 2763 if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) { 2764 this.close(); 2765 } 2766 } 2767 }, { 2768 key: "_handleDocumentClick", 2769 value: function _handleDocumentClick(e) { 2770 var _this10 = this; 2771 2772 var $target = $(e.target); 2773 2774 if (this.options.closeOnClick && $target.closest('.dropdown-content').length && !this.isTouchMoving) { 2775 // isTouchMoving to check if scrolling on mobile. 2776 setTimeout(function () { 2777 _this10.close(); 2778 }, 0); 2779 } else if ($target.closest('.dropdown-trigger').length || !$target.closest('.dropdown-content').length) { 2780 setTimeout(function () { 2781 _this10.close(); 2782 }, 0); 2783 } 2784 2785 this.isTouchMoving = false; 2786 } 2787 }, { 2788 key: "_handleTriggerKeydown", 2789 value: function _handleTriggerKeydown(e) { 2790 // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown 2791 if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) { 2792 e.preventDefault(); 2793 this.open(); 2794 } 2795 } 2796 /** 2797 * Handle Document Touchmove 2798 * @param {Event} e 2799 */ 2800 2801 }, { 2802 key: "_handleDocumentTouchmove", 2803 value: function _handleDocumentTouchmove(e) { 2804 var $target = $(e.target); 2805 2806 if ($target.closest('.dropdown-content').length) { 2807 this.isTouchMoving = true; 2808 } 2809 } 2810 /** 2811 * Handle Dropdown Click 2812 * @param {Event} e 2813 */ 2814 2815 }, { 2816 key: "_handleDropdownClick", 2817 value: function _handleDropdownClick(e) { 2818 // onItemClick callback 2819 if (typeof this.options.onItemClick === 'function') { 2820 var itemEl = $(e.target).closest('li')[0]; 2821 this.options.onItemClick.call(this, itemEl); 2822 } 2823 } 2824 /** 2825 * Handle Dropdown Keydown 2826 * @param {Event} e 2827 */ 2828 2829 }, { 2830 key: "_handleDropdownKeydown", 2831 value: function _handleDropdownKeydown(e) { 2832 if (e.which === M.keys.TAB) { 2833 e.preventDefault(); 2834 this.close(); // Navigate down dropdown list 2835 } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) { 2836 e.preventDefault(); 2837 var direction = e.which === M.keys.ARROW_DOWN ? 1 : -1; 2838 var newFocusedIndex = this.focusedIndex; 2839 var foundNewIndex = false; 2840 2841 do { 2842 newFocusedIndex = newFocusedIndex + direction; 2843 2844 if (!!this.dropdownEl.children[newFocusedIndex] && this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) { 2845 foundNewIndex = true; 2846 break; 2847 } 2848 } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0); 2849 2850 if (foundNewIndex) { 2851 this.focusedIndex = newFocusedIndex; 2852 2853 this._focusFocusedItem(); 2854 } // ENTER selects choice on focused item 2855 2856 } else if (e.which === M.keys.ENTER && this.isOpen) { 2857 // Search for <a> and <button> 2858 var focusedElement = this.dropdownEl.children[this.focusedIndex]; 2859 var $activatableElement = $(focusedElement).find('a, button').first(); // Click a or button tag if exists, otherwise click li tag 2860 2861 if (!!$activatableElement.length) { 2862 $activatableElement[0].click(); 2863 } else if (!!focusedElement) { 2864 focusedElement.click(); 2865 } // Close dropdown on ESC 2866 2867 } else if (e.which === M.keys.ESC && this.isOpen) { 2868 e.preventDefault(); 2869 this.close(); 2870 } // CASE WHEN USER TYPE LETTERS 2871 2872 2873 var letter = String.fromCharCode(e.which).toLowerCase(), 2874 nonLetters = [9, 13, 27, 38, 40]; 2875 2876 if (letter && nonLetters.indexOf(e.which) === -1) { 2877 this.filterQuery.push(letter); 2878 var string = this.filterQuery.join(''), 2879 newOptionEl = $(this.dropdownEl).find('li').filter(function (el) { 2880 return $(el).text().toLowerCase().indexOf(string) === 0; 2881 })[0]; 2882 2883 if (newOptionEl) { 2884 this.focusedIndex = $(newOptionEl).index(); 2885 2886 this._focusFocusedItem(); 2887 } 2888 } 2889 2890 this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1000); 2891 } 2892 /** 2893 * Setup dropdown 2894 */ 2895 2896 }, { 2897 key: "_resetFilterQuery", 2898 value: function _resetFilterQuery() { 2899 this.filterQuery = []; 2900 } 2901 }, { 2902 key: "_resetDropdownStyles", 2903 value: function _resetDropdownStyles() { 2904 this.$dropdownEl.css({ 2905 display: '', 2906 width: '', 2907 height: '', 2908 left: '', 2909 top: '', 2910 'transform-origin': '', 2911 transform: '', 2912 opacity: '' 2913 }); 2914 } 2915 }, { 2916 key: "_makeDropdownFocusable", 2917 value: function _makeDropdownFocusable() { 2918 // Needed for arrow key navigation 2919 this.dropdownEl.tabIndex = 0; // Only set tabindex if it hasn't been set by user 2920 2921 $(this.dropdownEl).children().each(function (el) { 2922 if (!el.getAttribute('tabindex')) { 2923 el.setAttribute('tabindex', 0); 2924 } 2925 }); 2926 } 2927 }, { 2928 key: "_focusFocusedItem", 2929 value: function _focusFocusedItem() { 2930 if (this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length && this.options.autoFocus) { 2931 this.dropdownEl.children[this.focusedIndex].focus(); 2932 } 2933 } 2934 }, { 2935 key: "_getDropdownPosition", 2936 value: function _getDropdownPosition() { 2937 var offsetParentBRect = this.el.offsetParent.getBoundingClientRect(); 2938 var triggerBRect = this.el.getBoundingClientRect(); 2939 var dropdownBRect = this.dropdownEl.getBoundingClientRect(); 2940 var idealHeight = dropdownBRect.height; 2941 var idealWidth = dropdownBRect.width; 2942 var idealXPos = triggerBRect.left - dropdownBRect.left; 2943 var idealYPos = triggerBRect.top - dropdownBRect.top; 2944 var dropdownBounds = { 2945 left: idealXPos, 2946 top: idealYPos, 2947 height: idealHeight, 2948 width: idealWidth 2949 }; // Countainer here will be closest ancestor with overflow: hidden 2950 2951 var closestOverflowParent = !!this.dropdownEl.offsetParent ? this.dropdownEl.offsetParent : this.dropdownEl.parentNode; 2952 var alignments = M.checkPossibleAlignments(this.el, closestOverflowParent, dropdownBounds, this.options.coverTrigger ? 0 : triggerBRect.height); 2953 var verticalAlignment = 'top'; 2954 var horizontalAlignment = this.options.alignment; 2955 idealYPos += this.options.coverTrigger ? 0 : triggerBRect.height; // Reset isScrollable 2956 2957 this.isScrollable = false; 2958 2959 if (!alignments.top) { 2960 if (alignments.bottom) { 2961 verticalAlignment = 'bottom'; 2962 } else { 2963 this.isScrollable = true; // Determine which side has most space and cutoff at correct height 2964 2965 if (alignments.spaceOnTop > alignments.spaceOnBottom) { 2966 verticalAlignment = 'bottom'; 2967 idealHeight += alignments.spaceOnTop; 2968 idealYPos -= alignments.spaceOnTop; 2969 } else { 2970 idealHeight += alignments.spaceOnBottom; 2971 } 2972 } 2973 } // If preferred horizontal alignment is possible 2974 2975 2976 if (!alignments[horizontalAlignment]) { 2977 var oppositeAlignment = horizontalAlignment === 'left' ? 'right' : 'left'; 2978 2979 if (alignments[oppositeAlignment]) { 2980 horizontalAlignment = oppositeAlignment; 2981 } else { 2982 // Determine which side has most space and cutoff at correct height 2983 if (alignments.spaceOnLeft > alignments.spaceOnRight) { 2984 horizontalAlignment = 'right'; 2985 idealWidth += alignments.spaceOnLeft; 2986 idealXPos -= alignments.spaceOnLeft; 2987 } else { 2988 horizontalAlignment = 'left'; 2989 idealWidth += alignments.spaceOnRight; 2990 } 2991 } 2992 } 2993 2994 if (verticalAlignment === 'bottom') { 2995 idealYPos = idealYPos - dropdownBRect.height + (this.options.coverTrigger ? triggerBRect.height : 0); 2996 } 2997 2998 if (horizontalAlignment === 'right') { 2999 idealXPos = idealXPos - dropdownBRect.width + triggerBRect.width; 3000 } 3001 3002 return { 3003 x: idealXPos, 3004 y: idealYPos, 3005 verticalAlignment: verticalAlignment, 3006 horizontalAlignment: horizontalAlignment, 3007 height: idealHeight, 3008 width: idealWidth 3009 }; 3010 } 3011 /** 3012 * Animate in dropdown 3013 */ 3014 3015 }, { 3016 key: "_animateIn", 3017 value: function _animateIn() { 3018 var _this11 = this; 3019 3020 anim.remove(this.dropdownEl); 3021 anim({ 3022 targets: this.dropdownEl, 3023 opacity: { 3024 value: [0, 1], 3025 easing: 'easeOutQuad' 3026 }, 3027 scaleX: [0.3, 1], 3028 scaleY: [0.3, 1], 3029 duration: this.options.inDuration, 3030 easing: 'easeOutQuint', 3031 complete: function (anim) { 3032 if (_this11.options.autoFocus) { 3033 _this11.dropdownEl.focus(); 3034 } // onOpenEnd callback 3035 3036 3037 if (typeof _this11.options.onOpenEnd === 'function') { 3038 _this11.options.onOpenEnd.call(_this11, _this11.el); 3039 } 3040 } 3041 }); 3042 } 3043 /** 3044 * Animate out dropdown 3045 */ 3046 3047 }, { 3048 key: "_animateOut", 3049 value: function _animateOut() { 3050 var _this12 = this; 3051 3052 anim.remove(this.dropdownEl); 3053 anim({ 3054 targets: this.dropdownEl, 3055 opacity: { 3056 value: 0, 3057 easing: 'easeOutQuint' 3058 }, 3059 scaleX: 0.3, 3060 scaleY: 0.3, 3061 duration: this.options.outDuration, 3062 easing: 'easeOutQuint', 3063 complete: function (anim) { 3064 _this12._resetDropdownStyles(); // onCloseEnd callback 3065 3066 3067 if (typeof _this12.options.onCloseEnd === 'function') { 3068 _this12.options.onCloseEnd.call(_this12, _this12.el); 3069 } 3070 } 3071 }); 3072 } 3073 /** 3074 * Place dropdown 3075 */ 3076 3077 }, { 3078 key: "_placeDropdown", 3079 value: function _placeDropdown() { 3080 // Set width before calculating positionInfo 3081 var idealWidth = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width; 3082 this.dropdownEl.style.width = idealWidth + 'px'; 3083 3084 var positionInfo = this._getDropdownPosition(); 3085 3086 this.dropdownEl.style.left = positionInfo.x + 'px'; 3087 this.dropdownEl.style.top = positionInfo.y + 'px'; 3088 this.dropdownEl.style.height = positionInfo.height + 'px'; 3089 this.dropdownEl.style.width = positionInfo.width + 'px'; 3090 this.dropdownEl.style.transformOrigin = (positionInfo.horizontalAlignment === 'left' ? '0' : '100%') + " " + (positionInfo.verticalAlignment === 'top' ? '0' : '100%'); 3091 } 3092 /** 3093 * Open Dropdown 3094 */ 3095 3096 }, { 3097 key: "open", 3098 value: function open() { 3099 if (this.isOpen) { 3100 return; 3101 } 3102 3103 this.isOpen = true; // onOpenStart callback 3104 3105 if (typeof this.options.onOpenStart === 'function') { 3106 this.options.onOpenStart.call(this, this.el); 3107 } // Reset styles 3108 3109 3110 this._resetDropdownStyles(); 3111 3112 this.dropdownEl.style.display = 'block'; 3113 3114 this._placeDropdown(); 3115 3116 this._animateIn(); 3117 3118 this._setupTemporaryEventHandlers(); 3119 } 3120 /** 3121 * Close Dropdown 3122 */ 3123 3124 }, { 3125 key: "close", 3126 value: function close() { 3127 if (!this.isOpen) { 3128 return; 3129 } 3130 3131 this.isOpen = false; 3132 this.focusedIndex = -1; // onCloseStart callback 3133 3134 if (typeof this.options.onCloseStart === 'function') { 3135 this.options.onCloseStart.call(this, this.el); 3136 } 3137 3138 this._animateOut(); 3139 3140 this._removeTemporaryEventHandlers(); 3141 3142 if (this.options.autoFocus) { 3143 this.el.focus(); 3144 } 3145 } 3146 /** 3147 * Recalculate dimensions 3148 */ 3149 3150 }, { 3151 key: "recalculateDimensions", 3152 value: function recalculateDimensions() { 3153 if (this.isOpen) { 3154 this.$dropdownEl.css({ 3155 width: '', 3156 height: '', 3157 left: '', 3158 top: '', 3159 'transform-origin': '' 3160 }); 3161 3162 this._placeDropdown(); 3163 } 3164 } 3165 }], [{ 3166 key: "init", 3167 value: function init(els, options) { 3168 return _get(Dropdown.__proto__ || Object.getPrototypeOf(Dropdown), "init", this).call(this, this, els, options); 3169 } 3170 /** 3171 * Get Instance 3172 */ 3173 3174 }, { 3175 key: "getInstance", 3176 value: function getInstance(el) { 3177 var domElem = !!el.jquery ? el[0] : el; 3178 return domElem.M_Dropdown; 3179 } 3180 }, { 3181 key: "defaults", 3182 get: function () { 3183 return _defaults; 3184 } 3185 }]); 3186 3187 return Dropdown; 3188 }(Component); 3189 /** 3190 * @static 3191 * @memberof Dropdown 3192 */ 3193 3194 3195 Dropdown._dropdowns = []; 3196 M.Dropdown = Dropdown; 3197 3198 if (M.jQueryLoaded) { 3199 M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown'); 3200 } 3201 })(cash, M.anime); 3202 3203 ; 3204 3205 (function ($, anim) { 3206 'use strict'; 3207 3208 var _defaults = { 3209 opacity: 0.5, 3210 inDuration: 250, 3211 outDuration: 250, 3212 onOpenStart: null, 3213 onOpenEnd: null, 3214 onCloseStart: null, 3215 onCloseEnd: null, 3216 preventScrolling: true, 3217 dismissible: true, 3218 startingTop: '4%', 3219 endingTop: '10%' 3220 }; 3221 /** 3222 * @class 3223 * 3224 */ 3225 3226 var Modal = function (_Component3) { 3227 _inherits(Modal, _Component3); 3228 /** 3229 * Construct Modal instance and set up overlay 3230 * @constructor 3231 * @param {Element} el 3232 * @param {Object} options 3233 */ 3234 3235 3236 function Modal(el, options) { 3237 _classCallCheck(this, Modal); 3238 3239 var _this13 = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, Modal, el, options)); 3240 3241 _this13.el.M_Modal = _this13; 3242 /** 3243 * Options for the modal 3244 * @member Modal#options 3245 * @prop {Number} [opacity=0.5] - Opacity of the modal overlay 3246 * @prop {Number} [inDuration=250] - Length in ms of enter transition 3247 * @prop {Number} [outDuration=250] - Length in ms of exit transition 3248 * @prop {Function} onOpenStart - Callback function called before modal is opened 3249 * @prop {Function} onOpenEnd - Callback function called after modal is opened 3250 * @prop {Function} onCloseStart - Callback function called before modal is closed 3251 * @prop {Function} onCloseEnd - Callback function called after modal is closed 3252 * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click 3253 * @prop {String} [startingTop='4%'] - startingTop 3254 * @prop {String} [endingTop='10%'] - endingTop 3255 */ 3256 3257 _this13.options = $.extend({}, Modal.defaults, options); 3258 /** 3259 * Describes open/close state of modal 3260 * @type {Boolean} 3261 */ 3262 3263 _this13.isOpen = false; 3264 _this13.id = _this13.$el.attr('id'); 3265 _this13._openingTrigger = undefined; 3266 _this13.$overlay = $('<div class="modal-overlay"></div>'); 3267 _this13.el.tabIndex = 0; 3268 _this13._nthModalOpened = 0; 3269 Modal._count++; 3270 3271 _this13._setupEventHandlers(); 3272 3273 return _this13; 3274 } 3275 3276 _createClass(Modal, [{ 3277 key: "destroy", 3278 3279 /** 3280 * Teardown component 3281 */ 3282 value: function destroy() { 3283 Modal._count--; 3284 3285 this._removeEventHandlers(); 3286 3287 this.el.removeAttribute('style'); 3288 this.$overlay.remove(); 3289 this.el.M_Modal = undefined; 3290 } 3291 /** 3292 * Setup Event Handlers 3293 */ 3294 3295 }, { 3296 key: "_setupEventHandlers", 3297 value: function _setupEventHandlers() { 3298 this._handleOverlayClickBound = this._handleOverlayClick.bind(this); 3299 this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this); 3300 3301 if (Modal._count === 1) { 3302 document.body.addEventListener('click', this._handleTriggerClick); 3303 } 3304 3305 this.$overlay[0].addEventListener('click', this._handleOverlayClickBound); 3306 this.el.addEventListener('click', this._handleModalCloseClickBound); 3307 } 3308 /** 3309 * Remove Event Handlers 3310 */ 3311 3312 }, { 3313 key: "_removeEventHandlers", 3314 value: function _removeEventHandlers() { 3315 if (Modal._count === 0) { 3316 document.body.removeEventListener('click', this._handleTriggerClick); 3317 } 3318 3319 this.$overlay[0].removeEventListener('click', this._handleOverlayClickBound); 3320 this.el.removeEventListener('click', this._handleModalCloseClickBound); 3321 } 3322 /** 3323 * Handle Trigger Click 3324 * @param {Event} e 3325 */ 3326 3327 }, { 3328 key: "_handleTriggerClick", 3329 value: function _handleTriggerClick(e) { 3330 var $trigger = $(e.target).closest('.modal-trigger'); 3331 3332 if ($trigger.length) { 3333 var modalId = M.getIdFromTrigger($trigger[0]); 3334 var modalInstance = document.getElementById(modalId).M_Modal; 3335 3336 if (modalInstance) { 3337 modalInstance.open($trigger); 3338 } 3339 3340 e.preventDefault(); 3341 } 3342 } 3343 /** 3344 * Handle Overlay Click 3345 */ 3346 3347 }, { 3348 key: "_handleOverlayClick", 3349 value: function _handleOverlayClick() { 3350 if (this.options.dismissible) { 3351 this.close(); 3352 } 3353 } 3354 /** 3355 * Handle Modal Close Click 3356 * @param {Event} e 3357 */ 3358 3359 }, { 3360 key: "_handleModalCloseClick", 3361 value: function _handleModalCloseClick(e) { 3362 var $closeTrigger = $(e.target).closest('.modal-close'); 3363 3364 if ($closeTrigger.length) { 3365 this.close(); 3366 } 3367 } 3368 /** 3369 * Handle Keydown 3370 * @param {Event} e 3371 */ 3372 3373 }, { 3374 key: "_handleKeydown", 3375 value: function _handleKeydown(e) { 3376 // ESC key 3377 if (e.keyCode === 27 && this.options.dismissible) { 3378 this.close(); 3379 } 3380 } 3381 /** 3382 * Handle Focus 3383 * @param {Event} e 3384 */ 3385 3386 }, { 3387 key: "_handleFocus", 3388 value: function _handleFocus(e) { 3389 // Only trap focus if this modal is the last model opened (prevents loops in nested modals). 3390 if (!this.el.contains(e.target) && this._nthModalOpened === Modal._modalsOpen) { 3391 this.el.focus(); 3392 } 3393 } 3394 /** 3395 * Animate in modal 3396 */ 3397 3398 }, { 3399 key: "_animateIn", 3400 value: function _animateIn() { 3401 var _this14 = this; // Set initial styles 3402 3403 3404 $.extend(this.el.style, { 3405 display: 'block', 3406 opacity: 0 3407 }); 3408 $.extend(this.$overlay[0].style, { 3409 display: 'block', 3410 opacity: 0 3411 }); // Animate overlay 3412 3413 anim({ 3414 targets: this.$overlay[0], 3415 opacity: this.options.opacity, 3416 duration: this.options.inDuration, 3417 easing: 'easeOutQuad' 3418 }); // Define modal animation options 3419 3420 var enterAnimOptions = { 3421 targets: this.el, 3422 duration: this.options.inDuration, 3423 easing: 'easeOutCubic', 3424 // Handle modal onOpenEnd callback 3425 complete: function () { 3426 if (typeof _this14.options.onOpenEnd === 'function') { 3427 _this14.options.onOpenEnd.call(_this14, _this14.el, _this14._openingTrigger); 3428 } 3429 } 3430 }; // Bottom sheet animation 3431 3432 if (this.el.classList.contains('bottom-sheet')) { 3433 $.extend(enterAnimOptions, { 3434 bottom: 0, 3435 opacity: 1 3436 }); 3437 anim(enterAnimOptions); // Normal modal animation 3438 } else { 3439 $.extend(enterAnimOptions, { 3440 top: [this.options.startingTop, this.options.endingTop], 3441 opacity: 1, 3442 scaleX: [0.8, 1], 3443 scaleY: [0.8, 1] 3444 }); 3445 anim(enterAnimOptions); 3446 } 3447 } 3448 /** 3449 * Animate out modal 3450 */ 3451 3452 }, { 3453 key: "_animateOut", 3454 value: function _animateOut() { 3455 var _this15 = this; // Animate overlay 3456 3457 3458 anim({ 3459 targets: this.$overlay[0], 3460 opacity: 0, 3461 duration: this.options.outDuration, 3462 easing: 'easeOutQuart' 3463 }); // Define modal animation options 3464 3465 var exitAnimOptions = { 3466 targets: this.el, 3467 duration: this.options.outDuration, 3468 easing: 'easeOutCubic', 3469 // Handle modal ready callback 3470 complete: function () { 3471 _this15.el.style.display = 'none'; 3472 3473 _this15.$overlay.remove(); // Call onCloseEnd callback 3474 3475 3476 if (typeof _this15.options.onCloseEnd === 'function') { 3477 _this15.options.onCloseEnd.call(_this15, _this15.el); 3478 } 3479 } 3480 }; // Bottom sheet animation 3481 3482 if (this.el.classList.contains('bottom-sheet')) { 3483 $.extend(exitAnimOptions, { 3484 bottom: '-100%', 3485 opacity: 0 3486 }); 3487 anim(exitAnimOptions); // Normal modal animation 3488 } else { 3489 $.extend(exitAnimOptions, { 3490 top: [this.options.endingTop, this.options.startingTop], 3491 opacity: 0, 3492 scaleX: 0.8, 3493 scaleY: 0.8 3494 }); 3495 anim(exitAnimOptions); 3496 } 3497 } 3498 /** 3499 * Open Modal 3500 * @param {cash} [$trigger] 3501 */ 3502 3503 }, { 3504 key: "open", 3505 value: function open($trigger) { 3506 if (this.isOpen) { 3507 return; 3508 } 3509 3510 this.isOpen = true; 3511 Modal._modalsOpen++; 3512 this._nthModalOpened = Modal._modalsOpen; // Set Z-Index based on number of currently open modals 3513 3514 this.$overlay[0].style.zIndex = 1000 + Modal._modalsOpen * 2; 3515 this.el.style.zIndex = 1000 + Modal._modalsOpen * 2 + 1; // Set opening trigger, undefined indicates modal was opened by javascript 3516 3517 this._openingTrigger = !!$trigger ? $trigger[0] : undefined; // onOpenStart callback 3518 3519 if (typeof this.options.onOpenStart === 'function') { 3520 this.options.onOpenStart.call(this, this.el, this._openingTrigger); 3521 } 3522 3523 if (this.options.preventScrolling) { 3524 document.body.style.overflow = 'hidden'; 3525 } 3526 3527 this.el.classList.add('open'); 3528 this.el.insertAdjacentElement('afterend', this.$overlay[0]); 3529 3530 if (this.options.dismissible) { 3531 this._handleKeydownBound = this._handleKeydown.bind(this); 3532 this._handleFocusBound = this._handleFocus.bind(this); 3533 document.addEventListener('keydown', this._handleKeydownBound); 3534 document.addEventListener('focus', this._handleFocusBound, true); 3535 } 3536 3537 anim.remove(this.el); 3538 anim.remove(this.$overlay[0]); 3539 3540 this._animateIn(); // Focus modal 3541 3542 3543 this.el.focus(); 3544 return this; 3545 } 3546 /** 3547 * Close Modal 3548 */ 3549 3550 }, { 3551 key: "close", 3552 value: function close() { 3553 if (!this.isOpen) { 3554 return; 3555 } 3556 3557 this.isOpen = false; 3558 Modal._modalsOpen--; 3559 this._nthModalOpened = 0; // Call onCloseStart callback 3560 3561 if (typeof this.options.onCloseStart === 'function') { 3562 this.options.onCloseStart.call(this, this.el); 3563 } 3564 3565 this.el.classList.remove('open'); // Enable body scrolling only if there are no more modals open. 3566 3567 if (Modal._modalsOpen === 0) { 3568 document.body.style.overflow = ''; 3569 } 3570 3571 if (this.options.dismissible) { 3572 document.removeEventListener('keydown', this._handleKeydownBound); 3573 document.removeEventListener('focus', this._handleFocusBound, true); 3574 } 3575 3576 anim.remove(this.el); 3577 anim.remove(this.$overlay[0]); 3578 3579 this._animateOut(); 3580 3581 return this; 3582 } 3583 }], [{ 3584 key: "init", 3585 value: function init(els, options) { 3586 return _get(Modal.__proto__ || Object.getPrototypeOf(Modal), "init", this).call(this, this, els, options); 3587 } 3588 /** 3589 * Get Instance 3590 */ 3591 3592 }, { 3593 key: "getInstance", 3594 value: function getInstance(el) { 3595 var domElem = !!el.jquery ? el[0] : el; 3596 return domElem.M_Modal; 3597 } 3598 }, { 3599 key: "defaults", 3600 get: function () { 3601 return _defaults; 3602 } 3603 }]); 3604 3605 return Modal; 3606 }(Component); 3607 /** 3608 * @static 3609 * @memberof Modal 3610 */ 3611 3612 3613 Modal._modalsOpen = 0; 3614 /** 3615 * @static 3616 * @memberof Modal 3617 */ 3618 3619 Modal._count = 0; 3620 M.Modal = Modal; 3621 3622 if (M.jQueryLoaded) { 3623 M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal'); 3624 } 3625 })(cash, M.anime); 3626 3627 ; 3628 3629 (function ($, anim) { 3630 'use strict'; 3631 3632 var _defaults = { 3633 duration: 300, 3634 onShow: null, 3635 swipeable: false, 3636 responsiveThreshold: Infinity // breakpoint for swipeable 3637 3638 }; 3639 /** 3640 * @class 3641 * 3642 */ 3643 })(cash, M.anime); 3644 3645 ; 3646 3647 (function ($) { 3648 // Function to update labels of text fields 3649 M.updateTextFields = function () { 3650 var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea'; 3651 $(input_selector).each(function (element, index) { 3652 var $this = $(this); 3653 3654 if (element.value.length > 0 || $(element).is(':focus') || element.autofocus || $this.attr('placeholder') !== null) { 3655 $this.siblings('label').addClass('active'); 3656 } else if (element.validity) { 3657 $this.siblings('label').toggleClass('active', element.validity.badInput === true); 3658 } else { 3659 $this.siblings('label').removeClass('active'); 3660 } 3661 }); 3662 }; 3663 3664 M.validate_field = function (object) { 3665 var hasLength = object.attr('data-length') !== null; 3666 var lenAttr = parseInt(object.attr('data-length')); 3667 var len = object[0].value.length; 3668 3669 if (len === 0 && object[0].validity.badInput === false && !object.is(':required')) { 3670 if (object.hasClass('validate')) { 3671 object.removeClass('valid'); 3672 object.removeClass('invalid'); 3673 } 3674 } else { 3675 if (object.hasClass('validate')) { 3676 // Check for character counter attributes 3677 if (object.is(':valid') && hasLength && len <= lenAttr || object.is(':valid') && !hasLength) { 3678 object.removeClass('invalid'); 3679 object.addClass('valid'); 3680 } else { 3681 object.removeClass('valid'); 3682 object.addClass('invalid'); 3683 } 3684 } 3685 } 3686 }; 3687 3688 M.textareaAutoResize = function ($textarea) { 3689 // Wrap if native element 3690 if ($textarea instanceof Element) { 3691 $textarea = $($textarea); 3692 } 3693 3694 if (!$textarea.length) { 3695 console.error('No textarea element found'); 3696 return; 3697 } // Textarea Auto Resize 3698 3699 3700 var hiddenDiv = $('.hiddendiv').first(); 3701 3702 if (!hiddenDiv.length) { 3703 hiddenDiv = $('<div class="hiddendiv common"></div>'); 3704 $('body').append(hiddenDiv); 3705 } // Set font properties of hiddenDiv 3706 3707 3708 var fontFamily = $textarea.css('font-family'); 3709 var fontSize = $textarea.css('font-size'); 3710 var lineHeight = $textarea.css('line-height'); // Firefox can't handle padding shorthand. 3711 3712 var paddingTop = $textarea.css('padding-top'); 3713 var paddingRight = $textarea.css('padding-right'); 3714 var paddingBottom = $textarea.css('padding-bottom'); 3715 var paddingLeft = $textarea.css('padding-left'); 3716 3717 if (fontSize) { 3718 hiddenDiv.css('font-size', fontSize); 3719 } 3720 3721 if (fontFamily) { 3722 hiddenDiv.css('font-family', fontFamily); 3723 } 3724 3725 if (lineHeight) { 3726 hiddenDiv.css('line-height', lineHeight); 3727 } 3728 3729 if (paddingTop) { 3730 hiddenDiv.css('padding-top', paddingTop); 3731 } 3732 3733 if (paddingRight) { 3734 hiddenDiv.css('padding-right', paddingRight); 3735 } 3736 3737 if (paddingBottom) { 3738 hiddenDiv.css('padding-bottom', paddingBottom); 3739 } 3740 3741 if (paddingLeft) { 3742 hiddenDiv.css('padding-left', paddingLeft); 3743 } // Set original-height, if none 3744 3745 3746 if (!$textarea.data('original-height')) { 3747 $textarea.data('original-height', $textarea.height()); 3748 } 3749 3750 if ($textarea.attr('wrap') === 'off') { 3751 hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre'); 3752 } 3753 3754 hiddenDiv.text($textarea[0].value + '\n'); 3755 var content = hiddenDiv.html().replace(/\n/g, '<br>'); 3756 hiddenDiv.html(content); // When textarea is hidden, width goes crazy. 3757 // Approximate with half of window size 3758 3759 if ($textarea[0].offsetWidth > 0 && $textarea[0].offsetHeight > 0) { 3760 hiddenDiv.css('width', $textarea.width() + 'px'); 3761 } else { 3762 hiddenDiv.css('width', window.innerWidth / 2 + 'px'); 3763 } 3764 /** 3765 * Resize if the new height is greater than the 3766 * original height of the textarea 3767 */ 3768 3769 3770 if ($textarea.data('original-height') <= hiddenDiv.innerHeight()) { 3771 $textarea.css('height', hiddenDiv.innerHeight() + 'px'); 3772 } else if ($textarea[0].value.length < $textarea.data('previous-length')) { 3773 /** 3774 * In case the new height is less than original height, it 3775 * means the textarea has less text than before 3776 * So we set the height to the original one 3777 */ 3778 $textarea.css('height', $textarea.data('original-height') + 'px'); 3779 } 3780 3781 $textarea.data('previous-length', $textarea[0].value.length); 3782 }; 3783 3784 $(document).ready(function () { 3785 // Text based inputs 3786 var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea'; // Add active if form auto complete 3787 3788 $(document).on('change', input_selector, function () { 3789 if (this.value.length !== 0 || $(this).attr('placeholder') !== null) { 3790 $(this).siblings('label').addClass('active'); 3791 } 3792 3793 M.validate_field($(this)); 3794 }); // Add active if input element has been pre-populated on document ready 3795 3796 $(document).ready(function () { 3797 M.updateTextFields(); 3798 }); // HTML DOM FORM RESET handling 3799 3800 $(document).on('reset', function (e) { 3801 var formReset = $(e.target); 3802 3803 if (formReset.is('form')) { 3804 formReset.find(input_selector).removeClass('valid').removeClass('invalid'); 3805 formReset.find(input_selector).each(function (e) { 3806 if (this.value.length) { 3807 $(this).siblings('label').removeClass('active'); 3808 } 3809 }); // Reset select (after native reset) 3810 3811 setTimeout(function () { 3812 formReset.find('select').each(function () { 3813 // check if initialized 3814 if (this.M_FormSelect) { 3815 $(this).trigger('change'); 3816 } 3817 }); 3818 }, 0); 3819 } 3820 }); 3821 /** 3822 * Add active when element has focus 3823 * @param {Event} e 3824 */ 3825 3826 document.addEventListener('focus', function (e) { 3827 if ($(e.target).is(input_selector)) { 3828 $(e.target).siblings('label, .prefix').addClass('active'); 3829 } 3830 }, true); 3831 /** 3832 * Remove active when element is blurred 3833 * @param {Event} e 3834 */ 3835 3836 document.addEventListener('blur', function (e) { 3837 var $inputElement = $(e.target); 3838 3839 if ($inputElement.is(input_selector)) { 3840 var selector = '.prefix'; 3841 3842 if ($inputElement[0].value.length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === null) { 3843 selector += ', label'; 3844 } 3845 3846 $inputElement.siblings(selector).removeClass('active'); 3847 M.validate_field($inputElement); 3848 } 3849 }, true); // Radio and Checkbox focus class 3850 3851 var radio_checkbox = 'input[type=radio], input[type=checkbox]'; 3852 $(document).on('keyup', radio_checkbox, function (e) { 3853 // TAB, check if tabbing to radio or checkbox. 3854 if (e.which === M.keys.TAB) { 3855 $(this).addClass('tabbed'); 3856 var $this = $(this); 3857 $this.one('blur', function (e) { 3858 $(this).removeClass('tabbed'); 3859 }); 3860 return; 3861 } 3862 }); 3863 var text_area_selector = '.materialize-textarea'; 3864 $(text_area_selector).each(function () { 3865 var $textarea = $(this); 3866 /** 3867 * Resize textarea on document load after storing 3868 * the original height and the original length 3869 */ 3870 3871 $textarea.data('original-height', $textarea.height()); 3872 $textarea.data('previous-length', this.value.length); 3873 M.textareaAutoResize($textarea); 3874 }); 3875 $(document).on('keyup', text_area_selector, function () { 3876 M.textareaAutoResize($(this)); 3877 }); 3878 $(document).on('keydown', text_area_selector, function () { 3879 M.textareaAutoResize($(this)); 3880 }); // File Input Path 3881 3882 $(document).on('change', '.file-field input[type="file"]', function () { 3883 var file_field = $(this).closest('.file-field'); 3884 var path_input = file_field.find('input.file-path'); 3885 var files = $(this)[0].files; 3886 var file_names = []; 3887 3888 for (var i = 0; i < files.length; i++) { 3889 file_names.push(files[i].name); 3890 } 3891 3892 path_input[0].value = file_names.join(', '); 3893 path_input.trigger('change'); 3894 }); 3895 }); // End of $(document).ready 3896 })(cash); 3897 3898 ; 3899 3900 (function ($, anim) { 3901 $(document).on('click', '.card', function (e) { 3902 if ($(this).children('.card-reveal').length) { 3903 var $card = $(e.target).closest('.card'); 3904 3905 if ($card.data('initialOverflow') === undefined) { 3906 $card.data('initialOverflow', $card.css('overflow') === undefined ? '' : $card.css('overflow')); 3907 } 3908 3909 var $cardReveal = $(this).find('.card-reveal'); 3910 3911 if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) { 3912 // Make Reveal animate down and display none 3913 anim({ 3914 targets: $cardReveal[0], 3915 translateY: 0, 3916 duration: 225, 3917 easing: 'easeInOutQuad', 3918 complete: function (anim) { 3919 var el = anim.animatables[0].target; 3920 $(el).css({ 3921 display: 'none' 3922 }); 3923 $card.css('overflow', $card.data('initialOverflow')); 3924 } 3925 }); 3926 } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) { 3927 $card.css('overflow', 'hidden'); 3928 $cardReveal.css({ 3929 display: 'block' 3930 }); 3931 anim({ 3932 targets: $cardReveal[0], 3933 translateY: '-100%', 3934 duration: 300, 3935 easing: 'easeInOutQuad' 3936 }); 3937 } 3938 } 3939 }); 3940 })(cash, M.anime); 3941 3942 ; 3943 3944 (function ($) { 3945 'use strict'; 3946 3947 var _defaults = { 3948 // Close when date is selected 3949 autoClose: false, 3950 // the default output format for the input field value 3951 format: 'mmm dd, yyyy', 3952 // Used to create date object from current input string 3953 parse: null, 3954 // The initial date to view when first opened 3955 defaultDate: null, 3956 // Make the `defaultDate` the initial selected value 3957 setDefaultDate: false, 3958 disableWeekends: false, 3959 disableDayFn: null, 3960 // First day of week (0: Sunday, 1: Monday etc) 3961 firstDay: 0, 3962 // The earliest date that can be selected 3963 minDate: null, 3964 // Thelatest date that can be selected 3965 maxDate: null, 3966 // Number of years either side, or array of upper/lower range 3967 yearRange: 10, 3968 // used internally (don't config outside) 3969 minYear: 0, 3970 maxYear: 9999, 3971 minMonth: undefined, 3972 maxMonth: undefined, 3973 startRange: null, 3974 endRange: null, 3975 isRTL: false, 3976 // Render the month after year in the calendar title 3977 showMonthAfterYear: false, 3978 // Render days of the calendar grid that fall in the next or previous month 3979 showDaysInNextAndPreviousMonths: false, 3980 // Specify a DOM element to render the calendar in 3981 container: null, 3982 // Show clear button 3983 showClearBtn: false, 3984 // internationalization 3985 i18n: { 3986 cancel: 'Cancel', 3987 clear: 'Clear', 3988 done: 'Ok', 3989 previousMonth: '‹', 3990 nextMonth: '›', 3991 months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 3992 monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 3993 weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 3994 weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 3995 weekdaysAbbrev: ['S', 'M', 'T', 'W', 'T', 'F', 'S'] 3996 }, 3997 // events array 3998 events: [], 3999 // callback function 4000 onSelect: null, 4001 onOpen: null, 4002 onClose: null, 4003 onDraw: null 4004 }; 4005 /** 4006 * @class 4007 * 4008 */ 4009 4010 var Datepicker = function (_Component15) { 4011 _inherits(Datepicker, _Component15); 4012 /** 4013 * Construct Datepicker instance and set up overlay 4014 * @constructor 4015 * @param {Element} el 4016 * @param {Object} options 4017 */ 4018 4019 4020 function Datepicker(el, options) { 4021 _classCallCheck(this, Datepicker); 4022 4023 var _this53 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options)); 4024 4025 _this53.el.M_Datepicker = _this53; 4026 _this53.options = $.extend({}, Datepicker.defaults, options); // make sure i18n defaults are not lost when only few i18n option properties are passed 4027 4028 if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') { 4029 _this53.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n); 4030 } // Remove time component from minDate and maxDate options 4031 4032 4033 if (_this53.options.minDate) _this53.options.minDate.setHours(0, 0, 0, 0); 4034 if (_this53.options.maxDate) _this53.options.maxDate.setHours(0, 0, 0, 0); 4035 _this53.id = M.guid(); 4036 4037 _this53._setupVariables(); 4038 4039 _this53._insertHTMLIntoDOM(); 4040 4041 _this53._setupModal(); 4042 4043 _this53._setupEventHandlers(); 4044 4045 if (!_this53.options.defaultDate) { 4046 _this53.options.defaultDate = new Date(Date.parse(_this53.el.value)); 4047 } 4048 4049 var defDate = _this53.options.defaultDate; 4050 4051 if (Datepicker._isDate(defDate)) { 4052 if (_this53.options.setDefaultDate) { 4053 _this53.setDate(defDate, true); 4054 4055 _this53.setInputValue(); 4056 } else { 4057 _this53.gotoDate(defDate); 4058 } 4059 } else { 4060 _this53.gotoDate(new Date()); 4061 } 4062 /** 4063 * Describes open/close state of datepicker 4064 * @type {Boolean} 4065 */ 4066 4067 4068 _this53.isOpen = false; 4069 return _this53; 4070 } 4071 4072 _createClass(Datepicker, [{ 4073 key: "destroy", 4074 4075 /** 4076 * Teardown component 4077 */ 4078 value: function destroy() { 4079 this._removeEventHandlers(); 4080 4081 this.modal.destroy(); 4082 $(this.modalEl).remove(); 4083 this.destroySelects(); 4084 this.el.M_Datepicker = undefined; 4085 } 4086 }, { 4087 key: "destroySelects", 4088 value: function destroySelects() { 4089 var oldYearSelect = this.calendarEl.querySelector('.orig-select-year'); 4090 4091 if (oldYearSelect) { 4092 M.FormSelect.getInstance(oldYearSelect).destroy(); 4093 } 4094 4095 var oldMonthSelect = this.calendarEl.querySelector('.orig-select-month'); 4096 4097 if (oldMonthSelect) { 4098 M.FormSelect.getInstance(oldMonthSelect).destroy(); 4099 } 4100 } 4101 }, { 4102 key: "_insertHTMLIntoDOM", 4103 value: function _insertHTMLIntoDOM() { 4104 if (this.options.showClearBtn) { 4105 $(this.clearBtn).css({ 4106 visibility: '' 4107 }); 4108 this.clearBtn.innerHTML = this.options.i18n.clear; 4109 } 4110 4111 this.doneBtn.innerHTML = this.options.i18n.done; 4112 this.cancelBtn.innerHTML = this.options.i18n.cancel; 4113 4114 if (this.options.container) { 4115 this.$modalEl.appendTo(this.options.container); 4116 } else { 4117 this.$modalEl.insertBefore(this.el); 4118 } 4119 } 4120 }, { 4121 key: "_setupModal", 4122 value: function _setupModal() { 4123 var _this54 = this; 4124 4125 this.modalEl.id = 'modal-' + this.id; 4126 this.modal = M.Modal.init(this.modalEl, { 4127 onCloseEnd: function () { 4128 _this54.isOpen = false; 4129 } 4130 }); 4131 } 4132 }, { 4133 key: "toString", 4134 value: function toString(format) { 4135 var _this55 = this; 4136 4137 format = format || this.options.format; 4138 4139 if (!Datepicker._isDate(this.date)) { 4140 return ''; 4141 } 4142 4143 var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g); 4144 var formattedDate = formatArray.map(function (label) { 4145 if (_this55.formats[label]) { 4146 return _this55.formats[label](); 4147 } 4148 4149 return label; 4150 }).join(''); 4151 return formattedDate; 4152 } 4153 }, { 4154 key: "setDate", 4155 value: function setDate(date, preventOnSelect) { 4156 if (!date) { 4157 this.date = null; 4158 4159 this._renderDateDisplay(); 4160 4161 return this.draw(); 4162 } 4163 4164 if (typeof date === 'string') { 4165 date = new Date(Date.parse(date)); 4166 } 4167 4168 if (!Datepicker._isDate(date)) { 4169 return; 4170 } 4171 4172 var min = this.options.minDate, 4173 max = this.options.maxDate; 4174 4175 if (Datepicker._isDate(min) && date < min) { 4176 date = min; 4177 } else if (Datepicker._isDate(max) && date > max) { 4178 date = max; 4179 } 4180 4181 this.date = new Date(date.getTime()); 4182 4183 this._renderDateDisplay(); 4184 4185 Datepicker._setToStartOfDay(this.date); 4186 4187 this.gotoDate(this.date); 4188 4189 if (!preventOnSelect && typeof this.options.onSelect === 'function') { 4190 this.options.onSelect.call(this, this.date); 4191 } 4192 } 4193 }, { 4194 key: "setInputValue", 4195 value: function setInputValue() { 4196 this.el.value = this.toString(); 4197 this.$el.trigger('change', { 4198 firedBy: this 4199 }); 4200 } 4201 }, { 4202 key: "_renderDateDisplay", 4203 value: function _renderDateDisplay() { 4204 var displayDate = Datepicker._isDate(this.date) ? this.date : new Date(); 4205 var i18n = this.options.i18n; 4206 var day = i18n.weekdaysShort[displayDate.getDay()]; 4207 var month = i18n.monthsShort[displayDate.getMonth()]; 4208 var date = displayDate.getDate(); 4209 this.yearTextEl.innerHTML = displayDate.getFullYear(); 4210 this.dateTextEl.innerHTML = day + ", " + month + " " + date; 4211 } 4212 /** 4213 * change view to a specific date 4214 */ 4215 4216 }, { 4217 key: "gotoDate", 4218 value: function gotoDate(date) { 4219 var newCalendar = true; 4220 4221 if (!Datepicker._isDate(date)) { 4222 return; 4223 } 4224 4225 if (this.calendars) { 4226 var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), 4227 lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), 4228 visibleDate = date.getTime(); // get the end of the month 4229 4230 lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1); 4231 lastVisibleDate.setDate(lastVisibleDate.getDate() - 1); 4232 newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate; 4233 } 4234 4235 if (newCalendar) { 4236 this.calendars = [{ 4237 month: date.getMonth(), 4238 year: date.getFullYear() 4239 }]; 4240 } 4241 4242 this.adjustCalendars(); 4243 } 4244 }, { 4245 key: "adjustCalendars", 4246 value: function adjustCalendars() { 4247 this.calendars[0] = this.adjustCalendar(this.calendars[0]); 4248 this.draw(); 4249 } 4250 }, { 4251 key: "adjustCalendar", 4252 value: function adjustCalendar(calendar) { 4253 if (calendar.month < 0) { 4254 calendar.year -= Math.ceil(Math.abs(calendar.month) / 12); 4255 calendar.month += 12; 4256 } 4257 4258 if (calendar.month > 11) { 4259 calendar.year += Math.floor(Math.abs(calendar.month) / 12); 4260 calendar.month -= 12; 4261 } 4262 4263 return calendar; 4264 } 4265 }, { 4266 key: "nextMonth", 4267 value: function nextMonth() { 4268 this.calendars[0].month++; 4269 this.adjustCalendars(); 4270 } 4271 }, { 4272 key: "prevMonth", 4273 value: function prevMonth() { 4274 this.calendars[0].month--; 4275 this.adjustCalendars(); 4276 } 4277 }, { 4278 key: "render", 4279 value: function render(year, month, randId) { 4280 var opts = this.options, 4281 now = new Date(), 4282 days = Datepicker._getDaysInMonth(year, month), 4283 before = new Date(year, month, 1).getDay(), 4284 data = [], 4285 row = []; 4286 4287 Datepicker._setToStartOfDay(now); 4288 4289 if (opts.firstDay > 0) { 4290 before -= opts.firstDay; 4291 4292 if (before < 0) { 4293 before += 7; 4294 } 4295 } 4296 4297 var previousMonth = month === 0 ? 11 : month - 1, 4298 nextMonth = month === 11 ? 0 : month + 1, 4299 yearOfPreviousMonth = month === 0 ? year - 1 : year, 4300 yearOfNextMonth = month === 11 ? year + 1 : year, 4301 daysInPreviousMonth = Datepicker._getDaysInMonth(yearOfPreviousMonth, previousMonth); 4302 4303 var cells = days + before, 4304 after = cells; 4305 4306 while (after > 7) { 4307 after -= 7; 4308 } 4309 4310 cells += 7 - after; 4311 var isWeekSelected = false; 4312 4313 for (var i = 0, r = 0; i < cells; i++) { 4314 var day = new Date(year, month, 1 + (i - before)), 4315 isSelected = Datepicker._isDate(this.date) ? Datepicker._compareDates(day, this.date) : false, 4316 isToday = Datepicker._compareDates(day, now), 4317 hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, 4318 isEmpty = i < before || i >= days + before, 4319 dayNumber = 1 + (i - before), 4320 monthNumber = month, 4321 yearNumber = year, 4322 isStartRange = opts.startRange && Datepicker._compareDates(opts.startRange, day), 4323 isEndRange = opts.endRange && Datepicker._compareDates(opts.endRange, day), 4324 isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, 4325 isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && Datepicker._isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day); 4326 4327 if (isEmpty) { 4328 if (i < before) { 4329 dayNumber = daysInPreviousMonth + dayNumber; 4330 monthNumber = previousMonth; 4331 yearNumber = yearOfPreviousMonth; 4332 } else { 4333 dayNumber = dayNumber - days; 4334 monthNumber = nextMonth; 4335 yearNumber = yearOfNextMonth; 4336 } 4337 } 4338 4339 var dayConfig = { 4340 day: dayNumber, 4341 month: monthNumber, 4342 year: yearNumber, 4343 hasEvent: hasEvent, 4344 isSelected: isSelected, 4345 isToday: isToday, 4346 isDisabled: isDisabled, 4347 isEmpty: isEmpty, 4348 isStartRange: isStartRange, 4349 isEndRange: isEndRange, 4350 isInRange: isInRange, 4351 showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths 4352 }; 4353 row.push(this.renderDay(dayConfig)); 4354 4355 if (++r === 7) { 4356 data.push(this.renderRow(row, opts.isRTL, isWeekSelected)); 4357 row = []; 4358 r = 0; 4359 isWeekSelected = false; 4360 } 4361 } 4362 4363 return this.renderTable(opts, data, randId); 4364 } 4365 }, { 4366 key: "renderDay", 4367 value: function renderDay(opts) { 4368 var arr = []; 4369 var ariaSelected = 'false'; 4370 4371 if (opts.isEmpty) { 4372 if (opts.showDaysInNextAndPreviousMonths) { 4373 arr.push('is-outside-current-month'); 4374 arr.push('is-selection-disabled'); 4375 } else { 4376 return '<td class="is-empty"></td>'; 4377 } 4378 } 4379 4380 if (opts.isDisabled) { 4381 arr.push('is-disabled'); 4382 } 4383 4384 if (opts.isToday) { 4385 arr.push('is-today'); 4386 } 4387 4388 if (opts.isSelected) { 4389 arr.push('is-selected'); 4390 ariaSelected = 'true'; 4391 } 4392 4393 if (opts.hasEvent) { 4394 arr.push('has-event'); 4395 } 4396 4397 if (opts.isInRange) { 4398 arr.push('is-inrange'); 4399 } 4400 4401 if (opts.isStartRange) { 4402 arr.push('is-startrange'); 4403 } 4404 4405 if (opts.isEndRange) { 4406 arr.push('is-endrange'); 4407 } 4408 4409 return "<td data-day=\"" + opts.day + "\" class=\"" + arr.join(' ') + "\" aria-selected=\"" + ariaSelected + "\">" + ("<button class=\"datepicker-day-button\" type=\"button\" data-year=\"" + opts.year + "\" data-month=\"" + opts.month + "\" data-day=\"" + opts.day + "\">" + opts.day + "</button>") + '</td>'; 4410 } 4411 }, { 4412 key: "renderRow", 4413 value: function renderRow(days, isRTL, isRowSelected) { 4414 return '<tr class="datepicker-row' + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>'; 4415 } 4416 }, { 4417 key: "renderTable", 4418 value: function renderTable(opts, data, randId) { 4419 return '<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="' + randId + '">' + this.renderHead(opts) + this.renderBody(data) + '</table></div>'; 4420 } 4421 }, { 4422 key: "renderHead", 4423 value: function renderHead(opts) { 4424 var i = void 0, 4425 arr = []; 4426 4427 for (i = 0; i < 7; i++) { 4428 arr.push("<th scope=\"col\"><abbr title=\"" + this.renderDayName(opts, i) + "\">" + this.renderDayName(opts, i, true) + "</abbr></th>"); 4429 } 4430 4431 return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>'; 4432 } 4433 }, { 4434 key: "renderBody", 4435 value: function renderBody(rows) { 4436 return '<tbody>' + rows.join('') + '</tbody>'; 4437 } 4438 }, { 4439 key: "renderTitle", 4440 value: function renderTitle(instance, c, year, month, refYear, randId) { 4441 var i = void 0, 4442 j = void 0, 4443 arr = void 0, 4444 opts = this.options, 4445 isMinYear = year === opts.minYear, 4446 isMaxYear = year === opts.maxYear, 4447 html = '<div id="' + randId + '" class="datepicker-controls" role="heading" aria-live="assertive">', 4448 monthHtml = void 0, 4449 yearHtml = void 0, 4450 prev = true, 4451 next = true; 4452 4453 for (arr = [], i = 0; i < 12; i++) { 4454 arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' + (i === month ? ' selected="selected"' : '') + (isMinYear && i < opts.minMonth || isMaxYear && i > opts.maxMonth ? 'disabled="disabled"' : '') + '>' + opts.i18n.months[i] + '</option>'); 4455 } 4456 4457 monthHtml = '<select class="datepicker-select orig-select-month" tabindex="-1">' + arr.join('') + '</select>'; 4458 4459 if ($.isArray(opts.yearRange)) { 4460 i = opts.yearRange[0]; 4461 j = opts.yearRange[1] + 1; 4462 } else { 4463 i = year - opts.yearRange; 4464 j = 1 + year + opts.yearRange; 4465 } 4466 4467 for (arr = []; i < j && i <= opts.maxYear; i++) { 4468 if (i >= opts.minYear) { 4469 arr.push("<option value=\"" + i + "\" " + (i === year ? 'selected="selected"' : '') + ">" + i + "</option>"); 4470 } 4471 } 4472 4473 yearHtml = "<select class=\"datepicker-select orig-select-year\" tabindex=\"-1\">" + arr.join('') + "</select>"; 4474 var leftArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg>'; 4475 html += "<button class=\"month-prev" + (prev ? '' : ' is-disabled') + "\" type=\"button\">" + leftArrow + "</button>"; 4476 html += '<div class="selects-container">'; 4477 4478 if (opts.showMonthAfterYear) { 4479 html += yearHtml + monthHtml; 4480 } else { 4481 html += monthHtml + yearHtml; 4482 } 4483 4484 html += '</div>'; 4485 4486 if (isMinYear && (month === 0 || opts.minMonth >= month)) { 4487 prev = false; 4488 } 4489 4490 if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { 4491 next = false; 4492 } 4493 4494 var rightArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg>'; 4495 html += "<button class=\"month-next" + (next ? '' : ' is-disabled') + "\" type=\"button\">" + rightArrow + "</button>"; 4496 return html += '</div>'; 4497 } 4498 /** 4499 * refresh the HTML 4500 */ 4501 4502 }, { 4503 key: "draw", 4504 value: function draw(force) { 4505 if (!this.isOpen && !force) { 4506 return; 4507 } 4508 4509 var opts = this.options, 4510 minYear = opts.minYear, 4511 maxYear = opts.maxYear, 4512 minMonth = opts.minMonth, 4513 maxMonth = opts.maxMonth, 4514 html = '', 4515 randId = void 0; 4516 4517 if (this._y <= minYear) { 4518 this._y = minYear; 4519 4520 if (!isNaN(minMonth) && this._m < minMonth) { 4521 this._m = minMonth; 4522 } 4523 } 4524 4525 if (this._y >= maxYear) { 4526 this._y = maxYear; 4527 4528 if (!isNaN(maxMonth) && this._m > maxMonth) { 4529 this._m = maxMonth; 4530 } 4531 } 4532 4533 randId = 'datepicker-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2); 4534 4535 for (var c = 0; c < 1; c++) { 4536 this._renderDateDisplay(); 4537 4538 html += this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId); 4539 } 4540 4541 this.destroySelects(); 4542 this.calendarEl.innerHTML = html; // Init Materialize Select 4543 4544 var yearSelect = this.calendarEl.querySelector('.orig-select-year'); 4545 var monthSelect = this.calendarEl.querySelector('.orig-select-month'); 4546 M.FormSelect.init(yearSelect, { 4547 classes: 'select-year', 4548 dropdownOptions: { 4549 container: document.body, 4550 constrainWidth: false 4551 } 4552 }); 4553 M.FormSelect.init(monthSelect, { 4554 classes: 'select-month', 4555 dropdownOptions: { 4556 container: document.body, 4557 constrainWidth: false 4558 } 4559 }); // Add change handlers for select 4560 4561 yearSelect.addEventListener('change', this._handleYearChange.bind(this)); 4562 monthSelect.addEventListener('change', this._handleMonthChange.bind(this)); 4563 4564 if (typeof this.options.onDraw === 'function') { 4565 this.options.onDraw(this); 4566 } 4567 } 4568 /** 4569 * Setup Event Handlers 4570 */ 4571 4572 }, { 4573 key: "_setupEventHandlers", 4574 value: function _setupEventHandlers() { 4575 this._handleInputKeydownBound = this._handleInputKeydown.bind(this); 4576 this._handleInputClickBound = this._handleInputClick.bind(this); 4577 this._handleInputChangeBound = this._handleInputChange.bind(this); 4578 this._handleCalendarClickBound = this._handleCalendarClick.bind(this); 4579 this._finishSelectionBound = this._finishSelection.bind(this); 4580 this._handleMonthChange = this._handleMonthChange.bind(this); 4581 this._closeBound = this.close.bind(this); 4582 this.el.addEventListener('click', this._handleInputClickBound); 4583 this.el.addEventListener('keydown', this._handleInputKeydownBound); 4584 this.el.addEventListener('change', this._handleInputChangeBound); 4585 this.calendarEl.addEventListener('click', this._handleCalendarClickBound); 4586 this.doneBtn.addEventListener('click', this._finishSelectionBound); 4587 this.cancelBtn.addEventListener('click', this._closeBound); 4588 4589 if (this.options.showClearBtn) { 4590 this._handleClearClickBound = this._handleClearClick.bind(this); 4591 this.clearBtn.addEventListener('click', this._handleClearClickBound); 4592 } 4593 } 4594 }, { 4595 key: "_setupVariables", 4596 value: function _setupVariables() { 4597 var _this56 = this; 4598 4599 this.$modalEl = $(Datepicker._template); 4600 this.modalEl = this.$modalEl[0]; 4601 this.calendarEl = this.modalEl.querySelector('.datepicker-calendar'); 4602 this.yearTextEl = this.modalEl.querySelector('.year-text'); 4603 this.dateTextEl = this.modalEl.querySelector('.date-text'); 4604 4605 if (this.options.showClearBtn) { 4606 this.clearBtn = this.modalEl.querySelector('.datepicker-clear'); 4607 } 4608 4609 this.doneBtn = this.modalEl.querySelector('.datepicker-done'); 4610 this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel'); 4611 this.formats = { 4612 d: function () { 4613 return _this56.date.getDate(); 4614 }, 4615 dd: function () { 4616 var d = _this56.date.getDate(); 4617 4618 return (d < 10 ? '0' : '') + d; 4619 }, 4620 ddd: function () { 4621 return _this56.options.i18n.weekdaysShort[_this56.date.getDay()]; 4622 }, 4623 dddd: function () { 4624 return _this56.options.i18n.weekdays[_this56.date.getDay()]; 4625 }, 4626 m: function () { 4627 return _this56.date.getMonth() + 1; 4628 }, 4629 mm: function () { 4630 var m = _this56.date.getMonth() + 1; 4631 return (m < 10 ? '0' : '') + m; 4632 }, 4633 mmm: function () { 4634 return _this56.options.i18n.monthsShort[_this56.date.getMonth()]; 4635 }, 4636 mmmm: function () { 4637 return _this56.options.i18n.months[_this56.date.getMonth()]; 4638 }, 4639 yy: function () { 4640 return ('' + _this56.date.getFullYear()).slice(2); 4641 }, 4642 yyyy: function () { 4643 return _this56.date.getFullYear(); 4644 } 4645 }; 4646 } 4647 /** 4648 * Remove Event Handlers 4649 */ 4650 4651 }, { 4652 key: "_removeEventHandlers", 4653 value: function _removeEventHandlers() { 4654 this.el.removeEventListener('click', this._handleInputClickBound); 4655 this.el.removeEventListener('keydown', this._handleInputKeydownBound); 4656 this.el.removeEventListener('change', this._handleInputChangeBound); 4657 this.calendarEl.removeEventListener('click', this._handleCalendarClickBound); 4658 } 4659 }, { 4660 key: "_handleInputClick", 4661 value: function _handleInputClick() { 4662 this.open(); 4663 } 4664 }, { 4665 key: "_handleInputKeydown", 4666 value: function _handleInputKeydown(e) { 4667 if (e.which === M.keys.ENTER) { 4668 e.preventDefault(); 4669 this.open(); 4670 } 4671 } 4672 }, { 4673 key: "_handleCalendarClick", 4674 value: function _handleCalendarClick(e) { 4675 if (!this.isOpen) { 4676 return; 4677 } 4678 4679 var $target = $(e.target); 4680 4681 if (!$target.hasClass('is-disabled')) { 4682 if ($target.hasClass('datepicker-day-button') && !$target.hasClass('is-empty') && !$target.parent().hasClass('is-disabled')) { 4683 this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day'))); 4684 4685 if (this.options.autoClose) { 4686 this._finishSelection(); 4687 } 4688 } else if ($target.closest('.month-prev').length) { 4689 this.prevMonth(); 4690 } else if ($target.closest('.month-next').length) { 4691 this.nextMonth(); 4692 } 4693 } 4694 } 4695 }, { 4696 key: "_handleClearClick", 4697 value: function _handleClearClick() { 4698 this.date = null; 4699 this.setInputValue(); 4700 this.close(); 4701 } 4702 }, { 4703 key: "_handleMonthChange", 4704 value: function _handleMonthChange(e) { 4705 this.gotoMonth(e.target.value); 4706 } 4707 }, { 4708 key: "_handleYearChange", 4709 value: function _handleYearChange(e) { 4710 this.gotoYear(e.target.value); 4711 } 4712 /** 4713 * change view to a specific month (zero-index, e.g. 0: January) 4714 */ 4715 4716 }, { 4717 key: "gotoMonth", 4718 value: function gotoMonth(month) { 4719 if (!isNaN(month)) { 4720 this.calendars[0].month = parseInt(month, 10); 4721 this.adjustCalendars(); 4722 } 4723 } 4724 /** 4725 * change view to a specific full year (e.g. "2012") 4726 */ 4727 4728 }, { 4729 key: "gotoYear", 4730 value: function gotoYear(year) { 4731 if (!isNaN(year)) { 4732 this.calendars[0].year = parseInt(year, 10); 4733 this.adjustCalendars(); 4734 } 4735 } 4736 }, { 4737 key: "_handleInputChange", 4738 value: function _handleInputChange(e) { 4739 var date = void 0; // Prevent change event from being fired when triggered by the plugin 4740 4741 if (e.firedBy === this) { 4742 return; 4743 } 4744 4745 if (this.options.parse) { 4746 date = this.options.parse(this.el.value, this.options.format); 4747 } else { 4748 date = new Date(Date.parse(this.el.value)); 4749 } 4750 4751 if (Datepicker._isDate(date)) { 4752 this.setDate(date); 4753 } 4754 } 4755 }, { 4756 key: "renderDayName", 4757 value: function renderDayName(opts, day, abbr) { 4758 day += opts.firstDay; 4759 4760 while (day >= 7) { 4761 day -= 7; 4762 } 4763 4764 return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day]; 4765 } 4766 /** 4767 * Set input value to the selected date and close Datepicker 4768 */ 4769 4770 }, { 4771 key: "_finishSelection", 4772 value: function _finishSelection() { 4773 this.setInputValue(); 4774 this.close(); 4775 } 4776 /** 4777 * Open Datepicker 4778 */ 4779 4780 }, { 4781 key: "open", 4782 value: function open() { 4783 if (this.isOpen) { 4784 return; 4785 } 4786 4787 this.isOpen = true; 4788 4789 if (typeof this.options.onOpen === 'function') { 4790 this.options.onOpen.call(this); 4791 } 4792 4793 this.draw(); 4794 this.modal.open(); 4795 return this; 4796 } 4797 /** 4798 * Close Datepicker 4799 */ 4800 4801 }, { 4802 key: "close", 4803 value: function close() { 4804 if (!this.isOpen) { 4805 return; 4806 } 4807 4808 this.isOpen = false; 4809 4810 if (typeof this.options.onClose === 'function') { 4811 this.options.onClose.call(this); 4812 } 4813 4814 this.modal.close(); 4815 return this; 4816 } 4817 }], [{ 4818 key: "init", 4819 value: function init(els, options) { 4820 return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options); 4821 } 4822 }, { 4823 key: "_isDate", 4824 value: function _isDate(obj) { 4825 return /Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()); 4826 } 4827 }, { 4828 key: "_isWeekend", 4829 value: function _isWeekend(date) { 4830 var day = date.getDay(); 4831 return day === 0 || day === 6; 4832 } 4833 }, { 4834 key: "_setToStartOfDay", 4835 value: function _setToStartOfDay(date) { 4836 if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); 4837 } 4838 }, { 4839 key: "_getDaysInMonth", 4840 value: function _getDaysInMonth(year, month) { 4841 return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; 4842 } 4843 }, { 4844 key: "_isLeapYear", 4845 value: function _isLeapYear(year) { 4846 // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951 4847 return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; 4848 } 4849 }, { 4850 key: "_compareDates", 4851 value: function _compareDates(a, b) { 4852 // weak date comparison (use setToStartOfDay(date) to ensure correct result) 4853 return a.getTime() === b.getTime(); 4854 } 4855 }, { 4856 key: "_setToStartOfDay", 4857 value: function _setToStartOfDay(date) { 4858 if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); 4859 } 4860 /** 4861 * Get Instance 4862 */ 4863 4864 }, { 4865 key: "getInstance", 4866 value: function getInstance(el) { 4867 var domElem = !!el.jquery ? el[0] : el; 4868 return domElem.M_Datepicker; 4869 } 4870 }, { 4871 key: "defaults", 4872 get: function () { 4873 return _defaults; 4874 } 4875 }]); 4876 4877 return Datepicker; 4878 }(Component); 4879 4880 Datepicker._template = ['<div class= "modal datepicker-modal">', '<div class="modal-content datepicker-container">', '<div class="datepicker-date-display">', '<span class="year-text"></span>', '<span class="date-text"></span>', '</div>', '<div class="datepicker-calendar-container">', '<div class="datepicker-calendar"></div>', '<div class="datepicker-footer">', '<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>', '<div class="confirmation-btns">', '<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>', '<button class="btn-flat datepicker-done waves-effect" type="button"></button>', '</div>', '</div>', '</div>', '</div>', '</div>'].join(''); 4881 M.Datepicker = Datepicker; 4882 4883 if (M.jQueryLoaded) { 4884 M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker'); 4885 } 4886 })(cash); 4887 4888 ; 4889 4890 (function ($) { 4891 'use strict'; 4892 4893 var _defaults = { 4894 classes: '', 4895 dropdownOptions: {} 4896 }; 4897 /** 4898 * @class 4899 * 4900 */ 4901 4902 var FormSelect = function (_Component20) { 4903 _inherits(FormSelect, _Component20); 4904 /** 4905 * Construct FormSelect instance 4906 * @constructor 4907 * @param {Element} el 4908 * @param {Object} options 4909 */ 4910 4911 4912 function FormSelect(el, options) { 4913 _classCallCheck(this, FormSelect); // Don't init if browser default version 4914 4915 4916 var _this68 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options)); 4917 4918 if (_this68.$el.hasClass('browser-default')) { 4919 return _possibleConstructorReturn(_this68); 4920 } 4921 4922 _this68.el.M_FormSelect = _this68; 4923 /** 4924 * Options for the select 4925 * @member FormSelect#options 4926 */ 4927 4928 _this68.options = $.extend({}, FormSelect.defaults, options); 4929 _this68.isMultiple = _this68.$el.prop('multiple'); // Setup 4930 4931 _this68.el.tabIndex = -1; 4932 _this68._keysSelected = {}; 4933 _this68._valueDict = {}; // Maps key to original and generated option element. 4934 4935 _this68._setupDropdown(); 4936 4937 _this68._setupEventHandlers(); 4938 4939 return _this68; 4940 } 4941 4942 _createClass(FormSelect, [{ 4943 key: "destroy", 4944 4945 /** 4946 * Teardown component 4947 */ 4948 value: function destroy() { 4949 this._removeEventHandlers(); 4950 4951 this._removeDropdown(); 4952 4953 this.el.M_FormSelect = undefined; 4954 } 4955 /** 4956 * Setup Event Handlers 4957 */ 4958 4959 }, { 4960 key: "_setupEventHandlers", 4961 value: function _setupEventHandlers() { 4962 var _this69 = this; 4963 4964 this._handleSelectChangeBound = this._handleSelectChange.bind(this); 4965 this._handleOptionClickBound = this._handleOptionClick.bind(this); 4966 this._handleInputClickBound = this._handleInputClick.bind(this); 4967 $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { 4968 el.addEventListener('click', _this69._handleOptionClickBound); 4969 }); 4970 this.el.addEventListener('change', this._handleSelectChangeBound); 4971 this.input.addEventListener('click', this._handleInputClickBound); 4972 } 4973 /** 4974 * Remove Event Handlers 4975 */ 4976 4977 }, { 4978 key: "_removeEventHandlers", 4979 value: function _removeEventHandlers() { 4980 var _this70 = this; 4981 4982 $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { 4983 el.removeEventListener('click', _this70._handleOptionClickBound); 4984 }); 4985 this.el.removeEventListener('change', this._handleSelectChangeBound); 4986 this.input.removeEventListener('click', this._handleInputClickBound); 4987 } 4988 /** 4989 * Handle Select Change 4990 * @param {Event} e 4991 */ 4992 4993 }, { 4994 key: "_handleSelectChange", 4995 value: function _handleSelectChange(e) { 4996 this._setValueToInput(); 4997 } 4998 /** 4999 * Handle Option Click 5000 * @param {Event} e 5001 */ 5002 5003 }, { 5004 key: "_handleOptionClick", 5005 value: function _handleOptionClick(e) { 5006 e.preventDefault(); 5007 var option = $(e.target).closest('li')[0]; 5008 var key = option.id; 5009 5010 if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup') && key.length) { 5011 var selected = true; 5012 5013 if (this.isMultiple) { 5014 // Deselect placeholder option if still selected. 5015 var placeholderOption = $(this.dropdownOptions).find('li.disabled.selected'); 5016 5017 if (placeholderOption.length) { 5018 placeholderOption.removeClass('selected'); 5019 placeholderOption.find('input[type="checkbox"]').prop('checked', false); 5020 5021 this._toggleEntryFromArray(placeholderOption[0].id); 5022 } 5023 5024 selected = this._toggleEntryFromArray(key); 5025 } else { 5026 $(this.dropdownOptions).find('li').removeClass('selected'); 5027 $(option).toggleClass('selected', selected); 5028 } // Set selected on original select option 5029 // Only trigger if selected state changed 5030 5031 5032 var prevSelected = $(this._valueDict[key].el).prop('selected'); 5033 5034 if (prevSelected !== selected) { 5035 $(this._valueDict[key].el).prop('selected', selected); 5036 this.$el.trigger('change'); 5037 } 5038 } 5039 5040 e.stopPropagation(); 5041 } 5042 /** 5043 * Handle Input Click 5044 */ 5045 5046 }, { 5047 key: "_handleInputClick", 5048 value: function _handleInputClick() { 5049 if (this.dropdown && this.dropdown.isOpen) { 5050 this._setValueToInput(); 5051 5052 this._setSelectedStates(); 5053 } 5054 } 5055 /** 5056 * Setup dropdown 5057 */ 5058 5059 }, { 5060 key: "_setupDropdown", 5061 value: function _setupDropdown() { 5062 var _this71 = this; 5063 5064 this.wrapper = document.createElement('div'); 5065 $(this.wrapper).addClass('select-wrapper ' + this.options.classes); 5066 this.$el.before($(this.wrapper)); 5067 this.wrapper.appendChild(this.el); 5068 5069 if (this.el.disabled) { 5070 this.wrapper.classList.add('disabled'); 5071 } // Create dropdown 5072 5073 5074 this.$selectOptions = this.$el.children('option, optgroup'); 5075 this.dropdownOptions = document.createElement('ul'); 5076 this.dropdownOptions.id = "select-options-" + M.guid(); 5077 $(this.dropdownOptions).addClass('dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : '')); // Create dropdown structure. 5078 5079 if (this.$selectOptions.length) { 5080 this.$selectOptions.each(function (el) { 5081 if ($(el).is('option')) { 5082 // Direct descendant option. 5083 var optionEl = void 0; 5084 5085 if (_this71.isMultiple) { 5086 optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'multiple'); 5087 } else { 5088 optionEl = _this71._appendOptionWithIcon(_this71.$el, el); 5089 } 5090 5091 _this71._addOptionToValueDict(el, optionEl); 5092 } else if ($(el).is('optgroup')) { 5093 // Optgroup. 5094 var selectOptions = $(el).children('option'); 5095 $(_this71.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]); 5096 selectOptions.each(function (el) { 5097 var optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'optgroup-option'); 5098 5099 _this71._addOptionToValueDict(el, optionEl); 5100 }); 5101 } 5102 }); 5103 } 5104 5105 this.$el.after(this.dropdownOptions); // Add input dropdown 5106 5107 this.input = document.createElement('input'); 5108 $(this.input).addClass('select-dropdown dropdown-trigger'); 5109 this.input.setAttribute('type', 'text'); 5110 this.input.setAttribute('readonly', 'true'); 5111 this.input.setAttribute('data-target', this.dropdownOptions.id); 5112 5113 if (this.el.disabled) { 5114 $(this.input).prop('disabled', 'true'); 5115 } 5116 5117 this.$el.before(this.input); 5118 5119 this._setValueToInput(); // Add caret 5120 5121 5122 var dropdownIcon = $('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); 5123 this.$el.before(dropdownIcon[0]); // Initialize dropdown 5124 5125 if (!this.el.disabled) { 5126 var dropdownOptions = $.extend({}, this.options.dropdownOptions); // Add callback for centering selected option when dropdown content is scrollable 5127 5128 dropdownOptions.onOpenEnd = function (el) { 5129 var selectedOption = $(_this71.dropdownOptions).find('.selected').first(); 5130 5131 if (selectedOption.length) { 5132 // Focus selected option in dropdown 5133 M.keyDown = true; 5134 _this71.dropdown.focusedIndex = selectedOption.index(); 5135 5136 _this71.dropdown._focusFocusedItem(); 5137 5138 M.keyDown = false; // Handle scrolling to selected option 5139 5140 if (_this71.dropdown.isScrollable) { 5141 var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option 5142 5143 5144 scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown 5145 5146 _this71.dropdownOptions.scrollTop = scrollOffset; 5147 } 5148 } 5149 }; 5150 5151 if (this.isMultiple) { 5152 dropdownOptions.closeOnClick = false; 5153 } 5154 5155 this.dropdown = M.Dropdown.init(this.input, dropdownOptions); 5156 } // Add initial selections 5157 5158 5159 this._setSelectedStates(); 5160 } 5161 /** 5162 * Add option to value dict 5163 * @param {Element} el original option element 5164 * @param {Element} optionEl generated option element 5165 */ 5166 5167 }, { 5168 key: "_addOptionToValueDict", 5169 value: function _addOptionToValueDict(el, optionEl) { 5170 var index = Object.keys(this._valueDict).length; 5171 var key = this.dropdownOptions.id + index; 5172 var obj = {}; 5173 optionEl.id = key; 5174 obj.el = el; 5175 obj.optionEl = optionEl; 5176 this._valueDict[key] = obj; 5177 } 5178 /** 5179 * Remove dropdown 5180 */ 5181 5182 }, { 5183 key: "_removeDropdown", 5184 value: function _removeDropdown() { 5185 $(this.wrapper).find('.caret').remove(); 5186 $(this.input).remove(); 5187 $(this.dropdownOptions).remove(); 5188 $(this.wrapper).before(this.$el); 5189 $(this.wrapper).remove(); 5190 } 5191 /** 5192 * Setup dropdown 5193 * @param {Element} select select element 5194 * @param {Element} option option element from select 5195 * @param {String} type 5196 * @return {Element} option element added 5197 */ 5198 5199 }, { 5200 key: "_appendOptionWithIcon", 5201 value: function _appendOptionWithIcon(select, option, type) { 5202 // Add disabled attr if disabled 5203 var disabledClass = option.disabled ? 'disabled ' : ''; 5204 var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : ''; 5205 var multipleCheckbox = this.isMultiple ? "<label><input type=\"checkbox\"" + disabledClass + "\"/><span>" + option.innerHTML + "</span></label>" : option.innerHTML; 5206 var liEl = $('<li></li>'); 5207 var spanEl = $('<span></span>'); 5208 spanEl.html(multipleCheckbox); 5209 liEl.addClass(disabledClass + " " + optgroupClass); 5210 liEl.append(spanEl); // add icons 5211 5212 var iconUrl = option.getAttribute('data-icon'); 5213 5214 if (!!iconUrl) { 5215 var imgEl = $("<img alt=\"\" src=\"" + iconUrl + "\">"); 5216 liEl.prepend(imgEl); 5217 } // Check for multiple type. 5218 5219 5220 $(this.dropdownOptions).append(liEl[0]); 5221 return liEl[0]; 5222 } 5223 /** 5224 * Toggle entry from option 5225 * @param {String} key Option key 5226 * @return {Boolean} if entry was added or removed 5227 */ 5228 5229 }, { 5230 key: "_toggleEntryFromArray", 5231 value: function _toggleEntryFromArray(key) { 5232 var notAdded = !this._keysSelected.hasOwnProperty(key); 5233 var $optionLi = $(this._valueDict[key].optionEl); 5234 5235 if (notAdded) { 5236 this._keysSelected[key] = true; 5237 } else { 5238 delete this._keysSelected[key]; 5239 } 5240 5241 $optionLi.toggleClass('selected', notAdded); // Set checkbox checked value 5242 5243 $optionLi.find('input[type="checkbox"]').prop('checked', notAdded); // use notAdded instead of true (to detect if the option is selected or not) 5244 5245 $optionLi.prop('selected', notAdded); 5246 return notAdded; 5247 } 5248 /** 5249 * Set text value to input 5250 */ 5251 5252 }, { 5253 key: "_setValueToInput", 5254 value: function _setValueToInput() { 5255 var values = []; 5256 var options = this.$el.find('option'); 5257 options.each(function (el) { 5258 if ($(el).prop('selected')) { 5259 var text = $(el).text(); 5260 values.push(text); 5261 } 5262 }); 5263 5264 if (!values.length) { 5265 var firstDisabled = this.$el.find('option:disabled').eq(0); 5266 5267 if (firstDisabled.length && firstDisabled[0].value === '') { 5268 values.push(firstDisabled.text()); 5269 } 5270 } 5271 5272 this.input.value = values.join(', '); 5273 } 5274 /** 5275 * Set selected state of dropdown to match actual select element 5276 */ 5277 5278 }, { 5279 key: "_setSelectedStates", 5280 value: function _setSelectedStates() { 5281 this._keysSelected = {}; 5282 5283 for (var key in this._valueDict) { 5284 var option = this._valueDict[key]; 5285 var optionIsSelected = $(option.el).prop('selected'); 5286 $(option.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected); 5287 5288 if (optionIsSelected) { 5289 this._activateOption($(this.dropdownOptions), $(option.optionEl)); 5290 5291 this._keysSelected[key] = true; 5292 } else { 5293 $(option.optionEl).removeClass('selected'); 5294 } 5295 } 5296 } 5297 /** 5298 * Make option as selected and scroll to selected position 5299 * @param {jQuery} collection Select options jQuery element 5300 * @param {Element} newOption element of the new option 5301 */ 5302 5303 }, { 5304 key: "_activateOption", 5305 value: function _activateOption(collection, newOption) { 5306 if (newOption) { 5307 if (!this.isMultiple) { 5308 collection.find('li.selected').removeClass('selected'); 5309 } 5310 5311 var option = $(newOption); 5312 option.addClass('selected'); 5313 } 5314 } 5315 /** 5316 * Get Selected Values 5317 * @return {Array} Array of selected values 5318 */ 5319 5320 }, { 5321 key: "getSelectedValues", 5322 value: function getSelectedValues() { 5323 var selectedValues = []; 5324 5325 for (var key in this._keysSelected) { 5326 selectedValues.push(this._valueDict[key].el.value); 5327 } 5328 5329 return selectedValues; 5330 } 5331 }], [{ 5332 key: "init", 5333 value: function init(els, options) { 5334 return _get(FormSelect.__proto__ || Object.getPrototypeOf(FormSelect), "init", this).call(this, this, els, options); 5335 } 5336 /** 5337 * Get Instance 5338 */ 5339 5340 }, { 5341 key: "getInstance", 5342 value: function getInstance(el) { 5343 var domElem = !!el.jquery ? el[0] : el; 5344 return domElem.M_FormSelect; 5345 } 5346 }, { 5347 key: "defaults", 5348 get: function () { 5349 return _defaults; 5350 } 5351 }]); 5352 5353 return FormSelect; 5354 }(Component); 5355 5356 M.FormSelect = FormSelect; 5357 5358 if (M.jQueryLoaded) { 5359 M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect'); 5360 } 5361 })(cash); 5362 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"), __webpack_require__("jquery"), __webpack_require__("../node_modules/webpack/buildin/global.js"))) 5363 5364 /***/ }), 5365 5366 /***/ "./scripts/progressbar.js": 5367 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5368 5369 "use strict"; 5370 __webpack_require__.r(__webpack_exports__); 5371 /* WEBPACK VAR INJECTION */(function($) {function progressBar() { 5372 $('.sh-gauge').each(function () { 5373 var target = $(this); // Cast `null` to 0 5374 5375 const numericScore = Number(target.data('percent')); 5376 const gaugeArc = $('.sh-gauge__arc'); // 352 is ~= 2 * Math.PI * gauge radius (56) 5377 // https://codepen.io/xgad/post/svg-radial-progress-meters 5378 // score of 50: `stroke-dasharray: 176 352`; 5379 5380 /** @type {?SVGCircleElement} */ 5381 5382 if (gaugeArc) { 5383 var cssDash = numericScore * 352 / 100; 5384 $(gaugeArc).css({ 5385 strokeDasharray: cssDash + ' 352' 5386 }); 5387 } 5388 }); 5389 } 5390 5391 /* harmony default export */ __webpack_exports__["default"] = (progressBar); 5392 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"))) 5393 5394 /***/ }), 5395 5396 /***/ "./scripts/repeatrow.js": 5397 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5398 5399 "use strict"; 5400 __webpack_require__.r(__webpack_exports__); 5401 /* WEBPACK VAR INJECTION */(function(jQuery, $) {function repeatRow() { 5402 // Prepare new attributes for the repeating section 5403 var attrs = ['for', 'id', 'name']; 5404 5405 function resetAttributeNames(section, num) { 5406 var tags = section.find('input, label'); 5407 tags.each(function () { 5408 var $this = jQuery(this); 5409 jQuery.each(attrs, function (i, attr) { 5410 var attr_val = $this.attr(attr); 5411 5412 if (attr_val) { 5413 $this.attr(attr, attr_val.replace(/\[workFields\]\[\d+\]\[/, '[workFields][' + (num + 1) + '][')); 5414 } 5415 }); 5416 }); 5417 } // Clone the previous workField, and remove all of the values 5418 5419 5420 $('.repeat').click(function (e) { 5421 e.preventDefault(); 5422 var lastRepeatingGroup = jQuery('.repeating:last-of-type'); 5423 var num = parseInt(lastRepeatingGroup.attr('data-number')); 5424 var cloned = lastRepeatingGroup.clone(true); 5425 cloned.find('input:not(:radio)').val(''); 5426 cloned.find('select').val(''); 5427 cloned.find('input:radio').attr('checked', false); 5428 cloned.hide(); 5429 cloned.insertAfter(lastRepeatingGroup); 5430 cloned.fadeIn(500); 5431 cloned.attr('data-number', num + 1); 5432 resetAttributeNames(cloned, num); 5433 cloned.find('input.time-used').attr('checked', true); // sets new repeated time.used button to checked. 5434 5435 cloned.find('.datepicker').datepicker({ 5436 format: 'dd-mm-yyyy', 5437 defaultDate: new Date(), 5438 setDefaultDate: true 5439 }); 5440 }); 5441 } 5442 5443 /* harmony default export */ __webpack_exports__["default"] = (repeatRow); 5444 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"), __webpack_require__("jquery"))) 5445 5446 /***/ }), 5447 5448 /***/ "./scripts/support-hours-admin.js": 5449 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5450 5451 "use strict"; 5452 __webpack_require__.r(__webpack_exports__); 5453 /* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var _materialize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./scripts/materialize.js"); 5454 /* harmony import */ var _materialize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_materialize__WEBPACK_IMPORTED_MODULE_0__); 5455 /* harmony import */ var _progressbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./scripts/progressbar.js"); 5456 /* harmony import */ var _timeInput_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./scripts/timeInput.js"); 5457 /* harmony import */ var _repeatrow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./scripts/repeatrow.js"); 5458 /* harmony import */ var _workTableHelpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./scripts/workTableHelpers.js"); 5459 5460 5461 5462 5463 5464 5465 (function ($) { 5466 var SupportHours = { 5467 common: { 5468 init: function () { 5469 Object(_timeInput_js__WEBPACK_IMPORTED_MODULE_2__["default"])(); 5470 Object(_repeatrow_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); 5471 Object(_workTableHelpers_js__WEBPACK_IMPORTED_MODULE_4__["default"])(); 5472 }, 5473 finalize: function () { 5474 Object(_progressbar_js__WEBPACK_IMPORTED_MODULE_1__["default"])(); 5475 } 5476 } 5477 }; 5478 var UTIL = { 5479 fire: function (func, funcname, args) { 5480 var fire; 5481 var namespace = SupportHours; 5482 funcname = funcname === undefined ? 'init' : funcname; 5483 fire = func !== ''; 5484 fire = fire && namespace[func]; 5485 fire = fire && typeof namespace[func][funcname] === 'function'; 5486 5487 if (fire) { 5488 namespace[func][funcname](args); 5489 } 5490 }, 5491 loadEvents: function () { 5492 UTIL.fire('common'); 5493 UTIL.fire('common', 'finalize'); 5494 } 5495 }; // Load Events 5496 5497 $(document).ready(UTIL.loadEvents); 5498 })(jQuery); // Fully reference jQuery after this point. 5499 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"))) 5500 5501 /***/ }), 5502 5503 /***/ "./scripts/timeInput.js": 5504 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5505 5506 "use strict"; 5507 __webpack_require__.r(__webpack_exports__); 5508 /* WEBPACK VAR INJECTION */(function($) {function timeInput() { 5509 // regexpression for matching xx:xx (4 digits at max) 5510 var $regexname = /^\d{2,3}\:(([0-5]){1}.$([0-9]|){1}$)/; 5511 $('.time').change(function () { 5512 if (!$(this).val().match($regexname)) { 5513 $(this).next().removeClass('hidden'); 5514 $('input[type="submit"]').attr('disabled', 'disabled'); 5515 } else if ($(this).val().match('')) { 5516 //$(this).next().addClass('hidden'); 5517 $('input[type="submit"]').removeAttr('disabled'); 5518 } else { 5519 $(this).next().addClass('hidden'); 5520 $('input[type="submit"]').removeAttr('disabled'); 5521 } 5522 }); 5523 } 5524 5525 /* harmony default export */ __webpack_exports__["default"] = (timeInput); 5526 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"))) 5527 5528 /***/ }), 5529 5530 /***/ "./scripts/workTableHelpers.js": 5531 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5532 5533 "use strict"; 5534 __webpack_require__.r(__webpack_exports__); 5535 /* WEBPACK VAR INJECTION */(function($) {function workTableHelpers() { 5536 // remove workFields row. 5537 $('.remove-row').click(function (e) { 5538 $(this).parents('.repeating').fadeOut(500, function () { 5539 $(this).remove(); 5540 }); 5541 }); 5542 $('.datepicker').datepicker({ 5543 format: 'dd-mm-yyyy', 5544 defaultDate: new Date() 5545 }); 5546 } 5547 5548 /* harmony default export */ __webpack_exports__["default"] = (workTableHelpers); 5549 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("jquery"))) 5550 5551 /***/ }), 5552 5553 /***/ "./styles/support-hours-admin.scss": 5554 /***/ (function(module, exports, __webpack_require__) { 5555 5556 // extracted by mini-css-extract-plugin 5557 5558 /***/ }), 5559 5560 /***/ 0: 5561 /***/ (function(module, exports, __webpack_require__) { 5562 5563 __webpack_require__("./scripts/support-hours-admin.js"); 5564 module.exports = __webpack_require__("./styles/support-hours-admin.scss"); 5565 5566 5567 /***/ }), 5568 5569 /***/ "jquery": 5570 /***/ (function(module, exports) { 5571 5572 module.exports = jQuery; 5573 5574 /***/ }) 5575 5576 /******/ }); 1 /*! For license information please see support-hours-admin.js.LICENSE.txt */ 2 !function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=jQuery},function(e,t,n){"use strict";(function(e){t.a=function(){e(".sh-gauge").each((function(){var t=e(this);var n=352*Number(t.data("percent"))/100;e(".sh-gauge__arc").css({strokeDasharray:n+" 352"})}))}}).call(this,n(0))},function(e,t,n){"use strict";(function(e){t.a=function(){var t=/^\d{2,3}\:(([0-5]){1}.$([0-9]|){1}$)/;e(".time").on("change",(function(){e(this).val().match(t)?(e(this).val().match("")||e(this).next().addClass("hidden"),e('input[type="submit"]').removeAttr("disabled")):(e(this).next().removeClass("hidden"),e('input[type="submit"]').attr("disabled","disabled"))}))}}).call(this,n(0))},function(e,t,n){"use strict";(function(e,n){t.a=function(){var t=["for","id","name"];n(".repeat").on("click",(function(n){n.preventDefault();var i=e(".repeating:last-of-type"),o=parseInt(i.attr("data-number")),r=i.clone(!0);r.find("input:not(:radio)").val(""),r.find("select").val(""),r.find("input:radio").attr("checked",!1),r.hide(),r.insertAfter(i),r.fadeIn(500),r.attr("data-number",o+1),function(n,i){n.find("input, label").each((function(){var n=e(this);e.each(t,(function(e,t){var o=n.attr(t);o&&n.attr(t,o.replace(/\[workFields\]\[\d+\]\[/,"[workFields]["+(i+1)+"]["))}))}))}(r,o),r.find("input.time-used").attr("checked",!0),r.find(".datepicker").datepicker({format:"dd-mm-yyyy",defaultDate:new Date,setDefaultDate:!0})}))}}).call(this,n(0),n(0))},function(e,t,n){"use strict";(function(e){t.a=function(){e(".remove-row").on("click",(function(){e(this).parents(".repeating").fadeOut(500,(function(){e(this).remove()}))})),e(".datepicker").datepicker({format:"dd-mm-yyyy",defaultDate:new Date})}}).call(this,n(0))},function(e,t,n){n(6),e.exports=n(9)},function(e,t,n){"use strict";n.r(t),function(e){n(7);var t,i,o=n(1),r=n(2),a=n(3),s=n(4);t={common:{init:function(){Object(r.a)(),Object(a.a)(),Object(s.a)(),Object(o.a)()},finalize:function(){}}},i={fire:function(e,n,i){var o=t;n=void 0===n?"init":n,""!==e&&o[e]&&"function"==typeof o[e][n]&&o[e][n](i)},loadEvents:function(){i.fire("common"),i.fire("common","finalize")}},e(document).ready(i.loadEvents)}.call(this,n(0))},function(e,t,n){(function(n,i,o){var r,a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var e,t=document,n=window,i=Array.prototype,o=i.slice,r=i.filter,a=i.push,s=function(){},l=function(e){return typeof e==typeof s&&e.call},u=function(e){return"string"==typeof e},d=/^#[\w-]*$/,c=/^\.[\w-]*$/,h=/<.+>/,p=/^\w+$/;function f(e,n){return n=n||t,c.test(e)?n.getElementsByClassName(e.slice(1)):p.test(e)?n.getElementsByTagName(e):n.querySelectorAll(e)}function v(n){if(!e){var i=(e=t.implementation.createHTMLDocument(null)).createElement("base");i.href=t.location.href,e.head.appendChild(i)}return e.body.innerHTML=n,e.body.childNodes}function y(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function g(e,i){if(!e)return this;if(e.cash&&e!==n)return e;var o,r=e,a=0;if(u(e))r=d.test(e)?t.getElementById(e.slice(1)):h.test(e)?v(e):f(e,i);else if(l(e))return y(e),this;if(!r)return this;if(r.nodeType||r===n)this[0]=r,this.length=1;else for(o=this.length=r.length;a<o;a++)this[a]=r[a];return this}function m(e,t){return new g(e,t)}var b=m.fn=m.prototype=g.prototype={cash:!0,length:0,push:a,splice:i.splice,map:i.map,init:g};function w(e,t){for(var n=e.length,i=0;i<n&&!1!==t.call(e[i],e[i],i,e);i++);}function _(e,t){var n=e&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function k(e){return u(e)?_:e.cash?function(t){return e.is(t)}:function(e,t){return e===t}}function M(e){return m(o.call(e).filter((function(e,t,n){return n.indexOf(e)===t})))}Object.defineProperty(b,"constructor",{value:m}),m.parseHTML=v,m.noop=s,m.isFunction=l,m.isString=u,m.extend=b.extend=function(e){e=e||{};var t=o.call(arguments),n=t.length,i=1;for(1===t.length&&(e=this,i=0);i<n;i++)if(t[i])for(var r in t[i])t[i].hasOwnProperty(r)&&(e[r]=t[i][r]);return e},m.extend({merge:function(e,t){for(var n=+t.length,i=e.length,o=0;o<n;i++,o++)e[i]=t[o];return e.length=i,e},each:w,matches:_,unique:M,isArray:Array.isArray,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}});var O=m.uid="_cash"+Date.now();function E(e){return e[O]=e[O]||{}}function D(e,t,n){return E(e)[t]=n}function C(e,t){var n=E(e);return void 0===n[t]&&(n[t]=e.dataset?e.dataset[t]:m(e).attr("data-"+t)),n[t]}function x(e,t){var n=E(e);n?delete n[t]:e.dataset?delete e.dataset[t]:m(e).removeAttr("data-"+name)}b.extend({data:function(e,t){if(u(e))return void 0===t?C(this[0],e):this.each((function(n){return D(n,e,t)}));for(var n in e)this.data(n,e[n]);return this},removeData:function(e){return this.each((function(t){return x(t,e)}))}});var S=/\S+/g;function T(e){return u(e)&&e.match(S)}function L(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function B(e,t,n){e.classList?e.classList.add(t):n.indexOf(" "+t+" ")&&(e.className+=" "+t)}function I(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(t,"")}b.extend({addClass:function(e){var t=T(e);return t?this.each((function(e){var n=" "+e.className+" ";w(t,(function(t){B(e,t,n)}))})):this},attr:function(e,t){if(e){if(u(e))return void 0===t?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each((function(n){n.setAttribute?n.setAttribute(e,t):n[e]=t}));for(var n in e)this.attr(n,e[n]);return this}},hasClass:function(e){var t=!1,n=T(e);return n&&n.length&&this.each((function(e){return!(t=L(e,n[0]))})),t},prop:function(e,t){if(u(e))return void 0===t?this[0][e]:this.each((function(n){n[e]=t}));for(var n in e)this.prop(n,e[n]);return this},removeAttr:function(e){return this.each((function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]}))},removeClass:function(e){if(!arguments.length)return this.attr("class","");var t=T(e);return t?this.each((function(e){w(t,(function(t){I(e,t)}))})):this},removeProp:function(e){return this.each((function(t){delete t[e]}))},toggleClass:function(e,t){if(void 0!==t)return this[t?"addClass":"removeClass"](e);var n=T(e);return n?this.each((function(e){var t=" "+e.className+" ";w(n,(function(n){L(e,n)?I(e,n):B(e,n,t)}))})):this}}),b.extend({add:function(e,t){return M(m.merge(this,m(e,t)))},each:function(e){return w(this,e),this},eq:function(e){return m(this.get(e))},filter:function(e){if(!e)return this;var t=l(e)?e:k(e);return m(r.call(this,(function(n){return t(n,e)})))},first:function(){return this.eq(0)},get:function(e){return void 0===e?o.call(this):e<0?this[e+this.length]:this[e]},index:function(e){var t=e?m(e)[0]:this[0],n=e?this:m(t).parent().children();return o.call(n).indexOf(t)},last:function(){return this.eq(-1)}});var A,j,R,P,F=(R=/(?:^\w|[A-Z]|\b\w)/g,P=/[\s-_]+/g,function(e){return e.replace(R,(function(e,t){return e[0===t?"toLowerCase":"toUpperCase"]()})).replace(P,"")}),N=(A={},j=document.createElement("div").style,function(e){if(e=F(e),A[e])return A[e];var t=e.charAt(0).toUpperCase()+e.slice(1);return w((e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" "),(function(t){if(t in j)return A[t]=e=A[e]=t,!1})),A[e]});function H(e,t){return parseInt(n.getComputedStyle(e[0],null)[t],10)||0}function $(e,t,n){var i=C(e,"_cashEvents")||D(e,"_cashEvents",{});i[t]=i[t]||[],i[t].push(n),e.addEventListener(t,n)}function q(e,t,n){var i,o=C(e,"_cashEvents"),r=o&&o[t];r&&(n?(e.removeEventListener(t,n),(i=r.indexOf(n))>=0&&r.splice(i,1)):(w(r,(function(n){e.removeEventListener(t,n)})),r=[]))}function W(e,t){return"&"+encodeURIComponent(e)+"="+encodeURIComponent(t).replace(/%20/g,"+")}function Y(e){var t=[];return w(e.options,(function(e){e.selected&&t.push(e.value)})),t.length?t:null}function z(e){var t=e.selectedIndex;return t>=0?e.options[t].value:null}function Q(e){var t=e.type;if(!t)return null;switch(t.toLowerCase()){case"select-one":return z(e);case"select-multiple":return Y(e);case"radio":case"checkbox":return e.checked?e.value:null;default:return e.value?e.value:null}}function K(e,t,n){if(n){var i=e.childNodes[0];e.insertBefore(t,i)}else e.appendChild(t)}function V(e,t,n){var i=u(t);i||!t.length?w(e,i?function(e){return e.insertAdjacentHTML(n?"afterbegin":"beforeend",t)}:function(e,i){return K(e,0===i?t:t.cloneNode(!0),n)}):w(t,(function(t){return V(e,t,n)}))}m.prefixedProp=N,m.camelCase=F,b.extend({css:function(e,t){if(u(e))return e=N(e),arguments.length>1?this.each((function(n){return n.style[e]=t})):n.getComputedStyle(this[0])[e];for(var i in e)this.css(i,e[i]);return this}}),w(["Width","Height"],(function(e){var t=e.toLowerCase();b[t]=function(){return this[0].getBoundingClientRect()[t]},b["inner"+e]=function(){return this[0]["client"+e]},b["outer"+e]=function(t){return this[0]["offset"+e]+(t?H(this,"margin"+("Width"===e?"Left":"Top"))+H(this,"margin"+("Width"===e?"Right":"Bottom")):0)}})),b.extend({off:function(e,t){return this.each((function(n){return q(n,e,t)}))},on:function(e,t,n,i){var o;if(!u(e)){for(var r in e)this.on(r,t,e[r]);return this}return l(t)&&(n=t,t=null),"ready"===e?(y(n),this):(t&&(o=n,n=function(e){for(var n=e.target;!_(n,t);){if(n===this||null===n)return!1;n=n.parentNode}n&&o.call(n,e)}),this.each((function(t){var o=n;i&&(o=function(){n.apply(this,arguments),q(t,e,o)}),$(t,e,o)})))},one:function(e,t,n){return this.on(e,t,n,!0)},ready:y,trigger:function(e,t){if(document.createEvent){var n=document.createEvent("HTMLEvents");return n.initEvent(e,!0,!1),n=this.extend(n,t),this.each((function(e){return e.dispatchEvent(n)}))}}}),b.extend({serialize:function(){var e="";return w(this[0].elements||this,(function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var n=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=Q(t);null!==i&&w(i,(function(t){e+=W(n,t)}));break;default:var o=Q(t);null!==o&&(e+=W(n,o))}}})),e.substr(1)},val:function(e){return void 0===e?Q(this[0]):this.each((function(t){return t.value=e}))}}),b.extend({after:function(e){return m(e).insertAfter(this),this},append:function(e){return V(this,e),this},appendTo:function(e){return V(m(e),this),this},before:function(e){return m(e).insertBefore(this),this},clone:function(){return m(this.map((function(e){return e.cloneNode(!0)})))},empty:function(){return this.html(""),this},html:function(e){if(void 0===e)return this[0].innerHTML;var t=e.nodeType?e[0].outerHTML:e;return this.each((function(e){return e.innerHTML=t}))},insertAfter:function(e){var t=this;return m(e).each((function(e,n){var i=e.parentNode,o=e.nextSibling;t.each((function(e){i.insertBefore(0===n?e:e.cloneNode(!0),o)}))})),this},insertBefore:function(e){var t=this;return m(e).each((function(e,n){var i=e.parentNode;t.each((function(t){i.insertBefore(0===n?t:t.cloneNode(!0),e)}))})),this},prepend:function(e){return V(this,e,!0),this},prependTo:function(e){return V(m(e),this,!0),this},remove:function(){return this.each((function(e){if(e.parentNode)return e.parentNode.removeChild(e)}))},text:function(e){return void 0===e?this[0].textContent:this.each((function(t){return t.textContent=e}))}});var X=t.documentElement;return b.extend({position:function(){var e=this[0];return{left:e.offsetLeft,top:e.offsetTop}},offset:function(){var e=this[0].getBoundingClientRect();return{top:e.top+n.pageYOffset-X.clientTop,left:e.left+n.pageXOffset-X.clientLeft}},offsetParent:function(){return m(this[0].offsetParent)}}),b.extend({children:function(e){var t=[];return this.each((function(e){a.apply(t,e.children)})),t=M(t),e?t.filter((function(t){return _(t,e)})):t},closest:function(e){return!e||this.length<1?m():this.is(e)?this.filter(e):this.parent().closest(e)},is:function(e){if(!e)return!1;var t=!1,n=k(e);return this.each((function(i){return!(t=n(i,e))})),t},find:function(e){if(!e||e.nodeType)return m(e&&this.has(e).length?e:null);var t=[];return this.each((function(n){a.apply(t,f(e,n))})),M(t)},has:function(e){var t=u(e)?function(t){return 0!==f(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return m(this[0].nextElementSibling)},not:function(e){if(!e)return this;var t=k(e);return this.filter((function(n){return!t(n,e)}))},parent:function(){var e=[];return this.each((function(t){t&&t.parentNode&&e.push(t.parentNode)})),M(e)},parents:function(e){var n,i=[];return this.each((function(o){for(n=o;n&&n.parentNode&&n!==t.body.parentNode;)n=n.parentNode,(!e||e&&_(n,e))&&i.push(n)})),M(i)},prev:function(){return m(this[0].previousElementSibling)},siblings:function(e){var t=this.parent().children(e),n=this[0];return t.filter((function(e){return e!==n}))}}),m}();var c=function(){function e(t,n,i){d(this,e),n instanceof Element||console.error(Error(n+" is not an HTML Element"));var o=t.getInstance(n);o&&o.destroy(),this.el=n,this.$el=cash(n)}return s(e,null,[{key:"init",value:function(e,t,n){var i=null;if(t instanceof Element)i=new e(t,n);else if(t&&(t.jquery||t.cash||t instanceof NodeList)){for(var o=[],r=0;r<t.length;r++)o.push(new e(t[r],n));i=o}return i}}]),e}();!function(e){e.Package?M={}:e.M={},M.jQueryLoaded=!!e.jQuery}(window),void 0===(r=function(){return M}.apply(t,[]))||(e.exports=r),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;document.addEventListener("keydown",(function(e){M.keyDown=!0,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!0)}),!0),document.addEventListener("keyup",(function(e){M.keyDown=!1,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!1)}),!0),document.addEventListener("focus",(function(e){M.keyDown&&document.body.classList.add("keyboard-focused")}),!0),document.addEventListener("blur",(function(e){document.body.classList.remove("keyboard-focused")}),!0),M.initializeJqueryWrapper=function(e,t,i){n.fn[t]=function(o){if(e.prototype[o]){var r=Array.prototype.slice.call(arguments,1);if("get"===o.slice(0,3)){var a=this.first()[0][i];return a[o].apply(a,r)}return this.each((function(){var e=this[i];e[o].apply(e,r)}))}if("object"==typeof o||!o)return e.init(this,arguments[0]),this;n.error("Method "+o+" does not exist on jQuery."+t)}},M.AutoInit=function(e){var t=e||document.body,n={Autocomplete:t.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:t.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:t.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:t.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:t.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:t.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:t.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:t.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:t.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:t.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:t.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:t.querySelectorAll("select:not(.no-autoinit)"),Sidenav:t.querySelectorAll(".sidenav:not(.no-autoinit)"),TapTarget:t.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:t.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:t.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:t.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var i in n){M[i].init(n[i])}},M.objectSelectorString=function(e){return((e.prop("tagName")||"")+(e.attr("id")||"")+(e.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}(),M.escapeHash=function(e){return e.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(e){var t=i(e),n=t.add(t.parents()),o=!1;return n.each((function(){if("fixed"===i(this).css("position"))return o=!0,!1})),o},M.checkWithinContainer=function(e,t,n){var i={top:!1,right:!1,bottom:!1,left:!1},o=e.getBoundingClientRect(),r=e===document.body?Math.max(o.bottom,window.innerHeight):o.bottom,a=e.scrollLeft,s=e.scrollTop,l=t.left-a,u=t.top-s;return(l<o.left+n||l<n)&&(i.left=!0),(l+t.width>o.right-n||l+t.width>window.innerWidth-n)&&(i.right=!0),(u<o.top+n||u<n)&&(i.top=!0),(u+t.height>r-n||u+t.height>window.innerHeight-n)&&(i.bottom=!0),i},M.checkPossibleAlignments=function(e,t,n,i){var o={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},r="visible"===getComputedStyle(t).overflow,a=t.getBoundingClientRect(),s=Math.min(a.height,window.innerHeight),l=Math.min(a.width,window.innerWidth),u=e.getBoundingClientRect(),d=t.scrollLeft,c=t.scrollTop,h=n.left-d,p=n.top-c,f=n.top+u.height-c;return o.spaceOnRight=r?window.innerWidth-(u.left+n.width):l-(h+n.width),o.spaceOnRight<0&&(o.left=!1),o.spaceOnLeft=r?u.right-n.width:h-n.width+u.width,o.spaceOnLeft<0&&(o.right=!1),o.spaceOnBottom=r?window.innerHeight-(u.top+n.height+i):s-(p+n.height+i),o.spaceOnBottom<0&&(o.top=!1),o.spaceOnTop=r?u.bottom-(n.height+i):f-(n.height-i),o.spaceOnTop<0&&(o.bottom=!1),o},M.getOverflowParent=function(e){return null==e?null:e===document.body||"visible"!==getComputedStyle(e).overflow?e:M.getOverflowParent(e.parentElement)},M.getIdFromTrigger=function(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var h=Date.now||function(){return(new Date).getTime()};M.throttle=function(e,t,n){var i=void 0,o=void 0,r=void 0,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:h(),a=null,r=e.apply(i,o),i=o=null};return function(){var u=h();s||!1!==n.leading||(s=u);var d=t-(u-s);return i=this,o=arguments,d<=0?(clearTimeout(a),a=null,s=u,r=e.apply(i,o),i=o=null):a||!1===n.trailing||(a=setTimeout(l,d)),r}};var p={scope:{}};p.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},p.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==o&&null!=o?o:e},p.global=p.getGlobal(this),p.SYMBOL_PREFIX="jscomp_symbol_",p.initSymbol=function(){p.initSymbol=function(){},p.global.Symbol||(p.global.Symbol=p.Symbol)},p.symbolCounter_=0,p.Symbol=function(e){return p.SYMBOL_PREFIX+(e||"")+p.symbolCounter_++},p.initSymbolIterator=function(){p.initSymbol();var e=p.global.Symbol.iterator;e||(e=p.global.Symbol.iterator=p.global.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&p.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return p.arrayIterator(this)}}),p.initSymbolIterator=function(){}},p.arrayIterator=function(e){var t=0;return p.iteratorPrototype((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))},p.iteratorPrototype=function(e){return p.initSymbolIterator(),(e={next:e})[p.global.Symbol.iterator]=function(){return this},e},p.array=p.array||{},p.iteratorFromArray=function(e,t){p.initSymbolIterator(),e instanceof String&&(e+="");var n=0,i={next:function(){if(n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return i.next=function(){return{done:!0,value:void 0}},i.next()}};return i[Symbol.iterator]=function(){return i},i},p.polyfill=function(e,t,n,i){if(t){for(n=p.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in n||(n[o]={}),n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&p.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},p.polyfill("Array.prototype.keys",(function(e){return e||function(){return p.iteratorFromArray(this,(function(e){return e}))}}),"es6-impl","es3");var f=this;M.anime=function(){function e(e){if(!F.col(e))try{return document.querySelectorAll(e)}catch(e){}}function t(e,t){for(var n=e.length,i=2<=arguments.length?arguments[1]:void 0,o=[],r=0;r<n;r++)if(r in e){var a=e[r];t.call(i,a,r,e)&&o.push(a)}return o}function n(e){return e.reduce((function(e,t){return e.concat(F.arr(t)?n(t):t)}),[])}function i(t){return F.arr(t)?t:(F.str(t)&&(t=e(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function o(e,t){return e.some((function(e){return e===t}))}function r(e){var t,n={};for(t in e)n[t]=e[t];return n}function a(e,t){var n,i=r(e);for(n in e)i[n]=t.hasOwnProperty(n)?t[n]:e[n];return i}function s(e,t){var n,i=r(e);for(n in t)i[n]=F.und(e[n])?t[n]:e[n];return i}function l(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return"rgba("+(e=parseInt(t[1],16))+","+parseInt(t[2],16)+","+(t=parseInt(t[3],16))+",1)"}function u(e){function t(e,t,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:.5>n?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e);e=parseInt(n[1])/360;var i=parseInt(n[2])/100,o=parseInt(n[3])/100;if(n=n[4]||1,0==i)o=i=e=o;else{var r=.5>o?o*(1+i):o+i-o*i,a=2*o-r;o=t(a,r,e+1/3),i=t(a,r,e),e=t(a,r,e-1/3)}return"rgba("+255*o+","+255*i+","+255*e+","+n+")"}function d(e){if(e=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e))return e[2]}function c(e){return-1<e.indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0}function h(e,t){return F.fnc(e)?e(t.target,t.id,t.total):e}function p(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue(t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function v(e,t){return F.dom(e)&&o(P,t)?"transform":F.dom(e)&&(e.getAttribute(t)||F.svg(e)&&e[t])?"attribute":F.dom(e)&&"transform"!==t&&p(e,t)?"css":null!=e[t]?"object":void 0}function y(e,n){var i=c(n);if(i=-1<n.indexOf("scale")?1:0+i,!(e=e.style.transform))return i;for(var o=[],r=[],a=[],s=/(\w+)\((.+?)\)/g;o=s.exec(e);)r.push(o[1]),a.push(o[2]);return(e=t(a,(function(e,t){return r[t]===n}))).length?e[0]:i}function g(e,t){switch(v(e,t)){case"transform":return y(e,t);case"css":return p(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0}function m(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var i=d(e)||0;switch(t=parseFloat(t),e=parseFloat(e.replace(n[0],"")),n[0][0]){case"+":return t+e+i;case"-":return t-e+i;case"*":return t*e+i}}function b(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function w(e){e=e.points;for(var t,n=0,i=0;i<e.numberOfItems;i++){var o=e.getItem(i);0<i&&(n+=b(t,o)),t=o}return n}function _(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return 2*Math.PI*e.getAttribute("r");case"rect":return 2*e.getAttribute("width")+2*e.getAttribute("height");case"line":return b({x:e.getAttribute("x1"),y:e.getAttribute("y1")},{x:e.getAttribute("x2"),y:e.getAttribute("y2")});case"polyline":return w(e);case"polygon":var t=e.points;return w(e)+b(t.getItem(t.numberOfItems-1),t.getItem(0))}}function k(e,t){function n(n){return n=void 0===n?0:n,e.el.getPointAtLength(1<=t+n?t+n:0)}var i=n(),o=n(-1),r=n(1);switch(e.property){case"x":return i.x;case"y":return i.y;case"angle":return 180*Math.atan2(r.y-o.y,r.x-o.x)/Math.PI}}function M(e,t){var n,i=/-?\d*\.?\d+/g;if(n=F.pth(e)?e.totalLength:e,F.col(n))if(F.rgb(n)){var o=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n);n=o?"rgba("+o[1]+",1)":n}else n=F.hex(n)?l(n):F.hsl(n)?u(n):void 0;else o=(o=d(n))?n.substr(0,n.length-o.length):n,n=t&&!/\s/g.test(n)?o+t:o;return{original:n+="",numbers:n.match(i)?n.match(i).map(Number):[0],strings:F.str(e)||t?n.split(i):[]}}function O(e){return t(e=e?n(F.arr(e)?e.map(i):i(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function E(e){var t=O(e);return t.map((function(e,n){return{target:e,id:n,total:t.length}}))}function D(e,t){var n=r(t);if(F.arr(e)){var o=e.length;2!==o||F.obj(e[0])?F.fnc(t.duration)||(n.duration=t.duration/o):e={value:e}}return i(e).map((function(e,n){return n=n?0:t.delay,e=F.obj(e)&&!F.pth(e)?e:{value:e},F.und(e.delay)&&(e.delay=n),e})).map((function(e){return s(e,n)}))}function C(e,t){var n,i={};for(n in e){var o=h(e[n],t);F.arr(o)&&1===(o=o.map((function(e){return h(e,t)}))).length&&(o=o[0]),i[n]=o}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}function x(e){return F.arr(e)?N.apply(this,e):H[e]}function S(e,t){var n;return e.tweens.map((function(i){var o=(i=C(i,t)).value,r=g(t.target,e.name),a=n?n.to.original:r,s=(a=F.arr(o)?o[0]:a,m(F.arr(o)?o[1]:o,a));return r=d(s)||d(a)||d(r),i.from=M(a,r),i.to=M(s,r),i.start=n?n.end:e.offset,i.end=i.start+i.delay+i.duration,i.easing=x(i.easing),i.elasticity=(1e3-Math.min(Math.max(i.elasticity,1),999))/1e3,i.isPath=F.pth(o),i.isColor=F.col(i.from.original),i.isColor&&(i.round=1),n=i}))}function T(e,i){return t(n(e.map((function(e){return i.map((function(t){var n=v(e.target,t.name);if(n){var i=S(t,e);t={type:n,property:t.name,animatable:e,tweens:i,duration:i[i.length-1].end,delay:i[0].delay}}else t=void 0;return t}))}))),(function(e){return!F.und(e)}))}function L(e,t,n,i){var o="delay"===e;return t.length?(o?Math.min:Math.max).apply(Math,t.map((function(t){return t[e]}))):o?i.delay:n.offset+i.delay+i.duration}function B(e){var t,n=a(j,e),i=a(R,e),o=E(e.targets),r=[],l=s(n,i);for(t in e)l.hasOwnProperty(t)||"targets"===t||r.push({name:t,offset:l.offset,tweens:D(e[t],i)});return s(n,{children:[],animatables:o,animations:e=T(o,r),duration:L("duration",e,n,i),delay:L("delay",e,n,i)})}function I(e){function n(){return window.Promise&&new Promise((function(e){return c=e}))}function i(e){return f.reversed?f.duration-e:e}function o(e){for(var n=0,i={},o=f.animations,r=o.length;n<r;){var a=o[n],s=a.animatable,l=(u=a.tweens)[h=u.length-1];h&&(l=t(u,(function(t){return e<t.end}))[0]||l);for(var u=Math.min(Math.max(e-l.start-l.delay,0),l.duration)/l.duration,d=isNaN(u)?1:l.easing(u,l.elasticity),c=(u=l.to.strings,l.round),h=[],v=void 0,y=(v=l.to.numbers.length,0);y<v;y++){var g=void 0,m=(g=l.to.numbers[y],l.from.numbers[y]);g=l.isPath?k(l.value,d*g):m+d*(g-m),c&&(l.isColor&&2<y||(g=Math.round(g*c)/c)),h.push(g)}if(l=u.length)for(v=u[0],d=0;d<l;d++)c=u[d+1],y=h[d],isNaN(y)||(v=c?v+(y+c):v+(y+" "));else v=h[0];$[a.type](s.target,a.property,v,i,s.id),a.currentValue=v,n++}if(n=Object.keys(i).length)for(o=0;o<n;o++)A||(A=p(document.body,"transform")?"transform":"-webkit-transform"),f.animatables[o].target.style[A]=i[o].join(" ");f.currentTime=e,f.progress=e/f.duration*100}function r(e){f[e]&&f[e](f)}function a(){f.remaining&&!0!==f.remaining&&f.remaining--}function s(e){var t=f.duration,s=f.offset,p=s+f.delay,v=f.currentTime,y=f.reversed,g=i(e);if(f.children.length){var m=f.children,b=m.length;if(g>=f.currentTime)for(var w=0;w<b;w++)m[w].seek(g);else for(;b--;)m[b].seek(g)}(g>=p||!t)&&(f.began||(f.began=!0,r("begin")),r("run")),g>s&&g<t?o(g):(g<=s&&0!==v&&(o(0),y&&a()),(g>=t&&v!==t||!t)&&(o(t),y||a())),r("update"),e>=t&&(f.remaining?(u=l,"alternate"===f.direction&&(f.reversed=!f.reversed)):(f.pause(),f.completed||(f.completed=!0,r("complete"),"Promise"in window&&(c(),h=n()))),d=0)}e=void 0===e?{}:e;var l,u,d=0,c=null,h=n(),f=B(e);return f.reset=function(){var e=f.direction,t=f.loop;for(f.currentTime=0,f.progress=0,f.paused=!0,f.began=!1,f.completed=!1,f.reversed="reverse"===e,f.remaining="alternate"===e&&1===t?2:t,o(0),e=f.children.length;e--;)f.children[e].reset()},f.tick=function(e){l=e,u||(u=l),s((d+l-u)*I.speed)},f.seek=function(e){s(i(e))},f.pause=function(){var e=q.indexOf(f);-1<e&&q.splice(e,1),f.paused=!0},f.play=function(){f.paused&&(f.paused=!1,u=0,d=i(f.currentTime),q.push(f),W||Y())},f.reverse=function(){f.reversed=!f.reversed,u=0,d=i(f.currentTime)},f.restart=function(){f.pause(),f.reset(),f.play()},f.finished=h,f.reset(),f.autoplay&&f.play(),f}var A,j={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},R={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},P="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),F={arr:function(e){return Array.isArray(e)},obj:function(e){return-1<Object.prototype.toString.call(e).indexOf("Object")},pth:function(e){return F.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},dom:function(e){return e.nodeType||F.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return F.hex(e)||F.rgb(e)||F.hsl(e)}},N=function(){function e(e,t,n){return(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e}return function(t,n,i,o){if(0<=t&&1>=t&&0<=i&&1>=i){var r=new Float32Array(11);if(t!==n||i!==o)for(var a=0;11>a;++a)r[a]=e(.1*a,t,i);return function(a){if(t===n&&i===o)return a;if(0===a)return 0;if(1===a)return 1;for(var s=0,l=1;10!==l&&r[l]<=a;++l)s+=.1;--l,l=s+(a-r[l])/(r[l+1]-r[l])*.1;var u=3*(1-3*i+3*t)*l*l+2*(3*i-6*t)*l+3*t;if(.001<=u){for(s=0;4>s&&0!=(u=3*(1-3*i+3*t)*l*l+2*(3*i-6*t)*l+3*t);++s){var d=e(l,t,i)-a;l-=d/u}a=l}else if(0===u)a=l;else{l=s,s+=.1;var c=0;do{0<(u=e(d=l+(s-l)/2,t,i)-a)?s=d:l=d}while(1e-7<Math.abs(u)&&10>++c);a=d}return e(a,n,o)}}}}(),H=function(){function e(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin(2*(e-1-t/(2*Math.PI)*Math.asin(1))*Math.PI/t)}var t,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),i={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],e],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,n){return 1-e(1-t,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,n){return.5>t?e(2*t,n)/2:1-e(-2*t+2,n)/2}]},o={linear:N(.25,.25,.75,.75)},r={};for(t in i)r.type=t,i[r.type].forEach(function(e){return function(t,i){o["ease"+e.type+n[i]]=F.fnc(t)?t:N.apply(f,t)}}(r)),r={type:r.type};return o}(),$={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,i,o){i[o]||(i[o]=[]),i[o].push(t+"("+n+")")}},q=[],W=0,Y=function(){function e(){W=requestAnimationFrame(t)}function t(t){var n=q.length;if(n){for(var i=0;i<n;)q[i]&&q[i].tick(t),i++;e()}else cancelAnimationFrame(W),W=0}return e}();return I.version="2.2.0",I.speed=1,I.running=q,I.remove=function(e){e=O(e);for(var t=q.length;t--;)for(var n=q[t],i=n.animations,r=i.length;r--;)o(e,i[r].animatable.target)&&(i.splice(r,1),i.length||n.pause())},I.getValue=g,I.path=function(t,n){var i=F.str(t)?e(t)[0]:t,o=n||100;return function(e){return{el:i,property:e,totalLength:_(i)*(o/100)}}},I.setDashoffset=function(e){var t=_(e);return e.setAttribute("stroke-dasharray",t),t},I.bezier=N,I.easings=H,I.timeline=function(e){var t=I(e);return t.pause(),t.duration=0,t.add=function(n){return t.children.forEach((function(e){e.began=!0,e.completed=!0})),i(n).forEach((function(n){var i=s(n,a(R,e||{}));i.targets=i.targets||e.targets,n=t.duration;var o=i.offset;i.autoplay=!1,i.direction=t.direction,i.offset=F.und(o)?n:m(o,n),t.began=!0,t.completed=!0,t.seek(i.offset),(i=I(i)).began=!0,i.completed=!0,i.duration>n&&(t.duration=i.duration),t.children.push(i)})),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},I.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},I}(),function(e,t){"use strict";var n={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},i=function(i){function o(t,n){d(this,o);var i=l(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,t,n));return i.el.M_Dropdown=i,o._dropdowns.push(i),i.id=M.getIdFromTrigger(t),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=e(i.dropdownEl),i.options=e.extend({},o.defaults,n),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?e(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return u(o,i),s(o,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),o._dropdowns.splice(o._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(e){e.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var n=t.toElement||t.relatedTarget,i=!!e(n).closest(".dropdown-content").length,o=!1,r=e(n).closest(".dropdown-trigger");r.length&&r[0].M_Dropdown&&r[0].M_Dropdown.isOpen&&(o=!0),o||i||this.close()}},{key:"_handleDocumentClick",value:function(t){var n=this,i=e(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout((function(){n.close()}),0):!i.closest(".dropdown-trigger").length&&i.closest(".dropdown-content").length||setTimeout((function(){n.close()}),0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(e){e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){e(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var n=e(t.target).closest("li")[0];this.options.onItemClick.call(this,n)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var n=this.dropdownEl.children[this.focusedIndex],i=e(n).find("a, button").first();i.length?i[0].click():n&&n.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var o=t.which===M.keys.ARROW_DOWN?1:-1,r=this.focusedIndex,a=!1;do{if(r+=o,this.dropdownEl.children[r]&&-1!==this.dropdownEl.children[r].tabIndex){a=!0;break}}while(r<this.dropdownEl.children.length&&r>=0);a&&(this.focusedIndex=r,this._focusFocusedItem())}var s=String.fromCharCode(t.which).toLowerCase();if(s&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(s);var l=this.filterQuery.join(""),u=e(this.dropdownEl).find("li").filter((function(t){return 0===e(t).text().toLowerCase().indexOf(l)}))[0];u&&(this.focusedIndex=e(u).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,e(this.dropdownEl).children().each((function(e){e.getAttribute("tabindex")||e.setAttribute("tabindex",0)}))}},{key:"_focusFocusedItem",value:function(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var e=this.el.getBoundingClientRect(),t=this.dropdownEl.getBoundingClientRect(),n=t.height,i=t.width,o=e.left-t.left,r=e.top-t.top,a={left:o,top:r,height:n,width:i},s=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,s,a,this.options.coverTrigger?0:e.height),u="top",d=this.options.alignment;if(r+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,l.top||(l.bottom?u="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(u="bottom",n+=l.spaceOnTop,r-=l.spaceOnTop):n+=l.spaceOnBottom)),!l[d]){var c="left"===d?"right":"left";l[c]?d=c:l.spaceOnLeft>l.spaceOnRight?(d="right",i+=l.spaceOnLeft,o-=l.spaceOnLeft):(d="left",i+=l.spaceOnRight)}return"bottom"===u&&(r=r-t.height+(this.options.coverTrigger?e.height:0)),"right"===d&&(o=o-t.width+e.width),{x:o,y:r,verticalAlignment:u,horizontalAlignment:d,height:n,width:i}}},{key:"_animateIn",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";var t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(e,t){return a(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Dropdown}},{key:"defaults",get:function(){return n}}]),o}(c);i._dropdowns=[],M.Dropdown=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"dropdown","M_Dropdown")}(cash,M.anime),function(e,t){"use strict";var n={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},i=function(i){function o(t,n){d(this,o);var i=l(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,t,n));return i.el.M_Modal=i,i.options=e.extend({},o.defaults,n),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=e('<div class="modal-overlay"></div>'),i.el.tabIndex=0,i._nthModalOpened=0,o._count++,i._setupEventHandlers(),i}return u(o,i),s(o,[{key:"destroy",value:function(){o._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===o._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===o._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var n=e(t.target).closest(".modal-trigger");if(n.length){var i=M.getIdFromTrigger(n[0]),o=document.getElementById(i).M_Modal;o&&o.open(n),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){e(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(e){27===e.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(e){this.el.contains(e.target)||this._nthModalOpened!==o._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var n=this;e.extend(this.el.style,{display:"block",opacity:0}),e.extend(this.$overlay[0].style,{display:"block",opacity:0}),t({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var i={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof n.options.onOpenEnd&&n.options.onOpenEnd.call(n,n.el,n._openingTrigger)}};this.el.classList.contains("bottom-sheet")?(e.extend(i,{bottom:0,opacity:1}),t(i)):(e.extend(i,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),t(i))}},{key:"_animateOut",value:function(){var n=this;t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var i={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){n.el.style.display="none",n.$overlay.remove(),"function"==typeof n.options.onCloseEnd&&n.options.onCloseEnd.call(n,n.el)}};this.el.classList.contains("bottom-sheet")?(e.extend(i,{bottom:"-100%",opacity:0}),t(i)):(e.extend(i,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),t(i))}},{key:"open",value:function(e){if(!this.isOpen)return this.isOpen=!0,o._modalsOpen++,this._nthModalOpened=o._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*o._modalsOpen,this.el.style.zIndex=1e3+2*o._modalsOpen+1,this._openingTrigger=e?e[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,o._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===o._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(e,t){return a(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Modal}},{key:"defaults",get:function(){return n}}]),o}(c);i._modalsOpen=0,i._count=0,M.Modal=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"modal","M_Modal")}(cash,M.anime),function(e,t){"use strict"}(cash,M.anime),function(e){M.updateTextFields=function(){e("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each((function(t,n){var i=e(this);t.value.length>0||e(t).is(":focus")||t.autofocus||null!==i.attr("placeholder")?i.siblings("label").addClass("active"):t.validity?i.siblings("label").toggleClass("active",!0===t.validity.badInput):i.siblings("label").removeClass("active")}))},M.validate_field=function(e){var t=null!==e.attr("data-length"),n=parseInt(e.attr("data-length")),i=e[0].value.length;0!==i||!1!==e[0].validity.badInput||e.is(":required")?e.hasClass("validate")&&(e.is(":valid")&&t&&i<=n||e.is(":valid")&&!t?(e.removeClass("invalid"),e.addClass("valid")):(e.removeClass("valid"),e.addClass("invalid"))):e.hasClass("validate")&&(e.removeClass("valid"),e.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=e(t)),t.length){var n=e(".hiddendiv").first();n.length||(n=e('<div class="hiddendiv common"></div>'),e("body").append(n));var i=t.css("font-family"),o=t.css("font-size"),r=t.css("line-height"),a=t.css("padding-top"),s=t.css("padding-right"),l=t.css("padding-bottom"),u=t.css("padding-left");o&&n.css("font-size",o),i&&n.css("font-family",i),r&&n.css("line-height",r),a&&n.css("padding-top",a),s&&n.css("padding-right",s),l&&n.css("padding-bottom",l),u&&n.css("padding-left",u),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&n.css("overflow-wrap","normal").css("white-space","pre"),n.text(t[0].value+"\n");var d=n.html().replace(/\n/g,"<br>");n.html(d),t[0].offsetWidth>0&&t[0].offsetHeight>0?n.css("width",t.width()+"px"):n.css("width",window.innerWidth/2+"px"),t.data("original-height")<=n.innerHeight()?t.css("height",n.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},e(document).ready((function(){var t="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";e(document).on("change",t,(function(){0===this.value.length&&null===e(this).attr("placeholder")||e(this).siblings("label").addClass("active"),M.validate_field(e(this))})),e(document).ready((function(){M.updateTextFields()})),e(document).on("reset",(function(n){var i=e(n.target);i.is("form")&&(i.find(t).removeClass("valid").removeClass("invalid"),i.find(t).each((function(t){this.value.length&&e(this).siblings("label").removeClass("active")})),setTimeout((function(){i.find("select").each((function(){this.M_FormSelect&&e(this).trigger("change")}))}),0))})),document.addEventListener("focus",(function(n){e(n.target).is(t)&&e(n.target).siblings("label, .prefix").addClass("active")}),!0),document.addEventListener("blur",(function(n){var i=e(n.target);if(i.is(t)){var o=".prefix";0===i[0].value.length&&!0!==i[0].validity.badInput&&null===i.attr("placeholder")&&(o+=", label"),i.siblings(o).removeClass("active"),M.validate_field(i)}}),!0);e(document).on("keyup","input[type=radio], input[type=checkbox]",(function(t){if(t.which===M.keys.TAB)return e(this).addClass("tabbed"),void e(this).one("blur",(function(t){e(this).removeClass("tabbed")}))}));var n=".materialize-textarea";e(n).each((function(){var t=e(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)})),e(document).on("keyup",n,(function(){M.textareaAutoResize(e(this))})),e(document).on("keydown",n,(function(){M.textareaAutoResize(e(this))})),e(document).on("change",'.file-field input[type="file"]',(function(){for(var t=e(this).closest(".file-field").find("input.file-path"),n=e(this)[0].files,i=[],o=0;o<n.length;o++)i.push(n[o].name);t[0].value=i.join(", "),t.trigger("change")}))}))}(cash),function(e,t){e(document).on("click",".card",(function(n){if(e(this).children(".card-reveal").length){var i=e(n.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var o=e(this).find(".card-reveal");e(n.target).is(e(".card-reveal .card-title"))||e(n.target).is(e(".card-reveal .card-title i"))?t({targets:o[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var n=t.animatables[0].target;e(n).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(e(n.target).is(e(".card .activator"))||e(n.target).is(e(".card .activator i")))&&(i.css("overflow","hidden"),o.css({display:"block"}),t({targets:o[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}}))}(cash,M.anime),function(e){"use strict";var t={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",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"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},n=function(n){function i(t,n){d(this,i);var o=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,n));o.el.M_Datepicker=o,o.options=e.extend({},i.defaults,n),n&&n.hasOwnProperty("i18n")&&"object"==typeof n.i18n&&(o.options.i18n=e.extend({},i.defaults.i18n,n.i18n)),o.options.minDate&&o.options.minDate.setHours(0,0,0,0),o.options.maxDate&&o.options.maxDate.setHours(0,0,0,0),o.id=M.guid(),o._setupVariables(),o._insertHTMLIntoDOM(),o._setupModal(),o._setupEventHandlers(),o.options.defaultDate||(o.options.defaultDate=new Date(Date.parse(o.el.value)));var r=o.options.defaultDate;return i._isDate(r)?o.options.setDefaultDate?(o.setDate(r,!0),o.setInputValue()):o.gotoDate(r):o.gotoDate(new Date),o.isOpen=!1,o}return u(i,n),s(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),e(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var e=this.calendarEl.querySelector(".orig-select-year");e&&M.FormSelect.getInstance(e).destroy();var t=this.calendarEl.querySelector(".orig-select-month");t&&M.FormSelect.getInstance(t).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(e(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){e.isOpen=!1}})}},{key:"toString",value:function(e){var t=this;return e=e||this.options.format,i._isDate(this.date)?e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map((function(e){return t.formats[e]?t.formats[e]():e})).join(""):""}},{key:"setDate",value:function(e,t){if(!e)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),i._isDate(e)){var n=this.options.minDate,o=this.options.maxDate;i._isDate(n)&&e<n?e=n:i._isDate(o)&&e>o&&(e=o),this.date=new Date(e.getTime()),this._renderDateDisplay(),i._setToStartOfDay(this.date),this.gotoDate(this.date),t||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var e=i._isDate(this.date)?this.date:new Date,t=this.options.i18n,n=t.weekdaysShort[e.getDay()],o=t.monthsShort[e.getMonth()],r=e.getDate();this.yearTextEl.innerHTML=e.getFullYear(),this.dateTextEl.innerHTML=n+", "+o+" "+r}},{key:"gotoDate",value:function(e){var t=!0;if(i._isDate(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),o=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),r=e.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),t=r<n.getTime()||o.getTime()<r}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(e,t,n){var o=this.options,r=new Date,a=i._getDaysInMonth(e,t),s=new Date(e,t,1).getDay(),l=[],u=[];i._setToStartOfDay(r),o.firstDay>0&&(s-=o.firstDay)<0&&(s+=7);for(var d=0===t?11:t-1,c=11===t?0:t+1,h=0===t?e-1:e,p=11===t?e+1:e,f=i._getDaysInMonth(h,d),v=a+s,y=v;y>7;)y-=7;v+=7-y;for(var g=!1,m=0,b=0;m<v;m++){var w=new Date(e,t,m-s+1),_=!!i._isDate(this.date)&&i._compareDates(w,this.date),k=i._compareDates(w,r),M=-1!==o.events.indexOf(w.toDateString()),O=m<s||m>=a+s,E=m-s+1,D=t,C=e,x=o.startRange&&i._compareDates(o.startRange,w),S=o.endRange&&i._compareDates(o.endRange,w),T=o.startRange&&o.endRange&&o.startRange<w&&w<o.endRange;O&&(m<s?(E=f+E,D=d,C=h):(E-=a,D=c,C=p));var L={day:E,month:D,year:C,hasEvent:M,isSelected:_,isToday:k,isDisabled:o.minDate&&w<o.minDate||o.maxDate&&w>o.maxDate||o.disableWeekends&&i._isWeekend(w)||o.disableDayFn&&o.disableDayFn(w),isEmpty:O,isStartRange:x,isEndRange:S,isInRange:T,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths};u.push(this.renderDay(L)),7==++b&&(l.push(this.renderRow(u,o.isRTL,g)),u=[],b=0,g=!1)}return this.renderTable(o,l,n)}},{key:"renderDay",value:function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="datepicker-day-button" type="button" data-year="'+e.year+'" data-month="'+e.month+'" data-day="'+e.day+'">'+e.day+"</button></td>"}},{key:"renderRow",value:function(e,t,n){return'<tr class="datepicker-row'+(n?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"}},{key:"renderTable",value:function(e,t,n){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+n+'">'+this.renderHead(e)+this.renderBody(t)+"</table></div>"}},{key:"renderHead",value:function(e){var t=void 0,n=[];for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+this.renderDayName(e,t)+'">'+this.renderDayName(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}},{key:"renderBody",value:function(e){return"<tbody>"+e.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,n,i,o,r,a){var s,l,u=void 0,d=void 0,c=void 0,h=this.options,p=i===h.minYear,f=i===h.maxYear,v='<div id="'+a+'" class="datepicker-controls" role="heading" aria-live="assertive">',y=!0,g=!0;for(c=[],u=0;u<12;u++)c.push('<option value="'+(i===r?u-n:12+u-n)+'"'+(u===o?' selected="selected"':"")+(p&&u<h.minMonth||f&&u>h.maxMonth?'disabled="disabled"':"")+">"+h.i18n.months[u]+"</option>");for(s='<select class="datepicker-select orig-select-month" tabindex="-1">'+c.join("")+"</select>",e.isArray(h.yearRange)?(u=h.yearRange[0],d=h.yearRange[1]+1):(u=i-h.yearRange,d=1+i+h.yearRange),c=[];u<d&&u<=h.maxYear;u++)u>=h.minYear&&c.push('<option value="'+u+'" '+(u===i?'selected="selected"':"")+">"+u+"</option>");l='<select class="datepicker-select orig-select-year" tabindex="-1">'+c.join("")+"</select>";v+='<button class="month-prev'+(y?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',v+='<div class="selects-container">',h.showMonthAfterYear?v+=l+s:v+=s+l,v+="</div>",p&&(0===o||h.minMonth>=o)&&(y=!1),f&&(11===o||h.maxMonth<=o)&&(g=!1);return(v+='<button class="month-next'+(g?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(e){if(this.isOpen||e){var t,n=this.options,i=n.minYear,o=n.maxYear,r=n.minMonth,a=n.maxMonth,s="";this._y<=i&&(this._y=i,!isNaN(r)&&this._m<r&&(this._m=r)),this._y>=o&&(this._y=o,!isNaN(a)&&this._m>a&&(this._m=a)),t="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),s+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t);this.destroySelects(),this.calendarEl.innerHTML=s;var u=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(u,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),u.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var t=this;this.$modalEl=e(i._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return t.date.getDate()},dd:function(){var e=t.date.getDate();return(e<10?"0":"")+e},ddd:function(){return t.options.i18n.weekdaysShort[t.date.getDay()]},dddd:function(){return t.options.i18n.weekdays[t.date.getDay()]},m:function(){return t.date.getMonth()+1},mm:function(){var e=t.date.getMonth()+1;return(e<10?"0":"")+e},mmm:function(){return t.options.i18n.monthsShort[t.date.getMonth()]},mmmm:function(){return t.options.i18n.months[t.date.getMonth()]},yy:function(){return(""+t.date.getFullYear()).slice(2)},yyyy:function(){return t.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var n=e(t.target);n.hasClass("is-disabled")||(!n.hasClass("datepicker-day-button")||n.hasClass("is-empty")||n.parent().hasClass("is-disabled")?n.closest(".month-prev").length?this.prevMonth():n.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(e){this.gotoMonth(e.target.value)}},{key:"_handleYearChange",value:function(e){this.gotoYear(e.target.value)}},{key:"gotoMonth",value:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())}},{key:"gotoYear",value:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(e){var t=void 0;e.firedBy!==this&&(t=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),i._isDate(t)&&this.setDate(t))}},{key:"renderDayName",value:function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysAbbrev[t]:e.i18n.weekdays[t]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(e,t){return a(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,e,t)}},{key:"_isDate",value:function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}},{key:"_isWeekend",value:function(e){var t=e.getDay();return 0===t||6===t}},{key:"_setToStartOfDay",value:function(e){i._isDate(e)&&e.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(e,t){return[31,i._isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}},{key:"_isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"_compareDates",value:function(e,t){return e.getTime()===t.getTime()}},{key:"_setToStartOfDay",value:function(e){i._isDate(e)&&e.setHours(0,0,0,0)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Datepicker}},{key:"defaults",get:function(){return t}}]),i}(c);n._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"datepicker","M_Datepicker")}(cash),function(e){"use strict";var t={classes:"",dropdownOptions:{}},n=function(n){function i(t,n){d(this,i);var o=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,n));return o.$el.hasClass("browser-default")?l(o):(o.el.M_FormSelect=o,o.options=e.extend({},i.defaults,n),o.isMultiple=o.$el.prop("multiple"),o.el.tabIndex=-1,o._keysSelected={},o._valueDict={},o._setupDropdown(),o._setupEventHandlers(),o)}return u(i,n),s(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var t=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.addEventListener("click",t._handleOptionClickBound)})),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var t=this;e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.removeEventListener("click",t._handleOptionClickBound)})),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(e){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var n=e(t.target).closest("li")[0],i=n.id;if(!e(n).hasClass("disabled")&&!e(n).hasClass("optgroup")&&i.length){var o=!0;if(this.isMultiple){var r=e(this.dropdownOptions).find("li.disabled.selected");r.length&&(r.removeClass("selected"),r.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(r[0].id)),o=this._toggleEntryFromArray(i)}else e(this.dropdownOptions).find("li").removeClass("selected"),e(n).toggleClass("selected",o);e(this._valueDict[i].el).prop("selected")!==o&&(e(this._valueDict[i].el).prop("selected",o),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var t=this;this.wrapper=document.createElement("div"),e(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(e(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),e(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each((function(n){if(e(n).is("option")){var i=void 0;i=t.isMultiple?t._appendOptionWithIcon(t.$el,n,"multiple"):t._appendOptionWithIcon(t.$el,n),t._addOptionToValueDict(n,i)}else if(e(n).is("optgroup")){var o=e(n).children("option");e(t.dropdownOptions).append(e('<li class="optgroup"><span>'+n.getAttribute("label")+"</span></li>")[0]),o.each((function(e){var n=t._appendOptionWithIcon(t.$el,e,"optgroup-option");t._addOptionToValueDict(e,n)}))}})),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),e(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&e(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var n=e('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(n[0]),!this.el.disabled){var i=e.extend({},this.options.dropdownOptions);i.onOpenEnd=function(n){var i=e(t.dropdownOptions).find(".selected").first();if(i.length&&(M.keyDown=!0,t.dropdown.focusedIndex=i.index(),t.dropdown._focusFocusedItem(),M.keyDown=!1,t.dropdown.isScrollable)){var o=i[0].getBoundingClientRect().top-t.dropdownOptions.getBoundingClientRect().top;o-=t.dropdownOptions.clientHeight/2,t.dropdownOptions.scrollTop=o}},this.isMultiple&&(i.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,i)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(e,t){var n=Object.keys(this._valueDict).length,i=this.dropdownOptions.id+n,o={};t.id=i,o.el=e,o.optionEl=t,this._valueDict[i]=o}},{key:"_removeDropdown",value:function(){e(this.wrapper).find(".caret").remove(),e(this.input).remove(),e(this.dropdownOptions).remove(),e(this.wrapper).before(this.$el),e(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,n,i){var o=n.disabled?"disabled ":"",r="optgroup-option"===i?"optgroup-option ":"",a=this.isMultiple?'<label><input type="checkbox"'+o+'"/><span>'+n.innerHTML+"</span></label>":n.innerHTML,s=e("<li></li>"),l=e("<span></span>");l.html(a),s.addClass(o+" "+r),s.append(l);var u=n.getAttribute("data-icon");if(u){var d=e('<img alt="" src="'+u+'">');s.prepend(d)}return e(this.dropdownOptions).append(s[0]),s[0]}},{key:"_toggleEntryFromArray",value:function(t){var n=!this._keysSelected.hasOwnProperty(t),i=e(this._valueDict[t].optionEl);return n?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass("selected",n),i.find('input[type="checkbox"]').prop("checked",n),i.prop("selected",n),n}},{key:"_setValueToInput",value:function(){var t=[];if(this.$el.find("option").each((function(n){if(e(n).prop("selected")){var i=e(n).text();t.push(i)}})),!t.length){var n=this.$el.find("option:disabled").eq(0);n.length&&""===n[0].value&&t.push(n.text())}this.input.value=t.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var n=this._valueDict[t],i=e(n.el).prop("selected");e(n.optionEl).find('input[type="checkbox"]').prop("checked",i),i?(this._activateOption(e(this.dropdownOptions),e(n.optionEl)),this._keysSelected[t]=!0):e(n.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,n){n&&(this.isMultiple||t.find("li.selected").removeClass("selected"),e(n).addClass("selected"))}},{key:"getSelectedValues",value:function(){var e=[];for(var t in this._keysSelected)e.push(this._valueDict[t].el.value);return e}}],[{key:"init",value:function(e,t){return a(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FormSelect}},{key:"defaults",get:function(){return t}}]),i}(c);M.FormSelect=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"formSelect","M_FormSelect")}(cash)}).call(this,n(0),n(0),n(8))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){}]); -
support-hours/trunk/dist/styles/support-hours-admin.css
r2230254 r2445424 1 .shs html{box-sizing:border-box}.shs *,.shs :after,.shs :before{box-sizing:inherit}.shs button,.shs input,.shs optgroup,.shs select,.shs textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.shs ul:not(.browser-default){padding-left:0;list-style-type:none}.shs ul:not(.browser-default)>li{list-style-type:none}.shs a{color:#039be5;text-decoration:none;-webkit-tap-highlight-color:transparent}.shs .valign-wrapper{display: -webkit-box;display:flex;-webkit-box-align:center;align-items:center}.shs .clearfix{clear:both}.shs .z-depth-0{box-shadow:none!important}.shs .btn,.shs .btn-floating,.shs .btn-large,.shs .btn-small,.shs .z-depth-1{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.shs .btn-floating:hover,.shs .btn-large:hover,.shs .btn-small:hover,.shs .btn:hover,.shs .z-depth-1-half{box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2)}.shs .z-depth-2{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3)}.shs .z-depth-3{box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.shs .z-depth-4{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2)}.shs .modal,.shs .z-depth-5{box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2)}.shs .hoverable{-webkit-transition:box-shadow .25s;transition:box-shadow .25s}.shs .hoverable:hover{box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.shs .divider{height:1px;overflow:hidden;background-color:#e0e0e0}.shs blockquote{margin:20px 0;padding-left:1.5rem;border-left:5px solid #ee6e73}.shs i{line-height:inherit}.shs i.left{float:left;margin-right:15px}.shs i.right{float:right;margin-left:15px}.shs i.tiny{font-size:1rem}.shs i.small{font-size:2rem}.shs i.medium{font-size:4rem}.shs i.large{font-size:6rem}.shs img.responsive-img,.shs video.responsive-video{max-width:100%;height:auto}.shs .pagination li{display:inline-block;border-radius:2px;text-align:center;vertical-align:top;height:30px}.shs .pagination li a{color:#444;display:inline-block;font-size:1.2rem;padding:0 10px;line-height:30px}.shs .pagination li.active a{color:#fff}.shs .pagination li.active{background-color:#ee6e73}.shs .pagination li.disabled a{cursor:default;color:#999}.shs .pagination li i{font-size:2rem}.shs .pagination li.pages ul li{display:inline-block;float:none}@media only screen and (max-width:992px){.shs .pagination{width:100%}.shs .pagination li.next,.shs .pagination li.prev{width:10%}.shs .pagination li.pages{width:80%;overflow:hidden;white-space:nowrap}}.shs .breadcrumb{font-size:18px;color:hsla(0,0%,100%,.7)}.shs .breadcrumb [class*=mdi-],.shs .breadcrumb [class^=mdi-],.shs .breadcrumb i,.shs .breadcrumb i.material-icons{display:inline-block;float:left;font-size:24px}.shs .breadcrumb:before{content:"\E5CC";color:hsla(0,0%,100%,.7);vertical-align:top;display:inline-block;font-family:Material Icons;font-weight:400;font-style:normal;font-size:25px;margin:0 10px 0 8px;-webkit-font-smoothing:antialiased}.shs .breadcrumb:first-child:before{display:none}.shs .breadcrumb:last-child{color:#fff}.shs .parallax-container{position:relative;overflow:hidden;height:500px}.shs .parallax-container .parallax{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1}.shs .parallax-container .parallax img{opacity:0;position:absolute;left:50%;bottom:0;min-width:100%;min-height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.shs .pin-bottom,.shs .pin-top{position:relative}.shs .pinned{position:fixed!important}.shs ul.staggered-list li{opacity:0}.shs .fade-in{opacity:0;-webkit-transform-origin:0 50%;transform-origin:0 50%}@media only screen and (max-width:600px){.shs .hide-on-small-and-down,.shs .hide-on-small-only{display:none!important}}@media only screen and (max-width:992px){.shs .hide-on-med-and-down{display:none!important}}@media only screen and (min-width:601px){.shs .hide-on-med-and-up{display:none!important}}@media only screen and (min-width:600px) and (max-width:992px){.shs .hide-on-med-only{display:none!important}}@media only screen and (min-width:993px){.shs .hide-on-large-only{display:none!important}}@media only screen and (min-width:1201px){.shs .hide-on-extra-large-only{display:none!important}}@media only screen and (min-width:1201px){.shs .show-on-extra-large{display:block!important}}@media only screen and (min-width:993px){.shs .show-on-large{display:block!important}}@media only screen and (min-width:600px) and (max-width:992px){.shs .show-on-medium{display:block!important}}@media only screen and (max-width:600px){.shs .show-on-small{display:block!important}}@media only screen and (min-width:601px){.shs .show-on-medium-and-up{display:block!important}}@media only screen and (max-width:992px){.shs .show-on-medium-and-down{display:block!important}}@media only screen and (max-width:600px){.shs .center-on-small-only{text-align:center}}.shs .page-footer{padding-top:20px;color:#fff;background-color:#ee6e73}.shs .page-footer .footer-copyright{overflow:hidden;min-height:50px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between;padding:10px 0;color:hsla(0,0%,100%,.8);background-color:rgba(51,51,51,.08)}.shs table,.shs td,.shs th{border:none}.shs table{width:100%;display:table;border-collapse:collapse;border-spacing:0}.shs table.striped tr{border-bottom:none}.shs table.striped>tbody>tr:nth-child(odd){background-color:hsla(0,0%,94.9%,.5)}.shs table.striped>tbody>tr>td{border-radius:0}.shs table.highlight>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}.shs table.highlight>tbody>tr:hover{background-color:hsla(0,0%,94.9%,.5)}.shs table.centered tbody tr td,.shs table.centered thead tr th{text-align:center}.shs tr{border-bottom:1px solid rgba(0,0,0,.12)}.shs td,.shs th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:2px}@media only screen and (max-width:992px){.shs table.responsive-table{width:100%;border-collapse:collapse;border-spacing:0;display:block;position:relative}.shs table.responsive-table td:empty:before{content:"\00a0"}.shs table.responsive-table td,.shs table.responsive-table th{margin:0;vertical-align:top}.shs table.responsive-table th{text-align:left}.shs table.responsive-table thead{display:block;float:left}.shs table.responsive-table thead tr{display:block;padding:0 10px 0 0}.shs table.responsive-table thead tr th:before{content:"\00a0"}.shs table.responsive-table tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}.shs table.responsive-table tbody tr{display:inline-block;vertical-align:top}.shs table.responsive-table th{display:block;text-align:right}.shs table.responsive-table td{display:block;min-height:1.25em;text-align:left}.shs table.responsive-table tr{border-bottom:none;padding:0 10px}.shs table.responsive-table thead{border:0;border-right:1px solid rgba(0,0,0,.12)}}.shs .collection{margin:.5rem 0 1rem;border:1px solid #e0e0e0;border-radius:2px;overflow:hidden;position:relative}.shs .collection .collection-item{background-color:#fff;line-height:1.5rem;padding:10px 20px;margin:0;border-bottom:1px solid #e0e0e0}.shs .collection .collection-item.avatar{min-height:84px;padding-left:72px;position:relative}.shs .collection .collection-item.avatar:not(.circle-clipper)>.circle,.shs .collection .collection-item.avatar :not(.circle-clipper)>.circle{position:absolute;width:42px;height:42px;overflow:hidden;left:15px;display:inline-block;vertical-align:middle}.shs .collection .collection-item.avatar i.circle{font-size:18px;line-height:42px;color:#fff;background-color:#999;text-align:center}.shs .collection .collection-item.avatar .title{font-size:16px}.shs .collection .collection-item.avatar p{margin:0}.shs .collection .collection-item.avatar .secondary-content{position:absolute;top:16px;right:16px}.shs .collection .collection-item:last-child{border-bottom:none}.shs .collection .collection-item.active{background-color:#0085ba;color:#d4f3ff}.shs .collection .collection-item.active .secondary-content{color:#fff}.shs .collection a.collection-item{display:block;-webkit-transition:.25s;transition:.25s;color:#0085ba}.shs .collection a.collection-item:not(.active):hover{background-color:#ddd}.shs .collection.with-header .collection-header{background-color:#fff;border-bottom:1px solid #e0e0e0;padding:10px 20px}.shs .collection.with-header .collection-item{padding-left:30px}.shs .collection.with-header .collection-item.avatar{padding-left:72px}.shs .secondary-content{float:right;color:#0085ba}.shs .collapsible .collection{margin:0;border:none}.shs .video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden}.shs .video-container embed,.shs .video-container iframe,.shs .video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.shs .progress{position:relative;height:4px;display:block;width:100%;background-color:#87ddff;border-radius:2px;margin:.5rem 0 1rem;overflow:hidden}.shs .progress .determinate{position:absolute;top:0;left:0;bottom:0;background-color:#0085ba;-webkit-transition:width .3s linear;transition:width .3s linear}.shs .progress .indeterminate{background-color:#0085ba}.shs .progress .indeterminate:before{-webkit-animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.shs .progress .indeterminate:after,.shs .progress .indeterminate:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right}.shs .progress .indeterminate:after{-webkit-animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}.shs .hide{display:none!important}.shs .left-align{text-align:left}.shs .right-align{text-align:right}.shs .center,.shs .center-align{text-align:center}.shs .left{float:left!important}.shs .right{float:right!important}.shs .no-select,.shs input[type=range],.shs input[type=range]+.thumb{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .circle{border-radius:50%}.shs .center-block{display:block;margin-left:auto;margin-right:auto}.shs .truncate{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shs .no-padding{padding:0!important}.shs .btn,.shs .btn-flat,.shs .btn-large,.shs .btn-small{border:none;border-radius:2px;display:inline-block;height:36px;line-height:36px;padding:0 16px;text-transform:uppercase;vertical-align:middle;-webkit-tap-highlight-color:transparent}.shs .btn-flat.disabled,.shs .btn-flat:disabled,.shs .btn-flat[disabled],.shs .btn-floating.disabled,.shs .btn-floating:disabled,.shs .btn-floating[disabled],.shs .btn-large.disabled,.shs .btn-large:disabled,.shs .btn-large[disabled],.shs .btn-small.disabled,.shs .btn-small:disabled,.shs .btn-small[disabled],.shs .btn.disabled,.shs .btn:disabled,.shs .btn[disabled],.shs .disabled.btn-large,.shs .disabled.btn-small{pointer-events:none;background-color:#dfdfdf!important;box-shadow:none;color:#9f9f9f!important;cursor:default}.shs .btn-flat.disabled:hover,.shs .btn-flat:disabled:hover,.shs .btn-flat[disabled]:hover,.shs .btn-floating.disabled:hover,.shs .btn-floating:disabled:hover,.shs .btn-floating[disabled]:hover,.shs .btn-large.disabled:hover,.shs .btn-large:disabled:hover,.shs .btn-large[disabled]:hover,.shs .btn-small.disabled:hover,.shs .btn-small:disabled:hover,.shs .btn-small[disabled]:hover,.shs .btn.disabled:hover,.shs .btn:disabled:hover,.shs .btn[disabled]:hover,.shs .disabled.btn-large:hover,.shs .disabled.btn-small:hover{background-color:#dfdfdf!important;color:#9f9f9f!important}.shs .btn,.shs .btn-flat,.shs .btn-floating,.shs .btn-large,.shs .btn-small{font-size:14px;outline:0}.shs .btn-flat i,.shs .btn-floating i,.shs .btn-large i,.shs .btn-small i,.shs .btn i{font-size:1.3rem;line-height:inherit}.shs .btn-floating:focus,.shs .btn-large:focus,.shs .btn-small:focus,.shs .btn:focus{background-color:#006187}.shs .btn,.shs .btn-large,.shs .btn-small{text-decoration:none;color:#fff;background-color:#0085ba;text-align:center;letter-spacing:.5px;-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;cursor:pointer}.shs .btn-large:hover,.shs .btn-small:hover,.shs .btn:hover{background-color:#0097d4}.shs .btn-floating{display:inline-block;color:#fff;position:relative;overflow:hidden;z-index:1;width:40px;height:40px;line-height:40px;padding:0;border-radius:50%;-webkit-transition:background-color .3s;transition:background-color .3s;cursor:pointer;vertical-align:middle}.shs .btn-floating,.shs .btn-floating:hover{background-color:#0085ba}.shs .btn-floating:before{border-radius:0}.shs .btn-floating.btn-large{width:56px;height:56px;padding:0}.shs .btn-floating.btn-large.halfway-fab{bottom:-28px}.shs .btn-floating.btn-large i{line-height:56px}.shs .btn-floating.btn-small{width:32.4px;height:32.4px}.shs .btn-floating.btn-small.halfway-fab{bottom:-16.2px}.shs .btn-floating.btn-small i{line-height:32.4px}.shs .btn-floating.halfway-fab{position:absolute;right:24px;bottom:-20px}.shs .btn-floating.halfway-fab.left{right:auto;left:24px}.shs .btn-floating i{width:inherit;display:inline-block;text-align:center;color:#fff;font-size:1.6rem;line-height:40px}.shs button.btn-floating{border:none}.shs .fixed-action-btn{position:fixed;right:23px;bottom:23px;padding-top:15px;margin-bottom:0;z-index:997}.shs .fixed-action-btn.active ul{visibility:visible}.shs .fixed-action-btn.direction-left,.shs .fixed-action-btn.direction-right{padding:0 0 0 15px}.shs .fixed-action-btn.direction-left ul,.shs .fixed-action-btn.direction-right ul{text-align:right;right:64px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:100%;left:auto;width:500px}.shs .fixed-action-btn.direction-left ul li,.shs .fixed-action-btn.direction-right ul li{display:inline-block;margin:7.5px 15px 0 0}.shs .fixed-action-btn.direction-right{padding:0 15px 0 0}.shs .fixed-action-btn.direction-right ul{text-align:left;direction:rtl;left:64px;right:auto}.shs .fixed-action-btn.direction-right ul li{margin:7.5px 0 0 15px}.shs .fixed-action-btn.direction-bottom{padding:0 0 15px}.shs .fixed-action-btn.direction-bottom ul{top:64px;bottom:auto;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;flex-direction:column-reverse}.shs .fixed-action-btn.direction-bottom ul li{margin:15px 0 0}.shs .fixed-action-btn.toolbar{padding:0;height:56px}.shs .fixed-action-btn.toolbar.active>a i{opacity:0}.shs .fixed-action-btn.toolbar ul{display:-webkit-box;display:flex;top:0;bottom:0;z-index:1}.shs .fixed-action-btn.toolbar ul li{-webkit-box-flex:1;flex:1;display:inline-block;margin:0;height:100%;-webkit-transition:none;transition:none}.shs .fixed-action-btn.toolbar ul li a{display:block;overflow:hidden;position:relative;width:100%;height:100%;background-color:transparent;box-shadow:none;color:#fff;line-height:56px;z-index:1}.shs .fixed-action-btn.toolbar ul li a i{line-height:inherit}.shs .fixed-action-btn ul{left:0;right:0;text-align:center;position:absolute;bottom:64px;margin:0;visibility:hidden}.shs .fixed-action-btn ul li{margin-bottom:15px}.shs .fixed-action-btn ul a.btn-floating{opacity:0}.shs .fixed-action-btn .fab-backdrop{position:absolute;top:0;left:0;z-index:-1;width:40px;height:40px;background-color:#0085ba;border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}.shs .btn-flat{background-color:transparent;color:#343434;cursor:pointer;-webkit-transition:background-color .2s;transition:background-color .2s}.shs .btn-flat,.shs .btn-flat:focus,.shs .btn-flat:hover{box-shadow:none}.shs .btn-flat:focus{background-color:rgba(0,0,0,.1)}.shs .btn-flat.btn-flat[disabled],.shs .btn-flat.disabled{background-color:transparent!important;color:#b3b3b3!important;cursor:default}.shs .btn-large{height:54px;line-height:54px;font-size:15px;padding:0 28px}.shs .btn-large i{font-size:1.6rem}.shs .btn-small{height:32.4px;line-height:32.4px;font-size:13px}.shs .btn-small i{font-size:1.2rem}.shs .btn-block{display:block}.shs .modal{display:none;position:fixed;left:0;right:0;background-color:#fafafa;padding:0;max-height:70%;width:55%;margin:auto;overflow-y:auto;border-radius:2px;will-change:top,opacity}.shs .modal:focus{outline:none}@media only screen and (max-width:992px){.shs .modal{width:80%}}.shs .modal h1,.shs .modal h2,.shs .modal h3,.shs .modal h4{margin-top:0}.shs .modal .modal-content{padding:24px}.shs .modal .modal-close{cursor:pointer}.shs .modal .modal-footer{border-radius:0 0 2px 2px;background-color:#fafafa;padding:4px 6px;height:56px;width:100%;text-align:right}.shs .modal .modal-footer .btn,.shs .modal .modal-footer .btn-flat,.shs .modal .modal-footer .btn-large,.shs .modal .modal-footer .btn-small{margin:6px 0}.shs .modal-overlay{position:fixed;z-index:999;top:-25%;left:0;bottom:0;right:0;height:125%;width:100%;background:#000;display:none;will-change:opacity}.shs .modal.modal-fixed-footer{padding:0;height:70%}.shs .modal.modal-fixed-footer .modal-content{position:absolute;height:calc(100% - 56px);max-height:100%;width:100%;overflow-y:auto}.shs .modal.modal-fixed-footer .modal-footer{border-top:1px solid rgba(0,0,0,.1);position:absolute;bottom:0}.shs .modal.bottom-sheet{top:auto;bottom:-100%;margin:0;width:100%;max-height:45%;border-radius:0;will-change:bottom,opacity}.shs select:focus{outline:1px solid #abe7ff}.shs button:focus{outline:none;background-color:#0094ce}.shs label{font-size:.8rem;color:#9e9e9e}.shs ::-webkit-input-placeholder{color:#d1d1d1}.shs ::-moz-placeholder{color:#d1d1d1}.shs :-ms-input-placeholder{color:#d1d1d1}.shs ::-ms-input-placeholder{color:#d1d1d1}.shs ::placeholder{color:#d1d1d1}.shs input:not([type]),.shs input[type=date]:not(.browser-default),.shs input[type=datetime-local]:not(.browser-default),.shs input[type=datetime]:not(.browser-default),.shs input[type=email]:not(.browser-default),.shs input[type=number]:not(.browser-default),.shs input[type=password]:not(.browser-default),.shs input[type=search]:not(.browser-default),.shs input[type=tel]:not(.browser-default),.shs input[type=text]:not(.browser-default),.shs input[type=time]:not(.browser-default),.shs input[type=url]:not(.browser-default),.shs textarea.materialize-textarea{background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;border-radius:0;outline:none;height:3rem;width:100%;font-size:16px;margin:0 0 8px;padding:0;box-shadow:none;box-sizing:content-box;-webkit-transition:box-shadow .3s,border .3s;transition:box-shadow .3s,border .3s}.shs input:not([type]):disabled,.shs input:not([type])[readonly=readonly],.shs input[type=date]:not(.browser-default):disabled,.shs input[type=date]:not(.browser-default)[readonly=readonly],.shs input[type=datetime-local]:not(.browser-default):disabled,.shs input[type=datetime-local]:not(.browser-default)[readonly=readonly],.shs input[type=datetime]:not(.browser-default):disabled,.shs input[type=datetime]:not(.browser-default)[readonly=readonly],.shs input[type=email]:not(.browser-default):disabled,.shs input[type=email]:not(.browser-default)[readonly=readonly],.shs input[type=number]:not(.browser-default):disabled,.shs input[type=number]:not(.browser-default)[readonly=readonly],.shs input[type=password]:not(.browser-default):disabled,.shs input[type=password]:not(.browser-default)[readonly=readonly],.shs input[type=search]:not(.browser-default):disabled,.shs input[type=search]:not(.browser-default)[readonly=readonly],.shs input[type=tel]:not(.browser-default):disabled,.shs input[type=tel]:not(.browser-default)[readonly=readonly],.shs input[type=text]:not(.browser-default):disabled,.shs input[type=text]:not(.browser-default)[readonly=readonly],.shs input[type=time]:not(.browser-default):disabled,.shs input[type=time]:not(.browser-default)[readonly=readonly],.shs input[type=url]:not(.browser-default):disabled,.shs input[type=url]:not(.browser-default)[readonly=readonly],.shs textarea.materialize-textarea:disabled,.shs textarea.materialize-textarea[readonly=readonly]{color:rgba(0,0,0,.42);border-bottom:1px dotted rgba(0,0,0,.42)}.shs input:not([type]):disabled+label,.shs input:not([type])[readonly=readonly]+label,.shs input[type=date]:not(.browser-default):disabled+label,.shs input[type=date]:not(.browser-default)[readonly=readonly]+label,.shs input[type=datetime-local]:not(.browser-default):disabled+label,.shs input[type=datetime-local]:not(.browser-default)[readonly=readonly]+label,.shs input[type=datetime]:not(.browser-default):disabled+label,.shs input[type=datetime]:not(.browser-default)[readonly=readonly]+label,.shs input[type=email]:not(.browser-default):disabled+label,.shs input[type=email]:not(.browser-default)[readonly=readonly]+label,.shs input[type=number]:not(.browser-default):disabled+label,.shs input[type=number]:not(.browser-default)[readonly=readonly]+label,.shs input[type=password]:not(.browser-default):disabled+label,.shs input[type=password]:not(.browser-default)[readonly=readonly]+label,.shs input[type=search]:not(.browser-default):disabled+label,.shs input[type=search]:not(.browser-default)[readonly=readonly]+label,.shs input[type=tel]:not(.browser-default):disabled+label,.shs input[type=tel]:not(.browser-default)[readonly=readonly]+label,.shs input[type=text]:not(.browser-default):disabled+label,.shs input[type=text]:not(.browser-default)[readonly=readonly]+label,.shs input[type=time]:not(.browser-default):disabled+label,.shs input[type=time]:not(.browser-default)[readonly=readonly]+label,.shs input[type=url]:not(.browser-default):disabled+label,.shs input[type=url]:not(.browser-default)[readonly=readonly]+label,.shs textarea.materialize-textarea:disabled+label,.shs textarea.materialize-textarea[readonly=readonly]+label{color:rgba(0,0,0,.42)}.shs input:not([type]):focus:not([readonly]),.shs input[type=date]:not(.browser-default):focus:not([readonly]),.shs input[type=datetime-local]:not(.browser-default):focus:not([readonly]),.shs input[type=datetime]:not(.browser-default):focus:not([readonly]),.shs input[type=email]:not(.browser-default):focus:not([readonly]),.shs input[type=number]:not(.browser-default):focus:not([readonly]),.shs input[type=password]:not(.browser-default):focus:not([readonly]),.shs input[type=search]:not(.browser-default):focus:not([readonly]),.shs input[type=tel]:not(.browser-default):focus:not([readonly]),.shs input[type=text]:not(.browser-default):focus:not([readonly]),.shs input[type=time]:not(.browser-default):focus:not([readonly]),.shs input[type=url]:not(.browser-default):focus:not([readonly]),.shs textarea.materialize-textarea:focus:not([readonly]){border-bottom:1px solid #0085ba;box-shadow:0 1px 0 0 #0085ba}.shs input:not([type]):focus:not([readonly])+label,.shs input[type=date]:not(.browser-default):focus:not([readonly])+label,.shs input[type=datetime-local]:not(.browser-default):focus:not([readonly])+label,.shs input[type=datetime]:not(.browser-default):focus:not([readonly])+label,.shs input[type=email]:not(.browser-default):focus:not([readonly])+label,.shs input[type=number]:not(.browser-default):focus:not([readonly])+label,.shs input[type=password]:not(.browser-default):focus:not([readonly])+label,.shs input[type=search]:not(.browser-default):focus:not([readonly])+label,.shs input[type=tel]:not(.browser-default):focus:not([readonly])+label,.shs input[type=text]:not(.browser-default):focus:not([readonly])+label,.shs input[type=time]:not(.browser-default):focus:not([readonly])+label,.shs input[type=url]:not(.browser-default):focus:not([readonly])+label,.shs textarea.materialize-textarea:focus:not([readonly])+label{color:#0085ba}.shs input:not([type]):focus.valid~label,.shs input[type=date]:not(.browser-default):focus.valid~label,.shs input[type=datetime-local]:not(.browser-default):focus.valid~label,.shs input[type=datetime]:not(.browser-default):focus.valid~label,.shs input[type=email]:not(.browser-default):focus.valid~label,.shs input[type=number]:not(.browser-default):focus.valid~label,.shs input[type=password]:not(.browser-default):focus.valid~label,.shs input[type=search]:not(.browser-default):focus.valid~label,.shs input[type=tel]:not(.browser-default):focus.valid~label,.shs input[type=text]:not(.browser-default):focus.valid~label,.shs input[type=time]:not(.browser-default):focus.valid~label,.shs input[type=url]:not(.browser-default):focus.valid~label,.shs textarea.materialize-textarea:focus.valid~label{color:#4caf50}.shs input:not([type]):focus.invalid~label,.shs input[type=date]:not(.browser-default):focus.invalid~label,.shs input[type=datetime-local]:not(.browser-default):focus.invalid~label,.shs input[type=datetime]:not(.browser-default):focus.invalid~label,.shs input[type=email]:not(.browser-default):focus.invalid~label,.shs input[type=number]:not(.browser-default):focus.invalid~label,.shs input[type=password]:not(.browser-default):focus.invalid~label,.shs input[type=search]:not(.browser-default):focus.invalid~label,.shs input[type=tel]:not(.browser-default):focus.invalid~label,.shs input[type=text]:not(.browser-default):focus.invalid~label,.shs input[type=time]:not(.browser-default):focus.invalid~label,.shs input[type=url]:not(.browser-default):focus.invalid~label,.shs textarea.materialize-textarea:focus.invalid~label{color:#f44336}.shs input:not([type]).validate+label,.shs input[type=date]:not(.browser-default).validate+label,.shs input[type=datetime-local]:not(.browser-default).validate+label,.shs input[type=datetime]:not(.browser-default).validate+label,.shs input[type=email]:not(.browser-default).validate+label,.shs input[type=number]:not(.browser-default).validate+label,.shs input[type=password]:not(.browser-default).validate+label,.shs input[type=search]:not(.browser-default).validate+label,.shs input[type=tel]:not(.browser-default).validate+label,.shs input[type=text]:not(.browser-default).validate+label,.shs input[type=time]:not(.browser-default).validate+label,.shs input[type=url]:not(.browser-default).validate+label,.shs textarea.materialize-textarea.validate+label{width:100%}.shs .select-wrapper.valid>input.select-dropdown,.shs input.valid:not([type]),.shs input.valid:not([type]):focus,.shs input.valid[type=date]:not(.browser-default),.shs input.valid[type=date]:not(.browser-default):focus,.shs input.valid[type=datetime-local]:not(.browser-default),.shs input.valid[type=datetime-local]:not(.browser-default):focus,.shs input.valid[type=datetime]:not(.browser-default),.shs input.valid[type=datetime]:not(.browser-default):focus,.shs input.valid[type=email]:not(.browser-default),.shs input.valid[type=email]:not(.browser-default):focus,.shs input.valid[type=number]:not(.browser-default),.shs input.valid[type=number]:not(.browser-default):focus,.shs input.valid[type=password]:not(.browser-default),.shs input.valid[type=password]:not(.browser-default):focus,.shs input.valid[type=search]:not(.browser-default),.shs input.valid[type=search]:not(.browser-default):focus,.shs input.valid[type=tel]:not(.browser-default),.shs input.valid[type=tel]:not(.browser-default):focus,.shs input.valid[type=text]:not(.browser-default),.shs input.valid[type=text]:not(.browser-default):focus,.shs input.valid[type=time]:not(.browser-default),.shs input.valid[type=time]:not(.browser-default):focus,.shs input.valid[type=url]:not(.browser-default),.shs input.valid[type=url]:not(.browser-default):focus,.shs textarea.materialize-textarea.valid,.shs textarea.materialize-textarea.valid:focus{border-bottom:1px solid #4caf50;box-shadow:0 1px 0 0 #4caf50}.shs .select-wrapper.invalid>input.select-dropdown,.shs .select-wrapper.invalid>input.select-dropdown:focus,.shs input.invalid:not([type]),.shs input.invalid:not([type]):focus,.shs input.invalid[type=date]:not(.browser-default),.shs input.invalid[type=date]:not(.browser-default):focus,.shs input.invalid[type=datetime-local]:not(.browser-default),.shs input.invalid[type=datetime-local]:not(.browser-default):focus,.shs input.invalid[type=datetime]:not(.browser-default),.shs input.invalid[type=datetime]:not(.browser-default):focus,.shs input.invalid[type=email]:not(.browser-default),.shs input.invalid[type=email]:not(.browser-default):focus,.shs input.invalid[type=number]:not(.browser-default),.shs input.invalid[type=number]:not(.browser-default):focus,.shs input.invalid[type=password]:not(.browser-default),.shs input.invalid[type=password]:not(.browser-default):focus,.shs input.invalid[type=search]:not(.browser-default),.shs input.invalid[type=search]:not(.browser-default):focus,.shs input.invalid[type=tel]:not(.browser-default),.shs input.invalid[type=tel]:not(.browser-default):focus,.shs input.invalid[type=text]:not(.browser-default),.shs input.invalid[type=text]:not(.browser-default):focus,.shs input.invalid[type=time]:not(.browser-default),.shs input.invalid[type=time]:not(.browser-default):focus,.shs input.invalid[type=url]:not(.browser-default),.shs input.invalid[type=url]:not(.browser-default):focus,.shs textarea.materialize-textarea.invalid,.shs textarea.materialize-textarea.invalid:focus{border-bottom:1px solid #f44336;box-shadow:0 1px 0 0 #f44336}.shs .select-wrapper.invalid~.helper-text[data-error],.shs .select-wrapper.valid .helper-text[data-success],.shs input:not([type]).invalid~.helper-text[data-error],.shs input:not([type]).valid~.helper-text[data-success],.shs input:not([type]):focus.invalid~.helper-text[data-error],.shs input:not([type]):focus.valid~.helper-text[data-success],.shs input[type=date]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=date]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=date]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=date]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=datetime-local]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=datetime-local]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=datetime-local]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=datetime-local]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=datetime]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=datetime]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=datetime]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=datetime]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=email]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=email]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=email]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=email]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=number]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=number]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=number]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=number]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=password]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=password]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=password]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=password]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=search]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=search]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=search]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=search]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=tel]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=tel]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=tel]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=tel]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=text]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=text]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=text]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=text]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=time]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=time]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=time]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=time]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=url]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=url]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=url]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=url]:not(.browser-default):focus.valid~.helper-text[data-success],.shs textarea.materialize-textarea.invalid~.helper-text[data-error],.shs textarea.materialize-textarea.valid~.helper-text[data-success],.shs textarea.materialize-textarea:focus.invalid~.helper-text[data-error],.shs textarea.materialize-textarea:focus.valid~.helper-text[data-success]{color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.shs .select-wrapper.valid~.helper-text:after,.shs input:not([type]).valid~.helper-text:after,.shs input:not([type]):focus.valid~.helper-text:after,.shs input[type=date]:not(.browser-default).valid~.helper-text:after,.shs input[type=date]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default).valid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=datetime]:not(.browser-default).valid~.helper-text:after,.shs input[type=datetime]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=email]:not(.browser-default).valid~.helper-text:after,.shs input[type=email]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=number]:not(.browser-default).valid~.helper-text:after,.shs input[type=number]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=password]:not(.browser-default).valid~.helper-text:after,.shs input[type=password]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=search]:not(.browser-default).valid~.helper-text:after,.shs input[type=search]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=tel]:not(.browser-default).valid~.helper-text:after,.shs input[type=tel]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=text]:not(.browser-default).valid~.helper-text:after,.shs input[type=text]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=time]:not(.browser-default).valid~.helper-text:after,.shs input[type=time]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=url]:not(.browser-default).valid~.helper-text:after,.shs input[type=url]:not(.browser-default):focus.valid~.helper-text:after,.shs textarea.materialize-textarea.valid~.helper-text:after,.shs textarea.materialize-textarea:focus.valid~.helper-text:after{content:attr(data-success);color:#4caf50}.shs .select-wrapper.invalid~.helper-text:after,.shs input:not([type]).invalid~.helper-text:after,.shs input:not([type]):focus.invalid~.helper-text:after,.shs input[type=date]:not(.browser-default).invalid~.helper-text:after,.shs input[type=date]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default).invalid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=datetime]:not(.browser-default).invalid~.helper-text:after,.shs input[type=datetime]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=email]:not(.browser-default).invalid~.helper-text:after,.shs input[type=email]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=number]:not(.browser-default).invalid~.helper-text:after,.shs input[type=number]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=password]:not(.browser-default).invalid~.helper-text:after,.shs input[type=password]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=search]:not(.browser-default).invalid~.helper-text:after,.shs input[type=search]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=tel]:not(.browser-default).invalid~.helper-text:after,.shs input[type=tel]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=text]:not(.browser-default).invalid~.helper-text:after,.shs input[type=text]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=time]:not(.browser-default).invalid~.helper-text:after,.shs input[type=time]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=url]:not(.browser-default).invalid~.helper-text:after,.shs input[type=url]:not(.browser-default):focus.invalid~.helper-text:after,.shs textarea.materialize-textarea.invalid~.helper-text:after,.shs textarea.materialize-textarea:focus.invalid~.helper-text:after{content:attr(data-error);color:#f44336}.shs .select-wrapper+label:after,.shs input:not([type])+label:after,.shs input[type=date]:not(.browser-default)+label:after,.shs input[type=datetime-local]:not(.browser-default)+label:after,.shs input[type=datetime]:not(.browser-default)+label:after,.shs input[type=email]:not(.browser-default)+label:after,.shs input[type=number]:not(.browser-default)+label:after,.shs input[type=password]:not(.browser-default)+label:after,.shs input[type=search]:not(.browser-default)+label:after,.shs input[type=tel]:not(.browser-default)+label:after,.shs input[type=text]:not(.browser-default)+label:after,.shs input[type=time]:not(.browser-default)+label:after,.shs input[type=url]:not(.browser-default)+label:after,.shs textarea.materialize-textarea+label:after{display:block;content:"";position:absolute;top:100%;left:0;opacity:0;-webkit-transition:opacity .2s ease-out,color .2s ease-out;transition:opacity .2s ease-out,color .2s ease-out}.shs .input-field{position:relative;margin-top:1rem;margin-bottom:1rem}.shs .input-field.inline{display:inline-block;vertical-align:middle;margin-left:5px}.shs .input-field.inline .select-dropdown,.shs .input-field.inline input{margin-bottom:1rem}.shs .input-field.col label{left:.75rem}.shs .input-field.col .prefix~.validate~label,.shs .input-field.col .prefix~label{width:calc(100% - 4.5rem)}.shs .input-field>label{color:#9e9e9e;position:absolute;top:0;left:0;font-size:1rem;cursor:text;-webkit-transition:color .2s ease-out,-webkit-transform .2s ease-out;transition:color .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,color .2s ease-out;transition:transform .2s ease-out,color .2s ease-out,-webkit-transform .2s ease-out;-webkit-transform-origin:0 100%;transform-origin:0 100%;text-align:initial;-webkit-transform:translateY(12px);transform:translateY(12px)}.shs .input-field>label:not(.label-icon).active{-webkit-transform:translateY(-14px) scale(.8);transform:translateY(-14px) scale(.8);-webkit-transform-origin:0 0;transform-origin:0 0}.shs .input-field>input[type=date]:not(.browser-default)+label,.shs .input-field>input[type=time]:not(.browser-default)+label,.shs .input-field>input[type]:-webkit-autofill:not(.browser-default):not([type=search])+label{-webkit-transform:translateY(-14px) scale(.8);transform:translateY(-14px) scale(.8);-webkit-transform-origin:0 0;transform-origin:0 0}.shs .input-field .helper-text{position:relative;min-height:18px;display:block;font-size:12px;color:rgba(0,0,0,.54)}.shs .input-field .helper-text:after{opacity:1;position:absolute;top:0;left:0}.shs .input-field .prefix{position:absolute;width:3rem;font-size:2rem;-webkit-transition:color .2s;transition:color .2s;top:.5rem}.shs .input-field .prefix.active{color:#0085ba}.shs .input-field .prefix~.autocomplete-content,.shs .input-field .prefix~.helper-text,.shs .input-field .prefix~.validate~label,.shs .input-field .prefix~input,.shs .input-field .prefix~label,.shs .input-field .prefix~textarea{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.shs .input-field .prefix~label{margin-left:3rem}@media only screen and (max-width:992px){.shs .input-field .prefix~input{width:86%;width:calc(100% - 3rem)}}@media only screen and (max-width:600px){.shs .input-field .prefix~input{width:80%;width:calc(100% - 3rem)}}.shs .input-field input[type=search]{display:block;line-height:inherit;-webkit-transition:background-color .3s;transition:background-color .3s}.nav-wrapper .shs .input-field input[type=search]{height:inherit;padding-left:4rem;width:calc(100% - 4rem);border:0;box-shadow:none}.shs .input-field input[type=search]:focus:not(.browser-default){background-color:#fff;border:0;box-shadow:none;color:#444}.shs .input-field input[type=search]:focus:not(.browser-default)+label i,.shs .input-field input[type=search]:focus:not(.browser-default)~.material-icons,.shs .input-field input[type=search]:focus:not(.browser-default)~.mdi-navigation-close{color:#444}.shs .input-field input[type=search]+.label-icon{-webkit-transform:none;transform:none;left:1rem}.shs .input-field input[type=search]~.material-icons,.shs .input-field input[type=search]~.mdi-navigation-close{position:absolute;top:0;right:1rem;color:transparent;cursor:pointer;font-size:2rem;-webkit-transition:color .3s;transition:color .3s}.shs textarea{width:100%;height:3rem;background-color:transparent}.shs textarea.materialize-textarea{line-height:normal;overflow-y:hidden;padding:.8rem 0;resize:none;min-height:3rem;box-sizing:border-box}.shs .hiddendiv{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;padding-top:1.2rem;position:absolute;top:0;z-index:-1}.shs .autocomplete-content li .highlight{color:#444}.shs .autocomplete-content li img{height:40px;width:40px;margin:5px 15px}.shs .character-counter{min-height:18px}.shs [type=radio]:checked,.shs [type=radio]:not(:checked){position:absolute;opacity:0;pointer-events:none}.shs [type=radio]:checked+span,.shs [type=radio]:not(:checked)+span{position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-transition:.28s ease;transition:.28s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs [type=radio]+span:after,.shs [type=radio]+span:before{content:"";position:absolute;left:0;top:0;margin:4px;width:16px;height:16px;z-index:0;-webkit-transition:.28s ease;transition:.28s ease}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio].with-gap:checked+span:before,.shs [type=radio]:checked+span:after,.shs [type=radio]:checked+span:before,.shs [type=radio]:not(:checked)+span:after,.shs [type=radio]:not(:checked)+span:before{border-radius:50%}.shs [type=radio]:not(:checked)+span:after,.shs [type=radio]:not(:checked)+span:before{border:2px solid #5a5a5a}.shs [type=radio]:not(:checked)+span:after{-webkit-transform:scale(0);transform:scale(0)}.shs [type=radio]:checked+span:before{border:2px solid transparent}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio].with-gap:checked+span:before,.shs [type=radio]:checked+span:after{border:2px solid #0085ba}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio]:checked+span:after{background-color:#0085ba}.shs [type=radio]:checked+span:after{-webkit-transform:scale(1.02);transform:scale(1.02)}.shs [type=radio].with-gap:checked+span:after{-webkit-transform:scale(.5);transform:scale(.5)}.shs [type=radio].tabbed:focus+span:before{box-shadow:0 0 0 10px rgba(0,0,0,.1)}.shs [type=radio].with-gap:disabled:checked+span:before{border:2px solid rgba(0,0,0,.42)}.shs [type=radio].with-gap:disabled:checked+span:after{border:none;background-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:checked+span:before,.shs [type=radio]:disabled:not(:checked)+span:before{background-color:transparent;border-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled+span{color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:not(:checked)+span:before{border-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:checked+span:after{background-color:rgba(0,0,0,.42);border-color:#949494}.shs [type=checkbox]:checked,.shs [type=checkbox]:not(:checked){position:absolute;opacity:0;pointer-events:none}.shs [type=checkbox]+span:not(.lever){position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs [type=checkbox]+span:not(.lever):before,.shs [type=checkbox]:not(.filled-in)+span:not(.lever):after{content:"";position:absolute;top:0;left:0;width:18px;height:18px;z-index:0;border:2px solid #5a5a5a;border-radius:1px;margin-top:3px;-webkit-transition:.2s;transition:.2s}.shs [type=checkbox]:not(.filled-in)+span:not(.lever):after{border:0;-webkit-transform:scale(0);transform:scale(0)}.shs [type=checkbox]:not(:checked):disabled+span:not(.lever):before{border:none;background-color:rgba(0,0,0,.42)}.shs [type=checkbox].tabbed:focus+span:not(.lever):after{-webkit-transform:scale(1);transform:scale(1);border:0;border-radius:50%;box-shadow:0 0 0 10px rgba(0,0,0,.1);background-color:rgba(0,0,0,.1)}.shs [type=checkbox]:checked+span:not(.lever):before{top:-4px;left:-5px;width:12px;height:22px;border-color:transparent #0085ba #0085ba transparent;border-style:solid;border-width:2px;-webkit-transform:rotate(40deg);transform:rotate(40deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.shs [type=checkbox]:checked:disabled+span:before{border-right:2px solid rgba(0,0,0,.42);border-bottom:2px solid rgba(0,0,0,.42)}.shs [type=checkbox]:indeterminate+span:not(.lever):before{top:-11px;left:-12px;width:10px;height:22px;border:none;border-right:2px solid #0085ba;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.shs [type=checkbox]:indeterminate:disabled+span:not(.lever):before{border-right:2px solid rgba(0,0,0,.42);background-color:transparent}.shs [type=checkbox].filled-in+span:not(.lever):after{border-radius:2px}.shs [type=checkbox].filled-in+span:not(.lever):after,.shs [type=checkbox].filled-in+span:not(.lever):before{content:"";left:0;position:absolute;-webkit-transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;z-index:1}.shs [type=checkbox].filled-in:not(:checked)+span:not(.lever):before{width:0;height:0;border:3px solid transparent;left:6px;top:10px;-webkit-transform:rotate(37deg);transform:rotate(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.shs [type=checkbox].filled-in:not(:checked)+span:not(.lever):after{height:20px;width:20px;background-color:transparent;border:2px solid #5a5a5a;top:0;z-index:0}.shs [type=checkbox].filled-in:checked+span:not(.lever):before{top:0;left:1px;width:8px;height:13px;border-color:transparent #fff #fff transparent;border-style:solid;border-width:2px;-webkit-transform:rotate(37deg);transform:rotate(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.shs [type=checkbox].filled-in:checked+span:not(.lever):after{top:0;width:20px;height:20px;border:2px solid #0085ba;background-color:#0085ba;z-index:0}.shs [type=checkbox].filled-in.tabbed:focus+span:not(.lever):after{border-radius:2px;border-color:#5a5a5a;background-color:rgba(0,0,0,.1)}.shs [type=checkbox].filled-in.tabbed:checked:focus+span:not(.lever):after{border-radius:2px;background-color:#0085ba;border-color:#0085ba}.shs [type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):before{background-color:transparent;border:2px solid transparent}.shs [type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):after{border-color:transparent;background-color:#949494}.shs [type=checkbox].filled-in:disabled:checked+span:not(.lever):before{background-color:transparent}.shs [type=checkbox].filled-in:disabled:checked+span:not(.lever):after{background-color:#949494;border-color:#949494}.shs .switch,.shs .switch *{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .switch label{cursor:pointer}.shs .switch label input[type=checkbox]{opacity:0;width:0;height:0}.shs .switch label input[type=checkbox]:checked+.lever{background-color:#53bce6}.shs .switch label input[type=checkbox]:checked+.lever:after,.shs .switch label input[type=checkbox]:checked+.lever:before{left:18px}.shs .switch label input[type=checkbox]:checked+.lever:after{background-color:#0085ba}.shs .switch label .lever{content:"";display:inline-block;position:relative;width:36px;height:14px;background-color:rgba(0,0,0,.38);border-radius:15px;-webkit-transition:background .3s ease;transition:background .3s ease;vertical-align:middle;margin:0 16px}.shs .switch label .lever:after,.shs .switch label .lever:before{content:"";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;-webkit-transition:left .3s ease,background .3s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease,-webkit-transform .1s ease}.shs .switch label .lever:before{background-color:rgba(0,133,186,.15)}.shs .switch label .lever:after{background-color:#f1f1f1;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.shs input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever:before,.shs input[type=checkbox]:checked:not(:disabled)~.lever:active:before{-webkit-transform:scale(2.4);transform:scale(2.4);background-color:rgba(0,133,186,.15)}.shs input[type=checkbox]:not(:disabled).tabbed:focus~.lever:before,.shs input[type=checkbox]:not(:disabled)~.lever:active:before{-webkit-transform:scale(2.4);transform:scale(2.4);background-color:rgba(0,0,0,.08)}.shs .switch input[type=checkbox][disabled]+.lever{cursor:default;background-color:rgba(0,0,0,.12)}.shs .switch label input[type=checkbox][disabled]+.lever:after,.shs .switch label input[type=checkbox][disabled]:checked+.lever:after{background-color:#949494}.shs select{display:none}.shs select.browser-default{display:block}.shs select{background-color:hsla(0,0%,100%,.9);width:100%;padding:5px;border:1px solid #f2f2f2;border-radius:2px;height:3rem}.shs .select-label{position:absolute}.shs .select-wrapper{position:relative}.shs .select-wrapper.invalid+label,.shs .select-wrapper.valid+label{width:100%;pointer-events:none}.shs .select-wrapper input.select-dropdown{position:relative;cursor:pointer;background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;outline:none;height:3rem;line-height:3rem;width:100%;font-size:16px;margin:0 0 8px;padding:0;display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}.shs .select-wrapper input.select-dropdown:focus{border-bottom:1px solid #0085ba}.shs .select-wrapper .caret{position:absolute;right:0;top:0;bottom:0;margin:auto 0;z-index:0;fill:rgba(0,0,0,.87)}.shs .select-wrapper+label{position:absolute;top:-26px;font-size:.8rem}.shs .select-wrapper.disabled+label,.shs select:disabled{color:rgba(0,0,0,.42)}.shs .select-wrapper.disabled .caret{fill:rgba(0,0,0,.42)}.shs .select-wrapper input.select-dropdown:disabled{color:rgba(0,0,0,.42);cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .select-wrapper i{color:rgba(0,0,0,.3)}.shs .select-dropdown li.disabled,.shs .select-dropdown li.disabled>span,.shs .select-dropdown li.optgroup{color:rgba(0,0,0,.3);background-color:transparent}.shs .select-dropdown.dropdown-content li:hover,.shs body.keyboard-focused .select-dropdown.dropdown-content li:focus{background-color:rgba(0,0,0,.08)}.shs .select-dropdown.dropdown-content li.selected{background-color:rgba(0,0,0,.03)}.shs .prefix~.select-wrapper{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.shs .prefix~label{margin-left:3rem}.shs .select-dropdown li img{height:40px;width:40px;margin:5px 15px;float:right}.shs .select-dropdown li.optgroup{border-top:1px solid #eee}.shs .select-dropdown li.optgroup.selected>span{color:rgba(0,0,0,.7)}.shs .select-dropdown li.optgroup>span{color:rgba(0,0,0,.4)}.shs .select-dropdown li.optgroup~li.optgroup-option{padding-left:1rem}.shs .file-field{position:relative}.shs .file-field .file-path-wrapper{overflow:hidden;padding-left:10px}.shs .file-field input.file-path{width:100%}.shs .file-field .btn,.shs .file-field .btn-large,.shs .file-field .btn-small{float:left;height:3rem;line-height:3rem}.shs .file-field span{cursor:pointer}.shs .file-field input[type=file]{position:absolute;top:0;right:0;left:0;bottom:0;width:100%;margin:0;padding:0;font-size:20px;cursor:pointer;opacity:0;filter:alpha(opacity=0)}.shs .file-field input[type=file]::-webkit-file-upload-button{display:none}.shs .range-field{position:relative}.shs input[type=range],.shs input[type=range]+.thumb{cursor:pointer}.shs input[type=range]{position:relative;background-color:transparent;border:none;outline:none;width:100%;margin:15px 0;padding:0}.shs input[type=range]:focus{outline:none}.shs input[type=range]+.thumb{position:absolute;top:10px;left:0;border:none;height:0;width:0;border-radius:50%;background-color:#0085ba;margin-left:7px;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.shs input[type=range]+.thumb .value{display:block;width:30px;text-align:center;color:#0085ba;font-size:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.shs input[type=range]+.thumb.active{border-radius:50% 50% 50% 0}.shs input[type=range]+.thumb.active .value{color:#fff;margin-left:-1px;margin-top:8px;font-size:10px}.shs input[type=range]{-webkit-appearance:none}.shs input[type=range]::-webkit-slider-runnable-track{height:3px;background:#c2c0c2;border:none}.shs input[type=range]::-webkit-slider-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-webkit-transition:box-shadow .3s;transition:box-shadow .3s;-webkit-appearance:none;background-color:#0085ba;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;margin:-5px 0 0}.shs .keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs input[type=range]{border:1px solid #fff}.shs input[type=range]::-moz-range-track{height:3px;background:#c2c0c2;border:none}.shs input[type=range]::-moz-focus-inner{border:0}.shs input[type=range]::-moz-range-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-moz-transition:box-shadow .3s;transition:box-shadow .3s;margin-top:-5px}.shs input[type=range]:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}.shs .keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs input[type=range]::-ms-track{height:3px;background:transparent;border-color:transparent;border-width:6px 0;color:transparent}.shs input[type=range]::-ms-fill-lower{background:#777}.shs input[type=range]::-ms-fill-upper{background:#ddd}.shs input[type=range]::-ms-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-ms-transition:box-shadow .3s;transition:box-shadow .3s}.shs .keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs .datepicker-modal{max-width:325px;min-width:300px;max-height:none}.shs .datepicker-container.modal-content{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;padding:0}.shs .datepicker-controls{-webkit-box-pack:justify;justify-content:space-between;width:280px;margin:0 auto}.shs .datepicker-controls,.shs .datepicker-controls .selects-container{display:-webkit-box;display:flex}.shs .datepicker-controls .select-wrapper input{border-bottom:none;text-align:center;margin:0}.shs .datepicker-controls .select-wrapper input:focus{border-bottom:none}.shs .datepicker-controls .select-wrapper .caret{display:none}.shs .datepicker-controls .select-year input{width:50px}.shs .datepicker-controls .select-month input{width:70px}.shs .month-next,.shs .month-prev{margin-top:4px;cursor:pointer;background-color:transparent;border:none}.shs .datepicker-date-display{-webkit-box-flex:1;flex:1 auto;background-color:#0085ba;color:#fff;padding:20px 22px;font-weight:500}.shs .datepicker-date-display .year-text{display:block;font-size:1.5rem;line-height:25px;color:hsla(0,0%,100%,.7)}.shs .datepicker-date-display .date-text{display:block;font-size:2.8rem;line-height:47px;font-weight:500}.shs .datepicker-calendar-container{-webkit-box-flex:2.5;flex:2.5 auto}.shs .datepicker-table{width:280px;font-size:1rem;margin:0 auto}.shs .datepicker-table thead{border-bottom:none}.shs .datepicker-table th{padding:10px 5px;text-align:center}.shs .datepicker-table tr{border:none}.shs .datepicker-table abbr{text-decoration:none;color:#999}.shs .datepicker-table td{border-radius:50%;padding:0}.shs .datepicker-table td.is-today{color:#0085ba}.shs .datepicker-table td.is-selected{background-color:#0085ba;color:#fff}.shs .datepicker-table td.is-disabled,.shs .datepicker-table td.is-outside-current-month{color:rgba(0,0,0,.3);pointer-events:none}.shs .datepicker-day-button{background-color:transparent;border:none;line-height:38px;display:block;width:100%;border-radius:50%;padding:0 5px;cursor:pointer;color:inherit}.shs .datepicker-day-button:focus{background-color:rgba(5,131,181,.25)}.shs .datepicker-footer{width:280px;margin:0 auto;padding-bottom:5px;display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between}.shs .datepicker-cancel,.shs .datepicker-clear,.shs .datepicker-done,.shs .datepicker-today{color:#0085ba;padding:0 1rem}.shs .datepicker-clear{color:#f44336}@media only screen and (min-width:601px){.shs .datepicker-modal{max-width:625px}.shs .datepicker-container.modal-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.shs .datepicker-date-display{-webkit-box-flex:0;flex:0 1 270px}.shs .datepicker-controls,.shs .datepicker-footer,.shs .datepicker-table{width:320px}.shs .datepicker-day-button{line-height:44px}}.clearfix{clear:both}.bold{font-weight:700;color:#444}.time-type-icon{width:20px;font-size:18px;font-weight:700;text-align:center}.support-hours-mail,.time-type-icon{display:inline-block}.support-hours-mail span{margin-right:5px}.support-hours-notice{margin-top:15px!important;margin-bottom:15px!important}.support-hours-notice p{line-height:1.8}.support-hours-notice a{color:#444}*,:after,:before{box-sizing:content-box}.shs *,.shs :after,.shs :before{box-sizing:border-box!important}#support_hours_dashboard_widget h3{margin:1.33em 0 0;font-size:16px;font-weight:700}.sh-gauge{position:relative}.sh-gauge__wrapper:focus{box-shadow:none;outline:none}.sh-gauge__base{opacity:1;stroke:#ccc;stroke-width:7px;fill:none}.sh-gauge__svg-wrapper{position:relative;padding-bottom:100%}.sh-gauge__svg{position:absolute;left:0;top:0;bottom:0;right:0}.sh-gauge__arc{fill:none;stroke:#008ec2;stroke-width:7px;-webkit-transition:stroke-dasharray 1.5s ease-in-out .25s;transition:stroke-dasharray 1.5s ease-in-out .25s;stroke-dasharray:0,352px;box-shadow:2px 2px 2px #000}.sh-gauge__overlay{stroke-width:105;stroke-linecap:round;stroke:#fff;-webkit-transition:stroke-width .2s ease-in;transition:stroke-width .2s ease-in}.sh-gauge__percentage{width:100%;height:100%;position:absolute;display:-webkit-box;display:flex;line-height:0;text-align:center;top:0}.sh-gauge__text{display:block;width:100%;align-self:center;font-size:30px;font-weight:700;line-height:1.2;color:#ccc;text-align:center;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}@media screen and (min-width:870px){.sh-gauge__text{font-size:35px}}.sh-gauge__text .smallbr{display:none}@media screen and (min-width:870px){.sh-gauge__text .smallbr{display:block}}.sh-gauge__text .bigbr{display:block}@media screen and (min-width:870px){.sh-gauge__text .bigbr{display:none}}.sh-gauge__text--big .smallbr{display:none}.sh-gauge__text--big .bigbr{display:block}.sh-gauge:hover .sh-gauge__overlay{stroke-width:110}.sh-gauge:hover .sh-gauge__text{font-size:35px;color:#008ec2}@media screen and (min-width:870px){.sh-gauge:hover .sh-gauge__text{font-size:45px}}.sh-gauge:hover .sh-gauge__text--small{font-size:35px}@media screen and (min-width:870px){.sh-gauge:hover .sh-gauge__text--small{font-size:40px}}.worktable{min-width:300px;padding-bottom:10px;margin:20px 0 10px}.worktable input[type=date]::input-placeholder{visibility:hidden!important}.worktable thead tr{text-align:left}.worktable tr.repeating{border:0}.worktable .row-head>th{display:none;text-align:left}.worktable tr.repeating>td{display:block}.worktable tr.repeating>td:first-child{width:150px;padding-top:.5em}.worktable tr.repeating>td:last-child{padding-bottom:.5em}.worktable tr.repeating>td.remove:before{width:0;content:""}.worktable tr.repeating>td:before{display:inline-block;width:6.5em;font-weight:700;content:attr(data-th) ": "}@media (min-width:480px){.worktable tr.repeating>td:before{display:none}}.worktable .row-head>th,.worktable tr.repeating>td{text-align:left}@media (min-width:480px){.worktable .row-head>th,.worktable tr.repeating>td{display:table-cell;padding:.25em .5em}.worktable .row-head>th:first-child,.worktable tr.repeating>td:first-child{padding-left:0}.worktable .row-head>th:last-child,.worktable tr.repeating>td:last-child{padding-right:0}}.worktable .row-head>th>input,.worktable tr.repeating>td>input{margin-bottom:0!important}.total{padding:4px 12px 20px;margin:10px -12px 12px;font-size:1rem;border-bottom:1px solid #eee}.remove .dashicons{position:relative;top:7px}.support-hours-col.col-type{width:175px}.tablenav.sh-tablenav{height:auto}.admin-color-midnight .sh-gauge__arc{stroke:#e14d43}.admin-color-midnight .sh-gauge:hover .sh-gauge__text{color:#e14d43}.admin-color-midnight [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#e14d43!important;border:2px solid #e14d43!important}.admin-color-midnight td.is-today{background-color:rgba(225,77,67,.25)!important}.admin-color-midnight .datepicker-cancel,.admin-color-midnight .datepicker-done,.admin-color-midnight .dropdown-content li>span,.admin-color-midnight .timepicker-close,.admin-color-midnight td.is-today{color:#e14d43!important}.admin-color-midnight .datepicker-date-display,.admin-color-midnight .datepicker-table td.is-selected,.admin-color-midnight .timepicker-digital-display,.admin-color-midnight a.remove-row{background-color:#e14d43!important}.admin-color-midnight .timepicker-canvas line{stroke:#e14d43!important}.admin-color-midnight .timepicker-canvas-bearing,.admin-color-midnight .timepicker-canvas-bg{fill:#e14d43!important}.admin-color-midnight .timepicker-tick:hover{background-color:rgba(225,77,67,.25)!important}.admin-color-midnight td.is-selected{color:#fff!important}.admin-color-midnight tr.repeating [type=radio]:checked+span:after{background-color:#e14d43;border:2px solid #e14d43}.admin-color-midnight input:focus{border-bottom:1px solid #e14d43!important;box-shadow:0 1px 0 0 #e14d43!important}.admin-color-midnight .pagination li .current{background:#e14d43!important}.admin-color-ectoplasm .sh-gauge__arc{stroke:#a3b745}.admin-color-ectoplasm .sh-gauge:hover .sh-gauge__text{color:#a3b745}.admin-color-ectoplasm [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#a3b745!important;border:2px solid #a3b745!important}.admin-color-ectoplasm td.is-today{background-color:rgba(163,183,69,.25)!important}.admin-color-ectoplasm .datepicker-cancel,.admin-color-ectoplasm .datepicker-done,.admin-color-ectoplasm .dropdown-content li>span,.admin-color-ectoplasm .timepicker-close,.admin-color-ectoplasm td.is-today{color:#a3b745!important}.admin-color-ectoplasm .datepicker-date-display,.admin-color-ectoplasm .datepicker-table td.is-selected,.admin-color-ectoplasm .timepicker-digital-display,.admin-color-ectoplasm a.remove-row{background-color:#a3b745!important}.admin-color-ectoplasm .timepicker-canvas line{stroke:#a3b745!important}.admin-color-ectoplasm .timepicker-canvas-bearing,.admin-color-ectoplasm .timepicker-canvas-bg{fill:#a3b745!important}.admin-color-ectoplasm .timepicker-tick:hover{background-color:rgba(163,183,69,.25)!important}.admin-color-ectoplasm td.is-selected{color:#fff!important}.admin-color-ectoplasm tr.repeating [type=radio]:checked+span:after{background-color:#a3b745;border:2px solid #a3b745}.admin-color-ectoplasm input:focus{border-bottom:1px solid #a3b745!important;box-shadow:0 1px 0 0 #a3b745!important}.admin-color-ectoplasm .pagination li .current{background:#a3b745!important}.admin-color-blue .sh-gauge__arc{stroke:#e1a948}.admin-color-blue .sh-gauge:hover .sh-gauge__text{color:#e1a948}.admin-color-blue [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#e1a948!important;border:2px solid #e1a948!important}.admin-color-blue td.is-today{background-color:rgba(225,169,72,.25)!important}.admin-color-blue .datepicker-cancel,.admin-color-blue .datepicker-done,.admin-color-blue .dropdown-content li>span,.admin-color-blue .timepicker-close,.admin-color-blue td.is-today{color:#e1a948!important}.admin-color-blue .datepicker-date-display,.admin-color-blue .datepicker-table td.is-selected,.admin-color-blue .timepicker-digital-display,.admin-color-blue a.remove-row{background-color:#e1a948!important}.admin-color-blue .timepicker-canvas line{stroke:#e1a948!important}.admin-color-blue .timepicker-canvas-bearing,.admin-color-blue .timepicker-canvas-bg{fill:#e1a948!important}.admin-color-blue .timepicker-tick:hover{background-color:rgba(225,169,72,.25)!important}.admin-color-blue td.is-selected{color:#fff!important}.admin-color-blue tr.repeating [type=radio]:checked+span:after{background-color:#e1a948;border:2px solid #e1a948}.admin-color-blue input:focus{border-bottom:1px solid #e1a948!important;box-shadow:0 1px 0 0 #e1a948!important}.admin-color-blue .pagination li .current{background:#e1a948!important}.admin-color-ocean .sh-gauge__arc{stroke:#9ebaa0}.admin-color-ocean .sh-gauge:hover .sh-gauge__text{color:#9ebaa0}.admin-color-ocean [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#9ebaa0!important;border:2px solid #9ebaa0!important}.admin-color-ocean td.is-today{background-color:rgba(158,186,160,.25)!important}.admin-color-ocean .datepicker-cancel,.admin-color-ocean .datepicker-done,.admin-color-ocean .dropdown-content li>span,.admin-color-ocean .timepicker-close,.admin-color-ocean td.is-today{color:#9ebaa0!important}.admin-color-ocean .datepicker-date-display,.admin-color-ocean .datepicker-table td.is-selected,.admin-color-ocean .timepicker-digital-display,.admin-color-ocean a.remove-row{background-color:#9ebaa0!important}.admin-color-ocean .timepicker-canvas line{stroke:#9ebaa0!important}.admin-color-ocean .timepicker-canvas-bearing,.admin-color-ocean .timepicker-canvas-bg{fill:#9ebaa0!important}.admin-color-ocean .timepicker-tick:hover{background-color:rgba(158,186,160,.25)!important}.admin-color-ocean td.is-selected{color:#fff!important}.admin-color-ocean tr.repeating [type=radio]:checked+span:after{background-color:#9ebaa0;border:2px solid #9ebaa0}.admin-color-ocean input:focus{border-bottom:1px solid #9ebaa0!important;box-shadow:0 1px 0 0 #9ebaa0!important}.admin-color-ocean .pagination li .current{background:#9ebaa0!important}.admin-color-coffee .sh-gauge__arc{stroke:#c7a589}.admin-color-coffee .sh-gauge:hover .sh-gauge__text{color:#c7a589}.admin-color-coffee [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#c7a589!important;border:2px solid #c7a589!important}.admin-color-coffee td.is-today{background-color:rgba(199,165,137,.25)!important}.admin-color-coffee .datepicker-cancel,.admin-color-coffee .datepicker-done,.admin-color-coffee .dropdown-content li>span,.admin-color-coffee .timepicker-close,.admin-color-coffee td.is-today{color:#c7a589!important}.admin-color-coffee .datepicker-date-display,.admin-color-coffee .datepicker-table td.is-selected,.admin-color-coffee .timepicker-digital-display,.admin-color-coffee a.remove-row{background-color:#c7a589!important}.admin-color-coffee .timepicker-canvas line{stroke:#c7a589!important}.admin-color-coffee .timepicker-canvas-bearing,.admin-color-coffee .timepicker-canvas-bg{fill:#c7a589!important}.admin-color-coffee .timepicker-tick:hover{background-color:rgba(199,165,137,.25)!important}.admin-color-coffee td.is-selected{color:#fff!important}.admin-color-coffee tr.repeating [type=radio]:checked+span:after{background-color:#c7a589;border:2px solid #c7a589}.admin-color-coffee input:focus{border-bottom:1px solid #c7a589!important;box-shadow:0 1px 0 0 #c7a589!important}.admin-color-coffee .pagination li .current{background:#c7a589!important}.admin-color-sunrise .sh-gauge__arc{stroke:#dd823b}.admin-color-sunrise .sh-gauge:hover .sh-gauge__text{color:#dd823b}.admin-color-sunrise [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#dd823b!important;border:2px solid #dd823b!important}.admin-color-sunrise td.is-today{background-color:rgba(221,130,59,.25)!important}.admin-color-sunrise .datepicker-cancel,.admin-color-sunrise .datepicker-done,.admin-color-sunrise .dropdown-content li>span,.admin-color-sunrise .timepicker-close,.admin-color-sunrise td.is-today{color:#dd823b!important}.admin-color-sunrise .datepicker-date-display,.admin-color-sunrise .datepicker-table td.is-selected,.admin-color-sunrise .timepicker-digital-display,.admin-color-sunrise a.remove-row{background-color:#dd823b!important}.admin-color-sunrise .timepicker-canvas line{stroke:#dd823b!important}.admin-color-sunrise .timepicker-canvas-bearing,.admin-color-sunrise .timepicker-canvas-bg{fill:#dd823b!important}.admin-color-sunrise .timepicker-tick:hover{background-color:rgba(221,130,59,.25)!important}.admin-color-sunrise td.is-selected{color:#fff!important}.admin-color-sunrise tr.repeating [type=radio]:checked+span:after{background-color:#dd823b;border:2px solid #dd823b}.admin-color-sunrise input:focus{border-bottom:1px solid #dd823b!important;box-shadow:0 1px 0 0 #dd823b!important}.admin-color-sunrise .pagination li .current{background:#dd823b!important}.currentDate{display:none}.support-hours-settings p.submit{display:inline-block;padding:0!important;margin:0!important}.support-hours-settings fieldset{padding:0}.support-hours-settings h3,.support-hours-settings p{display:block;padding:15px 0;margin:0}.type-switch label{display:block}.datepicker-controls .select-month input{width:90px}.sh-pagination{margin:0!important}.sh-pagination .page-numbers{margin:0}.sh-pagination li{overflow:hidden;color:#555;vertical-align:top;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 #ccc}.sh-pagination li .next,.sh-pagination li .prev{line-height:25px!important}.sh-pagination li .current{color:#fff;background:#0085ba}.sh-pagination span{display:inline-block;padding:0 10px;font-size:1.2rem;line-height:30px;color:#444}.sh-footer{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;margin-right:30px}1 .shs html{box-sizing:border-box}.shs *,.shs :after,.shs :before{box-sizing:inherit}.shs button,.shs input,.shs optgroup,.shs select,.shs textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.shs ul:not(.browser-default){padding-left:0;list-style-type:none}.shs ul:not(.browser-default)>li{list-style-type:none}.shs a{color:#039be5;text-decoration:none;-webkit-tap-highlight-color:transparent}.shs .valign-wrapper{display:flex;align-items:center}.shs .clearfix{clear:both}.shs .z-depth-0{box-shadow:none!important}.shs .btn,.shs .btn-floating,.shs .btn-large,.shs .btn-small,.shs .z-depth-1{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.shs .btn-floating:hover,.shs .btn-large:hover,.shs .btn-small:hover,.shs .btn:hover,.shs .z-depth-1-half{box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2)}.shs .z-depth-2{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3)}.shs .z-depth-3{box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.shs .z-depth-4{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2)}.shs .modal,.shs .z-depth-5{box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2)}.shs .hoverable{transition:box-shadow .25s}.shs .hoverable:hover{box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.shs .divider{height:1px;overflow:hidden;background-color:#e0e0e0}.shs blockquote{margin:20px 0;padding-left:1.5rem;border-left:5px solid #ee6e73}.shs i{line-height:inherit}.shs i.left{float:left;margin-right:15px}.shs i.right{float:right;margin-left:15px}.shs i.tiny{font-size:1rem}.shs i.small{font-size:2rem}.shs i.medium{font-size:4rem}.shs i.large{font-size:6rem}.shs img.responsive-img,.shs video.responsive-video{max-width:100%;height:auto}.shs .pagination li{display:inline-block;border-radius:2px;text-align:center;vertical-align:top;height:30px}.shs .pagination li a{color:#444;display:inline-block;font-size:1.2rem;padding:0 10px;line-height:30px}.shs .pagination li.active a{color:#fff}.shs .pagination li.active{background-color:#ee6e73}.shs .pagination li.disabled a{cursor:default;color:#999}.shs .pagination li i{font-size:2rem}.shs .pagination li.pages ul li{display:inline-block;float:none}@media only screen and (max-width:992px){.shs .pagination{width:100%}.shs .pagination li.next,.shs .pagination li.prev{width:10%}.shs .pagination li.pages{width:80%;overflow:hidden;white-space:nowrap}}.shs .breadcrumb{font-size:18px;color:hsla(0,0%,100%,.7)}.shs .breadcrumb [class*=mdi-],.shs .breadcrumb [class^=mdi-],.shs .breadcrumb i,.shs .breadcrumb i.material-icons{display:inline-block;float:left;font-size:24px}.shs .breadcrumb:before{content:"\E5CC";color:hsla(0,0%,100%,.7);vertical-align:top;display:inline-block;font-family:Material Icons;font-weight:400;font-style:normal;font-size:25px;margin:0 10px 0 8px;-webkit-font-smoothing:antialiased}.shs .breadcrumb:first-child:before{display:none}.shs .breadcrumb:last-child{color:#fff}.shs .parallax-container{position:relative;overflow:hidden;height:500px}.shs .parallax-container .parallax{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1}.shs .parallax-container .parallax img{opacity:0;position:absolute;left:50%;bottom:0;min-width:100%;min-height:100%;transform:translateZ(0);transform:translateX(-50%)}.shs .pin-bottom,.shs .pin-top{position:relative}.shs .pinned{position:fixed!important}.shs ul.staggered-list li{opacity:0}.shs .fade-in{opacity:0;transform-origin:0 50%}@media only screen and (max-width:600px){.shs .hide-on-small-and-down,.shs .hide-on-small-only{display:none!important}}@media only screen and (max-width:992px){.shs .hide-on-med-and-down{display:none!important}}@media only screen and (min-width:601px){.shs .hide-on-med-and-up{display:none!important}}@media only screen and (min-width:600px) and (max-width:992px){.shs .hide-on-med-only{display:none!important}}@media only screen and (min-width:993px){.shs .hide-on-large-only{display:none!important}}@media only screen and (min-width:1201px){.shs .hide-on-extra-large-only{display:none!important}}@media only screen and (min-width:1201px){.shs .show-on-extra-large{display:block!important}}@media only screen and (min-width:993px){.shs .show-on-large{display:block!important}}@media only screen and (min-width:600px) and (max-width:992px){.shs .show-on-medium{display:block!important}}@media only screen and (max-width:600px){.shs .show-on-small{display:block!important}}@media only screen and (min-width:601px){.shs .show-on-medium-and-up{display:block!important}}@media only screen and (max-width:992px){.shs .show-on-medium-and-down{display:block!important}}@media only screen and (max-width:600px){.shs .center-on-small-only{text-align:center}}.shs .page-footer{padding-top:20px;color:#fff;background-color:#ee6e73}.shs .page-footer .footer-copyright{overflow:hidden;min-height:50px;display:flex;align-items:center;justify-content:space-between;padding:10px 0;color:hsla(0,0%,100%,.8);background-color:rgba(51,51,51,.08)}.shs table,.shs td,.shs th{border:none}.shs table{width:100%;display:table;border-collapse:collapse;border-spacing:0}.shs table.striped tr{border-bottom:none}.shs table.striped>tbody>tr:nth-child(odd){background-color:hsla(0,0%,94.9%,.5)}.shs table.striped>tbody>tr>td{border-radius:0}.shs table.highlight>tbody>tr{transition:background-color .25s ease}.shs table.highlight>tbody>tr:hover{background-color:hsla(0,0%,94.9%,.5)}.shs table.centered tbody tr td,.shs table.centered thead tr th{text-align:center}.shs tr{border-bottom:1px solid rgba(0,0,0,.12)}.shs td,.shs th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:2px}@media only screen and (max-width:992px){.shs table.responsive-table{width:100%;border-collapse:collapse;border-spacing:0;display:block;position:relative}.shs table.responsive-table td:empty:before{content:"\00a0"}.shs table.responsive-table td,.shs table.responsive-table th{margin:0;vertical-align:top}.shs table.responsive-table th{text-align:left}.shs table.responsive-table thead{display:block;float:left}.shs table.responsive-table thead tr{display:block;padding:0 10px 0 0}.shs table.responsive-table thead tr th:before{content:"\00a0"}.shs table.responsive-table tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}.shs table.responsive-table tbody tr{display:inline-block;vertical-align:top}.shs table.responsive-table th{display:block;text-align:right}.shs table.responsive-table td{display:block;min-height:1.25em;text-align:left}.shs table.responsive-table tr{border-bottom:none;padding:0 10px}.shs table.responsive-table thead{border:0;border-right:1px solid rgba(0,0,0,.12)}}.shs .collection{margin:.5rem 0 1rem;border:1px solid #e0e0e0;border-radius:2px;overflow:hidden;position:relative}.shs .collection .collection-item{background-color:#fff;line-height:1.5rem;padding:10px 20px;margin:0;border-bottom:1px solid #e0e0e0}.shs .collection .collection-item.avatar{min-height:84px;padding-left:72px;position:relative}.shs .collection .collection-item.avatar:not(.circle-clipper)>.circle,.shs .collection .collection-item.avatar :not(.circle-clipper)>.circle{position:absolute;width:42px;height:42px;overflow:hidden;left:15px;display:inline-block;vertical-align:middle}.shs .collection .collection-item.avatar i.circle{font-size:18px;line-height:42px;color:#fff;background-color:#999;text-align:center}.shs .collection .collection-item.avatar .title{font-size:16px}.shs .collection .collection-item.avatar p{margin:0}.shs .collection .collection-item.avatar .secondary-content{position:absolute;top:16px;right:16px}.shs .collection .collection-item:last-child{border-bottom:none}.shs .collection .collection-item.active{background-color:#0085ba;color:#d4f3ff}.shs .collection .collection-item.active .secondary-content{color:#fff}.shs .collection a.collection-item{display:block;transition:.25s;color:#0085ba}.shs .collection a.collection-item:not(.active):hover{background-color:#ddd}.shs .collection.with-header .collection-header{background-color:#fff;border-bottom:1px solid #e0e0e0;padding:10px 20px}.shs .collection.with-header .collection-item{padding-left:30px}.shs .collection.with-header .collection-item.avatar{padding-left:72px}.shs .secondary-content{float:right;color:#0085ba}.shs .collapsible .collection{margin:0;border:none}.shs .video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden}.shs .video-container embed,.shs .video-container iframe,.shs .video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.shs .progress{position:relative;height:4px;display:block;width:100%;background-color:#87ddff;border-radius:2px;margin:.5rem 0 1rem;overflow:hidden}.shs .progress .determinate{position:absolute;top:0;left:0;bottom:0;background-color:#0085ba;transition:width .3s linear}.shs .progress .indeterminate{background-color:#0085ba}.shs .progress .indeterminate:before{-webkit-animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.shs .progress .indeterminate:after,.shs .progress .indeterminate:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right}.shs .progress .indeterminate:after{-webkit-animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}.shs .hide{display:none!important}.shs .left-align{text-align:left}.shs .right-align{text-align:right}.shs .center,.shs .center-align{text-align:center}.shs .left{float:left!important}.shs .right{float:right!important}.shs .no-select,.shs input[type=range],.shs input[type=range]+.thumb{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .circle{border-radius:50%}.shs .center-block{display:block;margin-left:auto;margin-right:auto}.shs .truncate{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shs .no-padding{padding:0!important}.shs .btn,.shs .btn-flat,.shs .btn-large,.shs .btn-small{border:none;border-radius:2px;display:inline-block;height:36px;line-height:36px;padding:0 16px;text-transform:uppercase;vertical-align:middle;-webkit-tap-highlight-color:transparent}.shs .btn-flat.disabled,.shs .btn-flat:disabled,.shs .btn-flat[disabled],.shs .btn-floating.disabled,.shs .btn-floating:disabled,.shs .btn-floating[disabled],.shs .btn-large.disabled,.shs .btn-large:disabled,.shs .btn-large[disabled],.shs .btn-small.disabled,.shs .btn-small:disabled,.shs .btn-small[disabled],.shs .btn.disabled,.shs .btn:disabled,.shs .btn[disabled],.shs .disabled.btn-large,.shs .disabled.btn-small{pointer-events:none;background-color:#dfdfdf!important;box-shadow:none;color:#9f9f9f!important;cursor:default}.shs .btn-flat.disabled:hover,.shs .btn-flat:disabled:hover,.shs .btn-flat[disabled]:hover,.shs .btn-floating.disabled:hover,.shs .btn-floating:disabled:hover,.shs .btn-floating[disabled]:hover,.shs .btn-large.disabled:hover,.shs .btn-large:disabled:hover,.shs .btn-large[disabled]:hover,.shs .btn-small.disabled:hover,.shs .btn-small:disabled:hover,.shs .btn-small[disabled]:hover,.shs .btn.disabled:hover,.shs .btn:disabled:hover,.shs .btn[disabled]:hover,.shs .disabled.btn-large:hover,.shs .disabled.btn-small:hover{background-color:#dfdfdf!important;color:#9f9f9f!important}.shs .btn,.shs .btn-flat,.shs .btn-floating,.shs .btn-large,.shs .btn-small{font-size:14px;outline:0}.shs .btn-flat i,.shs .btn-floating i,.shs .btn-large i,.shs .btn-small i,.shs .btn i{font-size:1.3rem;line-height:inherit}.shs .btn-floating:focus,.shs .btn-large:focus,.shs .btn-small:focus,.shs .btn:focus{background-color:#006187}.shs .btn,.shs .btn-large,.shs .btn-small{text-decoration:none;color:#fff;background-color:#0085ba;text-align:center;letter-spacing:.5px;transition:background-color .2s ease-out;cursor:pointer}.shs .btn-large:hover,.shs .btn-small:hover,.shs .btn:hover{background-color:#0097d4}.shs .btn-floating{display:inline-block;color:#fff;position:relative;overflow:hidden;z-index:1;width:40px;height:40px;line-height:40px;padding:0;border-radius:50%;transition:background-color .3s;cursor:pointer;vertical-align:middle}.shs .btn-floating,.shs .btn-floating:hover{background-color:#0085ba}.shs .btn-floating:before{border-radius:0}.shs .btn-floating.btn-large{width:56px;height:56px;padding:0}.shs .btn-floating.btn-large.halfway-fab{bottom:-28px}.shs .btn-floating.btn-large i{line-height:56px}.shs .btn-floating.btn-small{width:32.4px;height:32.4px}.shs .btn-floating.btn-small.halfway-fab{bottom:-16.2px}.shs .btn-floating.btn-small i{line-height:32.4px}.shs .btn-floating.halfway-fab{position:absolute;right:24px;bottom:-20px}.shs .btn-floating.halfway-fab.left{right:auto;left:24px}.shs .btn-floating i{width:inherit;display:inline-block;text-align:center;color:#fff;font-size:1.6rem;line-height:40px}.shs button.btn-floating{border:none}.shs .fixed-action-btn{position:fixed;right:23px;bottom:23px;padding-top:15px;margin-bottom:0;z-index:997}.shs .fixed-action-btn.active ul{visibility:visible}.shs .fixed-action-btn.direction-left,.shs .fixed-action-btn.direction-right{padding:0 0 0 15px}.shs .fixed-action-btn.direction-left ul,.shs .fixed-action-btn.direction-right ul{text-align:right;right:64px;top:50%;transform:translateY(-50%);height:100%;left:auto;width:500px}.shs .fixed-action-btn.direction-left ul li,.shs .fixed-action-btn.direction-right ul li{display:inline-block;margin:7.5px 15px 0 0}.shs .fixed-action-btn.direction-right{padding:0 15px 0 0}.shs .fixed-action-btn.direction-right ul{text-align:left;direction:rtl;left:64px;right:auto}.shs .fixed-action-btn.direction-right ul li{margin:7.5px 0 0 15px}.shs .fixed-action-btn.direction-bottom{padding:0 0 15px}.shs .fixed-action-btn.direction-bottom ul{top:64px;bottom:auto;display:flex;flex-direction:column-reverse}.shs .fixed-action-btn.direction-bottom ul li{margin:15px 0 0}.shs .fixed-action-btn.toolbar{padding:0;height:56px}.shs .fixed-action-btn.toolbar.active>a i{opacity:0}.shs .fixed-action-btn.toolbar ul{display:flex;top:0;bottom:0;z-index:1}.shs .fixed-action-btn.toolbar ul li{flex:1;display:inline-block;margin:0;height:100%;transition:none}.shs .fixed-action-btn.toolbar ul li a{display:block;overflow:hidden;position:relative;width:100%;height:100%;background-color:transparent;box-shadow:none;color:#fff;line-height:56px;z-index:1}.shs .fixed-action-btn.toolbar ul li a i{line-height:inherit}.shs .fixed-action-btn ul{left:0;right:0;text-align:center;position:absolute;bottom:64px;margin:0;visibility:hidden}.shs .fixed-action-btn ul li{margin-bottom:15px}.shs .fixed-action-btn ul a.btn-floating{opacity:0}.shs .fixed-action-btn .fab-backdrop{position:absolute;top:0;left:0;z-index:-1;width:40px;height:40px;background-color:#0085ba;border-radius:50%;transform:scale(0)}.shs .btn-flat{background-color:transparent;color:#343434;cursor:pointer;transition:background-color .2s}.shs .btn-flat,.shs .btn-flat:focus,.shs .btn-flat:hover{box-shadow:none}.shs .btn-flat:focus{background-color:rgba(0,0,0,.1)}.shs .btn-flat.btn-flat[disabled],.shs .btn-flat.disabled{background-color:transparent!important;color:#b3b3b3!important;cursor:default}.shs .btn-large{height:54px;line-height:54px;font-size:15px;padding:0 28px}.shs .btn-large i{font-size:1.6rem}.shs .btn-small{height:32.4px;line-height:32.4px;font-size:13px}.shs .btn-small i{font-size:1.2rem}.shs .btn-block{display:block}.shs .modal{display:none;position:fixed;left:0;right:0;background-color:#fafafa;padding:0;max-height:70%;width:55%;margin:auto;overflow-y:auto;border-radius:2px;will-change:top,opacity}.shs .modal:focus{outline:none}@media only screen and (max-width:992px){.shs .modal{width:80%}}.shs .modal h1,.shs .modal h2,.shs .modal h3,.shs .modal h4{margin-top:0}.shs .modal .modal-content{padding:24px}.shs .modal .modal-close{cursor:pointer}.shs .modal .modal-footer{border-radius:0 0 2px 2px;background-color:#fafafa;padding:4px 6px;height:56px;width:100%;text-align:right}.shs .modal .modal-footer .btn,.shs .modal .modal-footer .btn-flat,.shs .modal .modal-footer .btn-large,.shs .modal .modal-footer .btn-small{margin:6px 0}.shs .modal-overlay{position:fixed;z-index:999;top:-25%;left:0;bottom:0;right:0;height:125%;width:100%;background:#000;display:none;will-change:opacity}.shs .modal.modal-fixed-footer{padding:0;height:70%}.shs .modal.modal-fixed-footer .modal-content{position:absolute;height:calc(100% - 56px);max-height:100%;width:100%;overflow-y:auto}.shs .modal.modal-fixed-footer .modal-footer{border-top:1px solid rgba(0,0,0,.1);position:absolute;bottom:0}.shs .modal.bottom-sheet{top:auto;bottom:-100%;margin:0;width:100%;max-height:45%;border-radius:0;will-change:bottom,opacity}.shs select:focus{outline:1px solid #abe7ff}.shs button:focus{outline:none;background-color:#0094ce}.shs label{font-size:.8rem;color:#9e9e9e}.shs ::-moz-placeholder{color:#d1d1d1}.shs :-ms-input-placeholder{color:#d1d1d1}.shs ::-ms-input-placeholder{color:#d1d1d1}.shs ::placeholder{color:#d1d1d1}.shs input:not([type]),.shs input[type=date]:not(.browser-default),.shs input[type=datetime-local]:not(.browser-default),.shs input[type=datetime]:not(.browser-default),.shs input[type=email]:not(.browser-default),.shs input[type=number]:not(.browser-default),.shs input[type=password]:not(.browser-default),.shs input[type=search]:not(.browser-default),.shs input[type=tel]:not(.browser-default),.shs input[type=text]:not(.browser-default),.shs input[type=time]:not(.browser-default),.shs input[type=url]:not(.browser-default),.shs textarea.materialize-textarea{background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;border-radius:0;outline:none;height:3rem;width:100%;font-size:16px;margin:0 0 8px;padding:0;box-shadow:none;box-sizing:content-box;transition:box-shadow .3s,border .3s}.shs input:not([type]):disabled,.shs input:not([type])[readonly=readonly],.shs input[type=date]:not(.browser-default):disabled,.shs input[type=date]:not(.browser-default)[readonly=readonly],.shs input[type=datetime-local]:not(.browser-default):disabled,.shs input[type=datetime-local]:not(.browser-default)[readonly=readonly],.shs input[type=datetime]:not(.browser-default):disabled,.shs input[type=datetime]:not(.browser-default)[readonly=readonly],.shs input[type=email]:not(.browser-default):disabled,.shs input[type=email]:not(.browser-default)[readonly=readonly],.shs input[type=number]:not(.browser-default):disabled,.shs input[type=number]:not(.browser-default)[readonly=readonly],.shs input[type=password]:not(.browser-default):disabled,.shs input[type=password]:not(.browser-default)[readonly=readonly],.shs input[type=search]:not(.browser-default):disabled,.shs input[type=search]:not(.browser-default)[readonly=readonly],.shs input[type=tel]:not(.browser-default):disabled,.shs input[type=tel]:not(.browser-default)[readonly=readonly],.shs input[type=text]:not(.browser-default):disabled,.shs input[type=text]:not(.browser-default)[readonly=readonly],.shs input[type=time]:not(.browser-default):disabled,.shs input[type=time]:not(.browser-default)[readonly=readonly],.shs input[type=url]:not(.browser-default):disabled,.shs input[type=url]:not(.browser-default)[readonly=readonly],.shs textarea.materialize-textarea:disabled,.shs textarea.materialize-textarea[readonly=readonly]{color:rgba(0,0,0,.42);border-bottom:1px dotted rgba(0,0,0,.42)}.shs input:not([type]):disabled+label,.shs input:not([type])[readonly=readonly]+label,.shs input[type=date]:not(.browser-default):disabled+label,.shs input[type=date]:not(.browser-default)[readonly=readonly]+label,.shs input[type=datetime-local]:not(.browser-default):disabled+label,.shs input[type=datetime-local]:not(.browser-default)[readonly=readonly]+label,.shs input[type=datetime]:not(.browser-default):disabled+label,.shs input[type=datetime]:not(.browser-default)[readonly=readonly]+label,.shs input[type=email]:not(.browser-default):disabled+label,.shs input[type=email]:not(.browser-default)[readonly=readonly]+label,.shs input[type=number]:not(.browser-default):disabled+label,.shs input[type=number]:not(.browser-default)[readonly=readonly]+label,.shs input[type=password]:not(.browser-default):disabled+label,.shs input[type=password]:not(.browser-default)[readonly=readonly]+label,.shs input[type=search]:not(.browser-default):disabled+label,.shs input[type=search]:not(.browser-default)[readonly=readonly]+label,.shs input[type=tel]:not(.browser-default):disabled+label,.shs input[type=tel]:not(.browser-default)[readonly=readonly]+label,.shs input[type=text]:not(.browser-default):disabled+label,.shs input[type=text]:not(.browser-default)[readonly=readonly]+label,.shs input[type=time]:not(.browser-default):disabled+label,.shs input[type=time]:not(.browser-default)[readonly=readonly]+label,.shs input[type=url]:not(.browser-default):disabled+label,.shs input[type=url]:not(.browser-default)[readonly=readonly]+label,.shs textarea.materialize-textarea:disabled+label,.shs textarea.materialize-textarea[readonly=readonly]+label{color:rgba(0,0,0,.42)}.shs input:not([type]):focus:not([readonly]),.shs input[type=date]:not(.browser-default):focus:not([readonly]),.shs input[type=datetime-local]:not(.browser-default):focus:not([readonly]),.shs input[type=datetime]:not(.browser-default):focus:not([readonly]),.shs input[type=email]:not(.browser-default):focus:not([readonly]),.shs input[type=number]:not(.browser-default):focus:not([readonly]),.shs input[type=password]:not(.browser-default):focus:not([readonly]),.shs input[type=search]:not(.browser-default):focus:not([readonly]),.shs input[type=tel]:not(.browser-default):focus:not([readonly]),.shs input[type=text]:not(.browser-default):focus:not([readonly]),.shs input[type=time]:not(.browser-default):focus:not([readonly]),.shs input[type=url]:not(.browser-default):focus:not([readonly]),.shs textarea.materialize-textarea:focus:not([readonly]){border-bottom:1px solid #0085ba;box-shadow:0 1px 0 0 #0085ba}.shs input:not([type]):focus:not([readonly])+label,.shs input[type=date]:not(.browser-default):focus:not([readonly])+label,.shs input[type=datetime-local]:not(.browser-default):focus:not([readonly])+label,.shs input[type=datetime]:not(.browser-default):focus:not([readonly])+label,.shs input[type=email]:not(.browser-default):focus:not([readonly])+label,.shs input[type=number]:not(.browser-default):focus:not([readonly])+label,.shs input[type=password]:not(.browser-default):focus:not([readonly])+label,.shs input[type=search]:not(.browser-default):focus:not([readonly])+label,.shs input[type=tel]:not(.browser-default):focus:not([readonly])+label,.shs input[type=text]:not(.browser-default):focus:not([readonly])+label,.shs input[type=time]:not(.browser-default):focus:not([readonly])+label,.shs input[type=url]:not(.browser-default):focus:not([readonly])+label,.shs textarea.materialize-textarea:focus:not([readonly])+label{color:#0085ba}.shs input:not([type]):focus.valid~label,.shs input[type=date]:not(.browser-default):focus.valid~label,.shs input[type=datetime-local]:not(.browser-default):focus.valid~label,.shs input[type=datetime]:not(.browser-default):focus.valid~label,.shs input[type=email]:not(.browser-default):focus.valid~label,.shs input[type=number]:not(.browser-default):focus.valid~label,.shs input[type=password]:not(.browser-default):focus.valid~label,.shs input[type=search]:not(.browser-default):focus.valid~label,.shs input[type=tel]:not(.browser-default):focus.valid~label,.shs input[type=text]:not(.browser-default):focus.valid~label,.shs input[type=time]:not(.browser-default):focus.valid~label,.shs input[type=url]:not(.browser-default):focus.valid~label,.shs textarea.materialize-textarea:focus.valid~label{color:#4caf50}.shs input:not([type]):focus.invalid~label,.shs input[type=date]:not(.browser-default):focus.invalid~label,.shs input[type=datetime-local]:not(.browser-default):focus.invalid~label,.shs input[type=datetime]:not(.browser-default):focus.invalid~label,.shs input[type=email]:not(.browser-default):focus.invalid~label,.shs input[type=number]:not(.browser-default):focus.invalid~label,.shs input[type=password]:not(.browser-default):focus.invalid~label,.shs input[type=search]:not(.browser-default):focus.invalid~label,.shs input[type=tel]:not(.browser-default):focus.invalid~label,.shs input[type=text]:not(.browser-default):focus.invalid~label,.shs input[type=time]:not(.browser-default):focus.invalid~label,.shs input[type=url]:not(.browser-default):focus.invalid~label,.shs textarea.materialize-textarea:focus.invalid~label{color:#f44336}.shs input:not([type]).validate+label,.shs input[type=date]:not(.browser-default).validate+label,.shs input[type=datetime-local]:not(.browser-default).validate+label,.shs input[type=datetime]:not(.browser-default).validate+label,.shs input[type=email]:not(.browser-default).validate+label,.shs input[type=number]:not(.browser-default).validate+label,.shs input[type=password]:not(.browser-default).validate+label,.shs input[type=search]:not(.browser-default).validate+label,.shs input[type=tel]:not(.browser-default).validate+label,.shs input[type=text]:not(.browser-default).validate+label,.shs input[type=time]:not(.browser-default).validate+label,.shs input[type=url]:not(.browser-default).validate+label,.shs textarea.materialize-textarea.validate+label{width:100%}.shs .select-wrapper.valid>input.select-dropdown,.shs input.valid:not([type]),.shs input.valid:not([type]):focus,.shs input.valid[type=date]:not(.browser-default),.shs input.valid[type=date]:not(.browser-default):focus,.shs input.valid[type=datetime-local]:not(.browser-default),.shs input.valid[type=datetime-local]:not(.browser-default):focus,.shs input.valid[type=datetime]:not(.browser-default),.shs input.valid[type=datetime]:not(.browser-default):focus,.shs input.valid[type=email]:not(.browser-default),.shs input.valid[type=email]:not(.browser-default):focus,.shs input.valid[type=number]:not(.browser-default),.shs input.valid[type=number]:not(.browser-default):focus,.shs input.valid[type=password]:not(.browser-default),.shs input.valid[type=password]:not(.browser-default):focus,.shs input.valid[type=search]:not(.browser-default),.shs input.valid[type=search]:not(.browser-default):focus,.shs input.valid[type=tel]:not(.browser-default),.shs input.valid[type=tel]:not(.browser-default):focus,.shs input.valid[type=text]:not(.browser-default),.shs input.valid[type=text]:not(.browser-default):focus,.shs input.valid[type=time]:not(.browser-default),.shs input.valid[type=time]:not(.browser-default):focus,.shs input.valid[type=url]:not(.browser-default),.shs input.valid[type=url]:not(.browser-default):focus,.shs textarea.materialize-textarea.valid,.shs textarea.materialize-textarea.valid:focus{border-bottom:1px solid #4caf50;box-shadow:0 1px 0 0 #4caf50}.shs .select-wrapper.invalid>input.select-dropdown,.shs .select-wrapper.invalid>input.select-dropdown:focus,.shs input.invalid:not([type]),.shs input.invalid:not([type]):focus,.shs input.invalid[type=date]:not(.browser-default),.shs input.invalid[type=date]:not(.browser-default):focus,.shs input.invalid[type=datetime-local]:not(.browser-default),.shs input.invalid[type=datetime-local]:not(.browser-default):focus,.shs input.invalid[type=datetime]:not(.browser-default),.shs input.invalid[type=datetime]:not(.browser-default):focus,.shs input.invalid[type=email]:not(.browser-default),.shs input.invalid[type=email]:not(.browser-default):focus,.shs input.invalid[type=number]:not(.browser-default),.shs input.invalid[type=number]:not(.browser-default):focus,.shs input.invalid[type=password]:not(.browser-default),.shs input.invalid[type=password]:not(.browser-default):focus,.shs input.invalid[type=search]:not(.browser-default),.shs input.invalid[type=search]:not(.browser-default):focus,.shs input.invalid[type=tel]:not(.browser-default),.shs input.invalid[type=tel]:not(.browser-default):focus,.shs input.invalid[type=text]:not(.browser-default),.shs input.invalid[type=text]:not(.browser-default):focus,.shs input.invalid[type=time]:not(.browser-default),.shs input.invalid[type=time]:not(.browser-default):focus,.shs input.invalid[type=url]:not(.browser-default),.shs input.invalid[type=url]:not(.browser-default):focus,.shs textarea.materialize-textarea.invalid,.shs textarea.materialize-textarea.invalid:focus{border-bottom:1px solid #f44336;box-shadow:0 1px 0 0 #f44336}.shs .select-wrapper.invalid~.helper-text[data-error],.shs .select-wrapper.valid .helper-text[data-success],.shs input:not([type]).invalid~.helper-text[data-error],.shs input:not([type]).valid~.helper-text[data-success],.shs input:not([type]):focus.invalid~.helper-text[data-error],.shs input:not([type]):focus.valid~.helper-text[data-success],.shs input[type=date]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=date]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=date]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=date]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=datetime-local]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=datetime-local]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=datetime-local]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=datetime-local]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=datetime]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=datetime]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=datetime]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=datetime]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=email]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=email]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=email]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=email]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=number]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=number]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=number]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=number]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=password]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=password]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=password]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=password]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=search]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=search]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=search]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=search]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=tel]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=tel]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=tel]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=tel]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=text]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=text]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=text]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=text]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=time]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=time]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=time]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=time]:not(.browser-default):focus.valid~.helper-text[data-success],.shs input[type=url]:not(.browser-default).invalid~.helper-text[data-error],.shs input[type=url]:not(.browser-default).valid~.helper-text[data-success],.shs input[type=url]:not(.browser-default):focus.invalid~.helper-text[data-error],.shs input[type=url]:not(.browser-default):focus.valid~.helper-text[data-success],.shs textarea.materialize-textarea.invalid~.helper-text[data-error],.shs textarea.materialize-textarea.valid~.helper-text[data-success],.shs textarea.materialize-textarea:focus.invalid~.helper-text[data-error],.shs textarea.materialize-textarea:focus.valid~.helper-text[data-success]{color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.shs .select-wrapper.valid~.helper-text:after,.shs input:not([type]).valid~.helper-text:after,.shs input:not([type]):focus.valid~.helper-text:after,.shs input[type=date]:not(.browser-default).valid~.helper-text:after,.shs input[type=date]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default).valid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=datetime]:not(.browser-default).valid~.helper-text:after,.shs input[type=datetime]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=email]:not(.browser-default).valid~.helper-text:after,.shs input[type=email]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=number]:not(.browser-default).valid~.helper-text:after,.shs input[type=number]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=password]:not(.browser-default).valid~.helper-text:after,.shs input[type=password]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=search]:not(.browser-default).valid~.helper-text:after,.shs input[type=search]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=tel]:not(.browser-default).valid~.helper-text:after,.shs input[type=tel]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=text]:not(.browser-default).valid~.helper-text:after,.shs input[type=text]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=time]:not(.browser-default).valid~.helper-text:after,.shs input[type=time]:not(.browser-default):focus.valid~.helper-text:after,.shs input[type=url]:not(.browser-default).valid~.helper-text:after,.shs input[type=url]:not(.browser-default):focus.valid~.helper-text:after,.shs textarea.materialize-textarea.valid~.helper-text:after,.shs textarea.materialize-textarea:focus.valid~.helper-text:after{content:attr(data-success);color:#4caf50}.shs .select-wrapper.invalid~.helper-text:after,.shs input:not([type]).invalid~.helper-text:after,.shs input:not([type]):focus.invalid~.helper-text:after,.shs input[type=date]:not(.browser-default).invalid~.helper-text:after,.shs input[type=date]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default).invalid~.helper-text:after,.shs input[type=datetime-local]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=datetime]:not(.browser-default).invalid~.helper-text:after,.shs input[type=datetime]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=email]:not(.browser-default).invalid~.helper-text:after,.shs input[type=email]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=number]:not(.browser-default).invalid~.helper-text:after,.shs input[type=number]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=password]:not(.browser-default).invalid~.helper-text:after,.shs input[type=password]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=search]:not(.browser-default).invalid~.helper-text:after,.shs input[type=search]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=tel]:not(.browser-default).invalid~.helper-text:after,.shs input[type=tel]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=text]:not(.browser-default).invalid~.helper-text:after,.shs input[type=text]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=time]:not(.browser-default).invalid~.helper-text:after,.shs input[type=time]:not(.browser-default):focus.invalid~.helper-text:after,.shs input[type=url]:not(.browser-default).invalid~.helper-text:after,.shs input[type=url]:not(.browser-default):focus.invalid~.helper-text:after,.shs textarea.materialize-textarea.invalid~.helper-text:after,.shs textarea.materialize-textarea:focus.invalid~.helper-text:after{content:attr(data-error);color:#f44336}.shs .select-wrapper+label:after,.shs input:not([type])+label:after,.shs input[type=date]:not(.browser-default)+label:after,.shs input[type=datetime-local]:not(.browser-default)+label:after,.shs input[type=datetime]:not(.browser-default)+label:after,.shs input[type=email]:not(.browser-default)+label:after,.shs input[type=number]:not(.browser-default)+label:after,.shs input[type=password]:not(.browser-default)+label:after,.shs input[type=search]:not(.browser-default)+label:after,.shs input[type=tel]:not(.browser-default)+label:after,.shs input[type=text]:not(.browser-default)+label:after,.shs input[type=time]:not(.browser-default)+label:after,.shs input[type=url]:not(.browser-default)+label:after,.shs textarea.materialize-textarea+label:after{display:block;content:"";position:absolute;top:100%;left:0;opacity:0;transition:opacity .2s ease-out,color .2s ease-out}.shs .input-field{position:relative;margin-top:1rem;margin-bottom:1rem}.shs .input-field.inline{display:inline-block;vertical-align:middle;margin-left:5px}.shs .input-field.inline .select-dropdown,.shs .input-field.inline input{margin-bottom:1rem}.shs .input-field.col label{left:.75rem}.shs .input-field.col .prefix~.validate~label,.shs .input-field.col .prefix~label{width:calc(100% - 4.5rem)}.shs .input-field>label{color:#9e9e9e;position:absolute;top:0;left:0;font-size:1rem;cursor:text;transition:transform .2s ease-out,color .2s ease-out;transform-origin:0 100%;text-align:initial;transform:translateY(12px)}.shs .input-field>label:not(.label-icon).active{transform:translateY(-14px) scale(.8);transform-origin:0 0}.shs .input-field>input[type=date]:not(.browser-default)+label,.shs .input-field>input[type=time]:not(.browser-default)+label,.shs .input-field>input[type]:-webkit-autofill:not(.browser-default):not([type=search])+label{transform:translateY(-14px) scale(.8);transform-origin:0 0}.shs .input-field .helper-text{position:relative;min-height:18px;display:block;font-size:12px;color:rgba(0,0,0,.54)}.shs .input-field .helper-text:after{opacity:1;position:absolute;top:0;left:0}.shs .input-field .prefix{position:absolute;width:3rem;font-size:2rem;transition:color .2s;top:.5rem}.shs .input-field .prefix.active{color:#0085ba}.shs .input-field .prefix~.autocomplete-content,.shs .input-field .prefix~.helper-text,.shs .input-field .prefix~.validate~label,.shs .input-field .prefix~input,.shs .input-field .prefix~label,.shs .input-field .prefix~textarea{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.shs .input-field .prefix~label{margin-left:3rem}@media only screen and (max-width:992px){.shs .input-field .prefix~input{width:86%;width:calc(100% - 3rem)}}@media only screen and (max-width:600px){.shs .input-field .prefix~input{width:80%;width:calc(100% - 3rem)}}.shs .input-field input[type=search]{display:block;line-height:inherit;transition:background-color .3s}.nav-wrapper .shs .input-field input[type=search]{height:inherit;padding-left:4rem;width:calc(100% - 4rem);border:0;box-shadow:none}.shs .input-field input[type=search]:focus:not(.browser-default){background-color:#fff;border:0;box-shadow:none;color:#444}.shs .input-field input[type=search]:focus:not(.browser-default)+label i,.shs .input-field input[type=search]:focus:not(.browser-default)~.material-icons,.shs .input-field input[type=search]:focus:not(.browser-default)~.mdi-navigation-close{color:#444}.shs .input-field input[type=search]+.label-icon{transform:none;left:1rem}.shs .input-field input[type=search]~.material-icons,.shs .input-field input[type=search]~.mdi-navigation-close{position:absolute;top:0;right:1rem;color:transparent;cursor:pointer;font-size:2rem;transition:color .3s}.shs textarea{width:100%;height:3rem;background-color:transparent}.shs textarea.materialize-textarea{line-height:normal;overflow-y:hidden;padding:.8rem 0;resize:none;min-height:3rem;box-sizing:border-box}.shs .hiddendiv{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;padding-top:1.2rem;position:absolute;top:0;z-index:-1}.shs .autocomplete-content li .highlight{color:#444}.shs .autocomplete-content li img{height:40px;width:40px;margin:5px 15px}.shs .character-counter{min-height:18px}.shs [type=radio]:checked,.shs [type=radio]:not(:checked){position:absolute;opacity:0;pointer-events:none}.shs [type=radio]:checked+span,.shs [type=radio]:not(:checked)+span{position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;transition:.28s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs [type=radio]+span:after,.shs [type=radio]+span:before{content:"";position:absolute;left:0;top:0;margin:4px;width:16px;height:16px;z-index:0;transition:.28s ease}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio].with-gap:checked+span:before,.shs [type=radio]:checked+span:after,.shs [type=radio]:checked+span:before,.shs [type=radio]:not(:checked)+span:after,.shs [type=radio]:not(:checked)+span:before{border-radius:50%}.shs [type=radio]:not(:checked)+span:after,.shs [type=radio]:not(:checked)+span:before{border:2px solid #5a5a5a}.shs [type=radio]:not(:checked)+span:after{transform:scale(0)}.shs [type=radio]:checked+span:before{border:2px solid transparent}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio].with-gap:checked+span:before,.shs [type=radio]:checked+span:after{border:2px solid #0085ba}.shs [type=radio].with-gap:checked+span:after,.shs [type=radio]:checked+span:after{background-color:#0085ba}.shs [type=radio]:checked+span:after{transform:scale(1.02)}.shs [type=radio].with-gap:checked+span:after{transform:scale(.5)}.shs [type=radio].tabbed:focus+span:before{box-shadow:0 0 0 10px rgba(0,0,0,.1)}.shs [type=radio].with-gap:disabled:checked+span:before{border:2px solid rgba(0,0,0,.42)}.shs [type=radio].with-gap:disabled:checked+span:after{border:none;background-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:checked+span:before,.shs [type=radio]:disabled:not(:checked)+span:before{background-color:transparent;border-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled+span{color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:not(:checked)+span:before{border-color:rgba(0,0,0,.42)}.shs [type=radio]:disabled:checked+span:after{background-color:rgba(0,0,0,.42);border-color:#949494}.shs [type=checkbox]:checked,.shs [type=checkbox]:not(:checked){position:absolute;opacity:0;pointer-events:none}.shs [type=checkbox]+span:not(.lever){position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs [type=checkbox]+span:not(.lever):before,.shs [type=checkbox]:not(.filled-in)+span:not(.lever):after{content:"";position:absolute;top:0;left:0;width:18px;height:18px;z-index:0;border:2px solid #5a5a5a;border-radius:1px;margin-top:3px;transition:.2s}.shs [type=checkbox]:not(.filled-in)+span:not(.lever):after{border:0;transform:scale(0)}.shs [type=checkbox]:not(:checked):disabled+span:not(.lever):before{border:none;background-color:rgba(0,0,0,.42)}.shs [type=checkbox].tabbed:focus+span:not(.lever):after{transform:scale(1);border:0;border-radius:50%;box-shadow:0 0 0 10px rgba(0,0,0,.1);background-color:rgba(0,0,0,.1)}.shs [type=checkbox]:checked+span:not(.lever):before{top:-4px;left:-5px;width:12px;height:22px;border-color:transparent #0085ba #0085ba transparent;border-style:solid;border-width:2px;transform:rotate(40deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-origin:100% 100%}.shs [type=checkbox]:checked:disabled+span:before{border-right:2px solid rgba(0,0,0,.42);border-bottom:2px solid rgba(0,0,0,.42)}.shs [type=checkbox]:indeterminate+span:not(.lever):before{top:-11px;left:-12px;width:10px;height:22px;border:none;border-right:2px solid #0085ba;transform:rotate(90deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-origin:100% 100%}.shs [type=checkbox]:indeterminate:disabled+span:not(.lever):before{border-right:2px solid rgba(0,0,0,.42);background-color:transparent}.shs [type=checkbox].filled-in+span:not(.lever):after{border-radius:2px}.shs [type=checkbox].filled-in+span:not(.lever):after,.shs [type=checkbox].filled-in+span:not(.lever):before{content:"";left:0;position:absolute;transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;z-index:1}.shs [type=checkbox].filled-in:not(:checked)+span:not(.lever):before{width:0;height:0;border:3px solid transparent;left:6px;top:10px;transform:rotate(37deg);transform-origin:100% 100%}.shs [type=checkbox].filled-in:not(:checked)+span:not(.lever):after{height:20px;width:20px;background-color:transparent;border:2px solid #5a5a5a;top:0;z-index:0}.shs [type=checkbox].filled-in:checked+span:not(.lever):before{top:0;left:1px;width:8px;height:13px;border-color:transparent #fff #fff transparent;border-style:solid;border-width:2px;transform:rotate(37deg);transform-origin:100% 100%}.shs [type=checkbox].filled-in:checked+span:not(.lever):after{top:0;width:20px;height:20px;border:2px solid #0085ba;background-color:#0085ba;z-index:0}.shs [type=checkbox].filled-in.tabbed:focus+span:not(.lever):after{border-radius:2px;border-color:#5a5a5a;background-color:rgba(0,0,0,.1)}.shs [type=checkbox].filled-in.tabbed:checked:focus+span:not(.lever):after{border-radius:2px;background-color:#0085ba;border-color:#0085ba}.shs [type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):before{background-color:transparent;border:2px solid transparent}.shs [type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):after{border-color:transparent;background-color:#949494}.shs [type=checkbox].filled-in:disabled:checked+span:not(.lever):before{background-color:transparent}.shs [type=checkbox].filled-in:disabled:checked+span:not(.lever):after{background-color:#949494;border-color:#949494}.shs .switch,.shs .switch *{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .switch label{cursor:pointer}.shs .switch label input[type=checkbox]{opacity:0;width:0;height:0}.shs .switch label input[type=checkbox]:checked+.lever{background-color:#53bce6}.shs .switch label input[type=checkbox]:checked+.lever:after,.shs .switch label input[type=checkbox]:checked+.lever:before{left:18px}.shs .switch label input[type=checkbox]:checked+.lever:after{background-color:#0085ba}.shs .switch label .lever{content:"";display:inline-block;position:relative;width:36px;height:14px;background-color:rgba(0,0,0,.38);border-radius:15px;transition:background .3s ease;vertical-align:middle;margin:0 16px}.shs .switch label .lever:after,.shs .switch label .lever:before{content:"";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease}.shs .switch label .lever:before{background-color:rgba(0,133,186,.15)}.shs .switch label .lever:after{background-color:#f1f1f1;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.shs input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever:before,.shs input[type=checkbox]:checked:not(:disabled)~.lever:active:before{transform:scale(2.4);background-color:rgba(0,133,186,.15)}.shs input[type=checkbox]:not(:disabled).tabbed:focus~.lever:before,.shs input[type=checkbox]:not(:disabled)~.lever:active:before{transform:scale(2.4);background-color:rgba(0,0,0,.08)}.shs .switch input[type=checkbox][disabled]+.lever{cursor:default;background-color:rgba(0,0,0,.12)}.shs .switch label input[type=checkbox][disabled]+.lever:after,.shs .switch label input[type=checkbox][disabled]:checked+.lever:after{background-color:#949494}.shs select{display:none}.shs select.browser-default{display:block}.shs select{background-color:hsla(0,0%,100%,.9);width:100%;padding:5px;border:1px solid #f2f2f2;border-radius:2px;height:3rem}.shs .select-label{position:absolute}.shs .select-wrapper{position:relative}.shs .select-wrapper.invalid+label,.shs .select-wrapper.valid+label{width:100%;pointer-events:none}.shs .select-wrapper input.select-dropdown{position:relative;cursor:pointer;background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;outline:none;height:3rem;line-height:3rem;width:100%;font-size:16px;margin:0 0 8px;padding:0;display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}.shs .select-wrapper input.select-dropdown:focus{border-bottom:1px solid #0085ba}.shs .select-wrapper .caret{position:absolute;right:0;top:0;bottom:0;margin:auto 0;z-index:0;fill:rgba(0,0,0,.87)}.shs .select-wrapper+label{position:absolute;top:-26px;font-size:.8rem}.shs .select-wrapper.disabled+label,.shs select:disabled{color:rgba(0,0,0,.42)}.shs .select-wrapper.disabled .caret{fill:rgba(0,0,0,.42)}.shs .select-wrapper input.select-dropdown:disabled{color:rgba(0,0,0,.42);cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.shs .select-wrapper i{color:rgba(0,0,0,.3)}.shs .select-dropdown li.disabled,.shs .select-dropdown li.disabled>span,.shs .select-dropdown li.optgroup{color:rgba(0,0,0,.3);background-color:transparent}.shs .select-dropdown.dropdown-content li:hover,.shs body.keyboard-focused .select-dropdown.dropdown-content li:focus{background-color:rgba(0,0,0,.08)}.shs .select-dropdown.dropdown-content li.selected{background-color:rgba(0,0,0,.03)}.shs .prefix~.select-wrapper{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.shs .prefix~label{margin-left:3rem}.shs .select-dropdown li img{height:40px;width:40px;margin:5px 15px;float:right}.shs .select-dropdown li.optgroup{border-top:1px solid #eee}.shs .select-dropdown li.optgroup.selected>span{color:rgba(0,0,0,.7)}.shs .select-dropdown li.optgroup>span{color:rgba(0,0,0,.4)}.shs .select-dropdown li.optgroup~li.optgroup-option{padding-left:1rem}.shs .file-field{position:relative}.shs .file-field .file-path-wrapper{overflow:hidden;padding-left:10px}.shs .file-field input.file-path{width:100%}.shs .file-field .btn,.shs .file-field .btn-large,.shs .file-field .btn-small{float:left;height:3rem;line-height:3rem}.shs .file-field span{cursor:pointer}.shs .file-field input[type=file]{position:absolute;top:0;right:0;left:0;bottom:0;width:100%;margin:0;padding:0;font-size:20px;cursor:pointer;opacity:0;filter:alpha(opacity=0)}.shs .file-field input[type=file]::-webkit-file-upload-button{display:none}.shs .range-field{position:relative}.shs input[type=range],.shs input[type=range]+.thumb{cursor:pointer}.shs input[type=range]{position:relative;background-color:transparent;border:none;outline:none;width:100%;margin:15px 0;padding:0}.shs input[type=range]:focus{outline:none}.shs input[type=range]+.thumb{position:absolute;top:10px;left:0;border:none;height:0;width:0;border-radius:50%;background-color:#0085ba;margin-left:7px;transform-origin:50% 50%;transform:rotate(-45deg)}.shs input[type=range]+.thumb .value{display:block;width:30px;text-align:center;color:#0085ba;font-size:0;transform:rotate(45deg)}.shs input[type=range]+.thumb.active{border-radius:50% 50% 50% 0}.shs input[type=range]+.thumb.active .value{color:#fff;margin-left:-1px;margin-top:8px;font-size:10px}.shs input[type=range]{-webkit-appearance:none}.shs input[type=range]::-webkit-slider-runnable-track{height:3px;background:#c2c0c2;border:none}.shs input[type=range]::-webkit-slider-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-webkit-transition:box-shadow .3s;transition:box-shadow .3s;-webkit-appearance:none;background-color:#0085ba;transform-origin:50% 50%;margin:-5px 0 0}.shs .keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs input[type=range]{border:1px solid #fff}.shs input[type=range]::-moz-range-track{height:3px;background:#c2c0c2;border:none}.shs input[type=range]::-moz-focus-inner{border:0}.shs input[type=range]::-moz-range-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-moz-transition:box-shadow .3s;transition:box-shadow .3s;margin-top:-5px}.shs input[type=range]:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}.shs .keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs input[type=range]::-ms-track{height:3px;background:transparent;border-color:transparent;border-width:6px 0;color:transparent}.shs input[type=range]::-ms-fill-lower{background:#777}.shs input[type=range]::-ms-fill-upper{background:#ddd}.shs input[type=range]::-ms-thumb{border:none;height:14px;width:14px;border-radius:50%;background:#0085ba;-ms-transition:box-shadow .3s;transition:box-shadow .3s}.shs .keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb{box-shadow:0 0 0 10px rgba(0,133,186,.26)}.shs .datepicker-modal{max-width:325px;min-width:300px;max-height:none}.shs .datepicker-container.modal-content{display:flex;flex-direction:column;padding:0}.shs .datepicker-controls{display:flex;justify-content:space-between;width:280px;margin:0 auto}.shs .datepicker-controls .selects-container{display:flex}.shs .datepicker-controls .select-wrapper input{border-bottom:none;text-align:center;margin:0}.shs .datepicker-controls .select-wrapper input:focus{border-bottom:none}.shs .datepicker-controls .select-wrapper .caret{display:none}.shs .datepicker-controls .select-year input{width:50px}.shs .datepicker-controls .select-month input{width:70px}.shs .month-next,.shs .month-prev{margin-top:4px;cursor:pointer;background-color:transparent;border:none}.shs .datepicker-date-display{flex:1 auto;background-color:#0085ba;color:#fff;padding:20px 22px;font-weight:500}.shs .datepicker-date-display .year-text{display:block;font-size:1.5rem;line-height:25px;color:hsla(0,0%,100%,.7)}.shs .datepicker-date-display .date-text{display:block;font-size:2.8rem;line-height:47px;font-weight:500}.shs .datepicker-calendar-container{flex:2.5 auto}.shs .datepicker-table{width:280px;font-size:1rem;margin:0 auto}.shs .datepicker-table thead{border-bottom:none}.shs .datepicker-table th{padding:10px 5px;text-align:center}.shs .datepicker-table tr{border:none}.shs .datepicker-table abbr{text-decoration:none;color:#999}.shs .datepicker-table td{border-radius:50%;padding:0}.shs .datepicker-table td.is-today{color:#0085ba}.shs .datepicker-table td.is-selected{background-color:#0085ba;color:#fff}.shs .datepicker-table td.is-disabled,.shs .datepicker-table td.is-outside-current-month{color:rgba(0,0,0,.3);pointer-events:none}.shs .datepicker-day-button{background-color:transparent;border:none;line-height:38px;display:block;width:100%;border-radius:50%;padding:0 5px;cursor:pointer;color:inherit}.shs .datepicker-day-button:focus{background-color:rgba(5,131,181,.25)}.shs .datepicker-footer{width:280px;margin:0 auto;padding-bottom:5px;display:flex;justify-content:space-between}.shs .datepicker-cancel,.shs .datepicker-clear,.shs .datepicker-done,.shs .datepicker-today{color:#0085ba;padding:0 1rem}.shs .datepicker-clear{color:#f44336}@media only screen and (min-width:601px){.shs .datepicker-modal{max-width:625px}.shs .datepicker-container.modal-content{flex-direction:row}.shs .datepicker-date-display{flex:0 1 270px}.shs .datepicker-controls,.shs .datepicker-footer,.shs .datepicker-table{width:320px}.shs .datepicker-day-button{line-height:44px}}.clearfix{clear:both}.bold{font-weight:700;color:#444}.time-type-icon{width:20px;font-size:18px;font-weight:700;text-align:center}.support-hours-mail,.time-type-icon{display:inline-block}.support-hours-mail span{margin-right:5px}.support-hours-notice{margin-top:15px!important;margin-bottom:15px!important}.support-hours-notice p{line-height:1.8}.support-hours-notice a{color:#444}*,:after,:before{box-sizing:content-box}.shs *,.shs :after,.shs :before{box-sizing:border-box!important}#support_hours_dashboard_widget h3{margin:1.33em 0 0;font-size:16px;font-weight:700}.sh-gauge{position:relative}.sh-gauge__wrapper:focus{box-shadow:none;outline:none}.sh-gauge__base{opacity:1;stroke:#ccc;stroke-width:7px;fill:none}.sh-gauge__svg-wrapper{position:relative;padding-bottom:100%}.sh-gauge__svg{position:absolute;left:0;top:0;bottom:0;right:0}.sh-gauge__arc{fill:none;stroke:#008ec2;stroke-width:7px;transition:stroke-dasharray 1.5s ease-in-out .25s;stroke-dasharray:0,352px;box-shadow:2px 2px 2px #000}.sh-gauge__overlay{stroke-width:105;stroke-linecap:round;stroke:#fff;transition:stroke-width .2s ease-in}.sh-gauge__percentage{width:100%;height:100%;position:absolute;display:flex;line-height:0;text-align:center;top:0}.sh-gauge__text{display:block;width:100%;align-self:center;font-size:30px;font-weight:700;line-height:1.2;color:#ccc;text-align:center;transition:all .2s ease-in-out}@media screen and (min-width:870px){.sh-gauge__text{font-size:35px}}.sh-gauge__text .smallbr{display:none}@media screen and (min-width:870px){.sh-gauge__text .smallbr{display:block}}.sh-gauge__text .bigbr{display:block}@media screen and (min-width:870px){.sh-gauge__text .bigbr{display:none}}.sh-gauge__text--big .smallbr{display:none}.sh-gauge__text--big .bigbr{display:block}.sh-gauge:hover .sh-gauge__overlay{stroke-width:110}.sh-gauge:hover .sh-gauge__text{font-size:35px;color:#008ec2}@media screen and (min-width:870px){.sh-gauge:hover .sh-gauge__text{font-size:45px}}.sh-gauge:hover .sh-gauge__text--small{font-size:35px}@media screen and (min-width:870px){.sh-gauge:hover .sh-gauge__text--small{font-size:40px}}.worktable{min-width:300px;padding-bottom:10px;margin:20px 0 10px}.worktable input[type=date]::input-placeholder{visibility:hidden!important}.worktable thead tr{text-align:left}.worktable tr.repeating{border:0}.worktable .row-head>th{display:none;text-align:left}.worktable tr.repeating>td{display:block}.worktable tr.repeating>td:first-child{width:150px;padding-top:.5em}.worktable tr.repeating>td:last-child{padding-bottom:.5em}.worktable tr.repeating>td.remove:before{width:0;content:""}.worktable tr.repeating>td:before{display:inline-block;width:6.5em;font-weight:700;content:attr(data-th) ": "}@media (min-width:480px){.worktable tr.repeating>td:before{display:none}}.worktable .row-head>th,.worktable tr.repeating>td{text-align:left}@media (min-width:480px){.worktable .row-head>th,.worktable tr.repeating>td{display:table-cell;padding:.25em .5em}.worktable .row-head>th:first-child,.worktable tr.repeating>td:first-child{padding-left:0}.worktable .row-head>th:last-child,.worktable tr.repeating>td:last-child{padding-right:0}}.worktable .row-head>th>input,.worktable tr.repeating>td>input{margin-bottom:0!important}.total{padding:4px 12px 20px;margin:10px -12px 12px;font-size:1rem;border-bottom:1px solid #eee}.remove .dashicons{position:relative;top:7px}.support-hours-col.col-type{width:175px}.tablenav.sh-tablenav{height:auto}.admin-color-midnight .sh-gauge__arc{stroke:#e14d43}.admin-color-midnight .sh-gauge:hover .sh-gauge__text{color:#e14d43}.admin-color-midnight [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#e14d43!important;border:2px solid #e14d43!important}.admin-color-midnight td.is-today{background-color:rgba(225,77,67,.25)!important}.admin-color-midnight .datepicker-cancel,.admin-color-midnight .datepicker-done,.admin-color-midnight .dropdown-content li>span,.admin-color-midnight .timepicker-close,.admin-color-midnight td.is-today{color:#e14d43!important}.admin-color-midnight .datepicker-date-display,.admin-color-midnight .datepicker-table td.is-selected,.admin-color-midnight .timepicker-digital-display,.admin-color-midnight a.remove-row{background-color:#e14d43!important}.admin-color-midnight .timepicker-canvas line{stroke:#e14d43!important}.admin-color-midnight .timepicker-canvas-bearing,.admin-color-midnight .timepicker-canvas-bg{fill:#e14d43!important}.admin-color-midnight .timepicker-tick:hover{background-color:rgba(225,77,67,.25)!important}.admin-color-midnight td.is-selected{color:#fff!important}.admin-color-midnight tr.repeating [type=radio]:checked+span:after{background-color:#e14d43;border:2px solid #e14d43}.admin-color-midnight input:focus{border-bottom:1px solid #e14d43!important;box-shadow:0 1px 0 0 #e14d43!important}.admin-color-midnight .pagination li .current{background:#e14d43!important}.admin-color-ectoplasm .sh-gauge__arc{stroke:#a3b745}.admin-color-ectoplasm .sh-gauge:hover .sh-gauge__text{color:#a3b745}.admin-color-ectoplasm [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#a3b745!important;border:2px solid #a3b745!important}.admin-color-ectoplasm td.is-today{background-color:rgba(163,183,69,.25)!important}.admin-color-ectoplasm .datepicker-cancel,.admin-color-ectoplasm .datepicker-done,.admin-color-ectoplasm .dropdown-content li>span,.admin-color-ectoplasm .timepicker-close,.admin-color-ectoplasm td.is-today{color:#a3b745!important}.admin-color-ectoplasm .datepicker-date-display,.admin-color-ectoplasm .datepicker-table td.is-selected,.admin-color-ectoplasm .timepicker-digital-display,.admin-color-ectoplasm a.remove-row{background-color:#a3b745!important}.admin-color-ectoplasm .timepicker-canvas line{stroke:#a3b745!important}.admin-color-ectoplasm .timepicker-canvas-bearing,.admin-color-ectoplasm .timepicker-canvas-bg{fill:#a3b745!important}.admin-color-ectoplasm .timepicker-tick:hover{background-color:rgba(163,183,69,.25)!important}.admin-color-ectoplasm td.is-selected{color:#fff!important}.admin-color-ectoplasm tr.repeating [type=radio]:checked+span:after{background-color:#a3b745;border:2px solid #a3b745}.admin-color-ectoplasm input:focus{border-bottom:1px solid #a3b745!important;box-shadow:0 1px 0 0 #a3b745!important}.admin-color-ectoplasm .pagination li .current{background:#a3b745!important}.admin-color-blue .sh-gauge__arc{stroke:#e1a948}.admin-color-blue .sh-gauge:hover .sh-gauge__text{color:#e1a948}.admin-color-blue [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#e1a948!important;border:2px solid #e1a948!important}.admin-color-blue td.is-today{background-color:rgba(225,169,72,.25)!important}.admin-color-blue .datepicker-cancel,.admin-color-blue .datepicker-done,.admin-color-blue .dropdown-content li>span,.admin-color-blue .timepicker-close,.admin-color-blue td.is-today{color:#e1a948!important}.admin-color-blue .datepicker-date-display,.admin-color-blue .datepicker-table td.is-selected,.admin-color-blue .timepicker-digital-display,.admin-color-blue a.remove-row{background-color:#e1a948!important}.admin-color-blue .timepicker-canvas line{stroke:#e1a948!important}.admin-color-blue .timepicker-canvas-bearing,.admin-color-blue .timepicker-canvas-bg{fill:#e1a948!important}.admin-color-blue .timepicker-tick:hover{background-color:rgba(225,169,72,.25)!important}.admin-color-blue td.is-selected{color:#fff!important}.admin-color-blue tr.repeating [type=radio]:checked+span:after{background-color:#e1a948;border:2px solid #e1a948}.admin-color-blue input:focus{border-bottom:1px solid #e1a948!important;box-shadow:0 1px 0 0 #e1a948!important}.admin-color-blue .pagination li .current{background:#e1a948!important}.admin-color-ocean .sh-gauge__arc{stroke:#9ebaa0}.admin-color-ocean .sh-gauge:hover .sh-gauge__text{color:#9ebaa0}.admin-color-ocean [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#9ebaa0!important;border:2px solid #9ebaa0!important}.admin-color-ocean td.is-today{background-color:rgba(158,186,160,.25)!important}.admin-color-ocean .datepicker-cancel,.admin-color-ocean .datepicker-done,.admin-color-ocean .dropdown-content li>span,.admin-color-ocean .timepicker-close,.admin-color-ocean td.is-today{color:#9ebaa0!important}.admin-color-ocean .datepicker-date-display,.admin-color-ocean .datepicker-table td.is-selected,.admin-color-ocean .timepicker-digital-display,.admin-color-ocean a.remove-row{background-color:#9ebaa0!important}.admin-color-ocean .timepicker-canvas line{stroke:#9ebaa0!important}.admin-color-ocean .timepicker-canvas-bearing,.admin-color-ocean .timepicker-canvas-bg{fill:#9ebaa0!important}.admin-color-ocean .timepicker-tick:hover{background-color:rgba(158,186,160,.25)!important}.admin-color-ocean td.is-selected{color:#fff!important}.admin-color-ocean tr.repeating [type=radio]:checked+span:after{background-color:#9ebaa0;border:2px solid #9ebaa0}.admin-color-ocean input:focus{border-bottom:1px solid #9ebaa0!important;box-shadow:0 1px 0 0 #9ebaa0!important}.admin-color-ocean .pagination li .current{background:#9ebaa0!important}.admin-color-coffee .sh-gauge__arc{stroke:#c7a589}.admin-color-coffee .sh-gauge:hover .sh-gauge__text{color:#c7a589}.admin-color-coffee [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#c7a589!important;border:2px solid #c7a589!important}.admin-color-coffee td.is-today{background-color:rgba(199,165,137,.25)!important}.admin-color-coffee .datepicker-cancel,.admin-color-coffee .datepicker-done,.admin-color-coffee .dropdown-content li>span,.admin-color-coffee .timepicker-close,.admin-color-coffee td.is-today{color:#c7a589!important}.admin-color-coffee .datepicker-date-display,.admin-color-coffee .datepicker-table td.is-selected,.admin-color-coffee .timepicker-digital-display,.admin-color-coffee a.remove-row{background-color:#c7a589!important}.admin-color-coffee .timepicker-canvas line{stroke:#c7a589!important}.admin-color-coffee .timepicker-canvas-bearing,.admin-color-coffee .timepicker-canvas-bg{fill:#c7a589!important}.admin-color-coffee .timepicker-tick:hover{background-color:rgba(199,165,137,.25)!important}.admin-color-coffee td.is-selected{color:#fff!important}.admin-color-coffee tr.repeating [type=radio]:checked+span:after{background-color:#c7a589;border:2px solid #c7a589}.admin-color-coffee input:focus{border-bottom:1px solid #c7a589!important;box-shadow:0 1px 0 0 #c7a589!important}.admin-color-coffee .pagination li .current{background:#c7a589!important}.admin-color-sunrise .sh-gauge__arc{stroke:#dd823b}.admin-color-sunrise .sh-gauge:hover .sh-gauge__text{color:#dd823b}.admin-color-sunrise [type=checkbox].filled-in:checked+span:not(.lever):after{background-color:#dd823b!important;border:2px solid #dd823b!important}.admin-color-sunrise td.is-today{background-color:rgba(221,130,59,.25)!important}.admin-color-sunrise .datepicker-cancel,.admin-color-sunrise .datepicker-done,.admin-color-sunrise .dropdown-content li>span,.admin-color-sunrise .timepicker-close,.admin-color-sunrise td.is-today{color:#dd823b!important}.admin-color-sunrise .datepicker-date-display,.admin-color-sunrise .datepicker-table td.is-selected,.admin-color-sunrise .timepicker-digital-display,.admin-color-sunrise a.remove-row{background-color:#dd823b!important}.admin-color-sunrise .timepicker-canvas line{stroke:#dd823b!important}.admin-color-sunrise .timepicker-canvas-bearing,.admin-color-sunrise .timepicker-canvas-bg{fill:#dd823b!important}.admin-color-sunrise .timepicker-tick:hover{background-color:rgba(221,130,59,.25)!important}.admin-color-sunrise td.is-selected{color:#fff!important}.admin-color-sunrise tr.repeating [type=radio]:checked+span:after{background-color:#dd823b;border:2px solid #dd823b}.admin-color-sunrise input:focus{border-bottom:1px solid #dd823b!important;box-shadow:0 1px 0 0 #dd823b!important}.admin-color-sunrise .pagination li .current{background:#dd823b!important}.currentDate{display:none}.support-hours-settings p.submit{display:inline-block;padding:0!important;margin:0!important}.support-hours-settings fieldset{padding:0}.support-hours-settings h3,.support-hours-settings p{display:block;padding:15px 0;margin:0}.type-switch label{display:block}.datepicker-controls .select-month input{width:90px}.sh-pagination{margin:0!important}.sh-pagination .page-numbers{margin:0}.sh-pagination li{overflow:hidden;color:#555;vertical-align:top;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 #ccc}.sh-pagination li .next,.sh-pagination li .prev{line-height:25px!important}.sh-pagination li .current{color:#fff;background:#0085ba}.sh-pagination span{display:inline-block;padding:0 10px;font-size:1.2rem;line-height:30px;color:#444}.sh-footer{display:flex;justify-content:space-between;margin-right:30px} -
support-hours/trunk/includes/class-support-hours-activator.php
r2367690 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 21 23 * @author Erik van der Bas <erik@basedonline.nl> 22 24 */ 23 class Support_Hours_Activator { 25 class Support_Hours_Activator 26 { 24 27 25 28 /** … … 30 33 * @since 1.0.0 31 34 */ 32 public static function activate() { 33 /* 34 function sample_admin_notice__error() { 35 $options = get_option($this->plugin_name); 36 $class = 'notice notice-warning is-dismissible'; 37 $first = __( 'Support Hours uses a new system to store hours. Do not forget to input the old hours into the new system. Amount of old hours need to be set:', 'sample-text-domain' ); 38 ?> 39 <div class="<?php echo $class ?>"> 40 <p> 41 <?php echo $first; ?> 42 <?php echo $options['used_hours']; ?> 43 </p> 44 </div> 45 <?php } 46 add_action( 'admin_notices', 'sample_admin_notice__error' ); 47 */ 35 public static function activate() 36 { 48 37 } 49 50 38 } -
support-hours/trunk/includes/class-support-hours-deactivator.php
r2367690 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 21 23 * @author Erik van der Bas <erik@basedonline.nl> 22 24 */ 23 class Support_Hours_Deactivator { 25 class Support_Hours_Deactivator 26 { 24 27 25 28 /** … … 30 33 * @since 1.0.0 31 34 */ 32 public static function deactivate() { 33 //Get entire array 34 $SupportHourOptions = get_option('support-hours'); 35 //Alter the options array appropriately 36 $SupportHourOptions['users'] = ''; 37 //Update entire array 38 update_option('support-hours', $SupportHourOptions); 35 public static function deactivate() 36 { 37 //Get entire array 38 $options = get_option('support-hours'); 39 //Alter the options array appropriately 40 $options['users'] = ''; 41 //Update entire array 42 update_option('support-hours', $options); 39 43 } 40 41 44 } -
support-hours/trunk/includes/class-support-hours-i18n.php
r2367690 r2445424 1 1 <?php 2 2 3 /** 4 * Define the internationalization functionality 5 * 6 * Loads and defines the internationalization files for this plugin 7 * so that it is ready for translation. 8 * 9 * @link http://basedonline.nl 10 * @since 1.0.0 11 * 12 * @package Support_Hours 13 * @subpackage Support_Hours/includes 14 */ 3 namespace Support_Hours; 15 4 16 5 /** … … 25 14 * @author Erik van der Bas <erik@basedonline.nl> 26 15 */ 27 class Support_Hours_i18n { 16 class Support_Hours_i18n 17 { 28 18 29 19 … … 33 23 * @since 1.0.0 34 24 */ 35 public function load_plugin_textdomain() { 25 public function load_plugin_textdomain() 26 { 36 27 37 28 load_plugin_textdomain( 38 29 'support-hours', 39 30 false, 40 dirname( dirname( plugin_basename( __FILE__ ) )) . '/languages/'31 dirname(dirname(plugin_basename(__FILE__))) . '/languages/' 41 32 ); 42 43 33 } 44 45 46 47 34 } -
support-hours/trunk/includes/class-support-hours-loader.php
r2367690 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 22 24 * @author Erik van der Bas <erik@basedonline.nl> 23 25 */ 24 class Support_Hours_Loader { 26 class Support_Hours_Loader 27 { 25 28 /** 26 29 * The array of actions registered with WordPress. … … 46 49 * @since 1.0.0 47 50 */ 48 public function __construct() { 51 public function __construct() 52 { 49 53 50 54 $this->actions = array(); 51 55 $this->filters = array(); 52 53 56 } 54 57 … … 63 66 * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1. 64 67 */ 65 public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { 66 $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args ); 68 public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1) 69 { 70 $this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args); 67 71 } 68 72 … … 77 81 * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1 78 82 */ 79 public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { 80 $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args ); 83 public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1) 84 { 85 $this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args); 81 86 } 82 87 … … 95 100 * @return array The collection of actions and filters registered with WordPress. 96 101 */ 97 private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { 102 private function add($hooks, $hook, $component, $callback, $priority, $accepted_args) 103 { 98 104 99 105 $hooks[] = array( … … 106 112 107 113 return $hooks; 108 109 114 } 110 115 … … 114 119 * @since 1.0.0 115 120 */ 116 public function run() { 121 public function run() 122 { 117 123 118 foreach ( $this->filters as $hook) {119 add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args']);124 foreach ($this->filters as $hook) { 125 add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']); 120 126 } 121 127 122 foreach ( $this->actions as $hook) {123 add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args']);128 foreach ($this->actions as $hook) { 129 add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']); 124 130 } 125 126 131 } 127 132 } -
support-hours/trunk/includes/class-support-hours.php
r2367690 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 28 30 * @author Erik van der Bas <erik@basedonline.nl> 29 31 */ 30 class Support_Hours { 32 class Support_Hours 33 { 31 34 32 35 /** … … 67 70 * @since 1.0.0 68 71 */ 69 public function __construct() { 72 public function __construct() 73 { 70 74 71 75 $this->plugin_name = 'support-hours'; 72 $this->version = '1. 0.0';76 $this->version = '1.7.0'; 73 77 74 78 $this->load_dependencies(); 75 79 $this->set_locale(); 76 80 $this->define_admin_hooks(); 77 78 81 } 79 82 … … 94 97 * @access private 95 98 */ 96 private function load_dependencies() { 99 private function load_dependencies() 100 { 97 101 98 102 /** … … 100 104 * core plugin. 101 105 */ 102 require_once plugin_dir_path( dirname( __FILE__ )) . 'includes/class-support-hours-loader.php';106 require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-support-hours-loader.php'; 103 107 104 108 /** … … 106 110 * of the plugin. 107 111 */ 108 require_once plugin_dir_path( dirname( __FILE__ )) . 'includes/class-support-hours-i18n.php';112 require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-support-hours-i18n.php'; 109 113 110 114 /** 111 115 * The class responsible for defining all actions that occur in the admin area. 112 116 */ 113 require_once plugin_dir_path( dirname( __FILE__ )) . 'admin/class-support-hours-admin.php';117 require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-support-hours-admin.php'; 114 118 115 119 /** … … 119 123 120 124 $this->loader = new Support_Hours_Loader(); 121 122 125 } 123 126 … … 131 134 * @access private 132 135 */ 133 private function set_locale() { 136 private function set_locale() 137 { 134 138 135 139 $plugin_i18n = new Support_Hours_i18n(); 136 140 137 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); 138 141 $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain'); 139 142 } 140 143 … … 146 149 * @access private 147 150 */ 148 private function define_admin_hooks() { 149 $plugin_admin = new Support_Hours_Admin( $this->get_plugin_name(), $this->get_version() ); 150 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 151 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 151 private function define_admin_hooks() 152 { 153 $plugin_admin = new Support_Hours_Admin($this->get_plugin_name(), $this->get_version()); 154 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles'); 155 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts'); 152 156 // Add menu item 153 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_admin_menu');157 $this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_admin_menu'); 154 158 // Add Settings link to the plugin 155 $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php');156 $this->loader->add_filter( 'plugin_action_links_' . $plugin_basename, $plugin_admin, 'add_action_links');159 $plugin_basename = plugin_basename(plugin_dir_path(__DIR__) . $this->plugin_name . '.php'); 160 $this->loader->add_filter('plugin_action_links_' . $plugin_basename, $plugin_admin, 'add_action_links'); 157 161 $this->loader->add_action('admin_init', $plugin_admin, 'options_update'); 158 162 159 163 // load widget hook from class-support-hours-admin.php 160 $this->loader->add_action( 'wp_dashboard_setup', $plugin_admin, 'support_hours_add_dashboard_widgets' ); 161 164 $this->loader->add_action('wp_dashboard_setup', $plugin_admin, 'add_dashboard_widget'); 162 165 } 163 166 … … 167 170 * @since 1.0.0 168 171 */ 169 public function run() { 172 public function run() 173 { 170 174 $this->loader->run(); 171 175 } … … 178 182 * @return string The name of the plugin. 179 183 */ 180 public function get_plugin_name() { 184 public function get_plugin_name() 185 { 181 186 return $this->plugin_name; 182 187 } … … 188 193 * @return Support_Hours_Loader Orchestrates the hooks of the plugin. 189 194 */ 190 public function get_loader() { 195 public function get_loader() 196 { 191 197 return $this->loader; 192 198 } … … 198 204 * @return string The version number of the plugin. 199 205 */ 200 public function get_version() { 206 public function get_version() 207 { 201 208 return $this->version; 202 209 } 203 204 210 } -
support-hours/trunk/support-hours.php
r2367690 r2445424 1 1 <?php 2 3 namespace Support_Hours; 2 4 3 5 /** … … 17 19 * Plugin URI: http://basedonline.nl 18 20 * Description: Use Support hours to give yourself and your clients insights on the status of pre-paid work. 19 * Version: 1. 6.221 * Version: 1.7.0 20 22 * Author: Erik van der Bas 21 23 * Author URI: https://basedonline.nl … … 31 33 } 32 34 35 define('SH_PLUGIN_DIR_URI', plugin_dir_url(__FILE__)); 36 33 37 /** 34 38 * The code that runs during plugin activation. … … 40 44 Support_Hours_Activator::activate(); 41 45 } 46 42 47 /** 43 48 * The code that runs during plugin deactivation. … … 50 55 } 51 56 52 register_activation_hook(__FILE__, 'activate_support_hours'); 53 register_deactivation_hook(__FILE__, 'deactivate_support_hours'); 57 /** 58 * The code that runs during plugin deactivation. 59 * This action is documented in includes/class-support-hours-deactivator.php 60 */ 61 function remove_support_hours() 62 { 63 require_once plugin_dir_path(__FILE__) . 'includes/class-support-hours-uninstaller.php'; 64 Support_Hours_Uninstaller::uninstall(); 65 } 54 66 67 register_activation_hook(__FILE__, __NAMESPACE__ . '\\activate_support_hours'); 68 register_deactivation_hook(__FILE__, __NAMESPACE__ . '\\deactivate_support_hours'); 69 register_uninstall_hook(__FILE__, __NAMESPACE__ . '\\remove_support_hours'); 55 70 56 71
Note: See TracChangeset
for help on using the changeset viewer.