Customify – A Theme Customizer Booster - Version 1.3.0

Version Description

  • Added the new and awesome font selector
  • The live CSS editor is now removed for 4.7, but don't worry, your style will be imported into the new CSS Editor
  • Added compatibility with 4.7
Download this release

Release Info

Developer euthelup
Plugin Icon Customify – A Theme Customizer Booster
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.7.1 to 1.3.0

Files changed (72) hide show
  1. README.md +104 -19
  2. class-pixcustomify.php +308 -308
  3. css/admin.css +16 -23
  4. css/customizer.css +703 -585
  5. customify.php +1 -1
  6. features/class-CSS_Editor.php +83 -25
  7. features/class-Font_Selector.php +368 -0
  8. features/customizer/controls/class-Pix_Customize_Font_Control.php +687 -0
  9. features/customizer/controls/resources/google.fonts.json +1 -0
  10. features/customizer/controls/resources/google.fonts.php +4 -2
  11. gulpfile.js +4 -8
  12. js/customizer.js +689 -356
  13. js/customizer_preview.js +17 -1
  14. js/font_selector_preview.js +201 -0
  15. js/live_css_editor.js +3 -0
  16. js/select2/License.md +0 -21
  17. js/select2/css/select2.css +484 -0
  18. js/select2/css/select2.min.css +1 -0
  19. js/select2/js/i18n/ar.js +3 -0
  20. js/select2/js/i18n/az.js +3 -0
  21. js/select2/js/i18n/bg.js +3 -0
  22. js/select2/js/i18n/ca.js +3 -0
  23. js/select2/js/i18n/cs.js +3 -0
  24. js/select2/js/i18n/da.js +3 -0
  25. js/select2/js/i18n/de.js +3 -0
  26. js/select2/js/i18n/el.js +3 -0
  27. js/select2/js/i18n/en.js +3 -0
  28. js/select2/js/i18n/es.js +3 -0
  29. js/select2/js/i18n/et.js +3 -0
  30. js/select2/js/i18n/eu.js +3 -0
  31. js/select2/js/i18n/fa.js +3 -0
  32. js/select2/js/i18n/fi.js +3 -0
  33. js/select2/js/i18n/fr.js +3 -0
  34. js/select2/js/i18n/gl.js +3 -0
  35. js/select2/js/i18n/he.js +3 -0
  36. js/select2/js/i18n/hi.js +3 -0
  37. js/select2/js/i18n/hr.js +3 -0
  38. js/select2/js/i18n/hu.js +3 -0
  39. js/select2/js/i18n/id.js +3 -0
  40. js/select2/js/i18n/is.js +3 -0
  41. js/select2/js/i18n/it.js +3 -0
  42. js/select2/js/i18n/ja.js +3 -0
  43. js/select2/js/i18n/km.js +3 -0
  44. js/select2/js/i18n/ko.js +3 -0
  45. js/select2/js/i18n/lt.js +3 -0
  46. js/select2/js/i18n/lv.js +3 -0
  47. js/select2/js/i18n/mk.js +3 -0
  48. js/select2/js/i18n/ms.js +3 -0
  49. js/select2/js/i18n/nb.js +3 -0
  50. js/select2/js/i18n/nl.js +3 -0
  51. js/select2/js/i18n/pl.js +3 -0
  52. js/select2/js/i18n/pt-BR.js +3 -0
  53. js/select2/js/i18n/pt.js +3 -0
  54. js/select2/js/i18n/ro.js +3 -0
  55. js/select2/js/i18n/ru.js +3 -0
  56. js/select2/js/i18n/sk.js +3 -0
  57. js/select2/js/i18n/sr-Cyrl.js +3 -0
  58. js/select2/js/i18n/sr.js +3 -0
  59. js/select2/js/i18n/sv.js +3 -0
  60. js/select2/js/i18n/th.js +3 -0
  61. js/select2/js/i18n/tr.js +3 -0
  62. js/select2/js/i18n/uk.js +3 -0
  63. js/select2/js/i18n/vi.js +3 -0
  64. js/select2/js/i18n/zh-CN.js +3 -0
  65. js/select2/js/i18n/zh-TW.js +3 -0
  66. js/select2/js/select2.full.js +6436 -0
  67. js/select2/js/select2.full.min.js +3 -0
  68. js/select2/js/select2.js +5725 -0
  69. js/select2/js/select2.min.js +3 -0
  70. js/select2/select2-bootstrap.css +0 -87
  71. js/select2/select2-spinner.gif +0 -0
  72. js/select2/select2.css +0 -599
README.md CHANGED
@@ -60,8 +60,6 @@ function make_this_function_name_unique( $config ) {
60
  // when working with filters always return filtered value
61
  return $config;
62
  }
63
-
64
-
65
  ```
66
 
67
  The Customify plugin also create's its own defaults this way. You can see that in `customify/customify_config.php`
@@ -73,6 +71,27 @@ And after that the sky is the limit, I can style any elements or group of elemen
73
 
74
  The intro is over let's get to some advanced stuff.
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  # Advanced Things
77
 
78
  ### The $config variable<a name="about_config_var"></a> ###
@@ -142,23 +161,6 @@ function this_setting_can_call_this_function( $value, $selector, $property, $uni
142
 
143
  ```
144
 
145
- Fields<a name="list_of_fields"></a> | [Live Preview Support!](#live_preview_support) | Description
146
- ------------- | ------------- | -------------
147
- Text | Yes [with classes](#live_preview_with_classes) | A simple text input
148
- Textarea | Yes [with classes](#live_preview_with_classes) | A simple text area input
149
- Ace Editor | Yes [with classes](#live_preview_with_classes) | An ace editor that supports plain_text / css / html / javascript / json / markdown
150
- Color | Yes | A simple color picker
151
- Range | Yes | The default html5 range input
152
- Typography | No | This is an awesome font selector, it supports standard fonts and google fonts. You can also Group fonts or offer a list of recommended fonts
153
- Select | No | The standard HTML select
154
- Radio | No |
155
- Checkbox | No |
156
- Upload | No | This field allows you to upload a file which you can use it later in front-end
157
- Image | No | This is like the upload field, but it accepts only images
158
- Date | No |
159
- Pages select | No | The standard WordPress Page Select
160
- [Select2](https://select2.github.io/) | No | An awesome select
161
- [Presets](#presets_title) | No | An radio input option to select a group of options (inception style ^^)
162
  HTML field | No | A field which allows you to add custom HTML in customizer and hook into it with javascript later ;)
163
 
164
  ### Live Preview Support<a name="live_preview_support"></a>
@@ -389,3 +391,86 @@ Just add this section in your config
389
  )
390
  )
391
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  // when working with filters always return filtered value
61
  return $config;
62
  }
 
 
63
  ```
64
 
65
  The Customify plugin also create's its own defaults this way. You can see that in `customify/customify_config.php`
71
 
72
  The intro is over let's get to some advanced stuff.
73
 
74
+ # List of fields
75
+
76
+ Fields<a name="list_of_fields"></a> | [Live Preview Support!](#live_preview_support) | Description
77
+ ------------- | ------------- | -------------
78
+ Text | Yes [with classes](#live_preview_with_classes) | A simple text input
79
+ Textarea | Yes [with classes](#live_preview_with_classes) | A simple text area input
80
+ Ace Editor | Yes [with classes](#live_preview_with_classes) | An ace editor that supports plain_text / css / html / javascript / json / markdown
81
+ Color | Yes | A simple color picker
82
+ Range | Yes | The default html5 range input
83
+ Font | Custom Live Preview | A complete font selector with Live Preview, google fonts, filtrable theme fonts and custom callbacks
84
+ Typography | No | This is a font selector but it will be soon depricated, use Font instead
85
+ Select | No | The standard HTML select
86
+ Radio | No |
87
+ Checkbox | No |
88
+ Upload | No | This field allows you to upload a file which you can use it later in front-end
89
+ Image | No | This is like the upload field, but it accepts only images
90
+ Date | No |
91
+ Pages select | No | The standard WordPress Page Select
92
+ [Select2](https://select2.github.io/) | No | An awesome select
93
+ [Presets](#presets_title) | No | An radio input option to select a group of options (inception style ^^)
94
+
95
  # Advanced Things
96
 
97
  ### The $config variable<a name="about_config_var"></a> ###
161
 
162
  ```
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  HTML field | No | A field which allows you to add custom HTML in customizer and hook into it with javascript later ;)
165
 
166
  ### Live Preview Support<a name="live_preview_support"></a>
391
  )
392
  )
393
  ```
394
+
395
+
396
+ ### Font Selector<a name="font_selector"></a>
397
+
398
+ In 1.3.0 We introduced the new font selector, it works with live preview only and it has this possible configs:
399
+
400
+ ```
401
+ 'headings_font' => array(
402
+ 'type' => 'font',
403
+ 'label' => esc_html__( 'Headings', 'customify' ),
404
+ 'desc' => esc_html__( 'o descriere', 'customify' ),
405
+ 'selector' => 'h1, h2, h3, h4, .title, .sub-title',
406
+
407
+ // Set the defaults
408
+ 'default' => array(
409
+ 'font-family' => 'Open Sans',
410
+ 'font-weight' => '400',
411
+ 'font-size' => 24,
412
+ 'line-height' => 1.5,
413
+ 'letter-spacing' => 1,
414
+ 'text-align' => 'initial',
415
+ 'text-transform' => 'uppercase',
416
+ 'text-decoration' => 'underline'
417
+ ),
418
+
419
+ //'load_all_weights' => true,
420
+
421
+ 'recommended' => $recommended_headings_fonts, // List of recommended fonts defined by theme
422
+
423
+ // Sub Fields Configuration (optional)
424
+ 'fields' => array(
425
+ 'font-size' => array( // Set custom values for a range slider
426
+ 'min' => 10,
427
+ 'max' => 40,
428
+ 'step' => 1,
429
+ 'unit' => 'px',
430
+ ),
431
+ 'line-height' => array(0, 2, 0.1, ''), // Short-hand version
432
+ 'letter-spacing' => array(-1, 4, 0.1, 'em'),
433
+ 'text-align' => true, // Disable sub-field (False by default)
434
+ 'text-transform' => true,
435
+ 'text-decoration'=> true,
436
+ ),
437
+ 'callback' => 'your_custom_callback_function'
438
+ ),
439
+ ```
440
+
441
+ In the above example you can see the callback parameter, it supports a PHP or Javascript function
442
+ which should replace the current output of the font
443
+
444
+ ```
445
+ function your_custom_callback_function( $value, $font ) {
446
+ return $combined_css';
447
+ }
448
+
449
+ function add_javascript_callback_function() { ?>
450
+ <script>
451
+ function your_custom_callback_function( $values, field ) {
452
+ return $combined_css;
453
+ }
454
+
455
+ </script>
456
+ <?php }
457
+ add_action( 'customize_preview_init', 'add_javascript_callback_function' );
458
+ ```
459
+
460
+
461
+ ### Local Fonts
462
+
463
+ Also this font selector comes with the ability to add custom fonts from a theme.
464
+ If a theme comes with the name of a font and a stylesheet with its fontface it
465
+ will be added as the first option of the font selector
466
+ ```
467
+ function theme_add_customify_theme_fonts ( $fonts ) {
468
+ $fonts['Custom Font'] = array(
469
+ 'family' => 'Custom Font',
470
+ 'src' => get_template_directory_uri() . '/assets/fonts/custom_font/stylesheet.css',
471
+ 'variants' => array( '400', '700' )
472
+ );
473
+ return $fonts;
474
+ }
475
+ add_filter( 'customify_theme_fonts', 'theme_add_customify_theme_fonts' );
476
+ ```
class-pixcustomify.php CHANGED
@@ -20,7 +20,7 @@ class PixCustomifyPlugin {
20
  * @since 1.0.0
21
  * @const string
22
  */
23
- protected $version = '1.2.7.1';
24
  /**
25
  * Unique identifier for your plugin.
26
  * Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
@@ -53,9 +53,9 @@ class PixCustomifyPlugin {
53
 
54
  public $display_admin_menu = false;
55
 
56
- protected static $config;
57
 
58
- protected static $customizer_config;
59
 
60
  public static $plugin_settings;
61
 
@@ -75,6 +75,8 @@ class PixCustomifyPlugin {
75
 
76
  protected static $google_fonts = null;
77
 
 
 
78
  // these properties will get 'px' as a default unit
79
  protected static $pixel_dependent_css_properties = array(
80
  'width',
@@ -127,6 +129,10 @@ class PixCustomifyPlugin {
127
  self::$config = self::get_config();
128
  self::$plugin_settings = get_option( 'pixcustomify_settings' );
129
 
 
 
 
 
130
  self::check_for_customizer_values();
131
 
132
  // Load plugin text domain
@@ -140,7 +146,6 @@ class PixCustomifyPlugin {
140
  $plugin_basename = plugin_basename( plugin_dir_path( __FILE__ ) . 'pixcustomify.php' );
141
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
142
 
143
-
144
  // Load admin style sheet and JavaScript.
145
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
146
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
@@ -155,9 +160,6 @@ class PixCustomifyPlugin {
155
  add_action( $load_location, array( $this, 'output_dynamic_style' ), 99999 );
156
  add_action( 'wp_head', array( $this, 'output_typography_dynamic_style' ), 10 );
157
 
158
- // add things to the previewer
159
- // add_action( 'customize_preview_init', array( $this, 'customize_preview_js' ) );
160
-
161
  add_action( 'customize_register', array( $this, 'remove_default_sections' ), 11 );
162
  add_action( 'customize_register', array( $this, 'register_customizer' ), 12 );
163
 
@@ -165,16 +167,11 @@ class PixCustomifyPlugin {
165
  add_action( 'admin_head', array( $this, 'add_customizer_settings_into_wp_editor' ) );
166
  }
167
 
 
168
  add_action( 'init', array( $this, 'set_jetpack_modules_config') );
169
  add_filter( 'default_option_jetpack_active_modules', array( $this, 'default_jetpack_active_modules' ), 10, 1 );
170
  add_filter( 'jetpack_get_available_modules', array( $this, 'jetpack_hide_blocked_modules'), 10, 1 );
171
  add_filter( 'default_option_sharing-options', array( $this, 'default_jetpack_sharing_options' ), 10, 1 );
172
-
173
- /**
174
- * Ajax Callbacks
175
- */
176
- // add_action( 'wp_ajax_pixcustomify_image_click', array( &$this, 'ajax_click_on_photo' ) );
177
- // add_action( 'wp_ajax_nopriv_pixcustomify_image_click', array( &$this, 'ajax_click_on_photo' ) );
178
  }
179
 
180
  /**
@@ -223,13 +220,13 @@ class PixCustomifyPlugin {
223
  $this->register_import_api();
224
  }
225
 
226
- // load custom modules
227
- include_once( self::get_base_path() . '/features/class-CSS_Editor.php' );
228
  }
229
 
230
  function set_jetpack_modules_config() {
231
  // We expect an array of string module names like array( 'infinite-scroll', 'widgets' )
232
- // See jetpack/modules/modules-heading.php for module names
233
  self::$jetpack_default_modules = apply_filters ( 'customify_filter_jetpack_default_modules', array(
234
  'shortcodes',
235
  'widget-visibility',
@@ -241,12 +238,12 @@ class PixCustomifyPlugin {
241
  self::$jetpack_blocked_modules = apply_filters ( 'customify_filter_jetpack_blocked_modules', array() );
242
 
243
  self::$jetpack_sharing_default_options = apply_filters ( 'customify_filter_jetpack_sharing_default_options', array() );
244
- }
245
 
246
  /**
247
- * Control the default modules that are activated in Jetpack.
248
- * Use the `customify_filter_jetpack_default_modules` to set your's.
249
- *
250
  * @param array $default The default value to return if the option does not exist
251
  * in the database.
252
  * @return array
@@ -277,171 +274,15 @@ class PixCustomifyPlugin {
277
  }
278
 
279
  /**
280
- * Control the modules that are available in Jetpack (hide some of them).
281
- * Use the `customify_filter_jetpack_blocked_modules` filter to set your's.
282
- *
283
  * @param array $modules
284
  *
285
  * @return array
286
  */
287
  function jetpack_hide_blocked_modules( $modules ) {
288
- return array_diff_key( $modules, array_flip( self::$jetpack_blocked_modules ) );
289
- }
290
-
291
- protected static function check_for_customizer_values() {
292
- if ( isset( $_POST['customized'] ) && $_POST['customized'] !== '{}' ) {
293
- $the_value = $_POST['customized'];
294
- self::$customizer_values = json_decode( $the_value, true );
295
-
296
- /**
297
- * if still empty, use stripslashes_deep to ensure compatibility with 5.2
298
- * http://stackoverflow.com/questions/28698165/json-data-cannot-be-accessed-in-php-version-5-2-17
299
- */
300
- if ( empty( self::$customizer_values ) ) {
301
- $stripped_value = stripslashes_deep( $the_value );
302
- self::$customizer_values = json_decode( $stripped_value, true );
303
- }
304
- } else {
305
- self::$customizer_values = false;
306
- }
307
- }
308
-
309
- protected static function get_current_values() {
310
- $store_type = self::get_plugin_option( 'values_store_mod', 'option' );
311
- if ( $store_type === 'option' ) {
312
- self::$current_values = get_option( self::$opt_name );
313
- } elseif ( $store_type === 'theme_mod' ) {
314
- self::$current_values = get_theme_mod( self::$opt_name );
315
- }
316
- }
317
-
318
- public function get_options() {
319
-
320
- $settings = array();
321
-
322
- if ( isset ( self::$customizer_config['panels'] ) ) {
323
-
324
- foreach ( self::$customizer_config['panels'] as $pane_id => $panel_settings ) {
325
-
326
- if ( isset( $panel_settings['sections'] ) ) {
327
- foreach ( $panel_settings['sections'] as $section_id => $section_settings ) {
328
- if ( isset( $section_settings['options'] ) ) {
329
- foreach ( $section_settings['options'] as $option_id => $option ) {
330
- $settings[ $option_id ] = $option;
331
- if ( isset( self::$current_values[ $option_id ] ) ) {
332
- $settings[ $option_id ]['value'] = self::$current_values[ $option_id ];
333
- }
334
- }
335
- }
336
- }
337
- }
338
- }
339
- }
340
-
341
- if ( isset ( self::$customizer_config['sections'] ) ) {
342
- foreach ( self::$customizer_config['sections'] as $section_id => $section_settings ) {
343
- if ( isset( $section_settings['options'] ) ) {
344
- foreach ( $section_settings['options'] as $option_id => $option ) {
345
- $settings[ $option_id ] = $option;
346
- if ( isset( self::$current_values[ $option_id ] ) ) {
347
- $settings[ $option_id ]['value'] = self::$current_values[ $option_id ];
348
- }
349
- }
350
- }
351
- }
352
- }
353
-
354
- return $settings;
355
- }
356
-
357
- protected static function get_value( $option ) {
358
-
359
- if ( isset( self::$customizer_values[ self::$opt_name . '[' . $option . ']' ] ) ) {
360
- return self::$customizer_values[ self::$opt_name . '[' . $option . ']' ];
361
- }
362
-
363
- if ( strpos( $option, self::$opt_name . '[' ) !== false ) {
364
- var_dump( 'this is old and it shouldn\'t be here!' );
365
-
366
- // get only the setting id
367
- $option = explode( '[', $option );
368
- $option = rtrim( $option[1], ']' );
369
- }
370
-
371
- if ( isset( self::$current_values[ $option ] ) ) {
372
- return self::$current_values[ $option ];
373
- }
374
-
375
- return null;
376
- }
377
-
378
- /**
379
- * A public function to retreat an option's value
380
- * If there is a value and return it
381
- * Otherwise try to get the default parameter or the default from config
382
- *
383
- * @param $option
384
- * @param null $default
385
- *
386
- * @return bool|null|string
387
- */
388
- static function get_option( $option, $default = null ) {
389
-
390
- $return = self::get_value( $option );
391
-
392
- if ( $return !== null ) {
393
- return $return;
394
- } elseif ( $default !== null ) {
395
- return $default;
396
- } elseif ( isset( self::$options_list[ $option ] ) && isset( self::$options_list[ $option ]['default'] ) ) {
397
- return self::$options_list[ $option ]['default'];
398
- }
399
-
400
- return null;
401
- }
402
-
403
- static function has_option( $option ) {
404
-
405
- if ( isset( self::$options_list[ $option ] ) ) {
406
- return true;
407
- }
408
-
409
- return false;
410
- }
411
-
412
- protected static function get_config() {
413
- // @TODO maybe check this
414
- return include 'plugin-config.php';
415
- }
416
-
417
- /**
418
- * Get an option's value from the config file
419
- *
420
- * @param $option
421
- * @param null $default
422
- *
423
- * @return bool|null
424
- */
425
- public static function get_config_option( $option, $default = null ) {
426
-
427
- if ( isset( self::$config[ $option ] ) ) {
428
- return self::$config[ $option ];
429
- } elseif ( $default !== null ) {
430
- return $default;
431
- }
432
-
433
- return false;
434
- }
435
-
436
- static function get_plugin_option( $option, $default = null ) {
437
-
438
- if ( isset( self::$plugin_settings[ $option ] ) ) {
439
- return self::$plugin_settings[ $option ];
440
- } elseif ( $default !== null ) {
441
- return $default;
442
- }
443
-
444
- return false;
445
  }
446
 
447
  /**
@@ -483,7 +324,7 @@ class PixCustomifyPlugin {
483
  * Customizer admin styles
484
  */
485
  function enqueue_admin_customizer_styles() {
486
- wp_enqueue_style( 'select2', plugins_url( 'js/select2/select2.css', __FILE__ ), array(), $this->version );
487
  wp_enqueue_style( 'customify_style', plugins_url( 'css/customizer.css', __FILE__ ), array(), $this->version );
488
  }
489
 
@@ -492,7 +333,7 @@ class PixCustomifyPlugin {
492
  */
493
  function enqueue_admin_customizer_scripts() {
494
 
495
- wp_enqueue_script( 'select2', plugins_url( 'js/select2/select2.js', __FILE__ ), array( 'jquery' ), $this->version );
496
  wp_enqueue_script( 'jquery-react', plugins_url( 'js/jquery-react.js', __FILE__ ), array( 'jquery' ), $this->version );
497
  wp_enqueue_script( $this->plugin_slug . '-customizer-scripts', plugins_url( 'js/customizer.js', __FILE__ ), array(
498
  'jquery',
@@ -501,10 +342,8 @@ class PixCustomifyPlugin {
501
  ), $this->version );
502
 
503
  wp_localize_script( $this->plugin_slug . '-customizer-scripts', 'customify_settings', self::$localized );
504
-
505
  }
506
 
507
-
508
  /** Customizer scripts loaded only on previewer page */
509
  function customizer_live_preview_enqueue_scripts() {
510
 
@@ -562,25 +401,6 @@ class PixCustomifyPlugin {
562
  wp_localize_script( $this->plugin_slug . '-customizer-scripts', 'WP_API_Settings', array( 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ) ) );
563
  }
564
 
565
- /**
566
- * Register and enqueue public-facing style sheet.
567
- * @since 1.0.0
568
- */
569
- function enqueue_styles() {
570
- // wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/public.css', __FILE__ ), array(), $this->version );
571
- }
572
-
573
- /**
574
- * Register and enqueues public-facing JavaScript files.
575
- * @since 1.0.0
576
- */
577
- public function enqueue_scripts() {
578
- //wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'js/public.js', __FILE__ ), array( 'jquery' ), $this->version, true );
579
-
580
- // quit adding google fonts as a static resource ... we will add it dynamically as a fallback when the typekit library isn't used
581
- // wp_enqueue_script( 'google-fonts', '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js' );
582
- }
583
-
584
  /**
585
  * Public style generated by customizer
586
  */
@@ -737,31 +557,12 @@ class PixCustomifyPlugin {
737
  if ( isset ( $font['value'] ) ) {
738
 
739
  $load_all_weights = false;
740
-
741
  if ( isset( $font['load_all_weights'] ) && $font['load_all_weights'] == 'true' ) {
742
  $load_all_weights = true;
743
  }
744
 
745
  // shim the time when this was an array
746
  if ( is_array( $font['value'] ) ) {
747
- // $font['value']['font_family'] = $font['value']['font-family'];
748
- // unset( $font['value']['font-family'] );
749
- //
750
- // if ( isset( $font['value']['google'] ) && $font['value']['google'] ) {
751
- // $font['value']['type'] = 'google';
752
- // unset($font['value']['type']);
753
- // }
754
- //
755
- // foreach ($font['value']['font-options']['variants'] as $variant ) {
756
- // $font['value']['variants'][$variant['id']] = $variant['name'];
757
- // }
758
- //
759
- // foreach ($font['value']['font-options']['subsets'] as $subsets ) {
760
- // $font['value']['subsets'][$subsets['id']] = $subsets['name'];
761
- // }
762
- //
763
- // unset( $font['value']['font-options'] );
764
-
765
  $font['value'] = stripslashes_deep( $font['value'] );
766
  $font['value'] = json_encode( $font['value'] );
767
  }
@@ -821,32 +622,31 @@ class PixCustomifyPlugin {
821
  }
822
  }
823
 
824
-
825
  if ( ! empty ( $families ) && self::get_plugin_option( 'typography', '1' ) && self::get_plugin_option( 'typography_google_fonts', 1 ) ) { ?>
826
  <script type="text/javascript">
827
- if ( typeof WebFont !== 'undefined' ) {<?php // if there is a WebFont object, use it ?>
828
- WebFont.load( {
829
- google: {families: [<?php echo( rtrim( $families, ',' ) ); ?>]},
830
- classes: false,
831
- events: false
832
- } );
833
- } else {<?php // basically when we don't have the WebFont object we create the google script dynamically ?>
834
-
835
- var tk = document.createElement( 'script' );
836
- tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
837
- tk.type = 'text/javascript';
838
-
839
- tk.onload = tk.onreadystatechange = function() {
840
- WebFont.load( {
841
- google: {families: [<?php echo( rtrim( $families, ',' ) ); ?>]},
842
- classes: false,
843
- events: false
844
- } );
845
- };
846
-
847
- var s = document.getElementsByTagName( 'script' )[0];
848
- s.parentNode.insertBefore( tk, s );
849
- }
850
  </script>
851
  <?php } ?>
852
  <style id="customify_typography_output_style">
@@ -993,7 +793,12 @@ class PixCustomifyPlugin {
993
  $value = self::$google_fonts[ $font_name ];
994
  $value['font_family'] = $font_name;
995
  $value['type'] = 'google';
996
-
 
 
 
 
 
997
  return $value;
998
  }
999
 
@@ -1100,8 +905,6 @@ class PixCustomifyPlugin {
1100
  return ob_get_clean();
1101
  }
1102
 
1103
- // addd editor style
1104
-
1105
  /**
1106
  * add our customizer styling edits into the wp_editor
1107
  */
@@ -1114,59 +917,59 @@ class PixCustomifyPlugin {
1114
  $custom_css = ob_get_clean(); ?>
1115
  <script type="text/javascript">
1116
  /* <![CDATA[ */
1117
- (function( $ ) {
1118
- $( window ).load( function() {
1119
- /**
1120
- * @param iframe_id the id of the frame you whant to append the style
1121
- * @param style_element the style element you want to append
1122
- */
1123
- var append_script_to_iframe = function( ifrm_id, scriptEl ) {
1124
- var myIframe = document.getElementById( ifrm_id );
1125
-
1126
- var script = myIframe.contentWindow.document.createElement( "script" );
1127
- script.type = "text/javascript";
1128
- script.innerHTML = scriptEl.innerHTML;
1129
-
1130
- myIframe.contentWindow.document.head.appendChild( script );
1131
- };
1132
-
1133
- var append_style_to_iframe = function( ifrm_id, styleElment ) {
1134
- var ifrm = window.frames[ifrm_id];
1135
- ifrm = ( ifrm.contentDocument || ifrm.contentDocument || ifrm.document );
1136
- var head = ifrm.getElementsByTagName( 'head' )[0];
1137
-
1138
- if ( typeof styleElment !== "undefined" ) {
1139
- head.appendChild( styleElment );
1140
- }
1141
- };
1142
-
1143
- var xmlString = <?php echo json_encode( str_replace( "\n", "", $custom_css ) ); ?>,
1144
- parser = new DOMParser(),
1145
- doc = parser.parseFromString( xmlString, "text/html" );
1146
-
1147
- if ( typeof window.frames['content_ifr'] !== 'undefined' ) {
1148
-
1149
- $.each( doc.head.childNodes, function( key, el ) {
1150
-
1151
- if ( typeof el !== "undefined" && typeof el.tagName !== "undefined" ) {
1152
-
1153
- switch ( el.tagName ) {
1154
-
1155
- case 'STYLE' :
1156
- append_style_to_iframe( 'content_ifr', el );
1157
- break;
1158
-
1159
- case 'SCRIPT' :
1160
- append_script_to_iframe( 'content_ifr', el );
1161
- break;
1162
- default:
1163
- break;
1164
- }
1165
- }
1166
- } );
1167
- }
1168
- } );
1169
- })( jQuery );
1170
  /* ]]> */
1171
  </script>
1172
  <?php }
@@ -1392,7 +1195,7 @@ class PixCustomifyPlugin {
1392
  self::$localized['settings'][ $setting_id ] = $setting_config;
1393
 
1394
  // sanitize settings
1395
- if ( isset( $setting_config['live'] ) && $setting_config['live'] ) {
1396
  $setting_args['transport'] = 'postMessage';
1397
  }
1398
 
@@ -1603,6 +1406,49 @@ class PixCustomifyPlugin {
1603
 
1604
  break;
1605
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1606
  case 'select2' :
1607
 
1608
  if ( ! isset( $setting_config['choices'] ) || empty( $setting_config['choices'] ) ) {
@@ -1711,10 +1557,6 @@ class PixCustomifyPlugin {
1711
  }
1712
  }
1713
 
1714
- function do_nothing_jon_snow() {
1715
- echo '1';
1716
- }
1717
-
1718
  /**
1719
  * Remove the sections selected by user
1720
  *
@@ -1794,6 +1636,164 @@ class PixCustomifyPlugin {
1794
  return false;
1795
  }
1796
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1797
  /**
1798
  * Sanitize functions
1799
  */
@@ -1881,4 +1881,4 @@ class PixCustomifyPlugin {
1881
 
1882
  return $str;
1883
  }
1884
- }
20
  * @since 1.0.0
21
  * @const string
22
  */
23
+ protected $version = '1.3.0';
24
  /**
25
  * Unique identifier for your plugin.
26
  * Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
53
 
54
  public $display_admin_menu = false;
55
 
56
+ private static $config;
57
 
58
+ private static $customizer_config;
59
 
60
  public static $plugin_settings;
61
 
75
 
76
  protected static $google_fonts = null;
77
 
78
+ protected static $theme_fonts = null;
79
+
80
  // these properties will get 'px' as a default unit
81
  protected static $pixel_dependent_css_properties = array(
82
  'width',
129
  self::$config = self::get_config();
130
  self::$plugin_settings = get_option( 'pixcustomify_settings' );
131
 
132
+ // load custom modules
133
+ include_once( self::get_base_path() . '/features/class-CSS_Editor.php' );
134
+ include_once( self::get_base_path() . 'features/class-Font_Selector.php' );
135
+
136
  self::check_for_customizer_values();
137
 
138
  // Load plugin text domain
146
  $plugin_basename = plugin_basename( plugin_dir_path( __FILE__ ) . 'pixcustomify.php' );
147
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
148
 
 
149
  // Load admin style sheet and JavaScript.
150
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
151
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
160
  add_action( $load_location, array( $this, 'output_dynamic_style' ), 99999 );
161
  add_action( 'wp_head', array( $this, 'output_typography_dynamic_style' ), 10 );
162
 
 
 
 
163
  add_action( 'customize_register', array( $this, 'remove_default_sections' ), 11 );
164
  add_action( 'customize_register', array( $this, 'register_customizer' ), 12 );
165
 
167
  add_action( 'admin_head', array( $this, 'add_customizer_settings_into_wp_editor' ) );
168
  }
169
 
170
+ // Jetpack Related
171
  add_action( 'init', array( $this, 'set_jetpack_modules_config') );
172
  add_filter( 'default_option_jetpack_active_modules', array( $this, 'default_jetpack_active_modules' ), 10, 1 );
173
  add_filter( 'jetpack_get_available_modules', array( $this, 'jetpack_hide_blocked_modules'), 10, 1 );
174
  add_filter( 'default_option_sharing-options', array( $this, 'default_jetpack_sharing_options' ), 10, 1 );
 
 
 
 
 
 
175
  }
176
 
177
  /**
220
  $this->register_import_api();
221
  }
222
 
223
+ $font_selector = new Customify_Font_Selector( $this );
224
+ self::$localized['theme_fonts'] = self::$theme_fonts = Customify_Font_Selector::$theme_fonts;
225
  }
226
 
227
  function set_jetpack_modules_config() {
228
  // We expect an array of string module names like array( 'infinite-scroll', 'widgets' )
229
+ // See jetpack/modules/modules-heading.php for module names
230
  self::$jetpack_default_modules = apply_filters ( 'customify_filter_jetpack_default_modules', array(
231
  'shortcodes',
232
  'widget-visibility',
238
  self::$jetpack_blocked_modules = apply_filters ( 'customify_filter_jetpack_blocked_modules', array() );
239
 
240
  self::$jetpack_sharing_default_options = apply_filters ( 'customify_filter_jetpack_sharing_default_options', array() );
241
+ }
242
 
243
  /**
244
+ * Control the default modules that are activated in Jetpack.
245
+ * Use the `customify_filter_jetpack_default_modules` to set your's.
246
+ *
247
  * @param array $default The default value to return if the option does not exist
248
  * in the database.
249
  * @return array
274
  }
275
 
276
  /**
277
+ * Control the modules that are available in Jetpack (hide some of them).
278
+ * Use the `customify_filter_jetpack_blocked_modules` filter to set your's.
279
+ *
280
  * @param array $modules
281
  *
282
  * @return array
283
  */
284
  function jetpack_hide_blocked_modules( $modules ) {
285
+ return array_diff_key( $modules, array_flip( self::$jetpack_blocked_modules ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  }
287
 
288
  /**
324
  * Customizer admin styles
325
  */
326
  function enqueue_admin_customizer_styles() {
327
+ wp_enqueue_style( 'select2', plugins_url( 'js/select2/css/select2.css', __FILE__ ), array(), $this->version );
328
  wp_enqueue_style( 'customify_style', plugins_url( 'css/customizer.css', __FILE__ ), array(), $this->version );
329
  }
330
 
333
  */
334
  function enqueue_admin_customizer_scripts() {
335
 
336
+ wp_enqueue_script( 'select2', plugins_url( 'js/select2/js/select2.js', __FILE__ ), array( 'jquery' ), $this->version );
337
  wp_enqueue_script( 'jquery-react', plugins_url( 'js/jquery-react.js', __FILE__ ), array( 'jquery' ), $this->version );
338
  wp_enqueue_script( $this->plugin_slug . '-customizer-scripts', plugins_url( 'js/customizer.js', __FILE__ ), array(
339
  'jquery',
342
  ), $this->version );
343
 
344
  wp_localize_script( $this->plugin_slug . '-customizer-scripts', 'customify_settings', self::$localized );
 
345
  }
346
 
 
347
  /** Customizer scripts loaded only on previewer page */
348
  function customizer_live_preview_enqueue_scripts() {
349
 
401
  wp_localize_script( $this->plugin_slug . '-customizer-scripts', 'WP_API_Settings', array( 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ) ) );
402
  }
403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  /**
405
  * Public style generated by customizer
406
  */
557
  if ( isset ( $font['value'] ) ) {
558
 
559
  $load_all_weights = false;
 
560
  if ( isset( $font['load_all_weights'] ) && $font['load_all_weights'] == 'true' ) {
561
  $load_all_weights = true;
562
  }
563
 
564
  // shim the time when this was an array
565
  if ( is_array( $font['value'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  $font['value'] = stripslashes_deep( $font['value'] );
567
  $font['value'] = json_encode( $font['value'] );
568
  }
622
  }
623
  }
624
 
 
625
  if ( ! empty ( $families ) && self::get_plugin_option( 'typography', '1' ) && self::get_plugin_option( 'typography_google_fonts', 1 ) ) { ?>
626
  <script type="text/javascript">
627
+ if ( typeof WebFont !== 'undefined' ) {<?php // if there is a WebFont object, use it ?>
628
+ WebFont.load( {
629
+ google: {families: [<?php echo( rtrim( $families, ',' ) ); ?>]},
630
+ classes: false,
631
+ events: false
632
+ } );
633
+ } else {<?php // basically when we don't have the WebFont object we create the google script dynamically ?>
634
+
635
+ var tk = document.createElement( 'script' );
636
+ tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
637
+ tk.type = 'text/javascript';
638
+
639
+ tk.onload = tk.onreadystatechange = function() {
640
+ WebFont.load( {
641
+ google: {families: [<?php echo( rtrim( $families, ',' ) ); ?>]},
642
+ classes: false,
643
+ events: false
644
+ } );
645
+ };
646
+
647
+ var s = document.getElementsByTagName( 'script' )[0];
648
+ s.parentNode.insertBefore( tk, s );
649
+ }
650
  </script>
651
  <?php } ?>
652
  <style id="customify_typography_output_style">
793
  $value = self::$google_fonts[ $font_name ];
794
  $value['font_family'] = $font_name;
795
  $value['type'] = 'google';
796
+ return $value;
797
+ } elseif ( isset( self::$theme_fonts[ $font_name ] ) ) {
798
+ $value['type'] = 'theme_font';
799
+ $value['src'] = self::$theme_fonts[ $font_name ]['src'];
800
+ $value['variants'] = self::$theme_fonts[ $font_name ]['variants'];
801
+ $value['font_family'] = self::$theme_fonts[ $font_name ]['family'];
802
  return $value;
803
  }
804
 
905
  return ob_get_clean();
906
  }
907
 
 
 
908
  /**
909
  * add our customizer styling edits into the wp_editor
910
  */
917
  $custom_css = ob_get_clean(); ?>
918
  <script type="text/javascript">
919
  /* <![CDATA[ */
920
+ (function( $ ) {
921
+ $( window ).load( function() {
922
+ /**
923
+ * @param iframe_id the id of the frame you whant to append the style
924
+ * @param style_element the style element you want to append
925
+ */
926
+ var append_script_to_iframe = function( ifrm_id, scriptEl ) {
927
+ var myIframe = document.getElementById( ifrm_id );
928
+
929
+ var script = myIframe.contentWindow.document.createElement( "script" );
930
+ script.type = "text/javascript";
931
+ script.innerHTML = scriptEl.innerHTML;
932
+
933
+ myIframe.contentWindow.document.head.appendChild( script );
934
+ };
935
+
936
+ var append_style_to_iframe = function( ifrm_id, styleElment ) {
937
+ var ifrm = window.frames[ifrm_id];
938
+ ifrm = ( ifrm.contentDocument || ifrm.contentDocument || ifrm.document );
939
+ var head = ifrm.getElementsByTagName( 'head' )[0];
940
+
941
+ if ( typeof styleElment !== "undefined" ) {
942
+ head.appendChild( styleElment );
943
+ }
944
+ };
945
+
946
+ var xmlString = <?php echo json_encode( str_replace( "\n", "", $custom_css ) ); ?>,
947
+ parser = new DOMParser(),
948
+ doc = parser.parseFromString( xmlString, "text/html" );
949
+
950
+ if ( typeof window.frames['content_ifr'] !== 'undefined' ) {
951
+
952
+ $.each( doc.head.childNodes, function( key, el ) {
953
+
954
+ if ( typeof el !== "undefined" && typeof el.tagName !== "undefined" ) {
955
+
956
+ switch ( el.tagName ) {
957
+
958
+ case 'STYLE' :
959
+ append_style_to_iframe( 'content_ifr', el );
960
+ break;
961
+
962
+ case 'SCRIPT' :
963
+ append_script_to_iframe( 'content_ifr', el );
964
+ break;
965
+ default:
966
+ break;
967
+ }
968
+ }
969
+ } );
970
+ }
971
+ } );
972
+ })( jQuery );
973
  /* ]]> */
974
  </script>
975
  <?php }
1195
  self::$localized['settings'][ $setting_id ] = $setting_config;
1196
 
1197
  // sanitize settings
1198
+ if ( ( isset( $setting_config['live'] ) && $setting_config['live'] ) || $setting_config['type'] === 'font' ) {
1199
  $setting_args['transport'] = 'postMessage';
1200
  }
1201
 
1406
 
1407
  break;
1408
 
1409
+ // Custom types
1410
+ case 'font' :
1411
+
1412
+ $use_typography = self::get_plugin_option( 'typography', '1' );
1413
+
1414
+ if ( $use_typography === false ) {
1415
+ $add_control = false;
1416
+ continue;
1417
+ }
1418
+
1419
+ $control_class_name = 'Pix_Customize_Font_Control';
1420
+
1421
+ if ( isset( $setting_config['backup'] ) ) {
1422
+ $control_args['backup'] = $setting_config['backup'];
1423
+ }
1424
+
1425
+ if ( isset( $setting_config['font_weight'] ) ) {
1426
+ $control_args['font_weight'] = $setting_config['font_weight'];
1427
+ }
1428
+
1429
+ if ( isset( $setting_config['subsets'] ) ) {
1430
+ $control_args['subsets'] = $setting_config['subsets'];
1431
+ }
1432
+
1433
+ if ( isset( $setting_config['recommended'] ) ) {
1434
+ $control_args['recommended'] = array_flip( $setting_config['recommended'] );
1435
+ }
1436
+
1437
+ if ( isset( $setting_config['load_all_weights'] ) ) {
1438
+ $control_args['load_all_weights'] = $setting_config['load_all_weights'];
1439
+ }
1440
+
1441
+ if ( isset( $setting_config['default'] ) ) {
1442
+ $control_args['default'] = $setting_config['default'];
1443
+ }
1444
+
1445
+ if ( isset( $setting_config['fields'] ) ) {
1446
+ $control_args['fields'] = $setting_config['fields'];
1447
+ }
1448
+ $control_args['live'] = true;
1449
+
1450
+ break;
1451
+
1452
  case 'select2' :
1453
 
1454
  if ( ! isset( $setting_config['choices'] ) || empty( $setting_config['choices'] ) ) {
1557
  }
1558
  }
1559
 
 
 
 
 
1560
  /**
1561
  * Remove the sections selected by user
1562
  *
1636
  return false;
1637
  }
1638
 
1639
+ /** == Helpers == */
1640
+
1641
+
1642
+ protected static function check_for_customizer_values() {
1643
+ if ( isset( $_POST['customized'] ) && $_POST['customized'] !== '{}' ) {
1644
+ $the_value = $_POST['customized'];
1645
+ self::$customizer_values = json_decode( $the_value, true );
1646
+
1647
+ /**
1648
+ * if still empty, use stripslashes_deep to ensure compatibility with 5.2
1649
+ * http://stackoverflow.com/questions/28698165/json-data-cannot-be-accessed-in-php-version-5-2-17
1650
+ */
1651
+ if ( empty( self::$customizer_values ) ) {
1652
+ $stripped_value = stripslashes_deep( $the_value );
1653
+ self::$customizer_values = json_decode( $stripped_value, true );
1654
+ }
1655
+ } else {
1656
+ self::$customizer_values = false;
1657
+ }
1658
+ }
1659
+
1660
+ protected static function get_current_values() {
1661
+ $store_type = self::get_plugin_option( 'values_store_mod', 'option' );
1662
+ if ( $store_type === 'option' ) {
1663
+ self::$current_values = get_option( self::$opt_name );
1664
+ } elseif ( $store_type === 'theme_mod' ) {
1665
+ self::$current_values = get_theme_mod( self::$opt_name );
1666
+ }
1667
+ }
1668
+
1669
+ public function get_options() {
1670
+
1671
+ $settings = array();
1672
+
1673
+ if ( isset ( self::$customizer_config['panels'] ) ) {
1674
+
1675
+ foreach ( self::$customizer_config['panels'] as $pane_id => $panel_settings ) {
1676
+
1677
+ if ( isset( $panel_settings['sections'] ) ) {
1678
+ foreach ( $panel_settings['sections'] as $section_id => $section_settings ) {
1679
+ if ( isset( $section_settings['options'] ) ) {
1680
+ foreach ( $section_settings['options'] as $option_id => $option ) {
1681
+ $settings[ $option_id ] = $option;
1682
+ if ( isset( self::$current_values[ $option_id ] ) ) {
1683
+ $settings[ $option_id ]['value'] = self::$current_values[ $option_id ];
1684
+ }
1685
+ }
1686
+ }
1687
+ }
1688
+ }
1689
+ }
1690
+ }
1691
+
1692
+ if ( isset ( self::$customizer_config['sections'] ) ) {
1693
+ foreach ( self::$customizer_config['sections'] as $section_id => $section_settings ) {
1694
+ if ( isset( $section_settings['options'] ) ) {
1695
+ foreach ( $section_settings['options'] as $option_id => $option ) {
1696
+ $settings[ $option_id ] = $option;
1697
+ if ( isset( self::$current_values[ $option_id ] ) ) {
1698
+ $settings[ $option_id ]['value'] = self::$current_values[ $option_id ];
1699
+ }
1700
+ }
1701
+ }
1702
+ }
1703
+ }
1704
+
1705
+ return $settings;
1706
+ }
1707
+
1708
+ protected static function get_value( $option ) {
1709
+
1710
+ if ( isset( self::$customizer_values[ self::$opt_name . '[' . $option . ']' ] ) ) {
1711
+ return self::$customizer_values[ self::$opt_name . '[' . $option . ']' ];
1712
+ }
1713
+
1714
+ // shim
1715
+ if ( strpos( $option, self::$opt_name . '[' ) !== false ) {
1716
+ // get only the setting id
1717
+ $option = explode( '[', $option );
1718
+ $option = rtrim( $option[1], ']' );
1719
+ }
1720
+
1721
+ if ( isset( self::$current_values[ $option ] ) ) {
1722
+ return self::$current_values[ $option ];
1723
+ }
1724
+
1725
+ return null;
1726
+ }
1727
+
1728
+ /**
1729
+ * A public function to retreat an option's value
1730
+ * If there is a value and return it
1731
+ * Otherwise try to get the default parameter or the default from config
1732
+ *
1733
+ * @param $option
1734
+ * @param null $default
1735
+ *
1736
+ * @return bool|null|string
1737
+ */
1738
+ static function get_option( $option, $default = null ) {
1739
+
1740
+ $return = self::get_value( $option );
1741
+
1742
+ if ( $return !== null ) {
1743
+ return $return;
1744
+ } elseif ( $default !== null ) {
1745
+ return $default;
1746
+ } elseif ( isset( self::$options_list[ $option ] ) && isset( self::$options_list[ $option ]['default'] ) ) {
1747
+ return self::$options_list[ $option ]['default'];
1748
+ }
1749
+
1750
+ return null;
1751
+ }
1752
+
1753
+ static function has_option( $option ) {
1754
+
1755
+ if ( isset( self::$options_list[ $option ] ) ) {
1756
+ return true;
1757
+ }
1758
+
1759
+ return false;
1760
+ }
1761
+
1762
+ protected static function get_config() {
1763
+ // @TODO maybe check this
1764
+ return include 'plugin-config.php';
1765
+ }
1766
+
1767
+ /**
1768
+ * Get an option's value from the config file
1769
+ *
1770
+ * @param $option
1771
+ * @param null $default
1772
+ *
1773
+ * @return bool|null
1774
+ */
1775
+ public static function get_config_option( $option, $default = null ) {
1776
+
1777
+ if ( isset( self::$config[ $option ] ) ) {
1778
+ return self::$config[ $option ];
1779
+ } elseif ( $default !== null ) {
1780
+ return $default;
1781
+ }
1782
+
1783
+ return false;
1784
+ }
1785
+
1786
+ static function get_plugin_option( $option, $default = null ) {
1787
+
1788
+ if ( isset( self::$plugin_settings[ $option ] ) ) {
1789
+ return self::$plugin_settings[ $option ];
1790
+ } elseif ( $default !== null ) {
1791
+ return $default;
1792
+ }
1793
+
1794
+ return false;
1795
+ }
1796
+
1797
  /**
1798
  * Sanitize functions
1799
  */
1881
 
1882
  return $str;
1883
  }
1884
+ }
css/admin.css CHANGED
@@ -1,36 +1,29 @@
1
  /* This stylesheet is used to style the admin option form of the plugin. */
2
  .extendable_options {
3
  height: 0;
4
- overflow: hidden;
5
- }
6
 
7
  fieldset.group {
8
  border-left: 1px solid #333;
9
- padding-left: 20px;
10
- }
11
 
12
  .postbox h3.hndle {
13
  padding: 7px;
14
- font-size: 15px;
15
- }
16
  .postbox .row {
17
  width: 100%;
18
  display: inline-block;
19
- padding: 5px 0;
20
- }
21
- .postbox .row .field {
22
- width: 100%;
23
- display: inline-block;
24
- padding: 5px 0;
25
- }
26
- .postbox .row .group {
27
- border: 1px solid rgba(203, 203, 203, 0.2);
28
- background-color: rgba(203, 203, 203, 0.2);
29
- padding-left: 15px;
30
- margin-left: 5px;
31
- }
32
- .postbox .uninstall_area {
33
- margin-top: 15px;
34
- }
35
 
36
- /*# sourceMappingURL=admin.css.map */
 
1
  /* This stylesheet is used to style the admin option form of the plugin. */
2
  .extendable_options {
3
  height: 0;
4
+ overflow: hidden; }
 
5
 
6
  fieldset.group {
7
  border-left: 1px solid #333;
8
+ padding-left: 20px; }
 
9
 
10
  .postbox h3.hndle {
11
  padding: 7px;
12
+ font-size: 15px; }
13
+
14
  .postbox .row {
15
  width: 100%;
16
  display: inline-block;
17
+ padding: 5px 0; }
18
+ .postbox .row .field {
19
+ width: 100%;
20
+ display: inline-block;
21
+ padding: 5px 0; }
22
+ .postbox .row .group {
23
+ border: 1px solid rgba(203, 203, 203, 0.2);
24
+ background-color: rgba(203, 203, 203, 0.2);
25
+ padding-left: 15px;
26
+ margin-left: 5px; }
 
 
 
 
 
 
27
 
28
+ .postbox .uninstall_area {
29
+ margin-top: 15px; }
css/customizer.css CHANGED
@@ -1,55 +1,85 @@
1
  .wp-full-overlay-sidebar * {
2
- box-sizing: border-box;
3
- }
4
 
5
  .accordion-section-content {
6
- overflow: visible;
7
- }
8
 
9
  .control-section:not(.control-section-themes) .customize-control {
10
  padding: 0px;
11
  width: 100%;
12
- min-height: auto;
13
- }
14
-
15
- #customize-header-actions {
16
- border-bottom: 0;
17
- }
18
 
19
  .customize-controls-close {
20
  width: 48px;
21
- }
 
 
 
 
 
 
 
 
22
 
23
  #customize-controls .customize-info {
24
- margin-bottom: 0;
25
- }
26
 
27
  .customize-panel-back, .customize-section-back {
28
  height: 74px;
29
- }
 
 
 
 
30
 
31
  #customize-theme-controls .theme * {
32
- box-sizing: content-box;
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  #customize-controls .description {
36
- font-size: 13px;
37
- color: #88B6CE;
38
- text-indent: 0;
39
- }
 
 
 
40
 
41
  .customize-control-description {
42
- margin-top: 6px;
43
- }
44
 
45
  .customize-control {
46
- margin-bottom: 24px;
47
- }
 
 
48
 
49
- /**
50
- * GENERAL Buttons
51
- */
52
- .wp-core-ui .button, .wp-core-ui .button-primary, .wp-core-ui .button-secondary {
 
 
 
53
  width: auto;
54
  padding: 6px 20px;
55
  font-size: 13px;
@@ -61,56 +91,202 @@
61
  background: #AED2E5;
62
  box-shadow: 0px 2px 0px 0px #8DBED7;
63
  border-radius: 4px;
64
- transition: all 0.1s;
65
- }
66
- .wp-core-ui .button:hover, .wp-core-ui .button-primary:hover, .wp-core-ui .button-secondary:hover {
67
- color: white;
68
- text-shadow: none;
69
- background: #98C6DD;
70
- box-shadow: 0px 2px 0px 0px #74A7C2;
71
- }
 
72
  .wp-core-ui .button-primary {
73
  background: #73C5EE;
74
- box-shadow: 0px 2px 0px 0px #57ABD5;
75
- }
76
- .wp-core-ui .button-primary:hover {
77
- background: #58B0DD;
78
- box-shadow: 0px 2px 0px 0px #3F8AAF;
79
- }
80
  .wp-core-ui .reset_section,
81
  .wp-core-ui .reset_panel {
82
  width: 100%;
83
  height: 4em;
84
  display: block;
85
- margin: 0px 0 25px;
86
- }
87
  .wp-core-ui .reset_panel {
88
- margin-top: 10px;
89
- }
90
 
91
- /**
92
- * Separators Titles
93
- */
94
  .separator.label {
95
  display: block;
96
  font-size: 14px;
97
  line-height: 24px;
98
- font-weight: 600;
99
- }
100
 
101
  .customize-control-title, .separator.label {
102
- color: #416B7E;
103
- }
 
 
 
 
 
 
 
 
104
 
105
  .separator.label {
106
  margin-bottom: -3px;
107
  margin-bottom: -15px;
108
- }
 
109
  .separator.large {
110
  margin-top: 12px;
111
  font-size: 16px;
112
- color: #39474D;
113
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap:after {
116
  content: "";
@@ -122,10 +298,9 @@
122
  height: 0;
123
  border-width: 0 9px 9px 9px;
124
  border-style: solid;
125
- border-color: transparent transparent #fff transparent;
126
- }
127
 
128
- .customize-control input[type=text],
129
  .customize-control input[type=checkbox],
130
  .customize-control input[type=password],
131
  .customize-control input[type=color],
@@ -143,7 +318,7 @@
143
  .customize-control input[type=search],
144
  .customize-control select,
145
  .customize-control textarea,
146
- .customize-control input[type="number"].range-value {
147
  width: 100%;
148
  height: 44px;
149
  padding: 10px 14px;
@@ -153,132 +328,133 @@
153
  font-size: 14px;
154
  line-height: 1.5;
155
  color: #416B7E;
156
- outline: 0;
157
- }
158
- .customize-control input[type=text]:focus,
159
- .customize-control input[type=checkbox]:focus,
160
- .customize-control input[type=password]:focus,
161
- .customize-control input[type=color]:focus,
162
- .customize-control input[type=date]:focus,
163
- .customize-control input[type=datetime]:focus,
164
- .customize-control input[type=datetime-local]:focus,
165
- .customize-control input[type=email]:focus,
166
- .customize-control input[type=month]:focus,
167
- .customize-control input[type=number]:focus,
168
- .customize-control input[type=radio]:focus,
169
- .customize-control input[type=tel]:focus,
170
- .customize-control input[type=time]:focus,
171
- .customize-control input[type=url]:focus,
172
- .customize-control input[type=week]:focus,
173
- .customize-control input[type=search]:focus,
174
- .customize-control select:focus,
175
- .customize-control textarea:focus,
176
- .customize-control input[type="number"].range-value:focus {
177
- border-color: #73C5EE;
178
- box-shadow: none;
179
- }
 
 
 
 
 
 
 
 
 
180
  .customize-control input[type=text],
181
  .customize-control textarea {
182
- font-size: 13px;
183
- }
184
  .customize-control textarea {
185
- height: auto;
186
- }
187
  .customize-control input[type=checkbox],
188
  .customize-control input[type=radio] {
189
  width: 22px;
190
- height: 22px;
191
- }
192
- .customize-control input[type=checkbox]:checked,
193
- .customize-control input[type=radio]:checked {
194
- background: #73C5EE;
195
- border-color: #5AB9E8;
196
- }
197
- .customize-control input[type=checkbox]:checked:before,
198
- .customize-control input[type=radio]:checked:before {
199
- color: white;
200
- margin: -1px 0 0 -2px;
201
- }
202
- .customize-control.customize-control-checkbox label, .customize-control.customize-control-radio label {
203
  margin-left: 30px;
204
  padding-top: 0;
205
  padding-bottom: 0;
206
- text-indent: -6px;
207
- color: #416B7E;
208
- }
 
 
 
 
 
 
 
 
 
 
209
  .customize-control input[type=radio] {
210
- border-radius: 50%;
211
- }
212
- .customize-control input[type=radio]:checked:before {
213
- content: none;
214
- }
215
  .customize-control.customize-control-radio label {
216
- margin-top: 12px;
217
- }
218
- .customize-control select {
219
- width: 100%;
220
- -webkit-appearance: button;
221
- -moz-appearance: none;
222
- font-weight: 600;
223
- background: white url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE1cHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTUgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjU2LjAwMDAwMCwgLTM4Ni4wMDAwMDApIiBmaWxsPSIjOThDNkRFIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iVGl0bGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI2LjAwMDAwMCwgMjE5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1TZWxlY3QtQ29weSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU2VsZWN0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI1NC40ODEyLDE4IEwyNTYsMTkuNTE0IEwyNDguNSwyNyBMMjQxLDE5LjUxNCBMMjQyLjUxODgsMTggTDI0OC41LDIzLjk2NzIgTDI1NC40ODEyLDE4IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
224
- background-position: right 16px top 16px;
225
- }
226
- .customize-control select[multiple] {
227
- background: white;
228
- }
229
  .customize-control input[type="range"] {
230
- width: 65%;
231
- }
232
  .customize-control input[type="range"] {
233
  position: relative;
234
  -webkit-appearance: none;
235
- width: 210px;
236
  height: 22px;
237
  overflow: hidden;
238
  outline: none;
239
- background: none;
240
- }
241
- .customize-control input[type="range"]:before {
242
- content: " ";
243
- position: absolute;
244
- top: 8px;
245
- left: 0;
246
- height: 6px;
247
- width: 100%;
248
- background: #DFE8EF;
249
- box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3);
250
- border-radius: 10px;
251
- }
252
- .customize-control input[type="range"]::-webkit-slider-thumb {
253
- -webkit-appearance: none;
254
- width: 22px;
255
- height: 22px;
256
- background: #27ae60;
257
- position: relative;
258
- z-index: 3;
259
- background: #FFFFFF;
260
- border: 2px solid #B8DAEB;
261
- border-radius: 4px;
262
- }
263
- .customize-control input[type="range"]::-webkit-slider-thumb:before {
264
- content: "..";
265
- position: absolute;
266
- left: 5px;
267
- top: -5px;
268
- color: #B8DAEB;
269
- font-size: 1em;
270
- letter-spacing: 1px;
271
- }
272
- .customize-control input[type="range"]::-webkit-slider-thumb:after {
273
- content: " ";
274
- width: 210px;
275
- height: 6px;
276
- position: absolute;
277
- z-index: 1;
278
- right: 20px;
279
- top: 6px;
280
- background: #73C5EE;
281
- }
282
  .customize-control input[type="number"].range-value {
283
  min-width: 40px;
284
  max-width: 80px;
@@ -290,133 +466,113 @@
290
  margin-left: 10px;
291
  font-size: 13px;
292
  line-height: 1;
293
- text-align: center;
294
- }
295
  .customize-control input[type=number]::-webkit-inner-spin-button,
296
  .customize-control input[type=number]::-webkit-outer-spin-button {
297
  -webkit-appearance: none;
298
- margin: 0;
299
- }
300
 
301
  .customize-control-color {
302
- display: block;
303
- }
304
- .customize-control-color .customize-control-title, .customize-control-color .separator.label {
305
- float: left;
306
- }
307
- .customize-control-color .wp-picker-container {
308
- position: relative;
309
- float: right;
310
- top: -3px;
311
- }
312
- .customize-control-color .wp-picker-container .wp-picker-holder {
313
- position: relative;
314
- }
315
- .customize-control-color .wp-picker-container .iris-picker {
316
- position: absolute;
317
- top: 40px;
318
- right: 0;
319
- z-index: 1000;
320
- width: 275px !important;
321
- border-top: none;
322
- border-color: #DFDFDE;
323
- border-radius: 0 0 3px 3px;
324
- border: none;
325
- background: white;
326
- }
327
- .customize-control-color .wp-picker-container .iris-picker .iris-square {
328
- width: 215px !important;
329
- height: 173px !important;
330
- margin-right: 0;
331
- }
332
- .customize-control-color .wp-picker-container .iris-picker .iris-strip {
333
- float: right;
334
- box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
335
- }
336
- .customize-control-color .wp-picker-container .iris-picker .iris-strip .ui-slider-handle {
337
- border-color: #aaa !important;
338
- opacity: 1;
339
- box-shadow: none;
340
- }
341
- .customize-control-color .wp-picker-container .iris-picker .iris-palette {
342
- width: 24px !important;
343
- height: 24px !important;
344
- border-radius: 50px;
345
- box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
346
- }
347
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap {
348
- position: absolute;
349
- z-index: 1000;
350
- top: 35px;
351
- right: 0;
352
- width: 275px;
353
- padding: 9px 12px;
354
- background: white;
355
- border: none;
356
- border-radius: 3px 3px 0 0;
357
- }
358
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.wp-color-picker {
359
- float: left;
360
- width: 100px;
361
- font-size: 13px;
362
- text-align: left;
363
- margin: 0;
364
- padding: 6px 12px;
365
- height: auto;
366
- }
367
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.button {
368
- float: right;
369
- padding: 4px 12px;
370
- height: 30px;
371
- }
372
- .customize-control-color .wp-color-result {
373
- top: 0;
374
- height: 30px;
375
- width: 40px;
376
- margin: 0;
377
- padding: 0;
378
- border-radius: 4px;
379
- background: #2ECC71;
380
- border: 2px solid #B8DAEB;
381
- box-shadow: none;
382
- }
383
- .customize-control-color .wp-color-result:after {
384
- display: none;
385
- }
386
 
387
  #accordion-section-live_css_edit_section .customize-section-title {
388
  margin-top: -13px;
389
- border-bottom: 1px solid #ddd;
390
- }
391
  #accordion-section-live_css_edit_section #css_editor {
392
  top: 70px;
393
  border-top: 10px solid white;
394
- overflow: visible;
395
- }
396
- #accordion-section-live_css_edit_section #css_editor:before {
397
- content: "";
398
- width: 48px;
399
- height: 10px;
400
- display: block;
401
- background: #e8e8e8;
402
- top: -10px;
403
- position: absolute;
404
- z-index: 10000000;
405
- left: 0;
406
- }
407
  #accordion-section-live_css_edit_section .ace_scroller {
408
- padding-left: 10px;
409
- }
410
 
411
  .wp-full-overlay.editor_opened {
412
- margin-left: 500px;
413
- }
414
- .wp-full-overlay.editor_opened #customize-controls {
415
- width: 500px;
416
- }
417
- .wp-full-overlay.editor_opened.collapsed #customize-controls {
418
- width: 300px;
419
- }
420
 
421
  .customize-control-media .current,
422
  .customize-control-site_icon .current,
@@ -425,62 +581,52 @@ li#customize-control-site_logo .current {
425
  min-height: 44px;
426
  background: #F5FCFF;
427
  border: 2px solid #B8DAEB;
428
- border-radius: 4px;
429
- }
430
- .customize-control-media .current .container, .customize-control-media .current span,
431
- .customize-control-site_icon .current .container,
432
- .customize-control-site_icon .current span,
433
- li#customize-control-site_logo .current .container,
434
- li#customize-control-site_logo .current span {
435
- border: none;
436
- }
437
  .customize-control-media .inner, .customize-control-media .current span,
438
  .customize-control-site_icon .inner,
439
  .customize-control-site_icon .current span,
440
  li#customize-control-site_logo .inner,
441
  li#customize-control-site_logo .current span {
442
  font-size: 13px;
443
- color: #98C6DD;
444
- }
445
  .customize-control-media .inner,
446
  .customize-control-site_icon .inner,
447
  li#customize-control-site_logo .inner {
448
- line-height: 1.4;
449
- }
450
  .customize-control-media .thumbnail-image,
451
  .customize-control-site_icon .thumbnail-image,
452
  li#customize-control-site_logo .thumbnail-image {
453
  padding: 14px;
454
- text-align: center;
455
- }
456
- .customize-control-media .thumbnail-image img,
457
- .customize-control-site_icon .thumbnail-image img,
458
- li#customize-control-site_logo .thumbnail-image img {
459
- width: auto;
460
- }
461
  .customize-control-media .actions,
462
  .customize-control-site_icon .actions,
463
  li#customize-control-site_logo .actions {
464
- margin-bottom: 0;
465
- }
466
 
467
- /**
468
- * Typography
469
- */
470
- .customize-control-typography select {
471
- margin-bottom: 10px;
472
- }
473
- .customize-control-typography .description {
474
- margin-top: -3px;
475
- }
476
- .customize-control-typography ul li {
477
  width: 100%;
478
- margin: 0;
479
- }
480
 
481
- /**
482
- ** Awesome presets
483
- */
484
  .default-preset-button {
485
  background-color: #F5F6F6;
486
  float: right;
@@ -489,13 +635,11 @@ li#customize-control-site_logo .actions {
489
  border: 1px solid #CBCBCB;
490
  margin-right: 4px;
491
  font-family: "Open Sans",sans-serif;
492
- font-size: 13px;
493
- }
494
 
495
  .customize-control-preset .description {
496
  margin-right: 5px;
497
- font-style: normal;
498
- }
499
 
500
  .customify_preset.radio_buttons .customify_radio_button {
501
  border: none;
@@ -504,34 +648,28 @@ li#customize-control-site_logo .actions {
504
  margin: 3px;
505
  position: relative;
506
  overflow: hidden;
507
- height: auto;
508
- }
509
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"] {
510
- opacity: 0;
511
- width: 100%;
512
- height: 100%;
513
- position: absolute;
514
- z-index: 9999;
515
- }
516
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label {
517
- background-color: #ebebeb;
518
- }
519
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:before {
520
- content: '>';
521
- color: inherit;
522
- }
523
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:after {
524
- content: '<';
525
- color: inherit;
526
- }
527
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked:before {
528
- opacity: 0;
529
- }
530
- .customify_preset.radio_buttons .customify_radio_button label {
531
- position: relative;
532
- z-index: 999;
533
- border-left: 4px solid;
534
- }
535
  .customify_preset .awesome_preset {
536
  width: 45%;
537
  position: relative;
@@ -540,152 +678,131 @@ li#customize-control-site_logo .actions {
540
  color: white;
541
  margin-top: 5px;
542
  margin-bottom: 25px;
543
- transition: all 0.2s;
544
- }
545
- .customify_preset .awesome_preset:hover {
546
- opacity: 0.9;
547
- }
548
- .customify_preset .awesome_preset:before {
549
- content: '';
550
- position: absolute;
551
- top: 1px;
552
- left: 1px;
553
- right: 1px;
554
- bottom: 1px;
555
- border: 1px solid #FFF;
556
- background: transparent;
557
- opacity: .5;
558
- border-radius: 4px;
559
- z-index: 5;
560
- }
561
- .customify_preset .awesome_preset .preset-wrap .preset-color {
562
- height: 128px;
563
- border-radius: 4px 4px 0 0;
564
- padding: 17px 0 27px;
565
- }
566
- .customify_preset .awesome_preset .preset-wrap .preset-color .first-font {
567
- display: inline-block;
568
- width: 100%;
569
- font-size: 55px;
570
- line-height: 1;
571
- }
572
- .customify_preset .awesome_preset .preset-wrap .preset-color .secondary-font {
573
- display: inline-block;
574
- width: 100%;
575
- font-size: 20px;
576
- line-height: 1;
577
- margin-top: 8px;
578
- }
579
- .customify_preset .awesome_preset .preset-wrap .preset-name {
580
- position: relative;
581
- font-size: 11px;
582
- text-transform: UPPERCASE;
583
- border-radius: 0 0 4px 4px;
584
- padding: 1px;
585
- }
586
- .customify_preset .awesome_preset .preset-wrap .preset-name:before {
587
- content: '';
588
- position: absolute;
589
- border-color: inherit;
590
- border: 10px solid;
591
- border-left-color: transparent;
592
- border-right-color: transparent;
593
- border-top: transparent;
594
- top: -10px;
595
- border-bottom-color: inherit;
596
- left: 40%;
597
- }
598
- .customify_preset .awesome_preset:nth-child(odd) {
599
- margin-right: 7%;
600
- }
601
- .customify_preset .awesome_preset input[type=radio] {
602
- height: 100%;
603
- width: 100%;
604
- position: absolute;
605
- border: 0;
606
- box-shadow: none;
607
- color: #006505;
608
- background-color: transparent;
609
- border-radius: 0;
610
- margin: 0;
611
- display: inline-block;
612
- top: 0;
613
- left: 0;
614
- z-index: 10;
615
- }
616
- .customify_preset .awesome_preset input[type=radio]:checked:before {
617
- position: absolute;
618
- height: 25px;
619
- width: 25px;
620
- top: -13px;
621
- right: -14px;
622
- background: #FFF;
623
- z-index: 1;
624
- }
625
- .customify_preset .awesome_preset input[type=radio]:checked:after {
626
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
627
- filter: alpha(opacity=0);
628
- content: '';
629
- position: absolute;
630
- width: 26px;
631
- height: 26px;
632
- border-radius: 50%;
633
- top: -5px;
634
- right: -5px;
635
- z-index: 10;
636
- background: #73C5EE url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjEzcHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTMgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgLTQwOC4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1DaGVja2JveC1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNy4wMDAwMDAsIDI0OS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkNoZWNrYm94IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAuMDM4NDk1LDE2IEwxNy4xMTYxMzc1LDguOTIxNDg3NiBMMTUuMTk0NjQ5OCw3IEwxMC4wMzg0OTUsMTIuMTU1MDY3NCBMNi45MjE0ODc2LDkuMDM4OTI5OTcgTDUsMTAuOTYwNDE3NiBMMTAuMDM4NDk1LDE2IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
637
- background-position: center center;
638
- }
639
 
640
  .customify_radio_image {
641
- display: inline-block;
642
- }
643
- .customify_radio_image label {
644
- display: block;
645
- float: left;
646
- margin-right: 10px;
647
- position: relative;
648
- }
649
- .customify_radio_image label input[type=radio] {
650
- position: absolute;
651
- top: 0;
652
- bottom: 0;
653
- left: 0;
654
- right: 0;
655
- width: 100%;
656
- height: 100%;
657
- visibility: hidden;
658
- }
659
- .customify_radio_image label input[type=radio] img {
660
- cursor: pointer;
661
- border: 2px solid transparent;
662
- }
663
- .customify_radio_image label input[type=radio]:checked + img {
664
- border: 3px solid #73C5EE;
665
- }
666
 
667
  .customify_ace_editor {
668
  display: block;
669
  min-height: 200px;
670
- border: 1px solid #ddd;
671
- }
672
 
673
  .customize-control-custom_background .hide {
674
- display: none;
675
- }
676
  .customize-control-custom_background .upload_button_div {
677
- margin: 10px 0;
678
- }
679
- .customize-control-custom_background .upload_button_div > * {
680
- margin-right: 10px;
681
- }
682
  .customize-control-custom_background .preview_screenshot {
683
  text-align: center;
684
- margin: 10px 0;
685
- }
686
- .customize-control-custom_background .preview_screenshot img {
687
- border: 2px solid #ccc;
688
- }
689
 
690
  #customify_import_demo_data_button {
691
  width: 70%;
@@ -693,80 +810,59 @@ li#customize-control-site_logo .actions {
693
  padding: 10px;
694
  display: inline-block;
695
  height: auto;
696
- margin: 0 15% 10% 15%;
697
- }
698
 
699
  .import_step_note {
700
  margin: 5px;
701
  width: 100%;
702
- display: inline-block;
703
- }
704
- .import_step_note:before {
705
- content: "\1F449";
706
- }
707
- .import_step_note.success:before {
708
- content: "\1F44D";
709
- }
710
- .import_step_note.failed:before {
711
- content: "\274C";
712
- }
713
 
714
  #customize-header-actions {
715
  background: #ffffff;
716
- border-color: #dfe8ef;
717
- }
718
-
719
- .customize-controls-close {
720
- color: #7da9c3;
721
- background: #ffffff;
722
- border-color: #dfe8ef;
723
- }
724
- .customize-controls-close:focus, .customize-controls-close:hover {
725
- background: #f5fcff;
726
- }
727
 
728
  .wp-full-overlay-sidebar,
729
  .customize-themes-panel {
730
  background: #eaf9fe;
731
- border-right: 1px solid #dfe8ef;
732
- }
733
 
734
  #customize-theme-controls #accordion-section-menu_locations {
735
- border-bottom: 1px solid #dfe8ef;
736
- }
737
 
738
  #customize-controls #accordion-section-themes > .accordion-section-title {
739
  font-weight: 600;
740
- border-bottom: 1px solid #dfe8ef;
741
- }
742
- #customize-controls #accordion-section-themes > .accordion-section-title:hover {
743
- background: #fff;
744
- }
745
  #customize-controls .panel-meta.customize-info {
746
- border-bottom: none;
747
- }
748
 
749
  #customize-theme-controls .control-section .accordion-section-title {
750
  font-weight: 400;
751
- border-top: 1px solid #dfe8ef;
752
- border-bottom: none;
753
- }
754
  #customize-theme-controls .control-section:last-of-type > .accordion-section-title {
755
- border-bottom: 1px solid #dfe8ef;
756
- }
757
  #customize-theme-controls .customize-section-title {
758
- border-top: 1px solid #dfe8ef;
759
- border-bottom: 1px solid #dfe8ef;
760
- }
761
 
762
  #customize-controls .control-section .accordion-section-title:focus, #customize-controls .control-section .accordion-section-title:hover, #customize-controls .control-section.open .accordion-section-title, #customize-controls .control-section:hover > .accordion-section-title {
763
  color: #056184;
764
  background: #f5fcff;
765
- }
766
 
767
  [data-balloon] {
768
- position: relative;
769
- }
770
 
771
  [data-balloon]::before {
772
  opacity: 0;
@@ -780,8 +876,7 @@ li#customize-control-site_logo .actions {
780
  padding: .5em 1em;
781
  position: absolute;
782
  white-space: nowrap;
783
- z-index: 10;
784
- }
785
 
786
  [data-balloon]::after {
787
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(0)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
@@ -793,44 +888,44 @@ li#customize-control-site_logo .actions {
793
  transition: all .18s ease-out;
794
  content: '';
795
  position: absolute;
796
- z-index: 10;
797
- }
798
 
799
  [data-balloon]:hover::before, [data-balloon]:hover::after {
800
  opacity: 1;
801
- pointer-events: auto;
802
- }
803
 
804
  [data-balloon][data-balloon-pos="up"]::before {
805
  bottom: 100%;
806
  left: 50%;
807
  margin-bottom: 11px;
808
- transform: translate3d(-50%, 10px, 0);
809
- transform-origin: top;
810
- }
 
811
 
812
  [data-balloon][data-balloon-pos="up"]::after {
813
  bottom: 100%;
814
  left: 50%;
815
  margin-bottom: 5px;
816
- transform: translate3d(-50%, 10px, 0);
817
- transform-origin: top;
818
- }
 
819
 
820
  [data-balloon][data-balloon-pos="up"]:hover::before {
821
- transform: translate3d(-50%, 0, 0);
822
- }
823
 
824
  [data-balloon][data-balloon-pos="up"]:hover::after {
825
- transform: translate3d(-50%, 0, 0);
826
- }
827
 
828
  [data-balloon][data-balloon-pos='down']::before {
829
  left: 50%;
830
  margin-top: 11px;
831
  top: 100%;
832
- transform: translate3d(-50%, -10px, 0);
833
- }
834
 
835
  [data-balloon][data-balloon-pos='down']::after {
836
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(180 18 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
@@ -840,23 +935,23 @@ li#customize-control-site_logo .actions {
840
  left: 50%;
841
  margin-top: 5px;
842
  top: 100%;
843
- transform: translate3d(-50%, -10px, 0);
844
- }
845
 
846
  [data-balloon][data-balloon-pos='down']:hover::before {
847
- transform: translate3d(-50%, 0, 0);
848
- }
849
 
850
  [data-balloon][data-balloon-pos='down']:hover::after {
851
- transform: translate3d(-50%, 0, 0);
852
- }
853
 
854
  [data-balloon][data-balloon-pos='left']::before {
855
  margin-right: 11px;
856
  right: 100%;
857
  top: 50%;
858
- transform: translate3d(10px, -50%, 0);
859
- }
860
 
861
  [data-balloon][data-balloon-pos='left']::after {
862
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(-90 18 18)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
@@ -866,23 +961,23 @@ li#customize-control-site_logo .actions {
866
  margin-right: 5px;
867
  right: 100%;
868
  top: 50%;
869
- transform: translate3d(10px, -50%, 0);
870
- }
871
 
872
  [data-balloon][data-balloon-pos='left']:hover::before {
873
- transform: translate3d(0, -50%, 0);
874
- }
875
 
876
  [data-balloon][data-balloon-pos='left']:hover::after {
877
- transform: translate3d(0, -50%, 0);
878
- }
879
 
880
  [data-balloon][data-balloon-pos='right']::before {
881
  left: 100%;
882
  margin-left: 11px;
883
  top: 50%;
884
- transform: translate3d(-10px, -50%, 0);
885
- }
886
 
887
  [data-balloon][data-balloon-pos='right']::after {
888
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(90 6 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
@@ -892,46 +987,69 @@ li#customize-control-site_logo .actions {
892
  left: 100%;
893
  margin-left: 5px;
894
  top: 50%;
895
- transform: translate3d(-10px, -50%, 0);
896
- }
897
 
898
  [data-balloon][data-balloon-pos='right']:hover::before {
899
- transform: translate3d(0, -50%, 0);
900
- }
901
 
902
  [data-balloon][data-balloon-pos='right']:hover::after {
903
- transform: translate3d(0, -50%, 0);
904
- }
905
 
906
  [data-balloon][data-balloon-length='small']::before {
907
  white-space: normal;
908
- width: 80px;
909
- }
910
 
911
  [data-balloon][data-balloon-length='medium']::before {
912
  white-space: normal;
913
- width: 150px;
914
- }
915
 
916
  [data-balloon][data-balloon-length='large']::before {
917
  white-space: normal;
918
- width: 260px;
919
- }
920
 
921
  [data-balloon][data-balloon-length='xlarge']::before {
922
  white-space: normal;
923
- width: 380px;
924
- }
925
 
926
  @media screen and (max-width: 768px) {
927
  [data-balloon][data-balloon-length='xlarge']::before {
928
  white-space: normal;
929
- width: 90vw;
930
- }
931
- }
932
  [data-balloon][data-balloon-length='fit']::before {
933
  white-space: normal;
934
- width: 100%;
935
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936
 
937
- /*# sourceMappingURL=customizer.css.map */
 
1
  .wp-full-overlay-sidebar * {
2
+ box-sizing: border-box; }
 
3
 
4
  .accordion-section-content {
5
+ overflow: visible; }
 
6
 
7
  .control-section:not(.control-section-themes) .customize-control {
8
  padding: 0px;
9
  width: 100%;
10
+ min-height: initial; }
 
 
 
 
 
11
 
12
  .customize-controls-close {
13
  width: 48px;
14
+ height: 44px;
15
+ color: #7da9c3;
16
+ background: #ffffff;
17
+ border-top: none;
18
+ border-right-color: #e0e8ef; }
19
+ .customize-controls-close:focus, .customize-controls-close:hover {
20
+ background: #f5fcff; }
21
+ .customize-controls-close:before {
22
+ top: 0px; }
23
 
24
  #customize-controls .customize-info {
25
+ border-bottom-color: #e0e8ef; }
 
26
 
27
  .customize-panel-back, .customize-section-back {
28
  height: 74px;
29
+ color: #7da9c3;
30
+ border-right-color: #e0e8ef; }
31
+ .customize-panel-back:hover, .customize-panel-back:focus, .customize-section-back:hover, .customize-section-back:focus {
32
+ border-left-color: #f5fcff;
33
+ background: #f5fcff; }
34
 
35
  #customize-theme-controls .theme * {
36
+ box-sizing: content-box; }
37
+
38
+ #customize-theme-controls .accordion-section-content {
39
+ padding: 17px; }
40
+
41
+ #customize-theme-controls .customize-section-title {
42
+ margin-top: -17px;
43
+ margin-right: -17px; }
44
+
45
+ #customize-theme-controls .control-panel-content .control-section:nth-child(2),
46
+ #customize-theme-controls .control-panel-content .control-section:nth-child(3) {
47
+ border-top: none; }
48
+
49
+ #customize-theme-controls .control-panel-content .control-section:nth-last-child(2) {
50
+ border-bottom: 1px solid #e0e8ef; }
51
+
52
+ #customize-theme-controls #accordion-section-add_menu {
53
+ text-align: right;
54
+ overflow: visible; }
55
+ #customize-theme-controls #accordion-section-add_menu .add-menu-toggle {
56
+ float: none; }
57
 
58
  #customize-controls .description {
59
+ margin-bottom: 9px;
60
+ font-size: 12px;
61
+ font-weight: 300;
62
+ font-style: normal;
63
+ line-height: 1.6;
64
+ color: #4d7b90;
65
+ text-indent: 0; }
66
 
67
  .customize-control-description {
68
+ margin-top: 6px; }
 
69
 
70
  .customize-control {
71
+ margin-bottom: 24px; }
72
+
73
+ #accordion-section-themes + .control-section {
74
+ border-top: none; }
75
 
76
+ #customize-controls .panel-meta.customize-info .accordion-section-title {
77
+ border-top: none;
78
+ height: 74px; }
79
+
80
+ .wp-core-ui .button:not(.theme-details):not(.collapse-sidebar),
81
+ .wp-core-ui .button-primary,
82
+ .wp-core-ui .button-secondary {
83
  width: auto;
84
  padding: 6px 20px;
85
  font-size: 13px;
91
  background: #AED2E5;
92
  box-shadow: 0px 2px 0px 0px #8DBED7;
93
  border-radius: 4px;
94
+ transition: all 0.1s; }
95
+ .wp-core-ui .button:not(.theme-details):not(.collapse-sidebar):hover,
96
+ .wp-core-ui .button-primary:hover,
97
+ .wp-core-ui .button-secondary:hover {
98
+ color: white;
99
+ text-shadow: none;
100
+ background: #98C6DD;
101
+ box-shadow: 0px 2px 0px 0px #74A7C2; }
102
+
103
  .wp-core-ui .button-primary {
104
  background: #73C5EE;
105
+ box-shadow: 0px 2px 0px 0px #57ABD5; }
106
+ .wp-core-ui .button-primary:hover {
107
+ background: #58B0DD;
108
+ box-shadow: 0px 2px 0px 0px #3F8AAF; }
109
+
 
110
  .wp-core-ui .reset_section,
111
  .wp-core-ui .reset_panel {
112
  width: 100%;
113
  height: 4em;
114
  display: block;
115
+ margin: 0px 0 25px; }
116
+
117
  .wp-core-ui .reset_panel {
118
+ margin-top: 10px; }
 
119
 
 
 
 
120
  .separator.label {
121
  display: block;
122
  font-size: 14px;
123
  line-height: 24px;
124
+ font-weight: 600; }
 
125
 
126
  .customize-control-title, .separator.label {
127
+ color: #416B7E; }
128
+
129
+ .separator.section:before, .separator.sub-section:before {
130
+ content: "";
131
+ position: absolute;
132
+ top: 0;
133
+ bottom: 0;
134
+ left: -18px;
135
+ right: -18px;
136
+ z-index: -1; }
137
 
138
  .separator.label {
139
  margin-bottom: -3px;
140
  margin-bottom: -15px;
141
+ font-weight: 500; }
142
+
143
  .separator.large {
144
  margin-top: 12px;
145
  font-size: 16px;
146
+ color: #39474D; }
147
+
148
+ .separator.section {
149
+ position: relative;
150
+ padding: 14px 0;
151
+ margin-bottom: 0;
152
+ background: none;
153
+ border: none; }
154
+ .separator.section[id*="layout"] {
155
+ margin-top: 0; }
156
+ .separator.section[id*="layout"]:before {
157
+ border: none; }
158
+ .separator.section:before {
159
+ border: 1px solid #e0e8ef;
160
+ background-color: #ffffff;
161
+ box-shadow: 0px 1px 0px 0px #DFE8EF; }
162
+
163
+ .separator.sub-section {
164
+ position: relative;
165
+ padding: 12px 0; }
166
+ .separator.sub-section:before {
167
+ border-top: 1px solid #e0e8ef;
168
+ border-bottom: 1px solid #e0e8ef;
169
+ background-color: #f6fbff; }
170
+ .separator.sub-section + span {
171
+ margin-top: 20px;
172
+ font-style: normal; }
173
+
174
+ .section-navigation-wrapper {
175
+ position: relative;
176
+ height: 43px;
177
+ margin: -15px -12px 0 -12px;
178
+ margin-right: -17px;
179
+ margin-left: -17px; }
180
+
181
+ .section-navigation {
182
+ display: -ms-flexbox;
183
+ display: flex;
184
+ margin-top: -1px;
185
+ clear: both;
186
+ border-top: 1px solid #e0e8ef; }
187
+ .section-navigation a {
188
+ -ms-flex: 1 1 auto;
189
+ flex: 1 1 auto;
190
+ display: block;
191
+ padding: 12px 0;
192
+ color: #3b484e;
193
+ background-color: #ffffff;
194
+ border-bottom: 1px solid #e0e8ef;
195
+ border-right: 1px solid #e0e8ef;
196
+ text-align: center;
197
+ text-decoration: none;
198
+ transition: background-color .15s ease-in-out; }
199
+ .section-navigation a:last-child {
200
+ border-right: 0; }
201
+
202
+ .customize-section-description-container + .customize-control {
203
+ margin-bottom: 0; }
204
+
205
+ #customize-controls .customize-info.is-sticky.is-sticky,
206
+ #customize-controls .customize-section-title.is-sticky.is-sticky {
207
+ top: 40px; }
208
+
209
+ #customize-controls .customize-info.is-in-view.is-in-view,
210
+ #customize-controls .customize-section-title.is-in-view.is-in-view {
211
+ box-shadow: none; }
212
+
213
+ #customize-controls .has-nav .customize-info,
214
+ #customize-controls .has-nav .customize-section-title {
215
+ margin-right: -12px; }
216
+
217
+ #customize-controls .customize-section-title.customize-section-title {
218
+ border-bottom: 0; }
219
+
220
+ .customize-section-description-container.section-meta.has-nav {
221
+ margin-bottom: 0; }
222
+
223
+ .font-options__wrapper {
224
+ position: relative; }
225
+ .font-options__wrapper:after {
226
+ content: "";
227
+ position: absolute;
228
+ top: 90%;
229
+ left: 0;
230
+ right: 0;
231
+ z-index: 0;
232
+ display: block;
233
+ height: 100px; }
234
+
235
+ .font-options__head {
236
+ display: -ms-flexbox;
237
+ display: flex;
238
+ -ms-flex-pack: justify;
239
+ justify-content: space-between; }
240
+ .font-options__head.font-options__head {
241
+ -webkit-appearance: none;
242
+ text-overflow: ellipsis;
243
+ white-space: nowrap; }
244
+
245
+ .font-options__font-title {
246
+ margin-right: 26px;
247
+ margin-left: 10px;
248
+ font-size: 12px;
249
+ line-height: 20px;
250
+ font-weight: 300;
251
+ color: #98c6dd;
252
+ text-overflow: ellipsis;
253
+ overflow: hidden;
254
+ white-space: nowrap; }
255
+
256
+ .font-options__options-list {
257
+ position: absolute;
258
+ top: calc(100% + 6px);
259
+ left: -6px;
260
+ right: -6px;
261
+ z-index: 2;
262
+ display: block;
263
+ padding: 10px;
264
+ border: 1px solid #dfe8ef;
265
+ border-radius: 5px;
266
+ background-color: #ffffff;
267
+ opacity: 0;
268
+ display: none;
269
+ transition: opacity .15s linear; }
270
+ .font-options__options-list:last-child {
271
+ margin-bottom: 0; }
272
+ .font-options__options-list:before, .font-options__options-list:after {
273
+ content: "";
274
+ position: absolute;
275
+ top: -20px;
276
+ right: 25px;
277
+ height: 0;
278
+ width: 0;
279
+ border: solid transparent;
280
+ z-index: 10; }
281
+ .font-options__options-list:before {
282
+ border-bottom-color: white;
283
+ border-width: 10px;
284
+ z-index: 11; }
285
+ .font-options__options-list:after {
286
+ border-bottom-color: rgba(0, 0, 0, 0.075);
287
+ border-width: 12px;
288
+ top: -24px;
289
+ right: 23px; }
290
 
291
  .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap:after {
292
  content: "";
298
  height: 0;
299
  border-width: 0 9px 9px 9px;
300
  border-style: solid;
301
+ border-color: transparent transparent #fff transparent; }
 
302
 
303
+ .font-options__head, .customize-control input[type=text],
304
  .customize-control input[type=checkbox],
305
  .customize-control input[type=password],
306
  .customize-control input[type=color],
318
  .customize-control input[type=search],
319
  .customize-control select,
320
  .customize-control textarea,
321
+ .customize-control input[type="number"].range-value, ul.font-options__options-list .select2-container .select2-selection--single {
322
  width: 100%;
323
  height: 44px;
324
  padding: 10px 14px;
328
  font-size: 14px;
329
  line-height: 1.5;
330
  color: #416B7E;
331
+ outline: 0; }
332
+ .font-options__head:focus, .customize-control input[type=text]:focus,
333
+ .customize-control input[type=checkbox]:focus,
334
+ .customize-control input[type=password]:focus,
335
+ .customize-control input[type=color]:focus,
336
+ .customize-control input[type=date]:focus,
337
+ .customize-control input[type=datetime]:focus,
338
+ .customize-control input[type=datetime-local]:focus,
339
+ .customize-control input[type=email]:focus,
340
+ .customize-control input[type=month]:focus,
341
+ .customize-control input[type=number]:focus,
342
+ .customize-control input[type=radio]:focus,
343
+ .customize-control input[type=tel]:focus,
344
+ .customize-control input[type=time]:focus,
345
+ .customize-control input[type=url]:focus,
346
+ .customize-control input[type=week]:focus,
347
+ .customize-control input[type=search]:focus,
348
+ .customize-control select:focus,
349
+ .customize-control textarea:focus,
350
+ .customize-control input[type="number"].range-value:focus, ul.font-options__options-list .select2-container .select2-selection--single:focus {
351
+ border-color: #73C5EE;
352
+ box-shadow: none; }
353
+
354
+ .font-options__head, .customize-control select, ul.font-options__options-list .select2-container .select2-selection--single {
355
+ width: 100%;
356
+ -webkit-appearance: button;
357
+ -moz-appearance: none;
358
+ font-weight: 600;
359
+ background: white url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE1cHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTUgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjU2LjAwMDAwMCwgLTM4Ni4wMDAwMDApIiBmaWxsPSIjOThDNkRFIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iVGl0bGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI2LjAwMDAwMCwgMjE5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1TZWxlY3QtQ29weSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU2VsZWN0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI1NC40ODEyLDE4IEwyNTYsMTkuNTE0IEwyNDguNSwyNyBMMjQxLDE5LjUxNCBMMjQyLjUxODgsMTggTDI0OC41LDIzLjk2NzIgTDI1NC40ODEyLDE4IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
360
+ background-position: right 16px top 16px; }
361
+ [multiple].font-options__head, .customize-control select[multiple], ul.font-options__options-list .select2-container [multiple].select2-selection--single {
362
+ background: white; }
363
+
364
  .customize-control input[type=text],
365
  .customize-control textarea {
366
+ font-size: 13px; }
367
+
368
  .customize-control textarea {
369
+ height: auto; }
370
+
371
  .customize-control input[type=checkbox],
372
  .customize-control input[type=radio] {
373
  width: 22px;
374
+ height: 22px; }
375
+ .customize-control input[type=checkbox]:checked,
376
+ .customize-control input[type=radio]:checked {
377
+ background: #73C5EE;
378
+ border-color: #5AB9E8; }
379
+ .customize-control input[type=checkbox]:checked:before,
380
+ .customize-control input[type=radio]:checked:before {
381
+ color: white;
382
+ margin: -1px 0 0 -2px; }
383
+
384
+ .customize-control.customize-control-checkbox label:not(:only-of-type), .customize-control.customize-control-radio label:not(:only-of-type) {
 
 
385
  margin-left: 30px;
386
  padding-top: 0;
387
  padding-bottom: 0;
388
+ display: inline-block;
389
+ width: calc(49% - 30px);
390
+ text-indent: -6px; }
391
+
392
+ .customize-control.customize-control-checkbox label, .customize-control.customize-control-radio label {
393
+ color: #416B7E; }
394
+
395
+ .customize-control-html + .customize-control.customize-control-checkbox, .customize-control-html + .customize-control.customize-control-radio {
396
+ margin-top: -24px; }
397
+
398
+ [id*="divider"] + .customize-control.customize-control-checkbox, [id*="divider"] + .customize-control.customize-control-radio {
399
+ margin-top: 0; }
400
+
401
  .customize-control input[type=radio] {
402
+ border-radius: 50%; }
403
+ .customize-control input[type=radio]:checked:before {
404
+ content: none; }
405
+
 
406
  .customize-control.customize-control-radio label {
407
+ margin-top: 12px; }
408
+
 
 
 
 
 
 
 
 
 
 
 
409
  .customize-control input[type="range"] {
410
+ width: 65%; }
411
+
412
  .customize-control input[type="range"] {
413
  position: relative;
414
  -webkit-appearance: none;
415
+ width: 200px;
416
  height: 22px;
417
  overflow: hidden;
418
  outline: none;
419
+ background: none; }
420
+ .customize-control input[type="range"]:before {
421
+ content: " ";
422
+ position: absolute;
423
+ top: 8px;
424
+ left: 0;
425
+ height: 6px;
426
+ width: 100%;
427
+ background: #DFE8EF;
428
+ box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3);
429
+ border-radius: 10px; }
430
+ .customize-control input[type="range"]::-webkit-slider-thumb {
431
+ -webkit-appearance: none;
432
+ width: 22px;
433
+ height: 22px;
434
+ background: #27ae60;
435
+ position: relative;
436
+ z-index: 3;
437
+ background: #FFFFFF;
438
+ border: 2px solid #B8DAEB;
439
+ border-radius: 4px; }
440
+ .customize-control input[type="range"]::-webkit-slider-thumb:before {
441
+ content: "..";
442
+ position: absolute;
443
+ left: 5px;
444
+ top: -5px;
445
+ color: #B8DAEB;
446
+ font-size: 1em;
447
+ letter-spacing: 1px; }
448
+ .customize-control input[type="range"]::-webkit-slider-thumb:after {
449
+ content: " ";
450
+ width: 200px;
451
+ height: 6px;
452
+ position: absolute;
453
+ z-index: 1;
454
+ right: 20px;
455
+ top: 6px;
456
+ background: #73C5EE; }
457
+
 
 
 
 
458
  .customize-control input[type="number"].range-value {
459
  min-width: 40px;
460
  max-width: 80px;
466
  margin-left: 10px;
467
  font-size: 13px;
468
  line-height: 1;
469
+ text-align: center; }
470
+
471
  .customize-control input[type=number]::-webkit-inner-spin-button,
472
  .customize-control input[type=number]::-webkit-outer-spin-button {
473
  -webkit-appearance: none;
474
+ margin: 0; }
 
475
 
476
  .customize-control-color {
477
+ display: block; }
478
+ .customize-control-color .customize-control-title, .customize-control-color .separator.label {
479
+ float: left; }
480
+ .customize-control-color .wp-picker-container {
481
+ position: relative;
482
+ float: right;
483
+ top: -3px; }
484
+ .customize-control-color .wp-picker-container .wp-picker-holder {
485
+ position: relative; }
486
+ .customize-control-color .wp-picker-container .iris-picker {
487
+ position: absolute;
488
+ top: 40px;
489
+ right: 0;
490
+ z-index: 1000;
491
+ width: 275px !important;
492
+ border-top: none;
493
+ border-color: #DFDFDE;
494
+ border-radius: 0 0 3px 3px;
495
+ border: none;
496
+ background: white; }
497
+ .customize-control-color .wp-picker-container .iris-picker .iris-square {
498
+ width: 215px !important;
499
+ height: 173px !important;
500
+ margin-right: 0; }
501
+ .customize-control-color .wp-picker-container .iris-picker .iris-strip {
502
+ float: right;
503
+ box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset; }
504
+ .customize-control-color .wp-picker-container .iris-picker .iris-strip .ui-slider-handle {
505
+ border-color: #aaa !important;
506
+ opacity: 1;
507
+ box-shadow: none; }
508
+ .customize-control-color .wp-picker-container .iris-picker .iris-palette {
509
+ width: 24px !important;
510
+ height: 24px !important;
511
+ border-radius: 50px;
512
+ box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset; }
513
+ .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap {
514
+ position: absolute;
515
+ z-index: 1000;
516
+ top: 35px;
517
+ right: 0;
518
+ width: 275px;
519
+ padding: 9px 12px;
520
+ background: white;
521
+ border: none;
522
+ border-radius: 3px 3px 0 0; }
523
+ .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.wp-color-picker {
524
+ float: left;
525
+ width: 100px;
526
+ font-size: 13px;
527
+ text-align: left;
528
+ margin: 0;
529
+ padding: 6px 12px;
530
+ height: auto; }
531
+ .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.button {
532
+ float: right;
533
+ padding: 4px 12px;
534
+ height: 30px; }
535
+ .customize-control-color .wp-color-result {
536
+ top: 0;
537
+ height: 30px;
538
+ width: 40px;
539
+ margin: 0;
540
+ padding: 0;
541
+ border-radius: 4px;
542
+ background: #2ECC71;
543
+ border: 2px solid #B8DAEB;
544
+ box-shadow: none; }
545
+ .customize-control-color .wp-color-result:after {
546
+ display: none; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
 
548
  #accordion-section-live_css_edit_section .customize-section-title {
549
  margin-top: -13px;
550
+ border-bottom: 1px solid #ddd; }
551
+
552
  #accordion-section-live_css_edit_section #css_editor {
553
  top: 70px;
554
  border-top: 10px solid white;
555
+ overflow: visible; }
556
+ #accordion-section-live_css_edit_section #css_editor:before {
557
+ content: "";
558
+ width: 48px;
559
+ height: 10px;
560
+ display: block;
561
+ background: #e8e8e8;
562
+ top: -10px;
563
+ position: absolute;
564
+ z-index: 10000000;
565
+ left: 0; }
566
+
 
567
  #accordion-section-live_css_edit_section .ace_scroller {
568
+ padding-left: 10px; }
 
569
 
570
  .wp-full-overlay.editor_opened {
571
+ margin-left: 500px; }
572
+ .wp-full-overlay.editor_opened #customize-controls {
573
+ width: 500px; }
574
+ .wp-full-overlay.editor_opened.collapsed #customize-controls {
575
+ width: 300px; }
 
 
 
576
 
577
  .customize-control-media .current,
578
  .customize-control-site_icon .current,
581
  min-height: 44px;
582
  background: #F5FCFF;
583
  border: 2px solid #B8DAEB;
584
+ border-radius: 4px; }
585
+ .customize-control-media .current .container, .customize-control-media .current span,
586
+ .customize-control-site_icon .current .container,
587
+ .customize-control-site_icon .current span,
588
+ li#customize-control-site_logo .current .container,
589
+ li#customize-control-site_logo .current span {
590
+ border: none; }
591
+
 
592
  .customize-control-media .inner, .customize-control-media .current span,
593
  .customize-control-site_icon .inner,
594
  .customize-control-site_icon .current span,
595
  li#customize-control-site_logo .inner,
596
  li#customize-control-site_logo .current span {
597
  font-size: 13px;
598
+ color: #98C6DD; }
599
+
600
  .customize-control-media .inner,
601
  .customize-control-site_icon .inner,
602
  li#customize-control-site_logo .inner {
603
+ line-height: 1.4; }
604
+
605
  .customize-control-media .thumbnail-image,
606
  .customize-control-site_icon .thumbnail-image,
607
  li#customize-control-site_logo .thumbnail-image {
608
  padding: 14px;
609
+ text-align: center; }
610
+ .customize-control-media .thumbnail-image img,
611
+ .customize-control-site_icon .thumbnail-image img,
612
+ li#customize-control-site_logo .thumbnail-image img {
613
+ width: auto; }
614
+
 
615
  .customize-control-media .actions,
616
  .customize-control-site_icon .actions,
617
  li#customize-control-site_logo .actions {
618
+ margin-bottom: 0; }
 
619
 
620
+ .customize-control-typography select, .customize-control-typography select {
621
+ margin-bottom: 10px; }
622
+
623
+ .customize-control-typography .description, .customize-control-typography .description {
624
+ margin-top: -3px; }
625
+
626
+ .customize-control-typography ul li, .customize-control-typography ul li {
 
 
 
627
  width: 100%;
628
+ margin: 0; }
 
629
 
 
 
 
630
  .default-preset-button {
631
  background-color: #F5F6F6;
632
  float: right;
635
  border: 1px solid #CBCBCB;
636
  margin-right: 4px;
637
  font-family: "Open Sans",sans-serif;
638
+ font-size: 13px; }
 
639
 
640
  .customize-control-preset .description {
641
  margin-right: 5px;
642
+ font-style: normal; }
 
643
 
644
  .customify_preset.radio_buttons .customify_radio_button {
645
  border: none;
648
  margin: 3px;
649
  position: relative;
650
  overflow: hidden;
651
+ height: auto; }
652
+ .customify_preset.radio_buttons .customify_radio_button input[type="radio"] {
653
+ opacity: 0;
654
+ width: 100%;
655
+ height: 100%;
656
+ position: absolute;
657
+ z-index: 9999; }
658
+ .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label {
659
+ background-color: #ebebeb; }
660
+ .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:before {
661
+ content: '>';
662
+ color: inherit; }
663
+ .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:after {
664
+ content: '<';
665
+ color: inherit; }
666
+ .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked:before {
667
+ opacity: 0; }
668
+ .customify_preset.radio_buttons .customify_radio_button label {
669
+ position: relative;
670
+ z-index: 999;
671
+ border-left: 4px solid; }
672
+
 
 
 
 
 
 
673
  .customify_preset .awesome_preset {
674
  width: 45%;
675
  position: relative;
678
  color: white;
679
  margin-top: 5px;
680
  margin-bottom: 25px;
681
+ transition: all 0.2s; }
682
+ .customify_preset .awesome_preset:hover {
683
+ opacity: 0.9; }
684
+ .customify_preset .awesome_preset:before {
685
+ content: '';
686
+ position: absolute;
687
+ top: 1px;
688
+ left: 1px;
689
+ right: 1px;
690
+ bottom: 1px;
691
+ border: 1px solid #FFF;
692
+ background: transparent;
693
+ opacity: .5;
694
+ border-radius: 4px;
695
+ z-index: 5; }
696
+ .customify_preset .awesome_preset .preset-wrap .preset-color {
697
+ height: 128px;
698
+ border-radius: 4px 4px 0 0;
699
+ padding: 17px 0 27px; }
700
+ .customify_preset .awesome_preset .preset-wrap .preset-color .first-font {
701
+ display: inline-block;
702
+ width: 100%;
703
+ font-size: 55px;
704
+ line-height: 1; }
705
+ .customify_preset .awesome_preset .preset-wrap .preset-color .secondary-font {
706
+ display: inline-block;
707
+ width: 100%;
708
+ font-size: 20px;
709
+ line-height: 1;
710
+ margin-top: 8px; }
711
+ .customify_preset .awesome_preset .preset-wrap .preset-name {
712
+ position: relative;
713
+ font-size: 11px;
714
+ text-transform: UPPERCASE;
715
+ border-radius: 0 0 4px 4px;
716
+ padding: 1px; }
717
+ .customify_preset .awesome_preset .preset-wrap .preset-name:before {
718
+ content: '';
719
+ position: absolute;
720
+ border-color: inherit;
721
+ border: 10px solid;
722
+ border-left-color: transparent;
723
+ border-right-color: transparent;
724
+ border-top: transparent;
725
+ top: -10px;
726
+ border-bottom-color: inherit;
727
+ left: 40%; }
728
+ .customify_preset .awesome_preset:nth-child(odd) {
729
+ margin-right: 7%; }
730
+ .customify_preset .awesome_preset input[type=radio] {
731
+ height: 100%;
732
+ width: 100%;
733
+ position: absolute;
734
+ border: 0;
735
+ box-shadow: none;
736
+ color: #006505;
737
+ background-color: transparent;
738
+ border-radius: 0;
739
+ margin: 0;
740
+ display: inline-block;
741
+ top: 0;
742
+ left: 0;
743
+ z-index: 10; }
744
+ .customify_preset .awesome_preset input[type=radio]:checked:before {
745
+ position: absolute;
746
+ height: 25px;
747
+ width: 25px;
748
+ top: -13px;
749
+ right: -14px;
750
+ background: #FFF;
751
+ z-index: 1; }
752
+ .customify_preset .awesome_preset input[type=radio]:checked:after {
753
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
754
+ filter: alpha(opacity=0);
755
+ content: '';
756
+ position: absolute;
757
+ width: 26px;
758
+ height: 26px;
759
+ border-radius: 50%;
760
+ top: -5px;
761
+ right: -5px;
762
+ z-index: 10;
763
+ background: #73C5EE url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjEzcHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTMgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgLTQwOC4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1DaGVja2JveC1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNy4wMDAwMDAsIDI0OS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkNoZWNrYm94IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAuMDM4NDk1LDE2IEwxNy4xMTYxMzc1LDguOTIxNDg3NiBMMTUuMTk0NjQ5OCw3IEwxMC4wMzg0OTUsMTIuMTU1MDY3NCBMNi45MjE0ODc2LDkuMDM4OTI5OTcgTDUsMTAuOTYwNDE3NiBMMTAuMDM4NDk1LDE2IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
764
+ background-position: center center; }
 
 
 
 
 
 
 
 
 
 
 
 
765
 
766
  .customify_radio_image {
767
+ display: inline-block; }
768
+ .customify_radio_image label {
769
+ display: block;
770
+ float: left;
771
+ margin-right: 10px;
772
+ position: relative; }
773
+ .customify_radio_image label input[type=radio] {
774
+ position: absolute;
775
+ top: 0;
776
+ bottom: 0;
777
+ left: 0;
778
+ right: 0;
779
+ width: 100%;
780
+ height: 100%;
781
+ visibility: hidden; }
782
+ .customify_radio_image label input[type=radio] img {
783
+ cursor: pointer;
784
+ border: 2px solid transparent; }
785
+ .customify_radio_image label input[type=radio]:checked + img {
786
+ border: 3px solid #73C5EE; }
 
 
 
 
 
787
 
788
  .customify_ace_editor {
789
  display: block;
790
  min-height: 200px;
791
+ border: 1px solid #ddd; }
 
792
 
793
  .customize-control-custom_background .hide {
794
+ display: none; }
795
+
796
  .customize-control-custom_background .upload_button_div {
797
+ margin: 10px 0; }
798
+ .customize-control-custom_background .upload_button_div > * {
799
+ margin-right: 10px; }
800
+
 
801
  .customize-control-custom_background .preview_screenshot {
802
  text-align: center;
803
+ margin: 10px 0; }
804
+ .customize-control-custom_background .preview_screenshot img {
805
+ border: 2px solid #ccc; }
 
 
806
 
807
  #customify_import_demo_data_button {
808
  width: 70%;
810
  padding: 10px;
811
  display: inline-block;
812
  height: auto;
813
+ margin: 0 15% 10% 15%; }
 
814
 
815
  .import_step_note {
816
  margin: 5px;
817
  width: 100%;
818
+ display: inline-block; }
819
+ .import_step_note:before {
820
+ content: "\1F449"; }
821
+ .import_step_note.success:before {
822
+ content: "\1F44D"; }
823
+ .import_step_note.failed:before {
824
+ content: "\274C"; }
 
 
 
 
825
 
826
  #customize-header-actions {
827
  background: #ffffff;
828
+ border-color: #e0e8ef; }
 
 
 
 
 
 
 
 
 
 
829
 
830
  .wp-full-overlay-sidebar,
831
  .customize-themes-panel {
832
  background: #eaf9fe;
833
+ border-right: 1px solid #e0e8ef; }
 
834
 
835
  #customize-theme-controls #accordion-section-menu_locations {
836
+ border-bottom: 1px solid #e0e8ef; }
 
837
 
838
  #customize-controls #accordion-section-themes > .accordion-section-title {
839
  font-weight: 600;
840
+ border-bottom: 1px solid #e0e8ef; }
841
+ #customize-controls #accordion-section-themes > .accordion-section-title:hover {
842
+ background: #fff; }
843
+
 
844
  #customize-controls .panel-meta.customize-info {
845
+ border-bottom-color: #e0e8ef; }
 
846
 
847
  #customize-theme-controls .control-section .accordion-section-title {
848
  font-weight: 400;
849
+ border-top: 1px solid #e0e8ef;
850
+ border-bottom: none; }
851
+
852
  #customize-theme-controls .control-section:last-of-type > .accordion-section-title {
853
+ border-bottom: 1px solid #e0e8ef; }
854
+
855
  #customize-theme-controls .customize-section-title {
856
+ border-top: 1px solid #e0e8ef;
857
+ border-bottom: 1px solid #e0e8ef; }
 
858
 
859
  #customize-controls .control-section .accordion-section-title:focus, #customize-controls .control-section .accordion-section-title:hover, #customize-controls .control-section.open .accordion-section-title, #customize-controls .control-section:hover > .accordion-section-title {
860
  color: #056184;
861
  background: #f5fcff;
862
+ border-left-color: #f5fcff; }
863
 
864
  [data-balloon] {
865
+ position: relative; }
 
866
 
867
  [data-balloon]::before {
868
  opacity: 0;
876
  padding: .5em 1em;
877
  position: absolute;
878
  white-space: nowrap;
879
+ z-index: 10; }
 
880
 
881
  [data-balloon]::after {
882
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(0)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
888
  transition: all .18s ease-out;
889
  content: '';
890
  position: absolute;
891
+ z-index: 10; }
 
892
 
893
  [data-balloon]:hover::before, [data-balloon]:hover::after {
894
  opacity: 1;
895
+ pointer-events: auto; }
 
896
 
897
  [data-balloon][data-balloon-pos="up"]::before {
898
  bottom: 100%;
899
  left: 50%;
900
  margin-bottom: 11px;
901
+ -webkit-transform: translate3d(-50%, 10px, 0);
902
+ transform: translate3d(-50%, 10px, 0);
903
+ -webkit-transform-origin: top;
904
+ transform-origin: top; }
905
 
906
  [data-balloon][data-balloon-pos="up"]::after {
907
  bottom: 100%;
908
  left: 50%;
909
  margin-bottom: 5px;
910
+ -webkit-transform: translate3d(-50%, 10px, 0);
911
+ transform: translate3d(-50%, 10px, 0);
912
+ -webkit-transform-origin: top;
913
+ transform-origin: top; }
914
 
915
  [data-balloon][data-balloon-pos="up"]:hover::before {
916
+ -webkit-transform: translate3d(-50%, 0, 0);
917
+ transform: translate3d(-50%, 0, 0); }
918
 
919
  [data-balloon][data-balloon-pos="up"]:hover::after {
920
+ -webkit-transform: translate3d(-50%, 0, 0);
921
+ transform: translate3d(-50%, 0, 0); }
922
 
923
  [data-balloon][data-balloon-pos='down']::before {
924
  left: 50%;
925
  margin-top: 11px;
926
  top: 100%;
927
+ -webkit-transform: translate3d(-50%, -10px, 0);
928
+ transform: translate3d(-50%, -10px, 0); }
929
 
930
  [data-balloon][data-balloon-pos='down']::after {
931
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(180 18 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
935
  left: 50%;
936
  margin-top: 5px;
937
  top: 100%;
938
+ -webkit-transform: translate3d(-50%, -10px, 0);
939
+ transform: translate3d(-50%, -10px, 0); }
940
 
941
  [data-balloon][data-balloon-pos='down']:hover::before {
942
+ -webkit-transform: translate3d(-50%, 0, 0);
943
+ transform: translate3d(-50%, 0, 0); }
944
 
945
  [data-balloon][data-balloon-pos='down']:hover::after {
946
+ -webkit-transform: translate3d(-50%, 0, 0);
947
+ transform: translate3d(-50%, 0, 0); }
948
 
949
  [data-balloon][data-balloon-pos='left']::before {
950
  margin-right: 11px;
951
  right: 100%;
952
  top: 50%;
953
+ -webkit-transform: translate3d(10px, -50%, 0);
954
+ transform: translate3d(10px, -50%, 0); }
955
 
956
  [data-balloon][data-balloon-pos='left']::after {
957
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(-90 18 18)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
961
  margin-right: 5px;
962
  right: 100%;
963
  top: 50%;
964
+ -webkit-transform: translate3d(10px, -50%, 0);
965
+ transform: translate3d(10px, -50%, 0); }
966
 
967
  [data-balloon][data-balloon-pos='left']:hover::before {
968
+ -webkit-transform: translate3d(0, -50%, 0);
969
+ transform: translate3d(0, -50%, 0); }
970
 
971
  [data-balloon][data-balloon-pos='left']:hover::after {
972
+ -webkit-transform: translate3d(0, -50%, 0);
973
+ transform: translate3d(0, -50%, 0); }
974
 
975
  [data-balloon][data-balloon-pos='right']::before {
976
  left: 100%;
977
  margin-left: 11px;
978
  top: 50%;
979
+ -webkit-transform: translate3d(-10px, -50%, 0);
980
+ transform: translate3d(-10px, -50%, 0); }
981
 
982
  [data-balloon][data-balloon-pos='right']::after {
983
  background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(90 6 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
987
  left: 100%;
988
  margin-left: 5px;
989
  top: 50%;
990
+ -webkit-transform: translate3d(-10px, -50%, 0);
991
+ transform: translate3d(-10px, -50%, 0); }
992
 
993
  [data-balloon][data-balloon-pos='right']:hover::before {
994
+ -webkit-transform: translate3d(0, -50%, 0);
995
+ transform: translate3d(0, -50%, 0); }
996
 
997
  [data-balloon][data-balloon-pos='right']:hover::after {
998
+ -webkit-transform: translate3d(0, -50%, 0);
999
+ transform: translate3d(0, -50%, 0); }
1000
 
1001
  [data-balloon][data-balloon-length='small']::before {
1002
  white-space: normal;
1003
+ width: 80px; }
 
1004
 
1005
  [data-balloon][data-balloon-length='medium']::before {
1006
  white-space: normal;
1007
+ width: 150px; }
 
1008
 
1009
  [data-balloon][data-balloon-length='large']::before {
1010
  white-space: normal;
1011
+ width: 260px; }
 
1012
 
1013
  [data-balloon][data-balloon-length='xlarge']::before {
1014
  white-space: normal;
1015
+ width: 380px; }
 
1016
 
1017
  @media screen and (max-width: 768px) {
1018
  [data-balloon][data-balloon-length='xlarge']::before {
1019
  white-space: normal;
1020
+ width: 90vw; } }
1021
+
 
1022
  [data-balloon][data-balloon-length='fit']::before {
1023
  white-space: normal;
1024
+ width: 100%; }
1025
+
1026
+ .font-options__wrapper .font-options__options-list {
1027
+ border-color: #B8DAEB;
1028
+ box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15); }
1029
+
1030
+ .font-options__wrapper .font-options__option {
1031
+ margin-bottom: 12px; }
1032
+ .font-options__wrapper .font-options__option label {
1033
+ display: block;
1034
+ margin-bottom: 6px; }
1035
+
1036
+ .font-options__wrapper [type=checkbox]:checked ~ .font-options__options-list {
1037
+ opacity: 1;
1038
+ display: block; }
1039
+
1040
+ input.customify_font_tooltip {
1041
+ display: none; }
1042
+
1043
+ ul.font-options__options-list .select2-container {
1044
+ width: 100% !important; }
1045
+ ul.font-options__options-list .select2-container .select2-selection--single {
1046
+ -webkit-appearance: initial; }
1047
+ ul.font-options__options-list .select2-container .select2-selection--single .select2-selection__arrow {
1048
+ display: none; }
1049
+
1050
+ ul.font-options__options-list .select2-container--default .select2-selection--single .select2-selection__rendered {
1051
+ color: inherit;
1052
+ line-height: initial; }
1053
 
1054
+ .select2-container.select2-container--open {
1055
+ z-index: 99999999; }
customify.php CHANGED
@@ -10,7 +10,7 @@
10
  Plugin Name: Customify
11
  Plugin URI: http://pixelgrade.com
12
  Description: A Theme Customizer Booster
13
- Version: 1.2.7.1
14
  Author: PixelGrade
15
  Author URI: http://pixelgrade.com
16
  Author Email: contact@pixelgrade.com
10
  Plugin Name: Customify
11
  Plugin URI: http://pixelgrade.com
12
  Description: A Theme Customizer Booster
13
+ Version: 1.3.0
14
  Author: PixelGrade
15
  Author URI: http://pixelgrade.com
16
  Author Email: contact@pixelgrade.com
features/class-CSS_Editor.php CHANGED
@@ -11,12 +11,14 @@ class Customify_CSS_Live_Editor {
11
 
12
  protected function __construct() {
13
 
14
- add_action( 'customify_create_custom_control', array( $this,'cle_create_custom_control'), 10, 1 );
15
-
16
- add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_styles' ), 10);
17
-
18
  $load_location = PixCustomifyPlugin::get_plugin_option( 'style_resources_location', 'wp_head' );
19
- add_action( $load_location, array( $this, 'output_dynamic_style' ), 999999999 );
 
 
 
 
20
 
21
  //Check the WordPress version and if there are known problems disable it
22
  add_filter( 'customify_css_live_editor_enabled', array( $this, 'disable_if_wp_incompatible' ), 10, 1 );
@@ -37,36 +39,92 @@ class Customify_CSS_Live_Editor {
37
  return self::$instance;
38
  }
39
 
40
- function enqueue_admin_customizer_styles(){
41
- $dir = plugin_dir_url( __FILE__ );
42
 
 
43
  $dir = rtrim( $dir, 'features/' );
44
 
45
- wp_register_script('customify-ace-editor', $dir . '/js/ace/ace.js', array('jquery'), false, true);
46
- wp_enqueue_script('live-css-editor', $dir . '/js/live_css_editor.js', array('customify-ace-editor'), false, true);
 
 
 
47
 
 
48
  }
49
 
50
  function cle_create_custom_control( $wp_customize ) {
51
- // Allow others to short-circuit us
52
- if ( ! apply_filters( 'customify_css_live_editor_enabled', true ) ) {
53
- return;
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  $wp_customize->add_section( 'live_css_edit_section', array(
57
  'priority' => 11,
58
  'capability' => 'edit_theme_options',
59
- 'title' => __('CSS Editor', 'customify_txtd'),
60
  ) );
61
 
62
  $saving_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
63
 
64
  $wp_customize->add_setting( 'live_css_edit', array(
65
- 'type' => $saving_type,
66
- 'label' => __('CSS Editor', 'customify_txtd'),
67
  'capability' => 'edit_theme_options',
68
- 'transport' => 'postMessage',
69
- 'default' => __("/*
70
  * Welcome to the Custom CSS Editor
71
  *
72
  * CSS (Cascading Style Sheets) is a language that helps
@@ -86,14 +144,14 @@ class Customify_CSS_Live_Editor {
86
  /* An example of a Custom CSS Snippet */
87
  selector {
88
  color: green;
89
- }", 'customify_txtd')
90
  ) );
91
 
92
  $this_control = new Pix_Customize_CSS_Editor_Control(
93
  $wp_customize,
94
  'live_css_edit_control',
95
  array(
96
- 'label' => __('Edit Live Css', 'customify_txtd'),
97
  'section' => 'live_css_edit_section',
98
  'settings' => 'live_css_edit',
99
  )
@@ -111,7 +169,7 @@ selector {
111
  if ( $store_type === 'option' ) {
112
  $output = get_option( 'live_css_edit' );
113
  } elseif ( $store_type === 'theme_mod' ) {
114
- $output = get_theme_mod( 'live_css_edit' );
115
  }
116
 
117
  if ( empty( $output ) ) {
@@ -128,14 +186,14 @@ selector {
128
 
129
  // WordPress 4.7 introduced a Customizer CSS editor that conflicts with our own
130
  // It's best to leave only the one in core
131
- // So only load our CSS editor for WP version smaller than 4.7
132
- // We use 4.6.9 to catch the release candidates also
133
  if ( version_compare( $wp_version, '4.6.9', '>=' ) ) {
134
- return false;
135
  }
136
 
137
  return $enabled;
138
- }
139
  }
140
 
141
  $customify_CSS_Editor = Customify_CSS_Live_Editor::get_instance();
11
 
12
  protected function __construct() {
13
 
14
+ add_action( 'customify_create_custom_control', array( $this, 'cle_create_custom_control' ), 10, 1 );
15
+ add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_styles' ), 10 );
 
 
16
  $load_location = PixCustomifyPlugin::get_plugin_option( 'style_resources_location', 'wp_head' );
17
+
18
+ if ( function_exists( 'wp_custom_css_cb' ) ) {
19
+ remove_action( 'wp_head', 'wp_custom_css_cb', 11 );
20
+ add_action( $load_location, 'wp_custom_css_cb', 999999999 );
21
+ }
22
 
23
  //Check the WordPress version and if there are known problems disable it
24
  add_filter( 'customify_css_live_editor_enabled', array( $this, 'disable_if_wp_incompatible' ), 10, 1 );
39
  return self::$instance;
40
  }
41
 
42
+ function enqueue_admin_customizer_styles() {
 
43
 
44
+ $dir = plugin_dir_url( __FILE__ );
45
  $dir = rtrim( $dir, 'features/' );
46
 
47
+ wp_enqueue_script( 'customify-ace-editor', $dir . '/js/ace/ace.js', array( 'jquery' ), false, true );
48
+
49
+ if ( ! apply_filters( 'customify_css_live_editor_enabled', true ) ) {
50
+ return ;
51
+ }
52
 
53
+ wp_enqueue_script( 'live-css-editor', $dir . '/js/live_css_editor.js', array( 'customify-ace-editor' ), false, true );
54
  }
55
 
56
  function cle_create_custom_control( $wp_customize ) {
57
+ // Allow others to short-circuit us
58
+ if ( ! apply_filters( 'customify_css_live_editor_enabled', true ) ) {
59
+
60
+ // port CSS if
61
+ if ( function_exists( 'wp_update_custom_css_post' ) ) {
62
+ // Migrate any existing theme CSS to the core option added in WordPress 4.7.
63
+ $store_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
64
+
65
+ $default_css = __( "/*
66
+ * Welcome to the Custom CSS Editor
67
+ *
68
+ * CSS (Cascading Style Sheets) is a language that helps
69
+ * the browser render your website. You may remove these
70
+ * lines and get started with your own customizations.
71
+ *
72
+ * The generated code will be placed after the theme
73
+ * stylesheets, which means that your rules can take
74
+ * precedence and override the theme CSS rules. Just
75
+ * write here what you want to change, you don't need
76
+ * to copy all your theme's stylesheet content.
77
+ *
78
+ * Getting started with CSS (tutorial):
79
+ * http://bit.ly/css-getting-started
80
+ */
81
+
82
+ /* An example of a Custom CSS Snippet */
83
+ selector {
84
+ color: green;
85
+ }", 'customify_txtd' );
86
+
87
+ if ( $store_type === 'option' ) {
88
+ $CSS = get_option( 'live_css_edit' );
89
+ } elseif ( $store_type === 'theme_mod' ) {
90
+ $CSS = get_theme_mod( 'live_css_edit' );
91
+ }
92
+
93
+ if ( ! empty( $CSS ) && $default_css !== $CSS ) {
94
+
95
+ $CSS = str_replace( $default_css, '', $CSS );
96
+
97
+ $core_css = wp_get_custom_css(); // Preserve any CSS already added to the core option.
98
+ $return = wp_update_custom_css_post( $core_css . $CSS );
99
+ if ( ! is_wp_error( $return ) ) {
100
+ // Remove the old theme_mod, so that the CSS is stored in only one place moving forward.
101
+ remove_theme_mod( 'custom_theme_css' );
102
+ if ( $store_type === 'option' ) {
103
+ $CSS = delete_option( 'live_css_edit' );
104
+ } elseif ( $store_type === 'theme_mod' ) {
105
+ $CSS = remove_theme_mod( 'live_css_edit' );
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ return;
112
+ }
113
 
114
  $wp_customize->add_section( 'live_css_edit_section', array(
115
  'priority' => 11,
116
  'capability' => 'edit_theme_options',
117
+ 'title' => __( 'CSS Editor', 'customify_txtd' ),
118
  ) );
119
 
120
  $saving_type = PixCustomifyPlugin::get_plugin_option( 'values_store_mod', 'option' );
121
 
122
  $wp_customize->add_setting( 'live_css_edit', array(
123
+ 'type' => $saving_type,
124
+ 'label' => __( 'CSS Editor', 'customify_txtd' ),
125
  'capability' => 'edit_theme_options',
126
+ 'transport' => 'postMessage',
127
+ 'default' => __( "/*
128
  * Welcome to the Custom CSS Editor
129
  *
130
  * CSS (Cascading Style Sheets) is a language that helps
144
  /* An example of a Custom CSS Snippet */
145
  selector {
146
  color: green;
147
+ }", 'customify_txtd' )
148
  ) );
149
 
150
  $this_control = new Pix_Customize_CSS_Editor_Control(
151
  $wp_customize,
152
  'live_css_edit_control',
153
  array(
154
+ 'label' => __( 'Edit Live Css', 'customify_txtd' ),
155
  'section' => 'live_css_edit_section',
156
  'settings' => 'live_css_edit',
157
  )
169
  if ( $store_type === 'option' ) {
170
  $output = get_option( 'live_css_edit' );
171
  } elseif ( $store_type === 'theme_mod' ) {
172
+ $output = get_theme_mod( 'live_css_edit' );
173
  }
174
 
175
  if ( empty( $output ) ) {
186
 
187
  // WordPress 4.7 introduced a Customizer CSS editor that conflicts with our own
188
  // It's best to leave only the one in core
189
+ // So only load our CSS editor for WP version smaller than 4.7
190
+ // We use 4.6.9 to catch the release candidates also
191
  if ( version_compare( $wp_version, '4.6.9', '>=' ) ) {
192
+ return false;
193
  }
194
 
195
  return $enabled;
196
+ }
197
  }
198
 
199
  $customify_CSS_Editor = Customify_CSS_Live_Editor::get_instance();
features/class-Font_Selector.php ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Customify_Font_Selector extends PixCustomifyPlugin {
4
+
5
+ /**
6
+ * Instance of this class.
7
+ * @since 1.0.0
8
+ * @var object
9
+ */
10
+ protected static $instance = null;
11
+ protected $parent = null;
12
+ protected static $typo_settings = null;
13
+ protected static $options_list = null;
14
+ protected static $theme_fonts = null;
15
+
16
+ function __construct( $parent ) {
17
+ add_action( 'customize_preview_init', array( $this, 'enqueue_admin_customizer_preview_assets' ), 10 );
18
+ $load_location = PixCustomifyPlugin::get_plugin_option( 'style_resources_location', 'wp_head' );
19
+ add_action( $load_location, array( $this, 'output_font_dynamic_style' ), 999999999 );
20
+
21
+ $this->parent = $parent;
22
+ self::$theme_fonts = apply_filters( 'customify_theme_fonts', array() );
23
+
24
+ add_action( 'customify_font_family_before_options', array( $this, 'add_customify_theme_fonts' ), 11, 2 );
25
+ }
26
+
27
+ function add_customify_theme_fonts( $active_font_family, $val ) {
28
+ //first get all the published custom fonts
29
+ if ( empty( self::$theme_fonts ) ) {
30
+ return;
31
+ }
32
+
33
+ echo '<optgroup label="' . esc_html__( 'Theme Fonts', 'customify' ) . '">';
34
+ foreach ( self::$theme_fonts as $font ) {
35
+ if ( ! empty( $font ) ) {
36
+ //display the select option's HTML
37
+ Pix_Customize_Font_Control::output_font_option( $font['family'], $active_font_family, $font, 'theme_font' );
38
+ }
39
+ }
40
+ echo "</optgroup>";
41
+ }
42
+
43
+ function output_font_dynamic_style() {
44
+
45
+ self::$options_list = $this->get_options();
46
+
47
+ self::get_typography_fields( self::$options_list, 'type', 'font', self::$typo_settings );
48
+
49
+ if ( empty( self::$typo_settings ) ) {
50
+ return;
51
+ }
52
+
53
+ $google_families = $local_families = '';
54
+
55
+ $args = array(
56
+ 'google_families' => '',
57
+ 'local_families' => '',
58
+ 'local_srcs' => '',
59
+ );
60
+
61
+ foreach ( self::$typo_settings as $id => $font ) {
62
+ if ( isset ( $font['value'] ) ) {
63
+
64
+ $load_all_weights = false;
65
+ if ( isset( $font['load_all_weights'] ) && $font['load_all_weights'] == 'true' ) {
66
+ $load_all_weights = true;
67
+ }
68
+ $value = json_decode( wp_unslash( PixCustomifyPlugin::decodeURIComponent( $font['value'] ) ), true );
69
+
70
+ $value = $this->validate_font_values( $value );
71
+
72
+ // in case the value is still null, try default value(mostly for google fonts)
73
+ if ( ! is_array( $value ) || $value === null ) {
74
+ $value = $this->get_font_defaults_value( str_replace( '"', '', $font['value'] ) );
75
+ }
76
+
77
+ //bail if by this time we don't have a value of some sort
78
+ if ( empty( $value ) ) {
79
+ continue;
80
+ }
81
+
82
+ //Handle special logic for when the $value array is not an associative array
83
+ if ( ! self::is_assoc( $value ) ) {
84
+ $value = $this->process_a_not_associative_font_default( $value );
85
+ }
86
+
87
+ if ( isset( $value['font_family'] ) && isset( $value['type'] ) && $value['type'] == 'google' ) {
88
+ $args['google_families'] .= "'" . $value['font_family'];
89
+
90
+ if ( $load_all_weights && is_array( $value['variants'] ) ) {
91
+ $args['google_families'] .= ":" . implode( ',', $value['variants'] );
92
+ } elseif ( isset( $value['selected_variants'] ) && ! empty( $value['selected_variants'] ) ) {
93
+ if ( is_array( $value['selected_variants'] ) ) {
94
+ $args['google_families'] .= ":" . implode( ',', $value['selected_variants'] );
95
+ } elseif ( is_string( $value['selected_variants'] ) || is_numeric( $value['selected_variants'] ) ) {
96
+ $args['google_families'] .= ":" . $value['selected_variants'];
97
+ }
98
+ } elseif ( isset( $value['variants'] ) && ! empty( $value['variants'] ) ) {
99
+ if ( is_array( $value['variants'] ) ) {
100
+ $args['google_families'] .= ":" . implode( ',', $value['variants'] );
101
+ } else {
102
+ $args['google_families'] .= ":" . $value['variants'];
103
+ }
104
+ }
105
+
106
+ if ( isset( $value['selected_subsets'] ) && ! empty( $value['selected_subsets'] ) ) {
107
+ if ( is_array( $value['selected_subsets'] ) ) {
108
+ $args['google_families'] .= ":" . implode( ',', $value['selected_subsets'] );
109
+ } else {
110
+ $args['google_families'] .= ":" . $value['selected_subsets'];
111
+ }
112
+ } elseif ( isset( $value['subsets'] ) && ! empty( $value['subsets'] ) ) {
113
+ if ( is_array( $value['subsets'] ) ) {
114
+ $args['google_families'] .= ":" . implode( ',', $value['subsets'] );
115
+ } else {
116
+ $args['google_families'] .= ":" . $value['subsets'];
117
+ }
118
+ }
119
+
120
+ $args['google_families'] .= '\',';
121
+ } elseif ( isset( self::$theme_fonts[ $value['font_family'] ] ) ) {
122
+
123
+ // $value['type'] = 'theme_font';
124
+ // $args['local_srcs'] .= self::$theme_fonts[ $value['font_family'] ]['src'] . ',';
125
+ // $value['variants'] = self::$theme_fonts[ $value['font_family'] ]['variants'];
126
+
127
+ if ( false === strpos( $args['local_families'], $value['font_family'] ) ) {
128
+ $args['local_families'] .= $value['font_family'];
129
+ }
130
+
131
+ if ( false === strpos( $args['local_srcs'], self::$theme_fonts[ $value['font_family'] ]['src'] ) ) {
132
+ $args['local_srcs'] .= self::$theme_fonts[ $value['font_family'] ]['src'] . ',';
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+ if ( ( ! empty ( $args['local_families'] ) || ! empty ( $args['google_families'] ) ) && self::get_plugin_option( 'typography', '1' ) && self::get_plugin_option( 'typography_google_fonts', 1 ) ) {
139
+ $this->display_webfont_script( $args );
140
+ }
141
+
142
+ foreach ( self::$typo_settings as $key => $font ) {
143
+ if ( empty( $font['selector'] ) || empty( $font['value'] ) ) {
144
+ continue;
145
+ }
146
+
147
+ $value = json_decode( PixCustomifyPlugin::decodeURIComponent( $font['value'] ), true );
148
+ // in case the value is still null, try default value(mostly for google fonts)
149
+ if ( $value === null ) {
150
+ $value = $this->get_font_defaults_value( $font['value'] );
151
+ }
152
+
153
+ // shim the old case when the default was only the font name
154
+ if ( is_string( $value ) && ! empty( $value ) ) {
155
+ $value = array( 'font_family' => $value );
156
+ }
157
+
158
+ //Handle special logic for when the $value array is not an associative array
159
+ if ( ! self::is_assoc( $value ) ) {
160
+ $value = $this->process_a_not_associative_font_default( $value );
161
+ }
162
+
163
+ $this->output_font_style( $key, $font, $value );
164
+ }
165
+ }
166
+
167
+ function display_webfont_script( $args ) { ?>
168
+ <script type="text/javascript">
169
+ var customify_font_loader = function () {
170
+ var webfontargs = {
171
+ classes: false,
172
+ events: false
173
+ };
174
+ <?php if ( ! empty( $args['google_families'] ) ) { ?>
175
+ webfontargs.google = { families: [<?php echo( rtrim( $args['google_families'], ',' ) ); ?>] };
176
+ <?php }
177
+ if ( ! empty( $args['local_families'] ) && ! empty( $args['local_srcs'] ) ) { ?>
178
+ webfontargs.custom = {
179
+ families: ['<?php echo( rtrim( $args['local_families'], ',' ) ); ?>'],
180
+ urls: ['<?php echo rtrim( $args['local_srcs'], ',' ) ?>']
181
+ };
182
+ <?php } ?>
183
+ WebFont.load(webfontargs);
184
+ }
185
+
186
+ if ( typeof WebFont !== 'undefined' ) { <?php // if there is a WebFont object, use it ?>
187
+ customify_font_loader();
188
+ } else { <?php // basically when we don't have the WebFont object we create the google script dynamically ?>
189
+ var tk = document.createElement('script');
190
+ tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
191
+ tk.type = 'text/javascript';
192
+
193
+ tk.onload = tk.onreadystatechange = function () {
194
+ customify_font_loader();
195
+ };
196
+ var s = document.getElementsByTagName('script')[0];
197
+ s.parentNode.insertBefore(tk, s);
198
+ }
199
+ </script>
200
+ <?php
201
+ }
202
+
203
+ function output_font_style( $field, $font, $value ) {
204
+ $value = $this->validate_font_values( $value );
205
+ // some sanitizing
206
+ $load_all_weights = false;
207
+ if ( isset( $font['load_all_weights'] ) && $font['load_all_weights'] == 'true' ) {
208
+ $load_all_weights = true;
209
+ }
210
+
211
+ $selected_variant = '';
212
+ if ( ! empty( $value['selected_variants'] ) ) {
213
+ if ( is_array( $value['selected_variants'] ) ) {
214
+ $selected_variant = $value['selected_variants'][0];
215
+ } else {
216
+ $selected_variant = $value['selected_variants'];
217
+ }
218
+ } ?>
219
+ <style id="customify_font_output_for_<?php echo $field; ?>">
220
+ <?php
221
+ if ( isset( $font['callback'] ) && function_exists( $font['callback'] ) ) {
222
+ $output = call_user_func( $font['callback'], $value, $font );
223
+ echo $output;
224
+ } else {
225
+ echo $font['selector'] . " {";
226
+
227
+ // First handle the case where we have the font-family in the selected variant (usually this means a custom font from our Fonto plugin)
228
+ if ( ! empty( $selected_variant ) && is_array( $selected_variant ) && ! empty( $selected_variant['font-family'] ) ) {
229
+ //the variant's font-family
230
+ $this->display_property( 'font-family', $selected_variant['font-family'] );
231
+
232
+ if ( ! $load_all_weights ) {
233
+ // if this is a custom font (like from our plugin Fonto) with individual styles & weights - i.e. the font-family says it all
234
+ // we need to "force" the font-weight and font-style
235
+ if ( ! empty( $value['type'] ) && 'custom_individual' == $value['type'] ) {
236
+ $selected_variant['font-weight'] = '400 !important';
237
+ $selected_variant['font-style'] = 'normal !important';
238
+ }
239
+
240
+ // output the font weight, if available
241
+ if ( ! empty( $selected_variant['font-weight'] ) ) {
242
+ echo ": " . $selected_variant['font-weight'] . ";\n";
243
+ $this->display_property( 'font-weight', $selected_variant['font-weight'] );
244
+ }
245
+
246
+ // output the font style, if available
247
+ if ( ! empty( $selected_variant['font-style'] ) ) {
248
+ $this->display_property( 'font-style', $selected_variant['font-style'] );
249
+ }
250
+ }
251
+
252
+ } elseif ( isset( $value['font_family'] ) ) {
253
+ // the selected font family
254
+ $this->display_property( 'font-family', $value['font_family'] );
255
+
256
+ if ( ! empty( $selected_variant ) && ! $load_all_weights ) {
257
+ $weight_and_style = strtolower( $selected_variant );
258
+ $italic_font = false;
259
+
260
+ //determine if this is an italic font (the $weight_and_style is usually like '400' or '400italic' )
261
+ if ( strpos( $weight_and_style, 'italic' ) !== false ) {
262
+ $weight_and_style = str_replace( 'italic', '', $weight_and_style);
263
+ $italic_font = true;
264
+ }
265
+
266
+ if ( ! empty( $weight_and_style ) ) {
267
+ //a little bit of sanity check - in case it's not a number
268
+ if( $weight_and_style === 'regular' ) {
269
+ $weight_and_style = 'normal';
270
+ }
271
+ $this->display_property( 'font-weight', $weight_and_style );
272
+ }
273
+
274
+ if ( $italic_font ) {
275
+ $this->display_property( 'font-style', 'italic' );
276
+ }
277
+ }
278
+ } else if ( isset( $value['font-family'] ) ) {
279
+ $this->display_property( 'font-family', $value['font-family'] );
280
+ }
281
+
282
+ if ( ! empty( $value['font_weight'] ) ) {
283
+ $this->display_property( 'font-weight', $value['font_weight'] );
284
+ }
285
+
286
+ if ( ! empty( $value['font_size'] ) ) {
287
+ $unit = $this->get_field_unit( $font, 'font-size' );
288
+ $this->display_property( 'font-size', $value['font_size'], $unit );
289
+ }
290
+
291
+ if ( ! empty( $value['line_height'] ) ) {
292
+ $unit = $this->get_field_unit( $font, 'line-height' );
293
+ $this->display_property( 'line-height', $value['line_height'], $unit );
294
+ }
295
+
296
+ if ( ! empty( $value['letter_spacing'] ) ) {
297
+ $unit = $this->get_field_unit( $font, 'letter-spacing' );
298
+ $this->display_property( 'letter-spacing', $value['letter_spacing'], $unit );
299
+ }
300
+
301
+ if ( ! empty( $value['text_align'] ) ) {
302
+ $this->display_property( 'text-align', $value['text_align'] );
303
+ }
304
+
305
+ if ( ! empty( $value['text_transform'] ) ) {
306
+ $this->display_property( 'text-transform', $value['text_transform'] );
307
+ }
308
+
309
+ if ( ! empty( $value['text_decoration'] ) ) {
310
+ $this->display_property( 'text-decoration', $value['text_decoration'] );
311
+ }
312
+ echo "}\n";
313
+ } ?>
314
+ </style>
315
+ <?php
316
+ }
317
+
318
+ function get_field_unit( $font, $field ) {
319
+
320
+ if ( empty( $font ) || empty( $font['fields'] ) || empty( $font['fields'][ $field ] ) ) {
321
+ return 'px';
322
+ }
323
+
324
+ if ( isset( $font['fields'][ $field ]['unit'] ) ) {
325
+ return $font['fields'][ $field ]['unit'];
326
+ }
327
+
328
+ if ( isset( $font['fields'][ $field ][3] ) ) {
329
+ return $font['fields'][ $field ][3];
330
+ }
331
+
332
+ return 'px';
333
+ }
334
+
335
+ function validate_font_values( $values ) {
336
+
337
+ if ( empty( $values ) ) {
338
+ return array();
339
+ }
340
+
341
+ foreach ( $values as $key => $value ) {
342
+
343
+ if ( strpos( $key, '-' ) !== false ) {
344
+ $new_key = str_replace( '-', '_', $key );
345
+
346
+ $values[ $new_key ] = $value;
347
+
348
+ unset( $values[ $key ] );
349
+ }
350
+ }
351
+
352
+ return $values;
353
+ }
354
+
355
+ function display_selector( $selector ) {
356
+
357
+ }
358
+
359
+ function display_property( $property, $value, $unit = '' ) {
360
+ echo "\n" . $property . ": " . $value . $unit . ";\n";
361
+ }
362
+
363
+ function enqueue_admin_customizer_preview_assets() {
364
+ $dir = plugin_dir_url( __FILE__ );
365
+ $dir = rtrim( $dir, 'features/' );
366
+ wp_enqueue_script( 'font_selector_preview', $dir . '/js/font_selector_preview.js', array( 'jquery' ), false, true );
367
+ }
368
+ }
features/customizer/controls/class-Pix_Customize_Font_Control.php ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Pix_Customize_Font_Control
5
+ * A complex Typography Control
6
+ */
7
+ class Pix_Customize_Font_Control extends Pix_Customize_Control {
8
+ public $type = 'font';
9
+ public $backup = null;
10
+ public $font_weight = true;
11
+ public $subsets = true;
12
+ public $load_all_weights = false;
13
+ public $recommended = array();
14
+ public $current_value;
15
+ public $default;
16
+ public $fields;
17
+
18
+ private $CSSID;
19
+
20
+ protected static $google_fonts = null;
21
+
22
+ private static $std_fonts = null;
23
+
24
+ /**
25
+ * Constructor.
26
+ *
27
+ * Supplied $args override class property defaults.
28
+ *
29
+ * If $args['settings'] is not defined, use the $id as the setting ID.
30
+ *
31
+ * @since 3.4.0
32
+ *
33
+ * @param WP_Customize_Manager $manager
34
+ * @param string $id
35
+ * @param array $args
36
+ */
37
+ public function __construct( $manager, $id, $args = array() ) {
38
+
39
+ self::$std_fonts = apply_filters( 'customify_filter_standard_fonts_list', array(
40
+ "Arial, Helvetica, sans-serif" => "Arial, Helvetica, sans-serif",
41
+ "'Arial Black', Gadget, sans-serif" => "'Arial Black', Gadget, sans-serif",
42
+ "'Bookman Old Style', serif" => "'Bookman Old Style', serif",
43
+ "'Comic Sans MS', cursive" => "'Comic Sans MS', cursive",
44
+ "Courier, monospace" => "Courier, monospace",
45
+ "Garamond, serif" => "Garamond, serif",
46
+ "Georgia, serif" => "Georgia, serif",
47
+ "Impact, Charcoal, sans-serif" => "Impact, Charcoal, sans-serif",
48
+ "'Lucida Console', Monaco, monospace" => "'Lucida Console', Monaco, monospace",
49
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
50
+ "'MS Sans Serif', Geneva, sans-serif" => "'MS Sans Serif', Geneva, sans-serif",
51
+ "'MS Serif', 'New York', sans-serif" => "'MS Serif', 'New York', sans-serif",
52
+ "'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif",
53
+ "Tahoma,Geneva, sans-serif" => "Tahoma, Geneva, sans-serif",
54
+ "'Times New Roman', Times,serif" => "'Times New Roman', Times, serif",
55
+ "'Trebuchet MS', Helvetica, sans-serif" => "'Trebuchet MS', Helvetica, sans-serif",
56
+ "Verdana, Geneva, sans-serif" => "Verdana, Geneva, sans-serif",
57
+ ) );
58
+
59
+ $keys = array_keys( get_object_vars( $this ) );
60
+ foreach ( $keys as $key ) {
61
+ if ( isset( $args[ $key ] ) ) {
62
+ $this->$key = $args[ $key ];
63
+ }
64
+ }
65
+
66
+ $this->manager = $manager;
67
+ $this->id = $id;
68
+ if ( empty( $this->active_callback ) ) {
69
+ $this->active_callback = array( $this, 'active_callback' );
70
+ }
71
+ self::$instance_count += 1;
72
+ $this->instance_number = self::$instance_count;
73
+
74
+ // Process settings.
75
+ if ( empty( $this->settings ) ) {
76
+ $this->settings = $id;
77
+ }
78
+
79
+ $settings = array();
80
+ if ( is_array( $this->settings ) ) {
81
+ foreach ( $this->settings as $key => $setting ) {
82
+ $settings[ $key ] = $this->manager->get_setting( $setting );
83
+ }
84
+ } else {
85
+ $this->setting = $this->manager->get_setting( $this->settings );
86
+ $settings['default'] = $this->setting;
87
+ }
88
+
89
+ $this->settings = $settings;
90
+ $this->CSSID = $this->get_CSS_ID();
91
+ $this->load_google_fonts();
92
+ $this->current_value = $this->value();
93
+ }
94
+
95
+ function validate_font_values( $values ) {
96
+
97
+ foreach ( $values as $key => $value ) {
98
+
99
+ if ( strpos( $key, '-' ) !== false ) {
100
+ $new_key = str_replace( '-', '_', $key );
101
+
102
+ if ( $new_key === 'font_weight' ) {
103
+ $values[ 'selected_variants' ] = $value;
104
+ unset( $values[ 'font_weight' ] );
105
+ } else {
106
+ $values[ $new_key ] = $value;
107
+ unset( $values[ $key ] );
108
+ }
109
+ }
110
+ }
111
+
112
+ return $values;
113
+ }
114
+
115
+ /**
116
+ * Render the control's content.
117
+ *
118
+ * @since 3.4.0
119
+ */
120
+ public function render_content() {
121
+
122
+ $current_value = $this->current_value;
123
+
124
+ //maybe we need to decode it
125
+ $current_value = PixCustomifyPlugin::decodeURIComponent( $current_value );
126
+
127
+ if ( empty( $current_value ) ) {
128
+ $current_value = $this->get_default_values();
129
+ }
130
+
131
+ // if this value was an array, make sure it is ok
132
+ if ( is_array( $current_value ) ) {
133
+ if ( isset( $current_value['font-family'] ) ) {
134
+ $current_value['font_family'] = $current_value['font-family'];
135
+ unset( $current_value['font-family'] );
136
+ }
137
+ } else {
138
+ //if we've got a string then it is clear we need to decode it
139
+ $current_value = json_decode( $current_value );
140
+ }
141
+
142
+ $current_value = $this->validate_font_values( $current_value );
143
+
144
+ //make sure it is an object from here going forward
145
+ $current_value = (object) $current_value;
146
+
147
+ $font_family = '';
148
+ if ( isset( $current_value->font_family ) ) {
149
+ $font_family = $current_value->font_family;
150
+ }
151
+
152
+ $select_data = '';
153
+ if ( isset( $current_value->load_all_weights ) ) {
154
+ $this->load_all_weights = $current_value->font_load_all_weights;
155
+
156
+ $select_data .= ' data-load_all_weights="true"';
157
+ }
158
+ ?>
159
+ <div class="font-options__wrapper">
160
+ <?php
161
+ $this->display_value_holder( $current_value );
162
+ $this->display_field_title( $font_family );
163
+ ?>
164
+
165
+ <input type="checkbox" class="customify_font_tooltip"
166
+ id="tooltip_toogle_<?php echo esc_attr( $this->CSSID ); ?>">
167
+
168
+ <ul class="font-options__options-list">
169
+ <li class="font-options__option customize-control">
170
+ <select class="customify_font_family"<?php echo $select_data; ?> data-field="font_family">
171
+ <?php
172
+ // Allow others to add options here
173
+ do_action( 'customify_font_family_before_options', $font_family, $current_value );
174
+
175
+ $this->display_recommended_options_group( $font_family, $current_value );
176
+
177
+ $this->display_standard_options_group( $font_family, $current_value );
178
+
179
+ do_action( 'customify_font_family_before_google_fonts_options' );
180
+
181
+ if ( PixCustomifyPlugin::get_plugin_option( 'typography_google_fonts' ) ) {
182
+
183
+ if ( PixCustomifyPlugin::get_plugin_option( 'typography_group_google_fonts' ) ) {
184
+
185
+ $grouped_google_fonts = array();
186
+ foreach ( self::$google_fonts as $key => $font ) {
187
+ if ( isset( $font['category'] ) ) {
188
+ $grouped_google_fonts[ $font['category'] ][] = $font;
189
+ }
190
+ }
191
+
192
+ foreach ( $grouped_google_fonts as $group_name => $group ) {
193
+ echo '<optgroup label="' . __( 'Google fonts', 'customify_txtd' ) . ' ' . $group_name . '">';
194
+ foreach ( $group as $key => $font ) {
195
+ self::output_font_option( $key, $font_family, $font );
196
+ }
197
+ echo "</optgroup>";
198
+ }
199
+
200
+ } else {
201
+ echo '<optgroup label="' . __( 'Google fonts', 'customify_txtd' ) . '">';
202
+ foreach ( self::$google_fonts as $key => $font ) {
203
+ self::output_font_option( $key, $font_family, $font );
204
+ }
205
+ echo "</optgroup>";
206
+ }
207
+ } ?>
208
+ </select>
209
+ </li>
210
+ <?php
211
+ $this->display_font_weight_field( $current_value );
212
+
213
+ $this->display_font_subset_field( $current_value );
214
+
215
+ $this->display_font_size_field( $current_value );
216
+
217
+ $this->display_line_height_field( $current_value );
218
+
219
+ $this->display_letter_spacing_field( $current_value );
220
+
221
+ $this->display_text_align_field( $current_value );
222
+
223
+ $this->display_text_transform_field( $current_value );
224
+
225
+ $this->display_text_decoration_field( $current_value ); ?>
226
+ </ul>
227
+ </div>
228
+
229
+ <?php if ( ! empty( $this->description ) ) : ?>
230
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
231
+ <?php endif;
232
+
233
+ ?>
234
+ <?php }
235
+
236
+ /**
237
+ * This input will hold the values of this typography field
238
+ */
239
+ function display_value_holder( $current_value ) { ?>
240
+ <input class="customify_font_values" id="<?php echo esc_attr( $this->CSSID ); ?>"
241
+ type="hidden" <?php $this->link(); ?>
242
+ value="<?php echo esc_attr( PixCustomifyPlugin::encodeURIComponent( json_encode( $current_value ) ) ); ?>"
243
+ data-default="<?php echo esc_attr( PixCustomifyPlugin::encodeURIComponent( json_encode( $current_value ) ) ); ?>"/>
244
+ <?php }
245
+
246
+ function display_field_title( $font_family ) { ?>
247
+ <label class="font-options__head select" for="tooltip_toogle_<?php echo esc_attr( $this->CSSID ); ?>">
248
+ <?php if ( ! empty( $this->label ) ) : ?>
249
+ <span class="font-options__option-title"><?php echo esc_html( $this->label ); ?></span>
250
+ <?php endif; ?>
251
+ <span class="font-options__font-title"><?php echo $font_family; ?></span>
252
+ </label>
253
+ <?php }
254
+
255
+ function display_recommended_options_group( $font_family, $current_value ) {
256
+ // Allow others to add options here
257
+ do_action( 'customify_font_family_before_recommended_fonts_options', $font_family, $current_value );
258
+
259
+ if ( ! empty( $this->recommended ) ) {
260
+
261
+ echo '<optgroup label="' . __( 'Recommended', 'customify_txtd' ) . '">';
262
+
263
+ foreach ( $this->recommended as $key => $font ) {
264
+ $font_type = 'std';
265
+ if ( isset( self::$google_fonts[ $key ] ) ) {
266
+ $font = self::$google_fonts[ $key ];
267
+ $font_type = 'google';
268
+ } else {
269
+ $font = $key;
270
+ }
271
+
272
+ self::output_font_option( $key, $font_family, $font, $font_type );
273
+ }
274
+ echo "</optgroup>";
275
+ }
276
+ }
277
+
278
+ function display_standard_options_group( $font_family, $current_value ) {
279
+ // Allow others to add options here
280
+ do_action( 'customify_font_family_before_standard_fonts_options', $font_family, $current_value );
281
+
282
+ if ( PixCustomifyPlugin::get_plugin_option( 'typography_standard_fonts' ) ) {
283
+
284
+ echo '<optgroup label="' . __( 'Standard fonts', 'customify_txtd' ) . '">';
285
+ foreach ( self::$std_fonts as $key => $font ) {
286
+ self::output_font_option( $key, $font_family, $font, 'std' );
287
+ }
288
+ echo "</optgroup>";
289
+ }
290
+
291
+ // Allow others to add options here
292
+ do_action( 'customify_font_family_after_standard_fonts_options' );
293
+ }
294
+
295
+ function display_font_weight_field( $current_value ) {
296
+
297
+ $display = 'none';
298
+
299
+ if ( ! $this->load_all_weights && $this->font_weight ) {
300
+ $display = 'inline-block';
301
+ } ?>
302
+ <li class="customify_weights_wrapper customize-control font-options__option"
303
+ style="display: <?php echo $display; ?>">
304
+ <select class="customify_font_weight" data-field="selected_variants" <?php echo ! empty( $current_value->selected_variants ) ? 'data-default="' . $current_value->selected_variants . '"' : null; ?>>
305
+ <?php
306
+ $selected = array();
307
+ if ( isset( $current_value->selected_variants ) ) {
308
+ $selected = $current_value->selected_variants;
309
+ }
310
+
311
+ if ( isset( $current_value->variants ) && ! empty( $current_value->variants ) && is_object( $current_value->variants ) ) {
312
+ foreach ( $current_value->variants as $weight ) {
313
+ $attrs = '';
314
+ if ( in_array( $weight, (array) $selected ) ) {
315
+ $attrs = ' selected="selected"';
316
+ }
317
+
318
+ echo '<option value="' . $weight . '" ' . $attrs . '> ' . $weight . '</option>';
319
+ }
320
+ } else if ( ! empty( $current_value->variants ) && is_string( $current_value->variants ) ) {
321
+ echo '<option value="' . $current_value->variants . '" selected="selected"> ' . $current_value->variants . '</option>';
322
+ } ?>
323
+ </select>
324
+ </li>
325
+ <?php
326
+ }
327
+
328
+ function display_font_subset_field( $current_value ) {
329
+ $display = 'none';
330
+ if ( $this->subsets && ! empty( $current_value->subsets ) ) {
331
+ $display = 'inline-block';
332
+ } ?>
333
+ <li class="customify_subsets_wrapper customize-control font-options__option"
334
+ style="display: <?php echo $display; ?>">
335
+ <select multiple class="customify_font_subsets" data-field="selected_subsets">
336
+ <?php
337
+ $selected = array();
338
+ if ( isset( $current_value->selected_subsets ) ) {
339
+ $selected = $current_value->selected_subsets;
340
+ }
341
+
342
+ if ( isset( $current_value->subsets ) && ! empty( $current_value->subsets ) && is_object( $current_value->variants ) ) {
343
+ foreach ( $current_value->subsets as $key => $subset ) {
344
+
345
+ if ( $subset === 'latin' ) {
346
+ continue;
347
+ }
348
+
349
+ $attrs = '';
350
+ if ( in_array( $subset, (array) $selected ) ) {
351
+ $attrs .= ' selected="selected"';
352
+ }
353
+
354
+ echo '<option value="' . $subset . '"' . $attrs . '> ' . $subset . '</option>';
355
+ }
356
+ } ?>
357
+ </select>
358
+ </li>
359
+
360
+ <?php
361
+ }
362
+
363
+ function display_font_size_field( $current_value ) {
364
+ if ( ! empty( $this->fields['font-size'] ) ) {
365
+ $fs_val = empty( $current_value->font_size ) ? 0 : $current_value->font_size; ?>
366
+ <li class="customify_font_size_wrapper customize-control font-options__option">
367
+ <label><?php esc_html_e( 'Font Size', 'customify' ); ?></label>
368
+ <input type="range"
369
+ data-field="font_size" <?php $this->input_field_atts( $this->fields['font-size'] ) ?>
370
+ value="<?php echo $fs_val; ?>">
371
+ </li>
372
+ <?php }
373
+ }
374
+
375
+ function display_line_height_field( $current_value ) {
376
+ if ( ! empty( $this->fields['line-height'] ) ) {
377
+ $lh_val = isset( $current_value->line_height ) ? $current_value->line_height : 0 ; ?>
378
+ <li class="customify_line_height_wrapper customize-control font-options__option">
379
+ <label><?php esc_html_e( 'Line height', 'customify' ); ?></label>
380
+ <input type="range"
381
+ data-field="line_height" <?php $this->input_field_atts( $this->fields['line-height'] ) ?>
382
+ value="<?php echo $lh_val ?>">
383
+ </li>
384
+ <?php }
385
+ }
386
+
387
+ function display_letter_spacing_field( $current_value ) {
388
+
389
+ if ( ! empty( $this->fields['letter-spacing'] ) ) {
390
+ $ls_val = isset( $current_value->letter_spacing ) ? $current_value->letter_spacing : 0; ?>
391
+ <li class="customify_letter_spacing_wrapper customize-control font-options__option">
392
+ <label><?php esc_html_e( 'Letter Spacing', 'customify' ); ?></label>
393
+ <input type="range"
394
+ data-field="letter_spacing" <?php $this->input_field_atts( $this->fields['letter-spacing'] ) ?>
395
+ value="<?php echo $ls_val ?>">
396
+ </li>
397
+ <?php }
398
+ }
399
+
400
+ function display_text_align_field( $current_value ) {
401
+ if ( ! empty( $this->fields['text-align'] ) && $this->fields['text-align'] ) {
402
+ $ta_val = isset( $current_value->text_align ) ? $current_value->text_align : 'initial'; ?>
403
+ <li class="customify_text_align_wrapper customize-control font-options__option">
404
+ <label><?php esc_html_e( 'Text Align', 'customify' ); ?></label>
405
+ <select data-field="text_align">
406
+ <option <?php $this->display_option_value( 'initial', $ta_val ); ?>><?php esc_html_e( 'Initial', 'customify' ); ?></option>
407
+ <option <?php $this->display_option_value( 'center', $ta_val ); ?>><?php esc_html_e( 'Center', 'customify' ); ?></option>
408
+ <option <?php $this->display_option_value( 'left', $ta_val ); ?>><?php esc_html_e( 'Left', 'customify' ); ?></option>
409
+ <option <?php $this->display_option_value( 'right', $ta_val ); ?>><?php esc_html_e( 'Right', 'customify' ); ?></option>
410
+ </select>
411
+ </li>
412
+ <?php }
413
+ }
414
+
415
+ function display_text_transform_field( $current_value ) {
416
+ if ( ! empty( $this->fields['text-transform'] ) && $this->fields['text-transform'] ) {
417
+ $tt_val = isset( $current_value->text_transform ) ? $current_value->text_transform : 'none'; ?>
418
+ <li class="customify_text_transform_wrapper customize-control font-options__option">
419
+ <label><?php esc_html_e( 'Text Transform', 'customify' ); ?></label>
420
+ <select data-field="text_transform">
421
+ <option <?php $this->display_option_value( 'none', $tt_val ); ?>><?php esc_html_e( 'None', 'customify' ); ?></option>
422
+ <option <?php $this->display_option_value( 'capitalize', $tt_val ); ?>><?php esc_html_e( 'Capitalize', 'customify' ); ?></option>
423
+ <option <?php $this->display_option_value( 'uppercase', $tt_val ); ?>><?php esc_html_e( 'Uppercase', 'customify' ); ?></option>
424
+ <option <?php $this->display_option_value( 'lowercase', $tt_val ); ?>><?php esc_html_e( 'Lowercase', 'customify' ); ?></option>
425
+ </select>
426
+ </li>
427
+ <?php }
428
+ }
429
+
430
+ function display_text_decoration_field( $current_value ) {
431
+ if ( ! empty( $this->fields['text-decoration'] && $this->fields['text-decoration'] ) ) {
432
+ $td_val = isset( $current_value->text_decoration ) ? $current_value->text_decoration : 'none';?>
433
+ <li class="customify_text_decoration_wrapper customize-control font-options__option">
434
+ <label><?php esc_html_e( 'Text Decoration', 'customify' ); ?></label>
435
+ <select data-field="text_decoration">
436
+ <option <?php $this->display_option_value( 'none', $td_val ); ?>><?php esc_html_e( 'None', 'customify' ); ?></option>
437
+ <option <?php $this->display_option_value( 'underline', $td_val ); ?>><?php esc_html_e( 'Underline', 'customify' ); ?></option>
438
+ <option <?php $this->display_option_value( 'overline', $td_val ); ?>><?php esc_html_e( 'Overline', 'customify' ); ?></option>
439
+ <option <?php $this->display_option_value( 'line-through', $td_val ); ?>><?php esc_html_e( 'Line Through', 'customify' ); ?></option>
440
+ </select>
441
+ </li>
442
+ <?php }
443
+ }
444
+
445
+ function display_option_value( $value, $current_value ) {
446
+
447
+ $return = 'value="' . $value . '"';
448
+
449
+ if ( $value === $current_value ) {
450
+ $return .= ' selected="selected"';
451
+ }
452
+
453
+ echo $return;
454
+ }
455
+
456
+ /**
457
+ * This method displays an <option> tag from the given params
458
+ *
459
+ * @param string $key
460
+ * @param string $active_font_family
461
+ * @param string|array $font
462
+ * @param string string $type
463
+ */
464
+ public static function output_font_option( $key, $active_font_family, $font, $type = 'google' ) {
465
+ //initialize data attributes
466
+ $data = '';
467
+
468
+ $data .= ' data-type="' . esc_attr( $type ) . '"';
469
+
470
+ //we will handle Google Fonts separately
471
+ if ( $type === 'google' ) {
472
+ // Handle the font variants markup, if available
473
+ if ( isset( $font['variants'] ) && ! empty( $font['variants'] ) ) {
474
+ $data .= ' data-variants="' . PixCustomifyPlugin::encodeURIComponent( json_encode( (object) $font['variants'] ) ) . '"';
475
+ }
476
+
477
+ if ( isset( $font['subsets'] ) && ! empty( $font['subsets'] ) ) {
478
+ $data .= ' data-subsets="' . PixCustomifyPlugin::encodeURIComponent( json_encode( (object) $font['subsets'] ) ) . '"';
479
+ }
480
+
481
+ //determine if it's selected
482
+ $selected = ( $active_font_family === $font['family'] ) ? ' selected="selected" ' : '';
483
+
484
+ //output the markup
485
+ echo '<option value="' . $font['family'] . '"' . $selected . $data . '>' . $font['family'] . '</option>';
486
+ } elseif ( $type === 'theme_font' ) {
487
+ $data = '';
488
+
489
+ // Handle the font variants markup, if available
490
+ if ( isset( $font['variants'] ) && ! empty( $font['variants'] ) ) {
491
+ $data .= ' data-variants="' . PixCustomifyPlugin::encodeURIComponent( json_encode( (object) $font['variants'] ) ) . '"';
492
+ }
493
+
494
+ $selected = ( $active_font_family === $font['family'] ) ? ' selected="selected" ' : '';
495
+ $data .= ' data-src="' . $font['src'] . '" data-type="theme_font"';
496
+ //output the markup
497
+ echo '<option value="' . $font['family'] . '"' . $selected . $data . '>' . $font['family'] . '</option>';
498
+ } else {
499
+ // Handle the font variants markup, if available
500
+ if ( is_array( $font ) && isset( $font['variants'] ) && ! empty( $font['variants'] ) ) {
501
+ $data .= ' data-variants="' . PixCustomifyPlugin::encodeURIComponent( json_encode( (object) $font['variants'] ) ) . '"';
502
+ }
503
+
504
+ // by default, we assume we only get a font family string
505
+ $font_family = $font;
506
+ // when we get an array we expect to get a font_family entry
507
+ if ( is_array( $font ) && isset( $font['font_family'] ) ) {
508
+ $font_family = $font['font_family'];
509
+ }
510
+
511
+ //determine if it's selected
512
+ $selected = ( $active_font_family === $font_family ) ? ' selected="selected" ' : '';
513
+
514
+ //now determine if we have a "pretty" display for this font family
515
+ $font_family_display = $font_family;
516
+ if ( is_array( $font ) && isset( $font['font_family_display'] ) ) {
517
+ $font_family_display = $font['font_family_display'];
518
+ }
519
+
520
+ //determine the option class
521
+ if ( empty( $type ) ) {
522
+ $type = 'std';
523
+ }
524
+ $option_class = $type . '_font';
525
+
526
+ //output the markup
527
+ echo '<option class="' . esc_attr( $option_class ) . '" value="' . esc_attr( $font_family ) . '" ' . $selected . $data . '>' . $font_family_display . '</option>';
528
+ }
529
+ }
530
+
531
+ /** ==== Helpers ==== */
532
+
533
+ /**
534
+ * Load the google fonts list from the local file
535
+ * @return bool|mixed|null
536
+ */
537
+ protected function load_google_fonts() {
538
+
539
+ $fonts_path = plugin_dir_path( __FILE__ ) . 'resources/google.fonts.php';
540
+
541
+ if ( file_exists( $fonts_path ) ) {
542
+ self::$google_fonts = require( $fonts_path );
543
+ }
544
+
545
+ if ( ! empty( self::$google_fonts ) ) {
546
+ return apply_filters( 'customify_filter_google_fonts_list', self::$google_fonts );
547
+ }
548
+
549
+ return false;
550
+ }
551
+
552
+ /**
553
+ * This method is used only to update the google fonts json file
554
+ * Even if it sounds weird you need to go to https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyB7Yj842mK5ogSiDa3eRrZUIPTzgiGopls
555
+ * copy all the content and put it into google.fonts.php
556
+ * call this
557
+ * the result needs to be put back into google.fonts.php
558
+ * remove this call
559
+ * before rage about file_get_content + json file thing about the security avoided with this simple call
560
+ */
561
+ protected function generate_google_fonts_json() {
562
+
563
+ $fonts_path = plugin_dir_path( __FILE__ ) . 'resources/google.fonts.php';
564
+
565
+ $new_array = array();
566
+ foreach ( self::$google_fonts as $key => $font ) {
567
+ // unset unused data
568
+ unset( $font['kind'] );
569
+ unset( $font['version'] );
570
+ unset( $font['lastModified'] );
571
+ unset( $font['files'] );
572
+ $new_array[ $font['family'] ] = $font;
573
+ }
574
+
575
+ file_put_contents( plugin_dir_path( __FILE__ ) . 'resources/google.fonts.json', json_encode( $new_array ) );
576
+ }
577
+
578
+ function get_default_values() {
579
+
580
+ $to_return = array();
581
+
582
+ if ( isset( $this->default ) && is_array( $this->default ) ) {
583
+
584
+ //Handle special logic for when the $value array is not an associative array
585
+ if ( ! PixCustomifyPlugin::is_assoc( $this->default ) ) {
586
+
587
+ //Let's determine some type of font
588
+ if ( ! isset( $this->default[2] ) || ( isset( $this->default[2] ) && 'google' == $this->default[2] ) ) {
589
+ if ( isset( self::$google_fonts[ $this->default[0] ] ) ) {
590
+ $to_return = self::$google_fonts[ $this->default[0] ];
591
+ $to_return['font_family'] = $this->default[0];
592
+ $to_return['type'] = 'google';
593
+ }
594
+ } else {
595
+ $to_return['type'] = $this->default[2];
596
+ }
597
+
598
+ //The first entry is the font-family
599
+ if ( isset( $this->default[0] ) ) {
600
+ $to_return['font_family'] = $this->default[0];
601
+ }
602
+
603
+ //In case we don't have an associative array
604
+ //The second entry is the variants
605
+ if ( isset( $this->default[1] ) ) {
606
+ $to_return['selected_variants'] = $this->default[1];
607
+ }
608
+ } else {
609
+
610
+ if ( isset( $this->default['font_family'] ) ) {
611
+ $to_return['font-family'] = $this->default['font_family'];
612
+ }
613
+
614
+ if ( isset( $this->default['font-family'] ) ) {
615
+ $to_return['font-family'] = $this->default['font-family'];
616
+ }
617
+
618
+ if ( isset( $this->default['font-size'] ) ) {
619
+ $to_return['font-size'] = $this->default['font-size'];
620
+ }
621
+
622
+ if ( isset( $this->default['line-height'] ) ) {
623
+ $to_return['line-height'] = $this->default['line-height'];
624
+ }
625
+
626
+ if ( isset( $this->default['letter-spacing'] ) ) {
627
+ $to_return['letter-spacing'] = $this->default['letter-spacing'];
628
+ }
629
+
630
+ if ( isset( $this->default['text-transform'] ) ) {
631
+ $to_return['text-transform'] = $this->default['text-transform'];
632
+ }
633
+
634
+ if ( isset( $this->default['text-align'] ) ) {
635
+ $to_return['text-align'] = $this->default['text-align'];
636
+ }
637
+
638
+ if ( isset( $this->default['text-decoration'] ) ) {
639
+ $to_return['text_decoration'] = $this->default['text-decoration'];
640
+ }
641
+ }
642
+ }
643
+
644
+ // rare case when there is a standard font we need to get the custom variants if there are some
645
+ if ( ! isset( $to_return['variants'] ) && isset( $to_return['font_family'] ) && isset( self::$std_fonts[ $to_return['font_family'] ] ) && isset( self::$std_fonts[ $to_return['font_family'] ]['variants'] ) ) {
646
+ $to_return['variants'] = self::$std_fonts[ $to_return['font_family'] ]['variants'];
647
+ }
648
+
649
+ return $to_return;
650
+ }
651
+
652
+ private function get_CSS_ID( $id = null ) {
653
+
654
+ if ( empty( $id ) ) {
655
+ $id = $this->id;
656
+ }
657
+
658
+ $id = str_replace( '[', '_', $id );
659
+ $id = str_replace( ']', '_', $id );
660
+
661
+ return $id;
662
+ }
663
+
664
+ /**
665
+ * Render the custom attributes for the control's input element.
666
+ *
667
+ * @since 4.0.0
668
+ * @access public
669
+ */
670
+ public function input_field_atts( $atts ) {
671
+
672
+ if ( ! PixCustomifyPlugin::is_assoc( $atts ) ) {
673
+ $defaults = array(
674
+ 'min',
675
+ 'max',
676
+ 'step',
677
+ 'unit',
678
+ );
679
+
680
+ $atts = array_combine( $defaults, array_values( $atts ) );
681
+ }
682
+
683
+ foreach ( $atts as $attr => $value ) {
684
+ echo $attr . '="' . esc_attr( $value ) . '" ';
685
+ }
686
+ }
687
+ }
features/customizer/controls/resources/google.fonts.json ADDED
@@ -0,0 +1 @@
 
1
+ {"ABeeZee":{"family":"ABeeZee","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Abel":{"family":"Abel","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Abhaya Libre":{"family":"Abhaya Libre","category":"serif","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","sinhala"]},"Abril Fatface":{"family":"Abril Fatface","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aclonica":{"family":"Aclonica","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Acme":{"family":"Acme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Actor":{"family":"Actor","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Adamina":{"family":"Adamina","category":"serif","variants":["regular"],"subsets":["latin"]},"Advent Pro":{"family":"Advent Pro","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["greek","latin-ext","latin"]},"Aguafina Script":{"family":"Aguafina Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Akronim":{"family":"Akronim","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aladin":{"family":"Aladin","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Aldrich":{"family":"Aldrich","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Alef":{"family":"Alef","category":"sans-serif","variants":["regular","700"],"subsets":["hebrew","latin"]},"Alegreya":{"family":"Alegreya","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya SC":{"family":"Alegreya SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya Sans":{"family":"Alegreya Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Alegreya Sans SC":{"family":"Alegreya Sans SC","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Alex Brush":{"family":"Alex Brush","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Alfa Slab One":{"family":"Alfa Slab One","category":"display","variants":["regular"],"subsets":["latin"]},"Alice":{"family":"Alice","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike":{"family":"Alike","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike Angular":{"family":"Alike Angular","category":"serif","variants":["regular"],"subsets":["latin"]},"Allan":{"family":"Allan","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Allerta":{"family":"Allerta","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allerta Stencil":{"family":"Allerta Stencil","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allura":{"family":"Allura","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra":{"family":"Almendra","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Almendra Display":{"family":"Almendra Display","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra SC":{"family":"Almendra SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Amarante":{"family":"Amarante","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Amaranth":{"family":"Amaranth","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Amatic SC":{"family":"Amatic SC","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Amatica SC":{"family":"Amatica SC","category":"display","variants":["regular","700"],"subsets":["latin-ext","hebrew","latin"]},"Amethysta":{"family":"Amethysta","category":"serif","variants":["regular"],"subsets":["latin"]},"Amiko":{"family":"Amiko","category":"sans-serif","variants":["regular","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Amiri":{"family":"Amiri","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin","arabic"]},"Amita":{"family":"Amita","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Anaheim":{"family":"Anaheim","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andada":{"family":"Andada","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andika":{"family":"Andika","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic","cyrillic-ext"]},"Angkor":{"family":"Angkor","category":"display","variants":["regular"],"subsets":["khmer"]},"Annie Use Your Telescope":{"family":"Annie Use Your Telescope","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Anonymous Pro":{"family":"Anonymous Pro","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","cyrillic"]},"Antic":{"family":"Antic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Antic Didone":{"family":"Antic Didone","category":"serif","variants":["regular"],"subsets":["latin"]},"Antic Slab":{"family":"Antic Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Anton":{"family":"Anton","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Arapey":{"family":"Arapey","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Arbutus":{"family":"Arbutus","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Arbutus Slab":{"family":"Arbutus Slab","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Architects Daughter":{"family":"Architects Daughter","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Archivo Black":{"family":"Archivo Black","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Archivo Narrow":{"family":"Archivo Narrow","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Aref Ruqaa":{"family":"Aref Ruqaa","category":"serif","variants":["regular","700"],"subsets":["latin","arabic"]},"Arima Madurai":{"family":"Arima Madurai","category":"display","variants":["100","200","300","regular","500","700","800","900"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Arimo":{"family":"Arimo","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Arizonia":{"family":"Arizonia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Armata":{"family":"Armata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Artifika":{"family":"Artifika","category":"serif","variants":["regular"],"subsets":["latin"]},"Arvo":{"family":"Arvo","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Arya":{"family":"Arya","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Asap":{"family":"Asap","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Asar":{"family":"Asar","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Asset":{"family":"Asset","category":"display","variants":["regular"],"subsets":["latin"]},"Assistant":{"family":"Assistant","category":"sans-serif","variants":["200","300","regular","600","700","800"],"subsets":["hebrew","latin"]},"Astloch":{"family":"Astloch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Asul":{"family":"Asul","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Athiti":{"family":"Athiti","category":"sans-serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Atma":{"family":"Atma","category":"display","variants":["300","regular","500","600","700"],"subsets":["bengali","latin-ext","latin"]},"Atomic Age":{"family":"Atomic Age","category":"display","variants":["regular"],"subsets":["latin"]},"Aubrey":{"family":"Aubrey","category":"display","variants":["regular"],"subsets":["latin"]},"Audiowide":{"family":"Audiowide","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Autour One":{"family":"Autour One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Average":{"family":"Average","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Average Sans":{"family":"Average Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Gruesa Libre":{"family":"Averia Gruesa Libre","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Libre":{"family":"Averia Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Sans Libre":{"family":"Averia Sans Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Serif Libre":{"family":"Averia Serif Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Bad Script":{"family":"Bad Script","category":"handwriting","variants":["regular"],"subsets":["latin","cyrillic"]},"Baloo":{"family":"Baloo","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","devanagari"]},"Baloo Bhai":{"family":"Baloo Bhai","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati","vietnamese"]},"Baloo Bhaina":{"family":"Baloo Bhaina","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","oriya"]},"Baloo Chettan":{"family":"Baloo Chettan","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","malayalam"]},"Baloo Da":{"family":"Baloo Da","category":"display","variants":["regular"],"subsets":["bengali","latin-ext","latin","vietnamese"]},"Baloo Paaji":{"family":"Baloo Paaji","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","gurmukhi"]},"Baloo Tamma":{"family":"Baloo Tamma","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","kannada"]},"Baloo Thambi":{"family":"Baloo Thambi","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Balthazar":{"family":"Balthazar","category":"serif","variants":["regular"],"subsets":["latin"]},"Bangers":{"family":"Bangers","category":"display","variants":["regular"],"subsets":["latin"]},"Basic":{"family":"Basic","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Battambang":{"family":"Battambang","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Baumans":{"family":"Baumans","category":"display","variants":["regular"],"subsets":["latin"]},"Bayon":{"family":"Bayon","category":"display","variants":["regular"],"subsets":["khmer"]},"Belgrano":{"family":"Belgrano","category":"serif","variants":["regular"],"subsets":["latin"]},"Belleza":{"family":"Belleza","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"BenchNine":{"family":"BenchNine","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Bentham":{"family":"Bentham","category":"serif","variants":["regular"],"subsets":["latin"]},"Berkshire Swash":{"family":"Berkshire Swash","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bevan":{"family":"Bevan","category":"display","variants":["regular"],"subsets":["latin"]},"Bigelow Rules":{"family":"Bigelow Rules","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bigshot One":{"family":"Bigshot One","category":"display","variants":["regular"],"subsets":["latin"]},"Bilbo":{"family":"Bilbo","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bilbo Swash Caps":{"family":"Bilbo Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"BioRhyme":{"family":"BioRhyme","category":"serif","variants":["200","300","regular","700","800"],"subsets":["latin-ext","latin"]},"BioRhyme Expanded":{"family":"BioRhyme Expanded","category":"serif","variants":["200","300","regular","700","800"],"subsets":["latin-ext","latin"]},"Biryani":{"family":"Biryani","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Bitter":{"family":"Bitter","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Black Ops One":{"family":"Black Ops One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bokor":{"family":"Bokor","category":"display","variants":["regular"],"subsets":["khmer"]},"Bonbon":{"family":"Bonbon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Boogaloo":{"family":"Boogaloo","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One":{"family":"Bowlby One","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One SC":{"family":"Bowlby One SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Brawler":{"family":"Brawler","category":"serif","variants":["regular"],"subsets":["latin"]},"Bree Serif":{"family":"Bree Serif","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubblegum Sans":{"family":"Bubblegum Sans","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubbler One":{"family":"Bubbler One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Buda":{"family":"Buda","category":"display","variants":["300"],"subsets":["latin"]},"Buenard":{"family":"Buenard","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Bungee":{"family":"Bungee","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Hairline":{"family":"Bungee Hairline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Inline":{"family":"Bungee Inline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Outline":{"family":"Bungee Outline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Shade":{"family":"Bungee Shade","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Butcherman":{"family":"Butcherman","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Butterfly Kids":{"family":"Butterfly Kids","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cabin":{"family":"Cabin","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Cabin Condensed":{"family":"Cabin Condensed","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin"]},"Cabin Sketch":{"family":"Cabin Sketch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Caesar Dressing":{"family":"Caesar Dressing","category":"display","variants":["regular"],"subsets":["latin"]},"Cagliostro":{"family":"Cagliostro","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cairo":{"family":"Cairo","category":"sans-serif","variants":["200","300","regular","600","700","900"],"subsets":["latin-ext","latin","arabic"]},"Calligraffitti":{"family":"Calligraffitti","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Cambay":{"family":"Cambay","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","devanagari"]},"Cambo":{"family":"Cambo","category":"serif","variants":["regular"],"subsets":["latin"]},"Candal":{"family":"Candal","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cantarell":{"family":"Cantarell","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Cantata One":{"family":"Cantata One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cantora One":{"family":"Cantora One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Capriola":{"family":"Capriola","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cardo":{"family":"Cardo","category":"serif","variants":["regular","italic","700"],"subsets":["greek","latin-ext","latin","greek-ext"]},"Carme":{"family":"Carme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic":{"family":"Carrois Gothic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic SC":{"family":"Carrois Gothic SC","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carter One":{"family":"Carter One","category":"display","variants":["regular"],"subsets":["latin"]},"Catamaran":{"family":"Catamaran","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin","tamil"]},"Caudex":{"family":"Caudex","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext"]},"Caveat":{"family":"Caveat","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Caveat Brush":{"family":"Caveat Brush","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cedarville Cursive":{"family":"Cedarville Cursive","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ceviche One":{"family":"Ceviche One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Changa":{"family":"Changa","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","arabic"]},"Changa One":{"family":"Changa One","category":"display","variants":["regular","italic"],"subsets":["latin"]},"Chango":{"family":"Chango","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chathura":{"family":"Chathura","category":"sans-serif","variants":["100","300","regular","700","800"],"subsets":["latin","telugu"]},"Chau Philomene One":{"family":"Chau Philomene One","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Chela One":{"family":"Chela One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chelsea Market":{"family":"Chelsea Market","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chenla":{"family":"Chenla","category":"display","variants":["regular"],"subsets":["khmer"]},"Cherry Cream Soda":{"family":"Cherry Cream Soda","category":"display","variants":["regular"],"subsets":["latin"]},"Cherry Swash":{"family":"Cherry Swash","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Chewy":{"family":"Chewy","category":"display","variants":["regular"],"subsets":["latin"]},"Chicle":{"family":"Chicle","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chivo":{"family":"Chivo","category":"sans-serif","variants":["regular","italic","900","900italic"],"subsets":["latin"]},"Chonburi":{"family":"Chonburi","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Cinzel":{"family":"Cinzel","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Cinzel Decorative":{"family":"Cinzel Decorative","category":"display","variants":["regular","700","900"],"subsets":["latin"]},"Clicker Script":{"family":"Clicker Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Coda":{"family":"Coda","category":"display","variants":["regular","800"],"subsets":["latin-ext","latin"]},"Coda Caption":{"family":"Coda Caption","category":"sans-serif","variants":["800"],"subsets":["latin-ext","latin"]},"Codystar":{"family":"Codystar","category":"display","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Coiny":{"family":"Coiny","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Combo":{"family":"Combo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Comfortaa":{"family":"Comfortaa","category":"display","variants":["300","regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Coming Soon":{"family":"Coming Soon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Concert One":{"family":"Concert One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Condiment":{"family":"Condiment","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Content":{"family":"Content","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Contrail One":{"family":"Contrail One","category":"display","variants":["regular"],"subsets":["latin"]},"Convergence":{"family":"Convergence","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cookie":{"family":"Cookie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Copse":{"family":"Copse","category":"serif","variants":["regular"],"subsets":["latin"]},"Corben":{"family":"Corben","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Cormorant":{"family":"Cormorant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Garamond":{"family":"Cormorant Garamond","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Infant":{"family":"Cormorant Infant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant SC":{"family":"Cormorant SC","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Unicase":{"family":"Cormorant Unicase","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Upright":{"family":"Cormorant Upright","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese"]},"Courgette":{"family":"Courgette","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cousine":{"family":"Cousine","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Coustard":{"family":"Coustard","category":"serif","variants":["regular","900"],"subsets":["latin"]},"Covered By Your Grace":{"family":"Covered By Your Grace","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Crafty Girls":{"family":"Crafty Girls","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Creepster":{"family":"Creepster","category":"display","variants":["regular"],"subsets":["latin"]},"Crete Round":{"family":"Crete Round","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Crimson Text":{"family":"Crimson Text","category":"serif","variants":["regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Croissant One":{"family":"Croissant One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Crushed":{"family":"Crushed","category":"display","variants":["regular"],"subsets":["latin"]},"Cuprum":{"family":"Cuprum","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Cutive":{"family":"Cutive","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cutive Mono":{"family":"Cutive Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"Damion":{"family":"Damion","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Dancing Script":{"family":"Dancing Script","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Dangrek":{"family":"Dangrek","category":"display","variants":["regular"],"subsets":["khmer"]},"David Libre":{"family":"David Libre","category":"serif","variants":["regular","500","700"],"subsets":["latin-ext","hebrew","latin","vietnamese"]},"Dawning of a New Day":{"family":"Dawning of a New Day","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Days One":{"family":"Days One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dekko":{"family":"Dekko","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Delius":{"family":"Delius","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Swash Caps":{"family":"Delius Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Unicase":{"family":"Delius Unicase","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Della Respira":{"family":"Della Respira","category":"serif","variants":["regular"],"subsets":["latin"]},"Denk One":{"family":"Denk One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Devonshire":{"family":"Devonshire","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Dhurjati":{"family":"Dhurjati","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Didact Gothic":{"family":"Didact Gothic","category":"sans-serif","variants":["regular"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Diplomata":{"family":"Diplomata","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Diplomata SC":{"family":"Diplomata SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Domine":{"family":"Domine","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Donegal One":{"family":"Donegal One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Doppio One":{"family":"Doppio One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dorsa":{"family":"Dorsa","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dosis":{"family":"Dosis","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin"]},"Dr Sugiyama":{"family":"Dr Sugiyama","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Droid Sans":{"family":"Droid Sans","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Droid Sans Mono":{"family":"Droid Sans Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Droid Serif":{"family":"Droid Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Duru Sans":{"family":"Duru Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dynalight":{"family":"Dynalight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"EB Garamond":{"family":"EB Garamond","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic","cyrillic-ext"]},"Eagle Lake":{"family":"Eagle Lake","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Eater":{"family":"Eater","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Economica":{"family":"Economica","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Eczar":{"family":"Eczar","category":"serif","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Ek Mukta":{"family":"Ek Mukta","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"El Messiri":{"family":"El Messiri","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin","cyrillic","arabic"]},"Electrolize":{"family":"Electrolize","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Elsie":{"family":"Elsie","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Elsie Swash Caps":{"family":"Elsie Swash Caps","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Emblema One":{"family":"Emblema One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Emilys Candy":{"family":"Emilys Candy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Engagement":{"family":"Engagement","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Englebert":{"family":"Englebert","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Enriqueta":{"family":"Enriqueta","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Erica One":{"family":"Erica One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Esteban":{"family":"Esteban","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Euphoria Script":{"family":"Euphoria Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ewert":{"family":"Ewert","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Exo":{"family":"Exo","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Exo 2":{"family":"Exo 2","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Expletus Sans":{"family":"Expletus Sans","category":"display","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Fanwood Text":{"family":"Fanwood Text","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Farsan":{"family":"Farsan","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati","vietnamese"]},"Fascinate":{"family":"Fascinate","category":"display","variants":["regular"],"subsets":["latin"]},"Fascinate Inline":{"family":"Fascinate Inline","category":"display","variants":["regular"],"subsets":["latin"]},"Faster One":{"family":"Faster One","category":"display","variants":["regular"],"subsets":["latin"]},"Fasthand":{"family":"Fasthand","category":"serif","variants":["regular"],"subsets":["khmer"]},"Fauna One":{"family":"Fauna One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Federant":{"family":"Federant","category":"display","variants":["regular"],"subsets":["latin"]},"Federo":{"family":"Federo","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Felipa":{"family":"Felipa","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Fenix":{"family":"Fenix","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Finger Paint":{"family":"Finger Paint","category":"display","variants":["regular"],"subsets":["latin"]},"Fira Mono":{"family":"Fira Mono","category":"monospace","variants":["regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Fira Sans":{"family":"Fira Sans","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Fjalla One":{"family":"Fjalla One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Fjord One":{"family":"Fjord One","category":"serif","variants":["regular"],"subsets":["latin"]},"Flamenco":{"family":"Flamenco","category":"display","variants":["300","regular"],"subsets":["latin"]},"Flavors":{"family":"Flavors","category":"display","variants":["regular"],"subsets":["latin"]},"Fondamento":{"family":"Fondamento","category":"handwriting","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Fontdiner Swanky":{"family":"Fontdiner Swanky","category":"display","variants":["regular"],"subsets":["latin"]},"Forum":{"family":"Forum","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Francois One":{"family":"Francois One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Frank Ruhl Libre":{"family":"Frank Ruhl Libre","category":"sans-serif","variants":["300","regular","500","700","900"],"subsets":["latin-ext","hebrew","latin"]},"Freckle Face":{"family":"Freckle Face","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fredericka the Great":{"family":"Fredericka the Great","category":"display","variants":["regular"],"subsets":["latin"]},"Fredoka One":{"family":"Fredoka One","category":"display","variants":["regular"],"subsets":["latin"]},"Freehand":{"family":"Freehand","category":"display","variants":["regular"],"subsets":["khmer"]},"Fresca":{"family":"Fresca","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Frijole":{"family":"Frijole","category":"display","variants":["regular"],"subsets":["latin"]},"Fruktur":{"family":"Fruktur","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fugaz One":{"family":"Fugaz One","category":"display","variants":["regular"],"subsets":["latin"]},"GFS Didot":{"family":"GFS Didot","category":"serif","variants":["regular"],"subsets":["greek"]},"GFS Neohellenic":{"family":"GFS Neohellenic","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek"]},"Gabriela":{"family":"Gabriela","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Gafata":{"family":"Gafata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Galada":{"family":"Galada","category":"display","variants":["regular"],"subsets":["bengali","latin"]},"Galdeano":{"family":"Galdeano","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Galindo":{"family":"Galindo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gentium Basic":{"family":"Gentium Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Gentium Book Basic":{"family":"Gentium Book Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Geo":{"family":"Geo","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Geostar":{"family":"Geostar","category":"display","variants":["regular"],"subsets":["latin"]},"Geostar Fill":{"family":"Geostar Fill","category":"display","variants":["regular"],"subsets":["latin"]},"Germania One":{"family":"Germania One","category":"display","variants":["regular"],"subsets":["latin"]},"Gidugu":{"family":"Gidugu","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Gilda Display":{"family":"Gilda Display","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Give You Glory":{"family":"Give You Glory","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Glass Antiqua":{"family":"Glass Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Glegoo":{"family":"Glegoo","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Gloria Hallelujah":{"family":"Gloria Hallelujah","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Goblin One":{"family":"Goblin One","category":"display","variants":["regular"],"subsets":["latin"]},"Gochi Hand":{"family":"Gochi Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Gorditas":{"family":"Gorditas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Goudy Bookletter 1911":{"family":"Goudy Bookletter 1911","category":"serif","variants":["regular"],"subsets":["latin"]},"Graduate":{"family":"Graduate","category":"display","variants":["regular"],"subsets":["latin"]},"Grand Hotel":{"family":"Grand Hotel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Gravitas One":{"family":"Gravitas One","category":"display","variants":["regular"],"subsets":["latin"]},"Great Vibes":{"family":"Great Vibes","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Griffy":{"family":"Griffy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gruppo":{"family":"Gruppo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gudea":{"family":"Gudea","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Gurajada":{"family":"Gurajada","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Habibi":{"family":"Habibi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Halant":{"family":"Halant","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Hammersmith One":{"family":"Hammersmith One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei":{"family":"Hanalei","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei Fill":{"family":"Hanalei Fill","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Handlee":{"family":"Handlee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Hanuman":{"family":"Hanuman","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Happy Monkey":{"family":"Happy Monkey","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Harmattan":{"family":"Harmattan","category":"sans-serif","variants":["regular"],"subsets":["latin","arabic"]},"Headland One":{"family":"Headland One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Heebo":{"family":"Heebo","category":"sans-serif","variants":["100","300","regular","500","700","800","900"],"subsets":["hebrew","latin"]},"Henny Penny":{"family":"Henny Penny","category":"display","variants":["regular"],"subsets":["latin"]},"Herr Von Muellerhoff":{"family":"Herr Von Muellerhoff","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Hind":{"family":"Hind","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Hind Guntur":{"family":"Hind Guntur","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","telugu"]},"Hind Madurai":{"family":"Hind Madurai","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","tamil"]},"Hind Siliguri":{"family":"Hind Siliguri","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["bengali","latin-ext","latin"]},"Hind Vadodara":{"family":"Hind Vadodara","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","gujarati"]},"Holtwood One SC":{"family":"Holtwood One SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Homemade Apple":{"family":"Homemade Apple","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Homenaje":{"family":"Homenaje","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"IM Fell DW Pica":{"family":"IM Fell DW Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell DW Pica SC":{"family":"IM Fell DW Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Double Pica":{"family":"IM Fell Double Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Double Pica SC":{"family":"IM Fell Double Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell English":{"family":"IM Fell English","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell English SC":{"family":"IM Fell English SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell French Canon":{"family":"IM Fell French Canon","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell French Canon SC":{"family":"IM Fell French Canon SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Great Primer":{"family":"IM Fell Great Primer","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Great Primer SC":{"family":"IM Fell Great Primer SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Iceberg":{"family":"Iceberg","category":"display","variants":["regular"],"subsets":["latin"]},"Iceland":{"family":"Iceland","category":"display","variants":["regular"],"subsets":["latin"]},"Imprima":{"family":"Imprima","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Inconsolata":{"family":"Inconsolata","category":"monospace","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inder":{"family":"Inder","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Indie Flower":{"family":"Indie Flower","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Inika":{"family":"Inika","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inknut Antiqua":{"family":"Inknut Antiqua","category":"serif","variants":["300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Irish Grover":{"family":"Irish Grover","category":"display","variants":["regular"],"subsets":["latin"]},"Istok Web":{"family":"Istok Web","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Italiana":{"family":"Italiana","category":"serif","variants":["regular"],"subsets":["latin"]},"Italianno":{"family":"Italianno","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Itim":{"family":"Itim","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Jacques Francois":{"family":"Jacques Francois","category":"serif","variants":["regular"],"subsets":["latin"]},"Jacques Francois Shadow":{"family":"Jacques Francois Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Jaldi":{"family":"Jaldi","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Jim Nightshade":{"family":"Jim Nightshade","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Jockey One":{"family":"Jockey One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Jolly Lodger":{"family":"Jolly Lodger","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Jomhuria":{"family":"Jomhuria","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Josefin Sans":{"family":"Josefin Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin"]},"Josefin Slab":{"family":"Josefin Slab","category":"serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Joti One":{"family":"Joti One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Judson":{"family":"Judson","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin","vietnamese"]},"Julee":{"family":"Julee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Julius Sans One":{"family":"Julius Sans One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Junge":{"family":"Junge","category":"serif","variants":["regular"],"subsets":["latin"]},"Jura":{"family":"Jura","category":"sans-serif","variants":["300","regular","500","600"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Just Another Hand":{"family":"Just Another Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Just Me Again Down Here":{"family":"Just Me Again Down Here","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kadwa":{"family":"Kadwa","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Kalam":{"family":"Kalam","category":"handwriting","variants":["300","regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Kameron":{"family":"Kameron","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Kanit":{"family":"Kanit","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Kantumruy":{"family":"Kantumruy","category":"sans-serif","variants":["300","regular","700"],"subsets":["khmer"]},"Karla":{"family":"Karla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Karma":{"family":"Karma","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Katibeh":{"family":"Katibeh","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Kaushan Script":{"family":"Kaushan Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kavivanar":{"family":"Kavivanar","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","tamil"]},"Kavoon":{"family":"Kavoon","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kdam Thmor":{"family":"Kdam Thmor","category":"display","variants":["regular"],"subsets":["khmer"]},"Keania One":{"family":"Keania One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kelly Slab":{"family":"Kelly Slab","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Kenia":{"family":"Kenia","category":"display","variants":["regular"],"subsets":["latin"]},"Khand":{"family":"Khand","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Khmer":{"family":"Khmer","category":"display","variants":["regular"],"subsets":["khmer"]},"Khula":{"family":"Khula","category":"sans-serif","variants":["300","regular","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Kite One":{"family":"Kite One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Knewave":{"family":"Knewave","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kotta One":{"family":"Kotta One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Koulen":{"family":"Koulen","category":"display","variants":["regular"],"subsets":["khmer"]},"Kranky":{"family":"Kranky","category":"display","variants":["regular"],"subsets":["latin"]},"Kreon":{"family":"Kreon","category":"serif","variants":["300","regular","700"],"subsets":["latin"]},"Kristi":{"family":"Kristi","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Krona One":{"family":"Krona One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Kumar One":{"family":"Kumar One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Kumar One Outline":{"family":"Kumar One Outline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Kurale":{"family":"Kurale","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","devanagari"]},"La Belle Aurore":{"family":"La Belle Aurore","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Laila":{"family":"Laila","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Lakki Reddy":{"family":"Lakki Reddy","category":"handwriting","variants":["regular"],"subsets":["latin","telugu"]},"Lalezar":{"family":"Lalezar","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","arabic"]},"Lancelot":{"family":"Lancelot","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Lateef":{"family":"Lateef","category":"handwriting","variants":["regular"],"subsets":["latin","arabic"]},"Lato":{"family":"Lato","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"League Script":{"family":"League Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Leckerli One":{"family":"Leckerli One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ledger":{"family":"Ledger","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Lekton":{"family":"Lekton","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Lemon":{"family":"Lemon","category":"display","variants":["regular"],"subsets":["latin"]},"Lemonada":{"family":"Lemonada","category":"display","variants":["300","regular","600","700"],"subsets":["latin-ext","latin","vietnamese","arabic"]},"Libre Baskerville":{"family":"Libre Baskerville","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Libre Franklin":{"family":"Libre Franklin","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Life Savers":{"family":"Life Savers","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Lilita One":{"family":"Lilita One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Lily Script One":{"family":"Lily Script One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Limelight":{"family":"Limelight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Linden Hill":{"family":"Linden Hill","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Lobster":{"family":"Lobster","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Lobster Two":{"family":"Lobster Two","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Londrina Outline":{"family":"Londrina Outline","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Shadow":{"family":"Londrina Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Sketch":{"family":"Londrina Sketch","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Solid":{"family":"Londrina Solid","category":"display","variants":["regular"],"subsets":["latin"]},"Lora":{"family":"Lora","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Love Ya Like A Sister":{"family":"Love Ya Like A Sister","category":"display","variants":["regular"],"subsets":["latin"]},"Loved by the King":{"family":"Loved by the King","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Lovers Quarrel":{"family":"Lovers Quarrel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Luckiest Guy":{"family":"Luckiest Guy","category":"display","variants":["regular"],"subsets":["latin"]},"Lusitana":{"family":"Lusitana","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Lustria":{"family":"Lustria","category":"serif","variants":["regular"],"subsets":["latin"]},"Macondo":{"family":"Macondo","category":"display","variants":["regular"],"subsets":["latin"]},"Macondo Swash Caps":{"family":"Macondo Swash Caps","category":"display","variants":["regular"],"subsets":["latin"]},"Mada":{"family":"Mada","category":"sans-serif","variants":["300","regular","500","900"],"subsets":["latin","arabic"]},"Magra":{"family":"Magra","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Maiden Orange":{"family":"Maiden Orange","category":"display","variants":["regular"],"subsets":["latin"]},"Maitree":{"family":"Maitree","category":"serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Mako":{"family":"Mako","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Mallanna":{"family":"Mallanna","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Mandali":{"family":"Mandali","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Marcellus":{"family":"Marcellus","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marcellus SC":{"family":"Marcellus SC","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marck Script":{"family":"Marck Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Margarine":{"family":"Margarine","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Marko One":{"family":"Marko One","category":"serif","variants":["regular"],"subsets":["latin"]},"Marmelad":{"family":"Marmelad","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Martel":{"family":"Martel","category":"serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Martel Sans":{"family":"Martel Sans","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Marvel":{"family":"Marvel","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Mate":{"family":"Mate","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Mate SC":{"family":"Mate SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Maven Pro":{"family":"Maven Pro","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"McLaren":{"family":"McLaren","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Meddon":{"family":"Meddon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"MedievalSharp":{"family":"MedievalSharp","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Medula One":{"family":"Medula One","category":"display","variants":["regular"],"subsets":["latin"]},"Meera Inimai":{"family":"Meera Inimai","category":"sans-serif","variants":["regular"],"subsets":["latin","tamil"]},"Megrim":{"family":"Megrim","category":"display","variants":["regular"],"subsets":["latin"]},"Meie Script":{"family":"Meie Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Merienda":{"family":"Merienda","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Merienda One":{"family":"Merienda One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Merriweather":{"family":"Merriweather","category":"serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Merriweather Sans":{"family":"Merriweather Sans","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","800","800italic"],"subsets":["latin-ext","latin"]},"Metal":{"family":"Metal","category":"display","variants":["regular"],"subsets":["khmer"]},"Metal Mania":{"family":"Metal Mania","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metamorphous":{"family":"Metamorphous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metrophobic":{"family":"Metrophobic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Michroma":{"family":"Michroma","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Milonga":{"family":"Milonga","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Miltonian":{"family":"Miltonian","category":"display","variants":["regular"],"subsets":["latin"]},"Miltonian Tattoo":{"family":"Miltonian Tattoo","category":"display","variants":["regular"],"subsets":["latin"]},"Miniver":{"family":"Miniver","category":"display","variants":["regular"],"subsets":["latin"]},"Miriam Libre":{"family":"Miriam Libre","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","hebrew","latin"]},"Mirza":{"family":"Mirza","category":"display","variants":["regular","500","600","700"],"subsets":["latin-ext","latin","arabic"]},"Miss Fajardose":{"family":"Miss Fajardose","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mitr":{"family":"Mitr","category":"sans-serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Modak":{"family":"Modak","category":"display","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Modern Antiqua":{"family":"Modern Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Mogra":{"family":"Mogra","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Molengo":{"family":"Molengo","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Molle":{"family":"Molle","category":"handwriting","variants":["italic"],"subsets":["latin-ext","latin"]},"Monda":{"family":"Monda","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Monofett":{"family":"Monofett","category":"display","variants":["regular"],"subsets":["latin"]},"Monoton":{"family":"Monoton","category":"display","variants":["regular"],"subsets":["latin"]},"Monsieur La Doulaise":{"family":"Monsieur La Doulaise","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Montaga":{"family":"Montaga","category":"serif","variants":["regular"],"subsets":["latin"]},"Montez":{"family":"Montez","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Montserrat":{"family":"Montserrat","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Alternates":{"family":"Montserrat Alternates","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Subrayada":{"family":"Montserrat Subrayada","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Moul":{"family":"Moul","category":"display","variants":["regular"],"subsets":["khmer"]},"Moulpali":{"family":"Moulpali","category":"display","variants":["regular"],"subsets":["khmer"]},"Mountains of Christmas":{"family":"Mountains of Christmas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Mouse Memoirs":{"family":"Mouse Memoirs","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Bedfort":{"family":"Mr Bedfort","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Dafoe":{"family":"Mr Dafoe","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr De Haviland":{"family":"Mr De Haviland","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Saint Delafield":{"family":"Mrs Saint Delafield","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Sheppards":{"family":"Mrs Sheppards","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mukta Vaani":{"family":"Mukta Vaani","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","gujarati"]},"Muli":{"family":"Muli","category":"sans-serif","variants":["300","300italic","regular","italic"],"subsets":["latin"]},"Mystery Quest":{"family":"Mystery Quest","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"NTR":{"family":"NTR","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Neucha":{"family":"Neucha","category":"handwriting","variants":["regular"],"subsets":["latin","cyrillic"]},"Neuton":{"family":"Neuton","category":"serif","variants":["200","300","regular","italic","700","800"],"subsets":["latin-ext","latin"]},"New Rocker":{"family":"New Rocker","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"News Cycle":{"family":"News Cycle","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Niconne":{"family":"Niconne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nixie One":{"family":"Nixie One","category":"display","variants":["regular"],"subsets":["latin"]},"Nobile":{"family":"Nobile","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Nokora":{"family":"Nokora","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Norican":{"family":"Norican","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nosifer":{"family":"Nosifer","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Nothing You Could Do":{"family":"Nothing You Could Do","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Noticia Text":{"family":"Noticia Text","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese"]},"Noto Sans":{"family":"Noto Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext","devanagari"]},"Noto Serif":{"family":"Noto Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Nova Cut":{"family":"Nova Cut","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Flat":{"family":"Nova Flat","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Mono":{"family":"Nova Mono","category":"monospace","variants":["regular"],"subsets":["greek","latin"]},"Nova Oval":{"family":"Nova Oval","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Round":{"family":"Nova Round","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Script":{"family":"Nova Script","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Slim":{"family":"Nova Slim","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Square":{"family":"Nova Square","category":"display","variants":["regular"],"subsets":["latin"]},"Numans":{"family":"Numans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Nunito":{"family":"Nunito","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Odor Mean Chey":{"family":"Odor Mean Chey","category":"display","variants":["regular"],"subsets":["khmer"]},"Offside":{"family":"Offside","category":"display","variants":["regular"],"subsets":["latin"]},"Old Standard TT":{"family":"Old Standard TT","category":"serif","variants":["regular","italic","700"],"subsets":["latin"]},"Oldenburg":{"family":"Oldenburg","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Oleo Script":{"family":"Oleo Script","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Oleo Script Swash Caps":{"family":"Oleo Script Swash Caps","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Open Sans":{"family":"Open Sans","category":"sans-serif","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Open Sans Condensed":{"family":"Open Sans Condensed","category":"sans-serif","variants":["300","300italic","700"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Oranienbaum":{"family":"Oranienbaum","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Orbitron":{"family":"Orbitron","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"Oregano":{"family":"Oregano","category":"display","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Orienta":{"family":"Orienta","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Original Surfer":{"family":"Original Surfer","category":"display","variants":["regular"],"subsets":["latin"]},"Oswald":{"family":"Oswald","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Over the Rainbow":{"family":"Over the Rainbow","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Overlock":{"family":"Overlock","category":"display","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Overlock SC":{"family":"Overlock SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ovo":{"family":"Ovo","category":"serif","variants":["regular"],"subsets":["latin"]},"Oxygen":{"family":"Oxygen","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Oxygen Mono":{"family":"Oxygen Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"PT Mono":{"family":"PT Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans":{"family":"PT Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans Caption":{"family":"PT Sans Caption","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans Narrow":{"family":"PT Sans Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Serif":{"family":"PT Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Serif Caption":{"family":"PT Serif Caption","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Pacifico":{"family":"Pacifico","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Palanquin":{"family":"Palanquin","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Palanquin Dark":{"family":"Palanquin Dark","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Paprika":{"family":"Paprika","category":"display","variants":["regular"],"subsets":["latin"]},"Parisienne":{"family":"Parisienne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Passero One":{"family":"Passero One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Passion One":{"family":"Passion One","category":"display","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Pathway Gothic One":{"family":"Pathway Gothic One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Patrick Hand":{"family":"Patrick Hand","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Patrick Hand SC":{"family":"Patrick Hand SC","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Pattaya":{"family":"Pattaya","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai","cyrillic"]},"Patua One":{"family":"Patua One","category":"display","variants":["regular"],"subsets":["latin"]},"Pavanam":{"family":"Pavanam","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","tamil"]},"Paytone One":{"family":"Paytone One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Peddana":{"family":"Peddana","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Peralta":{"family":"Peralta","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Permanent Marker":{"family":"Permanent Marker","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Petit Formal Script":{"family":"Petit Formal Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Petrona":{"family":"Petrona","category":"serif","variants":["regular"],"subsets":["latin"]},"Philosopher":{"family":"Philosopher","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin","cyrillic"]},"Piedra":{"family":"Piedra","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Pinyon Script":{"family":"Pinyon Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Pirata One":{"family":"Pirata One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Plaster":{"family":"Plaster","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Play":{"family":"Play","category":"sans-serif","variants":["regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Playball":{"family":"Playball","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Playfair Display":{"family":"Playfair Display","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Playfair Display SC":{"family":"Playfair Display SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Podkova":{"family":"Podkova","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Poiret One":{"family":"Poiret One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Poller One":{"family":"Poller One","category":"display","variants":["regular"],"subsets":["latin"]},"Poly":{"family":"Poly","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Pompiere":{"family":"Pompiere","category":"display","variants":["regular"],"subsets":["latin"]},"Pontano Sans":{"family":"Pontano Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Poppins":{"family":"Poppins","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Port Lligat Sans":{"family":"Port Lligat Sans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Port Lligat Slab":{"family":"Port Lligat Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Pragati Narrow":{"family":"Pragati Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Prata":{"family":"Prata","category":"serif","variants":["regular"],"subsets":["latin"]},"Preahvihear":{"family":"Preahvihear","category":"display","variants":["regular"],"subsets":["khmer"]},"Press Start 2P":{"family":"Press Start 2P","category":"display","variants":["regular"],"subsets":["greek","latin-ext","latin","cyrillic"]},"Pridi":{"family":"Pridi","category":"serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Princess Sofia":{"family":"Princess Sofia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Prociono":{"family":"Prociono","category":"serif","variants":["regular"],"subsets":["latin"]},"Prompt":{"family":"Prompt","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Prosto One":{"family":"Prosto One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Proza Libre":{"family":"Proza Libre","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"],"subsets":["latin-ext","latin"]},"Puritan":{"family":"Puritan","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Purple Purse":{"family":"Purple Purse","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Quando":{"family":"Quando","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Quantico":{"family":"Quantico","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Quattrocento":{"family":"Quattrocento","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Quattrocento Sans":{"family":"Quattrocento Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Questrial":{"family":"Questrial","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Quicksand":{"family":"Quicksand","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Quintessential":{"family":"Quintessential","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Qwigley":{"family":"Qwigley","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Racing Sans One":{"family":"Racing Sans One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Radley":{"family":"Radley","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rajdhani":{"family":"Rajdhani","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Rakkas":{"family":"Rakkas","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Raleway":{"family":"Raleway","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Raleway Dots":{"family":"Raleway Dots","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ramabhadra":{"family":"Ramabhadra","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Ramaraja":{"family":"Ramaraja","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Rambla":{"family":"Rambla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Rammetto One":{"family":"Rammetto One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ranchers":{"family":"Ranchers","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rancho":{"family":"Rancho","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ranga":{"family":"Ranga","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Rasa":{"family":"Rasa","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","gujarati"]},"Rationale":{"family":"Rationale","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Ravi Prakash":{"family":"Ravi Prakash","category":"display","variants":["regular"],"subsets":["latin","telugu"]},"Redressed":{"family":"Redressed","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Reem Kufi":{"family":"Reem Kufi","category":"sans-serif","variants":["regular"],"subsets":["latin","arabic"]},"Reenie Beanie":{"family":"Reenie Beanie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Revalia":{"family":"Revalia","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rhodium Libre":{"family":"Rhodium Libre","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Ribeye":{"family":"Ribeye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ribeye Marrow":{"family":"Ribeye Marrow","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Righteous":{"family":"Righteous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Risque":{"family":"Risque","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Roboto":{"family":"Roboto","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Condensed":{"family":"Roboto Condensed","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Mono":{"family":"Roboto Mono","category":"monospace","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Slab":{"family":"Roboto Slab","category":"serif","variants":["100","300","regular","700"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Rochester":{"family":"Rochester","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rock Salt":{"family":"Rock Salt","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rokkitt":{"family":"Rokkitt","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Romanesco":{"family":"Romanesco","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ropa Sans":{"family":"Ropa Sans","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rosario":{"family":"Rosario","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Rosarivo":{"family":"Rosarivo","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rouge Script":{"family":"Rouge Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rozha One":{"family":"Rozha One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Rubik":{"family":"Rubik","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subsets":["latin-ext","hebrew","latin","cyrillic"]},"Rubik Mono One":{"family":"Rubik Mono One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Rubik One":{"family":"Rubik One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Ruda":{"family":"Ruda","category":"sans-serif","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Rufina":{"family":"Rufina","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Ruge Boogie":{"family":"Ruge Boogie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruluko":{"family":"Ruluko","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Rum Raisin":{"family":"Rum Raisin","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruslan Display":{"family":"Ruslan Display","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Russo One":{"family":"Russo One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Ruthie":{"family":"Ruthie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Rye":{"family":"Rye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sacramento":{"family":"Sacramento","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Sahitya":{"family":"Sahitya","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Sail":{"family":"Sail","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Salsa":{"family":"Salsa","category":"display","variants":["regular"],"subsets":["latin"]},"Sanchez":{"family":"Sanchez","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Sancreek":{"family":"Sancreek","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sansita One":{"family":"Sansita One","category":"display","variants":["regular"],"subsets":["latin"]},"Sarala":{"family":"Sarala","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sarina":{"family":"Sarina","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sarpanch":{"family":"Sarpanch","category":"sans-serif","variants":["regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Satisfy":{"family":"Satisfy","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Scada":{"family":"Scada","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Scheherazade":{"family":"Scheherazade","category":"serif","variants":["regular","700"],"subsets":["latin","arabic"]},"Schoolbell":{"family":"Schoolbell","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Scope One":{"family":"Scope One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Seaweed Script":{"family":"Seaweed Script","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Secular One":{"family":"Secular One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","hebrew","latin"]},"Sevillana":{"family":"Sevillana","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Seymour One":{"family":"Seymour One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Shadows Into Light":{"family":"Shadows Into Light","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Shadows Into Light Two":{"family":"Shadows Into Light Two","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Shanti":{"family":"Shanti","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share":{"family":"Share","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Share Tech":{"family":"Share Tech","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share Tech Mono":{"family":"Share Tech Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Shojumaru":{"family":"Shojumaru","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Short Stack":{"family":"Short Stack","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Shrikhand":{"family":"Shrikhand","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Siemreap":{"family":"Siemreap","category":"display","variants":["regular"],"subsets":["khmer"]},"Sigmar One":{"family":"Sigmar One","category":"display","variants":["regular"],"subsets":["latin"]},"Signika":{"family":"Signika","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Signika Negative":{"family":"Signika Negative","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Simonetta":{"family":"Simonetta","category":"display","variants":["regular","italic","900","900italic"],"subsets":["latin-ext","latin"]},"Sintony":{"family":"Sintony","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Sirin Stencil":{"family":"Sirin Stencil","category":"display","variants":["regular"],"subsets":["latin"]},"Six Caps":{"family":"Six Caps","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Skranji":{"family":"Skranji","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Slabo 13px":{"family":"Slabo 13px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slabo 27px":{"family":"Slabo 27px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slackey":{"family":"Slackey","category":"display","variants":["regular"],"subsets":["latin"]},"Smokum":{"family":"Smokum","category":"display","variants":["regular"],"subsets":["latin"]},"Smythe":{"family":"Smythe","category":"display","variants":["regular"],"subsets":["latin"]},"Sniglet":{"family":"Sniglet","category":"display","variants":["regular","800"],"subsets":["latin-ext","latin"]},"Snippet":{"family":"Snippet","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Snowburst One":{"family":"Snowburst One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sofadi One":{"family":"Sofadi One","category":"display","variants":["regular"],"subsets":["latin"]},"Sofia":{"family":"Sofia","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Sonsie One":{"family":"Sonsie One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sorts Mill Goudy":{"family":"Sorts Mill Goudy","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Source Code Pro":{"family":"Source Code Pro","category":"monospace","variants":["200","300","regular","500","600","700","900"],"subsets":["latin-ext","latin"]},"Source Sans Pro":{"family":"Source Sans Pro","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Source Serif Pro":{"family":"Source Serif Pro","category":"serif","variants":["regular","600","700"],"subsets":["latin-ext","latin"]},"Space Mono":{"family":"Space Mono","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese"]},"Special Elite":{"family":"Special Elite","category":"display","variants":["regular"],"subsets":["latin"]},"Spicy Rice":{"family":"Spicy Rice","category":"display","variants":["regular"],"subsets":["latin"]},"Spinnaker":{"family":"Spinnaker","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Spirax":{"family":"Spirax","category":"display","variants":["regular"],"subsets":["latin"]},"Squada One":{"family":"Squada One","category":"display","variants":["regular"],"subsets":["latin"]},"Sree Krushnadevaraya":{"family":"Sree Krushnadevaraya","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Sriracha":{"family":"Sriracha","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Stalemate":{"family":"Stalemate","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Stalinist One":{"family":"Stalinist One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Stardos Stencil":{"family":"Stardos Stencil","category":"display","variants":["regular","700"],"subsets":["latin"]},"Stint Ultra Condensed":{"family":"Stint Ultra Condensed","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stint Ultra Expanded":{"family":"Stint Ultra Expanded","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stoke":{"family":"Stoke","category":"serif","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Strait":{"family":"Strait","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Sue Ellen Francisco":{"family":"Sue Ellen Francisco","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Suez One":{"family":"Suez One","category":"serif","variants":["regular"],"subsets":["latin-ext","hebrew","latin"]},"Sumana":{"family":"Sumana","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sunshiney":{"family":"Sunshiney","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Supermercado One":{"family":"Supermercado One","category":"display","variants":["regular"],"subsets":["latin"]},"Sura":{"family":"Sura","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Suranna":{"family":"Suranna","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Suravaram":{"family":"Suravaram","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Suwannaphum":{"family":"Suwannaphum","category":"display","variants":["regular"],"subsets":["khmer"]},"Swanky and Moo Moo":{"family":"Swanky and Moo Moo","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Syncopate":{"family":"Syncopate","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Tangerine":{"family":"Tangerine","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Taprom":{"family":"Taprom","category":"display","variants":["regular"],"subsets":["khmer"]},"Tauri":{"family":"Tauri","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Taviraj":{"family":"Taviraj","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Teko":{"family":"Teko","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Telex":{"family":"Telex","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Tenali Ramakrishna":{"family":"Tenali Ramakrishna","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Tenor Sans":{"family":"Tenor Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Text Me One":{"family":"Text Me One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"The Girl Next Door":{"family":"The Girl Next Door","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Tienne":{"family":"Tienne","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Tillana":{"family":"Tillana","category":"handwriting","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Timmana":{"family":"Timmana","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Tinos":{"family":"Tinos","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Titan One":{"family":"Titan One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Titillium Web":{"family":"Titillium Web","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"],"subsets":["latin-ext","latin"]},"Trade Winds":{"family":"Trade Winds","category":"display","variants":["regular"],"subsets":["latin"]},"Trirong":{"family":"Trirong","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Trocchi":{"family":"Trocchi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Trochut":{"family":"Trochut","category":"display","variants":["regular","italic","700"],"subsets":["latin"]},"Trykker":{"family":"Trykker","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Tulpen One":{"family":"Tulpen One","category":"display","variants":["regular"],"subsets":["latin"]},"Ubuntu":{"family":"Ubuntu","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ubuntu Condensed":{"family":"Ubuntu Condensed","category":"sans-serif","variants":["regular"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ubuntu Mono":{"family":"Ubuntu Mono","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ultra":{"family":"Ultra","category":"serif","variants":["regular"],"subsets":["latin"]},"Uncial Antiqua":{"family":"Uncial Antiqua","category":"display","variants":["regular"],"subsets":["latin"]},"Underdog":{"family":"Underdog","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Unica One":{"family":"Unica One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"UnifrakturCook":{"family":"UnifrakturCook","category":"display","variants":["700"],"subsets":["latin"]},"UnifrakturMaguntia":{"family":"UnifrakturMaguntia","category":"display","variants":["regular"],"subsets":["latin"]},"Unkempt":{"family":"Unkempt","category":"display","variants":["regular","700"],"subsets":["latin"]},"Unlock":{"family":"Unlock","category":"display","variants":["regular"],"subsets":["latin"]},"Unna":{"family":"Unna","category":"serif","variants":["regular"],"subsets":["latin"]},"VT323":{"family":"VT323","category":"monospace","variants":["regular"],"subsets":["latin"]},"Vampiro One":{"family":"Vampiro One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela":{"family":"Varela","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela Round":{"family":"Varela Round","category":"sans-serif","variants":["regular"],"subsets":["hebrew","latin"]},"Vast Shadow":{"family":"Vast Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Vesper Libre":{"family":"Vesper Libre","category":"serif","variants":["regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Vibur":{"family":"Vibur","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Vidaloka":{"family":"Vidaloka","category":"serif","variants":["regular"],"subsets":["latin"]},"Viga":{"family":"Viga","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Voces":{"family":"Voces","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Volkhov":{"family":"Volkhov","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Vollkorn":{"family":"Vollkorn","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Voltaire":{"family":"Voltaire","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Waiting for the Sunrise":{"family":"Waiting for the Sunrise","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Wallpoet":{"family":"Wallpoet","category":"display","variants":["regular"],"subsets":["latin"]},"Walter Turncoat":{"family":"Walter Turncoat","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Warnes":{"family":"Warnes","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wellfleet":{"family":"Wellfleet","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wendy One":{"family":"Wendy One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Wire One":{"family":"Wire One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Work Sans":{"family":"Work Sans","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin"]},"Yanone Kaffeesatz":{"family":"Yanone Kaffeesatz","category":"sans-serif","variants":["200","300","regular","700"],"subsets":["latin-ext","latin"]},"Yantramanav":{"family":"Yantramanav","category":"sans-serif","variants":["100","300","regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Yatra One":{"family":"Yatra One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Yellowtail":{"family":"Yellowtail","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Yeseva One":{"family":"Yeseva One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Yesteryear":{"family":"Yesteryear","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Yrsa":{"family":"Yrsa","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin"]},"Zeyada":{"family":"Zeyada","category":"handwriting","variants":["regular"],"subsets":["latin"]}}
features/customizer/controls/resources/google.fonts.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  //return $google_fonts;
3
- $google_fonts = json_decode( '{"ABeeZee":{"family":"ABeeZee","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Abel":{"family":"Abel","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Abril Fatface":{"family":"Abril Fatface","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aclonica":{"family":"Aclonica","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Acme":{"family":"Acme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Actor":{"family":"Actor","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Adamina":{"family":"Adamina","category":"serif","variants":["regular"],"subsets":["latin"]},"Advent Pro":{"family":"Advent Pro","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["latin-ext","latin","greek"]},"Aguafina Script":{"family":"Aguafina Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Akronim":{"family":"Akronim","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aladin":{"family":"Aladin","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Aldrich":{"family":"Aldrich","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Alef":{"family":"Alef","category":"sans-serif","variants":["regular","700"],"subsets":["hebrew","latin"]},"Alegreya":{"family":"Alegreya","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya SC":{"family":"Alegreya SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya Sans":{"family":"Alegreya Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","vietnamese","latin"]},"Alegreya Sans SC":{"family":"Alegreya Sans SC","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","vietnamese","latin"]},"Alex Brush":{"family":"Alex Brush","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Alfa Slab One":{"family":"Alfa Slab One","category":"display","variants":["regular"],"subsets":["latin"]},"Alice":{"family":"Alice","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike":{"family":"Alike","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike Angular":{"family":"Alike Angular","category":"serif","variants":["regular"],"subsets":["latin"]},"Allan":{"family":"Allan","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Allerta":{"family":"Allerta","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allerta Stencil":{"family":"Allerta Stencil","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allura":{"family":"Allura","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra":{"family":"Almendra","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Almendra Display":{"family":"Almendra Display","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra SC":{"family":"Almendra SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Amarante":{"family":"Amarante","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Amaranth":{"family":"Amaranth","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Amatic SC":{"family":"Amatic SC","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Amethysta":{"family":"Amethysta","category":"serif","variants":["regular"],"subsets":["latin"]},"Amiri":{"family":"Amiri","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["arabic","latin"]},"Amita":{"family":"Amita","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Anaheim":{"family":"Anaheim","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andada":{"family":"Andada","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andika":{"family":"Andika","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"Angkor":{"family":"Angkor","category":"display","variants":["regular"],"subsets":["khmer"]},"Annie Use Your Telescope":{"family":"Annie Use Your Telescope","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Anonymous Pro":{"family":"Anonymous Pro","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","latin","greek"]},"Antic":{"family":"Antic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Antic Didone":{"family":"Antic Didone","category":"serif","variants":["regular"],"subsets":["latin"]},"Antic Slab":{"family":"Antic Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Anton":{"family":"Anton","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Arapey":{"family":"Arapey","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Arbutus":{"family":"Arbutus","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Arbutus Slab":{"family":"Arbutus Slab","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Architects Daughter":{"family":"Architects Daughter","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Archivo Black":{"family":"Archivo Black","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Archivo Narrow":{"family":"Archivo Narrow","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Arimo":{"family":"Arimo","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","hebrew","latin","greek"]},"Arizonia":{"family":"Arizonia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Armata":{"family":"Armata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Artifika":{"family":"Artifika","category":"serif","variants":["regular"],"subsets":["latin"]},"Arvo":{"family":"Arvo","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Arya":{"family":"Arya","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Asap":{"family":"Asap","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Asar":{"family":"Asar","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Asset":{"family":"Asset","category":"display","variants":["regular"],"subsets":["latin"]},"Astloch":{"family":"Astloch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Asul":{"family":"Asul","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Atomic Age":{"family":"Atomic Age","category":"display","variants":["regular"],"subsets":["latin"]},"Aubrey":{"family":"Aubrey","category":"display","variants":["regular"],"subsets":["latin"]},"Audiowide":{"family":"Audiowide","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Autour One":{"family":"Autour One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Average":{"family":"Average","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Average Sans":{"family":"Average Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Gruesa Libre":{"family":"Averia Gruesa Libre","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Libre":{"family":"Averia Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Sans Libre":{"family":"Averia Sans Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Serif Libre":{"family":"Averia Serif Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Bad Script":{"family":"Bad Script","category":"handwriting","variants":["regular"],"subsets":["cyrillic","latin"]},"Balthazar":{"family":"Balthazar","category":"serif","variants":["regular"],"subsets":["latin"]},"Bangers":{"family":"Bangers","category":"display","variants":["regular"],"subsets":["latin"]},"Basic":{"family":"Basic","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Battambang":{"family":"Battambang","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Baumans":{"family":"Baumans","category":"display","variants":["regular"],"subsets":["latin"]},"Bayon":{"family":"Bayon","category":"display","variants":["regular"],"subsets":["khmer"]},"Belgrano":{"family":"Belgrano","category":"serif","variants":["regular"],"subsets":["latin"]},"Belleza":{"family":"Belleza","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"BenchNine":{"family":"BenchNine","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Bentham":{"family":"Bentham","category":"serif","variants":["regular"],"subsets":["latin"]},"Berkshire Swash":{"family":"Berkshire Swash","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bevan":{"family":"Bevan","category":"display","variants":["regular"],"subsets":["latin"]},"Bigelow Rules":{"family":"Bigelow Rules","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bigshot One":{"family":"Bigshot One","category":"display","variants":["regular"],"subsets":["latin"]},"Bilbo":{"family":"Bilbo","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bilbo Swash Caps":{"family":"Bilbo Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Biryani":{"family":"Biryani","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Bitter":{"family":"Bitter","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Black Ops One":{"family":"Black Ops One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bokor":{"family":"Bokor","category":"display","variants":["regular"],"subsets":["khmer"]},"Bonbon":{"family":"Bonbon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Boogaloo":{"family":"Boogaloo","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One":{"family":"Bowlby One","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One SC":{"family":"Bowlby One SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Brawler":{"family":"Brawler","category":"serif","variants":["regular"],"subsets":["latin"]},"Bree Serif":{"family":"Bree Serif","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubblegum Sans":{"family":"Bubblegum Sans","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubbler One":{"family":"Bubbler One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Buda":{"family":"Buda","category":"display","variants":["300"],"subsets":["latin"]},"Buenard":{"family":"Buenard","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Butcherman":{"family":"Butcherman","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Butterfly Kids":{"family":"Butterfly Kids","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cabin":{"family":"Cabin","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Cabin Condensed":{"family":"Cabin Condensed","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin"]},"Cabin Sketch":{"family":"Cabin Sketch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Caesar Dressing":{"family":"Caesar Dressing","category":"display","variants":["regular"],"subsets":["latin"]},"Cagliostro":{"family":"Cagliostro","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Calligraffitti":{"family":"Calligraffitti","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Cambay":{"family":"Cambay","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","devanagari"]},"Cambo":{"family":"Cambo","category":"serif","variants":["regular"],"subsets":["latin"]},"Candal":{"family":"Candal","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cantarell":{"family":"Cantarell","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Cantata One":{"family":"Cantata One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cantora One":{"family":"Cantora One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Capriola":{"family":"Capriola","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cardo":{"family":"Cardo","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","greek-ext","latin","greek"]},"Carme":{"family":"Carme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic":{"family":"Carrois Gothic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic SC":{"family":"Carrois Gothic SC","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carter One":{"family":"Carter One","category":"display","variants":["regular"],"subsets":["latin"]},"Caudex":{"family":"Caudex","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","greek-ext","latin","greek"]},"Cedarville Cursive":{"family":"Cedarville Cursive","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ceviche One":{"family":"Ceviche One","category":"display","variants":["regular"],"subsets":["latin"]},"Changa One":{"family":"Changa One","category":"display","variants":["regular","italic"],"subsets":["latin"]},"Chango":{"family":"Chango","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chau Philomene One":{"family":"Chau Philomene One","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Chela One":{"family":"Chela One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chelsea Market":{"family":"Chelsea Market","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chenla":{"family":"Chenla","category":"display","variants":["regular"],"subsets":["khmer"]},"Cherry Cream Soda":{"family":"Cherry Cream Soda","category":"display","variants":["regular"],"subsets":["latin"]},"Cherry Swash":{"family":"Cherry Swash","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Chewy":{"family":"Chewy","category":"display","variants":["regular"],"subsets":["latin"]},"Chicle":{"family":"Chicle","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chivo":{"family":"Chivo","category":"sans-serif","variants":["regular","italic","900","900italic"],"subsets":["latin"]},"Cinzel":{"family":"Cinzel","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Cinzel Decorative":{"family":"Cinzel Decorative","category":"display","variants":["regular","700","900"],"subsets":["latin"]},"Clicker Script":{"family":"Clicker Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Coda":{"family":"Coda","category":"display","variants":["regular","800"],"subsets":["latin"]},"Coda Caption":{"family":"Coda Caption","category":"sans-serif","variants":["800"],"subsets":["latin"]},"Codystar":{"family":"Codystar","category":"display","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Combo":{"family":"Combo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Comfortaa":{"family":"Comfortaa","category":"display","variants":["300","regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin","greek"]},"Coming Soon":{"family":"Coming Soon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Concert One":{"family":"Concert One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Condiment":{"family":"Condiment","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Content":{"family":"Content","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Contrail One":{"family":"Contrail One","category":"display","variants":["regular"],"subsets":["latin"]},"Convergence":{"family":"Convergence","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cookie":{"family":"Cookie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Copse":{"family":"Copse","category":"serif","variants":["regular"],"subsets":["latin"]},"Corben":{"family":"Corben","category":"display","variants":["regular","700"],"subsets":["latin"]},"Courgette":{"family":"Courgette","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cousine":{"family":"Cousine","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","hebrew","latin","greek"]},"Coustard":{"family":"Coustard","category":"serif","variants":["regular","900"],"subsets":["latin"]},"Covered By Your Grace":{"family":"Covered By Your Grace","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Crafty Girls":{"family":"Crafty Girls","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Creepster":{"family":"Creepster","category":"display","variants":["regular"],"subsets":["latin"]},"Crete Round":{"family":"Crete Round","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Crimson Text":{"family":"Crimson Text","category":"serif","variants":["regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Croissant One":{"family":"Croissant One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Crushed":{"family":"Crushed","category":"display","variants":["regular"],"subsets":["latin"]},"Cuprum":{"family":"Cuprum","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","latin"]},"Cutive":{"family":"Cutive","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cutive Mono":{"family":"Cutive Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"Damion":{"family":"Damion","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Dancing Script":{"family":"Dancing Script","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Dangrek":{"family":"Dangrek","category":"display","variants":["regular"],"subsets":["khmer"]},"Dawning of a New Day":{"family":"Dawning of a New Day","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Days One":{"family":"Days One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dekko":{"family":"Dekko","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Delius":{"family":"Delius","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Swash Caps":{"family":"Delius Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Unicase":{"family":"Delius Unicase","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Della Respira":{"family":"Della Respira","category":"serif","variants":["regular"],"subsets":["latin"]},"Denk One":{"family":"Denk One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Devonshire":{"family":"Devonshire","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Dhurjati":{"family":"Dhurjati","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Didact Gothic":{"family":"Didact Gothic","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","greek-ext","latin","greek"]},"Diplomata":{"family":"Diplomata","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Diplomata SC":{"family":"Diplomata SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Domine":{"family":"Domine","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Donegal One":{"family":"Donegal One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Doppio One":{"family":"Doppio One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dorsa":{"family":"Dorsa","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dosis":{"family":"Dosis","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin"]},"Dr Sugiyama":{"family":"Dr Sugiyama","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Droid Sans":{"family":"Droid Sans","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Droid Sans Mono":{"family":"Droid Sans Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Droid Serif":{"family":"Droid Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Duru Sans":{"family":"Duru Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dynalight":{"family":"Dynalight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"EB Garamond":{"family":"EB Garamond","category":"serif","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","latin"]},"Eagle Lake":{"family":"Eagle Lake","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Eater":{"family":"Eater","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Economica":{"family":"Economica","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Eczar":{"family":"Eczar","category":"serif","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Ek Mukta":{"family":"Ek Mukta","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Electrolize":{"family":"Electrolize","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Elsie":{"family":"Elsie","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Elsie Swash Caps":{"family":"Elsie Swash Caps","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Emblema One":{"family":"Emblema One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Emilys Candy":{"family":"Emilys Candy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Engagement":{"family":"Engagement","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Englebert":{"family":"Englebert","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Enriqueta":{"family":"Enriqueta","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Erica One":{"family":"Erica One","category":"display","variants":["regular"],"subsets":["latin"]},"Esteban":{"family":"Esteban","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Euphoria Script":{"family":"Euphoria Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ewert":{"family":"Ewert","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Exo":{"family":"Exo","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Exo 2":{"family":"Exo 2","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","cyrillic","latin"]},"Expletus Sans":{"family":"Expletus Sans","category":"display","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Fanwood Text":{"family":"Fanwood Text","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Fascinate":{"family":"Fascinate","category":"display","variants":["regular"],"subsets":["latin"]},"Fascinate Inline":{"family":"Fascinate Inline","category":"display","variants":["regular"],"subsets":["latin"]},"Faster One":{"family":"Faster One","category":"display","variants":["regular"],"subsets":["latin"]},"Fasthand":{"family":"Fasthand","category":"serif","variants":["regular"],"subsets":["khmer"]},"Fauna One":{"family":"Fauna One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Federant":{"family":"Federant","category":"display","variants":["regular"],"subsets":["latin"]},"Federo":{"family":"Federo","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Felipa":{"family":"Felipa","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Fenix":{"family":"Fenix","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Finger Paint":{"family":"Finger Paint","category":"display","variants":["regular"],"subsets":["latin"]},"Fira Mono":{"family":"Fira Mono","category":"monospace","variants":["regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin","greek"]},"Fira Sans":{"family":"Fira Sans","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin","greek"]},"Fjalla One":{"family":"Fjalla One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Fjord One":{"family":"Fjord One","category":"serif","variants":["regular"],"subsets":["latin"]},"Flamenco":{"family":"Flamenco","category":"display","variants":["300","regular"],"subsets":["latin"]},"Flavors":{"family":"Flavors","category":"display","variants":["regular"],"subsets":["latin"]},"Fondamento":{"family":"Fondamento","category":"handwriting","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Fontdiner Swanky":{"family":"Fontdiner Swanky","category":"display","variants":["regular"],"subsets":["latin"]},"Forum":{"family":"Forum","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"Francois One":{"family":"Francois One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Freckle Face":{"family":"Freckle Face","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fredericka the Great":{"family":"Fredericka the Great","category":"display","variants":["regular"],"subsets":["latin"]},"Fredoka One":{"family":"Fredoka One","category":"display","variants":["regular"],"subsets":["latin"]},"Freehand":{"family":"Freehand","category":"display","variants":["regular"],"subsets":["khmer"]},"Fresca":{"family":"Fresca","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Frijole":{"family":"Frijole","category":"display","variants":["regular"],"subsets":["latin"]},"Fruktur":{"family":"Fruktur","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fugaz One":{"family":"Fugaz One","category":"display","variants":["regular"],"subsets":["latin"]},"GFS Didot":{"family":"GFS Didot","category":"serif","variants":["regular"],"subsets":["greek"]},"GFS Neohellenic":{"family":"GFS Neohellenic","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek"]},"Gabriela":{"family":"Gabriela","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Gafata":{"family":"Gafata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Galdeano":{"family":"Galdeano","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Galindo":{"family":"Galindo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gentium Basic":{"family":"Gentium Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Gentium Book Basic":{"family":"Gentium Book Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Geo":{"family":"Geo","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Geostar":{"family":"Geostar","category":"display","variants":["regular"],"subsets":["latin"]},"Geostar Fill":{"family":"Geostar Fill","category":"display","variants":["regular"],"subsets":["latin"]},"Germania One":{"family":"Germania One","category":"display","variants":["regular"],"subsets":["latin"]},"Gidugu":{"family":"Gidugu","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Gilda Display":{"family":"Gilda Display","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Give You Glory":{"family":"Give You Glory","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Glass Antiqua":{"family":"Glass Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Glegoo":{"family":"Glegoo","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Gloria Hallelujah":{"family":"Gloria Hallelujah","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Goblin One":{"family":"Goblin One","category":"display","variants":["regular"],"subsets":["latin"]},"Gochi Hand":{"family":"Gochi Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Gorditas":{"family":"Gorditas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Goudy Bookletter 1911":{"family":"Goudy Bookletter 1911","category":"serif","variants":["regular"],"subsets":["latin"]},"Graduate":{"family":"Graduate","category":"display","variants":["regular"],"subsets":["latin"]},"Grand Hotel":{"family":"Grand Hotel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Gravitas One":{"family":"Gravitas One","category":"display","variants":["regular"],"subsets":["latin"]},"Great Vibes":{"family":"Great Vibes","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Griffy":{"family":"Griffy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gruppo":{"family":"Gruppo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gudea":{"family":"Gudea","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Gurajada":{"family":"Gurajada","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Habibi":{"family":"Habibi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Halant":{"family":"Halant","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Hammersmith One":{"family":"Hammersmith One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei":{"family":"Hanalei","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei Fill":{"family":"Hanalei Fill","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Handlee":{"family":"Handlee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Hanuman":{"family":"Hanuman","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Happy Monkey":{"family":"Happy Monkey","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Headland One":{"family":"Headland One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Henny Penny":{"family":"Henny Penny","category":"display","variants":["regular"],"subsets":["latin"]},"Herr Von Muellerhoff":{"family":"Herr Von Muellerhoff","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Hind":{"family":"Hind","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Holtwood One SC":{"family":"Holtwood One SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Homemade Apple":{"family":"Homemade Apple","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Homenaje":{"family":"Homenaje","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"IM Fell DW Pica":{"family":"IM Fell DW Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell DW Pica SC":{"family":"IM Fell DW Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Double Pica":{"family":"IM Fell Double Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Double Pica SC":{"family":"IM Fell Double Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell English":{"family":"IM Fell English","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell English SC":{"family":"IM Fell English SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell French Canon":{"family":"IM Fell French Canon","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell French Canon SC":{"family":"IM Fell French Canon SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Great Primer":{"family":"IM Fell Great Primer","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Great Primer SC":{"family":"IM Fell Great Primer SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Iceberg":{"family":"Iceberg","category":"display","variants":["regular"],"subsets":["latin"]},"Iceland":{"family":"Iceland","category":"display","variants":["regular"],"subsets":["latin"]},"Imprima":{"family":"Imprima","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Inconsolata":{"family":"Inconsolata","category":"monospace","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inder":{"family":"Inder","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Indie Flower":{"family":"Indie Flower","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Inika":{"family":"Inika","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inknut Antiqua":{"family":"Inknut Antiqua","category":"serif","variants":["300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Irish Grover":{"family":"Irish Grover","category":"display","variants":["regular"],"subsets":["latin"]},"Istok Web":{"family":"Istok Web","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"Italiana":{"family":"Italiana","category":"serif","variants":["regular"],"subsets":["latin"]},"Italianno":{"family":"Italianno","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Jacques Francois":{"family":"Jacques Francois","category":"serif","variants":["regular"],"subsets":["latin"]},"Jacques Francois Shadow":{"family":"Jacques Francois Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Jaldi":{"family":"Jaldi","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Jim Nightshade":{"family":"Jim Nightshade","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Jockey One":{"family":"Jockey One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Jolly Lodger":{"family":"Jolly Lodger","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Josefin Sans":{"family":"Josefin Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin"]},"Josefin Slab":{"family":"Josefin Slab","category":"serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Joti One":{"family":"Joti One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Judson":{"family":"Judson","category":"serif","variants":["regular","italic","700"],"subsets":["latin"]},"Julee":{"family":"Julee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Julius Sans One":{"family":"Julius Sans One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Junge":{"family":"Junge","category":"serif","variants":["regular"],"subsets":["latin"]},"Jura":{"family":"Jura","category":"sans-serif","variants":["300","regular","500","600"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin","greek"]},"Just Another Hand":{"family":"Just Another Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Just Me Again Down Here":{"family":"Just Me Again Down Here","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kadwa":{"family":"Kadwa","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Kalam":{"family":"Kalam","category":"handwriting","variants":["300","regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Kameron":{"family":"Kameron","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Kantumruy":{"family":"Kantumruy","category":"sans-serif","variants":["300","regular","700"],"subsets":["khmer"]},"Karla":{"family":"Karla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Karma":{"family":"Karma","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Kaushan Script":{"family":"Kaushan Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kavoon":{"family":"Kavoon","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kdam Thmor":{"family":"Kdam Thmor","category":"display","variants":["regular"],"subsets":["khmer"]},"Keania One":{"family":"Keania One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kelly Slab":{"family":"Kelly Slab","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Kenia":{"family":"Kenia","category":"display","variants":["regular"],"subsets":["latin"]},"Khand":{"family":"Khand","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Khmer":{"family":"Khmer","category":"display","variants":["regular"],"subsets":["khmer"]},"Khula":{"family":"Khula","category":"sans-serif","variants":["300","regular","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Kite One":{"family":"Kite One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Knewave":{"family":"Knewave","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kotta One":{"family":"Kotta One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Koulen":{"family":"Koulen","category":"display","variants":["regular"],"subsets":["khmer"]},"Kranky":{"family":"Kranky","category":"display","variants":["regular"],"subsets":["latin"]},"Kreon":{"family":"Kreon","category":"serif","variants":["300","regular","700"],"subsets":["latin"]},"Kristi":{"family":"Kristi","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Krona One":{"family":"Krona One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Kurale":{"family":"Kurale","category":"serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin","devanagari"]},"La Belle Aurore":{"family":"La Belle Aurore","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Laila":{"family":"Laila","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Lakki Reddy":{"family":"Lakki Reddy","category":"handwriting","variants":["regular"],"subsets":["telugu","latin"]},"Lancelot":{"family":"Lancelot","category":"display","variants":["regular"],"subsets":["latin"]},"Lateef":{"family":"Lateef","category":"handwriting","variants":["regular"],"subsets":["arabic","latin"]},"Lato":{"family":"Lato","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"League Script":{"family":"League Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Leckerli One":{"family":"Leckerli One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ledger":{"family":"Ledger","category":"serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Lekton":{"family":"Lekton","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Lemon":{"family":"Lemon","category":"display","variants":["regular"],"subsets":["latin"]},"Libre Baskerville":{"family":"Libre Baskerville","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Life Savers":{"family":"Life Savers","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Lilita One":{"family":"Lilita One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Lily Script One":{"family":"Lily Script One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Limelight":{"family":"Limelight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Linden Hill":{"family":"Linden Hill","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Lobster":{"family":"Lobster","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","vietnamese","latin"]},"Lobster Two":{"family":"Lobster Two","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Londrina Outline":{"family":"Londrina Outline","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Shadow":{"family":"Londrina Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Sketch":{"family":"Londrina Sketch","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Solid":{"family":"Londrina Solid","category":"display","variants":["regular"],"subsets":["latin"]},"Lora":{"family":"Lora","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","latin"]},"Love Ya Like A Sister":{"family":"Love Ya Like A Sister","category":"display","variants":["regular"],"subsets":["latin"]},"Loved by the King":{"family":"Loved by the King","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Lovers Quarrel":{"family":"Lovers Quarrel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Luckiest Guy":{"family":"Luckiest Guy","category":"display","variants":["regular"],"subsets":["latin"]},"Lusitana":{"family":"Lusitana","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Lustria":{"family":"Lustria","category":"serif","variants":["regular"],"subsets":["latin"]},"Macondo":{"family":"Macondo","category":"display","variants":["regular"],"subsets":["latin"]},"Macondo Swash Caps":{"family":"Macondo Swash Caps","category":"display","variants":["regular"],"subsets":["latin"]},"Magra":{"family":"Magra","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Maiden Orange":{"family":"Maiden Orange","category":"display","variants":["regular"],"subsets":["latin"]},"Mako":{"family":"Mako","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Mallanna":{"family":"Mallanna","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Mandali":{"family":"Mandali","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Marcellus":{"family":"Marcellus","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marcellus SC":{"family":"Marcellus SC","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marck Script":{"family":"Marck Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Margarine":{"family":"Margarine","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Marko One":{"family":"Marko One","category":"serif","variants":["regular"],"subsets":["latin"]},"Marmelad":{"family":"Marmelad","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Martel":{"family":"Martel","category":"serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Martel Sans":{"family":"Martel Sans","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Marvel":{"family":"Marvel","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Mate":{"family":"Mate","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Mate SC":{"family":"Mate SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Maven Pro":{"family":"Maven Pro","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"McLaren":{"family":"McLaren","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Meddon":{"family":"Meddon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"MedievalSharp":{"family":"MedievalSharp","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Medula One":{"family":"Medula One","category":"display","variants":["regular"],"subsets":["latin"]},"Megrim":{"family":"Megrim","category":"display","variants":["regular"],"subsets":["latin"]},"Meie Script":{"family":"Meie Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Merienda":{"family":"Merienda","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Merienda One":{"family":"Merienda One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Merriweather":{"family":"Merriweather","category":"serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Merriweather Sans":{"family":"Merriweather Sans","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","800","800italic"],"subsets":["latin-ext","latin"]},"Metal":{"family":"Metal","category":"display","variants":["regular"],"subsets":["khmer"]},"Metal Mania":{"family":"Metal Mania","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metamorphous":{"family":"Metamorphous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metrophobic":{"family":"Metrophobic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Michroma":{"family":"Michroma","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Milonga":{"family":"Milonga","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Miltonian":{"family":"Miltonian","category":"display","variants":["regular"],"subsets":["latin"]},"Miltonian Tattoo":{"family":"Miltonian Tattoo","category":"display","variants":["regular"],"subsets":["latin"]},"Miniver":{"family":"Miniver","category":"display","variants":["regular"],"subsets":["latin"]},"Miss Fajardose":{"family":"Miss Fajardose","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Modak":{"family":"Modak","category":"display","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Modern Antiqua":{"family":"Modern Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Molengo":{"family":"Molengo","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Molle":{"family":"Molle","category":"handwriting","variants":["italic"],"subsets":["latin-ext","latin"]},"Monda":{"family":"Monda","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Monofett":{"family":"Monofett","category":"display","variants":["regular"],"subsets":["latin"]},"Monoton":{"family":"Monoton","category":"display","variants":["regular"],"subsets":["latin"]},"Monsieur La Doulaise":{"family":"Monsieur La Doulaise","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Montaga":{"family":"Montaga","category":"serif","variants":["regular"],"subsets":["latin"]},"Montez":{"family":"Montez","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Montserrat":{"family":"Montserrat","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Alternates":{"family":"Montserrat Alternates","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Subrayada":{"family":"Montserrat Subrayada","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Moul":{"family":"Moul","category":"display","variants":["regular"],"subsets":["khmer"]},"Moulpali":{"family":"Moulpali","category":"display","variants":["regular"],"subsets":["khmer"]},"Mountains of Christmas":{"family":"Mountains of Christmas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Mouse Memoirs":{"family":"Mouse Memoirs","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Bedfort":{"family":"Mr Bedfort","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Dafoe":{"family":"Mr Dafoe","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr De Haviland":{"family":"Mr De Haviland","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Saint Delafield":{"family":"Mrs Saint Delafield","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Sheppards":{"family":"Mrs Sheppards","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Muli":{"family":"Muli","category":"sans-serif","variants":["300","300italic","regular","italic"],"subsets":["latin"]},"Mystery Quest":{"family":"Mystery Quest","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"NTR":{"family":"NTR","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Neucha":{"family":"Neucha","category":"handwriting","variants":["regular"],"subsets":["cyrillic","latin"]},"Neuton":{"family":"Neuton","category":"serif","variants":["200","300","regular","italic","700","800"],"subsets":["latin-ext","latin"]},"New Rocker":{"family":"New Rocker","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"News Cycle":{"family":"News Cycle","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Niconne":{"family":"Niconne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nixie One":{"family":"Nixie One","category":"display","variants":["regular"],"subsets":["latin"]},"Nobile":{"family":"Nobile","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Nokora":{"family":"Nokora","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Norican":{"family":"Norican","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nosifer":{"family":"Nosifer","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Nothing You Could Do":{"family":"Nothing You Could Do","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Noticia Text":{"family":"Noticia Text","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","vietnamese","latin"]},"Noto Sans":{"family":"Noto Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","devanagari","greek"]},"Noto Serif":{"family":"Noto Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Nova Cut":{"family":"Nova Cut","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Flat":{"family":"Nova Flat","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Mono":{"family":"Nova Mono","category":"monospace","variants":["regular"],"subsets":["latin","greek"]},"Nova Oval":{"family":"Nova Oval","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Round":{"family":"Nova Round","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Script":{"family":"Nova Script","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Slim":{"family":"Nova Slim","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Square":{"family":"Nova Square","category":"display","variants":["regular"],"subsets":["latin"]},"Numans":{"family":"Numans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Nunito":{"family":"Nunito","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Odor Mean Chey":{"family":"Odor Mean Chey","category":"display","variants":["regular"],"subsets":["khmer"]},"Offside":{"family":"Offside","category":"display","variants":["regular"],"subsets":["latin"]},"Old Standard TT":{"family":"Old Standard TT","category":"serif","variants":["regular","italic","700"],"subsets":["latin"]},"Oldenburg":{"family":"Oldenburg","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Oleo Script":{"family":"Oleo Script","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Oleo Script Swash Caps":{"family":"Oleo Script Swash Caps","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Open Sans":{"family":"Open Sans","category":"sans-serif","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Open Sans Condensed":{"family":"Open Sans Condensed","category":"sans-serif","variants":["300","300italic","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Oranienbaum":{"family":"Oranienbaum","category":"serif","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"Orbitron":{"family":"Orbitron","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"Oregano":{"family":"Oregano","category":"display","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Orienta":{"family":"Orienta","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Original Surfer":{"family":"Original Surfer","category":"display","variants":["regular"],"subsets":["latin"]},"Oswald":{"family":"Oswald","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Over the Rainbow":{"family":"Over the Rainbow","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Overlock":{"family":"Overlock","category":"display","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Overlock SC":{"family":"Overlock SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ovo":{"family":"Ovo","category":"serif","variants":["regular"],"subsets":["latin"]},"Oxygen":{"family":"Oxygen","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Oxygen Mono":{"family":"Oxygen Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"PT Mono":{"family":"PT Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"PT Sans":{"family":"PT Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"PT Sans Caption":{"family":"PT Sans Caption","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"PT Sans Narrow":{"family":"PT Sans Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"PT Serif":{"family":"PT Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"PT Serif Caption":{"family":"PT Serif Caption","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin"]},"Pacifico":{"family":"Pacifico","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Palanquin":{"family":"Palanquin","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Palanquin Dark":{"family":"Palanquin Dark","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Paprika":{"family":"Paprika","category":"display","variants":["regular"],"subsets":["latin"]},"Parisienne":{"family":"Parisienne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Passero One":{"family":"Passero One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Passion One":{"family":"Passion One","category":"display","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Pathway Gothic One":{"family":"Pathway Gothic One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Patrick Hand":{"family":"Patrick Hand","category":"handwriting","variants":["regular"],"subsets":["latin-ext","vietnamese","latin"]},"Patrick Hand SC":{"family":"Patrick Hand SC","category":"handwriting","variants":["regular"],"subsets":["latin-ext","vietnamese","latin"]},"Patua One":{"family":"Patua One","category":"display","variants":["regular"],"subsets":["latin"]},"Paytone One":{"family":"Paytone One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Peddana":{"family":"Peddana","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Peralta":{"family":"Peralta","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Permanent Marker":{"family":"Permanent Marker","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Petit Formal Script":{"family":"Petit Formal Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Petrona":{"family":"Petrona","category":"serif","variants":["regular"],"subsets":["latin"]},"Philosopher":{"family":"Philosopher","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["cyrillic","latin"]},"Piedra":{"family":"Piedra","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Pinyon Script":{"family":"Pinyon Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Pirata One":{"family":"Pirata One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Plaster":{"family":"Plaster","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Play":{"family":"Play","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","latin","greek"]},"Playball":{"family":"Playball","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Playfair Display":{"family":"Playfair Display","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","cyrillic","latin"]},"Playfair Display SC":{"family":"Playfair Display SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","cyrillic","latin"]},"Podkova":{"family":"Podkova","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Poiret One":{"family":"Poiret One","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Poller One":{"family":"Poller One","category":"display","variants":["regular"],"subsets":["latin"]},"Poly":{"family":"Poly","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Pompiere":{"family":"Pompiere","category":"display","variants":["regular"],"subsets":["latin"]},"Pontano Sans":{"family":"Pontano Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Poppins":{"family":"Poppins","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Port Lligat Sans":{"family":"Port Lligat Sans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Port Lligat Slab":{"family":"Port Lligat Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Pragati Narrow":{"family":"Pragati Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Prata":{"family":"Prata","category":"serif","variants":["regular"],"subsets":["latin"]},"Preahvihear":{"family":"Preahvihear","category":"display","variants":["regular"],"subsets":["khmer"]},"Press Start 2P":{"family":"Press Start 2P","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin","greek"]},"Princess Sofia":{"family":"Princess Sofia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Prociono":{"family":"Prociono","category":"serif","variants":["regular"],"subsets":["latin"]},"Prosto One":{"family":"Prosto One","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Puritan":{"family":"Puritan","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Purple Purse":{"family":"Purple Purse","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Quando":{"family":"Quando","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Quantico":{"family":"Quantico","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Quattrocento":{"family":"Quattrocento","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Quattrocento Sans":{"family":"Quattrocento Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Questrial":{"family":"Questrial","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Quicksand":{"family":"Quicksand","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Quintessential":{"family":"Quintessential","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Qwigley":{"family":"Qwigley","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Racing Sans One":{"family":"Racing Sans One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Radley":{"family":"Radley","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rajdhani":{"family":"Rajdhani","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Raleway":{"family":"Raleway","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"],"subsets":["latin"]},"Raleway Dots":{"family":"Raleway Dots","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ramabhadra":{"family":"Ramabhadra","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Ramaraja":{"family":"Ramaraja","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Rambla":{"family":"Rambla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Rammetto One":{"family":"Rammetto One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ranchers":{"family":"Ranchers","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rancho":{"family":"Rancho","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ranga":{"family":"Ranga","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Rationale":{"family":"Rationale","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Ravi Prakash":{"family":"Ravi Prakash","category":"display","variants":["regular"],"subsets":["telugu","latin"]},"Redressed":{"family":"Redressed","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Reenie Beanie":{"family":"Reenie Beanie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Revalia":{"family":"Revalia","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rhodium Libre":{"family":"Rhodium Libre","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Ribeye":{"family":"Ribeye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ribeye Marrow":{"family":"Ribeye Marrow","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Righteous":{"family":"Righteous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Risque":{"family":"Risque","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Roboto":{"family":"Roboto","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Roboto Condensed":{"family":"Roboto Condensed","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Roboto Mono":{"family":"Roboto Mono","category":"monospace","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Roboto Slab":{"family":"Roboto Slab","category":"serif","variants":["100","300","regular","700"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","latin","greek"]},"Rochester":{"family":"Rochester","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rock Salt":{"family":"Rock Salt","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rokkitt":{"family":"Rokkitt","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Romanesco":{"family":"Romanesco","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ropa Sans":{"family":"Ropa Sans","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rosario":{"family":"Rosario","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Rosarivo":{"family":"Rosarivo","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rouge Script":{"family":"Rouge Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rozha One":{"family":"Rozha One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Rubik Mono One":{"family":"Rubik Mono One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Rubik One":{"family":"Rubik One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruda":{"family":"Ruda","category":"sans-serif","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Rufina":{"family":"Rufina","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Ruge Boogie":{"family":"Ruge Boogie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruluko":{"family":"Ruluko","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Rum Raisin":{"family":"Rum Raisin","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruslan Display":{"family":"Ruslan Display","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Russo One":{"family":"Russo One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Ruthie":{"family":"Ruthie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Rye":{"family":"Rye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sacramento":{"family":"Sacramento","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Sahitya":{"family":"Sahitya","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Sail":{"family":"Sail","category":"display","variants":["regular"],"subsets":["latin"]},"Salsa":{"family":"Salsa","category":"display","variants":["regular"],"subsets":["latin"]},"Sanchez":{"family":"Sanchez","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Sancreek":{"family":"Sancreek","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sansita One":{"family":"Sansita One","category":"display","variants":["regular"],"subsets":["latin"]},"Sarala":{"family":"Sarala","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sarina":{"family":"Sarina","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sarpanch":{"family":"Sarpanch","category":"sans-serif","variants":["regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Satisfy":{"family":"Satisfy","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Scada":{"family":"Scada","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","latin"]},"Scheherazade":{"family":"Scheherazade","category":"serif","variants":["regular"],"subsets":["arabic","latin"]},"Schoolbell":{"family":"Schoolbell","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Seaweed Script":{"family":"Seaweed Script","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sevillana":{"family":"Sevillana","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Seymour One":{"family":"Seymour One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Shadows Into Light":{"family":"Shadows Into Light","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Shadows Into Light Two":{"family":"Shadows Into Light Two","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Shanti":{"family":"Shanti","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share":{"family":"Share","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Share Tech":{"family":"Share Tech","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share Tech Mono":{"family":"Share Tech Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Shojumaru":{"family":"Shojumaru","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Short Stack":{"family":"Short Stack","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Siemreap":{"family":"Siemreap","category":"display","variants":["regular"],"subsets":["khmer"]},"Sigmar One":{"family":"Sigmar One","category":"display","variants":["regular"],"subsets":["latin"]},"Signika":{"family":"Signika","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Signika Negative":{"family":"Signika Negative","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Simonetta":{"family":"Simonetta","category":"display","variants":["regular","italic","900","900italic"],"subsets":["latin-ext","latin"]},"Sintony":{"family":"Sintony","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Sirin Stencil":{"family":"Sirin Stencil","category":"display","variants":["regular"],"subsets":["latin"]},"Six Caps":{"family":"Six Caps","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Skranji":{"family":"Skranji","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Slabo 13px":{"family":"Slabo 13px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slabo 27px":{"family":"Slabo 27px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slackey":{"family":"Slackey","category":"display","variants":["regular"],"subsets":["latin"]},"Smokum":{"family":"Smokum","category":"display","variants":["regular"],"subsets":["latin"]},"Smythe":{"family":"Smythe","category":"display","variants":["regular"],"subsets":["latin"]},"Sniglet":{"family":"Sniglet","category":"display","variants":["regular","800"],"subsets":["latin-ext","latin"]},"Snippet":{"family":"Snippet","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Snowburst One":{"family":"Snowburst One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sofadi One":{"family":"Sofadi One","category":"display","variants":["regular"],"subsets":["latin"]},"Sofia":{"family":"Sofia","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Sonsie One":{"family":"Sonsie One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sorts Mill Goudy":{"family":"Sorts Mill Goudy","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Source Code Pro":{"family":"Source Code Pro","category":"monospace","variants":["200","300","regular","500","600","700","900"],"subsets":["latin-ext","latin"]},"Source Sans Pro":{"family":"Source Sans Pro","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"],"subsets":["latin-ext","vietnamese","latin"]},"Source Serif Pro":{"family":"Source Serif Pro","category":"serif","variants":["regular","600","700"],"subsets":["latin-ext","latin"]},"Special Elite":{"family":"Special Elite","category":"display","variants":["regular"],"subsets":["latin"]},"Spicy Rice":{"family":"Spicy Rice","category":"display","variants":["regular"],"subsets":["latin"]},"Spinnaker":{"family":"Spinnaker","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Spirax":{"family":"Spirax","category":"display","variants":["regular"],"subsets":["latin"]},"Squada One":{"family":"Squada One","category":"display","variants":["regular"],"subsets":["latin"]},"Sree Krushnadevaraya":{"family":"Sree Krushnadevaraya","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Stalemate":{"family":"Stalemate","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Stalinist One":{"family":"Stalinist One","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Stardos Stencil":{"family":"Stardos Stencil","category":"display","variants":["regular","700"],"subsets":["latin"]},"Stint Ultra Condensed":{"family":"Stint Ultra Condensed","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stint Ultra Expanded":{"family":"Stint Ultra Expanded","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stoke":{"family":"Stoke","category":"serif","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Strait":{"family":"Strait","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Sue Ellen Francisco":{"family":"Sue Ellen Francisco","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Sumana":{"family":"Sumana","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sunshiney":{"family":"Sunshiney","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Supermercado One":{"family":"Supermercado One","category":"display","variants":["regular"],"subsets":["latin"]},"Sura":{"family":"Sura","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Suranna":{"family":"Suranna","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Suravaram":{"family":"Suravaram","category":"serif","variants":["regular"],"subsets":["telugu","latin"]},"Suwannaphum":{"family":"Suwannaphum","category":"display","variants":["regular"],"subsets":["khmer"]},"Swanky and Moo Moo":{"family":"Swanky and Moo Moo","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Syncopate":{"family":"Syncopate","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Tangerine":{"family":"Tangerine","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Taprom":{"family":"Taprom","category":"display","variants":["regular"],"subsets":["khmer"]},"Tauri":{"family":"Tauri","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Teko":{"family":"Teko","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Telex":{"family":"Telex","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Tenali Ramakrishna":{"family":"Tenali Ramakrishna","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Tenor Sans":{"family":"Tenor Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Text Me One":{"family":"Text Me One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"The Girl Next Door":{"family":"The Girl Next Door","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Tienne":{"family":"Tienne","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Tillana":{"family":"Tillana","category":"handwriting","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Timmana":{"family":"Timmana","category":"sans-serif","variants":["regular"],"subsets":["telugu","latin"]},"Tinos":{"family":"Tinos","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","vietnamese","greek-ext","hebrew","latin","greek"]},"Titan One":{"family":"Titan One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Titillium Web":{"family":"Titillium Web","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"],"subsets":["latin-ext","latin"]},"Trade Winds":{"family":"Trade Winds","category":"display","variants":["regular"],"subsets":["latin"]},"Trocchi":{"family":"Trocchi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Trochut":{"family":"Trochut","category":"display","variants":["regular","italic","700"],"subsets":["latin"]},"Trykker":{"family":"Trykker","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Tulpen One":{"family":"Tulpen One","category":"display","variants":["regular"],"subsets":["latin"]},"Ubuntu":{"family":"Ubuntu","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","greek-ext","latin","greek"]},"Ubuntu Condensed":{"family":"Ubuntu Condensed","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","cyrillic","cyrillic-ext","greek-ext","latin","greek"]},"Ubuntu Mono":{"family":"Ubuntu Mono","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","cyrillic","cyrillic-ext","greek-ext","latin","greek"]},"Ultra":{"family":"Ultra","category":"serif","variants":["regular"],"subsets":["latin"]},"Uncial Antiqua":{"family":"Uncial Antiqua","category":"display","variants":["regular"],"subsets":["latin"]},"Underdog":{"family":"Underdog","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Unica One":{"family":"Unica One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"UnifrakturCook":{"family":"UnifrakturCook","category":"display","variants":["700"],"subsets":["latin"]},"UnifrakturMaguntia":{"family":"UnifrakturMaguntia","category":"display","variants":["regular"],"subsets":["latin"]},"Unkempt":{"family":"Unkempt","category":"display","variants":["regular","700"],"subsets":["latin"]},"Unlock":{"family":"Unlock","category":"display","variants":["regular"],"subsets":["latin"]},"Unna":{"family":"Unna","category":"serif","variants":["regular"],"subsets":["latin"]},"VT323":{"family":"VT323","category":"monospace","variants":["regular"],"subsets":["latin"]},"Vampiro One":{"family":"Vampiro One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela":{"family":"Varela","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela Round":{"family":"Varela Round","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Vast Shadow":{"family":"Vast Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Vesper Libre":{"family":"Vesper Libre","category":"serif","variants":["regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Vibur":{"family":"Vibur","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Vidaloka":{"family":"Vidaloka","category":"serif","variants":["regular"],"subsets":["latin"]},"Viga":{"family":"Viga","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Voces":{"family":"Voces","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Volkhov":{"family":"Volkhov","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Vollkorn":{"family":"Vollkorn","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Voltaire":{"family":"Voltaire","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Waiting for the Sunrise":{"family":"Waiting for the Sunrise","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Wallpoet":{"family":"Wallpoet","category":"display","variants":["regular"],"subsets":["latin"]},"Walter Turncoat":{"family":"Walter Turncoat","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Warnes":{"family":"Warnes","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wellfleet":{"family":"Wellfleet","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wendy One":{"family":"Wendy One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Wire One":{"family":"Wire One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Yanone Kaffeesatz":{"family":"Yanone Kaffeesatz","category":"sans-serif","variants":["200","300","regular","700"],"subsets":["latin-ext","latin"]},"Yantramanav":{"family":"Yantramanav","category":"sans-serif","variants":["100","300","regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Yellowtail":{"family":"Yellowtail","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Yeseva One":{"family":"Yeseva One","category":"display","variants":["regular"],"subsets":["latin-ext","cyrillic","latin"]},"Yesteryear":{"family":"Yesteryear","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Zeyada":{"family":"Zeyada","category":"handwriting","variants":["regular"],"subsets":["latin"]}}', true );
4
 
 
 
 
5
  return $google_fonts;
6
- //return $google_fonts['items'];
1
  <?php
2
  //return $google_fonts;
3
+ $google_fonts = json_decode( '{"ABeeZee":{"family":"ABeeZee","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Abel":{"family":"Abel","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Abhaya Libre":{"family":"Abhaya Libre","category":"serif","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","sinhala"]},"Abril Fatface":{"family":"Abril Fatface","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aclonica":{"family":"Aclonica","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Acme":{"family":"Acme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Actor":{"family":"Actor","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Adamina":{"family":"Adamina","category":"serif","variants":["regular"],"subsets":["latin"]},"Advent Pro":{"family":"Advent Pro","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["greek","latin-ext","latin"]},"Aguafina Script":{"family":"Aguafina Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Akronim":{"family":"Akronim","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Aladin":{"family":"Aladin","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Aldrich":{"family":"Aldrich","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Alef":{"family":"Alef","category":"sans-serif","variants":["regular","700"],"subsets":["hebrew","latin"]},"Alegreya":{"family":"Alegreya","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya SC":{"family":"Alegreya SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Alegreya Sans":{"family":"Alegreya Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Alegreya Sans SC":{"family":"Alegreya Sans SC","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Alex Brush":{"family":"Alex Brush","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Alfa Slab One":{"family":"Alfa Slab One","category":"display","variants":["regular"],"subsets":["latin"]},"Alice":{"family":"Alice","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike":{"family":"Alike","category":"serif","variants":["regular"],"subsets":["latin"]},"Alike Angular":{"family":"Alike Angular","category":"serif","variants":["regular"],"subsets":["latin"]},"Allan":{"family":"Allan","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Allerta":{"family":"Allerta","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allerta Stencil":{"family":"Allerta Stencil","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Allura":{"family":"Allura","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra":{"family":"Almendra","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Almendra Display":{"family":"Almendra Display","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Almendra SC":{"family":"Almendra SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Amarante":{"family":"Amarante","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Amaranth":{"family":"Amaranth","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Amatic SC":{"family":"Amatic SC","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Amatica SC":{"family":"Amatica SC","category":"display","variants":["regular","700"],"subsets":["latin-ext","hebrew","latin"]},"Amethysta":{"family":"Amethysta","category":"serif","variants":["regular"],"subsets":["latin"]},"Amiko":{"family":"Amiko","category":"sans-serif","variants":["regular","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Amiri":{"family":"Amiri","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin","arabic"]},"Amita":{"family":"Amita","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Anaheim":{"family":"Anaheim","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andada":{"family":"Andada","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Andika":{"family":"Andika","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic","cyrillic-ext"]},"Angkor":{"family":"Angkor","category":"display","variants":["regular"],"subsets":["khmer"]},"Annie Use Your Telescope":{"family":"Annie Use Your Telescope","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Anonymous Pro":{"family":"Anonymous Pro","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","cyrillic"]},"Antic":{"family":"Antic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Antic Didone":{"family":"Antic Didone","category":"serif","variants":["regular"],"subsets":["latin"]},"Antic Slab":{"family":"Antic Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Anton":{"family":"Anton","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Arapey":{"family":"Arapey","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Arbutus":{"family":"Arbutus","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Arbutus Slab":{"family":"Arbutus Slab","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Architects Daughter":{"family":"Architects Daughter","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Archivo Black":{"family":"Archivo Black","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Archivo Narrow":{"family":"Archivo Narrow","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Aref Ruqaa":{"family":"Aref Ruqaa","category":"serif","variants":["regular","700"],"subsets":["latin","arabic"]},"Arima Madurai":{"family":"Arima Madurai","category":"display","variants":["100","200","300","regular","500","700","800","900"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Arimo":{"family":"Arimo","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Arizonia":{"family":"Arizonia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Armata":{"family":"Armata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Artifika":{"family":"Artifika","category":"serif","variants":["regular"],"subsets":["latin"]},"Arvo":{"family":"Arvo","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Arya":{"family":"Arya","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Asap":{"family":"Asap","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Asar":{"family":"Asar","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Asset":{"family":"Asset","category":"display","variants":["regular"],"subsets":["latin"]},"Assistant":{"family":"Assistant","category":"sans-serif","variants":["200","300","regular","600","700","800"],"subsets":["hebrew","latin"]},"Astloch":{"family":"Astloch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Asul":{"family":"Asul","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Athiti":{"family":"Athiti","category":"sans-serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Atma":{"family":"Atma","category":"display","variants":["300","regular","500","600","700"],"subsets":["bengali","latin-ext","latin"]},"Atomic Age":{"family":"Atomic Age","category":"display","variants":["regular"],"subsets":["latin"]},"Aubrey":{"family":"Aubrey","category":"display","variants":["regular"],"subsets":["latin"]},"Audiowide":{"family":"Audiowide","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Autour One":{"family":"Autour One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Average":{"family":"Average","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Average Sans":{"family":"Average Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Gruesa Libre":{"family":"Averia Gruesa Libre","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Averia Libre":{"family":"Averia Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Sans Libre":{"family":"Averia Sans Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Averia Serif Libre":{"family":"Averia Serif Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["latin"]},"Bad Script":{"family":"Bad Script","category":"handwriting","variants":["regular"],"subsets":["latin","cyrillic"]},"Baloo":{"family":"Baloo","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","devanagari"]},"Baloo Bhai":{"family":"Baloo Bhai","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati","vietnamese"]},"Baloo Bhaina":{"family":"Baloo Bhaina","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","oriya"]},"Baloo Chettan":{"family":"Baloo Chettan","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","malayalam"]},"Baloo Da":{"family":"Baloo Da","category":"display","variants":["regular"],"subsets":["bengali","latin-ext","latin","vietnamese"]},"Baloo Paaji":{"family":"Baloo Paaji","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","gurmukhi"]},"Baloo Tamma":{"family":"Baloo Tamma","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","kannada"]},"Baloo Thambi":{"family":"Baloo Thambi","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Balthazar":{"family":"Balthazar","category":"serif","variants":["regular"],"subsets":["latin"]},"Bangers":{"family":"Bangers","category":"display","variants":["regular"],"subsets":["latin"]},"Basic":{"family":"Basic","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Battambang":{"family":"Battambang","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Baumans":{"family":"Baumans","category":"display","variants":["regular"],"subsets":["latin"]},"Bayon":{"family":"Bayon","category":"display","variants":["regular"],"subsets":["khmer"]},"Belgrano":{"family":"Belgrano","category":"serif","variants":["regular"],"subsets":["latin"]},"Belleza":{"family":"Belleza","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"BenchNine":{"family":"BenchNine","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Bentham":{"family":"Bentham","category":"serif","variants":["regular"],"subsets":["latin"]},"Berkshire Swash":{"family":"Berkshire Swash","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bevan":{"family":"Bevan","category":"display","variants":["regular"],"subsets":["latin"]},"Bigelow Rules":{"family":"Bigelow Rules","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bigshot One":{"family":"Bigshot One","category":"display","variants":["regular"],"subsets":["latin"]},"Bilbo":{"family":"Bilbo","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Bilbo Swash Caps":{"family":"Bilbo Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"BioRhyme":{"family":"BioRhyme","category":"serif","variants":["200","300","regular","700","800"],"subsets":["latin-ext","latin"]},"BioRhyme Expanded":{"family":"BioRhyme Expanded","category":"serif","variants":["200","300","regular","700","800"],"subsets":["latin-ext","latin"]},"Biryani":{"family":"Biryani","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Bitter":{"family":"Bitter","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Black Ops One":{"family":"Black Ops One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bokor":{"family":"Bokor","category":"display","variants":["regular"],"subsets":["khmer"]},"Bonbon":{"family":"Bonbon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Boogaloo":{"family":"Boogaloo","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One":{"family":"Bowlby One","category":"display","variants":["regular"],"subsets":["latin"]},"Bowlby One SC":{"family":"Bowlby One SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Brawler":{"family":"Brawler","category":"serif","variants":["regular"],"subsets":["latin"]},"Bree Serif":{"family":"Bree Serif","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubblegum Sans":{"family":"Bubblegum Sans","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Bubbler One":{"family":"Bubbler One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Buda":{"family":"Buda","category":"display","variants":["300"],"subsets":["latin"]},"Buenard":{"family":"Buenard","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Bungee":{"family":"Bungee","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Hairline":{"family":"Bungee Hairline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Inline":{"family":"Bungee Inline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Outline":{"family":"Bungee Outline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Bungee Shade":{"family":"Bungee Shade","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Butcherman":{"family":"Butcherman","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Butterfly Kids":{"family":"Butterfly Kids","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cabin":{"family":"Cabin","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Cabin Condensed":{"family":"Cabin Condensed","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin"]},"Cabin Sketch":{"family":"Cabin Sketch","category":"display","variants":["regular","700"],"subsets":["latin"]},"Caesar Dressing":{"family":"Caesar Dressing","category":"display","variants":["regular"],"subsets":["latin"]},"Cagliostro":{"family":"Cagliostro","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cairo":{"family":"Cairo","category":"sans-serif","variants":["200","300","regular","600","700","900"],"subsets":["latin-ext","latin","arabic"]},"Calligraffitti":{"family":"Calligraffitti","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Cambay":{"family":"Cambay","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","devanagari"]},"Cambo":{"family":"Cambo","category":"serif","variants":["regular"],"subsets":["latin"]},"Candal":{"family":"Candal","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cantarell":{"family":"Cantarell","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Cantata One":{"family":"Cantata One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cantora One":{"family":"Cantora One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Capriola":{"family":"Capriola","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cardo":{"family":"Cardo","category":"serif","variants":["regular","italic","700"],"subsets":["greek","latin-ext","latin","greek-ext"]},"Carme":{"family":"Carme","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic":{"family":"Carrois Gothic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carrois Gothic SC":{"family":"Carrois Gothic SC","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Carter One":{"family":"Carter One","category":"display","variants":["regular"],"subsets":["latin"]},"Catamaran":{"family":"Catamaran","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin","tamil"]},"Caudex":{"family":"Caudex","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext"]},"Caveat":{"family":"Caveat","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Caveat Brush":{"family":"Caveat Brush","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cedarville Cursive":{"family":"Cedarville Cursive","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ceviche One":{"family":"Ceviche One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Changa":{"family":"Changa","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","arabic"]},"Changa One":{"family":"Changa One","category":"display","variants":["regular","italic"],"subsets":["latin"]},"Chango":{"family":"Chango","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chathura":{"family":"Chathura","category":"sans-serif","variants":["100","300","regular","700","800"],"subsets":["latin","telugu"]},"Chau Philomene One":{"family":"Chau Philomene One","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Chela One":{"family":"Chela One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chelsea Market":{"family":"Chelsea Market","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chenla":{"family":"Chenla","category":"display","variants":["regular"],"subsets":["khmer"]},"Cherry Cream Soda":{"family":"Cherry Cream Soda","category":"display","variants":["regular"],"subsets":["latin"]},"Cherry Swash":{"family":"Cherry Swash","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Chewy":{"family":"Chewy","category":"display","variants":["regular"],"subsets":["latin"]},"Chicle":{"family":"Chicle","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Chivo":{"family":"Chivo","category":"sans-serif","variants":["regular","italic","900","900italic"],"subsets":["latin"]},"Chonburi":{"family":"Chonburi","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Cinzel":{"family":"Cinzel","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Cinzel Decorative":{"family":"Cinzel Decorative","category":"display","variants":["regular","700","900"],"subsets":["latin"]},"Clicker Script":{"family":"Clicker Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Coda":{"family":"Coda","category":"display","variants":["regular","800"],"subsets":["latin-ext","latin"]},"Coda Caption":{"family":"Coda Caption","category":"sans-serif","variants":["800"],"subsets":["latin-ext","latin"]},"Codystar":{"family":"Codystar","category":"display","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Coiny":{"family":"Coiny","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","tamil"]},"Combo":{"family":"Combo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Comfortaa":{"family":"Comfortaa","category":"display","variants":["300","regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Coming Soon":{"family":"Coming Soon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Concert One":{"family":"Concert One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Condiment":{"family":"Condiment","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Content":{"family":"Content","category":"display","variants":["regular","700"],"subsets":["khmer"]},"Contrail One":{"family":"Contrail One","category":"display","variants":["regular"],"subsets":["latin"]},"Convergence":{"family":"Convergence","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Cookie":{"family":"Cookie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Copse":{"family":"Copse","category":"serif","variants":["regular"],"subsets":["latin"]},"Corben":{"family":"Corben","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Cormorant":{"family":"Cormorant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Garamond":{"family":"Cormorant Garamond","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Infant":{"family":"Cormorant Infant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant SC":{"family":"Cormorant SC","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Unicase":{"family":"Cormorant Unicase","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Cormorant Upright":{"family":"Cormorant Upright","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese"]},"Courgette":{"family":"Courgette","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Cousine":{"family":"Cousine","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Coustard":{"family":"Coustard","category":"serif","variants":["regular","900"],"subsets":["latin"]},"Covered By Your Grace":{"family":"Covered By Your Grace","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Crafty Girls":{"family":"Crafty Girls","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Creepster":{"family":"Creepster","category":"display","variants":["regular"],"subsets":["latin"]},"Crete Round":{"family":"Crete Round","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Crimson Text":{"family":"Crimson Text","category":"serif","variants":["regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Croissant One":{"family":"Croissant One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Crushed":{"family":"Crushed","category":"display","variants":["regular"],"subsets":["latin"]},"Cuprum":{"family":"Cuprum","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Cutive":{"family":"Cutive","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Cutive Mono":{"family":"Cutive Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"Damion":{"family":"Damion","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Dancing Script":{"family":"Dancing Script","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Dangrek":{"family":"Dangrek","category":"display","variants":["regular"],"subsets":["khmer"]},"David Libre":{"family":"David Libre","category":"serif","variants":["regular","500","700"],"subsets":["latin-ext","hebrew","latin","vietnamese"]},"Dawning of a New Day":{"family":"Dawning of a New Day","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Days One":{"family":"Days One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dekko":{"family":"Dekko","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Delius":{"family":"Delius","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Swash Caps":{"family":"Delius Swash Caps","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Delius Unicase":{"family":"Delius Unicase","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Della Respira":{"family":"Della Respira","category":"serif","variants":["regular"],"subsets":["latin"]},"Denk One":{"family":"Denk One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Devonshire":{"family":"Devonshire","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Dhurjati":{"family":"Dhurjati","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Didact Gothic":{"family":"Didact Gothic","category":"sans-serif","variants":["regular"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Diplomata":{"family":"Diplomata","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Diplomata SC":{"family":"Diplomata SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Domine":{"family":"Domine","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Donegal One":{"family":"Donegal One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Doppio One":{"family":"Doppio One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dorsa":{"family":"Dorsa","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Dosis":{"family":"Dosis","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin"]},"Dr Sugiyama":{"family":"Dr Sugiyama","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Droid Sans":{"family":"Droid Sans","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Droid Sans Mono":{"family":"Droid Sans Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Droid Serif":{"family":"Droid Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Duru Sans":{"family":"Duru Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Dynalight":{"family":"Dynalight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"EB Garamond":{"family":"EB Garamond","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic","cyrillic-ext"]},"Eagle Lake":{"family":"Eagle Lake","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Eater":{"family":"Eater","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Economica":{"family":"Economica","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Eczar":{"family":"Eczar","category":"serif","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Ek Mukta":{"family":"Ek Mukta","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"El Messiri":{"family":"El Messiri","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin","cyrillic","arabic"]},"Electrolize":{"family":"Electrolize","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Elsie":{"family":"Elsie","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Elsie Swash Caps":{"family":"Elsie Swash Caps","category":"display","variants":["regular","900"],"subsets":["latin-ext","latin"]},"Emblema One":{"family":"Emblema One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Emilys Candy":{"family":"Emilys Candy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Engagement":{"family":"Engagement","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Englebert":{"family":"Englebert","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Enriqueta":{"family":"Enriqueta","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Erica One":{"family":"Erica One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Esteban":{"family":"Esteban","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Euphoria Script":{"family":"Euphoria Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ewert":{"family":"Ewert","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Exo":{"family":"Exo","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Exo 2":{"family":"Exo 2","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Expletus Sans":{"family":"Expletus Sans","category":"display","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subsets":["latin"]},"Fanwood Text":{"family":"Fanwood Text","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Farsan":{"family":"Farsan","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati","vietnamese"]},"Fascinate":{"family":"Fascinate","category":"display","variants":["regular"],"subsets":["latin"]},"Fascinate Inline":{"family":"Fascinate Inline","category":"display","variants":["regular"],"subsets":["latin"]},"Faster One":{"family":"Faster One","category":"display","variants":["regular"],"subsets":["latin"]},"Fasthand":{"family":"Fasthand","category":"serif","variants":["regular"],"subsets":["khmer"]},"Fauna One":{"family":"Fauna One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Federant":{"family":"Federant","category":"display","variants":["regular"],"subsets":["latin"]},"Federo":{"family":"Federo","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Felipa":{"family":"Felipa","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Fenix":{"family":"Fenix","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Finger Paint":{"family":"Finger Paint","category":"display","variants":["regular"],"subsets":["latin"]},"Fira Mono":{"family":"Fira Mono","category":"monospace","variants":["regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Fira Sans":{"family":"Fira Sans","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Fjalla One":{"family":"Fjalla One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Fjord One":{"family":"Fjord One","category":"serif","variants":["regular"],"subsets":["latin"]},"Flamenco":{"family":"Flamenco","category":"display","variants":["300","regular"],"subsets":["latin"]},"Flavors":{"family":"Flavors","category":"display","variants":["regular"],"subsets":["latin"]},"Fondamento":{"family":"Fondamento","category":"handwriting","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Fontdiner Swanky":{"family":"Fontdiner Swanky","category":"display","variants":["regular"],"subsets":["latin"]},"Forum":{"family":"Forum","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Francois One":{"family":"Francois One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Frank Ruhl Libre":{"family":"Frank Ruhl Libre","category":"sans-serif","variants":["300","regular","500","700","900"],"subsets":["latin-ext","hebrew","latin"]},"Freckle Face":{"family":"Freckle Face","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fredericka the Great":{"family":"Fredericka the Great","category":"display","variants":["regular"],"subsets":["latin"]},"Fredoka One":{"family":"Fredoka One","category":"display","variants":["regular"],"subsets":["latin"]},"Freehand":{"family":"Freehand","category":"display","variants":["regular"],"subsets":["khmer"]},"Fresca":{"family":"Fresca","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Frijole":{"family":"Frijole","category":"display","variants":["regular"],"subsets":["latin"]},"Fruktur":{"family":"Fruktur","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Fugaz One":{"family":"Fugaz One","category":"display","variants":["regular"],"subsets":["latin"]},"GFS Didot":{"family":"GFS Didot","category":"serif","variants":["regular"],"subsets":["greek"]},"GFS Neohellenic":{"family":"GFS Neohellenic","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek"]},"Gabriela":{"family":"Gabriela","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Gafata":{"family":"Gafata","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Galada":{"family":"Galada","category":"display","variants":["regular"],"subsets":["bengali","latin"]},"Galdeano":{"family":"Galdeano","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Galindo":{"family":"Galindo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gentium Basic":{"family":"Gentium Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Gentium Book Basic":{"family":"Gentium Book Basic","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Geo":{"family":"Geo","category":"sans-serif","variants":["regular","italic"],"subsets":["latin"]},"Geostar":{"family":"Geostar","category":"display","variants":["regular"],"subsets":["latin"]},"Geostar Fill":{"family":"Geostar Fill","category":"display","variants":["regular"],"subsets":["latin"]},"Germania One":{"family":"Germania One","category":"display","variants":["regular"],"subsets":["latin"]},"Gidugu":{"family":"Gidugu","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Gilda Display":{"family":"Gilda Display","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Give You Glory":{"family":"Give You Glory","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Glass Antiqua":{"family":"Glass Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Glegoo":{"family":"Glegoo","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Gloria Hallelujah":{"family":"Gloria Hallelujah","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Goblin One":{"family":"Goblin One","category":"display","variants":["regular"],"subsets":["latin"]},"Gochi Hand":{"family":"Gochi Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Gorditas":{"family":"Gorditas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Goudy Bookletter 1911":{"family":"Goudy Bookletter 1911","category":"serif","variants":["regular"],"subsets":["latin"]},"Graduate":{"family":"Graduate","category":"display","variants":["regular"],"subsets":["latin"]},"Grand Hotel":{"family":"Grand Hotel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Gravitas One":{"family":"Gravitas One","category":"display","variants":["regular"],"subsets":["latin"]},"Great Vibes":{"family":"Great Vibes","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Griffy":{"family":"Griffy","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gruppo":{"family":"Gruppo","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Gudea":{"family":"Gudea","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Gurajada":{"family":"Gurajada","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Habibi":{"family":"Habibi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Halant":{"family":"Halant","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Hammersmith One":{"family":"Hammersmith One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei":{"family":"Hanalei","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Hanalei Fill":{"family":"Hanalei Fill","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Handlee":{"family":"Handlee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Hanuman":{"family":"Hanuman","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Happy Monkey":{"family":"Happy Monkey","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Harmattan":{"family":"Harmattan","category":"sans-serif","variants":["regular"],"subsets":["latin","arabic"]},"Headland One":{"family":"Headland One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Heebo":{"family":"Heebo","category":"sans-serif","variants":["100","300","regular","500","700","800","900"],"subsets":["hebrew","latin"]},"Henny Penny":{"family":"Henny Penny","category":"display","variants":["regular"],"subsets":["latin"]},"Herr Von Muellerhoff":{"family":"Herr Von Muellerhoff","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Hind":{"family":"Hind","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Hind Guntur":{"family":"Hind Guntur","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","telugu"]},"Hind Madurai":{"family":"Hind Madurai","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","tamil"]},"Hind Siliguri":{"family":"Hind Siliguri","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["bengali","latin-ext","latin"]},"Hind Vadodara":{"family":"Hind Vadodara","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","gujarati"]},"Holtwood One SC":{"family":"Holtwood One SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Homemade Apple":{"family":"Homemade Apple","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Homenaje":{"family":"Homenaje","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"IM Fell DW Pica":{"family":"IM Fell DW Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell DW Pica SC":{"family":"IM Fell DW Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Double Pica":{"family":"IM Fell Double Pica","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Double Pica SC":{"family":"IM Fell Double Pica SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell English":{"family":"IM Fell English","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell English SC":{"family":"IM Fell English SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell French Canon":{"family":"IM Fell French Canon","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell French Canon SC":{"family":"IM Fell French Canon SC","category":"serif","variants":["regular"],"subsets":["latin"]},"IM Fell Great Primer":{"family":"IM Fell Great Primer","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"IM Fell Great Primer SC":{"family":"IM Fell Great Primer SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Iceberg":{"family":"Iceberg","category":"display","variants":["regular"],"subsets":["latin"]},"Iceland":{"family":"Iceland","category":"display","variants":["regular"],"subsets":["latin"]},"Imprima":{"family":"Imprima","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Inconsolata":{"family":"Inconsolata","category":"monospace","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inder":{"family":"Inder","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Indie Flower":{"family":"Indie Flower","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Inika":{"family":"Inika","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Inknut Antiqua":{"family":"Inknut Antiqua","category":"serif","variants":["300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Irish Grover":{"family":"Irish Grover","category":"display","variants":["regular"],"subsets":["latin"]},"Istok Web":{"family":"Istok Web","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Italiana":{"family":"Italiana","category":"serif","variants":["regular"],"subsets":["latin"]},"Italianno":{"family":"Italianno","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Itim":{"family":"Itim","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Jacques Francois":{"family":"Jacques Francois","category":"serif","variants":["regular"],"subsets":["latin"]},"Jacques Francois Shadow":{"family":"Jacques Francois Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Jaldi":{"family":"Jaldi","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Jim Nightshade":{"family":"Jim Nightshade","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Jockey One":{"family":"Jockey One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Jolly Lodger":{"family":"Jolly Lodger","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Jomhuria":{"family":"Jomhuria","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Josefin Sans":{"family":"Josefin Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin-ext","latin"]},"Josefin Slab":{"family":"Josefin Slab","category":"serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subsets":["latin"]},"Joti One":{"family":"Joti One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Judson":{"family":"Judson","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin","vietnamese"]},"Julee":{"family":"Julee","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Julius Sans One":{"family":"Julius Sans One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Junge":{"family":"Junge","category":"serif","variants":["regular"],"subsets":["latin"]},"Jura":{"family":"Jura","category":"sans-serif","variants":["300","regular","500","600"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Just Another Hand":{"family":"Just Another Hand","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Just Me Again Down Here":{"family":"Just Me Again Down Here","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kadwa":{"family":"Kadwa","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Kalam":{"family":"Kalam","category":"handwriting","variants":["300","regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Kameron":{"family":"Kameron","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Kanit":{"family":"Kanit","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Kantumruy":{"family":"Kantumruy","category":"sans-serif","variants":["300","regular","700"],"subsets":["khmer"]},"Karla":{"family":"Karla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Karma":{"family":"Karma","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Katibeh":{"family":"Katibeh","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Kaushan Script":{"family":"Kaushan Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Kavivanar":{"family":"Kavivanar","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","tamil"]},"Kavoon":{"family":"Kavoon","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kdam Thmor":{"family":"Kdam Thmor","category":"display","variants":["regular"],"subsets":["khmer"]},"Keania One":{"family":"Keania One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kelly Slab":{"family":"Kelly Slab","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Kenia":{"family":"Kenia","category":"display","variants":["regular"],"subsets":["latin"]},"Khand":{"family":"Khand","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Khmer":{"family":"Khmer","category":"display","variants":["regular"],"subsets":["khmer"]},"Khula":{"family":"Khula","category":"sans-serif","variants":["300","regular","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Kite One":{"family":"Kite One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Knewave":{"family":"Knewave","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Kotta One":{"family":"Kotta One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Koulen":{"family":"Koulen","category":"display","variants":["regular"],"subsets":["khmer"]},"Kranky":{"family":"Kranky","category":"display","variants":["regular"],"subsets":["latin"]},"Kreon":{"family":"Kreon","category":"serif","variants":["300","regular","700"],"subsets":["latin"]},"Kristi":{"family":"Kristi","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Krona One":{"family":"Krona One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Kumar One":{"family":"Kumar One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Kumar One Outline":{"family":"Kumar One Outline","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Kurale":{"family":"Kurale","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","devanagari"]},"La Belle Aurore":{"family":"La Belle Aurore","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Laila":{"family":"Laila","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Lakki Reddy":{"family":"Lakki Reddy","category":"handwriting","variants":["regular"],"subsets":["latin","telugu"]},"Lalezar":{"family":"Lalezar","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","arabic"]},"Lancelot":{"family":"Lancelot","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Lateef":{"family":"Lateef","category":"handwriting","variants":["regular"],"subsets":["latin","arabic"]},"Lato":{"family":"Lato","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"League Script":{"family":"League Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Leckerli One":{"family":"Leckerli One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ledger":{"family":"Ledger","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Lekton":{"family":"Lekton","category":"sans-serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Lemon":{"family":"Lemon","category":"display","variants":["regular"],"subsets":["latin"]},"Lemonada":{"family":"Lemonada","category":"display","variants":["300","regular","600","700"],"subsets":["latin-ext","latin","vietnamese","arabic"]},"Libre Baskerville":{"family":"Libre Baskerville","category":"serif","variants":["regular","italic","700"],"subsets":["latin-ext","latin"]},"Libre Franklin":{"family":"Libre Franklin","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Life Savers":{"family":"Life Savers","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Lilita One":{"family":"Lilita One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Lily Script One":{"family":"Lily Script One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Limelight":{"family":"Limelight","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Linden Hill":{"family":"Linden Hill","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Lobster":{"family":"Lobster","category":"display","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","cyrillic"]},"Lobster Two":{"family":"Lobster Two","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Londrina Outline":{"family":"Londrina Outline","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Shadow":{"family":"Londrina Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Sketch":{"family":"Londrina Sketch","category":"display","variants":["regular"],"subsets":["latin"]},"Londrina Solid":{"family":"Londrina Solid","category":"display","variants":["regular"],"subsets":["latin"]},"Lora":{"family":"Lora","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Love Ya Like A Sister":{"family":"Love Ya Like A Sister","category":"display","variants":["regular"],"subsets":["latin"]},"Loved by the King":{"family":"Loved by the King","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Lovers Quarrel":{"family":"Lovers Quarrel","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Luckiest Guy":{"family":"Luckiest Guy","category":"display","variants":["regular"],"subsets":["latin"]},"Lusitana":{"family":"Lusitana","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Lustria":{"family":"Lustria","category":"serif","variants":["regular"],"subsets":["latin"]},"Macondo":{"family":"Macondo","category":"display","variants":["regular"],"subsets":["latin"]},"Macondo Swash Caps":{"family":"Macondo Swash Caps","category":"display","variants":["regular"],"subsets":["latin"]},"Mada":{"family":"Mada","category":"sans-serif","variants":["300","regular","500","900"],"subsets":["latin","arabic"]},"Magra":{"family":"Magra","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Maiden Orange":{"family":"Maiden Orange","category":"display","variants":["regular"],"subsets":["latin"]},"Maitree":{"family":"Maitree","category":"serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Mako":{"family":"Mako","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Mallanna":{"family":"Mallanna","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Mandali":{"family":"Mandali","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Marcellus":{"family":"Marcellus","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marcellus SC":{"family":"Marcellus SC","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Marck Script":{"family":"Marck Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Margarine":{"family":"Margarine","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Marko One":{"family":"Marko One","category":"serif","variants":["regular"],"subsets":["latin"]},"Marmelad":{"family":"Marmelad","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Martel":{"family":"Martel","category":"serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Martel Sans":{"family":"Martel Sans","category":"sans-serif","variants":["200","300","regular","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Marvel":{"family":"Marvel","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Mate":{"family":"Mate","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Mate SC":{"family":"Mate SC","category":"serif","variants":["regular"],"subsets":["latin"]},"Maven Pro":{"family":"Maven Pro","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"McLaren":{"family":"McLaren","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Meddon":{"family":"Meddon","category":"handwriting","variants":["regular"],"subsets":["latin"]},"MedievalSharp":{"family":"MedievalSharp","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Medula One":{"family":"Medula One","category":"display","variants":["regular"],"subsets":["latin"]},"Meera Inimai":{"family":"Meera Inimai","category":"sans-serif","variants":["regular"],"subsets":["latin","tamil"]},"Megrim":{"family":"Megrim","category":"display","variants":["regular"],"subsets":["latin"]},"Meie Script":{"family":"Meie Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Merienda":{"family":"Merienda","category":"handwriting","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Merienda One":{"family":"Merienda One","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Merriweather":{"family":"Merriweather","category":"serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Merriweather Sans":{"family":"Merriweather Sans","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","800","800italic"],"subsets":["latin-ext","latin"]},"Metal":{"family":"Metal","category":"display","variants":["regular"],"subsets":["khmer"]},"Metal Mania":{"family":"Metal Mania","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metamorphous":{"family":"Metamorphous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Metrophobic":{"family":"Metrophobic","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Michroma":{"family":"Michroma","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Milonga":{"family":"Milonga","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Miltonian":{"family":"Miltonian","category":"display","variants":["regular"],"subsets":["latin"]},"Miltonian Tattoo":{"family":"Miltonian Tattoo","category":"display","variants":["regular"],"subsets":["latin"]},"Miniver":{"family":"Miniver","category":"display","variants":["regular"],"subsets":["latin"]},"Miriam Libre":{"family":"Miriam Libre","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","hebrew","latin"]},"Mirza":{"family":"Mirza","category":"display","variants":["regular","500","600","700"],"subsets":["latin-ext","latin","arabic"]},"Miss Fajardose":{"family":"Miss Fajardose","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mitr":{"family":"Mitr","category":"sans-serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Modak":{"family":"Modak","category":"display","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Modern Antiqua":{"family":"Modern Antiqua","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Mogra":{"family":"Mogra","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Molengo":{"family":"Molengo","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Molle":{"family":"Molle","category":"handwriting","variants":["italic"],"subsets":["latin-ext","latin"]},"Monda":{"family":"Monda","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Monofett":{"family":"Monofett","category":"display","variants":["regular"],"subsets":["latin"]},"Monoton":{"family":"Monoton","category":"display","variants":["regular"],"subsets":["latin"]},"Monsieur La Doulaise":{"family":"Monsieur La Doulaise","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Montaga":{"family":"Montaga","category":"serif","variants":["regular"],"subsets":["latin"]},"Montez":{"family":"Montez","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Montserrat":{"family":"Montserrat","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Alternates":{"family":"Montserrat Alternates","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Montserrat Subrayada":{"family":"Montserrat Subrayada","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Moul":{"family":"Moul","category":"display","variants":["regular"],"subsets":["khmer"]},"Moulpali":{"family":"Moulpali","category":"display","variants":["regular"],"subsets":["khmer"]},"Mountains of Christmas":{"family":"Mountains of Christmas","category":"display","variants":["regular","700"],"subsets":["latin"]},"Mouse Memoirs":{"family":"Mouse Memoirs","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Bedfort":{"family":"Mr Bedfort","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr Dafoe":{"family":"Mr Dafoe","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mr De Haviland":{"family":"Mr De Haviland","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Saint Delafield":{"family":"Mrs Saint Delafield","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mrs Sheppards":{"family":"Mrs Sheppards","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Mukta Vaani":{"family":"Mukta Vaani","category":"sans-serif","variants":["200","300","regular","500","600","700","800"],"subsets":["latin-ext","latin","gujarati"]},"Muli":{"family":"Muli","category":"sans-serif","variants":["300","300italic","regular","italic"],"subsets":["latin"]},"Mystery Quest":{"family":"Mystery Quest","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"NTR":{"family":"NTR","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Neucha":{"family":"Neucha","category":"handwriting","variants":["regular"],"subsets":["latin","cyrillic"]},"Neuton":{"family":"Neuton","category":"serif","variants":["200","300","regular","italic","700","800"],"subsets":["latin-ext","latin"]},"New Rocker":{"family":"New Rocker","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"News Cycle":{"family":"News Cycle","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Niconne":{"family":"Niconne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nixie One":{"family":"Nixie One","category":"display","variants":["regular"],"subsets":["latin"]},"Nobile":{"family":"Nobile","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Nokora":{"family":"Nokora","category":"serif","variants":["regular","700"],"subsets":["khmer"]},"Norican":{"family":"Norican","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Nosifer":{"family":"Nosifer","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Nothing You Could Do":{"family":"Nothing You Could Do","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Noticia Text":{"family":"Noticia Text","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese"]},"Noto Sans":{"family":"Noto Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext","devanagari"]},"Noto Serif":{"family":"Noto Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Nova Cut":{"family":"Nova Cut","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Flat":{"family":"Nova Flat","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Mono":{"family":"Nova Mono","category":"monospace","variants":["regular"],"subsets":["greek","latin"]},"Nova Oval":{"family":"Nova Oval","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Round":{"family":"Nova Round","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Script":{"family":"Nova Script","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Slim":{"family":"Nova Slim","category":"display","variants":["regular"],"subsets":["latin"]},"Nova Square":{"family":"Nova Square","category":"display","variants":["regular"],"subsets":["latin"]},"Numans":{"family":"Numans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Nunito":{"family":"Nunito","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Odor Mean Chey":{"family":"Odor Mean Chey","category":"display","variants":["regular"],"subsets":["khmer"]},"Offside":{"family":"Offside","category":"display","variants":["regular"],"subsets":["latin"]},"Old Standard TT":{"family":"Old Standard TT","category":"serif","variants":["regular","italic","700"],"subsets":["latin"]},"Oldenburg":{"family":"Oldenburg","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Oleo Script":{"family":"Oleo Script","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Oleo Script Swash Caps":{"family":"Oleo Script Swash Caps","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Open Sans":{"family":"Open Sans","category":"sans-serif","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Open Sans Condensed":{"family":"Open Sans Condensed","category":"sans-serif","variants":["300","300italic","700"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Oranienbaum":{"family":"Oranienbaum","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Orbitron":{"family":"Orbitron","category":"sans-serif","variants":["regular","500","700","900"],"subsets":["latin"]},"Oregano":{"family":"Oregano","category":"display","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Orienta":{"family":"Orienta","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Original Surfer":{"family":"Original Surfer","category":"display","variants":["regular"],"subsets":["latin"]},"Oswald":{"family":"Oswald","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Over the Rainbow":{"family":"Over the Rainbow","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Overlock":{"family":"Overlock","category":"display","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin"]},"Overlock SC":{"family":"Overlock SC","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ovo":{"family":"Ovo","category":"serif","variants":["regular"],"subsets":["latin"]},"Oxygen":{"family":"Oxygen","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin-ext","latin"]},"Oxygen Mono":{"family":"Oxygen Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin"]},"PT Mono":{"family":"PT Mono","category":"monospace","variants":["regular"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans":{"family":"PT Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans Caption":{"family":"PT Sans Caption","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Sans Narrow":{"family":"PT Sans Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Serif":{"family":"PT Serif","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"PT Serif Caption":{"family":"PT Serif Caption","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin","cyrillic","cyrillic-ext"]},"Pacifico":{"family":"Pacifico","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Palanquin":{"family":"Palanquin","category":"sans-serif","variants":["100","200","300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Palanquin Dark":{"family":"Palanquin Dark","category":"sans-serif","variants":["regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Paprika":{"family":"Paprika","category":"display","variants":["regular"],"subsets":["latin"]},"Parisienne":{"family":"Parisienne","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Passero One":{"family":"Passero One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Passion One":{"family":"Passion One","category":"display","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Pathway Gothic One":{"family":"Pathway Gothic One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Patrick Hand":{"family":"Patrick Hand","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Patrick Hand SC":{"family":"Patrick Hand SC","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese"]},"Pattaya":{"family":"Pattaya","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai","cyrillic"]},"Patua One":{"family":"Patua One","category":"display","variants":["regular"],"subsets":["latin"]},"Pavanam":{"family":"Pavanam","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","tamil"]},"Paytone One":{"family":"Paytone One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Peddana":{"family":"Peddana","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Peralta":{"family":"Peralta","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Permanent Marker":{"family":"Permanent Marker","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Petit Formal Script":{"family":"Petit Formal Script","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Petrona":{"family":"Petrona","category":"serif","variants":["regular"],"subsets":["latin"]},"Philosopher":{"family":"Philosopher","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin","cyrillic"]},"Piedra":{"family":"Piedra","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Pinyon Script":{"family":"Pinyon Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Pirata One":{"family":"Pirata One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Plaster":{"family":"Plaster","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Play":{"family":"Play","category":"sans-serif","variants":["regular","700"],"subsets":["greek","latin-ext","latin","cyrillic","cyrillic-ext"]},"Playball":{"family":"Playball","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Playfair Display":{"family":"Playfair Display","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Playfair Display SC":{"family":"Playfair Display SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","cyrillic"]},"Podkova":{"family":"Podkova","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Poiret One":{"family":"Poiret One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Poller One":{"family":"Poller One","category":"display","variants":["regular"],"subsets":["latin"]},"Poly":{"family":"Poly","category":"serif","variants":["regular","italic"],"subsets":["latin"]},"Pompiere":{"family":"Pompiere","category":"display","variants":["regular"],"subsets":["latin"]},"Pontano Sans":{"family":"Pontano Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Poppins":{"family":"Poppins","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Port Lligat Sans":{"family":"Port Lligat Sans","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Port Lligat Slab":{"family":"Port Lligat Slab","category":"serif","variants":["regular"],"subsets":["latin"]},"Pragati Narrow":{"family":"Pragati Narrow","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Prata":{"family":"Prata","category":"serif","variants":["regular"],"subsets":["latin"]},"Preahvihear":{"family":"Preahvihear","category":"display","variants":["regular"],"subsets":["khmer"]},"Press Start 2P":{"family":"Press Start 2P","category":"display","variants":["regular"],"subsets":["greek","latin-ext","latin","cyrillic"]},"Pridi":{"family":"Pridi","category":"serif","variants":["200","300","regular","500","600","700"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Princess Sofia":{"family":"Princess Sofia","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Prociono":{"family":"Prociono","category":"serif","variants":["regular"],"subsets":["latin"]},"Prompt":{"family":"Prompt","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Prosto One":{"family":"Prosto One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Proza Libre":{"family":"Proza Libre","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"],"subsets":["latin-ext","latin"]},"Puritan":{"family":"Puritan","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Purple Purse":{"family":"Purple Purse","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Quando":{"family":"Quando","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Quantico":{"family":"Quantico","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Quattrocento":{"family":"Quattrocento","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Quattrocento Sans":{"family":"Quattrocento Sans","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Questrial":{"family":"Questrial","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Quicksand":{"family":"Quicksand","category":"sans-serif","variants":["300","regular","700"],"subsets":["latin"]},"Quintessential":{"family":"Quintessential","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Qwigley":{"family":"Qwigley","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Racing Sans One":{"family":"Racing Sans One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Radley":{"family":"Radley","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rajdhani":{"family":"Rajdhani","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Rakkas":{"family":"Rakkas","category":"display","variants":["regular"],"subsets":["latin-ext","latin","arabic"]},"Raleway":{"family":"Raleway","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin"]},"Raleway Dots":{"family":"Raleway Dots","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ramabhadra":{"family":"Ramabhadra","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Ramaraja":{"family":"Ramaraja","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Rambla":{"family":"Rambla","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Rammetto One":{"family":"Rammetto One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ranchers":{"family":"Ranchers","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rancho":{"family":"Rancho","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Ranga":{"family":"Ranga","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Rasa":{"family":"Rasa","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","gujarati"]},"Rationale":{"family":"Rationale","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Ravi Prakash":{"family":"Ravi Prakash","category":"display","variants":["regular"],"subsets":["latin","telugu"]},"Redressed":{"family":"Redressed","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Reem Kufi":{"family":"Reem Kufi","category":"sans-serif","variants":["regular"],"subsets":["latin","arabic"]},"Reenie Beanie":{"family":"Reenie Beanie","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Revalia":{"family":"Revalia","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Rhodium Libre":{"family":"Rhodium Libre","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Ribeye":{"family":"Ribeye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Ribeye Marrow":{"family":"Ribeye Marrow","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Righteous":{"family":"Righteous","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Risque":{"family":"Risque","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Roboto":{"family":"Roboto","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Condensed":{"family":"Roboto Condensed","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Mono":{"family":"Roboto Mono","category":"monospace","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Roboto Slab":{"family":"Roboto Slab","category":"serif","variants":["100","300","regular","700"],"subsets":["greek","latin-ext","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Rochester":{"family":"Rochester","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rock Salt":{"family":"Rock Salt","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rokkitt":{"family":"Rokkitt","category":"serif","variants":["regular","700"],"subsets":["latin"]},"Romanesco":{"family":"Romanesco","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ropa Sans":{"family":"Ropa Sans","category":"sans-serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rosario":{"family":"Rosario","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Rosarivo":{"family":"Rosarivo","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Rouge Script":{"family":"Rouge Script","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Rozha One":{"family":"Rozha One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Rubik":{"family":"Rubik","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subsets":["latin-ext","hebrew","latin","cyrillic"]},"Rubik Mono One":{"family":"Rubik Mono One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Rubik One":{"family":"Rubik One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Ruda":{"family":"Ruda","category":"sans-serif","variants":["regular","700","900"],"subsets":["latin-ext","latin"]},"Rufina":{"family":"Rufina","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Ruge Boogie":{"family":"Ruge Boogie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruluko":{"family":"Ruluko","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Rum Raisin":{"family":"Rum Raisin","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Ruslan Display":{"family":"Ruslan Display","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Russo One":{"family":"Russo One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Ruthie":{"family":"Ruthie","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Rye":{"family":"Rye","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sacramento":{"family":"Sacramento","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Sahitya":{"family":"Sahitya","category":"serif","variants":["regular","700"],"subsets":["latin","devanagari"]},"Sail":{"family":"Sail","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Salsa":{"family":"Salsa","category":"display","variants":["regular"],"subsets":["latin"]},"Sanchez":{"family":"Sanchez","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Sancreek":{"family":"Sancreek","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sansita One":{"family":"Sansita One","category":"display","variants":["regular"],"subsets":["latin"]},"Sarala":{"family":"Sarala","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sarina":{"family":"Sarina","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sarpanch":{"family":"Sarpanch","category":"sans-serif","variants":["regular","500","600","700","800","900"],"subsets":["latin-ext","latin","devanagari"]},"Satisfy":{"family":"Satisfy","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Scada":{"family":"Scada","category":"sans-serif","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","cyrillic"]},"Scheherazade":{"family":"Scheherazade","category":"serif","variants":["regular","700"],"subsets":["latin","arabic"]},"Schoolbell":{"family":"Schoolbell","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Scope One":{"family":"Scope One","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Seaweed Script":{"family":"Seaweed Script","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Secular One":{"family":"Secular One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","hebrew","latin"]},"Sevillana":{"family":"Sevillana","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Seymour One":{"family":"Seymour One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Shadows Into Light":{"family":"Shadows Into Light","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Shadows Into Light Two":{"family":"Shadows Into Light Two","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Shanti":{"family":"Shanti","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share":{"family":"Share","category":"display","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin"]},"Share Tech":{"family":"Share Tech","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Share Tech Mono":{"family":"Share Tech Mono","category":"monospace","variants":["regular"],"subsets":["latin"]},"Shojumaru":{"family":"Shojumaru","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Short Stack":{"family":"Short Stack","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Shrikhand":{"family":"Shrikhand","category":"display","variants":["regular"],"subsets":["latin-ext","latin","gujarati"]},"Siemreap":{"family":"Siemreap","category":"display","variants":["regular"],"subsets":["khmer"]},"Sigmar One":{"family":"Sigmar One","category":"display","variants":["regular"],"subsets":["latin"]},"Signika":{"family":"Signika","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Signika Negative":{"family":"Signika Negative","category":"sans-serif","variants":["300","regular","600","700"],"subsets":["latin-ext","latin"]},"Simonetta":{"family":"Simonetta","category":"display","variants":["regular","italic","900","900italic"],"subsets":["latin-ext","latin"]},"Sintony":{"family":"Sintony","category":"sans-serif","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Sirin Stencil":{"family":"Sirin Stencil","category":"display","variants":["regular"],"subsets":["latin"]},"Six Caps":{"family":"Six Caps","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Skranji":{"family":"Skranji","category":"display","variants":["regular","700"],"subsets":["latin-ext","latin"]},"Slabo 13px":{"family":"Slabo 13px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slabo 27px":{"family":"Slabo 27px","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Slackey":{"family":"Slackey","category":"display","variants":["regular"],"subsets":["latin"]},"Smokum":{"family":"Smokum","category":"display","variants":["regular"],"subsets":["latin"]},"Smythe":{"family":"Smythe","category":"display","variants":["regular"],"subsets":["latin"]},"Sniglet":{"family":"Sniglet","category":"display","variants":["regular","800"],"subsets":["latin-ext","latin"]},"Snippet":{"family":"Snippet","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Snowburst One":{"family":"Snowburst One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sofadi One":{"family":"Sofadi One","category":"display","variants":["regular"],"subsets":["latin"]},"Sofia":{"family":"Sofia","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Sonsie One":{"family":"Sonsie One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Sorts Mill Goudy":{"family":"Sorts Mill Goudy","category":"serif","variants":["regular","italic"],"subsets":["latin-ext","latin"]},"Source Code Pro":{"family":"Source Code Pro","category":"monospace","variants":["200","300","regular","500","600","700","900"],"subsets":["latin-ext","latin"]},"Source Sans Pro":{"family":"Source Sans Pro","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese"]},"Source Serif Pro":{"family":"Source Serif Pro","category":"serif","variants":["regular","600","700"],"subsets":["latin-ext","latin"]},"Space Mono":{"family":"Space Mono","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["latin-ext","latin","vietnamese"]},"Special Elite":{"family":"Special Elite","category":"display","variants":["regular"],"subsets":["latin"]},"Spicy Rice":{"family":"Spicy Rice","category":"display","variants":["regular"],"subsets":["latin"]},"Spinnaker":{"family":"Spinnaker","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Spirax":{"family":"Spirax","category":"display","variants":["regular"],"subsets":["latin"]},"Squada One":{"family":"Squada One","category":"display","variants":["regular"],"subsets":["latin"]},"Sree Krushnadevaraya":{"family":"Sree Krushnadevaraya","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Sriracha":{"family":"Sriracha","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Stalemate":{"family":"Stalemate","category":"handwriting","variants":["regular"],"subsets":["latin-ext","latin"]},"Stalinist One":{"family":"Stalinist One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Stardos Stencil":{"family":"Stardos Stencil","category":"display","variants":["regular","700"],"subsets":["latin"]},"Stint Ultra Condensed":{"family":"Stint Ultra Condensed","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stint Ultra Expanded":{"family":"Stint Ultra Expanded","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Stoke":{"family":"Stoke","category":"serif","variants":["300","regular"],"subsets":["latin-ext","latin"]},"Strait":{"family":"Strait","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Sue Ellen Francisco":{"family":"Sue Ellen Francisco","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Suez One":{"family":"Suez One","category":"serif","variants":["regular"],"subsets":["latin-ext","hebrew","latin"]},"Sumana":{"family":"Sumana","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Sunshiney":{"family":"Sunshiney","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Supermercado One":{"family":"Supermercado One","category":"display","variants":["regular"],"subsets":["latin"]},"Sura":{"family":"Sura","category":"serif","variants":["regular","700"],"subsets":["latin-ext","latin","devanagari"]},"Suranna":{"family":"Suranna","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Suravaram":{"family":"Suravaram","category":"serif","variants":["regular"],"subsets":["latin","telugu"]},"Suwannaphum":{"family":"Suwannaphum","category":"display","variants":["regular"],"subsets":["khmer"]},"Swanky and Moo Moo":{"family":"Swanky and Moo Moo","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Syncopate":{"family":"Syncopate","category":"sans-serif","variants":["regular","700"],"subsets":["latin"]},"Tangerine":{"family":"Tangerine","category":"handwriting","variants":["regular","700"],"subsets":["latin"]},"Taprom":{"family":"Taprom","category":"display","variants":["regular"],"subsets":["khmer"]},"Tauri":{"family":"Tauri","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Taviraj":{"family":"Taviraj","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Teko":{"family":"Teko","category":"sans-serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin","devanagari"]},"Telex":{"family":"Telex","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Tenali Ramakrishna":{"family":"Tenali Ramakrishna","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Tenor Sans":{"family":"Tenor Sans","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Text Me One":{"family":"Text Me One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"The Girl Next Door":{"family":"The Girl Next Door","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Tienne":{"family":"Tienne","category":"serif","variants":["regular","700","900"],"subsets":["latin"]},"Tillana":{"family":"Tillana","category":"handwriting","variants":["regular","500","600","700","800"],"subsets":["latin-ext","latin","devanagari"]},"Timmana":{"family":"Timmana","category":"sans-serif","variants":["regular"],"subsets":["latin","telugu"]},"Tinos":{"family":"Tinos","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","hebrew","latin","greek-ext","vietnamese","cyrillic","cyrillic-ext"]},"Titan One":{"family":"Titan One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Titillium Web":{"family":"Titillium Web","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"],"subsets":["latin-ext","latin"]},"Trade Winds":{"family":"Trade Winds","category":"display","variants":["regular"],"subsets":["latin"]},"Trirong":{"family":"Trirong","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subsets":["latin-ext","latin","vietnamese","thai"]},"Trocchi":{"family":"Trocchi","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Trochut":{"family":"Trochut","category":"display","variants":["regular","italic","700"],"subsets":["latin"]},"Trykker":{"family":"Trykker","category":"serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Tulpen One":{"family":"Tulpen One","category":"display","variants":["regular"],"subsets":["latin"]},"Ubuntu":{"family":"Ubuntu","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ubuntu Condensed":{"family":"Ubuntu Condensed","category":"sans-serif","variants":["regular"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ubuntu Mono":{"family":"Ubuntu Mono","category":"monospace","variants":["regular","italic","700","700italic"],"subsets":["greek","latin-ext","latin","greek-ext","cyrillic","cyrillic-ext"]},"Ultra":{"family":"Ultra","category":"serif","variants":["regular"],"subsets":["latin"]},"Uncial Antiqua":{"family":"Uncial Antiqua","category":"display","variants":["regular"],"subsets":["latin"]},"Underdog":{"family":"Underdog","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Unica One":{"family":"Unica One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"UnifrakturCook":{"family":"UnifrakturCook","category":"display","variants":["700"],"subsets":["latin"]},"UnifrakturMaguntia":{"family":"UnifrakturMaguntia","category":"display","variants":["regular"],"subsets":["latin"]},"Unkempt":{"family":"Unkempt","category":"display","variants":["regular","700"],"subsets":["latin"]},"Unlock":{"family":"Unlock","category":"display","variants":["regular"],"subsets":["latin"]},"Unna":{"family":"Unna","category":"serif","variants":["regular"],"subsets":["latin"]},"VT323":{"family":"VT323","category":"monospace","variants":["regular"],"subsets":["latin"]},"Vampiro One":{"family":"Vampiro One","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela":{"family":"Varela","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Varela Round":{"family":"Varela Round","category":"sans-serif","variants":["regular"],"subsets":["hebrew","latin"]},"Vast Shadow":{"family":"Vast Shadow","category":"display","variants":["regular"],"subsets":["latin"]},"Vesper Libre":{"family":"Vesper Libre","category":"serif","variants":["regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Vibur":{"family":"Vibur","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Vidaloka":{"family":"Vidaloka","category":"serif","variants":["regular"],"subsets":["latin"]},"Viga":{"family":"Viga","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Voces":{"family":"Voces","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Volkhov":{"family":"Volkhov","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Vollkorn":{"family":"Vollkorn","category":"serif","variants":["regular","italic","700","700italic"],"subsets":["latin"]},"Voltaire":{"family":"Voltaire","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Waiting for the Sunrise":{"family":"Waiting for the Sunrise","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Wallpoet":{"family":"Wallpoet","category":"display","variants":["regular"],"subsets":["latin"]},"Walter Turncoat":{"family":"Walter Turncoat","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Warnes":{"family":"Warnes","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wellfleet":{"family":"Wellfleet","category":"display","variants":["regular"],"subsets":["latin-ext","latin"]},"Wendy One":{"family":"Wendy One","category":"sans-serif","variants":["regular"],"subsets":["latin-ext","latin"]},"Wire One":{"family":"Wire One","category":"sans-serif","variants":["regular"],"subsets":["latin"]},"Work Sans":{"family":"Work Sans","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"],"subsets":["latin-ext","latin"]},"Yanone Kaffeesatz":{"family":"Yanone Kaffeesatz","category":"sans-serif","variants":["200","300","regular","700"],"subsets":["latin-ext","latin"]},"Yantramanav":{"family":"Yantramanav","category":"sans-serif","variants":["100","300","regular","500","700","900"],"subsets":["latin-ext","latin","devanagari"]},"Yatra One":{"family":"Yatra One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","devanagari"]},"Yellowtail":{"family":"Yellowtail","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Yeseva One":{"family":"Yeseva One","category":"display","variants":["regular"],"subsets":["latin-ext","latin","cyrillic"]},"Yesteryear":{"family":"Yesteryear","category":"handwriting","variants":["regular"],"subsets":["latin"]},"Yrsa":{"family":"Yrsa","category":"serif","variants":["300","regular","500","600","700"],"subsets":["latin-ext","latin"]},"Zeyada":{"family":"Zeyada","category":"handwriting","variants":["regular"],"subsets":["latin"]}}', true );
4
 
5
+ if ( ! empty( $google_fonts['items'] ) ) {
6
+ return $google_fonts['items'];
7
+ }
8
  return $google_fonts;
 
gulpfile.js CHANGED
@@ -3,7 +3,7 @@ var plugin = 'customify',
3
  dest_CSS = './css/',
4
 
5
  gulp = require('gulp'),
6
- sass = require('gulp-ruby-sass'),
7
  prefix = require('gulp-autoprefixer'),
8
  exec = require('gulp-exec'),
9
  replace = require('gulp-replace'),
@@ -13,7 +13,6 @@ var plugin = 'customify',
13
  beautify = require('gulp-beautify'),
14
  csscomb = require('gulp-csscomb'),
15
  cmq = require('gulp-combine-media-queries'),
16
- chmod = require('gulp-chmod'),
17
  fs = require('fs'),
18
  rtlcss = require('rtlcss'),
19
  postcss = require('gulp-postcss'),
@@ -59,8 +58,7 @@ gulp.task('styles', function () {
59
  .pipe(sass({'sourcemap': true, style: 'expanded'}))
60
  .pipe(prefix("last 1 version", "> 1%", "ie 8", "ie 7"))
61
  .pipe(csscomb())
62
- .pipe(chmod(644))
63
- .pipe(gulp.dest(dest_CSS))
64
  });
65
 
66
  gulp.task('styles-watch', function () {
@@ -72,8 +70,7 @@ gulp.task('scripts', function () {
72
  return gulp.src(jsFiles)
73
  .pipe(concat('main.js'))
74
  .pipe(beautify({indentSize: 2}))
75
- .pipe(chmod(644))
76
- .pipe(gulp.dest('./assets/js/'));
77
  });
78
 
79
  gulp.task('scripts-watch', function () {
@@ -145,8 +142,7 @@ gulp.task( 'build', ['copy-folder'], function() {
145
  files_to_remove[k] = '../build/customify/' + e;
146
  } );
147
 
148
- return gulp.src( files_to_remove, {read: false} )
149
- .pipe( clean( {force: true} ) );
150
  } );
151
 
152
  // usually there is a default task for lazy people who just wanna type gulp
3
  dest_CSS = './css/',
4
 
5
  gulp = require('gulp'),
6
+ sass = require('gulp-sass'),
7
  prefix = require('gulp-autoprefixer'),
8
  exec = require('gulp-exec'),
9
  replace = require('gulp-replace'),
13
  beautify = require('gulp-beautify'),
14
  csscomb = require('gulp-csscomb'),
15
  cmq = require('gulp-combine-media-queries'),
 
16
  fs = require('fs'),
17
  rtlcss = require('rtlcss'),
18
  postcss = require('gulp-postcss'),
58
  .pipe(sass({'sourcemap': true, style: 'expanded'}))
59
  .pipe(prefix("last 1 version", "> 1%", "ie 8", "ie 7"))
60
  .pipe(csscomb())
61
+ .pipe(gulp.dest(dest_CSS, {"mode": "0644"}))
 
62
  });
63
 
64
  gulp.task('styles-watch', function () {
70
  return gulp.src(jsFiles)
71
  .pipe(concat('main.js'))
72
  .pipe(beautify({indentSize: 2}))
73
+ .pipe(gulp.dest('./assets/js/', {"mode": "0644"}));
 
74
  });
75
 
76
  gulp.task('scripts-watch', function () {
142
  files_to_remove[k] = '../build/customify/' + e;
143
  } );
144
 
145
+ return del.sync(files_to_remove, {force: true});
 
146
  } );
147
 
148
  // usually there is a default task for lazy people who just wanna type gulp
js/customizer.js CHANGED
@@ -1,42 +1,44 @@
1
- (function( $, exports ) {
2
- $( document ).ready( function() {
3
  // when the customizer is ready prepare our fields events
4
- wp.customize.bind( 'ready', function() {
5
  var api = this,
6
  timeout = null;
7
 
8
  // add ace editors
9
- $( '.customify_ace_editor' ).each( function( key, el ) {
10
- var id = $( this ).attr( 'id' ),
11
- css_editor = ace.edit( id );
12
 
13
- var editor_type = $( this ).data( 'editor_type' );
14
  // init the ace editor
15
- css_editor.setTheme( "ace/theme/github" );
16
- css_editor.getSession().setMode( "ace/mode/" + editor_type );
17
 
18
  // hide the textarea and enable the ace editor
19
- var textarea = $( '#' + id + '_textarea' ).hide();
20
- css_editor.getSession().setValue( textarea.val() );
21
 
22
  // each time a change is triggered start a timeout of 1,5s and when is finished refresh the previewer
23
  // if the user types faster than this delay then reset it
24
- css_editor.getSession().on( 'change', function( e ) {
25
  if ( timeout !== null ) {
26
- clearTimeout( timeout );
27
  timeout = null;
28
  } else {
29
- timeout = setTimeout( function() {
30
  //var state = css_editor.session.getState();
31
- textarea.val( css_editor.getSession().getValue() );
32
- textarea.trigger( 'change' );
33
- }, 1500 );
34
  }
35
- } );
36
- } );
37
 
38
  // simple select2 field
39
- $( '.customify_select2' ).select2();
 
 
40
 
41
  prepare_typography_field();
42
 
@@ -44,220 +46,220 @@
44
  * Make the customizer save on CMD/CTRL+S action
45
  * This is awesome!!!
46
  */
47
- $( window ).bind( 'keydown', function( event ) {
48
  if ( event.ctrlKey || event.metaKey ) {
49
- switch ( String.fromCharCode( event.which ).toLowerCase() ) {
50
  case 's':
51
  event.preventDefault();
52
  api.previewer.save();
53
  break;
54
  }
55
  }
56
- } );
57
 
58
  // for each range input add a value preview output
59
- $( 'input[type="range"]' ).each( function() {
60
- var $clone = $( this ).clone();
61
 
62
  $clone
63
- .attr( 'type', 'number' )
64
- .attr( 'class', 'range-value' );
65
 
66
- $( this ).after( $clone );
67
 
68
- $( this ).on( 'input', function() {
69
- $( this ).siblings( '.range-value' ).val( $( this ).val() );
70
- } );
71
- } );
72
 
73
- if ( $( 'button[data-action="reset_customify"]' ).length > 0 ) {
74
  // reset_button
75
- $( document ).on( 'click', '#customize-control-reset_customify button', function( ev ) {
76
  ev.preventDefault();
77
 
78
- var iAgree = confirm( 'Do you really want to reset to defaults all the fields? Watch out, this will reset all your Customify options and will save them!' );
79
 
80
  if ( !iAgree ) {
81
  return;
82
  }
83
 
84
- $.each( api.settings.controls, function( key, ctrl ) {
85
- var id = key.replace( '_control', '' );
86
  var setting = customify_settings.settings[id];
87
 
88
- if ( ! _.isUndefined( setting ) && ! _.isUndefined( setting.default ) ) {
89
 
90
- var start_pos = id.indexOf( '[' ) + 1;
91
- var end_pos = id.indexOf( ']', start_pos );
92
 
93
- id = id.substring( start_pos, end_pos );
94
- api_set_setting_value( id, setting.default );
95
  }
96
- } );
97
 
98
  api.previewer.save();
99
- } );
100
 
101
  // add a reset button for each panel
102
- $( '.panel-meta' ).each( function( el, key ) {
103
- var container = $( this ).parents( '.control-panel' ),
104
- id = container.attr( 'id' ),
105
- panel_id = id.replace( 'accordion-panel-', '' );
106
 
107
 
108
- $( this ).parent().append( '<button class="reset_panel button" data-panel="' + panel_id + '">Panel\'s defaults</button>' );
109
- } );
110
 
111
  // reset panel
112
- $( document ).on( 'click', '.reset_panel', function( e ) {
113
  e.preventDefault();
114
 
115
- var panel_id = $( this ).data( 'panel' ),
116
- panel = api.panel( panel_id ),
117
  sections = panel.sections(),
118
- iAgree = confirm( "Do you really want to reset " + panel.params.title + "?" );
119
 
120
  if ( !iAgree ) {
121
  return;
122
  }
123
  if ( sections.length > 0 ) {
124
- $.each( sections, function() {
125
  //var settings = this.settings();
126
  var controls = this.controls();
127
 
128
  if ( controls.length > 0 ) {
129
- $.each( controls, function( key, ctrl ) {
130
- var id = ctrl.id.replace( '_control', '' ),
131
  setting = customify_settings.settings[id];
132
 
133
- if ( ! _.isUndefined( setting ) && ! _.isUndefined( setting.default ) ) {
134
 
135
- var start_pos = id.indexOf( '[' ) + 1,
136
- end_pos = id.indexOf( ']', start_pos );
137
 
138
- id = id.substring( start_pos, end_pos );
139
- api_set_setting_value( id, setting.default );
140
  }
141
- } );
142
  }
143
- } );
144
  }
145
- } );
146
 
147
  //add reset section
148
- $( '.accordion-section-content' ).each( function( el, key ) {
149
- var section = $( this ).parent(),
150
- section_id = section.attr( 'id' );
151
 
152
- if ( ( ( ! _.isUndefined( section_id ) ) ? section_id.indexOf( customify_settings.options_name ) : -1 ) === -1 ) {
153
  return;
154
  }
155
 
156
- if ( ! _.isUndefined( section_id ) && section_id.indexOf( 'accordion-section-' ) > -1 ) {
157
- var id = section_id.replace( 'accordion-section-', '' );
158
- $( this ).prepend( '<button class="reset_section button" data-section="' + id + '">Section\'s defaults</button>' );
159
  }
160
- } );
161
 
162
  // reset section event
163
- $( document ).on( 'click', '.reset_section', function( e ) {
164
  e.preventDefault();
165
 
166
- var section_id = $( this ).data( 'section' ),
167
- section = api.section( section_id ),
168
  controls = section.controls();
169
 
170
- var iAgree = confirm( "Do you really want to reset " + section.params.title + "?" );
171
 
172
  if ( !iAgree ) {
173
  return;
174
  }
175
 
176
  if ( controls.length > 0 ) {
177
- $.each( controls, function( key, ctrl ) {
178
- var id = ctrl.id.replace( '_control', '' ),
179
  setting = customify_settings.settings[id];
180
 
181
- if ( ! _.isUndefined( setting ) && ! _.isUndefined( setting.default ) ) {
182
 
183
- var start_pos = id.indexOf( '[' ) + 1,
184
- end_pos = id.indexOf( ']', start_pos );
185
 
186
- id = id.substring( start_pos, end_pos );
187
- api_set_setting_value( id, setting.default );
188
  }
189
- } );
190
  }
191
- } );
192
  }
193
 
194
- $( document ).on( 'change', '.customize-control input.range-value', function() {
195
- var range = $( this ).siblings( 'input[type="range"]' );
196
- range.val( $( this ).val() );
197
- } );
198
 
199
- $( document ).on( 'change', '.customify_typography_font_subsets', function( ev ) {
200
 
201
- var $input = $( this ).parents( '.options' ).siblings( '.customify_typography' ).children( '.customify_typography_values' ),
202
  current_val = $input.val();
203
 
204
- current_val = JSON.parse( decodeURIComponent( current_val ) );
205
 
206
  //maybe the selected option holds a JSON in its value
207
- current_val.selected_subsets = maybeJsonParse( $( this ).val() );
208
 
209
- $input.val( encodeURIComponent( JSON.stringify( current_val ) ) );
210
 
211
- $input.trigger( 'change' );
212
- } );
213
 
214
- $( document ).on( 'change', '.customify_typography_font_weight', function( ev ) {
215
 
216
- var $input = $( this ).parents( '.options' ).siblings( '.customify_typography' ).children( '.customify_typography_values' ),
217
  current_val = $input.val();
218
 
219
- current_val = maybeJsonParse( current_val );
220
  // @todo currently the font weight selector works for one value only
221
  // maybe make this a multiselect
222
 
223
  //maybe the selected option holds a JSON in its value
224
- current_val.selected_variants = {0: maybeJsonParse( $( this ).val() ) };
225
 
226
- $input.val( encodeURIComponent( JSON.stringify( current_val ) ) );
227
- $input.trigger( 'change' );
228
- } );
229
 
230
  // presets
231
- $( document ).on( 'change', '.customify_preset.select', function() {
232
  var api = wp.customize,
233
- this_option = $( this ).children( '[value="' + $( this ).val() + '"]' ),
234
- data = $( this_option ).data( 'options' );
235
 
236
- if ( ! _.isUndefined( data ) ) {
237
- $.each( data, function( id, value ) {
238
- api_set_setting_value( id, value );
239
- } );
240
  }
241
 
242
  api.previewer.refresh();
243
- } );
244
 
245
- $( document ).on( 'click', '.customify_preset.radio input, .customify_preset.radio_buttons input, .awesome_presets input', function() {
246
  var api = wp.customize;
247
  var this_option = this;//$(this).children('[value="' + $(this).val() + '"]');
248
- var data = $( this_option ).data( 'options' );
249
 
250
- if ( ! _.isUndefined( data ) ) {
251
- $.each( data, function( id, value ) {
252
- api_set_setting_value( id, value );
253
- } );
254
  }
255
 
256
  api.previewer.refresh();
257
- } );
258
 
259
  // bind our event on click
260
- $( document ).on( 'click', '.customify_import_demo_data_button', function( event ) {
261
  //if ( $( this ).hasClass( '.wpGrade_button_inactive' ) ) {
262
  // return false;
263
  //} else {
@@ -268,53 +270,80 @@
268
  //if ( confirmImport == false ) return false;
269
 
270
  //@todo start an animation here
271
- var key = $( this ).data( 'key' );
272
 
273
- var import_queue = new Queue( api );
274
 
275
  /// calculate the number of steps
276
  var steps = [];
277
 
278
- if ( ! _.isUndefined( customify_settings.settings[key].imports ) ) {
279
 
280
- $.each( customify_settings.settings[key].imports, function( i, import_setts, k ) {
281
- if ( _.isUndefined( import_setts.steps ) ) {
282
- steps.push( {id: i, type: import_setts.type} );
283
  } else {
284
  var count = import_setts.steps;
285
 
286
  while ( count >= 1 ) {
287
- steps.push( {id: i, type: import_setts.type, count: count} );
288
  count = count - 1;
289
  }
290
  }
291
- } );
292
  }
293
 
294
- import_queue.add_steps( 'import_demo_data_action_id', steps );
295
  return false;
296
- } );
297
 
298
  customifyBackgroundJsControl.init();
299
 
300
  // sometimes there may be needed a php save
301
- if ( getUrlVars( 'save_customizer_once' ) ) {
302
  api.previewer.save();
303
  }
304
 
305
  setTimeout(function () {
306
  customifyFoldingFields();
307
  }, 1000);
308
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
  /**
311
  * This function will search for all the interdependend fields and make a bound between them.
312
  * So whenever a target is changed, it will take actions to the dependent fields.
313
  */
314
- var customifyFoldingFields = function() {
315
 
316
- if ( _.isUndefined( customify_settings ) || _.isUndefined( customify_settings.settings ) ) {
317
- return ; // bail
318
  }
319
 
320
  /**
@@ -326,13 +355,13 @@
326
  */
327
  var targets = {};
328
 
329
- $.fn.reactor.defaults.compliant = function() {
330
  $(this).slideDown();
331
  // $(this).animate({opacity: 1});
332
  $(this).find(':disabled').attr({disabled: false});
333
  };
334
 
335
- $.fn.reactor.defaults.uncompliant = function() {
336
  $(this).slideUp();
337
  // $(this).animate({opacity: 0.25});
338
  $(this).find(':enabled').attr({disabled: true});
@@ -340,10 +369,10 @@
340
 
341
  var IS = $.extend({}, $.fn.reactor.helpers);
342
 
343
- var process_a_target = function( parent_id, field ) {
344
 
345
- if ( _.isUndefined( field[0] ) ) {
346
- return ; // no id, no fun
347
  }
348
 
349
  var key = field[0],
@@ -352,18 +381,18 @@
352
  action = "show"; // can only be `show` or `hide`
353
 
354
  var target_key = customify_settings.options_name + '[' + key + ']';
355
- var target_type = customify_settings.settings[ target_key ].type;
356
 
357
 
358
- if ( ! _.isUndefined( field[1] ) ) {
359
  value = field[1];
360
  }
361
 
362
- if ( ! _.isUndefined( field[2] ) ) {
363
  compare = field[2];
364
  }
365
 
366
- if ( ! _.isUndefined( field[3] ) ) {
367
  action = field[3];
368
  }
369
 
@@ -373,65 +402,65 @@
373
  var target_selector = '[data-customize-setting-link="' + customify_settings.options_name + '[' + key + ']"]';
374
 
375
  if ( target_type == 'checkbox' ) {
376
- $(parent_id).reactIf( target_selector, function () {
377
- return $( this ).is(':checked') == value;
378
- } );
379
  } else if ( target_type == 'radio' || target_type == 'radio_image' ) {
380
  $(parent_id)
381
- .reactIf( target_selector, function () {
382
- return $( target_selector + ':checked').val() == value;
383
- } );
384
  } else {
385
  $(parent_id)
386
- .reactIf( target_selector, function () {
387
  return $(target_selector).val() == value;
388
- } );
389
  }
390
 
391
  $(target_selector).trigger('change');
392
  $('.reactor').trigger('change.reactor'); // triggers all events on load
393
  };
394
 
395
- $.each( customify_settings.settings, function ( id, field ) {
396
 
397
  /**
398
  * Here we have the id of the fields. but we know for sure that we just need his parent selector
399
  * So we just create it
400
  */
401
- var parent_id = id.replace( '[', '-' );
402
- parent_id = parent_id.replace( ']', '' );
403
  parent_id = '#customize-control-' + parent_id + '_control';
404
 
405
 
406
  // get only the fields that have a 'show_on' property
407
- if ( field.hasOwnProperty( 'show_on' ) && field.show_on.length > 0 ) {
408
 
409
  /**
410
  * The 'show_on' can be a simple array with one target like: [ id, value, comparison, action ]
411
  * Or it could be an array of multiple targets and we need to process both cases
412
  */
413
- if ( _.isString( field.show_on[0] ) ) {
414
- process_a_target( parent_id, field.show_on );
415
- } else if ( _.isObject( field.show_on[0] ) ) {
416
- $.each( field.show_on, function (i, j) {
417
- process_a_target( parent_id, j );
418
  });
419
  }
420
  }
421
  });
422
  };
423
 
424
- var get_typography_font_family = function( $el ) {
425
 
426
  var font_family_value = $el.val();
427
  // first time this will not be a json so catch that error
428
  try {
429
- font_family_value = JSON.parse( font_family_value );
430
  } catch ( e ) {
431
  return {font_family: font_family_value};
432
  }
433
 
434
- if ( ! _.isUndefined( font_family_value.font_family ) ) {
435
  return font_family_value.font_family;
436
  }
437
 
@@ -439,138 +468,148 @@
439
  };
440
 
441
  // get each typography field and bind events
442
- var prepare_typography_field = function() {
443
 
444
- var $typos = $( '.customify_typography_font_family' );
445
 
446
- $typos.each( function() {
447
  var font_family_select = this,
448
- $input = $( font_family_select ).siblings( '.customify_typography_values' );
449
  // on change
450
- $( font_family_select ).on( 'change', function() {
451
- update_siblings_selects( font_family_select );
452
- $input.trigger( 'change' );
453
- } );
454
- update_siblings_selects( font_family_select );
455
- } );
456
  };
457
 
458
- var api_set_setting_value = function( id, value ) {
459
 
460
  var api = wp.customize,
461
  setting_id = customify_settings.options_name + '[' + id + ']',
462
- setting = api( setting_id ),
463
- field = $( '[data-customize-setting-link="' + setting_id + '"]' ),
464
- field_class = $( field ).parent().attr( 'class' );
465
 
466
- if ( ! _.isUndefined( field_class ) && field_class === 'customify_typography' ) {
467
 
468
- var family_select = field.siblings( 'select' );
469
 
470
- if ( _.isString( value ) ) {
471
- var this_option = family_select.find( 'option[value="' + value + '"]' );
472
- $( this_option[0] ).attr( 'selected', 'selected' );
473
- update_siblings_selects( family_select );
474
- } else if ( _.isObject( value ) ) {
475
- var this_family_option = family_select.find( 'option[value="' + value['font_family'] + '"]' );
476
- $( this_family_option[0] ).attr( 'selected', 'selected' );
477
 
478
- update_siblings_selects( this_family_option );
479
 
480
- setTimeout( function() {
481
- var weight_select = field.parent().siblings( '.options' ).find( '.customify_typography_font_weight' );
482
 
483
- var this_weight_option = weight_select.find( 'option[value="' + value['selected_variants'] + '"]' );
484
 
485
- $( this_weight_option[0] ).attr( 'selected', 'selected' );
486
 
487
- update_siblings_selects( this_family_option );
488
 
489
- weight_select.trigger( 'change' );
490
- }, 300 );
491
  }
492
 
493
- family_select.trigger( 'change' );
494
 
495
  } else {
496
- setting.set( value );
497
  }
498
  };
499
 
500
- var update_siblings_selects = function( font_select ) {
501
 
502
  this.bound_once = false;
503
- var selected_font = $( font_select ).val(),
504
- $input = $( font_select ).siblings( '.customify_typography_values' ),
505
- current_val = $input.attr( 'value' );
506
 
507
  if ( current_val === '[object Object]' ) {
508
- current_val = $input.data( 'default' );
509
- } else if ( _.isString( current_val ) && !isJsonString( current_val ) && current_val.substr(0,1) == '[' ) {
510
  // a rare case when the value isn't a json but is a representative string like [family,weight]
511
- current_val = current_val.split( ',' );
512
  var new_current_value = {};
513
- if ( ! _.isUndefined( current_val[0] ) ) {
514
  new_current_value['font_family'] = current_val[0];
515
  }
516
 
517
- if ( ! _.isUndefined( current_val[1] ) ) {
518
  new_current_value['selected_variants'] = current_val[1];
519
  }
520
 
521
- current_val = JSON.stringify( new_current_value );
522
  }
523
 
524
- var $font_weight = $( font_select ).parent().siblings( 'ul.options' ).find( '.customify_typography_font_weight' ),
525
- $font_subsets = $( font_select ).parent().siblings( 'ul.options' ).find( '.customify_typography_font_subsets' );
526
 
527
  try {
528
- current_val = JSON.parse( decodeURIComponent( current_val ) );
529
  } catch ( e ) {
530
 
531
  // in case of an error, force the rebuild of the json
532
- if ( _.isUndefined( $( font_select ).data( 'bound_once' ) ) ) {
533
 
534
- $( font_select ).data( 'bound_once', true );
535
  //var api = wp.customize;
536
  //api.previewer.refresh();
537
 
538
- $( font_select ).change();
539
  $font_weight.change();
540
  $font_subsets.change();
541
  }
542
  }
543
 
544
  // first try to get the font from sure sources, not from the recommended list.
545
- var option_data = $( font_select ).find( ':not(optgroup[label=Recommended]) option[value="' + selected_font + '"]' );
546
  // however, if there isn't an option found, get what you can
547
  if ( option_data.length < 1 ) {
548
- option_data = $( font_select ).find( 'option[value="' + selected_font + '"]' );
549
  }
550
 
551
  if ( option_data.length > 0 ) {
552
 
553
- var font_type = option_data.data( 'type' ),
554
  value_to_add = {'type': font_type, 'font_family': selected_font},
555
  variants = null,
556
  subsets = null;
557
 
558
  if ( font_type == 'std' ) {
559
- variants = { 0: '100', 1: '200', 3: '300', 4: '400', 5: '500', 6: '600', 7: '700', 8: '800', 9: '900' };
560
- if ( ! _.isUndefined( $( option_data[0] ).data( 'variants' ) ) ) {
 
 
 
 
 
 
 
 
 
 
561
  //maybe the variants are a JSON
562
- variants = maybeJsonParse( $( option_data[0] ).data( 'variants' ) );
563
  }
564
  } else {
565
  //maybe the variants are a JSON
566
- variants = maybeJsonParse( $( option_data[0] ).data( 'variants' ) );
567
 
568
  //maybe the subsets are a JSON
569
- subsets = maybeJsonParse( $( option_data[0] ).data( 'subsets' ) );
570
  }
571
 
572
  // make the variants selector
573
- if ( ! _.isUndefined( variants ) && ! _.isNull( variants ) && ! _.isEmpty( variants ) ) {
574
 
575
  value_to_add['variants'] = variants;
576
  // when a font is selected force the first weight to load
@@ -579,13 +618,13 @@
579
  var variants_options = '',
580
  count_weights = 0;
581
 
582
- if ( _.isArray( variants ) || _.isObject( variants ) ) {
583
  // Take each variant and produce the option markup
584
- $.each(variants, function (key, el) {
585
  var is_selected = '';
586
- if (_.isObject(current_val.selected_variants) && inObject(el, current_val.selected_variants)) {
587
  is_selected = ' selected="selected"';
588
- } else if (_.isString(current_val.selected_variants) && el === current_val.selected_variants) {
589
  is_selected = ' selected="selected"';
590
  }
591
 
@@ -595,17 +634,17 @@
595
 
596
  // If we are dealing with a object variant then it means things get tricky (probably it's our fault but bear with us)
597
  // This probably comes from our Fonto plugin - a font with individually named variants - hence each has its own font-family
598
- if (_.isObject(el)) {
599
  //put the entire object in the variation value - we will need it when outputting the custom CSS
600
  variant_option_value = encodeURIComponent(JSON.stringify(el));
601
  variant_option_display = '';
602
 
603
  //if we have weight and style then "compose" them into something standard
604
- if (!_.isUndefined(el['font-weight'])) {
605
  variant_option_display += el['font-weight'];
606
  }
607
 
608
- if (_.isString(el['font-style']) && $.inArray(el['font-style'].toLowerCase(), ["normal", "regular"]) < 0) { //this comparison means it hasn't been found
609
  variant_option_display += el['font-style'];
610
  }
611
  }
@@ -615,52 +654,52 @@
615
  });
616
  }
617
 
618
- if ( ! _.isUndefined( $font_weight ) ) {
619
- $font_weight.html( variants_options );
620
  // if there is no weight or just 1 we hide the weight select ... cuz is useless
621
- if ( $( font_select ).data( 'load_all_weights' ) === true || count_weights <= 1 ) {
622
- $font_weight.parent().css( 'display', 'none' );
623
  } else {
624
- $font_weight.parent().css( 'display', 'inline-block' );
625
  }
626
  }
627
- } else if ( ! _.isUndefined( $font_weight ) ) {
628
- $font_weight.parent().css( 'display', 'none' );
629
  }
630
 
631
  // make the subsets selector
632
- if ( ! _.isUndefined( subsets ) && ! _.isNull( subsets ) && ! _.isEmpty( subsets ) ) {
633
 
634
  value_to_add['subsets'] = subsets;
635
  // when a font is selected force the first subset to load
636
  value_to_add['selected_subsets'] = {0: subsets[0]};
637
  var subsets_options = '',
638
  count_subsets = 0;
639
- $.each( subsets, function( key, el ) {
640
  var is_selected = '';
641
- if ( _.isObject( current_val.selected_subsets ) && inObject( el, current_val.selected_subsets ) ) {
642
  is_selected = ' selected="selected"';
643
  }
644
 
645
  subsets_options += '<option value="' + el + '"' + is_selected + '>' + el + '</option>';
646
  count_subsets++;
647
- } );
648
 
649
- if ( ! _.isUndefined( $font_subsets ) ) {
650
- $font_subsets.html( subsets_options );
651
 
652
  // if there is no subset or just 1 we hide the subsets select ... cuz is useless
653
  if ( count_subsets <= 1 ) {
654
- $font_subsets.parent().css( 'display', 'none' );
655
  } else {
656
- $font_subsets.parent().css( 'display', 'inline-block' );
657
  }
658
  }
659
- } else if ( ! _.isUndefined( $font_subsets ) ) {
660
- $font_subsets.parent().css( 'display', 'none' );
661
  }
662
 
663
- $input.val( encodeURIComponent( JSON.stringify( value_to_add ) ) );
664
  }
665
  };
666
 
@@ -670,22 +709,22 @@
670
  * @param obj
671
  * @returns {boolean}
672
  */
673
- var inObject = function( value, obj ) {
674
  for ( var k in obj ) {
675
- if ( !obj.hasOwnProperty( k ) ) continue;
676
- if ( _.isEqual( obj[k], value ) ) {
677
  return true;
678
  }
679
  }
680
  return false;
681
  };
682
 
683
- var maybeJsonParse = function( value ) {
684
  var parsed;
685
 
686
  //try and parse it, with decodeURIComponent
687
  try {
688
- parsed = JSON.parse( decodeURIComponent( value ) );
689
  } catch ( e ) {
690
 
691
  // in case of an error, treat is as a string
@@ -695,27 +734,27 @@
695
  return parsed;
696
  };
697
 
698
- var customifyBackgroundJsControl = (function() {
699
  "use strict";
700
 
701
  var api = wp.customize;
702
 
703
  function init() {
704
  // Remove the image button
705
- $( '.customize-control-custom_background .remove-image, .customize-control-custom_background .remove-file' ).unbind( 'click' ).on( 'click', function( e ) {
706
- removeImage( $( this ).parents( '.customize-control-custom_background:first' ) );
707
- preview( $( this ) );
708
  return false;
709
- } );
710
 
711
  // Upload media button
712
- $( '.customize-control-custom_background .background_upload_button' ).unbind().on( 'click', function( event ) {
713
- addImage( event, $( this ).parents( '.customize-control-custom_background:first' ) );
714
- } );
715
 
716
- $( '.customify_background_select' ).on( 'change', function() {
717
- preview( $( this ) );
718
- } );
719
  }
720
 
721
  // Add a file via the wp.media function
@@ -724,7 +763,7 @@
724
  event.preventDefault();
725
 
726
  var frame;
727
- var jQueryel = jQuery( this );
728
 
729
  // If the media frame already exists, reopen it.
730
  if ( frame ) {
@@ -733,42 +772,42 @@
733
  }
734
 
735
  // Create the media frame.
736
- frame = wp.media( {
737
  multiple: false,
738
  library: {
739
  //type: 'image' //Only allow images
740
  },
741
  // Set the title of the modal.
742
- title: jQueryel.data( 'choose' ),
743
 
744
  // Customize the submit button.
745
  button: {
746
  // Set the text of the button.
747
- text: jQueryel.data( 'update' )
748
  // Tell the button not to close the modal, since we're
749
  // going to refresh the page when the image is selected.
750
  }
751
- } );
752
 
753
  // When an image is selected, run a callback.
754
- frame.on( 'select', function() {
755
  // Grab the selected attachment.
756
- var attachment = frame.state().get( 'selection' ).first();
757
  frame.close();
758
 
759
  if ( attachment.attributes.type !== "image" ) {
760
  return;
761
  }
762
 
763
- selector.find( '.upload' ).attr( 'value', attachment.attributes.url );
764
- selector.find( '.upload-id' ).attr( 'value', attachment.attributes.id );
765
- selector.find( '.upload-height' ).attr( 'value', attachment.attributes.height );
766
- selector.find( '.upload-width' ).attr( 'value', attachment.attributes.width );
767
 
768
  var thumbSrc = attachment.attributes.url;
769
- if ( ! _.isUndefined( attachment.attributes.sizes ) && ! _.isUndefined( attachment.attributes.sizes.thumbnail ) ) {
770
  thumbSrc = attachment.attributes.sizes.thumbnail.url;
771
- } else if ( ! _.isUndefined( attachment.attributes.sizes ) ) {
772
  var height = attachment.attributes.height;
773
  for ( var key in attachment.attributes.sizes ) {
774
  var object = attachment.attributes.sizes[key];
@@ -781,17 +820,17 @@
781
  thumbSrc = attachment.attributes.icon;
782
  }
783
 
784
- selector.find( '.customify_background_input.background-image' ).val( attachment.attributes.url );
785
 
786
- if ( !selector.find( '.upload' ).hasClass( 'noPreview' ) ) {
787
- selector.find( '.preview_screenshot' ).empty().hide().append( '<img class="preview_image" src="' + thumbSrc + '">' ).slideDown( 'fast' );
788
  }
789
  //selector.find('.media_upload_button').unbind();
790
- selector.find( '.remove-image' ).removeClass( 'hide' );//show "Remove" button
791
- selector.find( '.customify_background_select' ).removeClass( 'hide' );//show "Remove" button
792
 
793
- preview( selector );
794
- } );
795
 
796
  // Finally, open the modal.
797
  frame.open();
@@ -800,36 +839,36 @@
800
  // Update the background preview
801
  function preview( selector ) {
802
 
803
- var $parent = selector.parents( '.customize-control-custom_background:first' );
804
 
805
- if ( selector.hasClass( 'customize-control-custom_background' ) ) {
806
  $parent = selector;
807
  }
808
 
809
  if ( $parent.length > 0 ) {
810
- $parent = $( $parent[0] );
811
  } else {
812
  return;
813
  }
814
 
815
- var image_holder = $parent.find( '.background-preview' );
816
 
817
  if ( !image_holder ) { // No preview present
818
  return;
819
  }
820
 
821
- var the_id = $parent.find( '.button.background_upload_button' ).data( 'setting_id' ),
822
- this_setting = api.instance( the_id );
823
 
824
  var background_data = {};
825
 
826
- $parent.find( '.customify_background_select, .customify_background_input' ).each( function() {
827
- var data = $( this ).serializeArray();
828
 
829
  data = data[0];
830
- if ( data && data.name.indexOf( '[background-' ) != -1 ) {
831
 
832
- background_data[$( this ).data( 'select_name' )] = data.value;
833
 
834
  //default_default[data.name] = data.value;
835
  //if (data.name == "background-image") {
@@ -838,11 +877,11 @@
838
  // css += data.name + ':' + data.value + ';';
839
  //}
840
  }
841
- } );
842
 
843
- api.instance( the_id ).set( background_data );
844
  //// Notify the customizer api about this change
845
- api.trigger( 'change' );
846
  api.previewer.refresh();
847
 
848
  //image_holder.attr('style', css).fadeIn();
@@ -850,109 +889,403 @@
850
 
851
  // Update the background preview
852
  function removeImage( parent ) {
853
- var selector = parent.find( '.upload_button_div' );
854
  // This shouldn't have been run...
855
- if ( !selector.find( '.remove-image' ).addClass( 'hide' ) ) {
856
  return;
857
  }
858
 
859
- selector.find( '.remove-image' ).addClass( 'hide' );//hide "Remove" button
860
- parent.find( '.customify_background_select' ).addClass( 'hide' );
861
 
862
- selector.find( '.upload' ).val( '' );
863
- selector.find( '.upload-id' ).val( '' );
864
- selector.find( '.upload-height' ).val( '' );
865
- selector.find( '.upload-width' ).val( '' );
866
- parent.find( '.customify_background_input.background-image' ).val( '' );
867
 
868
- var customizer_id = selector.find( '.background_upload_button' ).data( 'setting_id' ),
869
- this_setting = api.control( customizer_id + '_control' ),
870
  current_vals = this_setting.setting(),
871
- screenshot = parent.find( '.preview_screenshot' ),
872
- to_array = $.map( current_vals, function( value, index ) {
873
  return [value];
874
- } );
875
 
876
  // Hide the screenshot
877
  screenshot.slideUp();
878
- selector.find( '.remove-file' ).unbind();
879
  to_array['background-image'] = '';
880
- this_setting.setting( to_array );
881
  }
882
 
883
  return {
884
  init: init
885
  }
886
- })( jQuery );
887
 
888
- var getUrlVars = function( name ) {
889
  var vars = [], hash;
890
- var hashes = window.location.href.slice( window.location.href.indexOf( '?' ) + 1 ).split( '&' );
891
  for ( var i = 0; i < hashes.length; i++ ) {
892
- hash = hashes[i].split( '=' );
893
 
894
- vars.push( hash[0] );
895
  vars[hash[0]] = hash[1];
896
  }
897
 
898
- if ( ! _.isUndefined( vars[name] ) ) {
899
  return vars[name];
900
  }
901
  return false;
902
  };
903
 
904
- var isJsonString = function( str ) {
905
  try {
906
- JSON.parse( str );
907
  } catch ( e ) {
908
  return false;
909
  }
910
  return true;
911
  };
912
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
913
 
914
- var Queue = function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
  var lastPromise = null;
916
  var queueDeferred = null;
917
  var methodDeferred = null;
918
 
919
- this.add_steps = function( key, steps, args ) {
920
  var self = this;
921
  this.methodDeferred = $.Deferred();
922
  this.queueDeferred = this.setup();
923
 
924
- $.each( steps, function( i, step ) {
925
- self.queue( key, step );
926
- } );
927
  };
928
 
929
- this.process_remote_step = function( key, data, step ) {
930
  var self = this;
931
 
932
- if ( _.isUndefined( data ) || _.isNull( data ) ) {
933
  return false;
934
  }
935
 
936
  var new_step = step;
937
- $.each( data, function( i, k ) {
938
- debugger;
939
  // prepare data for new requests
940
  new_step.recall_data = k.data;
941
  new_step.recall_type = k.type;
942
  new_step.type = 'recall';
943
 
944
- self.queue( key, new_step, k.id );
945
- } );
946
  };
947
 
948
- this.log_action = function( action, key, msg ) {
949
  if ( action === 'start' ) {
950
- $('.wpGrade-import-results' ).show();
951
- $('.wpGrade-import-results' ).append( '<span class="import_step_note imports_step_' + key + '" ><span class="step_info" data-balloon="Working on it" data-balloon-pos="up"></span>Importing ' + key + '</span>' );
952
  } else if ( action === 'end' ) {
953
  var $notice = $('.imports_step_' + key + ' .step_info');
954
 
955
- if ( $notice.length > 0 || msg !== "undefined") {
956
  $notice.attr('data-balloon', msg);
957
  $notice.addClass('success');
958
  } else {
@@ -962,18 +1295,18 @@ debugger;
962
  }
963
  };
964
 
965
- this.queue = function( key, data, step_key ) {
966
  var self = this;
967
- if ( ! _.isUndefined( step_key ) ) {
968
- this.log_action( 'start', step_key );
969
  }
970
 
971
  // execute next queue method
972
- this.queueDeferred.done( this.request( key, data, step_key ) );
973
  lastPromise = self.methodDeferred.promise();
974
  };
975
 
976
- this.request = function( key, step, step_key ) {
977
  var self = this;
978
  // call actual method and wrap output in deferred
979
  //setTimeout( function() {
@@ -984,52 +1317,52 @@ debugger;
984
  option_key: key
985
  };
986
 
987
- if ( ! _.isUndefined( step.recall_data ) ) {
988
  data_args.recall_data = step.recall_data;
989
  }
990
 
991
- if ( ! _.isUndefined( step.recall_type ) ) {
992
  data_args.recall_type = step.recall_type;
993
  }
994
 
995
- $.ajax( {
996
  url: customify_settings.import_rest_url + 'customify/1.0/import',
997
  method: 'POST',
998
- beforeSend: function( xhr ) {
999
- xhr.setRequestHeader( 'X-WP-Nonce', WP_API_Settings.nonce );
1000
  },
1001
  dataType: 'json',
1002
  contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
1003
  data: data_args
1004
- } ).done( function( response ) {
1005
- if ( ! _.isUndefined( response.success ) && response.success ) {
1006
  var results = response.data;
1007
  if ( step.type === 'remote' ) {
1008
- self.process_remote_step( key, results, step );
1009
  }
1010
  }
1011
 
1012
- if ( ! _.isUndefined( step_key ) && ! _.isUndefined( response.message ) ) {
1013
- self.log_action( 'end', step_key, response.message );
1014
  }
1015
- } );
1016
 
1017
  self.methodDeferred.resolve();
1018
  //}, 3450 );
1019
  };
1020
 
1021
- this.setup = function() {
1022
  var self = this;
1023
 
1024
  self.queueDeferred = $.Deferred();
1025
 
1026
  // when the previous method returns, resolve this one
1027
- $.when( lastPromise ).always( function() {
1028
  self.queueDeferred.resolve();
1029
- } );
1030
 
1031
  return self.queueDeferred.promise();
1032
  }
1033
  };
1034
 
1035
- })( jQuery, window );
1
+ (function ( $, exports ) {
2
+ $(document).ready(function () {
3
  // when the customizer is ready prepare our fields events
4
+ wp.customize.bind('ready', function () {
5
  var api = this,
6
  timeout = null;
7
 
8
  // add ace editors
9
+ $('.customify_ace_editor').each(function ( key, el ) {
10
+ var id = $(this).attr('id'),
11
+ css_editor = ace.edit(id);
12
 
13
+ var editor_type = $(this).data('editor_type');
14
  // init the ace editor
15
+ css_editor.setTheme("ace/theme/github");
16
+ css_editor.getSession().setMode("ace/mode/" + editor_type);
17
 
18
  // hide the textarea and enable the ace editor
19
+ var textarea = $('#' + id + '_textarea').hide();
20
+ css_editor.getSession().setValue(textarea.val());
21
 
22
  // each time a change is triggered start a timeout of 1,5s and when is finished refresh the previewer
23
  // if the user types faster than this delay then reset it
24
+ css_editor.getSession().on('change', function ( e ) {
25
  if ( timeout !== null ) {
26
+ clearTimeout(timeout);
27
  timeout = null;
28
  } else {
29
+ timeout = setTimeout(function () {
30
  //var state = css_editor.session.getState();
31
+ textarea.val(css_editor.getSession().getValue());
32
+ textarea.trigger('change');
33
+ }, 1500);
34
  }
35
+ });
36
+ });
37
 
38
  // simple select2 field
39
+ $('.customify_select2').select2();
40
+
41
+ customifyFontSelect.init(this);
42
 
43
  prepare_typography_field();
44
 
46
  * Make the customizer save on CMD/CTRL+S action
47
  * This is awesome!!!
48
  */
49
+ $(window).bind('keydown', function ( event ) {
50
  if ( event.ctrlKey || event.metaKey ) {
51
+ switch ( String.fromCharCode(event.which).toLowerCase() ) {
52
  case 's':
53
  event.preventDefault();
54
  api.previewer.save();
55
  break;
56
  }
57
  }
58
+ });
59
 
60
  // for each range input add a value preview output
61
+ $('input[type="range"]').each(function () {
62
+ var $clone = $(this).clone();
63
 
64
  $clone
65
+ .attr('type', 'number')
66
+ .attr('class', 'range-value');
67
 
68
+ $(this).after($clone);
69
 
70
+ $(this).on('input', function () {
71
+ $(this).siblings('.range-value').val($(this).val());
72
+ });
73
+ });
74
 
75
+ if ( $('button[data-action="reset_customify"]').length > 0 ) {
76
  // reset_button
77
+ $(document).on('click', '#customize-control-reset_customify button', function ( ev ) {
78
  ev.preventDefault();
79
 
80
+ var iAgree = confirm('Do you really want to reset to defaults all the fields? Watch out, this will reset all your Customify options and will save them!');
81
 
82
  if ( !iAgree ) {
83
  return;
84
  }
85
 
86
+ $.each(api.settings.controls, function ( key, ctrl ) {
87
+ var id = key.replace('_control', '');
88
  var setting = customify_settings.settings[id];
89
 
90
+ if ( !_.isUndefined(setting) && !_.isUndefined(setting.default) ) {
91
 
92
+ var start_pos = id.indexOf('[') + 1;
93
+ var end_pos = id.indexOf(']', start_pos);
94
 
95
+ id = id.substring(start_pos, end_pos);
96
+ api_set_setting_value(id, setting.default);
97
  }
98
+ });
99
 
100
  api.previewer.save();
101
+ });
102
 
103
  // add a reset button for each panel
104
+ $('.panel-meta').each(function ( el, key ) {
105
+ var container = $(this).parents('.control-panel'),
106
+ id = container.attr('id'),
107
+ panel_id = id.replace('accordion-panel-', '');
108
 
109
 
110
+ $(this).parent().append('<button class="reset_panel button" data-panel="' + panel_id + '">Panel\'s defaults</button>');
111
+ });
112
 
113
  // reset panel
114
+ $(document).on('click', '.reset_panel', function ( e ) {
115
  e.preventDefault();
116
 
117
+ var panel_id = $(this).data('panel'),
118
+ panel = api.panel(panel_id),
119
  sections = panel.sections(),
120
+ iAgree = confirm("Do you really want to reset " + panel.params.title + "?");
121
 
122
  if ( !iAgree ) {
123
  return;
124
  }
125
  if ( sections.length > 0 ) {
126
+ $.each(sections, function () {
127
  //var settings = this.settings();
128
  var controls = this.controls();
129
 
130
  if ( controls.length > 0 ) {
131
+ $.each(controls, function ( key, ctrl ) {
132
+ var id = ctrl.id.replace('_control', ''),
133
  setting = customify_settings.settings[id];
134
 
135
+ if ( !_.isUndefined(setting) && !_.isUndefined(setting.default) ) {
136
 
137
+ var start_pos = id.indexOf('[') + 1,
138
+ end_pos = id.indexOf(']', start_pos);
139
 
140
+ id = id.substring(start_pos, end_pos);
141
+ api_set_setting_value(id, setting.default);
142
  }
143
+ });
144
  }
145
+ });
146
  }
147
+ });
148
 
149
  //add reset section
150
+ $('.accordion-section-content').each(function ( el, key ) {
151
+ var section = $(this).parent(),
152
+ section_id = section.attr('id');
153
 
154
+ if ( ( ( !_.isUndefined(section_id) ) ? section_id.indexOf(customify_settings.options_name) : -1 ) === -1 ) {
155
  return;
156
  }
157
 
158
+ if ( !_.isUndefined(section_id) && section_id.indexOf('accordion-section-') > -1 ) {
159
+ var id = section_id.replace('accordion-section-', '');
160
+ $(this).prepend('<button class="reset_section button" data-section="' + id + '">Section\'s defaults</button>');
161
  }
162
+ });
163
 
164
  // reset section event
165
+ $(document).on('click', '.reset_section', function ( e ) {
166
  e.preventDefault();
167
 
168
+ var section_id = $(this).data('section'),
169
+ section = api.section(section_id),
170
  controls = section.controls();
171
 
172
+ var iAgree = confirm("Do you really want to reset " + section.params.title + "?");
173
 
174
  if ( !iAgree ) {
175
  return;
176
  }
177
 
178
  if ( controls.length > 0 ) {
179
+ $.each(controls, function ( key, ctrl ) {
180
+ var id = ctrl.id.replace('_control', ''),
181
  setting = customify_settings.settings[id];
182
 
183
+ if ( !_.isUndefined(setting) && !_.isUndefined(setting.default) ) {
184
 
185
+ var start_pos = id.indexOf('[') + 1,
186
+ end_pos = id.indexOf(']', start_pos);
187
 
188
+ id = id.substring(start_pos, end_pos);
189
+ api_set_setting_value(id, setting.default);
190
  }
191
+ });
192
  }
193
+ });
194
  }
195
 
196
+ $(document).on('change', '.customize-control input.range-value', function () {
197
+ var range = $(this).siblings('input[type="range"]');
198
+ range.val($(this).val());
199
+ });
200
 
201
+ $(document).on('change', '.customify_typography_font_subsets', function ( ev ) {
202
 
203
+ var $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values'),
204
  current_val = $input.val();
205
 
206
+ current_val = JSON.parse(decodeURIComponent(current_val));
207
 
208
  //maybe the selected option holds a JSON in its value
209
+ current_val.selected_subsets = maybeJsonParse($(this).val());
210
 
211
+ $input.val(encodeURIComponent(JSON.stringify(current_val)));
212
 
213
+ $input.trigger('change');
214
+ });
215
 
216
+ $(document).on('change', '.customify_typography_font_weight', function ( ev ) {
217
 
218
+ var $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values'),
219
  current_val = $input.val();
220
 
221
+ current_val = maybeJsonParse(current_val);
222
  // @todo currently the font weight selector works for one value only
223
  // maybe make this a multiselect
224
 
225
  //maybe the selected option holds a JSON in its value
226
+ current_val.selected_variants = {0: maybeJsonParse($(this).val())};
227
 
228
+ $input.val(encodeURIComponent(JSON.stringify(current_val)));
229
+ $input.trigger('change');
230
+ });
231
 
232
  // presets
233
+ $(document).on('change', '.customify_preset.select', function () {
234
  var api = wp.customize,
235
+ this_option = $(this).children('[value="' + $(this).val() + '"]'),
236
+ data = $(this_option).data('options');
237
 
238
+ if ( !_.isUndefined(data) ) {
239
+ $.each(data, function ( id, value ) {
240
+ api_set_setting_value(id, value);
241
+ });
242
  }
243
 
244
  api.previewer.refresh();
245
+ });
246
 
247
+ $(document).on('click', '.customify_preset.radio input, .customify_preset.radio_buttons input, .awesome_presets input', function () {
248
  var api = wp.customize;
249
  var this_option = this;//$(this).children('[value="' + $(this).val() + '"]');
250
+ var data = $(this_option).data('options');
251
 
252
+ if ( !_.isUndefined(data) ) {
253
+ $.each(data, function ( id, value ) {
254
+ api_set_setting_value(id, value);
255
+ });
256
  }
257
 
258
  api.previewer.refresh();
259
+ });
260
 
261
  // bind our event on click
262
+ $(document).on('click', '.customify_import_demo_data_button', function ( event ) {
263
  //if ( $( this ).hasClass( '.wpGrade_button_inactive' ) ) {
264
  // return false;
265
  //} else {
270
  //if ( confirmImport == false ) return false;
271
 
272
  //@todo start an animation here
273
+ var key = $(this).data('key');
274
 
275
+ var import_queue = new Queue(api);
276
 
277
  /// calculate the number of steps
278
  var steps = [];
279
 
280
+ if ( !_.isUndefined(customify_settings.settings[key].imports) ) {
281
 
282
+ $.each(customify_settings.settings[key].imports, function ( i, import_setts, k ) {
283
+ if ( _.isUndefined(import_setts.steps) ) {
284
+ steps.push({id: i, type: import_setts.type});
285
  } else {
286
  var count = import_setts.steps;
287
 
288
  while ( count >= 1 ) {
289
+ steps.push({id: i, type: import_setts.type, count: count});
290
  count = count - 1;
291
  }
292
  }
293
+ });
294
  }
295
 
296
+ import_queue.add_steps('import_demo_data_action_id', steps);
297
  return false;
298
+ });
299
 
300
  customifyBackgroundJsControl.init();
301
 
302
  // sometimes there may be needed a php save
303
+ if ( getUrlVars('save_customizer_once') ) {
304
  api.previewer.save();
305
  }
306
 
307
  setTimeout(function () {
308
  customifyFoldingFields();
309
  }, 1000);
310
+
311
+
312
+ // Handle the section tabs (ex: Layout | Fonts | Colors)
313
+ (function() {
314
+ var $navs = $( '.js-section-navigation' );
315
+
316
+ $navs.each( function () {
317
+ var $nav = $( this );
318
+ var $title = $nav.parents( '.accordion-section-content' ).find( '.customize-section-title' );
319
+
320
+ $title.append( $nav ).parent().addClass( 'has-nav' );
321
+ });
322
+
323
+ $('.js-section-navigation a').on( 'click', function(e) {
324
+ e.preventDefault();
325
+
326
+ var $sidebar = $('.wp-full-overlay-sidebar-content');
327
+ var $parent = $(this).parents( '.accordion-section-content' );
328
+ var href = $.attr(this, 'href');
329
+
330
+ if ( href != '#' ) {
331
+ $sidebar.animate({
332
+ scrollTop: $( $.attr(this, 'href') ).position().top - $parent.find( '.customize-section-title' ).outerHeight()
333
+ }, 500);
334
+ }
335
+ });
336
+ })();
337
+ });
338
 
339
  /**
340
  * This function will search for all the interdependend fields and make a bound between them.
341
  * So whenever a target is changed, it will take actions to the dependent fields.
342
  */
343
+ var customifyFoldingFields = function () {
344
 
345
+ if ( _.isUndefined(customify_settings) || _.isUndefined(customify_settings.settings) ) {
346
+ return; // bail
347
  }
348
 
349
  /**
355
  */
356
  var targets = {};
357
 
358
+ $.fn.reactor.defaults.compliant = function () {
359
  $(this).slideDown();
360
  // $(this).animate({opacity: 1});
361
  $(this).find(':disabled').attr({disabled: false});
362
  };
363
 
364
+ $.fn.reactor.defaults.uncompliant = function () {
365
  $(this).slideUp();
366
  // $(this).animate({opacity: 0.25});
367
  $(this).find(':enabled').attr({disabled: true});
369
 
370
  var IS = $.extend({}, $.fn.reactor.helpers);
371
 
372
+ var process_a_target = function ( parent_id, field ) {
373
 
374
+ if ( _.isUndefined(field[0]) ) {
375
+ return; // no id, no fun
376
  }
377
 
378
  var key = field[0],
381
  action = "show"; // can only be `show` or `hide`
382
 
383
  var target_key = customify_settings.options_name + '[' + key + ']';
384
+ var target_type = customify_settings.settings[target_key].type;
385
 
386
 
387
+ if ( !_.isUndefined(field[1]) ) {
388
  value = field[1];
389
  }
390
 
391
+ if ( !_.isUndefined(field[2]) ) {
392
  compare = field[2];
393
  }
394
 
395
+ if ( !_.isUndefined(field[3]) ) {
396
  action = field[3];
397
  }
398
 
402
  var target_selector = '[data-customize-setting-link="' + customify_settings.options_name + '[' + key + ']"]';
403
 
404
  if ( target_type == 'checkbox' ) {
405
+ $(parent_id).reactIf(target_selector, function () {
406
+ return $(this).is(':checked') == value;
407
+ });
408
  } else if ( target_type == 'radio' || target_type == 'radio_image' ) {
409
  $(parent_id)
410
+ .reactIf(target_selector, function () {
411
+ return $(target_selector + ':checked').val() == value;
412
+ });
413
  } else {
414
  $(parent_id)
415
+ .reactIf(target_selector, function () {
416
  return $(target_selector).val() == value;
417
+ });
418
  }
419
 
420
  $(target_selector).trigger('change');
421
  $('.reactor').trigger('change.reactor'); // triggers all events on load
422
  };
423
 
424
+ $.each(customify_settings.settings, function ( id, field ) {
425
 
426
  /**
427
  * Here we have the id of the fields. but we know for sure that we just need his parent selector
428
  * So we just create it
429
  */
430
+ var parent_id = id.replace('[', '-');
431
+ parent_id = parent_id.replace(']', '');
432
  parent_id = '#customize-control-' + parent_id + '_control';
433
 
434
 
435
  // get only the fields that have a 'show_on' property
436
+ if ( field.hasOwnProperty('show_on') && field.show_on.length > 0 ) {
437
 
438
  /**
439
  * The 'show_on' can be a simple array with one target like: [ id, value, comparison, action ]
440
  * Or it could be an array of multiple targets and we need to process both cases
441
  */
442
+ if ( _.isString(field.show_on[0]) ) {
443
+ process_a_target(parent_id, field.show_on);
444
+ } else if ( _.isObject(field.show_on[0]) ) {
445
+ $.each(field.show_on, function ( i, j ) {
446
+ process_a_target(parent_id, j);
447
  });
448
  }
449
  }
450
  });
451
  };
452
 
453
+ var get_typography_font_family = function ( $el ) {
454
 
455
  var font_family_value = $el.val();
456
  // first time this will not be a json so catch that error
457
  try {
458
+ font_family_value = JSON.parse(font_family_value);
459
  } catch ( e ) {
460
  return {font_family: font_family_value};
461
  }
462
 
463
+ if ( !_.isUndefined(font_family_value.font_family) ) {
464
  return font_family_value.font_family;
465
  }
466
 
468
  };
469
 
470
  // get each typography field and bind events
471
+ var prepare_typography_field = function () {
472
 
473
+ var $typos = $('.customify_typography_font_family');
474
 
475
+ $typos.each(function () {
476
  var font_family_select = this,
477
+ $input = $(font_family_select).siblings('.customify_typography_values');
478
  // on change
479
+ $(font_family_select).on('change', function () {
480
+ update_siblings_selects(font_family_select);
481
+ $input.trigger('change');
482
+ });
483
+ update_siblings_selects(font_family_select);
484
+ });
485
  };
486
 
487
+ var api_set_setting_value = function ( id, value ) {
488
 
489
  var api = wp.customize,
490
  setting_id = customify_settings.options_name + '[' + id + ']',
491
+ setting = api(setting_id),
492
+ field = $('[data-customize-setting-link="' + setting_id + '"]'),
493
+ field_class = $(field).parent().attr('class');
494
 
495
+ if ( !_.isUndefined(field_class) && field_class === 'customify_typography' ) {
496
 
497
+ var family_select = field.siblings('select');
498
 
499
+ if ( _.isString(value) ) {
500
+ var this_option = family_select.find('option[value="' + value + '"]');
501
+ $(this_option[0]).attr('selected', 'selected');
502
+ update_siblings_selects(family_select);
503
+ } else if ( _.isObject(value) ) {
504
+ var this_family_option = family_select.find('option[value="' + value['font_family'] + '"]');
505
+ $(this_family_option[0]).attr('selected', 'selected');
506
 
507
+ update_siblings_selects(this_family_option);
508
 
509
+ setTimeout(function () {
510
+ var weight_select = field.parent().siblings('.options').find('.customify_typography_font_weight');
511
 
512
+ var this_weight_option = weight_select.find('option[value="' + value['selected_variants'] + '"]');
513
 
514
+ $(this_weight_option[0]).attr('selected', 'selected');
515
 
516
+ update_siblings_selects(this_family_option);
517
 
518
+ weight_select.trigger('change');
519
+ }, 300);
520
  }
521
 
522
+ family_select.trigger('change');
523
 
524
  } else {
525
+ setting.set(value);
526
  }
527
  };
528
 
529
+ var update_siblings_selects = function ( font_select ) {
530
 
531
  this.bound_once = false;
532
+ var selected_font = $(font_select).val(),
533
+ $input = $(font_select).siblings('.customify_typography_values'),
534
+ current_val = $input.attr('value');
535
 
536
  if ( current_val === '[object Object]' ) {
537
+ current_val = $input.data('default');
538
+ } else if ( _.isString(current_val) && !isJsonString(current_val) && current_val.substr(0, 1) == '[' ) {
539
  // a rare case when the value isn't a json but is a representative string like [family,weight]
540
+ current_val = current_val.split(',');
541
  var new_current_value = {};
542
+ if ( !_.isUndefined(current_val[0]) ) {
543
  new_current_value['font_family'] = current_val[0];
544
  }
545
 
546
+ if ( !_.isUndefined(current_val[1]) ) {
547
  new_current_value['selected_variants'] = current_val[1];
548
  }
549
 
550
+ current_val = JSON.stringify(new_current_value);
551
  }
552
 
553
+ var $font_weight = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_weight'),
554
+ $font_subsets = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_subsets');
555
 
556
  try {
557
+ current_val = JSON.parse(decodeURIComponent(current_val));
558
  } catch ( e ) {
559
 
560
  // in case of an error, force the rebuild of the json
561
+ if ( _.isUndefined($(font_select).data('bound_once')) ) {
562
 
563
+ $(font_select).data('bound_once', true);
564
  //var api = wp.customize;
565
  //api.previewer.refresh();
566
 
567
+ $(font_select).change();
568
  $font_weight.change();
569
  $font_subsets.change();
570
  }
571
  }
572
 
573
  // first try to get the font from sure sources, not from the recommended list.
574
+ var option_data = $(font_select).find(':not(optgroup[label=Recommended]) option[value="' + selected_font + '"]');
575
  // however, if there isn't an option found, get what you can
576
  if ( option_data.length < 1 ) {
577
+ option_data = $(font_select).find('option[value="' + selected_font + '"]');
578
  }
579
 
580
  if ( option_data.length > 0 ) {
581
 
582
+ var font_type = option_data.data('type'),
583
  value_to_add = {'type': font_type, 'font_family': selected_font},
584
  variants = null,
585
  subsets = null;
586
 
587
  if ( font_type == 'std' ) {
588
+ variants = {
589
+ 0: '100',
590
+ 1: '200',
591
+ 3: '300',
592
+ 4: '400',
593
+ 5: '500',
594
+ 6: '600',
595
+ 7: '700',
596
+ 8: '800',
597
+ 9: '900'
598
+ };
599
+ if ( !_.isUndefined($(option_data[0]).data('variants')) ) {
600
  //maybe the variants are a JSON
601
+ variants = maybeJsonParse($(option_data[0]).data('variants'));
602
  }
603
  } else {
604
  //maybe the variants are a JSON
605
+ variants = maybeJsonParse($(option_data[0]).data('variants'));
606
 
607
  //maybe the subsets are a JSON
608
+ subsets = maybeJsonParse($(option_data[0]).data('subsets'));
609
  }
610
 
611
  // make the variants selector
612
+ if ( !_.isUndefined(variants) && !_.isNull(variants) && !_.isEmpty(variants) ) {
613
 
614
  value_to_add['variants'] = variants;
615
  // when a font is selected force the first weight to load
618
  var variants_options = '',
619
  count_weights = 0;
620
 
621
+ if ( _.isArray(variants) || _.isObject(variants) ) {
622
  // Take each variant and produce the option markup
623
+ $.each(variants, function ( key, el ) {
624
  var is_selected = '';
625
+ if ( _.isObject(current_val.selected_variants) && inObject(el, current_val.selected_variants) ) {
626
  is_selected = ' selected="selected"';
627
+ } else if ( _.isString(current_val.selected_variants) && el === current_val.selected_variants ) {
628
  is_selected = ' selected="selected"';
629
  }
630
 
634
 
635
  // If we are dealing with a object variant then it means things get tricky (probably it's our fault but bear with us)
636
  // This probably comes from our Fonto plugin - a font with individually named variants - hence each has its own font-family
637
+ if ( _.isObject(el) ) {
638
  //put the entire object in the variation value - we will need it when outputting the custom CSS
639
  variant_option_value = encodeURIComponent(JSON.stringify(el));
640
  variant_option_display = '';
641
 
642
  //if we have weight and style then "compose" them into something standard
643
+ if ( !_.isUndefined(el['font-weight']) ) {
644
  variant_option_display += el['font-weight'];
645
  }
646
 
647
+ if ( _.isString(el['font-style']) && $.inArray(el['font-style'].toLowerCase(), ["normal", "regular"]) < 0 ) { //this comparison means it hasn't been found
648
  variant_option_display += el['font-style'];
649
  }
650
  }
654
  });
655
  }
656
 
657
+ if ( !_.isUndefined($font_weight) ) {
658
+ $font_weight.html(variants_options);
659
  // if there is no weight or just 1 we hide the weight select ... cuz is useless
660
+ if ( $(font_select).data('load_all_weights') === true || count_weights <= 1 ) {
661
+ $font_weight.parent().css('display', 'none');
662
  } else {
663
+ $font_weight.parent().css('display', 'inline-block');
664
  }
665
  }
666
+ } else if ( !_.isUndefined($font_weight) ) {
667
+ $font_weight.parent().css('display', 'none');
668
  }
669
 
670
  // make the subsets selector
671
+ if ( !_.isUndefined(subsets) && !_.isNull(subsets) && !_.isEmpty(subsets) ) {
672
 
673
  value_to_add['subsets'] = subsets;
674
  // when a font is selected force the first subset to load
675
  value_to_add['selected_subsets'] = {0: subsets[0]};
676
  var subsets_options = '',
677
  count_subsets = 0;
678
+ $.each(subsets, function ( key, el ) {
679
  var is_selected = '';
680
+ if ( _.isObject(current_val.selected_subsets) && inObject(el, current_val.selected_subsets) ) {
681
  is_selected = ' selected="selected"';
682
  }
683
 
684
  subsets_options += '<option value="' + el + '"' + is_selected + '>' + el + '</option>';
685
  count_subsets++;
686
+ });
687
 
688
+ if ( !_.isUndefined($font_subsets) ) {
689
+ $font_subsets.html(subsets_options);
690
 
691
  // if there is no subset or just 1 we hide the subsets select ... cuz is useless
692
  if ( count_subsets <= 1 ) {
693
+ $font_subsets.parent().css('display', 'none');
694
  } else {
695
+ $font_subsets.parent().css('display', 'inline-block');
696
  }
697
  }
698
+ } else if ( !_.isUndefined($font_subsets) ) {
699
+ $font_subsets.parent().css('display', 'none');
700
  }
701
 
702
+ $input.val(encodeURIComponent(JSON.stringify(value_to_add)));
703
  }
704
  };
705
 
709
  * @param obj
710
  * @returns {boolean}
711
  */
712
+ var inObject = function ( value, obj ) {
713
  for ( var k in obj ) {
714
+ if ( !obj.hasOwnProperty(k) ) continue;
715
+ if ( _.isEqual(obj[k], value) ) {
716
  return true;
717
  }
718
  }
719
  return false;
720
  };
721
 
722
+ var maybeJsonParse = function ( value ) {
723
  var parsed;
724
 
725
  //try and parse it, with decodeURIComponent
726
  try {
727
+ parsed = JSON.parse(decodeURIComponent(value));
728
  } catch ( e ) {
729
 
730
  // in case of an error, treat is as a string
734
  return parsed;
735
  };
736
 
737
+ var customifyBackgroundJsControl = (function () {
738
  "use strict";
739
 
740
  var api = wp.customize;
741
 
742
  function init() {
743
  // Remove the image button
744
+ $('.customize-control-custom_background .remove-image, .customize-control-custom_background .remove-file').unbind('click').on('click', function ( e ) {
745
+ removeImage($(this).parents('.customize-control-custom_background:first'));
746
+ preview($(this));
747
  return false;
748
+ });
749
 
750
  // Upload media button
751
+ $('.customize-control-custom_background .background_upload_button').unbind().on('click', function ( event ) {
752
+ addImage(event, $(this).parents('.customize-control-custom_background:first'));
753
+ });
754
 
755
+ $('.customify_background_select').on('change', function () {
756
+ preview($(this));
757
+ });
758
  }
759
 
760
  // Add a file via the wp.media function
763
  event.preventDefault();
764
 
765
  var frame;
766
+ var jQueryel = jQuery(this);
767
 
768
  // If the media frame already exists, reopen it.
769
  if ( frame ) {
772
  }
773
 
774
  // Create the media frame.
775
+ frame = wp.media({
776
  multiple: false,
777
  library: {
778
  //type: 'image' //Only allow images
779
  },
780
  // Set the title of the modal.
781
+ title: jQueryel.data('choose'),
782
 
783
  // Customize the submit button.
784
  button: {
785
  // Set the text of the button.
786
+ text: jQueryel.data('update')
787
  // Tell the button not to close the modal, since we're
788
  // going to refresh the page when the image is selected.
789
  }
790
+ });
791
 
792
  // When an image is selected, run a callback.
793
+ frame.on('select', function () {
794
  // Grab the selected attachment.
795
+ var attachment = frame.state().get('selection').first();
796
  frame.close();
797
 
798
  if ( attachment.attributes.type !== "image" ) {
799
  return;
800
  }
801
 
802
+ selector.find('.upload').attr('value', attachment.attributes.url);
803
+ selector.find('.upload-id').attr('value', attachment.attributes.id);
804
+ selector.find('.upload-height').attr('value', attachment.attributes.height);
805
+ selector.find('.upload-width').attr('value', attachment.attributes.width);
806
 
807
  var thumbSrc = attachment.attributes.url;
808
+ if ( !_.isUndefined(attachment.attributes.sizes) && !_.isUndefined(attachment.attributes.sizes.thumbnail) ) {
809
  thumbSrc = attachment.attributes.sizes.thumbnail.url;
810
+ } else if ( !_.isUndefined(attachment.attributes.sizes) ) {
811
  var height = attachment.attributes.height;
812
  for ( var key in attachment.attributes.sizes ) {
813
  var object = attachment.attributes.sizes[key];
820
  thumbSrc = attachment.attributes.icon;
821
  }
822
 
823
+ selector.find('.customify_background_input.background-image').val(attachment.attributes.url);
824
 
825
+ if ( !selector.find('.upload').hasClass('noPreview') ) {
826
+ selector.find('.preview_screenshot').empty().hide().append('<img class="preview_image" src="' + thumbSrc + '">').slideDown('fast');
827
  }
828
  //selector.find('.media_upload_button').unbind();
829
+ selector.find('.remove-image').removeClass('hide');//show "Remove" button
830
+ selector.find('.customify_background_select').removeClass('hide');//show "Remove" button
831
 
832
+ preview(selector);
833
+ });
834
 
835
  // Finally, open the modal.
836
  frame.open();
839
  // Update the background preview
840
  function preview( selector ) {
841
 
842
+ var $parent = selector.parents('.customize-control-custom_background:first');
843
 
844
+ if ( selector.hasClass('customize-control-custom_background') ) {
845
  $parent = selector;
846
  }
847
 
848
  if ( $parent.length > 0 ) {
849
+ $parent = $($parent[0]);
850
  } else {
851
  return;
852
  }
853
 
854
+ var image_holder = $parent.find('.background-preview');
855
 
856
  if ( !image_holder ) { // No preview present
857
  return;
858
  }
859
 
860
+ var the_id = $parent.find('.button.background_upload_button').data('setting_id'),
861
+ this_setting = api.instance(the_id);
862
 
863
  var background_data = {};
864
 
865
+ $parent.find('.customify_background_select, .customify_background_input').each(function () {
866
+ var data = $(this).serializeArray();
867
 
868
  data = data[0];
869
+ if ( data && data.name.indexOf('[background-') != -1 ) {
870
 
871
+ background_data[$(this).data('select_name')] = data.value;
872
 
873
  //default_default[data.name] = data.value;
874
  //if (data.name == "background-image") {
877
  // css += data.name + ':' + data.value + ';';
878
  //}
879
  }
880
+ });
881
 
882
+ api.instance(the_id).set(background_data);
883
  //// Notify the customizer api about this change
884
+ api.trigger('change');
885
  api.previewer.refresh();
886
 
887
  //image_holder.attr('style', css).fadeIn();
889
 
890
  // Update the background preview
891
  function removeImage( parent ) {
892
+ var selector = parent.find('.upload_button_div');
893
  // This shouldn't have been run...
894
+ if ( !selector.find('.remove-image').addClass('hide') ) {
895
  return;
896
  }
897
 
898
+ selector.find('.remove-image').addClass('hide');//hide "Remove" button
899
+ parent.find('.customify_background_select').addClass('hide');
900
 
901
+ selector.find('.upload').val('');
902
+ selector.find('.upload-id').val('');
903
+ selector.find('.upload-height').val('');
904
+ selector.find('.upload-width').val('');
905
+ parent.find('.customify_background_input.background-image').val('');
906
 
907
+ var customizer_id = selector.find('.background_upload_button').data('setting_id'),
908
+ this_setting = api.control(customizer_id + '_control'),
909
  current_vals = this_setting.setting(),
910
+ screenshot = parent.find('.preview_screenshot'),
911
+ to_array = $.map(current_vals, function ( value, index ) {
912
  return [value];
913
+ });
914
 
915
  // Hide the screenshot
916
  screenshot.slideUp();
917
+ selector.find('.remove-file').unbind();
918
  to_array['background-image'] = '';
919
+ this_setting.setting(to_array);
920
  }
921
 
922
  return {
923
  init: init
924
  }
925
+ })(jQuery);
926
 
927
+ var getUrlVars = function ( name ) {
928
  var vars = [], hash;
929
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
930
  for ( var i = 0; i < hashes.length; i++ ) {
931
+ hash = hashes[i].split('=');
932
 
933
+ vars.push(hash[0]);
934
  vars[hash[0]] = hash[1];
935
  }
936
 
937
+ if ( !_.isUndefined(vars[name]) ) {
938
  return vars[name];
939
  }
940
  return false;
941
  };
942
 
943
+ var isJsonString = function ( str ) {
944
  try {
945
+ JSON.parse(str);
946
  } catch ( e ) {
947
  return false;
948
  }
949
  return true;
950
  };
951
+ });
952
+
953
+
954
+ var customifyFontSelect = (function () {
955
+ var wpapi = null,
956
+ fontSelector = '.customify_font_family',
957
+ selectPlacehoder = "Select a font family",
958
+ weightPlaceholder = "Select a font weight",
959
+ subsetPlaceholder = "Select a font subset";
960
+
961
+ function init( wpapi ) {
962
+
963
+ this.wpapi = wpapi;
964
+
965
+ setTimeout(function () {
966
+ $(fontSelector).select2({
967
+ placeholder: selectPlacehoder
968
+ }).on('change', function ( e ) {
969
+ var new_option = $(e.target).find('option:selected'),
970
+ wraper = $(e.target).closest('.font-options__wrapper'),
971
+ type = $(new_option).data('type');
972
+
973
+ update_weight_field(new_option, wraper);
974
+ update_subset_field(new_option, wraper);
975
+
976
+ // serialize stuff and refresh
977
+ update_font_value(wraper);
978
+
979
+ // find weight and subset select
980
+ // var api = wp.customize;
981
+ // api.previewer.refresh();
982
+ });
983
+ }, 333);
984
+
985
+ $('.customify_font_weight').each(function ( i, el ) {
986
+
987
+ var select2_args = {
988
+ debug: false
989
+ };
990
+
991
+ // all this fuss is for the case when the font doesn't come with variants from PHP, lile a theme_font
992
+ if ( this.options.length === 0 ) {
993
+ var wraper = $(el).closest('.font-options__wrapper'),
994
+ font = wraper.find('.customify_font_family'),
995
+ option = font[0].options[font[0].selectedIndex],
996
+ variants = maybeJsonParse( $(option).data('variants') ),
997
+ data = [],
998
+ selecter_variants = $(el).data('default') || null;
999
+
1000
+ if ( typeof variants === "undefined" ) {
1001
+ $(this).hide();
1002
+ return;
1003
+ }
1004
+
1005
+ $.each( variants, function ( index, weight ) {
1006
+ var this_value = {
1007
+ id: weight,
1008
+ text: weight
1009
+ };
1010
+ if ( selecter_variants !== null && weight == selecter_variants ) {
1011
+ this_value.selected = true;
1012
+ }
1013
+
1014
+ data.push(this_value);
1015
+ } );
1016
+
1017
+ if ( data !== [] ) {
1018
+ select2_args.data = data;
1019
+ }
1020
+ }
1021
+
1022
+ $(this).select2( select2_args )
1023
+ .on('change', function ( e ) {
1024
+ var wraper = $(e.target).closest('.font-options__wrapper');
1025
+ var current_value = update_font_value(wraper);
1026
+ // temporary just set the new value and refresh the previewr
1027
+ // we may update this with a live version sometime
1028
+ var value_holder = wraper.children('.customify_font_values');
1029
+ var setting_id = $(value_holder).data('customize-setting-link');
1030
+ var setting = wpapi(setting_id);
1031
+ setting.set(encodeValues(current_value));
1032
+ });
1033
+ });
1034
+
1035
+ $('.customify_font_subsets')
1036
+ .select2({
1037
+ placeholder: "Extra Subsets"
1038
+ })
1039
+ .on('change', function ( e ) {
1040
+ var wraper = $(e.target).closest('.font-options__wrapper');
1041
+ var current_value = update_font_value(wraper);
1042
+ // temporary just set the new value and refresh the previewr
1043
+ // we may update this with a live version sometime
1044
+ var value_holder = wraper.children('.customify_font_values');
1045
+ var setting_id = $(value_holder).data('customize-setting-link');
1046
+ var setting = wpapi(setting_id);
1047
+ setting.set(encodeValues(current_value));
1048
+ });
1049
+
1050
+ var rangers = $(fontSelector).parents('.font-options__wrapper').find('input[type=range]');
1051
+ var selects = $(fontSelector).parents('.font-options__wrapper').find('select');
1052
+
1053
+ if ( selects.length > 0 ) {
1054
+ selects.on('change', function ( e ) {
1055
+ var wraper = $(e.target).closest('.font-options__wrapper');
1056
+ var current_value = update_font_value(wraper);
1057
+ // temporary just set the new value and refresh the previewr
1058
+ // we may update this with a live version sometime
1059
+ var value_holder = wraper.children('.customify_font_values');
1060
+ var setting_id = $(value_holder).data('customize-setting-link');
1061
+ var setting = wpapi(setting_id);
1062
+ setting.set(encodeValues(current_value));
1063
+ });
1064
+ }
1065
+
1066
+ if ( rangers.length > 0 ) {
1067
+ rangers.on('mousemove', function ( e ) {
1068
+ var wraper = $(e.target).closest('.font-options__wrapper');
1069
+ var current_value = update_font_value(wraper);
1070
+ // temporary just set the new value and refresh the previewr
1071
+ // we may update this with a live version sometime
1072
+ var value_holder = wraper.children('.customify_font_values');
1073
+ var setting_id = $(value_holder).data('customize-setting-link');
1074
+ var setting = wpapi(setting_id);
1075
+ setting.set(encodeValues(current_value));
1076
+ // setting.trigger('change');
1077
+ wpapi.previewer.send( 'font-changed' );
1078
+ });
1079
+ }
1080
+ }
1081
+
1082
+ /**
1083
+ * This function updates the data in font weight selector from the givin <option> element
1084
+ *
1085
+ * @param new_option
1086
+ * @param wraper
1087
+ */
1088
+ function update_weight_field( option, wraper ) {
1089
+ var variants = $(option).data('variants'),
1090
+ font_weights = wraper.find('.customify_font_weight'),
1091
+ new_variants = [],
1092
+ type = $(option).data('type'),
1093
+ id = wraper.find('.customify_font_values').data('customizeSettingLink');
1094
+
1095
+ variants = maybeJsonParse(variants);
1096
+
1097
+ if ( customify_settings.settings[id].load_all_weights || typeof variants === "undefined" || Object.keys(variants).length < 2 ) {
1098
+ font_weights.parent().hide();
1099
+ } else {
1100
+ font_weights.parent().show();
1101
+ }
1102
 
1103
+ var selected = 1;
1104
+
1105
+ // we need to turn the data array into a specific form like [{id:"id", text:"Text"}]
1106
+ $.each(variants, function ( i, j ) {
1107
+ new_variants[i] = {
1108
+ 'id': j,
1109
+ 'text': j
1110
+ };
1111
+
1112
+ if ( selected === 3 ) {
1113
+ new_variants[i].selected = true;
1114
+ }
1115
+ selected++;
1116
+ });
1117
+
1118
+ // we need to clear the old values
1119
+ $(font_weights).select2().empty();
1120
+ $(font_weights).select2({
1121
+ data: new_variants
1122
+ }).on('change', function ( e ) {
1123
+ var select_element = e.target;
1124
+ var wraper = $(select_element).closest('.font-options__wrapper');
1125
+ update_font_value(wraper);
1126
+ });
1127
+ }
1128
+
1129
+ /**
1130
+ * This function updates the data in font subset selector from the givin <option> element
1131
+ * @param new_option
1132
+ * @param wraper
1133
+ */
1134
+ function update_subset_field( option, wraper ) {
1135
+ var subsets = $(option).data('subsets'),
1136
+ font_subsets = wraper.find('.customify_font_subsets'),
1137
+ new_subsets = [],
1138
+ type = $(option).data('type');
1139
+
1140
+ if ( type !== 'google' ) {
1141
+ font_subsets.parent().hide();
1142
+ return;
1143
+ }
1144
+
1145
+ subsets = maybeJsonParse(subsets);
1146
+
1147
+ if ( Object.keys(subsets).length < 2 ) {
1148
+ font_subsets.parent().hide();
1149
+ } else {
1150
+ font_subsets.parent().show();
1151
+ }
1152
+
1153
+ // we need to turn the data array into a specific form like [{id:"id", text:"Text"}]
1154
+ $.each(subsets, function ( i, j ) {
1155
+ new_subsets[i] = {
1156
+ 'id': j,
1157
+ 'text': j
1158
+ }
1159
+ });
1160
+
1161
+ // we need to clear the old values
1162
+ $(font_subsets).select2().empty();
1163
+ $(font_subsets).select2({
1164
+ data: new_subsets
1165
+ }).on('change', function ( e ) {
1166
+ var select_element = e.target;
1167
+ var wraper = $(select_element).closest('.font-options__wrapper');
1168
+ update_font_value(wraper);
1169
+ });
1170
+ }
1171
+
1172
+ /**
1173
+ * This function is a custom value serializer for our entire font field
1174
+ * It collects values and saves them (encoded) into the `.customify_font_values` input's value
1175
+ */
1176
+ function update_font_value( wraper ) {
1177
+ var element = $(wraper).find('.font-options__wrapper'),
1178
+ options_list = $(wraper).find('.font-options__options-list'),
1179
+ inputs = options_list.find('select, input'),
1180
+ value_holder = wraper.children('.customify_font_values'),
1181
+ new_vals = {};
1182
+
1183
+ inputs.each(function ( key, el ) {
1184
+ var field = $(el).data('field'),
1185
+ value = $(el).val();
1186
+
1187
+ if ( field === 'font_family' ) {
1188
+ // the font family also holds the type
1189
+ var selected_opt = $(el.options[el.selectedIndex]),
1190
+ type = selected_opt.data('type'),
1191
+ subsets = selected_opt.data('subsets'),
1192
+ variants = selected_opt.data('variants');
1193
+
1194
+ if ( typeof type !== "undefined") {
1195
+ new_vals['type'] = type;
1196
+ if ( type === 'theme_font' ) {
1197
+ new_vals['src'] = selected_opt.data('src');
1198
+ }
1199
+ }
1200
+
1201
+ if ( typeof variants !== "undefined") {
1202
+ new_vals['variants'] = maybeJsonParse(variants);
1203
+ }
1204
+
1205
+ if ( typeof subsets !== "subsets") {
1206
+ new_vals['subsets'] = maybeJsonParse(subsets);
1207
+ }
1208
+ }
1209
+
1210
+
1211
+ if ( typeof field !== "undefined" && typeof value !== "undefined" && value !== "" ) {
1212
+ new_vals[field] = value;
1213
+ }
1214
+ });
1215
+
1216
+ value_holder.val(encodeValues(new_vals));
1217
+
1218
+ return new_vals;
1219
+ }
1220
+
1221
+ var maybeJsonParse = function ( value ) {
1222
+ var parsed;
1223
+
1224
+ //try and parse it, with decodeURIComponent
1225
+ try {
1226
+ parsed = JSON.parse(decodeURIComponent(value));
1227
+ } catch ( e ) {
1228
+
1229
+ // in case of an error, treat is as a string
1230
+ parsed = value;
1231
+ }
1232
+
1233
+ return parsed;
1234
+ };
1235
+
1236
+ function encodeValues( obj ) {
1237
+ return encodeURIComponent(JSON.stringify(obj));
1238
+ }
1239
+
1240
+ return {
1241
+ init: init,
1242
+ update_font_value: update_font_value
1243
+ };
1244
+ })();
1245
+
1246
+
1247
+ var Queue = function () {
1248
  var lastPromise = null;
1249
  var queueDeferred = null;
1250
  var methodDeferred = null;
1251
 
1252
+ this.add_steps = function ( key, steps, args ) {
1253
  var self = this;
1254
  this.methodDeferred = $.Deferred();
1255
  this.queueDeferred = this.setup();
1256
 
1257
+ $.each(steps, function ( i, step ) {
1258
+ self.queue(key, step);
1259
+ });
1260
  };
1261
 
1262
+ this.process_remote_step = function ( key, data, step ) {
1263
  var self = this;
1264
 
1265
+ if ( _.isUndefined(data) || _.isNull(data) ) {
1266
  return false;
1267
  }
1268
 
1269
  var new_step = step;
1270
+ $.each(data, function ( i, k ) {
1271
+ debugger;
1272
  // prepare data for new requests
1273
  new_step.recall_data = k.data;
1274
  new_step.recall_type = k.type;
1275
  new_step.type = 'recall';
1276
 
1277
+ self.queue(key, new_step, k.id);
1278
+ });
1279
  };
1280
 
1281
+ this.log_action = function ( action, key, msg ) {
1282
  if ( action === 'start' ) {
1283
+ $('.wpGrade-import-results').show();
1284
+ $('.wpGrade-import-results').append('<span class="import_step_note imports_step_' + key + '" ><span class="step_info" data-balloon="Working on it" data-balloon-pos="up"></span>Importing ' + key + '</span>');
1285
  } else if ( action === 'end' ) {
1286
  var $notice = $('.imports_step_' + key + ' .step_info');
1287
 
1288
+ if ( $notice.length > 0 || msg !== "undefined" ) {
1289
  $notice.attr('data-balloon', msg);
1290
  $notice.addClass('success');
1291
  } else {
1295
  }
1296
  };
1297
 
1298
+ this.queue = function ( key, data, step_key ) {
1299
  var self = this;
1300
+ if ( !_.isUndefined(step_key) ) {
1301
+ this.log_action('start', step_key);
1302
  }
1303
 
1304
  // execute next queue method
1305
+ this.queueDeferred.done(this.request(key, data, step_key));
1306
  lastPromise = self.methodDeferred.promise();
1307
  };
1308
 
1309
+ this.request = function ( key, step, step_key ) {
1310
  var self = this;
1311
  // call actual method and wrap output in deferred
1312
  //setTimeout( function() {
1317
  option_key: key
1318
  };
1319
 
1320
+ if ( !_.isUndefined(step.recall_data) ) {
1321
  data_args.recall_data = step.recall_data;
1322
  }
1323
 
1324
+ if ( !_.isUndefined(step.recall_type) ) {
1325
  data_args.recall_type = step.recall_type;
1326
  }
1327
 
1328
+ $.ajax({
1329
  url: customify_settings.import_rest_url + 'customify/1.0/import',
1330
  method: 'POST',
1331
+ beforeSend: function ( xhr ) {
1332
+ xhr.setRequestHeader('X-WP-Nonce', WP_API_Settings.nonce);
1333
  },
1334
  dataType: 'json',
1335
  contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
1336
  data: data_args
1337
+ }).done(function ( response ) {
1338
+ if ( !_.isUndefined(response.success) && response.success ) {
1339
  var results = response.data;
1340
  if ( step.type === 'remote' ) {
1341
+ self.process_remote_step(key, results, step);
1342
  }
1343
  }
1344
 
1345
+ if ( !_.isUndefined(step_key) && !_.isUndefined(response.message) ) {
1346
+ self.log_action('end', step_key, response.message);
1347
  }
1348
+ });
1349
 
1350
  self.methodDeferred.resolve();
1351
  //}, 3450 );
1352
  };
1353
 
1354
+ this.setup = function () {
1355
  var self = this;
1356
 
1357
  self.queueDeferred = $.Deferred();
1358
 
1359
  // when the previous method returns, resolve this one
1360
+ $.when(lastPromise).always(function () {
1361
  self.queueDeferred.resolve();
1362
+ });
1363
 
1364
  return self.queueDeferred.promise();
1365
  }
1366
  };
1367
 
1368
+ })(jQuery, window);
js/customizer_preview.js CHANGED
@@ -29,6 +29,7 @@
29
  properties[property_config.property] = property_config.selector;
30
  if ( typeof property_config.callback_filter !== "undefined" ) {
31
  properties['callback'] = property_config.callback_filter;
 
32
  }
33
 
34
  var css_update_args = {
@@ -47,7 +48,6 @@
47
  });
48
  });
49
  } else if ( typeof el.live === "object" && el.live.length > 0 ) {
50
-
51
  // if the live parameter is an object it means that is a list of css classes
52
  // these classes should be affected by the change of the text fields
53
  var field_class = el.live.join();
@@ -69,5 +69,21 @@
69
  $('#customify_css_editor_output' ).text(new_text);
70
  });
71
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  });
73
  })(jQuery, window);
29
  properties[property_config.property] = property_config.selector;
30
  if ( typeof property_config.callback_filter !== "undefined" ) {
31
  properties['callback'] = property_config.callback_filter;
32
+ // console.log(property_config);
33
  }
34
 
35
  var css_update_args = {
48
  });
49
  });
50
  } else if ( typeof el.live === "object" && el.live.length > 0 ) {
 
51
  // if the live parameter is an object it means that is a list of css classes
52
  // these classes should be affected by the change of the text fields
53
  var field_class = el.live.join();
69
  $('#customify_css_editor_output' ).text(new_text);
70
  });
71
  });
72
+
73
+
74
+ var maybeJsonParse = function ( value ) {
75
+ var parsed;
76
+
77
+ //try and parse it, with decodeURIComponent
78
+ try {
79
+ parsed = JSON.parse(decodeURIComponent(value));
80
+ } catch ( e ) {
81
+
82
+ // in case of an error, treat is as a string
83
+ parsed = value;
84
+ }
85
+
86
+ return parsed;
87
+ };
88
  });
89
  })(jQuery, window);
js/font_selector_preview.js ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($, exports){
2
+
3
+ $(document).ready(function(){
4
+
5
+ if ( typeof WebFont === "undefined" ) {
6
+ var tk = document.createElement( 'script' );
7
+ tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
8
+ tk.type = 'text/javascript';
9
+ var s = document.getElementsByTagName( 'script' )[0];
10
+ s.parentNode.insertBefore( tk, s );
11
+ }
12
+
13
+ var api = parent.wp.customize,
14
+ wp_settings = api.settings.settings;
15
+
16
+ $.each( customify_settings.settings, function( key, el){
17
+
18
+ if ( el.type === "font" ) {
19
+ var sliced_id = key.slice(0, -1);
20
+ sliced_id = sliced_id.replace(customify_settings.options_name + '[', '');
21
+
22
+ api( key, function (setting) {
23
+ setting.bind(function (to) {
24
+ var $values = maybeJsonParse( to );
25
+ if ( typeof $values.font_family !== "undefined" ) {
26
+ maybeLoadFontFamily($values);
27
+ }
28
+
29
+ var vls = get_CSS_values( this.id, $values );
30
+ var CSS = get_CSS_code( this.id, vls );
31
+
32
+ var field_style = $('#customify_font_output_for_' + sliced_id);
33
+
34
+ field_style.html( CSS );
35
+ });
36
+ });
37
+ }
38
+ });
39
+
40
+
41
+ var get_CSS_values = function ( ID, $values ) {
42
+
43
+ var store = {};
44
+
45
+ if ( typeof $values.font_family !== "undefined" ) {
46
+ store['font-family'] = $values.font_family;
47
+ }
48
+
49
+ if ( typeof $values.selected_variants !== "undefined" ) {
50
+
51
+ var variants = null;
52
+
53
+ if ( typeof $values.selected_variants !== "undefined" && $values.selected_variants !== null ) {
54
+ variants = $values.selected_variants;
55
+ } else if ( typeof $values.variants !== "undefined" && typeof $values.variants[0] !== "undefined" ) {
56
+ variants = $values.variants[0];
57
+ }
58
+
59
+ // google fonts also have the italic string inside, split that
60
+ if ( variants !== null && variants.indexOf('italic') !== -1 ) {
61
+ store['font-style'] = 'italic';
62
+ variants.replace('italic', '');
63
+ }
64
+
65
+ if ( variants !== "" ) {
66
+ store['font-weight'] = variants;
67
+ }
68
+ }
69
+
70
+ if ( typeof $values.font_size !== "undefined" ) {
71
+ store['font-size'] = $values.font_size + get_field_unit( ID, 'font-size' );
72
+ }
73
+
74
+ if ( typeof $values.letter_spacing !== "undefined" ) {
75
+ store['letter-spacing'] = $values.letter_spacing + get_field_unit( ID, 'letter-spacing' );
76
+ }
77
+
78
+ if ( typeof $values.line_height !== "undefined" ) {
79
+ store['line-height'] = $values.line_height + get_field_unit( ID, 'line-height' );
80
+ }
81
+
82
+ if ( typeof $values.text_align !== "undefined" ) {
83
+ store['text-align'] = $values.text_align;
84
+ }
85
+
86
+ if ( typeof $values.text_transform !== "undefined" ) {
87
+ store['text-transform'] = $values.text_transform;
88
+ }
89
+ if ( typeof $values.text_decoration !== "undefined" ) {
90
+ store['text-decoration'] = $values.text_decoration;
91
+ }
92
+
93
+ return store;
94
+ };
95
+
96
+ var get_CSS_code = function ( ID, $values ) {
97
+
98
+ var field = customify_settings.settings[ID];
99
+ var output = '';
100
+ if ( typeof field.callback !== "undefined" && typeof window[field.callback] === "function" ) {
101
+ output = window[field.callback]( $values, field );
102
+ } else {
103
+ output = field.selector + "{\n";
104
+ $.each($values,function ( k,v ) {
105
+ output += k + ': ' + v + ";\n";
106
+ })
107
+ output += "}\n";
108
+ }
109
+
110
+ return output;
111
+ };
112
+
113
+ var get_field_unit = function ( ID, field ) {
114
+ var unit = 'px';
115
+ if ( typeof customify_settings.settings[ID] === "undefined" || typeof customify_settings.settings[ID].fields[field] === "undefined") {
116
+ return unit;
117
+ }
118
+
119
+ if ( typeof customify_settings.settings[ID].fields[field].unit !=="undefined" ) {
120
+ return customify_settings.settings[ID].fields[field].unit;
121
+ } else if( typeof customify_settings.settings[ID].fields[field][3] !== "undefined" ) {
122
+ // in case of an associative array
123
+ return customify_settings.settings[ID].fields[field][3];
124
+ }
125
+ }
126
+
127
+ var maybeLoadFontFamily = function( font ) {
128
+
129
+ if ( typeof WebFont === "undefined" ) {
130
+ var tk = document.createElement( 'script' );
131
+ tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
132
+ tk.type = 'text/javascript';
133
+ var s = document.getElementsByTagName( 'script' )[0];
134
+ s.parentNode.insertBefore( tk, s );
135
+ }
136
+
137
+ if ( font.type === 'theme_font' ) {
138
+ WebFont.load( {
139
+ custom: {
140
+ families: [ font.font_family ],
141
+ urls: [ font.src ]
142
+ }
143
+ });
144
+ } else if ( font.type === 'google' ) {
145
+ var family = font.font_family,
146
+ variants = null,
147
+ subsets = null;
148
+
149
+ if ( typeof font.variants !== "undefined" ) {
150
+ variants = maybeJsonParse( font.variants );
151
+
152
+ family = family + ':';
153
+
154
+ $.each(variants,function ( k,v ) {
155
+ family = family + v;
156
+ if ( Object.keys(variants).length > (parseInt(k) + 1) ) {
157
+ family = family + ',';
158
+ }
159
+ });
160
+ }
161
+
162
+ if ( typeof font.selected_subsets !== "undefined" ) {
163
+ subsets = maybeJsonParse( font.selected_subsets );
164
+
165
+ family = family + ':';
166
+
167
+ $.each(subsets,function ( k,v ) {
168
+ family = family + v;
169
+ if ( Object.keys(subsets).length > (parseInt(k) + 1) ) {
170
+ family = family + ',';
171
+ }
172
+ });
173
+ }
174
+
175
+ WebFont.load( {
176
+ google: {families: [family]},
177
+ classes: false,
178
+ events: false
179
+ } );
180
+ } else {
181
+ // else what?
182
+ }
183
+ }
184
+
185
+ var maybeJsonParse = function ( value ) {
186
+ var parsed;
187
+
188
+ //try and parse it, with decodeURIComponent
189
+ try {
190
+ parsed = JSON.parse(decodeURIComponent(value));
191
+ } catch ( e ) {
192
+
193
+ // in case of an error, treat is as a string
194
+ parsed = value;
195
+ }
196
+
197
+ return parsed;
198
+ };
199
+
200
+ });
201
+ })(jQuery, window);
js/live_css_editor.js CHANGED
@@ -4,6 +4,9 @@
4
 
5
  $(document).ready(function(){
6
  var api = wp.customize;
 
 
 
7
  var css_editor = ace.edit("css_editor");
8
  css_editor.$blockScrolling = Infinity;
9
 
4
 
5
  $(document).ready(function(){
6
  var api = wp.customize;
7
+ if ( $('#css_editor').length < 1 ) {
8
+ return ;
9
+ }
10
  var css_editor = ace.edit("css_editor");
11
  css_editor.$blockScrolling = Infinity;
12
 
js/select2/License.md DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2012-2015 Kevin Brown, Igor Vaynberg, and Select2 contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/select2/css/select2.css ADDED
@@ -0,0 +1,484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .select2-container {
2
+ box-sizing: border-box;
3
+ display: inline-block;
4
+ margin: 0;
5
+ position: relative;
6
+ vertical-align: middle; }
7
+ .select2-container .select2-selection--single {
8
+ box-sizing: border-box;
9
+ cursor: pointer;
10
+ display: block;
11
+ height: 28px;
12
+ user-select: none;
13
+ -webkit-user-select: none; }
14
+ .select2-container .select2-selection--single .select2-selection__rendered {
15
+ display: block;
16
+ padding-left: 8px;
17
+ padding-right: 20px;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap; }
21
+ .select2-container .select2-selection--single .select2-selection__clear {
22
+ position: relative; }
23
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
24
+ padding-right: 8px;
25
+ padding-left: 20px; }
26
+ .select2-container .select2-selection--multiple {
27
+ box-sizing: border-box;
28
+ cursor: pointer;
29
+ display: block;
30
+ min-height: 32px;
31
+ user-select: none;
32
+ -webkit-user-select: none; }
33
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
34
+ display: inline-block;
35
+ overflow: hidden;
36
+ padding-left: 8px;
37
+ text-overflow: ellipsis;
38
+ white-space: nowrap; }
39
+ .select2-container .select2-search--inline {
40
+ float: left; }
41
+ .select2-container .select2-search--inline .select2-search__field {
42
+ box-sizing: border-box;
43
+ border: none;
44
+ font-size: 100%;
45
+ margin-top: 5px;
46
+ padding: 0; }
47
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
48
+ -webkit-appearance: none; }
49
+
50
+ .select2-dropdown {
51
+ background-color: white;
52
+ border: 1px solid #aaa;
53
+ border-radius: 4px;
54
+ box-sizing: border-box;
55
+ display: block;
56
+ position: absolute;
57
+ left: -100000px;
58
+ width: 100%;
59
+ z-index: 1051; }
60
+
61
+ .select2-results {
62
+ display: block; }
63
+
64
+ .select2-results__options {
65
+ list-style: none;
66
+ margin: 0;
67
+ padding: 0; }
68
+
69
+ .select2-results__option {
70
+ padding: 6px;
71
+ user-select: none;
72
+ -webkit-user-select: none; }
73
+ .select2-results__option[aria-selected] {
74
+ cursor: pointer; }
75
+
76
+ .select2-container--open .select2-dropdown {
77
+ left: 0; }
78
+
79
+ .select2-container--open .select2-dropdown--above {
80
+ border-bottom: none;
81
+ border-bottom-left-radius: 0;
82
+ border-bottom-right-radius: 0; }
83
+
84
+ .select2-container--open .select2-dropdown--below {
85
+ border-top: none;
86
+ border-top-left-radius: 0;
87
+ border-top-right-radius: 0; }
88
+
89
+ .select2-search--dropdown {
90
+ display: block;
91
+ padding: 4px; }
92
+ .select2-search--dropdown .select2-search__field {
93
+ padding: 4px;
94
+ width: 100%;
95
+ box-sizing: border-box; }
96
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
97
+ -webkit-appearance: none; }
98
+ .select2-search--dropdown.select2-search--hide {
99
+ display: none; }
100
+
101
+ .select2-close-mask {
102
+ border: 0;
103
+ margin: 0;
104
+ padding: 0;
105
+ display: block;
106
+ position: fixed;
107
+ left: 0;
108
+ top: 0;
109
+ min-height: 100%;
110
+ min-width: 100%;
111
+ height: auto;
112
+ width: auto;
113
+ opacity: 0;
114
+ z-index: 99;
115
+ background-color: #fff;
116
+ filter: alpha(opacity=0); }
117
+
118
+ .select2-hidden-accessible {
119
+ border: 0 !important;
120
+ clip: rect(0 0 0 0) !important;
121
+ height: 1px !important;
122
+ margin: -1px !important;
123
+ overflow: hidden !important;
124
+ padding: 0 !important;
125
+ position: absolute !important;
126
+ width: 1px !important; }
127
+
128
+ .select2-container--default .select2-selection--single {
129
+ background-color: #fff;
130
+ border: 1px solid #aaa;
131
+ border-radius: 4px; }
132
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
133
+ color: #444;
134
+ line-height: 28px; }
135
+ .select2-container--default .select2-selection--single .select2-selection__clear {
136
+ cursor: pointer;
137
+ float: right;
138
+ font-weight: bold; }
139
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
140
+ color: #999; }
141
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
142
+ height: 26px;
143
+ position: absolute;
144
+ top: 1px;
145
+ right: 1px;
146
+ width: 20px; }
147
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
148
+ border-color: #888 transparent transparent transparent;
149
+ border-style: solid;
150
+ border-width: 5px 4px 0 4px;
151
+ height: 0;
152
+ left: 50%;
153
+ margin-left: -4px;
154
+ margin-top: -2px;
155
+ position: absolute;
156
+ top: 50%;
157
+ width: 0; }
158
+
159
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
160
+ float: left; }
161
+
162
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
163
+ left: 1px;
164
+ right: auto; }
165
+
166
+ .select2-container--default.select2-container--disabled .select2-selection--single {
167
+ background-color: #eee;
168
+ cursor: default; }
169
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
170
+ display: none; }
171
+
172
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
173
+ border-color: transparent transparent #888 transparent;
174
+ border-width: 0 4px 5px 4px; }
175
+
176
+ .select2-container--default .select2-selection--multiple {
177
+ background-color: white;
178
+ border: 1px solid #aaa;
179
+ border-radius: 4px;
180
+ cursor: text; }
181
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
182
+ box-sizing: border-box;
183
+ list-style: none;
184
+ margin: 0;
185
+ padding: 0 5px;
186
+ width: 100%; }
187
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
188
+ list-style: none; }
189
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
190
+ color: #999;
191
+ margin-top: 5px;
192
+ float: left; }
193
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
194
+ cursor: pointer;
195
+ float: right;
196
+ font-weight: bold;
197
+ margin-top: 5px;
198
+ margin-right: 10px; }
199
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
200
+ background-color: #e4e4e4;
201
+ border: 1px solid #aaa;
202
+ border-radius: 4px;
203
+ cursor: default;
204
+ float: left;
205
+ margin-right: 5px;
206
+ margin-top: 5px;
207
+ padding: 0 5px; }
208
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
209
+ color: #999;
210
+ cursor: pointer;
211
+ display: inline-block;
212
+ font-weight: bold;
213
+ margin-right: 2px; }
214
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
215
+ color: #333; }
216
+
217
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
218
+ float: right; }
219
+
220
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
221
+ margin-left: 5px;
222
+ margin-right: auto; }
223
+
224
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
225
+ margin-left: 2px;
226
+ margin-right: auto; }
227
+
228
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
229
+ border: solid black 1px;
230
+ outline: 0; }
231
+
232
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
233
+ background-color: #eee;
234
+ cursor: default; }
235
+
236
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
237
+ display: none; }
238
+
239
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
240
+ border-top-left-radius: 0;
241
+ border-top-right-radius: 0; }
242
+
243
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
244
+ border-bottom-left-radius: 0;
245
+ border-bottom-right-radius: 0; }
246
+
247
+ .select2-container--default .select2-search--dropdown .select2-search__field {
248
+ border: 1px solid #aaa; }
249
+
250
+ .select2-container--default .select2-search--inline .select2-search__field {
251
+ background: transparent;
252
+ border: none;
253
+ outline: 0;
254
+ box-shadow: none;
255
+ -webkit-appearance: textfield; }
256
+
257
+ .select2-container--default .select2-results > .select2-results__options {
258
+ max-height: 200px;
259
+ overflow-y: auto; }
260
+
261
+ .select2-container--default .select2-results__option[role=group] {
262
+ padding: 0; }
263
+
264
+ .select2-container--default .select2-results__option[aria-disabled=true] {
265
+ color: #999; }
266
+
267
+ .select2-container--default .select2-results__option[aria-selected=true] {
268
+ background-color: #ddd; }
269
+
270
+ .select2-container--default .select2-results__option .select2-results__option {
271
+ padding-left: 1em; }
272
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
273
+ padding-left: 0; }
274
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
275
+ margin-left: -1em;
276
+ padding-left: 2em; }
277
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
278
+ margin-left: -2em;
279
+ padding-left: 3em; }
280
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
281
+ margin-left: -3em;
282
+ padding-left: 4em; }
283
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
284
+ margin-left: -4em;
285
+ padding-left: 5em; }
286
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
287
+ margin-left: -5em;
288
+ padding-left: 6em; }
289
+
290
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {
291
+ background-color: #5897fb;
292
+ color: white; }
293
+
294
+ .select2-container--default .select2-results__group {
295
+ cursor: default;
296
+ display: block;
297
+ padding: 6px; }
298
+
299
+ .select2-container--classic .select2-selection--single {
300
+ background-color: #f7f7f7;
301
+ border: 1px solid #aaa;
302
+ border-radius: 4px;
303
+ outline: 0;
304
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
305
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
306
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
307
+ background-repeat: repeat-x;
308
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
309
+ .select2-container--classic .select2-selection--single:focus {
310
+ border: 1px solid #5897fb; }
311
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
312
+ color: #444;
313
+ line-height: 28px; }
314
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
315
+ cursor: pointer;
316
+ float: right;
317
+ font-weight: bold;
318
+ margin-right: 10px; }
319
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
320
+ color: #999; }
321
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
322
+ background-color: #ddd;
323
+ border: none;
324
+ border-left: 1px solid #aaa;
325
+ border-top-right-radius: 4px;
326
+ border-bottom-right-radius: 4px;
327
+ height: 26px;
328
+ position: absolute;
329
+ top: 1px;
330
+ right: 1px;
331
+ width: 20px;
332
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
334
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
335
+ background-repeat: repeat-x;
336
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
337
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
338
+ border-color: #888 transparent transparent transparent;
339
+ border-style: solid;
340
+ border-width: 5px 4px 0 4px;
341
+ height: 0;
342
+ left: 50%;
343
+ margin-left: -4px;
344
+ margin-top: -2px;
345
+ position: absolute;
346
+ top: 50%;
347
+ width: 0; }
348
+
349
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
350
+ float: left; }
351
+
352
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
353
+ border: none;
354
+ border-right: 1px solid #aaa;
355
+ border-radius: 0;
356
+ border-top-left-radius: 4px;
357
+ border-bottom-left-radius: 4px;
358
+ left: 1px;
359
+ right: auto; }
360
+
361
+ .select2-container--classic.select2-container--open .select2-selection--single {
362
+ border: 1px solid #5897fb; }
363
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
364
+ background: transparent;
365
+ border: none; }
366
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
367
+ border-color: transparent transparent #888 transparent;
368
+ border-width: 0 4px 5px 4px; }
369
+
370
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
371
+ border-top: none;
372
+ border-top-left-radius: 0;
373
+ border-top-right-radius: 0;
374
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
375
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
376
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
377
+ background-repeat: repeat-x;
378
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
379
+
380
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
381
+ border-bottom: none;
382
+ border-bottom-left-radius: 0;
383
+ border-bottom-right-radius: 0;
384
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
385
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
386
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
387
+ background-repeat: repeat-x;
388
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
389
+
390
+ .select2-container--classic .select2-selection--multiple {
391
+ background-color: white;
392
+ border: 1px solid #aaa;
393
+ border-radius: 4px;
394
+ cursor: text;
395
+ outline: 0; }
396
+ .select2-container--classic .select2-selection--multiple:focus {
397
+ border: 1px solid #5897fb; }
398
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
399
+ list-style: none;
400
+ margin: 0;
401
+ padding: 0 5px; }
402
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
403
+ display: none; }
404
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
405
+ background-color: #e4e4e4;
406
+ border: 1px solid #aaa;
407
+ border-radius: 4px;
408
+ cursor: default;
409
+ float: left;
410
+ margin-right: 5px;
411
+ margin-top: 5px;
412
+ padding: 0 5px; }
413
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
414
+ color: #888;
415
+ cursor: pointer;
416
+ display: inline-block;
417
+ font-weight: bold;
418
+ margin-right: 2px; }
419
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
420
+ color: #555; }
421
+
422
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
423
+ float: right; }
424
+
425
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
426
+ margin-left: 5px;
427
+ margin-right: auto; }
428
+
429
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
430
+ margin-left: 2px;
431
+ margin-right: auto; }
432
+
433
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
434
+ border: 1px solid #5897fb; }
435
+
436
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
437
+ border-top: none;
438
+ border-top-left-radius: 0;
439
+ border-top-right-radius: 0; }
440
+
441
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
442
+ border-bottom: none;
443
+ border-bottom-left-radius: 0;
444
+ border-bottom-right-radius: 0; }
445
+
446
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
447
+ border: 1px solid #aaa;
448
+ outline: 0; }
449
+
450
+ .select2-container--classic .select2-search--inline .select2-search__field {
451
+ outline: 0;
452
+ box-shadow: none; }
453
+
454
+ .select2-container--classic .select2-dropdown {
455
+ background-color: white;
456
+ border: 1px solid transparent; }
457
+
458
+ .select2-container--classic .select2-dropdown--above {
459
+ border-bottom: none; }
460
+
461
+ .select2-container--classic .select2-dropdown--below {
462
+ border-top: none; }
463
+
464
+ .select2-container--classic .select2-results > .select2-results__options {
465
+ max-height: 200px;
466
+ overflow-y: auto; }
467
+
468
+ .select2-container--classic .select2-results__option[role=group] {
469
+ padding: 0; }
470
+
471
+ .select2-container--classic .select2-results__option[aria-disabled=true] {
472
+ color: grey; }
473
+
474
+ .select2-container--classic .select2-results__option--highlighted[aria-selected] {
475
+ background-color: #3875d7;
476
+ color: white; }
477
+
478
+ .select2-container--classic .select2-results__group {
479
+ cursor: default;
480
+ display: block;
481
+ padding: 6px; }
482
+
483
+ .select2-container--classic.select2-container--open .select2-dropdown {
484
+ border-color: #5897fb; }
js/select2/css/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
js/select2/js/i18n/ar.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/az.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/bg.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ca.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/cs.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/da.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/de.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/el.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/en.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/es.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/et.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/eu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/fa.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/fi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/fr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/gl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/he.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/hi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/hr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/hu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/id.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/is.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/it.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ja.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/km.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ko.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/lt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/lv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/mk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ms.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/nb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/nl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/pl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/pt-BR.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/pt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ro.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/ru.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/sk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/sr-Cyrl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/sr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/sv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/th.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/tr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/uk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/vi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/zh-CN.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
js/select2/js/i18n/zh-TW.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
js/select2/js/select2.full.js ADDED
@@ -0,0 +1,6436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Select2 4.0.3
3
+ * https://select2.github.io
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/select2/select2/blob/master/LICENSE.md
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD. Register as an anonymous module.
11
+ define(['jquery'], factory);
12
+ } else if (typeof exports === 'object') {
13
+ // Node/CommonJS
14
+ factory(require('jquery'));
15
+ } else {
16
+ // Browser globals
17
+ factory(jQuery);
18
+ }
19
+ }(function (jQuery) {
20
+ // This is needed so we can catch the AMD loader configuration and use it
21
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
22
+ // returns the AMD loader references.
23
+ var S2 =
24
+ (function () {
25
+ // Restore the Select2 AMD loader so it can be used
26
+ // Needed mostly in the language files, where the loader is not inserted
27
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
28
+ var S2 = jQuery.fn.select2.amd;
29
+ }
30
+ var S2;(function () { if (!S2 || !S2.requirejs) {
31
+ if (!S2) { S2 = {}; } else { require = S2; }
32
+ /**
33
+ * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
34
+ * Available via the MIT or new BSD license.
35
+ * see: http://github.com/jrburke/almond for details
36
+ */
37
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
38
+ //be followed.
39
+ /*jslint sloppy: true */
40
+ /*global setTimeout: false */
41
+
42
+ var requirejs, require, define;
43
+ (function (undef) {
44
+ var main, req, makeMap, handlers,
45
+ defined = {},
46
+ waiting = {},
47
+ config = {},
48
+ defining = {},
49
+ hasOwn = Object.prototype.hasOwnProperty,
50
+ aps = [].slice,
51
+ jsSuffixRegExp = /\.js$/;
52
+
53
+ function hasProp(obj, prop) {
54
+ return hasOwn.call(obj, prop);
55
+ }
56
+
57
+ /**
58
+ * Given a relative module name, like ./something, normalize it to
59
+ * a real name that can be mapped to a path.
60
+ * @param {String} name the relative name
61
+ * @param {String} baseName a real name that the name arg is relative
62
+ * to.
63
+ * @returns {String} normalized name
64
+ */
65
+ function normalize(name, baseName) {
66
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
67
+ foundI, foundStarMap, starI, i, j, part,
68
+ baseParts = baseName && baseName.split("/"),
69
+ map = config.map,
70
+ starMap = (map && map['*']) || {};
71
+
72
+ //Adjust any relative paths.
73
+ if (name && name.charAt(0) === ".") {
74
+ //If have a base name, try to normalize against it,
75
+ //otherwise, assume it is a top-level require that will
76
+ //be relative to baseUrl in the end.
77
+ if (baseName) {
78
+ name = name.split('/');
79
+ lastIndex = name.length - 1;
80
+
81
+ // Node .js allowance:
82
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
83
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
84
+ }
85
+
86
+ //Lop off the last part of baseParts, so that . matches the
87
+ //"directory" and not name of the baseName's module. For instance,
88
+ //baseName of "one/two/three", maps to "one/two/three.js", but we
89
+ //want the directory, "one/two" for this normalization.
90
+ name = baseParts.slice(0, baseParts.length - 1).concat(name);
91
+
92
+ //start trimDots
93
+ for (i = 0; i < name.length; i += 1) {
94
+ part = name[i];
95
+ if (part === ".") {
96
+ name.splice(i, 1);
97
+ i -= 1;
98
+ } else if (part === "..") {
99
+ if (i === 1 && (name[2] === '..' || name[0] === '..')) {
100
+ //End of the line. Keep at least one non-dot
101
+ //path segment at the front so it can be mapped
102
+ //correctly to disk. Otherwise, there is likely
103
+ //no path mapping for a path starting with '..'.
104
+ //This can still fail, but catches the most reasonable
105
+ //uses of ..
106
+ break;
107
+ } else if (i > 0) {
108
+ name.splice(i - 1, 2);
109
+ i -= 2;
110
+ }
111
+ }
112
+ }
113
+ //end trimDots
114
+
115
+ name = name.join("/");
116
+ } else if (name.indexOf('./') === 0) {
117
+ // No baseName, so this is ID is resolved relative
118
+ // to baseUrl, pull off the leading dot.
119
+ name = name.substring(2);
120
+ }
121
+ }
122
+
123
+ //Apply map config if available.
124
+ if ((baseParts || starMap) && map) {
125
+ nameParts = name.split('/');
126
+
127
+ for (i = nameParts.length; i > 0; i -= 1) {
128
+ nameSegment = nameParts.slice(0, i).join("/");
129
+
130
+ if (baseParts) {
131
+ //Find the longest baseName segment match in the config.
132
+ //So, do joins on the biggest to smallest lengths of baseParts.
133
+ for (j = baseParts.length; j > 0; j -= 1) {
134
+ mapValue = map[baseParts.slice(0, j).join('/')];
135
+
136
+ //baseName segment has config, find if it has one for
137
+ //this name.
138
+ if (mapValue) {
139
+ mapValue = mapValue[nameSegment];
140
+ if (mapValue) {
141
+ //Match, update name to the new value.
142
+ foundMap = mapValue;
143
+ foundI = i;
144
+ break;
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ if (foundMap) {
151
+ break;
152
+ }
153
+
154
+ //Check for a star map match, but just hold on to it,
155
+ //if there is a shorter segment match later in a matching
156
+ //config, then favor over this star map.
157
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
158
+ foundStarMap = starMap[nameSegment];
159
+ starI = i;
160
+ }
161
+ }
162
+
163
+ if (!foundMap && foundStarMap) {
164
+ foundMap = foundStarMap;
165
+ foundI = starI;
166
+ }
167
+
168
+ if (foundMap) {
169
+ nameParts.splice(0, foundI, foundMap);
170
+ name = nameParts.join('/');
171
+ }
172
+ }
173
+
174
+ return name;
175
+ }
176
+
177
+ function makeRequire(relName, forceSync) {
178
+ return function () {
179
+ //A version of a require function that passes a moduleName
180
+ //value for items that may need to
181
+ //look up paths relative to the moduleName
182
+ var args = aps.call(arguments, 0);
183
+
184
+ //If first arg is not require('string'), and there is only
185
+ //one arg, it is the array form without a callback. Insert
186
+ //a null so that the following concat is correct.
187
+ if (typeof args[0] !== 'string' && args.length === 1) {
188
+ args.push(null);
189
+ }
190
+ return req.apply(undef, args.concat([relName, forceSync]));
191
+ };
192
+ }
193
+
194
+ function makeNormalize(relName) {
195
+ return function (name) {
196
+ return normalize(name, relName);
197
+ };
198
+ }
199
+
200
+ function makeLoad(depName) {
201
+ return function (value) {
202
+ defined[depName] = value;
203
+ };
204
+ }
205
+
206
+ function callDep(name) {
207
+ if (hasProp(waiting, name)) {
208
+ var args = waiting[name];
209
+ delete waiting[name];
210
+ defining[name] = true;
211
+ main.apply(undef, args);
212
+ }
213
+
214
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
215
+ throw new Error('No ' + name);
216
+ }
217
+ return defined[name];
218
+ }
219
+
220
+ //Turns a plugin!resource to [plugin, resource]
221
+ //with the plugin being undefined if the name
222
+ //did not have a plugin prefix.
223
+ function splitPrefix(name) {
224
+ var prefix,
225
+ index = name ? name.indexOf('!') : -1;
226
+ if (index > -1) {
227
+ prefix = name.substring(0, index);
228
+ name = name.substring(index + 1, name.length);
229
+ }
230
+ return [prefix, name];
231
+ }
232
+
233
+ /**
234
+ * Makes a name map, normalizing the name, and using a plugin
235
+ * for normalization if necessary. Grabs a ref to plugin
236
+ * too, as an optimization.
237
+ */
238
+ makeMap = function (name, relName) {
239
+ var plugin,
240
+ parts = splitPrefix(name),
241
+ prefix = parts[0];
242
+
243
+ name = parts[1];
244
+
245
+ if (prefix) {
246
+ prefix = normalize(prefix, relName);
247
+ plugin = callDep(prefix);
248
+ }
249
+
250
+ //Normalize according
251
+ if (prefix) {
252
+ if (plugin && plugin.normalize) {
253
+ name = plugin.normalize(name, makeNormalize(relName));
254
+ } else {
255
+ name = normalize(name, relName);
256
+ }
257
+ } else {
258
+ name = normalize(name, relName);
259
+ parts = splitPrefix(name);
260
+ prefix = parts[0];
261
+ name = parts[1];
262
+ if (prefix) {
263
+ plugin = callDep(prefix);
264
+ }
265
+ }
266
+
267
+ //Using ridiculous property names for space reasons
268
+ return {
269
+ f: prefix ? prefix + '!' + name : name, //fullName
270
+ n: name,
271
+ pr: prefix,
272
+ p: plugin
273
+ };
274
+ };
275
+
276
+ function makeConfig(name) {
277
+ return function () {
278
+ return (config && config.config && config.config[name]) || {};
279
+ };
280
+ }
281
+
282
+ handlers = {
283
+ require: function (name) {
284
+ return makeRequire(name);
285
+ },
286
+ exports: function (name) {
287
+ var e = defined[name];
288
+ if (typeof e !== 'undefined') {
289
+ return e;
290
+ } else {
291
+ return (defined[name] = {});
292
+ }
293
+ },
294
+ module: function (name) {
295
+ return {
296
+ id: name,
297
+ uri: '',
298
+ exports: defined[name],
299
+ config: makeConfig(name)
300
+ };
301
+ }
302
+ };
303
+
304
+ main = function (name, deps, callback, relName) {
305
+ var cjsModule, depName, ret, map, i,
306
+ args = [],
307
+ callbackType = typeof callback,
308
+ usingExports;
309
+
310
+ //Use name if no relName
311
+ relName = relName || name;
312
+
313
+ //Call the callback to define the module, if necessary.
314
+ if (callbackType === 'undefined' || callbackType === 'function') {
315
+ //Pull out the defined dependencies and pass the ordered
316
+ //values to the callback.
317
+ //Default to [require, exports, module] if no deps
318
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
319
+ for (i = 0; i < deps.length; i += 1) {
320
+ map = makeMap(deps[i], relName);
321
+ depName = map.f;
322
+
323
+ //Fast path CommonJS standard dependencies.
324
+ if (depName === "require") {
325
+ args[i] = handlers.require(name);
326
+ } else if (depName === "exports") {
327
+ //CommonJS module spec 1.1
328
+ args[i] = handlers.exports(name);
329
+ usingExports = true;
330
+ } else if (depName === "module") {
331
+ //CommonJS module spec 1.1
332
+ cjsModule = args[i] = handlers.module(name);
333
+ } else if (hasProp(defined, depName) ||
334
+ hasProp(waiting, depName) ||
335
+ hasProp(defining, depName)) {
336
+ args[i] = callDep(depName);
337
+ } else if (map.p) {
338
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
339
+ args[i] = defined[depName];
340
+ } else {
341
+ throw new Error(name + ' missing ' + depName);
342
+ }
343
+ }
344
+
345
+ ret = callback ? callback.apply(defined[name], args) : undefined;
346
+
347
+ if (name) {
348
+ //If setting exports via "module" is in play,
349
+ //favor that over return value and exports. After that,
350
+ //favor a non-undefined return value over exports use.
351
+ if (cjsModule && cjsModule.exports !== undef &&
352
+ cjsModule.exports !== defined[name]) {
353
+ defined[name] = cjsModule.exports;
354
+ } else if (ret !== undef || !usingExports) {
355
+ //Use the return value from the function.
356
+ defined[name] = ret;
357
+ }
358
+ }
359
+ } else if (name) {
360
+ //May just be an object definition for the module. Only
361
+ //worry about defining if have a module name.
362
+ defined[name] = callback;
363
+ }
364
+ };
365
+
366
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
367
+ if (typeof deps === "string") {
368
+ if (handlers[deps]) {
369
+ //callback in this case is really relName
370
+ return handlers[deps](callback);
371
+ }
372
+ //Just return the module wanted. In this scenario, the
373
+ //deps arg is the module name, and second arg (if passed)
374
+ //is just the relName.
375
+ //Normalize module name, if it contains . or ..
376
+ return callDep(makeMap(deps, callback).f);
377
+ } else if (!deps.splice) {
378
+ //deps is a config object, not an array.
379
+ config = deps;
380
+ if (config.deps) {
381
+ req(config.deps, config.callback);
382
+ }
383
+ if (!callback) {
384
+ return;
385
+ }
386
+
387
+ if (callback.splice) {
388
+ //callback is an array, which means it is a dependency list.
389
+ //Adjust args if there are dependencies
390
+ deps = callback;
391
+ callback = relName;
392
+ relName = null;
393
+ } else {
394
+ deps = undef;
395
+ }
396
+ }
397
+
398
+ //Support require(['a'])
399
+ callback = callback || function () {};
400
+
401
+ //If relName is a function, it is an errback handler,
402
+ //so remove it.
403
+ if (typeof relName === 'function') {
404
+ relName = forceSync;
405
+ forceSync = alt;
406
+ }
407
+
408
+ //Simulate async callback;
409
+ if (forceSync) {
410
+ main(undef, deps, callback, relName);
411
+ } else {
412
+ //Using a non-zero value because of concern for what old browsers
413
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
414
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
415
+ //If want a value immediately, use require('id') instead -- something
416
+ //that works in almond on the global level, but not guaranteed and
417
+ //unlikely to work in other AMD implementations.
418
+ setTimeout(function () {
419
+ main(undef, deps, callback, relName);
420
+ }, 4);
421
+ }
422
+
423
+ return req;
424
+ };
425
+
426
+ /**
427
+ * Just drops the config on the floor, but returns req in case
428
+ * the config return value is used.
429
+ */
430
+ req.config = function (cfg) {
431
+ return req(cfg);
432
+ };
433
+
434
+ /**
435
+ * Expose module registry for debugging and tooling
436
+ */
437
+ requirejs._defined = defined;
438
+
439
+ define = function (name, deps, callback) {
440
+ if (typeof name !== 'string') {
441
+ throw new Error('See almond README: incorrect module build, no module name');
442
+ }
443
+
444
+ //This module may not have dependencies
445
+ if (!deps.splice) {
446
+ //deps is not an array, so probably means
447
+ //an object literal or factory function for
448
+ //the value. Adjust args.
449
+ callback = deps;
450
+ deps = [];
451
+ }
452
+
453
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
454
+ waiting[name] = [name, deps, callback];
455
+ }
456
+ };
457
+
458
+ define.amd = {
459
+ jQuery: true
460
+ };
461
+ }());
462
+
463
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
464
+ }
465
+ }());
466
+ S2.define("almond", function(){});
467
+
468
+ /* global jQuery:false, $:false */
469
+ S2.define('jquery',[],function () {
470
+ var _$ = jQuery || $;
471
+
472
+ if (_$ == null && console && console.error) {
473
+ console.error(
474
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
475
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
476
+ 'web page.'
477
+ );
478
+ }
479
+
480
+ return _$;
481
+ });
482
+
483
+ S2.define('select2/utils',[
484
+ 'jquery'
485
+ ], function ($) {
486
+ var Utils = {};
487
+
488
+ Utils.Extend = function (ChildClass, SuperClass) {
489
+ var __hasProp = {}.hasOwnProperty;
490
+
491
+ function BaseConstructor () {
492
+ this.constructor = ChildClass;
493
+ }
494
+
495
+ for (var key in SuperClass) {
496
+ if (__hasProp.call(SuperClass, key)) {
497
+ ChildClass[key] = SuperClass[key];
498
+ }
499
+ }
500
+
501
+ BaseConstructor.prototype = SuperClass.prototype;
502
+ ChildClass.prototype = new BaseConstructor();
503
+ ChildClass.__super__ = SuperClass.prototype;
504
+
505
+ return ChildClass;
506
+ };
507
+
508
+ function getMethods (theClass) {
509
+ var proto = theClass.prototype;
510
+
511
+ var methods = [];
512
+
513
+ for (var methodName in proto) {
514
+ var m = proto[methodName];
515
+
516
+ if (typeof m !== 'function') {
517
+ continue;
518
+ }
519
+
520
+ if (methodName === 'constructor') {
521
+ continue;
522
+ }
523
+
524
+ methods.push(methodName);
525
+ }
526
+
527
+ return methods;
528
+ }
529
+
530
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
531
+ var decoratedMethods = getMethods(DecoratorClass);
532
+ var superMethods = getMethods(SuperClass);
533
+
534
+ function DecoratedClass () {
535
+ var unshift = Array.prototype.unshift;
536
+
537
+ var argCount = DecoratorClass.prototype.constructor.length;
538
+
539
+ var calledConstructor = SuperClass.prototype.constructor;
540
+
541
+ if (argCount > 0) {
542
+ unshift.call(arguments, SuperClass.prototype.constructor);
543
+
544
+ calledConstructor = DecoratorClass.prototype.constructor;
545
+ }
546
+
547
+ calledConstructor.apply(this, arguments);
548
+ }
549
+
550
+ DecoratorClass.displayName = SuperClass.displayName;
551
+
552
+ function ctr () {
553
+ this.constructor = DecoratedClass;
554
+ }
555
+
556
+ DecoratedClass.prototype = new ctr();
557
+
558
+ for (var m = 0; m < superMethods.length; m++) {
559
+ var superMethod = superMethods[m];
560
+
561
+ DecoratedClass.prototype[superMethod] =
562
+ SuperClass.prototype[superMethod];
563
+ }
564
+
565
+ var calledMethod = function (methodName) {
566
+ // Stub out the original method if it's not decorating an actual method
567
+ var originalMethod = function () {};
568
+
569
+ if (methodName in DecoratedClass.prototype) {
570
+ originalMethod = DecoratedClass.prototype[methodName];
571
+ }
572
+
573
+ var decoratedMethod = DecoratorClass.prototype[methodName];
574
+
575
+ return function () {
576
+ var unshift = Array.prototype.unshift;
577
+
578
+ unshift.call(arguments, originalMethod);
579
+
580
+ return decoratedMethod.apply(this, arguments);
581
+ };
582
+ };
583
+
584
+ for (var d = 0; d < decoratedMethods.length; d++) {
585
+ var decoratedMethod = decoratedMethods[d];
586
+
587
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
588
+ }
589
+
590
+ return DecoratedClass;
591
+ };
592
+
593
+ var Observable = function () {
594
+ this.listeners = {};
595
+ };
596
+
597
+ Observable.prototype.on = function (event, callback) {
598
+ this.listeners = this.listeners || {};
599
+
600
+ if (event in this.listeners) {
601
+ this.listeners[event].push(callback);
602
+ } else {
603
+ this.listeners[event] = [callback];
604
+ }
605
+ };
606
+
607
+ Observable.prototype.trigger = function (event) {
608
+ var slice = Array.prototype.slice;
609
+ var params = slice.call(arguments, 1);
610
+
611
+ this.listeners = this.listeners || {};
612
+
613
+ // Params should always come in as an array
614
+ if (params == null) {
615
+ params = [];
616
+ }
617
+
618
+ // If there are no arguments to the event, use a temporary object
619
+ if (params.length === 0) {
620
+ params.push({});
621
+ }
622
+
623
+ // Set the `_type` of the first object to the event
624
+ params[0]._type = event;
625
+
626
+ if (event in this.listeners) {
627
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
628
+ }
629
+
630
+ if ('*' in this.listeners) {
631
+ this.invoke(this.listeners['*'], arguments);
632
+ }
633
+ };
634
+
635
+ Observable.prototype.invoke = function (listeners, params) {
636
+ for (var i = 0, len = listeners.length; i < len; i++) {
637
+ listeners[i].apply(this, params);
638
+ }
639
+ };
640
+
641
+ Utils.Observable = Observable;
642
+
643
+ Utils.generateChars = function (length) {
644
+ var chars = '';
645
+
646
+ for (var i = 0; i < length; i++) {
647
+ var randomChar = Math.floor(Math.random() * 36);
648
+ chars += randomChar.toString(36);
649
+ }
650
+
651
+ return chars;
652
+ };
653
+
654
+ Utils.bind = function (func, context) {
655
+ return function () {
656
+ func.apply(context, arguments);
657
+ };
658
+ };
659
+
660
+ Utils._convertData = function (data) {
661
+ for (var originalKey in data) {
662
+ var keys = originalKey.split('-');
663
+
664
+ var dataLevel = data;
665
+
666
+ if (keys.length === 1) {
667
+ continue;
668
+ }
669
+
670
+ for (var k = 0; k < keys.length; k++) {
671
+ var key = keys[k];
672
+
673
+ // Lowercase the first letter
674
+ // By default, dash-separated becomes camelCase
675
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
676
+
677
+ if (!(key in dataLevel)) {
678
+ dataLevel[key] = {};
679
+ }
680
+
681
+ if (k == keys.length - 1) {
682
+ dataLevel[key] = data[originalKey];
683
+ }
684
+
685
+ dataLevel = dataLevel[key];
686
+ }
687
+
688
+ delete data[originalKey];
689
+ }
690
+
691
+ return data;
692
+ };
693
+
694
+ Utils.hasScroll = function (index, el) {
695
+ // Adapted from the function created by @ShadowScripter
696
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
697
+ // The original code can be found at
698
+ // http://codereview.stackexchange.com/q/13338
699
+ // and was designed to be used with the Sizzle selector engine.
700
+
701
+ var $el = $(el);
702
+ var overflowX = el.style.overflowX;
703
+ var overflowY = el.style.overflowY;
704
+
705
+ //Check both x and y declarations
706
+ if (overflowX === overflowY &&
707
+ (overflowY === 'hidden' || overflowY === 'visible')) {
708
+ return false;
709
+ }
710
+
711
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
712
+ return true;
713
+ }
714
+
715
+ return ($el.innerHeight() < el.scrollHeight ||
716
+ $el.innerWidth() < el.scrollWidth);
717
+ };
718
+
719
+ Utils.escapeMarkup = function (markup) {
720
+ var replaceMap = {
721
+ '\\': '&#92;',
722
+ '&': '&amp;',
723
+ '<': '&lt;',
724
+ '>': '&gt;',
725
+ '"': '&quot;',
726
+ '\'': '&#39;',
727
+ '/': '&#47;'
728
+ };
729
+
730
+ // Do not try to escape the markup if it's not a string
731
+ if (typeof markup !== 'string') {
732
+ return markup;
733
+ }
734
+
735
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
736
+ return replaceMap[match];
737
+ });
738
+ };
739
+
740
+ // Append an array of jQuery nodes to a given element.
741
+ Utils.appendMany = function ($element, $nodes) {
742
+ // jQuery 1.7.x does not support $.fn.append() with an array
743
+ // Fall back to a jQuery object collection using $.fn.add()
744
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
745
+ var $jqNodes = $();
746
+
747
+ $.map($nodes, function (node) {
748
+ $jqNodes = $jqNodes.add(node);
749
+ });
750
+
751
+ $nodes = $jqNodes;
752
+ }
753
+
754
+ $element.append($nodes);
755
+ };
756
+
757
+ return Utils;
758
+ });
759
+
760
+ S2.define('select2/results',[
761
+ 'jquery',
762
+ './utils'
763
+ ], function ($, Utils) {
764
+ function Results ($element, options, dataAdapter) {
765
+ this.$element = $element;
766
+ this.data = dataAdapter;
767
+ this.options = options;
768
+
769
+ Results.__super__.constructor.call(this);
770
+ }
771
+
772
+ Utils.Extend(Results, Utils.Observable);
773
+
774
+ Results.prototype.render = function () {
775
+ var $results = $(
776
+ '<ul class="select2-results__options" role="tree"></ul>'
777
+ );
778
+
779
+ if (this.options.get('multiple')) {
780
+ $results.attr('aria-multiselectable', 'true');
781
+ }
782
+
783
+ this.$results = $results;
784
+
785
+ return $results;
786
+ };
787
+
788
+ Results.prototype.clear = function () {
789
+ this.$results.empty();
790
+ };
791
+
792
+ Results.prototype.displayMessage = function (params) {
793
+ var escapeMarkup = this.options.get('escapeMarkup');
794
+
795
+ this.clear();
796
+ this.hideLoading();
797
+
798
+ var $message = $(
799
+ '<li role="treeitem" aria-live="assertive"' +
800
+ ' class="select2-results__option"></li>'
801
+ );
802
+
803
+ var message = this.options.get('translations').get(params.message);
804
+
805
+ $message.append(
806
+ escapeMarkup(
807
+ message(params.args)
808
+ )
809
+ );
810
+
811
+ $message[0].className += ' select2-results__message';
812
+
813
+ this.$results.append($message);
814
+ };
815
+
816
+ Results.prototype.hideMessages = function () {
817
+ this.$results.find('.select2-results__message').remove();
818
+ };
819
+
820
+ Results.prototype.append = function (data) {
821
+ this.hideLoading();
822
+
823
+ var $options = [];
824
+
825
+ if (data.results == null || data.results.length === 0) {
826
+ if (this.$results.children().length === 0) {
827
+ this.trigger('results:message', {
828
+ message: 'noResults'
829
+ });
830
+ }
831
+
832
+ return;
833
+ }
834
+
835
+ data.results = this.sort(data.results);
836
+
837
+ for (var d = 0; d < data.results.length; d++) {
838
+ var item = data.results[d];
839
+
840
+ var $option = this.option(item);
841
+
842
+ $options.push($option);
843
+ }
844
+
845
+ this.$results.append($options);
846
+ };
847
+
848
+ Results.prototype.position = function ($results, $dropdown) {
849
+ var $resultsContainer = $dropdown.find('.select2-results');
850
+ $resultsContainer.append($results);
851
+ };
852
+
853
+ Results.prototype.sort = function (data) {
854
+ var sorter = this.options.get('sorter');
855
+
856
+ return sorter(data);
857
+ };
858
+
859
+ Results.prototype.highlightFirstItem = function () {
860
+ var $options = this.$results
861
+ .find('.select2-results__option[aria-selected]');
862
+
863
+ var $selected = $options.filter('[aria-selected=true]');
864
+
865
+ // Check if there are any selected options
866
+ if ($selected.length > 0) {
867
+ // If there are selected options, highlight the first
868
+ $selected.first().trigger('mouseenter');
869
+ } else {
870
+ // If there are no selected options, highlight the first option
871
+ // in the dropdown
872
+ $options.first().trigger('mouseenter');
873
+ }
874
+
875
+ this.ensureHighlightVisible();
876
+ };
877
+
878
+ Results.prototype.setClasses = function () {
879
+ var self = this;
880
+
881
+ this.data.current(function (selected) {
882
+ var selectedIds = $.map(selected, function (s) {
883
+ return s.id.toString();
884
+ });
885
+
886
+ var $options = self.$results
887
+ .find('.select2-results__option[aria-selected]');
888
+
889
+ $options.each(function () {
890
+ var $option = $(this);
891
+
892
+ var item = $.data(this, 'data');
893
+
894
+ // id needs to be converted to a string when comparing
895
+ var id = '' + item.id;
896
+
897
+ if ((item.element != null && item.element.selected) ||
898
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
899
+ $option.attr('aria-selected', 'true');
900
+ } else {
901
+ $option.attr('aria-selected', 'false');
902
+ }
903
+ });
904
+
905
+ });
906
+ };
907
+
908
+ Results.prototype.showLoading = function (params) {
909
+ this.hideLoading();
910
+
911
+ var loadingMore = this.options.get('translations').get('searching');
912
+
913
+ var loading = {
914
+ disabled: true,
915
+ loading: true,
916
+ text: loadingMore(params)
917
+ };
918
+ var $loading = this.option(loading);
919
+ $loading.className += ' loading-results';
920
+
921
+ this.$results.prepend($loading);
922
+ };
923
+
924
+ Results.prototype.hideLoading = function () {
925
+ this.$results.find('.loading-results').remove();
926
+ };
927
+
928
+ Results.prototype.option = function (data) {
929
+ var option = document.createElement('li');
930
+ option.className = 'select2-results__option';
931
+
932
+ var attrs = {
933
+ 'role': 'treeitem',
934
+ 'aria-selected': 'false'
935
+ };
936
+
937
+ if (data.disabled) {
938
+ delete attrs['aria-selected'];
939
+ attrs['aria-disabled'] = 'true';
940
+ }
941
+
942
+ if (data.id == null) {
943
+ delete attrs['aria-selected'];
944
+ }
945
+
946
+ if (data._resultId != null) {
947
+ option.id = data._resultId;
948
+ }
949
+
950
+ if (data.title) {
951
+ option.title = data.title;
952
+ }
953
+
954
+ if (data.children) {
955
+ attrs.role = 'group';
956
+ attrs['aria-label'] = data.text;
957
+ delete attrs['aria-selected'];
958
+ }
959
+
960
+ for (var attr in attrs) {
961
+ var val = attrs[attr];
962
+
963
+ option.setAttribute(attr, val);
964
+ }
965
+
966
+ if (data.children) {
967
+ var $option = $(option);
968
+
969
+ var label = document.createElement('strong');
970
+ label.className = 'select2-results__group';
971
+
972
+ var $label = $(label);
973
+ this.template(data, label);
974
+
975
+ var $children = [];
976
+
977
+ for (var c = 0; c < data.children.length; c++) {
978
+ var child = data.children[c];
979
+
980
+ var $child = this.option(child);
981
+
982
+ $children.push($child);
983
+ }
984
+
985
+ var $childrenContainer = $('<ul></ul>', {
986
+ 'class': 'select2-results__options select2-results__options--nested'
987
+ });
988
+
989
+ $childrenContainer.append($children);
990
+
991
+ $option.append(label);
992
+ $option.append($childrenContainer);
993
+ } else {
994
+ this.template(data, option);
995
+ }
996
+
997
+ $.data(option, 'data', data);
998
+
999
+ return option;
1000
+ };
1001
+
1002
+ Results.prototype.bind = function (container, $container) {
1003
+ var self = this;
1004
+
1005
+ var id = container.id + '-results';
1006
+
1007
+ this.$results.attr('id', id);
1008
+
1009
+ container.on('results:all', function (params) {
1010
+ self.clear();
1011
+ self.append(params.data);
1012
+
1013
+ if (container.isOpen()) {
1014
+ self.setClasses();
1015
+ self.highlightFirstItem();
1016
+ }
1017
+ });
1018
+
1019
+ container.on('results:append', function (params) {
1020
+ self.append(params.data);
1021
+
1022
+ if (container.isOpen()) {
1023
+ self.setClasses();
1024
+ }
1025
+ });
1026
+
1027
+ container.on('query', function (params) {
1028
+ self.hideMessages();
1029
+ self.showLoading(params);
1030
+ });
1031
+
1032
+ container.on('select', function () {
1033
+ if (!container.isOpen()) {
1034
+ return;
1035
+ }
1036
+
1037
+ self.setClasses();
1038
+ self.highlightFirstItem();
1039
+ });
1040
+
1041
+ container.on('unselect', function () {
1042
+ if (!container.isOpen()) {
1043
+ return;
1044
+ }
1045
+
1046
+ self.setClasses();
1047
+ self.highlightFirstItem();
1048
+ });
1049
+
1050
+ container.on('open', function () {
1051
+ // When the dropdown is open, aria-expended="true"
1052
+ self.$results.attr('aria-expanded', 'true');
1053
+ self.$results.attr('aria-hidden', 'false');
1054
+
1055
+ self.setClasses();
1056
+ self.ensureHighlightVisible();
1057
+ });
1058
+
1059
+ container.on('close', function () {
1060
+ // When the dropdown is closed, aria-expended="false"
1061
+ self.$results.attr('aria-expanded', 'false');
1062
+ self.$results.attr('aria-hidden', 'true');
1063
+ self.$results.removeAttr('aria-activedescendant');
1064
+ });
1065
+
1066
+ container.on('results:toggle', function () {
1067
+ var $highlighted = self.getHighlightedResults();
1068
+
1069
+ if ($highlighted.length === 0) {
1070
+ return;
1071
+ }
1072
+
1073
+ $highlighted.trigger('mouseup');
1074
+ });
1075
+
1076
+ container.on('results:select', function () {
1077
+ var $highlighted = self.getHighlightedResults();
1078
+
1079
+ if ($highlighted.length === 0) {
1080
+ return;
1081
+ }
1082
+
1083
+ var data = $highlighted.data('data');
1084
+
1085
+ if ($highlighted.attr('aria-selected') == 'true') {
1086
+ self.trigger('close', {});
1087
+ } else {
1088
+ self.trigger('select', {
1089
+ data: data
1090
+ });
1091
+ }
1092
+ });
1093
+
1094
+ container.on('results:previous', function () {
1095
+ var $highlighted = self.getHighlightedResults();
1096
+
1097
+ var $options = self.$results.find('[aria-selected]');
1098
+
1099
+ var currentIndex = $options.index($highlighted);
1100
+
1101
+ // If we are already at te top, don't move further
1102
+ if (currentIndex === 0) {
1103
+ return;
1104
+ }
1105
+
1106
+ var nextIndex = currentIndex - 1;
1107
+
1108
+ // If none are highlighted, highlight the first
1109
+ if ($highlighted.length === 0) {
1110
+ nextIndex = 0;
1111
+ }
1112
+
1113
+ var $next = $options.eq(nextIndex);
1114
+
1115
+ $next.trigger('mouseenter');
1116
+
1117
+ var currentOffset = self.$results.offset().top;
1118
+ var nextTop = $next.offset().top;
1119
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
1120
+
1121
+ if (nextIndex === 0) {
1122
+ self.$results.scrollTop(0);
1123
+ } else if (nextTop - currentOffset < 0) {
1124
+ self.$results.scrollTop(nextOffset);
1125
+ }
1126
+ });
1127
+
1128
+ container.on('results:next', function () {
1129
+ var $highlighted = self.getHighlightedResults();
1130
+
1131
+ var $options = self.$results.find('[aria-selected]');
1132
+
1133
+ var currentIndex = $options.index($highlighted);
1134
+
1135
+ var nextIndex = currentIndex + 1;
1136
+
1137
+ // If we are at the last option, stay there
1138
+ if (nextIndex >= $options.length) {
1139
+ return;
1140
+ }
1141
+
1142
+ var $next = $options.eq(nextIndex);
1143
+
1144
+ $next.trigger('mouseenter');
1145
+
1146
+ var currentOffset = self.$results.offset().top +
1147
+ self.$results.outerHeight(false);
1148
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
1149
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
1150
+
1151
+ if (nextIndex === 0) {
1152
+ self.$results.scrollTop(0);
1153
+ } else if (nextBottom > currentOffset) {
1154
+ self.$results.scrollTop(nextOffset);
1155
+ }
1156
+ });
1157
+
1158
+ container.on('results:focus', function (params) {
1159
+ params.element.addClass('select2-results__option--highlighted');
1160
+ });
1161
+
1162
+ container.on('results:message', function (params) {
1163
+ self.displayMessage(params);
1164
+ });
1165
+
1166
+ if ($.fn.mousewheel) {
1167
+ this.$results.on('mousewheel', function (e) {
1168
+ var top = self.$results.scrollTop();
1169
+
1170
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
1171
+
1172
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
1173
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
1174
+
1175
+ if (isAtTop) {
1176
+ self.$results.scrollTop(0);
1177
+
1178
+ e.preventDefault();
1179
+ e.stopPropagation();
1180
+ } else if (isAtBottom) {
1181
+ self.$results.scrollTop(
1182
+ self.$results.get(0).scrollHeight - self.$results.height()
1183
+ );
1184
+
1185
+ e.preventDefault();
1186
+ e.stopPropagation();
1187
+ }
1188
+ });
1189
+ }
1190
+
1191
+ this.$results.on('mouseup', '.select2-results__option[aria-selected]',
1192
+ function (evt) {
1193
+ var $this = $(this);
1194
+
1195
+ var data = $this.data('data');
1196
+
1197
+ if ($this.attr('aria-selected') === 'true') {
1198
+ if (self.options.get('multiple')) {
1199
+ self.trigger('unselect', {
1200
+ originalEvent: evt,
1201
+ data: data
1202
+ });
1203
+ } else {
1204
+ self.trigger('close', {});
1205
+ }
1206
+
1207
+ return;
1208
+ }
1209
+
1210
+ self.trigger('select', {
1211
+ originalEvent: evt,
1212
+ data: data
1213
+ });
1214
+ });
1215
+
1216
+ this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
1217
+ function (evt) {
1218
+ var data = $(this).data('data');
1219
+
1220
+ self.getHighlightedResults()
1221
+ .removeClass('select2-results__option--highlighted');
1222
+
1223
+ self.trigger('results:focus', {
1224
+ data: data,
1225
+ element: $(this)
1226
+ });
1227
+ });
1228
+ };
1229
+
1230
+ Results.prototype.getHighlightedResults = function () {
1231
+ var $highlighted = this.$results
1232
+ .find('.select2-results__option--highlighted');
1233
+
1234
+ return $highlighted;
1235
+ };
1236
+
1237
+ Results.prototype.destroy = function () {
1238
+ this.$results.remove();
1239
+ };
1240
+
1241
+ Results.prototype.ensureHighlightVisible = function () {
1242
+ var $highlighted = this.getHighlightedResults();
1243
+
1244
+ if ($highlighted.length === 0) {
1245
+ return;
1246
+ }
1247
+
1248
+ var $options = this.$results.find('[aria-selected]');
1249
+
1250
+ var currentIndex = $options.index($highlighted);
1251
+
1252
+ var currentOffset = this.$results.offset().top;
1253
+ var nextTop = $highlighted.offset().top;
1254
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
1255
+
1256
+ var offsetDelta = nextTop - currentOffset;
1257
+ nextOffset -= $highlighted.outerHeight(false) * 2;
1258
+
1259
+ if (currentIndex <= 2) {
1260
+ this.$results.scrollTop(0);
1261
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
1262
+ this.$results.scrollTop(nextOffset);
1263
+ }
1264
+ };
1265
+
1266
+ Results.prototype.template = function (result, container) {
1267
+ var template = this.options.get('templateResult');
1268
+ var escapeMarkup = this.options.get('escapeMarkup');
1269
+
1270
+ var content = template(result, container);
1271
+
1272
+ if (content == null) {
1273
+ container.style.display = 'none';
1274
+ } else if (typeof content === 'string') {
1275
+ container.innerHTML = escapeMarkup(content);
1276
+ } else {
1277
+ $(container).append(content);
1278
+ }
1279
+ };
1280
+
1281
+ return Results;
1282
+ });
1283
+
1284
+ S2.define('select2/keys',[
1285
+
1286
+ ], function () {
1287
+ var KEYS = {
1288
+ BACKSPACE: 8,
1289
+ TAB: 9,
1290
+ ENTER: 13,
1291
+ SHIFT: 16,
1292
+ CTRL: 17,
1293
+ ALT: 18,
1294
+ ESC: 27,
1295
+ SPACE: 32,
1296
+ PAGE_UP: 33,
1297
+ PAGE_DOWN: 34,
1298
+ END: 35,
1299
+ HOME: 36,
1300
+ LEFT: 37,
1301
+ UP: 38,
1302
+ RIGHT: 39,
1303
+ DOWN: 40,
1304
+ DELETE: 46
1305
+ };
1306
+
1307
+ return KEYS;
1308
+ });
1309
+
1310
+ S2.define('select2/selection/base',[
1311
+ 'jquery',
1312
+ '../utils',
1313
+ '../keys'
1314
+ ], function ($, Utils, KEYS) {
1315
+ function BaseSelection ($element, options) {
1316
+ this.$element = $element;
1317
+ this.options = options;
1318
+
1319
+ BaseSelection.__super__.constructor.call(this);
1320
+ }
1321
+
1322
+ Utils.Extend(BaseSelection, Utils.Observable);
1323
+
1324
+ BaseSelection.prototype.render = function () {
1325
+ var $selection = $(
1326
+ '<span class="select2-selection" role="combobox" ' +
1327
+ ' aria-haspopup="true" aria-expanded="false">' +
1328
+ '</span>'
1329
+ );
1330
+
1331
+ this._tabindex = 0;
1332
+
1333
+ if (this.$element.data('old-tabindex') != null) {
1334
+ this._tabindex = this.$element.data('old-tabindex');
1335
+ } else if (this.$element.attr('tabindex') != null) {
1336
+ this._tabindex = this.$element.attr('tabindex');
1337
+ }
1338
+
1339
+ $selection.attr('title', this.$element.attr('title'));
1340
+ $selection.attr('tabindex', this._tabindex);
1341
+
1342
+ this.$selection = $selection;
1343
+
1344
+ return $selection;
1345
+ };
1346
+
1347
+ BaseSelection.prototype.bind = function (container, $container) {
1348
+ var self = this;
1349
+
1350
+ var id = container.id + '-container';
1351
+ var resultsId = container.id + '-results';
1352
+
1353
+ this.container = container;
1354
+
1355
+ this.$selection.on('focus', function (evt) {
1356
+ self.trigger('focus', evt);
1357
+ });
1358
+
1359
+ this.$selection.on('blur', function (evt) {
1360
+ self._handleBlur(evt);
1361
+ });
1362
+
1363
+ this.$selection.on('keydown', function (evt) {
1364
+ self.trigger('keypress', evt);
1365
+
1366
+ if (evt.which === KEYS.SPACE) {
1367
+ evt.preventDefault();
1368
+ }
1369
+ });
1370
+
1371
+ container.on('results:focus', function (params) {
1372
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
1373
+ });
1374
+
1375
+ container.on('selection:update', function (params) {
1376
+ self.update(params.data);
1377
+ });
1378
+
1379
+ container.on('open', function () {
1380
+ // When the dropdown is open, aria-expanded="true"
1381
+ self.$selection.attr('aria-expanded', 'true');
1382
+ self.$selection.attr('aria-owns', resultsId);
1383
+
1384
+ self._attachCloseHandler(container);
1385
+ });
1386
+
1387
+ container.on('close', function () {
1388
+ // When the dropdown is closed, aria-expanded="false"
1389
+ self.$selection.attr('aria-expanded', 'false');
1390
+ self.$selection.removeAttr('aria-activedescendant');
1391
+ self.$selection.removeAttr('aria-owns');
1392
+
1393
+ self.$selection.focus();
1394
+
1395
+ self._detachCloseHandler(container);
1396
+ });
1397
+
1398
+ container.on('enable', function () {
1399
+ self.$selection.attr('tabindex', self._tabindex);
1400
+ });
1401
+
1402
+ container.on('disable', function () {
1403
+ self.$selection.attr('tabindex', '-1');
1404
+ });
1405
+ };
1406
+
1407
+ BaseSelection.prototype._handleBlur = function (evt) {
1408
+ var self = this;
1409
+
1410
+ // This needs to be delayed as the active element is the body when the tab
1411
+ // key is pressed, possibly along with others.
1412
+ window.setTimeout(function () {
1413
+ // Don't trigger `blur` if the focus is still in the selection
1414
+ if (
1415
+ (document.activeElement == self.$selection[0]) ||
1416
+ ($.contains(self.$selection[0], document.activeElement))
1417
+ ) {
1418
+ return;
1419
+ }
1420
+
1421
+ self.trigger('blur', evt);
1422
+ }, 1);
1423
+ };
1424
+
1425
+ BaseSelection.prototype._attachCloseHandler = function (container) {
1426
+ var self = this;
1427
+
1428
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
1429
+ var $target = $(e.target);
1430
+
1431
+ var $select = $target.closest('.select2');
1432
+
1433
+ var $all = $('.select2.select2-container--open');
1434
+
1435
+ $all.each(function () {
1436
+ var $this = $(this);
1437
+
1438
+ if (this == $select[0]) {
1439
+ return;
1440
+ }
1441
+
1442
+ var $element = $this.data('element');
1443
+
1444
+ $element.select2('close');
1445
+ });
1446
+ });
1447
+ };
1448
+
1449
+ BaseSelection.prototype._detachCloseHandler = function (container) {
1450
+ $(document.body).off('mousedown.select2.' + container.id);
1451
+ };
1452
+
1453
+ BaseSelection.prototype.position = function ($selection, $container) {
1454
+ var $selectionContainer = $container.find('.selection');
1455
+ $selectionContainer.append($selection);
1456
+ };
1457
+
1458
+ BaseSelection.prototype.destroy = function () {
1459
+ this._detachCloseHandler(this.container);
1460
+ };
1461
+
1462
+ BaseSelection.prototype.update = function (data) {
1463
+ throw new Error('The `update` method must be defined in child classes.');
1464
+ };
1465
+
1466
+ return BaseSelection;
1467
+ });
1468
+
1469
+ S2.define('select2/selection/single',[
1470
+ 'jquery',
1471
+ './base',
1472
+ '../utils',
1473
+ '../keys'
1474
+ ], function ($, BaseSelection, Utils, KEYS) {
1475
+ function SingleSelection () {
1476
+ SingleSelection.__super__.constructor.apply(this, arguments);
1477
+ }
1478
+
1479
+ Utils.Extend(SingleSelection, BaseSelection);
1480
+
1481
+ SingleSelection.prototype.render = function () {
1482
+ var $selection = SingleSelection.__super__.render.call(this);
1483
+
1484
+ $selection.addClass('select2-selection--single');
1485
+
1486
+ $selection.html(
1487
+ '<span class="select2-selection__rendered"></span>' +
1488
+ '<span class="select2-selection__arrow" role="presentation">' +
1489
+ '<b role="presentation"></b>' +
1490
+ '</span>'
1491
+ );
1492
+
1493
+ return $selection;
1494
+ };
1495
+
1496
+ SingleSelection.prototype.bind = function (container, $container) {
1497
+ var self = this;
1498
+
1499
+ SingleSelection.__super__.bind.apply(this, arguments);
1500
+
1501
+ var id = container.id + '-container';
1502
+
1503
+ this.$selection.find('.select2-selection__rendered').attr('id', id);
1504
+ this.$selection.attr('aria-labelledby', id);
1505
+
1506
+ this.$selection.on('mousedown', function (evt) {
1507
+ // Only respond to left clicks
1508
+ if (evt.which !== 1) {
1509
+ return;
1510
+ }
1511
+
1512
+ self.trigger('toggle', {
1513
+ originalEvent: evt
1514
+ });
1515
+ });
1516
+
1517
+ this.$selection.on('focus', function (evt) {
1518
+ // User focuses on the container
1519
+ });
1520
+
1521
+ this.$selection.on('blur', function (evt) {
1522
+ // User exits the container
1523
+ });
1524
+
1525
+ container.on('focus', function (evt) {
1526
+ if (!container.isOpen()) {
1527
+ self.$selection.focus();
1528
+ }
1529
+ });
1530
+
1531
+ container.on('selection:update', function (params) {
1532
+ self.update(params.data);
1533
+ });
1534
+ };
1535
+
1536
+ SingleSelection.prototype.clear = function () {
1537
+ this.$selection.find('.select2-selection__rendered').empty();
1538
+ };
1539
+
1540
+ SingleSelection.prototype.display = function (data, container) {
1541
+ var template = this.options.get('templateSelection');
1542
+ var escapeMarkup = this.options.get('escapeMarkup');
1543
+
1544
+ return escapeMarkup(template(data, container));
1545
+ };
1546
+
1547
+ SingleSelection.prototype.selectionContainer = function () {
1548
+ return $('<span></span>');
1549
+ };
1550
+
1551
+ SingleSelection.prototype.update = function (data) {
1552
+ if (data.length === 0) {
1553
+ this.clear();
1554
+ return;
1555
+ }
1556
+
1557
+ var selection = data[0];
1558
+
1559
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1560
+ var formatted = this.display(selection, $rendered);
1561
+
1562
+ $rendered.empty().append(formatted);
1563
+ $rendered.prop('title', selection.title || selection.text);
1564
+ };
1565
+
1566
+ return SingleSelection;
1567
+ });
1568
+
1569
+ S2.define('select2/selection/multiple',[
1570
+ 'jquery',
1571
+ './base',
1572
+ '../utils'
1573
+ ], function ($, BaseSelection, Utils) {
1574
+ function MultipleSelection ($element, options) {
1575
+ MultipleSelection.__super__.constructor.apply(this, arguments);
1576
+ }
1577
+
1578
+ Utils.Extend(MultipleSelection, BaseSelection);
1579
+
1580
+ MultipleSelection.prototype.render = function () {
1581
+ var $selection = MultipleSelection.__super__.render.call(this);
1582
+
1583
+ $selection.addClass('select2-selection--multiple');
1584
+
1585
+ $selection.html(
1586
+ '<ul class="select2-selection__rendered"></ul>'
1587
+ );
1588
+
1589
+ return $selection;
1590
+ };
1591
+
1592
+ MultipleSelection.prototype.bind = function (container, $container) {
1593
+ var self = this;
1594
+
1595
+ MultipleSelection.__super__.bind.apply(this, arguments);
1596
+
1597
+ this.$selection.on('click', function (evt) {
1598
+ self.trigger('toggle', {
1599
+ originalEvent: evt
1600
+ });
1601
+ });
1602
+
1603
+ this.$selection.on(
1604
+ 'click',
1605
+ '.select2-selection__choice__remove',
1606
+ function (evt) {
1607
+ // Ignore the event if it is disabled
1608
+ if (self.options.get('disabled')) {
1609
+ return;
1610
+ }
1611
+
1612
+ var $remove = $(this);
1613
+ var $selection = $remove.parent();
1614
+
1615
+ var data = $selection.data('data');
1616
+
1617
+ self.trigger('unselect', {
1618
+ originalEvent: evt,
1619
+ data: data
1620
+ });
1621
+ }
1622
+ );
1623
+ };
1624
+
1625
+ MultipleSelection.prototype.clear = function () {
1626
+ this.$selection.find('.select2-selection__rendered').empty();
1627
+ };
1628
+
1629
+ MultipleSelection.prototype.display = function (data, container) {
1630
+ var template = this.options.get('templateSelection');
1631
+ var escapeMarkup = this.options.get('escapeMarkup');
1632
+
1633
+ return escapeMarkup(template(data, container));
1634
+ };
1635
+
1636
+ MultipleSelection.prototype.selectionContainer = function () {
1637
+ var $container = $(
1638
+ '<li class="select2-selection__choice">' +
1639
+ '<span class="select2-selection__choice__remove" role="presentation">' +
1640
+ '&times;' +
1641
+ '</span>' +
1642
+ '</li>'
1643
+ );
1644
+
1645
+ return $container;
1646
+ };
1647
+
1648
+ MultipleSelection.prototype.update = function (data) {
1649
+ this.clear();
1650
+
1651
+ if (data.length === 0) {
1652
+ return;
1653
+ }
1654
+
1655
+ var $selections = [];
1656
+
1657
+ for (var d = 0; d < data.length; d++) {
1658
+ var selection = data[d];
1659
+
1660
+ var $selection = this.selectionContainer();
1661
+ var formatted = this.display(selection, $selection);
1662
+
1663
+ $selection.append(formatted);
1664
+ $selection.prop('title', selection.title || selection.text);
1665
+
1666
+ $selection.data('data', selection);
1667
+
1668
+ $selections.push($selection);
1669
+ }
1670
+
1671
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1672
+
1673
+ Utils.appendMany($rendered, $selections);
1674
+ };
1675
+
1676
+ return MultipleSelection;
1677
+ });
1678
+
1679
+ S2.define('select2/selection/placeholder',[
1680
+ '../utils'
1681
+ ], function (Utils) {
1682
+ function Placeholder (decorated, $element, options) {
1683
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
1684
+
1685
+ decorated.call(this, $element, options);
1686
+ }
1687
+
1688
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
1689
+ if (typeof placeholder === 'string') {
1690
+ placeholder = {
1691
+ id: '',
1692
+ text: placeholder
1693
+ };
1694
+ }
1695
+
1696
+ return placeholder;
1697
+ };
1698
+
1699
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
1700
+ var $placeholder = this.selectionContainer();
1701
+
1702
+ $placeholder.html(this.display(placeholder));
1703
+ $placeholder.addClass('select2-selection__placeholder')
1704
+ .removeClass('select2-selection__choice');
1705
+
1706
+ return $placeholder;
1707
+ };
1708
+
1709
+ Placeholder.prototype.update = function (decorated, data) {
1710
+ var singlePlaceholder = (
1711
+ data.length == 1 && data[0].id != this.placeholder.id
1712
+ );
1713
+ var multipleSelections = data.length > 1;
1714
+
1715
+ if (multipleSelections || singlePlaceholder) {
1716
+ return decorated.call(this, data);
1717
+ }
1718
+
1719
+ this.clear();
1720
+
1721
+ var $placeholder = this.createPlaceholder(this.placeholder);
1722
+
1723
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
1724
+ };
1725
+
1726
+ return Placeholder;
1727
+ });
1728
+
1729
+ S2.define('select2/selection/allowClear',[
1730
+ 'jquery',
1731
+ '../keys'
1732
+ ], function ($, KEYS) {
1733
+ function AllowClear () { }
1734
+
1735
+ AllowClear.prototype.bind = function (decorated, container, $container) {
1736
+ var self = this;
1737
+
1738
+ decorated.call(this, container, $container);
1739
+
1740
+ if (this.placeholder == null) {
1741
+ if (this.options.get('debug') && window.console && console.error) {
1742
+ console.error(
1743
+ 'Select2: The `allowClear` option should be used in combination ' +
1744
+ 'with the `placeholder` option.'
1745
+ );
1746
+ }
1747
+ }
1748
+
1749
+ this.$selection.on('mousedown', '.select2-selection__clear',
1750
+ function (evt) {
1751
+ self._handleClear(evt);
1752
+ });
1753
+
1754
+ container.on('keypress', function (evt) {
1755
+ self._handleKeyboardClear(evt, container);
1756
+ });
1757
+ };
1758
+
1759
+ AllowClear.prototype._handleClear = function (_, evt) {
1760
+ // Ignore the event if it is disabled
1761
+ if (this.options.get('disabled')) {
1762
+ return;
1763
+ }
1764
+
1765
+ var $clear = this.$selection.find('.select2-selection__clear');
1766
+
1767
+ // Ignore the event if nothing has been selected
1768
+ if ($clear.length === 0) {
1769
+ return;
1770
+ }
1771
+
1772
+ evt.stopPropagation();
1773
+
1774
+ var data = $clear.data('data');
1775
+
1776
+ for (var d = 0; d < data.length; d++) {
1777
+ var unselectData = {
1778
+ data: data[d]
1779
+ };
1780
+
1781
+ // Trigger the `unselect` event, so people can prevent it from being
1782
+ // cleared.
1783
+ this.trigger('unselect', unselectData);
1784
+
1785
+ // If the event was prevented, don't clear it out.
1786
+ if (unselectData.prevented) {
1787
+ return;
1788
+ }
1789
+ }
1790
+
1791
+ this.$element.val(this.placeholder.id).trigger('change');
1792
+
1793
+ this.trigger('toggle', {});
1794
+ };
1795
+
1796
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
1797
+ if (container.isOpen()) {
1798
+ return;
1799
+ }
1800
+
1801
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
1802
+ this._handleClear(evt);
1803
+ }
1804
+ };
1805
+
1806
+ AllowClear.prototype.update = function (decorated, data) {
1807
+ decorated.call(this, data);
1808
+
1809
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
1810
+ data.length === 0) {
1811
+ return;
1812
+ }
1813
+
1814
+ var $remove = $(
1815
+ '<span class="select2-selection__clear">' +
1816
+ '&times;' +
1817
+ '</span>'
1818
+ );
1819
+ $remove.data('data', data);
1820
+
1821
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
1822
+ };
1823
+
1824
+ return AllowClear;
1825
+ });
1826
+
1827
+ S2.define('select2/selection/search',[
1828
+ 'jquery',
1829
+ '../utils',
1830
+ '../keys'
1831
+ ], function ($, Utils, KEYS) {
1832
+ function Search (decorated, $element, options) {
1833
+ decorated.call(this, $element, options);
1834
+ }
1835
+
1836
+ Search.prototype.render = function (decorated) {
1837
+ var $search = $(
1838
+ '<li class="select2-search select2-search--inline">' +
1839
+ '<input class="select2-search__field" type="search" tabindex="-1"' +
1840
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1841
+ ' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
1842
+ '</li>'
1843
+ );
1844
+
1845
+ this.$searchContainer = $search;
1846
+ this.$search = $search.find('input');
1847
+
1848
+ var $rendered = decorated.call(this);
1849
+
1850
+ this._transferTabIndex();
1851
+
1852
+ return $rendered;
1853
+ };
1854
+
1855
+ Search.prototype.bind = function (decorated, container, $container) {
1856
+ var self = this;
1857
+
1858
+ decorated.call(this, container, $container);
1859
+
1860
+ container.on('open', function () {
1861
+ self.$search.trigger('focus');
1862
+ });
1863
+
1864
+ container.on('close', function () {
1865
+ self.$search.val('');
1866
+ self.$search.removeAttr('aria-activedescendant');
1867
+ self.$search.trigger('focus');
1868
+ });
1869
+
1870
+ container.on('enable', function () {
1871
+ self.$search.prop('disabled', false);
1872
+
1873
+ self._transferTabIndex();
1874
+ });
1875
+
1876
+ container.on('disable', function () {
1877
+ self.$search.prop('disabled', true);
1878
+ });
1879
+
1880
+ container.on('focus', function (evt) {
1881
+ self.$search.trigger('focus');
1882
+ });
1883
+
1884
+ container.on('results:focus', function (params) {
1885
+ self.$search.attr('aria-activedescendant', params.id);
1886
+ });
1887
+
1888
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1889
+ self.trigger('focus', evt);
1890
+ });
1891
+
1892
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1893
+ self._handleBlur(evt);
1894
+ });
1895
+
1896
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
1897
+ evt.stopPropagation();
1898
+
1899
+ self.trigger('keypress', evt);
1900
+
1901
+ self._keyUpPrevented = evt.isDefaultPrevented();
1902
+
1903
+ var key = evt.which;
1904
+
1905
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
1906
+ var $previousChoice = self.$searchContainer
1907
+ .prev('.select2-selection__choice');
1908
+
1909
+ if ($previousChoice.length > 0) {
1910
+ var item = $previousChoice.data('data');
1911
+
1912
+ self.searchRemoveChoice(item);
1913
+
1914
+ evt.preventDefault();
1915
+ }
1916
+ }
1917
+ });
1918
+
1919
+ // Try to detect the IE version should the `documentMode` property that
1920
+ // is stored on the document. This is only implemented in IE and is
1921
+ // slightly cleaner than doing a user agent check.
1922
+ // This property is not available in Edge, but Edge also doesn't have
1923
+ // this bug.
1924
+ var msie = document.documentMode;
1925
+ var disableInputEvents = msie && msie <= 11;
1926
+
1927
+ // Workaround for browsers which do not support the `input` event
1928
+ // This will prevent double-triggering of events for browsers which support
1929
+ // both the `keyup` and `input` events.
1930
+ this.$selection.on(
1931
+ 'input.searchcheck',
1932
+ '.select2-search--inline',
1933
+ function (evt) {
1934
+ // IE will trigger the `input` event when a placeholder is used on a
1935
+ // search box. To get around this issue, we are forced to ignore all
1936
+ // `input` events in IE and keep using `keyup`.
1937
+ if (disableInputEvents) {
1938
+ self.$selection.off('input.search input.searchcheck');
1939
+ return;
1940
+ }
1941
+
1942
+ // Unbind the duplicated `keyup` event
1943
+ self.$selection.off('keyup.search');
1944
+ }
1945
+ );
1946
+
1947
+ this.$selection.on(
1948
+ 'keyup.search input.search',
1949
+ '.select2-search--inline',
1950
+ function (evt) {
1951
+ // IE will trigger the `input` event when a placeholder is used on a
1952
+ // search box. To get around this issue, we are forced to ignore all
1953
+ // `input` events in IE and keep using `keyup`.
1954
+ if (disableInputEvents && evt.type === 'input') {
1955
+ self.$selection.off('input.search input.searchcheck');
1956
+ return;
1957
+ }
1958
+
1959
+ var key = evt.which;
1960
+
1961
+ // We can freely ignore events from modifier keys
1962
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1963
+ return;
1964
+ }
1965
+
1966
+ // Tabbing will be handled during the `keydown` phase
1967
+ if (key == KEYS.TAB) {
1968
+ return;
1969
+ }
1970
+
1971
+ self.handleSearch(evt);
1972
+ }
1973
+ );
1974
+ };
1975
+
1976
+ /**
1977
+ * This method will transfer the tabindex attribute from the rendered
1978
+ * selection to the search box. This allows for the search box to be used as
1979
+ * the primary focus instead of the selection container.
1980
+ *
1981
+ * @private
1982
+ */
1983
+ Search.prototype._transferTabIndex = function (decorated) {
1984
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
1985
+ this.$selection.attr('tabindex', '-1');
1986
+ };
1987
+
1988
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
1989
+ this.$search.attr('placeholder', placeholder.text);
1990
+ };
1991
+
1992
+ Search.prototype.update = function (decorated, data) {
1993
+ var searchHadFocus = this.$search[0] == document.activeElement;
1994
+
1995
+ this.$search.attr('placeholder', '');
1996
+
1997
+ decorated.call(this, data);
1998
+
1999
+ this.$selection.find('.select2-selection__rendered')
2000
+ .append(this.$searchContainer);
2001
+
2002
+ this.resizeSearch();
2003
+ if (searchHadFocus) {
2004
+ this.$search.focus();
2005
+ }
2006
+ };
2007
+
2008
+ Search.prototype.handleSearch = function () {
2009
+ this.resizeSearch();
2010
+
2011
+ if (!this._keyUpPrevented) {
2012
+ var input = this.$search.val();
2013
+
2014
+ this.trigger('query', {
2015
+ term: input
2016
+ });
2017
+ }
2018
+
2019
+ this._keyUpPrevented = false;
2020
+ };
2021
+
2022
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
2023
+ this.trigger('unselect', {
2024
+ data: item
2025
+ });
2026
+
2027
+ this.$search.val(item.text);
2028
+ this.handleSearch();
2029
+ };
2030
+
2031
+ Search.prototype.resizeSearch = function () {
2032
+ this.$search.css('width', '25px');
2033
+
2034
+ var width = '';
2035
+
2036
+ if (this.$search.attr('placeholder') !== '') {
2037
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
2038
+ } else {
2039
+ var minimumWidth = this.$search.val().length + 1;
2040
+
2041
+ width = (minimumWidth * 0.75) + 'em';
2042
+ }
2043
+
2044
+ this.$search.css('width', width);
2045
+ };
2046
+
2047
+ return Search;
2048
+ });
2049
+
2050
+ S2.define('select2/selection/eventRelay',[
2051
+ 'jquery'
2052
+ ], function ($) {
2053
+ function EventRelay () { }
2054
+
2055
+ EventRelay.prototype.bind = function (decorated, container, $container) {
2056
+ var self = this;
2057
+ var relayEvents = [
2058
+ 'open', 'opening',
2059
+ 'close', 'closing',
2060
+ 'select', 'selecting',
2061
+ 'unselect', 'unselecting'
2062
+ ];
2063
+
2064
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
2065
+
2066
+ decorated.call(this, container, $container);
2067
+
2068
+ container.on('*', function (name, params) {
2069
+ // Ignore events that should not be relayed
2070
+ if ($.inArray(name, relayEvents) === -1) {
2071
+ return;
2072
+ }
2073
+
2074
+ // The parameters should always be an object
2075
+ params = params || {};
2076
+
2077
+ // Generate the jQuery event for the Select2 event
2078
+ var evt = $.Event('select2:' + name, {
2079
+ params: params
2080
+ });
2081
+
2082
+ self.$element.trigger(evt);
2083
+
2084
+ // Only handle preventable events if it was one
2085
+ if ($.inArray(name, preventableEvents) === -1) {
2086
+ return;
2087
+ }
2088
+
2089
+ params.prevented = evt.isDefaultPrevented();
2090
+ });
2091
+ };
2092
+
2093
+ return EventRelay;
2094
+ });
2095
+
2096
+ S2.define('select2/translation',[
2097
+ 'jquery',
2098
+ 'require'
2099
+ ], function ($, require) {
2100
+ function Translation (dict) {
2101
+ this.dict = dict || {};
2102
+ }
2103
+
2104
+ Translation.prototype.all = function () {
2105
+ return this.dict;
2106
+ };
2107
+
2108
+ Translation.prototype.get = function (key) {
2109
+ return this.dict[key];
2110
+ };
2111
+
2112
+ Translation.prototype.extend = function (translation) {
2113
+ this.dict = $.extend({}, translation.all(), this.dict);
2114
+ };
2115
+
2116
+ // Static functions
2117
+
2118
+ Translation._cache = {};
2119
+
2120
+ Translation.loadPath = function (path) {
2121
+ if (!(path in Translation._cache)) {
2122
+ var translations = require(path);
2123
+
2124
+ Translation._cache[path] = translations;
2125
+ }
2126
+
2127
+ return new Translation(Translation._cache[path]);
2128
+ };
2129
+
2130
+ return Translation;
2131
+ });
2132
+
2133
+ S2.define('select2/diacritics',[
2134
+
2135
+ ], function () {
2136
+ var diacritics = {
2137
+ '\u24B6': 'A',
2138
+ '\uFF21': 'A',
2139
+ '\u00C0': 'A',
2140
+ '\u00C1': 'A',
2141
+ '\u00C2': 'A',
2142
+ '\u1EA6': 'A',
2143
+ '\u1EA4': 'A',
2144
+ '\u1EAA': 'A',
2145
+ '\u1EA8': 'A',
2146
+ '\u00C3': 'A',
2147
+ '\u0100': 'A',
2148
+ '\u0102': 'A',
2149
+ '\u1EB0': 'A',
2150
+ '\u1EAE': 'A',
2151
+ '\u1EB4': 'A',
2152
+ '\u1EB2': 'A',
2153
+ '\u0226': 'A',
2154
+ '\u01E0': 'A',
2155
+ '\u00C4': 'A',
2156
+ '\u01DE': 'A',
2157
+ '\u1EA2': 'A',
2158
+ '\u00C5': 'A',
2159
+ '\u01FA': 'A',
2160
+ '\u01CD': 'A',
2161
+ '\u0200': 'A',
2162
+ '\u0202': 'A',
2163
+ '\u1EA0': 'A',
2164
+ '\u1EAC': 'A',
2165
+ '\u1EB6': 'A',
2166
+ '\u1E00': 'A',
2167
+ '\u0104': 'A',
2168
+ '\u023A': 'A',
2169
+ '\u2C6F': 'A',
2170
+ '\uA732': 'AA',
2171
+ '\u00C6': 'AE',
2172
+ '\u01FC': 'AE',
2173
+ '\u01E2': 'AE',
2174
+ '\uA734': 'AO',
2175
+ '\uA736': 'AU',
2176
+ '\uA738': 'AV',
2177
+ '\uA73A': 'AV',
2178
+ '\uA73C': 'AY',
2179
+ '\u24B7': 'B',
2180
+ '\uFF22': 'B',
2181
+ '\u1E02': 'B',
2182
+ '\u1E04': 'B',
2183
+ '\u1E06': 'B',
2184
+ '\u0243': 'B',
2185
+ '\u0182': 'B',
2186
+ '\u0181': 'B',
2187
+ '\u24B8': 'C',
2188
+ '\uFF23': 'C',
2189
+ '\u0106': 'C',
2190
+ '\u0108': 'C',
2191
+ '\u010A': 'C',
2192
+ '\u010C': 'C',
2193
+ '\u00C7': 'C',
2194
+ '\u1E08': 'C',
2195
+ '\u0187': 'C',
2196
+ '\u023B': 'C',
2197
+ '\uA73E': 'C',
2198
+ '\u24B9': 'D',
2199
+ '\uFF24': 'D',
2200
+ '\u1E0A': 'D',
2201
+ '\u010E': 'D',
2202
+ '\u1E0C': 'D',
2203
+ '\u1E10': 'D',
2204
+ '\u1E12': 'D',
2205
+ '\u1E0E': 'D',
2206
+ '\u0110': 'D',
2207
+ '\u018B': 'D',
2208
+ '\u018A': 'D',
2209
+ '\u0189': 'D',
2210
+ '\uA779': 'D',
2211
+ '\u01F1': 'DZ',
2212
+ '\u01C4': 'DZ',
2213
+ '\u01F2': 'Dz',
2214
+ '\u01C5': 'Dz',
2215
+ '\u24BA': 'E',
2216
+ '\uFF25': 'E',
2217
+ '\u00C8': 'E',
2218
+ '\u00C9': 'E',
2219
+ '\u00CA': 'E',
2220
+ '\u1EC0': 'E',
2221
+ '\u1EBE': 'E',
2222
+ '\u1EC4': 'E',
2223
+ '\u1EC2': 'E',
2224
+ '\u1EBC': 'E',
2225
+ '\u0112': 'E',
2226
+ '\u1E14': 'E',
2227
+ '\u1E16': 'E',
2228
+ '\u0114': 'E',
2229
+ '\u0116': 'E',
2230
+ '\u00CB': 'E',
2231
+ '\u1EBA': 'E',
2232
+ '\u011A': 'E',
2233
+ '\u0204': 'E',
2234
+ '\u0206': 'E',
2235
+ '\u1EB8': 'E',
2236
+ '\u1EC6': 'E',
2237
+ '\u0228': 'E',
2238
+ '\u1E1C': 'E',
2239
+ '\u0118': 'E',
2240
+ '\u1E18': 'E',
2241
+ '\u1E1A': 'E',
2242
+ '\u0190': 'E',
2243
+ '\u018E': 'E',
2244
+ '\u24BB': 'F',
2245
+ '\uFF26': 'F',
2246
+ '\u1E1E': 'F',
2247
+ '\u0191': 'F',
2248
+ '\uA77B': 'F',
2249
+ '\u24BC': 'G',
2250
+ '\uFF27': 'G',
2251
+ '\u01F4': 'G',
2252
+ '\u011C': 'G',
2253
+ '\u1E20': 'G',
2254
+ '\u011E': 'G',
2255
+ '\u0120': 'G',
2256
+ '\u01E6': 'G',
2257
+ '\u0122': 'G',
2258
+ '\u01E4': 'G',
2259
+ '\u0193': 'G',
2260
+ '\uA7A0': 'G',
2261
+ '\uA77D': 'G',
2262
+ '\uA77E': 'G',
2263
+ '\u24BD': 'H',
2264
+ '\uFF28': 'H',
2265
+ '\u0124': 'H',
2266
+ '\u1E22': 'H',
2267
+ '\u1E26': 'H',
2268
+ '\u021E': 'H',
2269
+ '\u1E24': 'H',
2270
+ '\u1E28': 'H',
2271
+ '\u1E2A': 'H',
2272
+ '\u0126': 'H',
2273
+ '\u2C67': 'H',
2274
+ '\u2C75': 'H',
2275
+ '\uA78D': 'H',
2276
+ '\u24BE': 'I',
2277
+ '\uFF29': 'I',
2278
+ '\u00CC': 'I',
2279
+ '\u00CD': 'I',
2280
+ '\u00CE': 'I',
2281
+ '\u0128': 'I',
2282
+ '\u012A': 'I',
2283
+ '\u012C': 'I',
2284
+ '\u0130': 'I',
2285
+ '\u00CF': 'I',
2286
+ '\u1E2E': 'I',
2287
+ '\u1EC8': 'I',
2288
+ '\u01CF': 'I',
2289
+ '\u0208': 'I',
2290
+ '\u020A': 'I',
2291
+ '\u1ECA': 'I',
2292
+ '\u012E': 'I',
2293
+ '\u1E2C': 'I',
2294
+ '\u0197': 'I',
2295
+ '\u24BF': 'J',
2296
+ '\uFF2A': 'J',
2297
+ '\u0134': 'J',
2298
+ '\u0248': 'J',
2299
+ '\u24C0': 'K',
2300
+ '\uFF2B': 'K',
2301
+ '\u1E30': 'K',
2302
+ '\u01E8': 'K',
2303
+ '\u1E32': 'K',
2304
+ '\u0136': 'K',
2305
+ '\u1E34': 'K',
2306
+ '\u0198': 'K',
2307
+ '\u2C69': 'K',
2308
+ '\uA740': 'K',
2309
+ '\uA742': 'K',
2310
+ '\uA744': 'K',
2311
+ '\uA7A2': 'K',
2312
+ '\u24C1': 'L',
2313
+ '\uFF2C': 'L',
2314
+ '\u013F': 'L',
2315
+ '\u0139': 'L',
2316
+ '\u013D': 'L',
2317
+ '\u1E36': 'L',
2318
+ '\u1E38': 'L',
2319
+ '\u013B': 'L',
2320
+ '\u1E3C': 'L',
2321
+ '\u1E3A': 'L',
2322
+ '\u0141': 'L',
2323
+ '\u023D': 'L',
2324
+ '\u2C62': 'L',
2325
+ '\u2C60': 'L',
2326
+ '\uA748': 'L',
2327
+ '\uA746': 'L',
2328
+ '\uA780': 'L',
2329
+ '\u01C7': 'LJ',
2330
+ '\u01C8': 'Lj',
2331
+ '\u24C2': 'M',
2332
+ '\uFF2D': 'M',
2333
+ '\u1E3E': 'M',
2334
+ '\u1E40': 'M',
2335
+ '\u1E42': 'M',
2336
+ '\u2C6E': 'M',
2337
+ '\u019C': 'M',
2338
+ '\u24C3': 'N',
2339
+ '\uFF2E': 'N',
2340
+ '\u01F8': 'N',
2341
+ '\u0143': 'N',
2342
+ '\u00D1': 'N',
2343
+ '\u1E44': 'N',
2344
+ '\u0147': 'N',
2345
+ '\u1E46': 'N',
2346
+ '\u0145': 'N',
2347
+ '\u1E4A': 'N',
2348
+ '\u1E48': 'N',
2349
+ '\u0220': 'N',
2350
+ '\u019D': 'N',
2351
+ '\uA790': 'N',
2352
+ '\uA7A4': 'N',
2353
+ '\u01CA': 'NJ',
2354
+ '\u01CB': 'Nj',
2355
+ '\u24C4': 'O',
2356
+ '\uFF2F': 'O',
2357
+ '\u00D2': 'O',
2358
+ '\u00D3': 'O',
2359
+ '\u00D4': 'O',
2360
+ '\u1ED2': 'O',
2361
+ '\u1ED0': 'O',
2362
+ '\u1ED6': 'O',
2363
+ '\u1ED4': 'O',
2364
+ '\u00D5': 'O',
2365
+ '\u1E4C': 'O',
2366
+ '\u022C': 'O',
2367
+ '\u1E4E': 'O',
2368
+ '\u014C': 'O',
2369
+ '\u1E50': 'O',
2370
+ '\u1E52': 'O',
2371
+ '\u014E': 'O',
2372
+ '\u022E': 'O',
2373
+ '\u0230': 'O',
2374
+ '\u00D6': 'O',
2375
+ '\u022A': 'O',
2376
+ '\u1ECE': 'O',
2377
+ '\u0150': 'O',
2378
+ '\u01D1': 'O',
2379
+ '\u020C': 'O',
2380
+ '\u020E': 'O',
2381
+ '\u01A0': 'O',
2382
+ '\u1EDC': 'O',
2383
+ '\u1EDA': 'O',
2384
+ '\u1EE0': 'O',
2385
+ '\u1EDE': 'O',
2386
+ '\u1EE2': 'O',
2387
+ '\u1ECC': 'O',
2388
+ '\u1ED8': 'O',
2389
+ '\u01EA': 'O',
2390
+ '\u01EC': 'O',
2391
+ '\u00D8': 'O',
2392
+ '\u01FE': 'O',
2393
+ '\u0186': 'O',
2394
+ '\u019F': 'O',
2395
+ '\uA74A': 'O',
2396
+ '\uA74C': 'O',
2397
+ '\u01A2': 'OI',
2398
+ '\uA74E': 'OO',
2399
+ '\u0222': 'OU',
2400
+ '\u24C5': 'P',
2401
+ '\uFF30': 'P',
2402
+ '\u1E54': 'P',
2403
+ '\u1E56': 'P',
2404
+ '\u01A4': 'P',
2405
+ '\u2C63': 'P',
2406
+ '\uA750': 'P',
2407
+ '\uA752': 'P',
2408
+ '\uA754': 'P',
2409
+ '\u24C6': 'Q',
2410
+ '\uFF31': 'Q',
2411
+ '\uA756': 'Q',
2412
+ '\uA758': 'Q',
2413
+ '\u024A': 'Q',
2414
+ '\u24C7': 'R',
2415
+ '\uFF32': 'R',
2416
+ '\u0154': 'R',
2417
+ '\u1E58': 'R',
2418
+ '\u0158': 'R',
2419
+ '\u0210': 'R',
2420
+ '\u0212': 'R',
2421
+ '\u1E5A': 'R',
2422
+ '\u1E5C': 'R',
2423
+ '\u0156': 'R',
2424
+ '\u1E5E': 'R',
2425
+ '\u024C': 'R',
2426
+ '\u2C64': 'R',
2427
+ '\uA75A': 'R',
2428
+ '\uA7A6': 'R',
2429
+ '\uA782': 'R',
2430
+ '\u24C8': 'S',
2431
+ '\uFF33': 'S',
2432
+ '\u1E9E': 'S',
2433
+ '\u015A': 'S',
2434
+ '\u1E64': 'S',
2435
+ '\u015C': 'S',
2436
+ '\u1E60': 'S',
2437
+ '\u0160': 'S',
2438
+ '\u1E66': 'S',
2439
+ '\u1E62': 'S',
2440
+ '\u1E68': 'S',
2441
+ '\u0218': 'S',
2442
+ '\u015E': 'S',
2443
+ '\u2C7E': 'S',
2444
+ '\uA7A8': 'S',
2445
+ '\uA784': 'S',
2446
+ '\u24C9': 'T',
2447
+ '\uFF34': 'T',
2448
+ '\u1E6A': 'T',
2449
+ '\u0164': 'T',
2450
+ '\u1E6C': 'T',
2451
+ '\u021A': 'T',
2452
+ '\u0162': 'T',
2453
+ '\u1E70': 'T',
2454
+ '\u1E6E': 'T',
2455
+ '\u0166': 'T',
2456
+ '\u01AC': 'T',
2457
+ '\u01AE': 'T',
2458
+ '\u023E': 'T',
2459
+ '\uA786': 'T',
2460
+ '\uA728': 'TZ',
2461
+ '\u24CA': 'U',
2462
+ '\uFF35': 'U',
2463
+ '\u00D9': 'U',
2464
+ '\u00DA': 'U',
2465
+ '\u00DB': 'U',
2466
+ '\u0168': 'U',
2467
+ '\u1E78': 'U',
2468
+ '\u016A': 'U',
2469
+ '\u1E7A': 'U',
2470
+ '\u016C': 'U',
2471
+ '\u00DC': 'U',
2472
+ '\u01DB': 'U',
2473
+ '\u01D7': 'U',
2474
+ '\u01D5': 'U',
2475
+ '\u01D9': 'U',
2476
+ '\u1EE6': 'U',
2477
+ '\u016E': 'U',
2478
+ '\u0170': 'U',
2479
+ '\u01D3': 'U',
2480
+ '\u0214': 'U',
2481
+ '\u0216': 'U',
2482
+ '\u01AF': 'U',
2483
+ '\u1EEA': 'U',
2484
+ '\u1EE8': 'U',
2485
+ '\u1EEE': 'U',
2486
+ '\u1EEC': 'U',
2487
+ '\u1EF0': 'U',
2488
+ '\u1EE4': 'U',
2489
+ '\u1E72': 'U',
2490
+ '\u0172': 'U',
2491
+ '\u1E76': 'U',
2492
+ '\u1E74': 'U',
2493
+ '\u0244': 'U',
2494
+ '\u24CB': 'V',
2495
+ '\uFF36': 'V',
2496
+ '\u1E7C': 'V',
2497
+ '\u1E7E': 'V',
2498
+ '\u01B2': 'V',
2499
+ '\uA75E': 'V',
2500
+ '\u0245': 'V',
2501
+ '\uA760': 'VY',
2502
+ '\u24CC': 'W',
2503
+ '\uFF37': 'W',
2504
+ '\u1E80': 'W',
2505
+ '\u1E82': 'W',
2506
+ '\u0174': 'W',
2507
+ '\u1E86': 'W',
2508
+ '\u1E84': 'W',
2509
+ '\u1E88': 'W',
2510
+ '\u2C72': 'W',
2511
+ '\u24CD': 'X',
2512
+ '\uFF38': 'X',
2513
+ '\u1E8A': 'X',
2514
+ '\u1E8C': 'X',
2515
+ '\u24CE': 'Y',
2516
+ '\uFF39': 'Y',
2517
+ '\u1EF2': 'Y',
2518
+ '\u00DD': 'Y',
2519
+ '\u0176': 'Y',
2520
+ '\u1EF8': 'Y',
2521
+ '\u0232': 'Y',
2522
+ '\u1E8E': 'Y',
2523
+ '\u0178': 'Y',
2524
+ '\u1EF6': 'Y',
2525
+ '\u1EF4': 'Y',
2526
+ '\u01B3': 'Y',
2527
+ '\u024E': 'Y',
2528
+ '\u1EFE': 'Y',
2529
+ '\u24CF': 'Z',
2530
+ '\uFF3A': 'Z',
2531
+ '\u0179': 'Z',
2532
+ '\u1E90': 'Z',
2533
+ '\u017B': 'Z',
2534
+ '\u017D': 'Z',
2535
+ '\u1E92': 'Z',
2536
+ '\u1E94': 'Z',
2537
+ '\u01B5': 'Z',
2538
+ '\u0224': 'Z',
2539
+ '\u2C7F': 'Z',
2540
+ '\u2C6B': 'Z',
2541
+ '\uA762': 'Z',
2542
+ '\u24D0': 'a',
2543
+ '\uFF41': 'a',
2544
+ '\u1E9A': 'a',
2545
+ '\u00E0': 'a',
2546
+ '\u00E1': 'a',
2547
+ '\u00E2': 'a',
2548
+ '\u1EA7': 'a',
2549
+ '\u1EA5': 'a',
2550
+ '\u1EAB': 'a',
2551
+ '\u1EA9': 'a',
2552
+ '\u00E3': 'a',
2553
+ '\u0101': 'a',
2554
+ '\u0103': 'a',
2555
+ '\u1EB1': 'a',
2556
+ '\u1EAF': 'a',
2557
+ '\u1EB5': 'a',
2558
+ '\u1EB3': 'a',
2559
+ '\u0227': 'a',
2560
+ '\u01E1': 'a',
2561
+ '\u00E4': 'a',
2562
+ '\u01DF': 'a',
2563
+ '\u1EA3': 'a',
2564
+ '\u00E5': 'a',
2565
+ '\u01FB': 'a',
2566
+ '\u01CE': 'a',
2567
+ '\u0201': 'a',
2568
+ '\u0203': 'a',
2569
+ '\u1EA1': 'a',
2570
+ '\u1EAD': 'a',
2571
+ '\u1EB7': 'a',
2572
+ '\u1E01': 'a',
2573
+ '\u0105': 'a',
2574
+ '\u2C65': 'a',
2575
+ '\u0250': 'a',
2576
+ '\uA733': 'aa',
2577
+ '\u00E6': 'ae',
2578
+ '\u01FD': 'ae',
2579
+ '\u01E3': 'ae',
2580
+ '\uA735': 'ao',
2581
+ '\uA737': 'au',
2582
+ '\uA739': 'av',
2583
+ '\uA73B': 'av',
2584
+ '\uA73D': 'ay',
2585
+ '\u24D1': 'b',
2586
+ '\uFF42': 'b',
2587
+ '\u1E03': 'b',
2588
+ '\u1E05': 'b',
2589
+ '\u1E07': 'b',
2590
+ '\u0180': 'b',
2591
+ '\u0183': 'b',
2592
+ '\u0253': 'b',
2593
+ '\u24D2': 'c',
2594
+ '\uFF43': 'c',
2595
+ '\u0107': 'c',
2596
+ '\u0109': 'c',
2597
+ '\u010B': 'c',
2598
+ '\u010D': 'c',
2599
+ '\u00E7': 'c',
2600
+ '\u1E09': 'c',
2601
+ '\u0188': 'c',
2602
+ '\u023C': 'c',
2603
+ '\uA73F': 'c',
2604
+ '\u2184': 'c',
2605
+ '\u24D3': 'd',
2606
+ '\uFF44': 'd',
2607
+ '\u1E0B': 'd',
2608
+ '\u010F': 'd',
2609
+ '\u1E0D': 'd',
2610
+ '\u1E11': 'd',
2611
+ '\u1E13': 'd',
2612
+ '\u1E0F': 'd',
2613
+ '\u0111': 'd',
2614
+ '\u018C': 'd',
2615
+ '\u0256': 'd',
2616
+ '\u0257': 'd',
2617
+ '\uA77A': 'd',
2618
+ '\u01F3': 'dz',
2619
+ '\u01C6': 'dz',
2620
+ '\u24D4': 'e',
2621
+ '\uFF45': 'e',
2622
+ '\u00E8': 'e',
2623
+ '\u00E9': 'e',
2624
+ '\u00EA': 'e',
2625
+ '\u1EC1': 'e',
2626
+ '\u1EBF': 'e',
2627
+ '\u1EC5': 'e',
2628
+ '\u1EC3': 'e',
2629
+ '\u1EBD': 'e',
2630
+ '\u0113': 'e',
2631
+ '\u1E15': 'e',
2632
+ '\u1E17': 'e',
2633
+ '\u0115': 'e',
2634
+ '\u0117': 'e',
2635
+ '\u00EB': 'e',
2636
+ '\u1EBB': 'e',
2637
+ '\u011B': 'e',
2638
+ '\u0205': 'e',
2639
+ '\u0207': 'e',
2640
+ '\u1EB9': 'e',
2641
+ '\u1EC7': 'e',
2642
+ '\u0229': 'e',
2643
+ '\u1E1D': 'e',
2644
+ '\u0119': 'e',
2645
+ '\u1E19': 'e',
2646
+ '\u1E1B': 'e',
2647
+ '\u0247': 'e',
2648
+ '\u025B': 'e',
2649
+ '\u01DD': 'e',
2650
+ '\u24D5': 'f',
2651
+ '\uFF46': 'f',
2652
+ '\u1E1F': 'f',
2653
+ '\u0192': 'f',
2654
+ '\uA77C': 'f',
2655
+ '\u24D6': 'g',
2656
+ '\uFF47': 'g',
2657
+ '\u01F5': 'g',
2658
+ '\u011D': 'g',
2659
+ '\u1E21': 'g',
2660
+ '\u011F': 'g',
2661
+ '\u0121': 'g',
2662
+ '\u01E7': 'g',
2663
+ '\u0123': 'g',
2664
+ '\u01E5': 'g',
2665
+ '\u0260': 'g',
2666
+ '\uA7A1': 'g',
2667
+ '\u1D79': 'g',
2668
+ '\uA77F': 'g',
2669
+ '\u24D7': 'h',
2670
+ '\uFF48': 'h',
2671
+ '\u0125': 'h',
2672
+ '\u1E23': 'h',
2673
+ '\u1E27': 'h',
2674
+ '\u021F': 'h',
2675
+ '\u1E25': 'h',
2676
+ '\u1E29': 'h',
2677
+ '\u1E2B': 'h',
2678
+ '\u1E96': 'h',
2679
+ '\u0127': 'h',
2680
+ '\u2C68': 'h',
2681
+ '\u2C76': 'h',
2682
+ '\u0265': 'h',
2683
+ '\u0195': 'hv',
2684
+ '\u24D8': 'i',
2685
+ '\uFF49': 'i',
2686
+ '\u00EC': 'i',
2687
+ '\u00ED': 'i',
2688
+ '\u00EE': 'i',
2689
+ '\u0129': 'i',
2690
+ '\u012B': 'i',
2691
+ '\u012D': 'i',
2692
+ '\u00EF': 'i',
2693
+ '\u1E2F': 'i',
2694
+ '\u1EC9': 'i',
2695
+ '\u01D0': 'i',
2696
+ '\u0209': 'i',
2697
+ '\u020B': 'i',
2698
+ '\u1ECB': 'i',
2699
+ '\u012F': 'i',
2700
+ '\u1E2D': 'i',
2701
+ '\u0268': 'i',
2702
+ '\u0131': 'i',
2703
+ '\u24D9': 'j',
2704
+ '\uFF4A': 'j',
2705
+ '\u0135': 'j',
2706
+ '\u01F0': 'j',
2707
+ '\u0249': 'j',
2708
+ '\u24DA': 'k',
2709
+ '\uFF4B': 'k',
2710
+ '\u1E31': 'k',
2711
+ '\u01E9': 'k',
2712
+ '\u1E33': 'k',
2713
+ '\u0137': 'k',
2714
+ '\u1E35': 'k',
2715
+ '\u0199': 'k',
2716
+ '\u2C6A': 'k',
2717
+ '\uA741': 'k',
2718
+ '\uA743': 'k',
2719
+ '\uA745': 'k',
2720
+ '\uA7A3': 'k',
2721
+ '\u24DB': 'l',
2722
+ '\uFF4C': 'l',
2723
+ '\u0140': 'l',
2724
+ '\u013A': 'l',
2725
+ '\u013E': 'l',
2726
+ '\u1E37': 'l',
2727
+ '\u1E39': 'l',
2728
+ '\u013C': 'l',
2729
+ '\u1E3D': 'l',
2730
+ '\u1E3B': 'l',
2731
+ '\u017F': 'l',
2732
+ '\u0142': 'l',
2733
+ '\u019A': 'l',
2734
+ '\u026B': 'l',
2735
+ '\u2C61': 'l',
2736
+ '\uA749': 'l',
2737
+ '\uA781': 'l',
2738
+ '\uA747': 'l',
2739
+ '\u01C9': 'lj',
2740
+ '\u24DC': 'm',
2741
+ '\uFF4D': 'm',
2742
+ '\u1E3F': 'm',
2743
+ '\u1E41': 'm',
2744
+ '\u1E43': 'm',
2745
+ '\u0271': 'm',
2746
+ '\u026F': 'm',
2747
+ '\u24DD': 'n',
2748
+ '\uFF4E': 'n',
2749
+ '\u01F9': 'n',
2750
+ '\u0144': 'n',
2751
+ '\u00F1': 'n',
2752
+ '\u1E45': 'n',
2753
+ '\u0148': 'n',
2754
+ '\u1E47': 'n',
2755
+ '\u0146': 'n',
2756
+ '\u1E4B': 'n',
2757
+ '\u1E49': 'n',
2758
+ '\u019E': 'n',
2759
+ '\u0272': 'n',
2760
+ '\u0149': 'n',
2761
+ '\uA791': 'n',
2762
+ '\uA7A5': 'n',
2763
+ '\u01CC': 'nj',
2764
+ '\u24DE': 'o',
2765
+ '\uFF4F': 'o',
2766
+ '\u00F2': 'o',
2767
+ '\u00F3': 'o',
2768
+ '\u00F4': 'o',
2769
+ '\u1ED3': 'o',
2770
+ '\u1ED1': 'o',
2771
+ '\u1ED7': 'o',
2772
+ '\u1ED5': 'o',
2773
+ '\u00F5': 'o',
2774
+ '\u1E4D': 'o',
2775
+ '\u022D': 'o',
2776
+ '\u1E4F': 'o',
2777
+ '\u014D': 'o',
2778
+ '\u1E51': 'o',
2779
+ '\u1E53': 'o',
2780
+ '\u014F': 'o',
2781
+ '\u022F': 'o',
2782
+ '\u0231': 'o',
2783
+ '\u00F6': 'o',
2784
+ '\u022B': 'o',
2785
+ '\u1ECF': 'o',
2786
+ '\u0151': 'o',
2787
+ '\u01D2': 'o',
2788
+ '\u020D': 'o',
2789
+ '\u020F': 'o',
2790
+ '\u01A1': 'o',
2791
+ '\u1EDD': 'o',
2792
+ '\u1EDB': 'o',
2793
+ '\u1EE1': 'o',
2794
+ '\u1EDF': 'o',
2795
+ '\u1EE3': 'o',
2796
+ '\u1ECD': 'o',
2797
+ '\u1ED9': 'o',
2798
+ '\u01EB': 'o',
2799
+ '\u01ED': 'o',
2800
+ '\u00F8': 'o',
2801
+ '\u01FF': 'o',
2802
+ '\u0254': 'o',
2803
+ '\uA74B': 'o',
2804
+ '\uA74D': 'o',
2805
+ '\u0275': 'o',
2806
+ '\u01A3': 'oi',
2807
+ '\u0223': 'ou',
2808
+ '\uA74F': 'oo',
2809
+ '\u24DF': 'p',
2810
+ '\uFF50': 'p',
2811
+ '\u1E55': 'p',
2812
+ '\u1E57': 'p',
2813
+ '\u01A5': 'p',
2814
+ '\u1D7D': 'p',
2815
+ '\uA751': 'p',
2816
+ '\uA753': 'p',
2817
+ '\uA755': 'p',
2818
+ '\u24E0': 'q',
2819
+ '\uFF51': 'q',
2820
+ '\u024B': 'q',
2821
+ '\uA757': 'q',
2822
+ '\uA759': 'q',
2823
+ '\u24E1': 'r',
2824
+ '\uFF52': 'r',
2825
+ '\u0155': 'r',
2826
+ '\u1E59': 'r',
2827
+ '\u0159': 'r',
2828
+ '\u0211': 'r',
2829
+ '\u0213': 'r',
2830
+ '\u1E5B': 'r',
2831
+ '\u1E5D': 'r',
2832
+ '\u0157': 'r',
2833
+ '\u1E5F': 'r',
2834
+ '\u024D': 'r',
2835
+ '\u027D': 'r',
2836
+ '\uA75B': 'r',
2837
+ '\uA7A7': 'r',
2838
+ '\uA783': 'r',
2839
+ '\u24E2': 's',
2840
+ '\uFF53': 's',
2841
+ '\u00DF': 's',
2842
+ '\u015B': 's',
2843
+ '\u1E65': 's',
2844
+ '\u015D': 's',
2845
+ '\u1E61': 's',
2846
+ '\u0161': 's',
2847
+ '\u1E67': 's',
2848
+ '\u1E63': 's',
2849
+ '\u1E69': 's',
2850
+ '\u0219': 's',
2851
+ '\u015F': 's',
2852
+ '\u023F': 's',
2853
+ '\uA7A9': 's',
2854
+ '\uA785': 's',
2855
+ '\u1E9B': 's',
2856
+ '\u24E3': 't',
2857
+ '\uFF54': 't',
2858
+ '\u1E6B': 't',
2859
+ '\u1E97': 't',
2860
+ '\u0165': 't',
2861
+ '\u1E6D': 't',
2862
+ '\u021B': 't',
2863
+ '\u0163': 't',
2864
+ '\u1E71': 't',
2865
+ '\u1E6F': 't',
2866
+ '\u0167': 't',
2867
+ '\u01AD': 't',
2868
+ '\u0288': 't',
2869
+ '\u2C66': 't',
2870
+ '\uA787': 't',
2871
+ '\uA729': 'tz',
2872
+ '\u24E4': 'u',
2873
+ '\uFF55': 'u',
2874
+ '\u00F9': 'u',
2875
+ '\u00FA': 'u',
2876
+ '\u00FB': 'u',
2877
+ '\u0169': 'u',
2878
+ '\u1E79': 'u',
2879
+ '\u016B': 'u',
2880
+ '\u1E7B': 'u',
2881
+ '\u016D': 'u',
2882
+ '\u00FC': 'u',
2883
+ '\u01DC': 'u',
2884
+ '\u01D8': 'u',
2885
+ '\u01D6': 'u',
2886
+ '\u01DA': 'u',
2887
+ '\u1EE7': 'u',
2888
+ '\u016F': 'u',
2889
+ '\u0171': 'u',
2890
+ '\u01D4': 'u',
2891
+ '\u0215': 'u',
2892
+ '\u0217': 'u',
2893
+ '\u01B0': 'u',
2894
+ '\u1EEB': 'u',
2895
+ '\u1EE9': 'u',
2896
+ '\u1EEF': 'u',
2897
+ '\u1EED': 'u',
2898
+ '\u1EF1': 'u',
2899
+ '\u1EE5': 'u',
2900
+ '\u1E73': 'u',
2901
+ '\u0173': 'u',
2902
+ '\u1E77': 'u',
2903
+ '\u1E75': 'u',
2904
+ '\u0289': 'u',
2905
+ '\u24E5': 'v',
2906
+ '\uFF56': 'v',
2907
+ '\u1E7D': 'v',
2908
+ '\u1E7F': 'v',
2909
+ '\u028B': 'v',
2910
+ '\uA75F': 'v',
2911
+ '\u028C': 'v',
2912
+ '\uA761': 'vy',
2913
+ '\u24E6': 'w',
2914
+ '\uFF57': 'w',
2915
+ '\u1E81': 'w',
2916
+ '\u1E83': 'w',
2917
+ '\u0175': 'w',
2918
+ '\u1E87': 'w',
2919
+ '\u1E85': 'w',
2920
+ '\u1E98': 'w',
2921
+ '\u1E89': 'w',
2922
+ '\u2C73': 'w',
2923
+ '\u24E7': 'x',
2924
+ '\uFF58': 'x',
2925
+ '\u1E8B': 'x',
2926
+ '\u1E8D': 'x',
2927
+ '\u24E8': 'y',
2928
+ '\uFF59': 'y',
2929
+ '\u1EF3': 'y',
2930
+ '\u00FD': 'y',
2931
+ '\u0177': 'y',
2932
+ '\u1EF9': 'y',
2933
+ '\u0233': 'y',
2934
+ '\u1E8F': 'y',
2935
+ '\u00FF': 'y',
2936
+ '\u1EF7': 'y',
2937
+ '\u1E99': 'y',
2938
+ '\u1EF5': 'y',
2939
+ '\u01B4': 'y',
2940
+ '\u024F': 'y',
2941
+ '\u1EFF': 'y',
2942
+ '\u24E9': 'z',
2943
+ '\uFF5A': 'z',
2944
+ '\u017A': 'z',
2945
+ '\u1E91': 'z',
2946
+ '\u017C': 'z',
2947
+ '\u017E': 'z',
2948
+ '\u1E93': 'z',
2949
+ '\u1E95': 'z',
2950
+ '\u01B6': 'z',
2951
+ '\u0225': 'z',
2952
+ '\u0240': 'z',
2953
+ '\u2C6C': 'z',
2954
+ '\uA763': 'z',
2955
+ '\u0386': '\u0391',
2956
+ '\u0388': '\u0395',
2957
+ '\u0389': '\u0397',
2958
+ '\u038A': '\u0399',
2959
+ '\u03AA': '\u0399',
2960
+ '\u038C': '\u039F',
2961
+ '\u038E': '\u03A5',
2962
+ '\u03AB': '\u03A5',
2963
+ '\u038F': '\u03A9',
2964
+ '\u03AC': '\u03B1',
2965
+ '\u03AD': '\u03B5',
2966
+ '\u03AE': '\u03B7',
2967
+ '\u03AF': '\u03B9',
2968
+ '\u03CA': '\u03B9',
2969
+ '\u0390': '\u03B9',
2970
+ '\u03CC': '\u03BF',
2971
+ '\u03CD': '\u03C5',
2972
+ '\u03CB': '\u03C5',
2973
+ '\u03B0': '\u03C5',
2974
+ '\u03C9': '\u03C9',
2975
+ '\u03C2': '\u03C3'
2976
+ };
2977
+
2978
+ return diacritics;
2979
+ });
2980
+
2981
+ S2.define('select2/data/base',[
2982
+ '../utils'
2983
+ ], function (Utils) {
2984
+ function BaseAdapter ($element, options) {
2985
+ BaseAdapter.__super__.constructor.call(this);
2986
+ }
2987
+
2988
+ Utils.Extend(BaseAdapter, Utils.Observable);
2989
+
2990
+ BaseAdapter.prototype.current = function (callback) {
2991
+ throw new Error('The `current` method must be defined in child classes.');
2992
+ };
2993
+
2994
+ BaseAdapter.prototype.query = function (params, callback) {
2995
+ throw new Error('The `query` method must be defined in child classes.');
2996
+ };
2997
+
2998
+ BaseAdapter.prototype.bind = function (container, $container) {
2999
+ // Can be implemented in subclasses
3000
+ };
3001
+
3002
+ BaseAdapter.prototype.destroy = function () {
3003
+ // Can be implemented in subclasses
3004
+ };
3005
+
3006
+ BaseAdapter.prototype.generateResultId = function (container, data) {
3007
+ var id = container.id + '-result-';
3008
+
3009
+ id += Utils.generateChars(4);
3010
+
3011
+ if (data.id != null) {
3012
+ id += '-' + data.id.toString();
3013
+ } else {
3014
+ id += '-' + Utils.generateChars(4);
3015
+ }
3016
+ return id;
3017
+ };
3018
+
3019
+ return BaseAdapter;
3020
+ });
3021
+
3022
+ S2.define('select2/data/select',[
3023
+ './base',
3024
+ '../utils',
3025
+ 'jquery'
3026
+ ], function (BaseAdapter, Utils, $) {
3027
+ function SelectAdapter ($element, options) {
3028
+ this.$element = $element;
3029
+ this.options = options;
3030
+
3031
+ SelectAdapter.__super__.constructor.call(this);
3032
+ }
3033
+
3034
+ Utils.Extend(SelectAdapter, BaseAdapter);
3035
+
3036
+ SelectAdapter.prototype.current = function (callback) {
3037
+ var data = [];
3038
+ var self = this;
3039
+
3040
+ this.$element.find(':selected').each(function () {
3041
+ var $option = $(this);
3042
+
3043
+ var option = self.item($option);
3044
+
3045
+ data.push(option);
3046
+ });
3047
+
3048
+ callback(data);
3049
+ };
3050
+
3051
+ SelectAdapter.prototype.select = function (data) {
3052
+ var self = this;
3053
+
3054
+ data.selected = true;
3055
+
3056
+ // If data.element is a DOM node, use it instead
3057
+ if ($(data.element).is('option')) {
3058
+ data.element.selected = true;
3059
+
3060
+ this.$element.trigger('change');
3061
+
3062
+ return;
3063
+ }
3064
+
3065
+ if (this.$element.prop('multiple')) {
3066
+ this.current(function (currentData) {
3067
+ var val = [];
3068
+
3069
+ data = [data];
3070
+ data.push.apply(data, currentData);
3071
+
3072
+ for (var d = 0; d < data.length; d++) {
3073
+ var id = data[d].id;
3074
+
3075
+ if ($.inArray(id, val) === -1) {
3076
+ val.push(id);
3077
+ }
3078
+ }
3079
+
3080
+ self.$element.val(val);
3081
+ self.$element.trigger('change');
3082
+ });
3083
+ } else {
3084
+ var val = data.id;
3085
+
3086
+ this.$element.val(val);
3087
+ this.$element.trigger('change');
3088
+ }
3089
+ };
3090
+
3091
+ SelectAdapter.prototype.unselect = function (data) {
3092
+ var self = this;
3093
+
3094
+ if (!this.$element.prop('multiple')) {
3095
+ return;
3096
+ }
3097
+
3098
+ data.selected = false;
3099
+
3100
+ if ($(data.element).is('option')) {
3101
+ data.element.selected = false;
3102
+
3103
+ this.$element.trigger('change');
3104
+
3105
+ return;
3106
+ }
3107
+
3108
+ this.current(function (currentData) {
3109
+ var val = [];
3110
+
3111
+ for (var d = 0; d < currentData.length; d++) {
3112
+ var id = currentData[d].id;
3113
+
3114
+ if (id !== data.id && $.inArray(id, val) === -1) {
3115
+ val.push(id);
3116
+ }
3117
+ }
3118
+
3119
+ self.$element.val(val);
3120
+
3121
+ self.$element.trigger('change');
3122
+ });
3123
+ };
3124
+
3125
+ SelectAdapter.prototype.bind = function (container, $container) {
3126
+ var self = this;
3127
+
3128
+ this.container = container;
3129
+
3130
+ container.on('select', function (params) {
3131
+ self.select(params.data);
3132
+ });
3133
+
3134
+ container.on('unselect', function (params) {
3135
+ self.unselect(params.data);
3136
+ });
3137
+ };
3138
+
3139
+ SelectAdapter.prototype.destroy = function () {
3140
+ // Remove anything added to child elements
3141
+ this.$element.find('*').each(function () {
3142
+ // Remove any custom data set by Select2
3143
+ $.removeData(this, 'data');
3144
+ });
3145
+ };
3146
+
3147
+ SelectAdapter.prototype.query = function (params, callback) {
3148
+ var data = [];
3149
+ var self = this;
3150
+
3151
+ var $options = this.$element.children();
3152
+
3153
+ $options.each(function () {
3154
+ var $option = $(this);
3155
+
3156
+ if (!$option.is('option') && !$option.is('optgroup')) {
3157
+ return;
3158
+ }
3159
+
3160
+ var option = self.item($option);
3161
+
3162
+ var matches = self.matches(params, option);
3163
+
3164
+ if (matches !== null) {
3165
+ data.push(matches);
3166
+ }
3167
+ });
3168
+
3169
+ callback({
3170
+ results: data
3171
+ });
3172
+ };
3173
+
3174
+ SelectAdapter.prototype.addOptions = function ($options) {
3175
+ Utils.appendMany(this.$element, $options);
3176
+ };
3177
+
3178
+ SelectAdapter.prototype.option = function (data) {
3179
+ var option;
3180
+
3181
+ if (data.children) {
3182
+ option = document.createElement('optgroup');
3183
+ option.label = data.text;
3184
+ } else {
3185
+ option = document.createElement('option');
3186
+
3187
+ if (option.textContent !== undefined) {
3188
+ option.textContent = data.text;
3189
+ } else {
3190
+ option.innerText = data.text;
3191
+ }
3192
+ }
3193
+
3194
+ if (data.id) {
3195
+ option.value = data.id;
3196
+ }
3197
+
3198
+ if (data.disabled) {
3199
+ option.disabled = true;
3200
+ }
3201
+
3202
+ if (data.selected) {
3203
+ option.selected = true;
3204
+ }
3205
+
3206
+ if (data.title) {
3207
+ option.title = data.title;
3208
+ }
3209
+
3210
+ var $option = $(option);
3211
+
3212
+ var normalizedData = this._normalizeItem(data);
3213
+ normalizedData.element = option;
3214
+
3215
+ // Override the option's data with the combined data
3216
+ $.data(option, 'data', normalizedData);
3217
+
3218
+ return $option;
3219
+ };
3220
+
3221
+ SelectAdapter.prototype.item = function ($option) {
3222
+ var data = {};
3223
+
3224
+ data = $.data($option[0], 'data');
3225
+
3226
+ if (data != null) {
3227
+ return data;
3228
+ }
3229
+
3230
+ if ($option.is('option')) {
3231
+ data = {
3232
+ id: $option.val(),
3233
+ text: $option.text(),
3234
+ disabled: $option.prop('disabled'),
3235
+ selected: $option.prop('selected'),
3236
+ title: $option.prop('title')
3237
+ };
3238
+ } else if ($option.is('optgroup')) {
3239
+ data = {
3240
+ text: $option.prop('label'),
3241
+ children: [],
3242
+ title: $option.prop('title')
3243
+ };
3244
+
3245
+ var $children = $option.children('option');
3246
+ var children = [];
3247
+
3248
+ for (var c = 0; c < $children.length; c++) {
3249
+ var $child = $($children[c]);
3250
+
3251
+ var child = this.item($child);
3252
+
3253
+ children.push(child);
3254
+ }
3255
+
3256
+ data.children = children;
3257
+ }
3258
+
3259
+ data = this._normalizeItem(data);
3260
+ data.element = $option[0];
3261
+
3262
+ $.data($option[0], 'data', data);
3263
+
3264
+ return data;
3265
+ };
3266
+
3267
+ SelectAdapter.prototype._normalizeItem = function (item) {
3268
+ if (!$.isPlainObject(item)) {
3269
+ item = {
3270
+ id: item,
3271
+ text: item
3272
+ };
3273
+ }
3274
+
3275
+ item = $.extend({}, {
3276
+ text: ''
3277
+ }, item);
3278
+
3279
+ var defaults = {
3280
+ selected: false,
3281
+ disabled: false
3282
+ };
3283
+
3284
+ if (item.id != null) {
3285
+ item.id = item.id.toString();
3286
+ }
3287
+
3288
+ if (item.text != null) {
3289
+ item.text = item.text.toString();
3290
+ }
3291
+
3292
+ if (item._resultId == null && item.id && this.container != null) {
3293
+ item._resultId = this.generateResultId(this.container, item);
3294
+ }
3295
+
3296
+ return $.extend({}, defaults, item);
3297
+ };
3298
+
3299
+ SelectAdapter.prototype.matches = function (params, data) {
3300
+ var matcher = this.options.get('matcher');
3301
+
3302
+ return matcher(params, data);
3303
+ };
3304
+
3305
+ return SelectAdapter;
3306
+ });
3307
+
3308
+ S2.define('select2/data/array',[
3309
+ './select',
3310
+ '../utils',
3311
+ 'jquery'
3312
+ ], function (SelectAdapter, Utils, $) {
3313
+ function ArrayAdapter ($element, options) {
3314
+ var data = options.get('data') || [];
3315
+
3316
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
3317
+
3318
+ this.addOptions(this.convertToOptions(data));
3319
+ }
3320
+
3321
+ Utils.Extend(ArrayAdapter, SelectAdapter);
3322
+
3323
+ ArrayAdapter.prototype.select = function (data) {
3324
+ var $option = this.$element.find('option').filter(function (i, elm) {
3325
+ return elm.value == data.id.toString();
3326
+ });
3327
+
3328
+ if ($option.length === 0) {
3329
+ $option = this.option(data);
3330
+
3331
+ this.addOptions($option);
3332
+ }
3333
+
3334
+ ArrayAdapter.__super__.select.call(this, data);
3335
+ };
3336
+
3337
+ ArrayAdapter.prototype.convertToOptions = function (data) {
3338
+ var self = this;
3339
+
3340
+ var $existing = this.$element.find('option');
3341
+ var existingIds = $existing.map(function () {
3342
+ return self.item($(this)).id;
3343
+ }).get();
3344
+
3345
+ var $options = [];
3346
+
3347
+ // Filter out all items except for the one passed in the argument
3348
+ function onlyItem (item) {
3349
+ return function () {
3350
+ return $(this).val() == item.id;
3351
+ };
3352
+ }
3353
+
3354
+ for (var d = 0; d < data.length; d++) {
3355
+ var item = this._normalizeItem(data[d]);
3356
+
3357
+ // Skip items which were pre-loaded, only merge the data
3358
+ if ($.inArray(item.id, existingIds) >= 0) {
3359
+ var $existingOption = $existing.filter(onlyItem(item));
3360
+
3361
+ var existingData = this.item($existingOption);
3362
+ var newData = $.extend(true, {}, item, existingData);
3363
+
3364
+ var $newOption = this.option(newData);
3365
+
3366
+ $existingOption.replaceWith($newOption);
3367
+
3368
+ continue;
3369
+ }
3370
+
3371
+ var $option = this.option(item);
3372
+
3373
+ if (item.children) {
3374
+ var $children = this.convertToOptions(item.children);
3375
+
3376
+ Utils.appendMany($option, $children);
3377
+ }
3378
+
3379
+ $options.push($option);
3380
+ }
3381
+
3382
+ return $options;
3383
+ };
3384
+
3385
+ return ArrayAdapter;
3386
+ });
3387
+
3388
+ S2.define('select2/data/ajax',[
3389
+ './array',
3390
+ '../utils',
3391
+ 'jquery'
3392
+ ], function (ArrayAdapter, Utils, $) {
3393
+ function AjaxAdapter ($element, options) {
3394
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
3395
+
3396
+ if (this.ajaxOptions.processResults != null) {
3397
+ this.processResults = this.ajaxOptions.processResults;
3398
+ }
3399
+
3400
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
3401
+ }
3402
+
3403
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
3404
+
3405
+ AjaxAdapter.prototype._applyDefaults = function (options) {
3406
+ var defaults = {
3407
+ data: function (params) {
3408
+ return $.extend({}, params, {
3409
+ q: params.term
3410
+ });
3411
+ },
3412
+ transport: function (params, success, failure) {
3413
+ var $request = $.ajax(params);
3414
+
3415
+ $request.then(success);
3416
+ $request.fail(failure);
3417
+
3418
+ return $request;
3419
+ }
3420
+ };
3421
+
3422
+ return $.extend({}, defaults, options, true);
3423
+ };
3424
+
3425
+ AjaxAdapter.prototype.processResults = function (results) {
3426
+ return results;
3427
+ };
3428
+
3429
+ AjaxAdapter.prototype.query = function (params, callback) {
3430
+ var matches = [];
3431
+ var self = this;
3432
+
3433
+ if (this._request != null) {
3434
+ // JSONP requests cannot always be aborted
3435
+ if ($.isFunction(this._request.abort)) {
3436
+ this._request.abort();
3437
+ }
3438
+
3439
+ this._request = null;
3440
+ }
3441
+
3442
+ var options = $.extend({
3443
+ type: 'GET'
3444
+ }, this.ajaxOptions);
3445
+
3446
+ if (typeof options.url === 'function') {
3447
+ options.url = options.url.call(this.$element, params);
3448
+ }
3449
+
3450
+ if (typeof options.data === 'function') {
3451
+ options.data = options.data.call(this.$element, params);
3452
+ }
3453
+
3454
+ function request () {
3455
+ var $request = options.transport(options, function (data) {
3456
+ var results = self.processResults(data, params);
3457
+
3458
+ if (self.options.get('debug') && window.console && console.error) {
3459
+ // Check to make sure that the response included a `results` key.
3460
+ if (!results || !results.results || !$.isArray(results.results)) {
3461
+ console.error(
3462
+ 'Select2: The AJAX results did not return an array in the ' +
3463
+ '`results` key of the response.'
3464
+ );
3465
+ }
3466
+ }
3467
+
3468
+ callback(results);
3469
+ }, function () {
3470
+ // Attempt to detect if a request was aborted
3471
+ // Only works if the transport exposes a status property
3472
+ if ($request.status && $request.status === '0') {
3473
+ return;
3474
+ }
3475
+
3476
+ self.trigger('results:message', {
3477
+ message: 'errorLoading'
3478
+ });
3479
+ });
3480
+
3481
+ self._request = $request;
3482
+ }
3483
+
3484
+ if (this.ajaxOptions.delay && params.term != null) {
3485
+ if (this._queryTimeout) {
3486
+ window.clearTimeout(this._queryTimeout);
3487
+ }
3488
+
3489
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
3490
+ } else {
3491
+ request();
3492
+ }
3493
+ };
3494
+
3495
+ return AjaxAdapter;
3496
+ });
3497
+
3498
+ S2.define('select2/data/tags',[
3499
+ 'jquery'
3500
+ ], function ($) {
3501
+ function Tags (decorated, $element, options) {
3502
+ var tags = options.get('tags');
3503
+
3504
+ var createTag = options.get('createTag');
3505
+
3506
+ if (createTag !== undefined) {
3507
+ this.createTag = createTag;
3508
+ }
3509
+
3510
+ var insertTag = options.get('insertTag');
3511
+
3512
+ if (insertTag !== undefined) {
3513
+ this.insertTag = insertTag;
3514
+ }
3515
+
3516
+ decorated.call(this, $element, options);
3517
+
3518
+ if ($.isArray(tags)) {
3519
+ for (var t = 0; t < tags.length; t++) {
3520
+ var tag = tags[t];
3521
+ var item = this._normalizeItem(tag);
3522
+
3523
+ var $option = this.option(item);
3524
+
3525
+ this.$element.append($option);
3526
+ }
3527
+ }
3528
+ }
3529
+
3530
+ Tags.prototype.query = function (decorated, params, callback) {
3531
+ var self = this;
3532
+
3533
+ this._removeOldTags();
3534
+
3535
+ if (params.term == null || params.page != null) {
3536
+ decorated.call(this, params, callback);
3537
+ return;
3538
+ }
3539
+
3540
+ function wrapper (obj, child) {
3541
+ var data = obj.results;
3542
+
3543
+ for (var i = 0; i < data.length; i++) {
3544
+ var option = data[i];
3545
+
3546
+ var checkChildren = (
3547
+ option.children != null &&
3548
+ !wrapper({
3549
+ results: option.children
3550
+ }, true)
3551
+ );
3552
+
3553
+ var checkText = option.text === params.term;
3554
+
3555
+ if (checkText || checkChildren) {
3556
+ if (child) {
3557
+ return false;
3558
+ }
3559
+
3560
+ obj.data = data;
3561
+ callback(obj);
3562
+
3563
+ return;
3564
+ }
3565
+ }
3566
+
3567
+ if (child) {
3568
+ return true;
3569
+ }
3570
+
3571
+ var tag = self.createTag(params);
3572
+
3573
+ if (tag != null) {
3574
+ var $option = self.option(tag);
3575
+ $option.attr('data-select2-tag', true);
3576
+
3577
+ self.addOptions([$option]);
3578
+
3579
+ self.insertTag(data, tag);
3580
+ }
3581
+
3582
+ obj.results = data;
3583
+
3584
+ callback(obj);
3585
+ }
3586
+
3587
+ decorated.call(this, params, wrapper);
3588
+ };
3589
+
3590
+ Tags.prototype.createTag = function (decorated, params) {
3591
+ var term = $.trim(params.term);
3592
+
3593
+ if (term === '') {
3594
+ return null;
3595
+ }
3596
+
3597
+ return {
3598
+ id: term,
3599
+ text: term
3600
+ };
3601
+ };
3602
+
3603
+ Tags.prototype.insertTag = function (_, data, tag) {
3604
+ data.unshift(tag);
3605
+ };
3606
+
3607
+ Tags.prototype._removeOldTags = function (_) {
3608
+ var tag = this._lastTag;
3609
+
3610
+ var $options = this.$element.find('option[data-select2-tag]');
3611
+
3612
+ $options.each(function () {
3613
+ if (this.selected) {
3614
+ return;
3615
+ }
3616
+
3617
+ $(this).remove();
3618
+ });
3619
+ };
3620
+
3621
+ return Tags;
3622
+ });
3623
+
3624
+ S2.define('select2/data/tokenizer',[
3625
+ 'jquery'
3626
+ ], function ($) {
3627
+ function Tokenizer (decorated, $element, options) {
3628
+ var tokenizer = options.get('tokenizer');
3629
+
3630
+ if (tokenizer !== undefined) {
3631
+ this.tokenizer = tokenizer;
3632
+ }
3633
+
3634
+ decorated.call(this, $element, options);
3635
+ }
3636
+
3637
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
3638
+ decorated.call(this, container, $container);
3639
+
3640
+ this.$search = container.dropdown.$search || container.selection.$search ||
3641
+ $container.find('.select2-search__field');
3642
+ };
3643
+
3644
+ Tokenizer.prototype.query = function (decorated, params, callback) {
3645
+ var self = this;
3646
+
3647
+ function createAndSelect (data) {
3648
+ // Normalize the data object so we can use it for checks
3649
+ var item = self._normalizeItem(data);
3650
+
3651
+ // Check if the data object already exists as a tag
3652
+ // Select it if it doesn't
3653
+ var $existingOptions = self.$element.find('option').filter(function () {
3654
+ return $(this).val() === item.id;
3655
+ });
3656
+
3657
+ // If an existing option wasn't found for it, create the option
3658
+ if (!$existingOptions.length) {
3659
+ var $option = self.option(item);
3660
+ $option.attr('data-select2-tag', true);
3661
+
3662
+ self._removeOldTags();
3663
+ self.addOptions([$option]);
3664
+ }
3665
+
3666
+ // Select the item, now that we know there is an option for it
3667
+ select(item);
3668
+ }
3669
+
3670
+ function select (data) {
3671
+ self.trigger('select', {
3672
+ data: data
3673
+ });
3674
+ }
3675
+
3676
+ params.term = params.term || '';
3677
+
3678
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
3679
+
3680
+ if (tokenData.term !== params.term) {
3681
+ // Replace the search term if we have the search box
3682
+ if (this.$search.length) {
3683
+ this.$search.val(tokenData.term);
3684
+ this.$search.focus();
3685
+ }
3686
+
3687
+ params.term = tokenData.term;
3688
+ }
3689
+
3690
+ decorated.call(this, params, callback);
3691
+ };
3692
+
3693
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
3694
+ var separators = options.get('tokenSeparators') || [];
3695
+ var term = params.term;
3696
+ var i = 0;
3697
+
3698
+ var createTag = this.createTag || function (params) {
3699
+ return {
3700
+ id: params.term,
3701
+ text: params.term
3702
+ };
3703
+ };
3704
+
3705
+ while (i < term.length) {
3706
+ var termChar = term[i];
3707
+
3708
+ if ($.inArray(termChar, separators) === -1) {
3709
+ i++;
3710
+
3711
+ continue;
3712
+ }
3713
+
3714
+ var part = term.substr(0, i);
3715
+ var partParams = $.extend({}, params, {
3716
+ term: part
3717
+ });
3718
+
3719
+ var data = createTag(partParams);
3720
+
3721
+ if (data == null) {
3722
+ i++;
3723
+ continue;
3724
+ }
3725
+
3726
+ callback(data);
3727
+
3728
+ // Reset the term to not include the tokenized portion
3729
+ term = term.substr(i + 1) || '';
3730
+ i = 0;
3731
+ }
3732
+
3733
+ return {
3734
+ term: term
3735
+ };
3736
+ };
3737
+
3738
+ return Tokenizer;
3739
+ });
3740
+
3741
+ S2.define('select2/data/minimumInputLength',[
3742
+
3743
+ ], function () {
3744
+ function MinimumInputLength (decorated, $e, options) {
3745
+ this.minimumInputLength = options.get('minimumInputLength');
3746
+
3747
+ decorated.call(this, $e, options);
3748
+ }
3749
+
3750
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
3751
+ params.term = params.term || '';
3752
+
3753
+ if (params.term.length < this.minimumInputLength) {
3754
+ this.trigger('results:message', {
3755
+ message: 'inputTooShort',
3756
+ args: {
3757
+ minimum: this.minimumInputLength,
3758
+ input: params.term,
3759
+ params: params
3760
+ }
3761
+ });
3762
+
3763
+ return;
3764
+ }
3765
+
3766
+ decorated.call(this, params, callback);
3767
+ };
3768
+
3769
+ return MinimumInputLength;
3770
+ });
3771
+
3772
+ S2.define('select2/data/maximumInputLength',[
3773
+
3774
+ ], function () {
3775
+ function MaximumInputLength (decorated, $e, options) {
3776
+ this.maximumInputLength = options.get('maximumInputLength');
3777
+
3778
+ decorated.call(this, $e, options);
3779
+ }
3780
+
3781
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
3782
+ params.term = params.term || '';
3783
+
3784
+ if (this.maximumInputLength > 0 &&
3785
+ params.term.length > this.maximumInputLength) {
3786
+ this.trigger('results:message', {
3787
+ message: 'inputTooLong',
3788
+ args: {
3789
+ maximum: this.maximumInputLength,
3790
+ input: params.term,
3791
+ params: params
3792
+ }
3793
+ });
3794
+
3795
+ return;
3796
+ }
3797
+
3798
+ decorated.call(this, params, callback);
3799
+ };
3800
+
3801
+ return MaximumInputLength;
3802
+ });
3803
+
3804
+ S2.define('select2/data/maximumSelectionLength',[
3805
+
3806
+ ], function (){
3807
+ function MaximumSelectionLength (decorated, $e, options) {
3808
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
3809
+
3810
+ decorated.call(this, $e, options);
3811
+ }
3812
+
3813
+ MaximumSelectionLength.prototype.query =
3814
+ function (decorated, params, callback) {
3815
+ var self = this;
3816
+
3817
+ this.current(function (currentData) {
3818
+ var count = currentData != null ? currentData.length : 0;
3819
+ if (self.maximumSelectionLength > 0 &&
3820
+ count >= self.maximumSelectionLength) {
3821
+ self.trigger('results:message', {
3822
+ message: 'maximumSelected',
3823
+ args: {
3824
+ maximum: self.maximumSelectionLength
3825
+ }
3826
+ });
3827
+ return;
3828
+ }
3829
+ decorated.call(self, params, callback);
3830
+ });
3831
+ };
3832
+
3833
+ return MaximumSelectionLength;
3834
+ });
3835
+
3836
+ S2.define('select2/dropdown',[
3837
+ 'jquery',
3838
+ './utils'
3839
+ ], function ($, Utils) {
3840
+ function Dropdown ($element, options) {
3841
+ this.$element = $element;
3842
+ this.options = options;
3843
+
3844
+ Dropdown.__super__.constructor.call(this);
3845
+ }
3846
+
3847
+ Utils.Extend(Dropdown, Utils.Observable);
3848
+
3849
+ Dropdown.prototype.render = function () {
3850
+ var $dropdown = $(
3851
+ '<span class="select2-dropdown">' +
3852
+ '<span class="select2-results"></span>' +
3853
+ '</span>'
3854
+ );
3855
+
3856
+ $dropdown.attr('dir', this.options.get('dir'));
3857
+
3858
+ this.$dropdown = $dropdown;
3859
+
3860
+ return $dropdown;
3861
+ };
3862
+
3863
+ Dropdown.prototype.bind = function () {
3864
+ // Should be implemented in subclasses
3865
+ };
3866
+
3867
+ Dropdown.prototype.position = function ($dropdown, $container) {
3868
+ // Should be implmented in subclasses
3869
+ };
3870
+
3871
+ Dropdown.prototype.destroy = function () {
3872
+ // Remove the dropdown from the DOM
3873
+ this.$dropdown.remove();
3874
+ };
3875
+
3876
+ return Dropdown;
3877
+ });
3878
+
3879
+ S2.define('select2/dropdown/search',[
3880
+ 'jquery',
3881
+ '../utils'
3882
+ ], function ($, Utils) {
3883
+ function Search () { }
3884
+
3885
+ Search.prototype.render = function (decorated) {
3886
+ var $rendered = decorated.call(this);
3887
+
3888
+ var $search = $(
3889
+ '<span class="select2-search select2-search--dropdown">' +
3890
+ '<input class="select2-search__field" type="search" tabindex="-1"' +
3891
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
3892
+ ' spellcheck="false" role="textbox" />' +
3893
+ '</span>'
3894
+ );
3895
+
3896
+ this.$searchContainer = $search;
3897
+ this.$search = $search.find('input');
3898
+
3899
+ $rendered.prepend($search);
3900
+
3901
+ return $rendered;
3902
+ };
3903
+
3904
+ Search.prototype.bind = function (decorated, container, $container) {
3905
+ var self = this;
3906
+
3907
+ decorated.call(this, container, $container);
3908
+
3909
+ this.$search.on('keydown', function (evt) {
3910
+ self.trigger('keypress', evt);
3911
+
3912
+ self._keyUpPrevented = evt.isDefaultPrevented();
3913
+ });
3914
+
3915
+ // Workaround for browsers which do not support the `input` event
3916
+ // This will prevent double-triggering of events for browsers which support
3917
+ // both the `keyup` and `input` events.
3918
+ this.$search.on('input', function (evt) {
3919
+ // Unbind the duplicated `keyup` event
3920
+ $(this).off('keyup');
3921
+ });
3922
+
3923
+ this.$search.on('keyup input', function (evt) {
3924
+ self.handleSearch(evt);
3925
+ });
3926
+
3927
+ container.on('open', function () {
3928
+ self.$search.attr('tabindex', 0);
3929
+
3930
+ self.$search.focus();
3931
+
3932
+ window.setTimeout(function () {
3933
+ self.$search.focus();
3934
+ }, 0);
3935
+ });
3936
+
3937
+ container.on('close', function () {
3938
+ self.$search.attr('tabindex', -1);
3939
+
3940
+ self.$search.val('');
3941
+ });
3942
+
3943
+ container.on('focus', function () {
3944
+ if (container.isOpen()) {
3945
+ self.$search.focus();
3946
+ }
3947
+ });
3948
+
3949
+ container.on('results:all', function (params) {
3950
+ if (params.query.term == null || params.query.term === '') {
3951
+ var showSearch = self.showSearch(params);
3952
+
3953
+ if (showSearch) {
3954
+ self.$searchContainer.removeClass('select2-search--hide');
3955
+ } else {
3956
+ self.$searchContainer.addClass('select2-search--hide');
3957
+ }
3958
+ }
3959
+ });
3960
+ };
3961
+
3962
+ Search.prototype.handleSearch = function (evt) {
3963
+ if (!this._keyUpPrevented) {
3964
+ var input = this.$search.val();
3965
+
3966
+ this.trigger('query', {
3967
+ term: input
3968
+ });
3969
+ }
3970
+
3971
+ this._keyUpPrevented = false;
3972
+ };
3973
+
3974
+ Search.prototype.showSearch = function (_, params) {
3975
+ return true;
3976
+ };
3977
+
3978
+ return Search;
3979
+ });
3980
+
3981
+ S2.define('select2/dropdown/hidePlaceholder',[
3982
+
3983
+ ], function () {
3984
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
3985
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
3986
+
3987
+ decorated.call(this, $element, options, dataAdapter);
3988
+ }
3989
+
3990
+ HidePlaceholder.prototype.append = function (decorated, data) {
3991
+ data.results = this.removePlaceholder(data.results);
3992
+
3993
+ decorated.call(this, data);
3994
+ };
3995
+
3996
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
3997
+ if (typeof placeholder === 'string') {
3998
+ placeholder = {
3999
+ id: '',
4000
+ text: placeholder
4001
+ };
4002
+ }
4003
+
4004
+ return placeholder;
4005
+ };
4006
+
4007
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
4008
+ var modifiedData = data.slice(0);
4009
+
4010
+ for (var d = data.length - 1; d >= 0; d--) {
4011
+ var item = data[d];
4012
+
4013
+ if (this.placeholder.id === item.id) {
4014
+ modifiedData.splice(d, 1);
4015
+ }
4016
+ }
4017
+
4018
+ return modifiedData;
4019
+ };
4020
+
4021
+ return HidePlaceholder;
4022
+ });
4023
+
4024
+ S2.define('select2/dropdown/infiniteScroll',[
4025
+ 'jquery'
4026
+ ], function ($) {
4027
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
4028
+ this.lastParams = {};
4029
+
4030
+ decorated.call(this, $element, options, dataAdapter);
4031
+
4032
+ this.$loadingMore = this.createLoadingMore();
4033
+ this.loading = false;
4034
+ }
4035
+
4036
+ InfiniteScroll.prototype.append = function (decorated, data) {
4037
+ this.$loadingMore.remove();
4038
+ this.loading = false;
4039
+
4040
+ decorated.call(this, data);
4041
+
4042
+ if (this.showLoadingMore(data)) {
4043
+ this.$results.append(this.$loadingMore);
4044
+ }
4045
+ };
4046
+
4047
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
4048
+ var self = this;
4049
+
4050
+ decorated.call(this, container, $container);
4051
+
4052
+ container.on('query', function (params) {
4053
+ self.lastParams = params;
4054
+ self.loading = true;
4055
+ });
4056
+
4057
+ container.on('query:append', function (params) {
4058
+ self.lastParams = params;
4059
+ self.loading = true;
4060
+ });
4061
+
4062
+ this.$results.on('scroll', function () {
4063
+ var isLoadMoreVisible = $.contains(
4064
+ document.documentElement,
4065
+ self.$loadingMore[0]
4066
+ );
4067
+
4068
+ if (self.loading || !isLoadMoreVisible) {
4069
+ return;
4070
+ }
4071
+
4072
+ var currentOffset = self.$results.offset().top +
4073
+ self.$results.outerHeight(false);
4074
+ var loadingMoreOffset = self.$loadingMore.offset().top +
4075
+ self.$loadingMore.outerHeight(false);
4076
+
4077
+ if (currentOffset + 50 >= loadingMoreOffset) {
4078
+ self.loadMore();
4079
+ }
4080
+ });
4081
+ };
4082
+
4083
+ InfiniteScroll.prototype.loadMore = function () {
4084
+ this.loading = true;
4085
+
4086
+ var params = $.extend({}, {page: 1}, this.lastParams);
4087
+
4088
+ params.page++;
4089
+
4090
+ this.trigger('query:append', params);
4091
+ };
4092
+
4093
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
4094
+ return data.pagination && data.pagination.more;
4095
+ };
4096
+
4097
+ InfiniteScroll.prototype.createLoadingMore = function () {
4098
+ var $option = $(
4099
+ '<li ' +
4100
+ 'class="select2-results__option select2-results__option--load-more"' +
4101
+ 'role="treeitem" aria-disabled="true"></li>'
4102
+ );
4103
+
4104
+ var message = this.options.get('translations').get('loadingMore');
4105
+
4106
+ $option.html(message(this.lastParams));
4107
+
4108
+ return $option;
4109
+ };
4110
+
4111
+ return InfiniteScroll;
4112
+ });
4113
+
4114
+ S2.define('select2/dropdown/attachBody',[
4115
+ 'jquery',
4116
+ '../utils'
4117
+ ], function ($, Utils) {
4118
+ function AttachBody (decorated, $element, options) {
4119
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
4120
+
4121
+ decorated.call(this, $element, options);
4122
+ }
4123
+
4124
+ AttachBody.prototype.bind = function (decorated, container, $container) {
4125
+ var self = this;
4126
+
4127
+ var setupResultsEvents = false;
4128
+
4129
+ decorated.call(this, container, $container);
4130
+
4131
+ container.on('open', function () {
4132
+ self._showDropdown();
4133
+ self._attachPositioningHandler(container);
4134
+
4135
+ if (!setupResultsEvents) {
4136
+ setupResultsEvents = true;
4137
+
4138
+ container.on('results:all', function () {
4139
+ self._positionDropdown();
4140
+ self._resizeDropdown();
4141
+ });
4142
+
4143
+ container.on('results:append', function () {
4144
+ self._positionDropdown();
4145
+ self._resizeDropdown();
4146
+ });
4147
+ }
4148
+ });
4149
+
4150
+ container.on('close', function () {
4151
+ self._hideDropdown();
4152
+ self._detachPositioningHandler(container);
4153
+ });
4154
+
4155
+ this.$dropdownContainer.on('mousedown', function (evt) {
4156
+ evt.stopPropagation();
4157
+ });
4158
+ };
4159
+
4160
+ AttachBody.prototype.destroy = function (decorated) {
4161
+ decorated.call(this);
4162
+
4163
+ this.$dropdownContainer.remove();
4164
+ };
4165
+
4166
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
4167
+ // Clone all of the container classes
4168
+ $dropdown.attr('class', $container.attr('class'));
4169
+
4170
+ $dropdown.removeClass('select2');
4171
+ $dropdown.addClass('select2-container--open');
4172
+
4173
+ $dropdown.css({
4174
+ position: 'absolute',
4175
+ top: -999999
4176
+ });
4177
+
4178
+ this.$container = $container;
4179
+ };
4180
+
4181
+ AttachBody.prototype.render = function (decorated) {
4182
+ var $container = $('<span></span>');
4183
+
4184
+ var $dropdown = decorated.call(this);
4185
+ $container.append($dropdown);
4186
+
4187
+ this.$dropdownContainer = $container;
4188
+
4189
+ return $container;
4190
+ };
4191
+
4192
+ AttachBody.prototype._hideDropdown = function (decorated) {
4193
+ this.$dropdownContainer.detach();
4194
+ };
4195
+
4196
+ AttachBody.prototype._attachPositioningHandler =
4197
+ function (decorated, container) {
4198
+ var self = this;
4199
+
4200
+ var scrollEvent = 'scroll.select2.' + container.id;
4201
+ var resizeEvent = 'resize.select2.' + container.id;
4202
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4203
+
4204
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4205
+ $watchers.each(function () {
4206
+ $(this).data('select2-scroll-position', {
4207
+ x: $(this).scrollLeft(),
4208
+ y: $(this).scrollTop()
4209
+ });
4210
+ });
4211
+
4212
+ $watchers.on(scrollEvent, function (ev) {
4213
+ var position = $(this).data('select2-scroll-position');
4214
+ $(this).scrollTop(position.y);
4215
+ });
4216
+
4217
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
4218
+ function (e) {
4219
+ self._positionDropdown();
4220
+ self._resizeDropdown();
4221
+ });
4222
+ };
4223
+
4224
+ AttachBody.prototype._detachPositioningHandler =
4225
+ function (decorated, container) {
4226
+ var scrollEvent = 'scroll.select2.' + container.id;
4227
+ var resizeEvent = 'resize.select2.' + container.id;
4228
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4229
+
4230
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4231
+ $watchers.off(scrollEvent);
4232
+
4233
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
4234
+ };
4235
+
4236
+ AttachBody.prototype._positionDropdown = function () {
4237
+ var $window = $(window);
4238
+
4239
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
4240
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
4241
+
4242
+ var newDirection = null;
4243
+
4244
+ var offset = this.$container.offset();
4245
+
4246
+ offset.bottom = offset.top + this.$container.outerHeight(false);
4247
+
4248
+ var container = {
4249
+ height: this.$container.outerHeight(false)
4250
+ };
4251
+
4252
+ container.top = offset.top;
4253
+ container.bottom = offset.top + container.height;
4254
+
4255
+ var dropdown = {
4256
+ height: this.$dropdown.outerHeight(false)
4257
+ };
4258
+
4259
+ var viewport = {
4260
+ top: $window.scrollTop(),
4261
+ bottom: $window.scrollTop() + $window.height()
4262
+ };
4263
+
4264
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
4265
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
4266
+
4267
+ var css = {
4268
+ left: offset.left,
4269
+ top: container.bottom
4270
+ };
4271
+
4272
+ // Determine what the parent element is to use for calciulating the offset
4273
+ var $offsetParent = this.$dropdownParent;
4274
+
4275
+ // For statically positoned elements, we need to get the element
4276
+ // that is determining the offset
4277
+ if ($offsetParent.css('position') === 'static') {
4278
+ $offsetParent = $offsetParent.offsetParent();
4279
+ }
4280
+
4281
+ var parentOffset = $offsetParent.offset();
4282
+
4283
+ css.top -= parentOffset.top;
4284
+ css.left -= parentOffset.left;
4285
+
4286
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
4287
+ newDirection = 'below';
4288
+ }
4289
+
4290
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
4291
+ newDirection = 'above';
4292
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
4293
+ newDirection = 'below';
4294
+ }
4295
+
4296
+ if (newDirection == 'above' ||
4297
+ (isCurrentlyAbove && newDirection !== 'below')) {
4298
+ css.top = container.top - parentOffset.top - dropdown.height;
4299
+ }
4300
+
4301
+ if (newDirection != null) {
4302
+ this.$dropdown
4303
+ .removeClass('select2-dropdown--below select2-dropdown--above')
4304
+ .addClass('select2-dropdown--' + newDirection);
4305
+ this.$container
4306
+ .removeClass('select2-container--below select2-container--above')
4307
+ .addClass('select2-container--' + newDirection);
4308
+ }
4309
+
4310
+ this.$dropdownContainer.css(css);
4311
+ };
4312
+
4313
+ AttachBody.prototype._resizeDropdown = function () {
4314
+ var css = {
4315
+ width: this.$container.outerWidth(false) + 'px'
4316
+ };
4317
+
4318
+ if (this.options.get('dropdownAutoWidth')) {
4319
+ css.minWidth = css.width;
4320
+ css.position = 'relative';
4321
+ css.width = 'auto';
4322
+ }
4323
+
4324
+ this.$dropdown.css(css);
4325
+ };
4326
+
4327
+ AttachBody.prototype._showDropdown = function (decorated) {
4328
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
4329
+
4330
+ this._positionDropdown();
4331
+ this._resizeDropdown();
4332
+ };
4333
+
4334
+ return AttachBody;
4335
+ });
4336
+
4337
+ S2.define('select2/dropdown/minimumResultsForSearch',[
4338
+
4339
+ ], function () {
4340
+ function countResults (data) {
4341
+ var count = 0;
4342
+
4343
+ for (var d = 0; d < data.length; d++) {
4344
+ var item = data[d];
4345
+
4346
+ if (item.children) {
4347
+ count += countResults(item.children);
4348
+ } else {
4349
+ count++;
4350
+ }
4351
+ }
4352
+
4353
+ return count;
4354
+ }
4355
+
4356
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
4357
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
4358
+
4359
+ if (this.minimumResultsForSearch < 0) {
4360
+ this.minimumResultsForSearch = Infinity;
4361
+ }
4362
+
4363
+ decorated.call(this, $element, options, dataAdapter);
4364
+ }
4365
+
4366
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
4367
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
4368
+ return false;
4369
+ }
4370
+
4371
+ return decorated.call(this, params);
4372
+ };
4373
+
4374
+ return MinimumResultsForSearch;
4375
+ });
4376
+
4377
+ S2.define('select2/dropdown/selectOnClose',[
4378
+
4379
+ ], function () {
4380
+ function SelectOnClose () { }
4381
+
4382
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
4383
+ var self = this;
4384
+
4385
+ decorated.call(this, container, $container);
4386
+
4387
+ container.on('close', function (params) {
4388
+ self._handleSelectOnClose(params);
4389
+ });
4390
+ };
4391
+
4392
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
4393
+ if (params && params.originalSelect2Event != null) {
4394
+ var event = params.originalSelect2Event;
4395
+
4396
+ // Don't select an item if the close event was triggered from a select or
4397
+ // unselect event
4398
+ if (event._type === 'select' || event._type === 'unselect') {
4399
+ return;
4400
+ }
4401
+ }
4402
+
4403
+ var $highlightedResults = this.getHighlightedResults();
4404
+
4405
+ // Only select highlighted results
4406
+ if ($highlightedResults.length < 1) {
4407
+ return;
4408
+ }
4409
+
4410
+ var data = $highlightedResults.data('data');
4411
+
4412
+ // Don't re-select already selected resulte
4413
+ if (
4414
+ (data.element != null && data.element.selected) ||
4415
+ (data.element == null && data.selected)
4416
+ ) {
4417
+ return;
4418
+ }
4419
+
4420
+ this.trigger('select', {
4421
+ data: data
4422
+ });
4423
+ };
4424
+
4425
+ return SelectOnClose;
4426
+ });
4427
+
4428
+ S2.define('select2/dropdown/closeOnSelect',[
4429
+
4430
+ ], function () {
4431
+ function CloseOnSelect () { }
4432
+
4433
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
4434
+ var self = this;
4435
+
4436
+ decorated.call(this, container, $container);
4437
+
4438
+ container.on('select', function (evt) {
4439
+ self._selectTriggered(evt);
4440
+ });
4441
+
4442
+ container.on('unselect', function (evt) {
4443
+ self._selectTriggered(evt);
4444
+ });
4445
+ };
4446
+
4447
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
4448
+ var originalEvent = evt.originalEvent;
4449
+
4450
+ // Don't close if the control key is being held
4451
+ if (originalEvent && originalEvent.ctrlKey) {
4452
+ return;
4453
+ }
4454
+
4455
+ this.trigger('close', {
4456
+ originalEvent: originalEvent,
4457
+ originalSelect2Event: evt
4458
+ });
4459
+ };
4460
+
4461
+ return CloseOnSelect;
4462
+ });
4463
+
4464
+ S2.define('select2/i18n/en',[],function () {
4465
+ // English
4466
+ return {
4467
+ errorLoading: function () {
4468
+ return 'The results could not be loaded.';
4469
+ },
4470
+ inputTooLong: function (args) {
4471
+ var overChars = args.input.length - args.maximum;
4472
+
4473
+ var message = 'Please delete ' + overChars + ' character';
4474
+
4475
+ if (overChars != 1) {
4476
+ message += 's';
4477
+ }
4478
+
4479
+ return message;
4480
+ },
4481
+ inputTooShort: function (args) {
4482
+ var remainingChars = args.minimum - args.input.length;
4483
+
4484
+ var message = 'Please enter ' + remainingChars + ' or more characters';
4485
+
4486
+ return message;
4487
+ },
4488
+ loadingMore: function () {
4489
+ return 'Loading more results…';
4490
+ },
4491
+ maximumSelected: function (args) {
4492
+ var message = 'You can only select ' + args.maximum + ' item';
4493
+
4494
+ if (args.maximum != 1) {
4495
+ message += 's';
4496
+ }
4497
+
4498
+ return message;
4499
+ },
4500
+ noResults: function () {
4501
+ return 'No results found';
4502
+ },
4503
+ searching: function () {
4504
+ return 'Searching…';
4505
+ }
4506
+ };
4507
+ });
4508
+
4509
+ S2.define('select2/defaults',[
4510
+ 'jquery',
4511
+ 'require',
4512
+
4513
+ './results',
4514
+
4515
+ './selection/single',
4516
+ './selection/multiple',
4517
+ './selection/placeholder',
4518
+ './selection/allowClear',
4519
+ './selection/search',
4520
+ './selection/eventRelay',
4521
+
4522
+ './utils',
4523
+ './translation',
4524
+ './diacritics',
4525
+
4526
+ './data/select',
4527
+ './data/array',
4528
+ './data/ajax',
4529
+ './data/tags',
4530
+ './data/tokenizer',
4531
+ './data/minimumInputLength',
4532
+ './data/maximumInputLength',
4533
+ './data/maximumSelectionLength',
4534
+
4535
+ './dropdown',
4536
+ './dropdown/search',
4537
+ './dropdown/hidePlaceholder',
4538
+ './dropdown/infiniteScroll',
4539
+ './dropdown/attachBody',
4540
+ './dropdown/minimumResultsForSearch',
4541
+ './dropdown/selectOnClose',
4542
+ './dropdown/closeOnSelect',
4543
+
4544
+ './i18n/en'
4545
+ ], function ($, require,
4546
+
4547
+ ResultsList,
4548
+
4549
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
4550
+ SelectionSearch, EventRelay,
4551
+
4552
+ Utils, Translation, DIACRITICS,
4553
+
4554
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
4555
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
4556
+
4557
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
4558
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
4559
+
4560
+ EnglishTranslation) {
4561
+ function Defaults () {
4562
+ this.reset();
4563
+ }
4564
+
4565
+ Defaults.prototype.apply = function (options) {
4566
+ options = $.extend(true, {}, this.defaults, options);
4567
+
4568
+ if (options.dataAdapter == null) {
4569
+ if (options.ajax != null) {
4570
+ options.dataAdapter = AjaxData;
4571
+ } else if (options.data != null) {
4572
+ options.dataAdapter = ArrayData;
4573
+ } else {
4574
+ options.dataAdapter = SelectData;
4575
+ }
4576
+
4577
+ if (options.minimumInputLength > 0) {
4578
+ options.dataAdapter = Utils.Decorate(
4579
+ options.dataAdapter,
4580
+ MinimumInputLength
4581
+ );
4582
+ }
4583
+
4584
+ if (options.maximumInputLength > 0) {
4585
+ options.dataAdapter = Utils.Decorate(
4586
+ options.dataAdapter,
4587
+ MaximumInputLength
4588
+ );
4589
+ }
4590
+
4591
+ if (options.maximumSelectionLength > 0) {
4592
+ options.dataAdapter = Utils.Decorate(
4593
+ options.dataAdapter,
4594
+ MaximumSelectionLength
4595
+ );
4596
+ }
4597
+
4598
+ if (options.tags) {
4599
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
4600
+ }
4601
+
4602
+ if (options.tokenSeparators != null || options.tokenizer != null) {
4603
+ options.dataAdapter = Utils.Decorate(
4604
+ options.dataAdapter,
4605
+ Tokenizer
4606
+ );
4607
+ }
4608
+
4609
+ if (options.query != null) {
4610
+ var Query = require(options.amdBase + 'compat/query');
4611
+
4612
+ options.dataAdapter = Utils.Decorate(
4613
+ options.dataAdapter,
4614
+ Query
4615
+ );
4616
+ }
4617
+
4618
+ if (options.initSelection != null) {
4619
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
4620
+
4621
+ options.dataAdapter = Utils.Decorate(
4622
+ options.dataAdapter,
4623
+ InitSelection
4624
+ );
4625
+ }
4626
+ }
4627
+
4628
+ if (options.resultsAdapter == null) {
4629
+ options.resultsAdapter = ResultsList;
4630
+
4631
+ if (options.ajax != null) {
4632
+ options.resultsAdapter = Utils.Decorate(
4633
+ options.resultsAdapter,
4634
+ InfiniteScroll
4635
+ );
4636
+ }
4637
+
4638
+ if (options.placeholder != null) {
4639
+ options.resultsAdapter = Utils.Decorate(
4640
+ options.resultsAdapter,
4641
+ HidePlaceholder
4642
+ );
4643
+ }
4644
+
4645
+ if (options.selectOnClose) {
4646
+ options.resultsAdapter = Utils.Decorate(
4647
+ options.resultsAdapter,
4648
+ SelectOnClose
4649
+ );
4650
+ }
4651
+ }
4652
+
4653
+ if (options.dropdownAdapter == null) {
4654
+ if (options.multiple) {
4655
+ options.dropdownAdapter = Dropdown;
4656
+ } else {
4657
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
4658
+
4659
+ options.dropdownAdapter = SearchableDropdown;
4660
+ }
4661
+
4662
+ if (options.minimumResultsForSearch !== 0) {
4663
+ options.dropdownAdapter = Utils.Decorate(
4664
+ options.dropdownAdapter,
4665
+ MinimumResultsForSearch
4666
+ );
4667
+ }
4668
+
4669
+ if (options.closeOnSelect) {
4670
+ options.dropdownAdapter = Utils.Decorate(
4671
+ options.dropdownAdapter,
4672
+ CloseOnSelect
4673
+ );
4674
+ }
4675
+
4676
+ if (
4677
+ options.dropdownCssClass != null ||
4678
+ options.dropdownCss != null ||
4679
+ options.adaptDropdownCssClass != null
4680
+ ) {
4681
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
4682
+
4683
+ options.dropdownAdapter = Utils.Decorate(
4684
+ options.dropdownAdapter,
4685
+ DropdownCSS
4686
+ );
4687
+ }
4688
+
4689
+ options.dropdownAdapter = Utils.Decorate(
4690
+ options.dropdownAdapter,
4691
+ AttachBody
4692
+ );
4693
+ }
4694
+
4695
+ if (options.selectionAdapter == null) {
4696
+ if (options.multiple) {
4697
+ options.selectionAdapter = MultipleSelection;
4698
+ } else {
4699
+ options.selectionAdapter = SingleSelection;
4700
+ }
4701
+
4702
+ // Add the placeholder mixin if a placeholder was specified
4703
+ if (options.placeholder != null) {
4704
+ options.selectionAdapter = Utils.Decorate(
4705
+ options.selectionAdapter,
4706
+ Placeholder
4707
+ );
4708
+ }
4709
+
4710
+ if (options.allowClear) {
4711
+ options.selectionAdapter = Utils.Decorate(
4712
+ options.selectionAdapter,
4713
+ AllowClear
4714
+ );
4715
+ }
4716
+
4717
+ if (options.multiple) {
4718
+ options.selectionAdapter = Utils.Decorate(
4719
+ options.selectionAdapter,
4720
+ SelectionSearch
4721
+ );
4722
+ }
4723
+
4724
+ if (
4725
+ options.containerCssClass != null ||
4726
+ options.containerCss != null ||
4727
+ options.adaptContainerCssClass != null
4728
+ ) {
4729
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
4730
+
4731
+ options.selectionAdapter = Utils.Decorate(
4732
+ options.selectionAdapter,
4733
+ ContainerCSS
4734
+ );
4735
+ }
4736
+
4737
+ options.selectionAdapter = Utils.Decorate(
4738
+ options.selectionAdapter,
4739
+ EventRelay
4740
+ );
4741
+ }
4742
+
4743
+ if (typeof options.language === 'string') {
4744
+ // Check if the language is specified with a region
4745
+ if (options.language.indexOf('-') > 0) {
4746
+ // Extract the region information if it is included
4747
+ var languageParts = options.language.split('-');
4748
+ var baseLanguage = languageParts[0];
4749
+
4750
+ options.language = [options.language, baseLanguage];
4751
+ } else {
4752
+ options.language = [options.language];
4753
+ }
4754
+ }
4755
+
4756
+ if ($.isArray(options.language)) {
4757
+ var languages = new Translation();
4758
+ options.language.push('en');
4759
+
4760
+ var languageNames = options.language;
4761
+
4762
+ for (var l = 0; l < languageNames.length; l++) {
4763
+ var name = languageNames[l];
4764
+ var language = {};
4765
+
4766
+ try {
4767
+ // Try to load it with the original name
4768
+ language = Translation.loadPath(name);
4769
+ } catch (e) {
4770
+ try {
4771
+ // If we couldn't load it, check if it wasn't the full path
4772
+ name = this.defaults.amdLanguageBase + name;
4773
+ language = Translation.loadPath(name);
4774
+ } catch (ex) {
4775
+ // The translation could not be loaded at all. Sometimes this is
4776
+ // because of a configuration problem, other times this can be
4777
+ // because of how Select2 helps load all possible translation files.
4778
+ if (options.debug && window.console && console.warn) {
4779
+ console.warn(
4780
+ 'Select2: The language file for "' + name + '" could not be ' +
4781
+ 'automatically loaded. A fallback will be used instead.'
4782
+ );
4783
+ }
4784
+
4785
+ continue;
4786
+ }
4787
+ }
4788
+
4789
+ languages.extend(language);
4790
+ }
4791
+
4792
+ options.translations = languages;
4793
+ } else {
4794
+ var baseTranslation = Translation.loadPath(
4795
+ this.defaults.amdLanguageBase + 'en'
4796
+ );
4797
+ var customTranslation = new Translation(options.language);
4798
+
4799
+ customTranslation.extend(baseTranslation);
4800
+
4801
+ options.translations = customTranslation;
4802
+ }
4803
+
4804
+ return options;
4805
+ };
4806
+
4807
+ Defaults.prototype.reset = function () {
4808
+ function stripDiacritics (text) {
4809
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
4810
+ function match(a) {
4811
+ return DIACRITICS[a] || a;
4812
+ }
4813
+
4814
+ return text.replace(/[^\u0000-\u007E]/g, match);
4815
+ }
4816
+
4817
+ function matcher (params, data) {
4818
+ // Always return the object if there is nothing to compare
4819
+ if ($.trim(params.term) === '') {
4820
+ return data;
4821
+ }
4822
+
4823
+ // Do a recursive check for options with children
4824
+ if (data.children && data.children.length > 0) {
4825
+ // Clone the data object if there are children
4826
+ // This is required as we modify the object to remove any non-matches
4827
+ var match = $.extend(true, {}, data);
4828
+
4829
+ // Check each child of the option
4830
+ for (var c = data.children.length - 1; c >= 0; c--) {
4831
+ var child = data.children[c];
4832
+
4833
+ var matches = matcher(params, child);
4834
+
4835
+ // If there wasn't a match, remove the object in the array
4836
+ if (matches == null) {
4837
+ match.children.splice(c, 1);
4838
+ }
4839
+ }
4840
+
4841
+ // If any children matched, return the new object
4842
+ if (match.children.length > 0) {
4843
+ return match;
4844
+ }
4845
+
4846
+ // If there were no matching children, check just the plain object
4847
+ return matcher(params, match);
4848
+ }
4849
+
4850
+ var original = stripDiacritics(data.text).toUpperCase();
4851
+ var term = stripDiacritics(params.term).toUpperCase();
4852
+
4853
+ // Check if the text contains the term
4854
+ if (original.indexOf(term) > -1) {
4855
+ return data;
4856
+ }
4857
+
4858
+ // If it doesn't contain the term, don't return anything
4859
+ return null;
4860
+ }
4861
+
4862
+ this.defaults = {
4863
+ amdBase: './',
4864
+ amdLanguageBase: './i18n/',
4865
+ closeOnSelect: true,
4866
+ debug: false,
4867
+ dropdownAutoWidth: false,
4868
+ escapeMarkup: Utils.escapeMarkup,
4869
+ language: EnglishTranslation,
4870
+ matcher: matcher,
4871
+ minimumInputLength: 0,
4872
+ maximumInputLength: 0,
4873
+ maximumSelectionLength: 0,
4874
+ minimumResultsForSearch: 0,
4875
+ selectOnClose: false,
4876
+ sorter: function (data) {
4877
+ return data;
4878
+ },
4879
+ templateResult: function (result) {
4880
+ return result.text;
4881
+ },
4882
+ templateSelection: function (selection) {
4883
+ return selection.text;
4884
+ },
4885
+ theme: 'default',
4886
+ width: 'resolve'
4887
+ };
4888
+ };
4889
+
4890
+ Defaults.prototype.set = function (key, value) {
4891
+ var camelKey = $.camelCase(key);
4892
+
4893
+ var data = {};
4894
+ data[camelKey] = value;
4895
+
4896
+ var convertedData = Utils._convertData(data);
4897
+
4898
+ $.extend(this.defaults, convertedData);
4899
+ };
4900
+
4901
+ var defaults = new Defaults();
4902
+
4903
+ return defaults;
4904
+ });
4905
+
4906
+ S2.define('select2/options',[
4907
+ 'require',
4908
+ 'jquery',
4909
+ './defaults',
4910
+ './utils'
4911
+ ], function (require, $, Defaults, Utils) {
4912
+ function Options (options, $element) {
4913
+ this.options = options;
4914
+
4915
+ if ($element != null) {
4916
+ this.fromElement($element);
4917
+ }
4918
+
4919
+ this.options = Defaults.apply(this.options);
4920
+
4921
+ if ($element && $element.is('input')) {
4922
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
4923
+
4924
+ this.options.dataAdapter = Utils.Decorate(
4925
+ this.options.dataAdapter,
4926
+ InputCompat
4927
+ );
4928
+ }
4929
+ }
4930
+
4931
+ Options.prototype.fromElement = function ($e) {
4932
+ var excludedData = ['select2'];
4933
+
4934
+ if (this.options.multiple == null) {
4935
+ this.options.multiple = $e.prop('multiple');
4936
+ }
4937
+
4938
+ if (this.options.disabled == null) {
4939
+ this.options.disabled = $e.prop('disabled');
4940
+ }
4941
+
4942
+ if (this.options.language == null) {
4943
+ if ($e.prop('lang')) {
4944
+ this.options.language = $e.prop('lang').toLowerCase();
4945
+ } else if ($e.closest('[lang]').prop('lang')) {
4946
+ this.options.language = $e.closest('[lang]').prop('lang');
4947
+ }
4948
+ }
4949
+
4950
+ if (this.options.dir == null) {
4951
+ if ($e.prop('dir')) {
4952
+ this.options.dir = $e.prop('dir');
4953
+ } else if ($e.closest('[dir]').prop('dir')) {
4954
+ this.options.dir = $e.closest('[dir]').prop('dir');
4955
+ } else {
4956
+ this.options.dir = 'ltr';
4957
+ }
4958
+ }
4959
+
4960
+ $e.prop('disabled', this.options.disabled);
4961
+ $e.prop('multiple', this.options.multiple);
4962
+
4963
+ if ($e.data('select2Tags')) {
4964
+ if (this.options.debug && window.console && console.warn) {
4965
+ console.warn(
4966
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
4967
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
4968
+ 'removed in future versions of Select2.'
4969
+ );
4970
+ }
4971
+
4972
+ $e.data('data', $e.data('select2Tags'));
4973
+ $e.data('tags', true);
4974
+ }
4975
+
4976
+ if ($e.data('ajaxUrl')) {
4977
+ if (this.options.debug && window.console && console.warn) {
4978
+ console.warn(
4979
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
4980
+ '`data-ajax--url` and support for the old attribute will be removed' +
4981
+ ' in future versions of Select2.'
4982
+ );
4983
+ }
4984
+
4985
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
4986
+ $e.data('ajax--url', $e.data('ajaxUrl'));
4987
+ }
4988
+
4989
+ var dataset = {};
4990
+
4991
+ // Prefer the element's `dataset` attribute if it exists
4992
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
4993
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
4994
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
4995
+ } else {
4996
+ dataset = $e.data();
4997
+ }
4998
+
4999
+ var data = $.extend(true, {}, dataset);
5000
+
5001
+ data = Utils._convertData(data);
5002
+
5003
+ for (var key in data) {
5004
+ if ($.inArray(key, excludedData) > -1) {
5005
+ continue;
5006
+ }
5007
+
5008
+ if ($.isPlainObject(this.options[key])) {
5009
+ $.extend(this.options[key], data[key]);
5010
+ } else {
5011
+ this.options[key] = data[key];
5012
+ }
5013
+ }
5014
+
5015
+ return this;
5016
+ };
5017
+
5018
+ Options.prototype.get = function (key) {
5019
+ return this.options[key];
5020
+ };
5021
+
5022
+ Options.prototype.set = function (key, val) {
5023
+ this.options[key] = val;
5024
+ };
5025
+
5026
+ return Options;
5027
+ });
5028
+
5029
+ S2.define('select2/core',[
5030
+ 'jquery',
5031
+ './options',
5032
+ './utils',
5033
+ './keys'
5034
+ ], function ($, Options, Utils, KEYS) {
5035
+ var Select2 = function ($element, options) {
5036
+ if ($element.data('select2') != null) {
5037
+ $element.data('select2').destroy();
5038
+ }
5039
+
5040
+ this.$element = $element;
5041
+
5042
+ this.id = this._generateId($element);
5043
+
5044
+ options = options || {};
5045
+
5046
+ this.options = new Options(options, $element);
5047
+
5048
+ Select2.__super__.constructor.call(this);
5049
+
5050
+ // Set up the tabindex
5051
+
5052
+ var tabindex = $element.attr('tabindex') || 0;
5053
+ $element.data('old-tabindex', tabindex);
5054
+ $element.attr('tabindex', '-1');
5055
+
5056
+ // Set up containers and adapters
5057
+
5058
+ var DataAdapter = this.options.get('dataAdapter');
5059
+ this.dataAdapter = new DataAdapter($element, this.options);
5060
+
5061
+ var $container = this.render();
5062
+
5063
+ this._placeContainer($container);
5064
+
5065
+ var SelectionAdapter = this.options.get('selectionAdapter');
5066
+ this.selection = new SelectionAdapter($element, this.options);
5067
+ this.$selection = this.selection.render();
5068
+
5069
+ this.selection.position(this.$selection, $container);
5070
+
5071
+ var DropdownAdapter = this.options.get('dropdownAdapter');
5072
+ this.dropdown = new DropdownAdapter($element, this.options);
5073
+ this.$dropdown = this.dropdown.render();
5074
+
5075
+ this.dropdown.position(this.$dropdown, $container);
5076
+
5077
+ var ResultsAdapter = this.options.get('resultsAdapter');
5078
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
5079
+ this.$results = this.results.render();
5080
+
5081
+ this.results.position(this.$results, this.$dropdown);
5082
+
5083
+ // Bind events
5084
+
5085
+ var self = this;
5086
+
5087
+ // Bind the container to all of the adapters
5088
+ this._bindAdapters();
5089
+
5090
+ // Register any DOM event handlers
5091
+ this._registerDomEvents();
5092
+
5093
+ // Register any internal event handlers
5094
+ this._registerDataEvents();
5095
+ this._registerSelectionEvents();
5096
+ this._registerDropdownEvents();
5097
+ this._registerResultsEvents();
5098
+ this._registerEvents();
5099
+
5100
+ // Set the initial state
5101
+ this.dataAdapter.current(function (initialData) {
5102
+ self.trigger('selection:update', {
5103
+ data: initialData
5104
+ });
5105
+ });
5106
+
5107
+ // Hide the original select
5108
+ $element.addClass('select2-hidden-accessible');
5109
+ $element.attr('aria-hidden', 'true');
5110
+
5111
+ // Synchronize any monitored attributes
5112
+ this._syncAttributes();
5113
+
5114
+ $element.data('select2', this);
5115
+ };
5116
+
5117
+ Utils.Extend(Select2, Utils.Observable);
5118
+
5119
+ Select2.prototype._generateId = function ($element) {
5120
+ var id = '';
5121
+
5122
+ if ($element.attr('id') != null) {
5123
+ id = $element.attr('id');
5124
+ } else if ($element.attr('name') != null) {
5125
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
5126
+ } else {
5127
+ id = Utils.generateChars(4);
5128
+ }
5129
+
5130
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
5131
+ id = 'select2-' + id;
5132
+
5133
+ return id;
5134
+ };
5135
+
5136
+ Select2.prototype._placeContainer = function ($container) {
5137
+ $container.insertAfter(this.$element);
5138
+
5139
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
5140
+
5141
+ if (width != null) {
5142
+ $container.css('width', width);
5143
+ }
5144
+ };
5145
+
5146
+ Select2.prototype._resolveWidth = function ($element, method) {
5147
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
5148
+
5149
+ if (method == 'resolve') {
5150
+ var styleWidth = this._resolveWidth($element, 'style');
5151
+
5152
+ if (styleWidth != null) {
5153
+ return styleWidth;
5154
+ }
5155
+
5156
+ return this._resolveWidth($element, 'element');
5157
+ }
5158
+
5159
+ if (method == 'element') {
5160
+ var elementWidth = $element.outerWidth(false);
5161
+
5162
+ if (elementWidth <= 0) {
5163
+ return 'auto';
5164
+ }
5165
+
5166
+ return elementWidth + 'px';
5167
+ }
5168
+
5169
+ if (method == 'style') {
5170
+ var style = $element.attr('style');
5171
+
5172
+ if (typeof(style) !== 'string') {
5173
+ return null;
5174
+ }
5175
+
5176
+ var attrs = style.split(';');
5177
+
5178
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
5179
+ var attr = attrs[i].replace(/\s/g, '');
5180
+ var matches = attr.match(WIDTH);
5181
+
5182
+ if (matches !== null && matches.length >= 1) {
5183
+ return matches[1];
5184
+ }
5185
+ }
5186
+
5187
+ return null;
5188
+ }
5189
+
5190
+ return method;
5191
+ };
5192
+
5193
+ Select2.prototype._bindAdapters = function () {
5194
+ this.dataAdapter.bind(this, this.$container);
5195
+ this.selection.bind(this, this.$container);
5196
+
5197
+ this.dropdown.bind(this, this.$container);
5198
+ this.results.bind(this, this.$container);
5199
+ };
5200
+
5201
+ Select2.prototype._registerDomEvents = function () {
5202
+ var self = this;
5203
+
5204
+ this.$element.on('change.select2', function () {
5205
+ self.dataAdapter.current(function (data) {
5206
+ self.trigger('selection:update', {
5207
+ data: data
5208
+ });
5209
+ });
5210
+ });
5211
+
5212
+ this.$element.on('focus.select2', function (evt) {
5213
+ self.trigger('focus', evt);
5214
+ });
5215
+
5216
+ this._syncA = Utils.bind(this._syncAttributes, this);
5217
+ this._syncS = Utils.bind(this._syncSubtree, this);
5218
+
5219
+ if (this.$element[0].attachEvent) {
5220
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
5221
+ }
5222
+
5223
+ var observer = window.MutationObserver ||
5224
+ window.WebKitMutationObserver ||
5225
+ window.MozMutationObserver
5226
+ ;
5227
+
5228
+ if (observer != null) {
5229
+ this._observer = new observer(function (mutations) {
5230
+ $.each(mutations, self._syncA);
5231
+ $.each(mutations, self._syncS);
5232
+ });
5233
+ this._observer.observe(this.$element[0], {
5234
+ attributes: true,
5235
+ childList: true,
5236
+ subtree: false
5237
+ });
5238
+ } else if (this.$element[0].addEventListener) {
5239
+ this.$element[0].addEventListener(
5240
+ 'DOMAttrModified',
5241
+ self._syncA,
5242
+ false
5243
+ );
5244
+ this.$element[0].addEventListener(
5245
+ 'DOMNodeInserted',
5246
+ self._syncS,
5247
+ false
5248
+ );
5249
+ this.$element[0].addEventListener(
5250
+ 'DOMNodeRemoved',
5251
+ self._syncS,
5252
+ false
5253
+ );
5254
+ }
5255
+ };
5256
+
5257
+ Select2.prototype._registerDataEvents = function () {
5258
+ var self = this;
5259
+
5260
+ this.dataAdapter.on('*', function (name, params) {
5261
+ self.trigger(name, params);
5262
+ });
5263
+ };
5264
+
5265
+ Select2.prototype._registerSelectionEvents = function () {
5266
+ var self = this;
5267
+ var nonRelayEvents = ['toggle', 'focus'];
5268
+
5269
+ this.selection.on('toggle', function () {
5270
+ self.toggleDropdown();
5271
+ });
5272
+
5273
+ this.selection.on('focus', function (params) {
5274
+ self.focus(params);
5275
+ });
5276
+
5277
+ this.selection.on('*', function (name, params) {
5278
+ if ($.inArray(name, nonRelayEvents) !== -1) {
5279
+ return;
5280
+ }
5281
+
5282
+ self.trigger(name, params);
5283
+ });
5284
+ };
5285
+
5286
+ Select2.prototype._registerDropdownEvents = function () {
5287
+ var self = this;
5288
+
5289
+ this.dropdown.on('*', function (name, params) {
5290
+ self.trigger(name, params);
5291
+ });
5292
+ };
5293
+
5294
+ Select2.prototype._registerResultsEvents = function () {
5295
+ var self = this;
5296
+
5297
+ this.results.on('*', function (name, params) {
5298
+ self.trigger(name, params);
5299
+ });
5300
+ };
5301
+
5302
+ Select2.prototype._registerEvents = function () {
5303
+ var self = this;
5304
+
5305
+ this.on('open', function () {
5306
+ self.$container.addClass('select2-container--open');
5307
+ });
5308
+
5309
+ this.on('close', function () {
5310
+ self.$container.removeClass('select2-container--open');
5311
+ });
5312
+
5313
+ this.on('enable', function () {
5314
+ self.$container.removeClass('select2-container--disabled');
5315
+ });
5316
+
5317
+ this.on('disable', function () {
5318
+ self.$container.addClass('select2-container--disabled');
5319
+ });
5320
+
5321
+ this.on('blur', function () {
5322
+ self.$container.removeClass('select2-container--focus');
5323
+ });
5324
+
5325
+ this.on('query', function (params) {
5326
+ if (!self.isOpen()) {
5327
+ self.trigger('open', {});
5328
+ }
5329
+
5330
+ this.dataAdapter.query(params, function (data) {
5331
+ self.trigger('results:all', {
5332
+ data: data,
5333
+ query: params
5334
+ });
5335
+ });
5336
+ });
5337
+
5338
+ this.on('query:append', function (params) {
5339
+ this.dataAdapter.query(params, function (data) {
5340
+ self.trigger('results:append', {
5341
+ data: data,
5342
+ query: params
5343
+ });
5344
+ });
5345
+ });
5346
+
5347
+ this.on('keypress', function (evt) {
5348
+ var key = evt.which;
5349
+
5350
+ if (self.isOpen()) {
5351
+ if (key === KEYS.ESC || key === KEYS.TAB ||
5352
+ (key === KEYS.UP && evt.altKey)) {
5353
+ self.close();
5354
+
5355
+ evt.preventDefault();
5356
+ } else if (key === KEYS.ENTER) {
5357
+ self.trigger('results:select', {});
5358
+
5359
+ evt.preventDefault();
5360
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5361
+ self.trigger('results:toggle', {});
5362
+
5363
+ evt.preventDefault();
5364
+ } else if (key === KEYS.UP) {
5365
+ self.trigger('results:previous', {});
5366
+
5367
+ evt.preventDefault();
5368
+ } else if (key === KEYS.DOWN) {
5369
+ self.trigger('results:next', {});
5370
+
5371
+ evt.preventDefault();
5372
+ }
5373
+ } else {
5374
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
5375
+ (key === KEYS.DOWN && evt.altKey)) {
5376
+ self.open();
5377
+
5378
+ evt.preventDefault();
5379
+ }
5380
+ }
5381
+ });
5382
+ };
5383
+
5384
+ Select2.prototype._syncAttributes = function () {
5385
+ this.options.set('disabled', this.$element.prop('disabled'));
5386
+
5387
+ if (this.options.get('disabled')) {
5388
+ if (this.isOpen()) {
5389
+ this.close();
5390
+ }
5391
+
5392
+ this.trigger('disable', {});
5393
+ } else {
5394
+ this.trigger('enable', {});
5395
+ }
5396
+ };
5397
+
5398
+ Select2.prototype._syncSubtree = function (evt, mutations) {
5399
+ var changed = false;
5400
+ var self = this;
5401
+
5402
+ // Ignore any mutation events raised for elements that aren't options or
5403
+ // optgroups. This handles the case when the select element is destroyed
5404
+ if (
5405
+ evt && evt.target && (
5406
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
5407
+ )
5408
+ ) {
5409
+ return;
5410
+ }
5411
+
5412
+ if (!mutations) {
5413
+ // If mutation events aren't supported, then we can only assume that the
5414
+ // change affected the selections
5415
+ changed = true;
5416
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
5417
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
5418
+ var node = mutations.addedNodes[n];
5419
+
5420
+ if (node.selected) {
5421
+ changed = true;
5422
+ }
5423
+ }
5424
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
5425
+ changed = true;
5426
+ }
5427
+
5428
+ // Only re-pull the data if we think there is a change
5429
+ if (changed) {
5430
+ this.dataAdapter.current(function (currentData) {
5431
+ self.trigger('selection:update', {
5432
+ data: currentData
5433
+ });
5434
+ });
5435
+ }
5436
+ };
5437
+
5438
+ /**
5439
+ * Override the trigger method to automatically trigger pre-events when
5440
+ * there are events that can be prevented.
5441
+ */
5442
+ Select2.prototype.trigger = function (name, args) {
5443
+ var actualTrigger = Select2.__super__.trigger;
5444
+ var preTriggerMap = {
5445
+ 'open': 'opening',
5446
+ 'close': 'closing',
5447
+ 'select': 'selecting',
5448
+ 'unselect': 'unselecting'
5449
+ };
5450
+
5451
+ if (args === undefined) {
5452
+ args = {};
5453
+ }
5454
+
5455
+ if (name in preTriggerMap) {
5456
+ var preTriggerName = preTriggerMap[name];
5457
+ var preTriggerArgs = {
5458
+ prevented: false,
5459
+ name: name,
5460
+ args: args
5461
+ };
5462
+
5463
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
5464
+
5465
+ if (preTriggerArgs.prevented) {
5466
+ args.prevented = true;
5467
+
5468
+ return;
5469
+ }
5470
+ }
5471
+
5472
+ actualTrigger.call(this, name, args);
5473
+ };
5474
+
5475
+ Select2.prototype.toggleDropdown = function () {
5476
+ if (this.options.get('disabled')) {
5477
+ return;
5478
+ }
5479
+
5480
+ if (this.isOpen()) {
5481
+ this.close();
5482
+ } else {
5483
+ this.open();
5484
+ }
5485
+ };
5486
+
5487
+ Select2.prototype.open = function () {
5488
+ if (this.isOpen()) {
5489
+ return;
5490
+ }
5491
+
5492
+ this.trigger('query', {});
5493
+ };
5494
+
5495
+ Select2.prototype.close = function () {
5496
+ if (!this.isOpen()) {
5497
+ return;
5498
+ }
5499
+
5500
+ this.trigger('close', {});
5501
+ };
5502
+
5503
+ Select2.prototype.isOpen = function () {
5504
+ return this.$container.hasClass('select2-container--open');
5505
+ };
5506
+
5507
+ Select2.prototype.hasFocus = function () {
5508
+ return this.$container.hasClass('select2-container--focus');
5509
+ };
5510
+
5511
+ Select2.prototype.focus = function (data) {
5512
+ // No need to re-trigger focus events if we are already focused
5513
+ if (this.hasFocus()) {
5514
+ return;
5515
+ }
5516
+
5517
+ this.$container.addClass('select2-container--focus');
5518
+ this.trigger('focus', {});
5519
+ };
5520
+
5521
+ Select2.prototype.enable = function (args) {
5522
+ if (this.options.get('debug') && window.console && console.warn) {
5523
+ console.warn(
5524
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
5525
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
5526
+ ' instead.'
5527
+ );
5528
+ }
5529
+
5530
+ if (args == null || args.length === 0) {
5531
+ args = [true];
5532
+ }
5533
+
5534
+ var disabled = !args[0];
5535
+
5536
+ this.$element.prop('disabled', disabled);
5537
+ };
5538
+
5539
+ Select2.prototype.data = function () {
5540
+ if (this.options.get('debug') &&
5541
+ arguments.length > 0 && window.console && console.warn) {
5542
+ console.warn(
5543
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
5544
+ 'should consider setting the value instead using `$element.val()`.'
5545
+ );
5546
+ }
5547
+
5548
+ var data = [];
5549
+
5550
+ this.dataAdapter.current(function (currentData) {
5551
+ data = currentData;
5552
+ });
5553
+
5554
+ return data;
5555
+ };
5556
+
5557
+ Select2.prototype.val = function (args) {
5558
+ if (this.options.get('debug') && window.console && console.warn) {
5559
+ console.warn(
5560
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
5561
+ ' removed in later Select2 versions. Use $element.val() instead.'
5562
+ );
5563
+ }
5564
+
5565
+ if (args == null || args.length === 0) {
5566
+ return this.$element.val();
5567
+ }
5568
+
5569
+ var newVal = args[0];
5570
+
5571
+ if ($.isArray(newVal)) {
5572
+ newVal = $.map(newVal, function (obj) {
5573
+ return obj.toString();
5574
+ });
5575
+ }
5576
+
5577
+ this.$element.val(newVal).trigger('change');
5578
+ };
5579
+
5580
+ Select2.prototype.destroy = function () {
5581
+ this.$container.remove();
5582
+
5583
+ if (this.$element[0].detachEvent) {
5584
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
5585
+ }
5586
+
5587
+ if (this._observer != null) {
5588
+ this._observer.disconnect();
5589
+ this._observer = null;
5590
+ } else if (this.$element[0].removeEventListener) {
5591
+ this.$element[0]
5592
+ .removeEventListener('DOMAttrModified', this._syncA, false);
5593
+ this.$element[0]
5594
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
5595
+ this.$element[0]
5596
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
5597
+ }
5598
+
5599
+ this._syncA = null;
5600
+ this._syncS = null;
5601
+
5602
+ this.$element.off('.select2');
5603
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5604
+
5605
+ this.$element.removeClass('select2-hidden-accessible');
5606
+ this.$element.attr('aria-hidden', 'false');
5607
+ this.$element.removeData('select2');
5608
+
5609
+ this.dataAdapter.destroy();
5610
+ this.selection.destroy();
5611
+ this.dropdown.destroy();
5612
+ this.results.destroy();
5613
+
5614
+ this.dataAdapter = null;
5615
+ this.selection = null;
5616
+ this.dropdown = null;
5617
+ this.results = null;
5618
+ };
5619
+
5620
+ Select2.prototype.render = function () {
5621
+ var $container = $(
5622
+ '<span class="select2 select2-container">' +
5623
+ '<span class="selection"></span>' +
5624
+ '<span class="dropdown-wrapper" aria-hidden="true"></span>' +
5625
+ '</span>'
5626
+ );
5627
+
5628
+ $container.attr('dir', this.options.get('dir'));
5629
+
5630
+ this.$container = $container;
5631
+
5632
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
5633
+
5634
+ $container.data('element', this.$element);
5635
+
5636
+ return $container;
5637
+ };
5638
+
5639
+ return Select2;
5640
+ });
5641
+
5642
+ S2.define('select2/compat/utils',[
5643
+ 'jquery'
5644
+ ], function ($) {
5645
+ function syncCssClasses ($dest, $src, adapter) {
5646
+ var classes, replacements = [], adapted;
5647
+
5648
+ classes = $.trim($dest.attr('class'));
5649
+
5650
+ if (classes) {
5651
+ classes = '' + classes; // for IE which returns object
5652
+
5653
+ $(classes.split(/\s+/)).each(function () {
5654
+ // Save all Select2 classes
5655
+ if (this.indexOf('select2-') === 0) {
5656
+ replacements.push(this);
5657
+ }
5658
+ });
5659
+ }
5660
+
5661
+ classes = $.trim($src.attr('class'));
5662
+
5663
+ if (classes) {
5664
+ classes = '' + classes; // for IE which returns object
5665
+
5666
+ $(classes.split(/\s+/)).each(function () {
5667
+ // Only adapt non-Select2 classes
5668
+ if (this.indexOf('select2-') !== 0) {
5669
+ adapted = adapter(this);
5670
+
5671
+ if (adapted != null) {
5672
+ replacements.push(adapted);
5673
+ }
5674
+ }
5675
+ });
5676
+ }
5677
+
5678
+ $dest.attr('class', replacements.join(' '));
5679
+ }
5680
+
5681
+ return {
5682
+ syncCssClasses: syncCssClasses
5683
+ };
5684
+ });
5685
+
5686
+ S2.define('select2/compat/containerCss',[
5687
+ 'jquery',
5688
+ './utils'
5689
+ ], function ($, CompatUtils) {
5690
+ // No-op CSS adapter that discards all classes by default
5691
+ function _containerAdapter (clazz) {
5692
+ return null;
5693
+ }
5694
+
5695
+ function ContainerCSS () { }
5696
+
5697
+ ContainerCSS.prototype.render = function (decorated) {
5698
+ var $container = decorated.call(this);
5699
+
5700
+ var containerCssClass = this.options.get('containerCssClass') || '';
5701
+
5702
+ if ($.isFunction(containerCssClass)) {
5703
+ containerCssClass = containerCssClass(this.$element);
5704
+ }
5705
+
5706
+ var containerCssAdapter = this.options.get('adaptContainerCssClass');
5707
+ containerCssAdapter = containerCssAdapter || _containerAdapter;
5708
+
5709
+ if (containerCssClass.indexOf(':all:') !== -1) {
5710
+ containerCssClass = containerCssClass.replace(':all:', '');
5711
+
5712
+ var _cssAdapter = containerCssAdapter;
5713
+
5714
+ containerCssAdapter = function (clazz) {
5715
+ var adapted = _cssAdapter(clazz);
5716
+
5717
+ if (adapted != null) {
5718
+ // Append the old one along with the adapted one
5719
+ return adapted + ' ' + clazz;
5720
+ }
5721
+
5722
+ return clazz;
5723
+ };
5724
+ }
5725
+
5726
+ var containerCss = this.options.get('containerCss') || {};
5727
+
5728
+ if ($.isFunction(containerCss)) {
5729
+ containerCss = containerCss(this.$element);
5730
+ }
5731
+
5732
+ CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
5733
+
5734
+ $container.css(containerCss);
5735
+ $container.addClass(containerCssClass);
5736
+
5737
+ return $container;
5738
+ };
5739
+
5740
+ return ContainerCSS;
5741
+ });
5742
+
5743
+ S2.define('select2/compat/dropdownCss',[
5744
+ 'jquery',
5745
+ './utils'
5746
+ ], function ($, CompatUtils) {
5747
+ // No-op CSS adapter that discards all classes by default
5748
+ function _dropdownAdapter (clazz) {
5749
+ return null;
5750
+ }
5751
+
5752
+ function DropdownCSS () { }
5753
+
5754
+ DropdownCSS.prototype.render = function (decorated) {
5755
+ var $dropdown = decorated.call(this);
5756
+
5757
+ var dropdownCssClass = this.options.get('dropdownCssClass') || '';
5758
+
5759
+ if ($.isFunction(dropdownCssClass)) {
5760
+ dropdownCssClass = dropdownCssClass(this.$element);
5761
+ }
5762
+
5763
+ var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
5764
+ dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
5765
+
5766
+ if (dropdownCssClass.indexOf(':all:') !== -1) {
5767
+ dropdownCssClass = dropdownCssClass.replace(':all:', '');
5768
+
5769
+ var _cssAdapter = dropdownCssAdapter;
5770
+
5771
+ dropdownCssAdapter = function (clazz) {
5772
+ var adapted = _cssAdapter(clazz);
5773
+
5774
+ if (adapted != null) {
5775
+ // Append the old one along with the adapted one
5776
+ return adapted + ' ' + clazz;
5777
+ }
5778
+
5779
+ return clazz;
5780
+ };
5781
+ }
5782
+
5783
+ var dropdownCss = this.options.get('dropdownCss') || {};
5784
+
5785
+ if ($.isFunction(dropdownCss)) {
5786
+ dropdownCss = dropdownCss(this.$element);
5787
+ }
5788
+
5789
+ CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
5790
+
5791
+ $dropdown.css(dropdownCss);
5792
+ $dropdown.addClass(dropdownCssClass);
5793
+
5794
+ return $dropdown;
5795
+ };
5796
+
5797
+ return DropdownCSS;
5798
+ });
5799
+
5800
+ S2.define('select2/compat/initSelection',[
5801
+ 'jquery'
5802
+ ], function ($) {
5803
+ function InitSelection (decorated, $element, options) {
5804
+ if (options.get('debug') && window.console && console.warn) {
5805
+ console.warn(
5806
+ 'Select2: The `initSelection` option has been deprecated in favor' +
5807
+ ' of a custom data adapter that overrides the `current` method. ' +
5808
+ 'This method is now called multiple times instead of a single ' +
5809
+ 'time when the instance is initialized. Support will be removed ' +
5810
+ 'for the `initSelection` option in future versions of Select2'
5811
+ );
5812
+ }
5813
+
5814
+ this.initSelection = options.get('initSelection');
5815
+ this._isInitialized = false;
5816
+
5817
+ decorated.call(this, $element, options);
5818
+ }
5819
+
5820
+ InitSelection.prototype.current = function (decorated, callback) {
5821
+ var self = this;
5822
+
5823
+ if (this._isInitialized) {
5824
+ decorated.call(this, callback);
5825
+
5826
+ return;
5827
+ }
5828
+
5829
+ this.initSelection.call(null, this.$element, function (data) {
5830
+ self._isInitialized = true;
5831
+
5832
+ if (!$.isArray(data)) {
5833
+ data = [data];
5834
+ }
5835
+
5836
+ callback(data);
5837
+ });
5838
+ };
5839
+
5840
+ return InitSelection;
5841
+ });
5842
+
5843
+ S2.define('select2/compat/inputData',[
5844
+ 'jquery'
5845
+ ], function ($) {
5846
+ function InputData (decorated, $element, options) {
5847
+ this._currentData = [];
5848
+ this._valueSeparator = options.get('valueSeparator') || ',';
5849
+
5850
+ if ($element.prop('type') === 'hidden') {
5851
+ if (options.get('debug') && console && console.warn) {
5852
+ console.warn(
5853
+ 'Select2: Using a hidden input with Select2 is no longer ' +
5854
+ 'supported and may stop working in the future. It is recommended ' +
5855
+ 'to use a `<select>` element instead.'
5856
+ );
5857
+ }
5858
+ }
5859
+
5860
+ decorated.call(this, $element, options);
5861
+ }
5862
+
5863
+ InputData.prototype.current = function (_, callback) {
5864
+ function getSelected (data, selectedIds) {
5865
+ var selected = [];
5866
+
5867
+ if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
5868
+ data.selected = true;
5869
+ selected.push(data);
5870
+ } else {
5871
+ data.selected = false;
5872
+ }
5873
+
5874
+ if (data.children) {
5875
+ selected.push.apply(selected, getSelected(data.children, selectedIds));
5876
+ }
5877
+
5878
+ return selected;
5879
+ }
5880
+
5881
+ var selected = [];
5882
+
5883
+ for (var d = 0; d < this._currentData.length; d++) {
5884
+ var data = this._currentData[d];
5885
+
5886
+ selected.push.apply(
5887
+ selected,
5888
+ getSelected(
5889
+ data,
5890
+ this.$element.val().split(
5891
+ this._valueSeparator
5892
+ )
5893
+ )
5894
+ );
5895
+ }
5896
+
5897
+ callback(selected);
5898
+ };
5899
+
5900
+ InputData.prototype.select = function (_, data) {
5901
+ if (!this.options.get('multiple')) {
5902
+ this.current(function (allData) {
5903
+ $.map(allData, function (data) {
5904
+ data.selected = false;
5905
+ });
5906
+ });
5907
+
5908
+ this.$element.val(data.id);
5909
+ this.$element.trigger('change');
5910
+ } else {
5911
+ var value = this.$element.val();
5912
+ value += this._valueSeparator + data.id;
5913
+
5914
+ this.$element.val(value);
5915
+ this.$element.trigger('change');
5916
+ }
5917
+ };
5918
+
5919
+ InputData.prototype.unselect = function (_, data) {
5920
+ var self = this;
5921
+
5922
+ data.selected = false;
5923
+
5924
+ this.current(function (allData) {
5925
+ var values = [];
5926
+
5927
+ for (var d = 0; d < allData.length; d++) {
5928
+ var item = allData[d];
5929
+
5930
+ if (data.id == item.id) {
5931
+ continue;
5932
+ }
5933
+
5934
+ values.push(item.id);
5935
+ }
5936
+
5937
+ self.$element.val(values.join(self._valueSeparator));
5938
+ self.$element.trigger('change');
5939
+ });
5940
+ };
5941
+
5942
+ InputData.prototype.query = function (_, params, callback) {
5943
+ var results = [];
5944
+
5945
+ for (var d = 0; d < this._currentData.length; d++) {
5946
+ var data = this._currentData[d];
5947
+
5948
+ var matches = this.matches(params, data);
5949
+
5950
+ if (matches !== null) {
5951
+ results.push(matches);
5952
+ }
5953
+ }
5954
+
5955
+ callback({
5956
+ results: results
5957
+ });
5958
+ };
5959
+
5960
+ InputData.prototype.addOptions = function (_, $options) {
5961
+ var options = $.map($options, function ($option) {
5962
+ return $.data($option[0], 'data');
5963
+ });
5964
+
5965
+ this._currentData.push.apply(this._currentData, options);
5966
+ };
5967
+
5968
+ return InputData;
5969
+ });
5970
+
5971
+ S2.define('select2/compat/matcher',[
5972
+ 'jquery'
5973
+ ], function ($) {
5974
+ function oldMatcher (matcher) {
5975
+ function wrappedMatcher (params, data) {
5976
+ var match = $.extend(true, {}, data);
5977
+
5978
+ if (params.term == null || $.trim(params.term) === '') {
5979
+ return match;
5980
+ }
5981
+
5982
+ if (data.children) {
5983
+ for (var c = data.children.length - 1; c >= 0; c--) {
5984
+ var child = data.children[c];
5985
+
5986
+ // Check if the child object matches
5987
+ // The old matcher returned a boolean true or false
5988
+ var doesMatch = matcher(params.term, child.text, child);
5989
+
5990
+ // If the child didn't match, pop it off
5991
+ if (!doesMatch) {
5992
+ match.children.splice(c, 1);
5993
+ }
5994
+ }
5995
+
5996
+ if (match.children.length > 0) {
5997
+ return match;
5998
+ }
5999
+ }
6000
+
6001
+ if (matcher(params.term, data.text, data)) {
6002
+ return match;
6003
+ }
6004
+
6005
+ return null;
6006
+ }
6007
+
6008
+ return wrappedMatcher;
6009
+ }
6010
+
6011
+ return oldMatcher;
6012
+ });
6013
+
6014
+ S2.define('select2/compat/query',[
6015
+
6016
+ ], function () {
6017
+ function Query (decorated, $element, options) {
6018
+ if (options.get('debug') && window.console && console.warn) {
6019
+ console.warn(
6020
+ 'Select2: The `query` option has been deprecated in favor of a ' +
6021
+ 'custom data adapter that overrides the `query` method. Support ' +
6022
+ 'will be removed for the `query` option in future versions of ' +
6023
+ 'Select2.'
6024
+ );
6025
+ }
6026
+
6027
+ decorated.call(this, $element, options);
6028
+ }
6029
+
6030
+ Query.prototype.query = function (_, params, callback) {
6031
+ params.callback = callback;
6032
+
6033
+ var query = this.options.get('query');
6034
+
6035
+ query.call(null, params);
6036
+ };
6037
+
6038
+ return Query;
6039
+ });
6040
+
6041
+ S2.define('select2/dropdown/attachContainer',[
6042
+
6043
+ ], function () {
6044
+ function AttachContainer (decorated, $element, options) {
6045
+ decorated.call(this, $element, options);
6046
+ }
6047
+
6048
+ AttachContainer.prototype.position =
6049
+ function (decorated, $dropdown, $container) {
6050
+ var $dropdownContainer = $container.find('.dropdown-wrapper');
6051
+ $dropdownContainer.append($dropdown);
6052
+
6053
+ $dropdown.addClass('select2-dropdown--below');
6054
+ $container.addClass('select2-container--below');
6055
+ };
6056
+
6057
+ return AttachContainer;
6058
+ });
6059
+
6060
+ S2.define('select2/dropdown/stopPropagation',[
6061
+
6062
+ ], function () {
6063
+ function StopPropagation () { }
6064
+
6065
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
6066
+ decorated.call(this, container, $container);
6067
+
6068
+ var stoppedEvents = [
6069
+ 'blur',
6070
+ 'change',
6071
+ 'click',
6072
+ 'dblclick',
6073
+ 'focus',
6074
+ 'focusin',
6075
+ 'focusout',
6076
+ 'input',
6077
+ 'keydown',
6078
+ 'keyup',
6079
+ 'keypress',
6080
+ 'mousedown',
6081
+ 'mouseenter',
6082
+ 'mouseleave',
6083
+ 'mousemove',
6084
+ 'mouseover',
6085
+ 'mouseup',
6086
+ 'search',
6087
+ 'touchend',
6088
+ 'touchstart'
6089
+ ];
6090
+
6091
+ this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
6092
+ evt.stopPropagation();
6093
+ });
6094
+ };
6095
+
6096
+ return StopPropagation;
6097
+ });
6098
+
6099
+ S2.define('select2/selection/stopPropagation',[
6100
+
6101
+ ], function () {
6102
+ function StopPropagation () { }
6103
+
6104
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
6105
+ decorated.call(this, container, $container);
6106
+
6107
+ var stoppedEvents = [
6108
+ 'blur',
6109
+ 'change',
6110
+ 'click',
6111
+ 'dblclick',
6112
+ 'focus',
6113
+ 'focusin',
6114
+ 'focusout',
6115
+ 'input',
6116
+ 'keydown',
6117
+ 'keyup',
6118
+ 'keypress',
6119
+ 'mousedown',
6120
+ 'mouseenter',
6121
+ 'mouseleave',
6122
+ 'mousemove',
6123
+ 'mouseover',
6124
+ 'mouseup',
6125
+ 'search',
6126
+ 'touchend',
6127
+ 'touchstart'
6128
+ ];
6129
+
6130
+ this.$selection.on(stoppedEvents.join(' '), function (evt) {
6131
+ evt.stopPropagation();
6132
+ });
6133
+ };
6134
+
6135
+ return StopPropagation;
6136
+ });
6137
+
6138
+ /*!
6139
+ * jQuery Mousewheel 3.1.13
6140
+ *
6141
+ * Copyright jQuery Foundation and other contributors
6142
+ * Released under the MIT license
6143
+ * http://jquery.org/license
6144
+ */
6145
+
6146
+ (function (factory) {
6147
+ if ( typeof S2.define === 'function' && S2.define.amd ) {
6148
+ // AMD. Register as an anonymous module.
6149
+ S2.define('jquery-mousewheel',['jquery'], factory);
6150
+ } else if (typeof exports === 'object') {
6151
+ // Node/CommonJS style for Browserify
6152
+ module.exports = factory;
6153
+ } else {
6154
+ // Browser globals
6155
+ factory(jQuery);
6156
+ }
6157
+ }(function ($) {
6158
+
6159
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
6160
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
6161
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
6162
+ slice = Array.prototype.slice,
6163
+ nullLowestDeltaTimeout, lowestDelta;
6164
+
6165
+ if ( $.event.fixHooks ) {
6166
+ for ( var i = toFix.length; i; ) {
6167
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
6168
+ }
6169
+ }
6170
+
6171
+ var special = $.event.special.mousewheel = {
6172
+ version: '3.1.12',
6173
+
6174
+ setup: function() {
6175
+ if ( this.addEventListener ) {
6176
+ for ( var i = toBind.length; i; ) {
6177
+ this.addEventListener( toBind[--i], handler, false );
6178
+ }
6179
+ } else {
6180
+ this.onmousewheel = handler;
6181
+ }
6182
+ // Store the line height and page height for this particular element
6183
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
6184
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
6185
+ },
6186
+
6187
+ teardown: function() {
6188
+ if ( this.removeEventListener ) {
6189
+ for ( var i = toBind.length; i; ) {
6190
+ this.removeEventListener( toBind[--i], handler, false );
6191
+ }
6192
+ } else {
6193
+ this.onmousewheel = null;
6194
+ }
6195
+ // Clean up the data we added to the element
6196
+ $.removeData(this, 'mousewheel-line-height');
6197
+ $.removeData(this, 'mousewheel-page-height');
6198
+ },
6199
+
6200
+ getLineHeight: function(elem) {
6201
+ var $elem = $(elem),
6202
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
6203
+ if (!$parent.length) {
6204
+ $parent = $('body');
6205
+ }
6206
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
6207
+ },
6208
+
6209
+ getPageHeight: function(elem) {
6210
+ return $(elem).height();
6211
+ },
6212
+
6213
+ settings: {
6214
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
6215
+ normalizeOffset: true // calls getBoundingClientRect for each event
6216
+ }
6217
+ };
6218
+
6219
+ $.fn.extend({
6220
+ mousewheel: function(fn) {
6221
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
6222
+ },
6223
+
6224
+ unmousewheel: function(fn) {
6225
+ return this.unbind('mousewheel', fn);
6226
+ }
6227
+ });
6228
+
6229
+
6230
+ function handler(event) {
6231
+ var orgEvent = event || window.event,
6232
+ args = slice.call(arguments, 1),
6233
+ delta = 0,
6234
+ deltaX = 0,
6235
+ deltaY = 0,
6236
+ absDelta = 0,
6237
+ offsetX = 0,
6238
+ offsetY = 0;
6239
+ event = $.event.fix(orgEvent);
6240
+ event.type = 'mousewheel';
6241
+
6242
+ // Old school scrollwheel delta
6243
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
6244
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
6245
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
6246
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
6247
+
6248
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
6249
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
6250
+ deltaX = deltaY * -1;
6251
+ deltaY = 0;
6252
+ }
6253
+
6254
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
6255
+ delta = deltaY === 0 ? deltaX : deltaY;
6256
+
6257
+ // New school wheel delta (wheel event)
6258
+ if ( 'deltaY' in orgEvent ) {
6259
+ deltaY = orgEvent.deltaY * -1;
6260
+ delta = deltaY;
6261
+ }
6262
+ if ( 'deltaX' in orgEvent ) {
6263
+ deltaX = orgEvent.deltaX;
6264
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
6265
+ }
6266
+
6267
+ // No change actually happened, no reason to go any further
6268
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
6269
+
6270
+ // Need to convert lines and pages to pixels if we aren't already in pixels
6271
+ // There are three delta modes:
6272
+ // * deltaMode 0 is by pixels, nothing to do
6273
+ // * deltaMode 1 is by lines
6274
+ // * deltaMode 2 is by pages
6275
+ if ( orgEvent.deltaMode === 1 ) {
6276
+ var lineHeight = $.data(this, 'mousewheel-line-height');
6277
+ delta *= lineHeight;
6278
+ deltaY *= lineHeight;
6279
+ deltaX *= lineHeight;
6280
+ } else if ( orgEvent.deltaMode === 2 ) {
6281
+ var pageHeight = $.data(this, 'mousewheel-page-height');
6282
+ delta *= pageHeight;
6283
+ deltaY *= pageHeight;
6284
+ deltaX *= pageHeight;
6285
+ }
6286
+
6287
+ // Store lowest absolute delta to normalize the delta values
6288
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
6289
+
6290
+ if ( !lowestDelta || absDelta < lowestDelta ) {
6291
+ lowestDelta = absDelta;
6292
+
6293
+ // Adjust older deltas if necessary
6294
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
6295
+ lowestDelta /= 40;
6296
+ }
6297
+ }
6298
+
6299
+ // Adjust older deltas if necessary
6300
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
6301
+ // Divide all the things by 40!
6302
+ delta /= 40;
6303
+ deltaX /= 40;
6304
+ deltaY /= 40;
6305
+ }
6306
+
6307
+ // Get a whole, normalized value for the deltas
6308
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
6309
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
6310
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
6311
+
6312
+ // Normalise offsetX and offsetY properties
6313
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
6314
+ var boundingRect = this.getBoundingClientRect();
6315
+ offsetX = event.clientX - boundingRect.left;
6316
+ offsetY = event.clientY - boundingRect.top;
6317
+ }
6318
+
6319
+ // Add information to the event object
6320
+ event.deltaX = deltaX;
6321
+ event.deltaY = deltaY;
6322
+ event.deltaFactor = lowestDelta;
6323
+ event.offsetX = offsetX;
6324
+ event.offsetY = offsetY;
6325
+ // Go ahead and set deltaMode to 0 since we converted to pixels
6326
+ // Although this is a little odd since we overwrite the deltaX/Y
6327
+ // properties with normalized deltas.
6328
+ event.deltaMode = 0;
6329
+
6330
+ // Add event and delta to the front of the arguments
6331
+ args.unshift(event, delta, deltaX, deltaY);
6332
+
6333
+ // Clearout lowestDelta after sometime to better
6334
+ // handle multiple device types that give different
6335
+ // a different lowestDelta
6336
+ // Ex: trackpad = 3 and mouse wheel = 120
6337
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
6338
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
6339
+
6340
+ return ($.event.dispatch || $.event.handle).apply(this, args);
6341
+ }
6342
+
6343
+ function nullLowestDelta() {
6344
+ lowestDelta = null;
6345
+ }
6346
+
6347
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
6348
+ // If this is an older event and the delta is divisable by 120,
6349
+ // then we are assuming that the browser is treating this as an
6350
+ // older mouse wheel event and that we should divide the deltas
6351
+ // by 40 to try and get a more usable deltaFactor.
6352
+ // Side note, this actually impacts the reported scroll distance
6353
+ // in older browsers and can cause scrolling to be slower than native.
6354
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
6355
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
6356
+ }
6357
+
6358
+ }));
6359
+
6360
+ S2.define('jquery.select2',[
6361
+ 'jquery',
6362
+ 'jquery-mousewheel',
6363
+
6364
+ './select2/core',
6365
+ './select2/defaults'
6366
+ ], function ($, _, Select2, Defaults) {
6367
+ if ($.fn.select2 == null) {
6368
+ // All methods that should return the element
6369
+ var thisMethods = ['open', 'close', 'destroy'];
6370
+
6371
+ $.fn.select2 = function (options) {
6372
+ options = options || {};
6373
+
6374
+ if (typeof options === 'object') {
6375
+ this.each(function () {
6376
+ var instanceOptions = $.extend(true, {}, options);
6377
+
6378
+ var instance = new Select2($(this), instanceOptions);
6379
+ });
6380
+
6381
+ return this;
6382
+ } else if (typeof options === 'string') {
6383
+ var ret;
6384
+ var args = Array.prototype.slice.call(arguments, 1);
6385
+
6386
+ this.each(function () {
6387
+ var instance = $(this).data('select2');
6388
+
6389
+ if (instance == null && window.console && console.error) {
6390
+ console.error(
6391
+ 'The select2(\'' + options + '\') method was called on an ' +
6392
+ 'element that is not using Select2.'
6393
+ );
6394
+ }
6395
+
6396
+ ret = instance[options].apply(instance, args);
6397
+ });
6398
+
6399
+ // Check if we should be returning `this`
6400
+ if ($.inArray(options, thisMethods) > -1) {
6401
+ return this;
6402
+ }
6403
+
6404
+ return ret;
6405
+ } else {
6406
+ throw new Error('Invalid arguments for Select2: ' + options);
6407
+ }
6408
+ };
6409
+ }
6410
+
6411
+ if ($.fn.select2.defaults == null) {
6412
+ $.fn.select2.defaults = Defaults;
6413
+ }
6414
+
6415
+ return Select2;
6416
+ });
6417
+
6418
+ // Return the AMD loader configuration so it can be used outside of this file
6419
+ return {
6420
+ define: S2.define,
6421
+ require: S2.require
6422
+ };
6423
+ }());
6424
+
6425
+ // Autoload the jQuery bindings
6426
+ // We know that all of the modules exist above this, so we're safe
6427
+ var select2 = S2.require('jquery.select2');
6428
+
6429
+ // Hold the AMD module references on the jQuery function that was just loaded
6430
+ // This allows Select2 to use the internal loader outside of this file, such
6431
+ // as in the language files.
6432
+ jQuery.fn.select2.amd = S2;
6433
+
6434
+ // Return the Select2 instance for anyone who is importing it.
6435
+ return select2;
6436
+ }));
js/select2/js/select2.full.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
2
+ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
3
+ },e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
js/select2/js/select2.js ADDED
@@ -0,0 +1,5725 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Select2 4.0.3
3
+ * https://select2.github.io
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/select2/select2/blob/master/LICENSE.md
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD. Register as an anonymous module.
11
+ define(['jquery'], factory);
12
+ } else if (typeof exports === 'object') {
13
+ // Node/CommonJS
14
+ factory(require('jquery'));
15
+ } else {
16
+ // Browser globals
17
+ factory(jQuery);
18
+ }
19
+ }(function (jQuery) {
20
+ // This is needed so we can catch the AMD loader configuration and use it
21
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
22
+ // returns the AMD loader references.
23
+ var S2 =
24
+ (function () {
25
+ // Restore the Select2 AMD loader so it can be used
26
+ // Needed mostly in the language files, where the loader is not inserted
27
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
28
+ var S2 = jQuery.fn.select2.amd;
29
+ }
30
+ var S2;(function () { if (!S2 || !S2.requirejs) {
31
+ if (!S2) { S2 = {}; } else { require = S2; }
32
+ /**
33
+ * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
34
+ * Available via the MIT or new BSD license.
35
+ * see: http://github.com/jrburke/almond for details
36
+ */
37
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
38
+ //be followed.
39
+ /*jslint sloppy: true */
40
+ /*global setTimeout: false */
41
+
42
+ var requirejs, require, define;
43
+ (function (undef) {
44
+ var main, req, makeMap, handlers,
45
+ defined = {},
46
+ waiting = {},
47
+ config = {},
48
+ defining = {},
49
+ hasOwn = Object.prototype.hasOwnProperty,
50
+ aps = [].slice,
51
+ jsSuffixRegExp = /\.js$/;
52
+
53
+ function hasProp(obj, prop) {
54
+ return hasOwn.call(obj, prop);
55
+ }
56
+
57
+ /**
58
+ * Given a relative module name, like ./something, normalize it to
59
+ * a real name that can be mapped to a path.
60
+ * @param {String} name the relative name
61
+ * @param {String} baseName a real name that the name arg is relative
62
+ * to.
63
+ * @returns {String} normalized name
64
+ */
65
+ function normalize(name, baseName) {
66
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
67
+ foundI, foundStarMap, starI, i, j, part,
68
+ baseParts = baseName && baseName.split("/"),
69
+ map = config.map,
70
+ starMap = (map && map['*']) || {};
71
+
72
+ //Adjust any relative paths.
73
+ if (name && name.charAt(0) === ".") {
74
+ //If have a base name, try to normalize against it,
75
+ //otherwise, assume it is a top-level require that will
76
+ //be relative to baseUrl in the end.
77
+ if (baseName) {
78
+ name = name.split('/');
79
+ lastIndex = name.length - 1;
80
+
81
+ // Node .js allowance:
82
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
83
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
84
+ }
85
+
86
+ //Lop off the last part of baseParts, so that . matches the
87
+ //"directory" and not name of the baseName's module. For instance,
88
+ //baseName of "one/two/three", maps to "one/two/three.js", but we
89
+ //want the directory, "one/two" for this normalization.
90
+ name = baseParts.slice(0, baseParts.length - 1).concat(name);
91
+
92
+ //start trimDots
93
+ for (i = 0; i < name.length; i += 1) {
94
+ part = name[i];
95
+ if (part === ".") {
96
+ name.splice(i, 1);
97
+ i -= 1;
98
+ } else if (part === "..") {
99
+ if (i === 1 && (name[2] === '..' || name[0] === '..')) {
100
+ //End of the line. Keep at least one non-dot
101
+ //path segment at the front so it can be mapped
102
+ //correctly to disk. Otherwise, there is likely
103
+ //no path mapping for a path starting with '..'.
104
+ //This can still fail, but catches the most reasonable
105
+ //uses of ..
106
+ break;
107
+ } else if (i > 0) {
108
+ name.splice(i - 1, 2);
109
+ i -= 2;
110
+ }
111
+ }
112
+ }
113
+ //end trimDots
114
+
115
+ name = name.join("/");
116
+ } else if (name.indexOf('./') === 0) {
117
+ // No baseName, so this is ID is resolved relative
118
+ // to baseUrl, pull off the leading dot.
119
+ name = name.substring(2);
120
+ }
121
+ }
122
+
123
+ //Apply map config if available.
124
+ if ((baseParts || starMap) && map) {
125
+ nameParts = name.split('/');
126
+
127
+ for (i = nameParts.length; i > 0; i -= 1) {
128
+ nameSegment = nameParts.slice(0, i).join("/");
129
+
130
+ if (baseParts) {
131
+ //Find the longest baseName segment match in the config.
132
+ //So, do joins on the biggest to smallest lengths of baseParts.
133
+ for (j = baseParts.length; j > 0; j -= 1) {
134
+ mapValue = map[baseParts.slice(0, j).join('/')];
135
+
136
+ //baseName segment has config, find if it has one for
137
+ //this name.
138
+ if (mapValue) {
139
+ mapValue = mapValue[nameSegment];
140
+ if (mapValue) {
141
+ //Match, update name to the new value.
142
+ foundMap = mapValue;
143
+ foundI = i;
144
+ break;
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ if (foundMap) {
151
+ break;
152
+ }
153
+
154
+ //Check for a star map match, but just hold on to it,
155
+ //if there is a shorter segment match later in a matching
156
+ //config, then favor over this star map.
157
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
158
+ foundStarMap = starMap[nameSegment];
159
+ starI = i;
160
+ }
161
+ }
162
+
163
+ if (!foundMap && foundStarMap) {
164
+ foundMap = foundStarMap;
165
+ foundI = starI;
166
+ }
167
+
168
+ if (foundMap) {
169
+ nameParts.splice(0, foundI, foundMap);
170
+ name = nameParts.join('/');
171
+ }
172
+ }
173
+
174
+ return name;
175
+ }
176
+
177
+ function makeRequire(relName, forceSync) {
178
+ return function () {
179
+ //A version of a require function that passes a moduleName
180
+ //value for items that may need to
181
+ //look up paths relative to the moduleName
182
+ var args = aps.call(arguments, 0);
183
+
184
+ //If first arg is not require('string'), and there is only
185
+ //one arg, it is the array form without a callback. Insert
186
+ //a null so that the following concat is correct.
187
+ if (typeof args[0] !== 'string' && args.length === 1) {
188
+ args.push(null);
189
+ }
190
+ return req.apply(undef, args.concat([relName, forceSync]));
191
+ };
192
+ }
193
+
194
+ function makeNormalize(relName) {
195
+ return function (name) {
196
+ return normalize(name, relName);
197
+ };
198
+ }
199
+
200
+ function makeLoad(depName) {
201
+ return function (value) {
202
+ defined[depName] = value;
203
+ };
204
+ }
205
+
206
+ function callDep(name) {
207
+ if (hasProp(waiting, name)) {
208
+ var args = waiting[name];
209
+ delete waiting[name];
210
+ defining[name] = true;
211
+ main.apply(undef, args);
212
+ }
213
+
214
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
215
+ throw new Error('No ' + name);
216
+ }
217
+ return defined[name];
218
+ }
219
+
220
+ //Turns a plugin!resource to [plugin, resource]
221
+ //with the plugin being undefined if the name
222
+ //did not have a plugin prefix.
223
+ function splitPrefix(name) {
224
+ var prefix,
225
+ index = name ? name.indexOf('!') : -1;
226
+ if (index > -1) {
227
+ prefix = name.substring(0, index);
228
+ name = name.substring(index + 1, name.length);
229
+ }
230
+ return [prefix, name];
231
+ }
232
+
233
+ /**
234
+ * Makes a name map, normalizing the name, and using a plugin
235
+ * for normalization if necessary. Grabs a ref to plugin
236
+ * too, as an optimization.
237
+ */
238
+ makeMap = function (name, relName) {
239
+ var plugin,
240
+ parts = splitPrefix(name),
241
+ prefix = parts[0];
242
+
243
+ name = parts[1];
244
+
245
+ if (prefix) {
246
+ prefix = normalize(prefix, relName);
247
+ plugin = callDep(prefix);
248
+ }
249
+
250
+ //Normalize according
251
+ if (prefix) {
252
+ if (plugin && plugin.normalize) {
253
+ name = plugin.normalize(name, makeNormalize(relName));
254
+ } else {
255
+ name = normalize(name, relName);
256
+ }
257
+ } else {
258
+ name = normalize(name, relName);
259
+ parts = splitPrefix(name);
260
+ prefix = parts[0];
261
+ name = parts[1];
262
+ if (prefix) {
263
+ plugin = callDep(prefix);
264
+ }
265
+ }
266
+
267
+ //Using ridiculous property names for space reasons
268
+ return {
269
+ f: prefix ? prefix + '!' + name : name, //fullName
270
+ n: name,
271
+ pr: prefix,
272
+ p: plugin
273
+ };
274
+ };
275
+
276
+ function makeConfig(name) {
277
+ return function () {
278
+ return (config && config.config && config.config[name]) || {};
279
+ };
280
+ }
281
+
282
+ handlers = {
283
+ require: function (name) {
284
+ return makeRequire(name);
285
+ },
286
+ exports: function (name) {
287
+ var e = defined[name];
288
+ if (typeof e !== 'undefined') {
289
+ return e;
290
+ } else {
291
+ return (defined[name] = {});
292
+ }
293
+ },
294
+ module: function (name) {
295
+ return {
296
+ id: name,
297
+ uri: '',
298
+ exports: defined[name],
299
+ config: makeConfig(name)
300
+ };
301
+ }
302
+ };
303
+
304
+ main = function (name, deps, callback, relName) {
305
+ var cjsModule, depName, ret, map, i,
306
+ args = [],
307
+ callbackType = typeof callback,
308
+ usingExports;
309
+
310
+ //Use name if no relName
311
+ relName = relName || name;
312
+
313
+ //Call the callback to define the module, if necessary.
314
+ if (callbackType === 'undefined' || callbackType === 'function') {
315
+ //Pull out the defined dependencies and pass the ordered
316
+ //values to the callback.
317
+ //Default to [require, exports, module] if no deps
318
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
319
+ for (i = 0; i < deps.length; i += 1) {
320
+ map = makeMap(deps[i], relName);
321
+ depName = map.f;
322
+
323
+ //Fast path CommonJS standard dependencies.
324
+ if (depName === "require") {
325
+ args[i] = handlers.require(name);
326
+ } else if (depName === "exports") {
327
+ //CommonJS module spec 1.1
328
+ args[i] = handlers.exports(name);
329
+ usingExports = true;
330
+ } else if (depName === "module") {
331
+ //CommonJS module spec 1.1
332
+ cjsModule = args[i] = handlers.module(name);
333
+ } else if (hasProp(defined, depName) ||
334
+ hasProp(waiting, depName) ||
335
+ hasProp(defining, depName)) {
336
+ args[i] = callDep(depName);
337
+ } else if (map.p) {
338
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
339
+ args[i] = defined[depName];
340
+ } else {
341
+ throw new Error(name + ' missing ' + depName);
342
+ }
343
+ }
344
+
345
+ ret = callback ? callback.apply(defined[name], args) : undefined;
346
+
347
+ if (name) {
348
+ //If setting exports via "module" is in play,
349
+ //favor that over return value and exports. After that,
350
+ //favor a non-undefined return value over exports use.
351
+ if (cjsModule && cjsModule.exports !== undef &&
352
+ cjsModule.exports !== defined[name]) {
353
+ defined[name] = cjsModule.exports;
354
+ } else if (ret !== undef || !usingExports) {
355
+ //Use the return value from the function.
356
+ defined[name] = ret;
357
+ }
358
+ }
359
+ } else if (name) {
360
+ //May just be an object definition for the module. Only
361
+ //worry about defining if have a module name.
362
+ defined[name] = callback;
363
+ }
364
+ };
365
+
366
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
367
+ if (typeof deps === "string") {
368
+ if (handlers[deps]) {
369
+ //callback in this case is really relName
370
+ return handlers[deps](callback);
371
+ }
372
+ //Just return the module wanted. In this scenario, the
373
+ //deps arg is the module name, and second arg (if passed)
374
+ //is just the relName.
375
+ //Normalize module name, if it contains . or ..
376
+ return callDep(makeMap(deps, callback).f);
377
+ } else if (!deps.splice) {
378
+ //deps is a config object, not an array.
379
+ config = deps;
380
+ if (config.deps) {
381
+ req(config.deps, config.callback);
382
+ }
383
+ if (!callback) {
384
+ return;
385
+ }
386
+
387
+ if (callback.splice) {
388
+ //callback is an array, which means it is a dependency list.
389
+ //Adjust args if there are dependencies
390
+ deps = callback;
391
+ callback = relName;
392
+ relName = null;
393
+ } else {
394
+ deps = undef;
395
+ }
396
+ }
397
+
398
+ //Support require(['a'])
399
+ callback = callback || function () {};
400
+
401
+ //If relName is a function, it is an errback handler,
402
+ //so remove it.
403
+ if (typeof relName === 'function') {
404
+ relName = forceSync;
405
+ forceSync = alt;
406
+ }
407
+
408
+ //Simulate async callback;
409
+ if (forceSync) {
410
+ main(undef, deps, callback, relName);
411
+ } else {
412
+ //Using a non-zero value because of concern for what old browsers
413
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
414
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
415
+ //If want a value immediately, use require('id') instead -- something
416
+ //that works in almond on the global level, but not guaranteed and
417
+ //unlikely to work in other AMD implementations.
418
+ setTimeout(function () {
419
+ main(undef, deps, callback, relName);
420
+ }, 4);
421
+ }
422
+
423
+ return req;
424
+ };
425
+
426
+ /**
427
+ * Just drops the config on the floor, but returns req in case
428
+ * the config return value is used.
429
+ */
430
+ req.config = function (cfg) {
431
+ return req(cfg);
432
+ };
433
+
434
+ /**
435
+ * Expose module registry for debugging and tooling
436
+ */
437
+ requirejs._defined = defined;
438
+
439
+ define = function (name, deps, callback) {
440
+ if (typeof name !== 'string') {
441
+ throw new Error('See almond README: incorrect module build, no module name');
442
+ }
443
+
444
+ //This module may not have dependencies
445
+ if (!deps.splice) {
446
+ //deps is not an array, so probably means
447
+ //an object literal or factory function for
448
+ //the value. Adjust args.
449
+ callback = deps;
450
+ deps = [];
451
+ }
452
+
453
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
454
+ waiting[name] = [name, deps, callback];
455
+ }
456
+ };
457
+
458
+ define.amd = {
459
+ jQuery: true
460
+ };
461
+ }());
462
+
463
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
464
+ }
465
+ }());
466
+ S2.define("almond", function(){});
467
+
468
+ /* global jQuery:false, $:false */
469
+ S2.define('jquery',[],function () {
470
+ var _$ = jQuery || $;
471
+
472
+ if (_$ == null && console && console.error) {
473
+ console.error(
474
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
475
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
476
+ 'web page.'
477
+ );
478
+ }
479
+
480
+ return _$;
481
+ });
482
+
483
+ S2.define('select2/utils',[
484
+ 'jquery'
485
+ ], function ($) {
486
+ var Utils = {};
487
+
488
+ Utils.Extend = function (ChildClass, SuperClass) {
489
+ var __hasProp = {}.hasOwnProperty;
490
+
491
+ function BaseConstructor () {
492
+ this.constructor = ChildClass;
493
+ }
494
+
495
+ for (var key in SuperClass) {
496
+ if (__hasProp.call(SuperClass, key)) {
497
+ ChildClass[key] = SuperClass[key];
498
+ }
499
+ }
500
+
501
+ BaseConstructor.prototype = SuperClass.prototype;
502
+ ChildClass.prototype = new BaseConstructor();
503
+ ChildClass.__super__ = SuperClass.prototype;
504
+
505
+ return ChildClass;
506
+ };
507
+
508
+ function getMethods (theClass) {
509
+ var proto = theClass.prototype;
510
+
511
+ var methods = [];
512
+
513
+ for (var methodName in proto) {
514
+ var m = proto[methodName];
515
+
516
+ if (typeof m !== 'function') {
517
+ continue;
518
+ }
519
+
520
+ if (methodName === 'constructor') {
521
+ continue;
522
+ }
523
+
524
+ methods.push(methodName);
525
+ }
526
+
527
+ return methods;
528
+ }
529
+
530
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
531
+ var decoratedMethods = getMethods(DecoratorClass);
532
+ var superMethods = getMethods(SuperClass);
533
+
534
+ function DecoratedClass () {
535
+ var unshift = Array.prototype.unshift;
536
+
537
+ var argCount = DecoratorClass.prototype.constructor.length;
538
+
539
+ var calledConstructor = SuperClass.prototype.constructor;
540
+
541
+ if (argCount > 0) {
542
+ unshift.call(arguments, SuperClass.prototype.constructor);
543
+
544
+ calledConstructor = DecoratorClass.prototype.constructor;
545
+ }
546
+
547
+ calledConstructor.apply(this, arguments);
548
+ }
549
+
550
+ DecoratorClass.displayName = SuperClass.displayName;
551
+
552
+ function ctr () {
553
+ this.constructor = DecoratedClass;
554
+ }
555
+
556
+ DecoratedClass.prototype = new ctr();
557
+
558
+ for (var m = 0; m < superMethods.length; m++) {
559
+ var superMethod = superMethods[m];
560
+
561
+ DecoratedClass.prototype[superMethod] =
562
+ SuperClass.prototype[superMethod];
563
+ }
564
+
565
+ var calledMethod = function (methodName) {
566
+ // Stub out the original method if it's not decorating an actual method
567
+ var originalMethod = function () {};
568
+
569
+ if (methodName in DecoratedClass.prototype) {
570
+ originalMethod = DecoratedClass.prototype[methodName];
571
+ }
572
+
573
+ var decoratedMethod = DecoratorClass.prototype[methodName];
574
+
575
+ return function () {
576
+ var unshift = Array.prototype.unshift;
577
+
578
+ unshift.call(arguments, originalMethod);
579
+
580
+ return decoratedMethod.apply(this, arguments);
581
+ };
582
+ };
583
+
584
+ for (var d = 0; d < decoratedMethods.length; d++) {
585
+ var decoratedMethod = decoratedMethods[d];
586
+
587
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
588
+ }
589
+
590
+ return DecoratedClass;
591
+ };
592
+
593
+ var Observable = function () {
594
+ this.listeners = {};
595
+ };
596
+
597
+ Observable.prototype.on = function (event, callback) {
598
+ this.listeners = this.listeners || {};
599
+
600
+ if (event in this.listeners) {
601
+ this.listeners[event].push(callback);
602
+ } else {
603
+ this.listeners[event] = [callback];
604
+ }
605
+ };
606
+
607
+ Observable.prototype.trigger = function (event) {
608
+ var slice = Array.prototype.slice;
609
+ var params = slice.call(arguments, 1);
610
+
611
+ this.listeners = this.listeners || {};
612
+
613
+ // Params should always come in as an array
614
+ if (params == null) {
615
+ params = [];
616
+ }
617
+
618
+ // If there are no arguments to the event, use a temporary object
619
+ if (params.length === 0) {
620
+ params.push({});
621
+ }
622
+
623
+ // Set the `_type` of the first object to the event
624
+ params[0]._type = event;
625
+
626
+ if (event in this.listeners) {
627
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
628
+ }
629
+
630
+ if ('*' in this.listeners) {
631
+ this.invoke(this.listeners['*'], arguments);
632
+ }
633
+ };
634
+
635
+ Observable.prototype.invoke = function (listeners, params) {
636
+ for (var i = 0, len = listeners.length; i < len; i++) {
637
+ listeners[i].apply(this, params);
638
+ }
639
+ };
640
+
641
+ Utils.Observable = Observable;
642
+
643
+ Utils.generateChars = function (length) {
644
+ var chars = '';
645
+
646
+ for (var i = 0; i < length; i++) {
647
+ var randomChar = Math.floor(Math.random() * 36);
648
+ chars += randomChar.toString(36);
649
+ }
650
+
651
+ return chars;
652
+ };
653
+
654
+ Utils.bind = function (func, context) {
655
+ return function () {
656
+ func.apply(context, arguments);
657
+ };
658
+ };
659
+
660
+ Utils._convertData = function (data) {
661
+ for (var originalKey in data) {
662
+ var keys = originalKey.split('-');
663
+
664
+ var dataLevel = data;
665
+
666
+ if (keys.length === 1) {
667
+ continue;
668
+ }
669
+
670
+ for (var k = 0; k < keys.length; k++) {
671
+ var key = keys[k];
672
+
673
+ // Lowercase the first letter
674
+ // By default, dash-separated becomes camelCase
675
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
676
+
677
+ if (!(key in dataLevel)) {
678
+ dataLevel[key] = {};
679
+ }
680
+
681
+ if (k == keys.length - 1) {
682
+ dataLevel[key] = data[originalKey];
683
+ }
684
+
685
+ dataLevel = dataLevel[key];
686
+ }
687
+
688
+ delete data[originalKey];
689
+ }
690
+
691
+ return data;
692
+ };
693
+
694
+ Utils.hasScroll = function (index, el) {
695
+ // Adapted from the function created by @ShadowScripter
696
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
697
+ // The original code can be found at
698
+ // http://codereview.stackexchange.com/q/13338
699
+ // and was designed to be used with the Sizzle selector engine.
700
+
701
+ var $el = $(el);
702
+ var overflowX = el.style.overflowX;
703
+ var overflowY = el.style.overflowY;
704
+
705
+ //Check both x and y declarations
706
+ if (overflowX === overflowY &&
707
+ (overflowY === 'hidden' || overflowY === 'visible')) {
708
+ return false;
709
+ }
710
+
711
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
712
+ return true;
713
+ }
714
+
715
+ return ($el.innerHeight() < el.scrollHeight ||
716
+ $el.innerWidth() < el.scrollWidth);
717
+ };
718
+
719
+ Utils.escapeMarkup = function (markup) {
720
+ var replaceMap = {
721
+ '\\': '&#92;',
722
+ '&': '&amp;',
723
+ '<': '&lt;',
724
+ '>': '&gt;',
725
+ '"': '&quot;',
726
+ '\'': '&#39;',
727
+ '/': '&#47;'
728
+ };
729
+
730
+ // Do not try to escape the markup if it's not a string
731
+ if (typeof markup !== 'string') {
732
+ return markup;
733
+ }
734
+
735
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
736
+ return replaceMap[match];
737
+ });
738
+ };
739
+
740
+ // Append an array of jQuery nodes to a given element.
741
+ Utils.appendMany = function ($element, $nodes) {
742
+ // jQuery 1.7.x does not support $.fn.append() with an array
743
+ // Fall back to a jQuery object collection using $.fn.add()
744
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
745
+ var $jqNodes = $();
746
+
747
+ $.map($nodes, function (node) {
748
+ $jqNodes = $jqNodes.add(node);
749
+ });
750
+
751
+ $nodes = $jqNodes;
752
+ }
753
+
754
+ $element.append($nodes);
755
+ };
756
+
757
+ return Utils;
758
+ });
759
+
760
+ S2.define('select2/results',[
761
+ 'jquery',
762
+ './utils'
763
+ ], function ($, Utils) {
764
+ function Results ($element, options, dataAdapter) {
765
+ this.$element = $element;
766
+ this.data = dataAdapter;
767
+ this.options = options;
768
+
769
+ Results.__super__.constructor.call(this);
770
+ }
771
+
772
+ Utils.Extend(Results, Utils.Observable);
773
+
774
+ Results.prototype.render = function () {
775
+ var $results = $(
776
+ '<ul class="select2-results__options" role="tree"></ul>'
777
+ );
778
+
779
+ if (this.options.get('multiple')) {
780
+ $results.attr('aria-multiselectable', 'true');
781
+ }
782
+
783
+ this.$results = $results;
784
+
785
+ return $results;
786
+ };
787
+
788
+ Results.prototype.clear = function () {
789
+ this.$results.empty();
790
+ };
791
+
792
+ Results.prototype.displayMessage = function (params) {
793
+ var escapeMarkup = this.options.get('escapeMarkup');
794
+
795
+ this.clear();
796
+ this.hideLoading();
797
+
798
+ var $message = $(
799
+ '<li role="treeitem" aria-live="assertive"' +
800
+ ' class="select2-results__option"></li>'
801
+ );
802
+
803
+ var message = this.options.get('translations').get(params.message);
804
+
805
+ $message.append(
806
+ escapeMarkup(
807
+ message(params.args)
808
+ )
809
+ );
810
+
811
+ $message[0].className += ' select2-results__message';
812
+
813
+ this.$results.append($message);
814
+ };
815
+
816
+ Results.prototype.hideMessages = function () {
817
+ this.$results.find('.select2-results__message').remove();
818
+ };
819
+
820
+ Results.prototype.append = function (data) {
821
+ this.hideLoading();
822
+
823
+ var $options = [];
824
+
825
+ if (data.results == null || data.results.length === 0) {
826
+ if (this.$results.children().length === 0) {
827
+ this.trigger('results:message', {
828
+ message: 'noResults'
829
+ });
830
+ }
831
+
832
+ return;
833
+ }
834
+
835
+ data.results = this.sort(data.results);
836
+
837
+ for (var d = 0; d < data.results.length; d++) {
838
+ var item = data.results[d];
839
+
840
+ var $option = this.option(item);
841
+
842
+ $options.push($option);
843
+ }
844
+
845
+ this.$results.append($options);
846
+ };
847
+
848
+ Results.prototype.position = function ($results, $dropdown) {
849
+ var $resultsContainer = $dropdown.find('.select2-results');
850
+ $resultsContainer.append($results);
851
+ };
852
+
853
+ Results.prototype.sort = function (data) {
854
+ var sorter = this.options.get('sorter');
855
+
856
+ return sorter(data);
857
+ };
858
+
859
+ Results.prototype.highlightFirstItem = function () {
860
+ var $options = this.$results
861
+ .find('.select2-results__option[aria-selected]');
862
+
863
+ var $selected = $options.filter('[aria-selected=true]');
864
+
865
+ // Check if there are any selected options
866
+ if ($selected.length > 0) {
867
+ // If there are selected options, highlight the first
868
+ $selected.first().trigger('mouseenter');
869
+ } else {
870
+ // If there are no selected options, highlight the first option
871
+ // in the dropdown
872
+ $options.first().trigger('mouseenter');
873
+ }
874
+
875
+ this.ensureHighlightVisible();
876
+ };
877
+
878
+ Results.prototype.setClasses = function () {
879
+ var self = this;
880
+
881
+ this.data.current(function (selected) {
882
+ var selectedIds = $.map(selected, function (s) {
883
+ return s.id.toString();
884
+ });
885
+
886
+ var $options = self.$results
887
+ .find('.select2-results__option[aria-selected]');
888
+
889
+ $options.each(function () {
890
+ var $option = $(this);
891
+
892
+ var item = $.data(this, 'data');
893
+
894
+ // id needs to be converted to a string when comparing
895
+ var id = '' + item.id;
896
+
897
+ if ((item.element != null && item.element.selected) ||
898
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
899
+ $option.attr('aria-selected', 'true');
900
+ } else {
901
+ $option.attr('aria-selected', 'false');
902
+ }
903
+ });
904
+
905
+ });
906
+ };
907
+
908
+ Results.prototype.showLoading = function (params) {
909
+ this.hideLoading();
910
+
911
+ var loadingMore = this.options.get('translations').get('searching');
912
+
913
+ var loading = {
914
+ disabled: true,
915
+ loading: true,
916
+ text: loadingMore(params)
917
+ };
918
+ var $loading = this.option(loading);
919
+ $loading.className += ' loading-results';
920
+
921
+ this.$results.prepend($loading);
922
+ };
923
+
924
+ Results.prototype.hideLoading = function () {
925
+ this.$results.find('.loading-results').remove();
926
+ };
927
+
928
+ Results.prototype.option = function (data) {
929
+ var option = document.createElement('li');
930
+ option.className = 'select2-results__option';
931
+
932
+ var attrs = {
933
+ 'role': 'treeitem',
934
+ 'aria-selected': 'false'
935
+ };
936
+
937
+ if (data.disabled) {
938
+ delete attrs['aria-selected'];
939
+ attrs['aria-disabled'] = 'true';
940
+ }
941
+
942
+ if (data.id == null) {
943
+ delete attrs['aria-selected'];
944
+ }
945
+
946
+ if (data._resultId != null) {
947
+ option.id = data._resultId;
948
+ }
949
+
950
+ if (data.title) {
951
+ option.title = data.title;
952
+ }
953
+
954
+ if (data.children) {
955
+ attrs.role = 'group';
956
+ attrs['aria-label'] = data.text;
957
+ delete attrs['aria-selected'];
958
+ }
959
+
960
+ for (var attr in attrs) {
961
+ var val = attrs[attr];
962
+
963
+ option.setAttribute(attr, val);
964
+ }
965
+
966
+ if (data.children) {
967
+ var $option = $(option);
968
+
969
+ var label = document.createElement('strong');
970
+ label.className = 'select2-results__group';
971
+
972
+ var $label = $(label);
973
+ this.template(data, label);
974
+
975
+ var $children = [];
976
+
977
+ for (var c = 0; c < data.children.length; c++) {
978
+ var child = data.children[c];
979
+
980
+ var $child = this.option(child);
981
+
982
+ $children.push($child);
983
+ }
984
+
985
+ var $childrenContainer = $('<ul></ul>', {
986
+ 'class': 'select2-results__options select2-results__options--nested'
987
+ });
988
+
989
+ $childrenContainer.append($children);
990
+
991
+ $option.append(label);
992
+ $option.append($childrenContainer);
993
+ } else {
994
+ this.template(data, option);
995
+ }
996
+
997
+ $.data(option, 'data', data);
998
+
999
+ return option;
1000
+ };
1001
+
1002
+ Results.prototype.bind = function (container, $container) {
1003
+ var self = this;
1004
+
1005
+ var id = container.id + '-results';
1006
+
1007
+ this.$results.attr('id', id);
1008
+
1009
+ container.on('results:all', function (params) {
1010
+ self.clear();
1011
+ self.append(params.data);
1012
+
1013
+ if (container.isOpen()) {
1014
+ self.setClasses();
1015
+ self.highlightFirstItem();
1016
+ }
1017
+ });
1018
+
1019
+ container.on('results:append', function (params) {
1020
+ self.append(params.data);
1021
+
1022
+ if (container.isOpen()) {
1023
+ self.setClasses();
1024
+ }
1025
+ });
1026
+
1027
+ container.on('query', function (params) {
1028
+ self.hideMessages();
1029
+ self.showLoading(params);
1030
+ });
1031
+
1032
+ container.on('select', function () {
1033
+ if (!container.isOpen()) {
1034
+ return;
1035
+ }
1036
+
1037
+ self.setClasses();
1038
+ self.highlightFirstItem();
1039
+ });
1040
+
1041
+ container.on('unselect', function () {
1042
+ if (!container.isOpen()) {
1043
+ return;
1044
+ }
1045
+
1046
+ self.setClasses();
1047
+ self.highlightFirstItem();
1048
+ });
1049
+
1050
+ container.on('open', function () {
1051
+ // When the dropdown is open, aria-expended="true"
1052
+ self.$results.attr('aria-expanded', 'true');
1053
+ self.$results.attr('aria-hidden', 'false');
1054
+
1055
+ self.setClasses();
1056
+ self.ensureHighlightVisible();
1057
+ });
1058
+
1059
+ container.on('close', function () {
1060
+ // When the dropdown is closed, aria-expended="false"
1061
+ self.$results.attr('aria-expanded', 'false');
1062
+ self.$results.attr('aria-hidden', 'true');
1063
+ self.$results.removeAttr('aria-activedescendant');
1064
+ });
1065
+
1066
+ container.on('results:toggle', function () {
1067
+ var $highlighted = self.getHighlightedResults();
1068
+
1069
+ if ($highlighted.length === 0) {
1070
+ return;
1071
+ }
1072
+
1073
+ $highlighted.trigger('mouseup');
1074
+ });
1075
+
1076
+ container.on('results:select', function () {
1077
+ var $highlighted = self.getHighlightedResults();
1078
+
1079
+ if ($highlighted.length === 0) {
1080
+ return;
1081
+ }
1082
+
1083
+ var data = $highlighted.data('data');
1084
+
1085
+ if ($highlighted.attr('aria-selected') == 'true') {
1086
+ self.trigger('close', {});
1087
+ } else {
1088
+ self.trigger('select', {
1089
+ data: data
1090
+ });
1091
+ }
1092
+ });
1093
+
1094
+ container.on('results:previous', function () {
1095
+ var $highlighted = self.getHighlightedResults();
1096
+
1097
+ var $options = self.$results.find('[aria-selected]');
1098
+
1099
+ var currentIndex = $options.index($highlighted);
1100
+
1101
+ // If we are already at te top, don't move further
1102
+ if (currentIndex === 0) {
1103
+ return;
1104
+ }
1105
+
1106
+ var nextIndex = currentIndex - 1;
1107
+
1108
+ // If none are highlighted, highlight the first
1109
+ if ($highlighted.length === 0) {
1110
+ nextIndex = 0;
1111
+ }
1112
+
1113
+ var $next = $options.eq(nextIndex);
1114
+
1115
+ $next.trigger('mouseenter');
1116
+
1117
+ var currentOffset = self.$results.offset().top;
1118
+ var nextTop = $next.offset().top;
1119
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
1120
+
1121
+ if (nextIndex === 0) {
1122
+ self.$results.scrollTop(0);
1123
+ } else if (nextTop - currentOffset < 0) {
1124
+ self.$results.scrollTop(nextOffset);
1125
+ }
1126
+ });
1127
+
1128
+ container.on('results:next', function () {
1129
+ var $highlighted = self.getHighlightedResults();
1130
+
1131
+ var $options = self.$results.find('[aria-selected]');
1132
+
1133
+ var currentIndex = $options.index($highlighted);
1134
+
1135
+ var nextIndex = currentIndex + 1;
1136
+
1137
+ // If we are at the last option, stay there
1138
+ if (nextIndex >= $options.length) {
1139
+ return;
1140
+ }
1141
+
1142
+ var $next = $options.eq(nextIndex);
1143
+
1144
+ $next.trigger('mouseenter');
1145
+
1146
+ var currentOffset = self.$results.offset().top +
1147
+ self.$results.outerHeight(false);
1148
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
1149
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
1150
+
1151
+ if (nextIndex === 0) {
1152
+ self.$results.scrollTop(0);
1153
+ } else if (nextBottom > currentOffset) {
1154
+ self.$results.scrollTop(nextOffset);
1155
+ }
1156
+ });
1157
+
1158
+ container.on('results:focus', function (params) {
1159
+ params.element.addClass('select2-results__option--highlighted');
1160
+ });
1161
+
1162
+ container.on('results:message', function (params) {
1163
+ self.displayMessage(params);
1164
+ });
1165
+
1166
+ if ($.fn.mousewheel) {
1167
+ this.$results.on('mousewheel', function (e) {
1168
+ var top = self.$results.scrollTop();
1169
+
1170
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
1171
+
1172
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
1173
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
1174
+
1175
+ if (isAtTop) {
1176
+ self.$results.scrollTop(0);
1177
+
1178
+ e.preventDefault();
1179
+ e.stopPropagation();
1180
+ } else if (isAtBottom) {
1181
+ self.$results.scrollTop(
1182
+ self.$results.get(0).scrollHeight - self.$results.height()
1183
+ );
1184
+
1185
+ e.preventDefault();
1186
+ e.stopPropagation();
1187
+ }
1188
+ });
1189
+ }
1190
+
1191
+ this.$results.on('mouseup', '.select2-results__option[aria-selected]',
1192
+ function (evt) {
1193
+ var $this = $(this);
1194
+
1195
+ var data = $this.data('data');
1196
+
1197
+ if ($this.attr('aria-selected') === 'true') {
1198
+ if (self.options.get('multiple')) {
1199
+ self.trigger('unselect', {
1200
+ originalEvent: evt,
1201
+ data: data
1202
+ });
1203
+ } else {
1204
+ self.trigger('close', {});
1205
+ }
1206
+
1207
+ return;
1208
+ }
1209
+
1210
+ self.trigger('select', {
1211
+ originalEvent: evt,
1212
+ data: data
1213
+ });
1214
+ });
1215
+
1216
+ this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
1217
+ function (evt) {
1218
+ var data = $(this).data('data');
1219
+
1220
+ self.getHighlightedResults()
1221
+ .removeClass('select2-results__option--highlighted');
1222
+
1223
+ self.trigger('results:focus', {
1224
+ data: data,
1225
+ element: $(this)
1226
+ });
1227
+ });
1228
+ };
1229
+
1230
+ Results.prototype.getHighlightedResults = function () {
1231
+ var $highlighted = this.$results
1232
+ .find('.select2-results__option--highlighted');
1233
+
1234
+ return $highlighted;
1235
+ };
1236
+
1237
+ Results.prototype.destroy = function () {
1238
+ this.$results.remove();
1239
+ };
1240
+
1241
+ Results.prototype.ensureHighlightVisible = function () {
1242
+ var $highlighted = this.getHighlightedResults();
1243
+
1244
+ if ($highlighted.length === 0) {
1245
+ return;
1246
+ }
1247
+
1248
+ var $options = this.$results.find('[aria-selected]');
1249
+
1250
+ var currentIndex = $options.index($highlighted);
1251
+
1252
+ var currentOffset = this.$results.offset().top;
1253
+ var nextTop = $highlighted.offset().top;
1254
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
1255
+
1256
+ var offsetDelta = nextTop - currentOffset;
1257
+ nextOffset -= $highlighted.outerHeight(false) * 2;
1258
+
1259
+ if (currentIndex <= 2) {
1260
+ this.$results.scrollTop(0);
1261
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
1262
+ this.$results.scrollTop(nextOffset);
1263
+ }
1264
+ };
1265
+
1266
+ Results.prototype.template = function (result, container) {
1267
+ var template = this.options.get('templateResult');
1268
+ var escapeMarkup = this.options.get('escapeMarkup');
1269
+
1270
+ var content = template(result, container);
1271
+
1272
+ if (content == null) {
1273
+ container.style.display = 'none';
1274
+ } else if (typeof content === 'string') {
1275
+ container.innerHTML = escapeMarkup(content);
1276
+ } else {
1277
+ $(container).append(content);
1278
+ }
1279
+ };
1280
+
1281
+ return Results;
1282
+ });
1283
+
1284
+ S2.define('select2/keys',[
1285
+
1286
+ ], function () {
1287
+ var KEYS = {
1288
+ BACKSPACE: 8,
1289
+ TAB: 9,
1290
+ ENTER: 13,
1291
+ SHIFT: 16,
1292
+ CTRL: 17,
1293
+ ALT: 18,
1294
+ ESC: 27,
1295
+ SPACE: 32,
1296
+ PAGE_UP: 33,
1297
+ PAGE_DOWN: 34,
1298
+ END: 35,
1299
+ HOME: 36,
1300
+ LEFT: 37,
1301
+ UP: 38,
1302
+ RIGHT: 39,
1303
+ DOWN: 40,
1304
+ DELETE: 46
1305
+ };
1306
+
1307
+ return KEYS;
1308
+ });
1309
+
1310
+ S2.define('select2/selection/base',[
1311
+ 'jquery',
1312
+ '../utils',
1313
+ '../keys'
1314
+ ], function ($, Utils, KEYS) {
1315
+ function BaseSelection ($element, options) {
1316
+ this.$element = $element;
1317
+ this.options = options;
1318
+
1319
+ BaseSelection.__super__.constructor.call(this);
1320
+ }
1321
+
1322
+ Utils.Extend(BaseSelection, Utils.Observable);
1323
+
1324
+ BaseSelection.prototype.render = function () {
1325
+ var $selection = $(
1326
+ '<span class="select2-selection" role="combobox" ' +
1327
+ ' aria-haspopup="true" aria-expanded="false">' +
1328
+ '</span>'
1329
+ );
1330
+
1331
+ this._tabindex = 0;
1332
+
1333
+ if (this.$element.data('old-tabindex') != null) {
1334
+ this._tabindex = this.$element.data('old-tabindex');
1335
+ } else if (this.$element.attr('tabindex') != null) {
1336
+ this._tabindex = this.$element.attr('tabindex');
1337
+ }
1338
+
1339
+ $selection.attr('title', this.$element.attr('title'));
1340
+ $selection.attr('tabindex', this._tabindex);
1341
+
1342
+ this.$selection = $selection;
1343
+
1344
+ return $selection;
1345
+ };
1346
+
1347
+ BaseSelection.prototype.bind = function (container, $container) {
1348
+ var self = this;
1349
+
1350
+ var id = container.id + '-container';
1351
+ var resultsId = container.id + '-results';
1352
+
1353
+ this.container = container;
1354
+
1355
+ this.$selection.on('focus', function (evt) {
1356
+ self.trigger('focus', evt);
1357
+ });
1358
+
1359
+ this.$selection.on('blur', function (evt) {
1360
+ self._handleBlur(evt);
1361
+ });
1362
+
1363
+ this.$selection.on('keydown', function (evt) {
1364
+ self.trigger('keypress', evt);
1365
+
1366
+ if (evt.which === KEYS.SPACE) {
1367
+ evt.preventDefault();
1368
+ }
1369
+ });
1370
+
1371
+ container.on('results:focus', function (params) {
1372
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
1373
+ });
1374
+
1375
+ container.on('selection:update', function (params) {
1376
+ self.update(params.data);
1377
+ });
1378
+
1379
+ container.on('open', function () {
1380
+ // When the dropdown is open, aria-expanded="true"
1381
+ self.$selection.attr('aria-expanded', 'true');
1382
+ self.$selection.attr('aria-owns', resultsId);
1383
+
1384
+ self._attachCloseHandler(container);
1385
+ });
1386
+
1387
+ container.on('close', function () {
1388
+ // When the dropdown is closed, aria-expanded="false"
1389
+ self.$selection.attr('aria-expanded', 'false');
1390
+ self.$selection.removeAttr('aria-activedescendant');
1391
+ self.$selection.removeAttr('aria-owns');
1392
+
1393
+ self.$selection.focus();
1394
+
1395
+ self._detachCloseHandler(container);
1396
+ });
1397
+
1398
+ container.on('enable', function () {
1399
+ self.$selection.attr('tabindex', self._tabindex);
1400
+ });
1401
+
1402
+ container.on('disable', function () {
1403
+ self.$selection.attr('tabindex', '-1');
1404
+ });
1405
+ };
1406
+
1407
+ BaseSelection.prototype._handleBlur = function (evt) {
1408
+ var self = this;
1409
+
1410
+ // This needs to be delayed as the active element is the body when the tab
1411
+ // key is pressed, possibly along with others.
1412
+ window.setTimeout(function () {
1413
+ // Don't trigger `blur` if the focus is still in the selection
1414
+ if (
1415
+ (document.activeElement == self.$selection[0]) ||
1416
+ ($.contains(self.$selection[0], document.activeElement))
1417
+ ) {
1418
+ return;
1419
+ }
1420
+
1421
+ self.trigger('blur', evt);
1422
+ }, 1);
1423
+ };
1424
+
1425
+ BaseSelection.prototype._attachCloseHandler = function (container) {
1426
+ var self = this;
1427
+
1428
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
1429
+ var $target = $(e.target);
1430
+
1431
+ var $select = $target.closest('.select2');
1432
+
1433
+ var $all = $('.select2.select2-container--open');
1434
+
1435
+ $all.each(function () {
1436
+ var $this = $(this);
1437
+
1438
+ if (this == $select[0]) {
1439
+ return;
1440
+ }
1441
+
1442
+ var $element = $this.data('element');
1443
+
1444
+ $element.select2('close');
1445
+ });
1446
+ });
1447
+ };
1448
+
1449
+ BaseSelection.prototype._detachCloseHandler = function (container) {
1450
+ $(document.body).off('mousedown.select2.' + container.id);
1451
+ };
1452
+
1453
+ BaseSelection.prototype.position = function ($selection, $container) {
1454
+ var $selectionContainer = $container.find('.selection');
1455
+ $selectionContainer.append($selection);
1456
+ };
1457
+
1458
+ BaseSelection.prototype.destroy = function () {
1459
+ this._detachCloseHandler(this.container);
1460
+ };
1461
+
1462
+ BaseSelection.prototype.update = function (data) {
1463
+ throw new Error('The `update` method must be defined in child classes.');
1464
+ };
1465
+
1466
+ return BaseSelection;
1467
+ });
1468
+
1469
+ S2.define('select2/selection/single',[
1470
+ 'jquery',
1471
+ './base',
1472
+ '../utils',
1473
+ '../keys'
1474
+ ], function ($, BaseSelection, Utils, KEYS) {
1475
+ function SingleSelection () {
1476
+ SingleSelection.__super__.constructor.apply(this, arguments);
1477
+ }
1478
+
1479
+ Utils.Extend(SingleSelection, BaseSelection);
1480
+
1481
+ SingleSelection.prototype.render = function () {
1482
+ var $selection = SingleSelection.__super__.render.call(this);
1483
+
1484
+ $selection.addClass('select2-selection--single');
1485
+
1486
+ $selection.html(
1487
+ '<span class="select2-selection__rendered"></span>' +
1488
+ '<span class="select2-selection__arrow" role="presentation">' +
1489
+ '<b role="presentation"></b>' +
1490
+ '</span>'
1491
+ );
1492
+
1493
+ return $selection;
1494
+ };
1495
+
1496
+ SingleSelection.prototype.bind = function (container, $container) {
1497
+ var self = this;
1498
+
1499
+ SingleSelection.__super__.bind.apply(this, arguments);
1500
+
1501
+ var id = container.id + '-container';
1502
+
1503
+ this.$selection.find('.select2-selection__rendered').attr('id', id);
1504
+ this.$selection.attr('aria-labelledby', id);
1505
+
1506
+ this.$selection.on('mousedown', function (evt) {
1507
+ // Only respond to left clicks
1508
+ if (evt.which !== 1) {
1509
+ return;
1510
+ }
1511
+
1512
+ self.trigger('toggle', {
1513
+ originalEvent: evt
1514
+ });
1515
+ });
1516
+
1517
+ this.$selection.on('focus', function (evt) {
1518
+ // User focuses on the container
1519
+ });
1520
+
1521
+ this.$selection.on('blur', function (evt) {
1522
+ // User exits the container
1523
+ });
1524
+
1525
+ container.on('focus', function (evt) {
1526
+ if (!container.isOpen()) {
1527
+ self.$selection.focus();
1528
+ }
1529
+ });
1530
+
1531
+ container.on('selection:update', function (params) {
1532
+ self.update(params.data);
1533
+ });
1534
+ };
1535
+
1536
+ SingleSelection.prototype.clear = function () {
1537
+ this.$selection.find('.select2-selection__rendered').empty();
1538
+ };
1539
+
1540
+ SingleSelection.prototype.display = function (data, container) {
1541
+ var template = this.options.get('templateSelection');
1542
+ var escapeMarkup = this.options.get('escapeMarkup');
1543
+
1544
+ return escapeMarkup(template(data, container));
1545
+ };
1546
+
1547
+ SingleSelection.prototype.selectionContainer = function () {
1548
+ return $('<span></span>');
1549
+ };
1550
+
1551
+ SingleSelection.prototype.update = function (data) {
1552
+ if (data.length === 0) {
1553
+ this.clear();
1554
+ return;
1555
+ }
1556
+
1557
+ var selection = data[0];
1558
+
1559
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1560
+ var formatted = this.display(selection, $rendered);
1561
+
1562
+ $rendered.empty().append(formatted);
1563
+ $rendered.prop('title', selection.title || selection.text);
1564
+ };
1565
+
1566
+ return SingleSelection;
1567
+ });
1568
+
1569
+ S2.define('select2/selection/multiple',[
1570
+ 'jquery',
1571
+ './base',
1572
+ '../utils'
1573
+ ], function ($, BaseSelection, Utils) {
1574
+ function MultipleSelection ($element, options) {
1575
+ MultipleSelection.__super__.constructor.apply(this, arguments);
1576
+ }
1577
+
1578
+ Utils.Extend(MultipleSelection, BaseSelection);
1579
+
1580
+ MultipleSelection.prototype.render = function () {
1581
+ var $selection = MultipleSelection.__super__.render.call(this);
1582
+
1583
+ $selection.addClass('select2-selection--multiple');
1584
+
1585
+ $selection.html(
1586
+ '<ul class="select2-selection__rendered"></ul>'
1587
+ );
1588
+
1589
+ return $selection;
1590
+ };
1591
+
1592
+ MultipleSelection.prototype.bind = function (container, $container) {
1593
+ var self = this;
1594
+
1595
+ MultipleSelection.__super__.bind.apply(this, arguments);
1596
+
1597
+ this.$selection.on('click', function (evt) {
1598
+ self.trigger('toggle', {
1599
+ originalEvent: evt
1600
+ });
1601
+ });
1602
+
1603
+ this.$selection.on(
1604
+ 'click',
1605
+ '.select2-selection__choice__remove',
1606
+ function (evt) {
1607
+ // Ignore the event if it is disabled
1608
+ if (self.options.get('disabled')) {
1609
+ return;
1610
+ }
1611
+
1612
+ var $remove = $(this);
1613
+ var $selection = $remove.parent();
1614
+
1615
+ var data = $selection.data('data');
1616
+
1617
+ self.trigger('unselect', {
1618
+ originalEvent: evt,
1619
+ data: data
1620
+ });
1621
+ }
1622
+ );
1623
+ };
1624
+
1625
+ MultipleSelection.prototype.clear = function () {
1626
+ this.$selection.find('.select2-selection__rendered').empty();
1627
+ };
1628
+
1629
+ MultipleSelection.prototype.display = function (data, container) {
1630
+ var template = this.options.get('templateSelection');
1631
+ var escapeMarkup = this.options.get('escapeMarkup');
1632
+
1633
+ return escapeMarkup(template(data, container));
1634
+ };
1635
+
1636
+ MultipleSelection.prototype.selectionContainer = function () {
1637
+ var $container = $(
1638
+ '<li class="select2-selection__choice">' +
1639
+ '<span class="select2-selection__choice__remove" role="presentation">' +
1640
+ '&times;' +
1641
+ '</span>' +
1642
+ '</li>'
1643
+ );
1644
+
1645
+ return $container;
1646
+ };
1647
+
1648
+ MultipleSelection.prototype.update = function (data) {
1649
+ this.clear();
1650
+
1651
+ if (data.length === 0) {
1652
+ return;
1653
+ }
1654
+
1655
+ var $selections = [];
1656
+
1657
+ for (var d = 0; d < data.length; d++) {
1658
+ var selection = data[d];
1659
+
1660
+ var $selection = this.selectionContainer();
1661
+ var formatted = this.display(selection, $selection);
1662
+
1663
+ $selection.append(formatted);
1664
+ $selection.prop('title', selection.title || selection.text);
1665
+
1666
+ $selection.data('data', selection);
1667
+
1668
+ $selections.push($selection);
1669
+ }
1670
+
1671
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1672
+
1673
+ Utils.appendMany($rendered, $selections);
1674
+ };
1675
+
1676
+ return MultipleSelection;
1677
+ });
1678
+
1679
+ S2.define('select2/selection/placeholder',[
1680
+ '../utils'
1681
+ ], function (Utils) {
1682
+ function Placeholder (decorated, $element, options) {
1683
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
1684
+
1685
+ decorated.call(this, $element, options);
1686
+ }
1687
+
1688
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
1689
+ if (typeof placeholder === 'string') {
1690
+ placeholder = {
1691
+ id: '',
1692
+ text: placeholder
1693
+ };
1694
+ }
1695
+
1696
+ return placeholder;
1697
+ };
1698
+
1699
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
1700
+ var $placeholder = this.selectionContainer();
1701
+
1702
+ $placeholder.html(this.display(placeholder));
1703
+ $placeholder.addClass('select2-selection__placeholder')
1704
+ .removeClass('select2-selection__choice');
1705
+
1706
+ return $placeholder;
1707
+ };
1708
+
1709
+ Placeholder.prototype.update = function (decorated, data) {
1710
+ var singlePlaceholder = (
1711
+ data.length == 1 && data[0].id != this.placeholder.id
1712
+ );
1713
+ var multipleSelections = data.length > 1;
1714
+
1715
+ if (multipleSelections || singlePlaceholder) {
1716
+ return decorated.call(this, data);
1717
+ }
1718
+
1719
+ this.clear();
1720
+
1721
+ var $placeholder = this.createPlaceholder(this.placeholder);
1722
+
1723
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
1724
+ };
1725
+
1726
+ return Placeholder;
1727
+ });
1728
+
1729
+ S2.define('select2/selection/allowClear',[
1730
+ 'jquery',
1731
+ '../keys'
1732
+ ], function ($, KEYS) {
1733
+ function AllowClear () { }
1734
+
1735
+ AllowClear.prototype.bind = function (decorated, container, $container) {
1736
+ var self = this;
1737
+
1738
+ decorated.call(this, container, $container);
1739
+
1740
+ if (this.placeholder == null) {
1741
+ if (this.options.get('debug') && window.console && console.error) {
1742
+ console.error(
1743
+ 'Select2: The `allowClear` option should be used in combination ' +
1744
+ 'with the `placeholder` option.'
1745
+ );
1746
+ }
1747
+ }
1748
+
1749
+ this.$selection.on('mousedown', '.select2-selection__clear',
1750
+ function (evt) {
1751
+ self._handleClear(evt);
1752
+ });
1753
+
1754
+ container.on('keypress', function (evt) {
1755
+ self._handleKeyboardClear(evt, container);
1756
+ });
1757
+ };
1758
+
1759
+ AllowClear.prototype._handleClear = function (_, evt) {
1760
+ // Ignore the event if it is disabled
1761
+ if (this.options.get('disabled')) {
1762
+ return;
1763
+ }
1764
+
1765
+ var $clear = this.$selection.find('.select2-selection__clear');
1766
+
1767
+ // Ignore the event if nothing has been selected
1768
+ if ($clear.length === 0) {
1769
+ return;
1770
+ }
1771
+
1772
+ evt.stopPropagation();
1773
+
1774
+ var data = $clear.data('data');
1775
+
1776
+ for (var d = 0; d < data.length; d++) {
1777
+ var unselectData = {
1778
+ data: data[d]
1779
+ };
1780
+
1781
+ // Trigger the `unselect` event, so people can prevent it from being
1782
+ // cleared.
1783
+ this.trigger('unselect', unselectData);
1784
+
1785
+ // If the event was prevented, don't clear it out.
1786
+ if (unselectData.prevented) {
1787
+ return;
1788
+ }
1789
+ }
1790
+
1791
+ this.$element.val(this.placeholder.id).trigger('change');
1792
+
1793
+ this.trigger('toggle', {});
1794
+ };
1795
+
1796
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
1797
+ if (container.isOpen()) {
1798
+ return;
1799
+ }
1800
+
1801
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
1802
+ this._handleClear(evt);
1803
+ }
1804
+ };
1805
+
1806
+ AllowClear.prototype.update = function (decorated, data) {
1807
+ decorated.call(this, data);
1808
+
1809
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
1810
+ data.length === 0) {
1811
+ return;
1812
+ }
1813
+
1814
+ var $remove = $(
1815
+ '<span class="select2-selection__clear">' +
1816
+ '&times;' +
1817
+ '</span>'
1818
+ );
1819
+ $remove.data('data', data);
1820
+
1821
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
1822
+ };
1823
+
1824
+ return AllowClear;
1825
+ });
1826
+
1827
+ S2.define('select2/selection/search',[
1828
+ 'jquery',
1829
+ '../utils',
1830
+ '../keys'
1831
+ ], function ($, Utils, KEYS) {
1832
+ function Search (decorated, $element, options) {
1833
+ decorated.call(this, $element, options);
1834
+ }
1835
+
1836
+ Search.prototype.render = function (decorated) {
1837
+ var $search = $(
1838
+ '<li class="select2-search select2-search--inline">' +
1839
+ '<input class="select2-search__field" type="search" tabindex="-1"' +
1840
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1841
+ ' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
1842
+ '</li>'
1843
+ );
1844
+
1845
+ this.$searchContainer = $search;
1846
+ this.$search = $search.find('input');
1847
+
1848
+ var $rendered = decorated.call(this);
1849
+
1850
+ this._transferTabIndex();
1851
+
1852
+ return $rendered;
1853
+ };
1854
+
1855
+ Search.prototype.bind = function (decorated, container, $container) {
1856
+ var self = this;
1857
+
1858
+ decorated.call(this, container, $container);
1859
+
1860
+ container.on('open', function () {
1861
+ self.$search.trigger('focus');
1862
+ });
1863
+
1864
+ container.on('close', function () {
1865
+ self.$search.val('');
1866
+ self.$search.removeAttr('aria-activedescendant');
1867
+ self.$search.trigger('focus');
1868
+ });
1869
+
1870
+ container.on('enable', function () {
1871
+ self.$search.prop('disabled', false);
1872
+
1873
+ self._transferTabIndex();
1874
+ });
1875
+
1876
+ container.on('disable', function () {
1877
+ self.$search.prop('disabled', true);
1878
+ });
1879
+
1880
+ container.on('focus', function (evt) {
1881
+ self.$search.trigger('focus');
1882
+ });
1883
+
1884
+ container.on('results:focus', function (params) {
1885
+ self.$search.attr('aria-activedescendant', params.id);
1886
+ });
1887
+
1888
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1889
+ self.trigger('focus', evt);
1890
+ });
1891
+
1892
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1893
+ self._handleBlur(evt);
1894
+ });
1895
+
1896
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
1897
+ evt.stopPropagation();
1898
+
1899
+ self.trigger('keypress', evt);
1900
+
1901
+ self._keyUpPrevented = evt.isDefaultPrevented();
1902
+
1903
+ var key = evt.which;
1904
+
1905
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
1906
+ var $previousChoice = self.$searchContainer
1907
+ .prev('.select2-selection__choice');
1908
+
1909
+ if ($previousChoice.length > 0) {
1910
+ var item = $previousChoice.data('data');
1911
+
1912
+ self.searchRemoveChoice(item);
1913
+
1914
+ evt.preventDefault();
1915
+ }
1916
+ }
1917
+ });
1918
+
1919
+ // Try to detect the IE version should the `documentMode` property that
1920
+ // is stored on the document. This is only implemented in IE and is
1921
+ // slightly cleaner than doing a user agent check.
1922
+ // This property is not available in Edge, but Edge also doesn't have
1923
+ // this bug.
1924
+ var msie = document.documentMode;
1925
+ var disableInputEvents = msie && msie <= 11;
1926
+
1927
+ // Workaround for browsers which do not support the `input` event
1928
+ // This will prevent double-triggering of events for browsers which support
1929
+ // both the `keyup` and `input` events.
1930
+ this.$selection.on(
1931
+ 'input.searchcheck',
1932
+ '.select2-search--inline',
1933
+ function (evt) {
1934
+ // IE will trigger the `input` event when a placeholder is used on a
1935
+ // search box. To get around this issue, we are forced to ignore all
1936
+ // `input` events in IE and keep using `keyup`.
1937
+ if (disableInputEvents) {
1938
+ self.$selection.off('input.search input.searchcheck');
1939
+ return;
1940
+ }
1941
+
1942
+ // Unbind the duplicated `keyup` event
1943
+ self.$selection.off('keyup.search');
1944
+ }
1945
+ );
1946
+
1947
+ this.$selection.on(
1948
+ 'keyup.search input.search',
1949
+ '.select2-search--inline',
1950
+ function (evt) {
1951
+ // IE will trigger the `input` event when a placeholder is used on a
1952
+ // search box. To get around this issue, we are forced to ignore all
1953
+ // `input` events in IE and keep using `keyup`.
1954
+ if (disableInputEvents && evt.type === 'input') {
1955
+ self.$selection.off('input.search input.searchcheck');
1956
+ return;
1957
+ }
1958
+
1959
+ var key = evt.which;
1960
+
1961
+ // We can freely ignore events from modifier keys
1962
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1963
+ return;
1964
+ }
1965
+
1966
+ // Tabbing will be handled during the `keydown` phase
1967
+ if (key == KEYS.TAB) {
1968
+ return;
1969
+ }
1970
+
1971
+ self.handleSearch(evt);
1972
+ }
1973
+ );
1974
+ };
1975
+
1976
+ /**
1977
+ * This method will transfer the tabindex attribute from the rendered
1978
+ * selection to the search box. This allows for the search box to be used as
1979
+ * the primary focus instead of the selection container.
1980
+ *
1981
+ * @private
1982
+ */
1983
+ Search.prototype._transferTabIndex = function (decorated) {
1984
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
1985
+ this.$selection.attr('tabindex', '-1');
1986
+ };
1987
+
1988
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
1989
+ this.$search.attr('placeholder', placeholder.text);
1990
+ };
1991
+
1992
+ Search.prototype.update = function (decorated, data) {
1993
+ var searchHadFocus = this.$search[0] == document.activeElement;
1994
+
1995
+ this.$search.attr('placeholder', '');
1996
+
1997
+ decorated.call(this, data);
1998
+
1999
+ this.$selection.find('.select2-selection__rendered')
2000
+ .append(this.$searchContainer);
2001
+
2002
+ this.resizeSearch();
2003
+ if (searchHadFocus) {
2004
+ this.$search.focus();
2005
+ }
2006
+ };
2007
+
2008
+ Search.prototype.handleSearch = function () {
2009
+ this.resizeSearch();
2010
+
2011
+ if (!this._keyUpPrevented) {
2012
+ var input = this.$search.val();
2013
+
2014
+ this.trigger('query', {
2015
+ term: input
2016
+ });
2017
+ }
2018
+
2019
+ this._keyUpPrevented = false;
2020
+ };
2021
+
2022
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
2023
+ this.trigger('unselect', {
2024
+ data: item
2025
+ });
2026
+
2027
+ this.$search.val(item.text);
2028
+ this.handleSearch();
2029
+ };
2030
+
2031
+ Search.prototype.resizeSearch = function () {
2032
+ this.$search.css('width', '25px');
2033
+
2034
+ var width = '';
2035
+
2036
+ if (this.$search.attr('placeholder') !== '') {
2037
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
2038
+ } else {
2039
+ var minimumWidth = this.$search.val().length + 1;
2040
+
2041
+ width = (minimumWidth * 0.75) + 'em';
2042
+ }
2043
+
2044
+ this.$search.css('width', width);
2045
+ };
2046
+
2047
+ return Search;
2048
+ });
2049
+
2050
+ S2.define('select2/selection/eventRelay',[
2051
+ 'jquery'
2052
+ ], function ($) {
2053
+ function EventRelay () { }
2054
+
2055
+ EventRelay.prototype.bind = function (decorated, container, $container) {
2056
+ var self = this;
2057
+ var relayEvents = [
2058
+ 'open', 'opening',
2059
+ 'close', 'closing',
2060
+ 'select', 'selecting',
2061
+ 'unselect', 'unselecting'
2062
+ ];
2063
+
2064
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
2065
+
2066
+ decorated.call(this, container, $container);
2067
+
2068
+ container.on('*', function (name, params) {
2069
+ // Ignore events that should not be relayed
2070
+ if ($.inArray(name, relayEvents) === -1) {
2071
+ return;
2072
+ }
2073
+
2074
+ // The parameters should always be an object
2075
+ params = params || {};
2076
+
2077
+ // Generate the jQuery event for the Select2 event
2078
+ var evt = $.Event('select2:' + name, {
2079
+ params: params
2080
+ });
2081
+
2082
+ self.$element.trigger(evt);
2083
+
2084
+ // Only handle preventable events if it was one
2085
+ if ($.inArray(name, preventableEvents) === -1) {
2086
+ return;
2087
+ }
2088
+
2089
+ params.prevented = evt.isDefaultPrevented();
2090
+ });
2091
+ };
2092
+
2093
+ return EventRelay;
2094
+ });
2095
+
2096
+ S2.define('select2/translation',[
2097
+ 'jquery',
2098
+ 'require'
2099
+ ], function ($, require) {
2100
+ function Translation (dict) {
2101
+ this.dict = dict || {};
2102
+ }
2103
+
2104
+ Translation.prototype.all = function () {
2105
+ return this.dict;
2106
+ };
2107
+
2108
+ Translation.prototype.get = function (key) {
2109
+ return this.dict[key];
2110
+ };
2111
+
2112
+ Translation.prototype.extend = function (translation) {
2113
+ this.dict = $.extend({}, translation.all(), this.dict);
2114
+ };
2115
+
2116
+ // Static functions
2117
+
2118
+ Translation._cache = {};
2119
+
2120
+ Translation.loadPath = function (path) {
2121
+ if (!(path in Translation._cache)) {
2122
+ var translations = require(path);
2123
+
2124
+ Translation._cache[path] = translations;
2125
+ }
2126
+
2127
+ return new Translation(Translation._cache[path]);
2128
+ };
2129
+
2130
+ return Translation;
2131
+ });
2132
+
2133
+ S2.define('select2/diacritics',[
2134
+
2135
+ ], function () {
2136
+ var diacritics = {
2137
+ '\u24B6': 'A',
2138
+ '\uFF21': 'A',
2139
+ '\u00C0': 'A',
2140
+ '\u00C1': 'A',
2141
+ '\u00C2': 'A',
2142
+ '\u1EA6': 'A',
2143
+ '\u1EA4': 'A',
2144
+ '\u1EAA': 'A',
2145
+ '\u1EA8': 'A',
2146
+ '\u00C3': 'A',
2147
+ '\u0100': 'A',
2148
+ '\u0102': 'A',
2149
+ '\u1EB0': 'A',
2150
+ '\u1EAE': 'A',
2151
+ '\u1EB4': 'A',
2152
+ '\u1EB2': 'A',
2153
+ '\u0226': 'A',
2154
+ '\u01E0': 'A',
2155
+ '\u00C4': 'A',
2156
+ '\u01DE': 'A',
2157
+ '\u1EA2': 'A',
2158
+ '\u00C5': 'A',
2159
+ '\u01FA': 'A',
2160
+ '\u01CD': 'A',
2161
+ '\u0200': 'A',
2162
+ '\u0202': 'A',
2163
+ '\u1EA0': 'A',
2164
+ '\u1EAC': 'A',
2165
+ '\u1EB6': 'A',
2166
+ '\u1E00': 'A',
2167
+ '\u0104': 'A',
2168
+ '\u023A': 'A',
2169
+ '\u2C6F': 'A',
2170
+ '\uA732': 'AA',
2171
+ '\u00C6': 'AE',
2172
+ '\u01FC': 'AE',
2173
+ '\u01E2': 'AE',
2174
+ '\uA734': 'AO',
2175
+ '\uA736': 'AU',
2176
+ '\uA738': 'AV',
2177
+ '\uA73A': 'AV',
2178
+ '\uA73C': 'AY',
2179
+ '\u24B7': 'B',
2180
+ '\uFF22': 'B',
2181
+ '\u1E02': 'B',
2182
+ '\u1E04': 'B',
2183
+ '\u1E06': 'B',
2184
+ '\u0243': 'B',
2185
+ '\u0182': 'B',
2186
+ '\u0181': 'B',
2187
+ '\u24B8': 'C',
2188
+ '\uFF23': 'C',
2189
+ '\u0106': 'C',
2190
+ '\u0108': 'C',
2191
+ '\u010A': 'C',
2192
+ '\u010C': 'C',
2193
+ '\u00C7': 'C',
2194
+ '\u1E08': 'C',
2195
+ '\u0187': 'C',
2196
+ '\u023B': 'C',
2197
+ '\uA73E': 'C',
2198
+ '\u24B9': 'D',
2199
+ '\uFF24': 'D',
2200
+ '\u1E0A': 'D',
2201
+ '\u010E': 'D',
2202
+ '\u1E0C': 'D',
2203
+ '\u1E10': 'D',
2204
+ '\u1E12': 'D',
2205
+ '\u1E0E': 'D',
2206
+ '\u0110': 'D',
2207
+ '\u018B': 'D',
2208
+ '\u018A': 'D',
2209
+ '\u0189': 'D',
2210
+ '\uA779': 'D',
2211
+ '\u01F1': 'DZ',
2212
+ '\u01C4': 'DZ',
2213
+ '\u01F2': 'Dz',
2214
+ '\u01C5': 'Dz',
2215
+ '\u24BA': 'E',
2216
+ '\uFF25': 'E',
2217
+ '\u00C8': 'E',
2218
+ '\u00C9': 'E',
2219
+ '\u00CA': 'E',
2220
+ '\u1EC0': 'E',
2221
+ '\u1EBE': 'E',
2222
+ '\u1EC4': 'E',
2223
+ '\u1EC2': 'E',
2224
+ '\u1EBC': 'E',
2225
+ '\u0112': 'E',
2226
+ '\u1E14': 'E',
2227
+ '\u1E16': 'E',
2228
+ '\u0114': 'E',
2229
+ '\u0116': 'E',
2230
+ '\u00CB': 'E',
2231
+ '\u1EBA': 'E',
2232
+ '\u011A': 'E',
2233
+ '\u0204': 'E',
2234
+ '\u0206': 'E',
2235
+ '\u1EB8': 'E',
2236
+ '\u1EC6': 'E',
2237
+ '\u0228': 'E',
2238
+ '\u1E1C': 'E',
2239
+ '\u0118': 'E',
2240
+ '\u1E18': 'E',
2241
+ '\u1E1A': 'E',
2242
+ '\u0190': 'E',
2243
+ '\u018E': 'E',
2244
+ '\u24BB': 'F',
2245
+ '\uFF26': 'F',
2246
+ '\u1E1E': 'F',
2247
+ '\u0191': 'F',
2248
+ '\uA77B': 'F',
2249
+ '\u24BC': 'G',
2250
+ '\uFF27': 'G',
2251
+ '\u01F4': 'G',
2252
+ '\u011C': 'G',
2253
+ '\u1E20': 'G',
2254
+ '\u011E': 'G',
2255
+ '\u0120': 'G',
2256
+ '\u01E6': 'G',
2257
+ '\u0122': 'G',
2258
+ '\u01E4': 'G',
2259
+ '\u0193': 'G',
2260
+ '\uA7A0': 'G',
2261
+ '\uA77D': 'G',
2262
+ '\uA77E': 'G',
2263
+ '\u24BD': 'H',
2264
+ '\uFF28': 'H',
2265
+ '\u0124': 'H',
2266
+ '\u1E22': 'H',
2267
+ '\u1E26': 'H',
2268
+ '\u021E': 'H',
2269
+ '\u1E24': 'H',
2270
+ '\u1E28': 'H',
2271
+ '\u1E2A': 'H',
2272
+ '\u0126': 'H',
2273
+ '\u2C67': 'H',
2274
+ '\u2C75': 'H',
2275
+ '\uA78D': 'H',
2276
+ '\u24BE': 'I',
2277
+ '\uFF29': 'I',
2278
+ '\u00CC': 'I',
2279
+ '\u00CD': 'I',
2280
+ '\u00CE': 'I',
2281
+ '\u0128': 'I',
2282
+ '\u012A': 'I',
2283
+ '\u012C': 'I',
2284
+ '\u0130': 'I',
2285
+ '\u00CF': 'I',
2286
+ '\u1E2E': 'I',
2287
+ '\u1EC8': 'I',
2288
+ '\u01CF': 'I',
2289
+ '\u0208': 'I',
2290
+ '\u020A': 'I',
2291
+ '\u1ECA': 'I',
2292
+ '\u012E': 'I',
2293
+ '\u1E2C': 'I',
2294
+ '\u0197': 'I',
2295
+ '\u24BF': 'J',
2296
+ '\uFF2A': 'J',
2297
+ '\u0134': 'J',
2298
+ '\u0248': 'J',
2299
+ '\u24C0': 'K',
2300
+ '\uFF2B': 'K',
2301
+ '\u1E30': 'K',
2302
+ '\u01E8': 'K',
2303
+ '\u1E32': 'K',
2304
+ '\u0136': 'K',
2305
+ '\u1E34': 'K',
2306
+ '\u0198': 'K',
2307
+ '\u2C69': 'K',
2308
+ '\uA740': 'K',
2309
+ '\uA742': 'K',
2310
+ '\uA744': 'K',
2311
+ '\uA7A2': 'K',
2312
+ '\u24C1': 'L',
2313
+ '\uFF2C': 'L',
2314
+ '\u013F': 'L',
2315
+ '\u0139': 'L',
2316
+ '\u013D': 'L',
2317
+ '\u1E36': 'L',
2318
+ '\u1E38': 'L',
2319
+ '\u013B': 'L',
2320
+ '\u1E3C': 'L',
2321
+ '\u1E3A': 'L',
2322
+ '\u0141': 'L',
2323
+ '\u023D': 'L',
2324
+ '\u2C62': 'L',
2325
+ '\u2C60': 'L',
2326
+ '\uA748': 'L',
2327
+ '\uA746': 'L',
2328
+ '\uA780': 'L',
2329
+ '\u01C7': 'LJ',
2330
+ '\u01C8': 'Lj',
2331
+ '\u24C2': 'M',
2332
+ '\uFF2D': 'M',
2333
+ '\u1E3E': 'M',
2334
+ '\u1E40': 'M',
2335
+ '\u1E42': 'M',
2336
+ '\u2C6E': 'M',
2337
+ '\u019C': 'M',
2338
+ '\u24C3': 'N',
2339
+ '\uFF2E': 'N',
2340
+ '\u01F8': 'N',
2341
+ '\u0143': 'N',
2342
+ '\u00D1': 'N',
2343
+ '\u1E44': 'N',
2344
+ '\u0147': 'N',
2345
+ '\u1E46': 'N',
2346
+ '\u0145': 'N',
2347
+ '\u1E4A': 'N',
2348
+ '\u1E48': 'N',
2349
+ '\u0220': 'N',
2350
+ '\u019D': 'N',
2351
+ '\uA790': 'N',
2352
+ '\uA7A4': 'N',
2353
+ '\u01CA': 'NJ',
2354
+ '\u01CB': 'Nj',
2355
+ '\u24C4': 'O',
2356
+ '\uFF2F': 'O',
2357
+ '\u00D2': 'O',
2358
+ '\u00D3': 'O',
2359
+ '\u00D4': 'O',
2360
+ '\u1ED2': 'O',
2361
+ '\u1ED0': 'O',
2362
+ '\u1ED6': 'O',
2363
+ '\u1ED4': 'O',
2364
+ '\u00D5': 'O',
2365
+ '\u1E4C': 'O',
2366
+ '\u022C': 'O',
2367
+ '\u1E4E': 'O',
2368
+ '\u014C': 'O',
2369
+ '\u1E50': 'O',
2370
+ '\u1E52': 'O',
2371
+ '\u014E': 'O',
2372
+ '\u022E': 'O',
2373
+ '\u0230': 'O',
2374
+ '\u00D6': 'O',
2375
+ '\u022A': 'O',
2376
+ '\u1ECE': 'O',
2377
+ '\u0150': 'O',
2378
+ '\u01D1': 'O',
2379
+ '\u020C': 'O',
2380
+ '\u020E': 'O',
2381
+ '\u01A0': 'O',
2382
+ '\u1EDC': 'O',
2383
+ '\u1EDA': 'O',
2384
+ '\u1EE0': 'O',
2385
+ '\u1EDE': 'O',
2386
+ '\u1EE2': 'O',
2387
+ '\u1ECC': 'O',
2388
+ '\u1ED8': 'O',
2389
+ '\u01EA': 'O',
2390
+ '\u01EC': 'O',
2391
+ '\u00D8': 'O',
2392
+ '\u01FE': 'O',
2393
+ '\u0186': 'O',
2394
+ '\u019F': 'O',
2395
+ '\uA74A': 'O',
2396
+ '\uA74C': 'O',
2397
+ '\u01A2': 'OI',
2398
+ '\uA74E': 'OO',
2399
+ '\u0222': 'OU',
2400
+ '\u24C5': 'P',
2401
+ '\uFF30': 'P',
2402
+ '\u1E54': 'P',
2403
+ '\u1E56': 'P',
2404
+ '\u01A4': 'P',
2405
+ '\u2C63': 'P',
2406
+ '\uA750': 'P',
2407
+ '\uA752': 'P',
2408
+ '\uA754': 'P',
2409
+ '\u24C6': 'Q',
2410
+ '\uFF31': 'Q',
2411
+ '\uA756': 'Q',
2412
+ '\uA758': 'Q',
2413
+ '\u024A': 'Q',
2414
+ '\u24C7': 'R',
2415
+ '\uFF32': 'R',
2416
+ '\u0154': 'R',
2417
+ '\u1E58': 'R',
2418
+ '\u0158': 'R',
2419
+ '\u0210': 'R',
2420
+ '\u0212': 'R',
2421
+ '\u1E5A': 'R',
2422
+ '\u1E5C': 'R',
2423
+ '\u0156': 'R',
2424
+ '\u1E5E': 'R',
2425
+ '\u024C': 'R',
2426
+ '\u2C64': 'R',
2427
+ '\uA75A': 'R',
2428
+ '\uA7A6': 'R',
2429
+ '\uA782': 'R',
2430
+ '\u24C8': 'S',
2431
+ '\uFF33': 'S',
2432
+ '\u1E9E': 'S',
2433
+ '\u015A': 'S',
2434
+ '\u1E64': 'S',
2435
+ '\u015C': 'S',
2436
+ '\u1E60': 'S',
2437
+ '\u0160': 'S',
2438
+ '\u1E66': 'S',
2439
+ '\u1E62': 'S',
2440
+ '\u1E68': 'S',
2441
+ '\u0218': 'S',
2442
+ '\u015E': 'S',
2443
+ '\u2C7E': 'S',
2444
+ '\uA7A8': 'S',
2445
+ '\uA784': 'S',
2446
+ '\u24C9': 'T',
2447
+ '\uFF34': 'T',
2448
+ '\u1E6A': 'T',
2449
+ '\u0164': 'T',
2450
+ '\u1E6C': 'T',
2451
+ '\u021A': 'T',
2452
+ '\u0162': 'T',
2453
+ '\u1E70': 'T',
2454
+ '\u1E6E': 'T',
2455
+ '\u0166': 'T',
2456
+ '\u01AC': 'T',
2457
+ '\u01AE': 'T',
2458
+ '\u023E': 'T',
2459
+ '\uA786': 'T',
2460
+ '\uA728': 'TZ',
2461
+ '\u24CA': 'U',
2462
+ '\uFF35': 'U',
2463
+ '\u00D9': 'U',
2464
+ '\u00DA': 'U',
2465
+ '\u00DB': 'U',
2466
+ '\u0168': 'U',
2467
+ '\u1E78': 'U',
2468
+ '\u016A': 'U',
2469
+ '\u1E7A': 'U',
2470
+ '\u016C': 'U',
2471
+ '\u00DC': 'U',
2472
+ '\u01DB': 'U',
2473
+ '\u01D7': 'U',
2474
+ '\u01D5': 'U',
2475
+ '\u01D9': 'U',
2476
+ '\u1EE6': 'U',
2477
+ '\u016E': 'U',
2478
+ '\u0170': 'U',
2479
+ '\u01D3': 'U',
2480
+ '\u0214': 'U',
2481
+ '\u0216': 'U',
2482
+ '\u01AF': 'U',
2483
+ '\u1EEA': 'U',
2484
+ '\u1EE8': 'U',
2485
+ '\u1EEE': 'U',
2486
+ '\u1EEC': 'U',
2487
+ '\u1EF0': 'U',
2488
+ '\u1EE4': 'U',
2489
+ '\u1E72': 'U',
2490
+ '\u0172': 'U',
2491
+ '\u1E76': 'U',
2492
+ '\u1E74': 'U',
2493
+ '\u0244': 'U',
2494
+ '\u24CB': 'V',
2495
+ '\uFF36': 'V',
2496
+ '\u1E7C': 'V',
2497
+ '\u1E7E': 'V',
2498
+ '\u01B2': 'V',
2499
+ '\uA75E': 'V',
2500
+ '\u0245': 'V',
2501
+ '\uA760': 'VY',
2502
+ '\u24CC': 'W',
2503
+ '\uFF37': 'W',
2504
+ '\u1E80': 'W',
2505
+ '\u1E82': 'W',
2506
+ '\u0174': 'W',
2507
+ '\u1E86': 'W',
2508
+ '\u1E84': 'W',
2509
+ '\u1E88': 'W',
2510
+ '\u2C72': 'W',
2511
+ '\u24CD': 'X',
2512
+ '\uFF38': 'X',
2513
+ '\u1E8A': 'X',
2514
+ '\u1E8C': 'X',
2515
+ '\u24CE': 'Y',
2516
+ '\uFF39': 'Y',
2517
+ '\u1EF2': 'Y',
2518
+ '\u00DD': 'Y',
2519
+ '\u0176': 'Y',
2520
+ '\u1EF8': 'Y',
2521
+ '\u0232': 'Y',
2522
+ '\u1E8E': 'Y',
2523
+ '\u0178': 'Y',
2524
+ '\u1EF6': 'Y',
2525
+ '\u1EF4': 'Y',
2526
+ '\u01B3': 'Y',
2527
+ '\u024E': 'Y',
2528
+ '\u1EFE': 'Y',
2529
+ '\u24CF': 'Z',
2530
+ '\uFF3A': 'Z',
2531
+ '\u0179': 'Z',
2532
+ '\u1E90': 'Z',
2533
+ '\u017B': 'Z',
2534
+ '\u017D': 'Z',
2535
+ '\u1E92': 'Z',
2536
+ '\u1E94': 'Z',
2537
+ '\u01B5': 'Z',
2538
+ '\u0224': 'Z',
2539
+ '\u2C7F': 'Z',
2540
+ '\u2C6B': 'Z',
2541
+ '\uA762': 'Z',
2542
+ '\u24D0': 'a',
2543
+ '\uFF41': 'a',
2544
+ '\u1E9A': 'a',
2545
+ '\u00E0': 'a',
2546
+ '\u00E1': 'a',
2547
+ '\u00E2': 'a',
2548
+ '\u1EA7': 'a',
2549
+ '\u1EA5': 'a',
2550
+ '\u1EAB': 'a',
2551
+ '\u1EA9': 'a',
2552
+ '\u00E3': 'a',
2553
+ '\u0101': 'a',
2554
+ '\u0103': 'a',
2555
+ '\u1EB1': 'a',
2556
+ '\u1EAF': 'a',
2557
+ '\u1EB5': 'a',
2558
+ '\u1EB3': 'a',
2559
+ '\u0227': 'a',
2560
+ '\u01E1': 'a',
2561
+ '\u00E4': 'a',
2562
+ '\u01DF': 'a',
2563
+ '\u1EA3': 'a',
2564
+ '\u00E5': 'a',
2565
+ '\u01FB': 'a',
2566
+ '\u01CE': 'a',
2567
+ '\u0201': 'a',
2568
+ '\u0203': 'a',
2569
+ '\u1EA1': 'a',
2570
+ '\u1EAD': 'a',
2571
+ '\u1EB7': 'a',
2572
+ '\u1E01': 'a',
2573
+ '\u0105': 'a',
2574
+ '\u2C65': 'a',
2575
+ '\u0250': 'a',
2576
+ '\uA733': 'aa',
2577
+ '\u00E6': 'ae',
2578
+ '\u01FD': 'ae',
2579
+ '\u01E3': 'ae',
2580
+ '\uA735': 'ao',
2581
+ '\uA737': 'au',
2582
+ '\uA739': 'av',
2583
+ '\uA73B': 'av',
2584
+ '\uA73D': 'ay',
2585
+ '\u24D1': 'b',
2586
+ '\uFF42': 'b',
2587
+ '\u1E03': 'b',
2588
+ '\u1E05': 'b',
2589
+ '\u1E07': 'b',
2590
+ '\u0180': 'b',
2591
+ '\u0183': 'b',
2592
+ '\u0253': 'b',
2593
+ '\u24D2': 'c',
2594
+ '\uFF43': 'c',
2595
+ '\u0107': 'c',
2596
+ '\u0109': 'c',
2597
+ '\u010B': 'c',
2598
+ '\u010D': 'c',
2599
+ '\u00E7': 'c',
2600
+ '\u1E09': 'c',
2601
+ '\u0188': 'c',
2602
+ '\u023C': 'c',
2603
+ '\uA73F': 'c',
2604
+ '\u2184': 'c',
2605
+ '\u24D3': 'd',
2606
+ '\uFF44': 'd',
2607
+ '\u1E0B': 'd',
2608
+ '\u010F': 'd',
2609
+ '\u1E0D': 'd',
2610
+ '\u1E11': 'd',
2611
+ '\u1E13': 'd',
2612
+ '\u1E0F': 'd',
2613
+ '\u0111': 'd',
2614
+ '\u018C': 'd',
2615
+ '\u0256': 'd',
2616
+ '\u0257': 'd',
2617
+ '\uA77A': 'd',
2618
+ '\u01F3': 'dz',
2619
+ '\u01C6': 'dz',
2620
+ '\u24D4': 'e',
2621
+ '\uFF45': 'e',
2622
+ '\u00E8': 'e',
2623
+ '\u00E9': 'e',
2624
+ '\u00EA': 'e',
2625
+ '\u1EC1': 'e',
2626
+ '\u1EBF': 'e',
2627
+ '\u1EC5': 'e',
2628
+ '\u1EC3': 'e',
2629
+ '\u1EBD': 'e',
2630
+ '\u0113': 'e',
2631
+ '\u1E15': 'e',
2632
+ '\u1E17': 'e',
2633
+ '\u0115': 'e',
2634
+ '\u0117': 'e',
2635
+ '\u00EB': 'e',
2636
+ '\u1EBB': 'e',
2637
+ '\u011B': 'e',
2638
+ '\u0205': 'e',
2639
+ '\u0207': 'e',
2640
+ '\u1EB9': 'e',
2641
+ '\u1EC7': 'e',
2642
+ '\u0229': 'e',
2643
+ '\u1E1D': 'e',
2644
+ '\u0119': 'e',
2645
+ '\u1E19': 'e',
2646
+ '\u1E1B': 'e',
2647
+ '\u0247': 'e',
2648
+ '\u025B': 'e',
2649
+ '\u01DD': 'e',
2650
+ '\u24D5': 'f',
2651
+ '\uFF46': 'f',
2652
+ '\u1E1F': 'f',
2653
+ '\u0192': 'f',
2654
+ '\uA77C': 'f',
2655
+ '\u24D6': 'g',
2656
+ '\uFF47': 'g',
2657
+ '\u01F5': 'g',
2658
+ '\u011D': 'g',
2659
+ '\u1E21': 'g',
2660
+ '\u011F': 'g',
2661
+ '\u0121': 'g',
2662
+ '\u01E7': 'g',
2663
+ '\u0123': 'g',
2664
+ '\u01E5': 'g',
2665
+ '\u0260': 'g',
2666
+ '\uA7A1': 'g',
2667
+ '\u1D79': 'g',
2668
+ '\uA77F': 'g',
2669
+ '\u24D7': 'h',
2670
+ '\uFF48': 'h',
2671
+ '\u0125': 'h',
2672
+ '\u1E23': 'h',
2673
+ '\u1E27': 'h',
2674
+ '\u021F': 'h',
2675
+ '\u1E25': 'h',
2676
+ '\u1E29': 'h',
2677
+ '\u1E2B': 'h',
2678
+ '\u1E96': 'h',
2679
+ '\u0127': 'h',
2680
+ '\u2C68': 'h',
2681
+ '\u2C76': 'h',
2682
+ '\u0265': 'h',
2683
+ '\u0195': 'hv',
2684
+ '\u24D8': 'i',
2685
+ '\uFF49': 'i',
2686
+ '\u00EC': 'i',
2687
+ '\u00ED': 'i',
2688
+ '\u00EE': 'i',
2689
+ '\u0129': 'i',
2690
+ '\u012B': 'i',
2691
+ '\u012D': 'i',
2692
+ '\u00EF': 'i',
2693
+ '\u1E2F': 'i',
2694
+ '\u1EC9': 'i',
2695
+ '\u01D0': 'i',
2696
+ '\u0209': 'i',
2697
+ '\u020B': 'i',
2698
+ '\u1ECB': 'i',
2699
+ '\u012F': 'i',
2700
+ '\u1E2D': 'i',
2701
+ '\u0268': 'i',
2702
+ '\u0131': 'i',
2703
+ '\u24D9': 'j',
2704
+ '\uFF4A': 'j',
2705
+ '\u0135': 'j',
2706
+ '\u01F0': 'j',
2707
+ '\u0249': 'j',
2708
+ '\u24DA': 'k',
2709
+ '\uFF4B': 'k',
2710
+ '\u1E31': 'k',
2711
+ '\u01E9': 'k',
2712
+ '\u1E33': 'k',
2713
+ '\u0137': 'k',
2714
+ '\u1E35': 'k',
2715
+ '\u0199': 'k',
2716
+ '\u2C6A': 'k',
2717
+ '\uA741': 'k',
2718
+ '\uA743': 'k',
2719
+ '\uA745': 'k',
2720
+ '\uA7A3': 'k',
2721
+ '\u24DB': 'l',
2722
+ '\uFF4C': 'l',
2723
+ '\u0140': 'l',
2724
+ '\u013A': 'l',
2725
+ '\u013E': 'l',
2726
+ '\u1E37': 'l',
2727
+ '\u1E39': 'l',
2728
+ '\u013C': 'l',
2729
+ '\u1E3D': 'l',
2730
+ '\u1E3B': 'l',
2731
+ '\u017F': 'l',
2732
+ '\u0142': 'l',
2733
+ '\u019A': 'l',
2734
+ '\u026B': 'l',
2735
+ '\u2C61': 'l',
2736
+ '\uA749': 'l',
2737
+ '\uA781': 'l',
2738
+ '\uA747': 'l',
2739
+ '\u01C9': 'lj',
2740
+ '\u24DC': 'm',
2741
+ '\uFF4D': 'm',
2742
+ '\u1E3F': 'm',
2743
+ '\u1E41': 'm',
2744
+ '\u1E43': 'm',
2745
+ '\u0271': 'm',
2746
+ '\u026F': 'm',
2747
+ '\u24DD': 'n',
2748
+ '\uFF4E': 'n',
2749
+ '\u01F9': 'n',
2750
+ '\u0144': 'n',
2751
+ '\u00F1': 'n',
2752
+ '\u1E45': 'n',
2753
+ '\u0148': 'n',
2754
+ '\u1E47': 'n',
2755
+ '\u0146': 'n',
2756
+ '\u1E4B': 'n',
2757
+ '\u1E49': 'n',
2758
+ '\u019E': 'n',
2759
+ '\u0272': 'n',
2760
+ '\u0149': 'n',
2761
+ '\uA791': 'n',
2762
+ '\uA7A5': 'n',
2763
+ '\u01CC': 'nj',
2764
+ '\u24DE': 'o',
2765
+ '\uFF4F': 'o',
2766
+ '\u00F2': 'o',
2767
+ '\u00F3': 'o',
2768
+ '\u00F4': 'o',
2769
+ '\u1ED3': 'o',
2770
+ '\u1ED1': 'o',
2771
+ '\u1ED7': 'o',
2772
+ '\u1ED5': 'o',
2773
+ '\u00F5': 'o',
2774
+ '\u1E4D': 'o',
2775
+ '\u022D': 'o',
2776
+ '\u1E4F': 'o',
2777
+ '\u014D': 'o',
2778
+ '\u1E51': 'o',
2779
+ '\u1E53': 'o',
2780
+ '\u014F': 'o',
2781
+ '\u022F': 'o',
2782
+ '\u0231': 'o',
2783
+ '\u00F6': 'o',
2784
+ '\u022B': 'o',
2785
+ '\u1ECF': 'o',
2786
+ '\u0151': 'o',
2787
+ '\u01D2': 'o',
2788
+ '\u020D': 'o',
2789
+ '\u020F': 'o',
2790
+ '\u01A1': 'o',
2791
+ '\u1EDD': 'o',
2792
+ '\u1EDB': 'o',
2793
+ '\u1EE1': 'o',
2794
+ '\u1EDF': 'o',
2795
+ '\u1EE3': 'o',
2796
+ '\u1ECD': 'o',
2797
+ '\u1ED9': 'o',
2798
+ '\u01EB': 'o',
2799
+ '\u01ED': 'o',
2800
+ '\u00F8': 'o',
2801
+ '\u01FF': 'o',
2802
+ '\u0254': 'o',
2803
+ '\uA74B': 'o',
2804
+ '\uA74D': 'o',
2805
+ '\u0275': 'o',
2806
+ '\u01A3': 'oi',
2807
+ '\u0223': 'ou',
2808
+ '\uA74F': 'oo',
2809
+ '\u24DF': 'p',
2810
+ '\uFF50': 'p',
2811
+ '\u1E55': 'p',
2812
+ '\u1E57': 'p',
2813
+ '\u01A5': 'p',
2814
+ '\u1D7D': 'p',
2815
+ '\uA751': 'p',
2816
+ '\uA753': 'p',
2817
+ '\uA755': 'p',
2818
+ '\u24E0': 'q',
2819
+ '\uFF51': 'q',
2820
+ '\u024B': 'q',
2821
+ '\uA757': 'q',
2822
+ '\uA759': 'q',
2823
+ '\u24E1': 'r',
2824
+ '\uFF52': 'r',
2825
+ '\u0155': 'r',
2826
+ '\u1E59': 'r',
2827
+ '\u0159': 'r',
2828
+ '\u0211': 'r',
2829
+ '\u0213': 'r',
2830
+ '\u1E5B': 'r',
2831
+ '\u1E5D': 'r',
2832
+ '\u0157': 'r',
2833
+ '\u1E5F': 'r',
2834
+ '\u024D': 'r',
2835
+ '\u027D': 'r',
2836
+ '\uA75B': 'r',
2837
+ '\uA7A7': 'r',
2838
+ '\uA783': 'r',
2839
+ '\u24E2': 's',
2840
+ '\uFF53': 's',
2841
+ '\u00DF': 's',
2842
+ '\u015B': 's',
2843
+ '\u1E65': 's',
2844
+ '\u015D': 's',
2845
+ '\u1E61': 's',
2846
+ '\u0161': 's',
2847
+ '\u1E67': 's',
2848
+ '\u1E63': 's',
2849
+ '\u1E69': 's',
2850
+ '\u0219': 's',
2851
+ '\u015F': 's',
2852
+ '\u023F': 's',
2853
+ '\uA7A9': 's',
2854
+ '\uA785': 's',
2855
+ '\u1E9B': 's',
2856
+ '\u24E3': 't',
2857
+ '\uFF54': 't',
2858
+ '\u1E6B': 't',
2859
+ '\u1E97': 't',
2860
+ '\u0165': 't',
2861
+ '\u1E6D': 't',
2862
+ '\u021B': 't',
2863
+ '\u0163': 't',
2864
+ '\u1E71': 't',
2865
+ '\u1E6F': 't',
2866
+ '\u0167': 't',
2867
+ '\u01AD': 't',
2868
+ '\u0288': 't',
2869
+ '\u2C66': 't',
2870
+ '\uA787': 't',
2871
+ '\uA729': 'tz',
2872
+ '\u24E4': 'u',
2873
+ '\uFF55': 'u',
2874
+ '\u00F9': 'u',
2875
+ '\u00FA': 'u',
2876
+ '\u00FB': 'u',
2877
+ '\u0169': 'u',
2878
+ '\u1E79': 'u',
2879
+ '\u016B': 'u',
2880
+ '\u1E7B': 'u',
2881
+ '\u016D': 'u',
2882
+ '\u00FC': 'u',
2883
+ '\u01DC': 'u',
2884
+ '\u01D8': 'u',
2885
+ '\u01D6': 'u',
2886
+ '\u01DA': 'u',
2887
+ '\u1EE7': 'u',
2888
+ '\u016F': 'u',
2889
+ '\u0171': 'u',
2890
+ '\u01D4': 'u',
2891
+ '\u0215': 'u',
2892
+ '\u0217': 'u',
2893
+ '\u01B0': 'u',
2894
+ '\u1EEB': 'u',
2895
+ '\u1EE9': 'u',
2896
+ '\u1EEF': 'u',
2897
+ '\u1EED': 'u',
2898
+ '\u1EF1': 'u',
2899
+ '\u1EE5': 'u',
2900
+ '\u1E73': 'u',
2901
+ '\u0173': 'u',
2902
+ '\u1E77': 'u',
2903
+ '\u1E75': 'u',
2904
+ '\u0289': 'u',
2905
+ '\u24E5': 'v',
2906
+ '\uFF56': 'v',
2907
+ '\u1E7D': 'v',
2908
+ '\u1E7F': 'v',
2909
+ '\u028B': 'v',
2910
+ '\uA75F': 'v',
2911
+ '\u028C': 'v',
2912
+ '\uA761': 'vy',
2913
+ '\u24E6': 'w',
2914
+ '\uFF57': 'w',
2915
+ '\u1E81': 'w',
2916
+ '\u1E83': 'w',
2917
+ '\u0175': 'w',
2918
+ '\u1E87': 'w',
2919
+ '\u1E85': 'w',
2920
+ '\u1E98': 'w',
2921
+ '\u1E89': 'w',
2922
+ '\u2C73': 'w',
2923
+ '\u24E7': 'x',
2924
+ '\uFF58': 'x',
2925
+ '\u1E8B': 'x',
2926
+ '\u1E8D': 'x',
2927
+ '\u24E8': 'y',
2928
+ '\uFF59': 'y',
2929
+ '\u1EF3': 'y',
2930
+ '\u00FD': 'y',
2931
+ '\u0177': 'y',
2932
+ '\u1EF9': 'y',
2933
+ '\u0233': 'y',
2934
+ '\u1E8F': 'y',
2935
+ '\u00FF': 'y',
2936
+ '\u1EF7': 'y',
2937
+ '\u1E99': 'y',
2938
+ '\u1EF5': 'y',
2939
+ '\u01B4': 'y',
2940
+ '\u024F': 'y',
2941
+ '\u1EFF': 'y',
2942
+ '\u24E9': 'z',
2943
+ '\uFF5A': 'z',
2944
+ '\u017A': 'z',
2945
+ '\u1E91': 'z',
2946
+ '\u017C': 'z',
2947
+ '\u017E': 'z',
2948
+ '\u1E93': 'z',
2949
+ '\u1E95': 'z',
2950
+ '\u01B6': 'z',
2951
+ '\u0225': 'z',
2952
+ '\u0240': 'z',
2953
+ '\u2C6C': 'z',
2954
+ '\uA763': 'z',
2955
+ '\u0386': '\u0391',
2956
+ '\u0388': '\u0395',
2957
+ '\u0389': '\u0397',
2958
+ '\u038A': '\u0399',
2959
+ '\u03AA': '\u0399',
2960
+ '\u038C': '\u039F',
2961
+ '\u038E': '\u03A5',
2962
+ '\u03AB': '\u03A5',
2963
+ '\u038F': '\u03A9',
2964
+ '\u03AC': '\u03B1',
2965
+ '\u03AD': '\u03B5',
2966
+ '\u03AE': '\u03B7',
2967
+ '\u03AF': '\u03B9',
2968
+ '\u03CA': '\u03B9',
2969
+ '\u0390': '\u03B9',
2970
+ '\u03CC': '\u03BF',
2971
+ '\u03CD': '\u03C5',
2972
+ '\u03CB': '\u03C5',
2973
+ '\u03B0': '\u03C5',
2974
+ '\u03C9': '\u03C9',
2975
+ '\u03C2': '\u03C3'
2976
+ };
2977
+
2978
+ return diacritics;
2979
+ });
2980
+
2981
+ S2.define('select2/data/base',[
2982
+ '../utils'
2983
+ ], function (Utils) {
2984
+ function BaseAdapter ($element, options) {
2985
+ BaseAdapter.__super__.constructor.call(this);
2986
+ }
2987
+
2988
+ Utils.Extend(BaseAdapter, Utils.Observable);
2989
+
2990
+ BaseAdapter.prototype.current = function (callback) {
2991
+ throw new Error('The `current` method must be defined in child classes.');
2992
+ };
2993
+
2994
+ BaseAdapter.prototype.query = function (params, callback) {
2995
+ throw new Error('The `query` method must be defined in child classes.');
2996
+ };
2997
+
2998
+ BaseAdapter.prototype.bind = function (container, $container) {
2999
+ // Can be implemented in subclasses
3000
+ };
3001
+
3002
+ BaseAdapter.prototype.destroy = function () {
3003
+ // Can be implemented in subclasses
3004
+ };
3005
+
3006
+ BaseAdapter.prototype.generateResultId = function (container, data) {
3007
+ var id = container.id + '-result-';
3008
+
3009
+ id += Utils.generateChars(4);
3010
+
3011
+ if (data.id != null) {
3012
+ id += '-' + data.id.toString();
3013
+ } else {
3014
+ id += '-' + Utils.generateChars(4);
3015
+ }
3016
+ return id;
3017
+ };
3018
+
3019
+ return BaseAdapter;
3020
+ });
3021
+
3022
+ S2.define('select2/data/select',[
3023
+ './base',
3024
+ '../utils',
3025
+ 'jquery'
3026
+ ], function (BaseAdapter, Utils, $) {
3027
+ function SelectAdapter ($element, options) {
3028
+ this.$element = $element;
3029
+ this.options = options;
3030
+
3031
+ SelectAdapter.__super__.constructor.call(this);
3032
+ }
3033
+
3034
+ Utils.Extend(SelectAdapter, BaseAdapter);
3035
+
3036
+ SelectAdapter.prototype.current = function (callback) {
3037
+ var data = [];
3038
+ var self = this;
3039
+
3040
+ this.$element.find(':selected').each(function () {
3041
+ var $option = $(this);
3042
+
3043
+ var option = self.item($option);
3044
+
3045
+ data.push(option);
3046
+ });
3047
+
3048
+ callback(data);
3049
+ };
3050
+
3051
+ SelectAdapter.prototype.select = function (data) {
3052
+ var self = this;
3053
+
3054
+ data.selected = true;
3055
+
3056
+ // If data.element is a DOM node, use it instead
3057
+ if ($(data.element).is('option')) {
3058
+ data.element.selected = true;
3059
+
3060
+ this.$element.trigger('change');
3061
+
3062
+ return;
3063
+ }
3064
+
3065
+ if (this.$element.prop('multiple')) {
3066
+ this.current(function (currentData) {
3067
+ var val = [];
3068
+
3069
+ data = [data];
3070
+ data.push.apply(data, currentData);
3071
+
3072
+ for (var d = 0; d < data.length; d++) {
3073
+ var id = data[d].id;
3074
+
3075
+ if ($.inArray(id, val) === -1) {
3076
+ val.push(id);
3077
+ }
3078
+ }
3079
+
3080
+ self.$element.val(val);
3081
+ self.$element.trigger('change');
3082
+ });
3083
+ } else {
3084
+ var val = data.id;
3085
+
3086
+ this.$element.val(val);
3087
+ this.$element.trigger('change');
3088
+ }
3089
+ };
3090
+
3091
+ SelectAdapter.prototype.unselect = function (data) {
3092
+ var self = this;
3093
+
3094
+ if (!this.$element.prop('multiple')) {
3095
+ return;
3096
+ }
3097
+
3098
+ data.selected = false;
3099
+
3100
+ if ($(data.element).is('option')) {
3101
+ data.element.selected = false;
3102
+
3103
+ this.$element.trigger('change');
3104
+
3105
+ return;
3106
+ }
3107
+
3108
+ this.current(function (currentData) {
3109
+ var val = [];
3110
+
3111
+ for (var d = 0; d < currentData.length; d++) {
3112
+ var id = currentData[d].id;
3113
+
3114
+ if (id !== data.id && $.inArray(id, val) === -1) {
3115
+ val.push(id);
3116
+ }
3117
+ }
3118
+
3119
+ self.$element.val(val);
3120
+
3121
+ self.$element.trigger('change');
3122
+ });
3123
+ };
3124
+
3125
+ SelectAdapter.prototype.bind = function (container, $container) {
3126
+ var self = this;
3127
+
3128
+ this.container = container;
3129
+
3130
+ container.on('select', function (params) {
3131
+ self.select(params.data);
3132
+ });
3133
+
3134
+ container.on('unselect', function (params) {
3135
+ self.unselect(params.data);
3136
+ });
3137
+ };
3138
+
3139
+ SelectAdapter.prototype.destroy = function () {
3140
+ // Remove anything added to child elements
3141
+ this.$element.find('*').each(function () {
3142
+ // Remove any custom data set by Select2
3143
+ $.removeData(this, 'data');
3144
+ });
3145
+ };
3146
+
3147
+ SelectAdapter.prototype.query = function (params, callback) {
3148
+ var data = [];
3149
+ var self = this;
3150
+
3151
+ var $options = this.$element.children();
3152
+
3153
+ $options.each(function () {
3154
+ var $option = $(this);
3155
+
3156
+ if (!$option.is('option') && !$option.is('optgroup')) {
3157
+ return;
3158
+ }
3159
+
3160
+ var option = self.item($option);
3161
+
3162
+ var matches = self.matches(params, option);
3163
+
3164
+ if (matches !== null) {
3165
+ data.push(matches);
3166
+ }
3167
+ });
3168
+
3169
+ callback({
3170
+ results: data
3171
+ });
3172
+ };
3173
+
3174
+ SelectAdapter.prototype.addOptions = function ($options) {
3175
+ Utils.appendMany(this.$element, $options);
3176
+ };
3177
+
3178
+ SelectAdapter.prototype.option = function (data) {
3179
+ var option;
3180
+
3181
+ if (data.children) {
3182
+ option = document.createElement('optgroup');
3183
+ option.label = data.text;
3184
+ } else {
3185
+ option = document.createElement('option');
3186
+
3187
+ if (option.textContent !== undefined) {
3188
+ option.textContent = data.text;
3189
+ } else {
3190
+ option.innerText = data.text;
3191
+ }
3192
+ }
3193
+
3194
+ if (data.id) {
3195
+ option.value = data.id;
3196
+ }
3197
+
3198
+ if (data.disabled) {
3199
+ option.disabled = true;
3200
+ }
3201
+
3202
+ if (data.selected) {
3203
+ option.selected = true;
3204
+ }
3205
+
3206
+ if (data.title) {
3207
+ option.title = data.title;
3208
+ }
3209
+
3210
+ var $option = $(option);
3211
+
3212
+ var normalizedData = this._normalizeItem(data);
3213
+ normalizedData.element = option;
3214
+
3215
+ // Override the option's data with the combined data
3216
+ $.data(option, 'data', normalizedData);
3217
+
3218
+ return $option;
3219
+ };
3220
+
3221
+ SelectAdapter.prototype.item = function ($option) {
3222
+ var data = {};
3223
+
3224
+ data = $.data($option[0], 'data');
3225
+
3226
+ if (data != null) {
3227
+ return data;
3228
+ }
3229
+
3230
+ if ($option.is('option')) {
3231
+ data = {
3232
+ id: $option.val(),
3233
+ text: $option.text(),
3234
+ disabled: $option.prop('disabled'),
3235
+ selected: $option.prop('selected'),
3236
+ title: $option.prop('title')
3237
+ };
3238
+ } else if ($option.is('optgroup')) {
3239
+ data = {
3240
+ text: $option.prop('label'),
3241
+ children: [],
3242
+ title: $option.prop('title')
3243
+ };
3244
+
3245
+ var $children = $option.children('option');
3246
+ var children = [];
3247
+
3248
+ for (var c = 0; c < $children.length; c++) {
3249
+ var $child = $($children[c]);
3250
+
3251
+ var child = this.item($child);
3252
+
3253
+ children.push(child);
3254
+ }
3255
+
3256
+ data.children = children;
3257
+ }
3258
+
3259
+ data = this._normalizeItem(data);
3260
+ data.element = $option[0];
3261
+
3262
+ $.data($option[0], 'data', data);
3263
+
3264
+ return data;
3265
+ };
3266
+
3267
+ SelectAdapter.prototype._normalizeItem = function (item) {
3268
+ if (!$.isPlainObject(item)) {
3269
+ item = {
3270
+ id: item,
3271
+ text: item
3272
+ };
3273
+ }
3274
+
3275
+ item = $.extend({}, {
3276
+ text: ''
3277
+ }, item);
3278
+
3279
+ var defaults = {
3280
+ selected: false,
3281
+ disabled: false
3282
+ };
3283
+
3284
+ if (item.id != null) {
3285
+ item.id = item.id.toString();
3286
+ }
3287
+
3288
+ if (item.text != null) {
3289
+ item.text = item.text.toString();
3290
+ }
3291
+
3292
+ if (item._resultId == null && item.id && this.container != null) {
3293
+ item._resultId = this.generateResultId(this.container, item);
3294
+ }
3295
+
3296
+ return $.extend({}, defaults, item);
3297
+ };
3298
+
3299
+ SelectAdapter.prototype.matches = function (params, data) {
3300
+ var matcher = this.options.get('matcher');
3301
+
3302
+ return matcher(params, data);
3303
+ };
3304
+
3305
+ return SelectAdapter;
3306
+ });
3307
+
3308
+ S2.define('select2/data/array',[
3309
+ './select',
3310
+ '../utils',
3311
+ 'jquery'
3312
+ ], function (SelectAdapter, Utils, $) {
3313
+ function ArrayAdapter ($element, options) {
3314
+ var data = options.get('data') || [];
3315
+
3316
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
3317
+
3318
+ this.addOptions(this.convertToOptions(data));
3319
+ }
3320
+
3321
+ Utils.Extend(ArrayAdapter, SelectAdapter);
3322
+
3323
+ ArrayAdapter.prototype.select = function (data) {
3324
+ var $option = this.$element.find('option').filter(function (i, elm) {
3325
+ return elm.value == data.id.toString();
3326
+ });
3327
+
3328
+ if ($option.length === 0) {
3329
+ $option = this.option(data);
3330
+
3331
+ this.addOptions($option);
3332
+ }
3333
+
3334
+ ArrayAdapter.__super__.select.call(this, data);
3335
+ };
3336
+
3337
+ ArrayAdapter.prototype.convertToOptions = function (data) {
3338
+ var self = this;
3339
+
3340
+ var $existing = this.$element.find('option');
3341
+ var existingIds = $existing.map(function () {
3342
+ return self.item($(this)).id;
3343
+ }).get();
3344
+
3345
+ var $options = [];
3346
+
3347
+ // Filter out all items except for the one passed in the argument
3348
+ function onlyItem (item) {
3349
+ return function () {
3350
+ return $(this).val() == item.id;
3351
+ };
3352
+ }
3353
+
3354
+ for (var d = 0; d < data.length; d++) {
3355
+ var item = this._normalizeItem(data[d]);
3356
+
3357
+ // Skip items which were pre-loaded, only merge the data
3358
+ if ($.inArray(item.id, existingIds) >= 0) {
3359
+ var $existingOption = $existing.filter(onlyItem(item));
3360
+
3361
+ var existingData = this.item($existingOption);
3362
+ var newData = $.extend(true, {}, item, existingData);
3363
+
3364
+ var $newOption = this.option(newData);
3365
+
3366
+ $existingOption.replaceWith($newOption);
3367
+
3368
+ continue;
3369
+ }
3370
+
3371
+ var $option = this.option(item);
3372
+
3373
+ if (item.children) {
3374
+ var $children = this.convertToOptions(item.children);
3375
+
3376
+ Utils.appendMany($option, $children);
3377
+ }
3378
+
3379
+ $options.push($option);
3380
+ }
3381
+
3382
+ return $options;
3383
+ };
3384
+
3385
+ return ArrayAdapter;
3386
+ });
3387
+
3388
+ S2.define('select2/data/ajax',[
3389
+ './array',
3390
+ '../utils',
3391
+ 'jquery'
3392
+ ], function (ArrayAdapter, Utils, $) {
3393
+ function AjaxAdapter ($element, options) {
3394
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
3395
+
3396
+ if (this.ajaxOptions.processResults != null) {
3397
+ this.processResults = this.ajaxOptions.processResults;
3398
+ }
3399
+
3400
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
3401
+ }
3402
+
3403
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
3404
+
3405
+ AjaxAdapter.prototype._applyDefaults = function (options) {
3406
+ var defaults = {
3407
+ data: function (params) {
3408
+ return $.extend({}, params, {
3409
+ q: params.term
3410
+ });
3411
+ },
3412
+ transport: function (params, success, failure) {
3413
+ var $request = $.ajax(params);
3414
+
3415
+ $request.then(success);
3416
+ $request.fail(failure);
3417
+
3418
+ return $request;
3419
+ }
3420
+ };
3421
+
3422
+ return $.extend({}, defaults, options, true);
3423
+ };
3424
+
3425
+ AjaxAdapter.prototype.processResults = function (results) {
3426
+ return results;
3427
+ };
3428
+
3429
+ AjaxAdapter.prototype.query = function (params, callback) {
3430
+ var matches = [];
3431
+ var self = this;
3432
+
3433
+ if (this._request != null) {
3434
+ // JSONP requests cannot always be aborted
3435
+ if ($.isFunction(this._request.abort)) {
3436
+ this._request.abort();
3437
+ }
3438
+
3439
+ this._request = null;
3440
+ }
3441
+
3442
+ var options = $.extend({
3443
+ type: 'GET'
3444
+ }, this.ajaxOptions);
3445
+
3446
+ if (typeof options.url === 'function') {
3447
+ options.url = options.url.call(this.$element, params);
3448
+ }
3449
+
3450
+ if (typeof options.data === 'function') {
3451
+ options.data = options.data.call(this.$element, params);
3452
+ }
3453
+
3454
+ function request () {
3455
+ var $request = options.transport(options, function (data) {
3456
+ var results = self.processResults(data, params);
3457
+
3458
+ if (self.options.get('debug') && window.console && console.error) {
3459
+ // Check to make sure that the response included a `results` key.
3460
+ if (!results || !results.results || !$.isArray(results.results)) {
3461
+ console.error(
3462
+ 'Select2: The AJAX results did not return an array in the ' +
3463
+ '`results` key of the response.'
3464
+ );
3465
+ }
3466
+ }
3467
+
3468
+ callback(results);
3469
+ }, function () {
3470
+ // Attempt to detect if a request was aborted
3471
+ // Only works if the transport exposes a status property
3472
+ if ($request.status && $request.status === '0') {
3473
+ return;
3474
+ }
3475
+
3476
+ self.trigger('results:message', {
3477
+ message: 'errorLoading'
3478
+ });
3479
+ });
3480
+
3481
+ self._request = $request;
3482
+ }
3483
+
3484
+ if (this.ajaxOptions.delay && params.term != null) {
3485
+ if (this._queryTimeout) {
3486
+ window.clearTimeout(this._queryTimeout);
3487
+ }
3488
+
3489
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
3490
+ } else {
3491
+ request();
3492
+ }
3493
+ };
3494
+
3495
+ return AjaxAdapter;
3496
+ });
3497
+
3498
+ S2.define('select2/data/tags',[
3499
+ 'jquery'
3500
+ ], function ($) {
3501
+ function Tags (decorated, $element, options) {
3502
+ var tags = options.get('tags');
3503
+
3504
+ var createTag = options.get('createTag');
3505
+
3506
+ if (createTag !== undefined) {
3507
+ this.createTag = createTag;
3508
+ }
3509
+
3510
+ var insertTag = options.get('insertTag');
3511
+
3512
+ if (insertTag !== undefined) {
3513
+ this.insertTag = insertTag;
3514
+ }
3515
+
3516
+ decorated.call(this, $element, options);
3517
+
3518
+ if ($.isArray(tags)) {
3519
+ for (var t = 0; t < tags.length; t++) {
3520
+ var tag = tags[t];
3521
+ var item = this._normalizeItem(tag);
3522
+
3523
+ var $option = this.option(item);
3524
+
3525
+ this.$element.append($option);
3526
+ }
3527
+ }
3528
+ }
3529
+
3530
+ Tags.prototype.query = function (decorated, params, callback) {
3531
+ var self = this;
3532
+
3533
+ this._removeOldTags();
3534
+
3535
+ if (params.term == null || params.page != null) {
3536
+ decorated.call(this, params, callback);
3537
+ return;
3538
+ }
3539
+
3540
+ function wrapper (obj, child) {
3541
+ var data = obj.results;
3542
+
3543
+ for (var i = 0; i < data.length; i++) {
3544
+ var option = data[i];
3545
+
3546
+ var checkChildren = (
3547
+ option.children != null &&
3548
+ !wrapper({
3549
+ results: option.children
3550
+ }, true)
3551
+ );
3552
+
3553
+ var checkText = option.text === params.term;
3554
+
3555
+ if (checkText || checkChildren) {
3556
+ if (child) {
3557
+ return false;
3558
+ }
3559
+
3560
+ obj.data = data;
3561
+ callback(obj);
3562
+
3563
+ return;
3564
+ }
3565
+ }
3566
+
3567
+ if (child) {
3568
+ return true;
3569
+ }
3570
+
3571
+ var tag = self.createTag(params);
3572
+
3573
+ if (tag != null) {
3574
+ var $option = self.option(tag);
3575
+ $option.attr('data-select2-tag', true);
3576
+
3577
+ self.addOptions([$option]);
3578
+
3579
+ self.insertTag(data, tag);
3580
+ }
3581
+
3582
+ obj.results = data;
3583
+
3584
+ callback(obj);
3585
+ }
3586
+
3587
+ decorated.call(this, params, wrapper);
3588
+ };
3589
+
3590
+ Tags.prototype.createTag = function (decorated, params) {
3591
+ var term = $.trim(params.term);
3592
+
3593
+ if (term === '') {
3594
+ return null;
3595
+ }
3596
+
3597
+ return {
3598
+ id: term,
3599
+ text: term
3600
+ };
3601
+ };
3602
+
3603
+ Tags.prototype.insertTag = function (_, data, tag) {
3604
+ data.unshift(tag);
3605
+ };
3606
+
3607
+ Tags.prototype._removeOldTags = function (_) {
3608
+ var tag = this._lastTag;
3609
+
3610
+ var $options = this.$element.find('option[data-select2-tag]');
3611
+
3612
+ $options.each(function () {
3613
+ if (this.selected) {
3614
+ return;
3615
+ }
3616
+
3617
+ $(this).remove();
3618
+ });
3619
+ };
3620
+
3621
+ return Tags;
3622
+ });
3623
+
3624
+ S2.define('select2/data/tokenizer',[
3625
+ 'jquery'
3626
+ ], function ($) {
3627
+ function Tokenizer (decorated, $element, options) {
3628
+ var tokenizer = options.get('tokenizer');
3629
+
3630
+ if (tokenizer !== undefined) {
3631
+ this.tokenizer = tokenizer;
3632
+ }
3633
+
3634
+ decorated.call(this, $element, options);
3635
+ }
3636
+
3637
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
3638
+ decorated.call(this, container, $container);
3639
+
3640
+ this.$search = container.dropdown.$search || container.selection.$search ||
3641
+ $container.find('.select2-search__field');
3642
+ };
3643
+
3644
+ Tokenizer.prototype.query = function (decorated, params, callback) {
3645
+ var self = this;
3646
+
3647
+ function createAndSelect (data) {
3648
+ // Normalize the data object so we can use it for checks
3649
+ var item = self._normalizeItem(data);
3650
+
3651
+ // Check if the data object already exists as a tag
3652
+ // Select it if it doesn't
3653
+ var $existingOptions = self.$element.find('option').filter(function () {
3654
+ return $(this).val() === item.id;
3655
+ });
3656
+
3657
+ // If an existing option wasn't found for it, create the option
3658
+ if (!$existingOptions.length) {
3659
+ var $option = self.option(item);
3660
+ $option.attr('data-select2-tag', true);
3661
+
3662
+ self._removeOldTags();
3663
+ self.addOptions([$option]);
3664
+ }
3665
+
3666
+ // Select the item, now that we know there is an option for it
3667
+ select(item);
3668
+ }
3669
+
3670
+ function select (data) {
3671
+ self.trigger('select', {
3672
+ data: data
3673
+ });
3674
+ }
3675
+
3676
+ params.term = params.term || '';
3677
+
3678
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
3679
+
3680
+ if (tokenData.term !== params.term) {
3681
+ // Replace the search term if we have the search box
3682
+ if (this.$search.length) {
3683
+ this.$search.val(tokenData.term);
3684
+ this.$search.focus();
3685
+ }
3686
+
3687
+ params.term = tokenData.term;
3688
+ }
3689
+
3690
+ decorated.call(this, params, callback);
3691
+ };
3692
+
3693
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
3694
+ var separators = options.get('tokenSeparators') || [];
3695
+ var term = params.term;
3696
+ var i = 0;
3697
+
3698
+ var createTag = this.createTag || function (params) {
3699
+ return {
3700
+ id: params.term,
3701
+ text: params.term
3702
+ };
3703
+ };
3704
+
3705
+ while (i < term.length) {
3706
+ var termChar = term[i];
3707
+
3708
+ if ($.inArray(termChar, separators) === -1) {
3709
+ i++;
3710
+
3711
+ continue;
3712
+ }
3713
+
3714
+ var part = term.substr(0, i);
3715
+ var partParams = $.extend({}, params, {
3716
+ term: part
3717
+ });
3718
+
3719
+ var data = createTag(partParams);
3720
+
3721
+ if (data == null) {
3722
+ i++;
3723
+ continue;
3724
+ }
3725
+
3726
+ callback(data);
3727
+
3728
+ // Reset the term to not include the tokenized portion
3729
+ term = term.substr(i + 1) || '';
3730
+ i = 0;
3731
+ }
3732
+
3733
+ return {
3734
+ term: term
3735
+ };
3736
+ };
3737
+
3738
+ return Tokenizer;
3739
+ });
3740
+
3741
+ S2.define('select2/data/minimumInputLength',[
3742
+
3743
+ ], function () {
3744
+ function MinimumInputLength (decorated, $e, options) {
3745
+ this.minimumInputLength = options.get('minimumInputLength');
3746
+
3747
+ decorated.call(this, $e, options);
3748
+ }
3749
+
3750
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
3751
+ params.term = params.term || '';
3752
+
3753
+ if (params.term.length < this.minimumInputLength) {
3754
+ this.trigger('results:message', {
3755
+ message: 'inputTooShort',
3756
+ args: {
3757
+ minimum: this.minimumInputLength,
3758
+ input: params.term,
3759
+ params: params
3760
+ }
3761
+ });
3762
+
3763
+ return;
3764
+ }
3765
+
3766
+ decorated.call(this, params, callback);
3767
+ };
3768
+
3769
+ return MinimumInputLength;
3770
+ });
3771
+
3772
+ S2.define('select2/data/maximumInputLength',[
3773
+
3774
+ ], function () {
3775
+ function MaximumInputLength (decorated, $e, options) {
3776
+ this.maximumInputLength = options.get('maximumInputLength');
3777
+
3778
+ decorated.call(this, $e, options);
3779
+ }
3780
+
3781
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
3782
+ params.term = params.term || '';
3783
+
3784
+ if (this.maximumInputLength > 0 &&
3785
+ params.term.length > this.maximumInputLength) {
3786
+ this.trigger('results:message', {
3787
+ message: 'inputTooLong',
3788
+ args: {
3789
+ maximum: this.maximumInputLength,
3790
+ input: params.term,
3791
+ params: params
3792
+ }
3793
+ });
3794
+
3795
+ return;
3796
+ }
3797
+
3798
+ decorated.call(this, params, callback);
3799
+ };
3800
+
3801
+ return MaximumInputLength;
3802
+ });
3803
+
3804
+ S2.define('select2/data/maximumSelectionLength',[
3805
+
3806
+ ], function (){
3807
+ function MaximumSelectionLength (decorated, $e, options) {
3808
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
3809
+
3810
+ decorated.call(this, $e, options);
3811
+ }
3812
+
3813
+ MaximumSelectionLength.prototype.query =
3814
+ function (decorated, params, callback) {
3815
+ var self = this;
3816
+
3817
+ this.current(function (currentData) {
3818
+ var count = currentData != null ? currentData.length : 0;
3819
+ if (self.maximumSelectionLength > 0 &&
3820
+ count >= self.maximumSelectionLength) {
3821
+ self.trigger('results:message', {
3822
+ message: 'maximumSelected',
3823
+ args: {
3824
+ maximum: self.maximumSelectionLength
3825
+ }
3826
+ });
3827
+ return;
3828
+ }
3829
+ decorated.call(self, params, callback);
3830
+ });
3831
+ };
3832
+
3833
+ return MaximumSelectionLength;
3834
+ });
3835
+
3836
+ S2.define('select2/dropdown',[
3837
+ 'jquery',
3838
+ './utils'
3839
+ ], function ($, Utils) {
3840
+ function Dropdown ($element, options) {
3841
+ this.$element = $element;
3842
+ this.options = options;
3843
+
3844
+ Dropdown.__super__.constructor.call(this);
3845
+ }
3846
+
3847
+ Utils.Extend(Dropdown, Utils.Observable);
3848
+
3849
+ Dropdown.prototype.render = function () {
3850
+ var $dropdown = $(
3851
+ '<span class="select2-dropdown">' +
3852
+ '<span class="select2-results"></span>' +
3853
+ '</span>'
3854
+ );
3855
+
3856
+ $dropdown.attr('dir', this.options.get('dir'));
3857
+
3858
+ this.$dropdown = $dropdown;
3859
+
3860
+ return $dropdown;
3861
+ };
3862
+
3863
+ Dropdown.prototype.bind = function () {
3864
+ // Should be implemented in subclasses
3865
+ };
3866
+
3867
+ Dropdown.prototype.position = function ($dropdown, $container) {
3868
+ // Should be implmented in subclasses
3869
+ };
3870
+
3871
+ Dropdown.prototype.destroy = function () {
3872
+ // Remove the dropdown from the DOM
3873
+ this.$dropdown.remove();
3874
+ };
3875
+
3876
+ return Dropdown;
3877
+ });
3878
+
3879
+ S2.define('select2/dropdown/search',[
3880
+ 'jquery',
3881
+ '../utils'
3882
+ ], function ($, Utils) {
3883
+ function Search () { }
3884
+
3885
+ Search.prototype.render = function (decorated) {
3886
+ var $rendered = decorated.call(this);
3887
+
3888
+ var $search = $(
3889
+ '<span class="select2-search select2-search--dropdown">' +
3890
+ '<input class="select2-search__field" type="search" tabindex="-1"' +
3891
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
3892
+ ' spellcheck="false" role="textbox" />' +
3893
+ '</span>'
3894
+ );
3895
+
3896
+ this.$searchContainer = $search;
3897
+ this.$search = $search.find('input');
3898
+
3899
+ $rendered.prepend($search);
3900
+
3901
+ return $rendered;
3902
+ };
3903
+
3904
+ Search.prototype.bind = function (decorated, container, $container) {
3905
+ var self = this;
3906
+
3907
+ decorated.call(this, container, $container);
3908
+
3909
+ this.$search.on('keydown', function (evt) {
3910
+ self.trigger('keypress', evt);
3911
+
3912
+ self._keyUpPrevented = evt.isDefaultPrevented();
3913
+ });
3914
+
3915
+ // Workaround for browsers which do not support the `input` event
3916
+ // This will prevent double-triggering of events for browsers which support
3917
+ // both the `keyup` and `input` events.
3918
+ this.$search.on('input', function (evt) {
3919
+ // Unbind the duplicated `keyup` event
3920
+ $(this).off('keyup');
3921
+ });
3922
+
3923
+ this.$search.on('keyup input', function (evt) {
3924
+ self.handleSearch(evt);
3925
+ });
3926
+
3927
+ container.on('open', function () {
3928
+ self.$search.attr('tabindex', 0);
3929
+
3930
+ self.$search.focus();
3931
+
3932
+ window.setTimeout(function () {
3933
+ self.$search.focus();
3934
+ }, 0);
3935
+ });
3936
+
3937
+ container.on('close', function () {
3938
+ self.$search.attr('tabindex', -1);
3939
+
3940
+ self.$search.val('');
3941
+ });
3942
+
3943
+ container.on('focus', function () {
3944
+ if (container.isOpen()) {
3945
+ self.$search.focus();
3946
+ }
3947
+ });
3948
+
3949
+ container.on('results:all', function (params) {
3950
+ if (params.query.term == null || params.query.term === '') {
3951
+ var showSearch = self.showSearch(params);
3952
+
3953
+ if (showSearch) {
3954
+ self.$searchContainer.removeClass('select2-search--hide');
3955
+ } else {
3956
+ self.$searchContainer.addClass('select2-search--hide');
3957
+ }
3958
+ }
3959
+ });
3960
+ };
3961
+
3962
+ Search.prototype.handleSearch = function (evt) {
3963
+ if (!this._keyUpPrevented) {
3964
+ var input = this.$search.val();
3965
+
3966
+ this.trigger('query', {
3967
+ term: input
3968
+ });
3969
+ }
3970
+
3971
+ this._keyUpPrevented = false;
3972
+ };
3973
+
3974
+ Search.prototype.showSearch = function (_, params) {
3975
+ return true;
3976
+ };
3977
+
3978
+ return Search;
3979
+ });
3980
+
3981
+ S2.define('select2/dropdown/hidePlaceholder',[
3982
+
3983
+ ], function () {
3984
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
3985
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
3986
+
3987
+ decorated.call(this, $element, options, dataAdapter);
3988
+ }
3989
+
3990
+ HidePlaceholder.prototype.append = function (decorated, data) {
3991
+ data.results = this.removePlaceholder(data.results);
3992
+
3993
+ decorated.call(this, data);
3994
+ };
3995
+
3996
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
3997
+ if (typeof placeholder === 'string') {
3998
+ placeholder = {
3999
+ id: '',
4000
+ text: placeholder
4001
+ };
4002
+ }
4003
+
4004
+ return placeholder;
4005
+ };
4006
+
4007
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
4008
+ var modifiedData = data.slice(0);
4009
+
4010
+ for (var d = data.length - 1; d >= 0; d--) {
4011
+ var item = data[d];
4012
+
4013
+ if (this.placeholder.id === item.id) {
4014
+ modifiedData.splice(d, 1);
4015
+ }
4016
+ }
4017
+
4018
+ return modifiedData;
4019
+ };
4020
+
4021
+ return HidePlaceholder;
4022
+ });
4023
+
4024
+ S2.define('select2/dropdown/infiniteScroll',[
4025
+ 'jquery'
4026
+ ], function ($) {
4027
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
4028
+ this.lastParams = {};
4029
+
4030
+ decorated.call(this, $element, options, dataAdapter);
4031
+
4032
+ this.$loadingMore = this.createLoadingMore();
4033
+ this.loading = false;
4034
+ }
4035
+
4036
+ InfiniteScroll.prototype.append = function (decorated, data) {
4037
+ this.$loadingMore.remove();
4038
+ this.loading = false;
4039
+
4040
+ decorated.call(this, data);
4041
+
4042
+ if (this.showLoadingMore(data)) {
4043
+ this.$results.append(this.$loadingMore);
4044
+ }
4045
+ };
4046
+
4047
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
4048
+ var self = this;
4049
+
4050
+ decorated.call(this, container, $container);
4051
+
4052
+ container.on('query', function (params) {
4053
+ self.lastParams = params;
4054
+ self.loading = true;
4055
+ });
4056
+
4057
+ container.on('query:append', function (params) {
4058
+ self.lastParams = params;
4059
+ self.loading = true;
4060
+ });
4061
+
4062
+ this.$results.on('scroll', function () {
4063
+ var isLoadMoreVisible = $.contains(
4064
+ document.documentElement,
4065
+ self.$loadingMore[0]
4066
+ );
4067
+
4068
+ if (self.loading || !isLoadMoreVisible) {
4069
+ return;
4070
+ }
4071
+
4072
+ var currentOffset = self.$results.offset().top +
4073
+ self.$results.outerHeight(false);
4074
+ var loadingMoreOffset = self.$loadingMore.offset().top +
4075
+ self.$loadingMore.outerHeight(false);
4076
+
4077
+ if (currentOffset + 50 >= loadingMoreOffset) {
4078
+ self.loadMore();
4079
+ }
4080
+ });
4081
+ };
4082
+
4083
+ InfiniteScroll.prototype.loadMore = function () {
4084
+ this.loading = true;
4085
+
4086
+ var params = $.extend({}, {page: 1}, this.lastParams);
4087
+
4088
+ params.page++;
4089
+
4090
+ this.trigger('query:append', params);
4091
+ };
4092
+
4093
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
4094
+ return data.pagination && data.pagination.more;
4095
+ };
4096
+
4097
+ InfiniteScroll.prototype.createLoadingMore = function () {
4098
+ var $option = $(
4099
+ '<li ' +
4100
+ 'class="select2-results__option select2-results__option--load-more"' +
4101
+ 'role="treeitem" aria-disabled="true"></li>'
4102
+ );
4103
+
4104
+ var message = this.options.get('translations').get('loadingMore');
4105
+
4106
+ $option.html(message(this.lastParams));
4107
+
4108
+ return $option;
4109
+ };
4110
+
4111
+ return InfiniteScroll;
4112
+ });
4113
+
4114
+ S2.define('select2/dropdown/attachBody',[
4115
+ 'jquery',
4116
+ '../utils'
4117
+ ], function ($, Utils) {
4118
+ function AttachBody (decorated, $element, options) {
4119
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
4120
+
4121
+ decorated.call(this, $element, options);
4122
+ }
4123
+
4124
+ AttachBody.prototype.bind = function (decorated, container, $container) {
4125
+ var self = this;
4126
+
4127
+ var setupResultsEvents = false;
4128
+
4129
+ decorated.call(this, container, $container);
4130
+
4131
+ container.on('open', function () {
4132
+ self._showDropdown();
4133
+ self._attachPositioningHandler(container);
4134
+
4135
+ if (!setupResultsEvents) {
4136
+ setupResultsEvents = true;
4137
+
4138
+ container.on('results:all', function () {
4139
+ self._positionDropdown();
4140
+ self._resizeDropdown();
4141
+ });
4142
+
4143
+ container.on('results:append', function () {
4144
+ self._positionDropdown();
4145
+ self._resizeDropdown();
4146
+ });
4147
+ }
4148
+ });
4149
+
4150
+ container.on('close', function () {
4151
+ self._hideDropdown();
4152
+ self._detachPositioningHandler(container);
4153
+ });
4154
+
4155
+ this.$dropdownContainer.on('mousedown', function (evt) {
4156
+ evt.stopPropagation();
4157
+ });
4158
+ };
4159
+
4160
+ AttachBody.prototype.destroy = function (decorated) {
4161
+ decorated.call(this);
4162
+
4163
+ this.$dropdownContainer.remove();
4164
+ };
4165
+
4166
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
4167
+ // Clone all of the container classes
4168
+ $dropdown.attr('class', $container.attr('class'));
4169
+
4170
+ $dropdown.removeClass('select2');
4171
+ $dropdown.addClass('select2-container--open');
4172
+
4173
+ $dropdown.css({
4174
+ position: 'absolute',
4175
+ top: -999999
4176
+ });
4177
+
4178
+ this.$container = $container;
4179
+ };
4180
+
4181
+ AttachBody.prototype.render = function (decorated) {
4182
+ var $container = $('<span></span>');
4183
+
4184
+ var $dropdown = decorated.call(this);
4185
+ $container.append($dropdown);
4186
+
4187
+ this.$dropdownContainer = $container;
4188
+
4189
+ return $container;
4190
+ };
4191
+
4192
+ AttachBody.prototype._hideDropdown = function (decorated) {
4193
+ this.$dropdownContainer.detach();
4194
+ };
4195
+
4196
+ AttachBody.prototype._attachPositioningHandler =
4197
+ function (decorated, container) {
4198
+ var self = this;
4199
+
4200
+ var scrollEvent = 'scroll.select2.' + container.id;
4201
+ var resizeEvent = 'resize.select2.' + container.id;
4202
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4203
+
4204
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4205
+ $watchers.each(function () {
4206
+ $(this).data('select2-scroll-position', {
4207
+ x: $(this).scrollLeft(),
4208
+ y: $(this).scrollTop()
4209
+ });
4210
+ });
4211
+
4212
+ $watchers.on(scrollEvent, function (ev) {
4213
+ var position = $(this).data('select2-scroll-position');
4214
+ $(this).scrollTop(position.y);
4215
+ });
4216
+
4217
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
4218
+ function (e) {
4219
+ self._positionDropdown();
4220
+ self._resizeDropdown();
4221
+ });
4222
+ };
4223
+
4224
+ AttachBody.prototype._detachPositioningHandler =
4225
+ function (decorated, container) {
4226
+ var scrollEvent = 'scroll.select2.' + container.id;
4227
+ var resizeEvent = 'resize.select2.' + container.id;
4228
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4229
+
4230
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4231
+ $watchers.off(scrollEvent);
4232
+
4233
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
4234
+ };
4235
+
4236
+ AttachBody.prototype._positionDropdown = function () {
4237
+ var $window = $(window);
4238
+
4239
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
4240
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
4241
+
4242
+ var newDirection = null;
4243
+
4244
+ var offset = this.$container.offset();
4245
+
4246
+ offset.bottom = offset.top + this.$container.outerHeight(false);
4247
+
4248
+ var container = {
4249
+ height: this.$container.outerHeight(false)
4250
+ };
4251
+
4252
+ container.top = offset.top;
4253
+ container.bottom = offset.top + container.height;
4254
+
4255
+ var dropdown = {
4256
+ height: this.$dropdown.outerHeight(false)
4257
+ };
4258
+
4259
+ var viewport = {
4260
+ top: $window.scrollTop(),
4261
+ bottom: $window.scrollTop() + $window.height()
4262
+ };
4263
+
4264
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
4265
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
4266
+
4267
+ var css = {
4268
+ left: offset.left,
4269
+ top: container.bottom
4270
+ };
4271
+
4272
+ // Determine what the parent element is to use for calciulating the offset
4273
+ var $offsetParent = this.$dropdownParent;
4274
+
4275
+ // For statically positoned elements, we need to get the element
4276
+ // that is determining the offset
4277
+ if ($offsetParent.css('position') === 'static') {
4278
+ $offsetParent = $offsetParent.offsetParent();
4279
+ }
4280
+
4281
+ var parentOffset = $offsetParent.offset();
4282
+
4283
+ css.top -= parentOffset.top;
4284
+ css.left -= parentOffset.left;
4285
+
4286
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
4287
+ newDirection = 'below';
4288
+ }
4289
+
4290
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
4291
+ newDirection = 'above';
4292
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
4293
+ newDirection = 'below';
4294
+ }
4295
+
4296
+ if (newDirection == 'above' ||
4297
+ (isCurrentlyAbove && newDirection !== 'below')) {
4298
+ css.top = container.top - parentOffset.top - dropdown.height;
4299
+ }
4300
+
4301
+ if (newDirection != null) {
4302
+ this.$dropdown
4303
+ .removeClass('select2-dropdown--below select2-dropdown--above')
4304
+ .addClass('select2-dropdown--' + newDirection);
4305
+ this.$container
4306
+ .removeClass('select2-container--below select2-container--above')
4307
+ .addClass('select2-container--' + newDirection);
4308
+ }
4309
+
4310
+ this.$dropdownContainer.css(css);
4311
+ };
4312
+
4313
+ AttachBody.prototype._resizeDropdown = function () {
4314
+ var css = {
4315
+ width: this.$container.outerWidth(false) + 'px'
4316
+ };
4317
+
4318
+ if (this.options.get('dropdownAutoWidth')) {
4319
+ css.minWidth = css.width;
4320
+ css.position = 'relative';
4321
+ css.width = 'auto';
4322
+ }
4323
+
4324
+ this.$dropdown.css(css);
4325
+ };
4326
+
4327
+ AttachBody.prototype._showDropdown = function (decorated) {
4328
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
4329
+
4330
+ this._positionDropdown();
4331
+ this._resizeDropdown();
4332
+ };
4333
+
4334
+ return AttachBody;
4335
+ });
4336
+
4337
+ S2.define('select2/dropdown/minimumResultsForSearch',[
4338
+
4339
+ ], function () {
4340
+ function countResults (data) {
4341
+ var count = 0;
4342
+
4343
+ for (var d = 0; d < data.length; d++) {
4344
+ var item = data[d];
4345
+
4346
+ if (item.children) {
4347
+ count += countResults(item.children);
4348
+ } else {
4349
+ count++;
4350
+ }
4351
+ }
4352
+
4353
+ return count;
4354
+ }
4355
+
4356
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
4357
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
4358
+
4359
+ if (this.minimumResultsForSearch < 0) {
4360
+ this.minimumResultsForSearch = Infinity;
4361
+ }
4362
+
4363
+ decorated.call(this, $element, options, dataAdapter);
4364
+ }
4365
+
4366
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
4367
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
4368
+ return false;
4369
+ }
4370
+
4371
+ return decorated.call(this, params);
4372
+ };
4373
+
4374
+ return MinimumResultsForSearch;
4375
+ });
4376
+
4377
+ S2.define('select2/dropdown/selectOnClose',[
4378
+
4379
+ ], function () {
4380
+ function SelectOnClose () { }
4381
+
4382
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
4383
+ var self = this;
4384
+
4385
+ decorated.call(this, container, $container);
4386
+
4387
+ container.on('close', function (params) {
4388
+ self._handleSelectOnClose(params);
4389
+ });
4390
+ };
4391
+
4392
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
4393
+ if (params && params.originalSelect2Event != null) {
4394
+ var event = params.originalSelect2Event;
4395
+
4396
+ // Don't select an item if the close event was triggered from a select or
4397
+ // unselect event
4398
+ if (event._type === 'select' || event._type === 'unselect') {
4399
+ return;
4400
+ }
4401
+ }
4402
+
4403
+ var $highlightedResults = this.getHighlightedResults();
4404
+
4405
+ // Only select highlighted results
4406
+ if ($highlightedResults.length < 1) {
4407
+ return;
4408
+ }
4409
+
4410
+ var data = $highlightedResults.data('data');
4411
+
4412
+ // Don't re-select already selected resulte
4413
+ if (
4414
+ (data.element != null && data.element.selected) ||
4415
+ (data.element == null && data.selected)
4416
+ ) {
4417
+ return;
4418
+ }
4419
+
4420
+ this.trigger('select', {
4421
+ data: data
4422
+ });
4423
+ };
4424
+
4425
+ return SelectOnClose;
4426
+ });
4427
+
4428
+ S2.define('select2/dropdown/closeOnSelect',[
4429
+
4430
+ ], function () {
4431
+ function CloseOnSelect () { }
4432
+
4433
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
4434
+ var self = this;
4435
+
4436
+ decorated.call(this, container, $container);
4437
+
4438
+ container.on('select', function (evt) {
4439
+ self._selectTriggered(evt);
4440
+ });
4441
+
4442
+ container.on('unselect', function (evt) {
4443
+ self._selectTriggered(evt);
4444
+ });
4445
+ };
4446
+
4447
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
4448
+ var originalEvent = evt.originalEvent;
4449
+
4450
+ // Don't close if the control key is being held
4451
+ if (originalEvent && originalEvent.ctrlKey) {
4452
+ return;
4453
+ }
4454
+
4455
+ this.trigger('close', {
4456
+ originalEvent: originalEvent,
4457
+ originalSelect2Event: evt
4458
+ });
4459
+ };
4460
+
4461
+ return CloseOnSelect;
4462
+ });
4463
+
4464
+ S2.define('select2/i18n/en',[],function () {
4465
+ // English
4466
+ return {
4467
+ errorLoading: function () {
4468
+ return 'The results could not be loaded.';
4469
+ },
4470
+ inputTooLong: function (args) {
4471
+ var overChars = args.input.length - args.maximum;
4472
+
4473
+ var message = 'Please delete ' + overChars + ' character';
4474
+
4475
+ if (overChars != 1) {
4476
+ message += 's';
4477
+ }
4478
+
4479
+ return message;
4480
+ },
4481
+ inputTooShort: function (args) {
4482
+ var remainingChars = args.minimum - args.input.length;
4483
+
4484
+ var message = 'Please enter ' + remainingChars + ' or more characters';
4485
+
4486
+ return message;
4487
+ },
4488
+ loadingMore: function () {
4489
+ return 'Loading more results…';
4490
+ },
4491
+ maximumSelected: function (args) {
4492
+ var message = 'You can only select ' + args.maximum + ' item';
4493
+
4494
+ if (args.maximum != 1) {
4495
+ message += 's';
4496
+ }
4497
+
4498
+ return message;
4499
+ },
4500
+ noResults: function () {
4501
+ return 'No results found';
4502
+ },
4503
+ searching: function () {
4504
+ return 'Searching…';
4505
+ }
4506
+ };
4507
+ });
4508
+
4509
+ S2.define('select2/defaults',[
4510
+ 'jquery',
4511
+ 'require',
4512
+
4513
+ './results',
4514
+
4515
+ './selection/single',
4516
+ './selection/multiple',
4517
+ './selection/placeholder',
4518
+ './selection/allowClear',
4519
+ './selection/search',
4520
+ './selection/eventRelay',
4521
+
4522
+ './utils',
4523
+ './translation',
4524
+ './diacritics',
4525
+
4526
+ './data/select',
4527
+ './data/array',
4528
+ './data/ajax',
4529
+ './data/tags',
4530
+ './data/tokenizer',
4531
+ './data/minimumInputLength',
4532
+ './data/maximumInputLength',
4533
+ './data/maximumSelectionLength',
4534
+
4535
+ './dropdown',
4536
+ './dropdown/search',
4537
+ './dropdown/hidePlaceholder',
4538
+ './dropdown/infiniteScroll',
4539
+ './dropdown/attachBody',
4540
+ './dropdown/minimumResultsForSearch',
4541
+ './dropdown/selectOnClose',
4542
+ './dropdown/closeOnSelect',
4543
+
4544
+ './i18n/en'
4545
+ ], function ($, require,
4546
+
4547
+ ResultsList,
4548
+
4549
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
4550
+ SelectionSearch, EventRelay,
4551
+
4552
+ Utils, Translation, DIACRITICS,
4553
+
4554
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
4555
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
4556
+
4557
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
4558
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
4559
+
4560
+ EnglishTranslation) {
4561
+ function Defaults () {
4562
+ this.reset();
4563
+ }
4564
+
4565
+ Defaults.prototype.apply = function (options) {
4566
+ options = $.extend(true, {}, this.defaults, options);
4567
+
4568
+ if (options.dataAdapter == null) {
4569
+ if (options.ajax != null) {
4570
+ options.dataAdapter = AjaxData;
4571
+ } else if (options.data != null) {
4572
+ options.dataAdapter = ArrayData;
4573
+ } else {
4574
+ options.dataAdapter = SelectData;
4575
+ }
4576
+
4577
+ if (options.minimumInputLength > 0) {
4578
+ options.dataAdapter = Utils.Decorate(
4579
+ options.dataAdapter,
4580
+ MinimumInputLength
4581
+ );
4582
+ }
4583
+
4584
+ if (options.maximumInputLength > 0) {
4585
+ options.dataAdapter = Utils.Decorate(
4586
+ options.dataAdapter,
4587
+ MaximumInputLength
4588
+ );
4589
+ }
4590
+
4591
+ if (options.maximumSelectionLength > 0) {
4592
+ options.dataAdapter = Utils.Decorate(
4593
+ options.dataAdapter,
4594
+ MaximumSelectionLength
4595
+ );
4596
+ }
4597
+
4598
+ if (options.tags) {
4599
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
4600
+ }
4601
+
4602
+ if (options.tokenSeparators != null || options.tokenizer != null) {
4603
+ options.dataAdapter = Utils.Decorate(
4604
+ options.dataAdapter,
4605
+ Tokenizer
4606
+ );
4607
+ }
4608
+
4609
+ if (options.query != null) {
4610
+ var Query = require(options.amdBase + 'compat/query');
4611
+
4612
+ options.dataAdapter = Utils.Decorate(
4613
+ options.dataAdapter,
4614
+ Query
4615
+ );
4616
+ }
4617
+
4618
+ if (options.initSelection != null) {
4619
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
4620
+
4621
+ options.dataAdapter = Utils.Decorate(
4622
+ options.dataAdapter,
4623
+ InitSelection
4624
+ );
4625
+ }
4626
+ }
4627
+
4628
+ if (options.resultsAdapter == null) {
4629
+ options.resultsAdapter = ResultsList;
4630
+
4631
+ if (options.ajax != null) {
4632
+ options.resultsAdapter = Utils.Decorate(
4633
+ options.resultsAdapter,
4634
+ InfiniteScroll
4635
+ );
4636
+ }
4637
+
4638
+ if (options.placeholder != null) {
4639
+ options.resultsAdapter = Utils.Decorate(
4640
+ options.resultsAdapter,
4641
+ HidePlaceholder
4642
+ );
4643
+ }
4644
+
4645
+ if (options.selectOnClose) {
4646
+ options.resultsAdapter = Utils.Decorate(
4647
+ options.resultsAdapter,
4648
+ SelectOnClose
4649
+ );
4650
+ }
4651
+ }
4652
+
4653
+ if (options.dropdownAdapter == null) {
4654
+ if (options.multiple) {
4655
+ options.dropdownAdapter = Dropdown;
4656
+ } else {
4657
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
4658
+
4659
+ options.dropdownAdapter = SearchableDropdown;
4660
+ }
4661
+
4662
+ if (options.minimumResultsForSearch !== 0) {
4663
+ options.dropdownAdapter = Utils.Decorate(
4664
+ options.dropdownAdapter,
4665
+ MinimumResultsForSearch
4666
+ );
4667
+ }
4668
+
4669
+ if (options.closeOnSelect) {
4670
+ options.dropdownAdapter = Utils.Decorate(
4671
+ options.dropdownAdapter,
4672
+ CloseOnSelect
4673
+ );
4674
+ }
4675
+
4676
+ if (
4677
+ options.dropdownCssClass != null ||
4678
+ options.dropdownCss != null ||
4679
+ options.adaptDropdownCssClass != null
4680
+ ) {
4681
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
4682
+
4683
+ options.dropdownAdapter = Utils.Decorate(
4684
+ options.dropdownAdapter,
4685
+ DropdownCSS
4686
+ );
4687
+ }
4688
+
4689
+ options.dropdownAdapter = Utils.Decorate(
4690
+ options.dropdownAdapter,
4691
+ AttachBody
4692
+ );
4693
+ }
4694
+
4695
+ if (options.selectionAdapter == null) {
4696
+ if (options.multiple) {
4697
+ options.selectionAdapter = MultipleSelection;
4698
+ } else {
4699
+ options.selectionAdapter = SingleSelection;
4700
+ }
4701
+
4702
+ // Add the placeholder mixin if a placeholder was specified
4703
+ if (options.placeholder != null) {
4704
+ options.selectionAdapter = Utils.Decorate(
4705
+ options.selectionAdapter,
4706
+ Placeholder
4707
+ );
4708
+ }
4709
+
4710
+ if (options.allowClear) {
4711
+ options.selectionAdapter = Utils.Decorate(
4712
+ options.selectionAdapter,
4713
+ AllowClear
4714
+ );
4715
+ }
4716
+
4717
+ if (options.multiple) {
4718
+ options.selectionAdapter = Utils.Decorate(
4719
+ options.selectionAdapter,
4720
+ SelectionSearch
4721
+ );
4722
+ }
4723
+
4724
+ if (
4725
+ options.containerCssClass != null ||
4726
+ options.containerCss != null ||
4727
+ options.adaptContainerCssClass != null
4728
+ ) {
4729
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
4730
+
4731
+ options.selectionAdapter = Utils.Decorate(
4732
+ options.selectionAdapter,
4733
+ ContainerCSS
4734
+ );
4735
+ }
4736
+
4737
+ options.selectionAdapter = Utils.Decorate(
4738
+ options.selectionAdapter,
4739
+ EventRelay
4740
+ );
4741
+ }
4742
+
4743
+ if (typeof options.language === 'string') {
4744
+ // Check if the language is specified with a region
4745
+ if (options.language.indexOf('-') > 0) {
4746
+ // Extract the region information if it is included
4747
+ var languageParts = options.language.split('-');
4748
+ var baseLanguage = languageParts[0];
4749
+
4750
+ options.language = [options.language, baseLanguage];
4751
+ } else {
4752
+ options.language = [options.language];
4753
+ }
4754
+ }
4755
+
4756
+ if ($.isArray(options.language)) {
4757
+ var languages = new Translation();
4758
+ options.language.push('en');
4759
+
4760
+ var languageNames = options.language;
4761
+
4762
+ for (var l = 0; l < languageNames.length; l++) {
4763
+ var name = languageNames[l];
4764
+ var language = {};
4765
+
4766
+ try {
4767
+ // Try to load it with the original name
4768
+ language = Translation.loadPath(name);
4769
+ } catch (e) {
4770
+ try {
4771
+ // If we couldn't load it, check if it wasn't the full path
4772
+ name = this.defaults.amdLanguageBase + name;
4773
+ language = Translation.loadPath(name);
4774
+ } catch (ex) {
4775
+ // The translation could not be loaded at all. Sometimes this is
4776
+ // because of a configuration problem, other times this can be
4777
+ // because of how Select2 helps load all possible translation files.
4778
+ if (options.debug && window.console && console.warn) {
4779
+ console.warn(
4780
+ 'Select2: The language file for "' + name + '" could not be ' +
4781
+ 'automatically loaded. A fallback will be used instead.'
4782
+ );
4783
+ }
4784
+
4785
+ continue;
4786
+ }
4787
+ }
4788
+
4789
+ languages.extend(language);
4790
+ }
4791
+
4792
+ options.translations = languages;
4793
+ } else {
4794
+ var baseTranslation = Translation.loadPath(
4795
+ this.defaults.amdLanguageBase + 'en'
4796
+ );
4797
+ var customTranslation = new Translation(options.language);
4798
+
4799
+ customTranslation.extend(baseTranslation);
4800
+
4801
+ options.translations = customTranslation;
4802
+ }
4803
+
4804
+ return options;
4805
+ };
4806
+
4807
+ Defaults.prototype.reset = function () {
4808
+ function stripDiacritics (text) {
4809
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
4810
+ function match(a) {
4811
+ return DIACRITICS[a] || a;
4812
+ }
4813
+
4814
+ return text.replace(/[^\u0000-\u007E]/g, match);
4815
+ }
4816
+
4817
+ function matcher (params, data) {
4818
+ // Always return the object if there is nothing to compare
4819
+ if ($.trim(params.term) === '') {
4820
+ return data;
4821
+ }
4822
+
4823
+ // Do a recursive check for options with children
4824
+ if (data.children && data.children.length > 0) {
4825
+ // Clone the data object if there are children
4826
+ // This is required as we modify the object to remove any non-matches
4827
+ var match = $.extend(true, {}, data);
4828
+
4829
+ // Check each child of the option
4830
+ for (var c = data.children.length - 1; c >= 0; c--) {
4831
+ var child = data.children[c];
4832
+
4833
+ var matches = matcher(params, child);
4834
+
4835
+ // If there wasn't a match, remove the object in the array
4836
+ if (matches == null) {
4837
+ match.children.splice(c, 1);
4838
+ }
4839
+ }
4840
+
4841
+ // If any children matched, return the new object
4842
+ if (match.children.length > 0) {
4843
+ return match;
4844
+ }
4845
+
4846
+ // If there were no matching children, check just the plain object
4847
+ return matcher(params, match);
4848
+ }
4849
+
4850
+ var original = stripDiacritics(data.text).toUpperCase();
4851
+ var term = stripDiacritics(params.term).toUpperCase();
4852
+
4853
+ // Check if the text contains the term
4854
+ if (original.indexOf(term) > -1) {
4855
+ return data;
4856
+ }
4857
+
4858
+ // If it doesn't contain the term, don't return anything
4859
+ return null;
4860
+ }
4861
+
4862
+ this.defaults = {
4863
+ amdBase: './',
4864
+ amdLanguageBase: './i18n/',
4865
+ closeOnSelect: true,
4866
+ debug: false,
4867
+ dropdownAutoWidth: false,
4868
+ escapeMarkup: Utils.escapeMarkup,
4869
+ language: EnglishTranslation,
4870
+ matcher: matcher,
4871
+ minimumInputLength: 0,
4872
+ maximumInputLength: 0,
4873
+ maximumSelectionLength: 0,
4874
+ minimumResultsForSearch: 0,
4875
+ selectOnClose: false,
4876
+ sorter: function (data) {
4877
+ return data;
4878
+ },
4879
+ templateResult: function (result) {
4880
+ return result.text;
4881
+ },
4882
+ templateSelection: function (selection) {
4883
+ return selection.text;
4884
+ },
4885
+ theme: 'default',
4886
+ width: 'resolve'
4887
+ };
4888
+ };
4889
+
4890
+ Defaults.prototype.set = function (key, value) {
4891
+ var camelKey = $.camelCase(key);
4892
+
4893
+ var data = {};
4894
+ data[camelKey] = value;
4895
+
4896
+ var convertedData = Utils._convertData(data);
4897
+
4898
+ $.extend(this.defaults, convertedData);
4899
+ };
4900
+
4901
+ var defaults = new Defaults();
4902
+
4903
+ return defaults;
4904
+ });
4905
+
4906
+ S2.define('select2/options',[
4907
+ 'require',
4908
+ 'jquery',
4909
+ './defaults',
4910
+ './utils'
4911
+ ], function (require, $, Defaults, Utils) {
4912
+ function Options (options, $element) {
4913
+ this.options = options;
4914
+
4915
+ if ($element != null) {
4916
+ this.fromElement($element);
4917
+ }
4918
+
4919
+ this.options = Defaults.apply(this.options);
4920
+
4921
+ if ($element && $element.is('input')) {
4922
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
4923
+
4924
+ this.options.dataAdapter = Utils.Decorate(
4925
+ this.options.dataAdapter,
4926
+ InputCompat
4927
+ );
4928
+ }
4929
+ }
4930
+
4931
+ Options.prototype.fromElement = function ($e) {
4932
+ var excludedData = ['select2'];
4933
+
4934
+ if (this.options.multiple == null) {
4935
+ this.options.multiple = $e.prop('multiple');
4936
+ }
4937
+
4938
+ if (this.options.disabled == null) {
4939
+ this.options.disabled = $e.prop('disabled');
4940
+ }
4941
+
4942
+ if (this.options.language == null) {
4943
+ if ($e.prop('lang')) {
4944
+ this.options.language = $e.prop('lang').toLowerCase();
4945
+ } else if ($e.closest('[lang]').prop('lang')) {
4946
+ this.options.language = $e.closest('[lang]').prop('lang');
4947
+ }
4948
+ }
4949
+
4950
+ if (this.options.dir == null) {
4951
+ if ($e.prop('dir')) {
4952
+ this.options.dir = $e.prop('dir');
4953
+ } else if ($e.closest('[dir]').prop('dir')) {
4954
+ this.options.dir = $e.closest('[dir]').prop('dir');
4955
+ } else {
4956
+ this.options.dir = 'ltr';
4957
+ }
4958
+ }
4959
+
4960
+ $e.prop('disabled', this.options.disabled);
4961
+ $e.prop('multiple', this.options.multiple);
4962
+
4963
+ if ($e.data('select2Tags')) {
4964
+ if (this.options.debug && window.console && console.warn) {
4965
+ console.warn(
4966
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
4967
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
4968
+ 'removed in future versions of Select2.'
4969
+ );
4970
+ }
4971
+
4972
+ $e.data('data', $e.data('select2Tags'));
4973
+ $e.data('tags', true);
4974
+ }
4975
+
4976
+ if ($e.data('ajaxUrl')) {
4977
+ if (this.options.debug && window.console && console.warn) {
4978
+ console.warn(
4979
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
4980
+ '`data-ajax--url` and support for the old attribute will be removed' +
4981
+ ' in future versions of Select2.'
4982
+ );
4983
+ }
4984
+
4985
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
4986
+ $e.data('ajax--url', $e.data('ajaxUrl'));
4987
+ }
4988
+
4989
+ var dataset = {};
4990
+
4991
+ // Prefer the element's `dataset` attribute if it exists
4992
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
4993
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
4994
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
4995
+ } else {
4996
+ dataset = $e.data();
4997
+ }
4998
+
4999
+ var data = $.extend(true, {}, dataset);
5000
+
5001
+ data = Utils._convertData(data);
5002
+
5003
+ for (var key in data) {
5004
+ if ($.inArray(key, excludedData) > -1) {
5005
+ continue;
5006
+ }
5007
+
5008
+ if ($.isPlainObject(this.options[key])) {
5009
+ $.extend(this.options[key], data[key]);
5010
+ } else {
5011
+ this.options[key] = data[key];
5012
+ }
5013
+ }
5014
+
5015
+ return this;
5016
+ };
5017
+
5018
+ Options.prototype.get = function (key) {
5019
+ return this.options[key];
5020
+ };
5021
+
5022
+ Options.prototype.set = function (key, val) {
5023
+ this.options[key] = val;
5024
+ };
5025
+
5026
+ return Options;
5027
+ });
5028
+
5029
+ S2.define('select2/core',[
5030
+ 'jquery',
5031
+ './options',
5032
+ './utils',
5033
+ './keys'
5034
+ ], function ($, Options, Utils, KEYS) {
5035
+ var Select2 = function ($element, options) {
5036
+ if ($element.data('select2') != null) {
5037
+ $element.data('select2').destroy();
5038
+ }
5039
+
5040
+ this.$element = $element;
5041
+
5042
+ this.id = this._generateId($element);
5043
+
5044
+ options = options || {};
5045
+
5046
+ this.options = new Options(options, $element);
5047
+
5048
+ Select2.__super__.constructor.call(this);
5049
+
5050
+ // Set up the tabindex
5051
+
5052
+ var tabindex = $element.attr('tabindex') || 0;
5053
+ $element.data('old-tabindex', tabindex);
5054
+ $element.attr('tabindex', '-1');
5055
+
5056
+ // Set up containers and adapters
5057
+
5058
+ var DataAdapter = this.options.get('dataAdapter');
5059
+ this.dataAdapter = new DataAdapter($element, this.options);
5060
+
5061
+ var $container = this.render();
5062
+
5063
+ this._placeContainer($container);
5064
+
5065
+ var SelectionAdapter = this.options.get('selectionAdapter');
5066
+ this.selection = new SelectionAdapter($element, this.options);
5067
+ this.$selection = this.selection.render();
5068
+
5069
+ this.selection.position(this.$selection, $container);
5070
+
5071
+ var DropdownAdapter = this.options.get('dropdownAdapter');
5072
+ this.dropdown = new DropdownAdapter($element, this.options);
5073
+ this.$dropdown = this.dropdown.render();
5074
+
5075
+ this.dropdown.position(this.$dropdown, $container);
5076
+
5077
+ var ResultsAdapter = this.options.get('resultsAdapter');
5078
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
5079
+ this.$results = this.results.render();
5080
+
5081
+ this.results.position(this.$results, this.$dropdown);
5082
+
5083
+ // Bind events
5084
+
5085
+ var self = this;
5086
+
5087
+ // Bind the container to all of the adapters
5088
+ this._bindAdapters();
5089
+
5090
+ // Register any DOM event handlers
5091
+ this._registerDomEvents();
5092
+
5093
+ // Register any internal event handlers
5094
+ this._registerDataEvents();
5095
+ this._registerSelectionEvents();
5096
+ this._registerDropdownEvents();
5097
+ this._registerResultsEvents();
5098
+ this._registerEvents();
5099
+
5100
+ // Set the initial state
5101
+ this.dataAdapter.current(function (initialData) {
5102
+ self.trigger('selection:update', {
5103
+ data: initialData
5104
+ });
5105
+ });
5106
+
5107
+ // Hide the original select
5108
+ $element.addClass('select2-hidden-accessible');
5109
+ $element.attr('aria-hidden', 'true');
5110
+
5111
+ // Synchronize any monitored attributes
5112
+ this._syncAttributes();
5113
+
5114
+ $element.data('select2', this);
5115
+ };
5116
+
5117
+ Utils.Extend(Select2, Utils.Observable);
5118
+
5119
+ Select2.prototype._generateId = function ($element) {
5120
+ var id = '';
5121
+
5122
+ if ($element.attr('id') != null) {
5123
+ id = $element.attr('id');
5124
+ } else if ($element.attr('name') != null) {
5125
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
5126
+ } else {
5127
+ id = Utils.generateChars(4);
5128
+ }
5129
+
5130
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
5131
+ id = 'select2-' + id;
5132
+
5133
+ return id;
5134
+ };
5135
+
5136
+ Select2.prototype._placeContainer = function ($container) {
5137
+ $container.insertAfter(this.$element);
5138
+
5139
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
5140
+
5141
+ if (width != null) {
5142
+ $container.css('width', width);
5143
+ }
5144
+ };
5145
+
5146
+ Select2.prototype._resolveWidth = function ($element, method) {
5147
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
5148
+
5149
+ if (method == 'resolve') {
5150
+ var styleWidth = this._resolveWidth($element, 'style');
5151
+
5152
+ if (styleWidth != null) {
5153
+ return styleWidth;
5154
+ }
5155
+
5156
+ return this._resolveWidth($element, 'element');
5157
+ }
5158
+
5159
+ if (method == 'element') {
5160
+ var elementWidth = $element.outerWidth(false);
5161
+
5162
+ if (elementWidth <= 0) {
5163
+ return 'auto';
5164
+ }
5165
+
5166
+ return elementWidth + 'px';
5167
+ }
5168
+
5169
+ if (method == 'style') {
5170
+ var style = $element.attr('style');
5171
+
5172
+ if (typeof(style) !== 'string') {
5173
+ return null;
5174
+ }
5175
+
5176
+ var attrs = style.split(';');
5177
+
5178
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
5179
+ var attr = attrs[i].replace(/\s/g, '');
5180
+ var matches = attr.match(WIDTH);
5181
+
5182
+ if (matches !== null && matches.length >= 1) {
5183
+ return matches[1];
5184
+ }
5185
+ }
5186
+
5187
+ return null;
5188
+ }
5189
+
5190
+ return method;
5191
+ };
5192
+
5193
+ Select2.prototype._bindAdapters = function () {
5194
+ this.dataAdapter.bind(this, this.$container);
5195
+ this.selection.bind(this, this.$container);
5196
+
5197
+ this.dropdown.bind(this, this.$container);
5198
+ this.results.bind(this, this.$container);
5199
+ };
5200
+
5201
+ Select2.prototype._registerDomEvents = function () {
5202
+ var self = this;
5203
+
5204
+ this.$element.on('change.select2', function () {
5205
+ self.dataAdapter.current(function (data) {
5206
+ self.trigger('selection:update', {
5207
+ data: data
5208
+ });
5209
+ });
5210
+ });
5211
+
5212
+ this.$element.on('focus.select2', function (evt) {
5213
+ self.trigger('focus', evt);
5214
+ });
5215
+
5216
+ this._syncA = Utils.bind(this._syncAttributes, this);
5217
+ this._syncS = Utils.bind(this._syncSubtree, this);
5218
+
5219
+ if (this.$element[0].attachEvent) {
5220
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
5221
+ }
5222
+
5223
+ var observer = window.MutationObserver ||
5224
+ window.WebKitMutationObserver ||
5225
+ window.MozMutationObserver
5226
+ ;
5227
+
5228
+ if (observer != null) {
5229
+ this._observer = new observer(function (mutations) {
5230
+ $.each(mutations, self._syncA);
5231
+ $.each(mutations, self._syncS);
5232
+ });
5233
+ this._observer.observe(this.$element[0], {
5234
+ attributes: true,
5235
+ childList: true,
5236
+ subtree: false
5237
+ });
5238
+ } else if (this.$element[0].addEventListener) {
5239
+ this.$element[0].addEventListener(
5240
+ 'DOMAttrModified',
5241
+ self._syncA,
5242
+ false
5243
+ );
5244
+ this.$element[0].addEventListener(
5245
+ 'DOMNodeInserted',
5246
+ self._syncS,
5247
+ false
5248
+ );
5249
+ this.$element[0].addEventListener(
5250
+ 'DOMNodeRemoved',
5251
+ self._syncS,
5252
+ false
5253
+ );
5254
+ }
5255
+ };
5256
+
5257
+ Select2.prototype._registerDataEvents = function () {
5258
+ var self = this;
5259
+
5260
+ this.dataAdapter.on('*', function (name, params) {
5261
+ self.trigger(name, params);
5262
+ });
5263
+ };
5264
+
5265
+ Select2.prototype._registerSelectionEvents = function () {
5266
+ var self = this;
5267
+ var nonRelayEvents = ['toggle', 'focus'];
5268
+
5269
+ this.selection.on('toggle', function () {
5270
+ self.toggleDropdown();
5271
+ });
5272
+
5273
+ this.selection.on('focus', function (params) {
5274
+ self.focus(params);
5275
+ });
5276
+
5277
+ this.selection.on('*', function (name, params) {
5278
+ if ($.inArray(name, nonRelayEvents) !== -1) {
5279
+ return;
5280
+ }
5281
+
5282
+ self.trigger(name, params);
5283
+ });
5284
+ };
5285
+
5286
+ Select2.prototype._registerDropdownEvents = function () {
5287
+ var self = this;
5288
+
5289
+ this.dropdown.on('*', function (name, params) {
5290
+ self.trigger(name, params);
5291
+ });
5292
+ };
5293
+
5294
+ Select2.prototype._registerResultsEvents = function () {
5295
+ var self = this;
5296
+
5297
+ this.results.on('*', function (name, params) {
5298
+ self.trigger(name, params);
5299
+ });
5300
+ };
5301
+
5302
+ Select2.prototype._registerEvents = function () {
5303
+ var self = this;
5304
+
5305
+ this.on('open', function () {
5306
+ self.$container.addClass('select2-container--open');
5307
+ });
5308
+
5309
+ this.on('close', function () {
5310
+ self.$container.removeClass('select2-container--open');
5311
+ });
5312
+
5313
+ this.on('enable', function () {
5314
+ self.$container.removeClass('select2-container--disabled');
5315
+ });
5316
+
5317
+ this.on('disable', function () {
5318
+ self.$container.addClass('select2-container--disabled');
5319
+ });
5320
+
5321
+ this.on('blur', function () {
5322
+ self.$container.removeClass('select2-container--focus');
5323
+ });
5324
+
5325
+ this.on('query', function (params) {
5326
+ if (!self.isOpen()) {
5327
+ self.trigger('open', {});
5328
+ }
5329
+
5330
+ this.dataAdapter.query(params, function (data) {
5331
+ self.trigger('results:all', {
5332
+ data: data,
5333
+ query: params
5334
+ });
5335
+ });
5336
+ });
5337
+
5338
+ this.on('query:append', function (params) {
5339
+ this.dataAdapter.query(params, function (data) {
5340
+ self.trigger('results:append', {
5341
+ data: data,
5342
+ query: params
5343
+ });
5344
+ });
5345
+ });
5346
+
5347
+ this.on('keypress', function (evt) {
5348
+ var key = evt.which;
5349
+
5350
+ if (self.isOpen()) {
5351
+ if (key === KEYS.ESC || key === KEYS.TAB ||
5352
+ (key === KEYS.UP && evt.altKey)) {
5353
+ self.close();
5354
+
5355
+ evt.preventDefault();
5356
+ } else if (key === KEYS.ENTER) {
5357
+ self.trigger('results:select', {});
5358
+
5359
+ evt.preventDefault();
5360
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5361
+ self.trigger('results:toggle', {});
5362
+
5363
+ evt.preventDefault();
5364
+ } else if (key === KEYS.UP) {
5365
+ self.trigger('results:previous', {});
5366
+
5367
+ evt.preventDefault();
5368
+ } else if (key === KEYS.DOWN) {
5369
+ self.trigger('results:next', {});
5370
+
5371
+ evt.preventDefault();
5372
+ }
5373
+ } else {
5374
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
5375
+ (key === KEYS.DOWN && evt.altKey)) {
5376
+ self.open();
5377
+
5378
+ evt.preventDefault();
5379
+ }
5380
+ }
5381
+ });
5382
+ };
5383
+
5384
+ Select2.prototype._syncAttributes = function () {
5385
+ this.options.set('disabled', this.$element.prop('disabled'));
5386
+
5387
+ if (this.options.get('disabled')) {
5388
+ if (this.isOpen()) {
5389
+ this.close();
5390
+ }
5391
+
5392
+ this.trigger('disable', {});
5393
+ } else {
5394
+ this.trigger('enable', {});
5395
+ }
5396
+ };
5397
+
5398
+ Select2.prototype._syncSubtree = function (evt, mutations) {
5399
+ var changed = false;
5400
+ var self = this;
5401
+
5402
+ // Ignore any mutation events raised for elements that aren't options or
5403
+ // optgroups. This handles the case when the select element is destroyed
5404
+ if (
5405
+ evt && evt.target && (
5406
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
5407
+ )
5408
+ ) {
5409
+ return;
5410
+ }
5411
+
5412
+ if (!mutations) {
5413
+ // If mutation events aren't supported, then we can only assume that the
5414
+ // change affected the selections
5415
+ changed = true;
5416
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
5417
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
5418
+ var node = mutations.addedNodes[n];
5419
+
5420
+ if (node.selected) {
5421
+ changed = true;
5422
+ }
5423
+ }
5424
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
5425
+ changed = true;
5426
+ }
5427
+
5428
+ // Only re-pull the data if we think there is a change
5429
+ if (changed) {
5430
+ this.dataAdapter.current(function (currentData) {
5431
+ self.trigger('selection:update', {
5432
+ data: currentData
5433
+ });
5434
+ });
5435
+ }
5436
+ };
5437
+
5438
+ /**
5439
+ * Override the trigger method to automatically trigger pre-events when
5440
+ * there are events that can be prevented.
5441
+ */
5442
+ Select2.prototype.trigger = function (name, args) {
5443
+ var actualTrigger = Select2.__super__.trigger;
5444
+ var preTriggerMap = {
5445
+ 'open': 'opening',
5446
+ 'close': 'closing',
5447
+ 'select': 'selecting',
5448
+ 'unselect': 'unselecting'
5449
+ };
5450
+
5451
+ if (args === undefined) {
5452
+ args = {};
5453
+ }
5454
+
5455
+ if (name in preTriggerMap) {
5456
+ var preTriggerName = preTriggerMap[name];
5457
+ var preTriggerArgs = {
5458
+ prevented: false,
5459
+ name: name,
5460
+ args: args
5461
+ };
5462
+
5463
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
5464
+
5465
+ if (preTriggerArgs.prevented) {
5466
+ args.prevented = true;
5467
+
5468
+ return;
5469
+ }
5470
+ }
5471
+
5472
+ actualTrigger.call(this, name, args);
5473
+ };
5474
+
5475
+ Select2.prototype.toggleDropdown = function () {
5476
+ if (this.options.get('disabled')) {
5477
+ return;
5478
+ }
5479
+
5480
+ if (this.isOpen()) {
5481
+ this.close();
5482
+ } else {
5483
+ this.open();
5484
+ }
5485
+ };
5486
+
5487
+ Select2.prototype.open = function () {
5488
+ if (this.isOpen()) {
5489
+ return;
5490
+ }
5491
+
5492
+ this.trigger('query', {});
5493
+ };
5494
+
5495
+ Select2.prototype.close = function () {
5496
+ if (!this.isOpen()) {
5497
+ return;
5498
+ }
5499
+
5500
+ this.trigger('close', {});
5501
+ };
5502
+
5503
+ Select2.prototype.isOpen = function () {
5504
+ return this.$container.hasClass('select2-container--open');
5505
+ };
5506
+
5507
+ Select2.prototype.hasFocus = function () {
5508
+ return this.$container.hasClass('select2-container--focus');
5509
+ };
5510
+
5511
+ Select2.prototype.focus = function (data) {
5512
+ // No need to re-trigger focus events if we are already focused
5513
+ if (this.hasFocus()) {
5514
+ return;
5515
+ }
5516
+
5517
+ this.$container.addClass('select2-container--focus');
5518
+ this.trigger('focus', {});
5519
+ };
5520
+
5521
+ Select2.prototype.enable = function (args) {
5522
+ if (this.options.get('debug') && window.console && console.warn) {
5523
+ console.warn(
5524
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
5525
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
5526
+ ' instead.'
5527
+ );
5528
+ }
5529
+
5530
+ if (args == null || args.length === 0) {
5531
+ args = [true];
5532
+ }
5533
+
5534
+ var disabled = !args[0];
5535
+
5536
+ this.$element.prop('disabled', disabled);
5537
+ };
5538
+
5539
+ Select2.prototype.data = function () {
5540
+ if (this.options.get('debug') &&
5541
+ arguments.length > 0 && window.console && console.warn) {
5542
+ console.warn(
5543
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
5544
+ 'should consider setting the value instead using `$element.val()`.'
5545
+ );
5546
+ }
5547
+
5548
+ var data = [];
5549
+
5550
+ this.dataAdapter.current(function (currentData) {
5551
+ data = currentData;
5552
+ });
5553
+
5554
+ return data;
5555
+ };
5556
+
5557
+ Select2.prototype.val = function (args) {
5558
+ if (this.options.get('debug') && window.console && console.warn) {
5559
+ console.warn(
5560
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
5561
+ ' removed in later Select2 versions. Use $element.val() instead.'
5562
+ );
5563
+ }
5564
+
5565
+ if (args == null || args.length === 0) {
5566
+ return this.$element.val();
5567
+ }
5568
+
5569
+ var newVal = args[0];
5570
+
5571
+ if ($.isArray(newVal)) {
5572
+ newVal = $.map(newVal, function (obj) {
5573
+ return obj.toString();
5574
+ });
5575
+ }
5576
+
5577
+ this.$element.val(newVal).trigger('change');
5578
+ };
5579
+
5580
+ Select2.prototype.destroy = function () {
5581
+ this.$container.remove();
5582
+
5583
+ if (this.$element[0].detachEvent) {
5584
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
5585
+ }
5586
+
5587
+ if (this._observer != null) {
5588
+ this._observer.disconnect();
5589
+ this._observer = null;
5590
+ } else if (this.$element[0].removeEventListener) {
5591
+ this.$element[0]
5592
+ .removeEventListener('DOMAttrModified', this._syncA, false);
5593
+ this.$element[0]
5594
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
5595
+ this.$element[0]
5596
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
5597
+ }
5598
+
5599
+ this._syncA = null;
5600
+ this._syncS = null;
5601
+
5602
+ this.$element.off('.select2');
5603
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5604
+
5605
+ this.$element.removeClass('select2-hidden-accessible');
5606
+ this.$element.attr('aria-hidden', 'false');
5607
+ this.$element.removeData('select2');
5608
+
5609
+ this.dataAdapter.destroy();
5610
+ this.selection.destroy();
5611
+ this.dropdown.destroy();
5612
+ this.results.destroy();
5613
+
5614
+ this.dataAdapter = null;
5615
+ this.selection = null;
5616
+ this.dropdown = null;
5617
+ this.results = null;
5618
+ };
5619
+
5620
+ Select2.prototype.render = function () {
5621
+ var $container = $(
5622
+ '<span class="select2 select2-container">' +
5623
+ '<span class="selection"></span>' +
5624
+ '<span class="dropdown-wrapper" aria-hidden="true"></span>' +
5625
+ '</span>'
5626
+ );
5627
+
5628
+ $container.attr('dir', this.options.get('dir'));
5629
+
5630
+ this.$container = $container;
5631
+
5632
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
5633
+
5634
+ $container.data('element', this.$element);
5635
+
5636
+ return $container;
5637
+ };
5638
+
5639
+ return Select2;
5640
+ });
5641
+
5642
+ S2.define('jquery-mousewheel',[
5643
+ 'jquery'
5644
+ ], function ($) {
5645
+ // Used to shim jQuery.mousewheel for non-full builds.
5646
+ return $;
5647
+ });
5648
+
5649
+ S2.define('jquery.select2',[
5650
+ 'jquery',
5651
+ 'jquery-mousewheel',
5652
+
5653
+ './select2/core',
5654
+ './select2/defaults'
5655
+ ], function ($, _, Select2, Defaults) {
5656
+ if ($.fn.select2 == null) {
5657
+ // All methods that should return the element
5658
+ var thisMethods = ['open', 'close', 'destroy'];
5659
+
5660
+ $.fn.select2 = function (options) {
5661
+ options = options || {};
5662
+
5663
+ if (typeof options === 'object') {
5664
+ this.each(function () {
5665
+ var instanceOptions = $.extend(true, {}, options);
5666
+
5667
+ var instance = new Select2($(this), instanceOptions);
5668
+ });
5669
+
5670
+ return this;
5671
+ } else if (typeof options === 'string') {
5672
+ var ret;
5673
+ var args = Array.prototype.slice.call(arguments, 1);
5674
+
5675
+ this.each(function () {
5676
+ var instance = $(this).data('select2');
5677
+
5678
+ if (instance == null && window.console && console.error) {
5679
+ console.error(
5680
+ 'The select2(\'' + options + '\') method was called on an ' +
5681
+ 'element that is not using Select2.'
5682
+ );
5683
+ }
5684
+
5685
+ ret = instance[options].apply(instance, args);
5686
+ });
5687
+
5688
+ // Check if we should be returning `this`
5689
+ if ($.inArray(options, thisMethods) > -1) {
5690
+ return this;
5691
+ }
5692
+
5693
+ return ret;
5694
+ } else {
5695
+ throw new Error('Invalid arguments for Select2: ' + options);
5696
+ }
5697
+ };
5698
+ }
5699
+
5700
+ if ($.fn.select2.defaults == null) {
5701
+ $.fn.select2.defaults = Defaults;
5702
+ }
5703
+
5704
+ return Select2;
5705
+ });
5706
+
5707
+ // Return the AMD loader configuration so it can be used outside of this file
5708
+ return {
5709
+ define: S2.define,
5710
+ require: S2.require
5711
+ };
5712
+ }());
5713
+
5714
+ // Autoload the jQuery bindings
5715
+ // We know that all of the modules exist above this, so we're safe
5716
+ var select2 = S2.require('jquery.select2');
5717
+
5718
+ // Hold the AMD module references on the jQuery function that was just loaded
5719
+ // This allows Select2 to use the internal loader outside of this file, such
5720
+ // as in the language files.
5721
+ jQuery.fn.select2.amd = S2;
5722
+
5723
+ // Return the Select2 instance for anyone who is importing it.
5724
+ return select2;
5725
+ }));
js/select2/js/select2.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
2
+ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
3
+ },e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
js/select2/select2-bootstrap.css DELETED
@@ -1,87 +0,0 @@
1
- .form-control .select2-choice {
2
- border: 0;
3
- border-radius: 2px;
4
- }
5
-
6
- .form-control .select2-choice .select2-arrow {
7
- border-radius: 0 2px 2px 0;
8
- }
9
-
10
- .form-control.select2-container {
11
- height: auto !important;
12
- padding: 0;
13
- }
14
-
15
- .form-control.select2-container.select2-dropdown-open {
16
- border-color: #5897FB;
17
- border-radius: 3px 3px 0 0;
18
- }
19
-
20
- .form-control .select2-container.select2-dropdown-open .select2-choices {
21
- border-radius: 3px 3px 0 0;
22
- }
23
-
24
- .form-control.select2-container .select2-choices {
25
- border: 0 !important;
26
- border-radius: 3px;
27
- }
28
-
29
- .control-group.warning .select2-container .select2-choice,
30
- .control-group.warning .select2-container .select2-choices,
31
- .control-group.warning .select2-container-active .select2-choice,
32
- .control-group.warning .select2-container-active .select2-choices,
33
- .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice,
34
- .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices,
35
- .control-group.warning .select2-container-multi.select2-container-active .select2-choices {
36
- border: 1px solid #C09853 !important;
37
- }
38
-
39
- .control-group.warning .select2-container .select2-choice div {
40
- border-left: 1px solid #C09853 !important;
41
- background: #FCF8E3 !important;
42
- }
43
-
44
- .control-group.error .select2-container .select2-choice,
45
- .control-group.error .select2-container .select2-choices,
46
- .control-group.error .select2-container-active .select2-choice,
47
- .control-group.error .select2-container-active .select2-choices,
48
- .control-group.error .select2-dropdown-open.select2-drop-above .select2-choice,
49
- .control-group.error .select2-dropdown-open.select2-drop-above .select2-choices,
50
- .control-group.error .select2-container-multi.select2-container-active .select2-choices {
51
- border: 1px solid #B94A48 !important;
52
- }
53
-
54
- .control-group.error .select2-container .select2-choice div {
55
- border-left: 1px solid #B94A48 !important;
56
- background: #F2DEDE !important;
57
- }
58
-
59
- .control-group.info .select2-container .select2-choice,
60
- .control-group.info .select2-container .select2-choices,
61
- .control-group.info .select2-container-active .select2-choice,
62
- .control-group.info .select2-container-active .select2-choices,
63
- .control-group.info .select2-dropdown-open.select2-drop-above .select2-choice,
64
- .control-group.info .select2-dropdown-open.select2-drop-above .select2-choices,
65
- .control-group.info .select2-container-multi.select2-container-active .select2-choices {
66
- border: 1px solid #3A87AD !important;
67
- }
68
-
69
- .control-group.info .select2-container .select2-choice div {
70
- border-left: 1px solid #3A87AD !important;
71
- background: #D9EDF7 !important;
72
- }
73
-
74
- .control-group.success .select2-container .select2-choice,
75
- .control-group.success .select2-container .select2-choices,
76
- .control-group.success .select2-container-active .select2-choice,
77
- .control-group.success .select2-container-active .select2-choices,
78
- .control-group.success .select2-dropdown-open.select2-drop-above .select2-choice,
79
- .control-group.success .select2-dropdown-open.select2-drop-above .select2-choices,
80
- .control-group.success .select2-container-multi.select2-container-active .select2-choices {
81
- border: 1px solid #468847 !important;
82
- }
83
-
84
- .control-group.success .select2-container .select2-choice div {
85
- border-left: 1px solid #468847 !important;
86
- background: #DFF0D8 !important;
87
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/select2/select2-spinner.gif DELETED
Binary file
js/select2/select2.css DELETED
@@ -1,704 +0,0 @@
1
- /*
2
- Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014
3
- */
4
- .select2-container {
5
- margin: 0;
6
- position: relative;
7
- display: inline-block;
8
- /* inline-block for ie7 */
9
- zoom: 1;
10
- *display: inline;
11
- vertical-align: middle;
12
- }
13
-
14
- .select2-container,
15
- .select2-drop,
16
- .select2-search,
17
- .select2-search input {
18
- /*
19
- Force border-box so that % widths fit the parent
20
- container without overlap because of margin/padding.
21
- More Info : http://www.quirksmode.org/css/box.html
22
- */
23
- -webkit-box-sizing: border-box; /* webkit */
24
- -moz-box-sizing: border-box; /* firefox */
25
- box-sizing: border-box; /* css3 */
26
- }
27
-
28
- .select2-container .select2-choice {
29
- display: block;
30
- height: 26px;
31
- padding: 0 0 0 8px;
32
- overflow: hidden;
33
- position: relative;
34
-
35
- border: 1px solid #aaa;
36
- white-space: nowrap;
37
- line-height: 26px;
38
- color: #444;
39
- text-decoration: none;
40
-
41
- border-radius: 4px;
42
-
43
- background-clip: padding-box;
44
-
45
- -webkit-touch-callout: none;
46
- -webkit-user-select: none;
47
- -moz-user-select: none;
48
- -ms-user-select: none;
49
- user-select: none;
50
-
51
- background-color: #fff;
52
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
53
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
54
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
55
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
56
- background-image: linear-gradient(to top, #eee 0%, #fff 50%);
57
- }
58
-
59
- html[dir="rtl"] .select2-container .select2-choice {
60
- padding: 0 8px 0 0;
61
- }
62
-
63
- .select2-container.select2-drop-above .select2-choice {
64
- border-bottom-color: #aaa;
65
-
66
- border-radius: 0 0 4px 4px;
67
-
68
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
69
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
70
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
71
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
72
- background-image: linear-gradient(to bottom, #eee 0%, #fff 90%);
73
- }
74
-
75
- .select2-container.select2-allowclear .select2-choice .select2-chosen {
76
- margin-right: 42px;
77
- }
78
-
79
- .select2-container .select2-choice > .select2-chosen {
80
- margin-right: 26px;
81
- display: block;
82
- overflow: hidden;
83
-
84
- white-space: nowrap;
85
-
86
- text-overflow: ellipsis;
87
- float: none;
88
- width: auto;
89
- }
90
-
91
- html[dir="rtl"] .select2-container .select2-choice > .select2-chosen {
92
- margin-left: 26px;
93
- margin-right: 0;
94
- }
95
-
96
- .select2-container .select2-choice abbr {
97
- display: none;
98
- width: 12px;
99
- height: 12px;
100
- position: absolute;
101
- right: 24px;
102
- top: 8px;
103
-
104
- font-size: 1px;
105
- text-decoration: none;
106
-
107
- border: 0;
108
- background: url('select2.png') right top no-repeat;
109
- cursor: pointer;
110
- outline: 0;
111
- }
112
-
113
- .select2-container.select2-allowclear .select2-choice abbr {
114
- display: inline-block;
115
- }
116
-
117
- .select2-container .select2-choice abbr:hover {
118
- background-position: right -11px;
119
- cursor: pointer;
120
- }
121
-
122
- .select2-drop-mask {
123
- border: 0;
124
- margin: 0;
125
- padding: 0;
126
- position: fixed;
127
- left: 0;
128
- top: 0;
129
- min-height: 100%;
130
- min-width: 100%;
131
- height: auto;
132
- width: auto;
133
- opacity: 0;
134
- z-index: 9998;
135
- /* styles required for IE to work */
136
- background-color: #fff;
137
- filter: alpha(opacity=0);
138
- }
139
-
140
- .select2-drop {
141
- width: 100%;
142
- margin-top: -1px;
143
- position: absolute;
144
- z-index: 99999999;
145
- top: 100%;
146
-
147
- background: #fff;
148
- color: #000;
149
- border: 1px solid #aaa;
150
- border-top: 0;
151
-
152
- border-radius: 0 0 4px 4px;
153
-
154
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
155
- box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
156
- }
157
-
158
- .select2-drop.select2-drop-above {
159
- margin-top: 1px;
160
- border-top: 1px solid #aaa;
161
- border-bottom: 0;
162
-
163
- border-radius: 4px 4px 0 0;
164
-
165
- -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
166
- box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
167
- }
168
-
169
- .select2-drop-active {
170
- border: 1px solid #5897fb;
171
- border-top: none;
172
- }
173
-
174
- .select2-drop.select2-drop-above.select2-drop-active {
175
- border-top: 1px solid #5897fb;
176
- }
177
-
178
- .select2-drop-auto-width {
179
- border-top: 1px solid #aaa;
180
- width: auto;
181
- }
182
-
183
- .select2-drop-auto-width .select2-search {
184
- padding-top: 4px;
185
- }
186
-
187
- .select2-container .select2-choice .select2-arrow {
188
- display: inline-block;
189
- width: 18px;
190
- height: 100%;
191
- position: absolute;
192
- right: 0;
193
- top: 0;
194
-
195
- border-left: 1px solid #aaa;
196
- border-radius: 0 4px 4px 0;
197
-
198
- background-clip: padding-box;
199
-
200
- background: #ccc;
201
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
202
- background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
203
- background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
204
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
205
- background-image: linear-gradient(to top, #ccc 0%, #eee 60%);
206
- }
207
-
208
- html[dir="rtl"] .select2-container .select2-choice .select2-arrow {
209
- left: 0;
210
- right: auto;
211
-
212
- border-left: none;
213
- border-right: 1px solid #aaa;
214
- border-radius: 4px 0 0 4px;
215
- }
216
-
217
- .select2-container .select2-choice .select2-arrow b {
218
- display: block;
219
- width: 100%;
220
- height: 100%;
221
- background: url('select2.png') no-repeat 0 1px;
222
- }
223
-
224
- html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
225
- background-position: 2px 1px;
226
- }
227
-
228
- .select2-search {
229
- display: inline-block;
230
- width: 100%;
231
- min-height: 26px;
232
- margin: 0;
233
- padding-left: 4px;
234
- padding-right: 4px;
235
-
236
- position: relative;
237
- z-index: 10000;
238
-
239
- white-space: nowrap;
240
- }
241
-
242
- .select2-search input {
243
- width: 100%;
244
- height: auto !important;
245
- min-height: 26px;
246
- padding: 4px 20px 4px 5px;
247
- margin: 0;
248
-
249
- outline: 0;
250
- font-family: sans-serif;
251
- font-size: 1em;
252
-
253
- border: 1px solid #aaa;
254
- border-radius: 0;
255
-
256
- -webkit-box-shadow: none;
257
- box-shadow: none;
258
-
259
- background: #fff url('select2.png') no-repeat 100% -22px;
260
- background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
261
- background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
262
- background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
263
- background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
264
- }
265
-
266
- html[dir="rtl"] .select2-search input {
267
- padding: 4px 5px 4px 20px;
268
-
269
- background: #fff url('select2.png') no-repeat -37px -22px;
270
- background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
271
- background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
272
- background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
273
- background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
274
- }
275
-
276
- .select2-drop.select2-drop-above .select2-search input {
277
- margin-top: 4px;
278
- }
279
-
280
- .select2-search input.select2-active {
281
- background: #fff url('select2-spinner.gif') no-repeat 100%;
282
- background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
283
- background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
284
- background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
285
- background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
286
- }
287
-
288
- .select2-container-active .select2-choice,
289
- .select2-container-active .select2-choices {
290
- border: 1px solid #5897fb;
291
- outline: none;
292
-
293
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
294
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
295
- }
296
-
297
- .select2-dropdown-open .select2-choice {
298
- border-bottom-color: transparent;
299
- -webkit-box-shadow: 0 1px 0 #fff inset;
300
- box-shadow: 0 1px 0 #fff inset;
301
-
302
- border-bottom-left-radius: 0;
303
- border-bottom-right-radius: 0;
304
-
305
- background-color: #eee;
306
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
307
- background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
308
- background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
309
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
310
- background-image: linear-gradient(to top, #fff 0%, #eee 50%);
311
- }
312
-
313
- .select2-dropdown-open.select2-drop-above .select2-choice,
314
- .select2-dropdown-open.select2-drop-above .select2-choices {
315
- border: 1px solid #5897fb;
316
- border-top-color: transparent;
317
-
318
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
319
- background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
320
- background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
321
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
322
- background-image: linear-gradient(to bottom, #fff 0%, #eee 50%);
323
- }
324
-
325
- .select2-dropdown-open .select2-choice .select2-arrow {
326
- background: transparent;
327
- border-left: none;
328
- filter: none;
329
- }
330
- html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {
331
- border-right: none;
332
- }
333
-
334
- .select2-dropdown-open .select2-choice .select2-arrow b {
335
- background-position: -18px 1px;
336
- }
337
-
338
- html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b {
339
- background-position: -16px 1px;
340
- }
341
-
342
- .select2-hidden-accessible {
343
- border: 0;
344
- clip: rect(0 0 0 0);
345
- height: 1px;
346
- margin: -1px;
347
- overflow: hidden;
348
- padding: 0;
349
- position: absolute;
350
- width: 1px;
351
- }
352
-
353
- /* results */
354
- .select2-results {
355
- max-height: 200px;
356
- padding: 0 0 0 4px;
357
- margin: 4px 4px 4px 0;
358
- position: relative;
359
- overflow-x: hidden;
360
- overflow-y: auto;
361
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
362
- }
363
-
364
- html[dir="rtl"] .select2-results {
365
- padding: 0 4px 0 0;
366
- margin: 4px 0 4px 4px;
367
- }
368
-
369
- .select2-results ul.select2-result-sub {
370
- margin: 0;
371
- padding-left: 0;
372
- }
373
-
374
- .select2-results li {
375
- list-style: none;
376
- display: list-item;
377
- background-image: none;
378
- }
379
-
380
- .select2-results li.select2-result-with-children > .select2-result-label {
381
- font-weight: bold;
382
- }
383
-
384
- .select2-results .select2-result-label {
385
- padding: 3px 7px 4px;
386
- margin: 0;
387
- cursor: pointer;
388
-
389
- min-height: 1em;
390
-
391
- -webkit-touch-callout: none;
392
- -webkit-user-select: none;
393
- -moz-user-select: none;
394
- -ms-user-select: none;
395
- user-select: none;
396
- }
397
-
398
- .select2-results-dept-1 .select2-result-label { padding-left: 20px }
399
- .select2-results-dept-2 .select2-result-label { padding-left: 40px }
400
- .select2-results-dept-3 .select2-result-label { padding-left: 60px }
401
- .select2-results-dept-4 .select2-result-label { padding-left: 80px }
402
- .select2-results-dept-5 .select2-result-label { padding-left: 100px }
403
- .select2-results-dept-6 .select2-result-label { padding-left: 110px }
404
- .select2-results-dept-7 .select2-result-label { padding-left: 120px }
405
-
406
- .select2-results .select2-highlighted {
407
- background: #3875d7;
408
- color: #fff;
409
- }
410
-
411
- .select2-results li em {
412
- background: #feffde;
413
- font-style: normal;
414
- }
415
-
416
- .select2-results .select2-highlighted em {
417
- background: transparent;
418
- }
419
-
420
- .select2-results .select2-highlighted ul {
421
- background: #fff;
422
- color: #000;
423
- }
424
-
425
- .select2-results .select2-no-results,
426
- .select2-results .select2-searching,
427
- .select2-results .select2-ajax-error,
428
- .select2-results .select2-selection-limit {
429
- background: #f4f4f4;
430
- display: list-item;
431
- padding-left: 5px;
432
- }
433
-
434
- /*
435
- disabled look for disabled choices in the results dropdown
436
- */
437
- .select2-results .select2-disabled.select2-highlighted {
438
- color: #666;
439
- background: #f4f4f4;
440
- display: list-item;
441
- cursor: default;
442
- }
443
- .select2-results .select2-disabled {
444
- background: #f4f4f4;
445
- display: list-item;
446
- cursor: default;
447
- }
448
-
449
- .select2-results .select2-selected {
450
- display: none;
451
- }
452
-
453
- .select2-more-results.select2-active {
454
- background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
455
- }
456
-
457
- .select2-results .select2-ajax-error {
458
- background: rgba(255, 50, 50, .2);
459
- }
460
-
461
- .select2-more-results {
462
- background: #f4f4f4;
463
- display: list-item;
464
- }
465
-
466
- /* disabled styles */
467
-
468
- .select2-container.select2-container-disabled .select2-choice {
469
- background-color: #f4f4f4;
470
- background-image: none;
471
- border: 1px solid #ddd;
472
- cursor: default;
473
- }
474
-
475
- .select2-container.select2-container-disabled .select2-choice .select2-arrow {
476
- background-color: #f4f4f4;
477
- background-image: none;
478
- border-left: 0;
479
- }
480
-
481
- .select2-container.select2-container-disabled .select2-choice abbr {
482
- display: none;
483
- }
484
-
485
-
486
- /* multiselect */
487
-
488
- .select2-container-multi .select2-choices {
489
- height: auto !important;
490
- height: 1%;
491
- margin: 0;
492
- padding: 0 5px 0 0;
493
- position: relative;
494
-
495
- border: 1px solid #aaa;
496
- cursor: text;
497
- overflow: hidden;
498
-
499
- background-color: #fff;
500
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
501
- background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
502
- background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
503
- background-image: linear-gradient(to bottom, #eee 1%, #fff 15%);
504
- }
505
-
506
- html[dir="rtl"] .select2-container-multi .select2-choices {
507
- padding: 0 0 0 5px;
508
- }
509
-
510
- .select2-locked {
511
- padding: 3px 5px 3px 5px !important;
512
- }
513
-
514
- .select2-container-multi .select2-choices {
515
- min-height: 26px;
516
- }
517
-
518
- .select2-container-multi.select2-container-active .select2-choices {
519
- border: 1px solid #5897fb;
520
- outline: none;
521
-
522
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
523
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
524
- }
525
- .select2-container-multi .select2-choices li {
526
- float: left;
527
- list-style: none;
528
- }
529
- html[dir="rtl"] .select2-container-multi .select2-choices li
530
- {
531
- float: right;
532
- }
533
- .select2-container-multi .select2-choices .select2-search-field {
534
- margin: 0;
535
- padding: 0;
536
- white-space: nowrap;
537
- }
538
-
539
- .select2-container-multi .select2-choices .select2-search-field input {
540
- padding: 5px;
541
- margin: 1px 0;
542
-
543
- font-family: sans-serif;
544
- font-size: 100%;
545
- color: #666;
546
- outline: 0;
547
- border: 0;
548
- -webkit-box-shadow: none;
549
- box-shadow: none;
550
- background: transparent !important;
551
- }
552
-
553
- .select2-container-multi .select2-choices .select2-search-field input.select2-active {
554
- background: #fff url('select2-spinner.gif') no-repeat 100% !important;
555
- }
556
-
557
- .select2-default {
558
- color: #999 !important;
559
- }
560
-
561
- .select2-container-multi .select2-choices .select2-search-choice {
562
- padding: 3px 5px 3px 18px;
563
- margin: 3px 0 3px 5px;
564
- position: relative;
565
-
566
- line-height: 13px;
567
- color: #333;
568
- cursor: default;
569
- border: 1px solid #aaaaaa;
570
-
571
- border-radius: 3px;
572
-
573
- -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
574
- box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
575
-
576
- background-clip: padding-box;
577
-
578
- -webkit-touch-callout: none;
579
- -webkit-user-select: none;
580
- -moz-user-select: none;
581
- -ms-user-select: none;
582
- user-select: none;
583
-
584
- background-color: #e4e4e4;
585
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
586
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
587
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
588
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
589
- background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
590
- }
591
- html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
592
- {
593
- margin: 3px 5px 3px 0;
594
- padding: 3px 18px 3px 5px;
595
- }
596
- .select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
597
- cursor: default;
598
- }
599
- .select2-container-multi .select2