WD Google Analytics - Version 1.2.8

Version Description

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Analytics
Version 1.2.8
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.8

admin/pages/browser.php CHANGED
@@ -1,10 +1,10 @@
1
-
2
-
3
- <div class="">
4
- <div class="opacity_div_compact">
5
- <div class="loading_div_compact">
6
- <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
- </div>
8
- </div>
9
- <div id="gawd_browser_meta"></div>
10
- </div>
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
+ </div>
8
+ </div>
9
+ <div id="gawd_browser_meta"></div>
10
+ </div>
admin/pages/dashboard.php CHANGED
@@ -80,10 +80,10 @@ if(in_array($_GET['tab'], $line_column)) {
80
  <div class="clear"></div>
81
  <input type="hidden" name='web_property_name' id='web_property_name'/>
82
  </div>
83
- <div id="gawd_body" data-gawd-tab="<?php echo $_GET['tab']; ?>">
84
  <?php
85
  include_once('dashboard_menu.php');
86
- $page = isset($_GET['tab']) ? $_GET['tab'] : 'overview';
87
  if(strpos($page,'custom_report')!==false){
88
  $tab = $page;
89
  }
80
  <div class="clear"></div>
81
  <input type="hidden" name='web_property_name' id='web_property_name'/>
82
  </div>
83
+ <div id="gawd_body" data-gawd-tab="<?php echo esc_attr(stripslashes($_GET['tab'])); ?>">
84
  <?php
85
  include_once('dashboard_menu.php');
86
+ $page = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : 'overview';
87
  if(strpos($page,'custom_report')!==false){
88
  $tab = $page;
89
  }
admin/pages/dashboard_menu.php CHANGED
@@ -8,7 +8,7 @@ function gawd_write_menu($tabs, $title = true){
8
  $sub_arrow = '';
9
  }
10
  if($tab_data["childs"] == array()) {
11
- $active_tab = $_GET['tab'] == $tab_key ? 'gawd_active_li' : '';
12
  /** FREE **/
13
  if($tab_key === "Pro"){
14
  echo ' <li class="gawd_inactive_pro gawd_menu_li '.$active_tab.' " id="gawd_'.$tab_key.'">
@@ -57,7 +57,7 @@ function gawd_write_menu($tabs, $title = true){
57
  if(!$title) {
58
  $child_title = "";
59
  }
60
- $active_tab = $_GET['tab'] == $child_key ? 'gawd_active_li' : '';
61
  if(!in_array($tab_key, $free_tabs)){
62
  echo ' <li class=" gawd_menu_ul_li '.$active_tab.'">
63
  <span class="gawd_menu_item " >'.$child_title.'</span>
@@ -84,7 +84,7 @@ function gawd_write_menu_collapse($tabs, $title = true){
84
  $sub_arrow = '';
85
  }
86
  if($tab_data["childs"] == array()) {
87
- $active_tab = $_GET['tab'] == $tab_key ? 'gawd_active_li' : '';
88
  if($tab_key == 'customReport') {
89
  echo '<a id="gawd_' . $tab_key . '" class="' . $active_tab . ' gawd_menu_item " href="' . admin_url() . 'admin.php?page=gawd_custom_reports">' . $tab_data["title"] . '</a>';
90
  } else {
@@ -99,7 +99,7 @@ function gawd_write_menu_collapse($tabs, $title = true){
99
  <div class="collapse_ul" id="gawd_' . $tab_key . '_ul">';
100
  }
101
  foreach($tab_data["childs"] as $child_key => $child_title) {
102
- $active_tab = $_GET['tab'] == $child_key ? 'gawd_active_li_text' : '';
103
  echo '<a class="' . $active_tab . ' gawd_menu_item " href="' . admin_url() . 'admin.php?page=gawd_reports&tab=' . $child_key . '">' . $child_title . '</a>';
104
  }
105
  echo '</div></span>';
8
  $sub_arrow = '';
9
  }
10
  if($tab_data["childs"] == array()) {
11
+ $active_tab = sanitize_text_field($_GET['tab']) == $tab_key ? 'gawd_active_li' : '';
12
  /** FREE **/
13
  if($tab_key === "Pro"){
14
  echo ' <li class="gawd_inactive_pro gawd_menu_li '.$active_tab.' " id="gawd_'.$tab_key.'">
57
  if(!$title) {
58
  $child_title = "";
59
  }
60
+ $active_tab = sanitize_text_field($_GET['tab']) == $child_key ? 'gawd_active_li' : '';
61
  if(!in_array($tab_key, $free_tabs)){
62
  echo ' <li class=" gawd_menu_ul_li '.$active_tab.'">
63
  <span class="gawd_menu_item " >'.$child_title.'</span>
84
  $sub_arrow = '';
85
  }
86
  if($tab_data["childs"] == array()) {
87
+ $active_tab = sanitize_text_field($_GET['tab']) == $tab_key ? 'gawd_active_li' : '';
88
  if($tab_key == 'customReport') {
89
  echo '<a id="gawd_' . $tab_key . '" class="' . $active_tab . ' gawd_menu_item " href="' . admin_url() . 'admin.php?page=gawd_custom_reports">' . $tab_data["title"] . '</a>';
90
  } else {
99
  <div class="collapse_ul" id="gawd_' . $tab_key . '_ul">';
100
  }
101
  foreach($tab_data["childs"] as $child_key => $child_title) {
102
+ $active_tab = sanitize_text_field($_GET['tab']) == $child_key ? 'gawd_active_li_text' : '';
103
  echo '<a class="' . $active_tab . ' gawd_menu_item " href="' . admin_url() . 'admin.php?page=gawd_reports&tab=' . $child_key . '">' . $child_title . '</a>';
104
  }
105
  echo '</div></span>';
admin/pages/licensing.php CHANGED
@@ -76,12 +76,4 @@
76
  <span class="yes"></span>
77
  <span class="yes"></span>
78
  </div>
79
- </div>
80
- <div style="float: left; clear: both;">
81
- <p><?php _e("After purchasing the commercial version follow these steps:", 'gawd'); ?></p>
82
- <ol>
83
- <li><?php _e("Deactivate Google Analytics by 10Web plugin.", 'gawd'); ?></li>
84
- <li><?php _e("Delete Google Analytics by 10Web plugin.", 'gawd'); ?></li>
85
- <li><?php _e("Install the downloaded commercial version of the plugin.", 'gawd'); ?></li>
86
- </ol>
87
  </div>
76
  <span class="yes"></span>
77
  <span class="yes"></span>
78
  </div>
 
 
 
 
 
 
 
 
79
  </div>
admin/pages/real_time.php CHANGED
@@ -1,17 +1,17 @@
1
-
2
-
3
- <div class="">
4
- <div class="opacity_div_compact">
5
- <div class="loading_div_compact">
6
- <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 30px; width:50px;">
7
- </div>
8
- </div>
9
-
10
- <div id="gawd_real_time_meta"></div>
11
- </div>
12
- <script>
13
- jQuery(document).ready(function(){
14
- gawd_widget_real_time('#gawd_real_time_meta');
15
-
16
- })
17
  </script>
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 30px; width:50px;">
7
+ </div>
8
+ </div>
9
+
10
+ <div id="gawd_real_time_meta"></div>
11
+ </div>
12
+ <script>
13
+ jQuery(document).ready(function(){
14
+ gawd_widget_real_time('#gawd_real_time_meta');
15
+
16
+ })
17
  </script>
admin/pages/settings.php CHANGED
@@ -618,7 +618,7 @@ if(is_array($gawd_emails)) {
618
  </label>
619
  </div>
620
  <div class="gawd_info"
621
- title="Click to enable/disable help text for Google Analytics by 10Web reports."></div>
622
  <div class="onoffswitch_text">
623
  Enable reports tooltips
624
  </div>
@@ -637,7 +637,7 @@ if(is_array($gawd_emails)) {
637
  title="Turn this option on to get AdSense tracking reports. Make sure to link your Google AdSense to Google Analytics first (find out more in User Guide)"></div>
638
  <div class="onoffswitch_text">
639
  Enable AdSense link tracking
640
- <a target="_blank" href="https://10web.io/plugins/wordpress-google-analytics/?utm_source=10web_analytics&utm_medium=free_plugin" class="gawd_pro"> ( This feature is available in Google Analytics by 10Web Pro. )</a>
641
  </div>
642
  <div class="clear"></div>
643
  </div>
618
  </label>
619
  </div>
620
  <div class="gawd_info"
621
+ title="Click to enable/disable help text for 10Web Analytics reports."></div>
622
  <div class="onoffswitch_text">
623
  Enable reports tooltips
624
  </div>
637
  title="Turn this option on to get AdSense tracking reports. Make sure to link your Google AdSense to Google Analytics first (find out more in User Guide)"></div>
638
  <div class="onoffswitch_text">
639
  Enable AdSense link tracking
640
+ <a target="_blank" href="https://10web.io/plugins/wordpress-google-analytics/?utm_source=10web_analytics&utm_medium=free_plugin" class="gawd_pro"> ( This feature is available in 10Web Analytics Premium. )</a>
641
  </div>
642
  <div class="clear"></div>
643
  </div>
admin/pages/uninstall.php CHANGED
@@ -8,7 +8,7 @@ class GAWDUninstall{
8
  <div class="gawd">
9
  <h2>
10
  <img src="<?php echo GAWD_URL . '/assets/uninstall-icon.png';?>" width="30" style="vertical-align:middle;">
11
- <span><?php _e("Uninstall Google Analytics by 10Web","gawd"); ?></span>
12
  </h2>
13
  <div class="goodbye-text">
14
  <?php
@@ -62,7 +62,7 @@ class GAWDUninstall{
62
  </p>
63
  <p style="text-align: center;">
64
  <input type="button" id="gawd_uninstall" value="<?php _e("UNINSTALL","gawd"); ?>" onclick="if (check_yes.checked) {
65
- if (confirm('You are About to Uninstall Google Analytics by 10Web from WordPress.\nThis Action Is Not Reversible.')) {
66
  jQuery('#adminForm').submit();;
67
  } else {
68
  return false;
8
  <div class="gawd">
9
  <h2>
10
  <img src="<?php echo GAWD_URL . '/assets/uninstall-icon.png';?>" width="30" style="vertical-align:middle;">
11
+ <span><?php _e("Uninstall 10Web Analytics","gawd"); ?></span>
12
  </h2>
13
  <div class="goodbye-text">
14
  <?php
62
  </p>
63
  <p style="text-align: center;">
64
  <input type="button" id="gawd_uninstall" value="<?php _e("UNINSTALL","gawd"); ?>" onclick="if (check_yes.checked) {
65
+ if (confirm('You are About to Uninstall 10Web Analytics from WordPress.\nThis Action Is Not Reversible.')) {
66
  jQuery('#adminForm').submit();;
67
  } else {
68
  return false;
admin/pages/visitors.php CHANGED
@@ -1,10 +1,10 @@
1
-
2
-
3
- <div class="">
4
- <div class="opacity_div_compact">
5
- <div class="loading_div_compact">
6
- <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
- </div>
8
- </div>
9
- <div id="gawd_visitors_meta"></div>
10
- </div>
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
+ </div>
8
+ </div>
9
+ <div id="gawd_visitors_meta"></div>
10
+ </div>
config.php CHANGED
@@ -13,7 +13,7 @@ if(!defined('GAWD_DIR')) {
13
  define('GWD_NAME', plugin_basename(dirname(__FILE__)));
14
  define('GAWD_URL', plugins_url(plugin_basename(dirname(__FILE__))));
15
  define('GAWD_INC', GAWD_URL . '/inc');
16
- define('GAWD_VERSION', '1.2.4');
17
 
18
  $upload_dir = wp_upload_dir();
19
  define('GAWD_UPLOAD_DIR', $upload_dir['basedir'] . '/' . plugin_basename(dirname(__FILE__)));
13
  define('GWD_NAME', plugin_basename(dirname(__FILE__)));
14
  define('GAWD_URL', plugins_url(plugin_basename(dirname(__FILE__))));
15
  define('GAWD_INC', GAWD_URL . '/inc');
16
+ define('GAWD_VERSION', '1.2.8');
17
 
18
  $upload_dir = wp_upload_dir();
19
  define('GAWD_UPLOAD_DIR', $upload_dir['basedir'] . '/' . plugin_basename(dirname(__FILE__)));
gawd_class.php CHANGED
@@ -16,7 +16,6 @@ class GAWD {
16
  * Singleton via the `new` operator from outside of this class.
17
  */
18
  protected function __construct(){
19
-
20
  if(get_site_transient('gawd_uninstall') === '1'){
21
  return;
22
  }
@@ -100,7 +99,7 @@ class GAWD {
100
  $gawd_props = GAWD_helper::get_current_site_properties();
101
 
102
  if(count($gawd_props) === 0 && empty($web_property_id) && strpos($screen->base, 'gawd') !== false && !empty($accounts)) {
103
- $msg = "Google Analytics by 10Web: You haven't created a web-property with current site URL, or it has been deleted. Please <a href='" . admin_url() . "admin.php?page=gawd_settings#gawd_tracking_tab'>create </a> one.";
104
  $this->gawd_admin_notice($msg, "error", 'gawd_tracking_notice_link');
105
  }
106
  }
@@ -203,8 +202,8 @@ class GAWD {
203
  foreach($profile as $item) {
204
 
205
  if($item["id"] === $_POST['gawd_id']) {
206
- $gawd_profile_data['profile_id'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
207
- $gawd_profile_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
208
  $gawd_profile_data['web_property_id'] = isset($item["webPropertyId"]) ? $item["webPropertyId"] : '';
209
  $gawd_profile_data['account_id'] = isset($item["accountId"]) ? $item["accountId"] : '';
210
  update_option('gawd_last_viewed_profile', $gawd_profile_data);
@@ -262,7 +261,7 @@ class GAWD {
262
 
263
  public function create_pdf_file($ajax = true, $data = null, $dimension = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null){
264
  $first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
265
- $_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
266
  if($ajax == true) {
267
  $export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
268
  if($export_type != 'pdf') {
@@ -430,11 +429,11 @@ class GAWD {
430
  $menu_name = $data['menu_name'];
431
  $info = $data['info'];
432
  } else {
433
- $gawd_request_last_args = $_POST['gawd_request_last_args'];
434
- $compare_by = $_POST['compare_by'];
435
- $gawd_compare_request_last_args = (!empty($_POST['gawd_compare_request_last_args'])) ? $_POST['gawd_compare_request_last_args'] : null;
436
- $info = $_POST['info'];
437
- $menu_name = $_POST['menu_name'];
438
  }//else set defaults
439
 
440
  if(is_array($ajax_response) && !empty($ajax_response)) {
@@ -595,8 +594,8 @@ class GAWD {
595
  }
596
  } else {
597
  $metric = isset($_REQUEST["gawd_metric"]) ? sanitize_text_field($_REQUEST["gawd_metric"]) : '';
598
- $_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
599
- $first_data = isset($_REQUEST["first_data"]) ? ($_REQUEST["first_data"]) : '';
600
  $view_id = isset($_REQUEST["view_id"]) ? sanitize_text_field($_REQUEST["view_id"]) : '';
601
  $metric_compare = isset($_REQUEST["gawd_metric_compare"]) ? sanitize_text_field($_REQUEST["gawd_metric_compare"]) : '';
602
  $dimension = isset($_REQUEST["gawd_dimension"]) ? sanitize_text_field($_REQUEST["gawd_dimension"]) : '';
@@ -864,7 +863,7 @@ class GAWD {
864
  wp_enqueue_script('gawd_datatables_ui_js', GAWD_URL . '/inc/js/dataTables.jqueryui.min.js', array('jquery','gawd_charts'), GAWD_VERSION);
865
 
866
  if(strpos($screen->post_type, 'page') === false && strpos($screen->post_type, 'post') === false && strpos($screen->base, 'edit') === false) {
867
- wp_enqueue_script('bootstrap_js', GAWD_URL . '/inc/js/bootstrap_js.js', array('jquery'), GAWD_VERSION);
868
  wp_enqueue_script('bootstrap-select', GAWD_URL . '/inc/js/bootstrap-select.js', array('jquery'), GAWD_VERSION);
869
  }
870
  wp_enqueue_script('highlight_js', GAWD_URL . '/inc/js/js_highlight.js', array('jquery'), GAWD_VERSION);
@@ -1177,7 +1176,7 @@ class GAWD {
1177
 
1178
  $selected_account_data = $gawd_user_data;
1179
  if(!empty($_POST['web_property_name']) && !empty($_POST['gawd_profile_id'])) {
1180
- $selected_account_data['profile_id'] = $_POST['gawd_profile_id'];
1181
  }
1182
 
1183
  if(isset($_POST['web_property_name']) && $_POST['web_property_name'] != '') {
@@ -1210,7 +1209,7 @@ class GAWD {
1210
  if(isset($_POST['gawd_email_remove'])){
1211
  if(isset($_POST['gawd_save_form_fild']) && wp_verify_nonce($_POST['gawd_save_form_fild'], 'gawd_save_form')){
1212
  include_once 'library/gawd-email-class.php';
1213
- GAWD_email::delete_email($_POST['gawd_email_remove']);
1214
  }
1215
  }
1216
 
@@ -1233,16 +1232,20 @@ class GAWD {
1233
  }
1234
 
1235
  public function gawd_pushover_api($user_key, $metric, $condition, $value){
1236
- $ch = curl_init();
1237
- curl_setopt($ch, CURLOPT_URL, "https://api.pushover.net/1/messages.json");
1238
- curl_setopt($ch, CURLOPT_POSTFIELDS, array(
1239
- "token" => "aJBDhTfhR87EaTzs7wpx1MMKwboBjB",
1240
- "user" => $user_key,
1241
- "message" => 'The ' . $metric . ' less ' . $value
1242
- ));
1243
- // curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
1244
- curl_exec($ch);
1245
- curl_close($ch);
 
 
 
 
1246
  }
1247
 
1248
  public function gawd_pushover_daily(){
@@ -1327,7 +1330,7 @@ class GAWD {
1327
  $headers = array();
1328
  $headers[] = 'From: <' . $email_from . '>';
1329
  $headers[] = 'Content-Type: text/html';
1330
- $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics by 10Web Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1331
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1332
  }
1333
  }
@@ -1353,7 +1356,7 @@ class GAWD {
1353
  $headers = array();
1354
  $headers[] = 'From: <' . $email_from . '>';
1355
  $headers[] = 'Content-Type: text/html';
1356
- $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics by 10Web Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1357
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1358
  }
1359
  }
@@ -1378,7 +1381,7 @@ class GAWD {
1378
  $headers = array();
1379
  $headers[] = 'From: <' . $email_from . '>';
1380
  $headers[] = 'Content-Type: text/html';
1381
- $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics by 10Web Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1382
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1383
  }
1384
  }
@@ -1402,7 +1405,7 @@ class GAWD {
1402
  GAWD_helper::check_permission($gawd_backend_roles)
1403
  ) {
1404
 
1405
- wp_add_dashboard_widget('wd_dashboard_widget', 'Google Analytics by 10Web', array(
1406
  $this,
1407
  'wd_dashboard_widget'
1408
  ));
@@ -1569,7 +1572,7 @@ class GAWD {
1569
 
1570
  public function nossl_message(){
1571
  $this->gawd_admin_notice(
1572
- __('ERROR: Google Analytics by 10Web cannot make insecure requests to Google API. Please enable PHP OpenSSL extension', 'gawd'),
1573
  'error'
1574
  );
1575
  }
16
  * Singleton via the `new` operator from outside of this class.
17
  */
18
  protected function __construct(){
 
19
  if(get_site_transient('gawd_uninstall') === '1'){
20
  return;
21
  }
99
  $gawd_props = GAWD_helper::get_current_site_properties();
100
 
101
  if(count($gawd_props) === 0 && empty($web_property_id) && strpos($screen->base, 'gawd') !== false && !empty($accounts)) {
102
+ $msg = "10Web Analytics: You haven't created a web-property with current site URL, or it has been deleted. Please <a href='" . admin_url() . "admin.php?page=gawd_settings#gawd_tracking_tab'>create </a> one.";
103
  $this->gawd_admin_notice($msg, "error", 'gawd_tracking_notice_link');
104
  }
105
  }
202
  foreach($profile as $item) {
203
 
204
  if($item["id"] === $_POST['gawd_id']) {
205
+ $gawd_profile_data['profile_id'] = isset($_POST['gawd_id']) ? sanitize_text_field($_POST['gawd_id']) : '';
206
+ $gawd_profile_data['web_property_name'] = isset($_POST['web_property_name']) ? sanitize_text_field($_POST['web_property_name']) : '';
207
  $gawd_profile_data['web_property_id'] = isset($item["webPropertyId"]) ? $item["webPropertyId"] : '';
208
  $gawd_profile_data['account_id'] = isset($item["accountId"]) ? $item["accountId"] : '';
209
  update_option('gawd_last_viewed_profile', $gawd_profile_data);
261
 
262
  public function create_pdf_file($ajax = true, $data = null, $dimension = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null){
263
  $first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
264
+ $_data_compare = isset($_REQUEST["_data_compare"]) ? sanitize_text_field($_REQUEST["_data_compare"]) : '';
265
  if($ajax == true) {
266
  $export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
267
  if($export_type != 'pdf') {
429
  $menu_name = $data['menu_name'];
430
  $info = $data['info'];
431
  } else {
432
+ $gawd_request_last_args = GAWD_helper::validate_string('gawd_request_last_args', array());
433
+ $compare_by = sanitize_text_field($_POST['compare_by']);
434
+ $gawd_compare_request_last_args = (!empty($_POST['gawd_compare_request_last_args'])) ? sanitize_text_field($_POST['gawd_compare_request_last_args']) : null;
435
+ $info = GAWD_helper::validate_string("info", array());
436
+ $menu_name = sanitize_text_field($_POST['menu_name']);
437
  }//else set defaults
438
 
439
  if(is_array($ajax_response) && !empty($ajax_response)) {
594
  }
595
  } else {
596
  $metric = isset($_REQUEST["gawd_metric"]) ? sanitize_text_field($_REQUEST["gawd_metric"]) : '';
597
+ $_data_compare = isset($_REQUEST["_data_compare"]) ? sanitize_text_field($_REQUEST["_data_compare"]) : '';
598
+ $first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
599
  $view_id = isset($_REQUEST["view_id"]) ? sanitize_text_field($_REQUEST["view_id"]) : '';
600
  $metric_compare = isset($_REQUEST["gawd_metric_compare"]) ? sanitize_text_field($_REQUEST["gawd_metric_compare"]) : '';
601
  $dimension = isset($_REQUEST["gawd_dimension"]) ? sanitize_text_field($_REQUEST["gawd_dimension"]) : '';
863
  wp_enqueue_script('gawd_datatables_ui_js', GAWD_URL . '/inc/js/dataTables.jqueryui.min.js', array('jquery','gawd_charts'), GAWD_VERSION);
864
 
865
  if(strpos($screen->post_type, 'page') === false && strpos($screen->post_type, 'post') === false && strpos($screen->base, 'edit') === false) {
866
+ wp_enqueue_script('bootstrap_js', GAWD_URL . '/inc/js/bootstrap.min.js', array('jquery'), '4.3.1');
867
  wp_enqueue_script('bootstrap-select', GAWD_URL . '/inc/js/bootstrap-select.js', array('jquery'), GAWD_VERSION);
868
  }
869
  wp_enqueue_script('highlight_js', GAWD_URL . '/inc/js/js_highlight.js', array('jquery'), GAWD_VERSION);
1176
 
1177
  $selected_account_data = $gawd_user_data;
1178
  if(!empty($_POST['web_property_name']) && !empty($_POST['gawd_profile_id'])) {
1179
+ $selected_account_data['profile_id'] = sanitize_text_field($_POST['gawd_profile_id']);
1180
  }
1181
 
1182
  if(isset($_POST['web_property_name']) && $_POST['web_property_name'] != '') {
1209
  if(isset($_POST['gawd_email_remove'])){
1210
  if(isset($_POST['gawd_save_form_fild']) && wp_verify_nonce($_POST['gawd_save_form_fild'], 'gawd_save_form')){
1211
  include_once 'library/gawd-email-class.php';
1212
+ GAWD_email::delete_email(sanitize_text_field($_POST['gawd_email_remove']));
1213
  }
1214
  }
1215
 
1232
  }
1233
 
1234
  public function gawd_pushover_api($user_key, $metric, $condition, $value){
1235
+ $url = 'https://api.pushover.net/1/messages.json';
1236
+ $args = array(
1237
+ 'timeout' => 45,
1238
+ 'redirection' => 5,
1239
+ 'blocking' => true,
1240
+ 'headers' => array(),
1241
+ 'body' => array(
1242
+ "token" => "aJBDhTfhR87EaTzs7wpx1MMKwboBjB",
1243
+ "user" => $user_key,
1244
+ "message" => 'The ' . $metric . ' less ' . $value
1245
+ ),
1246
+ 'cookies' => array()
1247
+ );
1248
+ wp_remote_post( $url, $args );
1249
  }
1250
 
1251
  public function gawd_pushover_daily(){
1330
  $headers = array();
1331
  $headers[] = 'From: <' . $email_from . '>';
1332
  $headers[] = 'Content-Type: text/html';
1333
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">10Web Analytics Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1334
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1335
  }
1336
  }
1356
  $headers = array();
1357
  $headers[] = 'From: <' . $email_from . '>';
1358
  $headers[] = 'Content-Type: text/html';
1359
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">10Web Analytics Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1360
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1361
  }
1362
  }
1381
  $headers = array();
1382
  $headers[] = 'From: <' . $email_from . '>';
1383
  $headers[] = 'Content-Type: text/html';
1384
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">10Web Analytics Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!', ' ', trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))) . ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:' . $color_condition . '">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1385
  wp_mail($alert['emails'], 'Analytics Alert', $content, $headers);
1386
  }
1387
  }
1405
  GAWD_helper::check_permission($gawd_backend_roles)
1406
  ) {
1407
 
1408
+ wp_add_dashboard_widget('wd_dashboard_widget', '10Web Analytics', array(
1409
  $this,
1410
  'wd_dashboard_widget'
1411
  ));
1572
 
1573
  public function nossl_message(){
1574
  $this->gawd_admin_notice(
1575
+ __('ERROR: 10Web Analytics cannot make insecure requests to Google API. Please enable PHP OpenSSL extension', 'gawd'),
1576
  'error'
1577
  );
1578
  }
google-analytics-wd.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
  /**
3
- * Plugin Name: Google Analytics by 10Web
4
  * Plugin URI: https://10web.io/plugins/wordpress-google-analytics/
5
- * Description: Google Analytics by 10Web is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
6
- * Version: 1.2.4
7
  * Author: 10Web
8
  * Author URI: https://10web.io/plugins/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -42,10 +41,10 @@ if(version_compare(PHP_VERSION, '5.4.0') >= 0) {
42
  function gawd_php_version_admin_notice(){
43
  ?>
44
  <div class="notice notice-error">
45
- <h3>Google Analytics by 10Web</h3>
46
  <p><?php _e('This version of the plugin uses the latest Google library requiring PHP 5.4.0 or higher.', 'gawd'); ?></p>
47
  <p><?php _e('We recommend you to update PHP or ask your hosting provider to do that. ', 'gawd');
48
- printf(__('If it is not possible and you previously had Google Analytics by 10Web paid version installed, please ask 10Web to send you an older version of the plugin supporting PHP 5.3 %s', 'gawd'),
49
  '<a href="https://help.10web.io/hc/en-us/requests/new" target="_blank">' . __('Contact us', 'gawd') . '</a>'
50
  ); ?></p>
51
 
@@ -67,12 +66,12 @@ function gawd_web_init() {
67
  "prefix" => "gawd",
68
  "wd_plugin_id" => 158,
69
  "plugin_id" => 45,
70
- "plugin_title" => "Google Analytics by 10Web",
71
  "plugin_wordpress_slug" => "wd-google-analytics",
72
  "plugin_dir" => GAWD_DIR,
73
  "plugin_main_file" => __FILE__,
74
  "description" => __('Analytics by 10Web WordPress plugin - a certified member of Google Analytics Technology Partners Program.
75
- With a large number of detailed and user-friendly reports, Google Analytics by 10Web plugin is just the right choice for you!', 'gawd'),
76
  "addons" => NULL,
77
  "plugin_features" => array(
78
  0 => array(
@@ -81,7 +80,7 @@ With a large number of detailed and user-friendly reports, Google Analytics by 1
81
  ),
82
  1 => array(
83
  "title" => __("All Analytics Reports", "gawd"),
84
- "description" => __("Google Analytics by 10Web provides various reports, including Age, Gender, Demographics and Interests, Behavior and Technology, as well as Ecommerce tracking, Custom Dimensions and Custom Reports. Just as in Google Analytics, you can compare tracking reports of two metrics with elegantly designed Line, Pie and Column charts.", "gawd"),
85
  ),
86
  2 => array(
87
  "title" => __("Page and Post Reports", "gawd"),
@@ -98,7 +97,7 @@ With a large number of detailed and user-friendly reports, Google Analytics by 1
98
  ),
99
  "user_guide" => array(
100
  0 => array(
101
- "main_title" => __("Installing Google Analytics by 10Web", "gawd"),
102
  "url" => "https://help.10web.io/hc/en-us/articles/360017502592-Introducing-WordPress-Google-Analytics",
103
  "titles" => array(),
104
  ),
@@ -220,7 +219,7 @@ With a large number of detailed and user-friendly reports, Google Analytics by 1
220
 
221
  add_filter('wp_get_default_privacy_policy_content', 'gawd_privacy_policy');
222
  function gawd_privacy_policy($content){
223
- $title = __('Google Analytics by 10Web', "gawd");
224
 
225
  $pp_link = '<a target="_blank" href="https://policies.google.com/privacy">' . __('Privacy Policy', "gawd") . '</a>';
226
  $text = sprintf(__('If you enable tracking code, explain that your site uses Google Analytics. Whether it will send any personal data to Google, depends on how you set up your website. For example, do not expose emails or other personally identifiable information to Google via URLs. Do not send form submissions via analytics to Google. By default, all the IPs of visitors are anonymized. If you change that setting, you must inform your website visitors on that. Personal data processing by Google is explained in their %s.', "gawd"), $pp_link);
@@ -295,7 +294,7 @@ if(!function_exists('gawd_wd_bp_install_notice')) {
295
  <div class="notice notice-info" id="wd_bp_notice_cont">
296
  <p>
297
  <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/seo_logo.png'; ?>">
298
- <?php _e("Google Analytics by 10Web advises: Optimize your web pages for search engines with the", $prefix) ?>
299
  <a href="https://wordpress.org/plugins/seo-by-10web/" title="<?php _e("More details", $prefix) ?>"
300
  target="_blank"><?php _e("FREE SEO", $prefix) ?></a>
301
  <?php _e("plugin.", $prefix) ?>
1
  <?php
2
  /**
3
+ * Plugin Name: 10WebAnalytics
4
  * Plugin URI: https://10web.io/plugins/wordpress-google-analytics/
5
+ * Version: 1.2.8
 
6
  * Author: 10Web
7
  * Author URI: https://10web.io/plugins/
8
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
41
  function gawd_php_version_admin_notice(){
42
  ?>
43
  <div class="notice notice-error">
44
+ <h3>10Web Analytics</h3>
45
  <p><?php _e('This version of the plugin uses the latest Google library requiring PHP 5.4.0 or higher.', 'gawd'); ?></p>
46
  <p><?php _e('We recommend you to update PHP or ask your hosting provider to do that. ', 'gawd');
47
+ printf(__('If it is not possible and you previously had 10Web Analytics Premium version installed, please ask 10Web to send you an older version of the plugin supporting PHP 5.3 %s', 'gawd'),
48
  '<a href="https://help.10web.io/hc/en-us/requests/new" target="_blank">' . __('Contact us', 'gawd') . '</a>'
49
  ); ?></p>
50
 
66
  "prefix" => "gawd",
67
  "wd_plugin_id" => 158,
68
  "plugin_id" => 45,
69
+ "plugin_title" => "10Web Analytics",
70
  "plugin_wordpress_slug" => "wd-google-analytics",
71
  "plugin_dir" => GAWD_DIR,
72
  "plugin_main_file" => __FILE__,
73
  "description" => __('Analytics by 10Web WordPress plugin - a certified member of Google Analytics Technology Partners Program.
74
+ With a large number of detailed and user-friendly reports, 10Web Analytics plugin is just the right choice for you!', 'gawd'),
75
  "addons" => NULL,
76
  "plugin_features" => array(
77
  0 => array(
80
  ),
81
  1 => array(
82
  "title" => __("All Analytics Reports", "gawd"),
83
+ "description" => __("10Web Analytics provides various reports, including Age, Gender, Demographics and Interests, Behavior and Technology, as well as Ecommerce tracking, Custom Dimensions and Custom Reports. Just as in Google Analytics, you can compare tracking reports of two metrics with elegantly designed Line, Pie and Column charts.", "gawd"),
84
  ),
85
  2 => array(
86
  "title" => __("Page and Post Reports", "gawd"),
97
  ),
98
  "user_guide" => array(
99
  0 => array(
100
+ "main_title" => __("Installing 10Web Analytics", "gawd"),
101
  "url" => "https://help.10web.io/hc/en-us/articles/360017502592-Introducing-WordPress-Google-Analytics",
102
  "titles" => array(),
103
  ),
219
 
220
  add_filter('wp_get_default_privacy_policy_content', 'gawd_privacy_policy');
221
  function gawd_privacy_policy($content){
222
+ $title = __('10Web Analytics', "gawd");
223
 
224
  $pp_link = '<a target="_blank" href="https://policies.google.com/privacy">' . __('Privacy Policy', "gawd") . '</a>';
225
  $text = sprintf(__('If you enable tracking code, explain that your site uses Google Analytics. Whether it will send any personal data to Google, depends on how you set up your website. For example, do not expose emails or other personally identifiable information to Google via URLs. Do not send form submissions via analytics to Google. By default, all the IPs of visitors are anonymized. If you change that setting, you must inform your website visitors on that. Personal data processing by Google is explained in their %s.', "gawd"), $pp_link);
294
  <div class="notice notice-info" id="wd_bp_notice_cont">
295
  <p>
296
  <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/seo_logo.png'; ?>">
297
+ <?php _e("10Web Analytics advises: Optimize your web pages for search engines with the", $prefix) ?>
298
  <a href="https://wordpress.org/plugins/seo-by-10web/" title="<?php _e("More details", $prefix) ?>"
299
  target="_blank"><?php _e("FREE SEO", $prefix) ?></a>
300
  <?php _e("plugin.", $prefix) ?>
inc/css/bootstrap-chosen.css CHANGED
@@ -1,330 +1,330 @@
1
- .chosen-select {
2
- width: 100%; }
3
-
4
- .chosen-select-deselect {
5
- width: 100%; }
6
-
7
- .chosen-container {
8
- display: inline-block;
9
- font-size: 14px;
10
- position: relative;
11
- vertical-align: middle; }
12
- .chosen-container .chosen-drop {
13
- background: #fff;
14
- border: 1px solid #ccc;
15
-
16
- -webkit-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
17
- box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
18
- margin-top: -1px;
19
- position: absolute;
20
- top: 100%;
21
- left: -9000px;
22
- z-index: 1060; }
23
- .chosen-container.chosen-with-drop .chosen-drop {
24
- left: 0;
25
- right: 0; }
26
- .chosen-container .chosen-results {
27
- color: #555555;
28
- margin: 0 4px 4px 0;
29
- max-height: 240px;
30
- padding: 0 0 0 4px;
31
- position: relative;
32
- overflow-x: hidden;
33
- overflow-y: auto;
34
- -webkit-overflow-scrolling: touch; }
35
- .chosen-container .chosen-results li {
36
- display: none;
37
- line-height: 1.42857;
38
- list-style: none;
39
- margin: 0;
40
- padding: 5px 6px; }
41
- .chosen-container .chosen-results li em {
42
- background: #feffde;
43
- font-style: normal; }
44
- .chosen-container .chosen-results li.group-result {
45
- display: list-item;
46
- cursor: default;
47
- color: #999;
48
- font-weight: bold; }
49
- .chosen-container .chosen-results li.group-option {
50
- padding-left: 15px; }
51
- .chosen-container .chosen-results li.active-result {
52
- cursor: pointer;
53
- display: list-item; }
54
- .chosen-container .chosen-results li.highlighted {
55
- background-color: #337ab7;
56
- background-image: none;
57
- color: white; }
58
- .chosen-container .chosen-results li.highlighted em {
59
- background: transparent; }
60
- .chosen-container .chosen-results li.disabled-result {
61
- display: list-item;
62
- color: #777777; }
63
- .chosen-container .chosen-results .no-results {
64
- background: #eeeeee;
65
- display: list-item; }
66
- .chosen-container .chosen-results-scroll {
67
- background: white;
68
- margin: 0 4px;
69
- position: absolute;
70
- text-align: center;
71
- width: 321px;
72
- z-index: 1; }
73
- .chosen-container .chosen-results-scroll span {
74
- display: inline-block;
75
- height: 1.42857;
76
- text-indent: -5000px;
77
- width: 9px; }
78
- .chosen-container .chosen-results-scroll-down {
79
- bottom: 0; }
80
- .chosen-container .chosen-results-scroll-down span {
81
- background: url("chosen-sprite.png") no-repeat -4px -3px; }
82
- .chosen-container .chosen-results-scroll-up span {
83
- background: url("chosen-sprite.png") no-repeat -22px -3px; }
84
-
85
- .chosen-container-single .chosen-single {
86
- background-color: #fff;
87
- -webkit-background-clip: padding-box;
88
- -moz-background-clip: padding;
89
- background-clip: padding-box;
90
- border: 1px solid #ccc;
91
-
92
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
93
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
94
- color: #555555;
95
- display: block;
96
- height: 34px;
97
- overflow: hidden;
98
- line-height: 34px;
99
- padding: 0 0 0 8px;
100
- position: relative;
101
- text-decoration: none;
102
- white-space: nowrap; }
103
- .chosen-container-single .chosen-single span {
104
- display: block;
105
- margin-right: 26px;
106
- overflow: hidden;
107
- text-overflow: ellipsis;
108
- white-space: nowrap; }
109
- .chosen-container-single .chosen-single abbr {
110
- background: url("chosen-sprite.png") right top no-repeat;
111
- display: block;
112
- font-size: 1px;
113
- height: 10px;
114
- position: absolute;
115
- right: 26px;
116
- top: 12px;
117
- width: 12px; }
118
- .chosen-container-single .chosen-single abbr:hover {
119
- background-position: right -11px; }
120
- .chosen-container-single .chosen-single.chosen-disabled .chosen-single abbr:hover {
121
- background-position: right 2px; }
122
- .chosen-container-single .chosen-single div {
123
- display: block;
124
- height: 100%;
125
- position: absolute;
126
- top: 0;
127
- right: 0;
128
- width: 18px; }
129
- .chosen-container-single .chosen-single div b {
130
- background: url("chosen-sprite.png") no-repeat 0 7px;
131
- display: block;
132
- height: 100%;
133
- width: 100%; }
134
- .chosen-container-single .chosen-default {
135
- color: #777777; }
136
- .chosen-container-single .chosen-search {
137
- margin: 0;
138
- padding: 3px 4px;
139
- position: relative;
140
- white-space: nowrap;
141
- z-index: 1000; }
142
- .chosen-container-single .chosen-search input[type="text"] {
143
- background: url("chosen-sprite.png") no-repeat 100% -20px, #fff;
144
- border: 1px solid #ccc;
145
-
146
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
147
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
148
- margin: 1px 0;
149
- padding: 4px 20px 4px 4px;
150
- width: 100%; }
151
- .chosen-container-single .chosen-drop {
152
- margin-top: -1px;
153
-
154
- -webkit-background-clip: padding-box;
155
- -moz-background-clip: padding;
156
- background-clip: padding-box; }
157
-
158
- .chosen-container-single-nosearch .chosen-search input[type="text"] {
159
- position: absolute;
160
- left: -9000px; }
161
-
162
- .chosen-container-multi .chosen-choices {
163
- background-color: #fff;
164
- border: 1px solid #ccc;
165
- height:auto;
166
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
167
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
168
- cursor: text;
169
- /* //height: auto !important;
170
- //height: 1%; */
171
- margin: 0;
172
- overflow: hidden;
173
- padding: 0;
174
- position: relative; }
175
- .chosen-container-multi .chosen-choices li {
176
- float: left;
177
- list-style: none; }
178
- .chosen-container-multi .chosen-choices .search-field {
179
- margin: 0;
180
- padding: 0;
181
- white-space: nowrap; }
182
- .chosen-container-multi .chosen-choices .search-field input[type="text"] {
183
- background: transparent !important;
184
- border: 0 !important;
185
- -webkit-box-shadow: none;
186
- box-shadow: none;
187
- color: #555555;
188
- height: 28px;
189
- margin: 0;
190
- padding: 4px;
191
- outline: 0; }
192
- .chosen-container-multi .chosen-choices .search-field .default {
193
- color: #999; }
194
- .chosen-container-multi .chosen-choices .search-choice {
195
- -webkit-background-clip: padding-box;
196
- -moz-background-clip: padding;
197
- background-clip: padding-box;
198
- background-color: #eeeeee;
199
- border: 1px solid #ccc;
200
-
201
- background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 100%);
202
- background-image: -o-linear-gradient(top, white 0%, #eeeeee 100%);
203
- background-image: linear-gradient(to bottom, white 0%, #eeeeee 100%);
204
- background-repeat: repeat-x;
205
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);
206
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
207
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
208
- color: #333333;
209
- cursor: default;
210
- line-height: 13px;
211
- margin: 4px 0 3px 5px;
212
- padding: 3px 20px 3px 5px;
213
- position: relative; }
214
- .chosen-container-multi .chosen-choices .search-choice .search-choice-close {
215
- background: url("chosen-sprite.png") right top no-repeat;
216
- display: block;
217
- font-size: 1px;
218
- height: 10px;
219
- position: absolute;
220
- right: 4px;
221
- top: 5px;
222
- width: 12px;
223
- cursor: pointer; }
224
-
225
- .chosen-container-multi .chosen-choices .search-choice-focus {
226
- background: #d4d4d4; }
227
- .chosen-container-multi .chosen-choices .search-choice-focus .search-choice-close {
228
- background-position: right -11px; }
229
- .chosen-container-multi .chosen-results {
230
- margin: 0 0 0 0;
231
- padding: 0; }
232
- .chosen-container-multi .chosen-drop .result-selected {
233
- display: none; }
234
-
235
- .chosen-container-active .chosen-single {
236
- border: 1px solid #66afe9;
237
- /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
238
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
239
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
240
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
241
- transition: border linear 0.2s, box-shadow linear 0.2s;*/ }
242
- .chosen-container-active.chosen-with-drop .chosen-single {
243
- background-color: #fff;
244
- border: 1px solid #66afe9;
245
-
246
- /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
247
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
248
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
249
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
250
- transition: border linear 0.2s, box-shadow linear 0.2s; */ }
251
- .chosen-container-active.chosen-with-drop .chosen-single div {
252
- background: transparent;
253
- border-left: none; }
254
- .chosen-container-active.chosen-with-drop .chosen-single div b {
255
- background-position: -18px 7px; }
256
- .chosen-container-active .chosen-choices {
257
- border: 1px solid #66afe9;
258
- border-bottom-right-radius: 0;
259
- border-bottom-left-radius: 0;
260
- /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
261
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
262
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
263
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
264
- transition: border linear 0.2s, box-shadow linear 0.2s; */ }
265
- .chosen-container-active .chosen-choices .search-field input[type="text"] {
266
- color: #111 !important; }
267
- .chosen-container-active.chosen-with-drop .chosen-choices {
268
- border-bottom-right-radius: 0;
269
- border-bottom-left-radius: 0; }
270
-
271
- .chosen-disabled {
272
- cursor: default;
273
- opacity: 0.5 !important; }
274
- .chosen-disabled .chosen-single {
275
- cursor: default; }
276
- .chosen-disabled .chosen-choices .search-choice .search-choice-close {
277
- cursor: default; }
278
-
279
- .chosen-rtl {
280
- text-align: right; }
281
- .chosen-rtl .chosen-single {
282
- padding: 0 8px 0 0;
283
- overflow: visible; }
284
- .chosen-rtl .chosen-single span {
285
- margin-left: 26px;
286
- margin-right: 0;
287
- direction: rtl; }
288
- .chosen-rtl .chosen-single div {
289
- left: 7px;
290
- right: auto; }
291
- .chosen-rtl .chosen-single abbr {
292
- left: 26px;
293
- right: auto; }
294
- .chosen-rtl .chosen-choices .search-field input[type="text"] {
295
- direction: rtl; }
296
- .chosen-rtl .chosen-choices li {
297
- float: right; }
298
- .chosen-rtl .chosen-choices .search-choice {
299
- margin: 6px 5px 3px 0;
300
- padding: 3px 5px 3px 19px; }
301
- .chosen-rtl .chosen-choices .search-choice .search-choice-close {
302
- background-position: right top;
303
- left: 4px;
304
- right: auto; }
305
- .chosen-rtl.chosen-container-single .chosen-results {
306
- margin: 0 0 4px 4px;
307
- padding: 0 4px 0 0; }
308
- .chosen-rtl .chosen-results .group-option {
309
- padding-left: 0;
310
- padding-right: 15px; }
311
- .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
312
- border-right: none; }
313
- .chosen-rtl .chosen-search input[type="text"] {
314
- background: url("chosen-sprite.png") no-repeat -28px -20px, #fff;
315
- direction: rtl;
316
- padding: 4px 5px 4px 20px; }
317
-
318
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 2dppx) {
319
- .chosen-rtl .chosen-search input[type="text"],
320
- .chosen-container-single .chosen-single abbr,
321
- .chosen-container-single .chosen-single div b,
322
- .chosen-container-single .chosen-search input[type="text"],
323
- .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
324
- .chosen-container .chosen-results-scroll-down span,
325
- .chosen-container .chosen-results-scroll-up span {
326
- background-image: url("chosen-sprite@2x.png") !important;
327
- background-size: 52px 37px !important;
328
- background-repeat: no-repeat !important; } }
329
-
330
- /*# sourceMappingURL=bootstrap-chosen.css.map */
1
+ .chosen-select {
2
+ width: 100%; }
3
+
4
+ .chosen-select-deselect {
5
+ width: 100%; }
6
+
7
+ .chosen-container {
8
+ display: inline-block;
9
+ font-size: 14px;
10
+ position: relative;
11
+ vertical-align: middle; }
12
+ .chosen-container .chosen-drop {
13
+ background: #fff;
14
+ border: 1px solid #ccc;
15
+
16
+ -webkit-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
17
+ box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
18
+ margin-top: -1px;
19
+ position: absolute;
20
+ top: 100%;
21
+ left: -9000px;
22
+ z-index: 1060; }
23
+ .chosen-container.chosen-with-drop .chosen-drop {
24
+ left: 0;
25
+ right: 0; }
26
+ .chosen-container .chosen-results {
27
+ color: #555555;
28
+ margin: 0 4px 4px 0;
29
+ max-height: 240px;
30
+ padding: 0 0 0 4px;
31
+ position: relative;
32
+ overflow-x: hidden;
33
+ overflow-y: auto;
34
+ -webkit-overflow-scrolling: touch; }
35
+ .chosen-container .chosen-results li {
36
+ display: none;
37
+ line-height: 1.42857;
38
+ list-style: none;
39
+ margin: 0;
40
+ padding: 5px 6px; }
41
+ .chosen-container .chosen-results li em {
42
+ background: #feffde;
43
+ font-style: normal; }
44
+ .chosen-container .chosen-results li.group-result {
45
+ display: list-item;
46
+ cursor: default;
47
+ color: #999;
48
+ font-weight: bold; }
49
+ .chosen-container .chosen-results li.group-option {
50
+ padding-left: 15px; }
51
+ .chosen-container .chosen-results li.active-result {
52
+ cursor: pointer;
53
+ display: list-item; }
54
+ .chosen-container .chosen-results li.highlighted {
55
+ background-color: #337ab7;
56
+ background-image: none;
57
+ color: white; }
58
+ .chosen-container .chosen-results li.highlighted em {
59
+ background: transparent; }
60
+ .chosen-container .chosen-results li.disabled-result {
61
+ display: list-item;
62
+ color: #777777; }
63
+ .chosen-container .chosen-results .no-results {
64
+ background: #eeeeee;
65
+ display: list-item; }
66
+ .chosen-container .chosen-results-scroll {
67
+ background: white;
68
+ margin: 0 4px;
69
+ position: absolute;
70
+ text-align: center;
71
+ width: 321px;
72
+ z-index: 1; }
73
+ .chosen-container .chosen-results-scroll span {
74
+ display: inline-block;
75
+ height: 1.42857;
76
+ text-indent: -5000px;
77
+ width: 9px; }
78
+ .chosen-container .chosen-results-scroll-down {
79
+ bottom: 0; }
80
+ .chosen-container .chosen-results-scroll-down span {
81
+ background: url("chosen-sprite.png") no-repeat -4px -3px; }
82
+ .chosen-container .chosen-results-scroll-up span {
83
+ background: url("chosen-sprite.png") no-repeat -22px -3px; }
84
+
85
+ .chosen-container-single .chosen-single {
86
+ background-color: #fff;
87
+ -webkit-background-clip: padding-box;
88
+ -moz-background-clip: padding;
89
+ background-clip: padding-box;
90
+ border: 1px solid #ccc;
91
+
92
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
93
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
94
+ color: #555555;
95
+ display: block;
96
+ height: 34px;
97
+ overflow: hidden;
98
+ line-height: 34px;
99
+ padding: 0 0 0 8px;
100
+ position: relative;
101
+ text-decoration: none;
102
+ white-space: nowrap; }
103
+ .chosen-container-single .chosen-single span {
104
+ display: block;
105
+ margin-right: 26px;
106
+ overflow: hidden;
107
+ text-overflow: ellipsis;
108
+ white-space: nowrap; }
109
+ .chosen-container-single .chosen-single abbr {
110
+ background: url("chosen-sprite.png") right top no-repeat;
111
+ display: block;
112
+ font-size: 1px;
113
+ height: 10px;
114
+ position: absolute;
115
+ right: 26px;
116
+ top: 12px;
117
+ width: 12px; }
118
+ .chosen-container-single .chosen-single abbr:hover {
119
+ background-position: right -11px; }
120
+ .chosen-container-single .chosen-single.chosen-disabled .chosen-single abbr:hover {
121
+ background-position: right 2px; }
122
+ .chosen-container-single .chosen-single div {
123
+ display: block;
124
+ height: 100%;
125
+ position: absolute;
126
+ top: 0;
127
+ right: 0;
128
+ width: 18px; }
129
+ .chosen-container-single .chosen-single div b {
130
+ background: url("chosen-sprite.png") no-repeat 0 7px;
131
+ display: block;
132
+ height: 100%;
133
+ width: 100%; }
134
+ .chosen-container-single .chosen-default {
135
+ color: #777777; }
136
+ .chosen-container-single .chosen-search {
137
+ margin: 0;
138
+ padding: 3px 4px;
139
+ position: relative;
140
+ white-space: nowrap;
141
+ z-index: 1000; }
142
+ .chosen-container-single .chosen-search input[type="text"] {
143
+ background: url("chosen-sprite.png") no-repeat 100% -20px, #fff;
144
+ border: 1px solid #ccc;
145
+
146
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
147
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
148
+ margin: 1px 0;
149
+ padding: 4px 20px 4px 4px;
150
+ width: 100%; }
151
+ .chosen-container-single .chosen-drop {
152
+ margin-top: -1px;
153
+
154
+ -webkit-background-clip: padding-box;
155
+ -moz-background-clip: padding;
156
+ background-clip: padding-box; }
157
+
158
+ .chosen-container-single-nosearch .chosen-search input[type="text"] {
159
+ position: absolute;
160
+ left: -9000px; }
161
+
162
+ .chosen-container-multi .chosen-choices {
163
+ background-color: #fff;
164
+ border: 1px solid #ccc;
165
+ height:auto;
166
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
167
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
168
+ cursor: text;
169
+ /* //height: auto !important;
170
+ //height: 1%; */
171
+ margin: 0;
172
+ overflow: hidden;
173
+ padding: 0;
174
+ position: relative; }
175
+ .chosen-container-multi .chosen-choices li {
176
+ float: left;
177
+ list-style: none; }
178
+ .chosen-container-multi .chosen-choices .search-field {
179
+ margin: 0;
180
+ padding: 0;
181
+ white-space: nowrap; }
182
+ .chosen-container-multi .chosen-choices .search-field input[type="text"] {
183
+ background: transparent !important;
184
+ border: 0 !important;
185
+ -webkit-box-shadow: none;
186
+ box-shadow: none;
187
+ color: #555555;
188
+ height: 28px;
189
+ margin: 0;
190
+ padding: 4px;
191
+ outline: 0; }
192
+ .chosen-container-multi .chosen-choices .search-field .default {
193
+ color: #999; }
194
+ .chosen-container-multi .chosen-choices .search-choice {
195
+ -webkit-background-clip: padding-box;
196
+ -moz-background-clip: padding;
197
+ background-clip: padding-box;
198
+ background-color: #eeeeee;
199
+ border: 1px solid #ccc;
200
+
201
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 100%);
202
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 100%);
203
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 100%);
204
+ background-repeat: repeat-x;
205
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);
206
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
207
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
208
+ color: #333333;
209
+ cursor: default;
210
+ line-height: 13px;
211
+ margin: 4px 0 3px 5px;
212
+ padding: 3px 20px 3px 5px;
213
+ position: relative; }
214
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close {
215
+ background: url("chosen-sprite.png") right top no-repeat;
216
+ display: block;
217
+ font-size: 1px;
218
+ height: 10px;
219
+ position: absolute;
220
+ right: 4px;
221
+ top: 5px;
222
+ width: 12px;
223
+ cursor: pointer; }
224
+
225
+ .chosen-container-multi .chosen-choices .search-choice-focus {
226
+ background: #d4d4d4; }
227
+ .chosen-container-multi .chosen-choices .search-choice-focus .search-choice-close {
228
+ background-position: right -11px; }
229
+ .chosen-container-multi .chosen-results {
230
+ margin: 0 0 0 0;
231
+ padding: 0; }
232
+ .chosen-container-multi .chosen-drop .result-selected {
233
+ display: none; }
234
+
235
+ .chosen-container-active .chosen-single {
236
+ border: 1px solid #66afe9;
237
+ /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
238
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
239
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
240
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
241
+ transition: border linear 0.2s, box-shadow linear 0.2s;*/ }
242
+ .chosen-container-active.chosen-with-drop .chosen-single {
243
+ background-color: #fff;
244
+ border: 1px solid #66afe9;
245
+
246
+ /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
247
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
248
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
249
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
250
+ transition: border linear 0.2s, box-shadow linear 0.2s; */ }
251
+ .chosen-container-active.chosen-with-drop .chosen-single div {
252
+ background: transparent;
253
+ border-left: none; }
254
+ .chosen-container-active.chosen-with-drop .chosen-single div b {
255
+ background-position: -18px 7px; }
256
+ .chosen-container-active .chosen-choices {
257
+ border: 1px solid #66afe9;
258
+ border-bottom-right-radius: 0;
259
+ border-bottom-left-radius: 0;
260
+ /* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
261
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px #66afe9;
262
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
263
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
264
+ transition: border linear 0.2s, box-shadow linear 0.2s; */ }
265
+ .chosen-container-active .chosen-choices .search-field input[type="text"] {
266
+ color: #111 !important; }
267
+ .chosen-container-active.chosen-with-drop .chosen-choices {
268
+ border-bottom-right-radius: 0;
269
+ border-bottom-left-radius: 0; }
270
+
271
+ .chosen-disabled {
272
+ cursor: default;
273
+ opacity: 0.5 !important; }
274
+ .chosen-disabled .chosen-single {
275
+ cursor: default; }
276
+ .chosen-disabled .chosen-choices .search-choice .search-choice-close {
277
+ cursor: default; }
278
+
279
+ .chosen-rtl {
280
+ text-align: right; }
281
+ .chosen-rtl .chosen-single {
282
+ padding: 0 8px 0 0;
283
+ overflow: visible; }
284
+ .chosen-rtl .chosen-single span {
285
+ margin-left: 26px;
286
+ margin-right: 0;
287
+ direction: rtl; }
288
+ .chosen-rtl .chosen-single div {
289
+ left: 7px;
290
+ right: auto; }
291
+ .chosen-rtl .chosen-single abbr {
292
+ left: 26px;
293
+ right: auto; }
294
+ .chosen-rtl .chosen-choices .search-field input[type="text"] {
295
+ direction: rtl; }
296
+ .chosen-rtl .chosen-choices li {
297
+ float: right; }
298
+ .chosen-rtl .chosen-choices .search-choice {
299
+ margin: 6px 5px 3px 0;
300
+ padding: 3px 5px 3px 19px; }
301
+ .chosen-rtl .chosen-choices .search-choice .search-choice-close {
302
+ background-position: right top;
303
+ left: 4px;
304
+ right: auto; }
305
+ .chosen-rtl.chosen-container-single .chosen-results {
306
+ margin: 0 0 4px 4px;
307
+ padding: 0 4px 0 0; }
308
+ .chosen-rtl .chosen-results .group-option {
309
+ padding-left: 0;
310
+ padding-right: 15px; }
311
+ .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
312
+ border-right: none; }
313
+ .chosen-rtl .chosen-search input[type="text"] {
314
+ background: url("chosen-sprite.png") no-repeat -28px -20px, #fff;
315
+ direction: rtl;
316
+ padding: 4px 5px 4px 20px; }
317
+
318
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 2dppx) {
319
+ .chosen-rtl .chosen-search input[type="text"],
320
+ .chosen-container-single .chosen-single abbr,
321
+ .chosen-container-single .chosen-single div b,
322
+ .chosen-container-single .chosen-search input[type="text"],
323
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
324
+ .chosen-container .chosen-results-scroll-down span,
325
+ .chosen-container .chosen-results-scroll-up span {
326
+ background-image: url("chosen-sprite@2x.png") !important;
327
+ background-size: 52px 37px !important;
328
+ background-repeat: no-repeat !important; } }
329
+
330
+ /*# sourceMappingURL=bootstrap-chosen.css.map */
inc/css/bootstrap-select.css CHANGED
@@ -1,282 +1,282 @@
1
- /*!
2
- * Bootstrap-select v1.10.0 (http://silviomoreto.github.io/bootstrap-select)
3
- *
4
- * Copyright 2013-2016 bootstrap-select
5
- * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
6
- */
7
-
8
- select.bs-select-hidden,
9
- select.selectpicker {
10
- display: none !important;
11
- }
12
- .bootstrap-select {
13
- width: 220px \0;
14
- /*IE9 and below*/
15
- }
16
- .bootstrap-select > .dropdown-toggle {
17
- width: 100%;
18
- padding-right: 25px;
19
- z-index: 1;
20
- }
21
- .bootstrap-select > select {
22
- position: absolute !important;
23
- bottom: 0;
24
- left: 50%;
25
- display: block !important;
26
- width: 0.5px !important;
27
- height: 100% !important;
28
- padding: 0 !important;
29
- opacity: 0 !important;
30
- border: none;
31
- }
32
- .bootstrap-select > select.mobile-device {
33
- top: 0;
34
- left: 0;
35
- display: block !important;
36
- width: 100% !important;
37
- z-index: 2;
38
- }
39
- .has-error .bootstrap-select .dropdown-toggle,
40
- .error .bootstrap-select .dropdown-toggle {
41
- border-color: #b94a48;
42
- }
43
- .bootstrap-select.fit-width {
44
- width: auto !important;
45
- }
46
- .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
47
- width: 96%;
48
- }
49
- .bootstrap-select .dropdown-toggle:focus {
50
- outline: thin dotted #333333 !important;
51
- outline: 5px auto -webkit-focus-ring-color !important;
52
- outline-offset: -2px;
53
- }
54
- .bootstrap-select.form-control {
55
- margin-bottom: 0;
56
- padding: 0;
57
- border: none;
58
- }
59
- .bootstrap-select.form-control:not([class*="col-"]) {
60
- width: 100%;
61
- }
62
- .bootstrap-select.form-control.input-group-btn {
63
- z-index: auto;
64
- }
65
- .bootstrap-select.btn-group:not(.input-group-btn),
66
- .bootstrap-select.btn-group[class*="col-"] {
67
- float: none;
68
- display: inline-block;
69
- margin-left: 0;
70
- }
71
- .bootstrap-select.btn-group.dropdown-menu-right,
72
- .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right,
73
- .row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
74
- float: right;
75
- }
76
- .form-inline .bootstrap-select.btn-group,
77
- .form-horizontal .bootstrap-select.btn-group,
78
- .form-group .bootstrap-select.btn-group {
79
- margin-bottom: 0;
80
- }
81
- .form-group-lg .bootstrap-select.btn-group.form-control,
82
- .form-group-sm .bootstrap-select.btn-group.form-control {
83
- padding: 0;
84
- }
85
- .form-inline .bootstrap-select.btn-group .form-control {
86
- width: 100%;
87
- }
88
- .bootstrap-select.btn-group.disabled,
89
- .bootstrap-select.btn-group > .disabled {
90
- cursor: not-allowed;
91
- }
92
- .bootstrap-select.btn-group.disabled:focus,
93
- .bootstrap-select.btn-group > .disabled:focus {
94
- outline: none !important;
95
- }
96
- .bootstrap-select.btn-group.bs-container {
97
- position: absolute;
98
- }
99
- .bootstrap-select.btn-group.bs-container .dropdown-menu {
100
- z-index: 1060;
101
- }
102
- .bootstrap-select.btn-group .dropdown-toggle .filter-option {
103
- display: inline-block;
104
- overflow: hidden;
105
- width: 100%;
106
- text-align: left;
107
- }
108
- .bootstrap-select.btn-group .dropdown-toggle .caret {
109
- position: absolute;
110
- top: 50%;
111
- right: 12px;
112
- margin-top: -2px;
113
- vertical-align: middle;
114
- }
115
- .bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
116
- width: 100%;
117
- }
118
- .bootstrap-select.btn-group .dropdown-menu {
119
- min-width: 100%;
120
- -webkit-box-sizing: border-box;
121
- -moz-box-sizing: border-box;
122
- box-sizing: border-box;
123
- }
124
- .bootstrap-select.btn-group .dropdown-menu.inner {
125
- position: static;
126
- float: none;
127
- border: 0;
128
- padding: 0;
129
- margin: 0;
130
- border-radius: 0;
131
- -webkit-box-shadow: none;
132
- box-shadow: none;
133
- }
134
- .bootstrap-select.btn-group .dropdown-menu li {
135
- position: relative;
136
- }
137
- .bootstrap-select.btn-group .dropdown-menu li.active small {
138
- color: #fff;
139
- }
140
- .bootstrap-select.btn-group .dropdown-menu li.disabled a {
141
- cursor: not-allowed;
142
- }
143
- .bootstrap-select.btn-group .dropdown-menu li a {
144
- cursor: pointer;
145
- -webkit-user-select: none;
146
- -moz-user-select: none;
147
- -ms-user-select: none;
148
- user-select: none;
149
- }
150
- .bootstrap-select.btn-group .dropdown-menu li a.opt {
151
- position: relative;
152
- padding-left: 2.25em;
153
- }
154
- .bootstrap-select.btn-group .dropdown-menu li a span.check-mark {
155
- display: none;
156
- }
157
- .bootstrap-select.btn-group .dropdown-menu li a span.text {
158
- display: inline-block;
159
- }
160
- .bootstrap-select.btn-group .dropdown-menu li small {
161
- padding-left: 0.5em;
162
- }
163
- .bootstrap-select.btn-group .dropdown-menu .notify {
164
- position: absolute;
165
- bottom: 5px;
166
- width: 96%;
167
- margin: 0 2%;
168
- min-height: 26px;
169
- padding: 3px 5px;
170
- background: #f5f5f5;
171
- border: 1px solid #e3e3e3;
172
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
173
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
174
- pointer-events: none;
175
- opacity: 0.9;
176
- -webkit-box-sizing: border-box;
177
- -moz-box-sizing: border-box;
178
- box-sizing: border-box;
179
- }
180
- .bootstrap-select.btn-group .no-results {
181
- padding: 3px;
182
- background: #f5f5f5;
183
- margin: 0 5px;
184
- white-space: nowrap;
185
- }
186
- .bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
187
- position: static;
188
- }
189
- .bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
190
- position: static;
191
- top: auto;
192
- margin-top: -1px;
193
- }
194
- .bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {
195
- position: absolute;
196
- display: inline-block;
197
- right: 15px;
198
- margin-top: 5px;
199
- }
200
- .bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
201
- margin-right: 34px;
202
- }
203
- .bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
204
- z-index: 1061;
205
- }
206
- .bootstrap-select.show-menu-arrow .dropdown-toggle:before {
207
- content: '';
208
- border-left: 7px solid transparent;
209
- border-right: 7px solid transparent;
210
- border-bottom: 7px solid rgba(204, 204, 204, 0.2);
211
- position: absolute;
212
- bottom: -4px;
213
- left: 9px;
214
- display: none;
215
- }
216
- .bootstrap-select.show-menu-arrow .dropdown-toggle:after {
217
- content: '';
218
- border-left: 6px solid transparent;
219
- border-right: 6px solid transparent;
220
- border-bottom: 6px solid white;
221
- position: absolute;
222
- bottom: -4px;
223
- left: 10px;
224
- display: none;
225
- }
226
- .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
227
- bottom: auto;
228
- top: -3px;
229
- border-top: 7px solid rgba(204, 204, 204, 0.2);
230
- border-bottom: 0;
231
- }
232
- .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
233
- bottom: auto;
234
- top: -3px;
235
- border-top: 6px solid white;
236
- border-bottom: 0;
237
- }
238
- .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
239
- right: 12px;
240
- left: auto;
241
- }
242
- .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
243
- right: 13px;
244
- left: auto;
245
- }
246
- .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,
247
- .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
248
- display: block;
249
- }
250
- .bs-searchbox,
251
- .bs-actionsbox,
252
- .bs-donebutton {
253
- padding: 4px 8px;
254
- }
255
- .bs-actionsbox {
256
- width: 100%;
257
- -webkit-box-sizing: border-box;
258
- -moz-box-sizing: border-box;
259
- box-sizing: border-box;
260
- }
261
- .bs-actionsbox .btn-group button {
262
- width: 50%;
263
- }
264
- .bs-donebutton {
265
- float: left;
266
- width: 100%;
267
- -webkit-box-sizing: border-box;
268
- -moz-box-sizing: border-box;
269
- box-sizing: border-box;
270
- }
271
- .bs-donebutton .btn-group button {
272
- width: 100%;
273
- }
274
- .bs-searchbox + .bs-actionsbox {
275
- padding: 0 8px 4px;
276
- }
277
- .bs-searchbox .form-control {
278
- margin-bottom: 0;
279
- width: 100%;
280
- float: none;
281
- }
282
  /*# sourceMappingURL=bootstrap-select.css.map */
1
+ /*!
2
+ * Bootstrap-select v1.10.0 (http://silviomoreto.github.io/bootstrap-select)
3
+ *
4
+ * Copyright 2013-2016 bootstrap-select
5
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
6
+ */
7
+
8
+ select.bs-select-hidden,
9
+ select.selectpicker {
10
+ display: none !important;
11
+ }
12
+ .bootstrap-select {
13
+ width: 220px \0;
14
+ /*IE9 and below*/
15
+ }
16
+ .bootstrap-select > .dropdown-toggle {
17
+ width: 100%;
18
+ padding-right: 25px;
19
+ z-index: 1;
20
+ }
21
+ .bootstrap-select > select {
22
+ position: absolute !important;
23
+ bottom: 0;
24
+ left: 50%;
25
+ display: block !important;
26
+ width: 0.5px !important;
27
+ height: 100% !important;
28
+ padding: 0 !important;
29
+ opacity: 0 !important;
30
+ border: none;
31
+ }
32
+ .bootstrap-select > select.mobile-device {
33
+ top: 0;
34
+ left: 0;
35
+ display: block !important;
36
+ width: 100% !important;
37
+ z-index: 2;
38
+ }
39
+ .has-error .bootstrap-select .dropdown-toggle,
40
+ .error .bootstrap-select .dropdown-toggle {
41
+ border-color: #b94a48;
42
+ }
43
+ .bootstrap-select.fit-width {
44
+ width: auto !important;
45
+ }
46
+ .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
47
+ width: 96%;
48
+ }
49
+ .bootstrap-select .dropdown-toggle:focus {
50
+ outline: thin dotted #333333 !important;
51
+ outline: 5px auto -webkit-focus-ring-color !important;
52
+ outline-offset: -2px;
53
+ }
54
+ .bootstrap-select.form-control {
55
+ margin-bottom: 0;
56
+ padding: 0;
57
+ border: none;
58
+ }
59
+ .bootstrap-select.form-control:not([class*="col-"]) {
60
+ width: 100%;
61
+ }
62
+ .bootstrap-select.form-control.input-group-btn {
63
+ z-index: auto;
64
+ }
65
+ .bootstrap-select.btn-group:not(.input-group-btn),
66
+ .bootstrap-select.btn-group[class*="col-"] {
67
+ float: none;
68
+ display: inline-block;
69
+ margin-left: 0;
70
+ }
71
+ .bootstrap-select.btn-group.dropdown-menu-right,
72
+ .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right,
73
+ .row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
74
+ float: right;
75
+ }
76
+ .form-inline .bootstrap-select.btn-group,
77
+ .form-horizontal .bootstrap-select.btn-group,
78
+ .form-group .bootstrap-select.btn-group {
79
+ margin-bottom: 0;
80
+ }
81
+ .form-group-lg .bootstrap-select.btn-group.form-control,
82
+ .form-group-sm .bootstrap-select.btn-group.form-control {
83
+ padding: 0;
84
+ }
85
+ .form-inline .bootstrap-select.btn-group .form-control {
86
+ width: 100%;
87
+ }
88
+ .bootstrap-select.btn-group.disabled,
89
+ .bootstrap-select.btn-group > .disabled {
90
+ cursor: not-allowed;
91
+ }
92
+ .bootstrap-select.btn-group.disabled:focus,
93
+ .bootstrap-select.btn-group > .disabled:focus {
94
+ outline: none !important;
95
+ }
96
+ .bootstrap-select.btn-group.bs-container {
97
+ position: absolute;
98
+ }
99
+ .bootstrap-select.btn-group.bs-container .dropdown-menu {
100
+ z-index: 1060;
101
+ }
102
+ .bootstrap-select.btn-group .dropdown-toggle .filter-option {
103
+ display: inline-block;
104
+ overflow: hidden;
105
+ width: 100%;
106
+ text-align: left;
107
+ }
108
+ .bootstrap-select.btn-group .dropdown-toggle .caret {
109
+ position: absolute;
110
+ top: 50%;
111
+ right: 12px;
112
+ margin-top: -2px;
113
+ vertical-align: middle;
114
+ }
115
+ .bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
116
+ width: 100%;
117
+ }
118
+ .bootstrap-select.btn-group .dropdown-menu {
119
+ min-width: 100%;
120
+ -webkit-box-sizing: border-box;
121
+ -moz-box-sizing: border-box;
122
+ box-sizing: border-box;
123
+ }
124
+ .bootstrap-select.btn-group .dropdown-menu.inner {
125
+ position: static;
126
+ float: none;
127
+ border: 0;
128
+ padding: 0;
129
+ margin: 0;
130
+ border-radius: 0;
131
+ -webkit-box-shadow: none;
132
+ box-shadow: none;
133
+ }
134
+ .bootstrap-select.btn-group .dropdown-menu li {
135
+ position: relative;
136
+ }
137
+ .bootstrap-select.btn-group .dropdown-menu li.active small {
138
+ color: #fff;
139
+ }
140
+ .bootstrap-select.btn-group .dropdown-menu li.disabled a {
141
+ cursor: not-allowed;
142
+ }
143
+ .bootstrap-select.btn-group .dropdown-menu li a {
144
+ cursor: pointer;
145
+ -webkit-user-select: none;
146
+ -moz-user-select: none;
147
+ -ms-user-select: none;
148
+ user-select: none;
149
+ }
150
+ .bootstrap-select.btn-group .dropdown-menu li a.opt {
151
+ position: relative;
152
+ padding-left: 2.25em;
153
+ }
154
+ .bootstrap-select.btn-group .dropdown-menu li a span.check-mark {
155
+ display: none;
156
+ }
157
+ .bootstrap-select.btn-group .dropdown-menu li a span.text {
158
+ display: inline-block;
159
+ }
160
+ .bootstrap-select.btn-group .dropdown-menu li small {
161
+ padding-left: 0.5em;
162
+ }
163
+ .bootstrap-select.btn-group .dropdown-menu .notify {
164
+ position: absolute;
165
+ bottom: 5px;
166
+ width: 96%;
167
+ margin: 0 2%;
168
+ min-height: 26px;
169
+ padding: 3px 5px;
170
+ background: #f5f5f5;
171
+ border: 1px solid #e3e3e3;
172
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
173
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
174
+ pointer-events: none;
175
+ opacity: 0.9;
176
+ -webkit-box-sizing: border-box;
177
+ -moz-box-sizing: border-box;
178
+ box-sizing: border-box;
179
+ }
180
+ .bootstrap-select.btn-group .no-results {
181
+ padding: 3px;
182
+ background: #f5f5f5;
183
+ margin: 0 5px;
184
+ white-space: nowrap;
185
+ }
186
+ .bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
187
+ position: static;
188
+ }
189
+ .bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
190
+ position: static;
191
+ top: auto;
192
+ margin-top: -1px;
193
+ }
194
+ .bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {
195
+ position: absolute;
196
+ display: inline-block;
197
+ right: 15px;
198
+ margin-top: 5px;
199
+ }
200
+ .bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
201
+ margin-right: 34px;
202
+ }
203
+ .bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
204
+ z-index: 1061;
205
+ }
206
+ .bootstrap-select.show-menu-arrow .dropdown-toggle:before {
207
+ content: '';
208
+ border-left: 7px solid transparent;
209
+ border-right: 7px solid transparent;
210
+ border-bottom: 7px solid rgba(204, 204, 204, 0.2);
211
+ position: absolute;
212
+ bottom: -4px;
213
+ left: 9px;
214
+ display: none;
215
+ }
216
+ .bootstrap-select.show-menu-arrow .dropdown-toggle:after {
217
+ content: '';
218
+ border-left: 6px solid transparent;
219
+ border-right: 6px solid transparent;
220
+ border-bottom: 6px solid white;
221
+ position: absolute;
222
+ bottom: -4px;
223
+ left: 10px;
224
+ display: none;
225
+ }
226
+ .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
227
+ bottom: auto;
228
+ top: -3px;
229
+ border-top: 7px solid rgba(204, 204, 204, 0.2);
230
+ border-bottom: 0;
231
+ }
232
+ .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
233
+ bottom: auto;
234
+ top: -3px;
235
+ border-top: 6px solid white;
236
+ border-bottom: 0;
237
+ }
238
+ .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
239
+ right: 12px;
240
+ left: auto;
241
+ }
242
+ .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
243
+ right: 13px;
244
+ left: auto;
245
+ }
246
+ .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,
247
+ .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
248
+ display: block;
249
+ }
250
+ .bs-searchbox,
251
+ .bs-actionsbox,
252
+ .bs-donebutton {
253
+ padding: 4px 8px;
254
+ }
255
+ .bs-actionsbox {
256
+ width: 100%;
257
+ -webkit-box-sizing: border-box;
258
+ -moz-box-sizing: border-box;
259
+ box-sizing: border-box;
260
+ }
261
+ .bs-actionsbox .btn-group button {
262
+ width: 50%;
263
+ }
264
+ .bs-donebutton {
265
+ float: left;
266
+ width: 100%;
267
+ -webkit-box-sizing: border-box;
268
+ -moz-box-sizing: border-box;
269
+ box-sizing: border-box;
270
+ }
271
+ .bs-donebutton .btn-group button {
272
+ width: 100%;
273
+ }
274
+ .bs-searchbox + .bs-actionsbox {
275
+ padding: 0 8px 4px;
276
+ }
277
+ .bs-searchbox .form-control {
278
+ margin-bottom: 0;
279
+ width: 100%;
280
+ float: none;
281
+ }
282
  /*# sourceMappingURL=bootstrap-select.css.map */
inc/css/daterangepicker.css CHANGED
@@ -1,233 +1,233 @@
1
- .daterangepicker {
2
- position: absolute;
3
- color: inherit;
4
- background: #fff;
5
- border-radius: 4px;
6
- width: 278px;
7
- padding: 4px;
8
- margin-top: 1px;
9
- top: 100px;
10
- left: 20px;
11
- /* Calendars */ }
12
- .daterangepicker:before, .daterangepicker:after {
13
- position: absolute;
14
- display: inline-block;
15
- border-bottom-color: rgba(0, 0, 0, 0.2);
16
- content: ''; }
17
- .daterangepicker:before {
18
- top: -7px;
19
- border-right: 7px solid transparent;
20
- border-left: 7px solid transparent;
21
- border-bottom: 7px solid #ccc; }
22
- .daterangepicker:after {
23
- top: -6px;
24
- border-right: 6px solid transparent;
25
- border-bottom: 6px solid #fff;
26
- border-left: 6px solid transparent; }
27
- .daterangepicker.opensleft:before {
28
- right: 9px; }
29
- .daterangepicker.opensleft:after {
30
- right: 10px; }
31
- .daterangepicker.openscenter:before {
32
- left: 0;
33
- right: 0;
34
- width: 0;
35
- margin-left: auto;
36
- margin-right: auto; }
37
- .daterangepicker.openscenter:after {
38
- left: 0;
39
- right: 0;
40
- width: 0;
41
- margin-left: auto;
42
- margin-right: auto; }
43
- .daterangepicker.opensright:before {
44
- left: 9px; }
45
- .daterangepicker.opensright:after {
46
- left: 10px; }
47
- .daterangepicker.dropup {
48
- margin-top: -5px; }
49
- .daterangepicker.dropup:before {
50
- top: initial;
51
- bottom: -7px;
52
- border-bottom: initial;
53
- border-top: 7px solid #ccc; }
54
- .daterangepicker.dropup:after {
55
- top: initial;
56
- bottom: -6px;
57
- border-bottom: initial;
58
- border-top: 6px solid #fff; }
59
- .daterangepicker.dropdown-menu {
60
- max-width: none;
61
- z-index: 3001; }
62
- .daterangepicker.single .ranges, .daterangepicker.single .calendar {
63
- float: none; }
64
- .daterangepicker.show-calendar .calendar {
65
- display: block; }
66
- .daterangepicker .calendar {
67
- display: none;
68
- max-width: 270px;
69
- margin: 4px; }
70
- .daterangepicker .calendar.single .calendar-table {
71
- border: none; }
72
- .daterangepicker .calendar th, .daterangepicker .calendar td {
73
- white-space: nowrap;
74
- text-align: center;
75
- min-width: 32px; }
76
- .daterangepicker .calendar-table {
77
- border: 1px solid #fff;
78
- padding: 4px;
79
- border-radius: 4px;
80
- background: #fff; }
81
- .daterangepicker table {
82
- width: 100%;
83
- margin: 0; }
84
- .daterangepicker td, .daterangepicker th {
85
- text-align: center;
86
- width: 20px;
87
- height: 20px;
88
- //border-radius: 4px;
89
- border: 1px solid transparent;
90
- white-space: nowrap;
91
- cursor: pointer; }
92
- .daterangepicker td.available:hover, .daterangepicker th.available:hover {
93
- background: #eee; }
94
- .daterangepicker td.week, .daterangepicker th.week {
95
- font-size: 80%;
96
- color: #ccc; }
97
- .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
98
- background-color: #fff;
99
- border-color: transparent;
100
- color: #999; }
101
- .daterangepicker td.in-range {
102
- background-color: #b7d9e8;
103
- border-color: transparent;
104
- color: #000;
105
- border-radius: 0; }
106
- .daterangepicker td.start-date {
107
- border-radius: 4px 0 0 4px; }
108
- .daterangepicker td.end-date {
109
- border-radius: 0 4px 4px 0; }
110
- .daterangepicker td.start-date.end-date {
111
- border-radius: 4px; }
112
- .daterangepicker td.active, .daterangepicker td.active:hover {
113
- background-color: #357ebd;
114
- border-color: transparent;
115
- color: #fff; }
116
- .daterangepicker th.month {
117
- width: auto; }
118
- .daterangepicker td.disabled, .daterangepicker option.disabled {
119
- color: #999;
120
- cursor: not-allowed;
121
- /*text-decoration: line-through;*/ }
122
- .daterangepicker select.monthselect, .daterangepicker select.yearselect {
123
- font-size: 12px;
124
- padding: 1px;
125
- height: auto;
126
- margin: 0;
127
- cursor: default; }
128
- .daterangepicker select.monthselect {
129
- margin-right: 2%;
130
- width: 56%; }
131
- .daterangepicker select.yearselect {
132
- width: 40%; }
133
- .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
134
- width: 50px;
135
- margin-bottom: 0; }
136
- .daterangepicker .input-mini {
137
- border: 1px solid #ccc;
138
- border-radius: 4px;
139
- color: #555;
140
- height: 30px;
141
- line-height: 30px;
142
- display: block;
143
- vertical-align: middle;
144
- margin: 0 0 5px 0;
145
- padding: 0 6px 0 28px;
146
- width:100% }
147
- .daterangepicker .input-mini.active {
148
- border: 1px solid #08c;
149
- border-radius: 4px; }
150
- .daterangepicker .daterangepicker_input {
151
- position: relative;
152
- background-color:#fff
153
- }
154
- .daterangepicker .daterangepicker_input i {
155
- position: absolute;
156
- left: 8px;
157
- top: 8px; }
158
- .daterangepicker .calendar-time {
159
- text-align: center;
160
- margin: 5px auto;
161
- line-height: 30px;
162
- position: relative;
163
- padding-left: 28px; }
164
- .daterangepicker .calendar-time select.disabled {
165
- color: #ccc;
166
- cursor: not-allowed; }
167
-
168
- .ranges {
169
- font-size: 11px;
170
- float: none;
171
- margin: 4px;
172
- text-align: left; }
173
- .ranges ul {
174
- list-style: none;
175
- margin: 0 auto;
176
- padding: 0;
177
- width: 100%; }
178
- .ranges li {
179
- font-size: 13px;
180
- background: #f5f5f5;
181
- border: 1px solid #f5f5f5;
182
- border-radius: 4px;
183
- color: #08c;
184
- padding: 3px 12px;
185
- margin-bottom: 8px;
186
- cursor: pointer; }
187
- .ranges li:hover {
188
- background: #08c;
189
- border: 1px solid #08c;
190
- color: #fff; }
191
- .ranges li.active {
192
- background: #08c;
193
- border: 1px solid #08c;
194
- color: #fff; }
195
-
196
- /* Larger Screen Styling */
197
- @media (min-width: 564px) {
198
- .daterangepicker {
199
- width: auto; }
200
- .daterangepicker .ranges ul {
201
- width: 160px; }
202
- .daterangepicker.single .ranges ul {
203
- width: 100%; }
204
- .daterangepicker.single .calendar.left {
205
- clear: none; }
206
- .daterangepicker.single .ranges, .daterangepicker.single .calendar {
207
- float: left; }
208
- .daterangepicker .calendar.left {
209
- clear: left;
210
- margin-right: 0; }
211
- .daterangepicker .calendar.left .calendar-table {
212
- border-right: none;
213
- border-top-right-radius: 0;
214
- border-bottom-right-radius: 0; }
215
- .daterangepicker .calendar.right {
216
- margin-left: 0; }
217
- .daterangepicker .calendar.right .calendar-table {
218
- border-left: none;
219
- border-top-left-radius: 0;
220
- border-bottom-left-radius: 0; }
221
- .daterangepicker .left .daterangepicker_input {
222
- padding-right: 12px; }
223
- .daterangepicker .calendar.left .calendar-table {
224
- padding-right: 12px; }
225
- .daterangepicker .ranges, .daterangepicker .calendar {
226
- float: left; } }
227
-
228
- @media (min-width: 730px) {
229
- .daterangepicker .ranges {
230
- width: auto;
231
- float: left; }
232
- .daterangepicker .calendar.left {
233
- clear: none; } }
1
+ .daterangepicker {
2
+ position: absolute;
3
+ color: inherit;
4
+ background: #fff;
5
+ border-radius: 4px;
6
+ width: 278px;
7
+ padding: 4px;
8
+ margin-top: 1px;
9
+ top: 100px;
10
+ left: 20px;
11
+ /* Calendars */ }
12
+ .daterangepicker:before, .daterangepicker:after {
13
+ position: absolute;
14
+ display: inline-block;
15
+ border-bottom-color: rgba(0, 0, 0, 0.2);
16
+ content: ''; }
17
+ .daterangepicker:before {
18
+ top: -7px;
19
+ border-right: 7px solid transparent;
20
+ border-left: 7px solid transparent;
21
+ border-bottom: 7px solid #ccc; }
22
+ .daterangepicker:after {
23
+ top: -6px;
24
+ border-right: 6px solid transparent;
25
+ border-bottom: 6px solid #fff;
26
+ border-left: 6px solid transparent; }
27
+ .daterangepicker.opensleft:before {
28
+ right: 9px; }
29
+ .daterangepicker.opensleft:after {
30
+ right: 10px; }
31
+ .daterangepicker.openscenter:before {
32
+ left: 0;
33
+ right: 0;
34
+ width: 0;
35
+ margin-left: auto;
36
+ margin-right: auto; }
37
+ .daterangepicker.openscenter:after {
38
+ left: 0;
39
+ right: 0;
40
+ width: 0;
41
+ margin-left: auto;
42
+ margin-right: auto; }
43
+ .daterangepicker.opensright:before {
44
+ left: 9px; }
45
+ .daterangepicker.opensright:after {
46
+ left: 10px; }
47
+ .daterangepicker.dropup {
48
+ margin-top: -5px; }
49
+ .daterangepicker.dropup:before {
50
+ top: initial;
51
+ bottom: -7px;
52
+ border-bottom: initial;
53
+ border-top: 7px solid #ccc; }
54
+ .daterangepicker.dropup:after {
55
+ top: initial;
56
+ bottom: -6px;
57
+ border-bottom: initial;
58
+ border-top: 6px solid #fff; }
59
+ .daterangepicker.dropdown-menu {
60
+ max-width: none;
61
+ z-index: 3001; }
62
+ .daterangepicker.single .ranges, .daterangepicker.single .calendar {
63
+ float: none; }
64
+ .daterangepicker.show-calendar .calendar {
65
+ display: block; }
66
+ .daterangepicker .calendar {
67
+ display: none;
68
+ max-width: 270px;
69
+ margin: 4px; }
70
+ .daterangepicker .calendar.single .calendar-table {
71
+ border: none; }
72
+ .daterangepicker .calendar th, .daterangepicker .calendar td {
73
+ white-space: nowrap;
74
+ text-align: center;
75
+ min-width: 32px; }
76
+ .daterangepicker .calendar-table {
77
+ border: 1px solid #fff;
78
+ padding: 4px;
79
+ border-radius: 4px;
80
+ background: #fff; }
81
+ .daterangepicker table {
82
+ width: 100%;
83
+ margin: 0; }
84
+ .daterangepicker td, .daterangepicker th {
85
+ text-align: center;
86
+ width: 20px;
87
+ height: 20px;
88
+ //border-radius: 4px;
89
+ border: 1px solid transparent;
90
+ white-space: nowrap;
91
+ cursor: pointer; }
92
+ .daterangepicker td.available:hover, .daterangepicker th.available:hover {
93
+ background: #eee; }
94
+ .daterangepicker td.week, .daterangepicker th.week {
95
+ font-size: 80%;
96
+ color: #ccc; }
97
+ .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
98
+ background-color: #fff;
99
+ border-color: transparent;
100
+ color: #999; }
101
+ .daterangepicker td.in-range {
102
+ background-color: #b7d9e8;
103
+ border-color: transparent;
104
+ color: #000;
105
+ border-radius: 0; }
106
+ .daterangepicker td.start-date {
107
+ border-radius: 4px 0 0 4px; }
108
+ .daterangepicker td.end-date {
109
+ border-radius: 0 4px 4px 0; }
110
+ .daterangepicker td.start-date.end-date {
111
+ border-radius: 4px; }
112
+ .daterangepicker td.active, .daterangepicker td.active:hover {
113
+ background-color: #357ebd;
114
+ border-color: transparent;
115
+ color: #fff; }
116
+ .daterangepicker th.month {
117
+ width: auto; }
118
+ .daterangepicker td.disabled, .daterangepicker option.disabled {
119
+ color: #999;
120
+ cursor: not-allowed;
121
+ /*text-decoration: line-through;*/ }
122
+ .daterangepicker select.monthselect, .daterangepicker select.yearselect {
123
+ font-size: 12px;
124
+ padding: 1px;
125
+ height: auto;
126
+ margin: 0;
127
+ cursor: default; }
128
+ .daterangepicker select.monthselect {
129
+ margin-right: 2%;
130
+ width: 56%; }
131
+ .daterangepicker select.yearselect {
132
+ width: 40%; }
133
+ .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
134
+ width: 50px;
135
+ margin-bottom: 0; }
136
+ .daterangepicker .input-mini {
137
+ border: 1px solid #ccc;
138
+ border-radius: 4px;
139
+ color: #555;
140
+ height: 30px;
141
+ line-height: 30px;
142
+ display: block;
143
+ vertical-align: middle;
144
+ margin: 0 0 5px 0;
145
+ padding: 0 6px 0 28px;
146
+ width:100% }
147
+ .daterangepicker .input-mini.active {
148
+ border: 1px solid #08c;
149
+ border-radius: 4px; }
150
+ .daterangepicker .daterangepicker_input {
151
+ position: relative;
152
+ background-color:#fff
153
+ }
154
+ .daterangepicker .daterangepicker_input i {
155
+ position: absolute;
156
+ left: 8px;
157
+ top: 8px; }
158
+ .daterangepicker .calendar-time {
159
+ text-align: center;
160
+ margin: 5px auto;
161
+ line-height: 30px;
162
+ position: relative;
163
+ padding-left: 28px; }
164
+ .daterangepicker .calendar-time select.disabled {
165
+ color: #ccc;
166
+ cursor: not-allowed; }
167
+
168
+ .ranges {
169
+ font-size: 11px;
170
+ float: none;
171
+ margin: 4px;
172
+ text-align: left; }
173
+ .ranges ul {
174
+ list-style: none;
175
+ margin: 0 auto;
176
+ padding: 0;
177
+ width: 100%; }
178
+ .ranges li {
179
+ font-size: 13px;
180
+ background: #f5f5f5;
181
+ border: 1px solid #f5f5f5;
182
+ border-radius: 4px;
183
+ color: #08c;
184
+ padding: 3px 12px;
185
+ margin-bottom: 8px;
186
+ cursor: pointer; }
187
+ .ranges li:hover {
188
+ background: #08c;
189
+ border: 1px solid #08c;
190
+ color: #fff; }
191
+ .ranges li.active {
192
+ background: #08c;
193
+ border: 1px solid #08c;
194
+ color: #fff; }
195
+
196
+ /* Larger Screen Styling */
197
+ @media (min-width: 564px) {
198
+ .daterangepicker {
199
+ width: auto; }
200
+ .daterangepicker .ranges ul {
201
+ width: 160px; }
202
+ .daterangepicker.single .ranges ul {
203
+ width: 100%; }
204
+ .daterangepicker.single .calendar.left {
205
+ clear: none; }
206
+ .daterangepicker.single .ranges, .daterangepicker.single .calendar {
207
+ float: left; }
208
+ .daterangepicker .calendar.left {
209
+ clear: left;
210
+ margin-right: 0; }
211
+ .daterangepicker .calendar.left .calendar-table {
212
+ border-right: none;
213
+ border-top-right-radius: 0;
214
+ border-bottom-right-radius: 0; }
215
+ .daterangepicker .calendar.right {
216
+ margin-left: 0; }
217
+ .daterangepicker .calendar.right .calendar-table {
218
+ border-left: none;
219
+ border-top-left-radius: 0;
220
+ border-bottom-left-radius: 0; }
221
+ .daterangepicker .left .daterangepicker_input {
222
+ padding-right: 12px; }
223
+ .daterangepicker .calendar.left .calendar-table {
224
+ padding-right: 12px; }
225
+ .daterangepicker .ranges, .daterangepicker .calendar {
226
+ float: left; } }
227
+
228
+ @media (min-width: 730px) {
229
+ .daterangepicker .ranges {
230
+ width: auto;
231
+ float: left; }
232
+ .daterangepicker .calendar.left {
233
+ clear: none; } }
inc/css/font_awesome.css CHANGED
@@ -1,4 +1,4 @@
1
- /*!
2
- * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
3
- * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}
1
+ /*!
2
+ * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
3
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}
inc/css/gawd_front.css CHANGED
@@ -1,5 +1,5 @@
1
- .gawd_draw_analytics_front{
2
- padding: 2px;
3
- line-height: 28px;
4
- height: 28px;
5
  }
1
+ .gawd_draw_analytics_front{
2
+ padding: 2px;
3
+ line-height: 28px;
4
+ height: 28px;
5
  }
inc/css/jquery-ui.css CHANGED
@@ -1,566 +1,566 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.14
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden { display: none; }
14
- .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
- .ui-helper-clearfix { display: inline-block; }
18
- /* required comment for clearfix to work in Opera \*/
19
- * html .ui-helper-clearfix { height:1%; }
20
- .ui-helper-clearfix { display:block; }
21
- /* end clearfix */
22
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
-
24
-
25
- /* Interaction Cues
26
- ----------------------------------*/
27
- .ui-state-disabled { cursor: default !important; }
28
-
29
-
30
- /* Icons
31
- ----------------------------------*/
32
-
33
- /* states and images */
34
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
-
36
-
37
- /* Misc visuals
38
- ----------------------------------*/
39
-
40
- /* Overlays */
41
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
- /*
43
- * jQuery UI Accordion 1.8.14
44
- *
45
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
46
- * Dual licensed under the MIT or GPL Version 2 licenses.
47
- * http://jquery.org/license
48
- *
49
- * http://docs.jquery.com/UI/Accordion#theming
50
- */
51
- /* IE/Win - Fix animation bug - #4615 */
52
- .ui-accordion { width: 100%; }
53
- .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
54
- .ui-accordion .ui-accordion-li-fix { display: inline; }
55
- .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
56
- .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
57
- .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
58
- .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
59
- .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
60
- .ui-accordion .ui-accordion-content-active { display: block; }
61
- /*
62
- * jQuery UI Autocomplete 1.8.14
63
- *
64
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
65
- * Dual licensed under the MIT or GPL Version 2 licenses.
66
- * http://jquery.org/license
67
- *
68
- * http://docs.jquery.com/UI/Autocomplete#theming
69
- */
70
- .ui-autocomplete { position: absolute; cursor: default; }
71
-
72
- /* workarounds */
73
- * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
74
-
75
- /*
76
- * jQuery UI Menu 1.8.14
77
- *
78
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
79
- * Dual licensed under the MIT or GPL Version 2 licenses.
80
- * http://jquery.org/license
81
- *
82
- * http://docs.jquery.com/UI/Menu#theming
83
- */
84
- .ui-menu {
85
- list-style:none;
86
- padding: 2px;
87
- margin: 0;
88
- display:block;
89
- float: left;
90
- }
91
- .ui-menu .ui-menu {
92
- margin-top: -3px;
93
- }
94
- .ui-menu .ui-menu-item {
95
- margin:0;
96
- padding: 0;
97
- zoom: 1;
98
- float: left;
99
- clear: left;
100
- width: 100%;
101
- }
102
- .ui-menu .ui-menu-item a {
103
- text-decoration:none;
104
- display:block;
105
- padding:.2em .4em;
106
- line-height:1.5;
107
- zoom:1;
108
- }
109
- .ui-menu .ui-menu-item a.ui-state-hover,
110
- .ui-menu .ui-menu-item a.ui-state-active {
111
- font-weight: normal;
112
- margin: -1px;
113
- }
114
- /*
115
- * jQuery UI Button 1.8.14
116
- *
117
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
118
- * Dual licensed under the MIT or GPL Version 2 licenses.
119
- * http://jquery.org/license
120
- *
121
- * http://docs.jquery.com/UI/Button#theming
122
- */
123
- .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
124
- .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
125
- button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
126
- .ui-button-icons-only { width: 3.4em; }
127
- button.ui-button-icons-only { width: 3.7em; }
128
-
129
- /*button text element */
130
- .ui-button .ui-button-text { display: block; line-height: 1.4; }
131
- .ui-button-text-only .ui-button-text { padding: .4em 1em; }
132
- .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
133
- .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
134
- .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
135
- .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
136
- /* no icon support for input elements, provide padding by default */
137
- input.ui-button { padding: .4em 1em; }
138
-
139
- /*button icon element(s) */
140
- .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
141
- .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
142
- .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
143
- .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
144
- .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
145
-
146
- /*button sets*/
147
- .ui-buttonset { margin-right: 7px; }
148
- .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
149
-
150
- /* workarounds */
151
- button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
152
- /*
153
- * jQuery UI Datepicker 1.8.14
154
- *
155
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
156
- * Dual licensed under the MIT or GPL Version 2 licenses.
157
- * http://jquery.org/license
158
- *
159
- * http://docs.jquery.com/UI/Datepicker#theming
160
- */
161
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
162
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
163
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
164
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
165
- .ui-datepicker .ui-datepicker-prev { left:2px; }
166
- .ui-datepicker .ui-datepicker-next { right:2px; }
167
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
168
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
169
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
170
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
171
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
172
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
173
- .ui-datepicker select.ui-datepicker-month,
174
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
175
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
176
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
177
- .ui-datepicker td { border: 0; padding: 1px; }
178
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
179
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
180
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
181
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
182
-
183
- /* with multiple calendars */
184
- .ui-datepicker.ui-datepicker-multi { width:auto; }
185
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
186
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
187
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
188
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
189
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
190
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
191
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
192
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
193
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
194
-
195
- /* RTL support */
196
- .ui-datepicker-rtl { direction: rtl; }
197
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
198
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
199
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
200
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
201
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
202
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
203
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
204
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
205
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
206
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
207
-
208
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
209
- .ui-datepicker-cover {
210
- display: none; /*sorry for IE5*/
211
- display/**/: block; /*sorry for IE5*/
212
- position: absolute; /*must have*/
213
- z-index: -1; /*must have*/
214
- filter: mask(); /*must have*/
215
- top: -4px; /*must have*/
216
- left: -4px; /*must have*/
217
- width: 200px; /*must have*/
218
- height: 200px; /*must have*/
219
- }/*
220
- * jQuery UI Dialog 1.8.14
221
- *
222
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
223
- * Dual licensed under the MIT or GPL Version 2 licenses.
224
- * http://jquery.org/license
225
- *
226
- * http://docs.jquery.com/UI/Dialog#theming
227
- */
228
- .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
229
- .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
230
- .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
231
- .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
232
- .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
233
- .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
234
- .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
235
- .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
236
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
237
- .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
238
- .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
239
- .ui-draggable .ui-dialog-titlebar { cursor: move; }
240
- /*
241
- * jQuery UI Progressbar 1.8.14
242
- *
243
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
244
- * Dual licensed under the MIT or GPL Version 2 licenses.
245
- * http://jquery.org/license
246
- *
247
- * http://docs.jquery.com/UI/Progressbar#theming
248
- */
249
- .ui-progressbar { height:2em; text-align: left; }
250
- .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
251
- * jQuery UI Resizable 1.8.14
252
- *
253
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
254
- * Dual licensed under the MIT or GPL Version 2 licenses.
255
- * http://jquery.org/license
256
- *
257
- * http://docs.jquery.com/UI/Resizable#theming
258
- */
259
- .ui-resizable { position: relative;}
260
- .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
261
- .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
262
- .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
263
- .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
264
- .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
265
- .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
266
- .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
267
- .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
268
- .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
269
- .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
270
- * jQuery UI Selectable 1.8.14
271
- *
272
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
273
- * Dual licensed under the MIT or GPL Version 2 licenses.
274
- * http://jquery.org/license
275
- *
276
- * http://docs.jquery.com/UI/Selectable#theming
277
- */
278
- .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
279
- /*
280
- * jQuery UI Slider 1.8.14
281
- *
282
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
283
- * Dual licensed under the MIT or GPL Version 2 licenses.
284
- * http://jquery.org/license
285
- *
286
- * http://docs.jquery.com/UI/Slider#theming
287
- */
288
- .ui-slider { position: relative; text-align: left; }
289
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
290
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
291
-
292
- .ui-slider-horizontal { height: .8em; }
293
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
294
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
295
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
296
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
297
-
298
- .ui-slider-vertical { width: .8em; height: 100px; }
299
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
300
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
301
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
302
- .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
303
- * jQuery UI Tabs 1.8.14
304
- *
305
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
306
- * Dual licensed under the MIT or GPL Version 2 licenses.
307
- * http://jquery.org/license
308
- *
309
- * http://docs.jquery.com/UI/Tabs#theming
310
- */
311
- .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
312
- .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
313
- .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
314
- .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
315
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
316
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
317
- .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
318
- .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
319
- .ui-tabs .ui-tabs-hide { display: none !important; }
320
- /*
321
- * jQuery UI CSS Framework 1.8.14
322
- *
323
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
324
- * Dual licensed under the MIT or GPL Version 2 licenses.
325
- * http://jquery.org/license
326
- *
327
- * http://docs.jquery.com/UI/Theming/API
328
- *
329
- * To view and modify this theme, visit http://jqueryui.com/themeroller/
330
- */
331
-
332
-
333
- /* Component containers
334
- ----------------------------------*/
335
- .ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
336
- .ui-widget .ui-widget { font-size: 1em; }
337
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
338
- .ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #949494/*{fcContent}*/; }
339
- .ui-widget-content a { color: #949494/*{fcContent}*/; }
340
- .ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #949494/*{fcHeader}*/; font-weight: bold; }
341
- .ui-widget-header a { color: #222222/*{fcHeader}*/; }
342
-
343
- /* Interaction states
344
- ----------------------------------*/
345
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #7DB5D8/*{bgColorDefault}*/ /*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #fff/*{fcDefault}*/; }
346
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
347
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #7DB5D8/*{bgColorHover}*/ /*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #fff/*{fcHover}*/; }
348
- .ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
349
- .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
350
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
351
- .ui-widget :active { outline: none; }
352
-
353
- /* Interaction Cues
354
- ----------------------------------*/
355
- .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
356
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
357
- .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
358
- .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
359
- .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
360
- .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
361
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
362
- .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
363
-
364
- /* Icons
365
- ----------------------------------*/
366
-
367
- /* states and images */
368
- .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
369
- .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
370
- .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
371
- .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
372
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
373
- .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
374
- .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
375
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
376
-
377
- /* positioning */
378
- .ui-icon-carat-1-n { background-position: 0 0; }
379
- .ui-icon-carat-1-ne { background-position: -16px 0; }
380
- .ui-icon-carat-1-e { background-position: -32px 0; }
381
- .ui-icon-carat-1-se { background-position: -48px 0; }
382
- .ui-icon-carat-1-s { background-position: -64px 0; }
383
- .ui-icon-carat-1-sw { background-position: -80px 0; }
384
- .ui-icon-carat-1-w { background-position: -96px 0; }
385
- .ui-icon-carat-1-nw { background-position: -112px 0; }
386
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
387
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
388
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
389
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
390
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
391
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
392
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
393
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
394
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
395
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
396
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
397
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
398
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
399
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
400
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
401
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
402
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
403
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
404
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
405
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
406
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
407
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
408
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
409
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
410
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
411
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
412
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
413
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
414
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
415
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
416
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
417
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
418
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
419
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
420
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
421
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
422
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
423
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
424
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
425
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
426
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
427
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
428
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
429
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
430
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
431
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
432
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
433
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
434
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
435
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
436
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
437
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
438
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
439
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
440
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
441
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
442
- .ui-icon-arrow-4 { background-position: 0 -80px; }
443
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
444
- .ui-icon-extlink { background-position: -32px -80px; }
445
- .ui-icon-newwin { background-position: -48px -80px; }
446
- .ui-icon-refresh { background-position: -64px -80px; }
447
- .ui-icon-shuffle { background-position: -80px -80px; }
448
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
449
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
450
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
451
- .ui-icon-folder-open { background-position: -16px -96px; }
452
- .ui-icon-document { background-position: -32px -96px; }
453
- .ui-icon-document-b { background-position: -48px -96px; }
454
- .ui-icon-note { background-position: -64px -96px; }
455
- .ui-icon-mail-closed { background-position: -80px -96px; }
456
- .ui-icon-mail-open { background-position: -96px -96px; }
457
- .ui-icon-suitcase { background-position: -112px -96px; }
458
- .ui-icon-comment { background-position: -128px -96px; }
459
- .ui-icon-person { background-position: -144px -96px; }
460
- .ui-icon-print { background-position: -160px -96px; }
461
- .ui-icon-trash { background-position: -176px -96px; }
462
- .ui-icon-locked { background-position: -192px -96px; }
463
- .ui-icon-unlocked { background-position: -208px -96px; }
464
- .ui-icon-bookmark { background-position: -224px -96px; }
465
- .ui-icon-tag { background-position: -240px -96px; }
466
- .ui-icon-home { background-position: 0 -112px; }
467
- .ui-icon-flag { background-position: -16px -112px; }
468
- .ui-icon-calendar { background-position: -32px -112px; }
469
- .ui-icon-cart { background-position: -48px -112px; }
470
- .ui-icon-pencil { background-position: -64px -112px; }
471
- .ui-icon-clock { background-position: -80px -112px; }
472
- .ui-icon-disk { background-position: -96px -112px; }
473
- .ui-icon-calculator { background-position: -112px -112px; }
474
- .ui-icon-zoomin { background-position: -128px -112px; }
475
- .ui-icon-zoomout { background-position: -144px -112px; }
476
- .ui-icon-search { background-position: -160px -112px; }
477
- .ui-icon-wrench { background-position: -176px -112px; }
478
- .ui-icon-gear { background-position: -192px -112px; }
479
- .ui-icon-heart { background-position: -208px -112px; }
480
- .ui-icon-star { background-position: -224px -112px; }
481
- .ui-icon-link { background-position: -240px -112px; }
482
- .ui-icon-cancel { background-position: 0 -128px; }
483
- .ui-icon-plus { background-position: -16px -128px; }
484
- .ui-icon-plusthick { background-position: -32px -128px; }
485
- .ui-icon-minus { background-position: -48px -128px; }
486
- .ui-icon-minusthick { background-position: -64px -128px; }
487
- .ui-icon-close { background-position: -80px -128px; }
488
- .ui-icon-closethick { background-position: -96px -128px; }
489
- .ui-icon-key { background-position: -112px -128px; }
490
- .ui-icon-lightbulb { background-position: -128px -128px; }
491
- .ui-icon-scissors { background-position: -144px -128px; }
492
- .ui-icon-clipboard { background-position: -160px -128px; }
493
- .ui-icon-copy { background-position: -176px -128px; }
494
- .ui-icon-contact { background-position: -192px -128px; }
495
- .ui-icon-image { background-position: -208px -128px; }
496
- .ui-icon-video { background-position: -224px -128px; }
497
- .ui-icon-script { background-position: -240px -128px; }
498
- .ui-icon-alert { background-position: 0 -144px; }
499
- .ui-icon-info { background-position: -16px -144px; }
500
- .ui-icon-notice { background-position: -32px -144px; }
501
- .ui-icon-help { background-position: -48px -144px; }
502
- .ui-icon-check { background-position: -64px -144px; }
503
- .ui-icon-bullet { background-position: -80px -144px; }
504
- .ui-icon-radio-off { background-position: -96px -144px; }
505
- .ui-icon-radio-on { background-position: -112px -144px; }
506
- .ui-icon-pin-w { background-position: -128px -144px; }
507
- .ui-icon-pin-s { background-position: -144px -144px; }
508
- .ui-icon-play { background-position: 0 -160px; }
509
- .ui-icon-pause { background-position: -16px -160px; }
510
- .ui-icon-seek-next { background-position: -32px -160px; }
511
- .ui-icon-seek-prev { background-position: -48px -160px; }
512
- .ui-icon-seek-end { background-position: -64px -160px; }
513
- .ui-icon-seek-start { background-position: -80px -160px; }
514
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
515
- .ui-icon-seek-first { background-position: -80px -160px; }
516
- .ui-icon-stop { background-position: -96px -160px; }
517
- .ui-icon-eject { background-position: -112px -160px; }
518
- .ui-icon-volume-off { background-position: -128px -160px; }
519
- .ui-icon-volume-on { background-position: -144px -160px; }
520
- .ui-icon-power { background-position: 0 -176px; }
521
- .ui-icon-signal-diag { background-position: -16px -176px; }
522
- .ui-icon-signal { background-position: -32px -176px; }
523
- .ui-icon-battery-0 { background-position: -48px -176px; }
524
- .ui-icon-battery-1 { background-position: -64px -176px; }
525
- .ui-icon-battery-2 { background-position: -80px -176px; }
526
- .ui-icon-battery-3 { background-position: -96px -176px; }
527
- .ui-icon-circle-plus { background-position: 0 -192px; }
528
- .ui-icon-circle-minus { background-position: -16px -192px; }
529
- .ui-icon-circle-close { background-position: -32px -192px; }
530
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
531
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
532
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
533
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
534
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
535
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
536
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
537
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
538
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
539
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
540
- .ui-icon-circle-check { background-position: -208px -192px; }
541
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
542
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
543
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
544
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
545
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
546
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
547
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
548
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
549
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
550
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
551
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
552
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
553
-
554
-
555
- /* Misc visuals
556
- ----------------------------------*/
557
-
558
- /* Corner radius */
559
- .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
560
- .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
561
- .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
562
- .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
563
-
564
- /* Overlays */
565
- .ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
566
  .ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.14
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ui-helper-clearfix { height:1%; }
20
+ .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+ /*
43
+ * jQuery UI Accordion 1.8.14
44
+ *
45
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
46
+ * Dual licensed under the MIT or GPL Version 2 licenses.
47
+ * http://jquery.org/license
48
+ *
49
+ * http://docs.jquery.com/UI/Accordion#theming
50
+ */
51
+ /* IE/Win - Fix animation bug - #4615 */
52
+ .ui-accordion { width: 100%; }
53
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
54
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
55
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
56
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
57
+ .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
58
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
59
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
60
+ .ui-accordion .ui-accordion-content-active { display: block; }
61
+ /*
62
+ * jQuery UI Autocomplete 1.8.14
63
+ *
64
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
65
+ * Dual licensed under the MIT or GPL Version 2 licenses.
66
+ * http://jquery.org/license
67
+ *
68
+ * http://docs.jquery.com/UI/Autocomplete#theming
69
+ */
70
+ .ui-autocomplete { position: absolute; cursor: default; }
71
+
72
+ /* workarounds */
73
+ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
74
+
75
+ /*
76
+ * jQuery UI Menu 1.8.14
77
+ *
78
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
79
+ * Dual licensed under the MIT or GPL Version 2 licenses.
80
+ * http://jquery.org/license
81
+ *
82
+ * http://docs.jquery.com/UI/Menu#theming
83
+ */
84
+ .ui-menu {
85
+ list-style:none;
86
+ padding: 2px;
87
+ margin: 0;
88
+ display:block;
89
+ float: left;
90
+ }
91
+ .ui-menu .ui-menu {
92
+ margin-top: -3px;
93
+ }
94
+ .ui-menu .ui-menu-item {
95
+ margin:0;
96
+ padding: 0;
97
+ zoom: 1;
98
+ float: left;
99
+ clear: left;
100
+ width: 100%;
101
+ }
102
+ .ui-menu .ui-menu-item a {
103
+ text-decoration:none;
104
+ display:block;
105
+ padding:.2em .4em;
106
+ line-height:1.5;
107
+ zoom:1;
108
+ }
109
+ .ui-menu .ui-menu-item a.ui-state-hover,
110
+ .ui-menu .ui-menu-item a.ui-state-active {
111
+ font-weight: normal;
112
+ margin: -1px;
113
+ }
114
+ /*
115
+ * jQuery UI Button 1.8.14
116
+ *
117
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
118
+ * Dual licensed under the MIT or GPL Version 2 licenses.
119
+ * http://jquery.org/license
120
+ *
121
+ * http://docs.jquery.com/UI/Button#theming
122
+ */
123
+ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
124
+ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
125
+ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
126
+ .ui-button-icons-only { width: 3.4em; }
127
+ button.ui-button-icons-only { width: 3.7em; }
128
+
129
+ /*button text element */
130
+ .ui-button .ui-button-text { display: block; line-height: 1.4; }
131
+ .ui-button-text-only .ui-button-text { padding: .4em 1em; }
132
+ .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
133
+ .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
134
+ .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
135
+ .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
136
+ /* no icon support for input elements, provide padding by default */
137
+ input.ui-button { padding: .4em 1em; }
138
+
139
+ /*button icon element(s) */
140
+ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
141
+ .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
142
+ .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
143
+ .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
144
+ .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
145
+
146
+ /*button sets*/
147
+ .ui-buttonset { margin-right: 7px; }
148
+ .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
149
+
150
+ /* workarounds */
151
+ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
152
+ /*
153
+ * jQuery UI Datepicker 1.8.14
154
+ *
155
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
156
+ * Dual licensed under the MIT or GPL Version 2 licenses.
157
+ * http://jquery.org/license
158
+ *
159
+ * http://docs.jquery.com/UI/Datepicker#theming
160
+ */
161
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
162
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
163
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
164
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
165
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
166
+ .ui-datepicker .ui-datepicker-next { right:2px; }
167
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
168
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
169
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
170
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
171
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
172
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
173
+ .ui-datepicker select.ui-datepicker-month,
174
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
175
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
176
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
177
+ .ui-datepicker td { border: 0; padding: 1px; }
178
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
179
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
180
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
181
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
182
+
183
+ /* with multiple calendars */
184
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
185
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
186
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
187
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
188
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
189
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
190
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
191
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
192
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
193
+ .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
194
+
195
+ /* RTL support */
196
+ .ui-datepicker-rtl { direction: rtl; }
197
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
198
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
199
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
200
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
201
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
202
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
203
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
204
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
205
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
206
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
207
+
208
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
209
+ .ui-datepicker-cover {
210
+ display: none; /*sorry for IE5*/
211
+ display/**/: block; /*sorry for IE5*/
212
+ position: absolute; /*must have*/
213
+ z-index: -1; /*must have*/
214
+ filter: mask(); /*must have*/
215
+ top: -4px; /*must have*/
216
+ left: -4px; /*must have*/
217
+ width: 200px; /*must have*/
218
+ height: 200px; /*must have*/
219
+ }/*
220
+ * jQuery UI Dialog 1.8.14
221
+ *
222
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
223
+ * Dual licensed under the MIT or GPL Version 2 licenses.
224
+ * http://jquery.org/license
225
+ *
226
+ * http://docs.jquery.com/UI/Dialog#theming
227
+ */
228
+ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
229
+ .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
230
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
231
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
232
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
233
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
234
+ .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
235
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
236
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
237
+ .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
238
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
239
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
240
+ /*
241
+ * jQuery UI Progressbar 1.8.14
242
+ *
243
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
244
+ * Dual licensed under the MIT or GPL Version 2 licenses.
245
+ * http://jquery.org/license
246
+ *
247
+ * http://docs.jquery.com/UI/Progressbar#theming
248
+ */
249
+ .ui-progressbar { height:2em; text-align: left; }
250
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
251
+ * jQuery UI Resizable 1.8.14
252
+ *
253
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
254
+ * Dual licensed under the MIT or GPL Version 2 licenses.
255
+ * http://jquery.org/license
256
+ *
257
+ * http://docs.jquery.com/UI/Resizable#theming
258
+ */
259
+ .ui-resizable { position: relative;}
260
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
261
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
262
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
263
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
264
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
265
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
266
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
267
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
268
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
269
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
270
+ * jQuery UI Selectable 1.8.14
271
+ *
272
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
273
+ * Dual licensed under the MIT or GPL Version 2 licenses.
274
+ * http://jquery.org/license
275
+ *
276
+ * http://docs.jquery.com/UI/Selectable#theming
277
+ */
278
+ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
279
+ /*
280
+ * jQuery UI Slider 1.8.14
281
+ *
282
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
283
+ * Dual licensed under the MIT or GPL Version 2 licenses.
284
+ * http://jquery.org/license
285
+ *
286
+ * http://docs.jquery.com/UI/Slider#theming
287
+ */
288
+ .ui-slider { position: relative; text-align: left; }
289
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
290
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
291
+
292
+ .ui-slider-horizontal { height: .8em; }
293
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
294
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
295
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
296
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
297
+
298
+ .ui-slider-vertical { width: .8em; height: 100px; }
299
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
300
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
301
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
302
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
303
+ * jQuery UI Tabs 1.8.14
304
+ *
305
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
306
+ * Dual licensed under the MIT or GPL Version 2 licenses.
307
+ * http://jquery.org/license
308
+ *
309
+ * http://docs.jquery.com/UI/Tabs#theming
310
+ */
311
+ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
312
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
313
+ .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
314
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
315
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
316
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
317
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
318
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
319
+ .ui-tabs .ui-tabs-hide { display: none !important; }
320
+ /*
321
+ * jQuery UI CSS Framework 1.8.14
322
+ *
323
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
324
+ * Dual licensed under the MIT or GPL Version 2 licenses.
325
+ * http://jquery.org/license
326
+ *
327
+ * http://docs.jquery.com/UI/Theming/API
328
+ *
329
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
330
+ */
331
+
332
+
333
+ /* Component containers
334
+ ----------------------------------*/
335
+ .ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
336
+ .ui-widget .ui-widget { font-size: 1em; }
337
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
338
+ .ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #949494/*{fcContent}*/; }
339
+ .ui-widget-content a { color: #949494/*{fcContent}*/; }
340
+ .ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #949494/*{fcHeader}*/; font-weight: bold; }
341
+ .ui-widget-header a { color: #222222/*{fcHeader}*/; }
342
+
343
+ /* Interaction states
344
+ ----------------------------------*/
345
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #7DB5D8/*{bgColorDefault}*/ /*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #fff/*{fcDefault}*/; }
346
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
347
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #7DB5D8/*{bgColorHover}*/ /*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #fff/*{fcHover}*/; }
348
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
349
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
350
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
351
+ .ui-widget :active { outline: none; }
352
+
353
+ /* Interaction Cues
354
+ ----------------------------------*/
355
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
356
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
357
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
358
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
359
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
360
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
361
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
362
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
363
+
364
+ /* Icons
365
+ ----------------------------------*/
366
+
367
+ /* states and images */
368
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
369
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
370
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
371
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
372
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
373
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
374
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
375
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
376
+
377
+ /* positioning */
378
+ .ui-icon-carat-1-n { background-position: 0 0; }
379
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
380
+ .ui-icon-carat-1-e { background-position: -32px 0; }
381
+ .ui-icon-carat-1-se { background-position: -48px 0; }
382
+ .ui-icon-carat-1-s { background-position: -64px 0; }
383
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
384
+ .ui-icon-carat-1-w { background-position: -96px 0; }
385
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
386
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
387
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
388
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
389
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
390
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
391
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
392
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
393
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
394
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
395
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
396
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
397
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
398
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
399
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
400
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
401
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
402
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
403
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
404
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
405
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
406
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
407
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
408
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
409
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
410
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
411
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
412
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
413
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
414
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
415
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
416
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
417
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
418
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
419
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
420
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
421
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
422
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
423
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
424
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
425
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
426
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
427
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
428
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
429
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
430
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
431
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
432
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
433
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
434
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
435
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
436
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
437
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
438
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
439
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
440
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
441
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
442
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
443
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
444
+ .ui-icon-extlink { background-position: -32px -80px; }
445
+ .ui-icon-newwin { background-position: -48px -80px; }
446
+ .ui-icon-refresh { background-position: -64px -80px; }
447
+ .ui-icon-shuffle { background-position: -80px -80px; }
448
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
449
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
450
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
451
+ .ui-icon-folder-open { background-position: -16px -96px; }
452
+ .ui-icon-document { background-position: -32px -96px; }
453
+ .ui-icon-document-b { background-position: -48px -96px; }
454
+ .ui-icon-note { background-position: -64px -96px; }
455
+ .ui-icon-mail-closed { background-position: -80px -96px; }
456
+ .ui-icon-mail-open { background-position: -96px -96px; }
457
+ .ui-icon-suitcase { background-position: -112px -96px; }
458
+ .ui-icon-comment { background-position: -128px -96px; }
459
+ .ui-icon-person { background-position: -144px -96px; }
460
+ .ui-icon-print { background-position: -160px -96px; }
461
+ .ui-icon-trash { background-position: -176px -96px; }
462
+ .ui-icon-locked { background-position: -192px -96px; }
463
+ .ui-icon-unlocked { background-position: -208px -96px; }
464
+ .ui-icon-bookmark { background-position: -224px -96px; }
465
+ .ui-icon-tag { background-position: -240px -96px; }
466
+ .ui-icon-home { background-position: 0 -112px; }
467
+ .ui-icon-flag { background-position: -16px -112px; }
468
+ .ui-icon-calendar { background-position: -32px -112px; }
469
+ .ui-icon-cart { background-position: -48px -112px; }
470
+ .ui-icon-pencil { background-position: -64px -112px; }
471
+ .ui-icon-clock { background-position: -80px -112px; }
472
+ .ui-icon-disk { background-position: -96px -112px; }
473
+ .ui-icon-calculator { background-position: -112px -112px; }
474
+ .ui-icon-zoomin { background-position: -128px -112px; }
475
+ .ui-icon-zoomout { background-position: -144px -112px; }
476
+ .ui-icon-search { background-position: -160px -112px; }
477
+ .ui-icon-wrench { background-position: -176px -112px; }
478
+ .ui-icon-gear { background-position: -192px -112px; }
479
+ .ui-icon-heart { background-position: -208px -112px; }
480
+ .ui-icon-star { background-position: -224px -112px; }
481
+ .ui-icon-link { background-position: -240px -112px; }
482
+ .ui-icon-cancel { background-position: 0 -128px; }
483
+ .ui-icon-plus { background-position: -16px -128px; }
484
+ .ui-icon-plusthick { background-position: -32px -128px; }
485
+ .ui-icon-minus { background-position: -48px -128px; }
486
+ .ui-icon-minusthick { background-position: -64px -128px; }
487
+ .ui-icon-close { background-position: -80px -128px; }
488
+ .ui-icon-closethick { background-position: -96px -128px; }
489
+ .ui-icon-key { background-position: -112px -128px; }
490
+ .ui-icon-lightbulb { background-position: -128px -128px; }
491
+ .ui-icon-scissors { background-position: -144px -128px; }
492
+ .ui-icon-clipboard { background-position: -160px -128px; }
493
+ .ui-icon-copy { background-position: -176px -128px; }
494
+ .ui-icon-contact { background-position: -192px -128px; }
495
+ .ui-icon-image { background-position: -208px -128px; }
496
+ .ui-icon-video { background-position: -224px -128px; }
497
+ .ui-icon-script { background-position: -240px -128px; }
498
+ .ui-icon-alert { background-position: 0 -144px; }
499
+ .ui-icon-info { background-position: -16px -144px; }
500
+ .ui-icon-notice { background-position: -32px -144px; }
501
+ .ui-icon-help { background-position: -48px -144px; }
502
+ .ui-icon-check { background-position: -64px -144px; }
503
+ .ui-icon-bullet { background-position: -80px -144px; }
504
+ .ui-icon-radio-off { background-position: -96px -144px; }
505
+ .ui-icon-radio-on { background-position: -112px -144px; }
506
+ .ui-icon-pin-w { background-position: -128px -144px; }
507
+ .ui-icon-pin-s { background-position: -144px -144px; }
508
+ .ui-icon-play { background-position: 0 -160px; }
509
+ .ui-icon-pause { background-position: -16px -160px; }
510
+ .ui-icon-seek-next { background-position: -32px -160px; }
511
+ .ui-icon-seek-prev { background-position: -48px -160px; }
512
+ .ui-icon-seek-end { background-position: -64px -160px; }
513
+ .ui-icon-seek-start { background-position: -80px -160px; }
514
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
515
+ .ui-icon-seek-first { background-position: -80px -160px; }
516
+ .ui-icon-stop { background-position: -96px -160px; }
517
+ .ui-icon-eject { background-position: -112px -160px; }
518
+ .ui-icon-volume-off { background-position: -128px -160px; }
519
+ .ui-icon-volume-on { background-position: -144px -160px; }
520
+ .ui-icon-power { background-position: 0 -176px; }
521
+ .ui-icon-signal-diag { background-position: -16px -176px; }
522
+ .ui-icon-signal { background-position: -32px -176px; }
523
+ .ui-icon-battery-0 { background-position: -48px -176px; }
524
+ .ui-icon-battery-1 { background-position: -64px -176px; }
525
+ .ui-icon-battery-2 { background-position: -80px -176px; }
526
+ .ui-icon-battery-3 { background-position: -96px -176px; }
527
+ .ui-icon-circle-plus { background-position: 0 -192px; }
528
+ .ui-icon-circle-minus { background-position: -16px -192px; }
529
+ .ui-icon-circle-close { background-position: -32px -192px; }
530
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
531
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
532
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
533
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
534
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
535
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
536
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
537
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
538
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
539
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
540
+ .ui-icon-circle-check { background-position: -208px -192px; }
541
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
542
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
543
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
544
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
545
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
546
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
547
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
548
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
549
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
550
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
551
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
552
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
553
+
554
+
555
+ /* Misc visuals
556
+ ----------------------------------*/
557
+
558
+ /* Corner radius */
559
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
560
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
561
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
562
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
563
+
564
+ /* Overlays */
565
+ .ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
566
  .ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
inc/css/jquery.datetimepicker.css CHANGED
@@ -1,418 +1,418 @@
1
- .xdsoft_datetimepicker{
2
- box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
3
- background: #FFFFFF;
4
- border-bottom: 1px solid #BBBBBB;
5
- border-left: 1px solid #CCCCCC;
6
- border-right: 1px solid #CCCCCC;
7
- border-top: 1px solid #CCCCCC;
8
- color: #333333;
9
- font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
10
- padding: 8px;
11
- padding-left: 0;
12
- padding-top: 2px;
13
- position: absolute;
14
- z-index: 9999;
15
- -moz-box-sizing: border-box;
16
- box-sizing: border-box;
17
- display:none;
18
- }
19
-
20
- .xdsoft_datetimepicker iframe {
21
- position: absolute;
22
- left: 0;
23
- top: 0;
24
- width: 75px;
25
- height: 210px;
26
- background: transparent;
27
- border:none;
28
- }
29
- /*For IE8 or lower*/
30
- .xdsoft_datetimepicker button {
31
- border:none !important;
32
- }
33
-
34
- .xdsoft_noselect{
35
- -webkit-touch-callout: none;
36
- -webkit-user-select: none;
37
- -khtml-user-select: none;
38
- -moz-user-select: none;
39
- -ms-user-select: none;
40
- -o-user-select: none;
41
- user-select: none;
42
- }
43
- .xdsoft_noselect::selection { background: transparent; }
44
- .xdsoft_noselect::-moz-selection { background: transparent; }
45
- .xdsoft_datetimepicker.xdsoft_inline{
46
- display: inline-block;
47
- position: static;
48
- box-shadow: none;
49
- }
50
- .xdsoft_datetimepicker *{
51
- -moz-box-sizing: border-box;
52
- box-sizing: border-box;
53
- padding: 0;
54
- margin: 0;
55
- }
56
- .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{
57
- display:none;
58
- }
59
- .xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{
60
- display:block;
61
- }
62
- .xdsoft_datetimepicker .xdsoft_datepicker{
63
- width: 224px;
64
- float:left;
65
- margin-left:8px;
66
- }
67
- .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
68
- width: 256px;
69
- }
70
- .xdsoft_datetimepicker .xdsoft_timepicker{
71
- width: 58px;
72
- float:left;
73
- text-align:center;
74
- margin-left:8px;
75
- margin-top: 0;
76
- }
77
- .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
78
- margin-top:8px;
79
- margin-bottom:3px
80
- }
81
- .xdsoft_datetimepicker .xdsoft_mounthpicker{
82
- position: relative;
83
- text-align: center;
84
- }
85
-
86
- .xdsoft_datetimepicker .xdsoft_label i,
87
- .xdsoft_datetimepicker .xdsoft_prev,
88
- .xdsoft_datetimepicker .xdsoft_next,
89
- .xdsoft_datetimepicker .xdsoft_today_button{
90
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
91
- }
92
-
93
- .xdsoft_datetimepicker .xdsoft_label i{
94
- opacity:0.5;
95
- background-position:-92px -19px;
96
- display: inline-block;
97
- width: 9px;
98
- height: 20px;
99
- vertical-align: middle;
100
- }
101
-
102
- .xdsoft_datetimepicker .xdsoft_prev{
103
- float: left;
104
- background-position:-20px 0;
105
- }
106
- .xdsoft_datetimepicker .xdsoft_today_button{
107
- float: left;
108
- background-position:-70px 0;
109
- margin-left:5px;
110
- }
111
-
112
- .xdsoft_datetimepicker .xdsoft_next{
113
- float: right;
114
- background-position: 0 0;
115
- }
116
-
117
- .xdsoft_datetimepicker .xdsoft_next,
118
- .xdsoft_datetimepicker .xdsoft_prev ,
119
- .xdsoft_datetimepicker .xdsoft_today_button{
120
- background-color: transparent;
121
- background-repeat: no-repeat;
122
- border: 0 none currentColor;
123
- cursor: pointer;
124
- display: block;
125
- height: 30px;
126
- opacity: 0.5;
127
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
128
- outline: medium none currentColor;
129
- overflow: hidden;
130
- padding: 0;
131
- position: relative;
132
- text-indent: 100%;
133
- white-space: nowrap;
134
- width: 20px;
135
- }
136
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
137
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{
138
- float:none;
139
- background-position:-40px -15px;
140
- height: 15px;
141
- width: 30px;
142
- display: block;
143
- margin-left:14px;
144
- margin-top:7px;
145
- }
146
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
147
- background-position:-40px 0;
148
- margin-bottom:7px;
149
- margin-top: 0;
150
- }
151
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
152
- height:151px;
153
- overflow:hidden;
154
- border-bottom:1px solid #DDDDDD;
155
- }
156
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
157
- background: #F5F5F5;
158
- border-top:1px solid #DDDDDD;
159
- color: #666666;
160
- font-size: 12px;
161
- text-align: center;
162
- border-collapse:collapse;
163
- cursor:pointer;
164
- border-bottom-width: 0;
165
- height:25px;
166
- line-height:25px;
167
- }
168
-
169
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{
170
- border-top-width: 0;
171
- }
172
- .xdsoft_datetimepicker .xdsoft_today_button:hover,
173
- .xdsoft_datetimepicker .xdsoft_next:hover,
174
- .xdsoft_datetimepicker .xdsoft_prev:hover {
175
- opacity: 1;
176
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
177
- }
178
- .xdsoft_datetimepicker .xdsoft_label{
179
- display: inline;
180
- position: relative;
181
- z-index: 9999;
182
- margin: 0;
183
- padding: 5px 3px;
184
- font-size: 14px;
185
- line-height: 20px;
186
- font-weight: bold;
187
- background-color: #fff;
188
- float:left;
189
- width:182px;
190
- text-align:center;
191
- cursor:pointer;
192
- }
193
- .xdsoft_datetimepicker .xdsoft_label:hover>span{
194
- text-decoration:underline;
195
- }
196
- .xdsoft_datetimepicker .xdsoft_label:hover i{
197
- opacity:1.0;
198
- }
199
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{
200
- border:1px solid #ccc;
201
- position:absolute;
202
- right: 0;
203
- top:30px;
204
- z-index:101;
205
- display:none;
206
- background:#fff;
207
- max-height:160px;
208
- overflow-y:hidden;
209
- }
210
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;}
211
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;}
212
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
213
- color: #fff;
214
- background: #ff8000;
215
- }
216
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
217
- padding:2px 10px 2px 5px;
218
- text-decoration:none !important;
219
- }
220
- .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
221
- background: #33AAFF;
222
- box-shadow: #178FE5 0 1px 3px 0 inset;
223
- color:#fff;
224
- font-weight: 700;
225
- }
226
- .xdsoft_datetimepicker .xdsoft_month{
227
- width:100px;
228
- text-align:right;
229
- }
230
- .xdsoft_datetimepicker .xdsoft_calendar{
231
- clear:both;
232
- }
233
- .xdsoft_datetimepicker .xdsoft_year{
234
- width: 48px;
235
- margin-left: 5px;
236
- }
237
- .xdsoft_datetimepicker .xdsoft_calendar table{
238
- border-collapse:collapse;
239
- width:100%;
240
-
241
- }
242
- .xdsoft_datetimepicker .xdsoft_calendar td > div{
243
- padding-right:5px;
244
- }
245
- .xdsoft_datetimepicker .xdsoft_calendar th{
246
- height: 25px;
247
- }
248
- .xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{
249
- width:14.2857142%;
250
- background: #F5F5F5;
251
- border:1px solid #DDDDDD;
252
- color: #666666;
253
- font-size: 12px;
254
- text-align: right;
255
- vertical-align: middle;
256
- padding: 0;
257
- border-collapse:collapse;
258
- cursor:pointer;
259
- height: 25px;
260
- }
261
- .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{
262
- width:12.5%;
263
- }
264
- .xdsoft_datetimepicker .xdsoft_calendar th{
265
- background: #F1F1F1;
266
- }
267
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{
268
- color:#33AAFF;
269
- }
270
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
271
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
272
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
273
- background: #33AAFF;
274
- box-shadow: #178FE5 0 1px 3px 0 inset;
275
- color:#fff;
276
- font-weight: 700;
277
- }
278
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
279
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
280
- .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{
281
- opacity:0.5;
282
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
283
- }
284
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
285
- opacity:0.2;
286
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
287
- }
288
- .xdsoft_datetimepicker .xdsoft_calendar td:hover,
289
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
290
- color: #fff !important;
291
- background: #ff8000 !important;
292
- box-shadow: none !important;
293
- }
294
- .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
295
- .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{
296
- color: inherit !important;
297
- background: inherit !important;
298
- box-shadow: inherit !important;
299
- }
300
- .xdsoft_datetimepicker .xdsoft_calendar th{
301
- font-weight: 700;
302
- text-align: center;
303
- color: #999;
304
- cursor:default;
305
- }
306
- .xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;}
307
- .xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;}
308
- .xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;}
309
-
310
-
311
- .xdsoft_time_box{
312
- position:relative;
313
- border:1px solid #ccc;
314
- }
315
- .xdsoft_scrollbar >.xdsoft_scroller{
316
- background:#ccc !important;
317
- height:20px;
318
- border-radius:3px;
319
- }
320
- .xdsoft_scrollbar{
321
- position:absolute;
322
- width:7px;
323
- right: 0;
324
- top: 0;
325
- bottom: 0;
326
- cursor:pointer;
327
- }
328
- .xdsoft_scroller_box{
329
- position:relative;
330
- }
331
-
332
-
333
- .xdsoft_datetimepicker.xdsoft_dark{
334
- box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
335
- background: #000000;
336
- border-bottom: 1px solid #444444;
337
- border-left: 1px solid #333333;
338
- border-right: 1px solid #333333;
339
- border-top: 1px solid #333333;
340
- color: #cccccc;
341
- }
342
-
343
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{
344
- border-bottom:1px solid #222222;
345
- }
346
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{
347
- background: #0a0a0a;
348
- border-top:1px solid #222222;
349
- color: #999999;
350
- }
351
-
352
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{
353
- background-color: #000;
354
- }
355
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{
356
- border:1px solid #333;
357
- background:#000;
358
- }
359
-
360
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
361
- color: #000;
362
- background: #007fff;
363
- }
364
-
365
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
366
- background: #cc5500;
367
- box-shadow: #b03e00 0 1px 3px 0 inset;
368
- color:#000;
369
- }
370
-
371
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
372
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
373
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
374
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{
375
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
376
- }
377
-
378
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
379
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
380
- background: #0a0a0a;
381
- border:1px solid #222222;
382
- color: #999999;
383
- }
384
-
385
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
386
- background: #0e0e0e;
387
- }
388
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{
389
- color:#cc5500;
390
- }
391
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
392
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
393
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
394
- background: #cc5500;
395
- box-shadow: #b03e00 0 1px 3px 0 inset;
396
- color:#000;
397
- }
398
-
399
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
400
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
401
- color: #000 !important;
402
- background: #007fff !important;
403
- }
404
-
405
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
406
- color: #666;
407
- }
408
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;}
409
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;}
410
- .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;}
411
-
412
-
413
- .xdsoft_dark .xdsoft_time_box{
414
- border:1px solid #333;
415
- }
416
- .xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{
417
- background:#333 !important;
418
- }
1
+ .xdsoft_datetimepicker{
2
+ box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
3
+ background: #FFFFFF;
4
+ border-bottom: 1px solid #BBBBBB;
5
+ border-left: 1px solid #CCCCCC;
6
+ border-right: 1px solid #CCCCCC;
7
+ border-top: 1px solid #CCCCCC;
8
+ color: #333333;
9
+ font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
10
+ padding: 8px;
11
+ padding-left: 0;
12
+ padding-top: 2px;
13
+ position: absolute;
14
+ z-index: 9999;
15
+ -moz-box-sizing: border-box;
16
+ box-sizing: border-box;
17
+ display:none;
18
+ }
19
+
20
+ .xdsoft_datetimepicker iframe {
21
+ position: absolute;
22
+ left: 0;
23
+ top: 0;
24
+ width: 75px;
25
+ height: 210px;
26
+ background: transparent;
27
+ border:none;
28
+ }
29
+ /*For IE8 or lower*/
30
+ .xdsoft_datetimepicker button {
31
+ border:none !important;
32
+ }
33
+
34
+ .xdsoft_noselect{
35
+ -webkit-touch-callout: none;
36
+ -webkit-user-select: none;
37
+ -khtml-user-select: none;
38
+ -moz-user-select: none;
39
+ -ms-user-select: none;
40
+ -o-user-select: none;
41
+ user-select: none;
42
+ }
43
+ .xdsoft_noselect::selection { background: transparent; }
44
+ .xdsoft_noselect::-moz-selection { background: transparent; }
45
+ .xdsoft_datetimepicker.xdsoft_inline{
46
+ display: inline-block;
47
+ position: static;
48
+ box-shadow: none;
49
+ }
50
+ .xdsoft_datetimepicker *{
51
+ -moz-box-sizing: border-box;
52
+ box-sizing: border-box;
53
+ padding: 0;
54
+ margin: 0;
55
+ }
56
+ .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{
57
+ display:none;
58
+ }
59
+ .xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{
60
+ display:block;
61
+ }
62
+ .xdsoft_datetimepicker .xdsoft_datepicker{
63
+ width: 224px;
64
+ float:left;
65
+ margin-left:8px;
66
+ }
67
+ .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
68
+ width: 256px;
69
+ }
70
+ .xdsoft_datetimepicker .xdsoft_timepicker{
71
+ width: 58px;
72
+ float:left;
73
+ text-align:center;
74
+ margin-left:8px;
75
+ margin-top: 0;
76
+ }
77
+ .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
78
+ margin-top:8px;
79
+ margin-bottom:3px
80
+ }
81
+ .xdsoft_datetimepicker .xdsoft_mounthpicker{
82
+ position: relative;
83
+ text-align: center;
84
+ }
85
+
86
+ .xdsoft_datetimepicker .xdsoft_label i,
87
+ .xdsoft_datetimepicker .xdsoft_prev,
88
+ .xdsoft_datetimepicker .xdsoft_next,
89
+ .xdsoft_datetimepicker .xdsoft_today_button{
90
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
91
+ }
92
+
93
+ .xdsoft_datetimepicker .xdsoft_label i{
94
+ opacity:0.5;
95
+ background-position:-92px -19px;
96
+ display: inline-block;
97
+ width: 9px;
98
+ height: 20px;
99
+ vertical-align: middle;
100
+ }
101
+
102
+ .xdsoft_datetimepicker .xdsoft_prev{
103
+ float: left;
104
+ background-position:-20px 0;
105
+ }
106
+ .xdsoft_datetimepicker .xdsoft_today_button{
107
+ float: left;
108
+ background-position:-70px 0;
109
+ margin-left:5px;
110
+ }
111
+
112
+ .xdsoft_datetimepicker .xdsoft_next{
113
+ float: right;
114
+ background-position: 0 0;
115
+ }
116
+
117
+ .xdsoft_datetimepicker .xdsoft_next,
118
+ .xdsoft_datetimepicker .xdsoft_prev ,
119
+ .xdsoft_datetimepicker .xdsoft_today_button{
120
+ background-color: transparent;
121
+ background-repeat: no-repeat;
122
+ border: 0 none currentColor;
123
+ cursor: pointer;
124
+ display: block;
125
+ height: 30px;
126
+ opacity: 0.5;
127
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
128
+ outline: medium none currentColor;
129
+ overflow: hidden;
130
+ padding: 0;
131
+ position: relative;
132
+ text-indent: 100%;
133
+ white-space: nowrap;
134
+ width: 20px;
135
+ }
136
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
137
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{
138
+ float:none;
139
+ background-position:-40px -15px;
140
+ height: 15px;
141
+ width: 30px;
142
+ display: block;
143
+ margin-left:14px;
144
+ margin-top:7px;
145
+ }
146
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
147
+ background-position:-40px 0;
148
+ margin-bottom:7px;
149
+ margin-top: 0;
150
+ }
151
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
152
+ height:151px;
153
+ overflow:hidden;
154
+ border-bottom:1px solid #DDDDDD;
155
+ }
156
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
157
+ background: #F5F5F5;
158
+ border-top:1px solid #DDDDDD;
159
+ color: #666666;
160
+ font-size: 12px;
161
+ text-align: center;
162
+ border-collapse:collapse;
163
+ cursor:pointer;
164
+ border-bottom-width: 0;
165
+ height:25px;
166
+ line-height:25px;
167
+ }
168
+
169
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{
170
+ border-top-width: 0;
171
+ }
172
+ .xdsoft_datetimepicker .xdsoft_today_button:hover,
173
+ .xdsoft_datetimepicker .xdsoft_next:hover,
174
+ .xdsoft_datetimepicker .xdsoft_prev:hover {
175
+ opacity: 1;
176
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
177
+ }
178
+ .xdsoft_datetimepicker .xdsoft_label{
179
+ display: inline;
180
+ position: relative;
181
+ z-index: 9999;
182
+ margin: 0;
183
+ padding: 5px 3px;
184
+ font-size: 14px;
185
+ line-height: 20px;
186
+ font-weight: bold;
187
+ background-color: #fff;
188
+ float:left;
189
+ width:182px;
190
+ text-align:center;
191
+ cursor:pointer;
192
+ }
193
+ .xdsoft_datetimepicker .xdsoft_label:hover>span{
194
+ text-decoration:underline;
195
+ }
196
+ .xdsoft_datetimepicker .xdsoft_label:hover i{
197
+ opacity:1.0;
198
+ }
199
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{
200
+ border:1px solid #ccc;
201
+ position:absolute;
202
+ right: 0;
203
+ top:30px;
204
+ z-index:101;
205
+ display:none;
206
+ background:#fff;
207
+ max-height:160px;
208
+ overflow-y:hidden;
209
+ }
210
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;}
211
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;}
212
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
213
+ color: #fff;
214
+ background: #ff8000;
215
+ }
216
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
217
+ padding:2px 10px 2px 5px;
218
+ text-decoration:none !important;
219
+ }
220
+ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
221
+ background: #33AAFF;
222
+ box-shadow: #178FE5 0 1px 3px 0 inset;
223
+ color:#fff;
224
+ font-weight: 700;
225
+ }
226
+ .xdsoft_datetimepicker .xdsoft_month{
227
+ width:100px;
228
+ text-align:right;
229
+ }
230
+ .xdsoft_datetimepicker .xdsoft_calendar{
231
+ clear:both;
232
+ }
233
+ .xdsoft_datetimepicker .xdsoft_year{
234
+ width: 48px;
235
+ margin-left: 5px;
236
+ }
237
+ .xdsoft_datetimepicker .xdsoft_calendar table{
238
+ border-collapse:collapse;
239
+ width:100%;
240
+
241
+ }
242
+ .xdsoft_datetimepicker .xdsoft_calendar td > div{
243
+ padding-right:5px;
244
+ }
245
+ .xdsoft_datetimepicker .xdsoft_calendar th{
246
+ height: 25px;
247
+ }
248
+ .xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{
249
+ width:14.2857142%;
250
+ background: #F5F5F5;
251
+ border:1px solid #DDDDDD;
252
+ color: #666666;
253
+ font-size: 12px;
254
+ text-align: right;
255
+ vertical-align: middle;
256
+ padding: 0;
257
+ border-collapse:collapse;
258
+ cursor:pointer;
259
+ height: 25px;
260
+ }
261
+ .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{
262
+ width:12.5%;
263
+ }
264
+ .xdsoft_datetimepicker .xdsoft_calendar th{
265
+ background: #F1F1F1;
266
+ }
267
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{
268
+ color:#33AAFF;
269
+ }
270
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
271
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
272
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
273
+ background: #33AAFF;
274
+ box-shadow: #178FE5 0 1px 3px 0 inset;
275
+ color:#fff;
276
+ font-weight: 700;
277
+ }
278
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
279
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
280
+ .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{
281
+ opacity:0.5;
282
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
283
+ }
284
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
285
+ opacity:0.2;
286
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
287
+ }
288
+ .xdsoft_datetimepicker .xdsoft_calendar td:hover,
289
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
290
+ color: #fff !important;
291
+ background: #ff8000 !important;
292
+ box-shadow: none !important;
293
+ }
294
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
295
+ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{
296
+ color: inherit !important;
297
+ background: inherit !important;
298
+ box-shadow: inherit !important;
299
+ }
300
+ .xdsoft_datetimepicker .xdsoft_calendar th{
301
+ font-weight: 700;
302
+ text-align: center;
303
+ color: #999;
304
+ cursor:default;
305
+ }
306
+ .xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;}
307
+ .xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;}
308
+ .xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;}
309
+
310
+
311
+ .xdsoft_time_box{
312
+ position:relative;
313
+ border:1px solid #ccc;
314
+ }
315
+ .xdsoft_scrollbar >.xdsoft_scroller{
316
+ background:#ccc !important;
317
+ height:20px;
318
+ border-radius:3px;
319
+ }
320
+ .xdsoft_scrollbar{
321
+ position:absolute;
322
+ width:7px;
323
+ right: 0;
324
+ top: 0;
325
+ bottom: 0;
326
+ cursor:pointer;
327
+ }
328
+ .xdsoft_scroller_box{
329
+ position:relative;
330
+ }
331
+
332
+
333
+ .xdsoft_datetimepicker.xdsoft_dark{
334
+ box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
335
+ background: #000000;
336
+ border-bottom: 1px solid #444444;
337
+ border-left: 1px solid #333333;
338
+ border-right: 1px solid #333333;
339
+ border-top: 1px solid #333333;
340
+ color: #cccccc;
341
+ }
342
+
343
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{
344
+ border-bottom:1px solid #222222;
345
+ }
346
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{
347
+ background: #0a0a0a;
348
+ border-top:1px solid #222222;
349
+ color: #999999;
350
+ }
351
+
352
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{
353
+ background-color: #000;
354
+ }
355
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{
356
+ border:1px solid #333;
357
+ background:#000;
358
+ }
359
+
360
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
361
+ color: #000;
362
+ background: #007fff;
363
+ }
364
+
365
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
366
+ background: #cc5500;
367
+ box-shadow: #b03e00 0 1px 3px 0 inset;
368
+ color:#000;
369
+ }
370
+
371
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
372
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
373
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
374
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{
375
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
376
+ }
377
+
378
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
379
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
380
+ background: #0a0a0a;
381
+ border:1px solid #222222;
382
+ color: #999999;
383
+ }
384
+
385
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
386
+ background: #0e0e0e;
387
+ }
388
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{
389
+ color:#cc5500;
390
+ }
391
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
392
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
393
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
394
+ background: #cc5500;
395
+ box-shadow: #b03e00 0 1px 3px 0 inset;
396
+ color:#000;
397
+ }
398
+
399
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
400
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
401
+ color: #000 !important;
402
+ background: #007fff !important;
403
+ }
404
+
405
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
406
+ color: #666;
407
+ }
408
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;}
409
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;}
410
+ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;}
411
+
412
+
413
+ .xdsoft_dark .xdsoft_time_box{
414
+ border:1px solid #333;
415
+ }
416
+ .xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{
417
+ background:#333 !important;
418
+ }
inc/js/StackBlur.js CHANGED
@@ -1,655 +1,655 @@
1
- /*
2
-
3
- StackBlur - a fast almost Gaussian Blur For Canvas
4
-
5
- Version: 0.5
6
- Author: Mario Klingemann
7
- Contact: mario@quasimondo.com
8
- Website: http://www.quasimondo.com/StackBlurForCanvas
9
- Twitter: @quasimondo
10
-
11
- In case you find this class useful - especially in commercial projects -
12
- I am not totally unhappy for a small donation to my PayPal account
13
- mario@quasimondo.de
14
-
15
- Or support me on flattr:
16
- https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
17
-
18
- Copyright (c) 2010 Mario Klingemann
19
-
20
- Permission is hereby granted, free of charge, to any person
21
- obtaining a copy of this software and associated documentation
22
- files (the "Software"), to deal in the Software without
23
- restriction, including without limitation the rights to use,
24
- copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- copies of the Software, and to permit persons to whom the
26
- Software is furnished to do so, subject to the following
27
- conditions:
28
-
29
- The above copyright notice and this permission notice shall be
30
- included in all copies or substantial portions of the Software.
31
-
32
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39
- OTHER DEALINGS IN THE SOFTWARE.
40
- */
41
-
42
- (function ( global ) {
43
-
44
- var mul_table = [
45
- 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
46
- 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
47
- 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
48
- 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
49
- 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
50
- 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
51
- 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
52
- 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
53
- 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
54
- 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
55
- 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
56
- 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
57
- 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
58
- 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
59
- 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
60
- 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
61
-
62
-
63
- var shg_table = [
64
- 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
65
- 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
66
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
67
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
68
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
69
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
70
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
71
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
72
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
73
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
74
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
75
- 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
76
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
77
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
78
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
79
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
80
-
81
- function premultiplyAlpha(imageData)
82
- {
83
- var pixels = imageData.data;
84
- var size = imageData.width * imageData.height * 4;
85
-
86
- for (var i=0; i<size; i+=4)
87
- {
88
- var a = pixels[i+3] / 255;
89
- pixels[i ] *= a;
90
- pixels[i+1] *= a;
91
- pixels[i+2] *= a;
92
- }
93
- }
94
-
95
- function unpremultiplyAlpha(imageData)
96
- {
97
- var pixels = imageData.data;
98
- var size = imageData.width * imageData.height * 4;
99
-
100
- for (var i=0; i<size; i+=4)
101
- {
102
- var a = pixels[i+3];
103
- if (a != 0)
104
- {
105
- a = 255 / a;
106
- pixels[i ] *= a;
107
- pixels[i+1] *= a;
108
- pixels[i+2] *= a;
109
- }
110
- }
111
- }
112
-
113
- function stackBlurImage( imageID, canvasID, radius, blurAlphaChannel )
114
- {
115
-
116
- var img = document.getElementById( imageID );
117
- var w = img.naturalWidth;
118
- var h = img.naturalHeight;
119
-
120
- var canvas = document.getElementById( canvasID );
121
-
122
- canvas.style.width = w + "px";
123
- canvas.style.height = h + "px";
124
- canvas.width = w;
125
- canvas.height = h;
126
-
127
- var context = canvas.getContext("2d");
128
- context.clearRect( 0, 0, w, h );
129
- context.drawImage( img, 0, 0 );
130
-
131
- if ( isNaN(radius) || radius < 1 ) return;
132
-
133
- if ( blurAlphaChannel )
134
- stackBlurCanvasRGBA( canvasID, 0, 0, w, h, radius );
135
- else
136
- stackBlurCanvasRGB( canvasID, 0, 0, w, h, radius );
137
- }
138
-
139
-
140
- function stackBlurCanvasRGBA( id, top_x, top_y, width, height, radius )
141
- {
142
- if ( isNaN(radius) || radius < 1 ) return;
143
- radius |= 0;
144
-
145
- var canvas = document.getElementById( id );
146
- var context = canvas.getContext("2d");
147
- var imageData;
148
-
149
- try {
150
- try {
151
- imageData = context.getImageData( top_x, top_y, width, height );
152
- } catch(e) {
153
-
154
- // NOTE: this part is supposedly only needed if you want to work with local files
155
- // so it might be okay to remove the whole try/catch block and just use
156
- // imageData = context.getImageData( top_x, top_y, width, height );
157
- try {
158
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
159
- imageData = context.getImageData( top_x, top_y, width, height );
160
- } catch(e) {
161
- alert("Cannot access local image");
162
- throw new Error("unable to access local image data: " + e);
163
- return;
164
- }
165
- }
166
- } catch(e) {
167
- alert("Cannot access image");
168
- throw new Error("unable to access image data: " + e);
169
- }
170
-
171
- premultiplyAlpha(imageData);
172
-
173
- var pixels = imageData.data;
174
-
175
- var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,
176
- r_out_sum, g_out_sum, b_out_sum, a_out_sum,
177
- r_in_sum, g_in_sum, b_in_sum, a_in_sum,
178
- pr, pg, pb, pa, rbs;
179
-
180
- var div = radius + radius + 1;
181
- var w4 = width << 2;
182
- var widthMinus1 = width - 1;
183
- var heightMinus1 = height - 1;
184
- var radiusPlus1 = radius + 1;
185
- var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2;
186
-
187
- var stackStart = new BlurStack();
188
- var stack = stackStart;
189
- for ( i = 1; i < div; i++ )
190
- {
191
- stack = stack.next = new BlurStack();
192
- if ( i == radiusPlus1 ) var stackEnd = stack;
193
- }
194
- stack.next = stackStart;
195
- var stackIn = null;
196
- var stackOut = null;
197
-
198
- yw = yi = 0;
199
-
200
- var mul_sum = mul_table[radius];
201
- var shg_sum = shg_table[radius];
202
-
203
- for ( y = 0; y < height; y++ )
204
- {
205
- r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
206
-
207
- r_out_sum = radiusPlus1 * ( pr = pixels[yi] );
208
- g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );
209
- b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );
210
- a_out_sum = radiusPlus1 * ( pa = pixels[yi+3] );
211
-
212
- r_sum += sumFactor * pr;
213
- g_sum += sumFactor * pg;
214
- b_sum += sumFactor * pb;
215
- a_sum += sumFactor * pa;
216
-
217
- stack = stackStart;
218
-
219
- for( i = 0; i < radiusPlus1; i++ )
220
- {
221
- stack.r = pr;
222
- stack.g = pg;
223
- stack.b = pb;
224
- stack.a = pa;
225
- stack = stack.next;
226
- }
227
-
228
- for( i = 1; i < radiusPlus1; i++ )
229
- {
230
- p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );
231
- r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );
232
- g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;
233
- b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;
234
- a_sum += ( stack.a = ( pa = pixels[p+3])) * rbs;
235
-
236
- r_in_sum += pr;
237
- g_in_sum += pg;
238
- b_in_sum += pb;
239
- a_in_sum += pa;
240
-
241
- stack = stack.next;
242
- }
243
-
244
- stackIn = stackStart;
245
- stackOut = stackEnd;
246
- for ( x = 0; x < width; x++ )
247
- {
248
- pixels[yi] = (r_sum * mul_sum) >> shg_sum;
249
- pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
250
- pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
251
- pixels[yi+3] = (a_sum * mul_sum) >> shg_sum;
252
-
253
- r_sum -= r_out_sum;
254
- g_sum -= g_out_sum;
255
- b_sum -= b_out_sum;
256
- a_sum -= a_out_sum;
257
-
258
- r_out_sum -= stackIn.r;
259
- g_out_sum -= stackIn.g;
260
- b_out_sum -= stackIn.b;
261
- a_out_sum -= stackIn.a;
262
-
263
- p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;
264
-
265
- r_in_sum += ( stackIn.r = pixels[p]);
266
- g_in_sum += ( stackIn.g = pixels[p+1]);
267
- b_in_sum += ( stackIn.b = pixels[p+2]);
268
- a_in_sum += ( stackIn.a = pixels[p+3]);
269
-
270
- r_sum += r_in_sum;
271
- g_sum += g_in_sum;
272
- b_sum += b_in_sum;
273
- a_sum += a_in_sum;
274
-
275
- stackIn = stackIn.next;
276
-
277
- r_out_sum += ( pr = stackOut.r );
278
- g_out_sum += ( pg = stackOut.g );
279
- b_out_sum += ( pb = stackOut.b );
280
- a_out_sum += ( pa = stackOut.a );
281
-
282
- r_in_sum -= pr;
283
- g_in_sum -= pg;
284
- b_in_sum -= pb;
285
- a_in_sum -= pa;
286
-
287
- stackOut = stackOut.next;
288
-
289
- yi += 4;
290
- }
291
- yw += width;
292
- }
293
-
294
-
295
- for ( x = 0; x < width; x++ )
296
- {
297
- g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
298
-
299
- yi = x << 2;
300
- r_out_sum = radiusPlus1 * ( pr = pixels[yi]);
301
- g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);
302
- b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);
303
- a_out_sum = radiusPlus1 * ( pa = pixels[yi+3]);
304
-
305
- r_sum += sumFactor * pr;
306
- g_sum += sumFactor * pg;
307
- b_sum += sumFactor * pb;
308
- a_sum += sumFactor * pa;
309
-
310
- stack = stackStart;
311
-
312
- for( i = 0; i < radiusPlus1; i++ )
313
- {
314
- stack.r = pr;
315
- stack.g = pg;
316
- stack.b = pb;
317
- stack.a = pa;
318
- stack = stack.next;
319
- }
320
-
321
- yp = width;
322
-
323
- for( i = 1; i <= radius; i++ )
324
- {
325
- yi = ( yp + x ) << 2;
326
-
327
- r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );
328
- g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;
329
- b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;
330
- a_sum += ( stack.a = ( pa = pixels[yi+3])) * rbs;
331
-
332
- r_in_sum += pr;
333
- g_in_sum += pg;
334
- b_in_sum += pb;
335
- a_in_sum += pa;
336
-
337
- stack = stack.next;
338
-
339
- if( i < heightMinus1 )
340
- {
341
- yp += width;
342
- }
343
- }
344
-
345
- yi = x;
346
- stackIn = stackStart;
347
- stackOut = stackEnd;
348
- for ( y = 0; y < height; y++ )
349
- {
350
- p = yi << 2;
351
- pixels[p] = (r_sum * mul_sum) >> shg_sum;
352
- pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
353
- pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
354
- pixels[p+3] = (a_sum * mul_sum) >> shg_sum;
355
-
356
- r_sum -= r_out_sum;
357
- g_sum -= g_out_sum;
358
- b_sum -= b_out_sum;
359
- a_sum -= a_out_sum;
360
-
361
- r_out_sum -= stackIn.r;
362
- g_out_sum -= stackIn.g;
363
- b_out_sum -= stackIn.b;
364
- a_out_sum -= stackIn.a;
365
-
366
- p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;
367
-
368
- r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));
369
- g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));
370
- b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));
371
- a_sum += ( a_in_sum += ( stackIn.a = pixels[p+3]));
372
-
373
- stackIn = stackIn.next;
374
-
375
- r_out_sum += ( pr = stackOut.r );
376
- g_out_sum += ( pg = stackOut.g );
377
- b_out_sum += ( pb = stackOut.b );
378
- a_out_sum += ( pa = stackOut.a );
379
-
380
- r_in_sum -= pr;
381
- g_in_sum -= pg;
382
- b_in_sum -= pb;
383
- a_in_sum -= pa;
384
-
385
- stackOut = stackOut.next;
386
-
387
- yi += width;
388
- }
389
- }
390
-
391
- unpremultiplyAlpha(imageData);
392
-
393
- context.putImageData( imageData, top_x, top_y );
394
- }
395
-
396
-
397
- function stackBlurCanvasRGB( id, top_x, top_y, width, height, radius )
398
- {
399
- if ( isNaN(radius) || radius < 1 ) return;
400
- radius |= 0;
401
-
402
- var canvas = document.getElementById( id );
403
- var context = canvas.getContext("2d");
404
- var imageData;
405
-
406
- try {
407
- try {
408
- imageData = context.getImageData( top_x, top_y, width, height );
409
- } catch(e) {
410
-
411
- // NOTE: this part is supposedly only needed if you want to work with local files
412
- // so it might be okay to remove the whole try/catch block and just use
413
- // imageData = context.getImageData( top_x, top_y, width, height );
414
- try {
415
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
416
- imageData = context.getImageData( top_x, top_y, width, height );
417
- } catch(e) {
418
- alert("Cannot access local image");
419
- throw new Error("unable to access local image data: " + e);
420
- return;
421
- }
422
- }
423
- } catch(e) {
424
- alert("Cannot access image");
425
- throw new Error("unable to access image data: " + e);
426
- }
427
-
428
- var pixels = imageData.data;
429
-
430
- var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
431
- r_out_sum, g_out_sum, b_out_sum,
432
- r_in_sum, g_in_sum, b_in_sum,
433
- pr, pg, pb, rbs;
434
-
435
- var div = radius + radius + 1;
436
- var w4 = width << 2;
437
- var widthMinus1 = width - 1;
438
- var heightMinus1 = height - 1;
439
- var radiusPlus1 = radius + 1;
440
- var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2;
441
-
442
- var stackStart = new BlurStack();
443
- var stack = stackStart;
444
- for ( i = 1; i < div; i++ )
445
- {
446
- stack = stack.next = new BlurStack();
447
- if ( i == radiusPlus1 ) var stackEnd = stack;
448
- }
449
- stack.next = stackStart;
450
- var stackIn = null;
451
- var stackOut = null;
452
-
453
- yw = yi = 0;
454
-
455
- var mul_sum = mul_table[radius];
456
- var shg_sum = shg_table[radius];
457
-
458
- for ( y = 0; y < height; y++ )
459
- {
460
- r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
461
-
462
- r_out_sum = radiusPlus1 * ( pr = pixels[yi] );
463
- g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );
464
- b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );
465
-
466
- r_sum += sumFactor * pr;
467
- g_sum += sumFactor * pg;
468
- b_sum += sumFactor * pb;
469
-
470
- stack = stackStart;
471
-
472
- for( i = 0; i < radiusPlus1; i++ )
473
- {
474
- stack.r = pr;
475
- stack.g = pg;
476
- stack.b = pb;
477
- stack = stack.next;
478
- }
479
-
480
- for( i = 1; i < radiusPlus1; i++ )
481
- {
482
- p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );
483
- r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );
484
- g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;
485
- b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;
486
-
487
- r_in_sum += pr;
488
- g_in_sum += pg;
489
- b_in_sum += pb;
490
-
491
- stack = stack.next;
492
- }
493
-
494
-
495
- stackIn = stackStart;
496
- stackOut = stackEnd;
497
- for ( x = 0; x < width; x++ )
498
- {
499
- pixels[yi] = (r_sum * mul_sum) >> shg_sum;
500
- pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
501
- pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
502
-
503
- r_sum -= r_out_sum;
504
- g_sum -= g_out_sum;
505
- b_sum -= b_out_sum;
506
-
507
- r_out_sum -= stackIn.r;
508
- g_out_sum -= stackIn.g;
509
- b_out_sum -= stackIn.b;
510
-
511
- p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;
512
-
513
- r_in_sum += ( stackIn.r = pixels[p]);
514
- g_in_sum += ( stackIn.g = pixels[p+1]);
515
- b_in_sum += ( stackIn.b = pixels[p+2]);
516
-
517
- r_sum += r_in_sum;
518
- g_sum += g_in_sum;
519
- b_sum += b_in_sum;
520
-
521
- stackIn = stackIn.next;
522
-
523
- r_out_sum += ( pr = stackOut.r );
524
- g_out_sum += ( pg = stackOut.g );
525
- b_out_sum += ( pb = stackOut.b );
526
-
527
- r_in_sum -= pr;
528
- g_in_sum -= pg;
529
- b_in_sum -= pb;
530
-
531
- stackOut = stackOut.next;
532
-
533
- yi += 4;
534
- }
535
- yw += width;
536
- }
537
-
538
-
539
- for ( x = 0; x < width; x++ )
540
- {
541
- g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
542
-
543
- yi = x << 2;
544
- r_out_sum = radiusPlus1 * ( pr = pixels[yi]);
545
- g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);
546
- b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);
547
-
548
- r_sum += sumFactor * pr;
549
- g_sum += sumFactor * pg;
550
- b_sum += sumFactor * pb;
551
-
552
- stack = stackStart;
553
-
554
- for( i = 0; i < radiusPlus1; i++ )
555
- {
556
- stack.r = pr;
557
- stack.g = pg;
558
- stack.b = pb;
559
- stack = stack.next;
560
- }
561
-
562
- yp = width;
563
-
564
- for( i = 1; i <= radius; i++ )
565
- {
566
- yi = ( yp + x ) << 2;
567
-
568
- r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );
569
- g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;
570
- b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;
571
-
572
- r_in_sum += pr;
573
- g_in_sum += pg;
574
- b_in_sum += pb;
575
-
576
- stack = stack.next;
577
-
578
- if( i < heightMinus1 )
579
- {
580
- yp += width;
581
- }
582
- }
583
-
584
- yi = x;
585
- stackIn = stackStart;
586
- stackOut = stackEnd;
587
- for ( y = 0; y < height; y++ )
588
- {
589
- p = yi << 2;
590
- pixels[p] = (r_sum * mul_sum) >> shg_sum;
591
- pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
592
- pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
593
-
594
- r_sum -= r_out_sum;
595
- g_sum -= g_out_sum;
596
- b_sum -= b_out_sum;
597
-
598
- r_out_sum -= stackIn.r;
599
- g_out_sum -= stackIn.g;
600
- b_out_sum -= stackIn.b;
601
-
602
- p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;
603
-
604
- r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));
605
- g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));
606
- b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));
607
-
608
- stackIn = stackIn.next;
609
-
610
- r_out_sum += ( pr = stackOut.r );
611
- g_out_sum += ( pg = stackOut.g );
612
- b_out_sum += ( pb = stackOut.b );
613
-
614
- r_in_sum -= pr;
615
- g_in_sum -= pg;
616
- b_in_sum -= pb;
617
-
618
- stackOut = stackOut.next;
619
-
620
- yi += width;
621
- }
622
- }
623
-
624
- context.putImageData( imageData, top_x, top_y );
625
-
626
- }
627
-
628
- function BlurStack()
629
- {
630
- this.r = 0;
631
- this.g = 0;
632
- this.b = 0;
633
- this.a = 0;
634
- this.next = null;
635
- }
636
-
637
- var stackBlur = {
638
- image: stackBlurImage,
639
- canvasRGBA: stackBlurCanvasRGBA,
640
- canvasRGB: stackBlurCanvasRGB
641
- };
642
-
643
- // export as AMD...
644
- if ( typeof define !== 'undefined' && define.amd ) {
645
- define( function () { return stackBlur; });
646
- }
647
-
648
- // ...or as browserify
649
- else if ( typeof module !== 'undefined' && module.exports ) {
650
- module.exports = stackBlur;
651
- }
652
-
653
- global.stackBlur = stackBlur;
654
-
655
  }( typeof window !== 'undefined' ? window : this ));
1
+ /*
2
+
3
+ StackBlur - a fast almost Gaussian Blur For Canvas
4
+
5
+ Version: 0.5
6
+ Author: Mario Klingemann
7
+ Contact: mario@quasimondo.com
8
+ Website: http://www.quasimondo.com/StackBlurForCanvas
9
+ Twitter: @quasimondo
10
+
11
+ In case you find this class useful - especially in commercial projects -
12
+ I am not totally unhappy for a small donation to my PayPal account
13
+ mario@quasimondo.de
14
+
15
+ Or support me on flattr:
16
+ https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
17
+
18
+ Copyright (c) 2010 Mario Klingemann
19
+
20
+ Permission is hereby granted, free of charge, to any person
21
+ obtaining a copy of this software and associated documentation
22
+ files (the "Software"), to deal in the Software without
23
+ restriction, including without limitation the rights to use,
24
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
25
+ copies of the Software, and to permit persons to whom the
26
+ Software is furnished to do so, subject to the following
27
+ conditions:
28
+
29
+ The above copyright notice and this permission notice shall be
30
+ included in all copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39
+ OTHER DEALINGS IN THE SOFTWARE.
40
+ */
41
+
42
+ (function ( global ) {
43
+
44
+ var mul_table = [
45
+ 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
46
+ 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
47
+ 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
48
+ 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
49
+ 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
50
+ 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
51
+ 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
52
+ 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
53
+ 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
54
+ 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
55
+ 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
56
+ 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
57
+ 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
58
+ 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
59
+ 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
60
+ 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
61
+
62
+
63
+ var shg_table = [
64
+ 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
65
+ 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
66
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
67
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
68
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
69
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
70
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
71
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
72
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
73
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
74
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
75
+ 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
76
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
77
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
78
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
79
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
80
+
81
+ function premultiplyAlpha(imageData)
82
+ {
83
+ var pixels = imageData.data;
84
+ var size = imageData.width * imageData.height * 4;
85
+
86
+ for (var i=0; i<size; i+=4)
87
+ {
88
+ var a = pixels[i+3] / 255;
89
+ pixels[i ] *= a;
90
+ pixels[i+1] *= a;
91
+ pixels[i+2] *= a;
92
+ }
93
+ }
94
+
95
+ function unpremultiplyAlpha(imageData)
96
+ {
97
+ var pixels = imageData.data;
98
+ var size = imageData.width * imageData.height * 4;
99
+
100
+ for (var i=0; i<size; i+=4)
101
+ {
102
+ var a = pixels[i+3];
103
+ if (a != 0)
104
+ {
105
+ a = 255 / a;
106
+ pixels[i ] *= a;
107
+ pixels[i+1] *= a;
108
+ pixels[i+2] *= a;
109
+ }
110
+ }
111
+ }
112
+
113
+ function stackBlurImage( imageID, canvasID, radius, blurAlphaChannel )
114
+ {
115
+
116
+ var img = document.getElementById( imageID );
117
+ var w = img.naturalWidth;
118
+ var h = img.naturalHeight;
119
+
120
+ var canvas = document.getElementById( canvasID );
121
+
122
+ canvas.style.width = w + "px";
123
+ canvas.style.height = h + "px";
124
+ canvas.width = w;
125
+ canvas.height = h;
126
+
127
+ var context = canvas.getContext("2d");
128
+ context.clearRect( 0, 0, w, h );
129
+ context.drawImage( img, 0, 0 );
130
+
131
+ if ( isNaN(radius) || radius < 1 ) return;
132
+
133
+ if ( blurAlphaChannel )
134
+ stackBlurCanvasRGBA( canvasID, 0, 0, w, h, radius );
135
+ else
136
+ stackBlurCanvasRGB( canvasID, 0, 0, w, h, radius );
137
+ }
138
+
139
+
140
+ function stackBlurCanvasRGBA( id, top_x, top_y, width, height, radius )
141
+ {
142
+ if ( isNaN(radius) || radius < 1 ) return;
143
+ radius |= 0;
144
+
145
+ var canvas = document.getElementById( id );
146
+ var context = canvas.getContext("2d");
147
+ var imageData;
148
+
149
+ try {
150
+ try {
151
+ imageData = context.getImageData( top_x, top_y, width, height );
152
+ } catch(e) {
153
+
154
+ // NOTE: this part is supposedly only needed if you want to work with local files
155
+ // so it might be okay to remove the whole try/catch block and just use
156
+ // imageData = context.getImageData( top_x, top_y, width, height );
157
+ try {
158
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
159
+ imageData = context.getImageData( top_x, top_y, width, height );
160
+ } catch(e) {
161
+ alert("Cannot access local image");
162
+ throw new Error("unable to access local image data: " + e);
163
+ return;
164
+ }
165
+ }
166
+ } catch(e) {
167
+ alert("Cannot access image");
168
+ throw new Error("unable to access image data: " + e);
169
+ }
170
+
171
+ premultiplyAlpha(imageData);
172
+
173
+ var pixels = imageData.data;
174
+
175
+ var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,
176
+ r_out_sum, g_out_sum, b_out_sum, a_out_sum,
177
+ r_in_sum, g_in_sum, b_in_sum, a_in_sum,
178
+ pr, pg, pb, pa, rbs;
179
+
180
+ var div = radius + radius + 1;
181
+ var w4 = width << 2;
182
+ var widthMinus1 = width - 1;
183
+ var heightMinus1 = height - 1;
184
+ var radiusPlus1 = radius + 1;
185
+ var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2;
186
+
187
+ var stackStart = new BlurStack();
188
+ var stack = stackStart;
189
+ for ( i = 1; i < div; i++ )
190
+ {
191
+ stack = stack.next = new BlurStack();
192
+ if ( i == radiusPlus1 ) var stackEnd = stack;
193
+ }
194
+ stack.next = stackStart;
195
+ var stackIn = null;
196
+ var stackOut = null;
197
+
198
+ yw = yi = 0;
199
+
200
+ var mul_sum = mul_table[radius];
201
+ var shg_sum = shg_table[radius];
202
+
203
+ for ( y = 0; y < height; y++ )
204
+ {
205
+ r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
206
+
207
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi] );
208
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );
209
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );
210
+ a_out_sum = radiusPlus1 * ( pa = pixels[yi+3] );
211
+
212
+ r_sum += sumFactor * pr;
213
+ g_sum += sumFactor * pg;
214
+ b_sum += sumFactor * pb;
215
+ a_sum += sumFactor * pa;
216
+
217
+ stack = stackStart;
218
+
219
+ for( i = 0; i < radiusPlus1; i++ )
220
+ {
221
+ stack.r = pr;
222
+ stack.g = pg;
223
+ stack.b = pb;
224
+ stack.a = pa;
225
+ stack = stack.next;
226
+ }
227
+
228
+ for( i = 1; i < radiusPlus1; i++ )
229
+ {
230
+ p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );
231
+ r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );
232
+ g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;
233
+ b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;
234
+ a_sum += ( stack.a = ( pa = pixels[p+3])) * rbs;
235
+
236
+ r_in_sum += pr;
237
+ g_in_sum += pg;
238
+ b_in_sum += pb;
239
+ a_in_sum += pa;
240
+
241
+ stack = stack.next;
242
+ }
243
+
244
+ stackIn = stackStart;
245
+ stackOut = stackEnd;
246
+ for ( x = 0; x < width; x++ )
247
+ {
248
+ pixels[yi] = (r_sum * mul_sum) >> shg_sum;
249
+ pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
250
+ pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
251
+ pixels[yi+3] = (a_sum * mul_sum) >> shg_sum;
252
+
253
+ r_sum -= r_out_sum;
254
+ g_sum -= g_out_sum;
255
+ b_sum -= b_out_sum;
256
+ a_sum -= a_out_sum;
257
+
258
+ r_out_sum -= stackIn.r;
259
+ g_out_sum -= stackIn.g;
260
+ b_out_sum -= stackIn.b;
261
+ a_out_sum -= stackIn.a;
262
+
263
+ p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;
264
+
265
+ r_in_sum += ( stackIn.r = pixels[p]);
266
+ g_in_sum += ( stackIn.g = pixels[p+1]);
267
+ b_in_sum += ( stackIn.b = pixels[p+2]);
268
+ a_in_sum += ( stackIn.a = pixels[p+3]);
269
+
270
+ r_sum += r_in_sum;
271
+ g_sum += g_in_sum;
272
+ b_sum += b_in_sum;
273
+ a_sum += a_in_sum;
274
+
275
+ stackIn = stackIn.next;
276
+
277
+ r_out_sum += ( pr = stackOut.r );
278
+ g_out_sum += ( pg = stackOut.g );
279
+ b_out_sum += ( pb = stackOut.b );
280
+ a_out_sum += ( pa = stackOut.a );
281
+
282
+ r_in_sum -= pr;
283
+ g_in_sum -= pg;
284
+ b_in_sum -= pb;
285
+ a_in_sum -= pa;
286
+
287
+ stackOut = stackOut.next;
288
+
289
+ yi += 4;
290
+ }
291
+ yw += width;
292
+ }
293
+
294
+
295
+ for ( x = 0; x < width; x++ )
296
+ {
297
+ g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
298
+
299
+ yi = x << 2;
300
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi]);
301
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);
302
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);
303
+ a_out_sum = radiusPlus1 * ( pa = pixels[yi+3]);
304
+
305
+ r_sum += sumFactor * pr;
306
+ g_sum += sumFactor * pg;
307
+ b_sum += sumFactor * pb;
308
+ a_sum += sumFactor * pa;
309
+
310
+ stack = stackStart;
311
+
312
+ for( i = 0; i < radiusPlus1; i++ )
313
+ {
314
+ stack.r = pr;
315
+ stack.g = pg;
316
+ stack.b = pb;
317
+ stack.a = pa;
318
+ stack = stack.next;
319
+ }
320
+
321
+ yp = width;
322
+
323
+ for( i = 1; i <= radius; i++ )
324
+ {
325
+ yi = ( yp + x ) << 2;
326
+
327
+ r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );
328
+ g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;
329
+ b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;
330
+ a_sum += ( stack.a = ( pa = pixels[yi+3])) * rbs;
331
+
332
+ r_in_sum += pr;
333
+ g_in_sum += pg;
334
+ b_in_sum += pb;
335
+ a_in_sum += pa;
336
+
337
+ stack = stack.next;
338
+
339
+ if( i < heightMinus1 )
340
+ {
341
+ yp += width;
342
+ }
343
+ }
344
+
345
+ yi = x;
346
+ stackIn = stackStart;
347
+ stackOut = stackEnd;
348
+ for ( y = 0; y < height; y++ )
349
+ {
350
+ p = yi << 2;
351
+ pixels[p] = (r_sum * mul_sum) >> shg_sum;
352
+ pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
353
+ pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
354
+ pixels[p+3] = (a_sum * mul_sum) >> shg_sum;
355
+
356
+ r_sum -= r_out_sum;
357
+ g_sum -= g_out_sum;
358
+ b_sum -= b_out_sum;
359
+ a_sum -= a_out_sum;
360
+
361
+ r_out_sum -= stackIn.r;
362
+ g_out_sum -= stackIn.g;
363
+ b_out_sum -= stackIn.b;
364
+ a_out_sum -= stackIn.a;
365
+
366
+ p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;
367
+
368
+ r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));
369
+ g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));
370
+ b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));
371
+ a_sum += ( a_in_sum += ( stackIn.a = pixels[p+3]));
372
+
373
+ stackIn = stackIn.next;
374
+
375
+ r_out_sum += ( pr = stackOut.r );
376
+ g_out_sum += ( pg = stackOut.g );
377
+ b_out_sum += ( pb = stackOut.b );
378
+ a_out_sum += ( pa = stackOut.a );
379
+
380
+ r_in_sum -= pr;
381
+ g_in_sum -= pg;
382
+ b_in_sum -= pb;
383
+ a_in_sum -= pa;
384
+
385
+ stackOut = stackOut.next;
386
+
387
+ yi += width;
388
+ }
389
+ }
390
+
391
+ unpremultiplyAlpha(imageData);
392
+
393
+ context.putImageData( imageData, top_x, top_y );
394
+ }
395
+
396
+
397
+ function stackBlurCanvasRGB( id, top_x, top_y, width, height, radius )
398
+ {
399
+ if ( isNaN(radius) || radius < 1 ) return;
400
+ radius |= 0;
401
+
402
+ var canvas = document.getElementById( id );
403
+ var context = canvas.getContext("2d");
404
+ var imageData;
405
+
406
+ try {
407
+ try {
408
+ imageData = context.getImageData( top_x, top_y, width, height );
409
+ } catch(e) {
410
+
411
+ // NOTE: this part is supposedly only needed if you want to work with local files
412
+ // so it might be okay to remove the whole try/catch block and just use
413
+ // imageData = context.getImageData( top_x, top_y, width, height );
414
+ try {
415
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
416
+ imageData = context.getImageData( top_x, top_y, width, height );
417
+ } catch(e) {
418
+ alert("Cannot access local image");
419
+ throw new Error("unable to access local image data: " + e);
420
+ return;
421
+ }
422
+ }
423
+ } catch(e) {
424
+ alert("Cannot access image");
425
+ throw new Error("unable to access image data: " + e);
426
+ }
427
+
428
+ var pixels = imageData.data;
429
+
430
+ var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
431
+ r_out_sum, g_out_sum, b_out_sum,
432
+ r_in_sum, g_in_sum, b_in_sum,
433
+ pr, pg, pb, rbs;
434
+
435
+ var div = radius + radius + 1;
436
+ var w4 = width << 2;
437
+ var widthMinus1 = width - 1;
438
+ var heightMinus1 = height - 1;
439
+ var radiusPlus1 = radius + 1;
440
+ var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2;
441
+
442
+ var stackStart = new BlurStack();
443
+ var stack = stackStart;
444
+ for ( i = 1; i < div; i++ )
445
+ {
446
+ stack = stack.next = new BlurStack();
447
+ if ( i == radiusPlus1 ) var stackEnd = stack;
448
+ }
449
+ stack.next = stackStart;
450
+ var stackIn = null;
451
+ var stackOut = null;
452
+
453
+ yw = yi = 0;
454
+
455
+ var mul_sum = mul_table[radius];
456
+ var shg_sum = shg_table[radius];
457
+
458
+ for ( y = 0; y < height; y++ )
459
+ {
460
+ r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
461
+
462
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi] );
463
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );
464
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );
465
+
466
+ r_sum += sumFactor * pr;
467
+ g_sum += sumFactor * pg;
468
+ b_sum += sumFactor * pb;
469
+
470
+ stack = stackStart;
471
+
472
+ for( i = 0; i < radiusPlus1; i++ )
473
+ {
474
+ stack.r = pr;
475
+ stack.g = pg;
476
+ stack.b = pb;
477
+ stack = stack.next;
478
+ }
479
+
480
+ for( i = 1; i < radiusPlus1; i++ )
481
+ {
482
+ p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );
483
+ r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );
484
+ g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;
485
+ b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;
486
+
487
+ r_in_sum += pr;
488
+ g_in_sum += pg;
489
+ b_in_sum += pb;
490
+
491
+ stack = stack.next;
492
+ }
493
+
494
+
495
+ stackIn = stackStart;
496
+ stackOut = stackEnd;
497
+ for ( x = 0; x < width; x++ )
498
+ {
499
+ pixels[yi] = (r_sum * mul_sum) >> shg_sum;
500
+ pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
501
+ pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
502
+
503
+ r_sum -= r_out_sum;
504
+ g_sum -= g_out_sum;
505
+ b_sum -= b_out_sum;
506
+
507
+ r_out_sum -= stackIn.r;
508
+ g_out_sum -= stackIn.g;
509
+ b_out_sum -= stackIn.b;
510
+
511
+ p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;
512
+
513
+ r_in_sum += ( stackIn.r = pixels[p]);
514
+ g_in_sum += ( stackIn.g = pixels[p+1]);
515
+ b_in_sum += ( stackIn.b = pixels[p+2]);
516
+
517
+ r_sum += r_in_sum;
518
+ g_sum += g_in_sum;
519
+ b_sum += b_in_sum;
520
+
521
+ stackIn = stackIn.next;
522
+
523
+ r_out_sum += ( pr = stackOut.r );
524
+ g_out_sum += ( pg = stackOut.g );
525
+ b_out_sum += ( pb = stackOut.b );
526
+
527
+ r_in_sum -= pr;
528
+ g_in_sum -= pg;
529
+ b_in_sum -= pb;
530
+
531
+ stackOut = stackOut.next;
532
+
533
+ yi += 4;
534
+ }
535
+ yw += width;
536
+ }
537
+
538
+
539
+ for ( x = 0; x < width; x++ )
540
+ {
541
+ g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
542
+
543
+ yi = x << 2;
544
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi]);
545
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);
546
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);
547
+
548
+ r_sum += sumFactor * pr;
549
+ g_sum += sumFactor * pg;
550
+ b_sum += sumFactor * pb;
551
+
552
+ stack = stackStart;
553
+
554
+ for( i = 0; i < radiusPlus1; i++ )
555
+ {
556
+ stack.r = pr;
557
+ stack.g = pg;
558
+ stack.b = pb;
559
+ stack = stack.next;
560
+ }
561
+
562
+ yp = width;
563
+
564
+ for( i = 1; i <= radius; i++ )
565
+ {
566
+ yi = ( yp + x ) << 2;
567
+
568
+ r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );
569
+ g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;
570
+ b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;
571
+
572
+ r_in_sum += pr;
573
+ g_in_sum += pg;
574
+ b_in_sum += pb;
575
+
576
+ stack = stack.next;
577
+
578
+ if( i < heightMinus1 )
579
+ {
580
+ yp += width;
581
+ }
582
+ }
583
+
584
+ yi = x;
585
+ stackIn = stackStart;
586
+ stackOut = stackEnd;
587
+ for ( y = 0; y < height; y++ )
588
+ {
589
+ p = yi << 2;
590
+ pixels[p] = (r_sum * mul_sum) >> shg_sum;
591
+ pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
592
+ pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
593
+
594
+ r_sum -= r_out_sum;
595
+ g_sum -= g_out_sum;
596
+ b_sum -= b_out_sum;
597
+
598
+ r_out_sum -= stackIn.r;
599
+ g_out_sum -= stackIn.g;
600
+ b_out_sum -= stackIn.b;
601
+
602
+ p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;
603
+
604
+ r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));
605
+ g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));
606
+ b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));
607
+
608
+ stackIn = stackIn.next;
609
+
610
+ r_out_sum += ( pr = stackOut.r );
611
+ g_out_sum += ( pg = stackOut.g );
612
+ b_out_sum += ( pb = stackOut.b );
613
+
614
+ r_in_sum -= pr;
615
+ g_in_sum -= pg;
616
+ b_in_sum -= pb;
617
+
618
+ stackOut = stackOut.next;
619
+
620
+ yi += width;
621
+ }
622
+ }
623
+
624
+ context.putImageData( imageData, top_x, top_y );
625
+
626
+ }
627
+
628
+ function BlurStack()
629
+ {
630
+ this.r = 0;
631
+ this.g = 0;
632
+ this.b = 0;
633
+ this.a = 0;
634
+ this.next = null;
635
+ }
636
+
637
+ var stackBlur = {
638
+ image: stackBlurImage,
639
+ canvasRGBA: stackBlurCanvasRGBA,
640
+ canvasRGB: stackBlurCanvasRGB
641
+ };
642
+
643
+ // export as AMD...
644
+ if ( typeof define !== 'undefined' && define.amd ) {
645
+ define( function () { return stackBlur; });
646
+ }
647
+
648
+ // ...or as browserify
649
+ else if ( typeof module !== 'undefined' && module.exports ) {
650
+ module.exports = stackBlur;
651
+ }
652
+
653
+ global.stackBlur = stackBlur;
654
+
655
  }( typeof window !== 'undefined' ? window : this ));
inc/js/bootstrap-select.js CHANGED
@@ -1,1709 +1,1709 @@
1
- (function ($) {
2
- 'use strict';
3
-
4
- //<editor-fold desc="Shims">
5
- if (!String.prototype.includes) {
6
- (function () {
7
- 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
8
- var toString = {}.toString;
9
- var defineProperty = (function () {
10
- // IE 8 only supports `Object.defineProperty` on DOM elements
11
- try {
12
- var object = {};
13
- var $defineProperty = Object.defineProperty;
14
- var result = $defineProperty(object, object, object) && $defineProperty;
15
- } catch (error) {
16
- }
17
- return result;
18
- }());
19
- var indexOf = ''.indexOf;
20
- var includes = function (search) {
21
- if (this == null) {
22
- throw new TypeError();
23
- }
24
- var string = String(this);
25
- if (search && toString.call(search) == '[object RegExp]') {
26
- throw new TypeError();
27
- }
28
- var stringLength = string.length;
29
- var searchString = String(search);
30
- var searchLength = searchString.length;
31
- var position = arguments.length > 1 ? arguments[1] : undefined;
32
- // `ToInteger`
33
- var pos = position ? Number(position) : 0;
34
- if (pos != pos) { // better `isNaN`
35
- pos = 0;
36
- }
37
- var start = Math.min(Math.max(pos, 0), stringLength);
38
- // Avoid the `indexOf` call if no match is possible
39
- if (searchLength + start > stringLength) {
40
- return false;
41
- }
42
- return indexOf.call(string, searchString, pos) != -1;
43
- };
44
- if (defineProperty) {
45
- defineProperty(String.prototype, 'includes', {
46
- 'value': includes,
47
- 'configurable': true,
48
- 'writable': true
49
- });
50
- } else {
51
- String.prototype.includes = includes;
52
- }
53
- }());
54
- }
55
-
56
- if (!String.prototype.startsWith) {
57
- (function () {
58
- 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
59
- var defineProperty = (function () {
60
- // IE 8 only supports `Object.defineProperty` on DOM elements
61
- try {
62
- var object = {};
63
- var $defineProperty = Object.defineProperty;
64
- var result = $defineProperty(object, object, object) && $defineProperty;
65
- } catch (error) {
66
- }
67
- return result;
68
- }());
69
- var toString = {}.toString;
70
- var startsWith = function (search) {
71
- if (this == null) {
72
- throw new TypeError();
73
- }
74
- var string = String(this);
75
- if (search && toString.call(search) == '[object RegExp]') {
76
- throw new TypeError();
77
- }
78
- var stringLength = string.length;
79
- var searchString = String(search);
80
- var searchLength = searchString.length;
81
- var position = arguments.length > 1 ? arguments[1] : undefined;
82
- // `ToInteger`
83
- var pos = position ? Number(position) : 0;
84
- if (pos != pos) { // better `isNaN`
85
- pos = 0;
86
- }
87
- var start = Math.min(Math.max(pos, 0), stringLength);
88
- // Avoid the `indexOf` call if no match is possible
89
- if (searchLength + start > stringLength) {
90
- return false;
91
- }
92
- var index = -1;
93
- while (++index < searchLength) {
94
- if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
95
- return false;
96
- }
97
- }
98
- return true;
99
- };
100
- if (defineProperty) {
101
- defineProperty(String.prototype, 'startsWith', {
102
- 'value': startsWith,
103
- 'configurable': true,
104
- 'writable': true
105
- });
106
- } else {
107
- String.prototype.startsWith = startsWith;
108
- }
109
- }());
110
- }
111
-
112
- if (!Object.keys) {
113
- Object.keys = function (
114
- o, // object
115
- k, // key
116
- r // result array
117
- ){
118
- // initialize object and result
119
- r=[];
120
- // iterate over object keys
121
- for (k in o)
122
- // fill result array with non-prototypical keys
123
- r.hasOwnProperty.call(o, k) && r.push(k);
124
- // return result
125
- return r;
126
- };
127
- }
128
-
129
- $.fn.triggerNative = function (eventName) {
130
- var el = this[0],
131
- event;
132
-
133
- if (el.dispatchEvent) {
134
- if (typeof Event === 'function') {
135
- // For modern browsers
136
- event = new Event(eventName, {
137
- bubbles: true
138
- });
139
- } else {
140
- // For IE since it doesn't support Event constructor
141
- event = document.createEvent('Event');
142
- event.initEvent(eventName, true, false);
143
- }
144
-
145
- el.dispatchEvent(event);
146
- } else {
147
- if (el.fireEvent) {
148
- event = document.createEventObject();
149
- event.eventType = eventName;
150
- el.fireEvent('on' + eventName, event);
151
- }
152
-
153
- this.trigger(eventName);
154
- }
155
- };
156
- //</editor-fold>
157
-
158
- // Case insensitive contains search
159
- $.expr[':'].icontains = function (obj, index, meta) {
160
- var $obj = $(obj);
161
- var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
162
- return haystack.includes(meta[3].toUpperCase());
163
- };
164
-
165
- // Case insensitive begins search
166
- $.expr[':'].ibegins = function (obj, index, meta) {
167
- var $obj = $(obj);
168
- var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
169
- return haystack.startsWith(meta[3].toUpperCase());
170
- };
171
-
172
- // Case and accent insensitive contains search
173
- $.expr[':'].aicontains = function (obj, index, meta) {
174
- var $obj = $(obj);
175
- var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
176
- return haystack.includes(meta[3].toUpperCase());
177
- };
178
-
179
- // Case and accent insensitive begins search
180
- $.expr[':'].aibegins = function (obj, index, meta) {
181
- var $obj = $(obj);
182
- var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
183
- return haystack.startsWith(meta[3].toUpperCase());
184
- };
185
-
186
- /**
187
- * Remove all diatrics from the given text.
188
- * @access private
189
- * @param {String} text
190
- * @returns {String}
191
- */
192
- function normalizeToBase(text) {
193
- var rExps = [
194
- {re: /[\xC0-\xC6]/g, ch: "A"},
195
- {re: /[\xE0-\xE6]/g, ch: "a"},
196
- {re: /[\xC8-\xCB]/g, ch: "E"},
197
- {re: /[\xE8-\xEB]/g, ch: "e"},
198
- {re: /[\xCC-\xCF]/g, ch: "I"},
199
- {re: /[\xEC-\xEF]/g, ch: "i"},
200
- {re: /[\xD2-\xD6]/g, ch: "O"},
201
- {re: /[\xF2-\xF6]/g, ch: "o"},
202
- {re: /[\xD9-\xDC]/g, ch: "U"},
203
- {re: /[\xF9-\xFC]/g, ch: "u"},
204
- {re: /[\xC7-\xE7]/g, ch: "c"},
205
- {re: /[\xD1]/g, ch: "N"},
206
- {re: /[\xF1]/g, ch: "n"}
207
- ];
208
- $.each(rExps, function () {
209
- text = text.replace(this.re, this.ch);
210
- });
211
- return text;
212
- }
213
-
214
-
215
- function htmlEscape(html) {
216
- var escapeMap = {
217
- '&': '&amp;',
218
- '<': '&lt;',
219
- '>': '&gt;',
220
- '"': '&quot;',
221
- "'": '&#x27;',
222
- '`': '&#x60;'
223
- };
224
- var source = '(?:' + Object.keys(escapeMap).join('|') + ')',
225
- testRegexp = new RegExp(source),
226
- replaceRegexp = new RegExp(source, 'g'),
227
- string = html == null ? '' : '' + html;
228
- return testRegexp.test(string) ? string.replace(replaceRegexp, function (match) {
229
- return escapeMap[match];
230
- }) : string;
231
- }
232
-
233
- var Selectpicker = function (element, options, e) {
234
- if (e) {
235
- e.stopPropagation();
236
- e.preventDefault();
237
- }
238
-
239
- this.$element = $(element);
240
- this.$newElement = null;
241
- this.$button = null;
242
- this.$menu = null;
243
- this.$lis = null;
244
- this.options = options;
245
-
246
- // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a
247
- // data-attribute)
248
- if (this.options.title === null) {
249
- this.options.title = this.$element.attr('title');
250
- }
251
-
252
- //Expose public methods
253
- this.val = Selectpicker.prototype.val;
254
- this.render = Selectpicker.prototype.render;
255
- this.refresh = Selectpicker.prototype.refresh;
256
- this.setStyle = Selectpicker.prototype.setStyle;
257
- this.selectAll = Selectpicker.prototype.selectAll;
258
- this.deselectAll = Selectpicker.prototype.deselectAll;
259
- this.destroy = Selectpicker.prototype.destroy;
260
- this.remove = Selectpicker.prototype.remove;
261
- this.show = Selectpicker.prototype.show;
262
- this.hide = Selectpicker.prototype.hide;
263
-
264
- this.init();
265
- };
266
-
267
- Selectpicker.VERSION = '1.10.0';
268
-
269
- // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
270
- Selectpicker.DEFAULTS = {
271
- noneSelectedText: 'Nothing selected',
272
- noneResultsText: 'No results matched {0}',
273
- countSelectedText: function (numSelected, numTotal) {
274
- return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
275
- },
276
- maxOptionsText: function (numAll, numGroup) {
277
- return [
278
- (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
279
- (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
280
- ];
281
- },
282
- selectAllText: 'Select All',
283
- deselectAllText: 'Deselect All',
284
- doneButton: false,
285
- doneButtonText: 'Close',
286
- multipleSeparator: ', ',
287
- styleBase: 'btn',
288
- style: 'btn-default',
289
- size: 'auto',
290
- title: null,
291
- selectedTextFormat: 'values',
292
- width: false,
293
- container: false,
294
- hideDisabled: false,
295
- showSubtext: false,
296
- showIcon: true,
297
- showContent: true,
298
- dropupAuto: true,
299
- header: false,
300
- liveSearch: false,
301
- liveSearchPlaceholder: null,
302
- liveSearchNormalize: false,
303
- liveSearchStyle: 'contains',
304
- actionsBox: false,
305
- iconBase: 'glyphicon',
306
- tickIcon: 'glyphicon-ok',
307
- showTick: false,
308
- template: {
309
- caret: '<span class="caret"></span>'
310
- },
311
- maxOptions: false,
312
- mobile: false,
313
- selectOnTab: false,
314
- dropdownAlignRight: false
315
- };
316
-
317
- Selectpicker.prototype = {
318
-
319
- constructor: Selectpicker,
320
-
321
- init: function () {
322
- var that = this,
323
- id = this.$element.attr('id');
324
-
325
- this.$element.addClass('bs-select-hidden');
326
-
327
- // store originalIndex (key) and newIndex (value) in this.liObj for fast accessibility
328
- // allows us to do this.$lis.eq(that.liObj[index]) instead of this.$lis.filter('[data-original-index="' + index + '"]')
329
- this.liObj = {};
330
- this.multiple = this.$element.prop('multiple');
331
- this.autofocus = this.$element.prop('autofocus');
332
- this.$newElement = this.createView();
333
- this.$element
334
- .after(this.$newElement)
335
- .appendTo(this.$newElement);
336
- this.$button = this.$newElement.children('button');
337
- this.$menu = this.$newElement.children('.dropdown-menu');
338
- this.$menuInner = this.$menu.children('.inner');
339
- this.$searchbox = this.$menu.find('input');
340
-
341
- this.$element.removeClass('bs-select-hidden');
342
-
343
- if (this.options.dropdownAlignRight)
344
- this.$menu.addClass('dropdown-menu-right');
345
-
346
- if (typeof id !== 'undefined') {
347
- this.$button.attr('data-id', id);
348
- $('label[for="' + id + '"]').click(function (e) {
349
- e.preventDefault();
350
- that.$button.focus();
351
- });
352
- }
353
-
354
- this.checkDisabled();
355
- this.clickListener();
356
- if (this.options.liveSearch) this.liveSearchListener();
357
- this.render();
358
- this.setStyle();
359
- this.setWidth();
360
- if (this.options.container) this.selectPosition();
361
- this.$menu.data('this', this);
362
- this.$newElement.data('this', this);
363
- if (this.options.mobile) this.mobile();
364
-
365
- this.$newElement.on({
366
- 'hide.bs.dropdown': function (e) {
367
- that.$element.trigger('hide.bs.select', e);
368
- },
369
- 'hidden.bs.dropdown': function (e) {
370
- that.$element.trigger('hidden.bs.select', e);
371
- },
372
- 'show.bs.dropdown': function (e) {
373
- that.$element.trigger('show.bs.select', e);
374
- },
375
- 'shown.bs.dropdown': function (e) {
376
- that.$element.trigger('shown.bs.select', e);
377
- }
378
- });
379
-
380
- if (that.$element[0].hasAttribute('required')) {
381
- this.$element.on('invalid', function () {
382
- that.$button
383
- .addClass('bs-invalid')
384
- .focus();
385
-
386
- that.$element.on({
387
- 'focus.bs.select': function () {
388
- that.$button.focus();
389
- that.$element.off('focus.bs.select');
390
- },
391
- 'shown.bs.select': function () {
392
- that.$element
393
- .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
394
- .off('shown.bs.select');
395
- },
396
- 'rendered.bs.select': function () {
397
- // if select is no longer invalid, remove the bs-invalid class
398
- if (this.validity.valid) that.$button.removeClass('bs-invalid');
399
- that.$element.off('rendered.bs.select');
400
- }
401
- });
402
-
403
- });
404
- }
405
-
406
- setTimeout(function () {
407
- that.$element.trigger('loaded.bs.select');
408
- });
409
- },
410
-
411
- createDropdown: function () {
412
- // Options
413
- // If we are multiple or showTick option is set, then add the show-tick class
414
- var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
415
- inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
416
- autofocus = this.autofocus ? ' autofocus' : '';
417
- // Elements
418
- var header = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>' + this.options.header + '</div>' : '';
419
- var searchbox = this.options.liveSearch ?
420
- '<div class="bs-searchbox">' +
421
- '<input type="text" class="form-control" autocomplete="off"' +
422
- (null === this.options.liveSearchPlaceholder ? '' : ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"') + '>' +
423
- '</div>'
424
- : '';
425
- var actionsbox = this.multiple && this.options.actionsBox ?
426
- '<div class="bs-actionsbox">' +
427
- '<div class="btn-group btn-group-sm btn-block">' +
428
- '<button type="button" class="actions-btn bs-select-all btn btn-default">' +
429
- this.options.selectAllText +
430
- '</button>' +
431
- '<button type="button" class="actions-btn bs-deselect-all btn btn-default">' +
432
- this.options.deselectAllText +
433
- '</button>' +
434
- '</div>' +
435
- '</div>'
436
- : '';
437
- var donebutton = this.multiple && this.options.doneButton ?
438
- '<div class="bs-donebutton">' +
439
- '<div class="btn-group btn-block">' +
440
- '<button type="button" class="btn btn-sm btn-default">' +
441
- this.options.doneButtonText +
442
- '</button>' +
443
- '</div>' +
444
- '</div>'
445
- : '';
446
- var drop =
447
- '<div class="btn-group bootstrap-select' + showTick + inputGroup + '">' +
448
- '<button type="button" class="' + this.options.styleBase + ' dropdown-toggle" data-toggle="dropdown"' + autofocus + '>' +
449
- '<span class="filter-option pull-left"></span>&nbsp;' +
450
- '<span class="bs-caret">' +
451
- this.options.template.caret +
452
- '</span>' +
453
- '</button>' +
454
- '<div class="dropdown-menu open">' +
455
- header +
456
- searchbox +
457
- actionsbox +
458
- '<ul class="dropdown-menu inner" role="menu">' +
459
- '</ul>' +
460
- donebutton +
461
- '</div>' +
462
- '</div>';
463
-
464
- return $(drop);
465
- },
466
-
467
- createView: function () {
468
- var $drop = this.createDropdown(),
469
- li = this.createLi();
470
-
471
- $drop.find('ul')[0].innerHTML = li;
472
- return $drop;
473
- },
474
-
475
- reloadLi: function () {
476
- //Remove all children.
477
- this.destroyLi();
478
- //Re build
479
- var li = this.createLi();
480
- this.$menuInner[0].innerHTML = li;
481
- },
482
-
483
- destroyLi: function () {
484
- this.$menu.find('li').remove();
485
- },
486
-
487
- createLi: function () {
488
- var that = this,
489
- _li = [],
490
- optID = 0,
491
- titleOption = document.createElement('option'),
492
- liIndex = -1; // increment liIndex whenever a new <li> element is created to ensure liObj is correct
493
-
494
- // Helper functions
495
- /**
496
- * @param content
497
- * @param [index]
498
- * @param [classes]
499
- * @param [optgroup]
500
- * @returns {string}
501
- */
502
- var generateLI = function (content, index, classes, optgroup) {
503
- return '<li' +
504
- ((typeof classes !== 'undefined' & '' !== classes) ? ' class="' + classes + '"' : '') +
505
- ((typeof index !== 'undefined' & null !== index) ? ' data-original-index="' + index + '"' : '') +
506
- ((typeof optgroup !== 'undefined' & null !== optgroup) ? 'data-optgroup="' + optgroup + '"' : '') +
507
- '>' + content + '</li>';
508
- };
509
-
510
- /**
511
- * @param text
512
- * @param [classes]
513
- * @param [inline]
514
- * @param [tokens]
515
- * @returns {string}
516
- */
517
- var generateA = function (text, classes, inline, tokens) {
518
- return '<a tabindex="0"' +
519
- (typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
520
- (typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
521
- (that.options.liveSearchNormalize ? ' data-normalized-text="' + normalizeToBase(htmlEscape(text)) + '"' : '') +
522
- (typeof tokens !== 'undefined' || tokens !== null ? ' data-tokens="' + tokens + '"' : '') +
523
- '>' + text +
524
- '<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
525
- '</a>';
526
- };
527
-
528
- if (this.options.title && !this.multiple) {
529
- // this option doesn't create a new <li> element, but does add a new option, so liIndex is decreased
530
- // since liObj is recalculated on every refresh, liIndex needs to be decreased even if the titleOption is already appended
531
- liIndex--;
532
-
533
- if (!this.$element.find('.bs-title-option').length) {
534
- // Use native JS to prepend option (faster)
535
- var element = this.$element[0];
536
- titleOption.className = 'bs-title-option';
537
- titleOption.appendChild(document.createTextNode(this.options.title));
538
- titleOption.value = '';
539
- element.insertBefore(titleOption, element.firstChild);
540
- // Check if selected attribute is already set on an option. If not, select the titleOption option.
541
- if ($(element.options[element.selectedIndex]).attr('selected') === undefined) titleOption.selected = true;
542
- }
543
- }
544
-
545
- this.$element.find('option').each(function (index) {
546
- var $this = $(this);
547
-
548
- liIndex++;
549
-
550
- if ($this.hasClass('bs-title-option')) return;
551
-
552
- // Get the class and text for the option
553
- var optionClass = this.className || '',
554
- inline = this.style.cssText,
555
- text = $this.data('content') ? $this.data('content') : $this.html(),
556
- tokens = $this.data('tokens') ? $this.data('tokens') : null,
557
- subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.data('subtext') + '</small>' : '',
558
- icon = typeof $this.data('icon') !== 'undefined' ? '<span class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></span> ' : '',
559
- isOptgroup = this.parentNode.tagName === 'OPTGROUP',
560
- isDisabled = this.disabled || (isOptgroup && this.parentNode.disabled);
561
-
562
- if (icon !== '' && isDisabled) {
563
- icon = '<span>' + icon + '</span>';
564
- }
565
-
566
- if (that.options.hideDisabled && isDisabled && !isOptgroup) {
567
- liIndex--;
568
- return;
569
- }
570
-
571
- if (!$this.data('content')) {
572
- // Prepend any icon and append any subtext to the main text.
573
- text = icon + '<span class="text">' + text + subtext + '</span>';
574
- }
575
-
576
- if (isOptgroup && $this.data('divider') !== true) {
577
- var optGroupClass = ' ' + this.parentNode.className || '';
578
-
579
- if ($this.index() === 0) { // Is it the first option of the optgroup?
580
- optID += 1;
581
-
582
- // Get the opt group label
583
- var label = this.parentNode.label,
584
- labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.parent().data('subtext') + '</small>' : '',
585
- labelIcon = $this.parent().data('icon') ? '<span class="' + that.options.iconBase + ' ' + $this.parent().data('icon') + '"></span> ' : '';
586
-
587
- label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
588
-
589
- if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
590
- liIndex++;
591
- _li.push(generateLI('', null, 'divider', optID + 'div'));
592
- }
593
- liIndex++;
594
- _li.push(generateLI(label, null, 'dropdown-header' + optGroupClass, optID));
595
- }
596
-
597
- if (that.options.hideDisabled && isDisabled) {
598
- liIndex--;
599
- return;
600
- }
601
-
602
- _li.push(generateLI(generateA(text, 'opt ' + optionClass + optGroupClass, inline, tokens), index, '', optID));
603
- } else if ($this.data('divider') === true) {
604
- _li.push(generateLI('', index, 'divider'));
605
- } else if ($this.data('hidden') === true) {
606
- _li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
607
- } else {
608
- if (this.previousElementSibling && this.previousElementSibling.tagName === 'OPTGROUP') {
609
- liIndex++;
610
- _li.push(generateLI('', null, 'divider', optID + 'div'));
611
- }
612
- _li.push(generateLI(generateA(text, optionClass, inline, tokens), index));
613
- }
614
-
615
- that.liObj[index] = liIndex;
616
- });
617
-
618
- //If we are not multiple, we don't have a selected item, and we don't have a title, select the first element so something is set in the button
619
- if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) {
620
- this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');
621
- }
622
-
623
- return _li.join('');
624
- },
625
-
626
- findLis: function () {
627
- if (this.$lis == null) this.$lis = this.$menu.find('li');
628
- return this.$lis;
629
- },
630
-
631
- /**
632
- * @param [updateLi] defaults to true
633
- */
634
- render: function (updateLi) {
635
- var that = this,
636
- notDisabled;
637
-
638
- //Update the LI to match the SELECT
639
- if (updateLi !== false) {
640
- this.$element.find('option').each(function (index) {
641
- var $lis = that.findLis().eq(that.liObj[index]);
642
-
643
- that.setDisabled(index, this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled, $lis);
644
- that.setSelected(index, this.selected, $lis);
645
- });
646
- }
647
-
648
- this.tabIndex();
649
-
650
- var selectedItems = this.$element.find('option').map(function () {
651
- if (this.selected) {
652
- if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return;
653
-
654
- var $this = $(this),
655
- icon = $this.data('icon') && that.options.showIcon ? '<i class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></i> ' : '',
656
- subtext;
657
-
658
- if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {
659
- subtext = ' <small class="text-muted">' + $this.data('subtext') + '</small>';
660
- } else {
661
- subtext = '';
662
- }
663
- if (typeof $this.attr('title') !== 'undefined') {
664
- return $this.attr('title');
665
- } else if ($this.data('content') && that.options.showContent) {
666
- return $this.data('content');
667
- } else {
668
- return icon + $this.html() + subtext;
669
- }
670
- }
671
- }).toArray();
672
-
673
- //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled
674
- //Convert all the values into a comma delimited string
675
- var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator);
676
-
677
- //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..
678
- if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {
679
- var max = this.options.selectedTextFormat.split('>');
680
- if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) {
681
- notDisabled = this.options.hideDisabled ? ', [disabled]' : '';
682
- var totalCount = this.$element.find('option').not('[data-divider="true"], [data-hidden="true"]' + notDisabled).length,
683
- tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedItems.length, totalCount) : this.options.countSelectedText;
684
- title = tr8nText.replace('{0}', selectedItems.length.toString()).replace('{1}', totalCount.toString());
685
- }
686
- }
687
-
688
- if (this.options.title == undefined) {
689
- this.options.title = this.$element.attr('title');
690
- }
691
-
692
- if (this.options.selectedTextFormat == 'static') {
693
- title = this.options.title;
694
- }
695
-
696
- //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text
697
- if (!title) {
698
- title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
699
- }
700
-
701
- //strip all html-tags and trim the result
702
- // this.$button.attr('title', $.trim(title.replace(/<[^>]*>?/g, '')));
703
- this.$button.children('.filter-option').html(title);
704
-
705
- this.$element.trigger('rendered.bs.select');
706
- },
707
-
708
- /**
709
- * @param [style]
710
- * @param [status]
711
- */
712
- setStyle: function (style, status) {
713
- if (this.$element.attr('class')) {
714
- this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
715
- }
716
-
717
- var buttonClass = style ? style : this.options.style;
718
-
719
- if (status == 'add') {
720
- this.$button.addClass(buttonClass);
721
- } else if (status == 'remove') {
722
- this.$button.removeClass(buttonClass);
723
- } else {
724
- this.$button.removeClass(this.options.style);
725
- this.$button.addClass(buttonClass);
726
- }
727
- },
728
-
729
- liHeight: function (refresh) {
730
- if (!refresh && (this.options.size === false || this.sizeInfo)) return;
731
-
732
- var newElement = document.createElement('div'),
733
- menu = document.createElement('div'),
734
- menuInner = document.createElement('ul'),
735
- divider = document.createElement('li'),
736
- li = document.createElement('li'),
737
- a = document.createElement('a'),
738
- text = document.createElement('span'),
739
- header = this.options.header && this.$menu.find('.popover-title').length > 0 ? this.$menu.find('.popover-title')[0].cloneNode(true) : null,
740
- search = this.options.liveSearch ? document.createElement('div') : null,
741
- actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
742
- doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null;
743
-
744
- text.className = 'text';
745
- newElement.className = this.$menu[0].parentNode.className + ' open';
746
- menu.className = 'dropdown-menu open';
747
- menuInner.className = 'dropdown-menu inner';
748
- divider.className = 'divider';
749
-
750
- text.appendChild(document.createTextNode('Inner text'));
751
- a.appendChild(text);
752
- li.appendChild(a);
753
- menuInner.appendChild(li);
754
- menuInner.appendChild(divider);
755
- if (header) menu.appendChild(header);
756
- if (search) {
757
- // create a span instead of input as creating an input element is slower
758
- var input = document.createElement('span');
759
- search.className = 'bs-searchbox';
760
- input.className = 'form-control';
761
- search.appendChild(input);
762
- menu.appendChild(search);
763
- }
764
- if (actions) menu.appendChild(actions);
765
- menu.appendChild(menuInner);
766
- if (doneButton) menu.appendChild(doneButton);
767
- newElement.appendChild(menu);
768
-
769
- document.body.appendChild(newElement);
770
-
771
- var liHeight = a.offsetHeight,
772
- headerHeight = header ? header.offsetHeight : 0,
773
- searchHeight = search ? search.offsetHeight : 0,
774
- actionsHeight = actions ? actions.offsetHeight : 0,
775
- doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
776
- dividerHeight = $(divider).outerHeight(true),
777
- // fall back to jQuery if getComputedStyle is not supported
778
- menuStyle = typeof getComputedStyle === 'function' ? getComputedStyle(menu) : false,
779
- $menu = menuStyle ? null : $(menu),
780
- menuPadding = parseInt(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
781
- parseInt(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
782
- parseInt(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +
783
- parseInt(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),
784
- menuExtras = menuPadding +
785
- parseInt(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +
786
- parseInt(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2;
787
-
788
- document.body.removeChild(newElement);
789
-
790
- this.sizeInfo = {
791
- liHeight: liHeight,
792
- headerHeight: headerHeight,
793
- searchHeight: searchHeight,
794
- actionsHeight: actionsHeight,
795
- doneButtonHeight: doneButtonHeight,
796
- dividerHeight: dividerHeight,
797
- menuPadding: menuPadding,
798
- menuExtras: menuExtras
799
- };
800
- },
801
-
802
- setSize: function () {
803
- this.findLis();
804
- this.liHeight();
805
-
806
- if (this.options.header) this.$menu.css('padding-top', 0);
807
- if (this.options.size === false) return;
808
-
809
- var that = this,
810
- $menu = this.$menu,
811
- $menuInner = this.$menuInner,
812
- $window = $(window),
813
- selectHeight = this.$newElement[0].offsetHeight,
814
- liHeight = this.sizeInfo['liHeight'],
815
- headerHeight = this.sizeInfo['headerHeight'],
816
- searchHeight = this.sizeInfo['searchHeight'],
817
- actionsHeight = this.sizeInfo['actionsHeight'],
818
- doneButtonHeight = this.sizeInfo['doneButtonHeight'],
819
- divHeight = this.sizeInfo['dividerHeight'],
820
- menuPadding = this.sizeInfo['menuPadding'],
821
- menuExtras = this.sizeInfo['menuExtras'],
822
- notDisabled = this.options.hideDisabled ? '.disabled' : '',
823
- menuHeight,
824
- getHeight,
825
- selectOffsetTop,
826
- selectOffsetBot,
827
- posVert = function () {
828
- selectOffsetTop = that.$newElement.offset().top - $window.scrollTop();
829
- selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
830
- };
831
-
832
- posVert();
833
-
834
- if (this.options.size === 'auto') {
835
- var getSize = function () {
836
- var minHeight,
837
- hasClass = function (className, include) {
838
- return function (element) {
839
- if (include) {
840
- return (element.classList ? element.classList.contains(className) : $(element).hasClass(className));
841
- } else {
842
- return !(element.classList ? element.classList.contains(className) : $(element).hasClass(className));
843
- }
844
- };
845
- },
846
- lis = that.$menuInner[0].getElementsByTagName('li'),
847
- lisVisible = Array.prototype.filter ? Array.prototype.filter.call(lis, hasClass('hidden', false)) : that.$lis.not('.hidden'),
848
- optGroup = Array.prototype.filter ? Array.prototype.filter.call(lisVisible, hasClass('dropdown-header', true)) : lisVisible.filter('.dropdown-header');
849
-
850
- posVert();
851
- menuHeight = selectOffsetBot - menuExtras;
852
-
853
- if (that.options.container) {
854
- if (!$menu.data('height')) $menu.data('height', $menu.height());
855
- getHeight = $menu.data('height');
856
- } else {
857
- getHeight = $menu.height();
858
- }
859
-
860
- if (that.options.dropupAuto) {
861
- that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < getHeight);
862
- }
863
- if (that.$newElement.hasClass('dropup')) {
864
- menuHeight = selectOffsetTop - menuExtras;
865
- }
866
-
867
- if ((lisVisible.length + optGroup.length) > 3) {
868
- minHeight = liHeight * 3 + menuExtras - 2;
869
- } else {
870
- minHeight = 0;
871
- }
872
-
873
- $menu.css({
874
- 'max-height': menuHeight + 'px',
875
- 'overflow': 'hidden',
876
- 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'
877
- });
878
- $menuInner.css({
879
- 'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding + 'px',
880
- 'overflow-y': 'auto',
881
- 'min-height': Math.max(minHeight - menuPadding, 0) + 'px'
882
- });
883
- };
884
- getSize();
885
- this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);
886
- $window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);
887
- } else if (this.options.size && this.options.size != 'auto' && this.$lis.not(notDisabled).length > this.options.size) {
888
- var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index(),
889
- divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
890
- menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding;
891
-
892
- if (that.options.container) {
893
- if (!$menu.data('height')) $menu.data('height', $menu.height());
894
- getHeight = $menu.data('height');
895
- } else {
896
- getHeight = $menu.height();
897
- }
898
-
899
- if (that.options.dropupAuto) {
900
- //noinspection JSUnusedAssignment
901
- this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < getHeight);
902
- }
903
- $menu.css({
904
- 'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',
905
- 'overflow': 'hidden',
906
- 'min-height': ''
907
- });
908
- $menuInner.css({
909
- 'max-height': menuHeight - menuPadding + 'px',
910
- 'overflow-y': 'auto',
911
- 'min-height': ''
912
- });
913
- }
914
- },
915
-
916
- setWidth: function () {
917
- if (this.options.width === 'auto') {
918
- this.$menu.css('min-width', '0');
919
-
920
- // Get correct width if element is hidden
921
- var $selectClone = this.$menu.parent().clone().appendTo('body'),
922
- $selectClone2 = this.options.container ? this.$newElement.clone().appendTo('body') : $selectClone,
923
- ulWidth = $selectClone.children('.dropdown-menu').outerWidth(),
924
- btnWidth = $selectClone2.css('width', 'auto').children('button').outerWidth();
925
-
926
- $selectClone.remove();
927
- $selectClone2.remove();
928
-
929
- // Set width to whatever's larger, button title or longest option
930
- this.$newElement.css('width', Math.max(ulWidth, btnWidth) + 'px');
931
- } else if (this.options.width === 'fit') {
932
- // Remove inline min-width so width can be changed from 'auto'
933
- this.$menu.css('min-width', '');
934
- this.$newElement.css('width', '').addClass('fit-width');
935
- } else if (this.options.width) {
936
- // Remove inline min-width so width can be changed from 'auto'
937
- this.$menu.css('min-width', '');
938
- this.$newElement.css('width', this.options.width);
939
- } else {
940
- // Remove inline min-width/width so width can be changed
941
- this.$menu.css('min-width', '');
942
- this.$newElement.css('width', '');
943
- }
944
- // Remove fit-width class if width is changed programmatically
945
- if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
946
- this.$newElement.removeClass('fit-width');
947
- }
948
- },
949
-
950
- selectPosition: function () {
951
- this.$bsContainer = $('<div class="bs-container" />');
952
-
953
- var that = this,
954
- pos,
955
- actualHeight,
956
- getPlacement = function ($element) {
957
- that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass('dropup', $element.hasClass('dropup'));
958
- pos = $element.offset();
959
- actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;
960
- that.$bsContainer.css({
961
- 'top': pos.top + actualHeight,
962
- 'left': pos.left,
963
- 'width': $element[0].offsetWidth
964
- });
965
- };
966
-
967
- this.$button.on('click', function () {
968
- var $this = $(this);
969
-
970
- if (that.isDisabled()) {
971
- return;
972
- }
973
-
974
- getPlacement(that.$newElement);
975
-
976
- that.$bsContainer
977
- .appendTo(that.options.container)
978
- .toggleClass('open', !$this.hasClass('open'))
979
- .append(that.$menu);
980
- });
981
-
982
- $(window).on('resize scroll', function () {
983
- getPlacement(that.$newElement);
984
- });
985
-
986
- this.$element.on('hide.bs.select', function () {
987
- that.$menu.data('height', that.$menu.height());
988
- that.$bsContainer.detach();
989
- });
990
- },
991
-
992
- setSelected: function (index, selected, $lis) {
993
- if (!$lis) {
994
- $lis = this.findLis().eq(this.liObj[index]);
995
- }
996
-
997
- $lis.toggleClass('selected', selected);
998
- },
999
-
1000
- setDisabled: function (index, disabled, $lis) {
1001
- if (!$lis) {
1002
- $lis = this.findLis().eq(this.liObj[index]);
1003
- }
1004
-
1005
- if (disabled) {
1006
- $lis.addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1);
1007
- } else {
1008
- $lis.removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0);
1009
- }
1010
- },
1011
-
1012
- isDisabled: function () {
1013
- return this.$element[0].disabled;
1014
- },
1015
-
1016
- checkDisabled: function () {
1017
- var that = this;
1018
-
1019
- if (this.isDisabled()) {
1020
- this.$newElement.addClass('disabled');
1021
- this.$button.addClass('disabled').attr('tabindex', -1);
1022
- } else {
1023
- if (this.$button.hasClass('disabled')) {
1024
- this.$newElement.removeClass('disabled');
1025
- this.$button.removeClass('disabled');
1026
- }
1027
-
1028
- if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
1029
- this.$button.removeAttr('tabindex');
1030
- }
1031
- }
1032
-
1033
- this.$button.click(function () {
1034
- return !that.isDisabled();
1035
- });
1036
- },
1037
-
1038
- tabIndex: function () {
1039
- if (this.$element.data('tabindex') !== this.$element.attr('tabindex') &&
1040
- (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) {
1041
- this.$element.data('tabindex', this.$element.attr('tabindex'));
1042
- this.$button.attr('tabindex', this.$element.data('tabindex'));
1043
- }
1044
-
1045
- this.$element.attr('tabindex', -98);
1046
- },
1047
-
1048
- clickListener: function () {
1049
- var that = this,
1050
- $document = $(document);
1051
-
1052
- this.$newElement.on('touchstart.dropdown', '.dropdown-menu', function (e) {
1053
- e.stopPropagation();
1054
- });
1055
-
1056
- $document.data('spaceSelect', false);
1057
-
1058
- this.$button.on('keyup', function (e) {
1059
- if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
1060
- e.preventDefault();
1061
- $document.data('spaceSelect', false);
1062
- }
1063
- });
1064
-
1065
- this.$button.on('click', function () {
1066
- that.setSize();
1067
- });
1068
-
1069
- this.$element.on('shown.bs.select', function () {
1070
- if (!that.options.liveSearch && !that.multiple) {
1071
- that.$menuInner.find('.selected a').focus();
1072
- } else if (!that.multiple) {
1073
- var selectedIndex = that.liObj[that.$element[0].selectedIndex];
1074
-
1075
- if (typeof selectedIndex !== 'number' || that.options.size === false) return;
1076
-
1077
- // scroll to selected option
1078
- var offset = that.$lis.eq(selectedIndex)[0].offsetTop - that.$menuInner[0].offsetTop;
1079
- offset = offset - that.$menuInner[0].offsetHeight/2 + that.sizeInfo.liHeight/2;
1080
- that.$menuInner[0].scrollTop = offset;
1081
- }
1082
- });
1083
-
1084
- this.$menuInner.on('click', 'li a', function (e) {
1085
- var $this = $(this),
1086
- clickedIndex = $this.parent().data('originalIndex'),
1087
- prevValue = that.$element.val(),
1088
- prevIndex = that.$element.prop('selectedIndex');
1089
-
1090
- // Don't close on multi choice menu
1091
- if (that.multiple) {
1092
- e.stopPropagation();
1093
- }
1094
-
1095
- e.preventDefault();
1096
-
1097
- //Don't run if we have been disabled
1098
- if (!that.isDisabled() && !$this.parent().hasClass('disabled')) {
1099
- var $options = that.$element.find('option'),
1100
- $option = $options.eq(clickedIndex),
1101
- state = $option.prop('selected'),
1102
- $optgroup = $option.parent('optgroup'),
1103
- maxOptions = that.options.maxOptions,
1104
- maxOptionsGrp = $optgroup.data('maxOptions') || false;
1105
-
1106
- if (!that.multiple) { // Deselect all others if not multi select box
1107
- $options.prop('selected', false);
1108
- $option.prop('selected', true);
1109
- that.$menuInner.find('.selected').removeClass('selected');
1110
- that.setSelected(clickedIndex, true);
1111
- } else { // Toggle the one we have chosen if we are multi select.
1112
- $option.prop('selected', !state);
1113
- that.setSelected(clickedIndex, !state);
1114
- $this.blur();
1115
-
1116
- if (maxOptions !== false || maxOptionsGrp !== false) {
1117
- var maxReached = maxOptions < $options.filter(':selected').length,
1118
- maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
1119
-
1120
- if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
1121
- if (maxOptions && maxOptions == 1) {
1122
- $options.prop('selected', false);
1123
- $option.prop('selected', true);
1124
- that.$menuInner.find('.selected').removeClass('selected');
1125
- that.setSelected(clickedIndex, true);
1126
- } else if (maxOptionsGrp && maxOptionsGrp == 1) {
1127
- $optgroup.find('option:selected').prop('selected', false);
1128
- $option.prop('selected', true);
1129
- var optgroupID = $this.parent().data('optgroup');
1130
- that.$menuInner.find('[data-optgroup="' + optgroupID + '"]').removeClass('selected');
1131
- that.setSelected(clickedIndex, true);
1132
- } else {
1133
- var maxOptionsArr = (typeof that.options.maxOptionsText === 'function') ?
1134
- that.options.maxOptionsText(maxOptions, maxOptionsGrp) : that.options.maxOptionsText,
1135
- maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
1136
- maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
1137
- $notify = $('<div class="notify"></div>');
1138
- // If {var} is set in array, replace it
1139
- /** @deprecated */
1140
- if (maxOptionsArr[2]) {
1141
- maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
1142
- maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
1143
- }
1144
-
1145
- $option.prop('selected', false);
1146
-
1147
- that.$menu.append($notify);
1148
-
1149
- if (maxOptions && maxReached) {
1150
- $notify.append($('<div>' + maxTxt + '</div>'));
1151
- that.$element.trigger('maxReached.bs.select');
1152
- }
1153
-
1154
- if (maxOptionsGrp && maxReachedGrp) {
1155
- $notify.append($('<div>' + maxTxtGrp + '</div>'));
1156
- that.$element.trigger('maxReachedGrp.bs.select');
1157
- }
1158
-
1159
- setTimeout(function () {
1160
- that.setSelected(clickedIndex, false);
1161
- }, 10);
1162
-
1163
- $notify.delay(750).fadeOut(300, function () {
1164
- $(this).remove();
1165
- });
1166
- }
1167
- }
1168
- }
1169
- }
1170
-
1171
- if (!that.multiple) {
1172
- that.$button.focus();
1173
- } else if (that.options.liveSearch) {
1174
- that.$searchbox.focus();
1175
- }
1176
-
1177
- // Trigger select 'change'
1178
- if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) {
1179
- // $option.prop('selected') is current option state (selected/unselected). state is previous option state.
1180
- that.$element
1181
- .trigger('changed.bs.select', [clickedIndex, $option.prop('selected'), state])
1182
- .triggerNative('change');
1183
- }
1184
- }
1185
- });
1186
-
1187
- this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {
1188
- if (e.currentTarget == this) {
1189
- e.preventDefault();
1190
- e.stopPropagation();
1191
- if (that.options.liveSearch && !$(e.target).hasClass('close')) {
1192
- that.$searchbox.focus();
1193
- } else {
1194
- that.$button.focus();
1195
- }
1196
- }
1197
- });
1198
-
1199
- this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
1200
- e.preventDefault();
1201
- e.stopPropagation();
1202
- if (that.options.liveSearch) {
1203
- that.$searchbox.focus();
1204
- } else {
1205
- that.$button.focus();
1206
- }
1207
- });
1208
-
1209
- this.$menu.on('click', '.popover-title .close', function () {
1210
- that.$button.click();
1211
- });
1212
-
1213
- this.$searchbox.on('click', function (e) {
1214
- e.stopPropagation();
1215
- });
1216
-
1217
- this.$menu.on('click', '.actions-btn', function (e) {
1218
- if (that.options.liveSearch) {
1219
- that.$searchbox.focus();
1220
- } else {
1221
- that.$button.focus();
1222
- }
1223
-
1224
- e.preventDefault();
1225
- e.stopPropagation();
1226
-
1227
- if ($(this).hasClass('bs-select-all')) {
1228
- that.selectAll();
1229
- } else {
1230
- that.deselectAll();
1231
- }
1232
- });
1233
-
1234
- this.$element.change(function () {
1235
- that.render(false);
1236
- });
1237
- },
1238
-
1239
- liveSearchListener: function () {
1240
- var that = this,
1241
- $no_results = $('<li class="no-results"></li>');
1242
-
1243
- this.$button.on('click.dropdown.data-api touchstart.dropdown.data-api', function () {
1244
- that.$menuInner.find('.active').removeClass('active');
1245
- if (!!that.$searchbox.val()) {
1246
- that.$searchbox.val('');
1247
- that.$lis.not('.is-hidden').removeClass('hidden');
1248
- if (!!$no_results.parent().length) $no_results.remove();
1249
- }
1250
- if (!that.multiple) that.$menuInner.find('.selected').addClass('active');
1251
- setTimeout(function () {
1252
- that.$searchbox.focus();
1253
- }, 10);
1254
- });
1255
-
1256
- this.$searchbox.on('click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api', function (e) {
1257
- e.stopPropagation();
1258
- });
1259
-
1260
- this.$searchbox.on('input propertychange', function () {
1261
- if (that.$searchbox.val()) {
1262
- var $searchBase = that.$lis.not('.is-hidden').removeClass('hidden').children('a');
1263
- if (that.options.liveSearchNormalize) {
1264
- $searchBase = $searchBase.not(':a' + that._searchStyle() + '("' + normalizeToBase(that.$searchbox.val()) + '")');
1265
- } else {
1266
- $searchBase = $searchBase.not(':' + that._searchStyle() + '("' + that.$searchbox.val() + '")');
1267
- }
1268
- $searchBase.parent().addClass('hidden');
1269
-
1270
- that.$lis.filter('.dropdown-header').each(function () {
1271
- var $this = $(this),
1272
- optgroup = $this.data('optgroup');
1273
-
1274
- if (that.$lis.filter('[data-optgroup=' + optgroup + ']').not($this).not('.hidden').length === 0) {
1275
- $this.addClass('hidden');
1276
- that.$lis.filter('[data-optgroup=' + optgroup + 'div]').addClass('hidden');
1277
- }
1278
- });
1279
-
1280
- var $lisVisible = that.$lis.not('.hidden');
1281
-
1282
- // hide divider if first or last visible, or if followed by another divider
1283
- $lisVisible.each(function (index) {
1284
- var $this = $(this);
1285
-
1286
- if ($this.hasClass('divider') && (
1287
- $this.index() === $lisVisible.first().index() ||
1288
- $this.index() === $lisVisible.last().index() ||
1289
- $lisVisible.eq(index + 1).hasClass('divider'))) {
1290
- $this.addClass('hidden');
1291
- }
1292
- });
1293
-
1294
- if (!that.$lis.not('.hidden, .no-results').length) {
1295
- if (!!$no_results.parent().length) {
1296
- $no_results.remove();
1297
- }
1298
- $no_results.html(that.options.noneResultsText.replace('{0}', '"' + htmlEscape(that.$searchbox.val()) + '"')).show();
1299
- that.$menuInner.append($no_results);
1300
- } else if (!!$no_results.parent().length) {
1301
- $no_results.remove();
1302
- }
1303
- } else {
1304
- that.$lis.not('.is-hidden').removeClass('hidden');
1305
- if (!!$no_results.parent().length) {
1306
- $no_results.remove();
1307
- }
1308
- }
1309
-
1310
- that.$lis.filter('.active').removeClass('active');
1311
- if (that.$searchbox.val()) that.$lis.not('.hidden, .divider, .dropdown-header').eq(0).addClass('active').children('a').focus();
1312
- $(this).focus();
1313
- });
1314
- },
1315
-
1316
- _searchStyle: function () {
1317
- var styles = {
1318
- begins: 'ibegins',
1319
- startsWith: 'ibegins'
1320
- };
1321
-
1322
- return styles[this.options.liveSearchStyle] || 'icontains';
1323
- },
1324
-
1325
- val: function (value) {
1326
- if (typeof value !== 'undefined') {
1327
- this.$element.val(value);
1328
- this.render();
1329
-
1330
- return this.$element;
1331
- } else {
1332
- return this.$element.val();
1333
- }
1334
- },
1335
-
1336
- changeAll: function (status) {
1337
- if (typeof status === 'undefined') status = true;
1338
-
1339
- this.findLis();
1340
-
1341
- var $options = this.$element.find('option'),
1342
- $lisVisible = this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').toggleClass('selected', status),
1343
- lisVisLen = $lisVisible.length,
1344
- selectedOptions = [];
1345
-
1346
- for (var i = 0; i < lisVisLen; i++) {
1347
- var origIndex = $lisVisible[i].getAttribute('data-original-index');
1348
- selectedOptions[selectedOptions.length] = $options.eq(origIndex)[0];
1349
- }
1350
-
1351
- $(selectedOptions).prop('selected', status);
1352
-
1353
- this.render(false);
1354
-
1355
- this.$element
1356
- .trigger('changed.bs.select')
1357
- .triggerNative('change');
1358
- },
1359
-
1360
- selectAll: function () {
1361
- return this.changeAll(true);
1362
- },
1363
-
1364
- deselectAll: function () {
1365
- return this.changeAll(false);
1366
- },
1367
-
1368
- toggle: function (e) {
1369
- e = e || window.event;
1370
-
1371
- if (e) e.stopPropagation();
1372
-
1373
- this.$button.trigger('click');
1374
- },
1375
-
1376
- keydown: function (e) {
1377
- var $this = $(this),
1378
- $parent = $this.is('input') ? $this.parent().parent() : $this.parent(),
1379
- $items,
1380
- that = $parent.data('this'),
1381
- index,
1382
- next,
1383
- first,
1384
- last,
1385
- prev,
1386
- nextPrev,
1387
- prevIndex,
1388
- isActive,
1389
- selector = ':not(.disabled, .hidden, .dropdown-header, .divider)',
1390
- keyCodeMap = {
1391
- 32: ' ',
1392
- 48: '0',
1393
- 49: '1',
1394
- 50: '2',
1395
- 51: '3',
1396
- 52: '4',
1397
- 53: '5',
1398
- 54: '6',
1399
- 55: '7',
1400
- 56: '8',
1401
- 57: '9',
1402
- 59: ';',
1403
- 65: 'a',
1404
- 66: 'b',
1405
- 67: 'c',
1406
- 68: 'd',
1407
- 69: 'e',
1408
- 70: 'f',
1409
- 71: 'g',
1410
- 72: 'h',
1411
- 73: 'i',
1412
- 74: 'j',
1413
- 75: 'k',
1414
- 76: 'l',
1415
- 77: 'm',
1416
- 78: 'n',
1417
- 79: 'o',
1418
- 80: 'p',
1419
- 81: 'q',
1420
- 82: 'r',
1421
- 83: 's',
1422
- 84: 't',
1423
- 85: 'u',
1424
- 86: 'v',
1425
- 87: 'w',
1426
- 88: 'x',
1427
- 89: 'y',
1428
- 90: 'z',
1429
- 96: '0',
1430
- 97: '1',
1431
- 98: '2',
1432
- 99: '3',
1433
- 100: '4',
1434
- 101: '5',
1435
- 102: '6',
1436
- 103: '7',
1437
- 104: '8',
1438
- 105: '9'
1439
- };
1440
-
1441
- if (that.options.liveSearch) $parent = $this.parent().parent();
1442
-
1443
- if (that.options.container) $parent = that.$menu;
1444
-
1445
- $items = $('[role=menu] li', $parent);
1446
-
1447
- isActive = that.$newElement.hasClass('open');
1448
-
1449
- if (!isActive && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 65 && e.keyCode <= 90)) {
1450
- if (!that.options.container) {
1451
- that.setSize();
1452
- that.$menu.parent().addClass('open');
1453
- isActive = true;
1454
- } else {
1455
- that.$button.trigger('click');
1456
- }
1457
- that.$searchbox.focus();
1458
- }
1459
-
1460
- if (that.options.liveSearch) {
1461
- if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && that.$menu.find('.active').length === 0) {
1462
- e.preventDefault();
1463
- that.$menu.parent().removeClass('open');
1464
- if (that.options.container) that.$newElement.removeClass('open');
1465
- that.$button.focus();
1466
- }
1467
- // $items contains li elements when liveSearch is enabled
1468
- $items = $('[role=menu] li' + selector, $parent);
1469
- if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {
1470
- if ($items.filter('.active').length === 0) {
1471
- $items = that.$menuInner.find('li');
1472
- if (that.options.liveSearchNormalize) {
1473
- $items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
1474
- } else {
1475
- $items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');
1476
- }
1477
- }
1478
- }
1479
- }
1480
-
1481
- if (!$items.length) return;
1482
-
1483
- if (/(38|40)/.test(e.keyCode.toString(10))) {
1484
- index = $items.index($items.find('a').filter(':focus').parent());
1485
- first = $items.filter(selector).first().index();
1486
- last = $items.filter(selector).last().index();
1487
- next = $items.eq(index).nextAll(selector).eq(0).index();
1488
- prev = $items.eq(index).prevAll(selector).eq(0).index();
1489
- nextPrev = $items.eq(next).prevAll(selector).eq(0).index();
1490
-
1491
- if (that.options.liveSearch) {
1492
- $items.each(function (i) {
1493
- if (!$(this).hasClass('disabled')) {
1494
- $(this).data('index', i);
1495
- }
1496
- });
1497
- index = $items.index($items.filter('.active'));
1498
- first = $items.first().data('index');
1499
- last = $items.last().data('index');
1500
- next = $items.eq(index).nextAll().eq(0).data('index');
1501
- prev = $items.eq(index).prevAll().eq(0).data('index');
1502
- nextPrev = $items.eq(next).prevAll().eq(0).data('index');
1503
- }
1504
-
1505
- prevIndex = $this.data('prevIndex');
1506
-
1507
- if (e.keyCode == 38) {
1508
- if (that.options.liveSearch) index--;
1509
- if (index != nextPrev && index > prev) index = prev;
1510
- if (index < first) index = first;
1511
- if (index == prevIndex) index = last;
1512
- } else if (e.keyCode == 40) {
1513
- if (that.options.liveSearch) index++;
1514
- if (index == -1) index = 0;
1515
- if (index != nextPrev && index < next) index = next;
1516
- if (index > last) index = last;
1517
- if (index == prevIndex) index = first;
1518
- }
1519
-
1520
- $this.data('prevIndex', index);
1521
-
1522
- if (!that.options.liveSearch) {
1523
- $items.eq(index).children('a').focus();
1524
- } else {
1525
- e.preventDefault();
1526
- if (!$this.hasClass('dropdown-toggle')) {
1527
- $items.removeClass('active').eq(index).addClass('active').children('a').focus();
1528
- $this.focus();
1529
- }
1530
- }
1531
-
1532
- } else if (!$this.is('input')) {
1533
- var keyIndex = [],
1534
- count,
1535
- prevKey;
1536
-
1537
- $items.each(function () {
1538
- if (!$(this).hasClass('disabled')) {
1539
- if ($.trim($(this).children('a').text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {
1540
- keyIndex.push($(this).index());
1541
- }
1542
- }
1543
- });
1544
-
1545
- count = $(document).data('keycount');
1546
- count++;
1547
- $(document).data('keycount', count);
1548
-
1549
- prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1);
1550
-
1551
- if (prevKey != keyCodeMap[e.keyCode]) {
1552
- count = 1;
1553
- $(document).data('keycount', count);
1554
- } else if (count >= keyIndex.length) {
1555
- $(document).data('keycount', 0);
1556
- if (count > keyIndex.length) count = 1;
1557
- }
1558
-
1559
- $items.eq(keyIndex[count - 1]).children('a').focus();
1560
- }
1561
-
1562
- // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
1563
- if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {
1564
- if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();
1565
- if (!that.options.liveSearch) {
1566
- var elem = $(':focus');
1567
- elem.click();
1568
- // Bring back focus for multiselects
1569
- elem.focus();
1570
- // Prevent screen from scrolling if the user hit the spacebar
1571
- e.preventDefault();
1572
- // Fixes spacebar selection of dropdown items in FF & IE
1573
- $(document).data('spaceSelect', true);
1574
- } else if (!/(32)/.test(e.keyCode.toString(10))) {
1575
- that.$menuInner.find('.active a').click();
1576
- $this.focus();
1577
- }
1578
- $(document).data('keycount', 0);
1579
- }
1580
-
1581
- if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) {
1582
- that.$menu.parent().removeClass('open');
1583
- if (that.options.container) that.$newElement.removeClass('open');
1584
- that.$button.focus();
1585
- }
1586
- },
1587
-
1588
- mobile: function () {
1589
- this.$element.addClass('mobile-device');
1590
- },
1591
-
1592
- refresh: function () {
1593
- this.$lis = null;
1594
- this.liObj = {};
1595
- this.reloadLi();
1596
- this.render();
1597
- this.checkDisabled();
1598
- this.liHeight(true);
1599
- this.setStyle();
1600
- this.setWidth();
1601
- if (this.$lis) this.$searchbox.trigger('propertychange');
1602
-
1603
- this.$element.trigger('refreshed.bs.select');
1604
- },
1605
-
1606
- hide: function () {
1607
- this.$newElement.hide();
1608
- },
1609
-
1610
- show: function () {
1611
- this.$newElement.show();
1612
- },
1613
-
1614
- remove: function () {
1615
- this.$newElement.remove();
1616
- this.$element.remove();
1617
- },
1618
-
1619
- destroy: function () {
1620
- this.$newElement.before(this.$element).remove();
1621
-
1622
- if (this.$bsContainer) {
1623
- this.$bsContainer.remove();
1624
- } else {
1625
- this.$menu.remove();
1626
- }
1627
-
1628
- this.$element
1629
- .off('.bs.select')
1630
- .removeData('selectpicker')
1631
- .removeClass('bs-select-hidden selectpicker');
1632
- }
1633
- };
1634
-
1635
- // SELECTPICKER PLUGIN DEFINITION
1636
- // ==============================
1637
- function Plugin(option, event) {
1638
- // get the args of the outer function..
1639
- var args = arguments;
1640
- // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
1641
- // to get lost/corrupted in android 2.3 and IE9 #715 #775
1642
- var _option = option,
1643
- _event = event;
1644
- [].shift.apply(args);
1645
-
1646
- var value;
1647
- var chain = this.each(function () {
1648
- var $this = $(this);
1649
- if ($this.is('select')) {
1650
- var data = $this.data('selectpicker'),
1651
- options = typeof _option == 'object' && _option;
1652
-
1653
- if (!data) {
1654
- var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);
1655
- config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), $this.data().template, options.template);
1656
- $this.data('selectpicker', (data = new Selectpicker(this, config, _event)));
1657
- } else if (options) {
1658
- for (var i in options) {
1659
- if (options.hasOwnProperty(i)) {
1660
- data.options[i] = options[i];
1661
- }
1662
- }
1663
- }
1664
-
1665
- if (typeof _option == 'string') {
1666
- if (data[_option] instanceof Function) {
1667
- value = data[_option].apply(data, args);
1668
- } else {
1669
- value = data.options[_option];
1670
- }
1671
- }
1672
- }
1673
- });
1674
-
1675
- if (typeof value !== 'undefined') {
1676
- //noinspection JSUnusedAssignment
1677
- return value;
1678
- } else {
1679
- return chain;
1680
- }
1681
- }
1682
-
1683
- var old = $.fn.selectpicker;
1684
- $.fn.selectpicker = Plugin;
1685
- $.fn.selectpicker.Constructor = Selectpicker;
1686
-
1687
- // SELECTPICKER NO CONFLICT
1688
- // ========================
1689
- $.fn.selectpicker.noConflict = function () {
1690
- $.fn.selectpicker = old;
1691
- return this;
1692
- };
1693
-
1694
- $(document)
1695
- .data('keycount', 0)
1696
- .on('keydown.bs.select', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', Selectpicker.prototype.keydown)
1697
- .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', function (e) {
1698
- e.stopPropagation();
1699
- });
1700
-
1701
- // SELECTPICKER DATA-API
1702
- // =====================
1703
- $(window).on('load.bs.select.data-api', function () {
1704
- $('.selectpicker').each(function () {
1705
- var $selectpicker = $(this);
1706
- Plugin.call($selectpicker, $selectpicker.data());
1707
- })
1708
- });
1709
- })(jQuery);
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ //<editor-fold desc="Shims">
5
+ if (!String.prototype.includes) {
6
+ (function () {
7
+ 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
8
+ var toString = {}.toString;
9
+ var defineProperty = (function () {
10
+ // IE 8 only supports `Object.defineProperty` on DOM elements
11
+ try {
12
+ var object = {};
13
+ var $defineProperty = Object.defineProperty;
14
+ var result = $defineProperty(object, object, object) && $defineProperty;
15
+ } catch (error) {
16
+ }
17
+ return result;
18
+ }());
19
+ var indexOf = ''.indexOf;
20
+ var includes = function (search) {
21
+ if (this == null) {
22
+ throw new TypeError();
23
+ }
24
+ var string = String(this);
25
+ if (search && toString.call(search) == '[object RegExp]') {
26
+ throw new TypeError();
27
+ }
28
+ var stringLength = string.length;
29
+ var searchString = String(search);
30
+ var searchLength = searchString.length;
31
+ var position = arguments.length > 1 ? arguments[1] : undefined;
32
+ // `ToInteger`
33
+ var pos = position ? Number(position) : 0;
34
+ if (pos != pos) { // better `isNaN`
35
+ pos = 0;
36
+ }
37
+ var start = Math.min(Math.max(pos, 0), stringLength);
38
+ // Avoid the `indexOf` call if no match is possible
39
+ if (searchLength + start > stringLength) {
40
+ return false;
41
+ }
42
+ return indexOf.call(string, searchString, pos) != -1;
43
+ };
44
+ if (defineProperty) {
45
+ defineProperty(String.prototype, 'includes', {
46
+ 'value': includes,
47
+ 'configurable': true,
48
+ 'writable': true
49
+ });
50
+ } else {
51
+ String.prototype.includes = includes;
52
+ }
53
+ }());
54
+ }
55
+
56
+ if (!String.prototype.startsWith) {
57
+ (function () {
58
+ 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
59
+ var defineProperty = (function () {
60
+ // IE 8 only supports `Object.defineProperty` on DOM elements
61
+ try {
62
+ var object = {};
63
+ var $defineProperty = Object.defineProperty;
64
+ var result = $defineProperty(object, object, object) && $defineProperty;
65
+ } catch (error) {
66
+ }
67
+ return result;
68
+ }());
69
+ var toString = {}.toString;
70
+ var startsWith = function (search) {
71
+ if (this == null) {
72
+ throw new TypeError();
73
+ }
74
+ var string = String(this);
75
+ if (search && toString.call(search) == '[object RegExp]') {
76
+ throw new TypeError();
77
+ }
78
+ var stringLength = string.length;
79
+ var searchString = String(search);
80
+ var searchLength = searchString.length;
81
+ var position = arguments.length > 1 ? arguments[1] : undefined;
82
+ // `ToInteger`
83
+ var pos = position ? Number(position) : 0;
84
+ if (pos != pos) { // better `isNaN`
85
+ pos = 0;
86
+ }
87
+ var start = Math.min(Math.max(pos, 0), stringLength);
88
+ // Avoid the `indexOf` call if no match is possible
89
+ if (searchLength + start > stringLength) {
90
+ return false;
91
+ }
92
+ var index = -1;
93
+ while (++index < searchLength) {
94
+ if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
95
+ return false;
96
+ }
97
+ }
98
+ return true;
99
+ };
100
+ if (defineProperty) {
101
+ defineProperty(String.prototype, 'startsWith', {
102
+ 'value': startsWith,
103
+ 'configurable': true,
104
+ 'writable': true
105
+ });
106
+ } else {
107
+ String.prototype.startsWith = startsWith;
108
+ }
109
+ }());
110
+ }
111
+
112
+ if (!Object.keys) {
113
+ Object.keys = function (
114
+ o, // object
115
+ k, // key
116
+ r // result array
117
+ ){
118
+ // initialize object and result
119
+ r=[];
120
+ // iterate over object keys
121
+ for (k in o)
122
+ // fill result array with non-prototypical keys
123
+ r.hasOwnProperty.call(o, k) && r.push(k);
124
+ // return result
125
+ return r;
126
+ };
127
+ }
128
+
129
+ $.fn.triggerNative = function (eventName) {
130
+ var el = this[0],
131
+ event;
132
+
133
+ if (el.dispatchEvent) {
134
+ if (typeof Event === 'function') {
135
+ // For modern browsers
136
+ event = new Event(eventName, {
137
+ bubbles: true
138
+ });
139
+ } else {
140
+ // For IE since it doesn't support Event constructor
141
+ event = document.createEvent('Event');
142
+ event.initEvent(eventName, true, false);
143
+ }
144
+
145
+ el.dispatchEvent(event);
146
+ } else {
147
+ if (el.fireEvent) {
148
+ event = document.createEventObject();
149
+ event.eventType = eventName;
150
+ el.fireEvent('on' + eventName, event);
151
+ }
152
+
153
+ this.trigger(eventName);
154
+ }
155
+ };
156
+ //</editor-fold>
157
+
158
+ // Case insensitive contains search
159
+ $.expr[':'].icontains = function (obj, index, meta) {
160
+ var $obj = $(obj);
161
+ var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
162
+ return haystack.includes(meta[3].toUpperCase());
163
+ };
164
+
165
+ // Case insensitive begins search
166
+ $.expr[':'].ibegins = function (obj, index, meta) {
167
+ var $obj = $(obj);
168
+ var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
169
+ return haystack.startsWith(meta[3].toUpperCase());
170
+ };
171
+
172
+ // Case and accent insensitive contains search
173
+ $.expr[':'].aicontains = function (obj, index, meta) {
174
+ var $obj = $(obj);
175
+ var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
176
+ return haystack.includes(meta[3].toUpperCase());
177
+ };
178
+
179
+ // Case and accent insensitive begins search
180
+ $.expr[':'].aibegins = function (obj, index, meta) {
181
+ var $obj = $(obj);
182
+ var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
183
+ return haystack.startsWith(meta[3].toUpperCase());
184
+ };
185
+
186
+ /**
187
+ * Remove all diatrics from the given text.
188
+ * @access private
189
+ * @param {String} text
190
+ * @returns {String}
191
+ */
192
+ function normalizeToBase(text) {
193
+ var rExps = [
194
+ {re: /[\xC0-\xC6]/g, ch: "A"},
195
+ {re: /[\xE0-\xE6]/g, ch: "a"},
196
+ {re: /[\xC8-\xCB]/g, ch: "E"},
197
+ {re: /[\xE8-\xEB]/g, ch: "e"},
198
+ {re: /[\xCC-\xCF]/g, ch: "I"},
199
+ {re: /[\xEC-\xEF]/g, ch: "i"},
200
+ {re: /[\xD2-\xD6]/g, ch: "O"},
201
+ {re: /[\xF2-\xF6]/g, ch: "o"},
202
+ {re: /[\xD9-\xDC]/g, ch: "U"},
203
+ {re: /[\xF9-\xFC]/g, ch: "u"},
204
+ {re: /[\xC7-\xE7]/g, ch: "c"},
205
+ {re: /[\xD1]/g, ch: "N"},
206
+ {re: /[\xF1]/g, ch: "n"}
207
+ ];
208
+ $.each(rExps, function () {
209
+ text = text.replace(this.re, this.ch);
210
+ });
211
+ return text;
212
+ }
213
+
214
+
215
+ function htmlEscape(html) {
216
+ var escapeMap = {
217
+ '&': '&amp;',
218
+ '<': '&lt;',
219
+ '>': '&gt;',
220
+ '"': '&quot;',
221
+ "'": '&#x27;',
222
+ '`': '&#x60;'
223
+ };
224
+ var source = '(?:' + Object.keys(escapeMap).join('|') + ')',
225
+ testRegexp = new RegExp(source),
226
+ replaceRegexp = new RegExp(source, 'g'),
227
+ string = html == null ? '' : '' + html;
228
+ return testRegexp.test(string) ? string.replace(replaceRegexp, function (match) {
229
+ return escapeMap[match];
230
+ }) : string;
231
+ }
232
+
233
+ var Selectpicker = function (element, options, e) {
234
+ if (e) {
235
+ e.stopPropagation();
236
+ e.preventDefault();
237
+ }
238
+
239
+ this.$element = $(element);
240
+ this.$newElement = null;
241
+ this.$button = null;
242
+ this.$menu = null;
243
+ this.$lis = null;
244
+ this.options = options;
245
+
246
+ // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a
247
+ // data-attribute)
248
+ if (this.options.title === null) {
249
+ this.options.title = this.$element.attr('title');
250
+ }
251
+
252
+ //Expose public methods
253
+ this.val = Selectpicker.prototype.val;
254
+ this.render = Selectpicker.prototype.render;
255
+ this.refresh = Selectpicker.prototype.refresh;
256
+ this.setStyle = Selectpicker.prototype.setStyle;
257
+ this.selectAll = Selectpicker.prototype.selectAll;
258
+ this.deselectAll = Selectpicker.prototype.deselectAll;
259
+ this.destroy = Selectpicker.prototype.destroy;
260
+ this.remove = Selectpicker.prototype.remove;
261
+ this.show = Selectpicker.prototype.show;
262
+ this.hide = Selectpicker.prototype.hide;
263
+
264
+ this.init();
265
+ };
266
+
267
+ Selectpicker.VERSION = '1.10.0';
268
+
269
+ // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
270
+ Selectpicker.DEFAULTS = {
271
+ noneSelectedText: 'Nothing selected',
272
+ noneResultsText: 'No results matched {0}',
273
+ countSelectedText: function (numSelected, numTotal) {
274
+ return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
275
+ },
276
+ maxOptionsText: function (numAll, numGroup) {
277
+ return [
278
+ (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
279
+ (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
280
+ ];
281
+ },
282
+ selectAllText: 'Select All',
283
+ deselectAllText: 'Deselect All',
284
+ doneButton: false,
285
+ doneButtonText: 'Close',
286
+ multipleSeparator: ', ',
287
+ styleBase: 'btn',
288
+ style: 'btn-default',
289
+ size: 'auto',
290
+ title: null,
291
+ selectedTextFormat: 'values',
292
+ width: false,
293
+ container: false,
294
+ hideDisabled: false,
295
+ showSubtext: false,
296
+ showIcon: true,
297
+ showContent: true,
298
+ dropupAuto: true,
299
+ header: false,
300
+ liveSearch: false,
301
+ liveSearchPlaceholder: null,
302
+ liveSearchNormalize: false,
303
+ liveSearchStyle: 'contains',
304
+ actionsBox: false,
305
+ iconBase: 'glyphicon',
306
+ tickIcon: 'glyphicon-ok',
307
+ showTick: false,
308
+ template: {
309
+ caret: '<span class="caret"></span>'
310
+ },
311
+ maxOptions: false,
312
+ mobile: false,
313
+ selectOnTab: false,
314
+ dropdownAlignRight: false
315
+ };
316
+
317
+ Selectpicker.prototype = {
318
+
319
+ constructor: Selectpicker,
320
+
321
+ init: function () {
322
+ var that = this,
323
+ id = this.$element.attr('id');
324
+
325
+ this.$element.addClass('bs-select-hidden');
326
+
327
+ // store originalIndex (key) and newIndex (value) in this.liObj for fast accessibility
328
+ // allows us to do this.$lis.eq(that.liObj[index]) instead of this.$lis.filter('[data-original-index="' + index + '"]')
329
+ this.liObj = {};
330
+ this.multiple = this.$element.prop('multiple');
331
+ this.autofocus = this.$element.prop('autofocus');
332
+ this.$newElement = this.createView();
333
+ this.$element
334
+ .after(this.$newElement)
335
+ .appendTo(this.$newElement);
336
+ this.$button = this.$newElement.children('button');
337
+ this.$menu = this.$newElement.children('.dropdown-menu');
338
+ this.$menuInner = this.$menu.children('.inner');
339
+ this.$searchbox = this.$menu.find('input');
340
+
341
+ this.$element.removeClass('bs-select-hidden');
342
+
343
+ if (this.options.dropdownAlignRight)
344
+ this.$menu.addClass('dropdown-menu-right');
345
+
346
+ if (typeof id !== 'undefined') {
347
+ this.$button.attr('data-id', id);
348
+ $('label[for="' + id + '"]').click(function (e) {
349
+ e.preventDefault();
350
+ that.$button.focus();
351
+ });
352
+ }
353
+
354
+ this.checkDisabled();
355
+ this.clickListener();
356
+ if (this.options.liveSearch) this.liveSearchListener();
357
+ this.render();
358
+ this.setStyle();
359
+ this.setWidth();
360
+ if (this.options.container) this.selectPosition();
361
+ this.$menu.data('this', this);
362
+ this.$newElement.data('this', this);
363
+ if (this.options.mobile) this.mobile();
364
+
365
+ this.$newElement.on({
366
+ 'hide.bs.dropdown': function (e) {
367
+ that.$element.trigger('hide.bs.select', e);
368
+ },
369
+ 'hidden.bs.dropdown': function (e) {
370
+ that.$element.trigger('hidden.bs.select', e);
371
+ },
372
+ 'show.bs.dropdown': function (e) {
373
+ that.$element.trigger('show.bs.select', e);
374
+ },
375
+ 'shown.bs.dropdown': function (e) {
376
+ that.$element.trigger('shown.bs.select', e);
377
+ }
378
+ });
379
+
380
+ if (that.$element[0].hasAttribute('required')) {
381
+ this.$element.on('invalid', function () {
382
+ that.$button
383
+ .addClass('bs-invalid')
384
+ .focus();
385
+
386
+ that.$element.on({
387
+ 'focus.bs.select': function () {
388
+ that.$button.focus();
389
+ that.$element.off('focus.bs.select');
390
+ },
391
+ 'shown.bs.select': function () {
392
+ that.$element
393
+ .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
394
+ .off('shown.bs.select');
395
+ },
396
+ 'rendered.bs.select': function () {
397
+ // if select is no longer invalid, remove the bs-invalid class
398
+ if (this.validity.valid) that.$button.removeClass('bs-invalid');
399
+ that.$element.off('rendered.bs.select');
400
+ }
401
+ });
402
+
403
+ });
404
+ }
405
+
406
+ setTimeout(function () {
407
+ that.$element.trigger('loaded.bs.select');
408
+ });
409
+ },
410
+
411
+ createDropdown: function () {
412
+ // Options
413
+ // If we are multiple or showTick option is set, then add the show-tick class
414
+ var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
415
+ inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
416
+ autofocus = this.autofocus ? ' autofocus' : '';
417
+ // Elements
418
+ var header = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>' + this.options.header + '</div>' : '';
419
+ var searchbox = this.options.liveSearch ?
420
+ '<div class="bs-searchbox">' +
421
+ '<input type="text" class="form-control" autocomplete="off"' +
422
+ (null === this.options.liveSearchPlaceholder ? '' : ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"') + '>' +
423
+ '</div>'
424
+ : '';
425
+ var actionsbox = this.multiple && this.options.actionsBox ?
426
+ '<div class="bs-actionsbox">' +
427
+ '<div class="btn-group btn-group-sm btn-block">' +
428
+ '<button type="button" class="actions-btn bs-select-all btn btn-default">' +
429
+ this.options.selectAllText +
430
+ '</button>' +
431
+ '<button type="button" class="actions-btn bs-deselect-all btn btn-default">' +
432
+ this.options.deselectAllText +
433
+ '</button>' +
434
+ '</div>' +
435
+ '</div>'
436
+ : '';
437
+ var donebutton = this.multiple && this.options.doneButton ?
438
+ '<div class="bs-donebutton">' +
439
+ '<div class="btn-group btn-block">' +
440
+ '<button type="button" class="btn btn-sm btn-default">' +
441
+ this.options.doneButtonText +
442
+ '</button>' +
443
+ '</div>' +
444
+ '</div>'
445
+ : '';
446
+ var drop =
447
+ '<div class="btn-group bootstrap-select' + showTick + inputGroup + '">' +
448
+ '<button type="button" class="' + this.options.styleBase + ' dropdown-toggle" data-toggle="dropdown"' + autofocus + '>' +
449
+ '<span class="filter-option pull-left"></span>&nbsp;' +
450
+ '<span class="bs-caret">' +
451
+ this.options.template.caret +
452
+ '</span>' +
453
+ '</button>' +
454
+ '<div class="dropdown-menu open">' +
455
+ header +
456
+ searchbox +
457
+ actionsbox +
458
+ '<ul class="dropdown-menu inner" role="menu">' +
459
+ '</ul>' +
460
+ donebutton +
461
+ '</div>' +
462
+ '</div>';
463
+
464
+ return $(drop);
465
+ },
466
+
467
+ createView: function () {
468
+ var $drop = this.createDropdown(),
469
+ li = this.createLi();
470
+
471
+ $drop.find('ul')[0].innerHTML = li;
472
+ return $drop;
473
+ },
474
+
475
+ reloadLi: function () {
476
+ //Remove all children.
477
+ this.destroyLi();
478
+ //Re build
479
+ var li = this.createLi();
480
+ this.$menuInner[0].innerHTML = li;
481
+ },
482
+
483
+ destroyLi: function () {
484
+ this.$menu.find('li').remove();
485
+ },
486
+
487
+ createLi: function () {
488
+ var that = this,
489
+ _li = [],
490
+ optID = 0,
491
+ titleOption = document.createElement('option'),
492
+ liIndex = -1; // increment liIndex whenever a new <li> element is created to ensure liObj is correct
493
+
494
+ // Helper functions
495
+ /**
496
+ * @param content
497
+ * @param [index]
498
+ * @param [classes]
499
+ * @param [optgroup]
500
+ * @returns {string}
501
+ */
502
+ var generateLI = function (content, index, classes, optgroup) {
503
+ return '<li' +
504
+ ((typeof classes !== 'undefined' & '' !== classes) ? ' class="' + classes + '"' : '') +
505
+ ((typeof index !== 'undefined' & null !== index) ? ' data-original-index="' + index + '"' : '') +
506
+ ((typeof optgroup !== 'undefined' & null !== optgroup) ? 'data-optgroup="' + optgroup + '"' : '') +
507
+ '>' + content + '</li>';
508
+ };
509
+
510
+ /**
511
+ * @param text
512
+ * @param [classes]
513
+ * @param [inline]
514
+ * @param [tokens]
515
+ * @returns {string}
516
+ */
517
+ var generateA = function (text, classes, inline, tokens) {
518
+ return '<a tabindex="0"' +
519
+ (typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
520
+ (typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
521
+ (that.options.liveSearchNormalize ? ' data-normalized-text="' + normalizeToBase(htmlEscape(text)) + '"' : '') +
522
+ (typeof tokens !== 'undefined' || tokens !== null ? ' data-tokens="' + tokens + '"' : '') +
523
+ '>' + text +
524
+ '<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
525
+ '</a>';
526
+ };
527
+
528
+ if (this.options.title && !this.multiple) {
529
+ // this option doesn't create a new <li> element, but does add a new option, so liIndex is decreased
530
+ // since liObj is recalculated on every refresh, liIndex needs to be decreased even if the titleOption is already appended
531
+ liIndex--;
532
+
533
+ if (!this.$element.find('.bs-title-option').length) {
534
+ // Use native JS to prepend option (faster)
535
+ var element = this.$element[0];
536
+ titleOption.className = 'bs-title-option';
537
+ titleOption.appendChild(document.createTextNode(this.options.title));
538
+ titleOption.value = '';
539
+ element.insertBefore(titleOption, element.firstChild);
540
+ // Check if selected attribute is already set on an option. If not, select the titleOption option.
541
+ if ($(element.options[element.selectedIndex]).attr('selected') === undefined) titleOption.selected = true;
542
+ }
543
+ }
544
+
545
+ this.$element.find('option').each(function (index) {
546
+ var $this = $(this);
547
+
548
+ liIndex++;
549
+
550
+ if ($this.hasClass('bs-title-option')) return;
551
+
552
+ // Get the class and text for the option
553
+ var optionClass = this.className || '',
554
+ inline = this.style.cssText,
555
+ text = $this.data('content') ? $this.data('content') : $this.html(),
556
+ tokens = $this.data('tokens') ? $this.data('tokens') : null,
557
+ subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.data('subtext') + '</small>' : '',
558
+ icon = typeof $this.data('icon') !== 'undefined' ? '<span class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></span> ' : '',
559
+ isOptgroup = this.parentNode.tagName === 'OPTGROUP',
560
+ isDisabled = this.disabled || (isOptgroup && this.parentNode.disabled);
561
+
562
+ if (icon !== '' && isDisabled) {
563
+ icon = '<span>' + icon + '</span>';
564
+ }
565
+
566
+ if (that.options.hideDisabled && isDisabled && !isOptgroup) {
567
+ liIndex--;
568
+ return;
569
+ }
570
+
571
+ if (!$this.data('content')) {
572
+ // Prepend any icon and append any subtext to the main text.
573
+ text = icon + '<span class="text">' + text + subtext + '</span>';
574
+ }
575
+
576
+ if (isOptgroup && $this.data('divider') !== true) {
577
+ var optGroupClass = ' ' + this.parentNode.className || '';
578
+
579
+ if ($this.index() === 0) { // Is it the first option of the optgroup?
580
+ optID += 1;
581
+
582
+ // Get the opt group label
583
+ var label = this.parentNode.label,
584
+ labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.parent().data('subtext') + '</small>' : '',
585
+ labelIcon = $this.parent().data('icon') ? '<span class="' + that.options.iconBase + ' ' + $this.parent().data('icon') + '"></span> ' : '';
586
+
587
+ label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
588
+
589
+ if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
590
+ liIndex++;
591
+ _li.push(generateLI('', null, 'divider', optID + 'div'));
592
+ }
593
+ liIndex++;
594
+ _li.push(generateLI(label, null, 'dropdown-header' + optGroupClass, optID));
595
+ }
596
+
597
+ if (that.options.hideDisabled && isDisabled) {
598
+ liIndex--;
599
+ return;
600
+ }
601
+
602
+ _li.push(generateLI(generateA(text, 'opt ' + optionClass + optGroupClass, inline, tokens), index, '', optID));
603
+ } else if ($this.data('divider') === true) {
604
+ _li.push(generateLI('', index, 'divider'));
605
+ } else if ($this.data('hidden') === true) {
606
+ _li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
607
+ } else {
608
+ if (this.previousElementSibling && this.previousElementSibling.tagName === 'OPTGROUP') {
609
+ liIndex++;
610
+ _li.push(generateLI('', null, 'divider', optID + 'div'));
611
+ }
612
+ _li.push(generateLI(generateA(text, optionClass, inline, tokens), index));
613
+ }
614
+
615
+ that.liObj[index] = liIndex;
616
+ });
617
+
618
+ //If we are not multiple, we don't have a selected item, and we don't have a title, select the first element so something is set in the button
619
+ if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) {
620
+ this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');
621
+ }
622
+
623
+ return _li.join('');
624
+ },
625
+
626
+ findLis: function () {
627
+ if (this.$lis == null) this.$lis = this.$menu.find('li');
628
+ return this.$lis;
629
+ },
630
+
631
+ /**
632
+ * @param [updateLi] defaults to true
633
+ */
634
+ render: function (updateLi) {
635
+ var that = this,
636
+ notDisabled;
637
+
638
+ //Update the LI to match the SELECT
639
+ if (updateLi !== false) {
640
+ this.$element.find('option').each(function (index) {
641
+ var $lis = that.findLis().eq(that.liObj[index]);
642
+
643
+ that.setDisabled(index, this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled, $lis);
644
+ that.setSelected(index, this.selected, $lis);
645
+ });
646
+ }
647
+
648
+ this.tabIndex();
649
+
650
+ var selectedItems = this.$element.find('option').map(function () {
651
+ if (this.selected) {
652
+ if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return;
653
+
654
+ var $this = $(this),
655
+ icon = $this.data('icon') && that.options.showIcon ? '<i class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></i> ' : '',
656
+ subtext;
657
+
658
+ if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {
659
+ subtext = ' <small class="text-muted">' + $this.data('subtext') + '</small>';
660
+ } else {
661
+ subtext = '';
662
+ }
663
+ if (typeof $this.attr('title') !== 'undefined') {
664
+ return $this.attr('title');
665
+ } else if ($this.data('content') && that.options.showContent) {
666
+ return $this.data('content');
667
+ } else {
668
+ return icon + $this.html() + subtext;
669
+ }
670
+ }
671
+ }).toArray();
672
+
673
+ //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled
674
+ //Convert all the values into a comma delimited string
675
+ var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator);
676
+
677
+ //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..
678
+ if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {
679
+ var max = this.options.selectedTextFormat.split('>');
680
+ if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) {
681
+ notDisabled = this.options.hideDisabled ? ', [disabled]' : '';
682
+ var totalCount = this.$element.find('option').not('[data-divider="true"], [data-hidden="true"]' + notDisabled).length,
683
+ tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedItems.length, totalCount) : this.options.countSelectedText;
684
+ title = tr8nText.replace('{0}', selectedItems.length.toString()).replace('{1}', totalCount.toString());
685
+ }
686
+ }
687
+
688
+ if (this.options.title == undefined) {
689
+ this.options.title = this.$element.attr('title');
690
+ }
691
+
692
+ if (this.options.selectedTextFormat == 'static') {
693
+ title = this.options.title;
694
+ }
695
+
696
+ //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text
697
+ if (!title) {
698
+ title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
699
+ }
700
+
701
+ //strip all html-tags and trim the result
702
+ // this.$button.attr('title', $.trim(title.replace(/<[^>]*>?/g, '')));
703
+ this.$button.children('.filter-option').html(title);
704
+
705
+ this.$element.trigger('rendered.bs.select');
706
+ },
707
+
708
+ /**
709
+ * @param [style]
710
+ * @param [status]
711
+ */
712
+ setStyle: function (style, status) {
713
+ if (this.$element.attr('class')) {
714
+ this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
715
+ }
716
+
717
+ var buttonClass = style ? style : this.options.style;
718
+
719
+ if (status == 'add') {
720
+ this.$button.addClass(buttonClass);
721
+ } else if (status == 'remove') {
722
+ this.$button.removeClass(buttonClass);
723
+ } else {
724
+ this.$button.removeClass(this.options.style);
725
+ this.$button.addClass(buttonClass);
726
+ }
727
+ },
728
+
729
+ liHeight: function (refresh) {
730
+ if (!refresh && (this.options.size === false || this.sizeInfo)) return;
731
+
732
+ var newElement = document.createElement('div'),
733
+ menu = document.createElement('div'),
734
+ menuInner = document.createElement('ul'),
735
+ divider = document.createElement('li'),
736
+ li = document.createElement('li'),
737
+ a = document.createElement('a'),
738
+ text = document.createElement('span'),
739
+ header = this.options.header && this.$menu.find('.popover-title').length > 0 ? this.$menu.find('.popover-title')[0].cloneNode(true) : null,
740
+ search = this.options.liveSearch ? document.createElement('div') : null,
741
+ actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
742
+ doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null;
743
+
744
+ text.className = 'text';
745
+ newElement.className = this.$menu[0].parentNode.className + ' open';
746
+ menu.className = 'dropdown-menu open';
747
+ menuInner.className = 'dropdown-menu inner';
748
+ divider.className = 'divider';
749
+
750
+ text.appendChild(document.createTextNode('Inner text'));
751
+ a.appendChild(text);
752
+ li.appendChild(a);
753
+ menuInner.appendChild(li);
754
+ menuInner.appendChild(divider);
755
+ if (header) menu.appendChild(header);
756
+ if (search) {
757
+ // create a span instead of input as creating an input element is slower
758
+ var input = document.createElement('span');
759
+ search.className = 'bs-searchbox';
760
+ input.className = 'form-control';
761
+ search.appendChild(input);
762
+ menu.appendChild(search);
763
+ }
764
+ if (actions) menu.appendChild(actions);
765
+ menu.appendChild(menuInner);
766
+ if (doneButton) menu.appendChild(doneButton);
767
+ newElement.appendChild(menu);
768
+
769
+ document.body.appendChild(newElement);
770
+
771
+ var liHeight = a.offsetHeight,
772
+ headerHeight = header ? header.offsetHeight : 0,
773
+ searchHeight = search ? search.offsetHeight : 0,
774
+ actionsHeight = actions ? actions.offsetHeight : 0,
775
+ doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
776
+ dividerHeight = $(divider).outerHeight(true),
777
+ // fall back to jQuery if getComputedStyle is not supported
778
+ menuStyle = typeof getComputedStyle === 'function' ? getComputedStyle(menu) : false,
779
+ $menu = menuStyle ? null : $(menu),
780
+ menuPadding = parseInt(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
781
+ parseInt(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
782
+ parseInt(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +
783
+ parseInt(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),
784
+ menuExtras = menuPadding +
785
+ parseInt(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +
786
+ parseInt(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2;
787
+
788
+ document.body.removeChild(newElement);
789
+
790
+ this.sizeInfo = {
791
+ liHeight: liHeight,
792
+ headerHeight: headerHeight,
793
+ searchHeight: searchHeight,
794
+ actionsHeight: actionsHeight,
795
+ doneButtonHeight: doneButtonHeight,
796
+ dividerHeight: dividerHeight,
797
+ menuPadding: menuPadding,
798
+ menuExtras: menuExtras
799
+ };
800
+ },
801
+
802
+ setSize: function () {
803
+ this.findLis();
804
+ this.liHeight();
805
+
806
+ if (this.options.header) this.$menu.css('padding-top', 0);
807
+ if (this.options.size === false) return;
808
+
809
+ var that = this,
810
+ $menu = this.$menu,
811
+ $menuInner = this.$menuInner,
812
+ $window = $(window),
813
+ selectHeight = this.$newElement[0].offsetHeight,
814
+ liHeight = this.sizeInfo['liHeight'],
815
+ headerHeight = this.sizeInfo['headerHeight'],
816
+ searchHeight = this.sizeInfo['searchHeight'],
817
+ actionsHeight = this.sizeInfo['actionsHeight'],
818
+ doneButtonHeight = this.sizeInfo['doneButtonHeight'],
819
+ divHeight = this.sizeInfo['dividerHeight'],
820
+ menuPadding = this.sizeInfo['menuPadding'],
821
+ menuExtras = this.sizeInfo['menuExtras'],
822
+ notDisabled = this.options.hideDisabled ? '.disabled' : '',
823
+ menuHeight,
824
+ getHeight,
825
+ selectOffsetTop,
826
+ selectOffsetBot,
827
+ posVert = function () {
828
+ selectOffsetTop = that.$newElement.offset().top - $window.scrollTop();
829
+ selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
830
+ };
831
+
832
+ posVert();
833
+
834
+ if (this.options.size === 'auto') {
835
+ var getSize = function () {
836
+ var minHeight,
837
+ hasClass = function (className, include) {
838
+ return function (element) {
839
+ if (include) {
840
+ return (element.classList ? element.classList.contains(className) : $(element).hasClass(className));
841
+ } else {
842
+ return !(element.classList ? element.classList.contains(className) : $(element).hasClass(className));
843
+ }
844
+ };
845
+ },
846
+ lis = that.$menuInner[0].getElementsByTagName('li'),
847
+ lisVisible = Array.prototype.filter ? Array.prototype.filter.call(lis, hasClass('hidden', false)) : that.$lis.not('.hidden'),
848
+ optGroup = Array.prototype.filter ? Array.prototype.filter.call(lisVisible, hasClass('dropdown-header', true)) : lisVisible.filter('.dropdown-header');
849
+
850
+ posVert();
851
+ menuHeight = selectOffsetBot - menuExtras;
852
+
853
+ if (that.options.container) {
854
+ if (!$menu.data('height')) $menu.data('height', $menu.height());
855
+ getHeight = $menu.data('height');
856
+ } else {
857
+ getHeight = $menu.height();
858
+ }
859
+
860
+ if (that.options.dropupAuto) {
861
+ that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < getHeight);
862
+ }
863
+ if (that.$newElement.hasClass('dropup')) {
864
+ menuHeight = selectOffsetTop - menuExtras;
865
+ }
866
+
867
+ if ((lisVisible.length + optGroup.length) > 3) {
868
+ minHeight = liHeight * 3 + menuExtras - 2;
869
+ } else {
870
+ minHeight = 0;
871
+ }
872
+
873
+ $menu.css({
874
+ 'max-height': menuHeight + 'px',
875
+ 'overflow': 'hidden',
876
+ 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'
877
+ });
878
+ $menuInner.css({
879
+ 'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding + 'px',
880
+ 'overflow-y': 'auto',
881
+ 'min-height': Math.max(minHeight - menuPadding, 0) + 'px'
882
+ });
883
+ };
884
+ getSize();
885
+ this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);
886
+ $window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);
887
+ } else if (this.options.size && this.options.size != 'auto' && this.$lis.not(notDisabled).length > this.options.size) {
888
+ var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index(),
889
+ divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
890
+ menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding;
891
+
892
+ if (that.options.container) {
893
+ if (!$menu.data('height')) $menu.data('height', $menu.height());
894
+ getHeight = $menu.data('height');
895
+ } else {
896
+ getHeight = $menu.height();
897
+ }
898
+
899
+ if (that.options.dropupAuto) {
900
+ //noinspection JSUnusedAssignment
901
+ this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < getHeight);
902
+ }
903
+ $menu.css({
904
+ 'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',
905
+ 'overflow': 'hidden',
906
+ 'min-height': ''
907
+ });
908
+ $menuInner.css({
909
+ 'max-height': menuHeight - menuPadding + 'px',
910
+ 'overflow-y': 'auto',
911
+ 'min-height': ''
912
+ });
913
+ }
914
+ },
915
+
916
+ setWidth: function () {
917
+ if (this.options.width === 'auto') {
918
+ this.$menu.css('min-width', '0');
919
+
920
+ // Get correct width if element is hidden
921
+ var $selectClone = this.$menu.parent().clone().appendTo('body'),
922
+ $selectClone2 = this.options.container ? this.$newElement.clone().appendTo('body') : $selectClone,
923
+ ulWidth = $selectClone.children('.dropdown-menu').outerWidth(),
924
+ btnWidth = $selectClone2.css('width', 'auto').children('button').outerWidth();
925
+
926
+ $selectClone.remove();
927
+ $selectClone2.remove();
928
+
929
+ // Set width to whatever's larger, button title or longest option
930
+ this.$newElement.css('width', Math.max(ulWidth, btnWidth) + 'px');
931
+ } else if (this.options.width === 'fit') {
932
+ // Remove inline min-width so width can be changed from 'auto'
933
+ this.$menu.css('min-width', '');
934
+ this.$newElement.css('width', '').addClass('fit-width');
935
+ } else if (this.options.width) {
936
+ // Remove inline min-width so width can be changed from 'auto'
937
+ this.$menu.css('min-width', '');
938
+ this.$newElement.css('width', this.options.width);
939
+ } else {
940
+ // Remove inline min-width/width so width can be changed
941
+ this.$menu.css('min-width', '');
942
+ this.$newElement.css('width', '');
943
+ }
944
+ // Remove fit-width class if width is changed programmatically
945
+ if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
946
+ this.$newElement.removeClass('fit-width');
947
+ }
948
+ },
949
+
950
+ selectPosition: function () {
951
+ this.$bsContainer = $('<div class="bs-container" />');
952
+
953
+ var that = this,
954
+ pos,
955
+ actualHeight,
956
+ getPlacement = function ($element) {
957
+ that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass('dropup', $element.hasClass('dropup'));
958
+ pos = $element.offset();
959
+ actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;
960
+ that.$bsContainer.css({
961
+ 'top': pos.top + actualHeight,
962
+ 'left': pos.left,
963
+ 'width': $element[0].offsetWidth
964
+ });
965
+ };
966
+
967
+ this.$button.on('click', function () {
968
+ var $this = $(this);
969
+
970
+ if (that.isDisabled()) {
971
+ return;
972
+ }
973
+
974
+ getPlacement(that.$newElement);
975
+
976
+ that.$bsContainer
977
+ .appendTo(that.options.container)
978
+ .toggleClass('open', !$this.hasClass('open'))
979
+ .append(that.$menu);
980
+ });
981
+
982
+ $(window).on('resize scroll', function () {
983
+ getPlacement(that.$newElement);
984
+ });
985
+
986
+ this.$element.on('hide.bs.select', function () {
987
+ that.$menu.data('height', that.$menu.height());
988
+ that.$bsContainer.detach();
989
+ });
990
+ },
991
+
992
+ setSelected: function (index, selected, $lis) {
993
+ if (!$lis) {
994
+ $lis = this.findLis().eq(this.liObj[index]);
995
+ }
996
+
997
+ $lis.toggleClass('selected', selected);
998
+ },
999
+
1000
+ setDisabled: function (index, disabled, $lis) {
1001
+ if (!$lis) {
1002
+ $lis = this.findLis().eq(this.liObj[index]);
1003
+ }
1004
+
1005
+ if (disabled) {
1006
+ $lis.addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1);
1007
+ } else {
1008
+ $lis.removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0);
1009
+ }
1010
+ },
1011
+
1012
+ isDisabled: function () {
1013
+ return this.$element[0].disabled;
1014
+ },
1015
+
1016
+ checkDisabled: function () {
1017
+ var that = this;
1018
+
1019
+ if (this.isDisabled()) {
1020
+ this.$newElement.addClass('disabled');
1021
+ this.$button.addClass('disabled').attr('tabindex', -1);
1022
+ } else {
1023
+ if (this.$button.hasClass('disabled')) {
1024
+ this.$newElement.removeClass('disabled');
1025
+ this.$button.removeClass('disabled');
1026
+ }
1027
+
1028
+ if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
1029
+ this.$button.removeAttr('tabindex');
1030
+ }
1031
+ }
1032
+
1033
+ this.$button.click(function () {
1034
+ return !that.isDisabled();
1035
+ });
1036
+ },
1037
+
1038
+ tabIndex: function () {
1039
+ if (this.$element.data('tabindex') !== this.$element.attr('tabindex') &&
1040
+ (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) {
1041
+ this.$element.data('tabindex', this.$element.attr('tabindex'));
1042
+ this.$button.attr('tabindex', this.$element.data('tabindex'));
1043
+ }
1044
+
1045
+ this.$element.attr('tabindex', -98);
1046
+ },
1047
+
1048
+ clickListener: function () {
1049
+ var that = this,
1050
+ $document = $(document);
1051
+
1052
+ this.$newElement.on('touchstart.dropdown', '.dropdown-menu', function (e) {
1053
+ e.stopPropagation();
1054
+ });
1055
+
1056
+ $document.data('spaceSelect', false);
1057
+
1058
+ this.$button.on('keyup', function (e) {
1059
+ if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
1060
+ e.preventDefault();
1061
+ $document.data('spaceSelect', false);
1062
+ }
1063
+ });
1064
+
1065
+ this.$button.on('click', function () {
1066
+ that.setSize();
1067
+ });
1068
+
1069
+ this.$element.on('shown.bs.select', function () {
1070
+ if (!that.options.liveSearch && !that.multiple) {
1071
+ that.$menuInner.find('.selected a').focus();
1072
+ } else if (!that.multiple) {
1073
+ var selectedIndex = that.liObj[that.$element[0].selectedIndex];
1074
+
1075
+ if (typeof selectedIndex !== 'number' || that.options.size === false) return;
1076
+
1077
+ // scroll to selected option
1078
+ var offset = that.$lis.eq(selectedIndex)[0].offsetTop - that.$menuInner[0].offsetTop;
1079
+ offset = offset - that.$menuInner[0].offsetHeight/2 + that.sizeInfo.liHeight/2;
1080
+ that.$menuInner[0].scrollTop = offset;
1081
+ }
1082
+ });
1083
+
1084
+ this.$menuInner.on('click', 'li a', function (e) {
1085
+ var $this = $(this),
1086
+ clickedIndex = $this.parent().data('originalIndex'),
1087
+ prevValue = that.$element.val(),
1088
+ prevIndex = that.$element.prop('selectedIndex');
1089
+
1090
+ // Don't close on multi choice menu
1091
+ if (that.multiple) {
1092
+ e.stopPropagation();
1093
+ }
1094
+
1095
+ e.preventDefault();
1096
+
1097
+ //Don't run if we have been disabled
1098
+ if (!that.isDisabled() && !$this.parent().hasClass('disabled')) {
1099
+ var $options = that.$element.find('option'),
1100
+ $option = $options.eq(clickedIndex),
1101
+ state = $option.prop('selected'),
1102
+ $optgroup = $option.parent('optgroup'),
1103
+ maxOptions = that.options.maxOptions,
1104
+ maxOptionsGrp = $optgroup.data('maxOptions') || false;
1105
+
1106
+ if (!that.multiple) { // Deselect all others if not multi select box
1107
+ $options.prop('selected', false);
1108
+ $option.prop('selected', true);
1109
+ that.$menuInner.find('.selected').removeClass('selected');
1110
+ that.setSelected(clickedIndex, true);
1111
+ } else { // Toggle the one we have chosen if we are multi select.
1112
+ $option.prop('selected', !state);
1113
+ that.setSelected(clickedIndex, !state);
1114
+ $this.blur();
1115
+
1116
+ if (maxOptions !== false || maxOptionsGrp !== false) {
1117
+ var maxReached = maxOptions < $options.filter(':selected').length,
1118
+ maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
1119
+
1120
+ if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
1121
+ if (maxOptions && maxOptions == 1) {
1122
+ $options.prop('selected', false);
1123
+ $option.prop('selected', true);
1124
+ that.$menuInner.find('.selected').removeClass('selected');
1125
+ that.setSelected(clickedIndex, true);
1126
+ } else if (maxOptionsGrp && maxOptionsGrp == 1) {
1127
+ $optgroup.find('option:selected').prop('selected', false);
1128
+ $option.prop('selected', true);
1129
+ var optgroupID = $this.parent().data('optgroup');
1130
+ that.$menuInner.find('[data-optgroup="' + optgroupID + '"]').removeClass('selected');
1131
+ that.setSelected(clickedIndex, true);
1132
+ } else {
1133
+ var maxOptionsArr = (typeof that.options.maxOptionsText === 'function') ?
1134
+ that.options.maxOptionsText(maxOptions, maxOptionsGrp) : that.options.maxOptionsText,
1135
+ maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
1136
+ maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
1137
+ $notify = $('<div class="notify"></div>');
1138
+ // If {var} is set in array, replace it
1139
+ /** @deprecated */
1140
+ if (maxOptionsArr[2]) {
1141
+ maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
1142
+ maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
1143
+ }
1144
+
1145
+ $option.prop('selected', false);
1146
+
1147
+ that.$menu.append($notify);
1148
+
1149
+ if (maxOptions && maxReached) {
1150
+ $notify.append($('<div>' + maxTxt + '</div>'));
1151
+ that.$element.trigger('maxReached.bs.select');
1152
+ }
1153
+
1154
+ if (maxOptionsGrp && maxReachedGrp) {
1155
+ $notify.append($('<div>' + maxTxtGrp + '</div>'));
1156
+ that.$element.trigger('maxReachedGrp.bs.select');
1157
+ }
1158
+
1159
+ setTimeout(function () {
1160
+ that.setSelected(clickedIndex, false);
1161
+ }, 10);
1162
+
1163
+ $notify.delay(750).fadeOut(300, function () {
1164
+ $(this).remove();
1165
+ });
1166
+ }
1167
+ }
1168
+ }
1169
+ }
1170
+
1171
+ if (!that.multiple) {
1172
+ that.$button.focus();
1173
+ } else if (that.options.liveSearch) {
1174
+ that.$searchbox.focus();
1175
+ }
1176
+
1177
+ // Trigger select 'change'
1178
+ if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) {
1179
+ // $option.prop('selected') is current option state (selected/unselected). state is previous option state.
1180
+ that.$element
1181
+ .trigger('changed.bs.select', [clickedIndex, $option.prop('selected'), state])
1182
+ .triggerNative('change');
1183
+ }
1184
+ }
1185
+ });
1186
+
1187
+ this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {
1188
+ if (e.currentTarget == this) {
1189
+ e.preventDefault();
1190
+ e.stopPropagation();
1191
+ if (that.options.liveSearch && !$(e.target).hasClass('close')) {
1192
+ that.$searchbox.focus();
1193
+ } else {
1194
+ that.$button.focus();
1195
+ }
1196
+ }
1197
+ });
1198
+
1199
+ this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
1200
+ e.preventDefault();
1201
+ e.stopPropagation();
1202
+ if (that.options.liveSearch) {
1203
+ that.$searchbox.focus();
1204
+ } else {
1205
+ that.$button.focus();
1206
+ }
1207
+ });
1208
+
1209
+ this.$menu.on('click', '.popover-title .close', function () {
1210
+ that.$button.click();
1211
+ });
1212
+
1213
+ this.$searchbox.on('click', function (e) {
1214
+ e.stopPropagation();
1215
+ });
1216
+
1217
+ this.$menu.on('click', '.actions-btn', function (e) {
1218
+ if (that.options.liveSearch) {
1219
+ that.$searchbox.focus();
1220
+ } else {
1221
+ that.$button.focus();
1222
+ }
1223
+
1224
+ e.preventDefault();
1225
+ e.stopPropagation();
1226
+
1227
+ if ($(this).hasClass('bs-select-all')) {
1228
+ that.selectAll();
1229
+ } else {
1230
+ that.deselectAll();
1231
+ }
1232
+ });
1233
+
1234
+ this.$element.change(function () {
1235
+ that.render(false);
1236
+ });
1237
+ },
1238
+
1239
+ liveSearchListener: function () {
1240
+ var that = this,
1241
+ $no_results = $('<li class="no-results"></li>');
1242
+
1243
+ this.$button.on('click.dropdown.data-api touchstart.dropdown.data-api', function () {
1244
+ that.$menuInner.find('.active').removeClass('active');
1245
+ if (!!that.$searchbox.val()) {
1246
+ that.$searchbox.val('');
1247
+ that.$lis.not('.is-hidden').removeClass('hidden');
1248
+ if (!!$no_results.parent().length) $no_results.remove();
1249
+ }
1250
+ if (!that.multiple) that.$menuInner.find('.selected').addClass('active');
1251
+ setTimeout(function () {
1252
+ that.$searchbox.focus();
1253
+ }, 10);
1254
+ });
1255
+
1256
+ this.$searchbox.on('click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api', function (e) {
1257
+ e.stopPropagation();
1258
+ });
1259
+
1260
+ this.$searchbox.on('input propertychange', function () {
1261
+ if (that.$searchbox.val()) {
1262
+ var $searchBase = that.$lis.not('.is-hidden').removeClass('hidden').children('a');
1263
+ if (that.options.liveSearchNormalize) {
1264
+ $searchBase = $searchBase.not(':a' + that._searchStyle() + '("' + normalizeToBase(that.$searchbox.val()) + '")');
1265
+ } else {
1266
+ $searchBase = $searchBase.not(':' + that._searchStyle() + '("' + that.$searchbox.val() + '")');
1267
+ }
1268
+ $searchBase.parent().addClass('hidden');
1269
+
1270
+ that.$lis.filter('.dropdown-header').each(function () {
1271
+ var $this = $(this),
1272
+ optgroup = $this.data('optgroup');
1273
+
1274
+ if (that.$lis.filter('[data-optgroup=' + optgroup + ']').not($this).not('.hidden').length === 0) {
1275
+ $this.addClass('hidden');
1276
+ that.$lis.filter('[data-optgroup=' + optgroup + 'div]').addClass('hidden');
1277
+ }
1278
+ });
1279
+
1280
+ var $lisVisible = that.$lis.not('.hidden');
1281
+
1282
+ // hide divider if first or last visible, or if followed by another divider
1283
+ $lisVisible.each(function (index) {
1284
+ var $this = $(this);
1285
+
1286
+ if ($this.hasClass('divider') && (
1287
+ $this.index() === $lisVisible.first().index() ||
1288
+ $this.index() === $lisVisible.last().index() ||
1289
+ $lisVisible.eq(index + 1).hasClass('divider'))) {
1290
+ $this.addClass('hidden');
1291
+ }
1292
+ });
1293
+
1294
+ if (!that.$lis.not('.hidden, .no-results').length) {
1295
+ if (!!$no_results.parent().length) {
1296
+ $no_results.remove();
1297
+ }
1298
+ $no_results.html(that.options.noneResultsText.replace('{0}', '"' + htmlEscape(that.$searchbox.val()) + '"')).show();
1299
+ that.$menuInner.append($no_results);
1300
+ } else if (!!$no_results.parent().length) {
1301
+ $no_results.remove();
1302
+ }
1303
+ } else {
1304
+ that.$lis.not('.is-hidden').removeClass('hidden');
1305
+ if (!!$no_results.parent().length) {
1306
+ $no_results.remove();
1307
+ }
1308
+ }
1309
+
1310
+ that.$lis.filter('.active').removeClass('active');
1311
+ if (that.$searchbox.val()) that.$lis.not('.hidden, .divider, .dropdown-header').eq(0).addClass('active').children('a').focus();
1312
+ $(this).focus();
1313
+ });
1314
+ },
1315
+
1316
+ _searchStyle: function () {
1317
+ var styles = {
1318
+ begins: 'ibegins',
1319
+ startsWith: 'ibegins'
1320
+ };
1321
+
1322
+ return styles[this.options.liveSearchStyle] || 'icontains';
1323
+ },
1324
+
1325
+ val: function (value) {
1326
+ if (typeof value !== 'undefined') {
1327
+ this.$element.val(value);
1328
+ this.render();
1329
+
1330
+ return this.$element;
1331
+ } else {
1332
+ return this.$element.val();
1333
+ }
1334
+ },
1335
+
1336
+ changeAll: function (status) {
1337
+ if (typeof status === 'undefined') status = true;
1338
+
1339
+ this.findLis();
1340
+
1341
+ var $options = this.$element.find('option'),
1342
+ $lisVisible = this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').toggleClass('selected', status),
1343
+ lisVisLen = $lisVisible.length,
1344
+ selectedOptions = [];
1345
+
1346
+ for (var i = 0; i < lisVisLen; i++) {
1347
+ var origIndex = $lisVisible[i].getAttribute('data-original-index');
1348
+ selectedOptions[selectedOptions.length] = $options.eq(origIndex)[0];
1349
+ }
1350
+
1351
+ $(selectedOptions).prop('selected', status);
1352
+
1353
+ this.render(false);
1354
+
1355
+ this.$element
1356
+ .trigger('changed.bs.select')
1357
+ .triggerNative('change');
1358
+ },
1359
+
1360
+ selectAll: function () {
1361
+ return this.changeAll(true);
1362
+ },
1363
+
1364
+ deselectAll: function () {
1365
+ return this.changeAll(false);
1366
+ },
1367
+
1368
+ toggle: function (e) {
1369
+ e = e || window.event;
1370
+
1371
+ if (e) e.stopPropagation();
1372
+
1373
+ this.$button.trigger('click');
1374
+ },
1375
+
1376
+ keydown: function (e) {
1377
+ var $this = $(this),
1378
+ $parent = $this.is('input') ? $this.parent().parent() : $this.parent(),
1379
+ $items,
1380
+ that = $parent.data('this'),
1381
+ index,
1382
+ next,
1383
+ first,
1384
+ last,
1385
+ prev,
1386
+ nextPrev,
1387
+ prevIndex,
1388
+ isActive,
1389
+ selector = ':not(.disabled, .hidden, .dropdown-header, .divider)',
1390
+ keyCodeMap = {
1391
+ 32: ' ',
1392
+ 48: '0',
1393
+ 49: '1',
1394
+ 50: '2',
1395
+ 51: '3',
1396
+ 52: '4',
1397
+ 53: '5',
1398
+ 54: '6',
1399
+ 55: '7',
1400
+ 56: '8',
1401
+ 57: '9',
1402
+ 59: ';',
1403
+ 65: 'a',
1404
+ 66: 'b',
1405
+ 67: 'c',
1406
+ 68: 'd',
1407
+ 69: 'e',
1408
+ 70: 'f',
1409
+ 71: 'g',
1410
+ 72: 'h',
1411
+ 73: 'i',
1412
+ 74: 'j',
1413
+ 75: 'k',
1414
+ 76: 'l',
1415
+ 77: 'm',
1416
+ 78: 'n',
1417
+ 79: 'o',
1418
+ 80: 'p',
1419
+ 81: 'q',
1420
+ 82: 'r',
1421
+ 83: 's',
1422
+ 84: 't',
1423
+ 85: 'u',
1424
+ 86: 'v',
1425
+ 87: 'w',
1426
+ 88: 'x',
1427
+ 89: 'y',
1428
+ 90: 'z',
1429
+ 96: '0',
1430
+ 97: '1',
1431
+ 98: '2',
1432
+ 99: '3',
1433
+ 100: '4',
1434
+ 101: '5',
1435
+ 102: '6',
1436
+ 103: '7',
1437
+ 104: '8',
1438
+ 105: '9'
1439
+ };
1440
+
1441
+ if (that.options.liveSearch) $parent = $this.parent().parent();
1442
+
1443
+ if (that.options.container) $parent = that.$menu;
1444
+
1445
+ $items = $('[role=menu] li', $parent);
1446
+
1447
+ isActive = that.$newElement.hasClass('open');
1448
+
1449
+ if (!isActive && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 65 && e.keyCode <= 90)) {
1450
+ if (!that.options.container) {
1451
+ that.setSize();
1452
+ that.$menu.parent().addClass('open');
1453
+ isActive = true;
1454
+ } else {
1455
+ that.$button.trigger('click');
1456
+ }
1457
+ that.$searchbox.focus();
1458
+ }
1459
+
1460
+ if (that.options.liveSearch) {
1461
+ if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && that.$menu.find('.active').length === 0) {
1462
+ e.preventDefault();
1463
+ that.$menu.parent().removeClass('open');
1464
+ if (that.options.container) that.$newElement.removeClass('open');
1465
+ that.$button.focus();
1466
+ }
1467
+ // $items contains li elements when liveSearch is enabled
1468
+ $items = $('[role=menu] li' + selector, $parent);
1469
+ if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {
1470
+ if ($items.filter('.active').length === 0) {
1471
+ $items = that.$menuInner.find('li');
1472
+ if (that.options.liveSearchNormalize) {
1473
+ $items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
1474
+ } else {
1475
+ $items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');
1476
+ }
1477
+ }
1478
+ }
1479
+ }
1480
+
1481
+ if (!$items.length) return;
1482
+
1483
+ if (/(38|40)/.test(e.keyCode.toString(10))) {
1484
+ index = $items.index($items.find('a').filter(':focus').parent());
1485
+ first = $items.filter(selector).first().index();
1486
+ last = $items.filter(selector).last().index();
1487
+ next = $items.eq(index).nextAll(selector).eq(0).index();
1488
+ prev = $items.eq(index).prevAll(selector).eq(0).index();
1489
+ nextPrev = $items.eq(next).prevAll(selector).eq(0).index();
1490
+
1491
+ if (that.options.liveSearch) {
1492
+ $items.each(function (i) {
1493
+ if (!$(this).hasClass('disabled')) {
1494
+ $(this).data('index', i);
1495
+ }
1496
+ });
1497
+ index = $items.index($items.filter('.active'));
1498
+ first = $items.first().data('index');
1499
+ last = $items.last().data('index');
1500
+ next = $items.eq(index).nextAll().eq(0).data('index');
1501
+ prev = $items.eq(index).prevAll().eq(0).data('index');
1502
+ nextPrev = $items.eq(next).prevAll().eq(0).data('index');
1503
+ }
1504
+
1505
+ prevIndex = $this.data('prevIndex');
1506
+
1507
+ if (e.keyCode == 38) {
1508
+ if (that.options.liveSearch) index--;
1509
+ if (index != nextPrev && index > prev) index = prev;
1510
+ if (index < first) index = first;
1511
+ if (index == prevIndex) index = last;
1512
+ } else if (e.keyCode == 40) {
1513
+ if (that.options.liveSearch) index++;
1514
+ if (index == -1) index = 0;
1515
+ if (index != nextPrev && index < next) index = next;
1516
+ if (index > last) index = last;
1517
+ if (index == prevIndex) index = first;
1518
+ }
1519
+
1520
+ $this.data('prevIndex', index);
1521
+
1522
+ if (!that.options.liveSearch) {
1523
+ $items.eq(index).children('a').focus();
1524
+ } else {
1525
+ e.preventDefault();
1526
+ if (!$this.hasClass('dropdown-toggle')) {
1527
+ $items.removeClass('active').eq(index).addClass('active').children('a').focus();
1528
+ $this.focus();
1529
+ }
1530
+ }
1531
+
1532
+ } else if (!$this.is('input')) {
1533
+ var keyIndex = [],
1534
+ count,
1535
+ prevKey;
1536
+
1537
+ $items.each(function () {
1538
+ if (!$(this).hasClass('disabled')) {
1539
+ if ($.trim($(this).children('a').text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {
1540
+ keyIndex.push($(this).index());
1541
+ }
1542
+ }
1543
+ });
1544
+
1545
+ count = $(document).data('keycount');
1546
+ count++;
1547
+ $(document).data('keycount', count);
1548
+
1549
+ prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1);
1550
+
1551
+ if (prevKey != keyCodeMap[e.keyCode]) {
1552
+ count = 1;
1553
+ $(document).data('keycount', count);
1554
+ } else if (count >= keyIndex.length) {
1555
+ $(document).data('keycount', 0);
1556
+ if (count > keyIndex.length) count = 1;
1557
+ }
1558
+
1559
+ $items.eq(keyIndex[count - 1]).children('a').focus();
1560
+ }
1561
+
1562
+ // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
1563
+ if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {
1564
+ if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();
1565
+ if (!that.options.liveSearch) {
1566
+ var elem = $(':focus');
1567
+ elem.click();
1568
+ // Bring back focus for multiselects
1569
+ elem.focus();
1570
+ // Prevent screen from scrolling if the user hit the spacebar
1571
+ e.preventDefault();
1572
+ // Fixes spacebar selection of dropdown items in FF & IE
1573
+ $(document).data('spaceSelect', true);
1574
+ } else if (!/(32)/.test(e.keyCode.toString(10))) {
1575
+ that.$menuInner.find('.active a').click();
1576
+ $this.focus();
1577
+ }
1578
+ $(document).data('keycount', 0);
1579
+ }
1580
+
1581
+ if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) {
1582
+ that.$menu.parent().removeClass('open');
1583
+ if (that.options.container) that.$newElement.removeClass('open');
1584
+ that.$button.focus();
1585
+ }
1586
+ },
1587
+
1588
+ mobile: function () {
1589
+ this.$element.addClass('mobile-device');
1590
+ },
1591
+
1592
+ refresh: function () {
1593
+ this.$lis = null;
1594
+ this.liObj = {};
1595
+ this.reloadLi();
1596
+ this.render();
1597
+ this.checkDisabled();
1598
+ this.liHeight(true);
1599
+ this.setStyle();
1600
+ this.setWidth();
1601
+ if (this.$lis) this.$searchbox.trigger('propertychange');
1602
+
1603
+ this.$element.trigger('refreshed.bs.select');
1604
+ },
1605
+
1606
+ hide: function () {
1607
+ this.$newElement.hide();
1608
+ },
1609
+
1610
+ show: function () {
1611
+ this.$newElement.show();
1612
+ },
1613
+
1614
+ remove: function () {
1615
+ this.$newElement.remove();
1616
+ this.$element.remove();
1617
+ },
1618
+
1619
+ destroy: function () {
1620
+ this.$newElement.before(this.$element).remove();
1621
+
1622
+ if (this.$bsContainer) {
1623
+ this.$bsContainer.remove();
1624
+ } else {
1625
+ this.$menu.remove();
1626
+ }
1627
+
1628
+ this.$element
1629
+ .off('.bs.select')
1630
+ .removeData('selectpicker')
1631
+ .removeClass('bs-select-hidden selectpicker');
1632
+ }
1633
+ };
1634
+
1635
+ // SELECTPICKER PLUGIN DEFINITION
1636
+ // ==============================
1637
+ function Plugin(option, event) {
1638
+ // get the args of the outer function..
1639
+ var args = arguments;
1640
+ // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
1641
+ // to get lost/corrupted in android 2.3 and IE9 #715 #775
1642
+ var _option = option,
1643
+ _event = event;
1644
+ [].shift.apply(args);
1645
+
1646
+ var value;
1647
+ var chain = this.each(function () {
1648
+ var $this = $(this);
1649
+ if ($this.is('select')) {
1650
+ var data = $this.data('selectpicker'),
1651
+ options = typeof _option == 'object' && _option;
1652
+
1653
+ if (!data) {
1654
+ var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);
1655
+ config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), $this.data().template, options.template);
1656
+ $this.data('selectpicker', (data = new Selectpicker(this, config, _event)));
1657
+ } else if (options) {
1658
+ for (var i in options) {
1659
+ if (options.hasOwnProperty(i)) {
1660
+ data.options[i] = options[i];
1661
+ }
1662
+ }
1663
+ }
1664
+
1665
+ if (typeof _option == 'string') {
1666
+ if (data[_option] instanceof Function) {
1667
+ value = data[_option].apply(data, args);
1668
+ } else {
1669
+ value = data.options[_option];
1670
+ }
1671
+ }
1672
+ }
1673
+ });
1674
+
1675
+ if (typeof value !== 'undefined') {
1676
+ //noinspection JSUnusedAssignment
1677
+ return value;
1678
+ } else {
1679
+ return chain;
1680
+ }
1681
+ }
1682
+
1683
+ var old = $.fn.selectpicker;
1684
+ $.fn.selectpicker = Plugin;
1685
+ $.fn.selectpicker.Constructor = Selectpicker;
1686
+
1687
+ // SELECTPICKER NO CONFLICT
1688
+ // ========================
1689
+ $.fn.selectpicker.noConflict = function () {
1690
+ $.fn.selectpicker = old;
1691
+ return this;
1692
+ };
1693
+
1694
+ $(document)
1695
+ .data('keycount', 0)
1696
+ .on('keydown.bs.select', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', Selectpicker.prototype.keydown)
1697
+ .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input', function (e) {
1698
+ e.stopPropagation();
1699
+ });
1700
+
1701
+ // SELECTPICKER DATA-API
1702
+ // =====================
1703
+ $(window).on('load.bs.select.data-api', function () {
1704
+ $('.selectpicker').each(function () {
1705
+ var $selectpicker = $(this);
1706
+ Plugin.call($selectpicker, $selectpicker.data());
1707
+ })
1708
+ });
1709
+ })(jQuery);
inc/js/bootstrap.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return o}g=g&&g.hasOwnProperty("default")?g.default:g,u=u&&u.hasOwnProperty("default")?u.default:u;var e="transitionend";function n(t){var e=this,n=!1;return g(this).one(_.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||_.triggerTransitionEnd(e)},t),this}var _={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=g(t).css("transition-duration"),n=g(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){g(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&_.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?_.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null}};g.fn.emulateTransitionEnd=n,g.event.special[_.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(g(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var o="alert",r="bs.alert",a="."+r,c=g.fn[o],h={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",d="fade",m="show",p=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){g.removeData(this._element,r),this._element=null},t._getRootElement=function(t){var e=_.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=g(t).closest("."+f)[0]),n},t._triggerCloseEvent=function(t){var e=g.Event(h.CLOSE);return g(t).trigger(e),e},t._removeElement=function(e){var n=this;if(g(e).removeClass(m),g(e).hasClass(d)){var t=_.getTransitionDurationFromElement(e);g(e).one(_.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){g(t).detach().trigger(h.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(r);e||(e=new i(this),t.data(r,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',p._handleDismiss(new p)),g.fn[o]=p._jQueryInterface,g.fn[o].Constructor=p,g.fn[o].noConflict=function(){return g.fn[o]=c,p._jQueryInterface};var v="button",y="bs.button",E="."+y,C=".data-api",T=g.fn[v],S="active",b="btn",I="focus",D='[data-toggle^="button"]',w='[data-toggle="buttons"]',A='input:not([type="hidden"])',N=".active",O=".btn",k={CLICK_DATA_API:"click"+E+C,FOCUS_BLUR_DATA_API:"focus"+E+C+" blur"+E+C},P=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=g(this._element).closest(w)[0];if(n){var i=this._element.querySelector(A);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(S))t=!1;else{var o=n.querySelector(N);o&&g(o).removeClass(S)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(S),g(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(S)),t&&g(this._element).toggleClass(S)},t.dispose=function(){g.removeData(this._element,y),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(y);t||(t=new n(this),g(this).data(y,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();g(document).on(k.CLICK_DATA_API,D,function(t){t.preventDefault();var e=t.target;g(e).hasClass(b)||(e=g(e).closest(O)),P._jQueryInterface.call(g(e),"toggle")}).on(k.FOCUS_BLUR_DATA_API,D,function(t){var e=g(t.target).closest(O)[0];g(e).toggleClass(I,/^focus(in)?$/.test(t.type))}),g.fn[v]=P._jQueryInterface,g.fn[v].Constructor=P,g.fn[v].noConflict=function(){return g.fn[v]=T,P._jQueryInterface};var L="carousel",j="bs.carousel",H="."+j,R=".data-api",x=g.fn[L],F={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},U={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},W="next",q="prev",M="left",K="right",Q={SLIDE:"slide"+H,SLID:"slid"+H,KEYDOWN:"keydown"+H,MOUSEENTER:"mouseenter"+H,MOUSELEAVE:"mouseleave"+H,TOUCHSTART:"touchstart"+H,TOUCHMOVE:"touchmove"+H,TOUCHEND:"touchend"+H,POINTERDOWN:"pointerdown"+H,POINTERUP:"pointerup"+H,DRAG_START:"dragstart"+H,LOAD_DATA_API:"load"+H+R,CLICK_DATA_API:"click"+H+R},B="carousel",V="active",Y="slide",z="carousel-item-right",X="carousel-item-left",$="carousel-item-next",G="carousel-item-prev",J="pointer-event",Z=".active",tt=".active.carousel-item",et=".carousel-item",nt=".carousel-item img",it=".carousel-item-next, .carousel-item-prev",ot=".carousel-indicators",rt="[data-slide], [data-slide-to]",st='[data-ride="carousel"]',at={TOUCH:"touch",PEN:"pen"},lt=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(ot),this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(W)},t.nextWhenVisible=function(){!document.hidden&&g(this._element).is(":visible")&&"hidden"!==g(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(q)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(it)&&(_.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(tt);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?W:q;this._slide(i,this._items[t])}},t.dispose=function(){g(this._element).off(H),g.removeData(this._element,j),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},F,t),_.typeCheckConfig(L,t,U),t},t._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;0<e&&this.prev(),e<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&g(this._element).on(Q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&g(this._element).on(Q.MOUSEENTER,function(t){return e.pause(t)}).on(Q.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var n=this;if(this._touchSupported){var e=function(t){n._pointerEvent&&at[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){n._pointerEvent&&at[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX),n._handleSwipe(),"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))};g(this._element.querySelectorAll(nt)).on(Q.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(g(this._element).on(Q.POINTERDOWN,function(t){return e(t)}),g(this._element).on(Q.POINTERUP,function(t){return i(t)}),this._element.classList.add(J)):(g(this._element).on(Q.TOUCHSTART,function(t){return e(t)}),g(this._element).on(Q.TOUCHMOVE,function(t){var e;(e=t).originalEvent.touches&&1<e.originalEvent.touches.length?n.touchDeltaX=0:n.touchDeltaX=e.originalEvent.touches[0].clientX-n.touchStartX}),g(this._element).on(Q.TOUCHEND,function(t){return i(t)}))}},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(et)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===W,i=t===q,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===q?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(tt)),o=g.Event(Q.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return g(this._element).trigger(o),o},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(Z));g(e).removeClass(V);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&g(n).addClass(V)}},t._slide=function(t,e){var n,i,o,r=this,s=this._element.querySelector(tt),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(o=t===W?(n=X,i=$,M):(n=z,i=G,K),l&&g(l).hasClass(V))this._isSliding=!1;else if(!this._triggerSlideEvent(l,o).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=g.Event(Q.SLID,{relatedTarget:l,direction:o,from:a,to:c});if(g(this._element).hasClass(Y)){g(l).addClass(i),_.reflow(l),g(s).addClass(n),g(l).addClass(n);var f=parseInt(l.getAttribute("data-interval"),10);this._config.interval=f?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,f):this._config.defaultInterval||this._config.interval;var d=_.getTransitionDurationFromElement(s);g(s).one(_.TRANSITION_END,function(){g(l).removeClass(n+" "+i).addClass(V),g(s).removeClass(V+" "+i+" "+n),r._isSliding=!1,setTimeout(function(){return g(r._element).trigger(u)},0)}).emulateTransitionEnd(d)}else g(s).removeClass(V),g(l).addClass(V),this._isSliding=!1,g(this._element).trigger(u);h&&this.cycle()}},r._jQueryInterface=function(i){return this.each(function(){var t=g(this).data(j),e=l({},F,g(this).data());"object"==typeof i&&(e=l({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new r(this,e),g(this).data(j,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&e.ride&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e=_.getSelectorFromElement(this);if(e){var n=g(e)[0];if(n&&g(n).hasClass(B)){var i=l({},g(n).data(),g(this).data()),o=this.getAttribute("data-slide-to");o&&(i.interval=!1),r._jQueryInterface.call(g(n),i),o&&g(n).data(j).to(o),t.preventDefault()}}},s(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return F}}]),r}();g(document).on(Q.CLICK_DATA_API,rt,lt._dataApiClickHandler),g(window).on(Q.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(st)),e=0,n=t.length;e<n;e++){var i=g(t[e]);lt._jQueryInterface.call(i,i.data())}}),g.fn[L]=lt._jQueryInterface,g.fn[L].Constructor=lt,g.fn[L].noConflict=function(){return g.fn[L]=x,lt._jQueryInterface};var ct="collapse",ht="bs.collapse",ut="."+ht,ft=g.fn[ct],dt={toggle:!0,parent:""},gt={toggle:"boolean",parent:"(string|element)"},_t={SHOW:"show"+ut,SHOWN:"shown"+ut,HIDE:"hide"+ut,HIDDEN:"hidden"+ut,CLICK_DATA_API:"click"+ut+".data-api"},mt="show",pt="collapse",vt="collapsing",yt="collapsed",Et="width",Ct="height",Tt=".show, .collapsing",St='[data-toggle="collapse"]',bt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(St)),i=0,o=n.length;i<o;i++){var r=n[i],s=_.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){g(this._element).hasClass(mt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!g(this._element).hasClass(mt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Tt)).filter(function(t){return"string"==typeof n._config.parent?t.getAttribute("data-parent")===n._config.parent:t.classList.contains(pt)})).length&&(t=null),!(t&&(e=g(t).not(this._selector).data(ht))&&e._isTransitioning))){var i=g.Event(_t.SHOW);if(g(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(g(t).not(this._selector),"hide"),e||g(t).data(ht,null));var o=this._getDimension();g(this._element).removeClass(pt).addClass(vt),this._element.style[o]=0,this._triggerArray.length&&g(this._triggerArray).removeClass(yt).attr("aria-expanded",!0),this.setTransitioning(!0);var r="scroll"+(o[0].toUpperCase()+o.slice(1)),s=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){g(n._element).removeClass(vt).addClass(pt).addClass(mt),n._element.style[o]="",n.setTransitioning(!1),g(n._element).trigger(_t.SHOWN)}).emulateTransitionEnd(s),this._element.style[o]=this._element[r]+"px"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&g(this._element).hasClass(mt)){var e=g.Event(_t.HIDE);if(g(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",_.reflow(this._element),g(this._element).addClass(vt).removeClass(pt).removeClass(mt);var i=this._triggerArray.length;if(0<i)for(var o=0;o<i;o++){var r=this._triggerArray[o],s=_.getSelectorFromElement(r);if(null!==s)g([].slice.call(document.querySelectorAll(s))).hasClass(mt)||g(r).addClass(yt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){t.setTransitioning(!1),g(t._element).removeClass(vt).addClass(pt).trigger(_t.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){g.removeData(this._element,ht),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},dt,t)).toggle=Boolean(t.toggle),_.typeCheckConfig(ct,t,gt),t},t._getDimension=function(){return g(this._element).hasClass(Et)?Et:Ct},t._getParent=function(){var t,n=this;_.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return g(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){var n=g(t).hasClass(mt);e.length&&g(e).toggleClass(yt,!n).attr("aria-expanded",n)},a._getTargetFromElement=function(t){var e=_.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=g(this),e=t.data(ht),n=l({},dt,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(ht,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return dt}}]),a}();g(document).on(_t.CLICK_DATA_API,St,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=g(this),e=_.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));g(i).each(function(){var t=g(this),e=t.data(ht)?"toggle":n.data();bt._jQueryInterface.call(t,e)})}),g.fn[ct]=bt._jQueryInterface,g.fn[ct].Constructor=bt,g.fn[ct].noConflict=function(){return g.fn[ct]=ft,bt._jQueryInterface};var It="dropdown",Dt="bs.dropdown",wt="."+Dt,At=".data-api",Nt=g.fn[It],Ot=new RegExp("38|40|27"),kt={HIDE:"hide"+wt,HIDDEN:"hidden"+wt,SHOW:"show"+wt,SHOWN:"shown"+wt,CLICK:"click"+wt,CLICK_DATA_API:"click"+wt+At,KEYDOWN_DATA_API:"keydown"+wt+At,KEYUP_DATA_API:"keyup"+wt+At},Pt="disabled",Lt="show",jt="dropup",Ht="dropright",Rt="dropleft",xt="dropdown-menu-right",Ft="position-static",Ut='[data-toggle="dropdown"]',Wt=".dropdown form",qt=".dropdown-menu",Mt=".navbar-nav",Kt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Qt="top-start",Bt="top-end",Vt="bottom-start",Yt="bottom-end",zt="right-start",Xt="left-start",$t={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Gt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Jt=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!g(this._element).hasClass(Pt)){var t=c._getParentFromElement(this._element),e=g(this._menu).hasClass(Lt);if(c._clearMenus(),!e){var n={relatedTarget:this._element},i=g.Event(kt.SHOW,n);if(g(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof u)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var o=this._element;"parent"===this._config.reference?o=t:_.isElement(this._config.reference)&&(o=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(o=this._config.reference[0])),"scrollParent"!==this._config.boundary&&g(t).addClass(Ft),this._popper=new u(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===g(t).closest(Mt).length&&g(document.body).children().on("mouseover",null,g.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),g(this._menu).toggleClass(Lt),g(t).toggleClass(Lt).trigger(g.Event(kt.SHOWN,n))}}}},t.show=function(){if(!(this._element.disabled||g(this._element).hasClass(Pt)||g(this._menu).hasClass(Lt))){var t={relatedTarget:this._element},e=g.Event(kt.SHOW,t),n=c._getParentFromElement(this._element);g(n).trigger(e),e.isDefaultPrevented()||(g(this._menu).toggleClass(Lt),g(n).toggleClass(Lt).trigger(g.Event(kt.SHOWN,t)))}},t.hide=function(){if(!this._element.disabled&&!g(this._element).hasClass(Pt)&&g(this._menu).hasClass(Lt)){var t={relatedTarget:this._element},e=g.Event(kt.HIDE,t),n=c._getParentFromElement(this._element);g(n).trigger(e),e.isDefaultPrevented()||(g(this._menu).toggleClass(Lt),g(n).toggleClass(Lt).trigger(g.Event(kt.HIDDEN,t)))}},t.dispose=function(){g.removeData(this._element,Dt),g(this._element).off(wt),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;g(this._element).on(kt.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,g(this._element).data(),t),_.typeCheckConfig(It,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(qt))}return this._menu},t._getPlacement=function(){var t=g(this._element.parentNode),e=Vt;return t.hasClass(jt)?(e=Qt,g(this._menu).hasClass(xt)&&(e=Bt)):t.hasClass(Ht)?e=zt:t.hasClass(Rt)?e=Xt:g(this._menu).hasClass(xt)&&(e=Yt),e},t._detectNavbar=function(){return 0<g(this._element).closest(".navbar").length},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),t},c._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(Dt);if(t||(t=new c(this,"object"==typeof e?e:null),g(this).data(Dt,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Ut)),n=0,i=e.length;n<i;n++){var o=c._getParentFromElement(e[n]),r=g(e[n]).data(Dt),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),r){var a=r._menu;if(g(o).hasClass(Lt)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&g.contains(o,t.target))){var l=g.Event(kt.HIDE,s);g(o).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),e[n].setAttribute("aria-expanded","false"),g(a).removeClass(Lt),g(o).removeClass(Lt).trigger(g.Event(kt.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=_.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||g(t.target).closest(qt).length)):Ot.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!g(this).hasClass(Pt))){var e=c._getParentFromElement(this),n=g(e).hasClass(Lt);if(n&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(Kt));if(0!==i.length){var o=i.indexOf(t.target);38===t.which&&0<o&&o--,40===t.which&&o<i.length-1&&o++,o<0&&(o=0),i[o].focus()}}else{if(27===t.which){var r=e.querySelector(Ut);g(r).trigger("focus")}g(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return $t}},{key:"DefaultType",get:function(){return Gt}}]),c}();g(document).on(kt.KEYDOWN_DATA_API,Ut,Jt._dataApiKeydownHandler).on(kt.KEYDOWN_DATA_API,qt,Jt._dataApiKeydownHandler).on(kt.CLICK_DATA_API+" "+kt.KEYUP_DATA_API,Jt._clearMenus).on(kt.CLICK_DATA_API,Ut,function(t){t.preventDefault(),t.stopPropagation(),Jt._jQueryInterface.call(g(this),"toggle")}).on(kt.CLICK_DATA_API,Wt,function(t){t.stopPropagation()}),g.fn[It]=Jt._jQueryInterface,g.fn[It].Constructor=Jt,g.fn[It].noConflict=function(){return g.fn[It]=Nt,Jt._jQueryInterface};var Zt="modal",te="bs.modal",ee="."+te,ne=g.fn[Zt],ie={backdrop:!0,keyboard:!0,focus:!0,show:!0},oe={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},re={HIDE:"hide"+ee,HIDDEN:"hidden"+ee,SHOW:"show"+ee,SHOWN:"shown"+ee,FOCUSIN:"focusin"+ee,RESIZE:"resize"+ee,CLICK_DISMISS:"click.dismiss"+ee,KEYDOWN_DISMISS:"keydown.dismiss"+ee,MOUSEUP_DISMISS:"mouseup.dismiss"+ee,MOUSEDOWN_DISMISS:"mousedown.dismiss"+ee,CLICK_DATA_API:"click"+ee+".data-api"},se="modal-dialog-scrollable",ae="modal-scrollbar-measure",le="modal-backdrop",ce="modal-open",he="fade",ue="show",fe=".modal-dialog",de=".modal-body",ge='[data-toggle="modal"]',_e='[data-dismiss="modal"]',me=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pe=".sticky-top",ve=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(fe),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=o.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){g(this._element).hasClass(he)&&(this._isTransitioning=!0);var n=g.Event(re.SHOW,{relatedTarget:t});g(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),g(this._element).on(re.CLICK_DISMISS,_e,function(t){return e.hide(t)}),g(this._dialog).on(re.MOUSEDOWN_DISMISS,function(){g(e._element).one(re.MOUSEUP_DISMISS,function(t){g(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=g.Event(re.HIDE);if(g(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=g(this._element).hasClass(he);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),g(document).off(re.FOCUSIN),g(this._element).removeClass(ue),g(this._element).off(re.CLICK_DISMISS),g(this._dialog).off(re.MOUSEDOWN_DISMISS),i){var o=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(o)}else this._hideModal()}}},t.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return g(t).off(ee)}),g(document).off(re.FOCUSIN),g.removeData(this._element,te),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({},ie,t),_.typeCheckConfig(Zt,t,oe),t},t._showElement=function(t){var e=this,n=g(this._element).hasClass(he);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),g(this._dialog).hasClass(se)?this._dialog.querySelector(de).scrollTop=0:this._element.scrollTop=0,n&&_.reflow(this._element),g(this._element).addClass(ue),this._config.focus&&this._enforceFocus();var i=g.Event(re.SHOWN,{relatedTarget:t}),o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,g(e._element).trigger(i)};if(n){var r=_.getTransitionDurationFromElement(this._dialog);g(this._dialog).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o()},t._enforceFocus=function(){var e=this;g(document).off(re.FOCUSIN).on(re.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===g(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?g(this._element).on(re.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||g(this._element).off(re.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?g(window).on(re.RESIZE,function(t){return e.handleUpdate(t)}):g(window).off(re.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){g(document.body).removeClass(ce),t._resetAdjustments(),t._resetScrollbar(),g(t._element).trigger(re.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(g(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=g(this._element).hasClass(he)?he:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=le,n&&this._backdrop.classList.add(n),g(this._backdrop).appendTo(document.body),g(this._element).on(re.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&_.reflow(this._backdrop),g(this._backdrop).addClass(ue),!t)return;if(!n)return void t();var i=_.getTransitionDurationFromElement(this._backdrop);g(this._backdrop).one(_.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){g(this._backdrop).removeClass(ue);var o=function(){e._removeBackdrop(),t&&t()};if(g(this._element).hasClass(he)){var r=_.getTransitionDurationFromElement(this._backdrop);g(this._backdrop).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o()}else t&&t()},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var o=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(me)),e=[].slice.call(document.querySelectorAll(pe));g(t).each(function(t,e){var n=e.style.paddingRight,i=g(e).css("padding-right");g(e).data("padding-right",n).css("padding-right",parseFloat(i)+o._scrollbarWidth+"px")}),g(e).each(function(t,e){var n=e.style.marginRight,i=g(e).css("margin-right");g(e).data("margin-right",n).css("margin-right",parseFloat(i)-o._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=g(document.body).css("padding-right");g(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}g(document.body).addClass(ce)},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(me));g(t).each(function(t,e){var n=g(e).data("padding-right");g(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+pe));g(e).each(function(t,e){var n=g(e).data("margin-right");"undefined"!=typeof n&&g(e).css("margin-right",n).removeData("margin-right")});var n=g(document.body).data("padding-right");g(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=ae,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var t=g(this).data(te),e=l({},ie,g(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new o(this,e),g(this).data(te,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return ie}}]),o}();g(document).on(re.CLICK_DATA_API,ge,function(t){var e,n=this,i=_.getSelectorFromElement(this);i&&(e=document.querySelector(i));var o=g(e).data(te)?"toggle":l({},g(e).data(),g(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=g(e).one(re.SHOW,function(t){t.isDefaultPrevented()||r.one(re.HIDDEN,function(){g(n).is(":visible")&&n.focus()})});ve._jQueryInterface.call(g(e),o,this)}),g.fn[Zt]=ve._jQueryInterface,g.fn[Zt].Constructor=ve,g.fn[Zt].noConflict=function(){return g.fn[Zt]=ne,ve._jQueryInterface};var ye=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Ee={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ce=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Te=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function Se(t,s,e){if(0===t.length)return t;if(e&&"function"==typeof e)return e(t);for(var n=(new window.DOMParser).parseFromString(t,"text/html"),a=Object.keys(s),l=[].slice.call(n.body.querySelectorAll("*")),i=function(t,e){var n=l[t],i=n.nodeName.toLowerCase();if(-1===a.indexOf(n.nodeName.toLowerCase()))return n.parentNode.removeChild(n),"continue";var o=[].slice.call(n.attributes),r=[].concat(s["*"]||[],s[i]||[]);o.forEach(function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===ye.indexOf(n)||Boolean(t.nodeValue.match(Ce)||t.nodeValue.match(Te));for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1})(t,r)||n.removeAttribute(t.nodeName)})},o=0,r=l.length;o<r;o++)i(o);return n.body.innerHTML}var be="tooltip",Ie="bs.tooltip",De="."+Ie,we=g.fn[be],Ae="bs-tooltip",Ne=new RegExp("(^|\\s)"+Ae+"\\S+","g"),Oe=["sanitize","whiteList","sanitizeFn"],ke={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},Pe={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Le={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ye),e="object"==typeof n?n:null;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ye,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Je}},{key:"NAME",get:function(){return Ve}},{key:"DATA_KEY",get:function(){return Ye}},{key:"Event",get:function(){return rn}},{key:"EVENT_KEY",get:function(){return ze}},{key:"DefaultType",get:function(){return Ze}}]),i}(Be);g.fn[Ve]=sn._jQueryInterface,g.fn[Ve].Constructor=sn,g.fn[Ve].noConflict=function(){return g.fn[Ve]=Xe,sn._jQueryInterface};var an="scrollspy",ln="bs.scrollspy",cn="."+ln,hn=g.fn[an],un={offset:10,method:"auto",target:""},fn={offset:"number",method:"string",target:"(string|element)"},dn={ACTIVATE:"activate"+cn,SCROLL:"scroll"+cn,LOAD_DATA_API:"load"+cn+".data-api"},gn="dropdown-item",_n="active",mn='[data-spy="scroll"]',pn=".nav, .list-group",vn=".nav-link",yn=".nav-item",En=".list-group-item",Cn=".dropdown",Tn=".dropdown-item",Sn=".dropdown-toggle",bn="offset",In="position",Dn=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+vn+","+this._config.target+" "+En+","+this._config.target+" "+Tn,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,g(this._scrollElement).on(dn.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?bn:In,o="auto"===this._config.method?t:this._config.method,r=o===In?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=_.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[g(e)[o]().top+r,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){g.removeData(this._element,ln),g(this._scrollElement).off(cn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=l({},un,"object"==typeof t&&t?t:{})).target){var e=g(t.target).attr("id");e||(e=_.getUID(an),g(t.target).attr("id",e)),t.target="#"+e}return _.typeCheckConfig(an,t,fn),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),n=g([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(gn)?(n.closest(Cn).find(Sn).addClass(_n),n.addClass(_n)):(n.addClass(_n),n.parents(pn).prev(vn+", "+En).addClass(_n),n.parents(pn).prev(yn).children(vn).addClass(_n)),g(this._scrollElement).trigger(dn.ACTIVATE,{relatedTarget:e})},t._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(_n)}).forEach(function(t){return t.classList.remove(_n)})},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(ln);if(t||(t=new n(this,"object"==typeof e&&e),g(this).data(ln,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return un}}]),n}();g(window).on(dn.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(mn)),e=t.length;e--;){var n=g(t[e]);Dn._jQueryInterface.call(n,n.data())}}),g.fn[an]=Dn._jQueryInterface,g.fn[an].Constructor=Dn,g.fn[an].noConflict=function(){return g.fn[an]=hn,Dn._jQueryInterface};var wn="bs.tab",An="."+wn,Nn=g.fn.tab,On={HIDE:"hide"+An,HIDDEN:"hidden"+An,SHOW:"show"+An,SHOWN:"shown"+An,CLICK_DATA_API:"click"+An+".data-api"},kn="dropdown-menu",Pn="active",Ln="disabled",jn="fade",Hn="show",Rn=".dropdown",xn=".nav, .list-group",Fn=".active",Un="> li > .active",Wn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',qn=".dropdown-toggle",Mn="> .dropdown-menu .active",Kn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Pn)||g(this._element).hasClass(Ln))){var t,i,e=g(this._element).closest(xn)[0],o=_.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName||"OL"===e.nodeName?Un:Fn;i=(i=g.makeArray(g(e).find(r)))[i.length-1]}var s=g.Event(On.HIDE,{relatedTarget:this._element}),a=g.Event(On.SHOW,{relatedTarget:i});if(i&&g(i).trigger(s),g(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=g.Event(On.HIDDEN,{relatedTarget:n._element}),e=g.Event(On.SHOWN,{relatedTarget:i});g(i).trigger(t),g(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){g.removeData(this._element,wn),this._element=null},t._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?g(e).children(Fn):g(e).find(Un))[0],r=n&&o&&g(o).hasClass(jn),s=function(){return i._transitionComplete(t,o,n)};if(o&&r){var a=_.getTransitionDurationFromElement(o);g(o).removeClass(Hn).one(_.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){g(e).removeClass(Pn);var i=g(e.parentNode).find(Mn)[0];i&&g(i).removeClass(Pn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(g(t).addClass(Pn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),_.reflow(t),t.classList.contains(jn)&&t.classList.add(Hn),t.parentNode&&g(t.parentNode).hasClass(kn)){var o=g(t).closest(Rn)[0];if(o){var r=[].slice.call(o.querySelectorAll(qn));g(r).addClass(Pn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(wn);if(e||(e=new i(this),t.data(wn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(On.CLICK_DATA_API,Wn,function(t){t.preventDefault(),Kn._jQueryInterface.call(g(this),"show")}),g.fn.tab=Kn._jQueryInterface,g.fn.tab.Constructor=Kn,g.fn.tab.noConflict=function(){return g.fn.tab=Nn,Kn._jQueryInterface};var Qn="toast",Bn="bs.toast",Vn="."+Bn,Yn=g.fn[Qn],zn={CLICK_DISMISS:"click.dismiss"+Vn,HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn},Xn="fade",$n="hide",Gn="show",Jn="showing",Zn={animation:"boolean",autohide:"boolean",delay:"number"},ti={animation:!0,autohide:!0,delay:500},ei='[data-dismiss="toast"]',ni=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this;g(this._element).trigger(zn.SHOW),this._config.animation&&this._element.classList.add(Xn);var e=function(){t._element.classList.remove(Jn),t._element.classList.add(Gn),g(t._element).trigger(zn.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove($n),this._element.classList.add(Jn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function(t){var e=this;this._element.classList.contains(Gn)&&(g(this._element).trigger(zn.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Gn)&&this._element.classList.remove(Gn),g(this._element).off(zn.CLICK_DISMISS),g.removeData(this._element,Bn),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},ti,g(this._element).data(),"object"==typeof t&&t?t:{}),_.typeCheckConfig(Qn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(zn.CLICK_DISMISS,ei,function(){return t.hide(!0)})},t._close=function(){var t=this,e=function(){t._element.classList.add($n),g(t._element).trigger(zn.HIDDEN)};if(this._element.classList.remove(Gn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Bn);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Bn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Zn}},{key:"Default",get:function(){return ti}}]),i}();g.fn[Qn]=ni._jQueryInterface,g.fn[Qn].Constructor=ni,g.fn[Qn].noConflict=function(){return g.fn[Qn]=Yn,ni._jQueryInterface},function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=_,t.Alert=p,t.Button=P,t.Carousel=lt,t.Collapse=bt,t.Dropdown=Jt,t.Modal=ve,t.Popover=sn,t.Scrollspy=Dn,t.Tab=Kn,t.Toast=ni,t.Tooltip=Be,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ //# sourceMappingURL=bootstrap.min.js.map
inc/js/bootstrap_js.js DELETED
@@ -1,7 +0,0 @@
1
- /*!
2
- * Bootstrap v3.3.4 (http://getbootstrap.com)
3
- * Copyright 2011-2015 Twitter, Inc.
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
- */
6
- if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
7
- var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
 
 
 
 
 
 
 
inc/js/canvg.js CHANGED
@@ -1,3095 +1,3095 @@
1
- /*
2
- * canvg.js - Javascript SVG parser and renderer on Canvas
3
- * MIT Licensed
4
- * Gabe Lerner (gabelerner@gmail.com)
5
- * http://code.google.com/p/canvg/
6
- *
7
- * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
8
- */
9
- (function ( global, factory ) {
10
-
11
- 'use strict';
12
-
13
- // export as AMD...
14
- if ( typeof define !== 'undefined' && define.amd ) {
15
- define('canvgModule', [ 'rgbcolor', 'stackblur' ], factory );
16
- }
17
-
18
- // ...or as browserify
19
- else if ( typeof module !== 'undefined' && module.exports ) {
20
- module.exports = factory( require( 'rgbcolor' ), require( 'stackblur' ) );
21
- }
22
-
23
- global.canvg = factory( global.RGBColor, global.stackBlur );
24
-
25
- }( typeof window !== 'undefined' ? window : this, function ( RGBColor, stackBlur ) {
26
-
27
- // canvg(target, s)
28
- // empty parameters: replace all 'svg' elements on page with 'canvas' elements
29
- // target: canvas element or the id of a canvas element
30
- // s: svg string, url to svg file, or xml document
31
- // opts: optional hash of options
32
- // ignoreMouse: true => ignore mouse events
33
- // ignoreAnimation: true => ignore animations
34
- // ignoreDimensions: true => does not try to resize canvas
35
- // ignoreClear: true => does not clear canvas
36
- // offsetX: int => draws at a x offset
37
- // offsetY: int => draws at a y offset
38
- // scaleWidth: int => scales horizontally to width
39
- // scaleHeight: int => scales vertically to height
40
- // renderCallback: function => will call the function after the first render is completed
41
- // forceRedraw: function => will call the function on every frame, if it returns true, will redraw
42
- var canvg = function (target, s, opts) {
43
- // no parameters
44
- if (target == null && s == null && opts == null) {
45
- var svgTags = document.querySelectorAll('svg');
46
- for (var i=0; i<svgTags.length; i++) {
47
- var svgTag = svgTags[i];
48
- var c = document.createElement('canvas');
49
- c.width = svgTag.clientWidth;
50
- c.height = svgTag.clientHeight;
51
- svgTag.parentNode.insertBefore(c, svgTag);
52
- svgTag.parentNode.removeChild(svgTag);
53
- var div = document.createElement('div');
54
- div.appendChild(svgTag);
55
- canvg(c, div.innerHTML);
56
- }
57
- return;
58
- }
59
-
60
- if (typeof target == 'string') {
61
- target = document.getElementById(target);
62
- }
63
-
64
- // store class on canvas
65
- if (target.svg != null) target.svg.stop();
66
- var svg = build(opts || {});
67
- // on i.e. 8 for flash canvas, we can't assign the property so check for it
68
- if (!(target.childNodes.length == 1 && target.childNodes[0].nodeName == 'OBJECT')) target.svg = svg;
69
-
70
- var ctx = target.getContext('2d');
71
- if (typeof s.documentElement != 'undefined') {
72
- // load from xml doc
73
- svg.loadXmlDoc(ctx, s);
74
- }
75
- else if (s.substr(0,1) == '<') {
76
- // load from xml string
77
- svg.loadXml(ctx, s);
78
- }
79
- else {
80
- // load from url
81
- svg.load(ctx, s);
82
- }
83
- }
84
-
85
- // see https://developer.mozilla.org/en-US/docs/Web/API/Element.matches
86
- var matchesSelector;
87
- if (typeof Element.prototype.matches != 'undefined') {
88
- matchesSelector = function(node, selector) {
89
- return node.matches(selector);
90
- };
91
- } else if (typeof Element.prototype.webkitMatchesSelector != 'undefined') {
92
- matchesSelector = function(node, selector) {
93
- return node.webkitMatchesSelector(selector);
94
- };
95
- } else if (typeof Element.prototype.mozMatchesSelector != 'undefined') {
96
- matchesSelector = function(node, selector) {
97
- return node.mozMatchesSelector(selector);
98
- };
99
- } else if (typeof Element.prototype.msMatchesSelector != 'undefined') {
100
- matchesSelector = function(node, selector) {
101
- return node.msMatchesSelector(selector);
102
- };
103
- } else if (typeof Element.prototype.oMatchesSelector != 'undefined') {
104
- matchesSelector = function(node, selector) {
105
- return node.oMatchesSelector(selector);
106
- };
107
- } else {
108
- // requires Sizzle: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation
109
- // or jQuery: http://jquery.com/download/
110
- // or Zepto: http://zeptojs.com/#
111
- // without it, this is a ReferenceError
112
-
113
- if (typeof jQuery === 'function' || typeof Zepto === 'function') {
114
- matchesSelector = function (node, selector) {
115
- return $(node).is(selector);
116
- };
117
- }
118
-
119
- if (typeof matchesSelector === 'undefined') {
120
- matchesSelector = Sizzle.matchesSelector;
121
- }
122
- }
123
-
124
- // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
125
- var attributeRegex = /(\[[^\]]+\])/g;
126
- var idRegex = /(#[^\s\+>~\.\[:]+)/g;
127
- var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
128
- var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
129
- var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
130
- var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
131
- var elementRegex = /([^\s\+>~\.\[:]+)/g;
132
- function getSelectorSpecificity(selector) {
133
- var typeCount = [0, 0, 0];
134
- var findMatch = function(regex, type) {
135
- var matches = selector.match(regex);
136
- if (matches == null) {
137
- return;
138
- }
139
- typeCount[type] += matches.length;
140
- selector = selector.replace(regex, ' ');
141
- };
142
-
143
- selector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ');
144
- selector = selector.replace(/{[\s\S]*/gm, ' ');
145
- findMatch(attributeRegex, 1);
146
- findMatch(idRegex, 0);
147
- findMatch(classRegex, 1);
148
- findMatch(pseudoElementRegex, 2);
149
- findMatch(pseudoClassWithBracketsRegex, 1);
150
- findMatch(pseudoClassRegex, 1);
151
- selector = selector.replace(/[\*\s\+>~]/g, ' ');
152
- selector = selector.replace(/[#\.]/g, ' ');
153
- findMatch(elementRegex, 2);
154
- return typeCount.join('');
155
- }
156
-
157
- function build(opts) {
158
- var svg = { opts: opts };
159
-
160
- svg.FRAMERATE = 30;
161
- svg.MAX_VIRTUAL_PIXELS = 30000;
162
-
163
- svg.log = function(msg) {};
164
- if (svg.opts['log'] == true && typeof console != 'undefined') {
165
- svg.log = function(msg) { console.log(msg); };
166
- };
167
-
168
- // globals
169
- svg.init = function(ctx) {
170
- var uniqueId = 0;
171
- svg.UniqueId = function () { uniqueId++; return 'canvg' + uniqueId; };
172
- svg.Definitions = {};
173
- svg.Styles = {};
174
- svg.StylesSpecificity = {};
175
- svg.Animations = [];
176
- svg.Images = [];
177
- svg.ctx = ctx;
178
- svg.ViewPort = new (function () {
179
- this.viewPorts = [];
180
- this.Clear = function() { this.viewPorts = []; }
181
- this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); }
182
- this.RemoveCurrent = function() { this.viewPorts.pop(); }
183
- this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; }
184
- this.width = function() { return this.Current().width; }
185
- this.height = function() { return this.Current().height; }
186
- this.ComputeSize = function(d) {
187
- if (d != null && typeof d == 'number') return d;
188
- if (d == 'x') return this.width();
189
- if (d == 'y') return this.height();
190
- return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);
191
- }
192
- });
193
- }
194
- svg.init();
195
-
196
- // images loaded
197
- svg.ImagesLoaded = function() {
198
- for (var i=0; i<svg.Images.length; i++) {
199
- if (!svg.Images[i].loaded) return false;
200
- }
201
- return true;
202
- }
203
-
204
- // trim
205
- svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); }
206
-
207
- // compress spaces
208
- svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); }
209
-
210
- // ajax
211
- svg.ajax = function(url) {
212
- var AJAX;
213
- if(window.XMLHttpRequest){AJAX=new XMLHttpRequest();}
214
- else{AJAX=new ActiveXObject('Microsoft.XMLHTTP');}
215
- if(AJAX){
216
- AJAX.open('GET',url,false);
217
- AJAX.send(null);
218
- return AJAX.responseText;
219
- }
220
- return null;
221
- }
222
-
223
- // parse xml
224
- svg.parseXml = function(xml) {
225
- if (typeof Windows != 'undefined' && typeof Windows.Data != 'undefined' && typeof Windows.Data.Xml != 'undefined') {
226
- var xmlDoc = new Windows.Data.Xml.Dom.XmlDocument();
227
- var settings = new Windows.Data.Xml.Dom.XmlLoadSettings();
228
- settings.prohibitDtd = false;
229
- xmlDoc.loadXml(xml, settings);
230
- return xmlDoc;
231
- }
232
- else if (window.DOMParser)
233
- {
234
- var parser = new DOMParser();
235
- return parser.parseFromString(xml, 'text/xml');
236
- }
237
- else
238
- {
239
- xml = xml.replace(/<!DOCTYPE svg[^>]*>/, '');
240
- var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
241
- xmlDoc.async = 'false';
242
- xmlDoc.loadXML(xml);
243
- return xmlDoc;
244
- }
245
- }
246
-
247
- svg.Property = function(name, value) {
248
- this.name = name;
249
- this.value = value;
250
- }
251
- svg.Property.prototype.getValue = function() {
252
- return this.value;
253
- }
254
-
255
- svg.Property.prototype.hasValue = function() {
256
- return (this.value != null && this.value !== '');
257
- }
258
-
259
- // return the numerical value of the property
260
- svg.Property.prototype.numValue = function() {
261
- if (!this.hasValue()) return 0;
262
-
263
- var n = parseFloat(this.value);
264
- if ((this.value + '').match(/%$/)) {
265
- n = n / 100.0;
266
- }
267
- return n;
268
- }
269
-
270
- svg.Property.prototype.valueOrDefault = function(def) {
271
- if (this.hasValue()) return this.value;
272
- return def;
273
- }
274
-
275
- svg.Property.prototype.numValueOrDefault = function(def) {
276
- if (this.hasValue()) return this.numValue();
277
- return def;
278
- }
279
-
280
- // color extensions
281
- // augment the current color value with the opacity
282
- svg.Property.prototype.addOpacity = function(opacityProp) {
283
- var newValue = this.value;
284
- if (opacityProp.value != null && opacityProp.value != '' && typeof this.value == 'string') { // can only add opacity to colors, not patterns
285
- var color = new RGBColor(this.value);
286
- if (color.ok) {
287
- newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacityProp.numValue() + ')';
288
- }
289
- }
290
- return new svg.Property(this.name, newValue);
291
- }
292
-
293
- // definition extensions
294
- // get the definition from the definitions table
295
- svg.Property.prototype.getDefinition = function() {
296
- var name = this.value.match(/#([^\)'"]+)/);
297
- if (name) { name = name[1]; }
298
- if (!name) { name = this.value; }
299
- return svg.Definitions[name];
300
- }
301
-
302
- svg.Property.prototype.isUrlDefinition = function() {
303
- return this.value.indexOf('url(') == 0
304
- }
305
-
306
- svg.Property.prototype.getFillStyleDefinition = function(e, opacityProp) {
307
- var def = this.getDefinition();
308
-
309
- // gradient
310
- if (def != null && def.createGradient) {
311
- return def.createGradient(svg.ctx, e, opacityProp);
312
- }
313
-
314
- // pattern
315
- if (def != null && def.createPattern) {
316
- if (def.getHrefAttribute().hasValue()) {
317
- var pt = def.attribute('patternTransform');
318
- def = def.getHrefAttribute().getDefinition();
319
- if (pt.hasValue()) { def.attribute('patternTransform', true).value = pt.value; }
320
- }
321
- return def.createPattern(svg.ctx, e);
322
- }
323
-
324
- return null;
325
- }
326
-
327
- // length extensions
328
- svg.Property.prototype.getDPI = function(viewPort) {
329
- return 96.0; // TODO: compute?
330
- }
331
-
332
- svg.Property.prototype.getEM = function(viewPort) {
333
- var em = 12;
334
-
335
- var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
336
- if (fontSize.hasValue()) em = fontSize.toPixels(viewPort);
337
-
338
- return em;
339
- }
340
-
341
- svg.Property.prototype.getUnits = function() {
342
- var s = this.value+'';
343
- return s.replace(/[0-9\.\-]/g,'');
344
- }
345
-
346
- // get the length as pixels
347
- svg.Property.prototype.toPixels = function(viewPort, processPercent) {
348
- if (!this.hasValue()) return 0;
349
- var s = this.value+'';
350
- if (s.match(/em$/)) return this.numValue() * this.getEM(viewPort);
351
- if (s.match(/ex$/)) return this.numValue() * this.getEM(viewPort) / 2.0;
352
- if (s.match(/px$/)) return this.numValue();
353
- if (s.match(/pt$/)) return this.numValue() * this.getDPI(viewPort) * (1.0 / 72.0);
354
- if (s.match(/pc$/)) return this.numValue() * 15;
355
- if (s.match(/cm$/)) return this.numValue() * this.getDPI(viewPort) / 2.54;
356
- if (s.match(/mm$/)) return this.numValue() * this.getDPI(viewPort) / 25.4;
357
- if (s.match(/in$/)) return this.numValue() * this.getDPI(viewPort);
358
- if (s.match(/%$/)) return this.numValue() * svg.ViewPort.ComputeSize(viewPort);
359
- var n = this.numValue();
360
- if (processPercent && n < 1.0) return n * svg.ViewPort.ComputeSize(viewPort);
361
- return n;
362
- }
363
-
364
- // time extensions
365
- // get the time as milliseconds
366
- svg.Property.prototype.toMilliseconds = function() {
367
- if (!this.hasValue()) return 0;
368
- var s = this.value+'';
369
- if (s.match(/s$/)) return this.numValue() * 1000;
370
- if (s.match(/ms$/)) return this.numValue();
371
- return this.numValue();
372
- }
373
-
374
- // angle extensions
375
- // get the angle as radians
376
- svg.Property.prototype.toRadians = function() {
377
- if (!this.hasValue()) return 0;
378
- var s = this.value+'';
379
- if (s.match(/deg$/)) return this.numValue() * (Math.PI / 180.0);
380
- if (s.match(/grad$/)) return this.numValue() * (Math.PI / 200.0);
381
- if (s.match(/rad$/)) return this.numValue();
382
- return this.numValue() * (Math.PI / 180.0);
383
- }
384
-
385
- // text extensions
386
- // get the text baseline
387
- var textBaselineMapping = {
388
- 'baseline': 'alphabetic',
389
- 'before-edge': 'top',
390
- 'text-before-edge': 'top',
391
- 'middle': 'middle',
392
- 'central': 'middle',
393
- 'after-edge': 'bottom',
394
- 'text-after-edge': 'bottom',
395
- 'ideographic': 'ideographic',
396
- 'alphabetic': 'alphabetic',
397
- 'hanging': 'hanging',
398
- 'mathematical': 'alphabetic'
399
- };
400
- svg.Property.prototype.toTextBaseline = function () {
401
- if (!this.hasValue()) return null;
402
- return textBaselineMapping[this.value];
403
- }
404
-
405
- // fonts
406
- svg.Font = new (function() {
407
- this.Styles = 'normal|italic|oblique|inherit';
408
- this.Variants = 'normal|small-caps|inherit';
409
- this.Weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
410
-
411
- this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
412
- var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font);
413
- return {
414
- fontFamily: fontFamily || f.fontFamily,
415
- fontSize: fontSize || f.fontSize,
416
- fontStyle: fontStyle || f.fontStyle,
417
- fontWeight: fontWeight || f.fontWeight,
418
- fontVariant: fontVariant || f.fontVariant,
419
- toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') }
420
- }
421
- }
422
-
423
- var that = this;
424
- this.Parse = function(s) {
425
- var f = {};
426
- var d = svg.trim(svg.compressSpaces(s || '')).split(' ');
427
- var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false }
428
- var ff = '';
429
- for (var i=0; i<d.length; i++) {
430
- if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontStyle = d[i]; set.fontStyle = true; }
431
- else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontVariant = d[i]; set.fontStyle = set.fontVariant = true; }
432
- else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontWeight = d[i]; set.fontStyle = set.fontVariant = set.fontWeight = true; }
433
- else if (!set.fontSize) { if (d[i] != 'inherit') f.fontSize = d[i].split('/')[0]; set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true; }
434
- else { if (d[i] != 'inherit') ff += d[i]; }
435
- } if (ff != '') f.fontFamily = ff;
436
- return f;
437
- }
438
- });
439
-
440
- // points and paths
441
- svg.ToNumberArray = function(s) {
442
- var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' ');
443
- for (var i=0; i<a.length; i++) {
444
- a[i] = parseFloat(a[i]);
445
- }
446
- return a;
447
- }
448
- svg.Point = function(x, y) {
449
- this.x = x;
450
- this.y = y;
451
- }
452
- svg.Point.prototype.angleTo = function(p) {
453
- return Math.atan2(p.y - this.y, p.x - this.x);
454
- }
455
-
456
- svg.Point.prototype.applyTransform = function(v) {
457
- var xp = this.x * v[0] + this.y * v[2] + v[4];
458
- var yp = this.x * v[1] + this.y * v[3] + v[5];
459
- this.x = xp;
460
- this.y = yp;
461
- }
462
-
463
- svg.CreatePoint = function(s) {
464
- var a = svg.ToNumberArray(s);
465
- return new svg.Point(a[0], a[1]);
466
- }
467
- svg.CreatePath = function(s) {
468
- var a = svg.ToNumberArray(s);
469
- var path = [];
470
- for (var i=0; i<a.length; i+=2) {
471
- path.push(new svg.Point(a[i], a[i+1]));
472
- }
473
- return path;
474
- }
475
-
476
- // bounding box
477
- svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
478
- this.x1 = Number.NaN;
479
- this.y1 = Number.NaN;
480
- this.x2 = Number.NaN;
481
- this.y2 = Number.NaN;
482
-
483
- this.x = function() { return this.x1; }
484
- this.y = function() { return this.y1; }
485
- this.width = function() { return this.x2 - this.x1; }
486
- this.height = function() { return this.y2 - this.y1; }
487
-
488
- this.addPoint = function(x, y) {
489
- if (x != null) {
490
- if (isNaN(this.x1) || isNaN(this.x2)) {
491
- this.x1 = x;
492
- this.x2 = x;
493
- }
494
- if (x < this.x1) this.x1 = x;
495
- if (x > this.x2) this.x2 = x;
496
- }
497
-
498
- if (y != null) {
499
- if (isNaN(this.y1) || isNaN(this.y2)) {
500
- this.y1 = y;
501
- this.y2 = y;
502
- }
503
- if (y < this.y1) this.y1 = y;
504
- if (y > this.y2) this.y2 = y;
505
- }
506
- }
507
- this.addX = function(x) { this.addPoint(x, null); }
508
- this.addY = function(y) { this.addPoint(null, y); }
509
-
510
- this.addBoundingBox = function(bb) {
511
- this.addPoint(bb.x1, bb.y1);
512
- this.addPoint(bb.x2, bb.y2);
513
- }
514
-
515
- this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) {
516
- var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
517
- var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
518
- var cp2x = cp1x + 1/3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
519
- var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
520
- this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
521
- }
522
-
523
- this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
524
- // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
525
- var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y];
526
- this.addPoint(p0[0], p0[1]);
527
- this.addPoint(p3[0], p3[1]);
528
-
529
- for (i=0; i<=1; i++) {
530
- var f = function(t) {
531
- return Math.pow(1-t, 3) * p0[i]
532
- + 3 * Math.pow(1-t, 2) * t * p1[i]
533
- + 3 * (1-t) * Math.pow(t, 2) * p2[i]
534
- + Math.pow(t, 3) * p3[i];
535
- }
536
-
537
- var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
538
- var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
539
- var c = 3 * p1[i] - 3 * p0[i];
540
-
541
- if (a == 0) {
542
- if (b == 0) continue;
543
- var t = -c / b;
544
- if (0 < t && t < 1) {
545
- if (i == 0) this.addX(f(t));
546
- if (i == 1) this.addY(f(t));
547
- }
548
- continue;
549
- }
550
-
551
- var b2ac = Math.pow(b, 2) - 4 * c * a;
552
- if (b2ac < 0) continue;
553
- var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
554
- if (0 < t1 && t1 < 1) {
555
- if (i == 0) this.addX(f(t1));
556
- if (i == 1) this.addY(f(t1));
557
- }
558
- var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
559
- if (0 < t2 && t2 < 1) {
560
- if (i == 0) this.addX(f(t2));
561
- if (i == 1) this.addY(f(t2));
562
- }
563
- }
564
- }
565
-
566
- this.isPointInBox = function(x, y) {
567
- return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2);
568
- }
569
-
570
- this.addPoint(x1, y1);
571
- this.addPoint(x2, y2);
572
- }
573
-
574
- // transforms
575
- svg.Transform = function(v) {
576
- var that = this;
577
- this.Type = {}
578
-
579
- // translate
580
- this.Type.translate = function(s) {
581
- this.p = svg.CreatePoint(s);
582
- this.apply = function(ctx) {
583
- ctx.translate(this.p.x || 0.0, this.p.y || 0.0);
584
- }
585
- this.unapply = function(ctx) {
586
- ctx.translate(-1.0 * this.p.x || 0.0, -1.0 * this.p.y || 0.0);
587
- }
588
- this.applyToPoint = function(p) {
589
- p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
590
- }
591
- }
592
-
593
- // rotate
594
- this.Type.rotate = function(s) {
595
- var a = svg.ToNumberArray(s);
596
- this.angle = new svg.Property('angle', a[0]);
597
- this.cx = a[1] || 0;
598
- this.cy = a[2] || 0;
599
- this.apply = function(ctx) {
600
- ctx.translate(this.cx, this.cy);
601
- ctx.rotate(this.angle.toRadians());
602
- ctx.translate(-this.cx, -this.cy);
603
- }
604
- this.unapply = function(ctx) {
605
- ctx.translate(this.cx, this.cy);
606
- ctx.rotate(-1.0 * this.angle.toRadians());
607
- ctx.translate(-this.cx, -this.cy);
608
- }
609
- this.applyToPoint = function(p) {
610
- var a = this.angle.toRadians();
611
- p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
612
- p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
613
- p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);
614
- }
615
- }
616
-
617
- this.Type.scale = function(s) {
618
- this.p = svg.CreatePoint(s);
619
- this.apply = function(ctx) {
620
- ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);
621
- }
622
- this.unapply = function(ctx) {
623
- ctx.scale(1.0 / this.p.x || 1.0, 1.0 / this.p.y || this.p.x || 1.0);
624
- }
625
- this.applyToPoint = function(p) {
626
- p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);
627
- }
628
- }
629
-
630
- this.Type.matrix = function(s) {
631
- this.m = svg.ToNumberArray(s);
632
- this.apply = function(ctx) {
633
- ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
634
- }
635
- this.unapply = function(ctx) {
636
- var a = this.m[0];
637
- var b = this.m[2];
638
- var c = this.m[4];
639
- var d = this.m[1];
640
- var e = this.m[3];
641
- var f = this.m[5];
642
- var g = 0.0;
643
- var h = 0.0;
644
- var i = 1.0;
645
- var det = 1 / (a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g));
646
- ctx.transform(
647
- det*(e*i-f*h),
648
- det*(f*g-d*i),
649
- det*(c*h-b*i),
650
- det*(a*i-c*g),
651
- det*(b*f-c*e),
652
- det*(c*d-a*f)
653
- );
654
- }
655
- this.applyToPoint = function(p) {
656
- p.applyTransform(this.m);
657
- }
658
- }
659
-
660
- this.Type.SkewBase = function(s) {
661
- this.base = that.Type.matrix;
662
- this.base(s);
663
- this.angle = new svg.Property('angle', s);
664
- }
665
- this.Type.SkewBase.prototype = new this.Type.matrix;
666
-
667
- this.Type.skewX = function(s) {
668
- this.base = that.Type.SkewBase;
669
- this.base(s);
670
- this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0];
671
- }
672
- this.Type.skewX.prototype = new this.Type.SkewBase;
673
-
674
- this.Type.skewY = function(s) {
675
- this.base = that.Type.SkewBase;
676
- this.base(s);
677
- this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0];
678
- }
679
- this.Type.skewY.prototype = new this.Type.SkewBase;
680
-
681
- this.transforms = [];
682
-
683
- this.apply = function(ctx) {
684
- for (var i=0; i<this.transforms.length; i++) {
685
- this.transforms[i].apply(ctx);
686
- }
687
- }
688
-
689
- this.unapply = function(ctx) {
690
- for (var i=this.transforms.length-1; i>=0; i--) {
691
- this.transforms[i].unapply(ctx);
692
- }
693
- }
694
-
695
- this.applyToPoint = function(p) {
696
- for (var i=0; i<this.transforms.length; i++) {
697
- this.transforms[i].applyToPoint(p);
698
- }
699
- }
700
-
701
- var data = svg.trim(svg.compressSpaces(v)).replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g,') ').split(/\s(?=[a-z])/);
702
- for (var i=0; i<data.length; i++) {
703
- var type = svg.trim(data[i].split('(')[0]);
704
- var s = data[i].split('(')[1].replace(')','');
705
- var transformType = this.Type[type];
706
- if (typeof transformType != 'undefined') {
707
- var transform = new transformType(s);
708
- transform.type = type;
709
- this.transforms.push(transform);
710
- }
711
- }
712
- }
713
-
714
- // aspect ratio
715
- svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {
716
- // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
717
- aspectRatio = svg.compressSpaces(aspectRatio);
718
- aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer
719
- var align = aspectRatio.split(' ')[0] || 'xMidYMid';
720
- var meetOrSlice = aspectRatio.split(' ')[1] || 'meet';
721
-
722
- // calculate scale
723
- var scaleX = width / desiredWidth;
724
- var scaleY = height / desiredHeight;
725
- var scaleMin = Math.min(scaleX, scaleY);
726
- var scaleMax = Math.max(scaleX, scaleY);
727
- if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; }
728
- if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; }
729
-
730
- refX = new svg.Property('refX', refX);
731
- refY = new svg.Property('refY', refY);
732
- if (refX.hasValue() && refY.hasValue()) {
733
- ctx.translate(-scaleMin * refX.toPixels('x'), -scaleMin * refY.toPixels('y'));
734
- }
735
- else {
736
- // align
737
- if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0);
738
- if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0);
739
- if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0);
740
- if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight);
741
- }
742
-
743
- // scale
744
- if (align == 'none') ctx.scale(scaleX, scaleY);
745
- else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin);
746
- else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax);
747
-
748
- // translate
749
- ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);
750
- }
751
-
752
- // elements
753
- svg.Element = {}
754
-
755
- svg.EmptyProperty = new svg.Property('EMPTY', '');
756
-
757
- svg.Element.ElementBase = function(node) {
758
- this.attributes = {};
759
- this.styles = {};
760
- this.stylesSpecificity = {};
761
- this.children = [];
762
-
763
- // get or create attribute
764
- this.attribute = function(name, createIfNotExists) {
765
- var a = this.attributes[name];
766
- if (a != null) return a;
767
-
768
- if (createIfNotExists == true) { a = new svg.Property(name, ''); this.attributes[name] = a; }
769
- return a || svg.EmptyProperty;
770
- }
771
-
772
- this.getHrefAttribute = function() {
773
- for (var a in this.attributes) {
774
- if (a == 'href' || a.match(/:href$/)) {
775
- return this.attributes[a];
776
- }
777
- }
778
- return svg.EmptyProperty;
779
- }
780
-
781
- // get or create style, crawls up node tree
782
- this.style = function(name, createIfNotExists, skipAncestors) {
783
- var s = this.styles[name];
784
- if (s != null) return s;
785
-
786
- var a = this.attribute(name);
787
- if (a != null && a.hasValue()) {
788
- this.styles[name] = a; // move up to me to cache
789
- return a;
790
- }
791
-
792
- if (skipAncestors != true) {
793
- var p = this.parent;
794
- if (p != null) {
795
- var ps = p.style(name);
796
- if (ps != null && ps.hasValue()) {
797
- return ps;
798
- }
799
- }
800
- }
801
-
802
- if (createIfNotExists == true) { s = new svg.Property(name, ''); this.styles[name] = s; }
803
- return s || svg.EmptyProperty;
804
- }
805
-
806
- // base render
807
- this.render = function(ctx) {
808
- // don't render display=none
809
- if (this.style('display').value == 'none') return;
810
-
811
- // don't render visibility=hidden
812
- if (this.style('visibility').value == 'hidden') return;
813
-
814
- ctx.save();
815
- if (this.style('mask').hasValue()) { // mask
816
- var mask = this.style('mask').getDefinition();
817
- if (mask != null) mask.apply(ctx, this);
818
- }
819
- else if (this.style('filter').hasValue()) { // filter
820
- var filter = this.style('filter').getDefinition();
821
- if (filter != null) filter.apply(ctx, this);
822
- }
823
- else {
824
- this.setContext(ctx);
825
- this.renderChildren(ctx);
826
- this.clearContext(ctx);
827
- }
828
- ctx.restore();
829
- }
830
-
831
- // base set context
832
- this.setContext = function(ctx) {
833
- // OVERRIDE ME!
834
- }
835
-
836
- // base clear context
837
- this.clearContext = function(ctx) {
838
- // OVERRIDE ME!
839
- }
840
-
841
- // base render children
842
- this.renderChildren = function(ctx) {
843
- for (var i=0; i<this.children.length; i++) {
844
- this.children[i].render(ctx);
845
- }
846
- }
847
-
848
- this.addChild = function(childNode, create) {
849
- var child = childNode;
850
- if (create) child = svg.CreateElement(childNode);
851
- child.parent = this;
852
- if (child.type != 'title') { this.children.push(child); }
853
- }
854
-
855
- this.addStylesFromStyleDefinition = function () {
856
- // add styles
857
- for (var selector in svg.Styles) {
858
- if (selector[0] != '@' && matchesSelector(node, selector)) {
859
- var styles = svg.Styles[selector];
860
- var specificity = svg.StylesSpecificity[selector];
861
- if (styles != null) {
862
- for (var name in styles) {
863
- var existingSpecificity = this.stylesSpecificity[name];
864
- if (typeof existingSpecificity == 'undefined') {
865
- existingSpecificity = '000';
866
- }
867
- if (specificity > existingSpecificity) {
868
- this.styles[name] = styles[name];
869
- this.stylesSpecificity[name] = specificity;
870
- }
871
- }
872
- }
873
- }
874
- }
875
- };
876
-
877
- // Microsoft Edge fix
878
- var allUppercase = new RegExp("^[A-Z\-]+$");
879
- var normalizeAttributeName = function (name) {
880
- if (allUppercase.test(name)) {
881
- return name.toLowerCase();
882
- }
883
- return name;
884
- };
885
-
886
- if (node != null && node.nodeType == 1) { //ELEMENT_NODE
887
- // add attributes
888
- for (var i=0; i<node.attributes.length; i++) {
889
- var attribute = node.attributes[i];
890
- var nodeName = normalizeAttributeName(attribute.nodeName);
891
- this.attributes[nodeName] = new svg.Property(nodeName, attribute.value);
892
- }
893
-
894
- this.addStylesFromStyleDefinition();
895
-
896
- // add inline styles
897
- if (this.attribute('style').hasValue()) {
898
- var styles = this.attribute('style').value.split(';');
899
- for (var i=0; i<styles.length; i++) {
900
- if (svg.trim(styles[i]) != '') {
901
- var style = styles[i].split(':');
902
- var name = svg.trim(style[0]);
903
- var value = svg.trim(style[1]);
904
- this.styles[name] = new svg.Property(name, value);
905
- }
906
- }
907
- }
908
-
909
- // add id
910
- if (this.attribute('id').hasValue()) {
911
- if (svg.Definitions[this.attribute('id').value] == null) {
912
- svg.Definitions[this.attribute('id').value] = this;
913
- }
914
- }
915
-
916
- // add children
917
- for (var i=0; i<node.childNodes.length; i++) {
918
- var childNode = node.childNodes[i];
919
- if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE
920
- if (this.captureTextNodes && (childNode.nodeType == 3 || childNode.nodeType == 4)) {
921
- var text = childNode.value || childNode.text || childNode.textContent || '';
922
- if (svg.compressSpaces(text) != '') {
923
- this.addChild(new svg.Element.tspan(childNode), false); // TEXT_NODE
924
- }
925
- }
926
- }
927
- }
928
- }
929
-
930
- svg.Element.RenderedElementBase = function(node) {
931
- this.base = svg.Element.ElementBase;
932
- this.base(node);
933
-
934
- this.setContext = function(ctx) {
935
- // fill
936
- if (this.style('fill').isUrlDefinition()) {
937
- var fs = this.style('fill').getFillStyleDefinition(this, this.style('fill-opacity'));
938
- if (fs != null) ctx.fillStyle = fs;
939
- }
940
- else if (this.style('fill').hasValue()) {
941
- var fillStyle = this.style('fill');
942
- if (fillStyle.value == 'currentColor') fillStyle.value = this.style('color').value;
943
- if (fillStyle.value != 'inherit') ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value);
944
- }
945
- if (this.style('fill-opacity').hasValue()) {
946
- var fillStyle = new svg.Property('fill', ctx.fillStyle);
947
- fillStyle = fillStyle.addOpacity(this.style('fill-opacity'));
948
- ctx.fillStyle = fillStyle.value;
949
- }
950
-
951
- // stroke
952
- if (this.style('stroke').isUrlDefinition()) {
953
- var fs = this.style('stroke').getFillStyleDefinition(this, this.style('stroke-opacity'));
954
- if (fs != null) ctx.strokeStyle = fs;
955
- }
956
- else if (this.style('stroke').hasValue()) {
957
- var strokeStyle = this.style('stroke');
958
- if (strokeStyle.value == 'currentColor') strokeStyle.value = this.style('color').value;
959
- if (strokeStyle.value != 'inherit') ctx.strokeStyle = (strokeStyle.value == 'none' ? 'rgba(0,0,0,0)' : strokeStyle.value);
960
- }
961
- if (this.style('stroke-opacity').hasValue()) {
962
- var strokeStyle = new svg.Property('stroke', ctx.strokeStyle);
963
- strokeStyle = strokeStyle.addOpacity(this.style('stroke-opacity'));
964
- ctx.strokeStyle = strokeStyle.value;
965
- }
966
- if (this.style('stroke-width').hasValue()) {
967
- var newLineWidth = this.style('stroke-width').toPixels();
968
- ctx.lineWidth = newLineWidth == 0 ? 0.001 : newLineWidth; // browsers don't respect 0
969
- }
970
- if (this.style('stroke-linecap').hasValue()) ctx.lineCap = this.style('stroke-linecap').value;
971
- if (this.style('stroke-linejoin').hasValue()) ctx.lineJoin = this.style('stroke-linejoin').value;
972
- if (this.style('stroke-miterlimit').hasValue()) ctx.miterLimit = this.style('stroke-miterlimit').value;
973
- if (this.style('stroke-dasharray').hasValue() && this.style('stroke-dasharray').value != 'none') {
974
- var gaps = svg.ToNumberArray(this.style('stroke-dasharray').value);
975
- if (typeof ctx.setLineDash != 'undefined') { ctx.setLineDash(gaps); }
976
- else if (typeof ctx.webkitLineDash != 'undefined') { ctx.webkitLineDash = gaps; }
977
- else if (typeof ctx.mozDash != 'undefined' && !(gaps.length==1 && gaps[0]==0)) { ctx.mozDash = gaps; }
978
-
979
- var offset = this.style('stroke-dashoffset').numValueOrDefault(1);
980
- if (typeof ctx.lineDashOffset != 'undefined') { ctx.lineDashOffset = offset; }
981
- else if (typeof ctx.webkitLineDashOffset != 'undefined') { ctx.webkitLineDashOffset = offset; }
982
- else if (typeof ctx.mozDashOffset != 'undefined') { ctx.mozDashOffset = offset; }
983
- }
984
-
985
- // font
986
- if (typeof ctx.font != 'undefined') {
987
- ctx.font = svg.Font.CreateFont(
988
- this.style('font-style').value,
989
- this.style('font-variant').value,
990
- this.style('font-weight').value,
991
- this.style('font-size').hasValue() ? this.style('font-size').toPixels() + 'px' : '',
992
- this.style('font-family').value).toString();
993
- }
994
-
995
- // transform
996
- if (this.style('transform', false, true).hasValue()) {
997
- var transform = new svg.Transform(this.style('transform', false, true).value);
998
- transform.apply(ctx);
999
- }
1000
-
1001
- // clip
1002
- if (this.style('clip-path', false, true).hasValue()) {
1003
- var clip = this.style('clip-path', false, true).getDefinition();
1004
- if (clip != null) clip.apply(ctx);
1005
- }
1006
-
1007
- // opacity
1008
- if (this.style('opacity').hasValue()) {
1009
- ctx.globalAlpha = this.style('opacity').numValue();
1010
- }
1011
- }
1012
- }
1013
- svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase;
1014
-
1015
- svg.Element.PathElementBase = function(node) {
1016
- this.base = svg.Element.RenderedElementBase;
1017
- this.base(node);
1018
-
1019
- this.path = function(ctx) {
1020
- if (ctx != null) ctx.beginPath();
1021
- return new svg.BoundingBox();
1022
- }
1023
-
1024
- this.renderChildren = function(ctx) {
1025
- this.path(ctx);
1026
- svg.Mouse.checkPath(this, ctx);
1027
- if (ctx.fillStyle != '') {
1028
- if (this.style('fill-rule').valueOrDefault('inherit') != 'inherit') { ctx.fill(this.style('fill-rule').value); }
1029
- else { ctx.fill(); }
1030
- }
1031
- if (ctx.strokeStyle != '') ctx.stroke();
1032
-
1033
- var markers = this.getMarkers();
1034
- if (markers != null) {
1035
- if (this.style('marker-start').isUrlDefinition()) {
1036
- var marker = this.style('marker-start').getDefinition();
1037
- marker.render(ctx, markers[0][0], markers[0][1]);
1038
- }
1039
- if (this.style('marker-mid').isUrlDefinition()) {
1040
- var marker = this.style('marker-mid').getDefinition();
1041
- for (var i=1;i<markers.length-1;i++) {
1042
- marker.render(ctx, markers[i][0], markers[i][1]);
1043
- }
1044
- }
1045
- if (this.style('marker-end').isUrlDefinition()) {
1046
- var marker = this.style('marker-end').getDefinition();
1047
- marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]);
1048
- }
1049
- }
1050
- }
1051
-
1052
- this.getBoundingBox = function() {
1053
- return this.path();
1054
- }
1055
-
1056
- this.getMarkers = function() {
1057
- return null;
1058
- }
1059
- }
1060
- svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase;
1061
-
1062
- // svg element
1063
- svg.Element.svg = function(node) {
1064
- this.base = svg.Element.RenderedElementBase;
1065
- this.base(node);
1066
-
1067
- this.baseClearContext = this.clearContext;
1068
- this.clearContext = function(ctx) {
1069
- this.baseClearContext(ctx);
1070
- svg.ViewPort.RemoveCurrent();
1071
- }
1072
-
1073
- this.baseSetContext = this.setContext;
1074
- this.setContext = function(ctx) {
1075
- // initial values and defaults
1076
- ctx.strokeStyle = 'rgba(0,0,0,0)';
1077
- ctx.lineCap = 'butt';
1078
- ctx.lineJoin = 'miter';
1079
- ctx.miterLimit = 4;
1080
- if (typeof ctx.font != 'undefined' && typeof window.getComputedStyle != 'undefined') {
1081
- ctx.font = window.getComputedStyle(ctx.canvas).getPropertyValue('font');
1082
- }
1083
-
1084
- this.baseSetContext(ctx);
1085
-
1086
- // create new view port
1087
- if (!this.attribute('x').hasValue()) this.attribute('x', true).value = 0;
1088
- if (!this.attribute('y').hasValue()) this.attribute('y', true).value = 0;
1089
- ctx.translate(this.attribute('x').toPixels('x'), this.attribute('y').toPixels('y'));
1090
-
1091
- var width = svg.ViewPort.width();
1092
- var height = svg.ViewPort.height();
1093
-
1094
- if (!this.attribute('width').hasValue()) this.attribute('width', true).value = '100%';
1095
- if (!this.attribute('height').hasValue()) this.attribute('height', true).value = '100%';
1096
- if (typeof this.root == 'undefined') {
1097
- width = this.attribute('width').toPixels('x');
1098
- height = this.attribute('height').toPixels('y');
1099
-
1100
- var x = 0;
1101
- var y = 0;
1102
- if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) {
1103
- x = -this.attribute('refX').toPixels('x');
1104
- y = -this.attribute('refY').toPixels('y');
1105
- }
1106
-
1107
- if (this.attribute('overflow').valueOrDefault('hidden') != 'visible') {
1108
- ctx.beginPath();
1109
- ctx.moveTo(x, y);
1110
- ctx.lineTo(width, y);
1111
- ctx.lineTo(width, height);
1112
- ctx.lineTo(x, height);
1113
- ctx.closePath();
1114
- ctx.clip();
1115
- }
1116
- }
1117
- svg.ViewPort.SetCurrent(width, height);
1118
-
1119
- // viewbox
1120
- if (this.attribute('viewBox').hasValue()) {
1121
- var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
1122
- var minX = viewBox[0];
1123
- var minY = viewBox[1];
1124
- width = viewBox[2];
1125
- height = viewBox[3];
1126
-
1127
- svg.AspectRatio(ctx,
1128
- this.attribute('preserveAspectRatio').value,
1129
- svg.ViewPort.width(),
1130
- width,
1131
- svg.ViewPort.height(),
1132
- height,
1133
- minX,
1134
- minY,
1135
- this.attribute('refX').value,
1136
- this.attribute('refY').value);
1137
-
1138
- svg.ViewPort.RemoveCurrent();
1139
- svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
1140
- }
1141
- }
1142
- }
1143
- svg.Element.svg.prototype = new svg.Element.RenderedElementBase;
1144
-
1145
- // rect element
1146
- svg.Element.rect = function(node) {
1147
- this.base = svg.Element.PathElementBase;
1148
- this.base(node);
1149
-
1150
- this.path = function(ctx) {
1151
- var x = this.attribute('x').toPixels('x');
1152
- var y = this.attribute('y').toPixels('y');
1153
- var width = this.attribute('width').toPixels('x');
1154
- var height = this.attribute('height').toPixels('y');
1155
- var rx = this.attribute('rx').toPixels('x');
1156
- var ry = this.attribute('ry').toPixels('y');
1157
- if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx;
1158
- if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry;
1159
- rx = Math.min(rx, width / 2.0);
1160
- ry = Math.min(ry, height / 2.0);
1161
- if (ctx != null) {
1162
- ctx.beginPath();
1163
- ctx.moveTo(x + rx, y);
1164
- ctx.lineTo(x + width - rx, y);
1165
- ctx.quadraticCurveTo(x + width, y, x + width, y + ry)
1166
- ctx.lineTo(x + width, y + height - ry);
1167
- ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height)
1168
- ctx.lineTo(x + rx, y + height);
1169
- ctx.quadraticCurveTo(x, y + height, x, y + height - ry)
1170
- ctx.lineTo(x, y + ry);
1171
- ctx.quadraticCurveTo(x, y, x + rx, y)
1172
- ctx.closePath();
1173
- }
1174
-
1175
- return new svg.BoundingBox(x, y, x + width, y + height);
1176
- }
1177
- }
1178
- svg.Element.rect.prototype = new svg.Element.PathElementBase;
1179
-
1180
- // circle element
1181
- svg.Element.circle = function(node) {
1182
- this.base = svg.Element.PathElementBase;
1183
- this.base(node);
1184
-
1185
- this.path = function(ctx) {
1186
- var cx = this.attribute('cx').toPixels('x');
1187
- var cy = this.attribute('cy').toPixels('y');
1188
- var r = this.attribute('r').toPixels();
1189
-
1190
- if (ctx != null) {
1191
- ctx.beginPath();
1192
- ctx.arc(cx, cy, r, 0, Math.PI * 2, true);
1193
- ctx.closePath();
1194
- }
1195
-
1196
- return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);
1197
- }
1198
- }
1199
- svg.Element.circle.prototype = new svg.Element.PathElementBase;
1200
-
1201
- // ellipse element
1202
- svg.Element.ellipse = function(node) {
1203
- this.base = svg.Element.PathElementBase;
1204
- this.base(node);
1205
-
1206
- this.path = function(ctx) {
1207
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
1208
- var rx = this.attribute('rx').toPixels('x');
1209
- var ry = this.attribute('ry').toPixels('y');
1210
- var cx = this.attribute('cx').toPixels('x');
1211
- var cy = this.attribute('cy').toPixels('y');
1212
-
1213
- if (ctx != null) {
1214
- ctx.beginPath();
1215
- ctx.moveTo(cx, cy - ry);
1216
- ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy);
1217
- ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
1218
- ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
1219
- ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
1220
- ctx.closePath();
1221
- }
1222
-
1223
- return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
1224
- }
1225
- }
1226
- svg.Element.ellipse.prototype = new svg.Element.PathElementBase;
1227
-
1228
- // line element
1229
- svg.Element.line = function(node) {
1230
- this.base = svg.Element.PathElementBase;
1231
- this.base(node);
1232
-
1233
- this.getPoints = function() {
1234
- return [
1235
- new svg.Point(this.attribute('x1').toPixels('x'), this.attribute('y1').toPixels('y')),
1236
- new svg.Point(this.attribute('x2').toPixels('x'), this.attribute('y2').toPixels('y'))];
1237
- }
1238
-
1239
- this.path = function(ctx) {
1240
- var points = this.getPoints();
1241
-
1242
- if (ctx != null) {
1243
- ctx.beginPath();
1244
- ctx.moveTo(points[0].x, points[0].y);
1245
- ctx.lineTo(points[1].x, points[1].y);
1246
- }
1247
-
1248
- return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);
1249
- }
1250
-
1251
- this.getMarkers = function() {
1252
- var points = this.getPoints();
1253
- var a = points[0].angleTo(points[1]);
1254
- return [[points[0], a], [points[1], a]];
1255
- }
1256
- }
1257
- svg.Element.line.prototype = new svg.Element.PathElementBase;
1258
-
1259
- // polyline element
1260
- svg.Element.polyline = function(node) {
1261
- this.base = svg.Element.PathElementBase;
1262
- this.base(node);
1263
-
1264
- this.points = svg.CreatePath(this.attribute('points').value);
1265
- this.path = function(ctx) {
1266
- var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);
1267
- if (ctx != null) {
1268
- ctx.beginPath();
1269
- ctx.moveTo(this.points[0].x, this.points[0].y);
1270
- }
1271
- for (var i=1; i<this.points.length; i++) {
1272
- bb.addPoint(this.points[i].x, this.points[i].y);
1273
- if (ctx != null) ctx.lineTo(this.points[i].x, this.points[i].y);
1274
- }
1275
- return bb;
1276
- }
1277
-
1278
- this.getMarkers = function() {
1279
- var markers = [];
1280
- for (var i=0; i<this.points.length - 1; i++) {
1281
- markers.push([this.points[i], this.points[i].angleTo(this.points[i+1])]);
1282
- }
1283
- if (markers.length > 0) {
1284
- markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]);
1285
- }
1286
- return markers;
1287
- }
1288
- }
1289
- svg.Element.polyline.prototype = new svg.Element.PathElementBase;
1290
-
1291
- // polygon element
1292
- svg.Element.polygon = function(node) {
1293
- this.base = svg.Element.polyline;
1294
- this.base(node);
1295
-
1296
- this.basePath = this.path;
1297
- this.path = function(ctx) {
1298
- var bb = this.basePath(ctx);
1299
- if (ctx != null) {
1300
- ctx.lineTo(this.points[0].x, this.points[0].y);
1301
- ctx.closePath();
1302
- }
1303
- return bb;
1304
- }
1305
- }
1306
- svg.Element.polygon.prototype = new svg.Element.polyline;
1307
-
1308
- // path element
1309
- svg.Element.path = function(node) {
1310
- this.base = svg.Element.PathElementBase;
1311
- this.base(node);
1312
-
1313
- var d = this.attribute('d').value;
1314
- // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF
1315
- d = d.replace(/,/gm,' '); // get rid of all commas
1316
- // As the end of a match can also be the start of the next match, we need to run this replace twice.
1317
- for(var i=0; i<2; i++)
1318
- d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,'$1 $2'); // suffix commands with spaces
1319
- d = d.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // prefix commands with spaces
1320
- d = d.replace(/([0-9])([+\-])/gm,'$1 $2'); // separate digits on +- signs
1321
- // Again, we need to run this twice to find all occurances
1322
- for(var i=0; i<2; i++)
1323
- d = d.replace(/(\.[0-9]*)(\.)/gm,'$1 $2'); // separate digits when they start with a comma
1324
- d = d.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,'$1 $3 $4 '); // shorthand elliptical arc path syntax
1325
- d = svg.compressSpaces(d); // compress multiple spaces
1326
- d = svg.trim(d);
1327
- this.PathParser = new (function(d) {
1328
- this.tokens = d.split(' ');
1329
-
1330
- this.reset = function() {
1331
- this.i = -1;
1332
- this.command = '';
1333
- this.previousCommand = '';
1334
- this.start = new svg.Point(0, 0);
1335
- this.control = new svg.Point(0, 0);
1336
- this.current = new svg.Point(0, 0);
1337
- this.points = [];
1338
- this.angles = [];
1339
- }
1340
-
1341
- this.isEnd = function() {
1342
- return this.i >= this.tokens.length - 1;
1343
- }
1344
-
1345
- this.isCommandOrEnd = function() {
1346
- if (this.isEnd()) return true;
1347
- return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;
1348
- }
1349
-
1350
- this.isRelativeCommand = function() {
1351
- switch(this.command)
1352
- {
1353
- case 'm':
1354
- case 'l':
1355
- case 'h':
1356
- case 'v':
1357
- case 'c':
1358
- case 's':
1359
- case 'q':
1360
- case 't':
1361
- case 'a':
1362
- case 'z':
1363
- return true;
1364
- break;
1365
- }
1366
- return false;
1367
- }
1368
-
1369
- this.getToken = function() {
1370
- this.i++;
1371
- return this.tokens[this.i];
1372
- }
1373
-
1374
- this.getScalar = function() {
1375
- return parseFloat(this.getToken());
1376
- }
1377
-
1378
- this.nextCommand = function() {
1379
- this.previousCommand = this.command;
1380
- this.command = this.getToken();
1381
- }
1382
-
1383
- this.getPoint = function() {
1384
- var p = new svg.Point(this.getScalar(), this.getScalar());
1385
- return this.makeAbsolute(p);
1386
- }
1387
-
1388
- this.getAsControlPoint = function() {
1389
- var p = this.getPoint();
1390
- this.control = p;
1391
- return p;
1392
- }
1393
-
1394
- this.getAsCurrentPoint = function() {
1395
- var p = this.getPoint();
1396
- this.current = p;
1397
- return p;
1398
- }
1399
-
1400
- this.getReflectedControlPoint = function() {
1401
- if (this.previousCommand.toLowerCase() != 'c' &&
1402
- this.previousCommand.toLowerCase() != 's' &&
1403
- this.previousCommand.toLowerCase() != 'q' &&
1404
- this.previousCommand.toLowerCase() != 't' ){
1405
- return this.current;
1406
- }
1407
-
1408
- // reflect point
1409
- var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);
1410
- return p;
1411
- }
1412
-
1413
- this.makeAbsolute = function(p) {
1414
- if (this.isRelativeCommand()) {
1415
- p.x += this.current.x;
1416
- p.y += this.current.y;
1417
- }
1418
- return p;
1419
- }
1420
-
1421
- this.addMarker = function(p, from, priorTo) {
1422
- // if the last angle isn't filled in because we didn't have this point yet ...
1423
- if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) {
1424
- this.angles[this.angles.length-1] = this.points[this.points.length-1].angleTo(priorTo);
1425
- }
1426
- this.addMarkerAngle(p, from == null ? null : from.angleTo(p));
1427
- }
1428
-
1429
- this.addMarkerAngle = function(p, a) {
1430
- this.points.push(p);
1431
- this.angles.push(a);
1432
- }
1433
-
1434
- this.getMarkerPoints = function() { return this.points; }
1435
- this.getMarkerAngles = function() {
1436
- for (var i=0; i<this.angles.length; i++) {
1437
- if (this.angles[i] == null) {
1438
- for (var j=i+1; j<this.angles.length; j++) {
1439
- if (this.angles[j] != null) {
1440
- this.angles[i] = this.angles[j];
1441
- break;
1442
- }
1443
- }
1444
- }
1445
- }
1446
- return this.angles;
1447
- }
1448
- })(d);
1449
-
1450
- this.path = function(ctx) {
1451
- var pp = this.PathParser;
1452
- pp.reset();
1453
-
1454
- var bb = new svg.BoundingBox();
1455
- if (ctx != null) ctx.beginPath();
1456
- while (!pp.isEnd()) {
1457
- pp.nextCommand();
1458
- switch (pp.command) {
1459
- case 'M':
1460
- case 'm':
1461
- var p = pp.getAsCurrentPoint();
1462
- pp.addMarker(p);
1463
- bb.addPoint(p.x, p.y);
1464
- if (ctx != null) ctx.moveTo(p.x, p.y);
1465
- pp.start = pp.current;
1466
- while (!pp.isCommandOrEnd()) {
1467
- var p = pp.getAsCurrentPoint();
1468
- pp.addMarker(p, pp.start);
1469
- bb.addPoint(p.x, p.y);
1470
- if (ctx != null) ctx.lineTo(p.x, p.y);
1471
- }
1472
- break;
1473
- case 'L':
1474
- case 'l':
1475
- while (!pp.isCommandOrEnd()) {
1476
- var c = pp.current;
1477
- var p = pp.getAsCurrentPoint();
1478
- pp.addMarker(p, c);
1479
- bb.addPoint(p.x, p.y);
1480
- if (ctx != null) ctx.lineTo(p.x, p.y);
1481
- }
1482
- break;
1483
- case 'H':
1484
- case 'h':
1485
- while (!pp.isCommandOrEnd()) {
1486
- var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);
1487
- pp.addMarker(newP, pp.current);
1488
- pp.current = newP;
1489
- bb.addPoint(pp.current.x, pp.current.y);
1490
- if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1491
- }
1492
- break;
1493
- case 'V':
1494
- case 'v':
1495
- while (!pp.isCommandOrEnd()) {
1496
- var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());
1497
- pp.addMarker(newP, pp.current);
1498
- pp.current = newP;
1499
- bb.addPoint(pp.current.x, pp.current.y);
1500
- if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1501
- }
1502
- break;
1503
- case 'C':
1504
- case 'c':
1505
- while (!pp.isCommandOrEnd()) {
1506
- var curr = pp.current;
1507
- var p1 = pp.getPoint();
1508
- var cntrl = pp.getAsControlPoint();
1509
- var cp = pp.getAsCurrentPoint();
1510
- pp.addMarker(cp, cntrl, p1);
1511
- bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1512
- if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1513
- }
1514
- break;
1515
- case 'S':
1516
- case 's':
1517
- while (!pp.isCommandOrEnd()) {
1518
- var curr = pp.current;
1519
- var p1 = pp.getReflectedControlPoint();
1520
- var cntrl = pp.getAsControlPoint();
1521
- var cp = pp.getAsCurrentPoint();
1522
- pp.addMarker(cp, cntrl, p1);
1523
- bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1524
- if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1525
- }
1526
- break;
1527
- case 'Q':
1528
- case 'q':
1529
- while (!pp.isCommandOrEnd()) {
1530
- var curr = pp.current;
1531
- var cntrl = pp.getAsControlPoint();
1532
- var cp = pp.getAsCurrentPoint();
1533
- pp.addMarker(cp, cntrl, cntrl);
1534
- bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1535
- if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1536
- }
1537
- break;
1538
- case 'T':
1539
- case 't':
1540
- while (!pp.isCommandOrEnd()) {
1541
- var curr = pp.current;
1542
- var cntrl = pp.getReflectedControlPoint();
1543
- pp.control = cntrl;
1544
- var cp = pp.getAsCurrentPoint();
1545
- pp.addMarker(cp, cntrl, cntrl);
1546
- bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1547
- if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1548
- }
1549
- break;
1550
- case 'A':
1551
- case 'a':
1552
- while (!pp.isCommandOrEnd()) {
1553
- var curr = pp.current;
1554
- var rx = pp.getScalar();
1555
- var ry = pp.getScalar();
1556
- var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);
1557
- var largeArcFlag = pp.getScalar();
1558
- var sweepFlag = pp.getScalar();
1559
- var cp = pp.getAsCurrentPoint();
1560
-
1561
- // Conversion from endpoint to center parameterization
1562
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
1563
- // x1', y1'
1564
- var currp = new svg.Point(
1565
- Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0,
1566
- -Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0
1567
- );
1568
- // adjust radii
1569
- var l = Math.pow(currp.x,2)/Math.pow(rx,2)+Math.pow(currp.y,2)/Math.pow(ry,2);
1570
- if (l > 1) {
1571
- rx *= Math.sqrt(l);
1572
- ry *= Math.sqrt(l);
1573
- }
1574
- // cx', cy'
1575
- var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt(
1576
- ((Math.pow(rx,2)*Math.pow(ry,2))-(Math.pow(rx,2)*Math.pow(currp.y,2))-(Math.pow(ry,2)*Math.pow(currp.x,2))) /
1577
- (Math.pow(rx,2)*Math.pow(currp.y,2)+Math.pow(ry,2)*Math.pow(currp.x,2))
1578
- );
1579
- if (isNaN(s)) s = 0;
1580
- var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx);
1581
- // cx, cy
1582
- var centp = new svg.Point(
1583
- (curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y,
1584
- (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y
1585
- );
1586
- // vector magnitude
1587
- var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); }
1588
- // ratio between two vectors
1589
- var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) }
1590
- // angle between two vectors
1591
- var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); }
1592
- // initial angle
1593
- var a1 = a([1,0], [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]);
1594
- // angle delta
1595
- var u = [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry];
1596
- var v = [(-currp.x-cpp.x)/rx,(-currp.y-cpp.y)/ry];
1597
- var ad = a(u, v);
1598
- if (r(u,v) <= -1) ad = Math.PI;
1599
- if (r(u,v) >= 1) ad = 0;
1600
-
1601
- // for markers
1602
- var dir = 1 - sweepFlag ? 1.0 : -1.0;
1603
- var ah = a1 + dir * (ad / 2.0);
1604
- var halfWay = new svg.Point(
1605
- centp.x + rx * Math.cos(ah),
1606
- centp.y + ry * Math.sin(ah)
1607
- );
1608
- pp.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
1609
- pp.addMarkerAngle(cp, ah - dir * Math.PI);
1610
-
1611
- bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better
1612
- if (ctx != null) {
1613
- var r = rx > ry ? rx : ry;
1614
- var sx = rx > ry ? 1 : rx / ry;
1615
- var sy = rx > ry ? ry / rx : 1;
1616
-
1617
- ctx.translate(centp.x, centp.y);
1618
- ctx.rotate(xAxisRotation);
1619
- ctx.scale(sx, sy);
1620
- ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);
1621
- ctx.scale(1/sx, 1/sy);
1622
- ctx.rotate(-xAxisRotation);
1623
- ctx.translate(-centp.x, -centp.y);
1624
- }
1625
- }
1626
- break;
1627
- case 'Z':
1628
- case 'z':
1629
- if (ctx != null) ctx.closePath();
1630
- pp.current = pp.start;
1631
- }
1632
- }
1633
-
1634
- return bb;
1635
- }
1636
-
1637
- this.getMarkers = function() {
1638
- var points = this.PathParser.getMarkerPoints();
1639
- var angles = this.PathParser.getMarkerAngles();
1640
-
1641
- var markers = [];
1642
- for (var i=0; i<points.length; i++) {
1643
- markers.push([points[i], angles[i]]);
1644
- }
1645
- return markers;
1646
- }
1647
- }
1648
- svg.Element.path.prototype = new svg.Element.PathElementBase;
1649
-
1650
- // pattern element
1651
- svg.Element.pattern = function(node) {
1652
- this.base = svg.Element.ElementBase;
1653
- this.base(node);
1654
-
1655
- this.createPattern = function(ctx, element) {
1656
- var width = this.attribute('width').toPixels('x', true);
1657
- var height = this.attribute('height').toPixels('y', true);
1658
-
1659
- // render me using a temporary svg element
1660
- var tempSvg = new svg.Element.svg();
1661
- tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1662
- tempSvg.attributes['width'] = new svg.Property('width', width + 'px');
1663
- tempSvg.attributes['height'] = new svg.Property('height', height + 'px');
1664
- tempSvg.attributes['transform'] = new svg.Property('transform', this.attribute('patternTransform').value);
1665
- tempSvg.children = this.children;
1666
-
1667
- var c = document.createElement('canvas');
1668
- c.width = width;
1669
- c.height = height;
1670
- var cctx = c.getContext('2d');
1671
- if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) {
1672
- cctx.translate(this.attribute('x').toPixels('x', true), this.attribute('y').toPixels('y', true));
1673
- }
1674
- // render 3x3 grid so when we transform there's no white space on edges
1675
- for (var x=-1; x<=1; x++) {
1676
- for (var y=-1; y<=1; y++) {
1677
- cctx.save();
1678
- tempSvg.attributes['x'] = new svg.Property('x', x * c.width);
1679
- tempSvg.attributes['y'] = new svg.Property('y', y * c.height);
1680
- tempSvg.render(cctx);
1681
- cctx.restore();
1682
- }
1683
- }
1684
- var pattern = ctx.createPattern(c, 'repeat');
1685
- return pattern;
1686
- }
1687
- }
1688
- svg.Element.pattern.prototype = new svg.Element.ElementBase;
1689
-
1690
- // marker element
1691
- svg.Element.marker = function(node) {
1692
- this.base = svg.Element.ElementBase;
1693
- this.base(node);
1694
-
1695
- this.baseRender = this.render;
1696
- this.render = function(ctx, point, angle) {
1697
- ctx.translate(point.x, point.y);
1698
- if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle);
1699
- if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth);
1700
- ctx.save();
1701
-
1702
- // render me using a temporary svg element
1703
- var tempSvg = new svg.Element.svg();
1704
- tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1705
- tempSvg.attributes['refX'] = new svg.Property('refX', this.attribute('refX').value);
1706
- tempSvg.attributes['refY'] = new svg.Property('refY', this.attribute('refY').value);
1707
- tempSvg.attributes['width'] = new svg.Property('width', this.attribute('markerWidth').value);
1708
- tempSvg.attributes['height'] = new svg.Property('height', this.attribute('markerHeight').value);
1709
- tempSvg.attributes['fill'] = new svg.Property('fill', this.attribute('fill').valueOrDefault('black'));
1710
- tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none'));
1711
- tempSvg.children = this.children;
1712
- tempSvg.render(ctx);
1713
-
1714
- ctx.restore();
1715
- if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth);
1716
- if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle);
1717
- ctx.translate(-point.x, -point.y);
1718
- }
1719
- }
1720
- svg.Element.marker.prototype = new svg.Element.ElementBase;
1721
-
1722
- // definitions element
1723
- svg.Element.defs = function(node) {
1724
- this.base = svg.Element.ElementBase;
1725
- this.base(node);
1726
-
1727
- this.render = function(ctx) {
1728
- // NOOP
1729
- }
1730
- }
1731
- svg.Element.defs.prototype = new svg.Element.ElementBase;
1732
-
1733
- // base for gradients
1734
- svg.Element.GradientBase = function(node) {
1735
- this.base = svg.Element.ElementBase;
1736
- this.base(node);
1737
-
1738
- this.stops = [];
1739
- for (var i=0; i<this.children.length; i++) {
1740
- var child = this.children[i];
1741
- if (child.type == 'stop') this.stops.push(child);
1742
- }
1743
-
1744
- this.getGradient = function() {
1745
- // OVERRIDE ME!
1746
- }
1747
-
1748
- this.gradientUnits = function () {
1749
- return this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
1750
- }
1751
-
1752
- this.attributesToInherit = ['gradientUnits'];
1753
-
1754
- this.inheritStopContainer = function (stopsContainer) {
1755
- for (var i=0; i<this.attributesToInherit.length; i++) {
1756
- var attributeToInherit = this.attributesToInherit[i];
1757
- if (!this.attribute(attributeToInherit).hasValue() && stopsContainer.attribute(attributeToInherit).hasValue()) {
1758
- this.attribute(attributeToInherit, true).value = stopsContainer.attribute(attributeToInherit).value;
1759
- }
1760
- }
1761
- }
1762
-
1763
- this.createGradient = function(ctx, element, parentOpacityProp) {
1764
- var stopsContainer = this;
1765
- if (this.getHrefAttribute().hasValue()) {
1766
- stopsContainer = this.getHrefAttribute().getDefinition();
1767
- this.inheritStopContainer(stopsContainer);
1768
- }
1769
-
1770
- var addParentOpacity = function (color) {
1771
- if (parentOpacityProp.hasValue()) {
1772
- var p = new svg.Property('color', color);
1773
- return p.addOpacity(parentOpacityProp).value;
1774
- }
1775
- return color;
1776
- };
1777
-
1778
- var g = this.getGradient(ctx, element);
1779
- if (g == null) return addParentOpacity(stopsContainer.stops[stopsContainer.stops.length - 1].color);
1780
- for (var i=0; i<stopsContainer.stops.length; i++) {
1781
- g.addColorStop(stopsContainer.stops[i].offset, addParentOpacity(stopsContainer.stops[i].color));
1782
- }
1783
-
1784
- if (this.attribute('gradientTransform').hasValue()) {
1785
- // render as transformed pattern on temporary canvas
1786
- var rootView = svg.ViewPort.viewPorts[0];
1787
-
1788
- var rect = new svg.Element.rect();
1789
- rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0);
1790
- rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0);
1791
- rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
1792
- rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
1793
-
1794
- var group = new svg.Element.g();
1795
- group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
1796
- group.children = [ rect ];
1797
-
1798
- var tempSvg = new svg.Element.svg();
1799
- tempSvg.attributes['x'] = new svg.Property('x', 0);
1800
- tempSvg.attributes['y'] = new svg.Property('y', 0);
1801
- tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
1802
- tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
1803
- tempSvg.children = [ group ];
1804
-
1805
- var c = document.createElement('canvas');
1806
- c.width = rootView.width;
1807
- c.height = rootView.height;
1808
- var tempCtx = c.getContext('2d');
1809
- tempCtx.fillStyle = g;
1810
- tempSvg.render(tempCtx);
1811
- return tempCtx.createPattern(c, 'no-repeat');
1812
- }
1813
-
1814
- return g;
1815
- }
1816
- }
1817
- svg.Element.GradientBase.prototype = new svg.Element.ElementBase;
1818
-
1819
- // linear gradient element
1820
- svg.Element.linearGradient = function(node) {
1821
- this.base = svg.Element.GradientBase;
1822
- this.base(node);
1823
-
1824
- this.attributesToInherit.push('x1');
1825
- this.attributesToInherit.push('y1');
1826
- this.attributesToInherit.push('x2');
1827
- this.attributesToInherit.push('y2');
1828
-
1829
- this.getGradient = function(ctx, element) {
1830
- var bb = this.gradientUnits() == 'objectBoundingBox' ? element.getBoundingBox() : null;
1831
-
1832
- if (!this.attribute('x1').hasValue()
1833
- && !this.attribute('y1').hasValue()
1834
- && !this.attribute('x2').hasValue()
1835
- && !this.attribute('y2').hasValue()) {
1836
- this.attribute('x1', true).value = 0;
1837
- this.attribute('y1', true).value = 0;
1838
- this.attribute('x2', true).value = 1;
1839
- this.attribute('y2', true).value = 0;
1840
- }
1841
-
1842
- var x1 = (this.gradientUnits() == 'objectBoundingBox'
1843
- ? bb.x() + bb.width() * this.attribute('x1').numValue()
1844
- : this.attribute('x1').toPixels('x'));
1845
- var y1 = (this.gradientUnits() == 'objectBoundingBox'
1846
- ? bb.y() + bb.height() * this.attribute('y1').numValue()
1847
- : this.attribute('y1').toPixels('y'));
1848
- var x2 = (this.gradientUnits() == 'objectBoundingBox'
1849
- ? bb.x() + bb.width() * this.attribute('x2').numValue()
1850
- : this.attribute('x2').toPixels('x'));
1851
- var y2 = (this.gradientUnits() == 'objectBoundingBox'
1852
- ? bb.y() + bb.height() * this.attribute('y2').numValue()
1853
- : this.attribute('y2').toPixels('y'));
1854
-
1855
- if (x1 == x2 && y1 == y2) return null;
1856
- return ctx.createLinearGradient(x1, y1, x2, y2);
1857
- }
1858
- }
1859
- svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
1860
-
1861
- // radial gradient element
1862
- svg.Element.radialGradient = function(node) {
1863
- this.base = svg.Element.GradientBase;
1864
- this.base(node);
1865
-
1866
- this.attributesToInherit.push('cx');
1867
- this.attributesToInherit.push('cy');
1868
- this.attributesToInherit.push('r');
1869
- this.attributesToInherit.push('fx');
1870
- this.attributesToInherit.push('fy');
1871
-
1872
- this.getGradient = function(ctx, element) {
1873
- var bb = element.getBoundingBox();
1874
-
1875
- if (!this.attribute('cx').hasValue()) this.attribute('cx', true).value = '50%';
1876
- if (!this.attribute('cy').hasValue()) this.attribute('cy', true).value = '50%';
1877
- if (!this.attribute('r').hasValue()) this.attribute('r', true).value = '50%';
1878
-
1879
- var cx = (this.gradientUnits() == 'objectBoundingBox'
1880
- ? bb.x() + bb.width() * this.attribute('cx').numValue()
1881
- : this.attribute('cx').toPixels('x'));
1882
- var cy = (this.gradientUnits() == 'objectBoundingBox'
1883
- ? bb.y() + bb.height() * this.attribute('cy').numValue()
1884
- : this.attribute('cy').toPixels('y'));
1885
-
1886
- var fx = cx;
1887
- var fy = cy;
1888
- if (this.attribute('fx').hasValue()) {
1889
- fx = (this.gradientUnits() == 'objectBoundingBox'
1890
- ? bb.x() + bb.width() * this.attribute('fx').numValue()
1891
- : this.attribute('fx').toPixels('x'));
1892
- }
1893
- if (this.attribute('fy').hasValue()) {
1894
- fy = (this.gradientUnits() == 'objectBoundingBox'
1895
- ? bb.y() + bb.height() * this.attribute('fy').numValue()
1896
- : this.attribute('fy').toPixels('y'));
1897
- }
1898
-
1899
- var r = (this.gradientUnits() == 'objectBoundingBox'
1900
- ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
1901
- : this.attribute('r').toPixels());
1902
-
1903
- return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
1904
- }
1905
- }
1906
- svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
1907
-
1908
- // gradient stop element
1909
- svg.Element.stop = function(node) {
1910
- this.base = svg.Element.ElementBase;
1911
- this.base(node);
1912
-
1913
- this.offset = this.attribute('offset').numValue();
1914
- if (this.offset < 0) this.offset = 0;
1915
- if (this.offset > 1) this.offset = 1;
1916
-
1917
- var stopColor = this.style('stop-color', true);
1918
- if (stopColor.value === '') stopColor.value = '#000';
1919
- if (this.style('stop-opacity').hasValue()) stopColor = stopColor.addOpacity(this.style('stop-opacity'));
1920
- this.color = stopColor.value;
1921
- }
1922
- svg.Element.stop.prototype = new svg.Element.ElementBase;
1923
-
1924
- // animation base element
1925
- svg.Element.AnimateBase = function(node) {
1926
- this.base = svg.Element.ElementBase;
1927
- this.base(node);
1928
-
1929
- svg.Animations.push(this);
1930
-
1931
- this.duration = 0.0;
1932
- this.begin = this.attribute('begin').toMilliseconds();
1933
- this.maxDuration = this.begin + this.attribute('dur').toMilliseconds();
1934
-
1935
- this.getProperty = function() {
1936
- var attributeType = this.attribute('attributeType').value;
1937
- var attributeName = this.attribute('attributeName').value;
1938
-
1939
- if (attributeType == 'CSS') {
1940
- return this.parent.style(attributeName, true);
1941
- }
1942
- return this.parent.attribute(attributeName, true);
1943
- };
1944
-
1945
- this.initialValue = null;
1946
- this.initialUnits = '';
1947
- this.removed = false;
1948
-
1949
- this.calcValue = function() {
1950
- // OVERRIDE ME!
1951
- return '';
1952
- }
1953
-
1954
- this.update = function(delta) {
1955
- // set initial value
1956
- if (this.initialValue == null) {
1957
- this.initialValue = this.getProperty().value;
1958
- this.initialUnits = this.getProperty().getUnits();
1959
- }
1960
-
1961
- // if we're past the end time
1962
- if (this.duration > this.maxDuration) {
1963
- // loop for indefinitely repeating animations
1964
- if (this.attribute('repeatCount').value == 'indefinite'
1965
- || this.attribute('repeatDur').value == 'indefinite') {
1966
- this.duration = 0.0
1967
- }
1968
- else if (this.attribute('fill').valueOrDefault('remove') == 'freeze' && !this.frozen) {
1969
- this.frozen = true;
1970
- this.parent.animationFrozen = true;
1971
- this.parent.animationFrozenValue = this.getProperty().value;
1972
- }
1973
- else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) {
1974
- this.removed = true;
1975
- this.getProperty().value = this.parent.animationFrozen ? this.parent.animationFrozenValue : this.initialValue;
1976
- return true;
1977
- }
1978
- return false;
1979
- }
1980
- this.duration = this.duration + delta;
1981
-
1982
- // if we're past the begin time
1983
- var updated = false;
1984
- if (this.begin < this.duration) {
1985
- var newValue = this.calcValue(); // tween
1986
-
1987
- if (this.attribute('type').hasValue()) {
1988
- // for transform, etc.
1989
- var type = this.attribute('type').value;
1990
- newValue = type + '(' + newValue + ')';
1991
- }
1992
-
1993
- this.getProperty().value = newValue;
1994
- updated = true;
1995
- }
1996
-
1997
- return updated;
1998
- }
1999
-
2000
- this.from = this.attribute('from');
2001
- this.to = this.attribute('to');
2002
- this.values = this.attribute('values');
2003
- if (this.values.hasValue()) this.values.value = this.values.value.split(';');
2004
-
2005
- // fraction of duration we've covered
2006
- this.progress = function() {
2007
- var ret = { progress: (this.duration - this.begin) / (this.maxDuration - this.begin) };
2008
- if (this.values.hasValue()) {
2009
- var p = ret.progress * (this.values.value.length - 1);
2010
- var lb = Math.floor(p), ub = Math.ceil(p);
2011
- ret.from = new svg.Property('from', parseFloat(this.values.value[lb]));
2012
- ret.to = new svg.Property('to', parseFloat(this.values.value[ub]));
2013
- ret.progress = (p - lb) / (ub - lb);
2014
- }
2015
- else {
2016
- ret.from = this.from;
2017
- ret.to = this.to;
2018
- }
2019
- return ret;
2020
- }
2021
- }
2022
- svg.Element.AnimateBase.prototype = new svg.Element.ElementBase;
2023
-
2024
- // animate element
2025
- svg.Element.animate = function(node) {
2026
- this.base = svg.Element.AnimateBase;
2027
- this.base(node);
2028
-
2029
- this.calcValue = function() {
2030
- var p = this.progress();
2031
-
2032
- // tween value linearly
2033
- var newValue = p.from.numValue() + (p.to.numValue() - p.from.numValue()) * p.progress;
2034
- return newValue + this.initialUnits;
2035
- };
2036
- }
2037
- svg.Element.animate.prototype = new svg.Element.AnimateBase;
2038
-
2039
- // animate color element
2040
- svg.Element.animateColor = function(node) {
2041
- this.base = svg.Element.AnimateBase;
2042
- this.base(node);
2043
-
2044
- this.calcValue = function() {
2045
- var p = this.progress();
2046
- var from = new RGBColor(p.from.value);
2047
- var to = new RGBColor(p.to.value);
2048
-
2049
- if (from.ok && to.ok) {
2050
- // tween color linearly
2051
- var r = from.r + (to.r - from.r) * p.progress;
2052
- var g = from.g + (to.g - from.g) * p.progress;
2053
- var b = from.b + (to.b - from.b) * p.progress;
2054
- return 'rgb('+parseInt(r,10)+','+parseInt(g,10)+','+parseInt(b,10)+')';
2055
- }
2056
- return this.attribute('from').value;
2057
- };
2058
- }
2059
- svg.Element.animateColor.prototype = new svg.Element.AnimateBase;
2060
-
2061
- // animate transform element
2062
- svg.Element.animateTransform = function(node) {
2063
- this.base = svg.Element.AnimateBase;
2064
- this.base(node);
2065
-
2066
- this.calcValue = function() {
2067
- var p = this.progress();
2068
-
2069
- // tween value linearly
2070
- var from = svg.ToNumberArray(p.from.value);
2071
- var to = svg.ToNumberArray(p.to.value);
2072
- var newValue = '';
2073
- for (var i=0; i<from.length; i++) {
2074
- newValue += from[i] + (to[i] - from[i]) * p.progress + ' ';
2075
- }
2076
- return newValue;
2077
- };
2078
- }
2079
- svg.Element.animateTransform.prototype = new svg.Element.animate;
2080
-
2081
- // font element
2082
- svg.Element.font = function(node) {
2083
- this.base = svg.Element.ElementBase;
2084
- this.base(node);
2085
-
2086
- this.horizAdvX = this.attribute('horiz-adv-x').numValue();
2087
-
2088
- this.isRTL = false;
2089
- this.isArabic = false;
2090
- this.fontFace = null;
2091
- this.missingGlyph = null;
2092
- this.glyphs = [];
2093
- for (var i=0; i<this.children.length; i++) {
2094
- var child = this.children[i];
2095
- if (child.type == 'font-face') {
2096
- this.fontFace = child;
2097
- if (child.style('font-family').hasValue()) {
2098
- svg.Definitions[child.style('font-family').value] = this;
2099
- }
2100
- }
2101
- else if (child.type == 'missing-glyph') this.missingGlyph = child;
2102
- else if (child.type == 'glyph') {
2103
- if (child.arabicForm != '') {
2104
- this.isRTL = true;
2105
- this.isArabic = true;
2106
- if (typeof this.glyphs[child.unicode] == 'undefined') this.glyphs[child.unicode] = [];
2107
- this.glyphs[child.unicode][child.arabicForm] = child;
2108
- }
2109
- else {
2110
- this.glyphs[child.unicode] = child;
2111
- }
2112
- }
2113
- }
2114
- }
2115
- svg.Element.font.prototype = new svg.Element.ElementBase;
2116
-
2117
- // font-face element
2118
- svg.Element.fontface = function(node) {
2119
- this.base = svg.Element.ElementBase;
2120
- this.base(node);
2121
-
2122
- this.ascent = this.attribute('ascent').value;
2123
- this.descent = this.attribute('descent').value;
2124
- this.unitsPerEm = this.attribute('units-per-em').numValue();
2125
- }
2126
- svg.Element.fontface.prototype = new svg.Element.ElementBase;
2127
-
2128
- // missing-glyph element
2129
- svg.Element.missingglyph = function(node) {
2130
- this.base = svg.Element.path;
2131
- this.base(node);
2132
-
2133
- this.horizAdvX = 0;
2134
- }
2135
- svg.Element.missingglyph.prototype = new svg.Element.path;
2136
-
2137
- // glyph element
2138
- svg.Element.glyph = function(node) {
2139
- this.base = svg.Element.path;
2140
- this.base(node);
2141
-
2142
- this.horizAdvX = this.attribute('horiz-adv-x').numValue();
2143
- this.unicode = this.attribute('unicode').value;
2144
- this.arabicForm = this.attribute('arabic-form').value;
2145
- }
2146
- svg.Element.glyph.prototype = new svg.Element.path;
2147
-
2148
- // text element
2149
- svg.Element.text = function(node) {
2150
- this.captureTextNodes = true;
2151
- this.base = svg.Element.RenderedElementBase;
2152
- this.base(node);
2153
-
2154
- this.baseSetContext = this.setContext;
2155
- this.setContext = function(ctx) {
2156
- this.baseSetContext(ctx);
2157
-
2158
- var textBaseline = this.style('dominant-baseline').toTextBaseline();
2159
- if (textBaseline == null) textBaseline = this.style('alignment-baseline').toTextBaseline();
2160
- if (textBaseline != null) ctx.textBaseline = textBaseline;
2161
- }
2162
-
2163
- this.getBoundingBox = function () {
2164
- var x = this.attribute('x').toPixels('x');
2165
- var y = this.attribute('y').toPixels('y');
2166
- var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2167
- return new svg.BoundingBox(x, y - fontSize, x + Math.floor(fontSize * 2.0 / 3.0) * this.children[0].getText().length, y);
2168
- }
2169
-
2170
- this.renderChildren = function(ctx) {
2171
- this.x = this.attribute('x').toPixels('x');
2172
- this.y = this.attribute('y').toPixels('y');
2173
- if (this.attribute('dx').hasValue()) this.x += this.attribute('dx').toPixels('x');
2174
- if (this.attribute('dy').hasValue()) this.y += this.attribute('dy').toPixels('y');
2175
- this.x += this.getAnchorDelta(ctx, this, 0);
2176
- for (var i=0; i<this.children.length; i++) {
2177
- this.renderChild(ctx, this, this, i);
2178
- }
2179
- }
2180
-
2181
- this.getAnchorDelta = function (ctx, parent, startI) {
2182
- var textAnchor = this.style('text-anchor').valueOrDefault('start');
2183
- if (textAnchor != 'start') {
2184
- var width = 0;
2185
- for (var i=startI; i<parent.children.length; i++) {
2186
- var child = parent.children[i];
2187
- if (i > startI && child.attribute('x').hasValue()) break; // new group
2188
- width += child.measureTextRecursive(ctx);
2189
- }
2190
- return -1 * (textAnchor == 'end' ? width : width / 2.0);
2191
- }
2192
- return 0;
2193
- }
2194
-
2195
- this.renderChild = function(ctx, textParent, parent, i) {
2196
- var child = parent.children[i];
2197
- if (child.attribute('x').hasValue()) {
2198
- child.x = child.attribute('x').toPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
2199
- if (child.attribute('dx').hasValue()) child.x += child.attribute('dx').toPixels('x');
2200
- }
2201
- else {
2202
- if (child.attribute('dx').hasValue()) textParent.x += child.attribute('dx').toPixels('x');
2203
- child.x = textParent.x;
2204
- }
2205
- textParent.x = child.x + child.measureText(ctx);
2206
-
2207
- if (child.attribute('y').hasValue()) {
2208
- child.y = child.attribute('y').toPixels('y');
2209
- if (child.attribute('dy').hasValue()) child.y += child.attribute('dy').toPixels('y');
2210
- }
2211
- else {
2212
- if (child.attribute('dy').hasValue()) textParent.y += child.attribute('dy').toPixels('y');
2213
- child.y = textParent.y;
2214
- }
2215
- textParent.y = child.y;
2216
-
2217
- child.render(ctx);
2218
-
2219
- for (var i=0; i<child.children.length; i++) {
2220
- textParent.renderChild(ctx, textParent, child, i);
2221
- }
2222
- }
2223
- }
2224
- svg.Element.text.prototype = new svg.Element.RenderedElementBase;
2225
-
2226
- // text base
2227
- svg.Element.TextElementBase = function(node) {
2228
- this.base = svg.Element.RenderedElementBase;
2229
- this.base(node);
2230
-
2231
- this.getGlyph = function(font, text, i) {
2232
- var c = text[i];
2233
- var glyph = null;
2234
- if (font.isArabic) {
2235
- var arabicForm = 'isolated';
2236
- if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal';
2237
- if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial';
2238
- if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial';
2239
- if (typeof font.glyphs[c] != 'undefined') {
2240
- glyph = font.glyphs[c][arabicForm];
2241
- if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
2242
- }
2243
- }
2244
- else {
2245
- glyph = font.glyphs[c];
2246
- }
2247
- if (glyph == null) glyph = font.missingGlyph;
2248
- return glyph;
2249
- }
2250
-
2251
- this.renderChildren = function(ctx) {
2252
- var customFont = this.parent.style('font-family').getDefinition();
2253
- if (customFont != null) {
2254
- var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2255
- var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
2256
- var text = this.getText();
2257
- if (customFont.isRTL) text = text.split("").reverse().join("");
2258
-
2259
- var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2260
- for (var i=0; i<text.length; i++) {
2261
- var glyph = this.getGlyph(customFont, text, i);
2262
- var scale = fontSize / customFont.fontFace.unitsPerEm;
2263
- ctx.translate(this.x, this.y);
2264
- ctx.scale(scale, -scale);
2265
- var lw = ctx.lineWidth;
2266
- ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
2267
- if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
2268
- glyph.render(ctx);
2269
- if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
2270
- ctx.lineWidth = lw;
2271
- ctx.scale(1/scale, -1/scale);
2272
- ctx.translate(-this.x, -this.y);
2273
-
2274
- this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
2275
- if (typeof dx[i] != 'undefined' && !isNaN(dx[i])) {
2276
- this.x += dx[i];
2277
- }
2278
- }
2279
- return;
2280
- }
2281
-
2282
- if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
2283
- if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
2284
- }
2285
-
2286
- this.getText = function() {
2287
- // OVERRIDE ME
2288
- }
2289
-
2290
- this.measureTextRecursive = function(ctx) {
2291
- var width = this.measureText(ctx);
2292
- for (var i=0; i<this.children.length; i++) {
2293
- width += this.children[i].measureTextRecursive(ctx);
2294
- }
2295
- return width;
2296
- }
2297
-
2298
- this.measureText = function(ctx) {
2299
- var customFont = this.parent.style('font-family').getDefinition();
2300
- if (customFont != null) {
2301
- var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2302
- var measure = 0;
2303
- var text = this.getText();
2304
- if (customFont.isRTL) text = text.split("").reverse().join("");
2305
- var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2306
- for (var i=0; i<text.length; i++) {
2307
- var glyph = this.getGlyph(customFont, text, i);
2308
- measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
2309
- if (typeof dx[i] != 'undefined' && !isNaN(dx[i])) {
2310
- measure += dx[i];
2311
- }
2312
- }
2313
- return measure;
2314
- }
2315
-
2316
- var textToMeasure = svg.compressSpaces(this.getText());
2317
- if (!ctx.measureText) return textToMeasure.length * 10;
2318
-
2319
- ctx.save();
2320
- this.setContext(ctx);
2321
- var width = ctx.measureText(textToMeasure).width;
2322
- ctx.restore();
2323
- return width;
2324
- }
2325
- }
2326
- svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase;
2327
-
2328
- // tspan
2329
- svg.Element.tspan = function(node) {
2330
- this.captureTextNodes = true;
2331
- this.base = svg.Element.TextElementBase;
2332
- this.base(node);
2333
-
2334
- this.text = svg.compressSpaces(node.value || node.text || node.textContent || '');
2335
- this.getText = function() {
2336
- // if this node has children, then they own the text
2337
- if (this.children.length > 0) { return ''; }
2338
- return this.text;
2339
- }
2340
- }
2341
- svg.Element.tspan.prototype = new svg.Element.TextElementBase;
2342
-
2343
- // tref
2344
- svg.Element.tref = function(node) {
2345
- this.base = svg.Element.TextElementBase;
2346
- this.base(node);
2347
-
2348
- this.getText = function() {
2349
- var element = this.getHrefAttribute().getDefinition();
2350
- if (element != null) return element.children[0].getText();
2351
- }
2352
- }
2353
- svg.Element.tref.prototype = new svg.Element.TextElementBase;
2354
-
2355
- // a element
2356
- svg.Element.a = function(node) {
2357
- this.base = svg.Element.TextElementBase;
2358
- this.base(node);
2359
-
2360
- this.hasText = node.childNodes.length > 0;
2361
- for (var i=0; i<node.childNodes.length; i++) {
2362
- if (node.childNodes[i].nodeType != 3) this.hasText = false;
2363
- }
2364
-
2365
- // this might contain text
2366
- this.text = this.hasText ? node.childNodes[0].value : '';
2367
- this.getText = function() {
2368
- return this.text;
2369
- }
2370
-
2371
- this.baseRenderChildren = this.renderChildren;
2372
- this.renderChildren = function(ctx) {
2373
- if (this.hasText) {
2374
- // render as text element
2375
- this.baseRenderChildren(ctx);
2376
- var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
2377
- svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.toPixels('y'), this.x + this.measureText(ctx), this.y));
2378
- }
2379
- else if (this.children.length > 0) {
2380
- // render as temporary group
2381
- var g = new svg.Element.g();
2382
- g.children = this.children;
2383
- g.parent = this;
2384
- g.render(ctx);
2385
- }
2386
- }
2387
-
2388
- this.onclick = function() {
2389
- window.open(this.getHrefAttribute().value);
2390
- }
2391
-
2392
- this.onmousemove = function() {
2393
- svg.ctx.canvas.style.cursor = 'pointer';
2394
- }
2395
- }
2396
- svg.Element.a.prototype = new svg.Element.TextElementBase;
2397
-
2398
- // image element
2399
- svg.Element.image = function(node) {
2400
- this.base = svg.Element.RenderedElementBase;
2401
- this.base(node);
2402
-
2403
- var href = this.getHrefAttribute().value;
2404
- if (href == '') { return; }
2405
- var isSvg = href.match(/\.svg$/)
2406
-
2407
- svg.Images.push(this);
2408
- this.loaded = false;
2409
- if (!isSvg) {
2410
- this.img = document.createElement('img');
2411
- if (svg.opts['useCORS'] == true) { this.img.crossOrigin = 'Anonymous'; }
2412
- var self = this;
2413
- this.img.onload = function() { self.loaded = true; }
2414
- this.img.onerror = function() { svg.log('ERROR: image "' + href + '" not found'); self.loaded = true; }
2415
- this.img.src = href;
2416
- }
2417
- else {
2418
- this.img = svg.ajax(href);
2419
- this.loaded = true;
2420
- }
2421
-
2422
- this.renderChildren = function(ctx) {
2423
- var x = this.attribute('x').toPixels('x');
2424
- var y = this.attribute('y').toPixels('y');
2425
-
2426
- var width = this.attribute('width').toPixels('x');
2427
- var height = this.attribute('height').toPixels('y');
2428
- if (width == 0 || height == 0) return;
2429
-
2430
- ctx.save();
2431
- if (isSvg) {
2432
- ctx.drawSvg(this.img, x, y, width, height);
2433
- }
2434
- else {
2435
- ctx.translate(x, y);
2436
- svg.AspectRatio(ctx,
2437
- this.attribute('preserveAspectRatio').value,
2438
- width,
2439
- this.img.width,
2440
- height,
2441
- this.img.height,
2442
- 0,
2443
- 0);
2444
- ctx.drawImage(this.img, 0, 0);
2445
- }
2446
- ctx.restore();
2447
- }
2448
-
2449
- this.getBoundingBox = function() {
2450
- var x = this.attribute('x').toPixels('x');
2451
- var y = this.attribute('y').toPixels('y');
2452
- var width = this.attribute('width').toPixels('x');
2453
- var height = this.attribute('height').toPixels('y');
2454
- return new svg.BoundingBox(x, y, x + width, y + height);
2455
- }
2456
- }
2457
- svg.Element.image.prototype = new svg.Element.RenderedElementBase;
2458
-
2459
- // group element
2460
- svg.Element.g = function(node) {
2461
- this.base = svg.Element.RenderedElementBase;
2462
- this.base(node);
2463
-
2464
- this.getBoundingBox = function() {
2465
- var bb = new svg.BoundingBox();
2466
- for (var i=0; i<this.children.length; i++) {
2467
- bb.addBoundingBox(this.children[i].getBoundingBox());
2468
- }
2469
- return bb;
2470
- };
2471
- }
2472
- svg.Element.g.prototype = new svg.Element.RenderedElementBase;
2473
-
2474
- // symbol element
2475
- svg.Element.symbol = function(node) {
2476
- this.base = svg.Element.RenderedElementBase;
2477
- this.base(node);
2478
-
2479
- this.render = function(ctx) {
2480
- // NO RENDER
2481
- };
2482
- }
2483
- svg.Element.symbol.prototype = new svg.Element.RenderedElementBase;
2484
-
2485
- // style element
2486
- svg.Element.style = function(node) {
2487
- this.base = svg.Element.ElementBase;
2488
- this.base(node);
2489
-
2490
- // text, or spaces then CDATA
2491
- var css = ''
2492
- for (var i=0; i<node.childNodes.length; i++) {
2493
- css += node.childNodes[i].data;
2494
- }
2495
- css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
2496
- css = svg.compressSpaces(css); // replace whitespace
2497
- var cssDefs = css.split('}');
2498
- for (var i=0; i<cssDefs.length; i++) {
2499
- if (svg.trim(cssDefs[i]) != '') {
2500
- var cssDef = cssDefs[i].split('{');
2501
- var cssClasses = cssDef[0].split(',');
2502
- var cssProps = cssDef[1].split(';');
2503
- for (var j=0; j<cssClasses.length; j++) {
2504
- var cssClass = svg.trim(cssClasses[j]);
2505
- if (cssClass != '') {
2506
- var props = svg.Styles[cssClass] || {};
2507
- for (var k=0; k<cssProps.length; k++) {
2508
- var prop = cssProps[k].indexOf(':');
2509
- var name = cssProps[k].substr(0, prop);
2510
- var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
2511
- if (name != null && value != null) {
2512
- props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
2513
- }
2514
- }
2515
- svg.Styles[cssClass] = props;
2516
- svg.StylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
2517
- if (cssClass == '@font-face') {
2518
- var fontFamily = props['font-family'].value.replace(/"/g,'');
2519
- var srcs = props['src'].value.split(',');
2520
- for (var s=0; s<srcs.length; s++) {
2521
- if (srcs[s].indexOf('format("svg")') > 0) {
2522
- var urlStart = srcs[s].indexOf('url');
2523
- var urlEnd = srcs[s].indexOf(')', urlStart);
2524
- var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
2525
- var doc = svg.parseXml(svg.ajax(url));
2526
- var fonts = doc.getElementsByTagName('font');
2527
- for (var f=0; f<fonts.length; f++) {
2528
- var font = svg.CreateElement(fonts[f]);
2529
- svg.Definitions[fontFamily] = font;
2530
- }
2531
- }
2532
- }
2533
- }
2534
- }
2535
- }
2536
- }
2537
- }
2538
- }
2539
- svg.Element.style.prototype = new svg.Element.ElementBase;
2540
-
2541
- // use element
2542
- svg.Element.use = function(node) {
2543
- this.base = svg.Element.RenderedElementBase;
2544
- this.base(node);
2545
-
2546
- this.baseSetContext = this.setContext;
2547
- this.setContext = function(ctx) {
2548
- this.baseSetContext(ctx);
2549
- if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').toPixels('x'), 0);
2550
- if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').toPixels('y'));
2551
- }
2552
-
2553
- var element = this.getHrefAttribute().getDefinition();
2554
-
2555
- this.path = function(ctx) {
2556
- if (element != null) element.path(ctx);
2557
- }
2558
-
2559
- this.getBoundingBox = function() {
2560
- if (element != null) return element.getBoundingBox();
2561
- }
2562
-
2563
- this.renderChildren = function(ctx) {
2564
- if (element != null) {
2565
- var tempSvg = element;
2566
- if (element.type == 'symbol') {
2567
- // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
2568
- tempSvg = new svg.Element.svg();
2569
- tempSvg.type = 'svg';
2570
- tempSvg.attributes['viewBox'] = new svg.Property('viewBox', element.attribute('viewBox').value);
2571
- tempSvg.attributes['preserveAspectRatio'] = new svg.Property('preserveAspectRatio', element.attribute('preserveAspectRatio').value);
2572
- tempSvg.attributes['overflow'] = new svg.Property('overflow', element.attribute('overflow').value);
2573
- tempSvg.children = element.children;
2574
- }
2575
- if (tempSvg.type == 'svg') {
2576
- // if symbol or svg, inherit width/height from me
2577
- if (this.attribute('width').hasValue()) tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value);
2578
- if (this.attribute('height').hasValue()) tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value);
2579
- }
2580
- var oldParent = tempSvg.parent;
2581
- tempSvg.parent = null;
2582
- tempSvg.render(ctx);
2583
- tempSvg.parent = oldParent;
2584
- }
2585
- }
2586
- }
2587
- svg.Element.use.prototype = new svg.Element.RenderedElementBase;
2588
-
2589
- // mask element
2590
- svg.Element.mask = function(node) {
2591
- this.base = svg.Element.ElementBase;
2592
- this.base(node);
2593
-
2594
- this.apply = function(ctx, element) {
2595
- // render as temp svg
2596
- var x = this.attribute('x').toPixels('x');
2597
- var y = this.attribute('y').toPixels('y');
2598
- var width = this.attribute('width').toPixels('x');
2599
- var height = this.attribute('height').toPixels('y');
2600
-
2601
- if (width == 0 && height == 0) {
2602
- var bb = new svg.BoundingBox();
2603
- for (var i=0; i<this.children.length; i++) {
2604
- bb.addBoundingBox(this.children[i].getBoundingBox());
2605
- }
2606
- var x = Math.floor(bb.x1);
2607
- var y = Math.floor(bb.y1);
2608
- var width = Math.floor(bb.width());
2609
- var height = Math.floor(bb.height());
2610
- }
2611
-
2612
- // temporarily remove mask to avoid recursion
2613
- var mask = element.attribute('mask').value;
2614
- element.attribute('mask').value = '';
2615
-
2616
- var cMask = document.createElement('canvas');
2617
- cMask.width = x + width;
2618
- cMask.height = y + height;
2619
- var maskCtx = cMask.getContext('2d');
2620
- this.renderChildren(maskCtx);
2621
-
2622
- var c = document.createElement('canvas');
2623
- c.width = x + width;
2624
- c.height = y + height;
2625
- var tempCtx = c.getContext('2d');
2626
- element.render(tempCtx);
2627
- tempCtx.globalCompositeOperation = 'destination-in';
2628
- tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat');
2629
- tempCtx.fillRect(0, 0, x + width, y + height);
2630
-
2631
- ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat');
2632
- ctx.fillRect(0, 0, x + width, y + height);
2633
-
2634
- // reassign mask
2635
- element.attribute('mask').value = mask;
2636
- }
2637
-
2638
- this.render = function(ctx) {
2639
- // NO RENDER
2640
- }
2641
- }
2642
- svg.Element.mask.prototype = new svg.Element.ElementBase;
2643
-
2644
- // clip element
2645
- svg.Element.clipPath = function(node) {
2646
- this.base = svg.Element.ElementBase;
2647
- this.base(node);
2648
-
2649
- this.apply = function(ctx) {
2650
- var oldBeginPath = CanvasRenderingContext2D.prototype.beginPath;
2651
- CanvasRenderingContext2D.prototype.beginPath = function () { };
2652
-
2653
- var oldClosePath = CanvasRenderingContext2D.prototype.closePath;
2654
- CanvasRenderingContext2D.prototype.closePath = function () { };
2655
-
2656
- oldBeginPath.call(ctx);
2657
- for (var i=0; i<this.children.length; i++) {
2658
- var child = this.children[i];
2659
- if (typeof child.path != 'undefined') {
2660
- var transform = null;
2661
- if (child.style('transform', false, true).hasValue()) {
2662
- transform = new svg.Transform(child.style('transform', false, true).value);
2663
- transform.apply(ctx);
2664
- }
2665
- child.path(ctx);
2666
- CanvasRenderingContext2D.prototype.closePath = oldClosePath;
2667
- if (transform) { transform.unapply(ctx); }
2668
- }
2669
- }
2670
- oldClosePath.call(ctx);
2671
- ctx.clip();
2672
-
2673
- CanvasRenderingContext2D.prototype.beginPath = oldBeginPath;
2674
- CanvasRenderingContext2D.prototype.closePath = oldClosePath;
2675
- }
2676
-
2677
- this.render = function(ctx) {
2678
- // NO RENDER
2679
- }
2680
- }
2681
- svg.Element.clipPath.prototype = new svg.Element.ElementBase;
2682
-
2683
- // filters
2684
- svg.Element.filter = function(node) {
2685
- this.base = svg.Element.ElementBase;
2686
- this.base(node);
2687
-
2688
- this.apply = function(ctx, element) {
2689
- // render as temp svg
2690
- var bb = element.getBoundingBox();
2691
- var x = Math.floor(bb.x1);
2692
- var y = Math.floor(bb.y1);
2693
- var width = Math.floor(bb.width());
2694
- var height = Math.floor(bb.height());
2695
-
2696
- // temporarily remove filter to avoid recursion
2697
- var filter = element.style('filter').value;
2698
- element.style('filter').value = '';
2699
-
2700
- var px = 0, py = 0;
2701
- for (var i=0; i<this.children.length; i++) {
2702
- var efd = this.children[i].extraFilterDistance || 0;
2703
- px = Math.max(px, efd);
2704
- py = Math.max(py, efd);
2705
- }
2706
-
2707
- var c = document.createElement('canvas');
2708
- c.width = width + 2*px;
2709
- c.height = height + 2*py;
2710
- var tempCtx = c.getContext('2d');
2711
- tempCtx.translate(-x + px, -y + py);
2712
- element.render(tempCtx);
2713
-
2714
- // apply filters
2715
- for (var i=0; i<this.children.length; i++) {
2716
- if (typeof this.children[i].apply == 'function') {
2717
- this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py);
2718
- }
2719
- }
2720
-
2721
- // render on me
2722
- ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py);
2723
-
2724
- // reassign filter
2725
- element.style('filter', true).value = filter;
2726
- }
2727
-
2728
- this.render = function(ctx) {
2729
- // NO RENDER
2730
- }
2731
- }
2732
- svg.Element.filter.prototype = new svg.Element.ElementBase;
2733
-
2734
- svg.Element.feMorphology = function(node) {
2735
- this.base = svg.Element.ElementBase;
2736
- this.base(node);
2737
-
2738
- this.apply = function(ctx, x, y, width, height) {
2739
- // TODO: implement
2740
- }
2741
- }
2742
- svg.Element.feMorphology.prototype = new svg.Element.ElementBase;
2743
-
2744
- svg.Element.feComposite = function(node) {
2745
- this.base = svg.Element.ElementBase;
2746
- this.base(node);
2747
-
2748
- this.apply = function(ctx, x, y, width, height) {
2749
- // TODO: implement
2750
- }
2751
- }
2752
- svg.Element.feComposite.prototype = new svg.Element.ElementBase;
2753
-
2754
- svg.Element.feColorMatrix = function(node) {
2755
- this.base = svg.Element.ElementBase;
2756
- this.base(node);
2757
-
2758
- var matrix = svg.ToNumberArray(this.attribute('values').value);
2759
- switch (this.attribute('type').valueOrDefault('matrix')) { // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
2760
- case 'saturate':
2761
- var s = matrix[0];
2762
- matrix = [0.213+0.787*s,0.715-0.715*s,0.072-0.072*s,0,0,
2763
- 0.213-0.213*s,0.715+0.285*s,0.072-0.072*s,0,0,
2764
- 0.213-0.213*s,0.715-0.715*s,0.072+0.928*s,0,0,
2765
- 0,0,0,1,0,
2766
- 0,0,0,0,1];
2767
- break;
2768
- case 'hueRotate':
2769
- var a = matrix[0] * Math.PI / 180.0;
2770
- var c = function (m1,m2,m3) { return m1 + Math.cos(a)*m2 + Math.sin(a)*m3; };
2771
- matrix = [c(0.213,0.787,-0.213),c(0.715,-0.715,-0.715),c(0.072,-0.072,0.928),0,0,
2772
- c(0.213,-0.213,0.143),c(0.715,0.285,0.140),c(0.072,-0.072,-0.283),0,0,
2773
- c(0.213,-0.213,-0.787),c(0.715,-0.715,0.715),c(0.072,0.928,0.072),0,0,
2774
- 0,0,0,1,0,
2775
- 0,0,0,0,1];
2776
- break;
2777
- case 'luminanceToAlpha':
2778
- matrix = [0,0,0,0,0,
2779
- 0,0,0,0,0,
2780
- 0,0,0,0,0,
2781
- 0.2125,0.7154,0.0721,0,0,
2782
- 0,0,0,0,1];
2783
- break;
2784
- }
2785
-
2786
- function imGet(img, x, y, width, height, rgba) {
2787
- return img[y*width*4 + x*4 + rgba];
2788
- }
2789
-
2790
- function imSet(img, x, y, width, height, rgba, val) {
2791
- img[y*width*4 + x*4 + rgba] = val;
2792
- }
2793
-
2794
- function m(i, v) {
2795
- var mi = matrix[i];
2796
- return mi * (mi < 0 ? v - 255 : v);
2797
- }
2798
-
2799
- this.apply = function(ctx, x, y, width, height) {
2800
- // assuming x==0 && y==0 for now
2801
- var srcData = ctx.getImageData(0, 0, width, height);
2802
- for (var y = 0; y < height; y++) {
2803
- for (var x = 0; x < width; x++) {
2804
- var r = imGet(srcData.data, x, y, width, height, 0);
2805
- var g = imGet(srcData.data, x, y, width, height, 1);
2806
- var b = imGet(srcData.data, x, y, width, height, 2);
2807
- var a = imGet(srcData.data, x, y, width, height, 3);
2808
- imSet(srcData.data, x, y, width, height, 0, m(0,r)+m(1,g)+m(2,b)+m(3,a)+m(4,1));
2809
- imSet(srcData.data, x, y, width, height, 1, m(5,r)+m(6,g)+m(7,b)+m(8,a)+m(9,1));
2810
- imSet(srcData.data, x, y, width, height, 2, m(10,r)+m(11,g)+m(12,b)+m(13,a)+m(14,1));
2811
- imSet(srcData.data, x, y, width, height, 3, m(15,r)+m(16,g)+m(17,b)+m(18,a)+m(19,1));
2812
- }
2813
- }
2814
- ctx.clearRect(0, 0, width, height);
2815
- ctx.putImageData(srcData, 0, 0);
2816
- }
2817
- }
2818
- svg.Element.feColorMatrix.prototype = new svg.Element.ElementBase;
2819
-
2820
- svg.Element.feGaussianBlur = function(node) {
2821
- this.base = svg.Element.ElementBase;
2822
- this.base(node);
2823
-
2824
- this.blurRadius = Math.floor(this.attribute('stdDeviation').numValue());
2825
- this.extraFilterDistance = this.blurRadius;
2826
-
2827
- this.apply = function(ctx, x, y, width, height) {
2828
- if (typeof stackBlur.canvasRGBA == 'undefined') {
2829
- svg.log('ERROR: StackBlur.js must be included for blur to work');
2830
- return;
2831
- }
2832
-
2833
- // StackBlur requires canvas be on document
2834
- ctx.canvas.id = svg.UniqueId();
2835
- ctx.canvas.style.display = 'none';
2836
- document.body.appendChild(ctx.canvas);
2837
- stackBlur.canvasRGBA(ctx.canvas.id, x, y, width, height, this.blurRadius);
2838
- document.body.removeChild(ctx.canvas);
2839
- }
2840
- }
2841
- svg.Element.feGaussianBlur.prototype = new svg.Element.ElementBase;
2842
-
2843
- // title element, do nothing
2844
- svg.Element.title = function(node) {
2845
- }
2846
- svg.Element.title.prototype = new svg.Element.ElementBase;
2847
-
2848
- // desc element, do nothing
2849
- svg.Element.desc = function(node) {
2850
- }
2851
- svg.Element.desc.prototype = new svg.Element.ElementBase;
2852
-
2853
- svg.Element.MISSING = function(node) {
2854
- svg.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.');
2855
- }
2856
- svg.Element.MISSING.prototype = new svg.Element.ElementBase;
2857
-
2858
- // element factory
2859
- svg.CreateElement = function(node) {
2860
- var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace
2861
- className = className.replace(/\-/g,''); // remove dashes
2862
- var e = null;
2863
- if (typeof svg.Element[className] != 'undefined') {
2864
- e = new svg.Element[className](node);
2865
- }
2866
- else {
2867
- e = new svg.Element.MISSING(node);
2868
- }
2869
-
2870
- e.type = node.nodeName;
2871
- return e;
2872
- }
2873
-
2874
- // load from url
2875
- svg.load = function(ctx, url) {
2876
- svg.loadXml(ctx, svg.ajax(url));
2877
- }
2878
-
2879
- // load from xml
2880
- svg.loadXml = function(ctx, xml) {
2881
- svg.loadXmlDoc(ctx, svg.parseXml(xml));
2882
- }
2883
-
2884
- svg.loadXmlDoc = function(ctx, dom) {
2885
- svg.init(ctx);
2886
-
2887
- var mapXY = function(p) {
2888
- var e = ctx.canvas;
2889
- while (e) {
2890
- p.x -= e.offsetLeft;
2891
- p.y -= e.offsetTop;
2892
- e = e.offsetParent;
2893
- }
2894
- if (window.scrollX) p.x += window.scrollX;
2895
- if (window.scrollY) p.y += window.scrollY;
2896
- return p;
2897
- }
2898
-
2899
- // bind mouse
2900
- if (svg.opts['ignoreMouse'] != true) {
2901
- ctx.canvas.onclick = function(e) {
2902
- var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2903
- svg.Mouse.onclick(p.x, p.y);
2904
- };
2905
- ctx.canvas.onmousemove = function(e) {
2906
- var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2907
- svg.Mouse.onmousemove(p.x, p.y);
2908
- };
2909
- }
2910
-
2911
- var e = svg.CreateElement(dom.documentElement);
2912
- e.root = true;
2913
- e.addStylesFromStyleDefinition();
2914
-
2915
- // render loop
2916
- var isFirstRender = true;
2917
- var draw = function() {
2918
- svg.ViewPort.Clear();
2919
- if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);
2920
-
2921
- if (svg.opts['ignoreDimensions'] != true) {
2922
- // set canvas size
2923
- if (e.style('width').hasValue()) {
2924
- ctx.canvas.width = e.style('width').toPixels('x');
2925
- ctx.canvas.style.width = ctx.canvas.width + 'px';
2926
- }
2927
- if (e.style('height').hasValue()) {
2928
- ctx.canvas.height = e.style('height').toPixels('y');
2929
- ctx.canvas.style.height = ctx.canvas.height + 'px';
2930
- }
2931
- }
2932
- var cWidth = ctx.canvas.clientWidth || ctx.canvas.width;
2933
- var cHeight = ctx.canvas.clientHeight || ctx.canvas.height;
2934
- if (svg.opts['ignoreDimensions'] == true && e.style('width').hasValue() && e.style('height').hasValue()) {
2935
- cWidth = e.style('width').toPixels('x');
2936
- cHeight = e.style('height').toPixels('y');
2937
- }
2938
- svg.ViewPort.SetCurrent(cWidth, cHeight);
2939
-
2940
- if (svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX'];
2941
- if (svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY'];
2942
- if (svg.opts['scaleWidth'] != null || svg.opts['scaleHeight'] != null) {
2943
- var xRatio = null, yRatio = null, viewBox = svg.ToNumberArray(e.attribute('viewBox').value);
2944
-
2945
- if (svg.opts['scaleWidth'] != null) {
2946
- if (e.attribute('width').hasValue()) xRatio = e.attribute('width').toPixels('x') / svg.opts['scaleWidth'];
2947
- else if (!isNaN(viewBox[2])) xRatio = viewBox[2] / svg.opts['scaleWidth'];
2948
- }
2949
-
2950
- if (svg.opts['scaleHeight'] != null) {
2951
- if (e.attribute('height').hasValue()) yRatio = e.attribute('height').toPixels('y') / svg.opts['scaleHeight'];
2952
- else if (!isNaN(viewBox[3])) yRatio = viewBox[3] / svg.opts['scaleHeight'];
2953
- }
2954
-
2955
- if (xRatio == null) { xRatio = yRatio; }
2956
- if (yRatio == null) { yRatio = xRatio; }
2957
-
2958
- e.attribute('width', true).value = svg.opts['scaleWidth'];
2959
- e.attribute('height', true).value = svg.opts['scaleHeight'];
2960
- e.style('transform', true, true).value += ' scale('+(1.0/xRatio)+','+(1.0/yRatio)+')';
2961
- }
2962
-
2963
- // clear and render
2964
- if (svg.opts['ignoreClear'] != true) {
2965
- ctx.clearRect(0, 0, cWidth, cHeight);
2966
- }
2967
- e.render(ctx);
2968
- if (isFirstRender) {
2969
- isFirstRender = false;
2970
- if (typeof svg.opts['renderCallback'] == 'function') svg.opts['renderCallback'](dom);
2971
- }
2972
- }
2973
-
2974
- var waitingForImages = true;
2975
- if (svg.ImagesLoaded()) {
2976
- waitingForImages = false;
2977
- draw();
2978
- }
2979
- svg.intervalID = setInterval(function() {
2980
- var needUpdate = false;
2981
-
2982
- if (waitingForImages && svg.ImagesLoaded()) {
2983
- waitingForImages = false;
2984
- needUpdate = true;
2985
- }
2986
-
2987
- // need update from mouse events?
2988
- if (svg.opts['ignoreMouse'] != true) {
2989
- needUpdate = needUpdate | svg.Mouse.hasEvents();
2990
- }
2991
-
2992
- // need update from animations?
2993
- if (svg.opts['ignoreAnimation'] != true) {
2994
- for (var i=0; i<svg.Animations.length; i++) {
2995
- needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE);
2996
- }
2997
- }
2998
-
2999
- // need update from redraw?
3000
- if (typeof svg.opts['forceRedraw'] == 'function') {
3001
- if (svg.opts['forceRedraw']() == true) needUpdate = true;
3002
- }
3003
-
3004
- // render if needed
3005
- if (needUpdate) {
3006
- draw();
3007
- svg.Mouse.runEvents(); // run and clear our events
3008
- }
3009
- }, 1000 / svg.FRAMERATE);
3010
- }
3011
-
3012
- svg.stop = function() {
3013
- if (svg.intervalID) {
3014
- clearInterval(svg.intervalID);
3015
- }
3016
- }
3017
-
3018
- svg.Mouse = new (function() {
3019
- this.events = [];
3020
- this.hasEvents = function() { return this.events.length != 0; }
3021
-
3022
- this.onclick = function(x, y) {
3023
- this.events.push({ type: 'onclick', x: x, y: y,
3024
- run: function(e) { if (e.onclick) e.onclick(); }
3025
- });
3026
- }
3027
-
3028
- this.onmousemove = function(x, y) {
3029
- this.events.push({ type: 'onmousemove', x: x, y: y,
3030
- run: function(e) { if (e.onmousemove) e.onmousemove(); }
3031
- });
3032
- }
3033
-
3034
- this.eventElements = [];
3035
-
3036
- this.checkPath = function(element, ctx) {
3037
- for (var i=0; i<this.events.length; i++) {
3038
- var e = this.events[i];
3039
- if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element;
3040
- }
3041
- }
3042
-
3043
- this.checkBoundingBox = function(element, bb) {
3044
- for (var i=0; i<this.events.length; i++) {
3045
- var e = this.events[i];
3046
- if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element;
3047
- }
3048
- }
3049
-
3050
- this.runEvents = function() {
3051
- svg.ctx.canvas.style.cursor = '';
3052
-
3053
- for (var i=0; i<this.events.length; i++) {
3054
- var e = this.events[i];
3055
- var element = this.eventElements[i];
3056
- while (element) {
3057
- e.run(element);
3058
- element = element.parent;
3059
- }
3060
- }
3061
-
3062
- // done running, clear
3063
- this.events = [];
3064
- this.eventElements = [];
3065
- }
3066
- });
3067
-
3068
- return svg;
3069
- };
3070
-
3071
- if (typeof CanvasRenderingContext2D != 'undefined') {
3072
- CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh, opts) {
3073
- var cOpts = {
3074
- ignoreMouse: true,
3075
- ignoreAnimation: true,
3076
- ignoreDimensions: true,
3077
- ignoreClear: true,
3078
- offsetX: dx,
3079
- offsetY: dy,
3080
- scaleWidth: dw,
3081
- scaleHeight: dh
3082
- }
3083
-
3084
- for(var prop in opts) {
3085
- if(opts.hasOwnProperty(prop)){
3086
- cOpts[prop] = opts[prop];
3087
- }
3088
- }
3089
- canvg(this.canvas, s, cOpts);
3090
- }
3091
- }
3092
-
3093
- return canvg;
3094
-
3095
- }));
1
+ /*
2
+ * canvg.js - Javascript SVG parser and renderer on Canvas
3
+ * MIT Licensed
4
+ * Gabe Lerner (gabelerner@gmail.com)
5
+ * http://code.google.com/p/canvg/
6
+ *
7
+ * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
8
+ */
9
+ (function ( global, factory ) {
10
+
11
+ 'use strict';
12
+
13
+ // export as AMD...
14
+ if ( typeof define !== 'undefined' && define.amd ) {
15
+ define('canvgModule', [ 'rgbcolor', 'stackblur' ], factory );
16
+ }
17
+
18
+ // ...or as browserify
19
+ else if ( typeof module !== 'undefined' && module.exports ) {
20
+ module.exports = factory( require( 'rgbcolor' ), require( 'stackblur' ) );
21
+ }
22
+
23
+ global.canvg = factory( global.RGBColor, global.stackBlur );
24
+
25
+ }( typeof window !== 'undefined' ? window : this, function ( RGBColor, stackBlur ) {
26
+
27
+ // canvg(target, s)
28
+ // empty parameters: replace all 'svg' elements on page with 'canvas' elements
29
+ // target: canvas element or the id of a canvas element
30
+ // s: svg string, url to svg file, or xml document
31
+ // opts: optional hash of options
32
+ // ignoreMouse: true => ignore mouse events
33
+ // ignoreAnimation: true => ignore animations
34
+ // ignoreDimensions: true => does not try to resize canvas
35
+ // ignoreClear: true => does not clear canvas
36
+ // offsetX: int => draws at a x offset
37
+ // offsetY: int => draws at a y offset
38
+ // scaleWidth: int => scales horizontally to width
39
+ // scaleHeight: int => scales vertically to height
40
+ // renderCallback: function => will call the function after the first render is completed
41
+ // forceRedraw: function => will call the function on every frame, if it returns true, will redraw
42
+ var canvg = function (target, s, opts) {
43
+ // no parameters
44
+ if (target == null && s == null && opts == null) {
45
+ var svgTags = document.querySelectorAll('svg');
46
+ for (var i=0; i<svgTags.length; i++) {
47
+ var svgTag = svgTags[i];
48
+ var c = document.createElement('canvas');
49
+ c.width = svgTag.clientWidth;
50
+ c.height = svgTag.clientHeight;
51
+ svgTag.parentNode.insertBefore(c, svgTag);
52
+ svgTag.parentNode.removeChild(svgTag);
53
+ var div = document.createElement('div');
54
+ div.appendChild(svgTag);
55
+ canvg(c, div.innerHTML);
56
+ }
57
+ return;
58
+ }
59
+
60
+ if (typeof target == 'string') {
61
+ target = document.getElementById(target);
62
+ }
63
+
64
+ // store class on canvas
65
+ if (target.svg != null) target.svg.stop();
66
+ var svg = build(opts || {});
67
+ // on i.e. 8 for flash canvas, we can't assign the property so check for it
68
+ if (!(target.childNodes.length == 1 && target.childNodes[0].nodeName == 'OBJECT')) target.svg = svg;
69
+
70
+ var ctx = target.getContext('2d');
71
+ if (typeof s.documentElement != 'undefined') {
72
+ // load from xml doc
73
+ svg.loadXmlDoc(ctx, s);
74
+ }
75
+ else if (s.substr(0,1) == '<') {
76
+ // load from xml string
77
+ svg.loadXml(ctx, s);
78
+ }
79
+ else {
80
+ // load from url
81
+ svg.load(ctx, s);
82
+ }
83
+ }
84
+
85
+ // see https://developer.mozilla.org/en-US/docs/Web/API/Element.matches
86
+ var matchesSelector;
87
+ if (typeof Element.prototype.matches != 'undefined') {
88
+ matchesSelector = function(node, selector) {
89
+ return node.matches(selector);
90
+ };
91
+ } else if (typeof Element.prototype.webkitMatchesSelector != 'undefined') {
92
+ matchesSelector = function(node, selector) {
93
+ return node.webkitMatchesSelector(selector);
94
+ };
95
+ } else if (typeof Element.prototype.mozMatchesSelector != 'undefined') {
96
+ matchesSelector = function(node, selector) {
97
+ return node.mozMatchesSelector(selector);
98
+ };
99
+ } else if (typeof Element.prototype.msMatchesSelector != 'undefined') {
100
+ matchesSelector = function(node, selector) {
101
+ return node.msMatchesSelector(selector);
102
+ };
103
+ } else if (typeof Element.prototype.oMatchesSelector != 'undefined') {
104
+ matchesSelector = function(node, selector) {
105
+ return node.oMatchesSelector(selector);
106
+ };
107
+ } else {
108
+ // requires Sizzle: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation
109
+ // or jQuery: http://jquery.com/download/
110
+ // or Zepto: http://zeptojs.com/#
111
+ // without it, this is a ReferenceError
112
+
113
+ if (typeof jQuery === 'function' || typeof Zepto === 'function') {
114
+ matchesSelector = function (node, selector) {
115
+ return $(node).is(selector);
116
+ };
117
+ }
118
+
119
+ if (typeof matchesSelector === 'undefined') {
120
+ matchesSelector = Sizzle.matchesSelector;
121
+ }
122
+ }
123
+
124
+ // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
125
+ var attributeRegex = /(\[[^\]]+\])/g;
126
+ var idRegex = /(#[^\s\+>~\.\[:]+)/g;
127
+ var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
128
+ var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
129
+ var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
130
+ var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
131
+ var elementRegex = /([^\s\+>~\.\[:]+)/g;
132
+ function getSelectorSpecificity(selector) {
133
+ var typeCount = [0, 0, 0];
134
+ var findMatch = function(regex, type) {
135
+ var matches = selector.match(regex);
136
+ if (matches == null) {
137
+ return;
138
+ }
139
+ typeCount[type] += matches.length;
140
+ selector = selector.replace(regex, ' ');
141
+ };
142
+
143
+ selector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ');
144
+ selector = selector.replace(/{[\s\S]*/gm, ' ');
145
+ findMatch(attributeRegex, 1);
146
+ findMatch(idRegex, 0);
147
+ findMatch(classRegex, 1);
148
+ findMatch(pseudoElementRegex, 2);
149
+ findMatch(pseudoClassWithBracketsRegex, 1);
150
+ findMatch(pseudoClassRegex, 1);
151
+ selector = selector.replace(/[\*\s\+>~]/g, ' ');
152
+ selector = selector.replace(/[#\.]/g, ' ');
153
+ findMatch(elementRegex, 2);
154
+ return typeCount.join('');
155
+ }
156
+
157
+ function build(opts) {
158
+ var svg = { opts: opts };
159
+
160
+ svg.FRAMERATE = 30;
161
+ svg.MAX_VIRTUAL_PIXELS = 30000;
162
+
163
+ svg.log = function(msg) {};
164
+ if (svg.opts['log'] == true && typeof console != 'undefined') {
165
+ svg.log = function(msg) { console.log(msg); };
166
+ };
167
+
168
+ // globals
169
+ svg.init = function(ctx) {
170
+ var uniqueId = 0;
171
+ svg.UniqueId = function () { uniqueId++; return 'canvg' + uniqueId; };
172
+ svg.Definitions = {};
173
+ svg.Styles = {};
174
+ svg.StylesSpecificity = {};
175
+ svg.Animations = [];
176
+ svg.Images = [];
177
+ svg.ctx = ctx;
178
+ svg.ViewPort = new (function () {
179
+ this.viewPorts = [];
180
+ this.Clear = function() { this.viewPorts = []; }
181
+ this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); }
182
+ this.RemoveCurrent = function() { this.viewPorts.pop(); }
183
+ this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; }
184
+ this.width = function() { return this.Current().width; }
185
+ this.height = function() { return this.Current().height; }
186
+ this.ComputeSize = function(d) {
187
+ if (d != null && typeof d == 'number') return d;
188
+ if (d == 'x') return this.width();
189
+ if (d == 'y') return this.height();
190
+ return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);
191
+ }
192
+ });
193
+ }
194
+ svg.init();
195
+
196
+ // images loaded
197
+ svg.ImagesLoaded = function() {
198
+ for (var i=0; i<svg.Images.length; i++) {
199
+ if (!svg.Images[i].loaded) return false;
200
+ }
201
+ return true;
202
+ }
203
+
204
+ // trim
205
+ svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); }
206
+
207
+ // compress spaces
208
+ svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); }
209
+
210
+ // ajax
211
+ svg.ajax = function(url) {
212
+ var AJAX;
213
+ if(window.XMLHttpRequest){AJAX=new XMLHttpRequest();}
214
+ else{AJAX=new ActiveXObject('Microsoft.XMLHTTP');}
215
+ if(AJAX){
216
+ AJAX.open('GET',url,false);
217
+ AJAX.send(null);
218
+ return AJAX.responseText;
219
+ }
220
+ return null;
221
+ }
222
+
223
+ // parse xml
224
+ svg.parseXml = function(xml) {
225
+ if (typeof Windows != 'undefined' && typeof Windows.Data != 'undefined' && typeof Windows.Data.Xml != 'undefined') {
226
+ var xmlDoc = new Windows.Data.Xml.Dom.XmlDocument();
227
+ var settings = new Windows.Data.Xml.Dom.XmlLoadSettings();
228
+ settings.prohibitDtd = false;
229
+ xmlDoc.loadXml(xml, settings);
230
+ return xmlDoc;
231
+ }
232
+ else if (window.DOMParser)
233
+ {
234
+ var parser = new DOMParser();
235
+ return parser.parseFromString(xml, 'text/xml');
236
+ }
237
+ else
238
+ {
239
+ xml = xml.replace(/<!DOCTYPE svg[^>]*>/, '');
240
+ var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
241
+ xmlDoc.async = 'false';
242
+ xmlDoc.loadXML(xml);
243
+ return xmlDoc;
244
+ }
245
+ }
246
+
247
+ svg.Property = function(name, value) {
248
+ this.name = name;
249
+ this.value = value;
250
+ }
251
+ svg.Property.prototype.getValue = function() {
252
+ return this.value;
253
+ }
254
+
255
+ svg.Property.prototype.hasValue = function() {
256
+ return (this.value != null && this.value !== '');
257
+ }
258
+
259
+ // return the numerical value of the property
260
+ svg.Property.prototype.numValue = function() {
261
+ if (!this.hasValue()) return 0;
262
+
263
+ var n = parseFloat(this.value);
264
+ if ((this.value + '').match(/%$/)) {
265
+ n = n / 100.0;
266
+ }
267
+ return n;
268
+ }
269
+
270
+ svg.Property.prototype.valueOrDefault = function(def) {
271
+ if (this.hasValue()) return this.value;
272
+ return def;
273
+ }
274
+
275
+ svg.Property.prototype.numValueOrDefault = function(def) {
276
+ if (this.hasValue()) return this.numValue();
277
+ return def;
278
+ }
279
+
280
+ // color extensions
281
+ // augment the current color value with the opacity
282
+ svg.Property.prototype.addOpacity = function(opacityProp) {
283
+ var newValue = this.value;
284
+ if (opacityProp.value != null && opacityProp.value != '' && typeof this.value == 'string') { // can only add opacity to colors, not patterns
285
+ var color = new RGBColor(this.value);
286
+ if (color.ok) {
287
+ newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacityProp.numValue() + ')';
288
+ }
289
+ }
290
+ return new svg.Property(this.name, newValue);
291
+ }
292
+
293
+ // definition extensions
294
+ // get the definition from the definitions table
295
+ svg.Property.prototype.getDefinition = function() {
296
+ var name = this.value.match(/#([^\)'"]+)/);
297
+ if (name) { name = name[1]; }
298
+ if (!name) { name = this.value; }
299
+ return svg.Definitions[name];
300
+ }
301
+
302
+ svg.Property.prototype.isUrlDefinition = function() {
303
+ return this.value.indexOf('url(') == 0
304
+ }
305
+
306
+ svg.Property.prototype.getFillStyleDefinition = function(e, opacityProp) {
307
+ var def = this.getDefinition();
308
+
309
+ // gradient
310
+ if (def != null && def.createGradient) {
311
+ return def.createGradient(svg.ctx, e, opacityProp);
312
+ }
313
+
314
+ // pattern
315
+ if (def != null && def.createPattern) {
316
+ if (def.getHrefAttribute().hasValue()) {
317
+ var pt = def.attribute('patternTransform');
318
+ def = def.getHrefAttribute().getDefinition();
319
+ if (pt.hasValue()) { def.attribute('patternTransform', true).value = pt.value; }
320
+ }
321
+ return def.createPattern(svg.ctx, e);
322
+ }
323
+
324
+ return null;
325
+ }
326
+
327
+ // length extensions
328
+ svg.Property.prototype.getDPI = function(viewPort) {
329
+ return 96.0; // TODO: compute?
330
+ }
331
+
332
+ svg.Property.prototype.getEM = function(viewPort) {
333
+ var em = 12;
334
+
335
+ var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
336
+ if (fontSize.hasValue()) em = fontSize.toPixels(viewPort);
337
+
338
+ return em;
339
+ }
340
+
341
+ svg.Property.prototype.getUnits = function() {
342
+ var s = this.value+'';
343
+ return s.replace(/[0-9\.\-]/g,'');
344
+ }
345
+
346
+ // get the length as pixels
347
+ svg.Property.prototype.toPixels = function(viewPort, processPercent) {
348
+ if (!this.hasValue()) return 0;
349
+ var s = this.value+'';
350
+ if (s.match(/em$/)) return this.numValue() * this.getEM(viewPort);
351
+ if (s.match(/ex$/)) return this.numValue() * this.getEM(viewPort) / 2.0;
352
+ if (s.match(/px$/)) return this.numValue();
353
+ if (s.match(/pt$/)) return this.numValue() * this.getDPI(viewPort) * (1.0 / 72.0);
354
+ if (s.match(/pc$/)) return this.numValue() * 15;
355
+ if (s.match(/cm$/)) return this.numValue() * this.getDPI(viewPort) / 2.54;
356
+ if (s.match(/mm$/)) return this.numValue() * this.getDPI(viewPort) / 25.4;
357
+ if (s.match(/in$/)) return this.numValue() * this.getDPI(viewPort);
358
+ if (s.match(/%$/)) return this.numValue() * svg.ViewPort.ComputeSize(viewPort);
359
+ var n = this.numValue();
360
+ if (processPercent && n < 1.0) return n * svg.ViewPort.ComputeSize(viewPort);
361
+ return n;
362
+ }
363
+
364
+ // time extensions
365
+ // get the time as milliseconds
366
+ svg.Property.prototype.toMilliseconds = function() {
367
+ if (!this.hasValue()) return 0;
368
+ var s = this.value+'';
369
+ if (s.match(/s$/)) return this.numValue() * 1000;
370
+ if (s.match(/ms$/)) return this.numValue();
371
+ return this.numValue();
372
+ }
373
+
374
+ // angle extensions
375
+ // get the angle as radians
376
+ svg.Property.prototype.toRadians = function() {
377
+ if (!this.hasValue()) return 0;
378
+ var s = this.value+'';
379
+ if (s.match(/deg$/)) return this.numValue() * (Math.PI / 180.0);
380
+ if (s.match(/grad$/)) return this.numValue() * (Math.PI / 200.0);
381
+ if (s.match(/rad$/)) return this.numValue();
382
+ return this.numValue() * (Math.PI / 180.0);
383
+ }
384
+
385
+ // text extensions
386
+ // get the text baseline
387
+ var textBaselineMapping = {
388
+ 'baseline': 'alphabetic',
389
+ 'before-edge': 'top',
390
+ 'text-before-edge': 'top',
391
+ 'middle': 'middle',
392
+ 'central': 'middle',
393
+ 'after-edge': 'bottom',
394
+ 'text-after-edge': 'bottom',
395
+ 'ideographic': 'ideographic',
396
+ 'alphabetic': 'alphabetic',
397
+ 'hanging': 'hanging',
398
+ 'mathematical': 'alphabetic'
399
+ };
400
+ svg.Property.prototype.toTextBaseline = function () {
401
+ if (!this.hasValue()) return null;
402
+ return textBaselineMapping[this.value];
403
+ }
404
+
405
+ // fonts
406
+ svg.Font = new (function() {
407
+ this.Styles = 'normal|italic|oblique|inherit';
408
+ this.Variants = 'normal|small-caps|inherit';
409
+ this.Weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
410
+
411
+ this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
412
+ var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font);
413
+ return {
414
+ fontFamily: fontFamily || f.fontFamily,
415
+ fontSize: fontSize || f.fontSize,
416
+ fontStyle: fontStyle || f.fontStyle,
417
+ fontWeight: fontWeight || f.fontWeight,
418
+ fontVariant: fontVariant || f.fontVariant,
419
+ toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') }
420
+ }
421
+ }
422
+
423
+ var that = this;
424
+ this.Parse = function(s) {
425
+ var f = {};
426
+ var d = svg.trim(svg.compressSpaces(s || '')).split(' ');
427
+ var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false }
428
+ var ff = '';
429
+ for (var i=0; i<d.length; i++) {
430
+ if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontStyle = d[i]; set.fontStyle = true; }
431
+ else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontVariant = d[i]; set.fontStyle = set.fontVariant = true; }
432
+ else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontWeight = d[i]; set.fontStyle = set.fontVariant = set.fontWeight = true; }
433
+ else if (!set.fontSize) { if (d[i] != 'inherit') f.fontSize = d[i].split('/')[0]; set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true; }
434
+ else { if (d[i] != 'inherit') ff += d[i]; }
435
+ } if (ff != '') f.fontFamily = ff;
436
+ return f;
437
+ }
438
+ });
439
+
440
+ // points and paths
441
+ svg.ToNumberArray = function(s) {
442
+ var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' ');
443
+ for (var i=0; i<a.length; i++) {
444
+ a[i] = parseFloat(a[i]);
445
+ }
446
+ return a;
447
+ }
448
+ svg.Point = function(x, y) {
449
+ this.x = x;
450
+ this.y = y;
451
+ }
452
+ svg.Point.prototype.angleTo = function(p) {
453
+ return Math.atan2(p.y - this.y, p.x - this.x);
454
+ }
455
+
456
+ svg.Point.prototype.applyTransform = function(v) {
457
+ var xp = this.x * v[0] + this.y * v[2] + v[4];
458
+ var yp = this.x * v[1] + this.y * v[3] + v[5];
459
+ this.x = xp;
460
+ this.y = yp;
461
+ }
462
+
463
+ svg.CreatePoint = function(s) {
464
+ var a = svg.ToNumberArray(s);
465
+ return new svg.Point(a[0], a[1]);
466
+ }
467
+ svg.CreatePath = function(s) {
468
+ var a = svg.ToNumberArray(s);
469
+ var path = [];
470
+ for (var i=0; i<a.length; i+=2) {
471
+ path.push(new svg.Point(a[i], a[i+1]));
472
+ }
473
+ return path;
474
+ }
475
+
476
+ // bounding box
477
+ svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
478
+ this.x1 = Number.NaN;
479
+ this.y1 = Number.NaN;
480
+ this.x2 = Number.NaN;
481
+ this.y2 = Number.NaN;
482
+
483
+ this.x = function() { return this.x1; }
484
+ this.y = function() { return this.y1; }
485
+ this.width = function() { return this.x2 - this.x1; }
486
+ this.height = function() { return this.y2 - this.y1; }
487
+
488
+ this.addPoint = function(x, y) {
489
+ if (x != null) {
490
+ if (isNaN(this.x1) || isNaN(this.x2)) {
491
+ this.x1 = x;
492
+ this.x2 = x;
493
+ }
494
+ if (x < this.x1) this.x1 = x;
495
+ if (x > this.x2) this.x2 = x;
496
+ }
497
+
498
+ if (y != null) {
499
+ if (isNaN(this.y1) || isNaN(this.y2)) {
500
+ this.y1 = y;
501
+ this.y2 = y;
502
+ }
503
+ if (y < this.y1) this.y1 = y;
504
+ if (y > this.y2) this.y2 = y;
505
+ }
506
+ }
507
+ this.addX = function(x) { this.addPoint(x, null); }
508
+ this.addY = function(y) { this.addPoint(null, y); }
509
+
510
+ this.addBoundingBox = function(bb) {
511
+ this.addPoint(bb.x1, bb.y1);
512
+ this.addPoint(bb.x2, bb.y2);
513
+ }
514
+
515
+ this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) {
516
+ var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
517
+ var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
518
+ var cp2x = cp1x + 1/3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
519
+ var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
520
+ this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
521
+ }
522
+
523
+ this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
524
+ // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
525
+ var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y];
526
+ this.addPoint(p0[0], p0[1]);
527
+ this.addPoint(p3[0], p3[1]);
528
+
529
+ for (i=0; i<=1; i++) {
530
+ var f = function(t) {
531
+ return Math.pow(1-t, 3) * p0[i]
532
+ + 3 * Math.pow(1-t, 2) * t * p1[i]
533
+ + 3 * (1-t) * Math.pow(t, 2) * p2[i]
534
+ + Math.pow(t, 3) * p3[i];
535
+ }
536
+
537
+ var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
538
+ var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
539
+ var c = 3 * p1[i] - 3 * p0[i];
540
+
541
+ if (a == 0) {
542
+ if (b == 0) continue;
543
+ var t = -c / b;
544
+ if (0 < t && t < 1) {
545
+ if (i == 0) this.addX(f(t));
546
+ if (i == 1) this.addY(f(t));
547
+ }
548
+ continue;
549
+ }
550
+
551
+ var b2ac = Math.pow(b, 2) - 4 * c * a;
552
+ if (b2ac < 0) continue;
553
+ var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
554
+ if (0 < t1 && t1 < 1) {
555
+ if (i == 0) this.addX(f(t1));
556
+ if (i == 1) this.addY(f(t1));
557
+ }
558
+ var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
559
+ if (0 < t2 && t2 < 1) {
560
+ if (i == 0) this.addX(f(t2));
561
+ if (i == 1) this.addY(f(t2));
562
+ }
563
+ }
564
+ }
565
+
566
+ this.isPointInBox = function(x, y) {
567
+ return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2);
568
+ }
569
+
570
+ this.addPoint(x1, y1);
571
+ this.addPoint(x2, y2);
572
+ }
573
+
574
+ // transforms
575
+ svg.Transform = function(v) {
576
+ var that = this;
577
+ this.Type = {}
578
+
579
+ // translate
580
+ this.Type.translate = function(s) {
581
+ this.p = svg.CreatePoint(s);
582
+ this.apply = function(ctx) {
583
+ ctx.translate(this.p.x || 0.0, this.p.y || 0.0);
584
+ }
585
+ this.unapply = function(ctx) {
586
+ ctx.translate(-1.0 * this.p.x || 0.0, -1.0 * this.p.y || 0.0);
587
+ }
588
+ this.applyToPoint = function(p) {
589
+ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
590
+ }
591
+ }
592
+
593
+ // rotate
594
+ this.Type.rotate = function(s) {
595
+ var a = svg.ToNumberArray(s);
596
+ this.angle = new svg.Property('angle', a[0]);
597
+ this.cx = a[1] || 0;
598
+ this.cy = a[2] || 0;
599
+ this.apply = function(ctx) {
600
+ ctx.translate(this.cx, this.cy);
601
+ ctx.rotate(this.angle.toRadians());
602
+ ctx.translate(-this.cx, -this.cy);
603
+ }
604
+ this.unapply = function(ctx) {
605
+ ctx.translate(this.cx, this.cy);
606
+ ctx.rotate(-1.0 * this.angle.toRadians());
607
+ ctx.translate(-this.cx, -this.cy);
608
+ }
609
+ this.applyToPoint = function(p) {
610
+ var a = this.angle.toRadians();
611
+ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
612
+ p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
613
+ p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);
614
+ }
615
+ }
616
+
617
+ this.Type.scale = function(s) {
618
+ this.p = svg.CreatePoint(s);
619
+ this.apply = function(ctx) {
620
+ ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);
621
+ }
622
+ this.unapply = function(ctx) {
623
+ ctx.scale(1.0 / this.p.x || 1.0, 1.0 / this.p.y || this.p.x || 1.0);
624
+ }
625
+ this.applyToPoint = function(p) {
626
+ p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);
627
+ }
628
+ }
629
+
630
+ this.Type.matrix = function(s) {
631
+ this.m = svg.ToNumberArray(s);
632
+ this.apply = function(ctx) {
633
+ ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
634
+ }
635
+ this.unapply = function(ctx) {
636
+ var a = this.m[0];
637
+ var b = this.m[2];
638
+ var c = this.m[4];
639
+ var d = this.m[1];
640
+ var e = this.m[3];
641
+ var f = this.m[5];
642
+ var g = 0.0;
643
+ var h = 0.0;
644
+ var i = 1.0;
645
+ var det = 1 / (a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g));
646
+ ctx.transform(
647
+ det*(e*i-f*h),
648
+ det*(f*g-d*i),
649
+ det*(c*h-b*i),
650
+ det*(a*i-c*g),
651
+ det*(b*f-c*e),
652
+ det*(c*d-a*f)
653
+ );
654
+ }
655
+ this.applyToPoint = function(p) {
656
+ p.applyTransform(this.m);
657
+ }
658
+ }
659
+
660
+ this.Type.SkewBase = function(s) {
661
+ this.base = that.Type.matrix;
662
+ this.base(s);
663
+ this.angle = new svg.Property('angle', s);
664
+ }
665
+ this.Type.SkewBase.prototype = new this.Type.matrix;
666
+
667
+ this.Type.skewX = function(s) {
668
+ this.base = that.Type.SkewBase;
669
+ this.base(s);
670
+ this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0];
671
+ }
672
+ this.Type.skewX.prototype = new this.Type.SkewBase;
673
+
674
+ this.Type.skewY = function(s) {
675
+ this.base = that.Type.SkewBase;
676
+ this.base(s);
677
+ this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0];
678
+ }
679
+ this.Type.skewY.prototype = new this.Type.SkewBase;
680
+
681
+ this.transforms = [];
682
+
683
+ this.apply = function(ctx) {
684
+ for (var i=0; i<this.transforms.length; i++) {
685
+ this.transforms[i].apply(ctx);
686
+ }
687
+ }
688
+
689
+ this.unapply = function(ctx) {
690
+ for (var i=this.transforms.length-1; i>=0; i--) {
691
+ this.transforms[i].unapply(ctx);
692
+ }
693
+ }
694
+
695
+ this.applyToPoint = function(p) {
696
+ for (var i=0; i<this.transforms.length; i++) {
697
+ this.transforms[i].applyToPoint(p);
698
+ }
699
+ }
700
+
701
+ var data = svg.trim(svg.compressSpaces(v)).replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g,') ').split(/\s(?=[a-z])/);
702
+ for (var i=0; i<data.length; i++) {
703
+ var type = svg.trim(data[i].split('(')[0]);
704
+ var s = data[i].split('(')[1].replace(')','');
705
+ var transformType = this.Type[type];
706
+ if (typeof transformType != 'undefined') {
707
+ var transform = new transformType(s);
708
+ transform.type = type;
709
+ this.transforms.push(transform);
710
+ }
711
+ }
712
+ }
713
+
714
+ // aspect ratio
715
+ svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {
716
+ // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
717
+ aspectRatio = svg.compressSpaces(aspectRatio);
718
+ aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer
719
+ var align = aspectRatio.split(' ')[0] || 'xMidYMid';
720
+ var meetOrSlice = aspectRatio.split(' ')[1] || 'meet';
721
+
722
+ // calculate scale
723
+ var scaleX = width / desiredWidth;
724
+ var scaleY = height / desiredHeight;
725
+ var scaleMin = Math.min(scaleX, scaleY);
726
+ var scaleMax = Math.max(scaleX, scaleY);
727
+ if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; }
728
+ if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; }
729
+
730
+ refX = new svg.Property('refX', refX);
731
+ refY = new svg.Property('refY', refY);
732
+ if (refX.hasValue() && refY.hasValue()) {
733
+ ctx.translate(-scaleMin * refX.toPixels('x'), -scaleMin * refY.toPixels('y'));
734
+ }
735
+ else {
736
+ // align
737
+ if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0);
738
+ if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0);
739
+ if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0);
740
+ if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight);
741
+ }
742
+
743
+ // scale
744
+ if (align == 'none') ctx.scale(scaleX, scaleY);
745
+ else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin);
746
+ else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax);
747
+
748
+ // translate
749
+ ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);
750
+ }
751
+
752
+ // elements
753
+ svg.Element = {}
754
+
755
+ svg.EmptyProperty = new svg.Property('EMPTY', '');
756
+
757
+ svg.Element.ElementBase = function(node) {
758
+ this.attributes = {};
759
+ this.styles = {};
760
+ this.stylesSpecificity = {};
761
+ this.children = [];
762
+
763
+ // get or create attribute
764
+ this.attribute = function(name, createIfNotExists) {
765
+ var a = this.attributes[name];
766
+ if (a != null) return a;
767
+
768
+ if (createIfNotExists == true) { a = new svg.Property(name, ''); this.attributes[name] = a; }
769
+ return a || svg.EmptyProperty;
770
+ }
771
+
772
+ this.getHrefAttribute = function() {
773
+ for (var a in this.attributes) {
774
+ if (a == 'href' || a.match(/:href$/)) {
775
+ return this.attributes[a];
776
+ }
777
+ }
778
+ return svg.EmptyProperty;
779
+ }
780
+
781
+ // get or create style, crawls up node tree
782
+ this.style = function(name, createIfNotExists, skipAncestors) {
783
+ var s = this.styles[name];
784
+ if (s != null) return s;
785
+
786
+ var a = this.attribute(name);
787
+ if (a != null && a.hasValue()) {
788
+ this.styles[name] = a; // move up to me to cache
789
+ return a;
790
+ }
791
+
792
+ if (skipAncestors != true) {
793
+ var p = this.parent;
794
+ if (p != null) {
795
+ var ps = p.style(name);
796
+ if (ps != null && ps.hasValue()) {
797
+ return ps;
798
+ }
799
+ }
800
+ }
801
+
802
+ if (createIfNotExists == true) { s = new svg.Property(name, ''); this.styles[name] = s; }
803
+ return s || svg.EmptyProperty;
804
+ }
805
+
806
+ // base render
807
+ this.render = function(ctx) {
808
+ // don't render display=none
809
+ if (this.style('display').value == 'none') return;
810
+
811
+ // don't render visibility=hidden
812
+ if (this.style('visibility').value == 'hidden') return;
813
+
814
+ ctx.save();
815
+ if (this.style('mask').hasValue()) { // mask
816
+ var mask = this.style('mask').getDefinition();
817
+ if (mask != null) mask.apply(ctx, this);
818
+ }
819
+ else if (this.style('filter').hasValue()) { // filter
820
+ var filter = this.style('filter').getDefinition();
821
+ if (filter != null) filter.apply(ctx, this);
822
+ }
823
+ else {
824
+ this.setContext(ctx);
825
+ this.renderChildren(ctx);
826
+ this.clearContext(ctx);
827
+ }
828
+ ctx.restore();
829
+ }
830
+
831
+ // base set context
832
+ this.setContext = function(ctx) {
833
+ // OVERRIDE ME!
834
+ }
835
+
836
+ // base clear context
837
+ this.clearContext = function(ctx) {
838
+ // OVERRIDE ME!
839
+ }
840
+
841
+ // base render children
842
+ this.renderChildren = function(ctx) {
843
+ for (var i=0; i<this.children.length; i++) {
844
+ this.children[i].render(ctx);
845
+ }
846
+ }
847
+
848
+ this.addChild = function(childNode, create) {
849
+ var child = childNode;
850
+ if (create) child = svg.CreateElement(childNode);
851
+ child.parent = this;
852
+ if (child.type != 'title') { this.children.push(child); }
853
+ }
854
+
855
+ this.addStylesFromStyleDefinition = function () {
856
+ // add styles
857
+ for (var selector in svg.Styles) {
858
+ if (selector[0] != '@' && matchesSelector(node, selector)) {
859
+ var styles = svg.Styles[selector];
860
+ var specificity = svg.StylesSpecificity[selector];
861
+ if (styles != null) {
862
+ for (var name in styles) {
863
+ var existingSpecificity = this.stylesSpecificity[name];
864
+ if (typeof existingSpecificity == 'undefined') {
865
+ existingSpecificity = '000';
866
+ }
867
+ if (specificity > existingSpecificity) {
868
+ this.styles[name] = styles[name];
869
+ this.stylesSpecificity[name] = specificity;
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+ };
876
+
877
+ // Microsoft Edge fix
878
+ var allUppercase = new RegExp("^[A-Z\-]+$");
879
+ var normalizeAttributeName = function (name) {
880
+ if (allUppercase.test(name)) {
881
+ return name.toLowerCase();
882
+ }
883
+ return name;
884
+ };
885
+
886
+ if (node != null && node.nodeType == 1) { //ELEMENT_NODE
887
+ // add attributes
888
+ for (var i=0; i<node.attributes.length; i++) {
889
+ var attribute = node.attributes[i];
890
+ var nodeName = normalizeAttributeName(attribute.nodeName);
891
+ this.attributes[nodeName] = new svg.Property(nodeName, attribute.value);
892
+ }
893
+
894
+ this.addStylesFromStyleDefinition();
895
+
896
+ // add inline styles
897
+ if (this.attribute('style').hasValue()) {
898
+ var styles = this.attribute('style').value.split(';');
899
+ for (var i=0; i<styles.length; i++) {
900
+ if (svg.trim(styles[i]) != '') {
901
+ var style = styles[i].split(':');
902
+ var name = svg.trim(style[0]);
903
+ var value = svg.trim(style[1]);
904
+ this.styles[name] = new svg.Property(name, value);
905
+ }
906
+ }
907
+ }
908
+
909
+ // add id
910
+ if (this.attribute('id').hasValue()) {
911
+ if (svg.Definitions[this.attribute('id').value] == null) {
912
+ svg.Definitions[this.attribute('id').value] = this;
913
+ }
914
+ }
915
+
916
+ // add children
917
+ for (var i=0; i<node.childNodes.length; i++) {
918
+ var childNode = node.childNodes[i];
919
+ if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE
920
+ if (this.captureTextNodes && (childNode.nodeType == 3 || childNode.nodeType == 4)) {
921
+ var text = childNode.value || childNode.text || childNode.textContent || '';
922
+ if (svg.compressSpaces(text) != '') {
923
+ this.addChild(new svg.Element.tspan(childNode), false); // TEXT_NODE
924
+ }
925
+ }
926
+ }
927
+ }
928
+ }
929
+
930
+ svg.Element.RenderedElementBase = function(node) {
931
+ this.base = svg.Element.ElementBase;
932
+ this.base(node);
933
+
934
+ this.setContext = function(ctx) {
935
+ // fill
936
+ if (this.style('fill').isUrlDefinition()) {
937
+ var fs = this.style('fill').getFillStyleDefinition(this, this.style('fill-opacity'));
938
+ if (fs != null) ctx.fillStyle = fs;
939
+ }
940
+ else if (this.style('fill').hasValue()) {
941
+ var fillStyle = this.style('fill');
942
+ if (fillStyle.value == 'currentColor') fillStyle.value = this.style('color').value;
943
+ if (fillStyle.value != 'inherit') ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value);
944
+ }
945
+ if (this.style('fill-opacity').hasValue()) {
946
+ var fillStyle = new svg.Property('fill', ctx.fillStyle);
947
+ fillStyle = fillStyle.addOpacity(this.style('fill-opacity'));
948
+ ctx.fillStyle = fillStyle.value;
949
+ }
950
+
951
+ // stroke
952
+ if (this.style('stroke').isUrlDefinition()) {
953
+ var fs = this.style('stroke').getFillStyleDefinition(this, this.style('stroke-opacity'));
954
+ if (fs != null) ctx.strokeStyle = fs;
955
+ }
956
+ else if (this.style('stroke').hasValue()) {
957
+ var strokeStyle = this.style('stroke');
958
+ if (strokeStyle.value == 'currentColor') strokeStyle.value = this.style('color').value;
959
+ if (strokeStyle.value != 'inherit') ctx.strokeStyle = (strokeStyle.value == 'none' ? 'rgba(0,0,0,0)' : strokeStyle.value);
960
+ }
961
+ if (this.style('stroke-opacity').hasValue()) {
962
+ var strokeStyle = new svg.Property('stroke', ctx.strokeStyle);
963
+ strokeStyle = strokeStyle.addOpacity(this.style('stroke-opacity'));
964
+ ctx.strokeStyle = strokeStyle.value;
965
+ }
966
+ if (this.style('stroke-width').hasValue()) {
967
+ var newLineWidth = this.style('stroke-width').toPixels();
968
+ ctx.lineWidth = newLineWidth == 0 ? 0.001 : newLineWidth; // browsers don't respect 0
969
+ }
970
+ if (this.style('stroke-linecap').hasValue()) ctx.lineCap = this.style('stroke-linecap').value;
971
+ if (this.style('stroke-linejoin').hasValue()) ctx.lineJoin = this.style('stroke-linejoin').value;
972
+ if (this.style('stroke-miterlimit').hasValue()) ctx.miterLimit = this.style('stroke-miterlimit').value;
973
+ if (this.style('stroke-dasharray').hasValue() && this.style('stroke-dasharray').value != 'none') {
974
+ var gaps = svg.ToNumberArray(this.style('stroke-dasharray').value);
975
+ if (typeof ctx.setLineDash != 'undefined') { ctx.setLineDash(gaps); }
976
+ else if (typeof ctx.webkitLineDash != 'undefined') { ctx.webkitLineDash = gaps; }
977
+ else if (typeof ctx.mozDash != 'undefined' && !(gaps.length==1 && gaps[0]==0)) { ctx.mozDash = gaps; }
978
+
979
+ var offset = this.style('stroke-dashoffset').numValueOrDefault(1);
980
+ if (typeof ctx.lineDashOffset != 'undefined') { ctx.lineDashOffset = offset; }
981
+ else if (typeof ctx.webkitLineDashOffset != 'undefined') { ctx.webkitLineDashOffset = offset; }
982
+ else if (typeof ctx.mozDashOffset != 'undefined') { ctx.mozDashOffset = offset; }
983
+ }
984
+
985
+ // font
986
+ if (typeof ctx.font != 'undefined') {
987
+ ctx.font = svg.Font.CreateFont(
988
+ this.style('font-style').value,
989
+ this.style('font-variant').value,
990
+ this.style('font-weight').value,
991
+ this.style('font-size').hasValue() ? this.style('font-size').toPixels() + 'px' : '',
992
+ this.style('font-family').value).toString();
993
+ }
994
+
995
+ // transform
996
+ if (this.style('transform', false, true).hasValue()) {
997
+ var transform = new svg.Transform(this.style('transform', false, true).value);
998
+ transform.apply(ctx);
999
+ }
1000
+
1001
+ // clip
1002
+ if (this.style('clip-path', false, true).hasValue()) {
1003
+ var clip = this.style('clip-path', false, true).getDefinition();
1004
+ if (clip != null) clip.apply(ctx);
1005
+ }
1006
+
1007
+ // opacity
1008
+ if (this.style('opacity').hasValue()) {
1009
+ ctx.globalAlpha = this.style('opacity').numValue();
1010
+ }
1011
+ }
1012
+ }
1013
+ svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase;
1014
+
1015
+ svg.Element.PathElementBase = function(node) {
1016
+ this.base = svg.Element.RenderedElementBase;
1017
+ this.base(node);
1018
+
1019
+ this.path = function(ctx) {
1020
+ if (ctx != null) ctx.beginPath();
1021
+ return new svg.BoundingBox();
1022
+ }
1023
+
1024
+ this.renderChildren = function(ctx) {
1025
+ this.path(ctx);
1026
+ svg.Mouse.checkPath(this, ctx);
1027
+ if (ctx.fillStyle != '') {
1028
+ if (this.style('fill-rule').valueOrDefault('inherit') != 'inherit') { ctx.fill(this.style('fill-rule').value); }
1029
+ else { ctx.fill(); }
1030
+ }
1031
+ if (ctx.strokeStyle != '') ctx.stroke();
1032
+
1033
+ var markers = this.getMarkers();
1034
+ if (markers != null) {
1035
+ if (this.style('marker-start').isUrlDefinition()) {
1036
+ var marker = this.style('marker-start').getDefinition();
1037
+ marker.render(ctx, markers[0][0], markers[0][1]);
1038
+ }
1039
+ if (this.style('marker-mid').isUrlDefinition()) {
1040
+ var marker = this.style('marker-mid').getDefinition();
1041
+ for (var i=1;i<markers.length-1;i++) {
1042
+ marker.render(ctx, markers[i][0], markers[i][1]);
1043
+ }
1044
+ }
1045
+ if (this.style('marker-end').isUrlDefinition()) {
1046
+ var marker = this.style('marker-end').getDefinition();
1047
+ marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]);
1048
+ }
1049
+ }
1050
+ }
1051
+
1052
+ this.getBoundingBox = function() {
1053
+ return this.path();
1054
+ }
1055
+
1056
+ this.getMarkers = function() {
1057
+ return null;
1058
+ }
1059
+ }
1060
+ svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase;
1061
+
1062
+ // svg element
1063
+ svg.Element.svg = function(node) {
1064
+ this.base = svg.Element.RenderedElementBase;
1065
+ this.base(node);
1066
+
1067
+ this.baseClearContext = this.clearContext;
1068
+ this.clearContext = function(ctx) {
1069
+ this.baseClearContext(ctx);
1070
+ svg.ViewPort.RemoveCurrent();
1071
+ }
1072
+
1073
+ this.baseSetContext = this.setContext;
1074
+ this.setContext = function(ctx) {
1075
+ // initial values and defaults
1076
+ ctx.strokeStyle = 'rgba(0,0,0,0)';
1077
+ ctx.lineCap = 'butt';
1078
+ ctx.lineJoin = 'miter';
1079
+ ctx.miterLimit = 4;
1080
+ if (typeof ctx.font != 'undefined' && typeof window.getComputedStyle != 'undefined') {
1081
+ ctx.font = window.getComputedStyle(ctx.canvas).getPropertyValue('font');
1082
+ }
1083
+
1084
+ this.baseSetContext(ctx);
1085
+
1086
+ // create new view port
1087
+ if (!this.attribute('x').hasValue()) this.attribute('x', true).value = 0;
1088
+ if (!this.attribute('y').hasValue()) this.attribute('y', true).value = 0;
1089
+ ctx.translate(this.attribute('x').toPixels('x'), this.attribute('y').toPixels('y'));
1090
+
1091
+ var width = svg.ViewPort.width();
1092
+ var height = svg.ViewPort.height();
1093
+
1094
+ if (!this.attribute('width').hasValue()) this.attribute('width', true).value = '100%';
1095
+ if (!this.attribute('height').hasValue()) this.attribute('height', true).value = '100%';
1096
+ if (typeof this.root == 'undefined') {
1097
+ width = this.attribute('width').toPixels('x');
1098
+ height = this.attribute('height').toPixels('y');
1099
+
1100
+ var x = 0;
1101
+ var y = 0;
1102
+ if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) {
1103
+ x = -this.attribute('refX').toPixels('x');
1104
+ y = -this.attribute('refY').toPixels('y');
1105
+ }
1106
+
1107
+ if (this.attribute('overflow').valueOrDefault('hidden') != 'visible') {
1108
+ ctx.beginPath();
1109
+ ctx.moveTo(x, y);
1110
+ ctx.lineTo(width, y);
1111
+ ctx.lineTo(width, height);
1112
+ ctx.lineTo(x, height);
1113
+ ctx.closePath();
1114
+ ctx.clip();
1115
+ }
1116
+ }
1117
+ svg.ViewPort.SetCurrent(width, height);
1118
+
1119
+ // viewbox
1120
+ if (this.attribute('viewBox').hasValue()) {
1121
+ var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
1122
+ var minX = viewBox[0];
1123
+ var minY = viewBox[1];
1124
+ width = viewBox[2];
1125
+ height = viewBox[3];
1126
+
1127
+ svg.AspectRatio(ctx,
1128
+ this.attribute('preserveAspectRatio').value,
1129
+ svg.ViewPort.width(),
1130
+ width,
1131
+ svg.ViewPort.height(),
1132
+ height,
1133
+ minX,
1134
+ minY,
1135
+ this.attribute('refX').value,
1136
+ this.attribute('refY').value);
1137
+
1138
+ svg.ViewPort.RemoveCurrent();
1139
+ svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
1140
+ }
1141
+ }
1142
+ }
1143
+ svg.Element.svg.prototype = new svg.Element.RenderedElementBase;
1144
+
1145
+ // rect element
1146
+ svg.Element.rect = function(node) {
1147
+ this.base = svg.Element.PathElementBase;
1148
+ this.base(node);
1149
+
1150
+ this.path = function(ctx) {
1151
+ var x = this.attribute('x').toPixels('x');
1152
+ var y = this.attribute('y').toPixels('y');
1153
+ var width = this.attribute('width').toPixels('x');
1154
+ var height = this.attribute('height').toPixels('y');
1155
+ var rx = this.attribute('rx').toPixels('x');
1156
+ var ry = this.attribute('ry').toPixels('y');
1157
+ if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx;
1158
+ if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry;
1159
+ rx = Math.min(rx, width / 2.0);
1160
+ ry = Math.min(ry, height / 2.0);
1161
+ if (ctx != null) {
1162
+ ctx.beginPath();
1163
+ ctx.moveTo(x + rx, y);
1164
+ ctx.lineTo(x + width - rx, y);
1165
+ ctx.quadraticCurveTo(x + width, y, x + width, y + ry)
1166
+ ctx.lineTo(x + width, y + height - ry);
1167
+ ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height)
1168
+ ctx.lineTo(x + rx, y + height);
1169
+ ctx.quadraticCurveTo(x, y + height, x, y + height - ry)
1170
+ ctx.lineTo(x, y + ry);
1171
+ ctx.quadraticCurveTo(x, y, x + rx, y)
1172
+ ctx.closePath();
1173
+ }
1174
+
1175
+ return new svg.BoundingBox(x, y, x + width, y + height);
1176
+ }
1177
+ }
1178
+ svg.Element.rect.prototype = new svg.Element.PathElementBase;
1179
+
1180
+ // circle element
1181
+ svg.Element.circle = function(node) {
1182
+ this.base = svg.Element.PathElementBase;
1183
+ this.base(node);
1184
+
1185
+ this.path = function(ctx) {
1186
+ var cx = this.attribute('cx').toPixels('x');
1187
+ var cy = this.attribute('cy').toPixels('y');
1188
+ var r = this.attribute('r').toPixels();
1189
+
1190
+ if (ctx != null) {
1191
+ ctx.beginPath();
1192
+ ctx.arc(cx, cy, r, 0, Math.PI * 2, true);
1193
+ ctx.closePath();
1194
+ }
1195
+
1196
+ return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);
1197
+ }
1198
+ }
1199
+ svg.Element.circle.prototype = new svg.Element.PathElementBase;
1200
+
1201
+ // ellipse element
1202
+ svg.Element.ellipse = function(node) {
1203
+ this.base = svg.Element.PathElementBase;
1204
+ this.base(node);
1205
+
1206
+ this.path = function(ctx) {
1207
+ var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
1208
+ var rx = this.attribute('rx').toPixels('x');
1209
+ var ry = this.attribute('ry').toPixels('y');
1210
+ var cx = this.attribute('cx').toPixels('x');
1211
+ var cy = this.attribute('cy').toPixels('y');
1212
+
1213
+ if (ctx != null) {
1214
+ ctx.beginPath();
1215
+ ctx.moveTo(cx, cy - ry);
1216
+ ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy);
1217
+ ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
1218
+ ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
1219
+ ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
1220
+ ctx.closePath();
1221
+ }
1222
+
1223
+ return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
1224
+ }
1225
+ }
1226
+ svg.Element.ellipse.prototype = new svg.Element.PathElementBase;
1227
+
1228
+ // line element
1229
+ svg.Element.line = function(node) {
1230
+ this.base = svg.Element.PathElementBase;
1231
+ this.base(node);
1232
+
1233
+ this.getPoints = function() {
1234
+ return [
1235
+ new svg.Point(this.attribute('x1').toPixels('x'), this.attribute('y1').toPixels('y')),
1236
+ new svg.Point(this.attribute('x2').toPixels('x'), this.attribute('y2').toPixels('y'))];
1237
+ }
1238
+
1239
+ this.path = function(ctx) {
1240
+ var points = this.getPoints();
1241
+
1242
+ if (ctx != null) {
1243
+ ctx.beginPath();
1244
+ ctx.moveTo(points[0].x, points[0].y);
1245
+ ctx.lineTo(points[1].x, points[1].y);
1246
+ }
1247
+
1248
+ return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);
1249
+ }
1250
+
1251
+ this.getMarkers = function() {
1252
+ var points = this.getPoints();
1253
+ var a = points[0].angleTo(points[1]);
1254
+ return [[points[0], a], [points[1], a]];
1255
+ }
1256
+ }
1257
+ svg.Element.line.prototype = new svg.Element.PathElementBase;
1258
+
1259
+ // polyline element
1260
+ svg.Element.polyline = function(node) {
1261
+ this.base = svg.Element.PathElementBase;
1262
+ this.base(node);
1263
+
1264
+ this.points = svg.CreatePath(this.attribute('points').value);
1265
+ this.path = function(ctx) {
1266
+ var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);
1267
+ if (ctx != null) {
1268
+ ctx.beginPath();
1269
+ ctx.moveTo(this.points[0].x, this.points[0].y);
1270
+ }
1271
+ for (var i=1; i<this.points.length; i++) {
1272
+ bb.addPoint(this.points[i].x, this.points[i].y);
1273
+ if (ctx != null) ctx.lineTo(this.points[i].x, this.points[i].y);
1274
+ }
1275
+ return bb;
1276
+ }
1277
+
1278
+ this.getMarkers = function() {
1279
+ var markers = [];
1280
+ for (var i=0; i<this.points.length - 1; i++) {
1281
+ markers.push([this.points[i], this.points[i].angleTo(this.points[i+1])]);
1282
+ }
1283
+ if (markers.length > 0) {
1284
+ markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]);
1285
+ }
1286
+ return markers;
1287
+ }
1288
+ }
1289
+ svg.Element.polyline.prototype = new svg.Element.PathElementBase;
1290
+
1291
+ // polygon element
1292
+ svg.Element.polygon = function(node) {
1293
+ this.base = svg.Element.polyline;
1294
+ this.base(node);
1295
+
1296
+ this.basePath = this.path;
1297
+ this.path = function(ctx) {
1298
+ var bb = this.basePath(ctx);
1299
+ if (ctx != null) {
1300
+ ctx.lineTo(this.points[0].x, this.points[0].y);
1301
+ ctx.closePath();
1302
+ }
1303
+ return bb;
1304
+ }
1305
+ }
1306
+ svg.Element.polygon.prototype = new svg.Element.polyline;
1307
+
1308
+ // path element
1309
+ svg.Element.path = function(node) {
1310
+ this.base = svg.Element.PathElementBase;
1311
+ this.base(node);
1312
+
1313
+ var d = this.attribute('d').value;
1314
+ // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF
1315
+ d = d.replace(/,/gm,' '); // get rid of all commas
1316
+ // As the end of a match can also be the start of the next match, we need to run this replace twice.
1317
+ for(var i=0; i<2; i++)
1318
+ d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,'$1 $2'); // suffix commands with spaces
1319
+ d = d.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // prefix commands with spaces
1320
+ d = d.replace(/([0-9])([+\-])/gm,'$1 $2'); // separate digits on +- signs
1321
+ // Again, we need to run this twice to find all occurances
1322
+ for(var i=0; i<2; i++)
1323
+ d = d.replace(/(\.[0-9]*)(\.)/gm,'$1 $2'); // separate digits when they start with a comma
1324
+ d = d.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,'$1 $3 $4 '); // shorthand elliptical arc path syntax
1325
+ d = svg.compressSpaces(d); // compress multiple spaces
1326
+ d = svg.trim(d);
1327
+ this.PathParser = new (function(d) {
1328
+ this.tokens = d.split(' ');
1329
+
1330
+ this.reset = function() {
1331
+ this.i = -1;
1332
+ this.command = '';
1333
+ this.previousCommand = '';
1334
+ this.start = new svg.Point(0, 0);
1335
+ this.control = new svg.Point(0, 0);
1336
+ this.current = new svg.Point(0, 0);
1337
+ this.points = [];
1338
+ this.angles = [];
1339
+ }
1340
+
1341
+ this.isEnd = function() {
1342
+ return this.i >= this.tokens.length - 1;
1343
+ }
1344
+
1345
+ this.isCommandOrEnd = function() {
1346
+ if (this.isEnd()) return true;
1347
+ return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;
1348
+ }
1349
+
1350
+ this.isRelativeCommand = function() {
1351
+ switch(this.command)
1352
+ {
1353
+ case 'm':
1354
+ case 'l':
1355
+ case 'h':
1356
+ case 'v':
1357
+ case 'c':
1358
+ case 's':
1359
+ case 'q':
1360
+ case 't':
1361
+ case 'a':
1362
+ case 'z':
1363
+ return true;
1364
+ break;
1365
+ }
1366
+ return false;
1367
+ }
1368
+
1369
+ this.getToken = function() {
1370
+ this.i++;
1371
+ return this.tokens[this.i];
1372
+ }
1373
+
1374
+ this.getScalar = function() {
1375
+ return parseFloat(this.getToken());
1376
+ }
1377
+
1378
+ this.nextCommand = function() {
1379
+ this.previousCommand = this.command;
1380
+ this.command = this.getToken();
1381
+ }
1382
+
1383
+ this.getPoint = function() {
1384
+ var p = new svg.Point(this.getScalar(), this.getScalar());
1385
+ return this.makeAbsolute(p);
1386
+ }
1387
+
1388
+ this.getAsControlPoint = function() {
1389
+ var p = this.getPoint();
1390
+ this.control = p;
1391
+ return p;
1392
+ }
1393
+
1394
+ this.getAsCurrentPoint = function() {
1395
+ var p = this.getPoint();
1396
+ this.current = p;
1397
+ return p;
1398
+ }
1399
+
1400
+ this.getReflectedControlPoint = function() {
1401
+ if (this.previousCommand.toLowerCase() != 'c' &&
1402
+ this.previousCommand.toLowerCase() != 's' &&
1403
+ this.previousCommand.toLowerCase() != 'q' &&
1404
+ this.previousCommand.toLowerCase() != 't' ){
1405
+ return this.current;
1406
+ }
1407
+
1408
+ // reflect point
1409
+ var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);
1410
+ return p;
1411
+ }
1412
+
1413
+ this.makeAbsolute = function(p) {
1414
+ if (this.isRelativeCommand()) {
1415
+ p.x += this.current.x;
1416
+ p.y += this.current.y;
1417
+ }
1418
+ return p;
1419
+ }
1420
+
1421
+ this.addMarker = function(p, from, priorTo) {
1422
+ // if the last angle isn't filled in because we didn't have this point yet ...
1423
+ if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) {
1424
+ this.angles[this.angles.length-1] = this.points[this.points.length-1].angleTo(priorTo);
1425
+ }
1426
+ this.addMarkerAngle(p, from == null ? null : from.angleTo(p));
1427
+ }
1428
+
1429
+ this.addMarkerAngle = function(p, a) {
1430
+ this.points.push(p);
1431
+ this.angles.push(a);
1432
+ }
1433
+
1434
+ this.getMarkerPoints = function() { return this.points; }
1435
+ this.getMarkerAngles = function() {
1436
+ for (var i=0; i<this.angles.length; i++) {
1437
+ if (this.angles[i] == null) {
1438
+ for (var j=i+1; j<this.angles.length; j++) {
1439
+ if (this.angles[j] != null) {
1440
+ this.angles[i] = this.angles[j];
1441
+ break;
1442
+ }
1443
+ }
1444
+ }
1445
+ }
1446
+ return this.angles;
1447
+ }
1448
+ })(d);
1449
+
1450
+ this.path = function(ctx) {
1451
+ var pp = this.PathParser;
1452
+ pp.reset();
1453
+
1454
+ var bb = new svg.BoundingBox();
1455
+ if (ctx != null) ctx.beginPath();
1456
+ while (!pp.isEnd()) {
1457
+ pp.nextCommand();
1458
+ switch (pp.command) {
1459
+ case 'M':
1460
+ case 'm':
1461
+ var p = pp.getAsCurrentPoint();
1462
+ pp.addMarker(p);
1463
+ bb.addPoint(p.x, p.y);
1464
+ if (ctx != null) ctx.moveTo(p.x, p.y);
1465
+ pp.start = pp.current;
1466
+ while (!pp.isCommandOrEnd()) {
1467
+ var p = pp.getAsCurrentPoint();
1468
+ pp.addMarker(p, pp.start);
1469
+ bb.addPoint(p.x, p.y);
1470
+ if (ctx != null) ctx.lineTo(p.x, p.y);
1471
+ }
1472
+ break;
1473
+ case 'L':
1474
+ case 'l':
1475
+ while (!pp.isCommandOrEnd()) {
1476
+ var c = pp.current;
1477
+ var p = pp.getAsCurrentPoint();
1478
+ pp.addMarker(p, c);
1479
+ bb.addPoint(p.x, p.y);
1480
+ if (ctx != null) ctx.lineTo(p.x, p.y);
1481
+ }
1482
+ break;
1483
+ case 'H':
1484
+ case 'h':
1485
+ while (!pp.isCommandOrEnd()) {
1486
+ var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);
1487
+ pp.addMarker(newP, pp.current);
1488
+ pp.current = newP;
1489
+ bb.addPoint(pp.current.x, pp.current.y);
1490
+ if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1491
+ }
1492
+ break;
1493
+ case 'V':
1494
+ case 'v':
1495
+ while (!pp.isCommandOrEnd()) {
1496
+ var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());
1497
+ pp.addMarker(newP, pp.current);
1498
+ pp.current = newP;
1499
+ bb.addPoint(pp.current.x, pp.current.y);
1500
+ if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1501
+ }
1502
+ break;
1503
+ case 'C':
1504
+ case 'c':
1505
+ while (!pp.isCommandOrEnd()) {
1506
+ var curr = pp.current;
1507
+ var p1 = pp.getPoint();
1508
+ var cntrl = pp.getAsControlPoint();
1509
+ var cp = pp.getAsCurrentPoint();
1510
+ pp.addMarker(cp, cntrl, p1);
1511
+ bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1512
+ if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1513
+ }
1514
+ break;
1515
+ case 'S':
1516
+ case 's':
1517
+ while (!pp.isCommandOrEnd()) {
1518
+ var curr = pp.current;
1519
+ var p1 = pp.getReflectedControlPoint();
1520
+ var cntrl = pp.getAsControlPoint();
1521
+ var cp = pp.getAsCurrentPoint();
1522
+ pp.addMarker(cp, cntrl, p1);
1523
+ bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1524
+ if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1525
+ }
1526
+ break;
1527
+ case 'Q':
1528
+ case 'q':
1529
+ while (!pp.isCommandOrEnd()) {
1530
+ var curr = pp.current;
1531
+ var cntrl = pp.getAsControlPoint();
1532
+ var cp = pp.getAsCurrentPoint();
1533
+ pp.addMarker(cp, cntrl, cntrl);
1534
+ bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1535
+ if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1536
+ }
1537
+ break;
1538
+ case 'T':
1539
+ case 't':
1540
+ while (!pp.isCommandOrEnd()) {
1541
+ var curr = pp.current;
1542
+ var cntrl = pp.getReflectedControlPoint();
1543
+ pp.control = cntrl;
1544
+ var cp = pp.getAsCurrentPoint();
1545
+ pp.addMarker(cp, cntrl, cntrl);
1546
+ bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1547
+ if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1548
+ }
1549
+ break;
1550
+ case 'A':
1551
+ case 'a':
1552
+ while (!pp.isCommandOrEnd()) {
1553
+ var curr = pp.current;
1554
+ var rx = pp.getScalar();
1555
+ var ry = pp.getScalar();
1556
+ var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);
1557
+ var largeArcFlag = pp.getScalar();
1558
+ var sweepFlag = pp.getScalar();
1559
+ var cp = pp.getAsCurrentPoint();
1560
+
1561
+ // Conversion from endpoint to center parameterization
1562
+ // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
1563
+ // x1', y1'
1564
+ var currp = new svg.Point(
1565
+ Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0,
1566
+ -Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0
1567
+ );
1568
+ // adjust radii
1569
+ var l = Math.pow(currp.x,2)/Math.pow(rx,2)+Math.pow(currp.y,2)/Math.pow(ry,2);
1570
+ if (l > 1) {
1571
+ rx *= Math.sqrt(l);
1572
+ ry *= Math.sqrt(l);
1573
+ }
1574
+ // cx', cy'
1575
+ var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt(
1576
+ ((Math.pow(rx,2)*Math.pow(ry,2))-(Math.pow(rx,2)*Math.pow(currp.y,2))-(Math.pow(ry,2)*Math.pow(currp.x,2))) /
1577
+ (Math.pow(rx,2)*Math.pow(currp.y,2)+Math.pow(ry,2)*Math.pow(currp.x,2))
1578
+ );
1579
+ if (isNaN(s)) s = 0;
1580
+ var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx);
1581
+ // cx, cy
1582
+ var centp = new svg.Point(
1583
+ (curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y,
1584
+ (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y
1585
+ );
1586
+ // vector magnitude
1587
+ var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); }
1588
+ // ratio between two vectors
1589
+ var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) }
1590
+ // angle between two vectors
1591
+ var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); }
1592
+ // initial angle
1593
+ var a1 = a([1,0], [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]);
1594
+ // angle delta
1595
+ var u = [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry];
1596
+ var v = [(-currp.x-cpp.x)/rx,(-currp.y-cpp.y)/ry];
1597
+ var ad = a(u, v);
1598
+ if (r(u,v) <= -1) ad = Math.PI;
1599
+ if (r(u,v) >= 1) ad = 0;
1600
+
1601
+ // for markers
1602
+ var dir = 1 - sweepFlag ? 1.0 : -1.0;
1603
+ var ah = a1 + dir * (ad / 2.0);
1604
+ var halfWay = new svg.Point(
1605
+ centp.x + rx * Math.cos(ah),
1606
+ centp.y + ry * Math.sin(ah)
1607
+ );
1608
+ pp.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
1609
+ pp.addMarkerAngle(cp, ah - dir * Math.PI);
1610
+
1611
+ bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better
1612
+ if (ctx != null) {
1613
+ var r = rx > ry ? rx : ry;
1614
+ var sx = rx > ry ? 1 : rx / ry;
1615
+ var sy = rx > ry ? ry / rx : 1;
1616
+
1617
+ ctx.translate(centp.x, centp.y);
1618
+ ctx.rotate(xAxisRotation);
1619
+ ctx.scale(sx, sy);
1620
+ ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);
1621
+ ctx.scale(1/sx, 1/sy);
1622
+ ctx.rotate(-xAxisRotation);
1623
+ ctx.translate(-centp.x, -centp.y);
1624
+ }
1625
+ }
1626
+ break;
1627
+ case 'Z':
1628
+ case 'z':
1629
+ if (ctx != null) ctx.closePath();
1630
+ pp.current = pp.start;
1631
+ }
1632
+ }
1633
+
1634
+ return bb;
1635
+ }
1636
+
1637
+ this.getMarkers = function() {
1638
+ var points = this.PathParser.getMarkerPoints();
1639
+ var angles = this.PathParser.getMarkerAngles();
1640
+
1641
+ var markers = [];
1642
+ for (var i=0; i<points.length; i++) {
1643
+ markers.push([points[i], angles[i]]);
1644
+ }
1645
+ return markers;
1646
+ }
1647
+ }
1648
+ svg.Element.path.prototype = new svg.Element.PathElementBase;
1649
+
1650
+ // pattern element
1651
+ svg.Element.pattern = function(node) {
1652
+ this.base = svg.Element.ElementBase;
1653
+ this.base(node);
1654
+
1655
+ this.createPattern = function(ctx, element) {
1656
+ var width = this.attribute('width').toPixels('x', true);
1657
+ var height = this.attribute('height').toPixels('y', true);
1658
+
1659
+ // render me using a temporary svg element
1660
+ var tempSvg = new svg.Element.svg();
1661
+ tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1662
+ tempSvg.attributes['width'] = new svg.Property('width', width + 'px');
1663
+ tempSvg.attributes['height'] = new svg.Property('height', height + 'px');
1664
+ tempSvg.attributes['transform'] = new svg.Property('transform', this.attribute('patternTransform').value);
1665
+ tempSvg.children = this.children;
1666
+
1667
+ var c = document.createElement('canvas');
1668
+ c.width = width;
1669
+ c.height = height;
1670
+ var cctx = c.getContext('2d');
1671
+ if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) {
1672
+ cctx.translate(this.attribute('x').toPixels('x', true), this.attribute('y').toPixels('y', true));
1673
+ }
1674
+ // render 3x3 grid so when we transform there's no white space on edges
1675
+ for (var x=-1; x<=1; x++) {
1676
+ for (var y=-1; y<=1; y++) {
1677
+ cctx.save();
1678
+ tempSvg.attributes['x'] = new svg.Property('x', x * c.width);
1679
+ tempSvg.attributes['y'] = new svg.Property('y', y * c.height);
1680
+ tempSvg.render(cctx);
1681
+ cctx.restore();
1682
+ }
1683
+ }
1684
+ var pattern = ctx.createPattern(c, 'repeat');
1685
+ return pattern;
1686
+ }
1687
+ }
1688
+ svg.Element.pattern.prototype = new svg.Element.ElementBase;
1689
+
1690
+ // marker element
1691
+ svg.Element.marker = function(node) {
1692
+ this.base = svg.Element.ElementBase;
1693
+ this.base(node);
1694
+
1695
+ this.baseRender = this.render;
1696
+ this.render = function(ctx, point, angle) {
1697
+ ctx.translate(point.x, point.y);
1698
+ if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle);
1699
+ if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth);
1700
+ ctx.save();
1701
+
1702
+ // render me using a temporary svg element
1703
+ var tempSvg = new svg.Element.svg();
1704
+ tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1705
+ tempSvg.attributes['refX'] = new svg.Property('refX', this.attribute('refX').value);
1706
+ tempSvg.attributes['refY'] = new svg.Property('refY', this.attribute('refY').value);
1707
+ tempSvg.attributes['width'] = new svg.Property('width', this.attribute('markerWidth').value);
1708
+ tempSvg.attributes['height'] = new svg.Property('height', this.attribute('markerHeight').value);
1709
+ tempSvg.attributes['fill'] = new svg.Property('fill', this.attribute('fill').valueOrDefault('black'));
1710
+ tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none'));
1711
+ tempSvg.children = this.children;
1712
+ tempSvg.render(ctx);
1713
+
1714
+ ctx.restore();
1715
+ if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth);
1716
+ if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle);
1717
+ ctx.translate(-point.x, -point.y);
1718
+ }
1719
+ }
1720
+ svg.Element.marker.prototype = new svg.Element.ElementBase;
1721
+
1722
+ // definitions element
1723
+ svg.Element.defs = function(node) {
1724
+ this.base = svg.Element.ElementBase;
1725
+ this.base(node);
1726
+
1727
+ this.render = function(ctx) {
1728
+ // NOOP
1729
+ }
1730
+ }
1731
+ svg.Element.defs.prototype = new svg.Element.ElementBase;
1732
+
1733
+ // base for gradients
1734
+ svg.Element.GradientBase = function(node) {
1735
+ this.base = svg.Element.ElementBase;
1736
+ this.base(node);
1737
+
1738
+ this.stops = [];
1739
+ for (var i=0; i<this.children.length; i++) {
1740
+ var child = this.children[i];
1741
+ if (child.type == 'stop') this.stops.push(child);
1742
+ }
1743
+
1744
+ this.getGradient = function() {
1745
+ // OVERRIDE ME!
1746
+ }
1747
+
1748
+ this.gradientUnits = function () {
1749
+ return this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
1750
+ }
1751
+
1752
+ this.attributesToInherit = ['gradientUnits'];
1753
+
1754
+ this.inheritStopContainer = function (stopsContainer) {
1755
+ for (var i=0; i<this.attributesToInherit.length; i++) {
1756
+ var attributeToInherit = this.attributesToInherit[i];
1757
+ if (!this.attribute(attributeToInherit).hasValue() && stopsContainer.attribute(attributeToInherit).hasValue()) {
1758
+ this.attribute(attributeToInherit, true).value = stopsContainer.attribute(attributeToInherit).value;
1759
+ }
1760
+ }
1761
+ }
1762
+
1763
+ this.createGradient = function(ctx, element, parentOpacityProp) {
1764
+ var stopsContainer = this;
1765
+ if (this.getHrefAttribute().hasValue()) {
1766
+ stopsContainer = this.getHrefAttribute().getDefinition();
1767
+ this.inheritStopContainer(stopsContainer);
1768
+ }
1769
+
1770
+ var addParentOpacity = function (color) {
1771
+ if (parentOpacityProp.hasValue()) {
1772
+ var p = new svg.Property('color', color);
1773
+ return p.addOpacity(parentOpacityProp).value;
1774
+ }
1775
+ return color;
1776
+ };
1777
+
1778
+ var g = this.getGradient(ctx, element);
1779
+ if (g == null) return addParentOpacity(stopsContainer.stops[stopsContainer.stops.length - 1].color);
1780
+ for (var i=0; i<stopsContainer.stops.length; i++) {
1781
+ g.addColorStop(stopsContainer.stops[i].offset, addParentOpacity(stopsContainer.stops[i].color));
1782
+ }
1783
+
1784
+ if (this.attribute('gradientTransform').hasValue()) {
1785
+ // render as transformed pattern on temporary canvas
1786
+ var rootView = svg.ViewPort.viewPorts[0];
1787
+
1788
+ var rect = new svg.Element.rect();
1789
+ rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0);
1790
+ rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0);
1791
+ rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
1792
+ rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
1793
+
1794
+ var group = new svg.Element.g();
1795
+ group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
1796
+ group.children = [ rect ];
1797
+
1798
+ var tempSvg = new svg.Element.svg();
1799
+ tempSvg.attributes['x'] = new svg.Property('x', 0);
1800
+ tempSvg.attributes['y'] = new svg.Property('y', 0);
1801
+ tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
1802
+ tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
1803
+ tempSvg.children = [ group ];
1804
+
1805
+ var c = document.createElement('canvas');
1806
+ c.width = rootView.width;
1807
+ c.height = rootView.height;
1808
+ var tempCtx = c.getContext('2d');
1809
+ tempCtx.fillStyle = g;
1810
+ tempSvg.render(tempCtx);
1811
+ return tempCtx.createPattern(c, 'no-repeat');
1812
+ }
1813
+
1814
+ return g;
1815
+ }
1816
+ }
1817
+ svg.Element.GradientBase.prototype = new svg.Element.ElementBase;
1818
+
1819
+ // linear gradient element
1820
+ svg.Element.linearGradient = function(node) {
1821
+ this.base = svg.Element.GradientBase;
1822
+ this.base(node);
1823
+
1824
+ this.attributesToInherit.push('x1');
1825
+ this.attributesToInherit.push('y1');
1826
+ this.attributesToInherit.push('x2');
1827
+ this.attributesToInherit.push('y2');
1828
+
1829
+ this.getGradient = function(ctx, element) {
1830
+ var bb = this.gradientUnits() == 'objectBoundingBox' ? element.getBoundingBox() : null;
1831
+
1832
+ if (!this.attribute('x1').hasValue()
1833
+ && !this.attribute('y1').hasValue()
1834
+ && !this.attribute('x2').hasValue()
1835
+ && !this.attribute('y2').hasValue()) {
1836
+ this.attribute('x1', true).value = 0;
1837
+ this.attribute('y1', true).value = 0;
1838
+ this.attribute('x2', true).value = 1;
1839
+ this.attribute('y2', true).value = 0;
1840
+ }
1841
+
1842
+ var x1 = (this.gradientUnits() == 'objectBoundingBox'
1843
+ ? bb.x() + bb.width() * this.attribute('x1').numValue()
1844
+ : this.attribute('x1').toPixels('x'));
1845
+ var y1 = (this.gradientUnits() == 'objectBoundingBox'
1846
+ ? bb.y() + bb.height() * this.attribute('y1').numValue()
1847
+ : this.attribute('y1').toPixels('y'));
1848
+ var x2 = (this.gradientUnits() == 'objectBoundingBox'
1849
+ ? bb.x() + bb.width() * this.attribute('x2').numValue()
1850
+ : this.attribute('x2').toPixels('x'));
1851
+ var y2 = (this.gradientUnits() == 'objectBoundingBox'
1852
+ ? bb.y() + bb.height() * this.attribute('y2').numValue()
1853
+ : this.attribute('y2').toPixels('y'));
1854
+
1855
+ if (x1 == x2 && y1 == y2) return null;
1856
+ return ctx.createLinearGradient(x1, y1, x2, y2);
1857
+ }
1858
+ }
1859
+ svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
1860
+
1861
+ // radial gradient element
1862
+ svg.Element.radialGradient = function(node) {
1863
+ this.base = svg.Element.GradientBase;
1864
+ this.base(node);
1865
+
1866
+ this.attributesToInherit.push('cx');
1867
+ this.attributesToInherit.push('cy');
1868
+ this.attributesToInherit.push('r');
1869
+ this.attributesToInherit.push('fx');
1870
+ this.attributesToInherit.push('fy');
1871
+
1872
+ this.getGradient = function(ctx, element) {
1873
+ var bb = element.getBoundingBox();
1874
+
1875
+ if (!this.attribute('cx').hasValue()) this.attribute('cx', true).value = '50%';
1876
+ if (!this.attribute('cy').hasValue()) this.attribute('cy', true).value = '50%';
1877
+ if (!this.attribute('r').hasValue()) this.attribute('r', true).value = '50%';
1878
+
1879
+ var cx = (this.gradientUnits() == 'objectBoundingBox'
1880
+ ? bb.x() + bb.width() * this.attribute('cx').numValue()
1881
+ : this.attribute('cx').toPixels('x'));
1882
+ var cy = (this.gradientUnits() == 'objectBoundingBox'
1883
+ ? bb.y() + bb.height() * this.attribute('cy').numValue()
1884
+ : this.attribute('cy').toPixels('y'));
1885
+
1886
+ var fx = cx;
1887
+ var fy = cy;
1888
+ if (this.attribute('fx').hasValue()) {
1889
+ fx = (this.gradientUnits() == 'objectBoundingBox'
1890
+ ? bb.x() + bb.width() * this.attribute('fx').numValue()
1891
+ : this.attribute('fx').toPixels('x'));
1892
+ }
1893
+ if (this.attribute('fy').hasValue()) {
1894
+ fy = (this.gradientUnits() == 'objectBoundingBox'
1895
+ ? bb.y() + bb.height() * this.attribute('fy').numValue()
1896
+ : this.attribute('fy').toPixels('y'));
1897
+ }
1898
+
1899
+ var r = (this.gradientUnits() == 'objectBoundingBox'
1900
+ ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
1901
+ : this.attribute('r').toPixels());
1902
+
1903
+ return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
1904
+ }
1905
+ }
1906
+ svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
1907
+
1908
+ // gradient stop element
1909
+ svg.Element.stop = function(node) {
1910
+ this.base = svg.Element.ElementBase;
1911
+ this.base(node);
1912
+
1913
+ this.offset = this.attribute('offset').numValue();
1914
+ if (this.offset < 0) this.offset = 0;
1915
+ if (this.offset > 1) this.offset = 1;
1916
+
1917
+ var stopColor = this.style('stop-color', true);
1918
+ if (stopColor.value === '') stopColor.value = '#000';
1919
+ if (this.style('stop-opacity').hasValue()) stopColor = stopColor.addOpacity(this.style('stop-opacity'));
1920
+ this.color = stopColor.value;
1921
+ }
1922
+ svg.Element.stop.prototype = new svg.Element.ElementBase;
1923
+
1924
+ // animation base element
1925
+ svg.Element.AnimateBase = function(node) {
1926
+ this.base = svg.Element.ElementBase;
1927
+ this.base(node);
1928
+
1929
+ svg.Animations.push(this);
1930
+
1931
+ this.duration = 0.0;
1932
+ this.begin = this.attribute('begin').toMilliseconds();
1933
+ this.maxDuration = this.begin + this.attribute('dur').toMilliseconds();
1934
+
1935
+ this.getProperty = function() {
1936
+ var attributeType = this.attribute('attributeType').value;
1937
+ var attributeName = this.attribute('attributeName').value;
1938
+
1939
+ if (attributeType == 'CSS') {
1940
+ return this.parent.style(attributeName, true);
1941
+ }
1942
+ return this.parent.attribute(attributeName, true);
1943
+ };
1944
+
1945
+ this.initialValue = null;
1946
+ this.initialUnits = '';
1947
+ this.removed = false;
1948
+
1949
+ this.calcValue = function() {
1950
+ // OVERRIDE ME!
1951
+ return '';
1952
+ }
1953
+
1954
+ this.update = function(delta) {
1955
+ // set initial value
1956
+ if (this.initialValue == null) {
1957
+ this.initialValue = this.getProperty().value;
1958
+ this.initialUnits = this.getProperty().getUnits();
1959
+ }
1960
+
1961
+ // if we're past the end time
1962
+ if (this.duration > this.maxDuration) {
1963
+ // loop for indefinitely repeating animations
1964
+ if (this.attribute('repeatCount').value == 'indefinite'
1965
+ || this.attribute('repeatDur').value == 'indefinite') {
1966
+ this.duration = 0.0
1967
+ }
1968
+ else if (this.attribute('fill').valueOrDefault('remove') == 'freeze' && !this.frozen) {
1969
+ this.frozen = true;
1970
+ this.parent.animationFrozen = true;
1971
+ this.parent.animationFrozenValue = this.getProperty().value;
1972
+ }
1973
+ else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) {
1974
+ this.removed = true;
1975
+ this.getProperty().value = this.parent.animationFrozen ? this.parent.animationFrozenValue : this.initialValue;
1976
+ return true;
1977
+ }
1978
+ return false;
1979
+ }
1980
+ this.duration = this.duration + delta;
1981
+
1982
+ // if we're past the begin time
1983
+ var updated = false;
1984
+ if (this.begin < this.duration) {
1985
+ var newValue = this.calcValue(); // tween
1986
+
1987
+ if (this.attribute('type').hasValue()) {
1988
+ // for transform, etc.
1989
+ var type = this.attribute('type').value;
1990
+ newValue = type + '(' + newValue + ')';
1991
+ }
1992
+
1993
+ this.getProperty().value = newValue;
1994
+ updated = true;
1995
+ }
1996
+
1997
+ return updated;
1998
+ }
1999
+
2000
+ this.from = this.attribute('from');
2001
+ this.to = this.attribute('to');
2002
+ this.values = this.attribute('values');
2003
+ if (this.values.hasValue()) this.values.value = this.values.value.split(';');
2004
+
2005
+ // fraction of duration we've covered
2006
+ this.progress = function() {
2007
+ var ret = { progress: (this.duration - this.begin) / (this.maxDuration - this.begin) };
2008
+ if (this.values.hasValue()) {
2009
+ var p = ret.progress * (this.values.value.length - 1);
2010
+ var lb = Math.floor(p), ub = Math.ceil(p);
2011
+ ret.from = new svg.Property('from', parseFloat(this.values.value[lb]));
2012
+ ret.to = new svg.Property('to', parseFloat(this.values.value[ub]));
2013
+ ret.progress = (p - lb) / (ub - lb);
2014
+ }
2015
+ else {
2016
+ ret.from = this.from;
2017
+ ret.to = this.to;
2018
+ }
2019
+ return ret;
2020
+ }
2021
+ }
2022
+ svg.Element.AnimateBase.prototype = new svg.Element.ElementBase;
2023
+
2024
+ // animate element
2025
+ svg.Element.animate = function(node) {
2026
+ this.base = svg.Element.AnimateBase;
2027
+ this.base(node);
2028
+
2029
+ this.calcValue = function() {
2030
+ var p = this.progress();
2031
+
2032
+ // tween value linearly
2033
+ var newValue = p.from.numValue() + (p.to.numValue() - p.from.numValue()) * p.progress;
2034
+ return newValue + this.initialUnits;
2035
+ };
2036
+ }
2037
+ svg.Element.animate.prototype = new svg.Element.AnimateBase;
2038
+
2039
+ // animate color element
2040
+ svg.Element.animateColor = function(node) {
2041
+ this.base = svg.Element.AnimateBase;
2042
+ this.base(node);
2043
+
2044
+ this.calcValue = function() {
2045
+ var p = this.progress();
2046
+ var from = new RGBColor(p.from.value);
2047
+ var to = new RGBColor(p.to.value);
2048
+
2049
+ if (from.ok && to.ok) {
2050
+ // tween color linearly
2051
+ var r = from.r + (to.r - from.r) * p.progress;
2052
+ var g = from.g + (to.g - from.g) * p.progress;
2053
+ var b = from.b + (to.b - from.b) * p.progress;
2054
+ return 'rgb('+parseInt(r,10)+','+parseInt(g,10)+','+parseInt(b,10)+')';
2055
+ }
2056
+ return this.attribute('from').value;
2057
+ };
2058
+ }
2059
+ svg.Element.animateColor.prototype = new svg.Element.AnimateBase;
2060
+
2061
+ // animate transform element
2062
+ svg.Element.animateTransform = function(node) {
2063
+ this.base = svg.Element.AnimateBase;
2064
+ this.base(node);
2065
+
2066
+ this.calcValue = function() {
2067
+ var p = this.progress();
2068
+
2069
+ // tween value linearly
2070
+ var from = svg.ToNumberArray(p.from.value);
2071
+ var to = svg.ToNumberArray(p.to.value);
2072
+ var newValue = '';
2073
+ for (var i=0; i<from.length; i++) {
2074
+ newValue += from[i] + (to[i] - from[i]) * p.progress + ' ';
2075
+ }
2076
+ return newValue;
2077
+ };
2078
+ }
2079
+ svg.Element.animateTransform.prototype = new svg.Element.animate;
2080
+
2081
+ // font element
2082
+ svg.Element.font = function(node) {
2083
+ this.base = svg.Element.ElementBase;
2084
+ this.base(node);
2085
+
2086
+ this.horizAdvX = this.attribute('horiz-adv-x').numValue();
2087
+
2088
+ this.isRTL = false;
2089
+ this.isArabic = false;
2090
+ this.fontFace = null;
2091
+ this.missingGlyph = null;
2092
+ this.glyphs = [];
2093
+ for (var i=0; i<this.children.length; i++) {
2094
+ var child = this.children[i];
2095
+ if (child.type == 'font-face') {
2096
+ this.fontFace = child;
2097
+ if (child.style('font-family').hasValue()) {
2098
+ svg.Definitions[child.style('font-family').value] = this;
2099
+ }
2100
+ }
2101
+ else if (child.type == 'missing-glyph') this.missingGlyph = child;
2102
+ else if (child.type == 'glyph') {
2103
+ if (child.arabicForm != '') {
2104
+ this.isRTL = true;
2105
+ this.isArabic = true;
2106
+ if (typeof this.glyphs[child.unicode] == 'undefined') this.glyphs[child.unicode] = [];
2107
+ this.glyphs[child.unicode][child.arabicForm] = child;
2108
+ }
2109
+ else {
2110
+ this.glyphs[child.unicode] = child;
2111
+ }
2112
+ }
2113
+ }
2114
+ }
2115
+ svg.Element.font.prototype = new svg.Element.ElementBase;
2116
+
2117
+ // font-face element
2118
+ svg.Element.fontface = function(node) {
2119
+ this.base = svg.Element.ElementBase;
2120
+ this.base(node);
2121
+
2122
+ this.ascent = this.attribute('ascent').value;
2123
+ this.descent = this.attribute('descent').value;
2124
+ this.unitsPerEm = this.attribute('units-per-em').numValue();
2125
+ }
2126
+ svg.Element.fontface.prototype = new svg.Element.ElementBase;
2127
+
2128
+ // missing-glyph element
2129
+ svg.Element.missingglyph = function(node) {
2130
+ this.base = svg.Element.path;
2131
+ this.base(node);
2132
+
2133
+ this.horizAdvX = 0;
2134
+ }
2135
+ svg.Element.missingglyph.prototype = new svg.Element.path;
2136
+
2137
+ // glyph element
2138
+ svg.Element.glyph = function(node) {
2139
+ this.base = svg.Element.path;
2140
+ this.base(node);
2141
+
2142
+ this.horizAdvX = this.attribute('horiz-adv-x').numValue();
2143
+ this.unicode = this.attribute('unicode').value;
2144
+ this.arabicForm = this.attribute('arabic-form').value;
2145
+ }
2146
+ svg.Element.glyph.prototype = new svg.Element.path;
2147
+
2148
+ // text element
2149
+ svg.Element.text = function(node) {
2150
+ this.captureTextNodes = true;
2151
+ this.base = svg.Element.RenderedElementBase;
2152
+ this.base(node);
2153
+
2154
+ this.baseSetContext = this.setContext;
2155
+ this.setContext = function(ctx) {
2156
+ this.baseSetContext(ctx);
2157
+
2158
+ var textBaseline = this.style('dominant-baseline').toTextBaseline();
2159
+ if (textBaseline == null) textBaseline = this.style('alignment-baseline').toTextBaseline();
2160
+ if (textBaseline != null) ctx.textBaseline = textBaseline;
2161
+ }
2162
+
2163
+ this.getBoundingBox = function () {
2164
+ var x = this.attribute('x').toPixels('x');
2165
+ var y = this.attribute('y').toPixels('y');
2166
+ var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2167
+ return new svg.BoundingBox(x, y - fontSize, x + Math.floor(fontSize * 2.0 / 3.0) * this.children[0].getText().length, y);
2168
+ }
2169
+
2170
+ this.renderChildren = function(ctx) {
2171
+ this.x = this.attribute('x').toPixels('x');
2172
+ this.y = this.attribute('y').toPixels('y');
2173
+ if (this.attribute('dx').hasValue()) this.x += this.attribute('dx').toPixels('x');
2174
+ if (this.attribute('dy').hasValue()) this.y += this.attribute('dy').toPixels('y');
2175
+ this.x += this.getAnchorDelta(ctx, this, 0);
2176
+ for (var i=0; i<this.children.length; i++) {
2177
+ this.renderChild(ctx, this, this, i);
2178
+ }
2179
+ }
2180
+
2181
+ this.getAnchorDelta = function (ctx, parent, startI) {
2182
+ var textAnchor = this.style('text-anchor').valueOrDefault('start');
2183
+ if (textAnchor != 'start') {
2184
+ var width = 0;
2185
+ for (var i=startI; i<parent.children.length; i++) {
2186
+ var child = parent.children[i];
2187
+ if (i > startI && child.attribute('x').hasValue()) break; // new group
2188
+ width += child.measureTextRecursive(ctx);
2189
+ }
2190
+ return -1 * (textAnchor == 'end' ? width : width / 2.0);
2191
+ }
2192
+ return 0;
2193
+ }
2194
+
2195
+ this.renderChild = function(ctx, textParent, parent, i) {
2196
+ var child = parent.children[i];
2197
+ if (child.attribute('x').hasValue()) {
2198
+ child.x = child.attribute('x').toPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
2199
+ if (child.attribute('dx').hasValue()) child.x += child.attribute('dx').toPixels('x');
2200
+ }
2201
+ else {
2202
+ if (child.attribute('dx').hasValue()) textParent.x += child.attribute('dx').toPixels('x');
2203
+ child.x = textParent.x;
2204
+ }
2205
+ textParent.x = child.x + child.measureText(ctx);
2206
+
2207
+ if (child.attribute('y').hasValue()) {
2208
+ child.y = child.attribute('y').toPixels('y');
2209
+ if (child.attribute('dy').hasValue()) child.y += child.attribute('dy').toPixels('y');
2210
+ }
2211
+ else {
2212
+ if (child.attribute('dy').hasValue()) textParent.y += child.attribute('dy').toPixels('y');
2213
+ child.y = textParent.y;
2214
+ }
2215
+ textParent.y = child.y;
2216
+
2217
+ child.render(ctx);
2218
+
2219
+ for (var i=0; i<child.children.length; i++) {
2220
+ textParent.renderChild(ctx, textParent, child, i);
2221
+ }
2222
+ }
2223
+ }
2224
+ svg.Element.text.prototype = new svg.Element.RenderedElementBase;
2225
+
2226
+ // text base
2227
+ svg.Element.TextElementBase = function(node) {
2228
+ this.base = svg.Element.RenderedElementBase;
2229
+ this.base(node);
2230
+
2231
+ this.getGlyph = function(font, text, i) {
2232
+ var c = text[i];
2233
+ var glyph = null;
2234
+ if (font.isArabic) {
2235
+ var arabicForm = 'isolated';
2236
+ if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal';
2237
+ if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial';
2238
+ if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial';
2239
+ if (typeof font.glyphs[c] != 'undefined') {
2240
+ glyph = font.glyphs[c][arabicForm];
2241
+ if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
2242
+ }
2243
+ }
2244
+ else {
2245
+ glyph = font.glyphs[c];
2246
+ }
2247
+ if (glyph == null) glyph = font.missingGlyph;
2248
+ return glyph;
2249
+ }
2250
+
2251
+ this.renderChildren = function(ctx) {
2252
+ var customFont = this.parent.style('font-family').getDefinition();
2253
+ if (customFont != null) {
2254
+ var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2255
+ var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
2256
+ var text = this.getText();
2257
+ if (customFont.isRTL) text = text.split("").reverse().join("");
2258
+
2259
+ var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2260
+ for (var i=0; i<text.length; i++) {
2261
+ var glyph = this.getGlyph(customFont, text, i);
2262
+ var scale = fontSize / customFont.fontFace.unitsPerEm;
2263
+ ctx.translate(this.x, this.y);
2264
+ ctx.scale(scale, -scale);
2265
+ var lw = ctx.lineWidth;
2266
+ ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
2267
+ if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
2268
+ glyph.render(ctx);
2269
+ if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
2270
+ ctx.lineWidth = lw;
2271
+ ctx.scale(1/scale, -1/scale);
2272
+ ctx.translate(-this.x, -this.y);
2273
+
2274
+ this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
2275
+ if (typeof dx[i] != 'undefined' && !isNaN(dx[i])) {
2276
+ this.x += dx[i];
2277
+ }
2278
+ }
2279
+ return;
2280
+ }
2281
+
2282
+ if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
2283
+ if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
2284
+ }
2285
+
2286
+ this.getText = function() {
2287
+ // OVERRIDE ME
2288
+ }
2289
+
2290
+ this.measureTextRecursive = function(ctx) {
2291
+ var width = this.measureText(ctx);
2292
+ for (var i=0; i<this.children.length; i++) {
2293
+ width += this.children[i].measureTextRecursive(ctx);
2294
+ }
2295
+ return width;
2296
+ }
2297
+
2298
+ this.measureText = function(ctx) {
2299
+ var customFont = this.parent.style('font-family').getDefinition();
2300
+ if (customFont != null) {
2301
+ var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2302
+ var measure = 0;
2303
+ var text = this.getText();
2304
+ if (customFont.isRTL) text = text.split("").reverse().join("");
2305
+ var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2306
+ for (var i=0; i<text.length; i++) {
2307
+ var glyph = this.getGlyph(customFont, text, i);
2308
+ measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
2309
+ if (typeof dx[i] != 'undefined' && !isNaN(dx[i])) {
2310
+ measure += dx[i];
2311
+ }
2312
+ }
2313
+ return measure;
2314
+ }
2315
+
2316
+ var textToMeasure = svg.compressSpaces(this.getText());
2317
+ if (!ctx.measureText) return textToMeasure.length * 10;
2318
+
2319
+ ctx.save();
2320
+ this.setContext(ctx);
2321
+ var width = ctx.measureText(textToMeasure).width;
2322
+ ctx.restore();
2323
+ return width;
2324
+ }
2325
+ }
2326
+ svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase;
2327
+
2328
+ // tspan
2329
+ svg.Element.tspan = function(node) {
2330
+ this.captureTextNodes = true;
2331
+ this.base = svg.Element.TextElementBase;
2332
+ this.base(node);
2333
+
2334
+ this.text = svg.compressSpaces(node.value || node.text || node.textContent || '');
2335
+ this.getText = function() {
2336
+ // if this node has children, then they own the text
2337
+ if (this.children.length > 0) { return ''; }
2338
+ return this.text;
2339
+ }
2340
+ }
2341
+ svg.Element.tspan.prototype = new svg.Element.TextElementBase;
2342
+
2343
+ // tref
2344
+ svg.Element.tref = function(node) {
2345
+ this.base = svg.Element.TextElementBase;
2346
+ this.base(node);
2347
+
2348
+ this.getText = function() {
2349
+ var element = this.getHrefAttribute().getDefinition();
2350
+ if (element != null) return element.children[0].getText();
2351
+ }
2352
+ }
2353
+ svg.Element.tref.prototype = new svg.Element.TextElementBase;
2354
+
2355
+ // a element
2356
+ svg.Element.a = function(node) {
2357
+ this.base = svg.Element.TextElementBase;
2358
+ this.base(node);
2359
+
2360
+ this.hasText = node.childNodes.length > 0;
2361
+ for (var i=0; i<node.childNodes.length; i++) {
2362
+ if (node.childNodes[i].nodeType != 3) this.hasText = false;
2363
+ }
2364
+
2365
+ // this might contain text
2366
+ this.text = this.hasText ? node.childNodes[0].value : '';
2367
+ this.getText = function() {
2368
+ return this.text;
2369
+ }
2370
+
2371
+ this.baseRenderChildren = this.renderChildren;
2372
+ this.renderChildren = function(ctx) {
2373
+ if (this.hasText) {
2374
+ // render as text element
2375
+ this.baseRenderChildren(ctx);
2376
+ var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
2377
+ svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.toPixels('y'), this.x + this.measureText(ctx), this.y));
2378
+ }
2379
+ else if (this.children.length > 0) {
2380
+ // render as temporary group
2381
+ var g = new svg.Element.g();
2382
+ g.children = this.children;
2383
+ g.parent = this;
2384
+ g.render(ctx);
2385
+ }
2386
+ }
2387
+
2388
+ this.onclick = function() {
2389
+ window.open(this.getHrefAttribute().value);
2390
+ }
2391
+
2392
+ this.onmousemove = function() {
2393
+ svg.ctx.canvas.style.cursor = 'pointer';
2394
+ }
2395
+ }
2396
+ svg.Element.a.prototype = new svg.Element.TextElementBase;
2397
+
2398
+ // image element
2399
+ svg.Element.image = function(node) {
2400
+ this.base = svg.Element.RenderedElementBase;
2401
+ this.base(node);
2402
+
2403
+ var href = this.getHrefAttribute().value;
2404
+ if (href == '') { return; }
2405
+ var isSvg = href.match(/\.svg$/)
2406
+
2407
+ svg.Images.push(this);
2408
+ this.loaded = false;
2409
+ if (!isSvg) {
2410
+ this.img = document.createElement('img');
2411
+ if (svg.opts['useCORS'] == true) { this.img.crossOrigin = 'Anonymous'; }
2412
+ var self = this;
2413
+ this.img.onload = function() { self.loaded = true; }
2414
+ this.img.onerror = function() { svg.log('ERROR: image "' + href + '" not found'); self.loaded = true; }
2415
+ this.img.src = href;
2416
+ }
2417
+ else {
2418
+ this.img = svg.ajax(href);
2419
+ this.loaded = true;
2420
+ }
2421
+
2422
+ this.renderChildren = function(ctx) {
2423
+ var x = this.attribute('x').toPixels('x');
2424
+ var y = this.attribute('y').toPixels('y');
2425
+
2426
+ var width = this.attribute('width').toPixels('x');
2427
+ var height = this.attribute('height').toPixels('y');
2428
+ if (width == 0 || height == 0) return;
2429
+
2430
+ ctx.save();
2431
+ if (isSvg) {
2432
+ ctx.drawSvg(this.img, x, y, width, height);
2433
+ }
2434
+ else {
2435
+ ctx.translate(x, y);
2436
+ svg.AspectRatio(ctx,
2437
+ this.attribute('preserveAspectRatio').value,
2438
+ width,
2439
+ this.img.width,
2440
+ height,
2441
+ this.img.height,
2442
+ 0,
2443
+ 0);
2444
+ ctx.drawImage(this.img, 0, 0);
2445
+ }
2446
+ ctx.restore();
2447
+ }
2448
+
2449
+ this.getBoundingBox = function() {
2450
+ var x = this.attribute('x').toPixels('x');
2451
+ var y = this.attribute('y').toPixels('y');
2452
+ var width = this.attribute('width').toPixels('x');
2453
+ var height = this.attribute('height').toPixels('y');
2454
+ return new svg.BoundingBox(x, y, x + width, y + height);
2455
+ }
2456
+ }
2457
+ svg.Element.image.prototype = new svg.Element.RenderedElementBase;
2458
+
2459
+ // group element
2460
+ svg.Element.g = function(node) {
2461
+ this.base = svg.Element.RenderedElementBase;
2462
+ this.base(node);
2463
+
2464
+ this.getBoundingBox = function() {
2465
+ var bb = new svg.BoundingBox();
2466
+ for (var i=0; i<this.children.length; i++) {
2467
+ bb.addBoundingBox(this.children[i].getBoundingBox());
2468
+ }
2469
+ return bb;
2470
+ };
2471
+ }
2472
+ svg.Element.g.prototype = new svg.Element.RenderedElementBase;
2473
+
2474
+ // symbol element
2475
+ svg.Element.symbol = function(node) {
2476
+ this.base = svg.Element.RenderedElementBase;
2477
+ this.base(node);
2478
+
2479
+ this.render = function(ctx) {
2480
+ // NO RENDER
2481
+ };
2482
+ }
2483
+ svg.Element.symbol.prototype = new svg.Element.RenderedElementBase;
2484
+
2485
+ // style element
2486
+ svg.Element.style = function(node) {
2487
+ this.base = svg.Element.ElementBase;
2488
+ this.base(node);
2489
+
2490
+ // text, or spaces then CDATA
2491
+ var css = ''
2492
+ for (var i=0; i<node.childNodes.length; i++) {
2493
+ css += node.childNodes[i].data;
2494
+ }
2495
+ css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
2496
+ css = svg.compressSpaces(css); // replace whitespace
2497
+ var cssDefs = css.split('}');
2498
+ for (var i=0; i<cssDefs.length; i++) {
2499
+ if (svg.trim(cssDefs[i]) != '') {
2500
+ var cssDef = cssDefs[i].split('{');
2501
+ var cssClasses = cssDef[0].split(',');
2502
+ var cssProps = cssDef[1].split(';');
2503
+ for (var j=0; j<cssClasses.length; j++) {
2504
+ var cssClass = svg.trim(cssClasses[j]);
2505
+ if (cssClass != '') {
2506
+ var props = svg.Styles[cssClass] || {};
2507
+ for (var k=0; k<cssProps.length; k++) {
2508
+ var prop = cssProps[k].indexOf(':');
2509
+ var name = cssProps[k].substr(0, prop);
2510
+ var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
2511
+ if (name != null && value != null) {
2512
+ props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
2513
+ }
2514
+ }
2515
+ svg.Styles[cssClass] = props;
2516
+ svg.StylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
2517
+ if (cssClass == '@font-face') {
2518
+ var fontFamily = props['font-family'].value.replace(/"/g,'');
2519
+ var srcs = props['src'].value.split(',');
2520
+ for (var s=0; s<srcs.length; s++) {
2521
+ if (srcs[s].indexOf('format("svg")') > 0) {
2522
+ var urlStart = srcs[s].indexOf('url');
2523
+ var urlEnd = srcs[s].indexOf(')', urlStart);
2524
+ var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
2525
+ var doc = svg.parseXml(svg.ajax(url));
2526
+ var fonts = doc.getElementsByTagName('font');
2527
+ for (var f=0; f<fonts.length; f++) {
2528
+ var font = svg.CreateElement(fonts[f]);
2529
+ svg.Definitions[fontFamily] = font;
2530
+ }
2531
+ }
2532
+ }
2533
+ }
2534
+ }
2535
+ }
2536
+ }
2537
+ }
2538
+ }
2539
+ svg.Element.style.prototype = new svg.Element.ElementBase;
2540
+
2541
+ // use element
2542
+ svg.Element.use = function(node) {
2543
+ this.base = svg.Element.RenderedElementBase;
2544
+ this.base(node);
2545
+
2546
+ this.baseSetContext = this.setContext;
2547
+ this.setContext = function(ctx) {
2548
+ this.baseSetContext(ctx);
2549
+ if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').toPixels('x'), 0);
2550
+ if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').toPixels('y'));
2551
+ }
2552
+
2553
+ var element = this.getHrefAttribute().getDefinition();
2554
+
2555
+ this.path = function(ctx) {
2556
+ if (element != null) element.path(ctx);
2557
+ }
2558
+
2559
+ this.getBoundingBox = function() {
2560
+ if (element != null) return element.getBoundingBox();
2561
+ }
2562
+
2563
+ this.renderChildren = function(ctx) {
2564
+ if (element != null) {
2565
+ var tempSvg = element;
2566
+ if (element.type == 'symbol') {
2567
+ // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
2568
+ tempSvg = new svg.Element.svg();
2569
+ tempSvg.type = 'svg';
2570
+ tempSvg.attributes['viewBox'] = new svg.Property('viewBox', element.attribute('viewBox').value);
2571
+ tempSvg.attributes['preserveAspectRatio'] = new svg.Property('preserveAspectRatio', element.attribute('preserveAspectRatio').value);
2572
+ tempSvg.attributes['overflow'] = new svg.Property('overflow', element.attribute('overflow').value);
2573
+ tempSvg.children = element.children;
2574
+ }
2575
+ if (tempSvg.type == 'svg') {
2576
+ // if symbol or svg, inherit width/height from me
2577
+ if (this.attribute('width').hasValue()) tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value);
2578
+ if (this.attribute('height').hasValue()) tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value);
2579
+ }
2580
+ var oldParent = tempSvg.parent;
2581
+ tempSvg.parent = null;
2582
+ tempSvg.render(ctx);
2583
+ tempSvg.parent = oldParent;
2584
+ }
2585
+ }
2586
+ }
2587
+ svg.Element.use.prototype = new svg.Element.RenderedElementBase;
2588
+
2589
+ // mask element
2590
+ svg.Element.mask = function(node) {
2591
+ this.base = svg.Element.ElementBase;
2592
+ this.base(node);
2593
+
2594
+ this.apply = function(ctx, element) {
2595
+ // render as temp svg
2596
+ var x = this.attribute('x').toPixels('x');
2597
+ var y = this.attribute('y').toPixels('y');
2598
+ var width = this.attribute('width').toPixels('x');
2599
+ var height = this.attribute('height').toPixels('y');
2600
+
2601
+ if (width == 0 && height == 0) {
2602
+ var bb = new svg.BoundingBox();
2603
+ for (var i=0; i<this.children.length; i++) {
2604
+ bb.addBoundingBox(this.children[i].getBoundingBox());
2605
+ }
2606
+ var x = Math.floor(bb.x1);
2607
+ var y = Math.floor(bb.y1);
2608
+ var width = Math.floor(bb.width());
2609
+ var height = Math.floor(bb.height());
2610
+ }
2611
+
2612
+ // temporarily remove mask to avoid recursion
2613
+ var mask = element.attribute('mask').value;
2614
+ element.attribute('mask').value = '';
2615
+
2616
+ var cMask = document.createElement('canvas');
2617
+ cMask.width = x + width;
2618
+ cMask.height = y + height;
2619
+ var maskCtx = cMask.getContext('2d');
2620
+ this.renderChildren(maskCtx);
2621
+
2622
+ var c = document.createElement('canvas');
2623
+ c.width = x + width;
2624
+ c.height = y + height;
2625
+ var tempCtx = c.getContext('2d');
2626
+ element.render(tempCtx);
2627
+ tempCtx.globalCompositeOperation = 'destination-in';
2628
+ tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat');
2629
+ tempCtx.fillRect(0, 0, x + width, y + height);
2630
+
2631
+ ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat');
2632
+ ctx.fillRect(0, 0, x + width, y + height);
2633
+
2634
+ // reassign mask
2635
+ element.attribute('mask').value = mask;
2636
+ }
2637
+
2638
+ this.render = function(ctx) {
2639
+ // NO RENDER
2640
+ }
2641
+ }
2642
+ svg.Element.mask.prototype = new svg.Element.ElementBase;
2643
+
2644
+ // clip element
2645
+ svg.Element.clipPath = function(node) {
2646
+ this.base = svg.Element.ElementBase;
2647
+ this.base(node);
2648
+
2649
+ this.apply = function(ctx) {
2650
+ var oldBeginPath = CanvasRenderingContext2D.prototype.beginPath;
2651
+ CanvasRenderingContext2D.prototype.beginPath = function () { };
2652
+
2653
+ var oldClosePath = CanvasRenderingContext2D.prototype.closePath;
2654
+ CanvasRenderingContext2D.prototype.closePath = function () { };
2655
+
2656
+ oldBeginPath.call(ctx);
2657
+ for (var i=0; i<this.children.length; i++) {
2658
+ var child = this.children[i];
2659
+ if (typeof child.path != 'undefined') {
2660
+ var transform = null;
2661
+ if (child.style('transform', false, true).hasValue()) {
2662
+ transform = new svg.Transform(child.style('transform', false, true).value);
2663
+ transform.apply(ctx);
2664
+ }
2665
+ child.path(ctx);
2666
+ CanvasRenderingContext2D.prototype.closePath = oldClosePath;
2667
+ if (transform) { transform.unapply(ctx); }
2668
+ }
2669
+ }
2670
+ oldClosePath.call(ctx);
2671
+ ctx.clip();
2672
+
2673
+ CanvasRenderingContext2D.prototype.beginPath = oldBeginPath;
2674
+ CanvasRenderingContext2D.prototype.closePath = oldClosePath;
2675
+ }
2676
+
2677
+ this.render = function(ctx) {
2678
+ // NO RENDER
2679
+ }
2680
+ }
2681
+ svg.Element.clipPath.prototype = new svg.Element.ElementBase;
2682
+
2683
+ // filters
2684
+ svg.Element.filter = function(node) {
2685
+ this.base = svg.Element.ElementBase;
2686
+ this.base(node);
2687
+
2688
+ this.apply = function(ctx, element) {
2689
+ // render as temp svg
2690
+ var bb = element.getBoundingBox();
2691
+ var x = Math.floor(bb.x1);
2692
+ var y = Math.floor(bb.y1);
2693
+ var width = Math.floor(bb.width());
2694
+ var height = Math.floor(bb.height());
2695
+
2696
+ // temporarily remove filter to avoid recursion
2697
+ var filter = element.style('filter').value;
2698
+ element.style('filter').value = '';
2699
+
2700
+ var px = 0, py = 0;
2701
+ for (var i=0; i<this.children.length; i++) {
2702
+ var efd = this.children[i].extraFilterDistance || 0;
2703
+ px = Math.max(px, efd);
2704
+ py = Math.max(py, efd);
2705
+ }
2706
+
2707
+ var c = document.createElement('canvas');
2708
+ c.width = width + 2*px;
2709
+ c.height = height + 2*py;
2710
+ var tempCtx = c.getContext('2d');
2711
+ tempCtx.translate(-x + px, -y + py);
2712
+ element.render(tempCtx);
2713
+
2714
+ // apply filters
2715
+ for (var i=0; i<this.children.length; i++) {
2716
+ if (typeof this.children[i].apply == 'function') {
2717
+ this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py);
2718
+ }
2719
+ }
2720
+
2721
+ // render on me
2722
+ ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py);
2723
+
2724
+ // reassign filter
2725
+ element.style('filter', true).value = filter;
2726
+ }
2727
+
2728
+ this.render = function(ctx) {
2729
+ // NO RENDER
2730
+ }
2731
+ }
2732
+ svg.Element.filter.prototype = new svg.Element.ElementBase;
2733
+
2734
+ svg.Element.feMorphology = function(node) {
2735
+ this.base = svg.Element.ElementBase;
2736
+ this.base(node);
2737
+
2738
+ this.apply = function(ctx, x, y, width, height) {
2739
+ // TODO: implement
2740
+ }
2741
+ }
2742
+ svg.Element.feMorphology.prototype = new svg.Element.ElementBase;
2743
+
2744
+ svg.Element.feComposite = function(node) {
2745
+ this.base = svg.Element.ElementBase;
2746
+ this.base(node);
2747
+
2748
+ this.apply = function(ctx, x, y, width, height) {
2749
+ // TODO: implement
2750
+ }
2751
+ }
2752
+ svg.Element.feComposite.prototype = new svg.Element.ElementBase;
2753
+
2754
+ svg.Element.feColorMatrix = function(node) {
2755
+ this.base = svg.Element.ElementBase;
2756
+ this.base(node);
2757
+
2758
+ var matrix = svg.ToNumberArray(this.attribute('values').value);
2759
+ switch (this.attribute('type').valueOrDefault('matrix')) { // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
2760
+ case 'saturate':
2761
+ var s = matrix[0];
2762
+ matrix = [0.213+0.787*s,0.715-0.715*s,0.072-0.072*s,0,0,
2763
+ 0.213-0.213*s,0.715+0.285*s,0.072-0.072*s,0,0,
2764
+ 0.213-0.213*s,0.715-0.715*s,0.072+0.928*s,0,0,
2765
+ 0,0,0,1,0,
2766
+ 0,0,0,0,1];
2767
+ break;
2768
+ case 'hueRotate':
2769
+ var a = matrix[0] * Math.PI / 180.0;
2770
+ var c = function (m1,m2,m3) { return m1 + Math.cos(a)*m2 + Math.sin(a)*m3; };
2771
+ matrix = [c(0.213,0.787,-0.213),c(0.715,-0.715,-0.715),c(0.072,-0.072,0.928),0,0,
2772
+ c(0.213,-0.213,0.143),c(0.715,0.285,0.140),c(0.072,-0.072,-0.283),0,0,
2773
+ c(0.213,-0.213,-0.787),c(0.715,-0.715,0.715),c(0.072,0.928,0.072),0,0,
2774
+ 0,0,0,1,0,
2775
+ 0,0,0,0,1];
2776
+ break;
2777
+ case 'luminanceToAlpha':
2778
+ matrix = [0,0,0,0,0,
2779
+ 0,0,0,0,0,
2780
+ 0,0,0,0,0,
2781
+ 0.2125,0.7154,0.0721,0,0,
2782
+ 0,0,0,0,1];
2783
+ break;
2784
+ }
2785
+
2786
+ function imGet(img, x, y, width, height, rgba) {
2787
+ return img[y*width*4 + x*4 + rgba];
2788
+ }
2789
+
2790
+ function imSet(img, x, y, width, height, rgba, val) {
2791
+ img[y*width*4 + x*4 + rgba] = val;
2792
+ }
2793
+
2794
+ function m(i, v) {
2795
+ var mi = matrix[i];
2796
+ return mi * (mi < 0 ? v - 255 : v);
2797
+ }
2798
+
2799
+ this.apply = function(ctx, x, y, width, height) {
2800
+ // assuming x==0 && y==0 for now
2801
+ var srcData = ctx.getImageData(0, 0, width, height);
2802
+ for (var y = 0; y < height; y++) {
2803
+ for (var x = 0; x < width; x++) {
2804
+ var r = imGet(srcData.data, x, y, width, height, 0);
2805
+ var g = imGet(srcData.data, x, y, width, height, 1);
2806
+ var b = imGet(srcData.data, x, y, width, height, 2);
2807
+ var a = imGet(srcData.data, x, y, width, height, 3);
2808
+ imSet(srcData.data, x, y, width, height, 0, m(0,r)+m(1,g)+m(2,b)+m(3,a)+m(4,1));
2809
+ imSet(srcData.data, x, y, width, height, 1, m(5,r)+m(6,g)+m(7,b)+m(8,a)+m(9,1));
2810
+ imSet(srcData.data, x, y, width, height, 2, m(10,r)+m(11,g)+m(12,b)+m(13,a)+m(14,1));
2811
+ imSet(srcData.data, x, y, width, height, 3, m(15,r)+m(16,g)+m(17,b)+m(18,a)+m(19,1));
2812
+ }
2813
+ }
2814
+ ctx.clearRect(0, 0, width, height);
2815
+ ctx.putImageData(srcData, 0, 0);
2816
+ }
2817
+ }
2818
+ svg.Element.feColorMatrix.prototype = new svg.Element.ElementBase;
2819
+
2820
+ svg.Element.feGaussianBlur = function(node) {
2821
+ this.base = svg.Element.ElementBase;
2822
+ this.base(node);
2823
+
2824
+ this.blurRadius = Math.floor(this.attribute('stdDeviation').numValue());
2825
+ this.extraFilterDistance = this.blurRadius;
2826
+
2827
+ this.apply = function(ctx, x, y, width, height) {
2828
+ if (typeof stackBlur.canvasRGBA == 'undefined') {
2829
+ svg.log('ERROR: StackBlur.js must be included for blur to work');
2830
+ return;
2831
+ }
2832
+
2833
+ // StackBlur requires canvas be on document
2834
+ ctx.canvas.id = svg.UniqueId();
2835
+ ctx.canvas.style.display = 'none';
2836
+ document.body.appendChild(ctx.canvas);
2837
+ stackBlur.canvasRGBA(ctx.canvas.id, x, y, width, height, this.blurRadius);
2838
+ document.body.removeChild(ctx.canvas);
2839
+ }
2840
+ }
2841
+ svg.Element.feGaussianBlur.prototype = new svg.Element.ElementBase;
2842
+
2843
+ // title element, do nothing
2844
+ svg.Element.title = function(node) {
2845
+ }
2846
+ svg.Element.title.prototype = new svg.Element.ElementBase;
2847
+
2848
+ // desc element, do nothing
2849
+ svg.Element.desc = function(node) {
2850
+ }
2851
+ svg.Element.desc.prototype = new svg.Element.ElementBase;
2852
+
2853
+ svg.Element.MISSING = function(node) {
2854
+ svg.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.');
2855
+ }
2856
+ svg.Element.MISSING.prototype = new svg.Element.ElementBase;
2857
+
2858
+ // element factory
2859
+ svg.CreateElement = function(node) {
2860
+ var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace
2861
+ className = className.replace(/\-/g,''); // remove dashes
2862
+ var e = null;
2863
+ if (typeof svg.Element[className] != 'undefined') {
2864
+ e = new svg.Element[className](node);
2865
+ }
2866
+ else {
2867
+ e = new svg.Element.MISSING(node);
2868
+ }
2869
+
2870
+ e.type = node.nodeName;
2871
+ return e;
2872
+ }
2873
+
2874
+ // load from url
2875
+ svg.load = function(ctx, url) {
2876
+ svg.loadXml(ctx, svg.ajax(url));
2877
+ }
2878
+
2879
+ // load from xml
2880
+ svg.loadXml = function(ctx, xml) {
2881
+ svg.loadXmlDoc(ctx, svg.parseXml(xml));
2882
+ }
2883
+
2884
+ svg.loadXmlDoc = function(ctx, dom) {
2885
+ svg.init(ctx);
2886
+
2887
+ var mapXY = function(p) {
2888
+ var e = ctx.canvas;
2889
+ while (e) {
2890
+ p.x -= e.offsetLeft;
2891
+ p.y -= e.offsetTop;
2892
+ e = e.offsetParent;
2893
+ }
2894
+ if (window.scrollX) p.x += window.scrollX;
2895
+ if (window.scrollY) p.y += window.scrollY;
2896
+ return p;
2897
+ }
2898
+
2899
+ // bind mouse
2900
+ if (svg.opts['ignoreMouse'] != true) {
2901
+ ctx.canvas.onclick = function(e) {
2902
+ var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2903
+ svg.Mouse.onclick(p.x, p.y);
2904
+ };
2905
+ ctx.canvas.onmousemove = function(e) {
2906
+ var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2907
+ svg.Mouse.onmousemove(p.x, p.y);
2908
+ };
2909
+ }
2910
+
2911
+ var e = svg.CreateElement(dom.documentElement);
2912
+ e.root = true;
2913
+ e.addStylesFromStyleDefinition();
2914
+
2915
+ // render loop
2916
+ var isFirstRender = true;
2917
+ var draw = function() {
2918
+ svg.ViewPort.Clear();
2919
+ if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);
2920
+
2921
+ if (svg.opts['ignoreDimensions'] != true) {
2922
+ // set canvas size
2923
+ if (e.style('width').hasValue()) {
2924
+ ctx.canvas.width = e.style('width').toPixels('x');
2925
+ ctx.canvas.style.width = ctx.canvas.width + 'px';
2926
+ }
2927
+ if (e.style('height').hasValue()) {
2928
+ ctx.canvas.height = e.style('height').toPixels('y');
2929
+ ctx.canvas.style.height = ctx.canvas.height + 'px';
2930
+ }
2931
+ }
2932
+ var cWidth = ctx.canvas.clientWidth || ctx.canvas.width;
2933
+ var cHeight = ctx.canvas.clientHeight || ctx.canvas.height;
2934
+ if (svg.opts['ignoreDimensions'] == true && e.style('width').hasValue() && e.style('height').hasValue()) {
2935
+ cWidth = e.style('width').toPixels('x');
2936
+ cHeight = e.style('height').toPixels('y');
2937
+ }
2938
+ svg.ViewPort.SetCurrent(cWidth, cHeight);
2939
+
2940
+ if (svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX'];
2941
+ if (svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY'];
2942
+ if (svg.opts['scaleWidth'] != null || svg.opts['scaleHeight'] != null) {
2943
+ var xRatio = null, yRatio = null, viewBox = svg.ToNumberArray(e.attribute('viewBox').value);
2944
+
2945
+ if (svg.opts['scaleWidth'] != null) {
2946
+ if (e.attribute('width').hasValue()) xRatio = e.attribute('width').toPixels('x') / svg.opts['scaleWidth'];
2947
+ else if (!isNaN(viewBox[2])) xRatio = viewBox[2] / svg.opts['scaleWidth'];
2948
+ }
2949
+
2950
+ if (svg.opts['scaleHeight'] != null) {
2951
+ if (e.attribute('height').hasValue()) yRatio = e.attribute('height').toPixels('y') / svg.opts['scaleHeight'];
2952
+ else if (!isNaN(viewBox[3])) yRatio = viewBox[3] / svg.opts['scaleHeight'];
2953
+ }
2954
+
2955
+ if (xRatio == null) { xRatio = yRatio; }
2956
+ if (yRatio == null) { yRatio = xRatio; }
2957
+
2958
+ e.attribute('width', true).value = svg.opts['scaleWidth'];
2959
+ e.attribute('height', true).value = svg.opts['scaleHeight'];
2960
+ e.style('transform', true, true).value += ' scale('+(1.0/xRatio)+','+(1.0/yRatio)+')';
2961
+ }
2962
+
2963
+ // clear and render
2964
+ if (svg.opts['ignoreClear'] != true) {
2965
+ ctx.clearRect(0, 0, cWidth, cHeight);
2966
+ }
2967
+ e.render(ctx);
2968
+ if (isFirstRender) {
2969
+ isFirstRender = false;
2970
+ if (typeof svg.opts['renderCallback'] == 'function') svg.opts['renderCallback'](dom);
2971
+ }
2972
+ }
2973
+
2974
+ var waitingForImages = true;
2975
+ if (svg.ImagesLoaded()) {
2976
+ waitingForImages = false;
2977
+ draw();
2978
+ }
2979
+ svg.intervalID = setInterval(function() {
2980
+ var needUpdate = false;
2981
+
2982
+ if (waitingForImages && svg.ImagesLoaded()) {
2983
+ waitingForImages = false;
2984
+ needUpdate = true;
2985
+ }
2986
+
2987
+ // need update from mouse events?
2988
+ if (svg.opts['ignoreMouse'] != true) {
2989
+ needUpdate = needUpdate | svg.Mouse.hasEvents();
2990
+ }
2991
+
2992
+ // need update from animations?
2993
+ if (svg.opts['ignoreAnimation'] != true) {
2994
+ for (var i=0; i<svg.Animations.length; i++) {
2995
+ needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE);
2996
+ }
2997
+ }
2998
+
2999
+ // need update from redraw?
3000
+ if (typeof svg.opts['forceRedraw'] == 'function') {
3001
+ if (svg.opts['forceRedraw']() == true) needUpdate = true;
3002
+ }
3003
+
3004
+ // render if needed
3005
+ if (needUpdate) {
3006
+ draw();
3007
+ svg.Mouse.runEvents(); // run and clear our events
3008
+ }
3009
+ }, 1000 / svg.FRAMERATE);
3010
+ }
3011
+
3012
+ svg.stop = function() {
3013
+ if (svg.intervalID) {
3014
+ clearInterval(svg.intervalID);
3015
+ }
3016
+ }
3017
+
3018
+ svg.Mouse = new (function() {
3019
+ this.events = [];
3020
+ this.hasEvents = function() { return this.events.length != 0; }
3021
+
3022
+ this.onclick = function(x, y) {
3023
+ this.events.push({ type: 'onclick', x: x, y: y,
3024
+ run: function(e) { if (e.onclick) e.onclick(); }
3025
+ });
3026
+ }
3027
+
3028
+ this.onmousemove = function(x, y) {
3029
+ this.events.push({ type: 'onmousemove', x: x, y: y,
3030
+ run: function(e) { if (e.onmousemove) e.onmousemove(); }
3031
+ });
3032
+ }
3033
+
3034
+ this.eventElements = [];
3035
+
3036
+ this.checkPath = function(element, ctx) {
3037
+ for (var i=0; i<this.events.length; i++) {
3038
+ var e = this.events[i];
3039
+ if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element;
3040
+ }
3041
+ }
3042
+
3043
+ this.checkBoundingBox = function(element, bb) {
3044
+ for (var i=0; i<this.events.length; i++) {
3045
+ var e = this.events[i];
3046
+ if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element;
3047
+ }
3048
+ }
3049
+
3050
+ this.runEvents = function() {
3051
+ svg.ctx.canvas.style.cursor = '';
3052
+
3053
+ for (var i=0; i<this.events.length; i++) {
3054
+ var e = this.events[i];
3055
+ var element = this.eventElements[i];
3056
+ while (element) {
3057
+ e.run(element);
3058
+ element = element.parent;
3059
+ }
3060
+ }
3061
+
3062
+ // done running, clear
3063
+ this.events = [];
3064
+ this.eventElements = [];
3065
+ }
3066
+ });
3067
+
3068
+ return svg;
3069
+ };
3070
+
3071
+ if (typeof CanvasRenderingContext2D != 'undefined') {
3072
+ CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh, opts) {
3073
+ var cOpts = {
3074
+ ignoreMouse: true,
3075
+ ignoreAnimation: true,
3076
+ ignoreDimensions: true,
3077
+ ignoreClear: true,
3078
+ offsetX: dx,
3079
+ offsetY: dy,
3080
+ scaleWidth: dw,
3081
+ scaleHeight: dh
3082
+ }
3083
+
3084
+ for(var prop in opts) {
3085
+ if(opts.hasOwnProperty(prop)){
3086
+ cOpts[prop] = opts[prop];
3087
+ }
3088
+ }
3089
+ canvg(this.canvas, s, cOpts);
3090
+ }
3091
+ }
3092
+
3093
+ return canvg;
3094
+
3095
+ }));
inc/js/chosen.jquery.js CHANGED
@@ -1,1285 +1,1285 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
- };
162
-
163
- AbstractChosen.prototype.set_default_text = function() {
164
- if (this.form_field.getAttribute("data-placeholder")) {
165
- this.default_text = this.form_field.getAttribute("data-placeholder");
166
- } else if (this.is_multiple) {
167
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
- } else {
169
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
- }
171
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
- };
173
-
174
- AbstractChosen.prototype.choice_label = function(item) {
175
- if (this.include_group_label_in_selected && (item.group_label != null)) {
176
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
- } else {
178
- return item.html;
179
- }
180
- };
181
-
182
- AbstractChosen.prototype.mouse_enter = function() {
183
- return this.mouse_on_container = true;
184
- };
185
-
186
- AbstractChosen.prototype.mouse_leave = function() {
187
- return this.mouse_on_container = false;
188
- };
189
-
190
- AbstractChosen.prototype.input_focus = function(evt) {
191
- var _this = this;
192
- if (this.is_multiple) {
193
- if (!this.active_field) {
194
- return setTimeout((function() {
195
- return _this.container_mousedown();
196
- }), 50);
197
- }
198
- } else {
199
- if (!this.active_field) {
200
- return this.activate_field();
201
- }
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.input_blur = function(evt) {
206
- var _this = this;
207
- if (!this.mouse_on_container) {
208
- this.active_field = false;
209
- return setTimeout((function() {
210
- return _this.blur_test();
211
- }), 100);
212
- }
213
- };
214
-
215
- AbstractChosen.prototype.results_option_build = function(options) {
216
- var content, data, data_content, shown_results, _i, _len, _ref;
217
- content = '';
218
- shown_results = 0;
219
- _ref = this.results_data;
220
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
- data = _ref[_i];
222
- data_content = '';
223
- if (data.group) {
224
- data_content = this.result_add_group(data);
225
- } else {
226
- data_content = this.result_add_option(data);
227
- }
228
- if (data_content !== '') {
229
- shown_results++;
230
- content += data_content;
231
- }
232
- if (options != null ? options.first : void 0) {
233
- if (data.selected && this.is_multiple) {
234
- this.choice_build(data);
235
- } else if (data.selected && !this.is_multiple) {
236
- this.single_set_selected_text(this.choice_label(data));
237
- }
238
- }
239
- if (shown_results >= this.max_shown_results) {
240
- break;
241
- }
242
- }
243
- return content;
244
- };
245
-
246
- AbstractChosen.prototype.result_add_option = function(option) {
247
- var classes, option_el;
248
- if (!option.search_match) {
249
- return '';
250
- }
251
- if (!this.include_option_in_results(option)) {
252
- return '';
253
- }
254
- classes = [];
255
- if (!option.disabled && !(option.selected && this.is_multiple)) {
256
- classes.push("active-result");
257
- }
258
- if (option.disabled && !(option.selected && this.is_multiple)) {
259
- classes.push("disabled-result");
260
- }
261
- if (option.selected) {
262
- classes.push("result-selected");
263
- }
264
- if (option.group_array_index != null) {
265
- classes.push("group-option");
266
- }
267
- if (option.classes !== "") {
268
- classes.push(option.classes);
269
- }
270
- option_el = document.createElement("li");
271
- option_el.className = classes.join(" ");
272
- option_el.style.cssText = option.style;
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.search_text;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.search_text;
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var result, _i, _len, _ref, _results;
317
- _ref = this.results_data;
318
- _results = [];
319
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
- result = _ref[_i];
321
- if (result.selected) {
322
- _results.push(result.selected = false);
323
- } else {
324
- _results.push(void 0);
325
- }
326
- }
327
- return _results;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function() {
347
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
- this.no_results_clear();
349
- results = 0;
350
- searchText = this.get_search_text();
351
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
- zregex = new RegExp(escapedSearchText, 'i');
353
- regex = this.get_search_regex(escapedSearchText);
354
- _ref = this.results_data;
355
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
- option = _ref[_i];
357
- option.search_match = false;
358
- results_group = null;
359
- if (this.include_option_in_results(option)) {
360
- if (option.group) {
361
- option.group_match = false;
362
- option.active_options = 0;
363
- }
364
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
- results_group = this.results_data[option.group_array_index];
366
- if (results_group.active_options === 0 && results_group.search_match) {
367
- results += 1;
368
- }
369
- results_group.active_options += 1;
370
- }
371
- option.search_text = option.group ? option.label : option.html;
372
- if (!(option.group && !this.group_search)) {
373
- option.search_match = this.search_string_match(option.search_text, regex);
374
- if (option.search_match && !option.group) {
375
- results += 1;
376
- }
377
- if (option.search_match) {
378
- if (searchText.length) {
379
- startpos = option.search_text.search(zregex);
380
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
- }
383
- if (results_group != null) {
384
- results_group.group_match = true;
385
- }
386
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
- option.search_match = true;
388
- }
389
- }
390
- }
391
- }
392
- this.result_clear_highlight();
393
- if (results < 1 && searchText.length) {
394
- this.update_results_content("");
395
- return this.no_results(searchText);
396
- } else {
397
- this.update_results_content(this.results_option_build());
398
- return this.winnow_results_set_highlight();
399
- }
400
- };
401
-
402
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
- var regex_anchor;
404
- regex_anchor = this.search_contains ? "" : "^";
405
- return new RegExp(regex_anchor + escaped_search_string, 'i');
406
- };
407
-
408
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
- var part, parts, _i, _len;
410
- if (regex.test(search_string)) {
411
- return true;
412
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
- parts = search_string.replace(/\[|\]/g, "").split(" ");
414
- if (parts.length) {
415
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
- part = parts[_i];
417
- if (regex.test(part)) {
418
- return true;
419
- }
420
- }
421
- }
422
- }
423
- };
424
-
425
- AbstractChosen.prototype.choices_count = function() {
426
- var option, _i, _len, _ref;
427
- if (this.selected_option_count != null) {
428
- return this.selected_option_count;
429
- }
430
- this.selected_option_count = 0;
431
- _ref = this.form_field.options;
432
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
- option = _ref[_i];
434
- if (option.selected) {
435
- this.selected_option_count += 1;
436
- }
437
- }
438
- return this.selected_option_count;
439
- };
440
-
441
- AbstractChosen.prototype.choices_click = function(evt) {
442
- evt.preventDefault();
443
- if (!(this.results_showing || this.is_disabled)) {
444
- return this.results_show();
445
- }
446
- };
447
-
448
- AbstractChosen.prototype.keyup_checker = function(evt) {
449
- var stroke, _ref;
450
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
- this.search_field_scale();
452
- switch (stroke) {
453
- case 8:
454
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
- return this.keydown_backstroke();
456
- } else if (!this.pending_backstroke) {
457
- this.result_clear_highlight();
458
- return this.results_search();
459
- }
460
- break;
461
- case 13:
462
- evt.preventDefault();
463
- if (this.results_showing) {
464
- return this.result_select(evt);
465
- }
466
- break;
467
- case 27:
468
- if (this.results_showing) {
469
- this.results_hide();
470
- }
471
- return true;
472
- case 9:
473
- case 38:
474
- case 40:
475
- case 16:
476
- case 91:
477
- case 17:
478
- case 18:
479
- break;
480
- default:
481
- return this.results_search();
482
- }
483
- };
484
-
485
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
- var _this = this;
487
- return setTimeout((function() {
488
- return _this.results_search();
489
- }), 50);
490
- };
491
-
492
- AbstractChosen.prototype.container_width = function() {
493
- if (this.options.width != null) {
494
- return this.options.width;
495
- } else {
496
- //return "" + this.form_field.offsetWidth + "px";
497
- return "100%";
498
- }
499
- };
500
-
501
- AbstractChosen.prototype.include_option_in_results = function(option) {
502
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
503
- return false;
504
- }
505
- if (!this.display_disabled_options && option.disabled) {
506
- return false;
507
- }
508
- if (option.empty) {
509
- return false;
510
- }
511
- return true;
512
- };
513
-
514
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
515
- this.touch_started = true;
516
- return this.search_results_mouseover(evt);
517
- };
518
-
519
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
520
- this.touch_started = false;
521
- return this.search_results_mouseout(evt);
522
- };
523
-
524
- AbstractChosen.prototype.search_results_touchend = function(evt) {
525
- if (this.touch_started) {
526
- return this.search_results_mouseup(evt);
527
- }
528
- };
529
-
530
- AbstractChosen.prototype.outerHTML = function(element) {
531
- var tmp;
532
- if (element.outerHTML) {
533
- return element.outerHTML;
534
- }
535
- tmp = document.createElement("div");
536
- tmp.appendChild(element);
537
- return tmp.innerHTML;
538
- };
539
-
540
- AbstractChosen.browser_is_supported = function() {
541
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
542
- return false;
543
- }
544
- if (/Android/i.test(window.navigator.userAgent)) {
545
- if (/Mobile/i.test(window.navigator.userAgent)) {
546
- return false;
547
- }
548
- }
549
- if (/IEMobile/i.test(window.navigator.userAgent)) {
550
- return false;
551
- }
552
- if (/Windows Phone/i.test(window.navigator.userAgent)) {
553
- return false;
554
- }
555
- if (/BlackBerry/i.test(window.navigator.userAgent)) {
556
- return false;
557
- }
558
- if (/BB10/i.test(window.navigator.userAgent)) {
559
- return false;
560
- }
561
- if (window.navigator.appName === "Microsoft Internet Explorer") {
562
- return document.documentMode >= 8;
563
- }
564
- return true;
565
- };
566
-
567
- AbstractChosen.default_multiple_text = "Select report";
568
-
569
- AbstractChosen.default_single_text = "Select an Option";
570
-
571
- AbstractChosen.default_no_result_text = "No results match";
572
-
573
- return AbstractChosen;
574
-
575
- })();
576
-
577
- $ = jQuery;
578
-
579
- $.fn.extend({
580
- chosen: function(options) {
581
- if (!AbstractChosen.browser_is_supported()) {
582
- return this;
583
- }
584
- return this.each(function(input_field) {
585
- var $this, chosen;
586
- $this = $(this);
587
- chosen = $this.data('chosen');
588
- if (options === 'destroy') {
589
- if (chosen instanceof Chosen) {
590
- chosen.destroy();
591
- }
592
- return;
593
- }
594
- if (!(chosen instanceof Chosen)) {
595
- $this.data('chosen', new Chosen(this, options));
596
- }
597
- });
598
- }
599
- });
600
-
601
- Chosen = (function(_super) {
602
- __extends(Chosen, _super);
603
-
604
- function Chosen() {
605
- _ref = Chosen.__super__.constructor.apply(this, arguments);
606
- return _ref;
607
- }
608
-
609
- Chosen.prototype.setup = function() {
610
- this.form_field_jq = $(this.form_field);
611
- this.current_selectedIndex = this.form_field.selectedIndex;
612
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
613
- };
614
-
615
- Chosen.prototype.set_up_html = function() {
616
- var container_classes, container_props;
617
- container_classes = ["chosen-container"];
618
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
619
- if (this.inherit_select_classes && this.form_field.className) {
620
- container_classes.push(this.form_field.className);
621
- }
622
- if (this.is_rtl) {
623
- container_classes.push("chosen-rtl");
624
- }
625
- container_props = {
626
- 'class': container_classes.join(' '),
627
- 'style': "width: " + (this.container_width()) + ";",
628
- 'title': this.form_field.title
629
- };
630
- if (this.form_field.id.length) {
631
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
632
- }
633
- this.container = $("<div />", container_props);
634
- if (this.is_multiple) {
635
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
636
- } else {
637
- this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
638
- }
639
- this.form_field_jq.hide().after(this.container);
640
- this.dropdown = this.container.find('div.chosen-drop').first();
641
- this.search_field = this.container.find('input').first();
642
- this.search_results = this.container.find('ul.chosen-results').first();
643
- this.search_field_scale();
644
- this.search_no_results = this.container.find('li.no-results').first();
645
- if (this.is_multiple) {
646
- this.search_choices = this.container.find('ul.chosen-choices').first();
647
- this.search_container = this.container.find('li.search-field').first();
648
- } else {
649
- this.search_container = this.container.find('div.chosen-search').first();
650
- this.selected_item = this.container.find('.chosen-single').first();
651
- }
652
- this.results_build();
653
- this.set_tab_index();
654
- return this.set_label_behavior();
655
- };
656
-
657
- Chosen.prototype.on_ready = function() {
658
- return this.form_field_jq.trigger("chosen:ready", {
659
- chosen: this
660
- });
661
- };
662
-
663
- Chosen.prototype.register_observers = function() {
664
- var _this = this;
665
- this.container.bind('touchstart.chosen', function(evt) {
666
- _this.container_mousedown(evt);
667
- return evt.preventDefault();
668
- });
669
- this.container.bind('touchend.chosen', function(evt) {
670
- _this.container_mouseup(evt);
671
- return evt.preventDefault();
672
- });
673
- this.container.bind('mousedown.chosen', function(evt) {
674
- _this.container_mousedown(evt);
675
- });
676
- this.container.bind('mouseup.chosen', function(evt) {
677
- _this.container_mouseup(evt);
678
- });
679
- this.container.bind('mouseenter.chosen', function(evt) {
680
- _this.mouse_enter(evt);
681
- });
682
- this.container.bind('mouseleave.chosen', function(evt) {
683
- _this.mouse_leave(evt);
684
- });
685
- this.search_results.bind('mouseup.chosen', function(evt) {
686
- _this.search_results_mouseup(evt);
687
- });
688
- this.search_results.bind('mouseover.chosen', function(evt) {
689
- _this.search_results_mouseover(evt);
690
- });
691
- this.search_results.bind('mouseout.chosen', function(evt) {
692
- _this.search_results_mouseout(evt);
693
- });
694
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
695
- _this.search_results_mousewheel(evt);
696
- });
697
- this.search_results.bind('touchstart.chosen', function(evt) {
698
- _this.search_results_touchstart(evt);
699
- });
700
- this.search_results.bind('touchmove.chosen', function(evt) {
701
- _this.search_results_touchmove(evt);
702
- });
703
- this.search_results.bind('touchend.chosen', function(evt) {
704
- _this.search_results_touchend(evt);
705
- });
706
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
707
- _this.results_update_field(evt);
708
- });
709
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
710
- _this.activate_field(evt);
711
- });
712
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
713
- _this.container_mousedown(evt);
714
- });
715
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
716
- _this.input_blur(evt);
717
- });
718
- this.search_field.bind('blur.chosen', function(evt) {
719
- _this.input_blur(evt);
720
- });
721
- this.search_field.bind('keyup.chosen', function(evt) {
722
- _this.keyup_checker(evt);
723
- });
724
- this.search_field.bind('keydown.chosen', function(evt) {
725
- _this.keydown_checker(evt);
726
- });
727
- this.search_field.bind('focus.chosen', function(evt) {
728
- _this.input_focus(evt);
729
- });
730
- this.search_field.bind('cut.chosen', function(evt) {
731
- _this.clipboard_event_checker(evt);
732
- });
733
- this.search_field.bind('paste.chosen', function(evt) {
734
- _this.clipboard_event_checker(evt);
735
- });
736
- if (this.is_multiple) {
737
- return this.search_choices.bind('click.chosen', function(evt) {
738
- _this.choices_click(evt);
739
- });
740
- } else {
741
- return this.container.bind('click.chosen', function(evt) {
742
- evt.preventDefault();
743
- });
744
- }
745
- };
746
-
747
- Chosen.prototype.destroy = function() {
748
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
749
- if (this.search_field[0].tabIndex) {
750
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
751
- }
752
- this.container.remove();
753
- this.form_field_jq.removeData('chosen');
754
- return this.form_field_jq.show();
755
- };
756
-
757
- Chosen.prototype.search_field_disabled = function() {
758
- this.is_disabled = this.form_field_jq[0].disabled;
759
- if (this.is_disabled) {
760
- this.container.addClass('chosen-disabled');
761
- this.search_field[0].disabled = true;
762
- if (!this.is_multiple) {
763
- this.selected_item.unbind("focus.chosen", this.activate_action);
764
- }
765
- return this.close_field();
766
- } else {
767
- this.container.removeClass('chosen-disabled');
768
- this.search_field[0].disabled = false;
769
- if (!this.is_multiple) {
770
- return this.selected_item.bind("focus.chosen", this.activate_action);
771
- }
772
- }
773
- };
774
-
775
- Chosen.prototype.container_mousedown = function(evt) {
776
- if (!this.is_disabled) {
777
- if (evt && evt.type === "mousedown" && !this.results_showing) {
778
- evt.preventDefault();
779
- }
780
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
781
- if (!this.active_field) {
782
- if (this.is_multiple) {
783
- this.search_field.val("");
784
- }
785
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
786
- this.results_show();
787
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
788
- evt.preventDefault();
789
- this.results_toggle();
790
- }
791
- return this.activate_field();
792
- }
793
- }
794
- };
795
-
796
- Chosen.prototype.container_mouseup = function(evt) {
797
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
798
- return this.results_reset(evt);
799
- }
800
- };
801
-
802
- Chosen.prototype.search_results_mousewheel = function(evt) {
803
- var delta;
804
- if (evt.originalEvent) {
805
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
806
- }
807
- if (delta != null) {
808
- evt.preventDefault();
809
- if (evt.type === 'DOMMouseScroll') {
810
- delta = delta * 40;
811
- }
812
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
813
- }
814
- };
815
-
816
- Chosen.prototype.blur_test = function(evt) {
817
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
818
- return this.close_field();
819
- }
820
- };
821
-
822
- Chosen.prototype.close_field = function() {
823
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
824
- this.active_field = false;
825
- this.results_hide();
826
- this.container.removeClass("chosen-container-active");
827
- this.clear_backstroke();
828
- this.show_search_field_default();
829
- return this.search_field_scale();
830
- };
831
-
832
- Chosen.prototype.activate_field = function() {
833
- this.container.addClass("chosen-container-active");
834
- this.active_field = true;
835
- this.search_field.val(this.search_field.val());
836
- return this.search_field.focus();
837
- };
838
-
839
- Chosen.prototype.test_active_click = function(evt) {
840
- var active_container;
841
- active_container = $(evt.target).closest('.chosen-container');
842
- if (active_container.length && this.container[0] === active_container[0]) {
843
- return this.active_field = true;
844
- } else {
845
- return this.close_field();
846
- }
847
- };
848
-
849
- Chosen.prototype.results_build = function() {
850
- this.parsing = true;
851
- this.selected_option_count = null;
852
- this.results_data = SelectParser.select_to_array(this.form_field);
853
- if (this.is_multiple) {
854
- this.search_choices.find("li.search-choice").remove();
855
- } else if (!this.is_multiple) {
856
- this.single_set_selected_text();
857
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
858
- this.search_field[0].readOnly = true;
859
- this.container.addClass("chosen-container-single-nosearch");
860
- } else {
861
- this.search_field[0].readOnly = false;
862
- this.container.removeClass("chosen-container-single-nosearch");
863
- }
864
- }
865
- this.update_results_content(this.results_option_build({
866
- first: true
867
- }));
868
- this.search_field_disabled();
869
- this.show_search_field_default();
870
- this.search_field_scale();
871
- return this.parsing = false;
872
- };
873
-
874
- Chosen.prototype.result_do_highlight = function(el) {
875
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
876
- if (el.length) {
877
- this.result_clear_highlight();
878
- this.result_highlight = el;
879
- this.result_highlight.addClass("highlighted");
880
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
881
- visible_top = this.search_results.scrollTop();
882
- visible_bottom = maxHeight + visible_top;
883
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
884
- high_bottom = high_top + this.result_highlight.outerHeight();
885
- if (high_bottom >= visible_bottom) {
886
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
887
- } else if (high_top < visible_top) {
888
- return this.search_results.scrollTop(high_top);
889
- }
890
- }
891
- };
892
-
893
- Chosen.prototype.result_clear_highlight = function() {
894
- if (this.result_highlight) {
895
- this.result_highlight.removeClass("highlighted");
896
- }
897
- return this.result_highlight = null;
898
- };
899
-
900
- Chosen.prototype.results_show = function() {
901
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
902
- this.form_field_jq.trigger("chosen:maxselected", {
903
- chosen: this
904
- });
905
- return false;
906
- }
907
- this.container.addClass("chosen-with-drop");
908
- this.results_showing = true;
909
- this.search_field.focus();
910
- this.search_field.val(this.search_field.val());
911
- this.winnow_results();
912
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
913
- chosen: this
914
- });
915
- };
916
-
917
- Chosen.prototype.update_results_content = function(content) {
918
- return this.search_results.html(content);
919
- };
920
-
921
- Chosen.prototype.results_hide = function() {
922
- if (this.results_showing) {
923
- this.result_clear_highlight();
924
- this.container.removeClass("chosen-with-drop");
925
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
926
- chosen: this
927
- });
928
- }
929
- return this.results_showing = false;
930
- };
931
-
932
- Chosen.prototype.set_tab_index = function(el) {
933
- var ti;
934
- if (this.form_field.tabIndex) {
935
- ti = this.form_field.tabIndex;
936
- this.form_field.tabIndex = -1;
937
- return this.search_field[0].tabIndex = ti;
938
- }
939
- };
940
-
941
- Chosen.prototype.set_label_behavior = function() {
942
- var _this = this;
943
- this.form_field_label = this.form_field_jq.parents("label");
944
- if (!this.form_field_label.length && this.form_field.id.length) {
945
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
946
- }
947
- if (this.form_field_label.length > 0) {
948
- return this.form_field_label.bind('click.chosen', function(evt) {
949
- if (_this.is_multiple) {
950
- return _this.container_mousedown(evt);
951
- } else {
952
- return _this.activate_field();
953
- }
954
- });
955
- }
956
- };
957
-
958
- Chosen.prototype.show_search_field_default = function() {
959
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
960
- this.search_field.val(this.default_text);
961
- return this.search_field.addClass("default");
962
- } else {
963
- this.search_field.val("");
964
- return this.search_field.removeClass("default");
965
- }
966
- };
967
-
968
- Chosen.prototype.search_results_mouseup = function(evt) {
969
- var target;
970
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
971
- if (target.length) {
972
- this.result_highlight = target;
973
- this.result_select(evt);
974
- return this.search_field.focus();
975
- }
976
- };
977
-
978
- Chosen.prototype.search_results_mouseover = function(evt) {
979
- var target;
980
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
981
- if (target) {
982
- return this.result_do_highlight(target);
983
- }
984
- };
985
-
986
- Chosen.prototype.search_results_mouseout = function(evt) {
987
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
988
- return this.result_clear_highlight();
989
- }
990
- };
991
-
992
- Chosen.prototype.choice_build = function(item) {
993
- var choice, close_link,
994
- _this = this;
995
- choice = $('<li />', {
996
- "class": "search-choice"
997
- }).html("<span>" + (this.choice_label(item)) + "</span>");
998
- if (item.disabled) {
999
- choice.addClass('search-choice-disabled');
1000
- } else {
1001
- close_link = $('<a />', {
1002
- "class": 'search-choice-close',
1003
- 'data-option-array-index': item.array_index
1004
- });
1005
- close_link.bind('click.chosen', function(evt) {
1006
- return _this.choice_destroy_link_click(evt);
1007
- });
1008
- choice.append(close_link);
1009
- }
1010
- return this.search_container.before(choice);
1011
- };
1012
-
1013
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1014
- evt.preventDefault();
1015
- evt.stopPropagation();
1016
- if (!this.is_disabled) {
1017
- return this.choice_destroy($(evt.target));
1018
- }
1019
- };
1020
-
1021
- Chosen.prototype.choice_destroy = function(link) {
1022
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1023
- this.show_search_field_default();
1024
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1025
- this.results_hide();
1026
- }
1027
- link.parents('li').first().remove();
1028
- return this.search_field_scale();
1029
- }
1030
- };
1031
-
1032
- Chosen.prototype.results_reset = function() {
1033
- this.reset_single_select_options();
1034
- this.form_field.options[0].selected = true;
1035
- this.single_set_selected_text();
1036
- this.show_search_field_default();
1037
- this.results_reset_cleanup();
1038
- this.form_field_jq.trigger("change");
1039
- if (this.active_field) {
1040
- return this.results_hide();
1041
- }
1042
- };
1043
-
1044
- Chosen.prototype.results_reset_cleanup = function() {
1045
- this.current_selectedIndex = this.form_field.selectedIndex;
1046
- return this.selected_item.find("abbr").remove();
1047
- };
1048
-
1049
- Chosen.prototype.result_select = function(evt) {
1050
- var high, item;
1051
- if (this.result_highlight) {
1052
- high = this.result_highlight;
1053
- this.result_clear_highlight();
1054
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1055
- this.form_field_jq.trigger("chosen:maxselected", {
1056
- chosen: this
1057
- });
1058
- return false;
1059
- }
1060
- if (this.is_multiple) {
1061
- high.removeClass("active-result");
1062
- } else {
1063
- this.reset_single_select_options();
1064
- }
1065
- high.addClass("result-selected");
1066
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1067
- item.selected = true;
1068
- this.form_field.options[item.options_index].selected = true;
1069
- this.selected_option_count = null;
1070
- if (this.is_multiple) {
1071
- this.choice_build(item);
1072
- } else {
1073
- this.single_set_selected_text(this.choice_label(item));
1074
- }
1075
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1076
- this.results_hide();
1077
- }
1078
- this.show_search_field_default();
1079
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1080
- this.form_field_jq.trigger("change", {
1081
- 'selected': this.form_field.options[item.options_index].value
1082
- });
1083
- }
1084
- this.current_selectedIndex = this.form_field.selectedIndex;
1085
- evt.preventDefault();
1086
- return this.search_field_scale();
1087
- }
1088
- };
1089
-
1090
- Chosen.prototype.single_set_selected_text = function(text) {
1091
- if (text == null) {
1092
- text = this.default_text;
1093
- }
1094
- if (text === this.default_text) {
1095
- this.selected_item.addClass("chosen-default");
1096
- } else {
1097
- this.single_deselect_control_build();
1098
- this.selected_item.removeClass("chosen-default");
1099
- }
1100
- return this.selected_item.find("span").html(text);
1101
- };
1102
-
1103
- Chosen.prototype.result_deselect = function(pos) {
1104
- var result_data;
1105
- result_data = this.results_data[pos];
1106
- if (!this.form_field.options[result_data.options_index].disabled) {
1107
- result_data.selected = false;
1108
- this.form_field.options[result_data.options_index].selected = false;
1109
- this.selected_option_count = null;
1110
- this.result_clear_highlight();
1111
- if (this.results_showing) {
1112
- this.winnow_results();
1113
- }
1114
- this.form_field_jq.trigger("change", {
1115
- deselected: this.form_field.options[result_data.options_index].value
1116
- });
1117
- this.search_field_scale();
1118
- return true;
1119
- } else {
1120
- return false;
1121
- }
1122
- };
1123
-
1124
- Chosen.prototype.single_deselect_control_build = function() {
1125
- if (!this.allow_single_deselect) {
1126
- return;
1127
- }
1128
- if (!this.selected_item.find("abbr").length) {
1129
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1130
- }
1131
- return this.selected_item.addClass("chosen-single-with-deselect");
1132
- };
1133
-
1134
- Chosen.prototype.get_search_text = function() {
1135
- return $('<div/>').text($.trim(this.search_field.val())).html();
1136
- };
1137
-
1138
- Chosen.prototype.winnow_results_set_highlight = function() {
1139
- var do_high, selected_results;
1140
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1141
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1142
- if (do_high != null) {
1143
- return this.result_do_highlight(do_high);
1144
- }
1145
- };
1146
-
1147
- Chosen.prototype.no_results = function(terms) {
1148
- var no_results_html;
1149
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1150
- no_results_html.find("span").first().html(terms);
1151
- this.search_results.append(no_results_html);
1152
- return this.form_field_jq.trigger("chosen:no_results", {
1153
- chosen: this
1154
- });
1155
- };
1156
-
1157
- Chosen.prototype.no_results_clear = function() {
1158
- return this.search_results.find(".no-results").remove();
1159
- };
1160
-
1161
- Chosen.prototype.keydown_arrow = function() {
1162
- var next_sib;
1163
- if (this.results_showing && this.result_highlight) {
1164
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1165
- if (next_sib) {
1166
- return this.result_do_highlight(next_sib);
1167
- }
1168
- } else {
1169
- return this.results_show();
1170
- }
1171
- };
1172
-
1173
- Chosen.prototype.keyup_arrow = function() {
1174
- var prev_sibs;
1175
- if (!this.results_showing && !this.is_multiple) {
1176
- return this.results_show();
1177
- } else if (this.result_highlight) {
1178
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1179
- if (prev_sibs.length) {
1180
- return this.result_do_highlight(prev_sibs.first());
1181
- } else {
1182
- if (this.choices_count() > 0) {
1183
- this.results_hide();
1184
- }
1185
- return this.result_clear_highlight();
1186
- }
1187
- }
1188
- };
1189
-
1190
- Chosen.prototype.keydown_backstroke = function() {
1191
- var next_available_destroy;
1192
- if (this.pending_backstroke) {
1193
- this.choice_destroy(this.pending_backstroke.find("a").first());
1194
- return this.clear_backstroke();
1195
- } else {
1196
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1197
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1198
- this.pending_backstroke = next_available_destroy;
1199
- if (this.single_backstroke_delete) {
1200
- return this.keydown_backstroke();
1201
- } else {
1202
- return this.pending_backstroke.addClass("search-choice-focus");
1203
- }
1204
- }
1205
- }
1206
- };
1207
-
1208
- Chosen.prototype.clear_backstroke = function() {
1209
- if (this.pending_backstroke) {
1210
- this.pending_backstroke.removeClass("search-choice-focus");
1211
- }
1212
- return this.pending_backstroke = null;
1213
- };
1214
-
1215
- Chosen.prototype.keydown_checker = function(evt) {
1216
- var stroke, _ref1;
1217
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1218
- this.search_field_scale();
1219
- if (stroke !== 8 && this.pending_backstroke) {
1220
- this.clear_backstroke();
1221
- }
1222
- switch (stroke) {
1223
- case 8:
1224
- this.backstroke_length = this.search_field.val().length;
1225
- break;
1226
- case 9:
1227
- if (this.results_showing && !this.is_multiple) {
1228
- this.result_select(evt);
1229
- }
1230
- this.mouse_on_container = false;
1231
- break;
1232
- case 13:
1233
- if (this.results_showing) {
1234
- evt.preventDefault();
1235
- }
1236
- break;
1237
- case 32:
1238
- if (this.disable_search) {
1239
- evt.preventDefault();
1240
- }
1241
- break;
1242
- case 38:
1243
- evt.preventDefault();
1244
- this.keyup_arrow();
1245
- break;
1246
- case 40:
1247
- evt.preventDefault();
1248
- this.keydown_arrow();
1249
- break;
1250
- }
1251
- };
1252
-
1253
- Chosen.prototype.search_field_scale = function() {
1254
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1255
- if (this.is_multiple) {
1256
- h = 0;
1257
- w = 0;
1258
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1259
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1260
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1261
- style = styles[_i];
1262
- style_block += style + ":" + this.search_field.css(style) + ";";
1263
- }
1264
- div = $('<div />', {
1265
- 'style': style_block
1266
- });
1267
- div.text(this.search_field.val());
1268
- $('body').append(div);
1269
- w = div.width() + 25;
1270
- div.remove();
1271
- f_width = this.container.outerWidth();
1272
- if (w > f_width - 10) {
1273
- w = f_width - 10;
1274
- }
1275
- return this.search_field.css({
1276
- 'width': w + 'px'
1277
- });
1278
- }
1279
- };
1280
-
1281
- return Chosen;
1282
-
1283
- })(AbstractChosen);
1284
-
1285
  }).call(this);
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.5.1
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
8
+
9
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
+ This file is generated by `grunt build`, do not edit it by hand.
11
+ */
12
+
13
+ (function() {
14
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
15
+ __hasProp = {}.hasOwnProperty,
16
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
+
18
+ SelectParser = (function() {
19
+ function SelectParser() {
20
+ this.options_index = 0;
21
+ this.parsed = [];
22
+ }
23
+
24
+ SelectParser.prototype.add_node = function(child) {
25
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
+ return this.add_group(child);
27
+ } else {
28
+ return this.add_option(child);
29
+ }
30
+ };
31
+
32
+ SelectParser.prototype.add_group = function(group) {
33
+ var group_position, option, _i, _len, _ref, _results;
34
+ group_position = this.parsed.length;
35
+ this.parsed.push({
36
+ array_index: group_position,
37
+ group: true,
38
+ label: this.escapeExpression(group.label),
39
+ title: group.title ? group.title : void 0,
40
+ children: 0,
41
+ disabled: group.disabled,
42
+ classes: group.className
43
+ });
44
+ _ref = group.childNodes;
45
+ _results = [];
46
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
+ option = _ref[_i];
48
+ _results.push(this.add_option(option, group_position, group.disabled));
49
+ }
50
+ return _results;
51
+ };
52
+
53
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
+ if (option.nodeName.toUpperCase() === "OPTION") {
55
+ if (option.text !== "") {
56
+ if (group_position != null) {
57
+ this.parsed[group_position].children += 1;
58
+ }
59
+ this.parsed.push({
60
+ array_index: this.parsed.length,
61
+ options_index: this.options_index,
62
+ value: option.value,
63
+ text: option.text,
64
+ html: option.innerHTML,
65
+ title: option.title ? option.title : void 0,
66
+ selected: option.selected,
67
+ disabled: group_disabled === true ? group_disabled : option.disabled,
68
+ group_array_index: group_position,
69
+ group_label: group_position != null ? this.parsed[group_position].label : null,
70
+ classes: option.className,
71
+ style: option.style.cssText
72
+ });
73
+ } else {
74
+ this.parsed.push({
75
+ array_index: this.parsed.length,
76
+ options_index: this.options_index,
77
+ empty: true
78
+ });
79
+ }
80
+ return this.options_index += 1;
81
+ }
82
+ };
83
+
84
+ SelectParser.prototype.escapeExpression = function(text) {
85
+ var map, unsafe_chars;
86
+ if ((text == null) || text === false) {
87
+ return "";
88
+ }
89
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
90
+ return text;
91
+ }
92
+ map = {
93
+ "<": "&lt;",
94
+ ">": "&gt;",
95
+ '"': "&quot;",
96
+ "'": "&#x27;",
97
+ "`": "&#x60;"
98
+ };
99
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
+ return text.replace(unsafe_chars, function(chr) {
101
+ return map[chr] || "&amp;";
102
+ });
103
+ };
104
+
105
+ return SelectParser;
106
+
107
+ })();
108
+
109
+ SelectParser.select_to_array = function(select) {
110
+ var child, parser, _i, _len, _ref;
111
+ parser = new SelectParser();
112
+ _ref = select.childNodes;
113
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
+ child = _ref[_i];
115
+ parser.add_node(child);
116
+ }
117
+ return parser.parsed;
118
+ };
119
+
120
+ AbstractChosen = (function() {
121
+ function AbstractChosen(form_field, options) {
122
+ this.form_field = form_field;
123
+ this.options = options != null ? options : {};
124
+ if (!AbstractChosen.browser_is_supported()) {
125
+ return;
126
+ }
127
+ this.is_multiple = this.form_field.multiple;
128
+ this.set_default_text();
129
+ this.set_default_values();
130
+ this.setup();
131
+ this.set_up_html();
132
+ this.register_observers();
133
+ this.on_ready();
134
+ }
135
+
136
+ AbstractChosen.prototype.set_default_values = function() {
137
+ var _this = this;
138
+ this.click_test_action = function(evt) {
139
+ return _this.test_active_click(evt);
140
+ };
141
+ this.activate_action = function(evt) {
142
+ return _this.activate_field(evt);
143
+ };
144
+ this.active_field = false;
145
+ this.mouse_on_container = false;
146
+ this.results_showing = false;
147
+ this.result_highlighted = null;
148
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
+ this.disable_search = this.options.disable_search || false;
151
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
+ this.search_contains = this.options.search_contains || false;
154
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
+ this.max_selected_options = this.options.max_selected_options || Infinity;
156
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
157
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
+ return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
+ };
162
+
163
+ AbstractChosen.prototype.set_default_text = function() {
164
+ if (this.form_field.getAttribute("data-placeholder")) {
165
+ this.default_text = this.form_field.getAttribute("data-placeholder");
166
+ } else if (this.is_multiple) {
167
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
+ } else {
169
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
+ }
171
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
+ };
173
+
174
+ AbstractChosen.prototype.choice_label = function(item) {
175
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
176
+ return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
+ } else {
178
+ return item.html;
179
+ }
180
+ };
181
+
182
+ AbstractChosen.prototype.mouse_enter = function() {
183
+ return this.mouse_on_container = true;
184
+ };
185
+
186
+ AbstractChosen.prototype.mouse_leave = function() {
187
+ return this.mouse_on_container = false;
188
+ };
189
+
190
+ AbstractChosen.prototype.input_focus = function(evt) {
191
+ var _this = this;
192
+ if (this.is_multiple) {
193
+ if (!this.active_field) {
194
+ return setTimeout((function() {
195
+ return _this.container_mousedown();
196
+ }), 50);
197
+ }
198
+ } else {
199
+ if (!this.active_field) {
200
+ return this.activate_field();
201
+ }
202
+ }
203
+ };
204
+
205
+ AbstractChosen.prototype.input_blur = function(evt) {
206
+ var _this = this;
207
+ if (!this.mouse_on_container) {
208
+ this.active_field = false;
209
+ return setTimeout((function() {
210
+ return _this.blur_test();
211
+ }), 100);
212
+ }
213
+ };
214
+
215
+ AbstractChosen.prototype.results_option_build = function(options) {
216
+ var content, data, data_content, shown_results, _i, _len, _ref;
217
+ content = '';
218
+ shown_results = 0;
219
+ _ref = this.results_data;
220
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
+ data = _ref[_i];
222
+ data_content = '';
223
+ if (data.group) {
224
+ data_content = this.result_add_group(data);
225
+ } else {
226
+ data_content = this.result_add_option(data);
227
+ }
228
+ if (data_content !== '') {
229
+ shown_results++;
230
+ content += data_content;
231
+ }
232
+ if (options != null ? options.first : void 0) {
233
+ if (data.selected && this.is_multiple) {
234
+ this.choice_build(data);
235
+ } else if (data.selected && !this.is_multiple) {
236
+ this.single_set_selected_text(this.choice_label(data));
237
+ }
238
+ }
239
+ if (shown_results >= this.max_shown_results) {
240
+ break;
241
+ }
242
+ }
243
+ return content;
244
+ };
245
+
246
+ AbstractChosen.prototype.result_add_option = function(option) {
247
+ var classes, option_el;
248
+ if (!option.search_match) {
249
+ return '';
250
+ }
251
+ if (!this.include_option_in_results(option)) {
252
+ return '';
253
+ }
254
+ classes = [];
255
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
256
+ classes.push("active-result");
257
+ }
258
+ if (option.disabled && !(option.selected && this.is_multiple)) {
259
+ classes.push("disabled-result");
260
+ }
261
+ if (option.selected) {
262
+ classes.push("result-selected");
263
+ }
264
+ if (option.group_array_index != null) {
265
+ classes.push("group-option");
266
+ }
267
+ if (option.classes !== "") {
268
+ classes.push(option.classes);
269
+ }
270
+ option_el = document.createElement("li");
271
+ option_el.className = classes.join(" ");
272
+ option_el.style.cssText = option.style;
273
+ option_el.setAttribute("data-option-array-index", option.array_index);
274
+ option_el.innerHTML = option.search_text;
275
+ if (option.title) {
276
+ option_el.title = option.title;
277
+ }
278
+ return this.outerHTML(option_el);
279
+ };
280
+
281
+ AbstractChosen.prototype.result_add_group = function(group) {
282
+ var classes, group_el;
283
+ if (!(group.search_match || group.group_match)) {
284
+ return '';
285
+ }
286
+ if (!(group.active_options > 0)) {
287
+ return '';
288
+ }
289
+ classes = [];
290
+ classes.push("group-result");
291
+ if (group.classes) {
292
+ classes.push(group.classes);
293
+ }
294
+ group_el = document.createElement("li");
295
+ group_el.className = classes.join(" ");
296
+ group_el.innerHTML = group.search_text;
297
+ if (group.title) {
298
+ group_el.title = group.title;
299
+ }
300
+ return this.outerHTML(group_el);
301
+ };
302
+
303
+ AbstractChosen.prototype.results_update_field = function() {
304
+ this.set_default_text();
305
+ if (!this.is_multiple) {
306
+ this.results_reset_cleanup();
307
+ }
308
+ this.result_clear_highlight();
309
+ this.results_build();
310
+ if (this.results_showing) {
311
+ return this.winnow_results();
312
+ }
313
+ };
314
+
315
+ AbstractChosen.prototype.reset_single_select_options = function() {
316
+ var result, _i, _len, _ref, _results;
317
+ _ref = this.results_data;
318
+ _results = [];
319
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
+ result = _ref[_i];
321
+ if (result.selected) {
322
+ _results.push(result.selected = false);
323
+ } else {
324
+ _results.push(void 0);
325
+ }
326
+ }
327
+ return _results;
328
+ };
329
+
330
+ AbstractChosen.prototype.results_toggle = function() {
331
+ if (this.results_showing) {
332
+ return this.results_hide();
333
+ } else {
334
+ return this.results_show();
335
+ }
336
+ };
337
+
338
+ AbstractChosen.prototype.results_search = function(evt) {
339
+ if (this.results_showing) {
340
+ return this.winnow_results();
341
+ } else {
342
+ return this.results_show();
343
+ }
344
+ };
345
+
346
+ AbstractChosen.prototype.winnow_results = function() {
347
+ var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
+ this.no_results_clear();
349
+ results = 0;
350
+ searchText = this.get_search_text();
351
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
+ zregex = new RegExp(escapedSearchText, 'i');
353
+ regex = this.get_search_regex(escapedSearchText);
354
+ _ref = this.results_data;
355
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
+ option = _ref[_i];
357
+ option.search_match = false;
358
+ results_group = null;
359
+ if (this.include_option_in_results(option)) {
360
+ if (option.group) {
361
+ option.group_match = false;
362
+ option.active_options = 0;
363
+ }
364
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
+ results_group = this.results_data[option.group_array_index];
366
+ if (results_group.active_options === 0 && results_group.search_match) {
367
+ results += 1;
368
+ }
369
+ results_group.active_options += 1;
370
+ }
371
+ option.search_text = option.group ? option.label : option.html;
372
+ if (!(option.group && !this.group_search)) {
373
+ option.search_match = this.search_string_match(option.search_text, regex);
374
+ if (option.search_match && !option.group) {
375
+ results += 1;
376
+ }
377
+ if (option.search_match) {
378
+ if (searchText.length) {
379
+ startpos = option.search_text.search(zregex);
380
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
+ }
383
+ if (results_group != null) {
384
+ results_group.group_match = true;
385
+ }
386
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
+ option.search_match = true;
388
+ }
389
+ }
390
+ }
391
+ }
392
+ this.result_clear_highlight();
393
+ if (results < 1 && searchText.length) {
394
+ this.update_results_content("");
395
+ return this.no_results(searchText);
396
+ } else {
397
+ this.update_results_content(this.results_option_build());
398
+ return this.winnow_results_set_highlight();
399
+ }
400
+ };
401
+
402
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
+ var regex_anchor;
404
+ regex_anchor = this.search_contains ? "" : "^";
405
+ return new RegExp(regex_anchor + escaped_search_string, 'i');
406
+ };
407
+
408
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
+ var part, parts, _i, _len;
410
+ if (regex.test(search_string)) {
411
+ return true;
412
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
414
+ if (parts.length) {
415
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
+ part = parts[_i];
417
+ if (regex.test(part)) {
418
+ return true;
419
+ }
420
+ }
421
+ }
422
+ }
423
+ };
424
+
425
+ AbstractChosen.prototype.choices_count = function() {
426
+ var option, _i, _len, _ref;
427
+ if (this.selected_option_count != null) {
428
+ return this.selected_option_count;
429
+ }
430
+ this.selected_option_count = 0;
431
+ _ref = this.form_field.options;
432
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
+ option = _ref[_i];
434
+ if (option.selected) {
435
+ this.selected_option_count += 1;
436
+ }
437
+ }
438
+ return this.selected_option_count;
439
+ };
440
+
441
+ AbstractChosen.prototype.choices_click = function(evt) {
442
+ evt.preventDefault();
443
+ if (!(this.results_showing || this.is_disabled)) {
444
+ return this.results_show();
445
+ }
446
+ };
447
+
448
+ AbstractChosen.prototype.keyup_checker = function(evt) {
449
+ var stroke, _ref;
450
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
+ this.search_field_scale();
452
+ switch (stroke) {
453
+ case 8:
454
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
+ return this.keydown_backstroke();
456
+ } else if (!this.pending_backstroke) {
457
+ this.result_clear_highlight();
458
+ return this.results_search();
459
+ }
460
+ break;
461
+ case 13:
462
+ evt.preventDefault();
463
+ if (this.results_showing) {
464
+ return this.result_select(evt);
465
+ }
466
+ break;
467
+ case 27:
468
+ if (this.results_showing) {
469
+ this.results_hide();
470
+ }
471
+ return true;
472
+ case 9:
473
+ case 38:
474
+ case 40:
475
+ case 16:
476
+ case 91:
477
+ case 17:
478
+ case 18:
479
+ break;
480
+ default:
481
+ return this.results_search();
482
+ }
483
+ };
484
+
485
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
+ var _this = this;
487
+ return setTimeout((function() {
488
+ return _this.results_search();
489
+ }), 50);
490
+ };
491
+
492
+ AbstractChosen.prototype.container_width = function() {
493
+ if (this.options.width != null) {
494
+ return this.options.width;
495
+ } else {
496
+ //return "" + this.form_field.offsetWidth + "px";
497
+ return "100%";
498
+ }
499
+ };
500
+
501
+ AbstractChosen.prototype.include_option_in_results = function(option) {
502
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
503
+ return false;
504
+ }
505
+ if (!this.display_disabled_options && option.disabled) {
506
+ return false;
507
+ }
508
+ if (option.empty) {
509
+ return false;
510
+ }
511
+ return true;
512
+ };
513
+
514
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
515
+ this.touch_started = true;
516
+ return this.search_results_mouseover(evt);
517
+ };
518
+
519
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
520
+ this.touch_started = false;
521
+ return this.search_results_mouseout(evt);
522
+ };
523
+
524
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
525
+ if (this.touch_started) {
526
+ return this.search_results_mouseup(evt);
527
+ }
528
+ };
529
+
530
+ AbstractChosen.prototype.outerHTML = function(element) {
531
+ var tmp;
532
+ if (element.outerHTML) {
533
+ return element.outerHTML;
534
+ }
535
+ tmp = document.createElement("div");
536
+ tmp.appendChild(element);
537
+ return tmp.innerHTML;
538
+ };
539
+
540
+ AbstractChosen.browser_is_supported = function() {
541
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
542
+ return false;
543
+ }
544
+ if (/Android/i.test(window.navigator.userAgent)) {
545
+ if (/Mobile/i.test(window.navigator.userAgent)) {
546
+ return false;
547
+ }
548
+ }
549
+ if (/IEMobile/i.test(window.navigator.userAgent)) {
550
+ return false;
551
+ }
552
+ if (/Windows Phone/i.test(window.navigator.userAgent)) {
553
+ return false;
554
+ }
555
+ if (/BlackBerry/i.test(window.navigator.userAgent)) {
556
+ return false;
557
+ }
558
+ if (/BB10/i.test(window.navigator.userAgent)) {
559
+ return false;
560
+ }
561
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
562
+ return document.documentMode >= 8;
563
+ }
564
+ return true;
565
+ };
566
+
567
+ AbstractChosen.default_multiple_text = "Select report";
568
+
569
+ AbstractChosen.default_single_text = "Select an Option";
570
+
571
+ AbstractChosen.default_no_result_text = "No results match";
572
+
573
+ return AbstractChosen;
574
+
575
+ })();
576
+
577
+ $ = jQuery;
578
+
579
+ $.fn.extend({
580
+ chosen: function(options) {
581
+ if (!AbstractChosen.browser_is_supported()) {
582
+ return this;
583
+ }
584
+ return this.each(function(input_field) {
585
+ var $this, chosen;
586
+ $this = $(this);
587
+ chosen = $this.data('chosen');
588
+ if (options === 'destroy') {
589
+ if (chosen instanceof Chosen) {
590
+ chosen.destroy();
591
+ }
592
+ return;
593
+ }
594
+ if (!(chosen instanceof Chosen)) {
595
+ $this.data('chosen', new Chosen(this, options));
596
+ }
597
+ });
598
+ }
599
+ });
600
+
601
+ Chosen = (function(_super) {
602
+ __extends(Chosen, _super);
603
+
604
+ function Chosen() {
605
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
606
+ return _ref;
607
+ }
608
+
609
+ Chosen.prototype.setup = function() {
610
+ this.form_field_jq = $(this.form_field);
611
+ this.current_selectedIndex = this.form_field.selectedIndex;
612
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
613
+ };
614
+
615
+ Chosen.prototype.set_up_html = function() {
616
+ var container_classes, container_props;
617
+ container_classes = ["chosen-container"];
618
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
619
+ if (this.inherit_select_classes && this.form_field.className) {
620
+ container_classes.push(this.form_field.className);
621
+ }
622
+ if (this.is_rtl) {
623
+ container_classes.push("chosen-rtl");
624
+ }
625
+ container_props = {
626
+ 'class': container_classes.join(' '),
627
+ 'style': "width: " + (this.container_width()) + ";",
628
+ 'title': this.form_field.title
629
+ };
630
+ if (this.form_field.id.length) {
631
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
632
+ }
633
+ this.container = $("<div />", container_props);
634
+ if (this.is_multiple) {
635
+ this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
636
+ } else {
637
+ this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
638
+ }
639
+ this.form_field_jq.hide().after(this.container);
640
+ this.dropdown = this.container.find('div.chosen-drop').first();
641
+ this.search_field = this.container.find('input').first();
642
+ this.search_results = this.container.find('ul.chosen-results').first();
643
+ this.search_field_scale();
644
+ this.search_no_results = this.container.find('li.no-results').first();
645
+ if (this.is_multiple) {
646
+ this.search_choices = this.container.find('ul.chosen-choices').first();
647
+ this.search_container = this.container.find('li.search-field').first();
648
+ } else {
649
+ this.search_container = this.container.find('div.chosen-search').first();
650
+ this.selected_item = this.container.find('.chosen-single').first();
651
+ }
652
+ this.results_build();
653
+ this.set_tab_index();
654
+ return this.set_label_behavior();
655
+ };
656
+
657
+ Chosen.prototype.on_ready = function() {
658
+ return this.form_field_jq.trigger("chosen:ready", {
659
+ chosen: this
660
+ });
661
+ };
662
+
663
+ Chosen.prototype.register_observers = function() {
664
+ var _this = this;
665
+ this.container.bind('touchstart.chosen', function(evt) {
666
+ _this.container_mousedown(evt);
667
+ return evt.preventDefault();
668
+ });
669
+ this.container.bind('touchend.chosen', function(evt) {
670
+ _this.container_mouseup(evt);
671
+ return evt.preventDefault();
672
+ });
673
+ this.container.bind('mousedown.chosen', function(evt) {
674
+ _this.container_mousedown(evt);
675
+ });
676
+ this.container.bind('mouseup.chosen', function(evt) {
677
+ _this.container_mouseup(evt);
678
+ });
679
+ this.container.bind('mouseenter.chosen', function(evt) {
680
+ _this.mouse_enter(evt);
681
+ });
682
+ this.container.bind('mouseleave.chosen', function(evt) {
683
+ _this.mouse_leave(evt);
684
+ });
685
+ this.search_results.bind('mouseup.chosen', function(evt) {
686
+ _this.search_results_mouseup(evt);
687
+ });
688
+ this.search_results.bind('mouseover.chosen', function(evt) {
689
+ _this.search_results_mouseover(evt);
690
+ });
691
+ this.search_results.bind('mouseout.chosen', function(evt) {
692
+ _this.search_results_mouseout(evt);
693
+ });
694
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
695
+ _this.search_results_mousewheel(evt);
696
+ });
697
+ this.search_results.bind('touchstart.chosen', function(evt) {
698
+ _this.search_results_touchstart(evt);
699
+ });
700
+ this.search_results.bind('touchmove.chosen', function(evt) {
701
+ _this.search_results_touchmove(evt);
702
+ });
703
+ this.search_results.bind('touchend.chosen', function(evt) {
704
+ _this.search_results_touchend(evt);
705
+ });
706
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
707
+ _this.results_update_field(evt);
708
+ });
709
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
710
+ _this.activate_field(evt);
711
+ });
712
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
713
+ _this.container_mousedown(evt);
714
+ });
715
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
716
+ _this.input_blur(evt);
717
+ });
718
+ this.search_field.bind('blur.chosen', function(evt) {
719
+ _this.input_blur(evt);
720
+ });
721
+ this.search_field.bind('keyup.chosen', function(evt) {
722
+ _this.keyup_checker(evt);
723
+ });
724
+ this.search_field.bind('keydown.chosen', function(evt) {
725
+ _this.keydown_checker(evt);
726
+ });
727
+ this.search_field.bind('focus.chosen', function(evt) {
728
+ _this.input_focus(evt);
729
+ });
730
+ this.search_field.bind('cut.chosen', function(evt) {
731
+ _this.clipboard_event_checker(evt);
732
+ });
733
+ this.search_field.bind('paste.chosen', function(evt) {
734
+ _this.clipboard_event_checker(evt);
735
+ });
736
+ if (this.is_multiple) {
737
+ return this.search_choices.bind('click.chosen', function(evt) {
738
+ _this.choices_click(evt);
739
+ });
740
+ } else {
741
+ return this.container.bind('click.chosen', function(evt) {
742
+ evt.preventDefault();
743
+ });
744
+ }
745
+ };
746
+
747
+ Chosen.prototype.destroy = function() {
748
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
749
+ if (this.search_field[0].tabIndex) {
750
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
751
+ }
752
+ this.container.remove();
753
+ this.form_field_jq.removeData('chosen');
754
+ return this.form_field_jq.show();
755
+ };
756
+
757
+ Chosen.prototype.search_field_disabled = function() {
758
+ this.is_disabled = this.form_field_jq[0].disabled;
759
+ if (this.is_disabled) {
760
+ this.container.addClass('chosen-disabled');
761
+ this.search_field[0].disabled = true;
762
+ if (!this.is_multiple) {
763
+ this.selected_item.unbind("focus.chosen", this.activate_action);
764
+ }
765
+ return this.close_field();
766
+ } else {
767
+ this.container.removeClass('chosen-disabled');
768
+ this.search_field[0].disabled = false;
769
+ if (!this.is_multiple) {
770
+ return this.selected_item.bind("focus.chosen", this.activate_action);
771
+ }
772
+ }
773
+ };
774
+
775
+ Chosen.prototype.container_mousedown = function(evt) {
776
+ if (!this.is_disabled) {
777
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
778
+ evt.preventDefault();
779
+ }
780
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
781
+ if (!this.active_field) {
782
+ if (this.is_multiple) {
783
+ this.search_field.val("");
784
+ }
785
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
786
+ this.results_show();
787
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
788
+ evt.preventDefault();
789
+ this.results_toggle();
790
+ }
791
+ return this.activate_field();
792
+ }
793
+ }
794
+ };
795
+
796
+ Chosen.prototype.container_mouseup = function(evt) {
797
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
798
+ return this.results_reset(evt);
799
+ }
800
+ };
801
+
802
+ Chosen.prototype.search_results_mousewheel = function(evt) {
803
+ var delta;
804
+ if (evt.originalEvent) {
805
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
806
+ }
807
+ if (delta != null) {
808
+ evt.preventDefault();
809
+ if (evt.type === 'DOMMouseScroll') {
810
+ delta = delta * 40;
811
+ }
812
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
813
+ }
814
+ };
815
+
816
+ Chosen.prototype.blur_test = function(evt) {
817
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
818
+ return this.close_field();
819
+ }
820
+ };
821
+
822
+ Chosen.prototype.close_field = function() {
823
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
824
+ this.active_field = false;
825
+ this.results_hide();
826
+ this.container.removeClass("chosen-container-active");
827
+ this.clear_backstroke();
828
+ this.show_search_field_default();
829
+ return this.search_field_scale();
830
+ };
831
+
832
+ Chosen.prototype.activate_field = function() {
833
+ this.container.addClass("chosen-container-active");
834
+ this.active_field = true;
835
+ this.search_field.val(this.search_field.val());
836
+ return this.search_field.focus();
837
+ };
838
+
839
+ Chosen.prototype.test_active_click = function(evt) {
840
+ var active_container;
841
+ active_container = $(evt.target).closest('.chosen-container');
842
+ if (active_container.length && this.container[0] === active_container[0]) {
843
+ return this.active_field = true;
844
+ } else {
845
+ return this.close_field();
846
+ }
847
+ };
848
+
849
+ Chosen.prototype.results_build = function() {
850
+ this.parsing = true;
851
+ this.selected_option_count = null;
852
+ this.results_data = SelectParser.select_to_array(this.form_field);
853
+ if (this.is_multiple) {
854
+ this.search_choices.find("li.search-choice").remove();
855
+ } else if (!this.is_multiple) {
856
+ this.single_set_selected_text();
857
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
858
+ this.search_field[0].readOnly = true;
859
+ this.container.addClass("chosen-container-single-nosearch");
860
+ } else {
861
+ this.search_field[0].readOnly = false;
862
+ this.container.removeClass("chosen-container-single-nosearch");
863
+ }
864
+ }
865
+ this.update_results_content(this.results_option_build({
866
+ first: true
867
+ }));
868
+ this.search_field_disabled();
869
+ this.show_search_field_default();
870
+ this.search_field_scale();
871
+ return this.parsing = false;
872
+ };
873
+
874
+ Chosen.prototype.result_do_highlight = function(el) {
875
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
876
+ if (el.length) {
877
+ this.result_clear_highlight();
878
+ this.result_highlight = el;
879
+ this.result_highlight.addClass("highlighted");
880
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
881
+ visible_top = this.search_results.scrollTop();
882
+ visible_bottom = maxHeight + visible_top;
883
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
884
+ high_bottom = high_top + this.result_highlight.outerHeight();
885
+ if (high_bottom >= visible_bottom) {
886
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
887
+ } else if (high_top < visible_top) {
888
+ return this.search_results.scrollTop(high_top);
889
+ }
890
+ }
891
+ };
892
+
893
+ Chosen.prototype.result_clear_highlight = function() {
894
+ if (this.result_highlight) {
895
+ this.result_highlight.removeClass("highlighted");
896
+ }
897
+ return this.result_highlight = null;
898
+ };
899
+
900
+ Chosen.prototype.results_show = function() {
901
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
902
+ this.form_field_jq.trigger("chosen:maxselected", {
903
+ chosen: this
904
+ });
905
+ return false;
906
+ }
907
+ this.container.addClass("chosen-with-drop");
908
+ this.results_showing = true;
909
+ this.search_field.focus();
910
+ this.search_field.val(this.search_field.val());
911
+ this.winnow_results();
912
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
913
+ chosen: this
914
+ });
915
+ };
916
+
917
+ Chosen.prototype.update_results_content = function(content) {
918
+ return this.search_results.html(content);
919
+ };
920
+
921
+ Chosen.prototype.results_hide = function() {
922
+ if (this.results_showing) {
923
+ this.result_clear_highlight();
924
+ this.container.removeClass("chosen-with-drop");
925
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
926
+ chosen: this
927
+ });
928
+ }
929
+ return this.results_showing = false;
930
+ };
931
+
932
+ Chosen.prototype.set_tab_index = function(el) {
933
+ var ti;
934
+ if (this.form_field.tabIndex) {
935
+ ti = this.form_field.tabIndex;
936
+ this.form_field.tabIndex = -1;
937
+ return this.search_field[0].tabIndex = ti;
938
+ }
939
+ };
940
+
941
+ Chosen.prototype.set_label_behavior = function() {
942
+ var _this = this;
943
+ this.form_field_label = this.form_field_jq.parents("label");
944
+ if (!this.form_field_label.length && this.form_field.id.length) {
945
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
946
+ }
947
+ if (this.form_field_label.length > 0) {
948
+ return this.form_field_label.bind('click.chosen', function(evt) {
949
+ if (_this.is_multiple) {
950
+ return _this.container_mousedown(evt);
951
+ } else {
952
+ return _this.activate_field();
953
+ }
954
+ });
955
+ }
956
+ };
957
+
958
+ Chosen.prototype.show_search_field_default = function() {
959
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
960
+ this.search_field.val(this.default_text);
961
+ return this.search_field.addClass("default");
962
+ } else {
963
+ this.search_field.val("");
964
+ return this.search_field.removeClass("default");
965
+ }
966
+ };
967
+
968
+ Chosen.prototype.search_results_mouseup = function(evt) {
969
+ var target;
970
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
971
+ if (target.length) {
972
+ this.result_highlight = target;
973
+ this.result_select(evt);
974
+ return this.search_field.focus();
975
+ }
976
+ };
977
+
978
+ Chosen.prototype.search_results_mouseover = function(evt) {
979
+ var target;
980
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
981
+ if (target) {
982
+ return this.result_do_highlight(target);
983
+ }
984
+ };
985
+
986
+ Chosen.prototype.search_results_mouseout = function(evt) {
987
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
988
+ return this.result_clear_highlight();
989
+ }
990
+ };
991
+
992
+ Chosen.prototype.choice_build = function(item) {
993
+ var choice, close_link,
994
+ _this = this;
995
+ choice = $('<li />', {
996
+ "class": "search-choice"
997
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
998
+ if (item.disabled) {
999
+ choice.addClass('search-choice-disabled');
1000
+ } else {
1001
+ close_link = $('<a />', {
1002
+ "class": 'search-choice-close',
1003
+ 'data-option-array-index': item.array_index
1004
+ });
1005
+ close_link.bind('click.chosen', function(evt) {
1006
+ return _this.choice_destroy_link_click(evt);
1007
+ });
1008
+ choice.append(close_link);
1009
+ }
1010
+ return this.search_container.before(choice);
1011
+ };
1012
+
1013
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1014
+ evt.preventDefault();
1015
+ evt.stopPropagation();
1016
+ if (!this.is_disabled) {
1017
+ return this.choice_destroy($(evt.target));
1018
+ }
1019
+ };
1020
+
1021
+ Chosen.prototype.choice_destroy = function(link) {
1022
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1023
+ this.show_search_field_default();
1024
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1025
+ this.results_hide();
1026
+ }
1027
+ link.parents('li').first().remove();
1028
+ return this.search_field_scale();
1029
+ }
1030
+ };
1031
+
1032
+ Chosen.prototype.results_reset = function() {
1033
+ this.reset_single_select_options();
1034
+ this.form_field.options[0].selected = true;
1035
+ this.single_set_selected_text();
1036
+ this.show_search_field_default();
1037
+ this.results_reset_cleanup();
1038
+ this.form_field_jq.trigger("change");
1039
+ if (this.active_field) {
1040
+ return this.results_hide();
1041
+ }
1042
+ };
1043
+
1044
+ Chosen.prototype.results_reset_cleanup = function() {
1045
+ this.current_selectedIndex = this.form_field.selectedIndex;
1046
+ return this.selected_item.find("abbr").remove();
1047
+ };
1048
+
1049
+ Chosen.prototype.result_select = function(evt) {
1050
+ var high, item;
1051
+ if (this.result_highlight) {
1052
+ high = this.result_highlight;
1053
+ this.result_clear_highlight();
1054
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1055
+ this.form_field_jq.trigger("chosen:maxselected", {
1056
+ chosen: this
1057
+ });
1058
+ return false;
1059
+ }
1060
+ if (this.is_multiple) {
1061
+ high.removeClass("active-result");
1062
+ } else {
1063
+ this.reset_single_select_options();
1064
+ }
1065
+ high.addClass("result-selected");
1066
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1067
+ item.selected = true;
1068
+ this.form_field.options[item.options_index].selected = true;
1069
+ this.selected_option_count = null;
1070
+ if (this.is_multiple) {
1071
+ this.choice_build(item);
1072
+ } else {
1073
+ this.single_set_selected_text(this.choice_label(item));
1074
+ }
1075
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1076
+ this.results_hide();
1077
+ }
1078
+ this.show_search_field_default();
1079
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1080
+ this.form_field_jq.trigger("change", {
1081
+ 'selected': this.form_field.options[item.options_index].value
1082
+ });
1083
+ }
1084
+ this.current_selectedIndex = this.form_field.selectedIndex;
1085
+ evt.preventDefault();
1086
+ return this.search_field_scale();
1087
+ }
1088
+ };
1089
+
1090
+ Chosen.prototype.single_set_selected_text = function(text) {
1091
+ if (text == null) {
1092
+ text = this.default_text;
1093
+ }
1094
+ if (text === this.default_text) {
1095
+ this.selected_item.addClass("chosen-default");
1096
+ } else {
1097
+ this.single_deselect_control_build();
1098
+ this.selected_item.removeClass("chosen-default");
1099
+ }
1100
+ return this.selected_item.find("span").html(text);
1101
+ };
1102
+
1103
+ Chosen.prototype.result_deselect = function(pos) {
1104
+ var result_data;
1105
+ result_data = this.results_data[pos];
1106
+ if (!this.form_field.options[result_data.options_index].disabled) {
1107
+ result_data.selected = false;
1108
+ this.form_field.options[result_data.options_index].selected = false;
1109
+ this.selected_option_count = null;
1110
+ this.result_clear_highlight();
1111
+ if (this.results_showing) {
1112
+ this.winnow_results();
1113
+ }
1114
+ this.form_field_jq.trigger("change", {
1115
+ deselected: this.form_field.options[result_data.options_index].value
1116
+ });
1117
+ this.search_field_scale();
1118
+ return true;
1119
+ } else {
1120
+ return false;
1121
+ }
1122
+ };
1123
+
1124
+ Chosen.prototype.single_deselect_control_build = function() {
1125
+ if (!this.allow_single_deselect) {
1126
+ return;
1127
+ }
1128
+ if (!this.selected_item.find("abbr").length) {
1129
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1130
+ }
1131
+ return this.selected_item.addClass("chosen-single-with-deselect");
1132
+ };
1133
+
1134
+ Chosen.prototype.get_search_text = function() {
1135
+ return $('<div/>').text($.trim(this.search_field.val())).html();
1136
+ };
1137
+
1138
+ Chosen.prototype.winnow_results_set_highlight = function() {
1139
+ var do_high, selected_results;
1140
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1141
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1142
+ if (do_high != null) {
1143
+ return this.result_do_highlight(do_high);
1144
+ }
1145
+ };
1146
+
1147
+ Chosen.prototype.no_results = function(terms) {
1148
+ var no_results_html;
1149
+ no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1150
+ no_results_html.find("span").first().html(terms);
1151
+ this.search_results.append(no_results_html);
1152
+ return this.form_field_jq.trigger("chosen:no_results", {
1153
+ chosen: this
1154
+ });
1155
+ };
1156
+
1157
+ Chosen.prototype.no_results_clear = function() {
1158
+ return this.search_results.find(".no-results").remove();
1159
+ };
1160
+
1161
+ Chosen.prototype.keydown_arrow = function() {
1162
+ var next_sib;
1163
+ if (this.results_showing && this.result_highlight) {
1164
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1165
+ if (next_sib) {
1166
+ return this.result_do_highlight(next_sib);
1167
+ }
1168
+ } else {
1169
+ return this.results_show();
1170
+ }
1171
+ };
1172
+
1173
+ Chosen.prototype.keyup_arrow = function() {
1174
+ var prev_sibs;
1175
+ if (!this.results_showing && !this.is_multiple) {
1176
+ return this.results_show();
1177
+ } else if (this.result_highlight) {
1178
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1179
+ if (prev_sibs.length) {
1180
+ return this.result_do_highlight(prev_sibs.first());
1181
+ } else {
1182
+ if (this.choices_count() > 0) {
1183
+ this.results_hide();
1184
+ }
1185
+ return this.result_clear_highlight();
1186
+ }
1187
+ }
1188
+ };
1189
+
1190
+ Chosen.prototype.keydown_backstroke = function() {
1191
+ var next_available_destroy;
1192
+ if (this.pending_backstroke) {
1193
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1194
+ return this.clear_backstroke();
1195
+ } else {
1196
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1197
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1198
+ this.pending_backstroke = next_available_destroy;
1199
+ if (this.single_backstroke_delete) {
1200
+ return this.keydown_backstroke();
1201
+ } else {
1202
+ return this.pending_backstroke.addClass("search-choice-focus");
1203
+ }
1204
+ }
1205
+ }
1206
+ };
1207
+
1208
+ Chosen.prototype.clear_backstroke = function() {
1209
+ if (this.pending_backstroke) {
1210
+ this.pending_backstroke.removeClass("search-choice-focus");
1211
+ }
1212
+ return this.pending_backstroke = null;
1213
+ };
1214
+
1215
+ Chosen.prototype.keydown_checker = function(evt) {
1216
+ var stroke, _ref1;
1217
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1218
+ this.search_field_scale();
1219
+ if (stroke !== 8 && this.pending_backstroke) {
1220
+ this.clear_backstroke();
1221
+ }
1222
+ switch (stroke) {
1223
+ case 8:
1224
+ this.backstroke_length = this.search_field.val().length;
1225
+ break;
1226
+ case 9:
1227
+ if (this.results_showing && !this.is_multiple) {
1228
+ this.result_select(evt);
1229
+ }
1230
+ this.mouse_on_container = false;
1231
+ break;
1232
+ case 13:
1233
+ if (this.results_showing) {
1234
+ evt.preventDefault();
1235
+ }
1236
+ break;
1237
+ case 32:
1238
+ if (this.disable_search) {
1239
+ evt.preventDefault();
1240
+ }
1241
+ break;
1242
+ case 38:
1243
+ evt.preventDefault();
1244
+ this.keyup_arrow();
1245
+ break;
1246
+ case 40:
1247
+ evt.preventDefault();
1248
+ this.keydown_arrow();
1249
+ break;
1250
+ }
1251
+ };
1252
+
1253
+ Chosen.prototype.search_field_scale = function() {
1254
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
1255
+ if (this.is_multiple) {
1256
+ h = 0;
1257
+ w = 0;
1258
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1259
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1260
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
1261
+ style = styles[_i];
1262
+ style_block += style + ":" + this.search_field.css(style) + ";";
1263
+ }
1264
+ div = $('<div />', {
1265
+ 'style': style_block
1266
+ });
1267
+ div.text(this.search_field.val());
1268
+ $('body').append(div);
1269
+ w = div.width() + 25;
1270
+ div.remove();
1271
+ f_width = this.container.outerWidth();
1272
+ if (w > f_width - 10) {
1273
+ w = f_width - 10;
1274
+ }
1275
+ return this.search_field.css({
1276
+ 'width': w + 'px'
1277
+ });
1278
+ }
1279
+ };
1280
+
1281
+ return Chosen;
1282
+
1283
+ })(AbstractChosen);
1284
+
1285
  }).call(this);
inc/js/images/lens.svg CHANGED
@@ -1,7 +1,7 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="19px" height="19px" viewBox="0 0 19 19">
4
- <circle cx="9" cy="9" r="7" stroke="#000000" stroke-width="1.5" fill-opacity="0"/>
5
- <line x1="6" y1="9" x2="12" y2="9" stroke="#000000" stroke-width="1.5"/>
6
- <line x1="14" y1="14" x2="19" y2="19" stroke="#000000" stroke-width="1.5"/>
7
  </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="19px" height="19px" viewBox="0 0 19 19">
4
+ <circle cx="9" cy="9" r="7" stroke="#000000" stroke-width="1.5" fill-opacity="0"/>
5
+ <line x1="6" y1="9" x2="12" y2="9" stroke="#000000" stroke-width="1.5"/>
6
+ <line x1="14" y1="14" x2="19" y2="19" stroke="#000000" stroke-width="1.5"/>
7
  </svg>
inc/js/jquery.cookie.js CHANGED
@@ -1,117 +1,117 @@
1
- /*!
2
- * jQuery Cookie Plugin v1.4.1
3
- * https://github.com/carhartl/jquery-cookie
4
- *
5
- * Copyright 2013 Klaus Hartl
6
- * Released under the MIT license
7
- */
8
- (function (factory) {
9
- if (typeof define === 'function' && define.amd) {
10
- // AMD
11
- define(['jquery'], factory);
12
- } else if (typeof exports === 'object') {
13
- // CommonJS
14
- factory(require('jquery'));
15
- } else {
16
- // Browser globals
17
- factory(jQuery);
18
- }
19
- }(function ($) {
20
-
21
- var pluses = /\+/g;
22
-
23
- function encode(s) {
24
- return config.raw ? s : encodeURIComponent(s);
25
- }
26
-
27
- function decode(s) {
28
- return config.raw ? s : decodeURIComponent(s);
29
- }
30
-
31
- function stringifyCookieValue(value) {
32
- return encode(config.json ? JSON.stringify(value) : String(value));
33
- }
34
-
35
- function parseCookieValue(s) {
36
- if (s.indexOf('"') === 0) {
37
- // This is a quoted cookie as according to RFC2068, unescape...
38
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
- }
40
-
41
- try {
42
- // Replace server-side written pluses with spaces.
43
- // If we can't decode the cookie, ignore it, it's unusable.
44
- // If we can't parse the cookie, ignore it, it's unusable.
45
- s = decodeURIComponent(s.replace(pluses, ' '));
46
- return config.json ? JSON.parse(s) : s;
47
- } catch(e) {}
48
- }
49
-
50
- function read(s, converter) {
51
- var value = config.raw ? s : parseCookieValue(s);
52
- return $.isFunction(converter) ? converter(value) : value;
53
- }
54
-
55
- var config = $.cookie = function (key, value, options) {
56
-
57
- // Write
58
-
59
- if (value !== undefined && !$.isFunction(value)) {
60
- options = $.extend({}, config.defaults, options);
61
-
62
- if (typeof options.expires === 'number') {
63
- var days = options.expires, t = options.expires = new Date();
64
- t.setTime(+t + days * 864e+5);
65
- }
66
-
67
- return (document.cookie = [
68
- encode(key), '=', stringifyCookieValue(value),
69
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
- options.path ? '; path=' + options.path : '',
71
- options.domain ? '; domain=' + options.domain : '',
72
- options.secure ? '; secure' : ''
73
- ].join(''));
74
- }
75
-
76
- // Read
77
-
78
- var result = key ? undefined : {};
79
-
80
- // To prevent the for loop in the first place assign an empty array
81
- // in case there are no cookies at all. Also prevents odd result when
82
- // calling $.cookie().
83
- var cookies = document.cookie ? document.cookie.split('; ') : [];
84
-
85
- for (var i = 0, l = cookies.length; i < l; i++) {
86
- var parts = cookies[i].split('=');
87
- var name = decode(parts.shift());
88
- var cookie = parts.join('=');
89
-
90
- if (key && key === name) {
91
- // If second argument (value) is a function it's a converter...
92
- result = read(cookie, value);
93
- break;
94
- }
95
-
96
- // Prevent storing a cookie that we couldn't decode.
97
- if (!key && (cookie = read(cookie)) !== undefined) {
98
- result[name] = cookie;
99
- }
100
- }
101
-
102
- return result;
103
- };
104
-
105
- config.defaults = {};
106
-
107
- $.removeCookie = function (key, options) {
108
- if ($.cookie(key) === undefined) {
109
- return false;
110
- }
111
-
112
- // Must not alter options, thus extending a fresh object...
113
- $.cookie(key, '', $.extend({}, options, { expires: -1 }));
114
- return !$.cookie(key);
115
- };
116
-
117
- }));
1
+ /*!
2
+ * jQuery Cookie Plugin v1.4.1
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2013 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD
11
+ define(['jquery'], factory);
12
+ } else if (typeof exports === 'object') {
13
+ // CommonJS
14
+ factory(require('jquery'));
15
+ } else {
16
+ // Browser globals
17
+ factory(jQuery);
18
+ }
19
+ }(function ($) {
20
+
21
+ var pluses = /\+/g;
22
+
23
+ function encode(s) {
24
+ return config.raw ? s : encodeURIComponent(s);
25
+ }
26
+
27
+ function decode(s) {
28
+ return config.raw ? s : decodeURIComponent(s);
29
+ }
30
+
31
+ function stringifyCookieValue(value) {
32
+ return encode(config.json ? JSON.stringify(value) : String(value));
33
+ }
34
+
35
+ function parseCookieValue(s) {
36
+ if (s.indexOf('"') === 0) {
37
+ // This is a quoted cookie as according to RFC2068, unescape...
38
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
+ }
40
+
41
+ try {
42
+ // Replace server-side written pluses with spaces.
43
+ // If we can't decode the cookie, ignore it, it's unusable.
44
+ // If we can't parse the cookie, ignore it, it's unusable.
45
+ s = decodeURIComponent(s.replace(pluses, ' '));
46
+ return config.json ? JSON.parse(s) : s;
47
+ } catch(e) {}
48
+ }
49
+
50
+ function read(s, converter) {
51
+ var value = config.raw ? s : parseCookieValue(s);
52
+ return $.isFunction(converter) ? converter(value) : value;
53
+ }
54
+
55
+ var config = $.cookie = function (key, value, options) {
56
+
57
+ // Write
58
+
59
+ if (value !== undefined && !$.isFunction(value)) {
60
+ options = $.extend({}, config.defaults, options);
61
+
62
+ if (typeof options.expires === 'number') {
63
+ var days = options.expires, t = options.expires = new Date();
64
+ t.setTime(+t + days * 864e+5);
65
+ }
66
+
67
+ return (document.cookie = [
68
+ encode(key), '=', stringifyCookieValue(value),
69
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
+ options.path ? '; path=' + options.path : '',
71
+ options.domain ? '; domain=' + options.domain : '',
72
+ options.secure ? '; secure' : ''
73
+ ].join(''));
74
+ }
75
+
76
+ // Read
77
+
78
+ var result = key ? undefined : {};
79
+
80
+ // To prevent the for loop in the first place assign an empty array
81
+ // in case there are no cookies at all. Also prevents odd result when
82
+ // calling $.cookie().
83
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
84
+
85
+ for (var i = 0, l = cookies.length; i < l; i++) {
86
+ var parts = cookies[i].split('=');
87
+ var name = decode(parts.shift());
88
+ var cookie = parts.join('=');
89
+
90
+ if (key && key === name) {
91
+ // If second argument (value) is a function it's a converter...
92
+ result = read(cookie, value);
93
+ break;
94
+ }
95
+
96
+ // Prevent storing a cookie that we couldn't decode.
97
+ if (!key && (cookie = read(cookie)) !== undefined) {
98
+ result[name] = cookie;
99
+ }
100
+ }
101
+
102
+ return result;
103
+ };
104
+
105
+ config.defaults = {};
106
+
107
+ $.removeCookie = function (key, options) {
108
+ if ($.cookie(key) === undefined) {
109
+ return false;
110
+ }
111
+
112
+ // Must not alter options, thus extending a fresh object...
113
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
114
+ return !$.cookie(key);
115
+ };
116
+
117
+ }));
inc/js/js_highlight.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! highlight.js v9.2.0 | BSD3 License | git.io/hljslicense */
2
  !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return w(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}f+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){f+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":E.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function h(){if(!k.k)return n(M);var e="",t=0;k.lR.lastIndex=0;for(var r=k.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(k,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=k.lR.lastIndex,r=k.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof k.sL;if(e&&!R[k.sL])return n(M);var t=e?f(k.sL,M,!0,y[k.sL]):l(M,k.sL.length?k.sL:void 0);return k.r>0&&(B+=t.r),e&&(y[k.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=void 0!==k.sL?d():h(),M=""}function v(e,n){L+=e.cN?p(e.cN,"",!0):"",k=Object.create(e,{parent:{value:k}})}function m(e,n){if(M+=e,void 0===n)return b(),0;var t=o(n,k);if(t)return t.skip?M+=n:(t.eB&&(M+=n),b(),t.rB||t.eB||(M=n)),v(t,n),t.rB?0:n.length;var r=u(k,n);if(r){var a=k;a.skip?M+=n:(a.rE||a.eE||(M+=n),b(),a.eE&&(M=n));do k.cN&&(L+="</span>"),k.skip||(B+=k.r),k=k.parent;while(k!=r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,k))throw new Error('Illegal lexeme "'+n+'" for mode "'+(k.cN||"<unnamed>")+'"');return M+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var x,k=i||N,y={},L="";for(x=k;x!=N;x=x.parent)x.cN&&(L=p(x.cN,"",!0)+L);var M="",B=0;try{for(var C,j,I=0;;){if(k.t.lastIndex=I,C=k.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),x=k;x.parent;x=x.parent)x.cN&&(L+="</span>");return{r:B,value:L,language:e,top:k}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g,"<br>")),e}function p(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function h(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");h.innerHTML=o.value,o.value=c(s,u(h),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=p(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function N(){return Object.keys(R)}function w(e){return e=(e||"").toLowerCase(),R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=h,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("javascript",function(e){return{aliases:["js","jsx"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:["self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});
1
+ /*! highlight.js v9.2.0 | BSD3 License | git.io/hljslicense */
2
  !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return w(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}f+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){f+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":E.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function h(){if(!k.k)return n(M);var e="",t=0;k.lR.lastIndex=0;for(var r=k.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(k,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=k.lR.lastIndex,r=k.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof k.sL;if(e&&!R[k.sL])return n(M);var t=e?f(k.sL,M,!0,y[k.sL]):l(M,k.sL.length?k.sL:void 0);return k.r>0&&(B+=t.r),e&&(y[k.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=void 0!==k.sL?d():h(),M=""}function v(e,n){L+=e.cN?p(e.cN,"",!0):"",k=Object.create(e,{parent:{value:k}})}function m(e,n){if(M+=e,void 0===n)return b(),0;var t=o(n,k);if(t)return t.skip?M+=n:(t.eB&&(M+=n),b(),t.rB||t.eB||(M=n)),v(t,n),t.rB?0:n.length;var r=u(k,n);if(r){var a=k;a.skip?M+=n:(a.rE||a.eE||(M+=n),b(),a.eE&&(M=n));do k.cN&&(L+="</span>"),k.skip||(B+=k.r),k=k.parent;while(k!=r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,k))throw new Error('Illegal lexeme "'+n+'" for mode "'+(k.cN||"<unnamed>")+'"');return M+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var x,k=i||N,y={},L="";for(x=k;x!=N;x=x.parent)x.cN&&(L=p(x.cN,"",!0)+L);var M="",B=0;try{for(var C,j,I=0;;){if(k.t.lastIndex=I,C=k.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),x=k;x.parent;x=x.parent)x.cN&&(L+="</span>");return{r:B,value:L,language:e,top:k}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g,"<br>")),e}function p(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function h(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");h.innerHTML=o.value,o.value=c(s,u(h),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=p(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function N(){return Object.keys(R)}function w(e){return e=(e||"").toLowerCase(),R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=h,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("javascript",function(e){return{aliases:["js","jsx"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:["self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});
inc/js/loader.js CHANGED
@@ -1,147 +1,147 @@
1
- (function (){ var b="",aa="\x00",ba="\n",ca="\n//# sourceURL=",da="\n;return exports});\n//# sourceURL=",k=" ",ea=" &#160;",fa=" onreadystatechange='goog.onScriptLoad_(this, ",ga=" should not be enumerable in Object.prototype.",l='"',ha='");',ia='">\x3c/script>',ja="#",ka="$1",la="%s",q="&",ma="&#0;",na="&#101;",oa="&#39;",pa="&amp;",qa="&gt;",ra="&lt;",sa="&quot;",ta="'",ua="(^",va=")' ",wa=")([a-z])",xa=");",ya=", ",za="-",Aa="-$1",r=".",Ba="..",Ca="...",u="/",Da="/loader.js",v="0",Ea="0,(function(){",w=": ",
2
- x="<",Fa="\x3c/script>",Ga="<br />",Ha="<br>",Ia='<script type="text/javascript" src="',Ja='<script type="text/javascript">',Ka=">",La=">\x3c/script>",Ma="?",Na="Already loaded ",Pa="American Samoa",Qa="Antigua and Barbuda",Ra="Assertion failed",Sa="BY_WHOLE",y="Bolivia",z="Bosna i Hercegovina",Ta="Botswana",Ua="British Virgin Islands",Va="Cayman Islands",Wa="Christmas Island",Xa="Expected Element but got %s: %s.",Ya="Expected array but got %s: %s.",Za="Expected boolean but got %s: %s.",$a="Expected function but got %s: %s.",
3
- ab="Expected instanceof %s but got %s.",bb="Expected number but got %s: %s.",cb="Expected object but got %s: %s.",db="Expected string but got %s: %s.",eb="Failure",fb="Falkland Islands",B="Ghana",gb="Guin\u00e9e \u00e9quatoriale",hb="Guyane fran\u00e7aise",ib="HEAD",jb="Honduras",kb="Indonesia",lb="Itoophiyaa",mb="JavaScript",nb="Kalaallit Nunaat",ob="Kiribati",pb="Load packages + dependencies - previous: ",qb="Loading css files: ",rb="LocaleNameConstants",sb="Luxembourg",tb="Madagascar",ub="Marshall Islands",
4
- C="Micronesia",vb="Moldova, Republica",wb="Nederlandse Antillen",xb="New Zealand",D="Nigeria",yb="Norfolk Island",zb="Northern Mariana Islands",Ab="Nouvelle-Cal\u00e9donie",E="Papua New Guinea",Bb="Paraguay",Cb="Philippines",Db="Polyn\u00e9sie fran\u00e7aise",Eb="Puerto Rico",Fb="Rep\u00fablica Dominicana",F="Rwanda",Gb="Rywvaneth Unys",Hb="R\u00e9publique centrafricaine",Ib="R\u00e9publique d\u00e9mocratique du Congo",Jb="SCRIPT",Kb="Saint Kitts and Nevis",Lb="Saint Vincent and the Grenadines",Mb=
5
- "Saint-Pierre-et-Miquelon",Nb="Serbia and Montenegro",Ob="Seychelles",Pb="Slovensk\u00e1 republika",Qb="Solomon Islands",G="South Africa",Rb="Svalbard og Jan Mayen",Ub="Swaziland",Vb="S\u00e3o Tom\u00e9 e Pr\u00edncipe",H="S\u00e9n\u00e9gal",Wb="Tanzania",Xb="Timor Leste",I="Tokelau",Yb="Turks and Caicos Islands",J="Tuvalu",K="T\u00fcrkiye",Zb="U.S. Virgin Islands",$b="United Kingdom",ac="United States",bc="United States Minor Outlying Islands",cc="Unknown or Invalid Region",L="Vanuatu",dc="Wallis-et-Futuna",
6
- ec="[object Array]",fc="[object Function]",gc="[object Window]",hc="\\$1",ic="\\s",jc="\\u",kc="\\x",lc="\\x08",mc="]+",M="_",nc="amp",oc="annotatedtimeline",N="array",pc="base.js",qc="boolean",O="browserchart",rc="call",sc="callback after loading ",tc="charts",P="complete",uc="corechart",vc="div",wc="document",Q="dygraph",xc="e",yc="en",zc="end loadScript: ",Ac="error",R="function",Bc="g",Cc="get",Dc="goog",Ec="goog.loadModule(",Fc='goog.loadModule(function(exports) {"use strict";',Gc='goog.retrieveAndExecModule_("',
7
- Hc="goog_",Ic="google",Jc="google.charts.load",Kc="google.charts.load version ",Lc="gt",Mc="head",Nc="href",Oc="id",Pc="iframe",S="imagechart",Qc="javascript",Rc="link",Sc="load",Tc="load-css-",Uc="loadCSSFile: ",Vc="loadScript: ",Wc="loading css failed: ",Xc="lt",Yc="native code",Zc="none",$c="null",ad="number",bd="o",T="object",cd="onload",dd="quot",ed="rel",fd="removeAttribute",gd="script",hd="splice",id="string",jd="stylesheet",kd="text/css",ld="text/javascript",U="top",md="type",V="ui",nd="ui_base",
8
- od="unknown",pd="unknown type name",qd="var ",rd="var _evalTest_ = 1;",sd="visualization",td="webfontloader",ud="write",vd="{cssFile}",wd="{language}",xd="{package}",yd="{prefix}",zd="{prefix}/{version}/css/{cssFile}",Ad="{prefix}/{version}/third_party/{package}",Bd="{version}",Cd="|[",Dd="})",Ed="~",Fd="\u0080",Gd="\u010cesk\u00e1 republika",Hd="\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c",Id="\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d",Jd="\u043c\u043e\u043d\u0433\u043e\u043b\u044c\u0441\u043a\u0438\u0439",
9
- Kd="\u0540\u0561\u0575\u0561\u057d\u057f\u0561\u0576\u056b \u0540\u0561\u0576\u0580\u0561\u057a\u0565\u057f\u0578\u0582\u0569\u056b\u0582\u0576",Ld="\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",Md="\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629",Nd="\u0627\u0644\u0635\u062d\u0631\u0627\u0621 \u0627\u0644\u063a\u0631\u0628\u064a\u0629",Od="\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629",
10
- Pd="\u0627\u0644\u0648\u0644\u0627\u064a\u0627\u062a \u0627\u0644\u0645\u062a\u062d\u062f\u0629 \u0627\u0644\u0623\u0645\u0631\u064a\u0643\u064a\u0629",Qd="\u062c\u0632\u0631 \u0627\u0644\u0642\u0645\u0631",Rd="\u067e\u0627\u06a9\u0633\u062a\u0627\u0646",W="\u092d\u093e\u0930\u0924",X="\u12a2\u1275\u12ee\u1335\u12eb",Sd="\uc870\uc120 \ubbfc\uc8fc\uc8fc\uc758 \uc778\ubbfc \uacf5\ud654\uad6d",Td="\ufffd";function Y(){return function(){}}var Z=Z||{};Z.global=this;Z.P=function(a){return void 0!==a};
11
- Z.Aa=function(a,c,d){a=a.split(r);d=d||Z.global;a[0]in d||!d.execScript||d.execScript(qd+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&Z.P(c)?d[e]=c:d=d[e]?d[e]:d[e]={}};Z.ue=function(a,c){Z.Aa(a,c)};Z.H=!0;Z.Cd=yc;Z.ra=!0;Z.ec=!1;Z.Ob=!Z.H;Z.Ya=!1;Z.Gf=function(a){if(Z.La())throw Error("goog.provide can not be used within a goog.module.");Z.fb(a)};Z.fb=function(a,c){Z.Aa(a,c)};Z.mc=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
12
- Z.Oa=function(a){if(!Z.h(a)||!a||-1==a.search(Z.mc))throw Error("Invalid module identifier");if(!Z.La())throw Error("Module "+a+" has been loaded incorrectly.");if(Z.j.Pa)throw Error("goog.module may only be called once per module.");Z.j.Pa=a};Z.Oa.get=Y();Z.Oa.Ge=Y();Z.j=null;Z.La=function(){return null!=Z.j};Z.Oa.xa=function(){Z.j.xa=!0};Z.Zf=function(a){if(Z.Ob)throw a=a||b,Error("Importing test-only code into non-debug environment"+(a?w+a:r));};Z.Be=Y();
13
- Z.kb=function(){for(var a=[Ic,tc,Sc],c=Z.global,d;d=a.shift();)if(Z.Ic(c[d]))c=c[d];else return null;return c};Z.Re=function(a,c){var d=c||Z.global,e;for(e in a)d[e]=a[e]};Z.Id=function(a,c,d,e){if(Z.Wa){var f;a=a.replace(/\\/g,u);var g=Z.i;e&&typeof e!==qc||(e=e?{module:Dc}:{});for(var h=0;f=c[h];h++)g.U[f]=a,g.Ra[a]=e.module==Dc;for(e=0;c=d[e];e++)a in g.G||(g.G[a]={}),g.G[a][c]=!0}};Z.yg=!1;Z.zd=!0;Z.uf=function(a){Z.global.console&&Z.global.console.error(a)};Z.Uf=Y();Z.F=b;Z.Bf=Y();
14
- Z.Hd=function(){throw Error("unimplemented abstract method");};Z.Jd=function(a){a.Fe=function(){if(a.vb)return a.vb;Z.H&&(Z.wb[Z.wb.length]=a);return a.vb=new a}};Z.wb=[];Z.Vb=!0;Z.cc=Z.H;Z.Sc={};Z.Wa=!1;
15
- Z.Wa&&(Z.i={Ra:{},U:{},G:{},Hb:{},qa:{},X:{}},Z.tb=function(){var a=Z.global.document;return null!=a&&ud in a},Z.Ac=function(){if(Z.P(Z.global.Lb))Z.F=Z.global.Lb;else if(Z.tb())for(var a=Z.global.document.getElementsByTagName(Jb),c=a.length-1;0<=c;--c){var d=a[c].src,e=d.lastIndexOf(Ma),e=-1==e?d.length:e;if(d.substr(e-7,7)==pc){Z.F=d.substr(0,e-7);break}}},Z.Ha=function(a,c){(Z.global.rd||Z.od)(a,c)&&(Z.i.qa[a]=!0)},Z.Ub=!(Z.global.atob||!Z.global.document||!Z.global.document.all),Z.Gc=function(a){Z.Ha(b,
16
- Gc+a+ha)&&(Z.i.qa[a]=!0)},Z.Sa=[],Z.Ag=function(a,c){return Z.Vb&&Z.P(Z.global.JSON)?Ec+Z.global.JSON.stringify(c+ca+a+ba)+xa:Fc+c+da+a+ba},Z.Rc=function(){var a=Z.Sa.length;if(0<a){var c=Z.Sa;Z.Sa=[];for(var d=0;d<a;d++)Z.Bb(c[d])}},Z.vf=function(a){Z.xb(a)&&Z.nc(a)&&Z.Bb(Z.F+Z.Ga(a))},Z.xb=function(a){return(a=Z.Ga(a))&&Z.i.Ra[a]?Z.F+a in Z.i.X:!1},Z.nc=function(a){if((a=Z.Ga(a))&&a in Z.i.G)for(var c in Z.i.G[a])if(!Z.Mc(c)&&!Z.xb(c))return!1;return!0},Z.Bb=function(a){if(a in Z.i.X){var c=Z.i.X[a];
17
- delete Z.i.X[a];Z.Fc(c)}},Z.tf=Y(),Z.sf=function(a){var c=Z.j;try{Z.j={Pa:void 0,xa:!1};var d;if(Z.yb(a))d=a.call(Z.global,{});else if(Z.h(a))d=Z.Pc.call(Z.global,a);else throw Error("Invalid module definition");var e=Z.j.Pa;if(!Z.h(e)||!e)throw Error('Invalid module name "'+e+l);Z.j.xa?Z.fb(e,d):Z.cc&&Object.seal&&Object.seal(d);Z.Sc[e]=d}finally{Z.j=c}},Z.Pc=function(a){eval(a);return{}},Z.md=function(a){Z.global.document.write(Ia+a+ia)},Z.pc=function(a){var c=Z.global.document,d=c.createElement(gd);
18
- d.type=ld;d.src=a;d.defer=!1;d.async=!1;c.head.appendChild(d)},Z.od=function(a,c){if(Z.tb()){var d=Z.global.document;if(!Z.Ya&&d.readyState==P){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}var e=Z.Ub;void 0===c?e?(e=fa+ ++Z.zb+va,d.write(Ia+a+l+e+La)):Z.Ya?Z.pc(a):Z.md(a):d.write(Ja+c+Fa);return!0}return!1},Z.zb=0,Z.Df=function(a,c){a.readyState==P&&Z.zb==c&&Z.Rc();return!0},Z.Bg=function(a){function c(a){if(!(a in f.qa||a in f.Hb)){f.Hb[a]=!0;if(a in f.G)for(var g in f.G[a])if(!Z.Mc(g))if(g in
19
- f.U)c(f.U[g]);else throw Error("Undefined nameToPath for "+g);a in e||(e[a]=!0,d.push(a))}}var d=[],e={},f=Z.i;c(a);for(a=0;a<d.length;a++){var g=d[a];Z.i.qa[g]=!0}var h=Z.j;Z.j=null;for(a=0;a<d.length;a++)if(g=d[a])f.Ra[g]?Z.Gc(Z.F+g):Z.Ha(Z.F+g);else throw Z.j=h,Error("Undefined script input");Z.j=h},Z.Ga=function(a){return a in Z.i.U?Z.i.U[a]:null},Z.Ac(),Z.global.td||Z.Ha(Z.F+"deps.js"));
20
- Z.yf=function(a){a=a.split(u);for(var c=0;c<a.length;)a[c]==r?a.splice(c,1):c&&a[c]==Ba&&a[c-1]&&a[c-1]!=Ba?a.splice(--c,2):c++;return a.join(u)};Z.rf=function(a){if(Z.global.Mb)return Z.global.Mb(a);var c=new Z.global.XMLHttpRequest;c.open(Cc,a,!1);c.send();return c.responseText};Z.Vf=Y();
21
- Z.s=function(a){var c=typeof a;if(c==T)if(a){if(a instanceof Array)return N;if(a instanceof Object)return c;var d=Object.prototype.toString.call(a);if(d==gc)return T;if(d==ec||typeof a.length==ad&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(hd))return N;if(d==fc||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(rc))return R}else return $c;else if(c==R&&"undefined"==typeof a.call)return T;return c};
22
- Z.gf=function(a){return null===a};Z.Ic=function(a){return null!=a};Z.isArray=function(a){return Z.s(a)==N};Z.Ja=function(a){var c=Z.s(a);return c==N||c==T&&typeof a.length==ad};Z.bf=function(a){return Z.$(a)&&typeof a.getFullYear==R};Z.h=function(a){return typeof a==id};Z.Hc=function(a){return typeof a==qc};Z.Lc=function(a){return typeof a==ad};Z.yb=function(a){return Z.s(a)==R};Z.$=function(a){var c=typeof a;return c==T&&null!=a||c==R};Z.qb=function(a){return a[Z.D]||(a[Z.D]=++Z.hd)};Z.Se=function(a){return!!a[Z.D]};
23
- Z.Zc=function(a){null!==a&&fd in a&&a.removeAttribute(Z.D);try{delete a[Z.D]}catch(c){}};Z.D="closure_uid_"+(1E9*Math.random()>>>0);Z.hd=0;Z.De=Z.qb;Z.Rf=Z.Zc;Z.uc=function(a){var c=Z.s(a);if(c==T||c==N){if(a.clone)return a.clone();var c=c==N?[]:{},d;for(d in a)c[d]=Z.uc(a[d]);return c}return a};Z.tc=function(a,c,d){return a.call.apply(a.bind,arguments)};
24
- Z.rc=function(a,c,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(c,d)}}return function(){return a.apply(c,arguments)}};Z.bind=function(a,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(Yc)?Z.bind=Z.tc:Z.bind=Z.rc;return Z.bind.apply(null,arguments)};
25
- Z.Wc=function(a,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return a.apply(this,c)}};Z.wf=function(a,c){for(var d in c)a[d]=c[d]};Z.now=Z.ra&&Date.now||function(){return+new Date};
26
- Z.Fc=function(a){if(Z.global.execScript)Z.global.execScript(a,mb);else if(Z.global.eval){if(null==Z.Y)if(Z.global.eval(rd),"undefined"!=typeof Z.global._evalTest_){try{delete Z.global._evalTest_}catch(e){}Z.Y=!0}else Z.Y=!1;if(Z.Y)Z.global.eval(a);else{var c=Z.global.document,d=c.createElement(Jb);d.type=ld;d.defer=!1;d.appendChild(c.createTextNode(a));c.body.appendChild(d);c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};Z.Y=null;
27
- Z.Ce=function(a,c){function d(a){a=a.split(za);for(var c=[],d=0;d<a.length;d++)c.push(e(a[d]));return c.join(za)}function e(a){return Z.gb[a]||a}var f;f=Z.gb?Z.xc==Sa?e:d:function(a){return a};return c?a+za+f(c):f(a)};Z.Wf=function(a,c){Z.gb=a;Z.xc=c};Z.Je=function(a,c){c&&(a=a.replace(/\{\$([^}]+)}/g,function(a,e){return null!=c&&e in c?c[e]:a}));return a};Z.Ke=function(a){return a};Z.Ba=function(a,c){Z.Aa(a,c,void 0)};Z.ze=function(a,c,d){a[c]=d};
28
- Z.Ia=function(a,c){function d(){}d.prototype=c.prototype;a.oa=c.prototype;a.prototype=new d;a.prototype.constructor=a;a.qc=function(a,d,g){for(var h=Array(arguments.length-2),m=2;m<arguments.length;m++)h[m-2]=arguments[m];return c.prototype[d].apply(a,h)}};
29
- Z.qc=function(a,c,d){var e=arguments.callee.caller;if(Z.ec||Z.H&&!e)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(e.oa){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.oa.constructor.apply(a,f)}f=Array(arguments.length-2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];for(var g=!1,h=a.constructor;h;h=h.oa&&h.oa.constructor)if(h.prototype[c]===
30
- e)g=!0;else if(g)return h.prototype[c].apply(a,f);if(a[c]===e)return a.constructor.prototype[c].apply(a,f);throw Error("goog.base called from a method of one name to a method of a different name");};Z.scope=function(a){if(Z.La())throw Error("goog.scope is not supported within a goog.module.");a.call(Z.global)};
31
- Z.u=function(a,c){var d=c.constructor,e=c.cd;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=Z.u.vc(d,a);a&&Z.Ia(d,a);delete c.constructor;delete c.cd;Z.u.$a(d.prototype,c);null!=e&&(e instanceof Function?e(d):Z.u.$a(d,e));return d};Z.u.bc=Z.H;
32
- Z.u.vc=function(a,c){if(Z.u.bc&&Object.seal instanceof Function){if(c&&c.prototype&&c.prototype[Z.kc])return a;var d=function(){var c=a.apply(this,arguments)||this;c[Z.D]=c[Z.D];this.constructor===d&&Object.seal(c);return c};return d}return a};Z.u.Za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
33
- Z.u.$a=function(a,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);for(var e=0;e<Z.u.Za.length;e++)d=Z.u.Za[e],Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])};Z.gg=Y();Z.kc="goog_defineClass_legacy_unsealable";Z.debug={};Z.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Z.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a))};Z.Ia(Z.debug.Error,Error);Z.debug.Error.prototype.name="CustomError";Z.hb={};Z.hb.$b={Pb:1,pd:2,Gd:3,qd:4,Bd:5,Ad:6,Fd:7,ud:8,wd:9,yd:10,xd:11,Dd:12};Z.c={};Z.c.Xa=!1;Z.c.Rb=!1;Z.c.lc={Yb:"\u00a0"};Z.c.startsWith=function(a,c){return 0==a.lastIndexOf(c,0)};Z.c.endsWith=function(a,c){var d=a.length-c.length;return 0<=d&&a.indexOf(c,d)==d};Z.c.je=function(a,c){return 0==Z.c.eb(c,a.substr(0,c.length))};Z.c.fe=function(a,c){return 0==Z.c.eb(c,a.substr(a.length-c.length,c.length))};Z.c.ge=function(a,c){return a.toLowerCase()==c.toLowerCase()};
34
- Z.c.dd=function(a,c){for(var d=a.split(la),e=b,f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join(la)};Z.c.le=function(a){return a.replace(/[\s\xa0]+/g,k).replace(/^\s+|\s+$/g,b)};Z.c.Ka=function(a){return/^[\s\xa0]*$/.test(a)};Z.c.df=function(a){return 0==a.length};Z.c.Jc=Z.c.Ka;Z.c.Kc=function(a){return Z.c.Ka(Z.c.Tc(a))};Z.c.cf=Z.c.Kc;Z.c.$e=function(a){return!/[^\t\n\r ]/.test(a)};Z.c.Ye=function(a){return!/[^a-zA-Z]/.test(a)};Z.c.hf=function(a){return!/[^0-9]/.test(a)};
35
- Z.c.Ze=function(a){return!/[^a-zA-Z0-9]/.test(a)};Z.c.lf=function(a){return a==k};Z.c.mf=function(a){return 1==a.length&&a>=k&&a<=Ed||a>=Fd&&a<=Td};Z.c.eg=function(a){return a.replace(/(\r\n|\r|\n)+/g,k)};Z.c.Yd=function(a){return a.replace(/(\r\n|\r|\n)/g,ba)};Z.c.Af=function(a){return a.replace(/\xa0|\s/g,k)};Z.c.zf=function(a){return a.replace(/\xa0|[ \t]+/g,k)};Z.c.ke=function(a){return a.replace(/[\t\r\n ]+/g,k).replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,b)};
36
- Z.c.trim=Z.ra&&String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,b)};Z.c.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,b)};Z.c.trimRight=function(a){return a.replace(/[\s\xa0]+$/,b)};Z.c.eb=function(a,c){var d=String(a).toLowerCase(),e=String(c).toLowerCase();return d<e?-1:d==e?0:1};
37
- Z.c.Db=function(a,c,d){if(a==c)return 0;if(!a)return-1;if(!c)return 1;for(var e=a.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var m=f[h];if(d!=m)return a=parseInt(d,10),!isNaN(a)&&(c=parseInt(m,10),!isNaN(c)&&a-c)?a-c:d<m?-1:1}return e.length!=f.length?e.length-f.length:a<c?-1:1};Z.c.We=function(a,c){return Z.c.Db(a,c,/\d+|\D+/g)};Z.c.Dc=function(a,c){return Z.c.Db(a,c,/\d+|\.\d+|\D+/g)};Z.c.Cf=Z.c.Dc;Z.c.xg=function(a){return encodeURIComponent(String(a))};
38
- Z.c.wg=function(a){return decodeURIComponent(a.replace(/\+/g,k))};Z.c.Uc=function(a,c){return a.replace(/(\r\n|\r|\n)/g,c?Ga:Ha)};Z.c.rb=function(a){if(!Z.c.Jb.test(a))return a;-1!=a.indexOf(q)&&(a=a.replace(Z.c.Kb,pa));-1!=a.indexOf(x)&&(a=a.replace(Z.c.Xb,ra));-1!=a.indexOf(Ka)&&(a=a.replace(Z.c.Sb,qa));-1!=a.indexOf(l)&&(a=a.replace(Z.c.ac,sa));-1!=a.indexOf(ta)&&(a=a.replace(Z.c.dc,oa));-1!=a.indexOf(aa)&&(a=a.replace(Z.c.Zb,ma));Z.c.Xa&&-1!=a.indexOf(xc)&&(a=a.replace(Z.c.Qb,na));return a};
39
- Z.c.Kb=/&/g;Z.c.Xb=/</g;Z.c.Sb=/>/g;Z.c.ac=/"/g;Z.c.dc=/'/g;Z.c.Zb=/\x00/g;Z.c.Qb=/e/g;Z.c.Jb=Z.c.Xa?/[\x00&<>"'e]/:/[\x00&<>"']/;Z.c.Fb=function(a){return Z.c.contains(a,q)?!Z.c.Rb&&wc in Z.global?Z.c.Gb(a):Z.c.jd(a):a};Z.c.vg=function(a,c){return Z.c.contains(a,q)?Z.c.Gb(a,c):a};
40
- Z.c.Gb=function(a,c){var d={"&amp;":q,"&lt;":x,"&gt;":Ka,"&quot;":l},e;e=c?c.createElement(vc):Z.global.document.createElement(vc);return a.replace(Z.c.Tb,function(a,c){var h=d[a];if(h)return h;if(c.charAt(0)==ja){var m=Number(v+c.substr(1));isNaN(m)||(h=String.fromCharCode(m))}h||(e.innerHTML=a+k,h=e.firstChild.nodeValue.slice(0,-1));return d[a]=h})};
41
- Z.c.jd=function(a){return a.replace(/&([^;]+);/g,function(a,d){switch(d){case nc:return q;case Xc:return x;case Lc:return Ka;case dd:return l;default:if(d.charAt(0)==ja){var e=Number(v+d.substr(1));if(!isNaN(e))return String.fromCharCode(e)}return a}})};Z.c.Tb=/&([^;\s<&]+);?/g;Z.c.zg=function(a,c){return Z.c.Uc(a.replace(/ /g,ea),c)};Z.c.Ff=function(a){return a.replace(/(^|[\n ]) /g,ka+Z.c.lc.Yb)};
42
- Z.c.fg=function(a,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(a.charAt(0)==f&&a.charAt(a.length-1)==f)return a.substring(1,a.length-1)}return a};Z.c.truncate=function(a,c,d){d&&(a=Z.c.Fb(a));a.length>c&&(a=a.substring(0,c-3)+Ca);d&&(a=Z.c.rb(a));return a};
43
- Z.c.rg=function(a,c,d,e){d&&(a=Z.c.Fb(a));if(e&&a.length>c)e>c&&(e=c),a=a.substring(0,c-e)+Ca+a.substring(a.length-e);else if(a.length>c){e=Math.floor(c/2);var f=a.length-e;a=a.substring(0,e+c%2)+Ca+a.substring(f)}d&&(a=Z.c.rb(a));return a};Z.c.Va={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":x};Z.c.ea={"'":"\\'"};
44
- Z.c.quote=function(a){a=String(a);for(var c=[l],d=0;d<a.length;d++){var e=a.charAt(d),f=e.charCodeAt(0);c[d+1]=Z.c.Va[e]||(31<f&&127>f?e:Z.c.ib(e))}c.push(l);return c.join(b)};Z.c.ye=function(a){for(var c=[],d=0;d<a.length;d++)c[d]=Z.c.ib(a.charAt(d));return c.join(b)};
45
- Z.c.ib=function(a){if(a in Z.c.ea)return Z.c.ea[a];if(a in Z.c.Va)return Z.c.ea[a]=Z.c.Va[a];var c=a,d=a.charCodeAt(0);if(31<d&&127>d)c=a;else{if(256>d){if(c=kc,16>d||256<d)c+=v}else c=jc,4096>d&&(c+=v);c+=d.toString(16).toUpperCase()}return Z.c.ea[a]=c};Z.c.contains=function(a,c){return-1!=a.indexOf(c)};Z.c.$d=function(a,c){return Z.c.contains(a.toLowerCase(),c.toLowerCase())};Z.c.qe=function(a,c){return a&&c?a.split(c).length-1:0};
46
- Z.c.L=function(a,c,d){var e=a;0<=c&&c<a.length&&0<d&&(e=a.substr(0,c)+a.substr(c+d,a.length-c-d));return e};Z.c.remove=function(a,c){var d=new RegExp(Z.c.Ta(c),b);return a.replace(d,b)};Z.c.Of=function(a,c){var d=new RegExp(Z.c.Ta(c),Bc);return a.replace(d,b)};Z.c.Ta=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,hc).replace(/\x08/g,lc)};Z.c.repeat=String.prototype.repeat?function(a,c){return a.repeat(c)}:function(a,c){return Array(c+1).join(a)};
47
- Z.c.Ef=function(a,c,d){a=Z.P(d)?a.toFixed(d):String(a);d=a.indexOf(r);-1==d&&(d=a.length);return Z.c.repeat(v,Math.max(0,c-d))+a};Z.c.Tc=function(a){return null==a?b:String(a)};Z.c.Xd=function(a){return Array.prototype.join.call(arguments,b)};Z.c.Ne=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Z.now()).toString(36)};
48
- Z.c.oe=function(a,c){for(var d=0,e=Z.c.trim(String(a)).split(r),f=Z.c.trim(String(c)).split(r),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var m=e[h]||b,n=f[h]||b,p=/(\d*)(\D*)/g,Oa=/(\d*)(\D*)/g;do{var A=p.exec(m)||[b,b,b],t=Oa.exec(n)||[b,b,b];if(0==A[0].length&&0==t[0].length)break;d=Z.c.ua(0==A[1].length?0:parseInt(A[1],10),0==t[1].length?0:parseInt(t[1],10))||Z.c.ua(0==A[2].length,0==t[2].length)||Z.c.ua(A[2],t[2])}while(0==d)}return d};Z.c.ua=function(a,c){return a<c?-1:a>c?1:0};
49
- Z.c.Te=function(a){for(var c=0,d=0;d<a.length;++d)c=31*c+a.charCodeAt(d)>>>0;return c};Z.c.kd=2147483648*Math.random()|0;Z.c.re=function(){return Hc+Z.c.kd++};Z.c.jg=function(a){var c=Number(a);return 0==c&&Z.c.Ka(a)?NaN:c};Z.c.ef=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};Z.c.nf=function(a){return/^([A-Z][a-z]*)+$/.test(a)};Z.c.hg=function(a){return String(a).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})};Z.c.pg=function(a){return String(a).replace(/([A-Z])/g,Aa).toLowerCase()};
50
- Z.c.qg=function(a,c){var d=Z.h(c)?Z.c.Ta(c):ic;return a.replace(new RegExp(ua+(d?Cd+d+mc:b)+wa,Bc),function(a,c,d){return c+d.toUpperCase()})};Z.c.Zd=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};Z.c.parseInt=function(a){isFinite(a)&&(a=String(a));return Z.h(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};Z.c.cg=function(a,c,d){a=a.split(c);for(var e=[];0<d&&a.length;)e.push(a.shift()),d--;a.length&&e.push(a.join(c));return e};
51
- Z.c.qf=function(a,c){if(c)typeof c==id&&(c=[c]);else return a;for(var d=-1,e=0;e<c.length;e++)if(c[e]!=b){var f=a.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?a:a.slice(d+1)};Z.c.we=function(a,c){var d=[],e=[];if(a==c)return 0;if(!a.length||!c.length)return Math.max(a.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<a.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(a[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};Z.g={};Z.g.o=Z.H;Z.g.V=function(a,c){c.unshift(a);Z.debug.Error.call(this,Z.c.dd.apply(null,c));c.shift()};Z.Ia(Z.g.V,Z.debug.Error);Z.g.V.prototype.name="AssertionError";Z.g.Nb=function(a){throw a;};Z.g.ya=Z.g.Nb;Z.g.A=function(a,c,d,e){var f=Ra;if(d)var f=f+(w+d),g=e;else a&&(f+=w+a,g=c);a=new Z.g.V(b+f,g||[]);Z.g.ya(a)};Z.g.Xf=function(a){Z.g.o&&(Z.g.ya=a)};Z.g.assert=function(a,c,d){Z.g.o&&!a&&Z.g.A(b,null,c,Array.prototype.slice.call(arguments,2));return a};
52
- Z.g.Ca=function(a,c){Z.g.o&&Z.g.ya(new Z.g.V(eb+(a?w+a:b),Array.prototype.slice.call(arguments,1)))};Z.g.Pd=function(a,c,d){Z.g.o&&!Z.Lc(a)&&Z.g.A(bb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Sd=function(a,c,d){Z.g.o&&!Z.h(a)&&Z.g.A(db,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Nd=function(a,c,d){Z.g.o&&!Z.yb(a)&&Z.g.A($a,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
53
- Z.g.Qd=function(a,c,d){Z.g.o&&!Z.$(a)&&Z.g.A(cb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Kd=function(a,c,d){Z.g.o&&!Z.isArray(a)&&Z.g.A(Ya,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Ld=function(a,c,d){Z.g.o&&!Z.Hc(a)&&Z.g.A(Za,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Md=function(a,c,d){!Z.g.o||Z.$(a)&&a.nodeType==Z.hb.$b.Pb||Z.g.A(Xa,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
54
- Z.g.Od=function(a,c,d,e){!Z.g.o||a instanceof c||Z.g.A(ab,[Z.g.pb(c),Z.g.pb(a)],d,Array.prototype.slice.call(arguments,3));return a};Z.g.Rd=function(){for(var a in Object.prototype)Z.g.Ca(a+ga)};Z.g.pb=function(a){return a instanceof Function?a.displayName||a.name||pd:a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?$c:typeof a};Z.f={};Z.w=Z.ra;Z.f.v=!1;Z.f.Xc=function(a){return a[a.length-1]};Z.f.pf=Z.f.Xc;Z.f.indexOf=Z.w&&(Z.f.v||Array.prototype.indexOf)?function(a,c,d){return Array.prototype.indexOf.call(a,c,d)}:function(a,c,d){d=null==d?0:0>d?Math.max(0,a.length+d):d;if(Z.h(a))return Z.h(c)&&1==c.length?a.indexOf(c,d):-1;for(;d<a.length;d++)if(d in a&&a[d]===c)return d;return-1};
55
- Z.f.lastIndexOf=Z.w&&(Z.f.v||Array.prototype.lastIndexOf)?function(a,c,d){return Array.prototype.lastIndexOf.call(a,c,null==d?a.length-1:d)}:function(a,c,d){d=null==d?a.length-1:d;0>d&&(d=Math.max(0,a.length+d));if(Z.h(a))return Z.h(c)&&1==c.length?a.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in a&&a[d]===c)return d;return-1};
56
- Z.f.forEach=Z.w&&(Z.f.v||Array.prototype.forEach)?function(a,c,d){Array.prototype.forEach.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)g in f&&c.call(d,f[g],g,a)};Z.f.jb=function(a,c){for(var d=Z.h(a)?a.split(b):a,e=a.length-1;0<=e;--e)e in d&&c.call(void 0,d[e],e,a)};
57
- Z.f.filter=Z.w&&(Z.f.v||Array.prototype.filter)?function(a,c,d){return Array.prototype.filter.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=[],g=0,h=Z.h(a)?a.split(b):a,m=0;m<e;m++)if(m in h){var n=h[m];c.call(d,n,m,a)&&(f[g++]=n)}return f};Z.f.map=Z.w&&(Z.f.v||Array.prototype.map)?function(a,c,d){return Array.prototype.map.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Array(e),g=Z.h(a)?a.split(b):a,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,a));return f};
58
- Z.f.reduce=Z.w&&(Z.f.v||Array.prototype.reduce)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduce.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.forEach(a,function(d,h){f=c.call(e,f,d,h,a)});return f};Z.f.reduceRight=Z.w&&(Z.f.v||Array.prototype.reduceRight)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduceRight.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.jb(a,function(d,h){f=c.call(e,f,d,h,a)});return f};
59
- Z.f.some=Z.w&&(Z.f.v||Array.prototype.some)?function(a,c,d){return Array.prototype.some.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return!0;return!1};Z.f.every=Z.w&&(Z.f.v||Array.prototype.every)?function(a,c,d){return Array.prototype.every.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,a))return!1;return!0};
60
- Z.f.count=function(a,c,d){var e=0;Z.f.forEach(a,function(a,g,h){c.call(d,a,g,h)&&++e},d);return e};Z.f.find=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};Z.f.findIndex=function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return g;return-1};Z.f.Ae=function(a,c,d){c=Z.f.Bc(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};
61
- Z.f.Bc=function(a,c,d){for(var e=Z.h(a)?a.split(b):a,f=a.length-1;0<=f;f--)if(f in e&&c.call(d,e[f],f,a))return f;return-1};Z.f.contains=function(a,c){return 0<=Z.f.indexOf(a,c)};Z.f.Jc=function(a){return 0==a.length};Z.f.clear=function(a){if(!Z.isArray(a))for(var c=a.length-1;0<=c;c--)delete a[c];a.length=0};Z.f.Ue=function(a,c){Z.f.contains(a,c)||a.push(c)};Z.f.ub=function(a,c,d){Z.f.splice(a,d,0,c)};Z.f.Ve=function(a,c,d){Z.Wc(Z.f.splice,a,d,0).apply(null,c)};
62
- Z.f.insertBefore=function(a,c,d){var e;2==arguments.length||0>(e=Z.f.indexOf(a,d))?a.push(c):Z.f.ub(a,c,e)};Z.f.remove=function(a,c){var d=Z.f.indexOf(a,c),e;(e=0<=d)&&Z.f.L(a,d);return e};Z.f.Tf=function(a,c){var d=Z.f.lastIndexOf(a,c);return 0<=d?(Z.f.L(a,d),!0):!1};Z.f.L=function(a,c){return 1==Array.prototype.splice.call(a,c,1).length};Z.f.Sf=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0<=c?(Z.f.L(a,c),!0):!1};
63
- Z.f.Pf=function(a,c,d){var e=0;Z.f.jb(a,function(f,g){c.call(d,f,g,a)&&Z.f.L(a,g)&&e++});return e};Z.f.concat=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.join=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.fd=function(a){var c=a.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=a[e];return d}return[]};Z.f.clone=Z.f.fd;
64
- Z.f.extend=function(a,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(Z.Ja(e)){var f=a.length||0,g=e.length||0;a.length=f+g;for(var h=0;h<g;h++)a[f+h]=e[h]}else a.push(e)}};Z.f.splice=function(a,c,d,e){return Array.prototype.splice.apply(a,Z.f.slice(arguments,1))};Z.f.slice=function(a,c,d){return 2>=arguments.length?Array.prototype.slice.call(a,c):Array.prototype.slice.call(a,c,d)};
65
- Z.f.Qf=function(a,c,d){function e(a){return Z.$(a)?bd+Z.qb(a):(typeof a).charAt(0)+a}c=c||a;d=d||e;for(var f={},g=0,h=0;h<a.length;){var m=a[h++],n=d(m);Object.prototype.hasOwnProperty.call(f,n)||(f[n]=!0,c[g++]=m)}c.length=g};Z.f.bb=function(a,c,d){return Z.f.cb(a,d||Z.f.B,!1,c)};Z.f.Vd=function(a,c,d){return Z.f.cb(a,c,!0,void 0,d)};Z.f.cb=function(a,c,d,e,f){for(var g=0,h=a.length,m;g<h;){var n=g+h>>1,p;p=d?c.call(f,a[n],n,a):c(e,a[n]);0<p?g=n+1:(h=n,m=!p)}return m?g:~g};
66
- Z.f.sort=function(a,c){a.sort(c||Z.f.B)};Z.f.dg=function(a,c){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]={index:e,value:a[e]};var f=c||Z.f.B;Z.f.sort(d,function(a,c){return f(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value};Z.f.bd=function(a,c,d){var e=d||Z.f.B;Z.f.sort(a,function(a,d){return e(c(a),c(d))})};Z.f.ag=function(a,c,d){Z.f.bd(a,function(a){return a[c]},d)};
67
- Z.f.kf=function(a,c,d){c=c||Z.f.B;for(var e=1;e<a.length;e++){var f=c(a[e-1],a[e]);if(0<f||0==f&&d)return!1}return!0};Z.f.xe=function(a,c,d){if(!Z.Ja(a)||!Z.Ja(c)||a.length!=c.length)return!1;var e=a.length;d=d||Z.f.yc;for(var f=0;f<e;f++)if(!d(a[f],c[f]))return!1;return!0};Z.f.me=function(a,c,d){d=d||Z.f.B;for(var e=Math.min(a.length,c.length),f=0;f<e;f++){var g=d(a[f],c[f]);if(0!=g)return g}return Z.f.B(a.length,c.length)};Z.f.B=function(a,c){return a>c?1:a<c?-1:0};
68
- Z.f.Xe=function(a,c){return-Z.f.B(a,c)};Z.f.yc=function(a,c){return a===c};Z.f.Td=function(a,c,d){d=Z.f.bb(a,c,d);return 0>d?(Z.f.ub(a,c,-(d+1)),!0):!1};Z.f.Ud=function(a,c,d){c=Z.f.bb(a,c,d);return 0<=c?Z.f.L(a,c):!1};Z.f.Wd=function(a,c,d){for(var e={},f=0;f<a.length;f++){var g=a[f],h=c.call(d,g,f,a);Z.P(h)&&(e[h]||(e[h]=[])).push(g)}return e};Z.f.og=function(a,c,d){var e={};Z.f.forEach(a,function(f,g){e[c.call(d,f,g,a)]=f});return e};
69
- Z.f.Hf=function(a,c,d){var e=[],f=0,g=a;d=d||1;void 0!==c&&(f=a,g=c);if(0>d*(g-f))return[];if(0<d)for(a=f;a<g;a+=d)e.push(a);else for(a=f;a>g;a+=d)e.push(a);return e};Z.f.repeat=function(a,c){for(var d=[],e=0;e<c;e++)d[e]=a;return d};Z.f.Cc=function(a){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(Z.isArray(e))for(var f=0;f<e.length;f+=8192)for(var g=Z.f.Cc.apply(null,Z.f.slice(e,f,f+8192)),h=0;h<g.length;h++)c.push(g[h]);else c.push(e)}return c};
70
- Z.f.rotate=function(a,c){a.length&&(c%=a.length,0<c?Array.prototype.unshift.apply(a,a.splice(-c,c)):0>c&&Array.prototype.push.apply(a,a.splice(0,-c)));return a};Z.f.xf=function(a,c,d){c=Array.prototype.splice.call(a,c,1);Array.prototype.splice.call(a,d,0,c[0])};
71
- Z.f.Cg=function(a){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};Z.f.$f=function(a,c){for(var d=c||Math.random,e=a.length-1;0<e;e--){var f=Math.floor(d()*(e+1)),g=a[e];a[e]=a[f];a[f]=g}};Z.f.pe=function(a,c){var d=[];Z.f.forEach(c,function(c){d.push(a[c])});return d};Z.locale={};
72
- Z.locale.J={COUNTRY:{AD:"Andorra",AE:Md,AF:Ld,AG:Qa,AI:"Anguilla",AL:"Shqip\u00ebria",AM:Kd,AN:wb,AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:Pa,AT:"\u00d6sterreich",AU:"Australia",AW:"Aruba",AX:"\u00c5land",AZ:"Az\u0259rbaycan",BA:z,BB:"Barbados",BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",BE:"Belgi\u00eb",BF:"Burkina Faso",BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",BI:"Burundi",BJ:"B\u00e9nin",BM:"Bermuda",BN:"Brunei",BO:y,BR:"Brasil",
73
- BS:"Bahamas",BT:"\u092d\u0942\u091f\u093e\u0928",BV:"Bouvet Island",BW:Ta,BY:Hd,BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:Ib,CF:Hb,CG:"Congo",CH:"Schweiz",CI:"C\u00f4te d\u2019Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroun",CN:"\u4e2d\u56fd",CO:"Colombia",CR:"Costa Rica",CS:Nb,CU:"Cuba",CV:"Cabo Verde",CX:Wa,CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",CZ:Gd,DD:"East Germany",DE:"Deutschland",DJ:"Jabuuti",DK:"Danmark",DM:"Dominica",DO:Fb,DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",
74
- EC:"Ecuador",EE:"Eesti",EG:"\u0645\u0635\u0631",EH:Nd,ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ES:"Espa\u00f1a",ET:X,FI:"Suomi",FJ:"\u092b\u093f\u091c\u0940",FK:fb,FM:C,FO:"F\u00f8royar",FR:"France",FX:"Metropolitan France",GA:"Gabon",GB:$b,GD:"Grenada",GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",GF:hb,GG:"Guernsey",GH:B,GI:"Gibraltar",GL:nb,GM:"Gambia",GN:"Guin\u00e9e",GP:"Guadeloupe",GQ:gb,GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",GS:"South Georgia and the South Sandwich Islands",
75
- GT:"Guatemala",GU:"Guam",GW:"Guin\u00e9 Bissau",GY:"Guyana",HK:"\u9999\u6e2f",HM:"Heard Island and McDonald Islands",HN:jb,HR:"Hrvatska",HT:"Ha\u00efti",HU:"Magyarorsz\u00e1g",ID:kb,IE:"Ireland",IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",IM:"Isle of Man",IN:W,IO:"British Indian Ocean Territory",IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",IR:"\u0627\u06cc\u0631\u0627\u0646",IS:"\u00cdsland",IT:"Italia",JE:"Jersey",JM:"Jamaica",JO:"\u0627\u0644\u0623\u0631\u062f\u0646",JP:"\u65e5\u672c",KE:"Kenya",KG:Id,KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
76
- KI:ob,KM:Qd,KN:Kb,KP:Sd,KR:"\ub300\ud55c\ubbfc\uad6d",KW:"\u0627\u0644\u0643\u0648\u064a\u062a",KY:Va,KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",LA:"\u0e25\u0e32\u0e27",LB:"\u0644\u0628\u0646\u0627\u0646",LC:"Saint Lucia",LI:"Liechtenstein",LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",LR:"Liberia",LS:"Lesotho",LT:"Lietuva",LU:sb,LV:"Latvija",LY:"\u0644\u064a\u0628\u064a\u0627",MA:"\u0627\u0644\u0645\u063a\u0631\u0628",MC:"Monaco",MD:vb,ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",
77
- MG:tb,MH:ub,MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",ML:"\u0645\u0627\u0644\u064a",MM:"Myanmar",MN:"\u8499\u53e4",MO:"\u6fb3\u95e8",MP:zb,MQ:"Martinique",MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"M\u00e9xico",MY:"Malaysia",MZ:"Mo\u00e7ambique",NA:"Namibia",NC:Ab,NE:"Niger",NF:yb,NG:D,NI:"Nicaragua",NL:"Nederland",NO:"Norge",NP:"\u0928\u0947\u092a\u093e\u0932",NR:"Nauru",NT:"Neutral Zone",
78
- NU:"Niue",NZ:xb,OM:"\u0639\u0645\u0627\u0646",PA:"Panam\u00e1",PE:"Per\u00fa",PF:Db,PG:E,PH:Cb,PK:Rd,PL:"Polska",PM:Mb,PN:"Pitcairn",PR:Eb,PS:"\u0641\u0644\u0633\u0637\u064a\u0646",PT:"Portugal",PW:"Palau",PY:Bb,QA:"\u0642\u0637\u0631",QO:"Outlying Oceania",QU:"European Union",RE:"R\u00e9union",RO:"Rom\u00e2nia",RS:"\u0421\u0440\u0431\u0438\u0458\u0430",RU:"\u0420\u043e\u0441\u0441\u0438\u044f",RW:F,SA:Od,SB:Qb,SC:Ob,SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",SE:"Sverige",SG:"\u65b0\u52a0\u5761",
79
- SH:"Saint Helena",SI:"Slovenija",SJ:Rb,SK:Pb,SL:"Sierra Leone",SM:"San Marino",SN:H,SO:"Somali",SR:"Suriname",ST:Vb,SU:"Union of Soviet Socialist Republics",SV:"El Salvador",SY:"\u0633\u0648\u0631\u064a\u0627",SZ:Ub,TC:Yb,TD:"\u062a\u0634\u0627\u062f",TF:"French Southern Territories",TG:"Togo",TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",TJ:"\u062a\u0627\u062c\u06cc\u06a9\u0633\u062a\u0627\u0646",TK:I,TL:Xb,TM:"\u0422\u0443\u0440\u043a\u043c\u0435\u043d\u0438\u0441\u0442\u0430\u043d",
80
- TN:"\u062a\u0648\u0646\u0633",TO:"Tonga",TR:K,TT:"Trinidad y Tobago",TV:J,TW:"\u53f0\u6e7e",TZ:Wb,UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",UG:"Uganda",UM:bc,US:ac,UY:"Uruguay",UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",VA:"Vaticano",VC:Lb,VE:"Venezuela",VG:Ua,VI:Zb,VN:"Vi\u1ec7t Nam",VU:L,WF:dc,WS:"Samoa",YD:"People's Democratic Republic of Yemen",YE:"\u0627\u0644\u064a\u0645\u0646",YT:"Mayotte",ZA:G,ZM:"Zambia",ZW:"Zimbabwe",ZZ:cc,aa_DJ:"Jabuuti",aa_ER:"\u00c9rythr\u00e9e",
81
- aa_ER_SAAHO:"\u00c9rythr\u00e9e",aa_ET:lb,af_NA:"Namibi\u00eb",af_ZA:"Suid-Afrika",ak_GH:B,am_ET:X,ar_AE:Md,ar_BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",ar_DJ:"\u062c\u064a\u0628\u0648\u062a\u064a",ar_DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",ar_EG:"\u0645\u0635\u0631",ar_EH:Nd,ar_ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ar_IL:"\u0627\u0633\u0631\u0627\u0626\u064a\u0644",ar_IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",ar_JO:"\u0627\u0644\u0623\u0631\u062f\u0646",ar_KM:Qd,ar_KW:"\u0627\u0644\u0643\u0648\u064a\u062a",
82
- ar_LB:"\u0644\u0628\u0646\u0627\u0646",ar_LY:"\u0644\u064a\u0628\u064a\u0627",ar_MA:"\u0627\u0644\u0645\u063a\u0631\u0628",ar_MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",ar_OM:"\u0639\u0645\u0627\u0646",ar_PS:"\u0641\u0644\u0633\u0637\u064a\u0646",ar_QA:"\u0642\u0637\u0631",ar_SA:Od,ar_SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",ar_SY:"\u0633\u0648\u0631\u064a\u0627",ar_TD:"\u062a\u0634\u0627\u062f",ar_TN:"\u062a\u0648\u0646\u0633",ar_YE:"\u0627\u0644\u064a\u0645\u0646",as_IN:"\u09ad\u09be\u09f0\u09a4",
83
- ay_BO:y,az_AZ:"Az\u0259rbaycan",az_Cyrl_AZ:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",az_Latn_AZ:"Azerbaycan",be_BY:Hd,bg_BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",bi_VU:L,bn_BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",bn_IN:"\u09ad\u09be\u09b0\u09a4",bo_CN:"\u0f62\u0f92\u0fb1\u0f0b\u0f53\u0f42",bo_IN:"\u0f62\u0f92\u0fb1\u0f0b\u0f42\u0f62\u0f0b",bs_BA:z,byn_ER:"\u12a4\u122d\u1275\u122b",ca_AD:"Andorra",ca_ES:"Espanya",cch_NG:D,ch_GU:"Guam",chk_FM:C,cop_Arab_EG:"\u0645\u0635\u0631",
84
- cop_Arab_US:Pd,cop_EG:"\u0645\u0635\u0631",cop_US:Pd,cs_CZ:Gd,cy_GB:"Prydain Fawr",da_DK:"Danmark",da_GL:"Gr\u00f8nland",de_AT:"\u00d6sterreich",de_BE:"Belgien",de_CH:"Schweiz",de_DE:"Deutschland",de_LI:"Liechtenstein",de_LU:"Luxemburg",dv_MV:"Maldives",dz_BT:"Bhutan",ee_GH:B,ee_TG:"Togo",efi_NG:D,el_CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",el_GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",en_AG:Qa,en_AI:"Anguilla",en_AS:Pa,en_AU:"Australia",en_BB:"Barbados",en_BE:"Belgium",en_BM:"Bermuda",en_BS:"Bahamas",
85
- en_BW:Ta,en_BZ:"Belize",en_CA:"Canada",en_CC:"Cocos Islands",en_CK:"Cook Islands",en_CM:"Cameroon",en_CX:Wa,en_DM:"Dominica",en_FJ:"Fiji",en_FK:fb,en_FM:C,en_GB:$b,en_GD:"Grenada",en_GG:"Guernsey",en_GH:B,en_GI:"Gibraltar",en_GM:"Gambia",en_GU:"Guam",en_GY:"Guyana",en_HK:"Hong Kong",en_HN:jb,en_IE:"Ireland",en_IM:"Isle of Man",en_IN:"India",en_JE:"Jersey",en_JM:"Jamaica",en_KE:"Kenya",en_KI:ob,en_KN:Kb,en_KY:Va,en_LC:"Saint Lucia",en_LR:"Liberia",en_LS:"Lesotho",en_MH:ub,en_MP:zb,en_MS:"Montserrat",
86
- en_MT:"Malta",en_MU:"Mauritius",en_MW:"Malawi",en_NA:"Namibia",en_NF:yb,en_NG:D,en_NR:"Nauru",en_NU:"Niue",en_NZ:xb,en_PG:E,en_PH:Cb,en_PK:"Pakistan",en_PN:"Pitcairn",en_PR:Eb,en_RW:F,en_SB:Qb,en_SC:Ob,en_SG:"Singapore",en_SH:"Saint Helena",en_SL:"Sierra Leone",en_SZ:Ub,en_TC:Yb,en_TK:I,en_TO:"Tonga",en_TT:"Trinidad and Tobago",en_TV:J,en_TZ:Wb,en_UG:"Uganda",en_UM:bc,en_US:ac,en_US_POSIX:ac,en_VC:Lb,en_VG:Ua,en_VI:Zb,en_VU:L,en_WS:"Samoa",en_ZA:G,en_ZM:"Zambia",en_ZW:"Zimbabwe",es_AR:"Argentina",
87
- es_BO:y,es_CL:"Chile",es_CO:"Colombia",es_CR:"Costa Rica",es_CU:"Cuba",es_DO:Fb,es_EC:"Ecuador",es_ES:"Espa\u00f1a",es_GQ:"Guinea Ecuatorial",es_GT:"Guatemala",es_HN:jb,es_MX:"M\u00e9xico",es_NI:"Nicaragua",es_PA:"Panam\u00e1",es_PE:"Per\u00fa",es_PH:"Filipinas",es_PR:Eb,es_PY:Bb,es_SV:"El Salvador",es_US:"Estados Unidos",es_UY:"Uruguay",es_VE:"Venezuela",et_EE:"Eesti",eu_ES:"Espainia",fa_AF:Ld,fa_IR:"\u0627\u06cc\u0631\u0627\u0646",fi_FI:"Suomi",fil_PH:Cb,fj_FJ:"Fiji",fo_FO:"F\u00f8royar",fr_BE:"Belgique",
88
- fr_BF:"Burkina Faso",fr_BI:"Burundi",fr_BJ:"B\u00e9nin",fr_CA:"Canada",fr_CD:Ib,fr_CF:Hb,fr_CG:"Congo",fr_CH:"Suisse",fr_CI:"C\u00f4te d\u2019Ivoire",fr_CM:"Cameroun",fr_DJ:"Djibouti",fr_DZ:"Alg\u00e9rie",fr_FR:"France",fr_GA:"Gabon",fr_GF:hb,fr_GN:"Guin\u00e9e",fr_GP:"Guadeloupe",fr_GQ:gb,fr_HT:"Ha\u00efti",fr_KM:"Comores",fr_LU:sb,fr_MA:"Maroc",fr_MC:"Monaco",fr_MG:tb,fr_ML:"Mali",fr_MQ:"Martinique",fr_MU:"Maurice",fr_NC:Ab,fr_NE:"Niger",fr_PF:Db,fr_PM:Mb,fr_RE:"R\u00e9union",fr_RW:F,fr_SC:Ob,fr_SN:H,
89
- fr_SY:"Syrie",fr_TD:"Tchad",fr_TG:"Togo",fr_TN:"Tunisie",fr_VU:L,fr_WF:dc,fr_YT:"Mayotte",fur_IT:"Italia",ga_IE:"\u00c9ire",gaa_GH:B,gez_ER:"\u12a4\u122d\u1275\u122b",gez_ET:X,gil_KI:ob,gl_ES:"Espa\u00f1a",gn_PY:Bb,gu_IN:"\u0aad\u0abe\u0ab0\u0aa4",gv_GB:Gb,ha_Arab_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",ha_GH:"\u063a\u0627\u0646\u0627",ha_Latn_GH:B,ha_Latn_NE:"Niger",ha_Latn_NG:"Nig\u00e9ria",ha_NE:"\u0627\u0644\u0646\u064a\u062c\u0631",ha_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",haw_US:"\u02bbAmelika Hui P\u016b \u02bbIa",
90
- he_IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",hi_IN:W,ho_PG:E,hr_BA:z,hr_HR:"Hrvatska",ht_HT:"Ha\u00efti",hu_HU:"Magyarorsz\u00e1g",hy_AM:Kd,hy_AM_REVISED:Kd,id_ID:kb,ig_NG:D,ii_CN:"\ua34f\ua1e9",is_IS:"\u00cdsland",it_CH:"Svizzera",it_IT:"Italia",it_SM:"San Marino",ja_JP:"\u65e5\u672c",ka_GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",kaj_NG:D,kam_KE:"Kenya",kcg_NG:D,kfo_NG:"Nig\u00e9ria",kk_KZ:"\u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d",kl_GL:nb,km_KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
91
- kn_IN:"\u0cad\u0cbe\u0cb0\u0ca4",ko_KP:Sd,ko_KR:"\ub300\ud55c\ubbfc\uad6d",kok_IN:W,kos_FM:C,kpe_GN:"Guin\u00e9e",kpe_LR:"Lib\u00e9ria",ks_IN:W,ku_IQ:"Irak",ku_IR:"\u0130ran",ku_Latn_IQ:"Irak",ku_Latn_IR:"\u0130ran",ku_Latn_SY:"Suriye",ku_Latn_TR:K,ku_SY:"Suriye",ku_TR:K,kw_GB:Gb,ky_Cyrl_KG:Id,ky_KG:"K\u0131rg\u0131zistan",la_VA:"Vaticano",lb_LU:sb,ln_CD:Ib,ln_CG:"Kongo",lo_LA:"Laos",lt_LT:"Lietuva",lv_LV:"Latvija",mg_MG:tb,mh_MH:ub,mi_NZ:xb,mk_MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",
92
- ml_IN:"\u0d07\u0d28\u0d4d\u0d24\u0d4d\u0d2f",mn_Cyrl_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mn_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mr_IN:W,ms_BN:"Brunei",ms_MY:"Malaysia",ms_SG:"Singapura",mt_MT:"Malta",my_MM:"Myanmar",na_NR:"Nauru",nb_NO:"Norge",nb_SJ:Rb,ne_NP:"\u0928\u0947\u092a\u093e\u0932",niu_NU:"Niue",nl_AN:wb,nl_AW:"Aruba",nl_BE:"Belgi\u00eb",nl_NL:"Nederland",nl_SR:"Suriname",nn_NO:"Noreg",nr_ZA:G,nso_ZA:G,ny_MW:"Malawi",om_ET:lb,om_KE:"Keeniyaa",or_IN:"\u0b2d\u0b3e\u0b30\u0b24",
93
- pa_Arab_PK:Rd,pa_Guru_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_PK:Rd,pap_AN:wb,pau_PW:"Palau",pl_PL:"Polska",pon_FM:C,ps_AF:Ld,pt_AO:"Angola",pt_BR:"Brasil",pt_CV:"Cabo Verde",pt_GW:"Guin\u00e9 Bissau",pt_MZ:"Mo\u00e7ambique",pt_PT:"Portugal",pt_ST:Vb,pt_TL:Xb,qu_BO:y,qu_PE:"Per\u00fa",rm_CH:"Schweiz",rn_BI:"Burundi",ro_MD:vb,ro_RO:"Rom\u00e2nia",ru_BY:Hd,ru_KG:Id,ru_KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",ru_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",ru_UA:"\u0423\u043a\u0440\u0430\u0438\u043d\u0430",
94
- rw_RW:F,sa_IN:W,sd_Deva_IN:W,sd_IN:W,se_FI:"Finland",se_NO:"Norge",sg_CF:Hb,sh_BA:"Bosnia and Herzegovina",sh_CS:Nb,si_LK:"Sri Lanka",sid_ET:lb,sk_SK:Pb,sl_SI:"Slovenija",sm_AS:Pa,sm_WS:"Samoa",so_DJ:"Jabuuti",so_ET:"Itoobiya",so_KE:"Kiiniya",so_SO:"Soomaaliya",sq_AL:"Shqip\u00ebria",sr_BA:"\u0411\u043e\u0441\u043d\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043e\u0432\u0438\u043d\u0430",sr_CS:"\u0421\u0440\u0431\u0438\u0458\u0430 \u0438 \u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_Cyrl_BA:"\u0411\u043e\u0441\u043d\u0438\u044f",
95
- sr_Cyrl_CS:"\u0421\u0435\u0440\u0431\u0438\u044f \u0438 \u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_ME:"\u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_RS:"\u0421\u0435\u0440\u0431\u0438\u044f",sr_Latn_BA:z,sr_Latn_CS:"Srbija i Crna Gora",sr_Latn_ME:"Crna Gora",sr_Latn_RS:"Srbija",sr_ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_RS:"\u0421\u0440\u0431\u0438\u0458\u0430",ss_SZ:Ub,ss_ZA:G,st_LS:"Lesotho",st_ZA:G,su_ID:kb,sv_AX:"\u00c5land",
96
- sv_FI:"Finland",sv_SE:"Sverige",sw_KE:"Kenya",sw_TZ:Wb,sw_UG:"Uganda",swb_KM:Qd,syr_SY:"Syria",ta_IN:"\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe",ta_LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",ta_SG:"\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd",te_IN:"\u0c2d\u0c3e\u0c30\u0c24 \u0c26\u0c47\u0c33\u0c02",tet_TL:Xb,tg_Cyrl_TJ:"\u0422\u0430\u0434\u0436\u0438\u043a\u0438\u0441\u0442\u0430\u043d",tg_TJ:"\u062a\u0627\u062c\u06a9\u0633\u062a\u0627\u0646",th_TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",
97
- ti_ER:"\u12a4\u122d\u1275\u122b",ti_ET:X,tig_ER:"\u12a4\u122d\u1275\u122b",tk_TM:"\u062a\u0631\u06a9\u0645\u0646\u0633\u062a\u0627\u0646",tkl_TK:I,tn_BW:Ta,tn_ZA:G,to_TO:"Tonga",tpi_PG:E,tr_CY:"G\u00fcney K\u0131br\u0131s Rum Kesimi",tr_TR:K,ts_ZA:G,tt_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",tvl_TV:J,ty_PF:Db,uk_UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",uli_FM:C,und_ZZ:cc,ur_IN:"\u0628\u06be\u0627\u0631\u062a",ur_PK:Rd,uz_AF:"Afganistan",uz_Arab_AF:Ld,uz_Cyrl_UZ:"\u0423\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u0430\u043d",
98
- uz_Latn_UZ:"O\u02bfzbekiston",uz_UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",ve_ZA:G,vi_VN:"Vi\u1ec7t Nam",wal_ET:X,wo_Arab_SN:"\u0627\u0644\u0633\u0646\u063a\u0627\u0644",wo_Latn_SN:H,wo_SN:H,xh_ZA:G,yap_FM:C,yo_NG:D,zh_CN:"\u4e2d\u56fd",zh_HK:"\u9999\u6e2f",zh_Hans_CN:"\u4e2d\u56fd",zh_Hans_SG:"\u65b0\u52a0\u5761",zh_Hant_HK:"\u4e2d\u83ef\u4eba\u6c11\u5171\u548c\u570b\u9999\u6e2f\u7279\u5225\u884c\u653f\u5340",zh_Hant_MO:"\u6fb3\u9580",zh_Hant_TW:"\u81fa\u7063",zh_MO:"\u6fb3\u95e8",
99
- zh_SG:"\u65b0\u52a0\u5761",zh_TW:"\u53f0\u6e7e",zu_ZA:G},LANGUAGE:{aa:"afar",ab:"\u0430\u0431\u0445\u0430\u0437\u0441\u043a\u0438\u0439",ace:"Aceh",ach:"Acoli",ada:"Adangme",ady:"\u0430\u0434\u044b\u0433\u0435\u0439\u0441\u043a\u0438\u0439",ae:"Avestan",af:"Afrikaans",afa:"Afro-Asiatic Language",afh:"Afrihili",ain:"Ainu",ak:"Akan",akk:"Akkadian",ale:"Aleut",alg:"Algonquian Language",alt:"Southern Altai",am:"\u12a0\u121b\u122d\u129b",an:"Aragonese",ang:"Old English",anp:"Angika",apa:"Apache Language",
100
- ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",arc:"Aramaic",arn:"Araucanian",arp:"Arapaho",art:"Artificial Language",arw:"Arawak",as:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",ast:"asturiano",ath:"Athapascan Language",aus:"Australian Language",av:"\u0430\u0432\u0430\u0440\u0441\u043a\u0438\u0439",awa:"Awadhi",ay:"aimara",az:"az\u0259rbaycanca",az_Arab:"\u062a\u0631\u06a9\u06cc \u0622\u0630\u0631\u0628\u0627\u06cc\u062c\u0627\u0646\u06cc",az_Cyrl:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",
101
- az_Latn:"Azerice",ba:"\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439",bad:"Banda",bai:"Bamileke Language",bal:"\u0628\u0644\u0648\u0686\u06cc",ban:"Balin",bas:"Basa",bat:"Baltic Language",be:"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bej:"Beja",bem:"Bemba",ber:"Berber",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bh:"\u092c\u093f\u0939\u093e\u0930\u0940",bho:"Bhojpuri",bi:"bichelamar ; bislama",bik:"Bikol",bin:"Bini",bla:"Siksika",bm:"bambara",bn:"\u09ac\u09be\u0982\u09b2\u09be",
102
- bnt:"Bantu",bo:"\u0f54\u0f7c\u0f51\u0f0b\u0f66\u0f90\u0f51\u0f0b",br:"breton",bra:"Braj",bs:"Bosanski",btk:"Batak",bua:"Buriat",bug:"Bugis",byn:"\u1265\u120a\u1295",ca:"catal\u00e0",cad:"Caddo",cai:"Central American Indian Language",car:"Carib",cau:"Caucasian Language",cch:"Atsam",ce:"\u0447\u0435\u0447\u0435\u043d\u0441\u043a\u0438\u0439",ceb:"Cebuano",cel:"Celtic Language",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"\u043c\u0430\u0440\u0438\u0439\u0441\u043a\u0438\u0439 (\u0447\u0435\u0440\u0435\u043c\u0438\u0441\u0441\u043a\u0438\u0439)",
103
- chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cmc:"Chamic Language",co:"corse",cop:"\u0642\u0628\u0637\u064a\u0629",cop_Arab:"\u0642\u0628\u0637\u064a\u0629",cpe:"English-based Creole or Pidgin",cpf:"French-based Creole or Pidgin",cpp:"Portuguese-based Creole or Pidgin",cr:"Cree",crh:"Crimean Turkish",crp:"Creole or Pidgin",cs:"\u010de\u0161tina",csb:"Kashubian",cu:"Church Slavic",cus:"Cushitic Language",cv:"\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439",
104
- cy:"Cymraeg",da:"dansk",dak:"Dakota",dar:"\u0434\u0430\u0440\u0433\u0432\u0430",day:"Dayak",de:"Deutsch",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",doi:"\u0627\u0644\u062f\u0648\u062c\u0631\u0649",dra:"Dravidian Language",dsb:"Lower Sorbian",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyu:"dioula",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",ee:"Ewe",efi:"Efik",egy:"Ancient Egyptian",eka:"Ekajuk",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",elx:"Elamite",en:"English",enm:"Middle English",
105
- eo:"esperanto",es:"espa\u00f1ol",et:"eesti",eu:"euskara",ewo:"Ewondo",fa:"\u0641\u0627\u0631\u0633\u06cc",fan:"fang",fat:"Fanti",ff:"Fulah",fi:"suomi",fil:"Filipino",fiu:"Finno-Ugrian Language",fj:"Fijian",fo:"f\u00f8royskt",fon:"Fon",fr:"fran\u00e7ais",frm:"Middle French",fro:"Old French",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"friulano",fy:"Fries",ga:"Gaeilge",gaa:"Ga",gay:"Gayo",gba:"Gbaya",gd:"Scottish Gaelic",gem:"Germanic Language",gez:"\u130d\u12d5\u12dd\u129b",gil:"Gilbertese",gl:"galego",
106
- gmh:"Middle High German",gn:"guaran\u00ed",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"\u0391\u03c1\u03c7\u03b1\u03af\u03b1 \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",gsw:"Schweizerdeutsch",gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",gv:"Gaelg",gwi:"Gwich\u02bcin",ha:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Arab:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Latn:"haoussa",hai:"Haida",haw:"\u02bb\u014dlelo Hawai\u02bbi",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",
107
- hi:"\u0939\u093f\u0902\u0926\u0940",hil:"Hiligaynon",him:"Himachali",hit:"Hittite",hmn:"Hmong",ho:"Hiri Motu",hr:"hrvatski",hsb:"Upper Sorbian",ht:"ha\u00eftien",hu:"magyar",hup:"Hupa",hy:"\u0540\u0561\u0575\u0565\u0580\u0567\u0576",hz:"Herero",ia:"interlingvao",iba:"Iban",id:"Bahasa Indonesia",ie:"Interlingue",ig:"Igbo",ii:"\ua188\ua320\ua259",ijo:"Ijo",ik:"Inupiaq",ilo:"Iloko",inc:"Indic Language",ine:"Indo-European Language",inh:"\u0438\u043d\u0433\u0443\u0448\u0441\u043a\u0438\u0439",io:"Ido",
108
- ira:"Iranian Language",iro:"Iroquoian Language",is:"\u00edslenska",it:"italiano",iu:"Inuktitut",ja:"\u65e5\u672c\u8a9e",jbo:"Lojban",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jv:"Jawa",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",kaa:"\u043a\u0430\u0440\u0430\u043a\u0430\u043b\u043f\u0430\u043a\u0441\u043a\u0438\u0439",kab:"kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kar:"Karen",kaw:"Kawi",kbd:"\u043a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u0441\u043a\u0438\u0439",kcg:"Tyap",kfo:"koro",kg:"Kongo",
109
- kha:"Khasi",khi:"Khoisan Language",kho:"Khotanese",ki:"Kikuyu",kj:"Kuanyama",kk:"\u049a\u0430\u0437\u0430\u049b",kl:"kalaallisut",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kmb:"quimbundo",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ko:"\ud55c\uad6d\uc5b4",kok:"\u0915\u094b\u0902\u0915\u0923\u0940",kos:"Kosraean",kpe:"kpell\u00e9",kr:"Kanuri",krc:"\u043a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e-\u0431\u0430\u043b\u043a\u0430\u0440\u0441\u043a\u0438\u0439",krl:"\u043a\u0430\u0440\u0435\u043b\u044c\u0441\u043a\u0438\u0439",
110
- kro:"Kru",kru:"Kurukh",ks:"\u0915\u093e\u0936\u094d\u092e\u093f\u0930\u0940",ku:"K\u00fcrt\u00e7e",ku_Arab:"\u0627\u0644\u0643\u0631\u062f\u064a\u0629",ku_Latn:"K\u00fcrt\u00e7e",kum:"\u043a\u0443\u043c\u044b\u043a\u0441\u043a\u0438\u0439",kut:"Kutenai",kv:"Komi",kw:"kernewek",ky:"K\u0131rg\u0131zca",ky_Arab:"\u0627\u0644\u0642\u064a\u0631\u063a\u0633\u062a\u0627\u0646\u064a\u0629",ky_Cyrl:"\u043a\u0438\u0440\u0433\u0438\u0437\u0441\u043a\u0438\u0439",la:"latino",lad:"\u05dc\u05d3\u05d9\u05e0\u05d5",
111
- lah:"\u0644\u0627\u0647\u0646\u062f\u0627",lam:"Lamba",lb:"luxembourgeois",lez:"\u043b\u0435\u0437\u0433\u0438\u043d\u0441\u043a\u0438\u0439",lg:"Ganda",li:"Limburgs",ln:"lingala",lo:"Lao",lol:"mongo",loz:"Lozi",lt:"lietuvi\u0173",lu:"luba-katanga",lua:"luba-lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Lushai",lv:"latvie\u0161u",mad:"Madura",mag:"Magahi",mai:"Maithili",mak:"Makassar",man:"Mandingo",map:"Austronesian",mas:"Masai",mdf:"\u043c\u043e\u043a\u0448\u0430",mdr:"Mandar",men:"Mende",mg:"malgache",
112
- mga:"Middle Irish",mh:"Marshallese",mi:"Maori",mic:"Micmac",min:"Minangkabau",mis:"Miscellaneous Language",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",mkh:"Mon-Khmer Language",ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",mn:Jd,mn_Cyrl:Jd,mn_Mong:Jd,mnc:"Manchu",mni:"Manipuri",mno:"Manobo Language",mo:"Moldavian",moh:"Mohawk",mos:"mor\u00e9 ; mossi",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu",mt:"Malti",mul:"Multiple Languages",mun:"Munda Language",mus:"Creek",mwl:"Mirandese",
113
- mwr:"Marwari",my:"Burmese",myn:"Mayan Language",myv:"\u044d\u0440\u0437\u044f",na:"Nauru",nah:"Nahuatl",nai:"North American Indian Language",nap:"napoletano",nb:"norsk bokm\u00e5l",nd:"North Ndebele",nds:"Low German",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","new":"Newari",ng:"Ndonga",nia:"Nias",nic:"Niger-Kordofanian Language",niu:"Niuean",nl:"Nederlands",nn:"nynorsk",no:"Norwegian",nog:"\u043d\u043e\u0433\u0430\u0439\u0441\u043a\u0438\u0439",non:"Old Norse",nqo:"N\u2019Ko",nr:"South Ndebele",nso:"Northern Sotho",
114
- nub:"Nubian Language",nv:"Navajo",nwc:"Classical Newari",ny:"nianja; chicheua; cheua",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"occitan",oj:"Ojibwa",om:"Oromoo",or:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",os:"\u043e\u0441\u0435\u0442\u0438\u043d\u0441\u043a\u0438\u0439",osa:"Osage",ota:"Ottoman Turkish",oto:"Otomian Language",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pa_Arab:"\u067e\u0646\u062c\u0627\u0628",pa_Guru:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",paa:"Papuan Language",pag:"Pangasinan",
115
- pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",peo:"Old Persian",phi:"Philippine Language",phn:"Phoenician",pi:"\u0e1a\u0e32\u0e25\u0e35",pl:"polski",pon:"Pohnpeian",pra:"Prakrit Language",pro:"Old Proven\u00e7al",ps:"\u067e\u069a\u062a\u0648",pt:"portugu\u00eas",qu:"quechua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rm:"R\u00e4toromanisch",rn:"roundi",ro:"rom\u00e2n\u0103",roa:"Romance Language",rom:"Romany",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",rup:"Aromanian",rw:"rwanda",
116
- sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924 \u092d\u093e\u0937\u093e",sad:"Sandawe",sah:"\u044f\u043a\u0443\u0442\u0441\u043a\u0438\u0439",sai:"South American Indian Language",sal:"Salishan Language",sam:"\u05d0\u05e8\u05de\u05d9\u05ea \u05e9\u05d5\u05de\u05e8\u05d5\u05e0\u05d9\u05ea",sas:"Sasak",sat:"Santali",sc:"Sardinian",scn:"siciliano",sco:"Scots",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",sd_Arab:"\u0633\u0646\u062f\u06cc",sd_Deva:"\u0938\u093f\u0928\u094d\u0927\u0940",se:"nordsamiska",sel:"\u0441\u0435\u043b\u044c\u043a\u0443\u043f\u0441\u043a\u0438\u0439",
117
- sem:"Semitic Language",sg:"sangho",sga:"Old Irish",sgn:"Sign Language",sh:"Serbo-Croatian",shn:"Shan",si:"Sinhalese",sid:"Sidamo",sio:"Siouan Language",sit:"Sino-Tibetan Language",sk:"slovensk\u00fd",sl:"sloven\u0161\u010dina",sla:"Slavic Language",sm:"Samoan",sma:"sydsamiska",smi:"Sami Language",smj:"lulesamiska",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"sonink\u00e9",so:"Soomaali",sog:"Sogdien",son:"Songhai",sq:"shqipe",sr:"\u0421\u0440\u043f\u0441\u043a\u0438",sr_Cyrl:"\u0441\u0435\u0440\u0431\u0441\u043a\u0438\u0439",
118
- sr_Latn:"Srpski",srn:"Sranantongo",srr:"s\u00e9r\u00e8re",ss:"Swati",ssa:"Nilo-Saharan Language",st:"Sesotho",su:"Sundan",suk:"Sukuma",sus:"soussou",sux:"Sumerian",sv:"svenska",sw:"Kiswahili",syc:"Classical Syriac",syr:"Syriac",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tai:"Tai Language",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tem:"Timne",ter:"Tereno",tet:"t\u00e9tum",tg:"\u062a\u0627\u062c\u06a9",tg_Arab:"\u062a\u0627\u062c\u06a9",tg_Cyrl:"\u0442\u0430\u0434\u0436\u0438\u043a\u0441\u043a\u0438\u0439",
119
- th:"\u0e44\u0e17\u0e22",ti:"\u1275\u130d\u122d\u129b",tig:"\u1275\u130d\u1228",tiv:"Tiv",tk:"\u062a\u0631\u06a9\u0645\u0646\u06cc",tkl:I,tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tmh:"tamacheq",tn:"Tswana",to:"Tonga",tog:"Nyasa Tonga",tpi:"Tok Pisin",tr:"T\u00fcrk\u00e7e",ts:"Tsonga",tsi:"Tsimshian",tt:"\u0442\u0430\u0442\u0430\u0440\u0441\u043a\u0438\u0439",tum:"Tumbuka",tup:"Tupi Language",tut:"\u0430\u043b\u0442\u0430\u0439\u0441\u043a\u0438\u0435 (\u0434\u0440\u0443\u0433\u0438\u0435)",tvl:J,tw:"Twi",
120
- ty:"tahitien",tyv:"\u0442\u0443\u0432\u0438\u043d\u0441\u043a\u0438\u0439",udm:"\u0443\u0434\u043c\u0443\u0440\u0442\u0441\u043a\u0438\u0439",ug:"\u0443\u0439\u0433\u0443\u0440\u0441\u043a\u0438\u0439",uga:"Ugaritic",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",umb:"umbundu",und:"English",ur:"\u0627\u0631\u062f\u0648",uz:"\u040e\u0437\u0431\u0435\u043a",uz_Arab:"\u0627\u06c9\u0632\u0628\u06d0\u06a9",uz_Cyrl:"\u0443\u0437\u0431\u0435\u043a\u0441\u043a\u0438\u0439",uz_Latn:"o'zbekcha",
121
- vai:"Vai",ve:"Venda",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"volapuko",vot:"Votic",wa:"Wallonisch",wak:"Wakashan Language",wal:"Walamo",war:"Waray",was:"Washo",wen:"Sorbian Language",wo:"wolof",wo_Arab:"\u0627\u0644\u0648\u0644\u0648\u0641",wo_Latn:"wolof",xal:"\u043a\u0430\u043b\u043c\u044b\u0446\u043a\u0438\u0439",xh:"Xhosa",yao:"iao",yap:"Yapese",yi:"\u05d9\u05d9\u05d3\u05d9\u05e9",yo:"Yoruba",ypk:"Yupik Language",za:"Zhuang",zap:"Zapotec",zen:"Zenaga",zh:"\u4e2d\u6587",zh_Hans:"\u4e2d\u6587",zh_Hant:"\u4e2d\u6587",
122
- znd:"Zande",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}};Z.locale.Yf=function(a){a=a.replace(/-/g,M);Z.locale.N=a};Z.locale.Fa=function(){Z.locale.N||(Z.locale.N=yc);return Z.locale.N};Z.locale.I={vd:"DateTimeConstants",Ed:"NumberFormatConstants",gc:"TimeZoneConstants",Wb:rb,hc:"TimeZoneSelectedIds",jc:"TimeZoneSelectedShortNames",ic:"TimeZoneSelectedLongNames",fc:"TimeZoneAllLongNames"};Z.locale.Ea=function(a){return(a=a.match(/^\w{2,3}([-_]|$)/))?a[0].replace(/[_-]/g,b):b};
123
- Z.locale.mb=function(a){return(a=a.match(/[-_]([a-zA-Z]{2}|\d{3})([-_]|$)/))?a[0].replace(/[_-]/g,b):b};Z.locale.Pe=function(a){a=a.split(/[-_]/g);return 1<a.length&&a[1].match(/^[a-zA-Z]{4}$/)?a[1]:b};Z.locale.Qe=function(a){return(a=a.match(/[-_]([a-z]{2,})/))?a[1]:b};Z.locale.Le=function(a){var c=Z.locale.Ea(a)+M+Z.locale.mb(a);return c in Z.locale.J.COUNTRY?Z.locale.J.COUNTRY[c]:a};Z.locale.He=function(a,c){c||(c=Z.locale.ob());var d=Z.locale.mb(a);return d in c.COUNTRY?c.COUNTRY[d]:a};
124
- Z.locale.Me=function(a){if(a in Z.locale.J.LANGUAGE)return Z.locale.J.LANGUAGE[a];var c=Z.locale.Ea(a);return c in Z.locale.J.LANGUAGE?Z.locale.J.LANGUAGE[c]:a};Z.locale.Ie=function(a,c){c||(c=Z.locale.ob());if(a in c.LANGUAGE)return c.LANGUAGE[a];var d=Z.locale.Ea(a);return d in c.LANGUAGE?c.LANGUAGE[d]:a};Z.locale.K=function(a,c,d){Z.locale.l[c]||(Z.locale.l[c]={});Z.locale.l[c][d]=a;Z.locale.N||(Z.locale.N=d)};Z.locale.jf=function(a,c){return a in Z.locale.l&&c in Z.locale.l[a]};Z.locale.l={};
125
- Z.locale.Kf=function(a,c){Z.locale.K(a,Z.locale.I.gc,c)};Z.locale.If=function(a,c){Z.locale.K(a,Z.locale.I.Wb,c)};Z.locale.Lf=function(a,c){Z.locale.K(a,Z.locale.I.hc,c)};Z.locale.Nf=function(a,c){Z.locale.K(a,Z.locale.I.jc,c)};Z.locale.Mf=function(a,c){Z.locale.K(a,Z.locale.I.ic,c)};Z.locale.Jf=function(a,c){Z.locale.K(a,Z.locale.I.fc,c)};Z.locale.ob=function(){var a=Z.locale.Fa(),a=a?a:Z.locale.Fa();return rb in Z.locale.l?Z.locale.l.LocaleNameConstants[a]:void 0};
126
- Z.locale.Oe=function(a,c){var d=c?c:Z.locale.Fa();if(a in Z.locale.l){if(d in Z.locale.l[a])return Z.locale.l[a][d];d=d.split(M);return 1<d.length&&d[0]in Z.locale.l[a]?Z.locale.l[a][d[0]]:Z.locale.l[a].en}};var google={a:{}};google.a.b={};
127
- google.a.b.languages={af:!0,am:!0,az:!0,ar:!0,arb:"ar",bg:!0,bn:!0,ca:!0,cs:!0,cmn:"zh",da:!0,de:!0,el:!0,en:!0,en_gb:!0,es:!0,es_419:!0,et:!0,eu:!0,fa:!0,fi:!0,fil:!0,fr:!0,fr_ca:!0,gl:!0,ka:!0,gu:!0,he:"iw",hi:!0,hr:!0,hu:!0,hy:!0,id:!0,"in":Oc,is:!0,it:!0,iw:!0,ja:!0,ji:"yi",jv:!1,jw:"jv",km:!0,kn:!0,ko:!0,lo:!0,lt:!0,lv:!0,ml:!0,mn:!0,mo:"ro",mr:!0,ms:!0,nb:"no",ne:!0,nl:!0,no:!0,pl:!0,pt:"pt_br",pt_br:!0,pt_pt:!0,ro:!0,ru:!0,si:!0,sk:!0,sl:!0,sr:!0,sv:!0,sw:!0,swh:"sw",ta:!0,te:!0,th:!0,tl:"fil",
128
- tr:!0,uk:!0,ur:!0,vi:!0,yi:!1,zh:"zh_cn",zh_cn:!0,zh_hk:!0,zh_tw:!0,zsm:"ms",zu:!0};google.a.b.S={};google.a.b.T=od;google.a.b.log=Y();google.a.b.error=Y();google.a.b.Z=!1;google.a.b.O=window;google.a.b.ld={current:"44",upcoming:"44",41:U,42:U,43:U,44:U};google.a.b.Ua={gstatic:{prefix:"https://www.gstatic.com/charts",debug:"{prefix}/debug/{version}/jsapi_debug_{package}_module.js",compiled:"{prefix}/{version}/js/jsapi_compiled_{package}_module.js",i18n:"{prefix}/{version}/i18n/jsapi_compiled_i18n_{package}_module__{language}.js",css:zd,css_debug:zd,third_party:Ad,third_party_gen:Ad}};
129
- google.a.b.m=google.a.b.Ua.gstatic;
130
- google.a.b.zc={"default":[],format:[],ui:["format","default"],ui_base:["format","default"],annotatedtimeline:[V],annotationchart:[V,"controls",uc,"table"],areachart:[V,O],bar:[V,Q,td],barchart:[V,O],browserchart:[V],calendar:[V],charteditor:[V,uc,S,oc,"gauge","motionchart","orgchart","table"],charteditor_base:[nd,uc,S,oc,"gauge","motionchart","orgchart","table_base"],columnchart:[V,O],controls:[V],controls_base:[nd],corechart:[V],gantt:[V,Q],gauge:[V],geochart:[V],geomap:[V],geomap_base:[nd],helloworld:[V],
131
- imageareachart:[V,S],imagebarchart:[V,S],imagelinechart:[V,S],imagechart:[V],imagepiechart:[V,S],imagesparkline:[V,S],intensitymap:[V],line:[V,Q,td],linechart:[V,O],map:[V],motionchart:[V],orgchart:[V],overtimecharts:[V,uc],piechart:[V,O],sankey:["d3","d3.sankey",V],scatter:[V,Q,td],scatterchart:[V,O],table:[V],table_base:[nd],timeline:[V,Q],treemap:[V],wordtree:[V]};google.a.b.ed={d3:"d3/d3.js","d3.sankey":"d3/d3.sankey.js",webfontloader:"webfontloader/webfont.js"};google.a.b.Eb={dygraph:"dygraphs/dygraph-tickers-combined.js"};
132
- google.a.b.wc={annotatedtimeline:"/annotatedtimeline/annotatedtimeline.css",annotationchart:"annotationchart/annotationchart.css",charteditor:"charteditor/charteditor.css",charteditor_base:"charteditor/charteditor_base.css",controls:"controls/controls.css",imagesparkline:"imagesparkline/imagesparkline.css",intensitymap:"intensitymap/intensitymap.css",orgchart:"orgchart/orgchart.css",table:"table/table.css",table_base:"table/table_base.css",ui:["util/util.css","core/tooltip.css"],ui_base:"util/util_base.css"};
133
- google.a.b.va=function(a,c){for(var d=c||{},e=[],f=0;f<a.length;f++){var g=a[f];if(!d[g]){d[g]=!0;var h=google.a.b.zc[g]||[];0<h.length&&(e=e.concat(google.a.b.va(h,d)));e.push(g)}}return e};google.a.b.Ec=function(a){for(var c={},d=[],e=0;e<a.length;e++){var f=google.a.b.wc[a[e]];Z.isArray(f)||(f=[f]);for(var g=0;g<f.length;g++){var h=f[g];h&&!c[h]&&(c[h]=!0,d.push(h))}}return d};
134
- google.a.b.$c=function(a,c){if(c)if("undefined"===typeof a.onload){var d=!1;a.onreadystatechange=function(){d||(a.readyState&&a.readyState!==P?google.a.b.O.setTimeout(a.onreadystatechange,0):(d=!0,delete a.onreadystatechange,google.a.b.O.setTimeout(c,0)))}}else a.onload=c};
135
- google.a.b.Ab=function(a,c,d){google.a.b.log(Vc+a);var e=c.createElement(gd);e.type=ld;e.language=Qc;e.async=!1;e.defer=!1;c=c.body||c.head||c.getElementsByTagName(ib).item(0)||c.documentElement;c.insertBefore(e,c.lastChild);d&&google.a.b.$c(e,d);e.src=a;google.a.b.log(zc+a)};
136
- google.a.b.Qc=function(a,c){function d(c){var e=google.a.b.sb,f=a[c++];if(f){var g=f,h=google.a.b.ed[f];h?(g=h,f===td&&(e=window.document),f=google.a.b.m.third_party):google.a.b.Eb[f]?(g=google.a.b.Eb[f],f=google.a.b.m.third_party_gen):f=google.a.b.Z?n:t?Oa:p;g=f.replace(yd,m).replace(Bd,A).replace(wd,t).replace(xd,g);google.a.b.Ab(g,e);d(c)}}function e(){for(var d=[],e=0;e<a.length;e++)d.push(Sb[a[e]]);eval(Ea+d.join(b)+Dd)();google.a.b.O.setTimeout(c,0)}a=google.a.b.va(a);for(var f=[],g=0;g<a.length;g++){var h=
137
- a[g];google.a.b.S[h]||f.push(h)}a=f;google.a.b.log(pb+a);var m=google.a.b.m.prefix,n=google.a.b.m.debug,p=google.a.b.m.compiled,Oa=google.a.b.m.i18n,A=google.a.b.T,t=google.a.b.Ma;t===yc&&(t=null);var Sb={},Tb=a.length;google.a.b.Vc=function(a,c){google.a.b.log(sc+a);Sb[a]=c;google.a.b.S[a]=!0;Tb--;0===Tb&&e()};d(0)};
138
- google.a.b.W=function(a){function c(){g=!0;for(var a=e.length,c=0;c<a;c++)e[c]()}function d(){h=!0;for(var a=f.length,c=0;c<a;c++)f[c]()}var e=[],f=[],g=!1,h=!1;google.a.b.W.count||(google.a.b.W.count=0);var m=Tc+google.a.b.W.count++,n={done:function(a){e.push(a);g&&a();return n},Ca:function(a){f.push(a);h&&a();return n}},p=document.createElement(Rc);p.setAttribute(Oc,m);p.setAttribute(ed,jd);p.setAttribute(md,kd);"undefined"!==typeof p.addEventListener?(p.addEventListener(Sc,c,!1),p.addEventListener(Ac,
139
- d,!1)):"undefined"!==typeof p.attachEvent&&p.attachEvent(cd,function(){var a,e=document.styleSheets.length;try{for(;e--;)if(a=document.styleSheets[e],a.id===m){c();return}}catch(f){}g||d()});document.getElementsByTagName(Mc)[0].appendChild(p);p.setAttribute(Nc,a);return n};google.a.b.Nc=function(a,c){google.a.b.log(Uc+a);google.a.b.W(a).done(c).Ca(function(){google.a.b.error(Wc+a)})};
140
- google.a.b.Oc=function(a,c){a=google.a.b.va(a);var d=google.a.b.Ec(a);if(null===d||0===d.length)c();else{google.a.b.log(qb+d.join(ya));var e=google.a.b.m.prefix,f=google.a.b.m.css;google.a.b.Z&&(f=google.a.b.m.css_debug||f);var g=google.a.b.T,h=function(a){var n=d[a],p;p=a<d.length-1?function(){h(a+1)}:c;google.a.b.S[n]?(google.a.b.log(Na+n),google.a.b.O.setTimeout(p,0)):(google.a.b.S[n]=!0,n=f.replace(yd,e).replace(Bd,g).replace(vd,n),google.a.b.Nc(n,p))};h(0)}};
141
- google.a.b.Ee=function(){var a=google.a.b.C;if(!a){a=google.a.b.C=document.createElement(Pc);google.a.b.C=a;a.name=Jc;(document.body||document.head||document).appendChild(a);a.style.display=Zc;var c=google.a.b.sb=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document;c.open();c.writeln(b);c.close()}return a};
142
- google.a.b.Cb=function(a){for(var c=a.replace(/-/g,M).toLowerCase();Z.h(c);)a=c,c=google.a.b.languages[c],c===a&&(c=!1);c||(a.match(/_[^_]+$/)?(a=a.replace(/_[^_]+$/,b),a=google.a.b.Cb(a)):a=yc);return a};
143
- google.a.b.Yc=function(a,c){c.log&&(google.a.b.log=c.log);c.error&&(google.a.b.error=c.error);var d=c.debug,e=c.language||b,e=google.a.b.Cb(e);a||(a=c.version||od);(google.a.b.T&&google.a.b.T!==a||google.a.b.Ma&&google.a.b.Ma!==e||google.a.b.Z!==d)&&google.a.b.C&&google.a.b.C.parentNode&&(google.a.b.C.parentNode.removeChild(google.a.b.C),google.a.b.C=null,google.a.b.S={});google.a.b.T=a;google.a.b.Ma=e;google.a.b.Z=d};google.a.b.R=!1;google.a.b.ma=!1;google.a.b.loaded=!1;google.a.b.Da=[];
144
- google.a.b.load=function(a,c,d){var e;e=a.match(/^(testing\/)?(.*)/);var f=e[1]||b;for(a=e[2];;){e=google.a.b.ld[a];if(null==e||e===U)break;a=e}google.a.b.m=d||google.a.b.Ua[a]||google.a.b.Ua.gstatic;a=f+a;if(null==e)f=function(){Z.kb()(a,c,d)},google.a.b.R?google.a.b.M(f):(google.a.b.R=!0,google.a.b.Ab(google.a.b.m.prefix+u+a+Da,window.document,f));else{if(google.a.b.R)throw Error("google.charts.load() cannot be called more than once with version 44 or earlier.");google.a.b.R=!0;if(google.a.b.ma)google.a.b.M(function(){google.a.b.load(a,
145
- c)});else{google.a.b.loaded=!1;google.a.b.ma=!0;google.a.b.Yc(a,c);google.a.b.log(Kc+a);window.google=window.google||{};google.visualization=google.visualization||{};google.visualization.ModulePath=google.a.b.m.prefix;google.a.b.C=null;google.a.b.O=window;google.a.b.sb=document;var g=function(){google.a.b.ma=!1;google.a.b.loaded=!0;google.a.b.Na()},h=c.packages;google.a.b.M(c.callback);google.a.b.Oc(h,function(){google.a.b.Qc(h,g)})}}};
146
- google.a.b.M=function(a){a&&google.a.b.Da.push(a);google.a.b.loaded&&!google.a.b.ma&&google.a.b.Na()};google.a.b.ad=function(a){if(window.addEventListener)window.addEventListener(Sc,a,!1);else if(window.attachEvent)window.attachEvent(cd,a);else{var c=window.onload;window.onload=function(d){c&&c(d);a()}}};google.a.b.Ib=document&&document.readyState===P;google.a.b.ad(function(){google.a.b.Ib=!0;google.a.b.Na()});
147
  google.a.b.Na=function(){if(google.a.b.R&&google.a.b.loaded&&(google.a.b.Ib||document.readyState===P))for(;0<google.a.b.Da.length;)google.a.b.Da.shift()()};google.a.b.Qa=function(a,c){google.a.b.Vc(a,c)};if(Z.kb())throw Error("Google Charts loader.js can only be loaded once.");google.a.load=function(a,c,d){a===sd&&(a=c,c=d);google.a.b.load(String(a),c||{})};google.a.M=function(a){google.a.b.M(a)};google.a.Qa=function(a,c){google.a.b.Qa(a,c)};Z.Ba(Jc,google.a.load);Z.Ba("google.charts.setOnLoadCallback",google.a.M);Z.Ba("google.charts.packageLoadedCallback",google.a.Qa); })();
1
+ (function (){ var b="",aa="\x00",ba="\n",ca="\n//# sourceURL=",da="\n;return exports});\n//# sourceURL=",k=" ",ea=" &#160;",fa=" onreadystatechange='goog.onScriptLoad_(this, ",ga=" should not be enumerable in Object.prototype.",l='"',ha='");',ia='">\x3c/script>',ja="#",ka="$1",la="%s",q="&",ma="&#0;",na="&#101;",oa="&#39;",pa="&amp;",qa="&gt;",ra="&lt;",sa="&quot;",ta="'",ua="(^",va=")' ",wa=")([a-z])",xa=");",ya=", ",za="-",Aa="-$1",r=".",Ba="..",Ca="...",u="/",Da="/loader.js",v="0",Ea="0,(function(){",w=": ",
2
+ x="<",Fa="\x3c/script>",Ga="<br />",Ha="<br>",Ia='<script type="text/javascript" src="',Ja='<script type="text/javascript">',Ka=">",La=">\x3c/script>",Ma="?",Na="Already loaded ",Pa="American Samoa",Qa="Antigua and Barbuda",Ra="Assertion failed",Sa="BY_WHOLE",y="Bolivia",z="Bosna i Hercegovina",Ta="Botswana",Ua="British Virgin Islands",Va="Cayman Islands",Wa="Christmas Island",Xa="Expected Element but got %s: %s.",Ya="Expected array but got %s: %s.",Za="Expected boolean but got %s: %s.",$a="Expected function but got %s: %s.",
3
+ ab="Expected instanceof %s but got %s.",bb="Expected number but got %s: %s.",cb="Expected object but got %s: %s.",db="Expected string but got %s: %s.",eb="Failure",fb="Falkland Islands",B="Ghana",gb="Guin\u00e9e \u00e9quatoriale",hb="Guyane fran\u00e7aise",ib="HEAD",jb="Honduras",kb="Indonesia",lb="Itoophiyaa",mb="JavaScript",nb="Kalaallit Nunaat",ob="Kiribati",pb="Load packages + dependencies - previous: ",qb="Loading css files: ",rb="LocaleNameConstants",sb="Luxembourg",tb="Madagascar",ub="Marshall Islands",
4
+ C="Micronesia",vb="Moldova, Republica",wb="Nederlandse Antillen",xb="New Zealand",D="Nigeria",yb="Norfolk Island",zb="Northern Mariana Islands",Ab="Nouvelle-Cal\u00e9donie",E="Papua New Guinea",Bb="Paraguay",Cb="Philippines",Db="Polyn\u00e9sie fran\u00e7aise",Eb="Puerto Rico",Fb="Rep\u00fablica Dominicana",F="Rwanda",Gb="Rywvaneth Unys",Hb="R\u00e9publique centrafricaine",Ib="R\u00e9publique d\u00e9mocratique du Congo",Jb="SCRIPT",Kb="Saint Kitts and Nevis",Lb="Saint Vincent and the Grenadines",Mb=
5
+ "Saint-Pierre-et-Miquelon",Nb="Serbia and Montenegro",Ob="Seychelles",Pb="Slovensk\u00e1 republika",Qb="Solomon Islands",G="South Africa",Rb="Svalbard og Jan Mayen",Ub="Swaziland",Vb="S\u00e3o Tom\u00e9 e Pr\u00edncipe",H="S\u00e9n\u00e9gal",Wb="Tanzania",Xb="Timor Leste",I="Tokelau",Yb="Turks and Caicos Islands",J="Tuvalu",K="T\u00fcrkiye",Zb="U.S. Virgin Islands",$b="United Kingdom",ac="United States",bc="United States Minor Outlying Islands",cc="Unknown or Invalid Region",L="Vanuatu",dc="Wallis-et-Futuna",
6
+ ec="[object Array]",fc="[object Function]",gc="[object Window]",hc="\\$1",ic="\\s",jc="\\u",kc="\\x",lc="\\x08",mc="]+",M="_",nc="amp",oc="annotatedtimeline",N="array",pc="base.js",qc="boolean",O="browserchart",rc="call",sc="callback after loading ",tc="charts",P="complete",uc="corechart",vc="div",wc="document",Q="dygraph",xc="e",yc="en",zc="end loadScript: ",Ac="error",R="function",Bc="g",Cc="get",Dc="goog",Ec="goog.loadModule(",Fc='goog.loadModule(function(exports) {"use strict";',Gc='goog.retrieveAndExecModule_("',
7
+ Hc="goog_",Ic="google",Jc="google.charts.load",Kc="google.charts.load version ",Lc="gt",Mc="head",Nc="href",Oc="id",Pc="iframe",S="imagechart",Qc="javascript",Rc="link",Sc="load",Tc="load-css-",Uc="loadCSSFile: ",Vc="loadScript: ",Wc="loading css failed: ",Xc="lt",Yc="native code",Zc="none",$c="null",ad="number",bd="o",T="object",cd="onload",dd="quot",ed="rel",fd="removeAttribute",gd="script",hd="splice",id="string",jd="stylesheet",kd="text/css",ld="text/javascript",U="top",md="type",V="ui",nd="ui_base",
8
+ od="unknown",pd="unknown type name",qd="var ",rd="var _evalTest_ = 1;",sd="visualization",td="webfontloader",ud="write",vd="{cssFile}",wd="{language}",xd="{package}",yd="{prefix}",zd="{prefix}/{version}/css/{cssFile}",Ad="{prefix}/{version}/third_party/{package}",Bd="{version}",Cd="|[",Dd="})",Ed="~",Fd="\u0080",Gd="\u010cesk\u00e1 republika",Hd="\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c",Id="\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d",Jd="\u043c\u043e\u043d\u0433\u043e\u043b\u044c\u0441\u043a\u0438\u0439",
9
+ Kd="\u0540\u0561\u0575\u0561\u057d\u057f\u0561\u0576\u056b \u0540\u0561\u0576\u0580\u0561\u057a\u0565\u057f\u0578\u0582\u0569\u056b\u0582\u0576",Ld="\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",Md="\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629",Nd="\u0627\u0644\u0635\u062d\u0631\u0627\u0621 \u0627\u0644\u063a\u0631\u0628\u064a\u0629",Od="\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629",
10
+ Pd="\u0627\u0644\u0648\u0644\u0627\u064a\u0627\u062a \u0627\u0644\u0645\u062a\u062d\u062f\u0629 \u0627\u0644\u0623\u0645\u0631\u064a\u0643\u064a\u0629",Qd="\u062c\u0632\u0631 \u0627\u0644\u0642\u0645\u0631",Rd="\u067e\u0627\u06a9\u0633\u062a\u0627\u0646",W="\u092d\u093e\u0930\u0924",X="\u12a2\u1275\u12ee\u1335\u12eb",Sd="\uc870\uc120 \ubbfc\uc8fc\uc8fc\uc758 \uc778\ubbfc \uacf5\ud654\uad6d",Td="\ufffd";function Y(){return function(){}}var Z=Z||{};Z.global=this;Z.P=function(a){return void 0!==a};
11
+ Z.Aa=function(a,c,d){a=a.split(r);d=d||Z.global;a[0]in d||!d.execScript||d.execScript(qd+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&Z.P(c)?d[e]=c:d=d[e]?d[e]:d[e]={}};Z.ue=function(a,c){Z.Aa(a,c)};Z.H=!0;Z.Cd=yc;Z.ra=!0;Z.ec=!1;Z.Ob=!Z.H;Z.Ya=!1;Z.Gf=function(a){if(Z.La())throw Error("goog.provide can not be used within a goog.module.");Z.fb(a)};Z.fb=function(a,c){Z.Aa(a,c)};Z.mc=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
12
+ Z.Oa=function(a){if(!Z.h(a)||!a||-1==a.search(Z.mc))throw Error("Invalid module identifier");if(!Z.La())throw Error("Module "+a+" has been loaded incorrectly.");if(Z.j.Pa)throw Error("goog.module may only be called once per module.");Z.j.Pa=a};Z.Oa.get=Y();Z.Oa.Ge=Y();Z.j=null;Z.La=function(){return null!=Z.j};Z.Oa.xa=function(){Z.j.xa=!0};Z.Zf=function(a){if(Z.Ob)throw a=a||b,Error("Importing test-only code into non-debug environment"+(a?w+a:r));};Z.Be=Y();
13
+ Z.kb=function(){for(var a=[Ic,tc,Sc],c=Z.global,d;d=a.shift();)if(Z.Ic(c[d]))c=c[d];else return null;return c};Z.Re=function(a,c){var d=c||Z.global,e;for(e in a)d[e]=a[e]};Z.Id=function(a,c,d,e){if(Z.Wa){var f;a=a.replace(/\\/g,u);var g=Z.i;e&&typeof e!==qc||(e=e?{module:Dc}:{});for(var h=0;f=c[h];h++)g.U[f]=a,g.Ra[a]=e.module==Dc;for(e=0;c=d[e];e++)a in g.G||(g.G[a]={}),g.G[a][c]=!0}};Z.yg=!1;Z.zd=!0;Z.uf=function(a){Z.global.console&&Z.global.console.error(a)};Z.Uf=Y();Z.F=b;Z.Bf=Y();
14
+ Z.Hd=function(){throw Error("unimplemented abstract method");};Z.Jd=function(a){a.Fe=function(){if(a.vb)return a.vb;Z.H&&(Z.wb[Z.wb.length]=a);return a.vb=new a}};Z.wb=[];Z.Vb=!0;Z.cc=Z.H;Z.Sc={};Z.Wa=!1;
15
+ Z.Wa&&(Z.i={Ra:{},U:{},G:{},Hb:{},qa:{},X:{}},Z.tb=function(){var a=Z.global.document;return null!=a&&ud in a},Z.Ac=function(){if(Z.P(Z.global.Lb))Z.F=Z.global.Lb;else if(Z.tb())for(var a=Z.global.document.getElementsByTagName(Jb),c=a.length-1;0<=c;--c){var d=a[c].src,e=d.lastIndexOf(Ma),e=-1==e?d.length:e;if(d.substr(e-7,7)==pc){Z.F=d.substr(0,e-7);break}}},Z.Ha=function(a,c){(Z.global.rd||Z.od)(a,c)&&(Z.i.qa[a]=!0)},Z.Ub=!(Z.global.atob||!Z.global.document||!Z.global.document.all),Z.Gc=function(a){Z.Ha(b,
16
+ Gc+a+ha)&&(Z.i.qa[a]=!0)},Z.Sa=[],Z.Ag=function(a,c){return Z.Vb&&Z.P(Z.global.JSON)?Ec+Z.global.JSON.stringify(c+ca+a+ba)+xa:Fc+c+da+a+ba},Z.Rc=function(){var a=Z.Sa.length;if(0<a){var c=Z.Sa;Z.Sa=[];for(var d=0;d<a;d++)Z.Bb(c[d])}},Z.vf=function(a){Z.xb(a)&&Z.nc(a)&&Z.Bb(Z.F+Z.Ga(a))},Z.xb=function(a){return(a=Z.Ga(a))&&Z.i.Ra[a]?Z.F+a in Z.i.X:!1},Z.nc=function(a){if((a=Z.Ga(a))&&a in Z.i.G)for(var c in Z.i.G[a])if(!Z.Mc(c)&&!Z.xb(c))return!1;return!0},Z.Bb=function(a){if(a in Z.i.X){var c=Z.i.X[a];
17
+ delete Z.i.X[a];Z.Fc(c)}},Z.tf=Y(),Z.sf=function(a){var c=Z.j;try{Z.j={Pa:void 0,xa:!1};var d;if(Z.yb(a))d=a.call(Z.global,{});else if(Z.h(a))d=Z.Pc.call(Z.global,a);else throw Error("Invalid module definition");var e=Z.j.Pa;if(!Z.h(e)||!e)throw Error('Invalid module name "'+e+l);Z.j.xa?Z.fb(e,d):Z.cc&&Object.seal&&Object.seal(d);Z.Sc[e]=d}finally{Z.j=c}},Z.Pc=function(a){eval(a);return{}},Z.md=function(a){Z.global.document.write(Ia+a+ia)},Z.pc=function(a){var c=Z.global.document,d=c.createElement(gd);
18
+ d.type=ld;d.src=a;d.defer=!1;d.async=!1;c.head.appendChild(d)},Z.od=function(a,c){if(Z.tb()){var d=Z.global.document;if(!Z.Ya&&d.readyState==P){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}var e=Z.Ub;void 0===c?e?(e=fa+ ++Z.zb+va,d.write(Ia+a+l+e+La)):Z.Ya?Z.pc(a):Z.md(a):d.write(Ja+c+Fa);return!0}return!1},Z.zb=0,Z.Df=function(a,c){a.readyState==P&&Z.zb==c&&Z.Rc();return!0},Z.Bg=function(a){function c(a){if(!(a in f.qa||a in f.Hb)){f.Hb[a]=!0;if(a in f.G)for(var g in f.G[a])if(!Z.Mc(g))if(g in
19
+ f.U)c(f.U[g]);else throw Error("Undefined nameToPath for "+g);a in e||(e[a]=!0,d.push(a))}}var d=[],e={},f=Z.i;c(a);for(a=0;a<d.length;a++){var g=d[a];Z.i.qa[g]=!0}var h=Z.j;Z.j=null;for(a=0;a<d.length;a++)if(g=d[a])f.Ra[g]?Z.Gc(Z.F+g):Z.Ha(Z.F+g);else throw Z.j=h,Error("Undefined script input");Z.j=h},Z.Ga=function(a){return a in Z.i.U?Z.i.U[a]:null},Z.Ac(),Z.global.td||Z.Ha(Z.F+"deps.js"));
20
+ Z.yf=function(a){a=a.split(u);for(var c=0;c<a.length;)a[c]==r?a.splice(c,1):c&&a[c]==Ba&&a[c-1]&&a[c-1]!=Ba?a.splice(--c,2):c++;return a.join(u)};Z.rf=function(a){if(Z.global.Mb)return Z.global.Mb(a);var c=new Z.global.XMLHttpRequest;c.open(Cc,a,!1);c.send();return c.responseText};Z.Vf=Y();
21
+ Z.s=function(a){var c=typeof a;if(c==T)if(a){if(a instanceof Array)return N;if(a instanceof Object)return c;var d=Object.prototype.toString.call(a);if(d==gc)return T;if(d==ec||typeof a.length==ad&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(hd))return N;if(d==fc||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(rc))return R}else return $c;else if(c==R&&"undefined"==typeof a.call)return T;return c};
22
+ Z.gf=function(a){return null===a};Z.Ic=function(a){return null!=a};Z.isArray=function(a){return Z.s(a)==N};Z.Ja=function(a){var c=Z.s(a);return c==N||c==T&&typeof a.length==ad};Z.bf=function(a){return Z.$(a)&&typeof a.getFullYear==R};Z.h=function(a){return typeof a==id};Z.Hc=function(a){return typeof a==qc};Z.Lc=function(a){return typeof a==ad};Z.yb=function(a){return Z.s(a)==R};Z.$=function(a){var c=typeof a;return c==T&&null!=a||c==R};Z.qb=function(a){return a[Z.D]||(a[Z.D]=++Z.hd)};Z.Se=function(a){return!!a[Z.D]};
23
+ Z.Zc=function(a){null!==a&&fd in a&&a.removeAttribute(Z.D);try{delete a[Z.D]}catch(c){}};Z.D="closure_uid_"+(1E9*Math.random()>>>0);Z.hd=0;Z.De=Z.qb;Z.Rf=Z.Zc;Z.uc=function(a){var c=Z.s(a);if(c==T||c==N){if(a.clone)return a.clone();var c=c==N?[]:{},d;for(d in a)c[d]=Z.uc(a[d]);return c}return a};Z.tc=function(a,c,d){return a.call.apply(a.bind,arguments)};
24
+ Z.rc=function(a,c,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(c,d)}}return function(){return a.apply(c,arguments)}};Z.bind=function(a,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(Yc)?Z.bind=Z.tc:Z.bind=Z.rc;return Z.bind.apply(null,arguments)};
25
+ Z.Wc=function(a,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return a.apply(this,c)}};Z.wf=function(a,c){for(var d in c)a[d]=c[d]};Z.now=Z.ra&&Date.now||function(){return+new Date};
26
+ Z.Fc=function(a){if(Z.global.execScript)Z.global.execScript(a,mb);else if(Z.global.eval){if(null==Z.Y)if(Z.global.eval(rd),"undefined"!=typeof Z.global._evalTest_){try{delete Z.global._evalTest_}catch(e){}Z.Y=!0}else Z.Y=!1;if(Z.Y)Z.global.eval(a);else{var c=Z.global.document,d=c.createElement(Jb);d.type=ld;d.defer=!1;d.appendChild(c.createTextNode(a));c.body.appendChild(d);c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};Z.Y=null;
27
+ Z.Ce=function(a,c){function d(a){a=a.split(za);for(var c=[],d=0;d<a.length;d++)c.push(e(a[d]));return c.join(za)}function e(a){return Z.gb[a]||a}var f;f=Z.gb?Z.xc==Sa?e:d:function(a){return a};return c?a+za+f(c):f(a)};Z.Wf=function(a,c){Z.gb=a;Z.xc=c};Z.Je=function(a,c){c&&(a=a.replace(/\{\$([^}]+)}/g,function(a,e){return null!=c&&e in c?c[e]:a}));return a};Z.Ke=function(a){return a};Z.Ba=function(a,c){Z.Aa(a,c,void 0)};Z.ze=function(a,c,d){a[c]=d};
28
+ Z.Ia=function(a,c){function d(){}d.prototype=c.prototype;a.oa=c.prototype;a.prototype=new d;a.prototype.constructor=a;a.qc=function(a,d,g){for(var h=Array(arguments.length-2),m=2;m<arguments.length;m++)h[m-2]=arguments[m];return c.prototype[d].apply(a,h)}};
29
+ Z.qc=function(a,c,d){var e=arguments.callee.caller;if(Z.ec||Z.H&&!e)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(e.oa){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.oa.constructor.apply(a,f)}f=Array(arguments.length-2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];for(var g=!1,h=a.constructor;h;h=h.oa&&h.oa.constructor)if(h.prototype[c]===
30
+ e)g=!0;else if(g)return h.prototype[c].apply(a,f);if(a[c]===e)return a.constructor.prototype[c].apply(a,f);throw Error("goog.base called from a method of one name to a method of a different name");};Z.scope=function(a){if(Z.La())throw Error("goog.scope is not supported within a goog.module.");a.call(Z.global)};
31
+ Z.u=function(a,c){var d=c.constructor,e=c.cd;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=Z.u.vc(d,a);a&&Z.Ia(d,a);delete c.constructor;delete c.cd;Z.u.$a(d.prototype,c);null!=e&&(e instanceof Function?e(d):Z.u.$a(d,e));return d};Z.u.bc=Z.H;
32
+ Z.u.vc=function(a,c){if(Z.u.bc&&Object.seal instanceof Function){if(c&&c.prototype&&c.prototype[Z.kc])return a;var d=function(){var c=a.apply(this,arguments)||this;c[Z.D]=c[Z.D];this.constructor===d&&Object.seal(c);return c};return d}return a};Z.u.Za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
33
+ Z.u.$a=function(a,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);for(var e=0;e<Z.u.Za.length;e++)d=Z.u.Za[e],Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])};Z.gg=Y();Z.kc="goog_defineClass_legacy_unsealable";Z.debug={};Z.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Z.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a))};Z.Ia(Z.debug.Error,Error);Z.debug.Error.prototype.name="CustomError";Z.hb={};Z.hb.$b={Pb:1,pd:2,Gd:3,qd:4,Bd:5,Ad:6,Fd:7,ud:8,wd:9,yd:10,xd:11,Dd:12};Z.c={};Z.c.Xa=!1;Z.c.Rb=!1;Z.c.lc={Yb:"\u00a0"};Z.c.startsWith=function(a,c){return 0==a.lastIndexOf(c,0)};Z.c.endsWith=function(a,c){var d=a.length-c.length;return 0<=d&&a.indexOf(c,d)==d};Z.c.je=function(a,c){return 0==Z.c.eb(c,a.substr(0,c.length))};Z.c.fe=function(a,c){return 0==Z.c.eb(c,a.substr(a.length-c.length,c.length))};Z.c.ge=function(a,c){return a.toLowerCase()==c.toLowerCase()};
34
+ Z.c.dd=function(a,c){for(var d=a.split(la),e=b,f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join(la)};Z.c.le=function(a){return a.replace(/[\s\xa0]+/g,k).replace(/^\s+|\s+$/g,b)};Z.c.Ka=function(a){return/^[\s\xa0]*$/.test(a)};Z.c.df=function(a){return 0==a.length};Z.c.Jc=Z.c.Ka;Z.c.Kc=function(a){return Z.c.Ka(Z.c.Tc(a))};Z.c.cf=Z.c.Kc;Z.c.$e=function(a){return!/[^\t\n\r ]/.test(a)};Z.c.Ye=function(a){return!/[^a-zA-Z]/.test(a)};Z.c.hf=function(a){return!/[^0-9]/.test(a)};
35
+ Z.c.Ze=function(a){return!/[^a-zA-Z0-9]/.test(a)};Z.c.lf=function(a){return a==k};Z.c.mf=function(a){return 1==a.length&&a>=k&&a<=Ed||a>=Fd&&a<=Td};Z.c.eg=function(a){return a.replace(/(\r\n|\r|\n)+/g,k)};Z.c.Yd=function(a){return a.replace(/(\r\n|\r|\n)/g,ba)};Z.c.Af=function(a){return a.replace(/\xa0|\s/g,k)};Z.c.zf=function(a){return a.replace(/\xa0|[ \t]+/g,k)};Z.c.ke=function(a){return a.replace(/[\t\r\n ]+/g,k).replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,b)};
36
+ Z.c.trim=Z.ra&&String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,b)};Z.c.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,b)};Z.c.trimRight=function(a){return a.replace(/[\s\xa0]+$/,b)};Z.c.eb=function(a,c){var d=String(a).toLowerCase(),e=String(c).toLowerCase();return d<e?-1:d==e?0:1};
37
+ Z.c.Db=function(a,c,d){if(a==c)return 0;if(!a)return-1;if(!c)return 1;for(var e=a.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var m=f[h];if(d!=m)return a=parseInt(d,10),!isNaN(a)&&(c=parseInt(m,10),!isNaN(c)&&a-c)?a-c:d<m?-1:1}return e.length!=f.length?e.length-f.length:a<c?-1:1};Z.c.We=function(a,c){return Z.c.Db(a,c,/\d+|\D+/g)};Z.c.Dc=function(a,c){return Z.c.Db(a,c,/\d+|\.\d+|\D+/g)};Z.c.Cf=Z.c.Dc;Z.c.xg=function(a){return encodeURIComponent(String(a))};
38
+ Z.c.wg=function(a){return decodeURIComponent(a.replace(/\+/g,k))};Z.c.Uc=function(a,c){return a.replace(/(\r\n|\r|\n)/g,c?Ga:Ha)};Z.c.rb=function(a){if(!Z.c.Jb.test(a))return a;-1!=a.indexOf(q)&&(a=a.replace(Z.c.Kb,pa));-1!=a.indexOf(x)&&(a=a.replace(Z.c.Xb,ra));-1!=a.indexOf(Ka)&&(a=a.replace(Z.c.Sb,qa));-1!=a.indexOf(l)&&(a=a.replace(Z.c.ac,sa));-1!=a.indexOf(ta)&&(a=a.replace(Z.c.dc,oa));-1!=a.indexOf(aa)&&(a=a.replace(Z.c.Zb,ma));Z.c.Xa&&-1!=a.indexOf(xc)&&(a=a.replace(Z.c.Qb,na));return a};
39
+ Z.c.Kb=/&/g;Z.c.Xb=/</g;Z.c.Sb=/>/g;Z.c.ac=/"/g;Z.c.dc=/'/g;Z.c.Zb=/\x00/g;Z.c.Qb=/e/g;Z.c.Jb=Z.c.Xa?/[\x00&<>"'e]/:/[\x00&<>"']/;Z.c.Fb=function(a){return Z.c.contains(a,q)?!Z.c.Rb&&wc in Z.global?Z.c.Gb(a):Z.c.jd(a):a};Z.c.vg=function(a,c){return Z.c.contains(a,q)?Z.c.Gb(a,c):a};
40
+ Z.c.Gb=function(a,c){var d={"&amp;":q,"&lt;":x,"&gt;":Ka,"&quot;":l},e;e=c?c.createElement(vc):Z.global.document.createElement(vc);return a.replace(Z.c.Tb,function(a,c){var h=d[a];if(h)return h;if(c.charAt(0)==ja){var m=Number(v+c.substr(1));isNaN(m)||(h=String.fromCharCode(m))}h||(e.innerHTML=a+k,h=e.firstChild.nodeValue.slice(0,-1));return d[a]=h})};
41
+ Z.c.jd=function(a){return a.replace(/&([^;]+);/g,function(a,d){switch(d){case nc:return q;case Xc:return x;case Lc:return Ka;case dd:return l;default:if(d.charAt(0)==ja){var e=Number(v+d.substr(1));if(!isNaN(e))return String.fromCharCode(e)}return a}})};Z.c.Tb=/&([^;\s<&]+);?/g;Z.c.zg=function(a,c){return Z.c.Uc(a.replace(/ /g,ea),c)};Z.c.Ff=function(a){return a.replace(/(^|[\n ]) /g,ka+Z.c.lc.Yb)};
42
+ Z.c.fg=function(a,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(a.charAt(0)==f&&a.charAt(a.length-1)==f)return a.substring(1,a.length-1)}return a};Z.c.truncate=function(a,c,d){d&&(a=Z.c.Fb(a));a.length>c&&(a=a.substring(0,c-3)+Ca);d&&(a=Z.c.rb(a));return a};
43
+ Z.c.rg=function(a,c,d,e){d&&(a=Z.c.Fb(a));if(e&&a.length>c)e>c&&(e=c),a=a.substring(0,c-e)+Ca+a.substring(a.length-e);else if(a.length>c){e=Math.floor(c/2);var f=a.length-e;a=a.substring(0,e+c%2)+Ca+a.substring(f)}d&&(a=Z.c.rb(a));return a};Z.c.Va={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":x};Z.c.ea={"'":"\\'"};
44
+ Z.c.quote=function(a){a=String(a);for(var c=[l],d=0;d<a.length;d++){var e=a.charAt(d),f=e.charCodeAt(0);c[d+1]=Z.c.Va[e]||(31<f&&127>f?e:Z.c.ib(e))}c.push(l);return c.join(b)};Z.c.ye=function(a){for(var c=[],d=0;d<a.length;d++)c[d]=Z.c.ib(a.charAt(d));return c.join(b)};
45
+ Z.c.ib=function(a){if(a in Z.c.ea)return Z.c.ea[a];if(a in Z.c.Va)return Z.c.ea[a]=Z.c.Va[a];var c=a,d=a.charCodeAt(0);if(31<d&&127>d)c=a;else{if(256>d){if(c=kc,16>d||256<d)c+=v}else c=jc,4096>d&&(c+=v);c+=d.toString(16).toUpperCase()}return Z.c.ea[a]=c};Z.c.contains=function(a,c){return-1!=a.indexOf(c)};Z.c.$d=function(a,c){return Z.c.contains(a.toLowerCase(),c.toLowerCase())};Z.c.qe=function(a,c){return a&&c?a.split(c).length-1:0};
46
+ Z.c.L=function(a,c,d){var e=a;0<=c&&c<a.length&&0<d&&(e=a.substr(0,c)+a.substr(c+d,a.length-c-d));return e};Z.c.remove=function(a,c){var d=new RegExp(Z.c.Ta(c),b);return a.replace(d,b)};Z.c.Of=function(a,c){var d=new RegExp(Z.c.Ta(c),Bc);return a.replace(d,b)};Z.c.Ta=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,hc).replace(/\x08/g,lc)};Z.c.repeat=String.prototype.repeat?function(a,c){return a.repeat(c)}:function(a,c){return Array(c+1).join(a)};
47
+ Z.c.Ef=function(a,c,d){a=Z.P(d)?a.toFixed(d):String(a);d=a.indexOf(r);-1==d&&(d=a.length);return Z.c.repeat(v,Math.max(0,c-d))+a};Z.c.Tc=function(a){return null==a?b:String(a)};Z.c.Xd=function(a){return Array.prototype.join.call(arguments,b)};Z.c.Ne=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Z.now()).toString(36)};
48
+ Z.c.oe=function(a,c){for(var d=0,e=Z.c.trim(String(a)).split(r),f=Z.c.trim(String(c)).split(r),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var m=e[h]||b,n=f[h]||b,p=/(\d*)(\D*)/g,Oa=/(\d*)(\D*)/g;do{var A=p.exec(m)||[b,b,b],t=Oa.exec(n)||[b,b,b];if(0==A[0].length&&0==t[0].length)break;d=Z.c.ua(0==A[1].length?0:parseInt(A[1],10),0==t[1].length?0:parseInt(t[1],10))||Z.c.ua(0==A[2].length,0==t[2].length)||Z.c.ua(A[2],t[2])}while(0==d)}return d};Z.c.ua=function(a,c){return a<c?-1:a>c?1:0};
49
+ Z.c.Te=function(a){for(var c=0,d=0;d<a.length;++d)c=31*c+a.charCodeAt(d)>>>0;return c};Z.c.kd=2147483648*Math.random()|0;Z.c.re=function(){return Hc+Z.c.kd++};Z.c.jg=function(a){var c=Number(a);return 0==c&&Z.c.Ka(a)?NaN:c};Z.c.ef=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};Z.c.nf=function(a){return/^([A-Z][a-z]*)+$/.test(a)};Z.c.hg=function(a){return String(a).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})};Z.c.pg=function(a){return String(a).replace(/([A-Z])/g,Aa).toLowerCase()};
50
+ Z.c.qg=function(a,c){var d=Z.h(c)?Z.c.Ta(c):ic;return a.replace(new RegExp(ua+(d?Cd+d+mc:b)+wa,Bc),function(a,c,d){return c+d.toUpperCase()})};Z.c.Zd=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};Z.c.parseInt=function(a){isFinite(a)&&(a=String(a));return Z.h(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};Z.c.cg=function(a,c,d){a=a.split(c);for(var e=[];0<d&&a.length;)e.push(a.shift()),d--;a.length&&e.push(a.join(c));return e};
51
+ Z.c.qf=function(a,c){if(c)typeof c==id&&(c=[c]);else return a;for(var d=-1,e=0;e<c.length;e++)if(c[e]!=b){var f=a.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?a:a.slice(d+1)};Z.c.we=function(a,c){var d=[],e=[];if(a==c)return 0;if(!a.length||!c.length)return Math.max(a.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<a.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(a[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};Z.g={};Z.g.o=Z.H;Z.g.V=function(a,c){c.unshift(a);Z.debug.Error.call(this,Z.c.dd.apply(null,c));c.shift()};Z.Ia(Z.g.V,Z.debug.Error);Z.g.V.prototype.name="AssertionError";Z.g.Nb=function(a){throw a;};Z.g.ya=Z.g.Nb;Z.g.A=function(a,c,d,e){var f=Ra;if(d)var f=f+(w+d),g=e;else a&&(f+=w+a,g=c);a=new Z.g.V(b+f,g||[]);Z.g.ya(a)};Z.g.Xf=function(a){Z.g.o&&(Z.g.ya=a)};Z.g.assert=function(a,c,d){Z.g.o&&!a&&Z.g.A(b,null,c,Array.prototype.slice.call(arguments,2));return a};
52
+ Z.g.Ca=function(a,c){Z.g.o&&Z.g.ya(new Z.g.V(eb+(a?w+a:b),Array.prototype.slice.call(arguments,1)))};Z.g.Pd=function(a,c,d){Z.g.o&&!Z.Lc(a)&&Z.g.A(bb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Sd=function(a,c,d){Z.g.o&&!Z.h(a)&&Z.g.A(db,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Nd=function(a,c,d){Z.g.o&&!Z.yb(a)&&Z.g.A($a,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
53
+ Z.g.Qd=function(a,c,d){Z.g.o&&!Z.$(a)&&Z.g.A(cb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Kd=function(a,c,d){Z.g.o&&!Z.isArray(a)&&Z.g.A(Ya,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Ld=function(a,c,d){Z.g.o&&!Z.Hc(a)&&Z.g.A(Za,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Md=function(a,c,d){!Z.g.o||Z.$(a)&&a.nodeType==Z.hb.$b.Pb||Z.g.A(Xa,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
54
+ Z.g.Od=function(a,c,d,e){!Z.g.o||a instanceof c||Z.g.A(ab,[Z.g.pb(c),Z.g.pb(a)],d,Array.prototype.slice.call(arguments,3));return a};Z.g.Rd=function(){for(var a in Object.prototype)Z.g.Ca(a+ga)};Z.g.pb=function(a){return a instanceof Function?a.displayName||a.name||pd:a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?$c:typeof a};Z.f={};Z.w=Z.ra;Z.f.v=!1;Z.f.Xc=function(a){return a[a.length-1]};Z.f.pf=Z.f.Xc;Z.f.indexOf=Z.w&&(Z.f.v||Array.prototype.indexOf)?function(a,c,d){return Array.prototype.indexOf.call(a,c,d)}:function(a,c,d){d=null==d?0:0>d?Math.max(0,a.length+d):d;if(Z.h(a))return Z.h(c)&&1==c.length?a.indexOf(c,d):-1;for(;d<a.length;d++)if(d in a&&a[d]===c)return d;return-1};
55
+ Z.f.lastIndexOf=Z.w&&(Z.f.v||Array.prototype.lastIndexOf)?function(a,c,d){return Array.prototype.lastIndexOf.call(a,c,null==d?a.length-1:d)}:function(a,c,d){d=null==d?a.length-1:d;0>d&&(d=Math.max(0,a.length+d));if(Z.h(a))return Z.h(c)&&1==c.length?a.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in a&&a[d]===c)return d;return-1};
56
+ Z.f.forEach=Z.w&&(Z.f.v||Array.prototype.forEach)?function(a,c,d){Array.prototype.forEach.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)g in f&&c.call(d,f[g],g,a)};Z.f.jb=function(a,c){for(var d=Z.h(a)?a.split(b):a,e=a.length-1;0<=e;--e)e in d&&c.call(void 0,d[e],e,a)};
57
+ Z.f.filter=Z.w&&(Z.f.v||Array.prototype.filter)?function(a,c,d){return Array.prototype.filter.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=[],g=0,h=Z.h(a)?a.split(b):a,m=0;m<e;m++)if(m in h){var n=h[m];c.call(d,n,m,a)&&(f[g++]=n)}return f};Z.f.map=Z.w&&(Z.f.v||Array.prototype.map)?function(a,c,d){return Array.prototype.map.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Array(e),g=Z.h(a)?a.split(b):a,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,a));return f};
58
+ Z.f.reduce=Z.w&&(Z.f.v||Array.prototype.reduce)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduce.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.forEach(a,function(d,h){f=c.call(e,f,d,h,a)});return f};Z.f.reduceRight=Z.w&&(Z.f.v||Array.prototype.reduceRight)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduceRight.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.jb(a,function(d,h){f=c.call(e,f,d,h,a)});return f};
59
+ Z.f.some=Z.w&&(Z.f.v||Array.prototype.some)?function(a,c,d){return Array.prototype.some.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return!0;return!1};Z.f.every=Z.w&&(Z.f.v||Array.prototype.every)?function(a,c,d){return Array.prototype.every.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,a))return!1;return!0};
60
+ Z.f.count=function(a,c,d){var e=0;Z.f.forEach(a,function(a,g,h){c.call(d,a,g,h)&&++e},d);return e};Z.f.find=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};Z.f.findIndex=function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return g;return-1};Z.f.Ae=function(a,c,d){c=Z.f.Bc(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};
61
+ Z.f.Bc=function(a,c,d){for(var e=Z.h(a)?a.split(b):a,f=a.length-1;0<=f;f--)if(f in e&&c.call(d,e[f],f,a))return f;return-1};Z.f.contains=function(a,c){return 0<=Z.f.indexOf(a,c)};Z.f.Jc=function(a){return 0==a.length};Z.f.clear=function(a){if(!Z.isArray(a))for(var c=a.length-1;0<=c;c--)delete a[c];a.length=0};Z.f.Ue=function(a,c){Z.f.contains(a,c)||a.push(c)};Z.f.ub=function(a,c,d){Z.f.splice(a,d,0,c)};Z.f.Ve=function(a,c,d){Z.Wc(Z.f.splice,a,d,0).apply(null,c)};
62
+ Z.f.insertBefore=function(a,c,d){var e;2==arguments.length||0>(e=Z.f.indexOf(a,d))?a.push(c):Z.f.ub(a,c,e)};Z.f.remove=function(a,c){var d=Z.f.indexOf(a,c),e;(e=0<=d)&&Z.f.L(a,d);return e};Z.f.Tf=function(a,c){var d=Z.f.lastIndexOf(a,c);return 0<=d?(Z.f.L(a,d),!0):!1};Z.f.L=function(a,c){return 1==Array.prototype.splice.call(a,c,1).length};Z.f.Sf=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0<=c?(Z.f.L(a,c),!0):!1};
63
+ Z.f.Pf=function(a,c,d){var e=0;Z.f.jb(a,function(f,g){c.call(d,f,g,a)&&Z.f.L(a,g)&&e++});return e};Z.f.concat=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.join=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.fd=function(a){var c=a.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=a[e];return d}return[]};Z.f.clone=Z.f.fd;
64
+ Z.f.extend=function(a,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(Z.Ja(e)){var f=a.length||0,g=e.length||0;a.length=f+g;for(var h=0;h<g;h++)a[f+h]=e[h]}else a.push(e)}};Z.f.splice=function(a,c,d,e){return Array.prototype.splice.apply(a,Z.f.slice(arguments,1))};Z.f.slice=function(a,c,d){return 2>=arguments.length?Array.prototype.slice.call(a,c):Array.prototype.slice.call(a,c,d)};
65
+ Z.f.Qf=function(a,c,d){function e(a){return Z.$(a)?bd+Z.qb(a):(typeof a).charAt(0)+a}c=c||a;d=d||e;for(var f={},g=0,h=0;h<a.length;){var m=a[h++],n=d(m);Object.prototype.hasOwnProperty.call(f,n)||(f[n]=!0,c[g++]=m)}c.length=g};Z.f.bb=function(a,c,d){return Z.f.cb(a,d||Z.f.B,!1,c)};Z.f.Vd=function(a,c,d){return Z.f.cb(a,c,!0,void 0,d)};Z.f.cb=function(a,c,d,e,f){for(var g=0,h=a.length,m;g<h;){var n=g+h>>1,p;p=d?c.call(f,a[n],n,a):c(e,a[n]);0<p?g=n+1:(h=n,m=!p)}return m?g:~g};
66
+ Z.f.sort=function(a,c){a.sort(c||Z.f.B)};Z.f.dg=function(a,c){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]={index:e,value:a[e]};var f=c||Z.f.B;Z.f.sort(d,function(a,c){return f(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value};Z.f.bd=function(a,c,d){var e=d||Z.f.B;Z.f.sort(a,function(a,d){return e(c(a),c(d))})};Z.f.ag=function(a,c,d){Z.f.bd(a,function(a){return a[c]},d)};
67
+ Z.f.kf=function(a,c,d){c=c||Z.f.B;for(var e=1;e<a.length;e++){var f=c(a[e-1],a[e]);if(0<f||0==f&&d)return!1}return!0};Z.f.xe=function(a,c,d){if(!Z.Ja(a)||!Z.Ja(c)||a.length!=c.length)return!1;var e=a.length;d=d||Z.f.yc;for(var f=0;f<e;f++)if(!d(a[f],c[f]))return!1;return!0};Z.f.me=function(a,c,d){d=d||Z.f.B;for(var e=Math.min(a.length,c.length),f=0;f<e;f++){var g=d(a[f],c[f]);if(0!=g)return g}return Z.f.B(a.length,c.length)};Z.f.B=function(a,c){return a>c?1:a<c?-1:0};
68
+ Z.f.Xe=function(a,c){return-Z.f.B(a,c)};Z.f.yc=function(a,c){return a===c};Z.f.Td=function(a,c,d){d=Z.f.bb(a,c,d);return 0>d?(Z.f.ub(a,c,-(d+1)),!0):!1};Z.f.Ud=function(a,c,d){c=Z.f.bb(a,c,d);return 0<=c?Z.f.L(a,c):!1};Z.f.Wd=function(a,c,d){for(var e={},f=0;f<a.length;f++){var g=a[f],h=c.call(d,g,f,a);Z.P(h)&&(e[h]||(e[h]=[])).push(g)}return e};Z.f.og=function(a,c,d){var e={};Z.f.forEach(a,function(f,g){e[c.call(d,f,g,a)]=f});return e};
69
+ Z.f.Hf=function(a,c,d){var e=[],f=0,g=a;d=d||1;void 0!==c&&(f=a,g=c);if(0>d*(g-f))return[];if(0<d)for(a=f;a<g;a+=d)e.push(a);else for(a=f;a>g;a+=d)e.push(a);return e};Z.f.repeat=function(a,c){for(var d=[],e=0;e<c;e++)d[e]=a;return d};Z.f.Cc=function(a){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(Z.isArray(e))for(var f=0;f<e.length;f+=8192)for(var g=Z.f.Cc.apply(null,Z.f.slice(e,f,f+8192)),h=0;h<g.length;h++)c.push(g[h]);else c.push(e)}return c};
70
+ Z.f.rotate=function(a,c){a.length&&(c%=a.length,0<c?Array.prototype.unshift.apply(a,a.splice(-c,c)):0>c&&Array.prototype.push.apply(a,a.splice(0,-c)));return a};Z.f.xf=function(a,c,d){c=Array.prototype.splice.call(a,c,1);Array.prototype.splice.call(a,d,0,c[0])};
71
+ Z.f.Cg=function(a){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};Z.f.$f=function(a,c){for(var d=c||Math.random,e=a.length-1;0<e;e--){var f=Math.floor(d()*(e+1)),g=a[e];a[e]=a[f];a[f]=g}};Z.f.pe=function(a,c){var d=[];Z.f.forEach(c,function(c){d.push(a[c])});return d};Z.locale={};
72
+ Z.locale.J={COUNTRY:{AD:"Andorra",AE:Md,AF:Ld,AG:Qa,AI:"Anguilla",AL:"Shqip\u00ebria",AM:Kd,AN:wb,AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:Pa,AT:"\u00d6sterreich",AU:"Australia",AW:"Aruba",AX:"\u00c5land",AZ:"Az\u0259rbaycan",BA:z,BB:"Barbados",BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",BE:"Belgi\u00eb",BF:"Burkina Faso",BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",BI:"Burundi",BJ:"B\u00e9nin",BM:"Bermuda",BN:"Brunei",BO:y,BR:"Brasil",
73
+ BS:"Bahamas",BT:"\u092d\u0942\u091f\u093e\u0928",BV:"Bouvet Island",BW:Ta,BY:Hd,BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:Ib,CF:Hb,CG:"Congo",CH:"Schweiz",CI:"C\u00f4te d\u2019Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroun",CN:"\u4e2d\u56fd",CO:"Colombia",CR:"Costa Rica",CS:Nb,CU:"Cuba",CV:"Cabo Verde",CX:Wa,CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",CZ:Gd,DD:"East Germany",DE:"Deutschland",DJ:"Jabuuti",DK:"Danmark",DM:"Dominica",DO:Fb,DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",
74
+ EC:"Ecuador",EE:"Eesti",EG:"\u0645\u0635\u0631",EH:Nd,ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ES:"Espa\u00f1a",ET:X,FI:"Suomi",FJ:"\u092b\u093f\u091c\u0940",FK:fb,FM:C,FO:"F\u00f8royar",FR:"France",FX:"Metropolitan France",GA:"Gabon",GB:$b,GD:"Grenada",GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",GF:hb,GG:"Guernsey",GH:B,GI:"Gibraltar",GL:nb,GM:"Gambia",GN:"Guin\u00e9e",GP:"Guadeloupe",GQ:gb,GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",GS:"South Georgia and the South Sandwich Islands",
75
+ GT:"Guatemala",GU:"Guam",GW:"Guin\u00e9 Bissau",GY:"Guyana",HK:"\u9999\u6e2f",HM:"Heard Island and McDonald Islands",HN:jb,HR:"Hrvatska",HT:"Ha\u00efti",HU:"Magyarorsz\u00e1g",ID:kb,IE:"Ireland",IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",IM:"Isle of Man",IN:W,IO:"British Indian Ocean Territory",IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",IR:"\u0627\u06cc\u0631\u0627\u0646",IS:"\u00cdsland",IT:"Italia",JE:"Jersey",JM:"Jamaica",JO:"\u0627\u0644\u0623\u0631\u062f\u0646",JP:"\u65e5\u672c",KE:"Kenya",KG:Id,KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
76
+ KI:ob,KM:Qd,KN:Kb,KP:Sd,KR:"\ub300\ud55c\ubbfc\uad6d",KW:"\u0627\u0644\u0643\u0648\u064a\u062a",KY:Va,KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",LA:"\u0e25\u0e32\u0e27",LB:"\u0644\u0628\u0646\u0627\u0646",LC:"Saint Lucia",LI:"Liechtenstein",LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",LR:"Liberia",LS:"Lesotho",LT:"Lietuva",LU:sb,LV:"Latvija",LY:"\u0644\u064a\u0628\u064a\u0627",MA:"\u0627\u0644\u0645\u063a\u0631\u0628",MC:"Monaco",MD:vb,ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",
77
+ MG:tb,MH:ub,MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",ML:"\u0645\u0627\u0644\u064a",MM:"Myanmar",MN:"\u8499\u53e4",MO:"\u6fb3\u95e8",MP:zb,MQ:"Martinique",MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"M\u00e9xico",MY:"Malaysia",MZ:"Mo\u00e7ambique",NA:"Namibia",NC:Ab,NE:"Niger",NF:yb,NG:D,NI:"Nicaragua",NL:"Nederland",NO:"Norge",NP:"\u0928\u0947\u092a\u093e\u0932",NR:"Nauru",NT:"Neutral Zone",
78
+ NU:"Niue",NZ:xb,OM:"\u0639\u0645\u0627\u0646",PA:"Panam\u00e1",PE:"Per\u00fa",PF:Db,PG:E,PH:Cb,PK:Rd,PL:"Polska",PM:Mb,PN:"Pitcairn",PR:Eb,PS:"\u0641\u0644\u0633\u0637\u064a\u0646",PT:"Portugal",PW:"Palau",PY:Bb,QA:"\u0642\u0637\u0631",QO:"Outlying Oceania",QU:"European Union",RE:"R\u00e9union",RO:"Rom\u00e2nia",RS:"\u0421\u0440\u0431\u0438\u0458\u0430",RU:"\u0420\u043e\u0441\u0441\u0438\u044f",RW:F,SA:Od,SB:Qb,SC:Ob,SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",SE:"Sverige",SG:"\u65b0\u52a0\u5761",
79
+ SH:"Saint Helena",SI:"Slovenija",SJ:Rb,SK:Pb,SL:"Sierra Leone",SM:"San Marino",SN:H,SO:"Somali",SR:"Suriname",ST:Vb,SU:"Union of Soviet Socialist Republics",SV:"El Salvador",SY:"\u0633\u0648\u0631\u064a\u0627",SZ:Ub,TC:Yb,TD:"\u062a\u0634\u0627\u062f",TF:"French Southern Territories",TG:"Togo",TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",TJ:"\u062a\u0627\u062c\u06cc\u06a9\u0633\u062a\u0627\u0646",TK:I,TL:Xb,TM:"\u0422\u0443\u0440\u043a\u043c\u0435\u043d\u0438\u0441\u0442\u0430\u043d",
80
+ TN:"\u062a\u0648\u0646\u0633",TO:"Tonga",TR:K,TT:"Trinidad y Tobago",TV:J,TW:"\u53f0\u6e7e",TZ:Wb,UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",UG:"Uganda",UM:bc,US:ac,UY:"Uruguay",UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",VA:"Vaticano",VC:Lb,VE:"Venezuela",VG:Ua,VI:Zb,VN:"Vi\u1ec7t Nam",VU:L,WF:dc,WS:"Samoa",YD:"People's Democratic Republic of Yemen",YE:"\u0627\u0644\u064a\u0645\u0646",YT:"Mayotte",ZA:G,ZM:"Zambia",ZW:"Zimbabwe",ZZ:cc,aa_DJ:"Jabuuti",aa_ER:"\u00c9rythr\u00e9e",
81
+ aa_ER_SAAHO:"\u00c9rythr\u00e9e",aa_ET:lb,af_NA:"Namibi\u00eb",af_ZA:"Suid-Afrika",ak_GH:B,am_ET:X,ar_AE:Md,ar_BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",ar_DJ:"\u062c\u064a\u0628\u0648\u062a\u064a",ar_DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",ar_EG:"\u0645\u0635\u0631",ar_EH:Nd,ar_ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ar_IL:"\u0627\u0633\u0631\u0627\u0626\u064a\u0644",ar_IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",ar_JO:"\u0627\u0644\u0623\u0631\u062f\u0646",ar_KM:Qd,ar_KW:"\u0627\u0644\u0643\u0648\u064a\u062a",
82
+ ar_LB:"\u0644\u0628\u0646\u0627\u0646",ar_LY:"\u0644\u064a\u0628\u064a\u0627",ar_MA:"\u0627\u0644\u0645\u063a\u0631\u0628",ar_MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",ar_OM:"\u0639\u0645\u0627\u0646",ar_PS:"\u0641\u0644\u0633\u0637\u064a\u0646",ar_QA:"\u0642\u0637\u0631",ar_SA:Od,ar_SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",ar_SY:"\u0633\u0648\u0631\u064a\u0627",ar_TD:"\u062a\u0634\u0627\u062f",ar_TN:"\u062a\u0648\u0646\u0633",ar_YE:"\u0627\u0644\u064a\u0645\u0646",as_IN:"\u09ad\u09be\u09f0\u09a4",
83
+ ay_BO:y,az_AZ:"Az\u0259rbaycan",az_Cyrl_AZ:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",az_Latn_AZ:"Azerbaycan",be_BY:Hd,bg_BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",bi_VU:L,bn_BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",bn_IN:"\u09ad\u09be\u09b0\u09a4",bo_CN:"\u0f62\u0f92\u0fb1\u0f0b\u0f53\u0f42",bo_IN:"\u0f62\u0f92\u0fb1\u0f0b\u0f42\u0f62\u0f0b",bs_BA:z,byn_ER:"\u12a4\u122d\u1275\u122b",ca_AD:"Andorra",ca_ES:"Espanya",cch_NG:D,ch_GU:"Guam",chk_FM:C,cop_Arab_EG:"\u0645\u0635\u0631",
84
+ cop_Arab_US:Pd,cop_EG:"\u0645\u0635\u0631",cop_US:Pd,cs_CZ:Gd,cy_GB:"Prydain Fawr",da_DK:"Danmark",da_GL:"Gr\u00f8nland",de_AT:"\u00d6sterreich",de_BE:"Belgien",de_CH:"Schweiz",de_DE:"Deutschland",de_LI:"Liechtenstein",de_LU:"Luxemburg",dv_MV:"Maldives",dz_BT:"Bhutan",ee_GH:B,ee_TG:"Togo",efi_NG:D,el_CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",el_GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",en_AG:Qa,en_AI:"Anguilla",en_AS:Pa,en_AU:"Australia",en_BB:"Barbados",en_BE:"Belgium",en_BM:"Bermuda",en_BS:"Bahamas",
85
+ en_BW:Ta,en_BZ:"Belize",en_CA:"Canada",en_CC:"Cocos Islands",en_CK:"Cook Islands",en_CM:"Cameroon",en_CX:Wa,en_DM:"Dominica",en_FJ:"Fiji",en_FK:fb,en_FM:C,en_GB:$b,en_GD:"Grenada",en_GG:"Guernsey",en_GH:B,en_GI:"Gibraltar",en_GM:"Gambia",en_GU:"Guam",en_GY:"Guyana",en_HK:"Hong Kong",en_HN:jb,en_IE:"Ireland",en_IM:"Isle of Man",en_IN:"India",en_JE:"Jersey",en_JM:"Jamaica",en_KE:"Kenya",en_KI:ob,en_KN:Kb,en_KY:Va,en_LC:"Saint Lucia",en_LR:"Liberia",en_LS:"Lesotho",en_MH:ub,en_MP:zb,en_MS:"Montserrat",
86
+ en_MT:"Malta",en_MU:"Mauritius",en_MW:"Malawi",en_NA:"Namibia",en_NF:yb,en_NG:D,en_NR:"Nauru",en_NU:"Niue",en_NZ:xb,en_PG:E,en_PH:Cb,en_PK:"Pakistan",en_PN:"Pitcairn",en_PR:Eb,en_RW:F,en_SB:Qb,en_SC:Ob,en_SG:"Singapore",en_SH:"Saint Helena",en_SL:"Sierra Leone",en_SZ:Ub,en_TC:Yb,en_TK:I,en_TO:"Tonga",en_TT:"Trinidad and Tobago",en_TV:J,en_TZ:Wb,en_UG:"Uganda",en_UM:bc,en_US:ac,en_US_POSIX:ac,en_VC:Lb,en_VG:Ua,en_VI:Zb,en_VU:L,en_WS:"Samoa",en_ZA:G,en_ZM:"Zambia",en_ZW:"Zimbabwe",es_AR:"Argentina",
87
+ es_BO:y,es_CL:"Chile",es_CO:"Colombia",es_CR:"Costa Rica",es_CU:"Cuba",es_DO:Fb,es_EC:"Ecuador",es_ES:"Espa\u00f1a",es_GQ:"Guinea Ecuatorial",es_GT:"Guatemala",es_HN:jb,es_MX:"M\u00e9xico",es_NI:"Nicaragua",es_PA:"Panam\u00e1",es_PE:"Per\u00fa",es_PH:"Filipinas",es_PR:Eb,es_PY:Bb,es_SV:"El Salvador",es_US:"Estados Unidos",es_UY:"Uruguay",es_VE:"Venezuela",et_EE:"Eesti",eu_ES:"Espainia",fa_AF:Ld,fa_IR:"\u0627\u06cc\u0631\u0627\u0646",fi_FI:"Suomi",fil_PH:Cb,fj_FJ:"Fiji",fo_FO:"F\u00f8royar",fr_BE:"Belgique",
88
+ fr_BF:"Burkina Faso",fr_BI:"Burundi",fr_BJ:"B\u00e9nin",fr_CA:"Canada",fr_CD:Ib,fr_CF:Hb,fr_CG:"Congo",fr_CH:"Suisse",fr_CI:"C\u00f4te d\u2019Ivoire",fr_CM:"Cameroun",fr_DJ:"Djibouti",fr_DZ:"Alg\u00e9rie",fr_FR:"France",fr_GA:"Gabon",fr_GF:hb,fr_GN:"Guin\u00e9e",fr_GP:"Guadeloupe",fr_GQ:gb,fr_HT:"Ha\u00efti",fr_KM:"Comores",fr_LU:sb,fr_MA:"Maroc",fr_MC:"Monaco",fr_MG:tb,fr_ML:"Mali",fr_MQ:"Martinique",fr_MU:"Maurice",fr_NC:Ab,fr_NE:"Niger",fr_PF:Db,fr_PM:Mb,fr_RE:"R\u00e9union",fr_RW:F,fr_SC:Ob,fr_SN:H,
89
+ fr_SY:"Syrie",fr_TD:"Tchad",fr_TG:"Togo",fr_TN:"Tunisie",fr_VU:L,fr_WF:dc,fr_YT:"Mayotte",fur_IT:"Italia",ga_IE:"\u00c9ire",gaa_GH:B,gez_ER:"\u12a4\u122d\u1275\u122b",gez_ET:X,gil_KI:ob,gl_ES:"Espa\u00f1a",gn_PY:Bb,gu_IN:"\u0aad\u0abe\u0ab0\u0aa4",gv_GB:Gb,ha_Arab_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",ha_GH:"\u063a\u0627\u0646\u0627",ha_Latn_GH:B,ha_Latn_NE:"Niger",ha_Latn_NG:"Nig\u00e9ria",ha_NE:"\u0627\u0644\u0646\u064a\u062c\u0631",ha_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",haw_US:"\u02bbAmelika Hui P\u016b \u02bbIa",
90
+ he_IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",hi_IN:W,ho_PG:E,hr_BA:z,hr_HR:"Hrvatska",ht_HT:"Ha\u00efti",hu_HU:"Magyarorsz\u00e1g",hy_AM:Kd,hy_AM_REVISED:Kd,id_ID:kb,ig_NG:D,ii_CN:"\ua34f\ua1e9",is_IS:"\u00cdsland",it_CH:"Svizzera",it_IT:"Italia",it_SM:"San Marino",ja_JP:"\u65e5\u672c",ka_GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",kaj_NG:D,kam_KE:"Kenya",kcg_NG:D,kfo_NG:"Nig\u00e9ria",kk_KZ:"\u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d",kl_GL:nb,km_KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
91
+ kn_IN:"\u0cad\u0cbe\u0cb0\u0ca4",ko_KP:Sd,ko_KR:"\ub300\ud55c\ubbfc\uad6d",kok_IN:W,kos_FM:C,kpe_GN:"Guin\u00e9e",kpe_LR:"Lib\u00e9ria",ks_IN:W,ku_IQ:"Irak",ku_IR:"\u0130ran",ku_Latn_IQ:"Irak",ku_Latn_IR:"\u0130ran",ku_Latn_SY:"Suriye",ku_Latn_TR:K,ku_SY:"Suriye",ku_TR:K,kw_GB:Gb,ky_Cyrl_KG:Id,ky_KG:"K\u0131rg\u0131zistan",la_VA:"Vaticano",lb_LU:sb,ln_CD:Ib,ln_CG:"Kongo",lo_LA:"Laos",lt_LT:"Lietuva",lv_LV:"Latvija",mg_MG:tb,mh_MH:ub,mi_NZ:xb,mk_MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",
92
+ ml_IN:"\u0d07\u0d28\u0d4d\u0d24\u0d4d\u0d2f",mn_Cyrl_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mn_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mr_IN:W,ms_BN:"Brunei",ms_MY:"Malaysia",ms_SG:"Singapura",mt_MT:"Malta",my_MM:"Myanmar",na_NR:"Nauru",nb_NO:"Norge",nb_SJ:Rb,ne_NP:"\u0928\u0947\u092a\u093e\u0932",niu_NU:"Niue",nl_AN:wb,nl_AW:"Aruba",nl_BE:"Belgi\u00eb",nl_NL:"Nederland",nl_SR:"Suriname",nn_NO:"Noreg",nr_ZA:G,nso_ZA:G,ny_MW:"Malawi",om_ET:lb,om_KE:"Keeniyaa",or_IN:"\u0b2d\u0b3e\u0b30\u0b24",
93
+ pa_Arab_PK:Rd,pa_Guru_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_PK:Rd,pap_AN:wb,pau_PW:"Palau",pl_PL:"Polska",pon_FM:C,ps_AF:Ld,pt_AO:"Angola",pt_BR:"Brasil",pt_CV:"Cabo Verde",pt_GW:"Guin\u00e9 Bissau",pt_MZ:"Mo\u00e7ambique",pt_PT:"Portugal",pt_ST:Vb,pt_TL:Xb,qu_BO:y,qu_PE:"Per\u00fa",rm_CH:"Schweiz",rn_BI:"Burundi",ro_MD:vb,ro_RO:"Rom\u00e2nia",ru_BY:Hd,ru_KG:Id,ru_KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",ru_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",ru_UA:"\u0423\u043a\u0440\u0430\u0438\u043d\u0430",
94
+ rw_RW:F,sa_IN:W,sd_Deva_IN:W,sd_IN:W,se_FI:"Finland",se_NO:"Norge",sg_CF:Hb,sh_BA:"Bosnia and Herzegovina",sh_CS:Nb,si_LK:"Sri Lanka",sid_ET:lb,sk_SK:Pb,sl_SI:"Slovenija",sm_AS:Pa,sm_WS:"Samoa",so_DJ:"Jabuuti",so_ET:"Itoobiya",so_KE:"Kiiniya",so_SO:"Soomaaliya",sq_AL:"Shqip\u00ebria",sr_BA:"\u0411\u043e\u0441\u043d\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043e\u0432\u0438\u043d\u0430",sr_CS:"\u0421\u0440\u0431\u0438\u0458\u0430 \u0438 \u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_Cyrl_BA:"\u0411\u043e\u0441\u043d\u0438\u044f",
95
+ sr_Cyrl_CS:"\u0421\u0435\u0440\u0431\u0438\u044f \u0438 \u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_ME:"\u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_RS:"\u0421\u0435\u0440\u0431\u0438\u044f",sr_Latn_BA:z,sr_Latn_CS:"Srbija i Crna Gora",sr_Latn_ME:"Crna Gora",sr_Latn_RS:"Srbija",sr_ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_RS:"\u0421\u0440\u0431\u0438\u0458\u0430",ss_SZ:Ub,ss_ZA:G,st_LS:"Lesotho",st_ZA:G,su_ID:kb,sv_AX:"\u00c5land",
96
+ sv_FI:"Finland",sv_SE:"Sverige",sw_KE:"Kenya",sw_TZ:Wb,sw_UG:"Uganda",swb_KM:Qd,syr_SY:"Syria",ta_IN:"\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe",ta_LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",ta_SG:"\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd",te_IN:"\u0c2d\u0c3e\u0c30\u0c24 \u0c26\u0c47\u0c33\u0c02",tet_TL:Xb,tg_Cyrl_TJ:"\u0422\u0430\u0434\u0436\u0438\u043a\u0438\u0441\u0442\u0430\u043d",tg_TJ:"\u062a\u0627\u062c\u06a9\u0633\u062a\u0627\u0646",th_TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",
97
+ ti_ER:"\u12a4\u122d\u1275\u122b",ti_ET:X,tig_ER:"\u12a4\u122d\u1275\u122b",tk_TM:"\u062a\u0631\u06a9\u0645\u0646\u0633\u062a\u0627\u0646",tkl_TK:I,tn_BW:Ta,tn_ZA:G,to_TO:"Tonga",tpi_PG:E,tr_CY:"G\u00fcney K\u0131br\u0131s Rum Kesimi",tr_TR:K,ts_ZA:G,tt_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",tvl_TV:J,ty_PF:Db,uk_UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",uli_FM:C,und_ZZ:cc,ur_IN:"\u0628\u06be\u0627\u0631\u062a",ur_PK:Rd,uz_AF:"Afganistan",uz_Arab_AF:Ld,uz_Cyrl_UZ:"\u0423\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u0430\u043d",
98
+ uz_Latn_UZ:"O\u02bfzbekiston",uz_UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",ve_ZA:G,vi_VN:"Vi\u1ec7t Nam",wal_ET:X,wo_Arab_SN:"\u0627\u0644\u0633\u0646\u063a\u0627\u0644",wo_Latn_SN:H,wo_SN:H,xh_ZA:G,yap_FM:C,yo_NG:D,zh_CN:"\u4e2d\u56fd",zh_HK:"\u9999\u6e2f",zh_Hans_CN:"\u4e2d\u56fd",zh_Hans_SG:"\u65b0\u52a0\u5761",zh_Hant_HK:"\u4e2d\u83ef\u4eba\u6c11\u5171\u548c\u570b\u9999\u6e2f\u7279\u5225\u884c\u653f\u5340",zh_Hant_MO:"\u6fb3\u9580",zh_Hant_TW:"\u81fa\u7063",zh_MO:"\u6fb3\u95e8",
99
+ zh_SG:"\u65b0\u52a0\u5761",zh_TW:"\u53f0\u6e7e",zu_ZA:G},LANGUAGE:{aa:"afar",ab:"\u0430\u0431\u0445\u0430\u0437\u0441\u043a\u0438\u0439",ace:"Aceh",ach:"Acoli",ada:"Adangme",ady:"\u0430\u0434\u044b\u0433\u0435\u0439\u0441\u043a\u0438\u0439",ae:"Avestan",af:"Afrikaans",afa:"Afro-Asiatic Language",afh:"Afrihili",ain:"Ainu",ak:"Akan",akk:"Akkadian",ale:"Aleut",alg:"Algonquian Language",alt:"Southern Altai",am:"\u12a0\u121b\u122d\u129b",an:"Aragonese",ang:"Old English",anp:"Angika",apa:"Apache Language",
100
+ ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",arc:"Aramaic",arn:"Araucanian",arp:"Arapaho",art:"Artificial Language",arw:"Arawak",as:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",ast:"asturiano",ath:"Athapascan Language",aus:"Australian Language",av:"\u0430\u0432\u0430\u0440\u0441\u043a\u0438\u0439",awa:"Awadhi",ay:"aimara",az:"az\u0259rbaycanca",az_Arab:"\u062a\u0631\u06a9\u06cc \u0622\u0630\u0631\u0628\u0627\u06cc\u062c\u0627\u0646\u06cc",az_Cyrl:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",
101
+ az_Latn:"Azerice",ba:"\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439",bad:"Banda",bai:"Bamileke Language",bal:"\u0628\u0644\u0648\u0686\u06cc",ban:"Balin",bas:"Basa",bat:"Baltic Language",be:"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bej:"Beja",bem:"Bemba",ber:"Berber",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bh:"\u092c\u093f\u0939\u093e\u0930\u0940",bho:"Bhojpuri",bi:"bichelamar ; bislama",bik:"Bikol",bin:"Bini",bla:"Siksika",bm:"bambara",bn:"\u09ac\u09be\u0982\u09b2\u09be",
102
+ bnt:"Bantu",bo:"\u0f54\u0f7c\u0f51\u0f0b\u0f66\u0f90\u0f51\u0f0b",br:"breton",bra:"Braj",bs:"Bosanski",btk:"Batak",bua:"Buriat",bug:"Bugis",byn:"\u1265\u120a\u1295",ca:"catal\u00e0",cad:"Caddo",cai:"Central American Indian Language",car:"Carib",cau:"Caucasian Language",cch:"Atsam",ce:"\u0447\u0435\u0447\u0435\u043d\u0441\u043a\u0438\u0439",ceb:"Cebuano",cel:"Celtic Language",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"\u043c\u0430\u0440\u0438\u0439\u0441\u043a\u0438\u0439 (\u0447\u0435\u0440\u0435\u043c\u0438\u0441\u0441\u043a\u0438\u0439)",
103
+ chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cmc:"Chamic Language",co:"corse",cop:"\u0642\u0628\u0637\u064a\u0629",cop_Arab:"\u0642\u0628\u0637\u064a\u0629",cpe:"English-based Creole or Pidgin",cpf:"French-based Creole or Pidgin",cpp:"Portuguese-based Creole or Pidgin",cr:"Cree",crh:"Crimean Turkish",crp:"Creole or Pidgin",cs:"\u010de\u0161tina",csb:"Kashubian",cu:"Church Slavic",cus:"Cushitic Language",cv:"\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439",
104
+ cy:"Cymraeg",da:"dansk",dak:"Dakota",dar:"\u0434\u0430\u0440\u0433\u0432\u0430",day:"Dayak",de:"Deutsch",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",doi:"\u0627\u0644\u062f\u0648\u062c\u0631\u0649",dra:"Dravidian Language",dsb:"Lower Sorbian",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyu:"dioula",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",ee:"Ewe",efi:"Efik",egy:"Ancient Egyptian",eka:"Ekajuk",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",elx:"Elamite",en:"English",enm:"Middle English",
105
+ eo:"esperanto",es:"espa\u00f1ol",et:"eesti",eu:"euskara",ewo:"Ewondo",fa:"\u0641\u0627\u0631\u0633\u06cc",fan:"fang",fat:"Fanti",ff:"Fulah",fi:"suomi",fil:"Filipino",fiu:"Finno-Ugrian Language",fj:"Fijian",fo:"f\u00f8royskt",fon:"Fon",fr:"fran\u00e7ais",frm:"Middle French",fro:"Old French",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"friulano",fy:"Fries",ga:"Gaeilge",gaa:"Ga",gay:"Gayo",gba:"Gbaya",gd:"Scottish Gaelic",gem:"Germanic Language",gez:"\u130d\u12d5\u12dd\u129b",gil:"Gilbertese",gl:"galego",
106
+ gmh:"Middle High German",gn:"guaran\u00ed",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"\u0391\u03c1\u03c7\u03b1\u03af\u03b1 \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",gsw:"Schweizerdeutsch",gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",gv:"Gaelg",gwi:"Gwich\u02bcin",ha:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Arab:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Latn:"haoussa",hai:"Haida",haw:"\u02bb\u014dlelo Hawai\u02bbi",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",
107
+ hi:"\u0939\u093f\u0902\u0926\u0940",hil:"Hiligaynon",him:"Himachali",hit:"Hittite",hmn:"Hmong",ho:"Hiri Motu",hr:"hrvatski",hsb:"Upper Sorbian",ht:"ha\u00eftien",hu:"magyar",hup:"Hupa",hy:"\u0540\u0561\u0575\u0565\u0580\u0567\u0576",hz:"Herero",ia:"interlingvao",iba:"Iban",id:"Bahasa Indonesia",ie:"Interlingue",ig:"Igbo",ii:"\ua188\ua320\ua259",ijo:"Ijo",ik:"Inupiaq",ilo:"Iloko",inc:"Indic Language",ine:"Indo-European Language",inh:"\u0438\u043d\u0433\u0443\u0448\u0441\u043a\u0438\u0439",io:"Ido",
108
+ ira:"Iranian Language",iro:"Iroquoian Language",is:"\u00edslenska",it:"italiano",iu:"Inuktitut",ja:"\u65e5\u672c\u8a9e",jbo:"Lojban",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jv:"Jawa",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",kaa:"\u043a\u0430\u0440\u0430\u043a\u0430\u043b\u043f\u0430\u043a\u0441\u043a\u0438\u0439",kab:"kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kar:"Karen",kaw:"Kawi",kbd:"\u043a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u0441\u043a\u0438\u0439",kcg:"Tyap",kfo:"koro",kg:"Kongo",
109
+ kha:"Khasi",khi:"Khoisan Language",kho:"Khotanese",ki:"Kikuyu",kj:"Kuanyama",kk:"\u049a\u0430\u0437\u0430\u049b",kl:"kalaallisut",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kmb:"quimbundo",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ko:"\ud55c\uad6d\uc5b4",kok:"\u0915\u094b\u0902\u0915\u0923\u0940",kos:"Kosraean",kpe:"kpell\u00e9",kr:"Kanuri",krc:"\u043a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e-\u0431\u0430\u043b\u043a\u0430\u0440\u0441\u043a\u0438\u0439",krl:"\u043a\u0430\u0440\u0435\u043b\u044c\u0441\u043a\u0438\u0439",
110
+ kro:"Kru",kru:"Kurukh",ks:"\u0915\u093e\u0936\u094d\u092e\u093f\u0930\u0940",ku:"K\u00fcrt\u00e7e",ku_Arab:"\u0627\u0644\u0643\u0631\u062f\u064a\u0629",ku_Latn:"K\u00fcrt\u00e7e",kum:"\u043a\u0443\u043c\u044b\u043a\u0441\u043a\u0438\u0439",kut:"Kutenai",kv:"Komi",kw:"kernewek",ky:"K\u0131rg\u0131zca",ky_Arab:"\u0627\u0644\u0642\u064a\u0631\u063a\u0633\u062a\u0627\u0646\u064a\u0629",ky_Cyrl:"\u043a\u0438\u0440\u0433\u0438\u0437\u0441\u043a\u0438\u0439",la:"latino",lad:"\u05dc\u05d3\u05d9\u05e0\u05d5",
111
+ lah:"\u0644\u0627\u0647\u0646\u062f\u0627",lam:"Lamba",lb:"luxembourgeois",lez:"\u043b\u0435\u0437\u0433\u0438\u043d\u0441\u043a\u0438\u0439",lg:"Ganda",li:"Limburgs",ln:"lingala",lo:"Lao",lol:"mongo",loz:"Lozi",lt:"lietuvi\u0173",lu:"luba-katanga",lua:"luba-lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Lushai",lv:"latvie\u0161u",mad:"Madura",mag:"Magahi",mai:"Maithili",mak:"Makassar",man:"Mandingo",map:"Austronesian",mas:"Masai",mdf:"\u043c\u043e\u043a\u0448\u0430",mdr:"Mandar",men:"Mende",mg:"malgache",
112
+ mga:"Middle Irish",mh:"Marshallese",mi:"Maori",mic:"Micmac",min:"Minangkabau",mis:"Miscellaneous Language",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",mkh:"Mon-Khmer Language",ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",mn:Jd,mn_Cyrl:Jd,mn_Mong:Jd,mnc:"Manchu",mni:"Manipuri",mno:"Manobo Language",mo:"Moldavian",moh:"Mohawk",mos:"mor\u00e9 ; mossi",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu",mt:"Malti",mul:"Multiple Languages",mun:"Munda Language",mus:"Creek",mwl:"Mirandese",
113
+ mwr:"Marwari",my:"Burmese",myn:"Mayan Language",myv:"\u044d\u0440\u0437\u044f",na:"Nauru",nah:"Nahuatl",nai:"North American Indian Language",nap:"napoletano",nb:"norsk bokm\u00e5l",nd:"North Ndebele",nds:"Low German",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","new":"Newari",ng:"Ndonga",nia:"Nias",nic:"Niger-Kordofanian Language",niu:"Niuean",nl:"Nederlands",nn:"nynorsk",no:"Norwegian",nog:"\u043d\u043e\u0433\u0430\u0439\u0441\u043a\u0438\u0439",non:"Old Norse",nqo:"N\u2019Ko",nr:"South Ndebele",nso:"Northern Sotho",
114
+ nub:"Nubian Language",nv:"Navajo",nwc:"Classical Newari",ny:"nianja; chicheua; cheua",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"occitan",oj:"Ojibwa",om:"Oromoo",or:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",os:"\u043e\u0441\u0435\u0442\u0438\u043d\u0441\u043a\u0438\u0439",osa:"Osage",ota:"Ottoman Turkish",oto:"Otomian Language",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pa_Arab:"\u067e\u0646\u062c\u0627\u0628",pa_Guru:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",paa:"Papuan Language",pag:"Pangasinan",
115
+ pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",peo:"Old Persian",phi:"Philippine Language",phn:"Phoenician",pi:"\u0e1a\u0e32\u0e25\u0e35",pl:"polski",pon:"Pohnpeian",pra:"Prakrit Language",pro:"Old Proven\u00e7al",ps:"\u067e\u069a\u062a\u0648",pt:"portugu\u00eas",qu:"quechua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rm:"R\u00e4toromanisch",rn:"roundi",ro:"rom\u00e2n\u0103",roa:"Romance Language",rom:"Romany",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",rup:"Aromanian",rw:"rwanda",
116
+ sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924 \u092d\u093e\u0937\u093e",sad:"Sandawe",sah:"\u044f\u043a\u0443\u0442\u0441\u043a\u0438\u0439",sai:"South American Indian Language",sal:"Salishan Language",sam:"\u05d0\u05e8\u05de\u05d9\u05ea \u05e9\u05d5\u05de\u05e8\u05d5\u05e0\u05d9\u05ea",sas:"Sasak",sat:"Santali",sc:"Sardinian",scn:"siciliano",sco:"Scots",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",sd_Arab:"\u0633\u0646\u062f\u06cc",sd_Deva:"\u0938\u093f\u0928\u094d\u0927\u0940",se:"nordsamiska",sel:"\u0441\u0435\u043b\u044c\u043a\u0443\u043f\u0441\u043a\u0438\u0439",
117
+ sem:"Semitic Language",sg:"sangho",sga:"Old Irish",sgn:"Sign Language",sh:"Serbo-Croatian",shn:"Shan",si:"Sinhalese",sid:"Sidamo",sio:"Siouan Language",sit:"Sino-Tibetan Language",sk:"slovensk\u00fd",sl:"sloven\u0161\u010dina",sla:"Slavic Language",sm:"Samoan",sma:"sydsamiska",smi:"Sami Language",smj:"lulesamiska",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"sonink\u00e9",so:"Soomaali",sog:"Sogdien",son:"Songhai",sq:"shqipe",sr:"\u0421\u0440\u043f\u0441\u043a\u0438",sr_Cyrl:"\u0441\u0435\u0440\u0431\u0441\u043a\u0438\u0439",
118
+ sr_Latn:"Srpski",srn:"Sranantongo",srr:"s\u00e9r\u00e8re",ss:"Swati",ssa:"Nilo-Saharan Language",st:"Sesotho",su:"Sundan",suk:"Sukuma",sus:"soussou",sux:"Sumerian",sv:"svenska",sw:"Kiswahili",syc:"Classical Syriac",syr:"Syriac",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tai:"Tai Language",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tem:"Timne",ter:"Tereno",tet:"t\u00e9tum",tg:"\u062a\u0627\u062c\u06a9",tg_Arab:"\u062a\u0627\u062c\u06a9",tg_Cyrl:"\u0442\u0430\u0434\u0436\u0438\u043a\u0441\u043a\u0438\u0439",
119
+ th:"\u0e44\u0e17\u0e22",ti:"\u1275\u130d\u122d\u129b",tig:"\u1275\u130d\u1228",tiv:"Tiv",tk:"\u062a\u0631\u06a9\u0645\u0646\u06cc",tkl:I,tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tmh:"tamacheq",tn:"Tswana",to:"Tonga",tog:"Nyasa Tonga",tpi:"Tok Pisin",tr:"T\u00fcrk\u00e7e",ts:"Tsonga",tsi:"Tsimshian",tt:"\u0442\u0430\u0442\u0430\u0440\u0441\u043a\u0438\u0439",tum:"Tumbuka",tup:"Tupi Language",tut:"\u0430\u043b\u0442\u0430\u0439\u0441\u043a\u0438\u0435 (\u0434\u0440\u0443\u0433\u0438\u0435)",tvl:J,tw:"Twi",
120
+ ty:"tahitien",tyv:"\u0442\u0443\u0432\u0438\u043d\u0441\u043a\u0438\u0439",udm:"\u0443\u0434\u043c\u0443\u0440\u0442\u0441\u043a\u0438\u0439",ug:"\u0443\u0439\u0433\u0443\u0440\u0441\u043a\u0438\u0439",uga:"Ugaritic",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",umb:"umbundu",und:"English",ur:"\u0627\u0631\u062f\u0648",uz:"\u040e\u0437\u0431\u0435\u043a",uz_Arab:"\u0627\u06c9\u0632\u0628\u06d0\u06a9",uz_Cyrl:"\u0443\u0437\u0431\u0435\u043a\u0441\u043a\u0438\u0439",uz_Latn:"o'zbekcha",
121
+ vai:"Vai",ve:"Venda",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"volapuko",vot:"Votic",wa:"Wallonisch",wak:"Wakashan Language",wal:"Walamo",war:"Waray",was:"Washo",wen:"Sorbian Language",wo:"wolof",wo_Arab:"\u0627\u0644\u0648\u0644\u0648\u0641",wo_Latn:"wolof",xal:"\u043a\u0430\u043b\u043c\u044b\u0446\u043a\u0438\u0439",xh:"Xhosa",yao:"iao",yap:"Yapese",yi:"\u05d9\u05d9\u05d3\u05d9\u05e9",yo:"Yoruba",ypk:"Yupik Language",za:"Zhuang",zap:"Zapotec",zen:"Zenaga",zh:"\u4e2d\u6587",zh_Hans:"\u4e2d\u6587",zh_Hant:"\u4e2d\u6587",
122
+ znd:"Zande",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}};Z.locale.Yf=function(a){a=a.replace(/-/g,M);Z.locale.N=a};Z.locale.Fa=function(){Z.locale.N||(Z.locale.N=yc);return Z.locale.N};Z.locale.I={vd:"DateTimeConstants",Ed:"NumberFormatConstants",gc:"TimeZoneConstants",Wb:rb,hc:"TimeZoneSelectedIds",jc:"TimeZoneSelectedShortNames",ic:"TimeZoneSelectedLongNames",fc:"TimeZoneAllLongNames"};Z.locale.Ea=function(a){return(a=a.match(/^\w{2,3}([-_]|$)/))?a[0].replace(/[_-]/g,b):b};
123
+ Z.locale.mb=function(a){return(a=a.match(/[-_]([a-zA-Z]{2}|\d{3})([-_]|$)/))?a[0].replace(/[_-]/g,b):b};Z.locale.Pe=function(a){a=a.split(/[-_]/g);return 1<a.length&&a[1].match(/^[a-zA-Z]{4}$/)?a[1]:b};Z.locale.Qe=function(a){return(a=a.match(/[-_]([a-z]{2,})/))?a[1]:b};Z.locale.Le=function(a){var c=Z.locale.Ea(a)+M+Z.locale.mb(a);return c in Z.locale.J.COUNTRY?Z.locale.J.COUNTRY[c]:a};Z.locale.He=function(a,c){c||(c=Z.locale.ob());var d=Z.locale.mb(a);return d in c.COUNTRY?c.COUNTRY[d]:a};
124
+ Z.locale.Me=function(a){if(a in Z.locale.J.LANGUAGE)return Z.locale.J.LANGUAGE[a];var c=Z.locale.Ea(a);return c in Z.locale.J.LANGUAGE?Z.locale.J.LANGUAGE[c]:a};Z.locale.Ie=function(a,c){c||(c=Z.locale.ob());if(a in c.LANGUAGE)return c.LANGUAGE[a];var d=Z.locale.Ea(a);return d in c.LANGUAGE?c.LANGUAGE[d]:a};Z.locale.K=function(a,c,d){Z.locale.l[c]||(Z.locale.l[c]={});Z.locale.l[c][d]=a;Z.locale.N||(Z.locale.N=d)};Z.locale.jf=function(a,c){return a in Z.locale.l&&c in Z.locale.l[a]};Z.locale.l={};
125
+ Z.locale.Kf=function(a,c){Z.locale.K(a,Z.locale.I.gc,c)};Z.locale.If=function(a,c){Z.locale.K(a,Z.locale.I.Wb,c)};Z.locale.Lf=function(a,c){Z.locale.K(a,Z.locale.I.hc,c)};Z.locale.Nf=function(a,c){Z.locale.K(a,Z.locale.I.jc,c)};Z.locale.Mf=function(a,c){Z.locale.K(a,Z.locale.I.ic,c)};Z.locale.Jf=function(a,c){Z.locale.K(a,Z.locale.I.fc,c)};Z.locale.ob=function(){var a=Z.locale.Fa(),a=a?a:Z.locale.Fa();return rb in Z.locale.l?Z.locale.l.LocaleNameConstants[a]:void 0};
126
+ Z.locale.Oe=function(a,c){var d=c?c:Z.locale.Fa();if(a in Z.locale.l){if(d in Z.locale.l[a])return Z.locale.l[a][d];d=d.split(M);return 1<d.length&&d[0]in Z.locale.l[a]?Z.locale.l[a][d[0]]:Z.locale.l[a].en}};var google={a:{}};google.a.b={};
127
+ google.a.b.languages={af:!0,am:!0,az:!0,ar:!0,arb:"ar",bg:!0,bn:!0,ca:!0,cs:!0,cmn:"zh",da:!0,de:!0,el:!0,en:!0,en_gb:!0,es:!0,es_419:!0,et:!0,eu:!0,fa:!0,fi:!0,fil:!0,fr:!0,fr_ca:!0,gl:!0,ka:!0,gu:!0,he:"iw",hi:!0,hr:!0,hu:!0,hy:!0,id:!0,"in":Oc,is:!0,it:!0,iw:!0,ja:!0,ji:"yi",jv:!1,jw:"jv",km:!0,kn:!0,ko:!0,lo:!0,lt:!0,lv:!0,ml:!0,mn:!0,mo:"ro",mr:!0,ms:!0,nb:"no",ne:!0,nl:!0,no:!0,pl:!0,pt:"pt_br",pt_br:!0,pt_pt:!0,ro:!0,ru:!0,si:!0,sk:!0,sl:!0,sr:!0,sv:!0,sw:!0,swh:"sw",ta:!0,te:!0,th:!0,tl:"fil",
128
+ tr:!0,uk:!0,ur:!0,vi:!0,yi:!1,zh:"zh_cn",zh_cn:!0,zh_hk:!0,zh_tw:!0,zsm:"ms",zu:!0};google.a.b.S={};google.a.b.T=od;google.a.b.log=Y();google.a.b.error=Y();google.a.b.Z=!1;google.a.b.O=window;google.a.b.ld={current:"44",upcoming:"44",41:U,42:U,43:U,44:U};google.a.b.Ua={gstatic:{prefix:"https://www.gstatic.com/charts",debug:"{prefix}/debug/{version}/jsapi_debug_{package}_module.js",compiled:"{prefix}/{version}/js/jsapi_compiled_{package}_module.js",i18n:"{prefix}/{version}/i18n/jsapi_compiled_i18n_{package}_module__{language}.js",css:zd,css_debug:zd,third_party:Ad,third_party_gen:Ad}};
129
+ google.a.b.m=google.a.b.Ua.gstatic;
130
+ google.a.b.zc={"default":[],format:[],ui:["format","default"],ui_base:["format","default"],annotatedtimeline:[V],annotationchart:[V,"controls",uc,"table"],areachart:[V,O],bar:[V,Q,td],barchart:[V,O],browserchart:[V],calendar:[V],charteditor:[V,uc,S,oc,"gauge","motionchart","orgchart","table"],charteditor_base:[nd,uc,S,oc,"gauge","motionchart","orgchart","table_base"],columnchart:[V,O],controls:[V],controls_base:[nd],corechart:[V],gantt:[V,Q],gauge:[V],geochart:[V],geomap:[V],geomap_base:[nd],helloworld:[V],
131
+ imageareachart:[V,S],imagebarchart:[V,S],imagelinechart:[V,S],imagechart:[V],imagepiechart:[V,S],imagesparkline:[V,S],intensitymap:[V],line:[V,Q,td],linechart:[V,O],map:[V],motionchart:[V],orgchart:[V],overtimecharts:[V,uc],piechart:[V,O],sankey:["d3","d3.sankey",V],scatter:[V,Q,td],scatterchart:[V,O],table:[V],table_base:[nd],timeline:[V,Q],treemap:[V],wordtree:[V]};google.a.b.ed={d3:"d3/d3.js","d3.sankey":"d3/d3.sankey.js",webfontloader:"webfontloader/webfont.js"};google.a.b.Eb={dygraph:"dygraphs/dygraph-tickers-combined.js"};
132
+ google.a.b.wc={annotatedtimeline:"/annotatedtimeline/annotatedtimeline.css",annotationchart:"annotationchart/annotationchart.css",charteditor:"charteditor/charteditor.css",charteditor_base:"charteditor/charteditor_base.css",controls:"controls/controls.css",imagesparkline:"imagesparkline/imagesparkline.css",intensitymap:"intensitymap/intensitymap.css",orgchart:"orgchart/orgchart.css",table:"table/table.css",table_base:"table/table_base.css",ui:["util/util.css","core/tooltip.css"],ui_base:"util/util_base.css"};
133
+ google.a.b.va=function(a,c){for(var d=c||{},e=[],f=0;f<a.length;f++){var g=a[f];if(!d[g]){d[g]=!0;var h=google.a.b.zc[g]||[];0<h.length&&(e=e.concat(google.a.b.va(h,d)));e.push(g)}}return e};google.a.b.Ec=function(a){for(var c={},d=[],e=0;e<a.length;e++){var f=google.a.b.wc[a[e]];Z.isArray(f)||(f=[f]);for(var g=0;g<f.length;g++){var h=f[g];h&&!c[h]&&(c[h]=!0,d.push(h))}}return d};
134
+ google.a.b.$c=function(a,c){if(c)if("undefined"===typeof a.onload){var d=!1;a.onreadystatechange=function(){d||(a.readyState&&a.readyState!==P?google.a.b.O.setTimeout(a.onreadystatechange,0):(d=!0,delete a.onreadystatechange,google.a.b.O.setTimeout(c,0)))}}else a.onload=c};
135
+ google.a.b.Ab=function(a,c,d){google.a.b.log(Vc+a);var e=c.createElement(gd);e.type=ld;e.language=Qc;e.async=!1;e.defer=!1;c=c.body||c.head||c.getElementsByTagName(ib).item(0)||c.documentElement;c.insertBefore(e,c.lastChild);d&&google.a.b.$c(e,d);e.src=a;google.a.b.log(zc+a)};
136
+ google.a.b.Qc=function(a,c){function d(c){var e=google.a.b.sb,f=a[c++];if(f){var g=f,h=google.a.b.ed[f];h?(g=h,f===td&&(e=window.document),f=google.a.b.m.third_party):google.a.b.Eb[f]?(g=google.a.b.Eb[f],f=google.a.b.m.third_party_gen):f=google.a.b.Z?n:t?Oa:p;g=f.replace(yd,m).replace(Bd,A).replace(wd,t).replace(xd,g);google.a.b.Ab(g,e);d(c)}}function e(){for(var d=[],e=0;e<a.length;e++)d.push(Sb[a[e]]);eval(Ea+d.join(b)+Dd)();google.a.b.O.setTimeout(c,0)}a=google.a.b.va(a);for(var f=[],g=0;g<a.length;g++){var h=
137
+ a[g];google.a.b.S[h]||f.push(h)}a=f;google.a.b.log(pb+a);var m=google.a.b.m.prefix,n=google.a.b.m.debug,p=google.a.b.m.compiled,Oa=google.a.b.m.i18n,A=google.a.b.T,t=google.a.b.Ma;t===yc&&(t=null);var Sb={},Tb=a.length;google.a.b.Vc=function(a,c){google.a.b.log(sc+a);Sb[a]=c;google.a.b.S[a]=!0;Tb--;0===Tb&&e()};d(0)};
138
+ google.a.b.W=function(a){function c(){g=!0;for(var a=e.length,c=0;c<a;c++)e[c]()}function d(){h=!0;for(var a=f.length,c=0;c<a;c++)f[c]()}var e=[],f=[],g=!1,h=!1;google.a.b.W.count||(google.a.b.W.count=0);var m=Tc+google.a.b.W.count++,n={done:function(a){e.push(a);g&&a();return n},Ca:function(a){f.push(a);h&&a();return n}},p=document.createElement(Rc);p.setAttribute(Oc,m);p.setAttribute(ed,jd);p.setAttribute(md,kd);"undefined"!==typeof p.addEventListener?(p.addEventListener(Sc,c,!1),p.addEventListener(Ac,
139
+ d,!1)):"undefined"!==typeof p.attachEvent&&p.attachEvent(cd,function(){var a,e=document.styleSheets.length;try{for(;e--;)if(a=document.styleSheets[e],a.id===m){c();return}}catch(f){}g||d()});document.getElementsByTagName(Mc)[0].appendChild(p);p.setAttribute(Nc,a);return n};google.a.b.Nc=function(a,c){google.a.b.log(Uc+a);google.a.b.W(a).done(c).Ca(function(){google.a.b.error(Wc+a)})};
140
+ google.a.b.Oc=function(a,c){a=google.a.b.va(a);var d=google.a.b.Ec(a);if(null===d||0===d.length)c();else{google.a.b.log(qb+d.join(ya));var e=google.a.b.m.prefix,f=google.a.b.m.css;google.a.b.Z&&(f=google.a.b.m.css_debug||f);var g=google.a.b.T,h=function(a){var n=d[a],p;p=a<d.length-1?function(){h(a+1)}:c;google.a.b.S[n]?(google.a.b.log(Na+n),google.a.b.O.setTimeout(p,0)):(google.a.b.S[n]=!0,n=f.replace(yd,e).replace(Bd,g).replace(vd,n),google.a.b.Nc(n,p))};h(0)}};
141
+ google.a.b.Ee=function(){var a=google.a.b.C;if(!a){a=google.a.b.C=document.createElement(Pc);google.a.b.C=a;a.name=Jc;(document.body||document.head||document).appendChild(a);a.style.display=Zc;var c=google.a.b.sb=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document;c.open();c.writeln(b);c.close()}return a};
142
+ google.a.b.Cb=function(a){for(var c=a.replace(/-/g,M).toLowerCase();Z.h(c);)a=c,c=google.a.b.languages[c],c===a&&(c=!1);c||(a.match(/_[^_]+$/)?(a=a.replace(/_[^_]+$/,b),a=google.a.b.Cb(a)):a=yc);return a};
143
+ google.a.b.Yc=function(a,c){c.log&&(google.a.b.log=c.log);c.error&&(google.a.b.error=c.error);var d=c.debug,e=c.language||b,e=google.a.b.Cb(e);a||(a=c.version||od);(google.a.b.T&&google.a.b.T!==a||google.a.b.Ma&&google.a.b.Ma!==e||google.a.b.Z!==d)&&google.a.b.C&&google.a.b.C.parentNode&&(google.a.b.C.parentNode.removeChild(google.a.b.C),google.a.b.C=null,google.a.b.S={});google.a.b.T=a;google.a.b.Ma=e;google.a.b.Z=d};google.a.b.R=!1;google.a.b.ma=!1;google.a.b.loaded=!1;google.a.b.Da=[];
144
+ google.a.b.load=function(a,c,d){var e;e=a.match(/^(testing\/)?(.*)/);var f=e[1]||b;for(a=e[2];;){e=google.a.b.ld[a];if(null==e||e===U)break;a=e}google.a.b.m=d||google.a.b.Ua[a]||google.a.b.Ua.gstatic;a=f+a;if(null==e)f=function(){Z.kb()(a,c,d)},google.a.b.R?google.a.b.M(f):(google.a.b.R=!0,google.a.b.Ab(google.a.b.m.prefix+u+a+Da,window.document,f));else{if(google.a.b.R)throw Error("google.charts.load() cannot be called more than once with version 44 or earlier.");google.a.b.R=!0;if(google.a.b.ma)google.a.b.M(function(){google.a.b.load(a,
145
+ c)});else{google.a.b.loaded=!1;google.a.b.ma=!0;google.a.b.Yc(a,c);google.a.b.log(Kc+a);window.google=window.google||{};google.visualization=google.visualization||{};google.visualization.ModulePath=google.a.b.m.prefix;google.a.b.C=null;google.a.b.O=window;google.a.b.sb=document;var g=function(){google.a.b.ma=!1;google.a.b.loaded=!0;google.a.b.Na()},h=c.packages;google.a.b.M(c.callback);google.a.b.Oc(h,function(){google.a.b.Qc(h,g)})}}};
146
+ google.a.b.M=function(a){a&&google.a.b.Da.push(a);google.a.b.loaded&&!google.a.b.ma&&google.a.b.Na()};google.a.b.ad=function(a){if(window.addEventListener)window.addEventListener(Sc,a,!1);else if(window.attachEvent)window.attachEvent(cd,a);else{var c=window.onload;window.onload=function(d){c&&c(d);a()}}};google.a.b.Ib=document&&document.readyState===P;google.a.b.ad(function(){google.a.b.Ib=!0;google.a.b.Na()});
147
  google.a.b.Na=function(){if(google.a.b.R&&google.a.b.loaded&&(google.a.b.Ib||document.readyState===P))for(;0<google.a.b.Da.length;)google.a.b.Da.shift()()};google.a.b.Qa=function(a,c){google.a.b.Vc(a,c)};if(Z.kb())throw Error("Google Charts loader.js can only be loaded once.");google.a.load=function(a,c,d){a===sd&&(a=c,c=d);google.a.b.load(String(a),c||{})};google.a.M=function(a){google.a.b.M(a)};google.a.Qa=function(a,c){google.a.b.Qa(a,c)};Z.Ba(Jc,google.a.load);Z.Ba("google.charts.setOnLoadCallback",google.a.M);Z.Ba("google.charts.packageLoadedCallback",google.a.Qa); })();
inc/js/moment.min.js CHANGED
@@ -1,7 +1,7 @@
1
- //! moment.js
2
- //! version : 2.12.0
3
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
- //! license : MIT
5
- //! momentjs.com
6
- !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Zc.apply(null,arguments)}function b(a){Zc=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function g(a,b){for(var c in b)f(b,c)&&(a[c]=b[c]);return f(b,"toString")&&(a.toString=b.toString),f(b,"valueOf")&&(a.valueOf=b.valueOf),a}function h(a,b,c,d){return Ia(a,b,c,d,!0).utc()}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function j(a){return null==a._pf&&(a._pf=i()),a._pf}function k(a){if(null==a._isValid){var b=j(a);a._isValid=!(isNaN(a._d.getTime())||!(b.overflow<0)||b.empty||b.invalidMonth||b.invalidWeekday||b.nullInput||b.invalidFormat||b.userInvalidated),a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function l(a){var b=h(NaN);return null!=a?g(j(b),a):j(b).userInvalidated=!0,b}function m(a){return void 0===a}function n(a,b){var c,d,e;if(m(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),m(b._i)||(a._i=b._i),m(b._f)||(a._f=b._f),m(b._l)||(a._l=b._l),m(b._strict)||(a._strict=b._strict),m(b._tzm)||(a._tzm=b._tzm),m(b._isUTC)||(a._isUTC=b._isUTC),m(b._offset)||(a._offset=b._offset),m(b._pf)||(a._pf=j(b)),m(b._locale)||(a._locale=b._locale),$c.length>0)for(c in $c)d=$c[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),_c===!1&&(_c=!0,a.updateOffset(this),_c=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function u(a,b){var c=!0;return g(function(){return c&&(t(a+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function v(a,b){ad[a]||(t(b),ad[a]=!0)}function w(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function x(a){return"[object Object]"===Object.prototype.toString.call(a)}function y(a){var b,c;for(c in a)b=a[c],w(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function z(a,b){var c,d=g({},a);for(c in b)f(b,c)&&(x(a[c])&&x(b[c])?(d[c]={},g(d[c],a[c]),g(d[c],b[c])):null!=b[c]?d[c]=b[c]:delete d[c]);return d}function A(a){null!=a&&this.set(a)}function B(a){return a?a.toLowerCase().replace("_","-"):a}function C(a){for(var b,c,d,e,f=0;f<a.length;){for(e=B(a[f]).split("-"),b=e.length,c=B(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=D(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function D(a){var b=null;if(!cd[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=bd._abbr,require("./locale/"+a),E(b)}catch(c){}return cd[a]}function E(a,b){var c;return a&&(c=m(b)?H(a):F(a,b),c&&(bd=c)),bd._abbr}function F(a,b){return null!==b?(b.abbr=a,null!=cd[a]?(v("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),b=z(cd[a]._config,b)):null!=b.parentLocale&&(null!=cd[b.parentLocale]?b=z(cd[b.parentLocale]._config,b):v("parentLocaleUndefined","specified parentLocale is not defined yet")),cd[a]=new A(b),E(a),cd[a]):(delete cd[a],null)}function G(a,b){if(null!=b){var c;null!=cd[a]&&(b=z(cd[a]._config,b)),c=new A(b),c.parentLocale=cd[a],cd[a]=c,E(a)}else null!=cd[a]&&(null!=cd[a].parentLocale?cd[a]=cd[a].parentLocale:null!=cd[a]&&delete cd[a]);return cd[a]}function H(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return bd;if(!c(a)){if(b=D(a))return b;a=[a]}return C(a)}function I(){return Object.keys(cd)}function J(a,b){var c=a.toLowerCase();dd[c]=dd[c+"s"]=dd[b]=a}function K(a){return"string"==typeof a?dd[a]||dd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)f(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(b,c){return function(d){return null!=d?(O(this,b,d),a.updateOffset(this,c),this):N(this,b)}}function N(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function O(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function P(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=K(a),w(this[a]))return this[a](b);return this}function Q(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function R(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(hd[a]=e),b&&(hd[b[0]]=function(){return Q(e.apply(this,arguments),b[1],b[2])}),c&&(hd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function S(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function T(a){var b,c,d=a.match(ed);for(b=0,c=d.length;c>b;b++)hd[d[b]]?d[b]=hd[d[b]]:d[b]=S(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function U(a,b){return a.isValid()?(b=V(b,a.localeData()),gd[b]=gd[b]||T(b),gd[b](a)):a.localeData().invalidDate()}function V(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(fd.lastIndex=0;d>=0&&fd.test(a);)a=a.replace(fd,c),fd.lastIndex=0,d-=1;return a}function W(a,b,c){zd[a]=w(b)?b:function(a,d){return a&&c?c:b}}function X(a,b){return f(zd,a)?zd[a](b._strict,b._locale):new RegExp(Y(a))}function Y(a){return Z(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function Z(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;c<a.length;c++)Ad[a[c]]=d}function _(a,b){$(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function aa(a,b,c){null!=b&&f(Ad,a)&&Ad[a](b,c._a,c,a)}function ba(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ca(a,b){return c(this._months)?this._months[a.month()]:this._months[Kd.test(b)?"format":"standalone"][a.month()]}function da(a,b){return c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[Kd.test(b)?"format":"standalone"][a.month()]}function ea(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function fa(a,b){var c;if(!a.isValid())return a;if("string"==typeof b)if(/^\d+$/.test(b))b=r(b);else if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),ba(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ga(b){return null!=b?(fa(this,b),a.updateOffset(this,!0),this):N(this,"Month")}function ha(){return ba(this.year(),this.month())}function ia(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ka.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ja(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ka.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function ka(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=Z(d[b]),e[b]=Z(e[b]),f[b]=Z(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")$","i")}function la(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[Cd]<0||c[Cd]>11?Cd:c[Dd]<1||c[Dd]>ba(c[Bd],c[Cd])?Dd:c[Ed]<0||c[Ed]>24||24===c[Ed]&&(0!==c[Fd]||0!==c[Gd]||0!==c[Hd])?Ed:c[Fd]<0||c[Fd]>59?Fd:c[Gd]<0||c[Gd]>59?Gd:c[Hd]<0||c[Hd]>999?Hd:-1,j(a)._overflowDayOfYear&&(Bd>b||b>Dd)&&(b=Dd),j(a)._overflowWeeks&&-1===b&&(b=Id),j(a)._overflowWeekday&&-1===b&&(b=Jd),j(a).overflow=b),a}function ma(a){var b,c,d,e,f,g,h=a._i,i=Pd.exec(h)||Qd.exec(h);if(i){for(j(a).iso=!0,b=0,c=Sd.length;c>b;b++)if(Sd[b][1].exec(i[1])){e=Sd[b][0],d=Sd[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Td.length;c>b;b++)if(Td[b][1].exec(i[3])){f=(i[2]||" ")+Td[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Rd.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),Ba(a)}else a._isValid=!1}function na(b){var c=Ud.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ma(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function oa(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function pa(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function qa(a){return ra(a)?366:365}function ra(a){return a%4===0&&a%100!==0||a%400===0}function sa(){return ra(this.year())}function ta(a,b,c){var d=7+b-c,e=(7+pa(a,0,d).getUTCDay()-b)%7;return-e+d-1}function ua(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ta(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=qa(f)+j):j>qa(a)?(f=a+1,g=j-qa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function va(a,b,c){var d,e,f=ta(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+wa(e,b,c)):g>wa(a.year(),b,c)?(d=g-wa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function wa(a,b,c){var d=ta(a,b,c),e=ta(a+1,b,c);return(qa(a)-d+e)/7}function xa(a,b,c){return null!=a?a:null!=b?b:c}function ya(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function za(a){var b,c,d,e,f=[];if(!a._d){for(d=ya(a),a._w&&null==a._a[Dd]&&null==a._a[Cd]&&Aa(a),a._dayOfYear&&(e=xa(a._a[Bd],d[Bd]),a._dayOfYear>qa(e)&&(j(a)._overflowDayOfYear=!0),c=pa(e,0,a._dayOfYear),a._a[Cd]=c.getUTCMonth(),a._a[Dd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Ed]&&0===a._a[Fd]&&0===a._a[Gd]&&0===a._a[Hd]&&(a._nextDay=!0,a._a[Ed]=0),a._d=(a._useUTC?pa:oa).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Ed]=24)}}function Aa(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=xa(b.GG,a._a[Bd],va(Ja(),1,4).year),d=xa(b.W,1),e=xa(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=xa(b.gg,a._a[Bd],va(Ja(),f,g).year),d=xa(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>wa(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=ua(c,d,e,f,g),a._a[Bd]=h.year,a._dayOfYear=h.dayOfYear)}function Ba(b){if(b._f===a.ISO_8601)return void ma(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=V(b._f,b._locale).match(ed)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(X(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),hd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),aa(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[Ed]<=12&&b._a[Ed]>0&&(j(b).bigHour=void 0),b._a[Ed]=Ca(b._locale,b._a[Ed],b._meridiem),za(b),la(b)}function Ca(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function Da(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],Ba(b),k(b)&&(f+=j(b).charsLeftOver,f+=10*j(b).unusedTokens.length,j(b).score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function Ea(a){if(!a._d){var b=L(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),za(a)}}function Fa(a){var b=new o(la(Ga(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ga(a){var b=a._i,e=a._f;return a._locale=a._locale||H(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(la(b)):(c(e)?Da(a):e?Ba(a):d(b)?a._d=b:Ha(a),k(a)||(a._d=null),a))}function Ha(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(+f):"string"==typeof f?na(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),za(b)):"object"==typeof f?Ea(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ia(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Fa(f)}function Ja(a,b,c,d){return Ia(a,b,c,d,!1)}function Ka(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ja();for(d=b[0],e=1;e<b.length;++e)(!b[e].isValid()||b[e][a](d))&&(d=b[e]);return d}function La(){var a=[].slice.call(arguments,0);return Ka("isBefore",a)}function Ma(){var a=[].slice.call(arguments,0);return Ka("isAfter",a)}function Na(a){var b=L(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=H(),this._bubble()}function Oa(a){return a instanceof Na}function Pa(a,b){R(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+Q(~~(a/60),2)+b+Q(~~a%60,2)})}function Qa(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Zd)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Ra(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?+b:+Ja(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Ja(b).local()}function Sa(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ta(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=Qa(wd,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Sa(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?ib(this,cb(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Sa(this):null!=b?this:NaN}function Ua(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Va(a){return this.utcOffset(0,a)}function Wa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Sa(this),"m")),this}function Xa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Qa(vd,this._i)),this}function Ya(a){return this.isValid()?(a=a?Ja(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Za(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $a(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ga(a),a._a){var b=a._isUTC?h(a._a):Ja(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function _a(){return this.isValid()?!this._isUTC:!1}function ab(){return this.isValid()?this._isUTC:!1}function bb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function cb(a,b){var c,d,e,g=a,h=null;return Oa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=$d.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[Dd])*c,h:r(h[Ed])*c,m:r(h[Fd])*c,s:r(h[Gd])*c,ms:r(h[Hd])*c}):(h=_d.exec(a))?(c="-"===h[1]?-1:1,g={y:db(h[2],c),M:db(h[3],c),w:db(h[4],c),d:db(h[5],c),h:db(h[6],c),m:db(h[7],c),s:db(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=fb(Ja(g.from),Ja(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Na(g),Oa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function db(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function eb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function fb(a,b){var c;return a.isValid()&&b.isValid()?(b=Ra(b,a),a.isBefore(b)?c=eb(a,b):(c=eb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function gb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function hb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(v(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=cb(c,d),ib(this,e,a),this}}function ib(b,c,d,e){var f=c._milliseconds,g=gb(c._days),h=gb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&O(b,"Date",N(b,"Date")+g*d),h&&fa(b,N(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function jb(a,b){var c=a||Ja(),d=Ra(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(w(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ja(c)))}function kb(){return new o(this)}function lb(a,b){var c=p(a)?a:Ja(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?+this>+c:+c<+this.clone().startOf(b)):!1}function mb(a,b){var c=p(a)?a:Ja(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?+c>+this:+this.clone().endOf(b)<+c):!1}function nb(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)}function ob(a,b){var c,d=p(a)?a:Ja(a);return this.isValid()&&d.isValid()?(b=K(b||"millisecond"),"millisecond"===b?+this===+d:(c=+d,+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))):!1}function pb(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function qb(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function rb(a,b,c){var d,e,f,g;return this.isValid()?(d=Ra(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=K(b),"year"===b||"month"===b||"quarter"===b?(g=sb(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:q(g)):NaN):NaN}function sb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function tb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ub(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?w(Date.prototype.toISOString)?this.toDate().toISOString():U(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):U(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function vb(b){var c=U(this,b||a.defaultFormat);return this.localeData().postformat(c)}function wb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ja(a).isValid())?cb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function xb(a){return this.from(Ja(),a)}function yb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ja(a).isValid())?cb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function zb(a){return this.to(Ja(),a)}function Ab(a){var b;return void 0===a?this._locale._abbr:(b=H(a),null!=b&&(this._locale=b),this)}function Bb(){return this._locale}function Cb(a){switch(a=K(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function Db(a){return a=K(a),void 0===a||"millisecond"===a?this:this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")}function Eb(){return+this._d-6e4*(this._offset||0)}function Fb(){return Math.floor(+this/1e3)}function Gb(){return this._offset?new Date(+this):this._d}function Hb(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function Ib(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function Jb(){return this.isValid()?this.toISOString():null}function Kb(){return k(this)}function Lb(){return g({},j(this))}function Mb(){return j(this).overflow}function Nb(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ob(a,b){R(0,[a,a.length],0,b)}function Pb(a){return Tb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Qb(a){return Tb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Rb(){return wa(this.year(),1,4)}function Sb(){var a=this.localeData()._week;return wa(this.year(),a.dow,a.doy)}function Tb(a,b,c,d,e){var f;return null==a?va(this,d,e).year:(f=wa(a,d,e),b>f&&(b=f),Ub.call(this,a,b,c,d,e))}function Ub(a,b,c,d,e){var f=ua(a,b,c,d,e),g=pa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Vb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Wb(a){return va(a,this._week.dow,this._week.doy).week}function Xb(){return this._week.dow}function Yb(){return this._week.doy}function Zb(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function $b(a){var b=va(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function _b(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function ac(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function bc(a){return this._weekdaysShort[a.day()]}function cc(a){return this._weekdaysMin[a.day()]}function dc(a,b,c){var d,e,f;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=Ja([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function ec(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=_b(a,this.localeData()),this.add(a-b,"d")):b}function fc(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function gc(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function hc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ic(){return this.hours()%12||12}function jc(a,b){R(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function kc(a,b){return b._meridiemParse}function lc(a){return"p"===(a+"").toLowerCase().charAt(0)}function mc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function nc(a,b){b[Hd]=r(1e3*("0."+a))}function oc(){return this._isUTC?"UTC":""}function pc(){return this._isUTC?"Coordinated Universal Time":""}function qc(a){return Ja(1e3*a)}function rc(){return Ja.apply(null,arguments).parseZone()}function sc(a,b,c){var d=this._calendar[a];return w(d)?d.call(b,c):d}function tc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function uc(){return this._invalidDate}function vc(a){return this._ordinal.replace("%d",a)}function wc(a){return a}function xc(a,b,c,d){var e=this._relativeTime[c];return w(e)?e(a,b,c,d):e.replace(/%d/i,a)}function yc(a,b){var c=this._relativeTime[a>0?"future":"past"];return w(c)?c(b):c.replace(/%s/i,b)}function zc(a,b,c,d){var e=H(),f=h().set(d,b);return e[c](f,a)}function Ac(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return zc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=zc(a,f,c,e);return g}function Bc(a,b){return Ac(a,b,"months",12,"month")}function Cc(a,b){return Ac(a,b,"monthsShort",12,"month")}function Dc(a,b){return Ac(a,b,"weekdays",7,"day")}function Ec(a,b){return Ac(a,b,"weekdaysShort",7,"day")}function Fc(a,b){return Ac(a,b,"weekdaysMin",7,"day")}function Gc(){var a=this._data;return this._milliseconds=xe(this._milliseconds),this._days=xe(this._days),this._months=xe(this._months),a.milliseconds=xe(a.milliseconds),a.seconds=xe(a.seconds),a.minutes=xe(a.minutes),a.hours=xe(a.hours),a.months=xe(a.months),a.years=xe(a.years),this}function Hc(a,b,c,d){var e=cb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Ic(a,b){return Hc(this,a,b,1)}function Jc(a,b){return Hc(this,a,b,-1)}function Kc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Lc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Kc(Nc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Mc(g)),h+=e,g-=Kc(Nc(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Mc(a){return 4800*a/146097}function Nc(a){return 146097*a/4800}function Oc(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Mc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Nc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Pc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Qc(a){return function(){return this.as(a)}}function Rc(a){return a=K(a),this[a+"s"]()}function Sc(a){return function(){return this._data[a]}}function Tc(){return q(this.days()/7)}function Uc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Vc(a,b,c){var d=cb(a).abs(),e=Ne(d.as("s")),f=Ne(d.as("m")),g=Ne(d.as("h")),h=Ne(d.as("d")),i=Ne(d.as("M")),j=Ne(d.as("y")),k=e<Oe.s&&["s",e]||1>=f&&["m"]||f<Oe.m&&["mm",f]||1>=g&&["h"]||g<Oe.h&&["hh",g]||1>=h&&["d"]||h<Oe.d&&["dd",h]||1>=i&&["M"]||i<Oe.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,Uc.apply(null,k)}function Wc(a,b){return void 0===Oe[a]?!1:void 0===b?Oe[a]:(Oe[a]=b,!0)}function Xc(a){var b=this.localeData(),c=Vc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Yc(){var a,b,c,d=Pe(this._milliseconds)/1e3,e=Pe(this._days),f=Pe(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Zc,$c=a.momentProperties=[],_c=!1,ad={};a.suppressDeprecationWarnings=!1;var bd,cd={},dd={},ed=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gd={},hd={},id=/\d/,jd=/\d\d/,kd=/\d{3}/,ld=/\d{4}/,md=/[+-]?\d{6}/,nd=/\d\d?/,od=/\d\d\d\d?/,pd=/\d\d\d\d\d\d?/,qd=/\d{1,3}/,rd=/\d{1,4}/,sd=/[+-]?\d{1,6}/,td=/\d+/,ud=/[+-]?\d+/,vd=/Z|[+-]\d\d:?\d\d/gi,wd=/Z|[+-]\d\d(?::?\d\d)?/gi,xd=/[+-]?\d+(\.\d{1,3})?/,yd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,zd={},Ad={},Bd=0,Cd=1,Dd=2,Ed=3,Fd=4,Gd=5,Hd=6,Id=7,Jd=8;R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),R("MMMM",0,0,function(a){return this.localeData().months(this,a)}),J("month","M"),W("M",nd),W("MM",nd,jd),W("MMM",function(a,b){return b.monthsShortRegex(a)}),W("MMMM",function(a,b){return b.monthsRegex(a)}),$(["M","MM"],function(a,b){b[Cd]=r(a)-1}),$(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Cd]=e:j(c).invalidMonth=a});var Kd=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ld="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Md="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Nd=yd,Od=yd,Pd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Qd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Rd=/Z|[+-]\d\d(?::?\d\d)?/,Sd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Td=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ud=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=u("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),R("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),J("year","y"),W("Y",ud),W("YY",nd,jd),W("YYYY",rd,ld),W("YYYYY",sd,md),W("YYYYYY",sd,md),$(["YYYYY","YYYYYY"],Bd),$("YYYY",function(b,c){c[Bd]=2===b.length?a.parseTwoDigitYear(b):r(b);
7
  }),$("YY",function(b,c){c[Bd]=a.parseTwoDigitYear(b)}),$("Y",function(a,b){b[Bd]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var Vd=M("FullYear",!1);a.ISO_8601=function(){};var Wd=u("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ja.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),Xd=u("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ja.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),Yd=function(){return Date.now?Date.now():+new Date};Pa("Z",":"),Pa("ZZ",""),W("Z",wd),W("ZZ",wd),$(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Qa(wd,a)});var Zd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var $d=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,_d=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;cb.fn=Na.prototype;var ae=hb(1,"add"),be=hb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ce=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ob("gggg","weekYear"),Ob("ggggg","weekYear"),Ob("GGGG","isoWeekYear"),Ob("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),W("G",ud),W("g",ud),W("GG",nd,jd),W("gg",nd,jd),W("GGGG",rd,ld),W("gggg",rd,ld),W("GGGGG",sd,md),W("ggggg",sd,md),_(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),_(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),R("Q",0,"Qo","quarter"),J("quarter","Q"),W("Q",id),$("Q",function(a,b){b[Cd]=3*(r(a)-1)}),R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),W("w",nd),W("ww",nd,jd),W("W",nd),W("WW",nd,jd),_(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var de={dow:0,doy:6};R("D",["DD",2],"Do","date"),J("date","D"),W("D",nd),W("DD",nd,jd),W("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),$(["D","DD"],Dd),$("Do",function(a,b){b[Dd]=r(a.match(nd)[0],10)});var ee=M("Date",!0);R("d",0,"do","day"),R("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),R("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),R("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),W("d",nd),W("e",nd),W("E",nd),W("dd",yd),W("ddd",yd),W("dddd",yd),_(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),_(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var fe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),he="Su_Mo_Tu_We_Th_Fr_Sa".split("_");R("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),W("DDD",qd),W("DDDD",kd),$(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ic),R("hmm",0,0,function(){return""+ic.apply(this)+Q(this.minutes(),2)}),R("hmmss",0,0,function(){return""+ic.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),jc("a",!0),jc("A",!1),J("hour","h"),W("a",kc),W("A",kc),W("H",nd),W("h",nd),W("HH",nd,jd),W("hh",nd,jd),W("hmm",od),W("hmmss",pd),W("Hmm",od),W("Hmmss",pd),$(["H","HH"],Ed),$(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),$(["h","hh"],function(a,b,c){b[Ed]=r(a),j(c).bigHour=!0}),$("hmm",function(a,b,c){var d=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d)),j(c).bigHour=!0}),$("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d,2)),b[Gd]=r(a.substr(e)),j(c).bigHour=!0}),$("Hmm",function(a,b,c){var d=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d))}),$("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d,2)),b[Gd]=r(a.substr(e))});var ie=/[ap]\.?m?\.?/i,je=M("Hours",!0);R("m",["mm",2],0,"minute"),J("minute","m"),W("m",nd),W("mm",nd,jd),$(["m","mm"],Fd);var ke=M("Minutes",!1);R("s",["ss",2],0,"second"),J("second","s"),W("s",nd),W("ss",nd,jd),$(["s","ss"],Gd);var le=M("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),J("millisecond","ms"),W("S",qd,id),W("SS",qd,jd),W("SSS",qd,kd);var me;for(me="SSSS";me.length<=9;me+="S")W(me,td);for(me="S";me.length<=9;me+="S")$(me,nc);var ne=M("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var oe=o.prototype;oe.add=ae,oe.calendar=jb,oe.clone=kb,oe.diff=rb,oe.endOf=Db,oe.format=vb,oe.from=wb,oe.fromNow=xb,oe.to=yb,oe.toNow=zb,oe.get=P,oe.invalidAt=Mb,oe.isAfter=lb,oe.isBefore=mb,oe.isBetween=nb,oe.isSame=ob,oe.isSameOrAfter=pb,oe.isSameOrBefore=qb,oe.isValid=Kb,oe.lang=ce,oe.locale=Ab,oe.localeData=Bb,oe.max=Xd,oe.min=Wd,oe.parsingFlags=Lb,oe.set=P,oe.startOf=Cb,oe.subtract=be,oe.toArray=Hb,oe.toObject=Ib,oe.toDate=Gb,oe.toISOString=ub,oe.toJSON=Jb,oe.toString=tb,oe.unix=Fb,oe.valueOf=Eb,oe.creationData=Nb,oe.year=Vd,oe.isLeapYear=sa,oe.weekYear=Pb,oe.isoWeekYear=Qb,oe.quarter=oe.quarters=Vb,oe.month=ga,oe.daysInMonth=ha,oe.week=oe.weeks=Zb,oe.isoWeek=oe.isoWeeks=$b,oe.weeksInYear=Sb,oe.isoWeeksInYear=Rb,oe.date=ee,oe.day=oe.days=ec,oe.weekday=fc,oe.isoWeekday=gc,oe.dayOfYear=hc,oe.hour=oe.hours=je,oe.minute=oe.minutes=ke,oe.second=oe.seconds=le,oe.millisecond=oe.milliseconds=ne,oe.utcOffset=Ta,oe.utc=Va,oe.local=Wa,oe.parseZone=Xa,oe.hasAlignedHourOffset=Ya,oe.isDST=Za,oe.isDSTShifted=$a,oe.isLocal=_a,oe.isUtcOffset=ab,oe.isUtc=bb,oe.isUTC=bb,oe.zoneAbbr=oc,oe.zoneName=pc,oe.dates=u("dates accessor is deprecated. Use date instead.",ee),oe.months=u("months accessor is deprecated. Use month instead",ga),oe.years=u("years accessor is deprecated. Use year instead",Vd),oe.zone=u("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ua);var pe=oe,qe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},re={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},se="Invalid date",te="%d",ue=/\d{1,2}/,ve={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},we=A.prototype;we._calendar=qe,we.calendar=sc,we._longDateFormat=re,we.longDateFormat=tc,we._invalidDate=se,we.invalidDate=uc,we._ordinal=te,we.ordinal=vc,we._ordinalParse=ue,we.preparse=wc,we.postformat=wc,we._relativeTime=ve,we.relativeTime=xc,we.pastFuture=yc,we.set=y,we.months=ca,we._months=Ld,we.monthsShort=da,we._monthsShort=Md,we.monthsParse=ea,we._monthsRegex=Od,we.monthsRegex=ja,we._monthsShortRegex=Nd,we.monthsShortRegex=ia,we.week=Wb,we._week=de,we.firstDayOfYear=Yb,we.firstDayOfWeek=Xb,we.weekdays=ac,we._weekdays=fe,we.weekdaysMin=cc,we._weekdaysMin=he,we.weekdaysShort=bc,we._weekdaysShort=ge,we.weekdaysParse=dc,we.isPM=lc,we._meridiemParse=ie,we.meridiem=mc,E("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=u("moment.lang is deprecated. Use moment.locale instead.",E),a.langData=u("moment.langData is deprecated. Use moment.localeData instead.",H);var xe=Math.abs,ye=Qc("ms"),ze=Qc("s"),Ae=Qc("m"),Be=Qc("h"),Ce=Qc("d"),De=Qc("w"),Ee=Qc("M"),Fe=Qc("y"),Ge=Sc("milliseconds"),He=Sc("seconds"),Ie=Sc("minutes"),Je=Sc("hours"),Ke=Sc("days"),Le=Sc("months"),Me=Sc("years"),Ne=Math.round,Oe={s:45,m:45,h:22,d:26,M:11},Pe=Math.abs,Qe=Na.prototype;Qe.abs=Gc,Qe.add=Ic,Qe.subtract=Jc,Qe.as=Oc,Qe.asMilliseconds=ye,Qe.asSeconds=ze,Qe.asMinutes=Ae,Qe.asHours=Be,Qe.asDays=Ce,Qe.asWeeks=De,Qe.asMonths=Ee,Qe.asYears=Fe,Qe.valueOf=Pc,Qe._bubble=Lc,Qe.get=Rc,Qe.milliseconds=Ge,Qe.seconds=He,Qe.minutes=Ie,Qe.hours=Je,Qe.days=Ke,Qe.weeks=Tc,Qe.months=Le,Qe.years=Me,Qe.humanize=Xc,Qe.toISOString=Yc,Qe.toString=Yc,Qe.toJSON=Yc,Qe.locale=Ab,Qe.localeData=Bb,Qe.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yc),Qe.lang=ce,R("X",0,0,"unix"),R("x",0,0,"valueOf"),W("x",ud),W("X",xd),$("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),$("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.12.0",b(Ja),a.fn=pe,a.min=La,a.max=Ma,a.now=Yd,a.utc=h,a.unix=qc,a.months=Bc,a.isDate=d,a.locale=E,a.invalid=l,a.duration=cb,a.isMoment=p,a.weekdays=Dc,a.parseZone=rc,a.localeData=H,a.isDuration=Oa,a.monthsShort=Cc,a.weekdaysMin=Fc,a.defineLocale=F,a.updateLocale=G,a.locales=I,a.weekdaysShort=Ec,a.normalizeUnits=K,a.relativeTimeThreshold=Wc,a.prototype=pe;var Re=a;return Re});
1
+ //! moment.js
2
+ //! version : 2.12.0
3
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
+ //! license : MIT
5
+ //! momentjs.com
6
+ !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Zc.apply(null,arguments)}function b(a){Zc=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function g(a,b){for(var c in b)f(b,c)&&(a[c]=b[c]);return f(b,"toString")&&(a.toString=b.toString),f(b,"valueOf")&&(a.valueOf=b.valueOf),a}function h(a,b,c,d){return Ia(a,b,c,d,!0).utc()}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function j(a){return null==a._pf&&(a._pf=i()),a._pf}function k(a){if(null==a._isValid){var b=j(a);a._isValid=!(isNaN(a._d.getTime())||!(b.overflow<0)||b.empty||b.invalidMonth||b.invalidWeekday||b.nullInput||b.invalidFormat||b.userInvalidated),a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function l(a){var b=h(NaN);return null!=a?g(j(b),a):j(b).userInvalidated=!0,b}function m(a){return void 0===a}function n(a,b){var c,d,e;if(m(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),m(b._i)||(a._i=b._i),m(b._f)||(a._f=b._f),m(b._l)||(a._l=b._l),m(b._strict)||(a._strict=b._strict),m(b._tzm)||(a._tzm=b._tzm),m(b._isUTC)||(a._isUTC=b._isUTC),m(b._offset)||(a._offset=b._offset),m(b._pf)||(a._pf=j(b)),m(b._locale)||(a._locale=b._locale),$c.length>0)for(c in $c)d=$c[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),_c===!1&&(_c=!0,a.updateOffset(this),_c=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function u(a,b){var c=!0;return g(function(){return c&&(t(a+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function v(a,b){ad[a]||(t(b),ad[a]=!0)}function w(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function x(a){return"[object Object]"===Object.prototype.toString.call(a)}function y(a){var b,c;for(c in a)b=a[c],w(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function z(a,b){var c,d=g({},a);for(c in b)f(b,c)&&(x(a[c])&&x(b[c])?(d[c]={},g(d[c],a[c]),g(d[c],b[c])):null!=b[c]?d[c]=b[c]:delete d[c]);return d}function A(a){null!=a&&this.set(a)}function B(a){return a?a.toLowerCase().replace("_","-"):a}function C(a){for(var b,c,d,e,f=0;f<a.length;){for(e=B(a[f]).split("-"),b=e.length,c=B(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=D(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function D(a){var b=null;if(!cd[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=bd._abbr,require("./locale/"+a),E(b)}catch(c){}return cd[a]}function E(a,b){var c;return a&&(c=m(b)?H(a):F(a,b),c&&(bd=c)),bd._abbr}function F(a,b){return null!==b?(b.abbr=a,null!=cd[a]?(v("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),b=z(cd[a]._config,b)):null!=b.parentLocale&&(null!=cd[b.parentLocale]?b=z(cd[b.parentLocale]._config,b):v("parentLocaleUndefined","specified parentLocale is not defined yet")),cd[a]=new A(b),E(a),cd[a]):(delete cd[a],null)}function G(a,b){if(null!=b){var c;null!=cd[a]&&(b=z(cd[a]._config,b)),c=new A(b),c.parentLocale=cd[a],cd[a]=c,E(a)}else null!=cd[a]&&(null!=cd[a].parentLocale?cd[a]=cd[a].parentLocale:null!=cd[a]&&delete cd[a]);return cd[a]}function H(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return bd;if(!c(a)){if(b=D(a))return b;a=[a]}return C(a)}function I(){return Object.keys(cd)}function J(a,b){var c=a.toLowerCase();dd[c]=dd[c+"s"]=dd[b]=a}function K(a){return"string"==typeof a?dd[a]||dd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)f(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(b,c){return function(d){return null!=d?(O(this,b,d),a.updateOffset(this,c),this):N(this,b)}}function N(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function O(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function P(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=K(a),w(this[a]))return this[a](b);return this}function Q(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function R(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(hd[a]=e),b&&(hd[b[0]]=function(){return Q(e.apply(this,arguments),b[1],b[2])}),c&&(hd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function S(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function T(a){var b,c,d=a.match(ed);for(b=0,c=d.length;c>b;b++)hd[d[b]]?d[b]=hd[d[b]]:d[b]=S(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function U(a,b){return a.isValid()?(b=V(b,a.localeData()),gd[b]=gd[b]||T(b),gd[b](a)):a.localeData().invalidDate()}function V(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(fd.lastIndex=0;d>=0&&fd.test(a);)a=a.replace(fd,c),fd.lastIndex=0,d-=1;return a}function W(a,b,c){zd[a]=w(b)?b:function(a,d){return a&&c?c:b}}function X(a,b){return f(zd,a)?zd[a](b._strict,b._locale):new RegExp(Y(a))}function Y(a){return Z(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function Z(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;c<a.length;c++)Ad[a[c]]=d}function _(a,b){$(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function aa(a,b,c){null!=b&&f(Ad,a)&&Ad[a](b,c._a,c,a)}function ba(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ca(a,b){return c(this._months)?this._months[a.month()]:this._months[Kd.test(b)?"format":"standalone"][a.month()]}function da(a,b){return c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[Kd.test(b)?"format":"standalone"][a.month()]}function ea(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function fa(a,b){var c;if(!a.isValid())return a;if("string"==typeof b)if(/^\d+$/.test(b))b=r(b);else if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),ba(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ga(b){return null!=b?(fa(this,b),a.updateOffset(this,!0),this):N(this,"Month")}function ha(){return ba(this.year(),this.month())}function ia(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ka.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ja(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ka.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function ka(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=Z(d[b]),e[b]=Z(e[b]),f[b]=Z(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")$","i")}function la(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[Cd]<0||c[Cd]>11?Cd:c[Dd]<1||c[Dd]>ba(c[Bd],c[Cd])?Dd:c[Ed]<0||c[Ed]>24||24===c[Ed]&&(0!==c[Fd]||0!==c[Gd]||0!==c[Hd])?Ed:c[Fd]<0||c[Fd]>59?Fd:c[Gd]<0||c[Gd]>59?Gd:c[Hd]<0||c[Hd]>999?Hd:-1,j(a)._overflowDayOfYear&&(Bd>b||b>Dd)&&(b=Dd),j(a)._overflowWeeks&&-1===b&&(b=Id),j(a)._overflowWeekday&&-1===b&&(b=Jd),j(a).overflow=b),a}function ma(a){var b,c,d,e,f,g,h=a._i,i=Pd.exec(h)||Qd.exec(h);if(i){for(j(a).iso=!0,b=0,c=Sd.length;c>b;b++)if(Sd[b][1].exec(i[1])){e=Sd[b][0],d=Sd[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Td.length;c>b;b++)if(Td[b][1].exec(i[3])){f=(i[2]||" ")+Td[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Rd.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),Ba(a)}else a._isValid=!1}function na(b){var c=Ud.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ma(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function oa(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function pa(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function qa(a){return ra(a)?366:365}function ra(a){return a%4===0&&a%100!==0||a%400===0}function sa(){return ra(this.year())}function ta(a,b,c){var d=7+b-c,e=(7+pa(a,0,d).getUTCDay()-b)%7;return-e+d-1}function ua(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ta(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=qa(f)+j):j>qa(a)?(f=a+1,g=j-qa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function va(a,b,c){var d,e,f=ta(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+wa(e,b,c)):g>wa(a.year(),b,c)?(d=g-wa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function wa(a,b,c){var d=ta(a,b,c),e=ta(a+1,b,c);return(qa(a)-d+e)/7}function xa(a,b,c){return null!=a?a:null!=b?b:c}function ya(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function za(a){var b,c,d,e,f=[];if(!a._d){for(d=ya(a),a._w&&null==a._a[Dd]&&null==a._a[Cd]&&Aa(a),a._dayOfYear&&(e=xa(a._a[Bd],d[Bd]),a._dayOfYear>qa(e)&&(j(a)._overflowDayOfYear=!0),c=pa(e,0,a._dayOfYear),a._a[Cd]=c.getUTCMonth(),a._a[Dd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Ed]&&0===a._a[Fd]&&0===a._a[Gd]&&0===a._a[Hd]&&(a._nextDay=!0,a._a[Ed]=0),a._d=(a._useUTC?pa:oa).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Ed]=24)}}function Aa(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=xa(b.GG,a._a[Bd],va(Ja(),1,4).year),d=xa(b.W,1),e=xa(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=xa(b.gg,a._a[Bd],va(Ja(),f,g).year),d=xa(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>wa(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=ua(c,d,e,f,g),a._a[Bd]=h.year,a._dayOfYear=h.dayOfYear)}function Ba(b){if(b._f===a.ISO_8601)return void ma(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=V(b._f,b._locale).match(ed)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(X(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),hd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),aa(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[Ed]<=12&&b._a[Ed]>0&&(j(b).bigHour=void 0),b._a[Ed]=Ca(b._locale,b._a[Ed],b._meridiem),za(b),la(b)}function Ca(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function Da(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],Ba(b),k(b)&&(f+=j(b).charsLeftOver,f+=10*j(b).unusedTokens.length,j(b).score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function Ea(a){if(!a._d){var b=L(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),za(a)}}function Fa(a){var b=new o(la(Ga(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ga(a){var b=a._i,e=a._f;return a._locale=a._locale||H(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(la(b)):(c(e)?Da(a):e?Ba(a):d(b)?a._d=b:Ha(a),k(a)||(a._d=null),a))}function Ha(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(+f):"string"==typeof f?na(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),za(b)):"object"==typeof f?Ea(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ia(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Fa(f)}function Ja(a,b,c,d){return Ia(a,b,c,d,!1)}function Ka(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ja();for(d=b[0],e=1;e<b.length;++e)(!b[e].isValid()||b[e][a](d))&&(d=b[e]);return d}function La(){var a=[].slice.call(arguments,0);return Ka("isBefore",a)}function Ma(){var a=[].slice.call(arguments,0);return Ka("isAfter",a)}function Na(a){var b=L(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=H(),this._bubble()}function Oa(a){return a instanceof Na}function Pa(a,b){R(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+Q(~~(a/60),2)+b+Q(~~a%60,2)})}function Qa(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Zd)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Ra(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?+b:+Ja(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Ja(b).local()}function Sa(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ta(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=Qa(wd,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Sa(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?ib(this,cb(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Sa(this):null!=b?this:NaN}function Ua(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Va(a){return this.utcOffset(0,a)}function Wa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Sa(this),"m")),this}function Xa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Qa(vd,this._i)),this}function Ya(a){return this.isValid()?(a=a?Ja(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Za(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $a(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ga(a),a._a){var b=a._isUTC?h(a._a):Ja(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function _a(){return this.isValid()?!this._isUTC:!1}function ab(){return this.isValid()?this._isUTC:!1}function bb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function cb(a,b){var c,d,e,g=a,h=null;return Oa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=$d.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[Dd])*c,h:r(h[Ed])*c,m:r(h[Fd])*c,s:r(h[Gd])*c,ms:r(h[Hd])*c}):(h=_d.exec(a))?(c="-"===h[1]?-1:1,g={y:db(h[2],c),M:db(h[3],c),w:db(h[4],c),d:db(h[5],c),h:db(h[6],c),m:db(h[7],c),s:db(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=fb(Ja(g.from),Ja(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Na(g),Oa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function db(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function eb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function fb(a,b){var c;return a.isValid()&&b.isValid()?(b=Ra(b,a),a.isBefore(b)?c=eb(a,b):(c=eb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function gb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function hb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(v(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=cb(c,d),ib(this,e,a),this}}function ib(b,c,d,e){var f=c._milliseconds,g=gb(c._days),h=gb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&O(b,"Date",N(b,"Date")+g*d),h&&fa(b,N(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function jb(a,b){var c=a||Ja(),d=Ra(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(w(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ja(c)))}function kb(){return new o(this)}function lb(a,b){var c=p(a)?a:Ja(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?+this>+c:+c<+this.clone().startOf(b)):!1}function mb(a,b){var c=p(a)?a:Ja(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?+c>+this:+this.clone().endOf(b)<+c):!1}function nb(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)}function ob(a,b){var c,d=p(a)?a:Ja(a);return this.isValid()&&d.isValid()?(b=K(b||"millisecond"),"millisecond"===b?+this===+d:(c=+d,+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))):!1}function pb(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function qb(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function rb(a,b,c){var d,e,f,g;return this.isValid()?(d=Ra(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=K(b),"year"===b||"month"===b||"quarter"===b?(g=sb(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:q(g)):NaN):NaN}function sb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function tb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ub(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?w(Date.prototype.toISOString)?this.toDate().toISOString():U(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):U(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function vb(b){var c=U(this,b||a.defaultFormat);return this.localeData().postformat(c)}function wb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ja(a).isValid())?cb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function xb(a){return this.from(Ja(),a)}function yb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ja(a).isValid())?cb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function zb(a){return this.to(Ja(),a)}function Ab(a){var b;return void 0===a?this._locale._abbr:(b=H(a),null!=b&&(this._locale=b),this)}function Bb(){return this._locale}function Cb(a){switch(a=K(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function Db(a){return a=K(a),void 0===a||"millisecond"===a?this:this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")}function Eb(){return+this._d-6e4*(this._offset||0)}function Fb(){return Math.floor(+this/1e3)}function Gb(){return this._offset?new Date(+this):this._d}function Hb(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function Ib(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function Jb(){return this.isValid()?this.toISOString():null}function Kb(){return k(this)}function Lb(){return g({},j(this))}function Mb(){return j(this).overflow}function Nb(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ob(a,b){R(0,[a,a.length],0,b)}function Pb(a){return Tb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Qb(a){return Tb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Rb(){return wa(this.year(),1,4)}function Sb(){var a=this.localeData()._week;return wa(this.year(),a.dow,a.doy)}function Tb(a,b,c,d,e){var f;return null==a?va(this,d,e).year:(f=wa(a,d,e),b>f&&(b=f),Ub.call(this,a,b,c,d,e))}function Ub(a,b,c,d,e){var f=ua(a,b,c,d,e),g=pa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Vb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Wb(a){return va(a,this._week.dow,this._week.doy).week}function Xb(){return this._week.dow}function Yb(){return this._week.doy}function Zb(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function $b(a){var b=va(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function _b(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function ac(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function bc(a){return this._weekdaysShort[a.day()]}function cc(a){return this._weekdaysMin[a.day()]}function dc(a,b,c){var d,e,f;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=Ja([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function ec(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=_b(a,this.localeData()),this.add(a-b,"d")):b}function fc(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function gc(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function hc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ic(){return this.hours()%12||12}function jc(a,b){R(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function kc(a,b){return b._meridiemParse}function lc(a){return"p"===(a+"").toLowerCase().charAt(0)}function mc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function nc(a,b){b[Hd]=r(1e3*("0."+a))}function oc(){return this._isUTC?"UTC":""}function pc(){return this._isUTC?"Coordinated Universal Time":""}function qc(a){return Ja(1e3*a)}function rc(){return Ja.apply(null,arguments).parseZone()}function sc(a,b,c){var d=this._calendar[a];return w(d)?d.call(b,c):d}function tc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function uc(){return this._invalidDate}function vc(a){return this._ordinal.replace("%d",a)}function wc(a){return a}function xc(a,b,c,d){var e=this._relativeTime[c];return w(e)?e(a,b,c,d):e.replace(/%d/i,a)}function yc(a,b){var c=this._relativeTime[a>0?"future":"past"];return w(c)?c(b):c.replace(/%s/i,b)}function zc(a,b,c,d){var e=H(),f=h().set(d,b);return e[c](f,a)}function Ac(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return zc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=zc(a,f,c,e);return g}function Bc(a,b){return Ac(a,b,"months",12,"month")}function Cc(a,b){return Ac(a,b,"monthsShort",12,"month")}function Dc(a,b){return Ac(a,b,"weekdays",7,"day")}function Ec(a,b){return Ac(a,b,"weekdaysShort",7,"day")}function Fc(a,b){return Ac(a,b,"weekdaysMin",7,"day")}function Gc(){var a=this._data;return this._milliseconds=xe(this._milliseconds),this._days=xe(this._days),this._months=xe(this._months),a.milliseconds=xe(a.milliseconds),a.seconds=xe(a.seconds),a.minutes=xe(a.minutes),a.hours=xe(a.hours),a.months=xe(a.months),a.years=xe(a.years),this}function Hc(a,b,c,d){var e=cb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Ic(a,b){return Hc(this,a,b,1)}function Jc(a,b){return Hc(this,a,b,-1)}function Kc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Lc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Kc(Nc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Mc(g)),h+=e,g-=Kc(Nc(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Mc(a){return 4800*a/146097}function Nc(a){return 146097*a/4800}function Oc(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Mc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Nc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Pc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Qc(a){return function(){return this.as(a)}}function Rc(a){return a=K(a),this[a+"s"]()}function Sc(a){return function(){return this._data[a]}}function Tc(){return q(this.days()/7)}function Uc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Vc(a,b,c){var d=cb(a).abs(),e=Ne(d.as("s")),f=Ne(d.as("m")),g=Ne(d.as("h")),h=Ne(d.as("d")),i=Ne(d.as("M")),j=Ne(d.as("y")),k=e<Oe.s&&["s",e]||1>=f&&["m"]||f<Oe.m&&["mm",f]||1>=g&&["h"]||g<Oe.h&&["hh",g]||1>=h&&["d"]||h<Oe.d&&["dd",h]||1>=i&&["M"]||i<Oe.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,Uc.apply(null,k)}function Wc(a,b){return void 0===Oe[a]?!1:void 0===b?Oe[a]:(Oe[a]=b,!0)}function Xc(a){var b=this.localeData(),c=Vc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Yc(){var a,b,c,d=Pe(this._milliseconds)/1e3,e=Pe(this._days),f=Pe(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Zc,$c=a.momentProperties=[],_c=!1,ad={};a.suppressDeprecationWarnings=!1;var bd,cd={},dd={},ed=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gd={},hd={},id=/\d/,jd=/\d\d/,kd=/\d{3}/,ld=/\d{4}/,md=/[+-]?\d{6}/,nd=/\d\d?/,od=/\d\d\d\d?/,pd=/\d\d\d\d\d\d?/,qd=/\d{1,3}/,rd=/\d{1,4}/,sd=/[+-]?\d{1,6}/,td=/\d+/,ud=/[+-]?\d+/,vd=/Z|[+-]\d\d:?\d\d/gi,wd=/Z|[+-]\d\d(?::?\d\d)?/gi,xd=/[+-]?\d+(\.\d{1,3})?/,yd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,zd={},Ad={},Bd=0,Cd=1,Dd=2,Ed=3,Fd=4,Gd=5,Hd=6,Id=7,Jd=8;R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),R("MMMM",0,0,function(a){return this.localeData().months(this,a)}),J("month","M"),W("M",nd),W("MM",nd,jd),W("MMM",function(a,b){return b.monthsShortRegex(a)}),W("MMMM",function(a,b){return b.monthsRegex(a)}),$(["M","MM"],function(a,b){b[Cd]=r(a)-1}),$(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Cd]=e:j(c).invalidMonth=a});var Kd=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ld="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Md="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Nd=yd,Od=yd,Pd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Qd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Rd=/Z|[+-]\d\d(?::?\d\d)?/,Sd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Td=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ud=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=u("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),R("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),J("year","y"),W("Y",ud),W("YY",nd,jd),W("YYYY",rd,ld),W("YYYYY",sd,md),W("YYYYYY",sd,md),$(["YYYYY","YYYYYY"],Bd),$("YYYY",function(b,c){c[Bd]=2===b.length?a.parseTwoDigitYear(b):r(b);
7
  }),$("YY",function(b,c){c[Bd]=a.parseTwoDigitYear(b)}),$("Y",function(a,b){b[Bd]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var Vd=M("FullYear",!1);a.ISO_8601=function(){};var Wd=u("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ja.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),Xd=u("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ja.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),Yd=function(){return Date.now?Date.now():+new Date};Pa("Z",":"),Pa("ZZ",""),W("Z",wd),W("ZZ",wd),$(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Qa(wd,a)});var Zd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var $d=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,_d=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;cb.fn=Na.prototype;var ae=hb(1,"add"),be=hb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ce=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ob("gggg","weekYear"),Ob("ggggg","weekYear"),Ob("GGGG","isoWeekYear"),Ob("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),W("G",ud),W("g",ud),W("GG",nd,jd),W("gg",nd,jd),W("GGGG",rd,ld),W("gggg",rd,ld),W("GGGGG",sd,md),W("ggggg",sd,md),_(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),_(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),R("Q",0,"Qo","quarter"),J("quarter","Q"),W("Q",id),$("Q",function(a,b){b[Cd]=3*(r(a)-1)}),R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),W("w",nd),W("ww",nd,jd),W("W",nd),W("WW",nd,jd),_(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var de={dow:0,doy:6};R("D",["DD",2],"Do","date"),J("date","D"),W("D",nd),W("DD",nd,jd),W("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),$(["D","DD"],Dd),$("Do",function(a,b){b[Dd]=r(a.match(nd)[0],10)});var ee=M("Date",!0);R("d",0,"do","day"),R("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),R("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),R("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),W("d",nd),W("e",nd),W("E",nd),W("dd",yd),W("ddd",yd),W("dddd",yd),_(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),_(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var fe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),he="Su_Mo_Tu_We_Th_Fr_Sa".split("_");R("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),W("DDD",qd),W("DDDD",kd),$(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ic),R("hmm",0,0,function(){return""+ic.apply(this)+Q(this.minutes(),2)}),R("hmmss",0,0,function(){return""+ic.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),jc("a",!0),jc("A",!1),J("hour","h"),W("a",kc),W("A",kc),W("H",nd),W("h",nd),W("HH",nd,jd),W("hh",nd,jd),W("hmm",od),W("hmmss",pd),W("Hmm",od),W("Hmmss",pd),$(["H","HH"],Ed),$(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),$(["h","hh"],function(a,b,c){b[Ed]=r(a),j(c).bigHour=!0}),$("hmm",function(a,b,c){var d=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d)),j(c).bigHour=!0}),$("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d,2)),b[Gd]=r(a.substr(e)),j(c).bigHour=!0}),$("Hmm",function(a,b,c){var d=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d))}),$("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Ed]=r(a.substr(0,d)),b[Fd]=r(a.substr(d,2)),b[Gd]=r(a.substr(e))});var ie=/[ap]\.?m?\.?/i,je=M("Hours",!0);R("m",["mm",2],0,"minute"),J("minute","m"),W("m",nd),W("mm",nd,jd),$(["m","mm"],Fd);var ke=M("Minutes",!1);R("s",["ss",2],0,"second"),J("second","s"),W("s",nd),W("ss",nd,jd),$(["s","ss"],Gd);var le=M("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),J("millisecond","ms"),W("S",qd,id),W("SS",qd,jd),W("SSS",qd,kd);var me;for(me="SSSS";me.length<=9;me+="S")W(me,td);for(me="S";me.length<=9;me+="S")$(me,nc);var ne=M("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var oe=o.prototype;oe.add=ae,oe.calendar=jb,oe.clone=kb,oe.diff=rb,oe.endOf=Db,oe.format=vb,oe.from=wb,oe.fromNow=xb,oe.to=yb,oe.toNow=zb,oe.get=P,oe.invalidAt=Mb,oe.isAfter=lb,oe.isBefore=mb,oe.isBetween=nb,oe.isSame=ob,oe.isSameOrAfter=pb,oe.isSameOrBefore=qb,oe.isValid=Kb,oe.lang=ce,oe.locale=Ab,oe.localeData=Bb,oe.max=Xd,oe.min=Wd,oe.parsingFlags=Lb,oe.set=P,oe.startOf=Cb,oe.subtract=be,oe.toArray=Hb,oe.toObject=Ib,oe.toDate=Gb,oe.toISOString=ub,oe.toJSON=Jb,oe.toString=tb,oe.unix=Fb,oe.valueOf=Eb,oe.creationData=Nb,oe.year=Vd,oe.isLeapYear=sa,oe.weekYear=Pb,oe.isoWeekYear=Qb,oe.quarter=oe.quarters=Vb,oe.month=ga,oe.daysInMonth=ha,oe.week=oe.weeks=Zb,oe.isoWeek=oe.isoWeeks=$b,oe.weeksInYear=Sb,oe.isoWeeksInYear=Rb,oe.date=ee,oe.day=oe.days=ec,oe.weekday=fc,oe.isoWeekday=gc,oe.dayOfYear=hc,oe.hour=oe.hours=je,oe.minute=oe.minutes=ke,oe.second=oe.seconds=le,oe.millisecond=oe.milliseconds=ne,oe.utcOffset=Ta,oe.utc=Va,oe.local=Wa,oe.parseZone=Xa,oe.hasAlignedHourOffset=Ya,oe.isDST=Za,oe.isDSTShifted=$a,oe.isLocal=_a,oe.isUtcOffset=ab,oe.isUtc=bb,oe.isUTC=bb,oe.zoneAbbr=oc,oe.zoneName=pc,oe.dates=u("dates accessor is deprecated. Use date instead.",ee),oe.months=u("months accessor is deprecated. Use month instead",ga),oe.years=u("years accessor is deprecated. Use year instead",Vd),oe.zone=u("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ua);var pe=oe,qe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},re={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},se="Invalid date",te="%d",ue=/\d{1,2}/,ve={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},we=A.prototype;we._calendar=qe,we.calendar=sc,we._longDateFormat=re,we.longDateFormat=tc,we._invalidDate=se,we.invalidDate=uc,we._ordinal=te,we.ordinal=vc,we._ordinalParse=ue,we.preparse=wc,we.postformat=wc,we._relativeTime=ve,we.relativeTime=xc,we.pastFuture=yc,we.set=y,we.months=ca,we._months=Ld,we.monthsShort=da,we._monthsShort=Md,we.monthsParse=ea,we._monthsRegex=Od,we.monthsRegex=ja,we._monthsShortRegex=Nd,we.monthsShortRegex=ia,we.week=Wb,we._week=de,we.firstDayOfYear=Yb,we.firstDayOfWeek=Xb,we.weekdays=ac,we._weekdays=fe,we.weekdaysMin=cc,we._weekdaysMin=he,we.weekdaysShort=bc,we._weekdaysShort=ge,we.weekdaysParse=dc,we.isPM=lc,we._meridiemParse=ie,we.meridiem=mc,E("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=u("moment.lang is deprecated. Use moment.locale instead.",E),a.langData=u("moment.langData is deprecated. Use moment.localeData instead.",H);var xe=Math.abs,ye=Qc("ms"),ze=Qc("s"),Ae=Qc("m"),Be=Qc("h"),Ce=Qc("d"),De=Qc("w"),Ee=Qc("M"),Fe=Qc("y"),Ge=Sc("milliseconds"),He=Sc("seconds"),Ie=Sc("minutes"),Je=Sc("hours"),Ke=Sc("days"),Le=Sc("months"),Me=Sc("years"),Ne=Math.round,Oe={s:45,m:45,h:22,d:26,M:11},Pe=Math.abs,Qe=Na.prototype;Qe.abs=Gc,Qe.add=Ic,Qe.subtract=Jc,Qe.as=Oc,Qe.asMilliseconds=ye,Qe.asSeconds=ze,Qe.asMinutes=Ae,Qe.asHours=Be,Qe.asDays=Ce,Qe.asWeeks=De,Qe.asMonths=Ee,Qe.asYears=Fe,Qe.valueOf=Pc,Qe._bubble=Lc,Qe.get=Rc,Qe.milliseconds=Ge,Qe.seconds=He,Qe.minutes=Ie,Qe.hours=Je,Qe.days=Ke,Qe.weeks=Tc,Qe.months=Le,Qe.years=Me,Qe.humanize=Xc,Qe.toISOString=Yc,Qe.toString=Yc,Qe.toJSON=Yc,Qe.locale=Ab,Qe.localeData=Bb,Qe.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yc),Qe.lang=ce,R("X",0,0,"unix"),R("x",0,0,"valueOf"),W("x",ud),W("X",xd),$("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),$("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.12.0",b(Ja),a.fn=pe,a.min=La,a.max=Ma,a.now=Yd,a.utc=h,a.unix=qc,a.months=Bc,a.isDate=d,a.locale=E,a.invalid=l,a.duration=cb,a.isMoment=p,a.weekdays=Dc,a.parseZone=rc,a.localeData=H,a.isDuration=Oa,a.monthsShort=Cc,a.weekdaysMin=Fc,a.defineLocale=F,a.updateLocale=G,a.locales=I,a.weekdaysShort=Ec,a.normalizeUnits=K,a.relativeTimeThreshold=Wc,a.prototype=pe;var Re=a;return Re});
inc/js/rgbcolor.js CHANGED
@@ -1,304 +1,304 @@
1
- /**
2
- * A class to parse color values
3
- * @author Stoyan Stefanov <sstoo@gmail.com>
4
- * @link http://www.phpied.com/rgb-color-parser-in-javascript/
5
- * @license Use it if you like it
6
- */
7
-
8
- (function ( global ) {
9
-
10
- function RGBColor(color_string)
11
- {
12
- this.ok = false;
13
-
14
- // strip any leading #
15
- if (color_string.charAt(0) == '#') { // remove # if any
16
- color_string = color_string.substr(1,6);
17
- }
18
-
19
- color_string = color_string.replace(/ /g,'');
20
- color_string = color_string.toLowerCase();
21
-
22
- // before getting into regexps, try simple matches
23
- // and overwrite the input
24
- var simple_colors = {
25
- aliceblue: 'f0f8ff',
26
- antiquewhite: 'faebd7',
27
- aqua: '00ffff',
28
- aquamarine: '7fffd4',
29
- azure: 'f0ffff',
30
- beige: 'f5f5dc',
31
- bisque: 'ffe4c4',
32
- black: '000000',
33
- blanchedalmond: 'ffebcd',
34
- blue: '0000ff',
35
- blueviolet: '8a2be2',
36
- brown: 'a52a2a',
37
- burlywood: 'deb887',
38
- cadetblue: '5f9ea0',
39
- chartreuse: '7fff00',
40
- chocolate: 'd2691e',
41
- coral: 'ff7f50',
42
- cornflowerblue: '6495ed',
43
- cornsilk: 'fff8dc',
44
- crimson: 'dc143c',
45
- cyan: '00ffff',
46
- darkblue: '00008b',
47
- darkcyan: '008b8b',
48
- darkgoldenrod: 'b8860b',
49
- darkgray: 'a9a9a9',
50
- darkgreen: '006400',
51
- darkkhaki: 'bdb76b',
52
- darkmagenta: '8b008b',
53
- darkolivegreen: '556b2f',
54
- darkorange: 'ff8c00',
55
- darkorchid: '9932cc',
56
- darkred: '8b0000',
57
- darksalmon: 'e9967a',
58
- darkseagreen: '8fbc8f',
59
- darkslateblue: '483d8b',
60
- darkslategray: '2f4f4f',
61
- darkturquoise: '00ced1',
62
- darkviolet: '9400d3',
63
- deeppink: 'ff1493',
64
- deepskyblue: '00bfff',
65
- dimgray: '696969',
66
- dodgerblue: '1e90ff',
67
- feldspar: 'd19275',
68
- firebrick: 'b22222',
69
- floralwhite: 'fffaf0',
70
- forestgreen: '228b22',
71
- fuchsia: 'ff00ff',
72
- gainsboro: 'dcdcdc',
73
- ghostwhite: 'f8f8ff',
74
- gold: 'ffd700',
75
- goldenrod: 'daa520',
76
- gray: '808080',
77
- green: '008000',
78
- greenyellow: 'adff2f',
79
- honeydew: 'f0fff0',
80
- hotpink: 'ff69b4',
81
- indianred : 'cd5c5c',
82
- indigo : '4b0082',
83
- ivory: 'fffff0',
84
- khaki: 'f0e68c',
85
- lavender: 'e6e6fa',
86
- lavenderblush: 'fff0f5',
87
- lawngreen: '7cfc00',
88
- lemonchiffon: 'fffacd',
89
- lightblue: 'add8e6',
90
- lightcoral: 'f08080',
91
- lightcyan: 'e0ffff',
92
- lightgoldenrodyellow: 'fafad2',
93
- lightgrey: 'd3d3d3',
94
- lightgreen: '90ee90',
95
- lightpink: 'ffb6c1',
96
- lightsalmon: 'ffa07a',
97
- lightseagreen: '20b2aa',
98
- lightskyblue: '87cefa',
99
- lightslateblue: '8470ff',
100
- lightslategray: '778899',
101
- lightsteelblue: 'b0c4de',
102
- lightyellow: 'ffffe0',
103
- lime: '00ff00',
104
- limegreen: '32cd32',
105
- linen: 'faf0e6',
106
- magenta: 'ff00ff',
107
- maroon: '800000',
108
- mediumaquamarine: '66cdaa',
109
- mediumblue: '0000cd',
110
- mediumorchid: 'ba55d3',
111
- mediumpurple: '9370d8',
112
- mediumseagreen: '3cb371',
113
- mediumslateblue: '7b68ee',
114
- mediumspringgreen: '00fa9a',
115
- mediumturquoise: '48d1cc',
116
- mediumvioletred: 'c71585',
117
- midnightblue: '191970',
118
- mintcream: 'f5fffa',
119
- mistyrose: 'ffe4e1',
120
- moccasin: 'ffe4b5',
121
- navajowhite: 'ffdead',
122
- navy: '000080',
123
- oldlace: 'fdf5e6',
124
- olive: '808000',
125
- olivedrab: '6b8e23',
126
- orange: 'ffa500',
127
- orangered: 'ff4500',
128
- orchid: 'da70d6',
129
- palegoldenrod: 'eee8aa',
130
- palegreen: '98fb98',
131
- paleturquoise: 'afeeee',
132
- palevioletred: 'd87093',
133
- papayawhip: 'ffefd5',
134
- peachpuff: 'ffdab9',
135
- peru: 'cd853f',
136
- pink: 'ffc0cb',
137
- plum: 'dda0dd',
138
- powderblue: 'b0e0e6',
139
- purple: '800080',
140
- red: 'ff0000',
141
- rosybrown: 'bc8f8f',
142
- royalblue: '4169e1',
143
- saddlebrown: '8b4513',
144
- salmon: 'fa8072',
145
- sandybrown: 'f4a460',
146
- seagreen: '2e8b57',
147
- seashell: 'fff5ee',
148
- sienna: 'a0522d',
149
- silver: 'c0c0c0',
150
- skyblue: '87ceeb',
151
- slateblue: '6a5acd',
152
- slategray: '708090',
153
- snow: 'fffafa',
154
- springgreen: '00ff7f',
155
- steelblue: '4682b4',
156
- tan: 'd2b48c',
157
- teal: '008080',
158
- thistle: 'd8bfd8',
159
- tomato: 'ff6347',
160
- turquoise: '40e0d0',
161
- violet: 'ee82ee',
162
- violetred: 'd02090',
163
- wheat: 'f5deb3',
164
- white: 'ffffff',
165
- whitesmoke: 'f5f5f5',
166
- yellow: 'ffff00',
167
- yellowgreen: '9acd32'
168
- };
169
- for (var key in simple_colors) {
170
- if (color_string == key) {
171
- color_string = simple_colors[key];
172
- }
173
- }
174
- // emd of simple type-in colors
175
-
176
- // array of color definition objects
177
- var color_defs = [
178
- {
179
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
180
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
181
- process: function (bits){
182
- return [
183
- parseInt(bits[1]),
184
- parseInt(bits[2]),
185
- parseInt(bits[3])
186
- ];
187
- }
188
- },
189
- {
190
- re: /^(\w{2})(\w{2})(\w{2})$/,
191
- example: ['#00ff00', '336699'],
192
- process: function (bits){
193
- return [
194
- parseInt(bits[1], 16),
195
- parseInt(bits[2], 16),
196
- parseInt(bits[3], 16)
197
- ];
198
- }
199
- },
200
- {
201
- re: /^(\w{1})(\w{1})(\w{1})$/,
202
- example: ['#fb0', 'f0f'],
203
- process: function (bits){
204
- return [
205
- parseInt(bits[1] + bits[1], 16),
206
- parseInt(bits[2] + bits[2], 16),
207
- parseInt(bits[3] + bits[3], 16)
208
- ];
209
- }
210
- }
211
- ];
212
-
213
- // search through the definitions to find a match
214
- for (var i = 0; i < color_defs.length; i++) {
215
- var re = color_defs[i].re;
216
- var processor = color_defs[i].process;
217
- var bits = re.exec(color_string);
218
- if (bits) {
219
- channels = processor(bits);
220
- this.r = channels[0];
221
- this.g = channels[1];
222
- this.b = channels[2];
223
- this.ok = true;
224
- }
225
-
226
- }
227
-
228
- // validate/cleanup values
229
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
230
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
231
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
232
-
233
- // some getters
234
- this.toRGB = function () {
235
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
236
- }
237
- this.toHex = function () {
238
- var r = this.r.toString(16);
239
- var g = this.g.toString(16);
240
- var b = this.b.toString(16);
241
- if (r.length == 1) r = '0' + r;
242
- if (g.length == 1) g = '0' + g;
243
- if (b.length == 1) b = '0' + b;
244
- return '#' + r + g + b;
245
- }
246
-
247
- // help
248
- this.getHelpXML = function () {
249
-
250
- var examples = new Array();
251
- // add regexps
252
- for (var i = 0; i < color_defs.length; i++) {
253
- var example = color_defs[i].example;
254
- for (var j = 0; j < example.length; j++) {
255
- examples[examples.length] = example[j];
256
- }
257
- }
258
- // add type-in colors
259
- for (var sc in simple_colors) {
260
- examples[examples.length] = sc;
261
- }
262
-
263
- var xml = document.createElement('ul');
264
- xml.setAttribute('id', 'rgbcolor-examples');
265
- for (var i = 0; i < examples.length; i++) {
266
- try {
267
- var list_item = document.createElement('li');
268
- var list_color = new RGBColor(examples[i]);
269
- var example_div = document.createElement('div');
270
- example_div.style.cssText =
271
- 'margin: 3px; '
272
- + 'border: 1px solid black; '
273
- + 'background:' + list_color.toHex() + '; '
274
- + 'color:' + list_color.toHex()
275
- ;
276
- example_div.appendChild(document.createTextNode('test'));
277
- var list_item_value = document.createTextNode(
278
- ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
279
- );
280
- list_item.appendChild(example_div);
281
- list_item.appendChild(list_item_value);
282
- xml.appendChild(list_item);
283
-
284
- } catch(e){}
285
- }
286
- return xml;
287
-
288
- }
289
-
290
- }
291
-
292
- // export as AMD...
293
- if ( typeof define !== 'undefined' && define.amd ) {
294
- define( function () { return RGBColor; });
295
- }
296
-
297
- // ...or as browserify
298
- else if ( typeof module !== 'undefined' && module.exports ) {
299
- module.exports = RGBColor;
300
- }
301
-
302
- global.RGBColor = RGBColor;
303
-
304
  }( typeof window !== 'undefined' ? window : this ));
1
+ /**
2
+ * A class to parse color values
3
+ * @author Stoyan Stefanov <sstoo@gmail.com>
4
+ * @link http://www.phpied.com/rgb-color-parser-in-javascript/
5
+ * @license Use it if you like it
6
+ */
7
+
8
+ (function ( global ) {
9
+
10
+ function RGBColor(color_string)
11
+ {
12
+ this.ok = false;
13
+
14
+ // strip any leading #
15
+ if (color_string.charAt(0) == '#') { // remove # if any
16
+ color_string = color_string.substr(1,6);
17
+ }
18
+
19
+ color_string = color_string.replace(/ /g,'');
20
+ color_string = color_string.toLowerCase();
21
+
22
+ // before getting into regexps, try simple matches
23
+ // and overwrite the input
24
+ var simple_colors = {
25
+ aliceblue: 'f0f8ff',
26
+ antiquewhite: 'faebd7',
27
+ aqua: '00ffff',
28
+ aquamarine: '7fffd4',
29
+ azure: 'f0ffff',
30
+ beige: 'f5f5dc',
31
+ bisque: 'ffe4c4',
32
+ black: '000000',
33
+ blanchedalmond: 'ffebcd',
34
+ blue: '0000ff',
35
+ blueviolet: '8a2be2',
36
+ brown: 'a52a2a',
37
+ burlywood: 'deb887',
38
+ cadetblue: '5f9ea0',
39
+ chartreuse: '7fff00',
40
+ chocolate: 'd2691e',
41
+ coral: 'ff7f50',
42
+ cornflowerblue: '6495ed',
43
+ cornsilk: 'fff8dc',
44
+ crimson: 'dc143c',
45
+ cyan: '00ffff',
46
+ darkblue: '00008b',
47
+ darkcyan: '008b8b',
48
+ darkgoldenrod: 'b8860b',
49
+ darkgray: 'a9a9a9',
50
+ darkgreen: '006400',
51
+ darkkhaki: 'bdb76b',
52
+ darkmagenta: '8b008b',
53
+ darkolivegreen: '556b2f',
54
+ darkorange: 'ff8c00',
55
+ darkorchid: '9932cc',
56
+ darkred: '8b0000',
57
+ darksalmon: 'e9967a',
58
+ darkseagreen: '8fbc8f',
59
+ darkslateblue: '483d8b',
60
+ darkslategray: '2f4f4f',
61
+ darkturquoise: '00ced1',
62
+ darkviolet: '9400d3',
63
+ deeppink: 'ff1493',
64
+ deepskyblue: '00bfff',
65
+ dimgray: '696969',
66
+ dodgerblue: '1e90ff',
67
+ feldspar: 'd19275',
68
+ firebrick: 'b22222',
69
+ floralwhite: 'fffaf0',
70
+ forestgreen: '228b22',
71
+ fuchsia: 'ff00ff',
72
+ gainsboro: 'dcdcdc',
73
+ ghostwhite: 'f8f8ff',
74
+ gold: 'ffd700',
75
+ goldenrod: 'daa520',
76
+ gray: '808080',
77
+ green: '008000',
78
+ greenyellow: 'adff2f',
79
+ honeydew: 'f0fff0',
80
+ hotpink: 'ff69b4',
81
+ indianred : 'cd5c5c',
82
+ indigo : '4b0082',
83
+ ivory: 'fffff0',
84
+ khaki: 'f0e68c',
85
+ lavender: 'e6e6fa',
86
+ lavenderblush: 'fff0f5',
87
+ lawngreen: '7cfc00',
88
+ lemonchiffon: 'fffacd',
89
+ lightblue: 'add8e6',
90
+ lightcoral: 'f08080',
91
+ lightcyan: 'e0ffff',
92
+ lightgoldenrodyellow: 'fafad2',
93
+ lightgrey: 'd3d3d3',
94
+ lightgreen: '90ee90',
95
+ lightpink: 'ffb6c1',
96
+ lightsalmon: 'ffa07a',
97
+ lightseagreen: '20b2aa',
98
+ lightskyblue: '87cefa',
99
+ lightslateblue: '8470ff',
100
+ lightslategray: '778899',
101
+ lightsteelblue: 'b0c4de',
102
+ lightyellow: 'ffffe0',
103
+ lime: '00ff00',
104
+ limegreen: '32cd32',
105
+ linen: 'faf0e6',
106
+ magenta: 'ff00ff',
107
+ maroon: '800000',
108
+ mediumaquamarine: '66cdaa',
109
+ mediumblue: '0000cd',
110
+ mediumorchid: 'ba55d3',
111
+ mediumpurple: '9370d8',
112
+ mediumseagreen: '3cb371',
113
+ mediumslateblue: '7b68ee',
114
+ mediumspringgreen: '00fa9a',
115
+ mediumturquoise: '48d1cc',
116
+ mediumvioletred: 'c71585',
117
+ midnightblue: '191970',
118
+ mintcream: 'f5fffa',
119
+ mistyrose: 'ffe4e1',
120
+ moccasin: 'ffe4b5',
121
+ navajowhite: 'ffdead',
122
+ navy: '000080',
123
+ oldlace: 'fdf5e6',
124
+ olive: '808000',
125
+ olivedrab: '6b8e23',
126
+ orange: 'ffa500',
127
+ orangered: 'ff4500',
128
+ orchid: 'da70d6',
129
+ palegoldenrod: 'eee8aa',
130
+ palegreen: '98fb98',
131
+ paleturquoise: 'afeeee',
132
+ palevioletred: 'd87093',
133
+ papayawhip: 'ffefd5',
134
+ peachpuff: 'ffdab9',
135
+ peru: 'cd853f',
136
+ pink: 'ffc0cb',
137
+ plum: 'dda0dd',
138
+ powderblue: 'b0e0e6',
139
+ purple: '800080',
140
+ red: 'ff0000',
141
+ rosybrown: 'bc8f8f',
142
+ royalblue: '4169e1',
143
+ saddlebrown: '8b4513',
144
+ salmon: 'fa8072',
145
+ sandybrown: 'f4a460',
146
+ seagreen: '2e8b57',
147
+ seashell: 'fff5ee',
148
+ sienna: 'a0522d',
149
+ silver: 'c0c0c0',
150
+ skyblue: '87ceeb',
151
+ slateblue: '6a5acd',
152
+ slategray: '708090',
153
+ snow: 'fffafa',
154
+ springgreen: '00ff7f',
155
+ steelblue: '4682b4',
156
+ tan: 'd2b48c',
157
+ teal: '008080',
158
+ thistle: 'd8bfd8',
159
+ tomato: 'ff6347',
160
+ turquoise: '40e0d0',
161
+ violet: 'ee82ee',
162
+ violetred: 'd02090',
163
+ wheat: 'f5deb3',
164
+ white: 'ffffff',
165
+ whitesmoke: 'f5f5f5',
166
+ yellow: 'ffff00',
167
+ yellowgreen: '9acd32'
168
+ };
169
+ for (var key in simple_colors) {
170
+ if (color_string == key) {
171
+ color_string = simple_colors[key];
172
+ }
173
+ }
174
+ // emd of simple type-in colors
175
+
176
+ // array of color definition objects
177
+ var color_defs = [
178
+ {
179
+ re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
180
+ example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
181
+ process: function (bits){
182
+ return [
183
+ parseInt(bits[1]),
184
+ parseInt(bits[2]),
185
+ parseInt(bits[3])
186
+ ];
187
+ }
188
+ },
189
+ {
190
+ re: /^(\w{2})(\w{2})(\w{2})$/,
191
+ example: ['#00ff00', '336699'],
192
+ process: function (bits){
193
+ return [
194
+ parseInt(bits[1], 16),
195
+ parseInt(bits[2], 16),
196
+ parseInt(bits[3], 16)
197
+ ];
198
+ }
199
+ },
200
+ {
201
+ re: /^(\w{1})(\w{1})(\w{1})$/,
202
+ example: ['#fb0', 'f0f'],
203
+ process: function (bits){
204
+ return [
205
+ parseInt(bits[1] + bits[1], 16),
206
+ parseInt(bits[2] + bits[2], 16),
207
+ parseInt(bits[3] + bits[3], 16)
208
+ ];
209
+ }
210
+ }
211
+ ];
212
+
213
+ // search through the definitions to find a match
214
+ for (var i = 0; i < color_defs.length; i++) {
215
+ var re = color_defs[i].re;
216
+ var processor = color_defs[i].process;
217
+ var bits = re.exec(color_string);
218
+ if (bits) {
219
+ channels = processor(bits);
220
+ this.r = channels[0];
221
+ this.g = channels[1];
222
+ this.b = channels[2];
223
+ this.ok = true;
224
+ }
225
+
226
+ }
227
+
228
+ // validate/cleanup values
229
+ this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
230
+ this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
231
+ this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
232
+
233
+ // some getters
234
+ this.toRGB = function () {
235
+ return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
236
+ }
237
+ this.toHex = function () {
238
+ var r = this.r.toString(16);
239
+ var g = this.g.toString(16);
240
+ var b = this.b.toString(16);
241
+ if (r.length == 1) r = '0' + r;
242
+ if (g.length == 1) g = '0' + g;
243
+ if (b.length == 1) b = '0' + b;
244
+ return '#' + r + g + b;
245
+ }
246
+
247
+ // help
248
+ this.getHelpXML = function () {
249
+
250
+ var examples = new Array();
251
+ // add regexps
252
+ for (var i = 0; i < color_defs.length; i++) {
253
+ var example = color_defs[i].example;
254
+ for (var j = 0; j < example.length; j++) {
255
+ examples[examples.length] = example[j];
256
+ }
257
+ }
258
+ // add type-in colors
259
+ for (var sc in simple_colors) {
260
+ examples[examples.length] = sc;
261
+ }
262
+
263
+ var xml = document.createElement('ul');
264
+ xml.setAttribute('id', 'rgbcolor-examples');
265
+ for (var i = 0; i < examples.length; i++) {
266
+ try {
267
+ var list_item = document.createElement('li');
268
+ var list_color = new RGBColor(examples[i]);
269
+ var example_div = document.createElement('div');
270
+ example_div.style.cssText =
271
+ 'margin: 3px; '
272
+ + 'border: 1px solid black; '
273
+ + 'background:' + list_color.toHex() + '; '
274
+ + 'color:' + list_color.toHex()
275
+ ;
276
+ example_div.appendChild(document.createTextNode('test'));
277
+ var list_item_value = document.createTextNode(
278
+ ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
279
+ );
280
+ list_item.appendChild(example_div);
281
+ list_item.appendChild(list_item_value);
282
+ xml.appendChild(list_item);
283
+
284
+ } catch(e){}
285
+ }
286
+ return xml;
287
+
288
+ }
289
+
290
+ }
291
+
292
+ // export as AMD...
293
+ if ( typeof define !== 'undefined' && define.amd ) {
294
+ define( function () { return RGBColor; });
295
+ }
296
+
297
+ // ...or as browserify
298
+ else if ( typeof module !== 'undefined' && module.exports ) {
299
+ module.exports = RGBColor;
300
+ }
301
+
302
+ global.RGBColor = RGBColor;
303
+
304
  }( typeof window !== 'undefined' ? window : this ));
include/gawd_csv_file.php CHANGED
@@ -432,7 +432,7 @@ class GAWD_CSV_FILE extends GAWD_FILE {
432
  private function get_columns() {
433
  $dimension = isset($_REQUEST["dimension"]) ? sanitize_text_field($_REQUEST["dimension"]) : 'Date';
434
  $columns = array($this->column_names);
435
- $_REQUEST['gawd_dimension'] = isset($_REQUEST['gawd_dimension']) ? $_REQUEST['gawd_dimension'] : $dimension;
436
  if($_REQUEST['gawd_dimension'] == "Session Duration Bucket"){
437
  $_data = array();
438
  //$j = 1;
@@ -498,7 +498,7 @@ class GAWD_CSV_FILE extends GAWD_FILE {
498
  $val = $val;
499
  }
500
  else{
501
- if($cols != preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $_REQUEST['gawd_dimension']))))){
502
  $percentage_of_total = isset($this->data_sum[$cols]) ? $this->data_sum[$cols] != '0' ? floatval($val)/$this->data_sum[$cols]*100 : 0 : '';
503
  if($percentage_of_total != ''){
504
  $percentage_of_total = number_format(floatval($percentage_of_total),2, '.', ',');
@@ -516,7 +516,7 @@ class GAWD_CSV_FILE extends GAWD_FILE {
516
  $row = array();
517
  foreach ($this->column_names as $cols) {
518
  $cols = preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $cols))));
519
- if($cols == 'No' || $cols == $dimension || $cols == preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $_REQUEST['gawd_dimension']))))){
520
  $row[] = ' ';
521
  }
522
  else{
432
  private function get_columns() {
433
  $dimension = isset($_REQUEST["dimension"]) ? sanitize_text_field($_REQUEST["dimension"]) : 'Date';
434
  $columns = array($this->column_names);
435
+ $_REQUEST['gawd_dimension'] = isset($_REQUEST['gawd_dimension']) ? sanitize_text_field($_REQUEST['gawd_dimension']) : $dimension;
436
  if($_REQUEST['gawd_dimension'] == "Session Duration Bucket"){
437
  $_data = array();
438
  //$j = 1;
498
  $val = $val;
499
  }
500
  else{
501
+ if($cols != preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', sanitize_text_field($_REQUEST['gawd_dimension'])))))){
502
  $percentage_of_total = isset($this->data_sum[$cols]) ? $this->data_sum[$cols] != '0' ? floatval($val)/$this->data_sum[$cols]*100 : 0 : '';
503
  if($percentage_of_total != ''){
504
  $percentage_of_total = number_format(floatval($percentage_of_total),2, '.', ',');
516
  $row = array();
517
  foreach ($this->column_names as $cols) {
518
  $cols = preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $cols))));
519
+ if($cols == 'No' || $cols == $dimension || $cols == preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', sanitize_text_field($_REQUEST['gawd_dimension'])))))){
520
  $row[] = ' ';
521
  }
522
  else{
include/gawd_file.php CHANGED
@@ -76,9 +76,9 @@ abstract class GAWD_FILE {
76
  public function get_request_data($obj,$ajax = true, $email_data = null, $dimension_recc = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null) {
77
  $gawd_user_data = get_option('gawd_user_data');
78
  $this->site_title = $gawd_user_data['web_property_name'];
79
- $this->img = isset($_REQUEST["img"]) && $_REQUEST["img"] != '' ? $_REQUEST["img"] : '';
80
- $this->start_date = isset($_REQUEST["gawd_start_date"]) && $_REQUEST["gawd_start_date"] != '' ? $_REQUEST["gawd_start_date"] : date('Y-m-d', strtotime('-7 days'));
81
- $this->end_date = isset($_REQUEST["gawd_end_date"]) && $_REQUEST["gawd_end_date"] != '' ? $_REQUEST["gawd_end_date"] : date('Y-m-d', strtotime('-1 days'));
82
  if(isset($_REQUEST["gawd_metric"])){
83
  $metric = sanitize_text_field($_REQUEST["gawd_metric"]);
84
  }
@@ -92,7 +92,7 @@ abstract class GAWD_FILE {
92
  }
93
  $this->set_metric($metric);
94
  $this->country_filter = isset($_REQUEST["country_filter"]) ? sanitize_text_field($_REQUEST["country_filter"]) : '';
95
- $this->custom = isset( $_REQUEST["custom"] ) && $_REQUEST["custom"] != '' ? $_REQUEST["custom"] : '';
96
 
97
  $this->geo_type = isset($_REQUEST["geo_type"]) ? sanitize_text_field($_REQUEST["geo_type"]) : '';
98
  if(isset($_REQUEST["gawd_metric_compare"])){
@@ -118,7 +118,7 @@ abstract class GAWD_FILE {
118
  $this->second_end_date = isset($_REQUEST["second_end_date"]) ? sanitize_text_field($_REQUEST["second_end_date"]) : '';
119
  /////END COMPARED PAGES VARIABLES////
120
 
121
- $this->_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
122
 
123
  if(isset($_REQUEST["gawd_dimension"]) && $dimension_recc == null){
124
  $dimension = sanitize_text_field($_REQUEST["gawd_dimension"]);
@@ -144,7 +144,7 @@ abstract class GAWD_FILE {
144
  if($this->tab_name == 'goals'){
145
  $dimension_arg = $this->tab_name;
146
  }
147
- $this->filter_type = isset($_REQUEST["filter_type"]) && sanitize_text_field($_REQUEST["filter_type"]) != '' ? $_REQUEST["filter_type"] : 'Date';
148
  $this->set_colum_names($dimension);
149
  $this->dimension = ($this->filter_type != 'Date') ? $this->filter_type : $dimension;
150
  if(strpos($this->dimension,'dimension') >-1){
76
  public function get_request_data($obj,$ajax = true, $email_data = null, $dimension_recc = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null) {
77
  $gawd_user_data = get_option('gawd_user_data');
78
  $this->site_title = $gawd_user_data['web_property_name'];
79
+ $this->img = isset($_REQUEST["img"]) && $_REQUEST["img"] != '' ? sanitize_text_field($_REQUEST["img"]) : '';
80
+ $this->start_date = isset($_REQUEST["gawd_start_date"]) && $_REQUEST["gawd_start_date"] != '' ? sanitize_text_field($_REQUEST["gawd_start_date"]) : date('Y-m-d', strtotime('-7 days'));
81
+ $this->end_date = isset($_REQUEST["gawd_end_date"]) && $_REQUEST["gawd_end_date"] != '' ? sanitize_text_field($_REQUEST["gawd_end_date"]) : date('Y-m-d', strtotime('-1 days'));
82
  if(isset($_REQUEST["gawd_metric"])){
83
  $metric = sanitize_text_field($_REQUEST["gawd_metric"]);
84
  }
92
  }
93
  $this->set_metric($metric);
94
  $this->country_filter = isset($_REQUEST["country_filter"]) ? sanitize_text_field($_REQUEST["country_filter"]) : '';
95
+ $this->custom = isset( $_REQUEST["custom"] ) && $_REQUEST["custom"] != '' ? sanitize_text_field($_REQUEST["custom"]) : '';
96
 
97
  $this->geo_type = isset($_REQUEST["geo_type"]) ? sanitize_text_field($_REQUEST["geo_type"]) : '';
98
  if(isset($_REQUEST["gawd_metric_compare"])){
118
  $this->second_end_date = isset($_REQUEST["second_end_date"]) ? sanitize_text_field($_REQUEST["second_end_date"]) : '';
119
  /////END COMPARED PAGES VARIABLES////
120
 
121
+ $this->_data_compare = isset($_REQUEST["_data_compare"]) ? sanitize_text_field($_REQUEST["_data_compare"]) : '';
122
 
123
  if(isset($_REQUEST["gawd_dimension"]) && $dimension_recc == null){
124
  $dimension = sanitize_text_field($_REQUEST["gawd_dimension"]);
144
  if($this->tab_name == 'goals'){
145
  $dimension_arg = $this->tab_name;
146
  }
147
+ $this->filter_type = isset($_REQUEST["filter_type"]) && $_REQUEST["filter_type"] != '' ? sanitize_text_field($_REQUEST["filter_type"]) : 'Date';
148
  $this->set_colum_names($dimension);
149
  $this->dimension = ($this->filter_type != 'Date') ? $this->filter_type : $dimension;
150
  if(strpos($this->dimension,'dimension') >-1){
include/gawd_pdf_file.php CHANGED
@@ -125,7 +125,7 @@ return;//todo
125
  }
126
  $dimension = isset($_REQUEST["dimension"]) ? sanitize_text_field($_REQUEST["dimension"]) : 'Date';
127
  if($flag === true){
128
- $_REQUEST['gawd_dimension'] = isset($_REQUEST['gawd_dimension']) ? preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $_REQUEST['gawd_dimension'])))) : $dimension;
129
  $count = count($this->column_names) - 1;
130
  if($dimension == 'pagePath'){
131
  $count = 9.5;
125
  }
126
  $dimension = isset($_REQUEST["dimension"]) ? sanitize_text_field($_REQUEST["dimension"]) : 'Date';
127
  if($flag === true){
128
+ $_REQUEST['gawd_dimension'] = isset($_REQUEST['gawd_dimension']) ? preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', sanitize_text_field($_REQUEST['gawd_dimension']))))) : $dimension;
129
  $count = count($this->column_names) - 1;
130
  if($dimension == 'pagePath'){
131
  $count = 9.5;
library/gawd-custom-ajax-class.php CHANGED
@@ -996,11 +996,11 @@ class GAWD_custom_ajax_class {
996
 
997
 
998
  private function parse_data(){
999
- $this->action = (!empty($_REQUEST['gawd_action'])) ? $_REQUEST['gawd_action'] : "";
1000
- $this->request_data = (!empty($_REQUEST['gawd_data'])) ? $_REQUEST['gawd_data'] : array();
1001
- $this->nonce_data = (!empty($_REQUEST['gawd_nonce_data'])) ? $_REQUEST['gawd_nonce_data'] : array();
1002
  if(isset($_REQUEST['gawd_view_id'])){
1003
- $this->view_id = $_REQUEST['gawd_view_id'];
1004
  }
1005
  }
1006
 
@@ -1063,7 +1063,7 @@ class GAWD_custom_ajax_class {
1063
  ) ||
1064
  (
1065
  isset($_REQUEST['gawd_cron_token']) &&
1066
- GAWD_helper::check_cron_token($_REQUEST['gawd_cron_token'])
1067
  )
1068
  ) {
1069
  return true;
996
 
997
 
998
  private function parse_data(){
999
+ $this->action = (!empty($_REQUEST['gawd_action'])) ? sanitize_text_field($_REQUEST['gawd_action']) : "";
1000
+ $this->request_data = (!empty($_REQUEST['gawd_data'])) ? GAWD_helper::validate_string('gawd_data', array()) : array();
1001
+ $this->nonce_data = (!empty($_REQUEST['gawd_nonce_data'])) ? GAWD_helper::validate_string('gawd_nonce_data', array()) : array();
1002
  if(isset($_REQUEST['gawd_view_id'])){
1003
+ $this->view_id = GAWD_helper::validate_string($_REQUEST['gawd_view_id']);
1004
  }
1005
  }
1006
 
1063
  ) ||
1064
  (
1065
  isset($_REQUEST['gawd_cron_token']) &&
1066
+ GAWD_helper::check_cron_token(sanitize_text_field($_REQUEST['gawd_cron_token']))
1067
  )
1068
  ) {
1069
  return true;
library/gawd-email-class.php CHANGED
@@ -39,8 +39,8 @@ class GAWD_email {
39
  return false;
40
  }
41
 
42
- $this->email_to = $_POST['email_info']['email_to'];
43
- $this->email_from = (isset($_POST['email_info']['email_from'])) ? $_POST['email_info']['email_from'] : get_option('admin_email');
44
 
45
  if(empty($this->email_from)) {
46
  $this->set_error('no_email_from', 'No email');
@@ -48,15 +48,19 @@ class GAWD_email {
48
  }
49
 
50
 
51
- $this->period = (isset($_POST['email_info']['period'])) ? $_POST['email_info']['period'] : "once";
52
- $this->subject = (isset($_POST['email_info']['subject'])) ? $_POST['email_info']['subject'] : "";
53
- $this->content = (isset($_POST['email_info']['content'])) ? $_POST['email_info']['content'] : "";
54
- $this->week_day = (isset($_POST['email_info']['week_day'])) ? $_POST['email_info']['week_day'] : "";
55
- $this->month_day = (isset($_POST['email_info']['month_day'])) ? $_POST['email_info']['month_day'] : "1";
56
- $this->time = (isset($_POST['email_info']['email_time'])) ? $_POST['email_info']['email_time'] : "00:00";
57
- $this->view_id = (isset($_POST['email_info']['view_id'])) ? $_POST['email_info']['view_id'] : "";
58
- $this->other_info = (isset($_POST['email_info']['other_info'])) ? $_POST['email_info']['other_info'] : array();
59
 
 
 
 
 
 
60
 
61
  return true;
62
  }
39
  return false;
40
  }
41
 
42
+ $this->email_to = sanitize_text_field($_POST['email_info']['email_to']);
43
+ $this->email_from = (isset($_POST['email_info']['email_from'])) ? sanitize_text_field($_POST['email_info']['email_from']) : get_option('admin_email');
44
 
45
  if(empty($this->email_from)) {
46
  $this->set_error('no_email_from', 'No email');
48
  }
49
 
50
 
51
+ $this->period = (isset($_POST['email_info']['period'])) ? sanitize_text_field($_POST['email_info']['period']) : "once";
52
+ $this->subject = (isset($_POST['email_info']['subject'])) ? sanitize_text_field($_POST['email_info']['subject']) : "";
53
+ $this->content = (isset($_POST['email_info']['content'])) ? sanitize_text_field($_POST['email_info']['content']) : "";
54
+ $this->week_day = (isset($_POST['email_info']['week_day'])) ? sanitize_text_field($_POST['email_info']['week_day']) : "";
55
+ $this->month_day = (isset($_POST['email_info']['month_day'])) ? sanitize_text_field($_POST['email_info']['month_day']) : "1";
56
+ $this->time = (isset($_POST['email_info']['email_time'])) ? sanitize_text_field($_POST['email_info']['email_time']) : "00:00";
57
+ $this->view_id = (isset($_POST['email_info']['view_id'])) ? sanitize_text_field($_POST['email_info']['view_id']) : "";
 
58
 
59
+ if(isset($_POST['email_info']) && isset($_POST['email_info']['other_info'])){
60
+ $this->other_info = GAWD_helper::validate_string_array($_POST['email_info']['other_info']);
61
+ }else{
62
+ $this->other_info = array();
63
+ }
64
 
65
  return true;
66
  }
library/gawd-helper-class.php CHANGED
@@ -583,4 +583,43 @@ class GAWD_helper {
583
  </div>
584
  <?php }
585
 
586
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
  </div>
584
  <?php }
585
 
586
+ public static function validate_string($key , $default=""){
587
+ if (isset($_GET[$key])) {
588
+ $data = $_GET[$key];
589
+ }
590
+ elseif (isset($_POST[$key])) {
591
+ $data = $_POST[$key];
592
+ }
593
+ elseif (isset($_REQUEST[$key])) {
594
+ $data = $_REQUEST[$key];
595
+ }
596
+ else {
597
+ $data = $default;
598
+ }
599
+ if(is_array($data)){
600
+ $arr_data = array_map(array('GAWD_helper','tw_sanitize_text'), $data );
601
+ return $arr_data;
602
+ }
603
+ $return_data = sanitize_text_field($data);
604
+ return $return_data;
605
+ }
606
+
607
+ public function tw_sanitize_text($val){
608
+ if(is_array($val)){
609
+ return self::validate_string_array($val);
610
+ }
611
+ return sanitize_text_field($val);
612
+ }
613
+
614
+
615
+ public static function validate_string_array($data){
616
+ if(is_array($data)){
617
+ $arr_data = array_map(array("GAWD_helper", "tw_sanitize_text"), $data );
618
+ return $arr_data;
619
+ }
620
+ $return_data = sanitize_text_field($data);
621
+ return $return_data;
622
+ }
623
+
624
+ }
625
+
readme.txt CHANGED
@@ -1,404 +1,24 @@
1
- === Google Analytics by 10Web - user-friendly Google Analytics integration plugin ===
2
- Contributors: webdorado,10web
3
- Tags: google analytics, statistics, tracking, analytics dashboard, ga, google analytics dashboard, analytics, stats, googleanalytics, ecommerce tracking, custom reports, custom dimensions
4
  Requires at least: 3.9
5
- Tested up to: 5.2
6
- Stable tag: 1.2.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- View and customize all Google Analytics reports directly in your WordPress dashboard.
11
 
12
  == Description ==
13
 
14
- View and customize all Google Analytics reports directly in your WordPress dashboard.
15
  = Useful Links: =
16
 
17
  [Live Demo](https://admindemo.10web.io/?product_name=google-analytics)
18
 
19
 
20
- [Premium Google Analytics by 10Web](https://10web.io/plugins/wordpress-google-analytics/)
21
 
22
 
23
  [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
24
 
25
  https://www.youtube.com/watch?v=n1f7ECVFNPI
26
-
27
- Having a hard time customizing Google Analytics reports?
28
-
29
- Need metrics that you can’t find in Google Analytics?
30
-
31
- Are you tired of going to different websites for website management and stats overview?
32
-
33
-
34
-
35
- == Google Analytics by 10Web Features ==
36
-
37
- **Get All Reports from Google Analytics**
38
- All types of reports are available in your WordPress dashboard.
39
-
40
- **Display Reports on Front-End**
41
- Get key stats about posts displayed right on the page.
42
-
43
- **Get E-Commerce Reports\***
44
- See how conversions work and how much you earn online.
45
-
46
- **Manage Goals**
47
- Set goals on your WordPress dashboard and constantly manage them.
48
-
49
- **Integrate Google Ads & AdSense**
50
- Get data about ads on your website in the same dashboard.
51
-
52
- **Customize Reports**
53
- Select the metrics you want to see and choose how you want them displayed.
54
-
55
- **Setup WordPress Dimensions\***
56
- Add Tags, Use Types, Post Types, Categories, and Publication Date as custom dimensions.
57
-
58
- **Receive Notifications and Alerts**
59
- Get alerts and pushover notifications when selected metrics reach their highest or lowest points.
60
-
61
- **Export in CSV and Send Emails**
62
- Share reports via automated email and export them in CSV.
63
-
64
- **Filter Tracked Data\***
65
- Exclude certain user types, locations or IP addresses with custom tracking codes.
66
-
67
- _\* Premium version only_
68
-
69
-
70
- == Outstanding Customer Care ==
71
- * Rapid response
72
- We won’t make you wait more than a few hours.
73
-
74
- * Quick issue resolution
75
- We’ll resolve your issue within 24 hours.
76
-
77
-
78
- == Customize Your Analytics ==
79
- 1. Buy Google Analytics Plugin
80
- 2. Login with your Google Account
81
- 3. Track your traffic
82
-
83
- > **[Premium features](https://10web.io/plugins/wordpress-google-analytics/)**
84
- >
85
- > * Permissions for users/roles
86
- > * Custom metrics and reports
87
- > * E-commerce reports
88
- > * Reports on Google AdWords and AdSense
89
- > * Tracking filters for users/roles
90
- > * Alerts
91
- > * Priority support and updates
92
-
93
-
94
-
95
- ## SETTINGS/CUSTOMIZATION
96
-
97
- _*Some customizations described here are available in Premium version. Please refer to premium features below._
98
-
99
- The plugin adds the Google Analytics tracking code to your website and brings all your site stats into your dashboard.The plugin has a user friendly admin section, where you can configure tracking options, view the preset and custom configured reports, set tracking filters and exclusions, and configure the plugin settings. The reporting section of the plugin provides an extensive data information about pretty much any activity taking place on your website. You can customise Analytics options under the settings tab of the plugin. Here you can configure alerts and the Pushover notifications by setting alert conditions and choosing the period for receiving alerts. From the same section you can set tracking filters by country, region, city or IP address. Data from these sources will be filtered out from the reports.
100
-
101
- For more advanced users, there are advanced setting options, to enable cross domain tracking,enable frontend/backend reports for posts and pages, choose roles for viewing frontend reports, and many more.
102
-
103
- Under the goals management tab you can set and configure different goal types,and track targeted activities.To configure custom reports you’ll need to choose the metric and the dimension you want to get a report for. It will appear under the reports section shortly.
104
- There are many more features in the plugin that can help you dive deep into the statistics, monitor your site’s performance and actually improve it. To learn more, check out the plugin’s user guide.
105
-
106
- = Privacy Notices =
107
-
108
- Google Analytics by 10Web plugin adds GA JS code to the site (optionally) and is used to get GA reports from admin area. It sends analytics data to Google. Whether it will send any personal data to Google, depends on how you set up your website. For example, do not expose emails or other personally identifiable information to Google via URLs. Do not send form submissions via analytics to Google. By default, all the IPs of visitors are anonymized. Personal data processing by Google is explained in their privacy policy https://policies.google.com/privacy. The plugin retrieves from Google and caches data of your GA account and analytics reports in WordPress site database to provide optimization. Reports data is stored in DB for some small period of time (less than 24h). Your GA account data is preserved in your website database as long as you decide to keep it. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
109
-
110
- == Frequently Asked Questions ==
111
-
112
- = How can I connect the plugin to my Google Analytics account? =
113
-
114
- Click on Analytics menu item, which will start Google Analytics account authorization process. Click Authenticate button and login to your Google account.
115
-
116
- A window asking for relevant permissions will appear. Click Allow and copy the authentication code from the text input. You will be redirected to plugin’s Tracking page.
117
-
118
- Here you can add a web property on your Analytics account using current WordPress website. Provide a Name for the property and click Add. You can check and manage web properties from your Analytics account, Admin page.
119
-
120
- Alternatively, you can click Later and configure the web property any other time.
121
-
122
- You can Reauthenticate in Settings section anytime in case you need to use a different Google account to monitor Analytics tracking.
123
-
124
-
125
- = What reports can I see in the plugin? =
126
-
127
- The plugin enables you to view various analytics reports from your WordPress dashboard, including the following:
128
- Audience. Report of your website audience. Provides details about new and returning users of your website, sessions, bounces, pageviews, page/sessions and session durations.
129
- Real Time. Shows the number of active users visiting your website pages at that second.
130
- Demographics. Displays tracking statistics of your website users based on their age and gender.
131
- Interests. Provides tracking information about site users depending on Affinity Categories (e.g. Music Lovers or Mobile Enthusiasts), In-Market Segments (based on online product purchase interests) and Other Categories (most specific identification, for example, tennis lovers among Sports Fans).
132
- Geo. Geo-identifier report is built from interactions of location (countries, cities) and language of your website users.
133
- Behavior. Compares number of New visitors and Returning users of your website in percents. You can check the duration of sessions with Engagement report.
134
- Technology. Identifies tracking of the site based on operating systems and browsers visitors use.
135
- Mobile. Shows statistics of mobile and desktop devices visitors have used while interacting with your website.
136
- Custom Dimensions. Reports of Custom Dimensions you have added will be displayed under this tab. Step-by-step guide for the setup is in Custom Dimensions section of this guide.
137
- Traffic Source. Displays overall graph of traffic sources directing to your website.
138
- AdWords. If your website is registered on Google AdWords, you can link its Analytics to AdWords, and gather relevant tracking information with this report.
139
- Pages. Pages report table will provide you information about Bounces, Entrances, Pageviews, Unique Pageviews, time spent on pages, Exits and Average page loading time.
140
- Site Speed. Shows the average load time of your website during specified date range.
141
- Events. Displays the report based on Events you set up on Analytics of your website. Graphs are built based on Event Labels, Categories and Actions.
142
- Goals. Set Goals from Goal Management and review their reports under this tab. Instructions to set up goals will be provided in Goal Management section of this guide.
143
- Ecommerce. Check sales statistics of your website by revenues, transactions, products and performance.
144
- AdSense. Link your Analytics and AdSense accounts from Admin settings and keep track of AdSense tracking under this report.
145
- Custom Reports. Add Custom Reports from any metric and dimension in Custom Reports page, and view relevant tracking information in this tab.
146
-
147
-
148
- = How can I add a custom report in the plugin? =
149
-
150
- Besides the built-in report types, the plugin also provides the functionality to configure Custom Reports and view related statistics within Reports page.
151
- Start with providing a Name for your Custom Report. Then select a Metric and Dimension, based on which the statistics will be built.
152
- For example, you can select Organic Searches as the metric and Keyword as the dimension. This custom setup will let you have a report based on the keywords, which visitors use to find your website with search engines.
153
- You can view and manage created Custom Reports on the same page. The list will appear with a table under options of Custom Reports.
154
-
155
- = Can I export the reports from the analytics plugin? =
156
-
157
- You can export current report to CSV and PDF formats. Hover on Export button and click one of the options to download your analytics report.
158
- Moreover, the same report can be sent via email to one or more recipients which you specify. The mails can be sent one time, as well as periodically. Click the Email button to start the setup. A popup window will appear with the following options:
159
-
160
- From. This is the email address, from which the report will be sent. It is the address you defined for your Administrator account, and it can be changed from WordPress Settings > General > Email Address option.
161
- To. Determine the recipients of the report email by providing their email addresses separated by commas.
162
- Subject. Write a subject for the email. It is set to the report title by default, but you can modify it and have a customized title.
163
- Attachment. Pick the type of the attachment for your report. It can be sent as a CSV or a PDF file.
164
- Frequency. Set the frequency for sending out report emails. The following options are available:
165
- Once. The report is sent only one time.
166
- Daily. The email is sent each day.
167
- Weekly. Chose this option to send the report every week. Make sure to set the day of the week, when the email will be sent.
168
- Monthly. Set the reports to be sent every month. Select the day of the month, when the email will be sent.
169
- Additional Message. You can add any e-mail content to go along with your Analytics report.
170
- The scheduled e-mails can be deleted from Settings > Emails page of the plugin.
171
-
172
-
173
- = Can I set goals in the plugin? =
174
-
175
- Goals in Google Analytics lets you track targeted activities, which users complete on your website. A completed activity is called conversion. You can set visiting a certain page as a goal, for example, or have users stay on your website a certain period of time. Other examples of goals can be checkout for a shopping site, and setting a certain number of pageviews per session.
176
- You can set and manage goals for your website tracking in Google Analytics by 10Web > Goal Management page. Note, that Goals configured with the plugin are set only to the domain on which the plugin is installed.
177
- Select the View that you’re going to track and configure the following options based on the type of goal you would like to set:
178
- Provide a Name for the goal and choose its Type from one of the following:
179
- Destination. Set a specific URL for the goal, for example, your ecommerce website shop page. When a user visits it, it will be counted as a goal conversion. You can set the destination using one of these conditions:
180
-
181
- * Equals to. Should be the exact URL of the page you are using to set the goal.
182
- * Begins with. Mentions the beginning of the tracked page link.
183
- * Regular expression. This option will search all the visited links with the specified Regular Expression. E.g., if you set it to "test", and users visit URLs which contain “test”, this will be considered as a conversion.
184
-
185
- Duration. Determine the time period, during which you need users to stay on your website to complete the goal. Goals of this type are controlled with less than and greater than conditions.
186
- Pages/Screens per session. Choose the number of page/screen views per session, and set the goal using less than and greater than conditions.
187
-
188
-
189
- = How can I link my AdSense and AdWords accounts to the plugin? =
190
-
191
- **AdSense**
192
-
193
- If you have an authorized account on Google AdSense, you can link it to Google Analytics and view its tracking information among plugin reports.
194
- Open your Google Analytics account, choose the account you want to link with AdSense and navigate to Admin tab. You will see AdSense Linking option under Product Linking settings. Open AdSense Linking and click on New AdSense Link button.
195
- Afterwards choose the necessary AdSense account you'd like to link with your Google Analytics, then click Continue. Choose the views, where you would like to have AdSense data. The accounts will be connected after clicking Enable Link and then Done.
196
-
197
- **AdWords**
198
-
199
- Firstly make sure you have a AdWords account, or create one here. Open your Google Analytics account, choose the website you are tracking and go to Admin. Click on Adwords Linking from Product Linking settings.
200
- After toolbox opens, make sure all the necessary AdWords accounts are marked as checked and click Continue. Provide Link group title and click Link Accounts after enabling necessary link groups for AdWords Tracking. Related tracking reports will appear on your Reports page automatically.
201
-
202
-
203
- == Changelog ==
204
-
205
- = 1.2.4 =
206
- * Changed: Links to 10Web.io.
207
-
208
- = 1.2.3 =
209
- * Added: Alerts functionality
210
- * Added: Emails functionality
211
- * Fixed: Exclude tracking for user
212
-
213
- = 1.2.2 =
214
- * Fixed: Use of deprecated function in PHP 7.2
215
- * Fixed: Notices in custom reports page
216
-
217
- = 1.2.1 =
218
- * Fixed: PHP error if PHP version < 5.5
219
-
220
- = 1.2.0 =
221
- * Improved: Plugin core functionality is rewritten. The plugin is faster and consumes less memory now.
222
- * Improved: Google API client library is used in non-conflicting way.
223
- * Improved: The size of the plugin is smaller now due to stripped version of Google library
224
- * Improved: Better UX: some menues of the plugin are hidden when plugin has not been configured properly.
225
- * Improved: UX when using custom client ID and secret
226
- * Improved: New UI of reports, charts and tables
227
- * Fixed: Security issues
228
- * Fixed: Compatibility issues with Yoast SEO and UpdraftPlus plugins
229
- * Fixed: Error notices if no web-property or multiple web-properties correspond to current site
230
- * Fixed: Reports for page/post and frontend templates in metaboxes, admin bar, admin list screens and widget
231
- * Fixed: User roles management
232
- * Fixed: PHP error in admin reports for ecommerce
233
- * Fixed: Numerous minor bugs
234
- * Changed: Tracking settings are moved to settings page, as a separate tab
235
- * Changed: Widgets options
236
- * Changed: Emails, alerts, pushover and export features are temporary disabled
237
-
238
- = 1.1.8 =
239
- * Changed: Changed: Introducing brand new free plugin: SEO by 10Web.
240
-
241
- = 1.1.7 =
242
- * Changed: Deactivation popup.
243
-
244
- = 1.1.6 =
245
- * Added: Links to Reviews and Support Forum
246
-
247
- = 1.1.5 =
248
- * Fixed: PHP 5.4.0 compatibility
249
-
250
-
251
- = 1.1.4 =
252
- * Fixed: Compatibility issues with Constant Contact Forms, Updraftplus, Image Optimizer WD, Backup WD and some other plugins
253
- * Fixed: JS errors on page/post editor
254
- * Fixed: Old user account data partially preserved after reauthorization and uninstall
255
-
256
- = 1.1.3 =
257
- * Fixed: Empty settings page when plugin has token but accounts data lost for some reason
258
- * Changed: Show notification to install Backup WD plugin only on plugin pages.
259
-
260
- = 1.1.2 =
261
- * Fixed: Conflict with some other plugins using Google API PHP library
262
- * Fixed: Unable to authorize again after logout
263
- * Fixed: JS errors on page/post editor if user not authenticated
264
- * Change: Introducing Backup WD plugin
265
-
266
- = 1.1.1 =
267
- * Fixed: Reports for pages/posts in metabox
268
- * Fixed: Multiple requests to Web-Dorado API for updates (Pro)
269
- * Fixed: Multiple requests to Google Analytics API for management accounts
270
- * Fixed: PHP 5.4.0 compatibility
271
- * Changed: WD library initialization
272
-
273
- = 1.1.0 =
274
- * Changed: Improved UX of authentication
275
- * Changed: Google API PHP Client library updated to the latest 2.2.0 version
276
- * Changed: WD library updated to version 1.0.10
277
- * Fixed: Fatal errors when WordPress could not establish secure connection with Google Analytics API
278
- * Fixed: VanillaJS tracking code instead of jQuery
279
- * Fixed: Escaping of custom tracking code
280
- * Fixed: PHP notices in pages without global $post variable
281
-
282
- = 1.0.22 =
283
- * Changed: We temporarily disabled reports in admin dashboard and mailing
284
-
285
- = 1.0.21 =
286
- * Fixed: Network activation
287
-
288
- = 1.0.20 =
289
- * Fixed: Admin styles conflict because of bootstrap.css
290
-
291
- = 1.0.19 =
292
- * Changed: Show web-property-related message only in analytics page
293
- * Fixed: Style conflict with jquery-ui.css
294
- * Fixed: Error on PHP4
295
-
296
- = 1.0.18 =
297
- * Fixed: Bug on city/pageview report
298
-
299
- = 1.0.17 =
300
- * Added: Overview page
301
- * Removed: Featured Plugins, Featured Themes pages
302
-
303
- = 1.0.16 =
304
- * Fixed: Bug on pagePath
305
- * Changed: Message about deleted web property
306
-
307
- = 1.0.15 =
308
- * Fixed: Bug on date picker
309
- * Changed: Improved error handling
310
- * Added: New featured plugins
311
-
312
- = 1.0.14 =
313
- * Fixed: Analytics back end menu position conflict
314
- * Fixed: Bug on deleted property check
315
- * Added: Error log
316
-
317
- = 1.0.13 =
318
- * Fixed: Bug on Custom code option in tracking
319
-
320
- = 1.0.12 =
321
- * Fixed: Bug on report by individual post/page
322
-
323
- = 1.0.11 =
324
- * Added: Custom code option in tracking
325
-
326
- = 1.0.10 =
327
- * Fixed: Bug on sending a report to an email once
328
- * Changed: New logo in dashboard menu and notices
329
- * Fixed: Width issue with some reports
330
-
331
-
332
- = 1.0.9 =
333
- * Added: Option to select the time of the day for scheduled emails
334
- * Changed: Save authenticate code with enter button
335
- * Changed: Select permissions for user groups in a pop-up (Settings page)
336
- * Fixed: minor bugs
337
-
338
- = 1.0.8 =
339
- * Added: Google Analytics reports for custom post types
340
- * Added: New icon in the menu
341
- * Added: New header on WordPress.org
342
- * Fixed: JS error on creating new pages/posts
343
-
344
- = 1.0.7 =
345
- * Fixed: Bug in Site Content reports
346
-
347
- = 1.0.6 =
348
- * Fixed: User guide links
349
- * Fixed: Bug on datepicker
350
- * Fixed: Error when deleting the web property
351
- * Added: Validation on the form for adding goals
352
-
353
- = 1.0.5 =
354
- * Fixed: PHP version conflict
355
- * Added: Pro flags about additional functionality available in Pro version
356
- * Added: Explanation texts and links to documenta
1
+ === 10WebAnalytics ===
2
+ Contributors: 10web
 
3
  Requires at least: 3.9
4
+ Tested up to: 5.1
5
+ Stable tag: 1.2.8
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
9
+ View and customize all GoogleAnalytics reports directly in your WordPress dashboard.
10
 
11
  == Description ==
12
 
13
+ View and customize all GoogleAnalytics reports directly in your WordPress dashboard.
14
  = Useful Links: =
15
 
16
  [Live Demo](https://admindemo.10web.io/?product_name=google-analytics)
17
 
18
 
19
+ [10WebAnalytics Premium](https://10web.io/plugins/wordpress-google-analytics/)
20
 
21
 
22
  [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
23
 
24
  https://www.youtube.com/watch?v=n1f7ECVFNPI