Jupiter X Core - Version 1.7.0

Version Description

  • Initial release
Download this release

Release Info

Developer artbees
Plugin Icon wp plugin Jupiter X Core
Version 1.7.0
Comparing to
See all releases

Version 1.7.0

Files changed (87) hide show
  1. assets/images/warning-badge.svg +1 -0
  2. includes/compiler/class-compiler.php +1019 -0
  3. includes/compiler/functions.php +411 -0
  4. includes/compiler/preprocess-aliases.ini +277 -0
  5. includes/compiler/vendors/js-minifier.php +396 -0
  6. includes/compiler/vendors/lessc.php +3694 -0
  7. includes/control-panel/class-image-sizes.php +95 -0
  8. includes/control-panel/class-settings.php +120 -0
  9. includes/control-panel/functions.php +112 -0
  10. includes/control-panel/includes/class-filesystem.php +613 -0
  11. includes/control-panel/includes/class-helpers.php +492 -0
  12. includes/control-panel/install-template.php +1852 -0
  13. includes/control-panel/views/image-sizes.php +64 -0
  14. includes/control-panel/views/install-templates.php +73 -0
  15. includes/control-panel/views/settings.php +83 -0
  16. includes/customizer/functions.php +15 -0
  17. includes/customizer/vendors/kirki/LICENSE +21 -0
  18. includes/customizer/vendors/kirki/assets/css/kirki-styles.css +0 -0
  19. includes/customizer/vendors/kirki/assets/images/1c.png +0 -0
  20. includes/customizer/vendors/kirki/assets/images/2cl.png +0 -0
  21. includes/customizer/vendors/kirki/assets/images/2cr.png +0 -0
  22. includes/customizer/vendors/kirki/assets/images/3cl.png +0 -0
  23. includes/customizer/vendors/kirki/assets/images/3cm.png +0 -0
  24. includes/customizer/vendors/kirki/assets/images/3cr.png +0 -0
  25. includes/customizer/vendors/kirki/assets/images/jquery.fs.stepper-arrows.png +0 -0
  26. includes/customizer/vendors/kirki/assets/images/kirki-bottom.png +0 -0
  27. includes/customizer/vendors/kirki/assets/images/kirki-bottom.svg +91 -0
  28. includes/customizer/vendors/kirki/assets/images/kirki-logo.svg +48 -0
  29. includes/customizer/vendors/kirki/assets/vendor/fontawesome/fontawesome.json +8315 -0
  30. includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/select2.css +484 -0
  31. includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/select2.min.css +1 -0
  32. includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/selectWoo.css +484 -0
  33. includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/selectWoo.min.css +1 -0
  34. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ar.js +3 -0
  35. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/az.js +3 -0
  36. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/bg.js +3 -0
  37. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ca.js +3 -0
  38. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/cs.js +3 -0
  39. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/da.js +3 -0
  40. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/de.js +3 -0
  41. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/el.js +3 -0
  42. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/en.js +3 -0
  43. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/es.js +3 -0
  44. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/et.js +3 -0
  45. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/eu.js +3 -0
  46. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fa.js +3 -0
  47. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fi.js +3 -0
  48. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fr.js +3 -0
  49. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/gl.js +3 -0
  50. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/he.js +3 -0
  51. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hi.js +3 -0
  52. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hr.js +3 -0
  53. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hu.js +3 -0
  54. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hy.js +3 -0
  55. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/id.js +3 -0
  56. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/is.js +3 -0
  57. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/it.js +3 -0
  58. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ja.js +3 -0
  59. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/km.js +3 -0
  60. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ko.js +3 -0
  61. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/lt.js +3 -0
  62. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/lv.js +3 -0
  63. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/mk.js +3 -0
  64. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ms.js +3 -0
  65. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/nb.js +3 -0
  66. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/nl.js +3 -0
  67. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pl.js +3 -0
  68. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pt-BR.js +3 -0
  69. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pt.js +3 -0
  70. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ro.js +3 -0
  71. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ru.js +3 -0
  72. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sk.js +3 -0
  73. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sl.js +3 -0
  74. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sr-Cyrl.js +3 -0
  75. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sr.js +3 -0
  76. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sv.js +3 -0
  77. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/th.js +3 -0
  78. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/tr.js +3 -0
  79. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/uk.js +3 -0
  80. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/vi.js +3 -0
  81. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/zh-CN.js +3 -0
  82. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/zh-TW.js +3 -0
  83. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.full.js +6553 -0
  84. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.full.min.js +1 -0
  85. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.js +5842 -0
  86. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.min.js +1 -0
  87. includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/selectWoo.full.js +1677 -0
assets/images/warning-badge.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><circle cx="16" cy="16" r="16" fill="#da3749"/><path d="M17.5 8h-3v10h3V8zM16 20c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" fill="#fff"/></svg>
includes/compiler/class-compiler.php ADDED
@@ -0,0 +1,1019 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This class compiles and minifies CSS, LESS and JS.
4
+ *
5
+ * @package JupiterX\Framework\API\Compiler
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+
10
+ /**
11
+ * Compiles and minifies CSS, LESS and JS.
12
+ *
13
+ * @since 1.0.0
14
+ * @ignore
15
+ * @access private
16
+ *
17
+ * @package JupiterX\Framework\API\Compiler
18
+ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
19
+ * @SuppressWarnings(PHPMD.ExcessiveClassLength)
20
+ */
21
+ final class _JupiterX_Compiler {
22
+
23
+ /**
24
+ * Compiler's runtime configuration parameters.
25
+ *
26
+ * @var array
27
+ */
28
+ private $config;
29
+
30
+ /**
31
+ * Cache dir.
32
+ *
33
+ * @var string
34
+ */
35
+ private $dir;
36
+
37
+ /**
38
+ * Cache url.
39
+ *
40
+ * @var string
41
+ */
42
+ private $url;
43
+
44
+ /**
45
+ * The fragment currently being processed.
46
+ *
47
+ * @var string
48
+ */
49
+ private $current_fragment;
50
+
51
+ /**
52
+ * The compiled content.
53
+ *
54
+ * @var string
55
+ */
56
+ private $compiled_content;
57
+
58
+ /**
59
+ * Compiled content's filename.
60
+ *
61
+ * @var string
62
+ */
63
+ private $filename;
64
+
65
+ /**
66
+ * Create a new Compiler.
67
+ *
68
+ * @since 1.0.0
69
+ *
70
+ * @param array $config Runtime configuration parameters for the Compiler.
71
+ */
72
+ public function __construct( array $config ) {
73
+ $this->config = $this->init_config( $config );
74
+ $this->dir = jupiterx_get_compiler_dir( is_admin() ) . $this->config['id'];
75
+ $this->url = jupiterx_get_compiler_url( is_admin() ) . $this->config['id'];
76
+ }
77
+
78
+ /**
79
+ * Run the compiler.
80
+ *
81
+ * @since 1.0.0
82
+ *
83
+ * @return void
84
+ */
85
+ public function run_compiler() {
86
+ // Modify the WP Filesystem method.
87
+ add_filter( 'filesystem_method', array( $this, 'modify_filesystem_method' ) );
88
+
89
+ $this->set_fragments();
90
+ $this->set_filename();
91
+
92
+ if ( ! $this->cache_file_exist() ) {
93
+ $this->filesystem();
94
+ $this->maybe_make_dir();
95
+ $this->combine_fragments();
96
+ $this->cache_file();
97
+ }
98
+
99
+ if ( $this->config['enqueue'] ) {
100
+ $this->enqueue_file();
101
+ }
102
+
103
+ // Keep it safe and reset the WP Filesystem method.
104
+ remove_filter( 'filesystem_method', array( $this, 'modify_filesystem_method' ) );
105
+ }
106
+
107
+ /**
108
+ * Callback to set the WP Filesystem method.
109
+ *
110
+ * @since 1.0.0
111
+ *
112
+ * @return string
113
+ */
114
+ public function modify_filesystem_method() {
115
+ return 'direct';
116
+ }
117
+
118
+ /**
119
+ * Initialise the WP Filesystem.
120
+ *
121
+ * @since 1.0.0
122
+ *
123
+ * @return bool|void
124
+ */
125
+ public function filesystem() {
126
+
127
+ // If the WP_Filesystem is not already loaded, load it.
128
+ if ( ! function_exists( 'WP_Filesystem' ) ) {
129
+ require_once ABSPATH . '/wp-admin/includes/file.php';
130
+ }
131
+
132
+ // If the WP_Filesystem is not initialized or is not set to WP_Filesystem_Direct, then initialize it.
133
+ if ( $this->is_wp_filesystem_direct() ) {
134
+ return true;
135
+ }
136
+
137
+ // Initialize the filesystem.
138
+ $response = WP_Filesystem();
139
+
140
+ // If the filesystem did not initialize, then generate a report and exit.
141
+ if ( true !== $response || ! $this->is_wp_filesystem_direct() ) {
142
+ return $this->kill();
143
+ }
144
+
145
+ return true;
146
+ }
147
+
148
+ /**
149
+ * Check if the filesystem is set to "direct".
150
+ *
151
+ * @since 1.0.0
152
+ *
153
+ * @return bool
154
+ */
155
+ private function is_wp_filesystem_direct() {
156
+ return isset( $GLOBALS['wp_filesystem'] ) && is_a( $GLOBALS['wp_filesystem'], 'WP_Filesystem_Direct' );
157
+ }
158
+
159
+ /**
160
+ * Make directory.
161
+ *
162
+ * @since 1.0.0
163
+ *
164
+ * @return bool
165
+ */
166
+ private function maybe_make_dir() {
167
+
168
+ if ( ! @is_dir( $this->dir ) ) { // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- This is a valid use case.
169
+ wp_mkdir_p( $this->dir );
170
+ }
171
+
172
+ return is_writable( $this->dir );
173
+ }
174
+
175
+ /**
176
+ * Set class fragments.
177
+ *
178
+ * @since 1.0.0
179
+ *
180
+ * @return void
181
+ */
182
+ public function set_fragments() {
183
+ global $_jupiterx_compiler_added_fragments;
184
+
185
+ $added_fragments = jupiterx_get( $this->config['id'], $_jupiterx_compiler_added_fragments[ $this->config['format'] ] );
186
+
187
+ if ( $added_fragments ) {
188
+ $this->config['fragments'] = array_merge( $this->config['fragments'], $added_fragments );
189
+ }
190
+
191
+ /**
192
+ * Filter the compiler fragment files.
193
+ *
194
+ * The dynamic portion of the hook name, $this->config['id'], refers to the compiler id used as a reference.
195
+ *
196
+ * @since 1.0.0
197
+ *
198
+ * @param array $fragments An array of fragment files.
199
+ */
200
+ $this->config['fragments'] = apply_filters( 'jupiterx_compiler_fragments_' . $this->config['id'], $this->config['fragments'] );
201
+ }
202
+
203
+ /**
204
+ * Set the filename for the compiled asset.
205
+ *
206
+ * @since 1.0.0
207
+ *
208
+ * @return void
209
+ */
210
+ public function set_filename() {
211
+ $hash = $this->hash( $this->config );
212
+
213
+ if ( empty( _jupiterx_get_cache_busting() ) ) {
214
+ $this->config['version'] = $hash;
215
+
216
+ $hash = 'style';
217
+
218
+ if ( 'script' === $this->config['type'] ) {
219
+ $hash = 'script';
220
+ }
221
+ }
222
+
223
+ $this->filename = $hash . '.' . $this->get_extension();
224
+ }
225
+
226
+ /**
227
+ * Hash the given array.
228
+ *
229
+ * @since 1.0.0
230
+ *
231
+ * @param array $given_array Given array to be hashed.
232
+ *
233
+ * @return string
234
+ */
235
+ public function hash( array $given_array ) {
236
+ return substr( md5( @serialize( $given_array ) ), 0, 7 ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- Valid use case.
237
+ }
238
+
239
+ /**
240
+ * Checks if the file exists on the filesystem, meaning it's been cached.
241
+ *
242
+ * @since 1.0.0
243
+ *
244
+ * @return bool
245
+ */
246
+ public function cache_file_exist() {
247
+ $filename = $this->get_filename();
248
+
249
+ if ( ( _jupiterx_is_compiler_dev_mode() ) || is_preview() ) {
250
+ return false;
251
+ }
252
+
253
+ if ( empty( $filename ) ) {
254
+ return false;
255
+ }
256
+
257
+ return file_exists( $filename );
258
+ }
259
+
260
+ /**
261
+ * Get the absolute path of the cached and compiled file.
262
+ *
263
+ * @since 1.0.0
264
+ *
265
+ * @return string
266
+ */
267
+ public function get_filename() {
268
+ if ( isset( $this->filename ) ) {
269
+ return $this->dir . '/' . $this->filename;
270
+ }
271
+
272
+ return '';
273
+ }
274
+
275
+ /**
276
+ * Create cached file.
277
+ *
278
+ * @since 1.0.0
279
+ *
280
+ * @return bool
281
+ */
282
+ public function cache_file() {
283
+ $filename = $this->get_filename();
284
+
285
+ if ( empty( $filename ) ) {
286
+ return false;
287
+ }
288
+
289
+ // It is safe to access the filesystem because we made sure it was set.
290
+ return $GLOBALS['wp_filesystem']->put_contents( $filename, $this->compiled_content, FS_CHMOD_FILE );
291
+ }
292
+
293
+ /**
294
+ * Enqueue cached file.
295
+ *
296
+ * @since 1.0.0
297
+ *
298
+ * @return void|bool
299
+ */
300
+ private function enqueue_file() {
301
+
302
+ // Enqueue CSS file.
303
+ if ( 'style' === $this->config['type'] ) {
304
+ return wp_enqueue_style(
305
+ $this->config['id'],
306
+ $this->get_url(),
307
+ $this->config['dependencies'],
308
+ $this->config['version']
309
+ );
310
+ }
311
+
312
+ // Enqueue JS file.
313
+ if ( 'script' === $this->config['type'] ) {
314
+ return wp_enqueue_script(
315
+ $this->config['id'],
316
+ $this->get_url(),
317
+ $this->config['dependencies'],
318
+ $this->config['version'],
319
+ $this->config['in_footer']
320
+ );
321
+ }
322
+
323
+ return false;
324
+ }
325
+
326
+ /**
327
+ * Get cached file url.
328
+ *
329
+ * @since 1.0.0
330
+ *
331
+ * @return string
332
+ */
333
+ public function get_url() {
334
+ $url = trailingslashit( $this->url ) . $this->filename;
335
+
336
+ if ( is_ssl() ) {
337
+ $url = str_replace( 'http://', 'https://', $url );
338
+ }
339
+
340
+ return $url;
341
+ }
342
+
343
+ /**
344
+ * Get the file extension from the configured "type".
345
+ *
346
+ * @since 1.0.0
347
+ *
348
+ * @return string|null
349
+ */
350
+ public function get_extension() {
351
+
352
+ if ( 'style' === $this->config['type'] ) {
353
+ return 'css';
354
+ }
355
+
356
+ if ( 'script' === $this->config['type'] ) {
357
+ return 'js';
358
+ }
359
+ }
360
+
361
+ /**
362
+ * Combine content of the fragments.
363
+ *
364
+ * @since 1.0.0
365
+ *
366
+ * @return void
367
+ */
368
+ public function combine_fragments() {
369
+ $content = '';
370
+
371
+ // Loop through fragments.
372
+ foreach ( $this->config['fragments'] as $fragment ) {
373
+
374
+ // Stop here if the fragment is empty.
375
+ if ( empty( $fragment ) ) {
376
+ continue;
377
+ }
378
+
379
+ $fragment_content = $this->get_content( $fragment );
380
+
381
+ // Stop here if no content or content is an html page.
382
+ if ( ! $fragment_content || preg_match( '#^\s*\<#', $fragment_content ) ) {
383
+ continue;
384
+ }
385
+
386
+ // Continue processing style.
387
+ if ( 'style' === $this->config['type'] ) {
388
+ $fragment_content = $this->replace_css_url( $fragment_content );
389
+ $fragment_content = $this->add_content_media_query( $fragment_content );
390
+ }
391
+
392
+ // If there's content, start a new line.
393
+ if ( $content ) {
394
+ $content .= "\n\n";
395
+ }
396
+
397
+ $content .= $fragment_content;
398
+ }
399
+
400
+ $this->compiled_content = ! empty( $content ) ? $this->format_content( $content ) : '';
401
+ }
402
+
403
+ /**
404
+ * Get the fragment's content.
405
+ *
406
+ * @since 1.0.0
407
+ *
408
+ * @param string|callable $fragment The given fragment from which to get the content.
409
+ *
410
+ * @return bool|string
411
+ */
412
+ private function get_content( $fragment ) {
413
+ // Set the current fragment used by other functions.
414
+ $this->current_fragment = $fragment;
415
+
416
+ // If the fragment is callable, call it to get the content.
417
+ if ( $this->is_function( $fragment ) ) {
418
+ return $this->get_function_content();
419
+ }
420
+
421
+ $content = $this->get_internal_content();
422
+
423
+ // Try remote content if the internal content returned false.
424
+ if ( empty( $content ) ) {
425
+ $content = $this->get_remote_content();
426
+ }
427
+
428
+ return $content;
429
+ }
430
+
431
+ /**
432
+ * Get internal file content.
433
+ *
434
+ * @since 1.0.0
435
+ *
436
+ * @return string|bool
437
+ */
438
+ public function get_internal_content() {
439
+ $fragment = $this->current_fragment;
440
+
441
+ if ( ! file_exists( $fragment ) ) {
442
+
443
+ // Replace URL with path.
444
+ $fragment = jupiterx_url_to_path( $fragment );
445
+
446
+ // Stop here if it isn't a valid file.
447
+ if ( ! file_exists( $fragment ) || 0 === @filesize( $fragment ) ) { // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
448
+ return false;
449
+ }
450
+ }
451
+
452
+ // It is safe to access the filesystem because we made sure it was set.
453
+ return $GLOBALS['wp_filesystem']->get_contents( $fragment );
454
+ }
455
+
456
+ /**
457
+ * Get external file content.
458
+ *
459
+ * @since 1.0.0
460
+ *
461
+ * @return string|bool
462
+ */
463
+ public function get_remote_content() {
464
+ $fragment = $this->current_fragment;
465
+
466
+ if ( empty( $fragment ) ) {
467
+ return false;
468
+ }
469
+
470
+ // For a relative URL, add http: to it.
471
+ if ( substr( $fragment, 0, 2 ) === '//' ) {
472
+ $fragment = 'http:' . $fragment;
473
+ } elseif ( substr( $fragment, 0, 1 ) === '/' ) { // Add domain if it is local but could not be fetched as a file.
474
+ $fragment = site_url( $fragment );
475
+ }
476
+
477
+ $request = wp_remote_get( $fragment );
478
+
479
+ if ( is_wp_error( $request ) ) {
480
+ return '';
481
+ }
482
+
483
+ // If no content was received and the URL is not https, then convert the URL to SSL and retry.
484
+ if (
485
+ ( ! isset( $request['body'] ) || 200 !== $request['response']['code'] ) &&
486
+ ( substr( $fragment, 0, 8 ) !== 'https://' )
487
+ ) {
488
+ $fragment = str_replace( 'http://', 'https://', $fragment );
489
+ $request = wp_remote_get( $fragment );
490
+
491
+ if ( is_wp_error( $request ) ) {
492
+ return '';
493
+ }
494
+ }
495
+
496
+ if ( ( ! isset( $request['body'] ) || 200 !== $request['response']['code'] ) ) {
497
+ return false;
498
+ }
499
+
500
+ return wp_remote_retrieve_body( $request );
501
+ }
502
+
503
+ /**
504
+ * Get function content.
505
+ *
506
+ * @since 1.0.0
507
+ *
508
+ * @return string|bool
509
+ */
510
+ public function get_function_content() {
511
+
512
+ if ( ! is_callable( $this->current_fragment ) ) {
513
+ return false;
514
+ }
515
+
516
+ return call_user_func( $this->current_fragment );
517
+ }
518
+
519
+ /**
520
+ * Wrap content in query.
521
+ *
522
+ * @since 1.0.0
523
+ *
524
+ * @param string $content Given content to process.
525
+ *
526
+ * @return string
527
+ */
528
+ public function add_content_media_query( $content ) {
529
+
530
+ // Ignore if the fragment is a function.
531
+ if ( $this->is_function( $this->current_fragment ) ) {
532
+ return $content;
533
+ }
534
+
535
+ $query = wp_parse_url( $this->current_fragment, PHP_URL_QUERY );
536
+
537
+ // Bail out if there are no query args or no media query.
538
+ if ( empty( $query ) || false === stripos( $query, 'jupiterx_compiler_media_query' ) ) {
539
+ return $content;
540
+ }
541
+
542
+ // Wrap the content in the query.
543
+ return sprintf(
544
+ "@media %s {\n%s\n}\n",
545
+ jupiterx_get( 'jupiterx_compiler_media_query', wp_parse_args( $query ) ),
546
+ $content
547
+ );
548
+ }
549
+
550
+ /**
551
+ * Format CSS, LESS and JS content.
552
+ *
553
+ * @since 1.0.0
554
+ *
555
+ * @param string $content Given content to process.
556
+ *
557
+ * @return string
558
+ */
559
+ public function format_content( $content ) {
560
+
561
+ if ( 'style' === $this->config['type'] ) {
562
+
563
+ if ( 'less' === $this->config['format'] ) {
564
+
565
+ if ( ! class_exists( 'JupiterX_Lessc' ) ) {
566
+ jupiterx_core()->load_files( [ 'compiler/vendors/lessc' ] );
567
+ }
568
+
569
+ $parser = new JupiterX_Lessc();
570
+
571
+ $parser = $this->register_less_functions( $parser );
572
+
573
+ $parser->setVariables( $this->config['variables'] );
574
+
575
+ $content = $parser->compile( $content );
576
+ }
577
+
578
+ if ( ! function_exists( 'jupiterx_parse_css' ) ) {
579
+ return $content;
580
+ }
581
+
582
+ $content = jupiterx_parse_css( $content );
583
+
584
+ if ( ! _jupiterx_is_compiler_dev_mode() ) {
585
+ $content = $this->minify_style( $content );
586
+ }
587
+
588
+ return $content;
589
+ }
590
+
591
+ if ( 'script' === $this->config['type'] && ! _jupiterx_is_compiler_dev_mode() && $this->config['minify_js'] ) {
592
+
593
+ if ( ! class_exists( 'JSMin' ) ) {
594
+ jupiterx_core()->load_files( [ 'compiler/vendors/js-minifier' ] );
595
+ }
596
+
597
+ $js_min = new JSMin( $content );
598
+ return $js_min->min();
599
+ }
600
+
601
+ return $content;
602
+ }
603
+
604
+ /**
605
+ * Replace CSS URL shortcuts with a valid URL.
606
+ *
607
+ * @since 1.0.0
608
+ *
609
+ * @param string $content Given content to process.
610
+ *
611
+ * @return string
612
+ */
613
+ public function replace_css_url( $content ) {
614
+ return preg_replace_callback(
615
+ '#url\s*\(\s*[\'"]*?([^\'"\)]+)[\'"]*\s*\)#i',
616
+ array( $this, 'replace_css_url_callback' ),
617
+ $content
618
+ );
619
+ }
620
+
621
+ /**
622
+ * Convert any CSS URL relative paths to absolute URLs.
623
+ *
624
+ * @since 1.0.0
625
+ *
626
+ * @param array $matches Matches to process, where 0 is the CSS' URL() and 1 is the URI.
627
+ *
628
+ * @return string
629
+ */
630
+ public function replace_css_url_callback( $matches ) {
631
+
632
+ // If the URI is absolute, bail out and return the CSS.
633
+ if ( _jupiterx_is_uri( $matches[1] ) ) {
634
+ return $matches[0];
635
+ }
636
+
637
+ $base = $this->current_fragment;
638
+
639
+ // Separate the placeholders and path.
640
+ $paths = explode( '../', $matches[1] );
641
+
642
+ /**
643
+ * Walk backwards through each of the the fragment's directories, one-by-one. The `foreach` loop
644
+ * provides us with a performant way to walk the fragment back to its base path based upon the
645
+ * number of placeholders.
646
+ */
647
+ foreach ( $paths as $path ) {
648
+ $base = dirname( $base );
649
+ }
650
+
651
+ // Make sure it is a valid base.
652
+ if ( '.' === $base ) {
653
+ $base = '';
654
+ }
655
+
656
+ // Rebuild the URL and make sure it is valid using the jupiterx_path_to_url function.
657
+ $url = jupiterx_path_to_url( trailingslashit( $base ) . ltrim( end( $paths ), '/\\' ) );
658
+
659
+ // Return the rebuilt path converted to an URL.
660
+ return 'url("' . $url . '")';
661
+ }
662
+
663
+ /**
664
+ * Register LESS_PHP functions.
665
+ *
666
+ * @since 1.0.0
667
+ *
668
+ * @param object $parser The LESS parser.
669
+ *
670
+ * @todo Refactoring is required.
671
+ *
672
+ * @return object
673
+ */
674
+ private function register_less_functions( $parser ) {
675
+ $parser->registerFunction( 'jupiterx_value', function( $arg ) {
676
+ $output = '';
677
+
678
+ if ( isset( $arg[2][1][2][0] ) ) {
679
+ $output = $arg[2][1][2][0]; // Default.
680
+ }
681
+
682
+ if ( ! empty( $arg[2][0][2][1][1] ) ) {
683
+ return $arg[2][0][2][1][1]; // E.g. ~"@{@{var}-width}".
684
+ }
685
+
686
+ if ( ! empty( $arg[2][0][1] ) ) {
687
+ $value = $arg[2][0][1]; // E.g. @text-size.
688
+ $unit = empty( $arg[2][0][2] ) ? '' : $arg[2][0][2]; // E.g. @text-size unit.
689
+
690
+ return $value . $unit;
691
+ }
692
+
693
+ return $output;
694
+ } );
695
+
696
+ $parser->registerFunction( 'jupiterx_value_pattern', function( $arg ) {
697
+ if ( 0 === strlen( $arg[2][0][1] ) ) {
698
+ return '';
699
+ }
700
+
701
+ list($type, $value, $unit) = $arg[2][0];
702
+
703
+ $format = $arg[2][1][2][0];
704
+
705
+ // When value is 0px, parser automatically remove px (but not %) from it.
706
+ if ( 0 == $arg[2][0][1] ) { // @codingStandardsIgnoreLine
707
+ $unit = '%';
708
+ }
709
+
710
+ return sprintf( $format, $value . $unit );
711
+ } );
712
+
713
+ $parser->registerFunction( 'jupiterx_replace', function( $args ) {
714
+ list( $string, $search, $replace ) = $args[2];
715
+
716
+ // Arrange if string is from a variable use the true condition. e.g. @{var-name}.
717
+ $string = isset( $string[2][1][1] ) ? $string[2][1][1] : $string[2][0];
718
+ $search = $search[2][0];
719
+ $replace = $replace[2][0];
720
+
721
+ return str_replace( $search, $replace, $string );
722
+ } );
723
+
724
+ return $parser;
725
+ }
726
+
727
+ /**
728
+ * Initialize the configuration.
729
+ *
730
+ * @since 1.0.0
731
+ *
732
+ * @param array $config Runtime configuration parameters for the Compiler.
733
+ *
734
+ * @return array
735
+ */
736
+ private function init_config( array $config ) {
737
+ // Fix dependencies, if "depedencies" is specified.
738
+ if ( isset( $config['depedencies'] ) ) {
739
+ $config['dependencies'] = $config['depedencies'];
740
+ unset( $config['depedencies'] );
741
+ }
742
+
743
+ $defaults = [
744
+ 'id' => false,
745
+ 'type' => false,
746
+ 'format' => false,
747
+ 'fragments' => [],
748
+ 'variables' => apply_filters( 'jupiterx_compiler_less_variables', [] ),
749
+ 'dependencies' => false,
750
+ 'in_footer' => false,
751
+ 'minify_js' => true,
752
+ 'version' => JUPITERX_VERSION,
753
+ 'enqueue' => true,
754
+ ];
755
+
756
+ return array_merge( $defaults, $config );
757
+ }
758
+
759
+ /**
760
+ * Get the fragments' modification times.
761
+ *
762
+ * @since 1.0.0
763
+ *
764
+ * @return array
765
+ * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
766
+ */
767
+ private function get_fragments_filemtime() {
768
+ $fragments_filemtime = array();
769
+
770
+ foreach ( $this->config['fragments'] as $index => $fragment ) {
771
+
772
+ // Skip this one if the fragment is a function.
773
+ if ( $this->is_function( $fragment ) ) {
774
+ if ( ! is_callable( $fragment ) ) {
775
+ continue;
776
+ }
777
+
778
+ $fragments_filemtime[ $index ] = $this->hash( [ call_user_func( $fragment ) ] );
779
+
780
+ }
781
+
782
+ if ( file_exists( $fragment ) ) {
783
+ $fragments_filemtime[ $index ] = @filemtime( $fragment ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
784
+ }
785
+ }
786
+
787
+ return $fragments_filemtime;
788
+ }
789
+
790
+ /**
791
+ * Get the new hash for the given fragments' modification times.
792
+ *
793
+ * @since 1.0.0
794
+ *
795
+ * @param string $hash The original hash to modify.
796
+ * @param array $fragments_filemtime Array of fragments' modification times.
797
+ *
798
+ * @return string
799
+ * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
800
+ */
801
+ private function get_new_hash( $hash, array $fragments_filemtime ) {
802
+
803
+ if ( empty( $fragments_filemtime ) ) {
804
+ return $hash;
805
+ }
806
+
807
+ // Set filemtime hash.
808
+ $_hash = $this->hash( $fragments_filemtime );
809
+
810
+ $this->remove_modified_files( $hash, $_hash );
811
+
812
+ // Set the new hash which will trigger a new compiling.
813
+ return $hash . '-' . $_hash;
814
+ }
815
+
816
+ /**
817
+ * Remove any modified files. A file is considered modified when:
818
+ *
819
+ * 1. It has both a base hash and filemtime hash, separated by '-'.
820
+ * 2. Its base hash matches the given hash.
821
+ * 3. Its filemtime hash does not match the given filemtime hash.
822
+ *
823
+ * @since 1.0.0
824
+ *
825
+ * @param string $hash Base hash.
826
+ * @param string $filemtime_hash The filemtime hash (from hashing the fragments).
827
+ *
828
+ * @return void
829
+ */
830
+ private function remove_modified_files( $hash, $filemtime_hash ) {
831
+
832
+ if ( ! is_dir( $this->dir ) ) {
833
+ return;
834
+ }
835
+
836
+ $items = @scandir( $this->dir ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
837
+ unset( $items[0], $items[1] );
838
+
839
+ if ( empty( $items ) ) {
840
+ return;
841
+ }
842
+
843
+ foreach ( $items as $item ) {
844
+
845
+ // Skip this one if it's a directory.
846
+ if ( @is_dir( $item ) ) { // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
847
+ continue;
848
+ }
849
+
850
+ // Skip this one if it's not the same type.
851
+ if ( pathinfo( $item, PATHINFO_EXTENSION ) !== $this->get_extension() ) {
852
+ continue;
853
+ }
854
+
855
+ // Skip this one if it does not have a '-' in the filename.
856
+ if ( strpos( $item, '-' ) === false ) {
857
+ continue;
858
+ }
859
+
860
+ $hash_parts = explode( '-', pathinfo( $item, PATHINFO_FILENAME ) );
861
+
862
+ // Skip this one if it does not match the given base hash.
863
+ if ( $hash_parts[0] !== $hash ) {
864
+ continue;
865
+ }
866
+
867
+ // Skip this one if it does match the given filemtime's hash.
868
+ if ( $hash_parts[1] === $filemtime_hash ) {
869
+ continue;
870
+ }
871
+
872
+ // Clean up other modified files.
873
+ @unlink( $this->dir . '/' . $item ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
874
+ }
875
+ }
876
+
877
+ /**
878
+ * Minify the CSS.
879
+ *
880
+ * @since 1.0.0
881
+ *
882
+ * @param string $content Given content to process.
883
+ *
884
+ * @return string
885
+ */
886
+ private function minify_style( $content ) {
887
+ $replace = array(
888
+ '/([^\r\n{}]+)(,(?=[^}]*{)|\s*{)}/' => '', // Strip empty selectors.
889
+ '/@media\s\(.*\).*{}/' => '', // Strip empty @media.
890
+ '#/\*.*?\*/#s' => '', // Strip comments.
891
+ '#\s\s+#' => ' ', // Strip excess whitespace.
892
+ );
893
+
894
+ $search = array_keys( $replace );
895
+ $content = preg_replace( $search, $replace, $content );
896
+
897
+ $replace = array(
898
+ ': ' => ':',
899
+ '; ' => ';',
900
+ ' {' => '{',
901
+ ' }' => '}',
902
+ ', ' => ',',
903
+ '{ ' => '{',
904
+ ';}' => '}', // Strip optional semicolons.
905
+ ',\n' => ',', // Don't wrap multiple selectors.
906
+ '\n}' => '}', // Don't wrap closing braces.
907
+ '} ' => "}\n", // Put each rule on it's own line.
908
+ '\n' => '', // Remove all line breaks.
909
+ );
910
+
911
+ $search = array_keys( $replace );
912
+
913
+ return trim( str_replace( $search, $replace, $content ) );
914
+ }
915
+
916
+ /**
917
+ * Check if the given fragment is a callable.
918
+ *
919
+ * @since 1.0.0
920
+ *
921
+ * @param mixed $fragment Given fragment to check.
922
+ *
923
+ * @return bool
924
+ */
925
+ private function is_function( $fragment ) {
926
+ return ( is_array( $fragment ) || is_callable( $fragment ) );
927
+ }
928
+
929
+ /**
930
+ * Kill it :(
931
+ *
932
+ * @since 1.0.0
933
+ *
934
+ * @return void
935
+ */
936
+ private function kill() {
937
+
938
+ // Send report if set.
939
+ if ( jupiterx_get( 'jupiterx_send_compiler_report' ) ) { // @codingStandardsIgnoreLine
940
+ // $this->report(); // @codingStandardsIgnoreLine
941
+ }
942
+
943
+ $html = jupiterx_output( 'jupiterx_compiler_error_title_text', sprintf(
944
+ '<h2>%s</h2>',
945
+ __( 'Not cool, Jupiter cannot work its magic :(', 'jupiterx-core' )
946
+ ) );
947
+
948
+ $html .= jupiterx_output( 'jupiterx_compiler_error_message_text', sprintf(
949
+ '<p>%s</p>',
950
+ __( 'Your current install or file permission prevents Jupiter from working its magic. Please get in touch with Jupiter support. We will gladly get you started within 24 - 48 hours (working days).', 'jupiterx-core' )
951
+ ) );
952
+
953
+ $html .= jupiterx_output( 'jupiterx_compiler_error_contact_text', sprintf(
954
+ '<a class="button" href="https://themes.artbees.net/support/" target="_blank">%s</a>',
955
+ __( 'Contact Jupiter Support', 'jupiterx-core' )
956
+ ) );
957
+
958
+ $html .= jupiterx_output( 'jupiterx_compiler_error_report_text', sprintf(
959
+ '<p style="margin-top: 12px; font-size: 12px;"><a href="' . add_query_arg( 'jupiterx_send_compiler_report', true ) . '">%1$s</a>. %2$s</p>',
960
+ __( 'Send us an automatic report', 'jupiterx-core' ),
961
+ __( 'We respect your time and understand you might not be able to contact us.', 'jupiterx-core' )
962
+ ) );
963
+
964
+ wp_die( wp_kses_post( $html ) );
965
+ }
966
+
967
+ /**
968
+ * Send report.
969
+ *
970
+ * @since 1.0.0
971
+ *
972
+ * @todo Decide if we want to use and change the report recipient.
973
+ *
974
+ * @return void
975
+ * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
976
+ */
977
+ private function report() {
978
+ // Send report.
979
+ wp_mail(
980
+ 'hello@getjupiter.io',
981
+ 'Compiler error',
982
+ 'Compiler error reported by ' . home_url(),
983
+ array(
984
+ 'MIME-Version: 1.0' . "\r\n",
985
+ 'Content-type: text/html; charset=utf-8' . "\r\n",
986
+ "X-Mailer: PHP \r\n",
987
+ 'From: ' . wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) . ' < ' . get_option( 'admin_email' ) . '>' . "\r\n",
988
+ 'Reply-To: ' . get_option( 'admin_email' ) . "\r\n",
989
+ )
990
+ );
991
+
992
+ // Die and display message.
993
+ $message = jupiterx_output(
994
+ 'jupiterx_compiler_report_error_text',
995
+ sprintf(
996
+ '<p>%s<p>',
997
+ __( 'Thanks for your contribution by reporting this issue. We hope to hear from you again.', 'jupiterx-core' )
998
+ )
999
+ );
1000
+
1001
+ wp_die( wp_kses_post( $message ) );
1002
+ }
1003
+
1004
+ /**
1005
+ * Get the property's value.
1006
+ *
1007
+ * @since 1.0.0
1008
+ *
1009
+ * @param string $property Name of the property to get.
1010
+ *
1011
+ * @return mixed
1012
+ */
1013
+ public function __get( $property ) {
1014
+
1015
+ if ( property_exists( $this, $property ) ) {
1016
+ return $this->{$property};
1017
+ }
1018
+ }
1019
+ }
includes/compiler/functions.php ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Compile and cache CSS, LESS and JS files.
4
+ *
5
+ * The Jupiter Compiler compiles multiple internal or external CSS, LESS and JS files on a
6
+ * per page basis. LESS content will automatically be converted to CSS.
7
+ *
8
+ * Internal file changes are automatically detected if development mode is enabled.
9
+ * Third party enqueued styles and scripts can be compiled and cached into a single file.
10
+ *
11
+ * @package API\Compiler
12
+ */
13
+
14
+ /**
15
+ * Compile CSS fragments and enqueue compiled file.
16
+ *
17
+ * This function should be used in a similar fashion to
18
+ * {@link http://codex.wordpress.org/Function_Reference/wp_enqueue_script wp_enqueue_script()}.
19
+ *
20
+ * Fragments can be added to the compiler using {@see jupiterx_compiler_add_fragment()}.
21
+ *
22
+ * @since 1.0.0
23
+ *
24
+ * @param string $id A unique string used as a reference. Similar to the WordPress scripts
25
+ * $handle argument.
26
+ * @param string|array $fragments File(s) absolute path. Internal or external file(s) url accepted but may increase
27
+ * compiling time.
28
+ * @param array $args {
29
+ * Optional. Array of arguments used by the compiler.
30
+ *
31
+ * @type array $depedencies An array of registered handles this script depends on. Default false.
32
+ * }
33
+ *
34
+ * @return object Compiler object.
35
+ */
36
+ function jupiterx_compile_css_fragments( $id, $fragments, $args = array() ) {
37
+
38
+ if ( empty( $fragments ) ) {
39
+ return false;
40
+ }
41
+
42
+ $params = array(
43
+ 'id' => $id,
44
+ 'type' => 'style',
45
+ 'format' => 'css',
46
+ 'fragments' => (array) $fragments,
47
+ );
48
+
49
+ $compiler = new _JupiterX_Compiler( array_merge( $params, $args ) );
50
+ $compiler->run_compiler();
51
+
52
+ return $compiler;
53
+ }
54
+
55
+ /**
56
+ * Compile LESS fragments, convert to CSS and enqueue compiled file.
57
+ *
58
+ * This function should be used in a similar fashion to
59
+ * {@link http://codex.wordpress.org/Function_Reference/wp_enqueue_script wp_enqueue_script()}.
60
+ *
61
+ * Fragments can be added to the compiler using {@see jupiterx_compiler_add_fragment()}.
62
+ *
63
+ * @since 1.0.0
64
+ *
65
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
66
+ * @param string|array $fragments File(s) absolute path. Internal or external file(s) url accepted but may increase
67
+ * compiling time.
68
+ * @param array $args {
69
+ * Optional. Array of arguments used by the compiler.
70
+ *
71
+ * @type array $depedencies An array of registered handles this script depends on. Default false.
72
+ * }
73
+ *
74
+ * @return object Compiler object.
75
+ */
76
+ function jupiterx_compile_less_fragments( $id, $fragments, $args = array() ) {
77
+
78
+ if ( empty( $fragments ) ) {
79
+ return false;
80
+ }
81
+
82
+ $params = array(
83
+ 'id' => $id,
84
+ 'type' => 'style',
85
+ 'format' => 'less',
86
+ 'fragments' => (array) $fragments,
87
+ );
88
+
89
+ $compiler = new _JupiterX_Compiler( array_merge( $params, $args ) );
90
+ $compiler->run_compiler();
91
+
92
+ return $compiler;
93
+ }
94
+
95
+ /**
96
+ * Compile LESS fragments, convert to CSS and enqueue compiled file.
97
+ *
98
+ * This function should be used in a similar fashion to
99
+ * {@link http://codex.wordpress.org/Function_Reference/wp_enqueue_script wp_enqueue_script()}.
100
+ *
101
+ * Fragments can be added to the compiler using {@see jupiterx_compiler_add_fragment()}.
102
+ *
103
+ * @since 1.0.0
104
+ *
105
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
106
+ * @param string|array $fragments File(s) absolute path. Internal or external file(s) url accepted but may increase
107
+ * compiling time.
108
+ * @param array $args {
109
+ * Optional. Array of arguments used by the compiler.
110
+ *
111
+ * @type array $depedencies An array of registered handles this script depends on. Default false.
112
+ * }
113
+ *
114
+ * @return object Compiler object.
115
+ */
116
+ function jupiterx_compile_scss_fragments( $id, $fragments, $args = array() ) {
117
+
118
+ if ( empty( $fragments ) ) {
119
+ return false;
120
+ }
121
+
122
+ $params = array(
123
+ 'id' => $id,
124
+ 'type' => 'style',
125
+ 'format' => 'scss',
126
+ 'fragments' => (array) $fragments,
127
+ );
128
+
129
+ $compiler = new _JupiterX_Compiler( array_merge( $params, $args ) );
130
+ $compiler->run_compiler();
131
+
132
+ return $compiler;
133
+ }
134
+
135
+ /**
136
+ * Compile JS fragments and enqueue compiled file.
137
+ *
138
+ * This function should be used in a similar fashion to
139
+ * {@link http://codex.wordpress.org/Function_Reference/wp_enqueue_script wp_enqueue_script()}.
140
+ *
141
+ * Fragments can be added to the compiler using {@see jupiterx_compiler_add_fragment()}.
142
+ *
143
+ * @since 1.0.0
144
+ *
145
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
146
+ * @param string|array $fragments File(s) absolute path. Internal or external file(s) URL accepted but may increase
147
+ * compiling time.
148
+ * @param array $args {
149
+ * Optional. Array of arguments used by the compiler.
150
+ *
151
+ * @type array $depedencies An array of registered handles this script depends on. Default false.
152
+ * @type bool $in_footer Whether to enqueue the script before </head> or before </body>. Default false.
153
+ * @type bool $minify_js Whether the JavaScript should be minified or not. Be aware that minifying
154
+ * the JavaScript can considerably slow down the process of compiling files.
155
+ * Default false.
156
+ * }
157
+ *
158
+ * @return object Compiler object.
159
+ */
160
+ function jupiterx_compile_js_fragments( $id, $fragments, $args = array() ) {
161
+
162
+ if ( empty( $fragments ) ) {
163
+ return false;
164
+ }
165
+
166
+ $params = array(
167
+ 'id' => $id,
168
+ 'type' => 'script',
169
+ 'format' => 'js',
170
+ 'fragments' => (array) $fragments,
171
+ );
172
+
173
+ $compiler = new _JupiterX_Compiler( array_merge( $params, $args ) );
174
+ $compiler->run_compiler();
175
+
176
+ return $compiler;
177
+ }
178
+
179
+ /**
180
+ * Add CSS, LESS or JS fragments to a compiler.
181
+ *
182
+ * This function should be used in a similar fashion to
183
+ * {@link http://codex.wordpress.org/Function_Reference/wp_enqueue_script wp_enqueue_script()}.
184
+ *
185
+ * @since 1.0.0
186
+ *
187
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
188
+ * @param string|array $fragments File(s) absolute path. Internal or external file(s) url accepted but may increase
189
+ * compiling time.
190
+ * @param string $format Compiler format the fragments should be added to. Accepts 'css',
191
+ * 'less' or 'js'.
192
+ *
193
+ * @return void|bool
194
+ * @SuppressWarnings(PHPMD.ElseExpression)
195
+ */
196
+ function jupiterx_compiler_add_fragment( $id, $fragments, $format ) {
197
+
198
+ if ( empty( $fragments ) ) {
199
+ return false;
200
+ }
201
+
202
+ global $_jupiterx_compiler_added_fragments;
203
+
204
+ foreach ( (array) $fragments as $key => $fragment ) {
205
+
206
+ // Stop here if the format isn't valid.
207
+ if ( ! isset( $_jupiterx_compiler_added_fragments[ $format ] ) ) {
208
+ continue;
209
+ }
210
+
211
+ // Register a new compiler ID if it doesn't exist and add fragment.
212
+ if ( ! isset( $_jupiterx_compiler_added_fragments[ $format ][ $id ] ) ) {
213
+ $_jupiterx_compiler_added_fragments[ $format ][ $id ] = array( $fragment );
214
+ } else { // Add fragment to existing compiler.
215
+ $_jupiterx_compiler_added_fragments[ $format ][ $id ][] = $fragment;
216
+ }
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Flush cached compiler files.
222
+ *
223
+ * Each compiler has its own folder which contains the cached CSS and JS files. The file format
224
+ * of the cached file can be specified if needed.
225
+ *
226
+ * @since 1.0.0
227
+ *
228
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
229
+ * @param string|bool $file_format Optional. Define which file format(s) should be removed. Both CSS and JS
230
+ * files will be removed if set to false. Accepts 'false', 'css' or 'js'.
231
+ * @param bool $admin Optional. Whether it is an admin compiler or not.
232
+ *
233
+ * @return void|bool
234
+ */
235
+ function jupiterx_flush_compiler( $id, $file_format = false, $admin = false ) {
236
+ static $jupiterx_flushed = false;
237
+
238
+ $cache_dir = jupiterx_get_compiler_dir( $admin );
239
+
240
+ // Always flush Jupiter' global cache.
241
+ if ( ! $jupiterx_flushed ) {
242
+ $jupiterx_flushed = true;
243
+
244
+ jupiterx_flush_compiler( 'jupiterx', $file_format, $admin );
245
+ }
246
+
247
+ $dir = trailingslashit( $cache_dir ) . $id;
248
+
249
+ // Stop here if directory doesn't exist.
250
+ if ( ! is_dir( $dir ) ) {
251
+ return;
252
+ }
253
+
254
+ // Remove only the specified file format.
255
+ if ( $file_format ) {
256
+ $items = scandir( $dir );
257
+ unset( $items[0], $items[1] );
258
+
259
+ foreach ( $items as $item ) {
260
+ if ( false !== stripos( $item, '.' . $file_format ) ) {
261
+ @unlink( trailingslashit( $dir ) . $item ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Valid use case.
262
+ }
263
+ }
264
+
265
+ return;
266
+ }
267
+
268
+ // Remove all file formats.
269
+ jupiterx_remove_dir( $dir );
270
+
271
+ jupiterx_flush_cache_plugins();
272
+ }
273
+
274
+ /**
275
+ * Flush admin cached compiler files.
276
+ *
277
+ * This function is a shortcut of {@see jupiterx_flush_compiler()}.
278
+ *
279
+ * @since 1.0.0
280
+ *
281
+ * @param string $id The compiler ID. Similar to the WordPress scripts $handle argument.
282
+ * @param string|bool $file_format Optional. Define which file formats should be removed. Both CSS and JS
283
+ * files will be removed if set to false. Accepts 'false', 'css' or 'js'.
284
+ *
285
+ * @return void
286
+ */
287
+ function jupiterx_flush_admin_compiler( $id, $file_format = false ) {
288
+ jupiterx_flush_compiler( $id, $file_format, true );
289
+ }
290
+
291
+ /**
292
+ * Flush cache plugins
293
+ *
294
+ * @since 1.0.0
295
+ *
296
+ * @return void
297
+ */
298
+ function jupiterx_flush_cache_plugins() {
299
+
300
+ if ( function_exists( 'w3tc_pgcache_flush' ) ) {
301
+ w3tc_pgcache_flush();
302
+ }
303
+
304
+ if ( function_exists( 'wp_cache_clear_cache' ) ) {
305
+ wp_cache_clear_cache();
306
+ }
307
+
308
+ if ( function_exists( 'rocket_clean_domain' ) ) {
309
+ rocket_clean_domain();
310
+ }
311
+
312
+ if ( class_exists( 'WpFastestCache' ) ) {
313
+ $GLOBALS['wp_fastest_cache']->deleteCache();
314
+ }
315
+
316
+ if ( class_exists( 'autoptimizeCache' ) ) {
317
+ autoptimizeCache::clearall();
318
+ }
319
+ }
320
+
321
+ /**
322
+ * Get absolute path to the Jupiter' compiler directory.
323
+ *
324
+ * @since 1.0.0
325
+ *
326
+ * @param bool $is_admin Optional. When true, gets the admin compiler directory. Default is false.
327
+ *
328
+ * @return string
329
+ */
330
+ function jupiterx_get_compiler_dir( $is_admin = false ) {
331
+ $wp_upload_dir = wp_upload_dir();
332
+ $suffix = $is_admin ? 'jupiterx/admin-compiler/' : 'jupiterx/compiler/';
333
+
334
+ /**
335
+ * Deprecated. Filter the Jupiter compiler directory.
336
+ *
337
+ * This filter is deprecated for security and compatibility purposes.
338
+ *
339
+ * @since 1.0.0
340
+ * @deprecated 1.3.0
341
+ */
342
+ apply_filters( 'jupiterx_compiler_dir', false, $is_admin );
343
+
344
+ return wp_normalize_path( trailingslashit( $wp_upload_dir['basedir'] ) . $suffix );
345
+ }
346
+
347
+ /**
348
+ * Get absolute URL to the Jupiter' compiler directory.
349
+ *
350
+ * @since 1.0.0
351
+ *
352
+ * @param bool $is_admin Optional. When true, gets the admin compiler directory. Default is false.
353
+ *
354
+ * @return string
355
+ */
356
+ function jupiterx_get_compiler_url( $is_admin = false ) {
357
+ $wp_upload_dir = wp_upload_dir();
358
+ $suffix = $is_admin ? 'jupiterx/admin-compiler/' : 'jupiterx/compiler/';
359
+
360
+ return trailingslashit( $wp_upload_dir['baseurl'] ) . $suffix;
361
+ }
362
+
363
+ /**
364
+ * Check if development mode is enabled.
365
+ *
366
+ * Takes legacy constant into consideration.
367
+ *
368
+ * @since 1.0.0
369
+ * @ignore
370
+ * @access private
371
+ *
372
+ * @return bool
373
+ */
374
+ function _jupiterx_is_compiler_dev_mode() {
375
+
376
+ if ( defined( 'JUPITERX_COMPILER_DEV_MODE' ) ) {
377
+ return JUPITERX_COMPILER_DEV_MODE;
378
+ }
379
+
380
+ return get_option( 'jupiterx_dev_mode', false );
381
+ }
382
+
383
+ /**
384
+ * Get cache busting method.
385
+ *
386
+ * @since 1.0.0
387
+ * @access private
388
+ *
389
+ * @return bool
390
+ */
391
+ function _jupiterx_get_cache_busting() {
392
+ return get_option( 'jupiterx_cache_busting', true );
393
+ }
394
+
395
+ /**
396
+ * Initialize added fragments global.
397
+ *
398
+ * @since 1.0.0
399
+ * @ignore
400
+ * @access private
401
+ */
402
+ global $_jupiterx_compiler_added_fragments;
403
+
404
+ if ( ! isset( $_jupiterx_compiler_added_fragments ) ) {
405
+ $_jupiterx_compiler_added_fragments = array(
406
+ 'css' => array(),
407
+ 'less' => array(),
408
+ 'scss' => array(),
409
+ 'js' => array(),
410
+ );
411
+ }
includes/compiler/preprocess-aliases.ini ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;----------------------------------------------------------------
2
+ ;
3
+ ; Add or delete aliases to suit your needs.
4
+ ; Modified for Jupiter X.
5
+ ;
6
+ ; Sources:
7
+ ; http://developer.mozilla.org/en-US/docs/CSS/CSS_Reference
8
+ ; http://caniuse.com/#cats=CSS
9
+ ;
10
+ ;----------------------------------------------------------------
11
+
12
+ ; Property aliases.
13
+
14
+ [properties]
15
+
16
+ ; Animations.
17
+ animation[] = -webkit-animation
18
+ animation-delay[] = -webkit-animation-delay
19
+ animation-direction[] = -webkit-animation-direction
20
+ animation-duration[] = -webkit-animation-duration
21
+ animation-fill-mode[] = -webkit-animation-fill-mode
22
+ animation-iteration-count[] = -webkit-animation-iteration-count
23
+ animation-name[] = -webkit-animation-name
24
+ animation-play-state[] = -webkit-animation-play-state
25
+ animation-timing-function[] = -webkit-animation-timing-function
26
+
27
+ ; Backface visibility.
28
+ backface-visibility[] = -webkit-backface-visibility
29
+
30
+ ; Border-image.
31
+ border-image[] = -webkit-border-image
32
+
33
+ ; Box decoration.
34
+ box-decoration-break[] = -webkit-box-decoration-break
35
+
36
+ ; Box shadow.
37
+ ; box-shadow[] = -webkit-box-shadow
38
+
39
+ ; Box sizing.
40
+ ; box-sizing[] = -webkit-box-sizing
41
+ ; box-sizing[] = -moz-box-sizing
42
+
43
+ ; Columns.
44
+ columns[] = -webkit-columns
45
+ columns[] = -moz-columns
46
+ column-count[] = -webkit-column-count
47
+ column-count[] = -moz-column-count
48
+ column-fill[] = -webkit-column-fill
49
+ column-fill[] = -moz-column-fill
50
+ column-gap[] = -webkit-column-gap
51
+ column-gap[] = -moz-column-gap
52
+ column-rule[] = -webkit-column-rule
53
+ column-rule[] = -moz-column-rule
54
+ column-rule-style[] = -webkit-column-rule-style
55
+ column-rule-style[] = -moz-column-rule-style
56
+ column-rule-width[] = -webkit-column-rule-width
57
+ column-rule-width[] = -moz-column-rule-width
58
+ column-rule-style[] = -webkit-column-rule-style
59
+ column-rule-style[] = -moz-column-rule-style
60
+ column-rule-color[] = -webkit-column-rule-color
61
+ column-rule-color[] = -moz-column-rule-color
62
+ column-span[] = -webkit-column-span
63
+ column-span[] = -moz-column-span
64
+ column-width[] = -webkit-column-width
65
+ column-width[] = -moz-column-width
66
+
67
+ ; Filter.
68
+ filter[] = -webkit-filter
69
+
70
+ ; Flexbox (2012).
71
+ ;
72
+ ; Merges two similar versions of the flexbox spec:
73
+ ; - September 2012 (for non IE): http://www.w3.org/TR/2012/CR-css3-flexbox-20120918
74
+ ; - March 2012 (for IE10): http://www.w3.org/TR/2012/WD-css3-flexbox-20120322
75
+ ;
76
+ ; The early 2012 spec mostly differs only in syntax to the later one, with the notable
77
+ ; exception of not supporting seperate properties for <flex-grow>, <flex-shrink>
78
+ ; and <flex-basis>. These properties are available in both 2012 implementations via
79
+ ; <flex> shorthand.
80
+ ;
81
+ ; Support for the early 2012 syntax implemented in IE10 is achieved here in part with
82
+ ; property aliases, and in part with declaration aliases later in this file.
83
+ ;
84
+ ; align-content[] = -webkit-align-content
85
+ ; align-items[] = -webkit-align-items
86
+ ; align-self[] = -webkit-align-self
87
+ ; flex[] = -webkit-flex
88
+ flex[] = -ms-flexbox
89
+ ; flex-basis[] = -webkit-flex-basis
90
+ ; flex-direction[] = -webkit-flex-direction
91
+ flex-direction[] = -ms-flex-direction
92
+ ; flex-flow[] = -webkit-flex-flow
93
+ flex-flow[] = -ms-flex-flow
94
+ ; flex-grow[] = -webkit-flex-grow
95
+ ; flex-shrink[] = -webkit-flex-shrink
96
+ ; flex-wrap[] = -webkit-flex-wrap
97
+ ; flex-wrap[] = -ms-flex-wrap
98
+ ; justify-content[] = -webkit-justify-content
99
+ ; order[] = -webkit-order
100
+ order[] = -ms-flex-order
101
+
102
+ ; Hyphens.
103
+ hyphens[] = -webkit-hyphens
104
+ hyphens[] = -moz-hyphens
105
+ hyphens[] = -ms-hyphens
106
+
107
+ ; Outline radius.
108
+ outline-radius[] = -moz-outline-radius
109
+ outline-top-left-radius[] = -moz-outline-radius-topleft
110
+ outline-top-right-radius[] = -moz-outline-radius-topright
111
+ outline-bottom-left-radius[] = -moz-outline-radius-bottomleft
112
+ outline-bottom-right-radius[] = -moz-outline-radius-bottomright
113
+
114
+ ; Perspective.
115
+ perspective[] = -webkit-perspective
116
+ perspective-origin[] = -webkit-perspective-origin
117
+
118
+ ; Shapes
119
+ shape-image-threshold[] = -webkit-shape-image-threshold
120
+ shape-outside[] = -webkit-shape-outside
121
+ shape-margin[] = -webkit-shape-margin
122
+
123
+ ; Tab size.
124
+ tab-size[] = -moz-tab-size
125
+ tab-size[] = -o-tab-size
126
+
127
+ ; Text align last.
128
+ text-align-last[] = -webkit-text-align-last
129
+ text-align-last[] = -moz-text-align-last
130
+
131
+ ; Text decoration.
132
+ text-decoration-color[] = -moz-text-decoration-color
133
+ text-decoration-line[] = -moz-text-decoration-line
134
+ text-decoration-style[] = -moz-text-decoration-style
135
+
136
+ ; Text overflow (Opera mini support).
137
+ text-overflow[] = -o-text-overflow
138
+
139
+ ; Transforms.
140
+ transform[] = -webkit-transform
141
+ ; transform[] = -ms-transform
142
+ transform-origin[] = -webkit-transform-origin
143
+ ; transform-origin[] = -ms-transform-origin
144
+ transform-style[] = -webkit-transform-style
145
+ ; transform-style[] = -ms-transform-style
146
+
147
+ ; Transitions.
148
+ ; transition[] = -webkit-transition
149
+ ; transition-delay[] = -webkit-transition-delay
150
+ ; transition-duration[] = -webkit-transition-duration
151
+ ; transition-property[] = -webkit-transition-property
152
+ ; transition-timing-function[] = -webkit-transition-timing-function
153
+
154
+ ; User select (non standard).
155
+ user-select[] = -webkit-user-select
156
+ user-select[] = -moz-user-select
157
+ user-select[] = -ms-user-select
158
+
159
+
160
+ ;----------------------------------------------------------------
161
+ ; Declaration aliases.
162
+
163
+ [declarations]
164
+
165
+ ; Flexbox (2012).
166
+ display:flex[] = display:-ms-flexbox
167
+ ; display:flex[] = display:-webkit-flex
168
+ display:inline-flex[] = display:-ms-inline-flexbox
169
+ ; display:inline-flex[] = display:-webkit-inline-flex
170
+
171
+ ; Flexbox (early 2012).
172
+ align-content:flex-start[] = -ms-flex-line-pack:start
173
+ align-content:flex-end[] = -ms-flex-line-pack:end
174
+ align-content:center[] = -ms-flex-line-pack:center
175
+ align-content:space-between[] = -ms-flex-line-pack:justify
176
+ align-content:space-around[] = -ms-flex-line-pack:distribute
177
+ align-content:stretch[] = -ms-flex-line-pack:stretch
178
+
179
+ align-items:flex-start[] = -ms-flex-align:start
180
+ align-items:flex-end[] = -ms-flex-align:end
181
+ align-items:center[] = -ms-flex-align:center
182
+ align-items:baseline[] = -ms-flex-align:baseline
183
+ align-items:stretch[] = -ms-flex-align:stretch
184
+
185
+ align-self:auto[] = -ms-flex-item-align:auto
186
+ align-self:flex-start[] = -ms-flex-item-align:start
187
+ align-self:flex-end[] = -ms-flex-item-align:end
188
+ align-self:center[] = -ms-flex-item-align:center
189
+ align-self:baseline[] = -ms-flex-item-align:baseline
190
+ align-self:stretch[] = -ms-flex-item-align:stretch
191
+
192
+ justify-content:flex-start[] = -ms-flex-pack:start
193
+ justify-content:flex-end[] = -ms-flex-pack:end
194
+ justify-content:center[] = -ms-flex-pack:center
195
+ justify-content:space-between[] = -ms-flex-pack:justify
196
+ justify-content:space-around[] = -ms-flex-pack:distribute
197
+
198
+ ; Cursor values (non-standard).
199
+ cursor:zoom-in[] = cursor:-webkit-zoom-in
200
+ cursor:zoom-in[] = cursor:-moz-zoom-in
201
+ cursor:zoom-out[] = cursor:-webkit-zoom-out
202
+ cursor:zoom-out[] = cursor:-moz-zoom-out
203
+ cursor:grab[] = cursor:-webkit-grab
204
+ cursor:grab[] = cursor:-moz-grab
205
+ cursor:grabbing[] = cursor:-webkit-grabbing
206
+ cursor:grabbing[] = cursor:-moz-grabbing
207
+
208
+ ; Experimental width values.
209
+ width:max-content[] = width:intrinsic
210
+ width:max-content[] = width:-webkit-max-content
211
+ width:max-content[] = width:-moz-max-content
212
+ width:min-content[] = width:-webkit-min-content
213
+ width:min-content[] = width:-moz-min-content
214
+ width:available[] = width:-webkit-available
215
+ width:available[] = width:-moz-available
216
+ width:fit-content[] = width:-webkit-fit-content
217
+ width:fit-content[] = width:-moz-fit-content
218
+
219
+ max-width:max-content[] = max-width:intrinsic
220
+ max-width:max-content[] = max-width:-webkit-max-content
221
+ max-width:max-content[] = max-width:-moz-max-content
222
+ max-width:min-content[] = max-width:-webkit-min-content
223
+ max-width:min-content[] = max-width:-moz-min-content
224
+ max-width:available[] = max-width:-webkit-available
225
+ max-width:available[] = max-width:-moz-available
226
+ max-width:fit-content[] = max-width:-webkit-fit-content
227
+ max-width:fit-content[] = max-width:-moz-fit-content
228
+
229
+ min-width:max-content[] = min-width:intrinsic
230
+ min-width:max-content[] = min-width:-webkit-max-content
231
+ min-width:max-content[] = min-width:-moz-max-content
232
+ min-width:min-content[] = min-width:-webkit-min-content
233
+ min-width:min-content[] = min-width:-moz-min-content
234
+ min-width:available[] = min-width:-webkit-available
235
+ min-width:available[] = min-width:-moz-available
236
+ min-width:fit-content[] = min-width:-webkit-fit-content
237
+ min-width:fit-content[] = min-width:-moz-fit-content
238
+
239
+ ; Appearance (non-standard).
240
+ appearance:none[] = -webkit-appearance:none
241
+ appearance:none[] = -moz-appearance:none
242
+
243
+ position:sticky[] = position:-webkit-sticky
244
+
245
+
246
+ ;----------------------------------------------------------------
247
+ ; Function aliases.
248
+
249
+ [functions]
250
+
251
+ ; Calc.
252
+ ; calc[] = -webkit-calc÷
253
+
254
+
255
+ [functions.gradients]
256
+
257
+ ; Gradients.
258
+ ; linear-gradient[] = -webkit-linear-gradient
259
+ ; radial-gradient[] = -webkit-radial-gradient
260
+
261
+ ; Repeating gradients.
262
+ ; repeating-linear-gradient[] = -webkit-repeating-linear-gradient
263
+ ; repeating-radial-gradient[] = -webkit-repeating-radial-gradient
264
+
265
+
266
+ ;----------------------------------------------------------------
267
+ ; @rule aliases.
268
+
269
+ [at-rules]
270
+
271
+ ; Keyframes.
272
+ keyframes[] = -webkit-keyframes
273
+
274
+ ; Viewport.
275
+ viewport[] = -webkit-viewport
276
+ viewport[] = -ms-viewport
277
+ viewport[] = -o-viewport
includes/compiler/vendors/js-minifier.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * JavaScript compressor, minifies JavaScript.
4
+ * Based on JSMin (https://github.com/mrclay/minify, Ryan Grove <ryan@wonko.com>, Stephen Clay <steve@mrclay.org>, BSD License)
5
+ *
6
+ * @ignore
7
+ */
8
+ class JSMin {
9
+
10
+ const ORD_LF = 10;
11
+ const ORD_SPACE = 32;
12
+ const ACTION_KEEP_A = 1;
13
+ const ACTION_DELETE_A = 2;
14
+ const ACTION_DELETE_A_B = 3;
15
+
16
+ protected $a = "\n";
17
+ protected $b = '';
18
+ protected $input = '';
19
+ protected $inputIndex = 0;
20
+ protected $inputLength = 0;
21
+ protected $lookAhead = null;
22
+ protected $output = '';
23
+ protected $lastByteOut = '';
24
+ protected $keptComment = '';
25
+
26
+ /**
27
+ * @param string $input
28
+ */
29
+ public function __construct($input)
30
+ {
31
+ $this->input = $input;
32
+ }
33
+
34
+ /**
35
+ * Perform minification, return result
36
+ *
37
+ * @return string
38
+ */
39
+ public function min()
40
+ {
41
+ if ($this->output !== '') { // min already run
42
+ return $this->output;
43
+ }
44
+
45
+ $mbIntEnc = null;
46
+ if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {
47
+ $mbIntEnc = mb_internal_encoding();
48
+ mb_internal_encoding('8bit');
49
+ }
50
+ $this->input = str_replace("\r\n", "\n", $this->input);
51
+ $this->inputLength = strlen($this->input);
52
+
53
+ $this->action(self::ACTION_DELETE_A_B);
54
+
55
+ while ($this->a !== null) {
56
+ // determine next command
57
+ $command = self::ACTION_KEEP_A; // default
58
+ if ($this->a === ' ') {
59
+ if (($this->lastByteOut === '+' || $this->lastByteOut === '-')
60
+ && ($this->b === $this->lastByteOut)) {
61
+ // Don't delete this space. If we do, the addition/subtraction
62
+ // could be parsed as a post-increment
63
+ } elseif (! $this->isAlphaNum($this->b)) {
64
+ $command = self::ACTION_DELETE_A;
65
+ }
66
+ } elseif ($this->a === "\n") {
67
+ if ($this->b === ' ') {
68
+ $command = self::ACTION_DELETE_A_B;
69
+
70
+ // in case of mbstring.func_overload & 2, must check for null b,
71
+ // otherwise mb_strpos will give WARNING
72
+ } elseif ($this->b === null
73
+ || (false === strpos('{[(+-!~', $this->b)
74
+ && ! $this->isAlphaNum($this->b))) {
75
+ $command = self::ACTION_DELETE_A;
76
+ }
77
+ } elseif (! $this->isAlphaNum($this->a)) {
78
+ if ($this->b === ' '
79
+ || ($this->b === "\n"
80
+ && (false === strpos('}])+-"\'', $this->a)))) {
81
+ $command = self::ACTION_DELETE_A_B;
82
+ }
83
+ }
84
+ $this->action($command);
85
+ }
86
+ $this->output = trim($this->output);
87
+
88
+ if ($mbIntEnc !== null) {
89
+ mb_internal_encoding($mbIntEnc);
90
+ }
91
+ return $this->output;
92
+ }
93
+
94
+ /**
95
+ * ACTION_KEEP_A = Output A. Copy B to A. Get the next B.
96
+ * ACTION_DELETE_A = Copy B to A. Get the next B.
97
+ * ACTION_DELETE_A_B = Get the next B.
98
+ *
99
+ * @param int $command
100
+ * @throws JSMin_UnterminatedRegExpException|JSMin_UnterminatedStringException
101
+ */
102
+ protected function action($command)
103
+ {
104
+ // make sure we don't compress "a + ++b" to "a+++b", etc.
105
+ if ($command === self::ACTION_DELETE_A_B
106
+ && $this->b === ' '
107
+ && ($this->a === '+' || $this->a === '-')) {
108
+ // Note: we're at an addition/substraction operator; the inputIndex
109
+ // will certainly be a valid index
110
+ if ($this->input[$this->inputIndex] === $this->a) {
111
+ // This is "+ +" or "- -". Don't delete the space.
112
+ $command = self::ACTION_KEEP_A;
113
+ }
114
+ }
115
+
116
+ switch ($command) {
117
+ case self::ACTION_KEEP_A: // 1
118
+ $this->output .= $this->a;
119
+
120
+ if ($this->keptComment) {
121
+ $this->output = rtrim($this->output, "\n");
122
+ $this->output .= $this->keptComment;
123
+ $this->keptComment = '';
124
+ }
125
+
126
+ $this->lastByteOut = $this->a;
127
+
128
+ // fallthrough intentional
129
+ case self::ACTION_DELETE_A: // 2
130
+ $this->a = $this->b;
131
+ if ($this->a === "'" || $this->a === '"') { // string literal
132
+ $str = $this->a; // in case needed for exception
133
+ for(;;) {
134
+ $this->output .= $this->a;
135
+ $this->lastByteOut = $this->a;
136
+
137
+ $this->a = $this->get();
138
+ if ($this->a === $this->b) { // end quote
139
+ break;
140
+ }
141
+ if ($this->isEOF($this->a)) {
142
+ $byte = $this->inputIndex - 1;
143
+ throw new JSMin_UnterminatedStringException(
144
+ "JSMin: Unterminated String at byte {$byte}: {$str}");
145
+ }
146
+ $str .= $this->a;
147
+ if ($this->a === '\\') {
148
+ $this->output .= $this->a;
149
+ $this->lastByteOut = $this->a;
150
+
151
+ $this->a = $this->get();
152
+ $str .= $this->a;
153
+ }
154
+ }
155
+ }
156
+
157
+ // fallthrough intentional
158
+ case self::ACTION_DELETE_A_B: // 3
159
+ $this->b = $this->next();
160
+ if ($this->b === '/' && $this->isRegexpLiteral()) {
161
+ $this->output .= $this->a . $this->b;
162
+ $pattern = '/'; // keep entire pattern in case we need to report it in the exception
163
+ for(;;) {
164
+ $this->a = $this->get();
165
+ $pattern .= $this->a;
166
+ if ($this->a === '[') {
167
+ for(;;) {
168
+ $this->output .= $this->a;
169
+ $this->a = $this->get();
170
+ $pattern .= $this->a;
171
+ if ($this->a === ']') {
172
+ break;
173
+ }
174
+ if ($this->a === '\\') {
175
+ $this->output .= $this->a;
176
+ $this->a = $this->get();
177
+ $pattern .= $this->a;
178
+ }
179
+ if ($this->isEOF($this->a)) {
180
+ throw new JSMin_UnterminatedRegExpException(
181
+ "JSMin: Unterminated set in RegExp at byte "
182
+ . $this->inputIndex .": {$pattern}");
183
+ }
184
+ }
185
+ }
186
+
187
+ if ($this->a === '/') { // end pattern
188
+ break; // while (true)
189
+ } elseif ($this->a === '\\') {
190
+ $this->output .= $this->a;
191
+ $this->a = $this->get();
192
+ $pattern .= $this->a;
193
+ } elseif ($this->isEOF($this->a)) {
194
+ $byte = $this->inputIndex - 1;
195
+ throw new JSMin_UnterminatedRegExpException(
196
+ "JSMin: Unterminated RegExp at byte {$byte}: {$pattern}");
197
+ }
198
+ $this->output .= $this->a;
199
+ $this->lastByteOut = $this->a;
200
+ }
201
+ $this->b = $this->next();
202
+ }
203
+ // end case ACTION_DELETE_A_B
204
+ }
205
+ }
206
+
207
+ /**
208
+ * @return bool
209
+ */
210
+ protected function isRegexpLiteral()
211
+ {
212
+ if (false !== strpos("(,=:[!&|?+-~*{;", $this->a)) {
213
+ // we obviously aren't dividing
214
+ return true;
215
+ }
216
+
217
+ // we have to check for a preceding keyword, and we don't need to pattern
218
+ // match over the whole output.
219
+ $recentOutput = substr($this->output, -10);
220
+
221
+ // check if return/typeof directly precede a pattern without a space
222
+ foreach (array('return', 'typeof') as $keyword) {
223
+ if ($this->a !== substr($keyword, -1)) {
224
+ // certainly wasn't keyword
225
+ continue;
226
+ }
227
+ if (preg_match("~(^|[\\s\\S])" . substr($keyword, 0, -1) . "$~", $recentOutput, $m)) {
228
+ if ($m[1] === '' || !$this->isAlphaNum($m[1])) {
229
+ return true;
230
+ }
231
+ }
232
+ }
233
+
234
+ // check all keywords
235
+ if ($this->a === ' ' || $this->a === "\n") {
236
+ if (preg_match('~(^|[\\s\\S])(?:case|else|in|return|typeof)$~', $recentOutput, $m)) {
237
+ if ($m[1] === '' || !$this->isAlphaNum($m[1])) {
238
+ return true;
239
+ }
240
+ }
241
+ }
242
+
243
+ return false;
244
+ }
245
+
246
+ /**
247
+ * Return the next character from stdin. Watch out for lookahead. If the character is a control character,
248
+ * translate it to a space or linefeed.
249
+ *
250
+ * @return string
251
+ */
252
+ protected function get()
253
+ {
254
+ $c = $this->lookAhead;
255
+ $this->lookAhead = null;
256
+ if ($c === null) {
257
+ // getc(stdin)
258
+ if ($this->inputIndex < $this->inputLength) {
259
+ $c = $this->input[$this->inputIndex];
260
+ $this->inputIndex += 1;
261
+ } else {
262
+ $c = null;
263
+ }
264
+ }
265
+ if (ord($c) >= self::ORD_SPACE || $c === "\n" || $c === null) {
266
+ return $c;
267
+ }
268
+ if ($c === "\r") {
269
+ return "\n";
270
+ }
271
+ return ' ';
272
+ }
273
+
274
+ /**
275
+ * Does $a indicate end of input?
276
+ *
277
+ * @param string $a
278
+ * @return bool
279
+ */
280
+ protected function isEOF($a)
281
+ {
282
+ return ord($a) <= self::ORD_LF;
283
+ }
284
+
285
+ /**
286
+ * Get next char (without getting it). If is ctrl character, translate to a space or newline.
287
+ *
288
+ * @return string
289
+ */
290
+ protected function peek()
291
+ {
292
+ $this->lookAhead = $this->get();
293
+ return $this->lookAhead;
294
+ }
295
+
296
+ /**
297
+ * Return true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character.
298
+ *
299
+ * @param string $c
300
+ *
301
+ * @return bool
302
+ */
303
+ protected function isAlphaNum($c)
304
+ {
305
+ return (preg_match('/^[a-z0-9A-Z_\\$\\\\]$/', $c) || ord($c) > 126);
306
+ }
307
+
308
+ /**
309
+ * Consume a single line comment from input (possibly retaining it)
310
+ */
311
+ protected function consumeSingleLineComment()
312
+ {
313
+ $comment = '';
314
+ while (true) {
315
+ $get = $this->get();
316
+ $comment .= $get;
317
+ if (ord($get) <= self::ORD_LF) { // end of line reached
318
+ // if IE conditional comment
319
+ if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
320
+ $this->keptComment .= "/{$comment}";
321
+ }
322
+ return;
323
+ }
324
+ }
325
+ }
326
+
327
+ /**
328
+ * Consume a multiple line comment from input (possibly retaining it)
329
+ *
330
+ * @throws JSMin_UnterminatedCommentException
331
+ */
332
+ protected function consumeMultipleLineComment()
333
+ {
334
+ $this->get();
335
+ $comment = '';
336
+ for(;;) {
337
+ $get = $this->get();
338
+ if ($get === '*') {
339
+ if ($this->peek() === '/') { // end of comment reached
340
+ $this->get();
341
+ if (0 === strpos($comment, '!')) {
342
+ // preserved by YUI Compressor
343
+ if (!$this->keptComment) {
344
+ // don't prepend a newline if two comments right after one another
345
+ $this->keptComment = "\n";
346
+ }
347
+ $this->keptComment .= "/*!" . substr($comment, 1) . "*/\n";
348
+ } else if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
349
+ // IE conditional
350
+ $this->keptComment .= "/*{$comment}*/";
351
+ }
352
+ return;
353
+ }
354
+ } elseif ($get === null) {
355
+ throw new JSMin_UnterminatedCommentException(
356
+ "JSMin: Unterminated comment at byte {$this->inputIndex}: /*{$comment}");
357
+ }
358
+ $comment .= $get;
359
+ }
360
+ }
361
+
362
+ /**
363
+ * Get the next character, skipping over comments. Some comments may be preserved.
364
+ *
365
+ * @return string
366
+ */
367
+ protected function next()
368
+ {
369
+ $get = $this->get();
370
+ if ($get === '/') {
371
+ switch ($this->peek()) {
372
+ case '/':
373
+ $this->consumeSingleLineComment();
374
+ $get = "\n";
375
+ break;
376
+ case '*':
377
+ $this->consumeMultipleLineComment();
378
+ $get = ' ';
379
+ break;
380
+ }
381
+ }
382
+ return $get;
383
+ }
384
+ }
385
+ /**
386
+ * @ignore
387
+ */
388
+ class JSMin_UnterminatedStringException extends Exception {}
389
+ /**
390
+ * @ignore
391
+ */
392
+ class JSMin_UnterminatedCommentException extends Exception {}
393
+ /**
394
+ * @ignore
395
+ */
396
+ class JSMin_UnterminatedRegExpException extends Exception {}
includes/compiler/vendors/lessc.php ADDED
@@ -0,0 +1,3694 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * lessphp v0.4.0
4
+ * http://leafo.net/lessphp
5
+ *
6
+ * LESS css compiler, adapted from http://lesscss.org
7
+ *
8
+ * Copyright 2012, Leaf Corcoran <leafot@gmail.com>
9
+ * Licensed under MIT or GPLv3, see LICENSE
10
+ *
11
+ * @ignore
12
+ */
13
+
14
+
15
+ /**
16
+ * The less compiler and parser.
17
+ *
18
+ * Converting LESS to CSS is a three stage process. The incoming file is parsed
19
+ * by `lessc_parser` into a syntax tree, then it is compiled into another tree
20
+ * representing the CSS structure by `lessc`. The CSS tree is fed into a
21
+ * formatter, like `lessc_formatter` which then outputs CSS as a string.
22
+ *
23
+ * During the first compile, all values are *reduced*, which means that their
24
+ * types are brought to the lowest form before being dump as strings. This
25
+ * handles math equations, variable dereferences, and the like.
26
+ *
27
+ * The `parse` function of `lessc` is the entry point.
28
+ *
29
+ * In summary:
30
+ *
31
+ * The `lessc` class creates an intstance of the parser, feeds it LESS code,
32
+ * then transforms the resulting tree to a CSS tree. This class also holds the
33
+ * evaluation context, such as all available mixins and variables at any given
34
+ * time.
35
+ *
36
+ * The `lessc_parser` class is only concerned with parsing its input.
37
+ *
38
+ * The `lessc_formatter` takes a CSS tree, and dumps it to a formatted string,
39
+ * handling things like indentation.
40
+ *
41
+ * @ignore
42
+ */
43
+ class JupiterX_Lessc {
44
+ static public $VERSION = "v0.4.0";
45
+ static protected $TRUE = array("keyword", "true");
46
+ static protected $FALSE = array("keyword", "false");
47
+
48
+ protected $libFunctions = array();
49
+ protected $registeredVars = array();
50
+ protected $preserveComments = false;
51
+
52
+ public $vPrefix = '@'; // prefix of abstract properties
53
+ public $mPrefix = '$'; // prefix of abstract blocks
54
+ public $parentSelector = '&';
55
+
56
+ public $importDisabled = false;
57
+ public $importDir = '';
58
+
59
+ protected $numberPrecision = null;
60
+
61
+ protected $allParsedFiles = array();
62
+
63
+ // set to the parser that generated the current line when compiling
64
+ // so we know how to create error messages
65
+ protected $sourceParser = null;
66
+ protected $sourceLoc = null;
67
+
68
+ static public $defaultValue = array("keyword", "");
69
+
70
+ static protected $nextImportId = 0; // uniquely identify imports
71
+
72
+ // attempts to find the path of an import url, returns null for css files
73
+ protected function findImport($url) {
74
+ foreach ((array)$this->importDir as $dir) {
75
+ $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url;
76
+ if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) {
77
+ return $file;
78
+ }
79
+ }
80
+
81
+ return null;
82
+ }
83
+
84
+ protected function fileExists($name) {
85
+ return is_file($name);
86
+ }
87
+
88
+ static public function compressList($items, $delim) {
89
+ if (!isset($items[1]) && isset($items[0])) return $items[0];
90
+ else return array('list', $delim, $items);
91
+ }
92
+
93
+ static public function preg_quote($what) {
94
+ return preg_quote($what, '/');
95
+ }
96
+
97
+ protected function tryImport($importPath, $parentBlock, $out) {
98
+ if ($importPath[0] == "function" && $importPath[1] == "url") {
99
+ $importPath = $this->flattenList($importPath[2]);
100
+ }
101
+
102
+ $str = $this->coerceString($importPath);
103
+ if ($str === null) return false;
104
+
105
+ $url = $this->compileValue($this->lib_unquote($str));
106
+
107
+ // don't import if it ends in css
108
+ if (substr_compare($url, '.css', -4, 4) === 0) return false;
109
+
110
+ $realPath = $this->findImport($url);
111
+
112
+ if ($realPath === null) return false;
113
+
114
+ if ($this->importDisabled) {
115
+ return array(false, "/* import disabled */");
116
+ }
117
+
118
+ if (isset($this->allParsedFiles[realpath($realPath)])) {
119
+ return array(false, null);
120
+ }
121
+
122
+ $this->addParsedFile($realPath);
123
+ $parser = $this->makeParser($realPath);
124
+ $root = $parser->parse($GLOBALS['wp_filesystem']->get_contents($realPath));
125
+
126
+ // set the parents of all the block props
127
+ foreach ($root->props as $prop) {
128
+ if ($prop[0] == "block") {
129
+ $prop[1]->parent = $parentBlock;
130
+ }
131
+ }
132
+
133
+ // copy mixins into scope, set their parents
134
+ // bring blocks from import into current block
135
+ // TODO: need to mark the source parser these came from this file
136
+ foreach ($root->children as $childName => $child) {
137
+ if (isset($parentBlock->children[$childName])) {
138
+ $parentBlock->children[$childName] = array_merge(
139
+ $parentBlock->children[$childName],
140
+ $child);
141
+ } else {
142
+ $parentBlock->children[$childName] = $child;
143
+ }
144
+ }
145
+
146
+ $pi = pathinfo($realPath);
147
+ $dir = $pi["dirname"];
148
+
149
+ list($top, $bottom) = $this->sortProps($root->props, true);
150
+ $this->compileImportedProps($top, $parentBlock, $out, $parser, $dir);
151
+
152
+ return array(true, $bottom, $parser, $dir);
153
+ }
154
+
155
+ protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir) {
156
+ $oldSourceParser = $this->sourceParser;
157
+
158
+ $oldImport = $this->importDir;
159
+
160
+ // TODO: this is because the importDir api is stupid
161
+ $this->importDir = (array)$this->importDir;
162
+ array_unshift($this->importDir, $importDir);
163
+
164
+ foreach ($props as $prop) {
165
+ $this->compileProp($prop, $block, $out);
166
+ }
167
+
168
+ $this->importDir = $oldImport;
169
+ $this->sourceParser = $oldSourceParser;
170
+ }
171
+
172
+ /**
173
+ * Recursively compiles a block.
174
+ *
175
+ * A block is analogous to a CSS block in most cases. A single LESS document
176
+ * is encapsulated in a block when parsed, but it does not have parent tags
177
+ * so all of it's children appear on the root level when compiled.
178
+ *
179
+ * Blocks are made up of props and children.
180
+ *
181
+ * Props are property instructions, array tuples which describe an action
182
+ * to be taken, eg. write a property, set a variable, mixin a block.
183
+ *
184
+ * The children of a block are just all the blocks that are defined within.
185
+ * This is used to look up mixins when performing a mixin.
186
+ *
187
+ * Compiling the block involves pushing a fresh environment on the stack,
188
+ * and iterating through the props, compiling each one.
189
+ *
190
+ * See lessc::compileProp()
191
+ *
192
+ */
193
+ protected function compileBlock($block) {
194
+ switch ($block->type) {
195
+ case "root":
196
+ $this->compileRoot($block);
197
+ break;
198
+ case null:
199
+ $this->compileCSSBlock($block);
200
+ break;
201
+ case "media":
202
+ $this->compileMedia($block);
203
+ break;
204
+ case "directive":
205
+ $name = "@" . $block->name;
206
+ if (!empty($block->value)) {
207
+ $name .= " " . $this->compileValue($this->reduce($block->value));
208
+ }
209
+
210
+ $this->compileNestedBlock($block, array($name));
211
+ break;
212
+ default:
213
+ $this->throwError("unknown block type: $block->type\n");
214
+ }
215
+ }
216
+
217
+ protected function compileCSSBlock($block) {
218
+ $env = $this->pushEnv();
219
+
220
+ $selectors = $this->compileSelectors($block->tags);
221
+ $env->selectors = $this->multiplySelectors($selectors);
222
+ $out = $this->makeOutputBlock(null, $env->selectors);
223
+
224
+ $this->scope->children[] = $out;
225
+ $this->compileProps($block, $out);
226
+
227
+ $block->scope = $env; // mixins carry scope with them!
228
+ $this->popEnv();
229
+ }
230
+
231
+ protected function compileMedia($media) {
232
+ $env = $this->pushEnv($media);
233
+ $parentScope = $this->mediaParent($this->scope);
234
+
235
+ $query = $this->compileMediaQuery($this->multiplyMedia($env));
236
+
237
+ $this->scope = $this->makeOutputBlock($media->type, array($query));
238
+ $parentScope->children[] = $this->scope;
239
+
240
+ $this->compileProps($media, $this->scope);
241
+
242
+ if (count($this->scope->lines) > 0) {
243
+ $orphanSelelectors = $this->findClosestSelectors();
244
+ if (!is_null($orphanSelelectors)) {
245
+ $orphan = $this->makeOutputBlock(null, $orphanSelelectors);
246
+ $orphan->lines = $this->scope->lines;
247
+ array_unshift($this->scope->children, $orphan);
248
+ $this->scope->lines = array();
249
+ }
250
+ }
251
+
252
+ $this->scope = $this->scope->parent;
253
+ $this->popEnv();
254
+ }
255
+
256
+ protected function mediaParent($scope) {
257
+ while (!empty($scope->parent)) {
258
+ if (!empty($scope->type) && $scope->type != "media") {
259
+ break;
260
+ }
261
+ $scope = $scope->parent;
262
+ }
263
+
264
+ return $scope;
265
+ }
266
+
267
+ protected function compileNestedBlock($block, $selectors) {
268
+ $this->pushEnv($block);
269
+ $this->scope = $this->makeOutputBlock($block->type, $selectors);
270
+ $this->scope->parent->children[] = $this->scope;
271
+
272
+ $this->compileProps($block, $this->scope);
273
+
274
+ $this->scope = $this->scope->parent;
275
+ $this->popEnv();
276
+ }
277
+
278
+ protected function compileRoot($root) {
279
+ $this->pushEnv();
280
+ $this->scope = $this->makeOutputBlock($root->type);
281
+ $this->compileProps($root, $this->scope);
282
+ $this->popEnv();
283
+ }
284
+
285
+ protected function compileProps($block, $out) {
286
+ foreach ($this->sortProps($block->props) as $prop) {
287
+ $this->compileProp($prop, $block, $out);
288
+ }
289
+
290
+ $out->lines = array_values(array_unique($out->lines));
291
+ }
292
+
293
+ protected function sortProps($props, $split = false) {
294
+ $vars = array();
295
+ $imports = array();
296
+ $other = array();
297
+
298
+ foreach ($props as $prop) {
299
+ switch ($prop[0]) {
300
+ case "assign":
301
+ if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) {
302
+ $vars[] = $prop;
303
+ } else {
304
+ $other[] = $prop;
305
+ }
306
+ break;
307
+ case "import":
308
+ $id = self::$nextImportId++;
309
+ $prop[] = $id;
310
+ $imports[] = $prop;
311
+ $other[] = array("import_mixin", $id);
312
+ break;
313
+ default:
314
+ $other[] = $prop;
315
+ }
316
+ }
317
+
318
+ if ($split) {
319
+ return array(array_merge($vars, $imports), $other);
320
+ } else {
321
+ return array_merge($vars, $imports, $other);
322
+ }
323
+ }
324
+
325
+ protected function compileMediaQuery($queries) {
326
+ $compiledQueries = array();
327
+ foreach ($queries as $query) {
328
+ $parts = array();
329
+ foreach ($query as $q) {
330
+ switch ($q[0]) {
331
+ case "mediaType":
332
+ $parts[] = implode(" ", array_slice($q, 1));
333
+ break;
334
+ case "mediaExp":
335
+ if (isset($q[2])) {
336
+ $parts[] = "($q[1]: " .
337
+ $this->compileValue($this->reduce($q[2])) . ")";
338
+ } else {
339
+ $parts[] = "($q[1])";
340
+ }
341
+ break;
342
+ case "variable":
343
+ $parts[] = $this->compileValue($this->reduce($q));
344
+ break;
345
+ }
346
+ }
347
+
348
+ if (count($parts) > 0) {
349
+ $compiledQueries[] = implode(" and ", $parts);
350
+ }
351
+ }
352
+
353
+ $out = "@media";
354
+ if (!empty($parts)) {
355
+ $out .= " " .
356
+ implode($this->formatter->selectorSeparator, $compiledQueries);
357
+ }
358
+ return $out;
359
+ }
360
+
361
+ protected function multiplyMedia($env, $childQueries = null) {
362
+ if (is_null($env) ||
363
+ !empty($env->block->type) && $env->block->type != "media")
364
+ {
365
+ return $childQueries;
366
+ }
367
+
368
+ // plain old block, skip
369
+ if (empty($env->block->type)) {
370
+ return $this->multiplyMedia($env->parent, $childQueries);
371
+ }
372
+
373
+ $out = array();
374
+ $queries = $env->block->queries;
375
+ if (is_null($childQueries)) {
376
+ $out = $queries;
377
+ } else {
378
+ foreach ($queries as $parent) {
379
+ foreach ($childQueries as $child) {
380
+ $out[] = array_merge($parent, $child);
381
+ }
382
+ }
383
+ }
384
+
385
+ return $this->multiplyMedia($env->parent, $out);
386
+ }
387
+
388
+ protected function expandParentSelectors(&$tag, $replace) {
389
+ $parts = explode("$&$", $tag);
390
+ $count = 0;
391
+ foreach ($parts as &$part) {
392
+ $part = str_replace($this->parentSelector, $replace, $part, $c);
393
+ $count += $c;
394
+ }
395
+ $tag = implode($this->parentSelector, $parts);
396
+ return $count;
397
+ }
398
+
399
+ protected function findClosestSelectors() {
400
+ $env = $this->env;
401
+ $selectors = null;
402
+ while ($env !== null) {
403
+ if (isset($env->selectors)) {
404
+ $selectors = $env->selectors;
405
+ break;
406
+ }
407
+ $env = $env->parent;
408
+ }
409
+
410
+ return $selectors;
411
+ }
412
+
413
+
414
+ // multiply $selectors against the nearest selectors in env
415
+ protected function multiplySelectors($selectors) {
416
+ // find parent selectors
417
+
418
+ $parentSelectors = $this->findClosestSelectors();
419
+ if (is_null($parentSelectors)) {
420
+ // kill parent reference in top level selector
421
+ foreach ($selectors as &$s) {
422
+ $this->expandParentSelectors($s, "");
423
+ }
424
+
425
+ return $selectors;
426
+ }
427
+
428
+ $out = array();
429
+ foreach ($parentSelectors as $parent) {
430
+ foreach ($selectors as $child) {
431
+ $count = $this->expandParentSelectors($child, $parent);
432
+
433
+ // don't prepend the parent tag if & was used
434
+ if ($count > 0) {
435
+ $out[] = trim($child);
436
+ } else {
437
+ $out[] = trim($parent . ' ' . $child);
438
+ }
439
+ }
440
+ }
441
+
442
+ return $out;
443
+ }
444
+
445
+ // reduces selector expressions
446
+ protected function compileSelectors($selectors) {
447
+ $out = array();
448
+
449
+ foreach ($selectors as $s) {
450
+ if (is_array($s)) {
451
+ list(, $value) = $s;
452
+ $out[] = trim($this->compileValue($this->reduce($value)));
453
+ } else {
454
+ $out[] = $s;
455
+ }
456
+ }
457
+
458
+ return $out;
459
+ }
460
+
461
+ protected function eq($left, $right) {
462
+ return $left == $right;
463
+ }
464
+
465
+ protected function patternMatch($block, $orderedArgs, $keywordArgs) {
466
+ // match the guards if it has them
467
+ // any one of the groups must have all its guards pass for a match
468
+ if (!empty($block->guards)) {
469
+ $groupPassed = false;
470
+ foreach ($block->guards as $guardGroup) {
471
+ foreach ($guardGroup as $guard) {
472
+ $this->pushEnv();
473
+ $this->zipSetArgs($block->args, $orderedArgs, $keywordArgs);
474
+
475
+ $negate = false;
476
+ if ($guard[0] == "negate") {
477
+ $guard = $guard[1];
478
+ $negate = true;
479
+ }
480
+
481
+ $passed = $this->reduce($guard) == self::$TRUE;
482
+ if ($negate) $passed = !$passed;
483
+
484
+ $this->popEnv();
485
+
486
+ if ($passed) {
487
+ $groupPassed = true;
488
+ } else {
489
+ $groupPassed = false;
490
+ break;
491
+ }
492
+ }
493
+
494
+ if ($groupPassed) break;
495
+ }
496
+
497
+ if (!$groupPassed) {
498
+ return false;
499
+ }
500
+ }
501
+
502
+ if (empty($block->args)) {
503
+ return $block->isVararg || empty($orderedArgs) && empty($keywordArgs);
504
+ }
505
+
506
+ $remainingArgs = $block->args;
507
+ if ($keywordArgs) {
508
+ $remainingArgs = array();
509
+ foreach ($block->args as $arg) {
510
+ if ($arg[0] == "arg" && isset($keywordArgs[$arg[1]])) {
511
+ continue;
512
+ }
513
+
514
+ $remainingArgs[] = $arg;
515
+ }
516
+ }
517
+
518
+ $i = -1; // no args
519
+ // try to match by arity or by argument literal
520
+ foreach ($remainingArgs as $i => $arg) {
521
+ switch ($arg[0]) {
522
+ case "lit":
523
+ if (empty($orderedArgs[$i]) || !$this->eq($arg[1], $orderedArgs[$i])) {
524
+ return false;
525
+ }
526
+ break;
527
+ case "arg":
528
+ // no arg and no default value
529
+ if (!isset($orderedArgs[$i]) && !isset($arg[2])) {
530
+ return false;
531
+ }
532
+ break;
533
+ case "rest":
534
+ $i--; // rest can be empty
535
+ break 2;
536
+ }
537
+ }
538
+
539
+ if ($block->isVararg) {
540
+ return true; // not having enough is handled above
541
+ } else {
542
+ $numMatched = $i + 1;
543
+ // greater than becuase default values always match
544
+ return $numMatched >= count($orderedArgs);
545
+ }
546
+ }
547
+
548
+ protected function patternMatchAll($blocks, $orderedArgs, $keywordArgs, $skip=array()) {
549
+ $matches = null;
550
+ foreach ($blocks as $block) {
551
+ // skip seen blocks that don't have arguments
552
+ if (isset($skip[$block->id]) && !isset($block->args)) {
553
+ continue;
554
+ }
555
+
556
+ if ($this->patternMatch($block, $orderedArgs, $keywordArgs)) {
557
+ $matches[] = $block;
558
+ }
559
+ }
560
+
561
+ return $matches;
562
+ }
563
+
564
+ // attempt to find blocks matched by path and args
565
+ protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) {
566
+ if ($searchIn == null) return null;
567
+ if (isset($seen[$searchIn->id])) return null;
568
+ $seen[$searchIn->id] = true;
569
+
570
+ $name = $path[0];
571
+
572
+ if (isset($searchIn->children[$name])) {
573
+ $blocks = $searchIn->children[$name];
574
+ if (count($path) == 1) {
575
+ $matches = $this->patternMatchAll($blocks, $orderedArgs, $keywordArgs, $seen);
576
+ if (!empty($matches)) {
577
+ // This will return all blocks that match in the closest
578
+ // scope that has any matching block, like lessjs
579
+ return $matches;
580
+ }
581
+ } else {
582
+ $matches = array();
583
+ foreach ($blocks as $subBlock) {
584
+ $subMatches = $this->findBlocks($subBlock,
585
+ array_slice($path, 1), $orderedArgs, $keywordArgs, $seen);
586
+
587
+ if (!is_null($subMatches)) {
588
+ foreach ($subMatches as $sm) {
589
+ $matches[] = $sm;
590
+ }
591
+ }
592
+ }
593
+
594
+ return count($matches) > 0 ? $matches : null;
595
+ }
596
+ }
597
+ if ($searchIn->parent === $searchIn) return null;
598
+ return $this->findBlocks($searchIn->parent, $path, $orderedArgs, $keywordArgs, $seen);
599
+ }
600
+
601
+ // sets all argument names in $args to either the default value
602
+ // or the one passed in through $values
603
+ protected function zipSetArgs($args, $orderedValues, $keywordValues) {
604
+ $assignedValues = array();
605
+
606
+ $i = 0;
607
+ foreach ($args as $a) {
608
+ if ($a[0] == "arg") {
609
+ if (isset($keywordValues[$a[1]])) {
610
+ // has keyword arg
611
+ $value = $keywordValues[$a[1]];
612
+ } elseif (isset($orderedValues[$i])) {
613
+ // has ordered arg
614
+ $value = $orderedValues[$i];
615
+ $i++;
616
+ } elseif (isset($a[2])) {
617
+ // has default value
618
+ $value = $a[2];
619
+ } else {
620
+ $this->throwError("Failed to assign arg " . $a[1]);
621
+ $value = null; // :(
622
+ }
623
+
624
+ $value = $this->reduce($value);
625
+ $this->set($a[1], $value);
626
+ $assignedValues[] = $value;
627
+ } else {
628
+ // a lit
629
+ $i++;
630
+ }
631
+ }
632
+
633
+ // check for a rest
634
+ $last = end($args);
635
+ if ($last[0] == "rest") {
636
+ $rest = array_slice($orderedValues, count($args) - 1);
637
+ $this->set($last[1], $this->reduce(array("list", " ", $rest)));
638
+ }
639
+
640
+ // wow is this the only true use of PHP's + operator for arrays?
641
+ $this->env->arguments = $assignedValues + $orderedValues;
642
+ }
643
+
644
+ // compile a prop and update $lines or $blocks appropriately
645
+ protected function compileProp($prop, $block, $out) {
646
+ // set error position context
647
+ $this->sourceLoc = isset($prop[-1]) ? $prop[-1] : -1;
648
+
649
+ switch ($prop[0]) {
650
+ case 'assign':
651
+ list(, $name, $value) = $prop;
652
+ if ($name[0] == $this->vPrefix) {
653
+ $this->set($name, $value);
654
+ } else {
655
+ $out->lines[] = $this->formatter->property($name,
656
+ $this->compileValue($this->reduce($value)));
657
+ }
658
+ break;
659
+ case 'block':
660
+ list(, $child) = $prop;
661
+ $this->compileBlock($child);
662
+ break;
663
+ case 'mixin':
664
+ list(, $path, $args, $suffix) = $prop;
665
+
666
+ $orderedArgs = array();
667
+ $keywordArgs = array();
668
+ foreach ((array)$args as $arg) {
669
+ $argval = null;
670
+ switch ($arg[0]) {
671
+ case "arg":
672
+ if (!isset($arg[2])) {
673
+ $orderedArgs[] = $this->reduce(array("variable", $arg[1]));
674
+ } else {
675
+ $keywordArgs[$arg[1]] = $this->reduce($arg[2]);
676
+ }
677
+ break;
678
+
679
+ case "lit":
680
+ $orderedArgs[] = $this->reduce($arg[1]);
681
+ break;
682
+ default:
683
+ $this->throwError("Unknown arg type: " . $arg[0]);
684
+ }
685
+ }
686
+
687
+ $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs);
688
+
689
+ if ($mixins === null) {
690
+ break; // throw error here??
691
+ }
692
+
693
+ foreach ($mixins as $mixin) {
694
+ if ($mixin === $block && !$orderedArgs) {
695
+ continue;
696
+ }
697
+
698
+ $haveScope = false;
699
+ if (isset($mixin->parent->scope)) {
700
+ $haveScope = true;
701
+ $mixinParentEnv = $this->pushEnv();
702
+ $mixinParentEnv->storeParent = $mixin->parent->scope;
703
+ }
704
+
705
+ $haveArgs = false;
706
+ if (isset($mixin->args)) {
707
+ $haveArgs = true;
708
+ $this->pushEnv();
709
+ $this->zipSetArgs($mixin->args, $orderedArgs, $keywordArgs);
710
+ }
711
+
712
+ $oldParent = $mixin->parent;
713
+ if ($mixin != $block) $mixin->parent = $block;
714
+
715
+ foreach ($this->sortProps($mixin->props) as $subProp) {
716
+ if ($suffix !== null &&
717
+ $subProp[0] == "assign" &&
718
+ is_string($subProp[1]) &&
719
+ $subProp[1]{0} != $this->vPrefix)
720
+ {
721
+ $subProp[2] = array(
722
+ 'list', ' ',
723
+ array($subProp[2], array('keyword', $suffix))
724
+ );
725
+ }
726
+
727
+ $this->compileProp($subProp, $mixin, $out);
728
+ }
729
+
730
+ $mixin->parent = $oldParent;
731
+
732
+ if ($haveArgs) $this->popEnv();
733
+ if ($haveScope) $this->popEnv();
734
+ }
735
+
736
+ break;
737
+ case 'raw':
738
+ $out->lines[] = $prop[1];
739
+ break;
740
+ case "directive":
741
+ list(, $name, $value) = $prop;
742
+ $out->lines[] = "@$name " . $this->compileValue($this->reduce($value)).';';
743
+ break;
744
+ case "comment":
745
+ $out->lines[] = $prop[1];
746
+ break;
747
+ case "import";
748
+ list(, $importPath, $importId) = $prop;
749
+ $importPath = $this->reduce($importPath);
750
+
751
+ if (!isset($this->env->imports)) {
752
+ $this->env->imports = array();
753
+ }
754
+
755
+ $result = $this->tryImport($importPath, $block, $out);
756
+
757
+ $this->env->imports[$importId] = $result === false ?
758
+ array(false, "@import " . $this->compileValue($importPath).";") :
759
+ $result;
760
+
761
+ break;
762
+ case "import_mixin":
763
+ list(,$importId) = $prop;
764
+ $import = $this->env->imports[$importId];
765
+ if ($import[0] === false) {
766
+ if (isset($import[1])) {
767
+ $out->lines[] = $import[1];
768
+ }
769
+ } else {
770
+ list(, $bottom, $parser, $importDir) = $import;
771
+ $this->compileImportedProps($bottom, $block, $out, $parser, $importDir);
772
+ }
773
+
774
+ break;
775
+ default:
776
+ $this->throwError("unknown op: {$prop[0]}\n");
777
+ }
778
+ }
779
+
780
+
781
+ /**
782
+ * Compiles a primitive value into a CSS property value.
783
+ *
784
+ * Values in lessphp are typed by being wrapped in arrays, their format is
785
+ * typically:
786
+ *
787
+ * array(type, contents [, additional_contents]*)
788
+ *
789
+ * The input is expected to be reduced. This function will not work on
790
+ * things like expressions and variables.
791
+ */
792
+ protected function compileValue($value) {
793
+ switch ($value[0]) {
794
+ case 'list':
795
+ // [1] - delimiter
796
+ // [2] - array of values
797
+ return implode($value[1], array_map(array($this, 'compileValue'), $value[2]));
798
+ case 'raw_color':
799
+ if (!empty($this->formatter->compressColors)) {
800
+ return $this->compileValue($this->coerceColor($value));
801
+ }
802
+ return $value[1];
803
+ case 'keyword':
804
+ // [1] - the keyword
805
+ return $value[1];
806
+ case 'number':
807
+ list(, $num, $unit) = $value;
808
+ // [1] - the number
809
+ // [2] - the unit
810
+ if ($this->numberPrecision !== null) {
811
+ $num = round($num, $this->numberPrecision);
812
+ }
813
+ return $num . $unit;
814
+ case 'string':
815
+ // [1] - contents of string (includes quotes)
816
+ list(, $delim, $content) = $value;
817
+ foreach ($content as &$part) {
818
+ if (is_array($part)) {
819
+ $part = $this->compileValue($part);
820
+ }
821
+ }
822
+ return $delim . implode($content) . $delim;
823
+ case 'color':
824
+ // [1] - red component (either number or a %)
825
+ // [2] - green component
826
+ // [3] - blue component
827
+ // [4] - optional alpha component
828
+ list(, $r, $g, $b) = $value;
829
+ $r = round($r);
830
+ $g = round($g);
831
+ $b = round($b);
832
+
833
+ if (count($value) == 5 && $value[4] != 1) { // rgba
834
+ return 'rgba('.$r.','.$g.','.$b.','.$value[4].')';
835
+ }
836
+
837
+ $h = sprintf("#%02x%02x%02x", $r, $g, $b);
838
+
839
+ if (!empty($this->formatter->compressColors)) {
840
+ // Converting hex color to short notation (e.g. #003399 to #039)
841
+ if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) {
842
+ $h = '#' . $h[1] . $h[3] . $h[5];
843
+ }
844
+ }
845
+
846
+ return $h;
847
+
848
+ case 'function':
849
+ list(, $name, $args) = $value;
850
+ return $name.'('.$this->compileValue($args).')';
851
+ default: // assumed to be unit
852
+ $this->throwError("unknown value type: $value[0]");
853
+ }
854
+ }
855
+
856
+ protected function lib_pow($args) {
857
+ list($base, $exp) = $this->assertArgs($args, 2, "pow");
858
+ return pow($this->assertNumber($base), $this->assertNumber($exp));
859
+ }
860
+
861
+ protected function lib_pi() {
862
+ return pi();
863
+ }
864
+
865
+ protected function lib_mod($args) {
866
+ list($a, $b) = $this->assertArgs($args, 2, "mod");
867
+ return $this->assertNumber($a) % $this->assertNumber($b);
868
+ }
869
+
870
+ protected function lib_tan($num) {
871
+ return tan($this->assertNumber($num));
872
+ }
873
+
874
+ protected function lib_sin($num) {
875
+ return sin($this->assertNumber($num));
876
+ }
877
+
878
+ protected function lib_cos($num) {
879
+ return cos($this->assertNumber($num));
880
+ }
881
+
882
+ protected function lib_atan($num) {
883
+ $num = atan($this->assertNumber($num));
884
+ return array("number", $num, "rad");
885
+ }
886
+
887
+ protected function lib_asin($num) {
888
+ $num = asin($this->assertNumber($num));
889
+ return array("number", $num, "rad");
890
+ }
891
+
892
+ protected function lib_acos($num) {
893
+ $num = acos($this->assertNumber($num));
894
+ return array("number", $num, "rad");
895
+ }
896
+
897
+ protected function lib_sqrt($num) {
898
+ return sqrt($this->assertNumber($num));
899
+ }
900
+
901
+ protected function lib_extract($value) {
902
+ list($list, $idx) = $this->assertArgs($value, 2, "extract");
903
+ $idx = $this->assertNumber($idx);
904
+ // 1 indexed
905
+ if ($list[0] == "list" && isset($list[2][$idx - 1])) {
906
+ return $list[2][$idx - 1];
907
+ }
908
+ }
909
+
910
+ protected function lib_isnumber($value) {
911
+ return $this->toBool($value[0] == "number");
912
+ }
913
+
914
+ protected function lib_isstring($value) {
915
+ return $this->toBool($value[0] == "string");
916
+ }
917
+
918
+ protected function lib_iscolor($value) {
919
+ return $this->toBool($this->coerceColor($value));
920
+ }
921
+
922
+ protected function lib_iskeyword($value) {
923
+ return $this->toBool($value[0] == "keyword");
924
+ }
925
+
926
+ protected function lib_ispixel($value) {
927
+ return $this->toBool($value[0] == "number" && $value[2] == "px");
928
+ }
929
+
930
+ protected function lib_ispercentage($value) {
931
+ return $this->toBool($value[0] == "number" && $value[2] == "%");
932
+ }
933
+
934
+ protected function lib_isem($value) {
935
+ return $this->toBool($value[0] == "number" && $value[2] == "em");
936
+ }
937
+
938
+ protected function lib_isrem($value) {
939
+ return $this->toBool($value[0] == "number" && $value[2] == "rem");
940
+ }
941
+
942
+ protected function lib_rgbahex($color) {
943
+ $color = $this->coerceColor($color);
944
+ if (is_null($color))
945
+ $this->throwError("color expected for rgbahex");
946
+
947
+ return sprintf("#%02x%02x%02x%02x",
948
+ isset($color[4]) ? $color[4]*255 : 255,
949
+ $color[1],$color[2], $color[3]);
950
+ }
951
+
952
+ protected function lib_argb($color){
953
+ return $this->lib_rgbahex($color);
954
+ }
955
+
956
+ // utility func to unquote a string
957
+ // use func_get_arg to prevent Theme Checker triggering unrelated translation warning.
958
+ protected function lib_e() {
959
+ $arg = func_get_arg(0);
960
+ switch ($arg[0]) {
961
+ case "list":
962
+ $items = $arg[2];
963
+ if (isset($items[0])) {
964
+ return $this->lib_unquote($items[0]);
965
+ }
966
+ return self::$defaultValue;
967
+ case "string":
968
+ $arg[1] = "";
969
+ return $arg;
970
+ case "keyword":
971
+ return $arg;
972
+ default:
973
+ return array("keyword", $this->compileValue($arg));
974
+ }
975
+ }
976
+
977
+ // use func_get_arg to prevent Theme Checker triggering unrelated translation warning.
978
+ protected function lib_unquote($arg) {
979
+ return $this->lib_e(func_get_arg(0));
980
+ }
981
+
982
+ protected function lib__sprintf($args) {
983
+ if ($args[0] != "list") return $args;
984
+ $values = $args[2];
985
+ $string = array_shift($values);
986
+ $template = $this->compileValue($this->lib_unquote($string));
987
+
988
+ $i = 0;
989
+ if (preg_match_all('/%[dsa]/', $template, $m)) {
990
+ foreach ($m[0] as $match) {
991
+ $val = isset($values[$i]) ?
992
+ $this->reduce($values[$i]) : array('keyword', '');
993
+
994
+ // lessjs compat, renders fully expanded color, not raw color
995
+ if ($color = $this->coerceColor($val)) {
996
+ $val = $color;
997
+ }
998
+
999
+ $i++;
1000
+ $rep = $this->compileValue($this->lib_unquote($val));
1001
+ $template = preg_replace('/'.self::preg_quote($match).'/',
1002
+ $rep, $template, 1);
1003
+ }
1004
+ }
1005
+
1006
+ $d = $string[0] == "string" ? $string[1] : '"';
1007
+ return array("string", $d, array($template));
1008
+ }
1009
+
1010
+ protected function lib_floor($arg) {
1011
+ $value = $this->assertNumber($arg);
1012
+ return array("number", floor($value), $arg[2]);
1013
+ }
1014
+
1015
+ protected function lib_ceil($arg) {
1016
+ $value = $this->assertNumber($arg);
1017
+ return array("number", ceil($value), $arg[2]);
1018
+ }
1019
+
1020
+ protected function lib_round($arg) {
1021
+ $value = $this->assertNumber($arg);
1022
+ return array("number", round($value), $arg[2]);
1023
+ }
1024
+
1025
+ protected function lib_unit($arg) {
1026
+ if ($arg[0] == "list") {
1027
+ list($number, $newUnit) = $arg[2];
1028
+ return array("number", $this->assertNumber($number),
1029
+ $this->compileValue($this->lib_unquote($newUnit)));
1030
+ } else {
1031
+ return array("number", $this->assertNumber($arg), "");
1032
+ }
1033
+ }
1034
+
1035
+ /**
1036
+ * Helper function to get arguments for color manipulation functions.
1037
+ * takes a list that contains a color like thing and a percentage
1038
+ */
1039
+ protected function colorArgs($args) {
1040
+ if ($args[0] != 'list' || count($args[2]) < 2) {
1041
+ return array(array('color', 0, 0, 0), 0);
1042
+ }
1043
+ list($color, $delta) = $args[2];
1044
+ $color = $this->assertColor($color);
1045
+ $delta = floatval($delta[1]);
1046
+
1047
+ return array($color, $delta);
1048
+ }
1049
+
1050
+ protected function lib_darken($args) {
1051
+ list($color, $delta) = $this->colorArgs($args);
1052
+
1053
+ $hsl = $this->toHSL($color);
1054
+ $hsl[3] = $this->clamp($hsl[3] - $delta, 100);
1055
+ return $this->toRGB($hsl);
1056
+ }
1057
+
1058
+ protected function lib_lighten($args) {
1059
+ list($color, $delta) = $this->colorArgs($args);
1060
+
1061
+ $hsl = $this->toHSL($color);
1062
+ $hsl[3] = $this->clamp($hsl[3] + $delta, 100);
1063
+ return $this->toRGB($hsl);
1064
+ }
1065
+
1066
+ protected function lib_saturate($args) {
1067
+ list($color, $delta) = $this->colorArgs($args);
1068
+
1069
+ $hsl = $this->toHSL($color);
1070
+ $hsl[2] = $this->clamp($hsl[2] + $delta, 100);
1071
+ return $this->toRGB($hsl);
1072
+ }
1073
+
1074
+ protected function lib_desaturate($args) {
1075
+ list($color, $delta) = $this->colorArgs($args);
1076
+
1077
+ $hsl = $this->toHSL($color);
1078
+ $hsl[2] = $this->clamp($hsl[2] - $delta, 100);
1079
+ return $this->toRGB($hsl);
1080
+ }
1081
+
1082
+ protected function lib_spin($args) {
1083
+ list($color, $delta) = $this->colorArgs($args);
1084
+
1085
+ $hsl = $this->toHSL($color);
1086
+
1087
+ $hsl[1] = $hsl[1] + $delta % 360;
1088
+ if ($hsl[1] < 0) $hsl[1] += 360;
1089
+
1090
+ return $this->toRGB($hsl);
1091
+ }
1092
+
1093
+ protected function lib_fadeout($args) {
1094
+ list($color, $delta) = $this->colorArgs($args);
1095
+ $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100);
1096
+ return $color;
1097
+ }
1098
+
1099
+ protected function lib_fadein($args) {
1100
+ list($color, $delta) = $this->colorArgs($args);
1101
+ $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100);
1102
+ return $color;
1103
+ }
1104
+
1105
+ protected function lib_hue($color) {
1106
+ $hsl = $this->toHSL($this->assertColor($color));
1107
+ return round($hsl[1]);
1108
+ }
1109
+
1110
+ protected function lib_saturation($color) {
1111
+ $hsl = $this->toHSL($this->assertColor($color));
1112
+ return round($hsl[2]);
1113
+ }
1114
+
1115
+ protected function lib_lightness($color) {
1116
+ $hsl = $this->toHSL($this->assertColor($color));
1117
+ return round($hsl[3]);
1118
+ }
1119
+
1120
+ // get the alpha of a color
1121
+ // defaults to 1 for non-colors or colors without an alpha
1122
+ protected function lib_alpha($value) {
1123
+ if (!is_null($color = $this->coerceColor($value))) {
1124
+ return isset($color[4]) ? $color[4] : 1;
1125
+ }
1126
+ }
1127
+
1128
+ // set the alpha of the color
1129
+ protected function lib_fade($args) {
1130
+ list($color, $alpha) = $this->colorArgs($args);
1131
+ $color[4] = $this->clamp($alpha / 100.0);
1132
+ return $color;
1133
+ }
1134
+
1135
+ protected function lib_percentage($arg) {
1136
+ $num = $this->assertNumber($arg);
1137
+ return array("number", $num*100, "%");
1138
+ }
1139
+
1140
+ // mixes two colors by weight
1141
+ // mix(@color1, @color2, [@weight: 50%]);
1142
+ // http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method
1143
+ protected function lib_mix($args) {
1144
+ if ($args[0] != "list" || count($args[2]) < 2)
1145
+ $this->throwError("mix expects (color1, color2, weight)");
1146
+
1147
+ list($first, $second) = $args[2];
1148
+ $first = $this->assertColor($first);
1149
+ $second = $this->assertColor($second);
1150
+
1151
+ $first_a = $this->lib_alpha($first);
1152
+ $second_a = $this->lib_alpha($second);
1153
+
1154
+ if (isset($args[2][2])) {
1155
+ $weight = $args[2][2][1] / 100.0;
1156
+ } else {
1157
+ $weight = 0.5;
1158
+ }
1159
+
1160
+ $w = $weight * 2 - 1;
1161
+ $a = $first_a - $second_a;
1162
+
1163
+ $w1 = (($w * $a == -1 ? $w : ($w + $a)/(1 + $w * $a)) + 1) / 2.0;
1164
+ $w2 = 1.0 - $w1;
1165
+
1166
+ $new = array('color',
1167
+ $w1 * $first[1] + $w2 * $second[1],
1168
+ $w1 * $first[2] + $w2 * $second[2],
1169
+ $w1 * $first[3] + $w2 * $second[3],
1170
+ );
1171
+
1172
+ if ($first_a != 1.0 || $second_a != 1.0) {
1173
+ $new[] = $first_a * $weight + $second_a * ($weight - 1);
1174
+ }
1175
+
1176
+ return $this->fixColor($new);
1177
+ }
1178
+
1179
+ protected function lib_contrast($args) {
1180
+ if ($args[0] != 'list' || count($args[2]) < 3) {
1181
+ return array(array('color', 0, 0, 0), 0);
1182
+ }
1183
+
1184
+ list($inputColor, $darkColor, $lightColor) = $args[2];
1185
+
1186
+ $inputColor = $this->assertColor($inputColor);
1187
+ $darkColor = $this->assertColor($darkColor);
1188
+ $lightColor = $this->assertColor($lightColor);
1189
+ $hsl = $this->toHSL($inputColor);
1190
+
1191
+ if ($hsl[3] > 50) {
1192
+ return $darkColor;
1193
+ }
1194
+
1195
+ return $lightColor;
1196
+ }
1197
+
1198
+ protected function assertColor($value, $error = "expected color value") {
1199
+ $color = $this->coerceColor($value);
1200
+ if (is_null($color)) $this->throwError($error);
1201
+ return $color;
1202
+ }
1203
+
1204
+ protected function assertNumber($value, $error = "expecting number") {
1205
+ if ($value[0] == "number") return $value[1];
1206
+ $this->throwError($error);
1207
+ }
1208
+
1209
+ protected function assertArgs($value, $expectedArgs, $name="") {
1210
+ if ($expectedArgs == 1) {
1211
+ return $value;
1212
+ } else {
1213
+ if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list");
1214
+ $values = $value[2];
1215
+ $numValues = count($values);
1216
+ if ($expectedArgs != $numValues) {
1217
+ if ($name) {
1218
+ $name = $name . ": ";
1219
+ }
1220
+
1221
+ $this->throwError("${name}expecting $expectedArgs arguments, got $numValues");
1222
+ }
1223
+
1224
+ return $values;
1225
+ }
1226
+ }
1227
+
1228
+ protected function toHSL($color) {
1229
+ if ($color[0] == 'hsl') return $color;
1230
+
1231
+ $r = $color[1] / 255;
1232
+ $g = $color[2] / 255;
1233
+ $b = $color[3] / 255;
1234
+
1235
+ $min = min($r, $g, $b);
1236
+ $max = max($r, $g, $b);
1237
+
1238
+ $L = ($min + $max) / 2;
1239
+ if ($min == $max) {
1240
+ $S = $H = 0;
1241
+ } else {
1242
+ if ($L < 0.5)
1243
+ $S = ($max - $min)/($max + $min);
1244
+ else
1245
+ $S = ($max - $min)/(2.0 - $max - $min);
1246
+
1247
+ if ($r == $max) $H = ($g - $b)/($max - $min);
1248
+ elseif ($g == $max) $H = 2.0 + ($b - $r)/($max - $min);
1249
+ elseif ($b == $max) $H = 4.0 + ($r - $g)/($max - $min);
1250
+
1251
+ }
1252
+
1253
+ $out = array('hsl',
1254
+ ($H < 0 ? $H + 6 : $H)*60,
1255
+ $S*100,
1256
+ $L*100,
1257
+ );
1258
+
1259
+ if (count($color) > 4) $out[] = $color[4]; // copy alpha
1260
+ return $out;
1261
+ }
1262
+
1263
+ protected function toRGB_helper($comp, $temp1, $temp2) {
1264
+ if ($comp < 0) $comp += 1.0;
1265
+ elseif ($comp > 1) $comp -= 1.0;
1266
+
1267
+ if (6 * $comp < 1) return $temp1 + ($temp2 - $temp1) * 6 * $comp;
1268
+ if (2 * $comp < 1) return $temp2;
1269
+ if (3 * $comp < 2) return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6;
1270
+
1271
+ return $temp1;
1272
+ }
1273
+
1274
+ /**
1275
+ * Converts a hsl array into a color value in rgb.
1276
+ * Expects H to be in range of 0 to 360, S and L in 0 to 100
1277
+ */
1278
+ protected function toRGB($color) {
1279
+ if ($color[0] == 'color') return $color;
1280
+
1281
+ $H = $color[1] / 360;
1282
+ $S = $color[2] / 100;
1283
+ $L = $color[3] / 100;
1284
+
1285
+ if ($S == 0) {
1286
+ $r = $g = $b = $L;
1287
+ } else {
1288
+ $temp2 = $L < 0.5 ?
1289
+ $L*(1.0 + $S) :
1290
+ $L + $S - $L * $S;
1291
+
1292
+ $temp1 = 2.0 * $L - $temp2;
1293
+
1294
+ $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2);
1295
+ $g = $this->toRGB_helper($H, $temp1, $temp2);
1296
+ $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2);
1297
+ }
1298
+
1299
+ // $out = array('color', round($r*255), round($g*255), round($b*255));
1300
+ $out = array('color', $r*255, $g*255, $b*255);
1301
+ if (count($color) > 4) $out[] = $color[4]; // copy alpha
1302
+ return $out;
1303
+ }
1304
+
1305
+ protected function clamp($v, $max = 1, $min = 0) {
1306
+ return min($max, max($min, $v));
1307
+ }
1308
+
1309
+ /**
1310
+ * Convert the rgb, rgba, hsl color literals of function type
1311
+ * as returned by the parser into values of color type.
1312
+ */
1313
+ protected function funcToColor($func) {
1314
+ $fname = $func[1];
1315
+ if ($func[2][0] != 'list') return false; // need a list of arguments
1316
+ $rawComponents = $func[2][2];
1317
+
1318
+ if ($fname == 'hsl' || $fname == 'hsla') {
1319
+ $hsl = array('hsl');
1320
+ $i = 0;
1321
+ foreach ($rawComponents as $c) {
1322
+ $val = $this->reduce($c);
1323
+ $val = isset($val[1]) ? floatval($val[1]) : 0;
1324
+
1325
+ if ($i == 0) $clamp = 360;
1326
+ elseif ($i < 3) $clamp = 100;
1327
+ else $clamp = 1;
1328
+
1329
+ $hsl[] = $this->clamp($val, $clamp);
1330
+ $i++;
1331
+ }
1332
+
1333
+ while (count($hsl) < 4) $hsl[] = 0;
1334
+ return $this->toRGB($hsl);
1335
+
1336
+ } elseif ($fname == 'rgb' || $fname == 'rgba') {
1337
+ $components = array();
1338
+ $i = 1;
1339
+ foreach ($rawComponents as $c) {
1340
+ $c = $this->reduce($c);
1341
+ if ($i < 4) {
1342
+ if ($c[0] == "number" && $c[2] == "%") {
1343
+ $components[] = 255 * ($c[1] / 100);
1344
+ } else {
1345
+ $components[] = floatval($c[1]);
1346
+ }
1347
+ } elseif ($i == 4) {
1348
+ if ($c[0] == "number" && $c[2] == "%") {
1349
+ $components[] = 1.0 * ($c[1] / 100);
1350
+ } else {
1351
+ $components[] = floatval($c[1]);
1352
+ }
1353
+ } else break;
1354
+
1355
+ $i++;
1356
+ }
1357
+ while (count($components) < 3) $components[] = 0;
1358
+ array_unshift($components, 'color');
1359
+ return $this->fixColor($components);
1360
+ }
1361
+
1362
+ return false;
1363
+ }
1364
+
1365
+ protected function reduce($value, $forExpression = false) {
1366
+ switch ($value[0]) {
1367
+ case "interpolate":
1368
+ $reduced = $this->reduce($value[1]);
1369
+ $var = $this->compileValue($reduced);
1370
+ $res = $this->reduce(array("variable", $this->vPrefix . $var));
1371
+
1372
+ if ($res[0] == "raw_color") {
1373
+ $res = $this->coerceColor($res);
1374
+ }
1375
+
1376
+ if (empty($value[2])) $res = $this->lib_unquote($res);
1377
+
1378
+ return $res;
1379
+ case "variable":
1380
+ $key = $value[1];
1381
+ if (is_array($key)) {
1382
+ $key = $this->reduce($key);
1383
+ $key = $this->vPrefix . $this->compileValue($this->lib_unquote($key));
1384
+ }
1385
+
1386
+ $seen =& $this->env->seenNames;
1387
+
1388
+ if (!empty($seen[$key])) {
1389
+ $this->throwError("infinite loop detected: $key");
1390
+ }
1391
+
1392
+ $seen[$key] = true;
1393
+ $out = $this->reduce($this->get($key, self::$defaultValue));
1394
+ $seen[$key] = false;
1395
+ return $out;
1396
+ case "list":
1397
+ foreach ($value[2] as &$item) {
1398
+ $item = $this->reduce($item, $forExpression);
1399
+ }
1400
+ return $value;
1401
+ case "expression":
1402
+ return $this->evaluate($value);
1403
+ case "string":
1404
+ foreach ($value[2] as &$part) {
1405
+ if (is_array($part)) {
1406
+ $strip = $part[0] == "variable";
1407
+ $part = $this->reduce($part);
1408
+ if ($strip) $part = $this->lib_unquote($part);
1409
+ }
1410
+ }
1411
+ return $value;
1412
+ case "escape":
1413
+ list(,$inner) = $value;
1414
+ return $this->lib_unquote($this->reduce($inner));
1415
+ case "function":
1416
+ $color = $this->funcToColor($value);
1417
+ if ($color) return $color;
1418
+
1419
+ list(, $name, $args) = $value;
1420
+ if ($name == "%") $name = "_sprintf";
1421
+ $f = isset($this->libFunctions[$name]) ?
1422
+ $this->libFunctions[$name] : array($this, 'lib_'.$name);
1423
+
1424
+ if (is_callable($f)) {
1425
+ if ($args[0] == 'list')
1426
+ $args = self::compressList($args[2], $args[1]);
1427
+
1428
+ $ret = call_user_func($f, $this->reduce($args, true), $this);
1429
+
1430
+ if (is_null($ret)) {
1431
+ return array("string", "", array(
1432
+ $name, "(", $args, ")"
1433
+ ));
1434
+ }
1435
+
1436
+ // convert to a typed value if the result is a php primitive
1437
+ if (is_numeric($ret)) $ret = array('number', $ret, "");
1438
+ elseif (!is_array($ret)) $ret = array('keyword', $ret);
1439
+
1440
+ return $ret;
1441
+ }
1442
+
1443
+ // plain function, reduce args
1444
+ $value[2] = $this->reduce($value[2]);
1445
+ return $value;
1446
+ case "unary":
1447
+ list(, $op, $exp) = $value;
1448
+ $exp = $this->reduce($exp);
1449
+
1450
+ if ($exp[0] == "number") {
1451
+ switch ($op) {
1452
+ case "+":
1453
+ return $exp;
1454
+ case "-":
1455
+ $exp[1] *= -1;
1456
+ return $exp;
1457
+ }
1458
+ }
1459
+ return array("string", "", array($op, $exp));
1460
+ }
1461
+
1462
+ if ($forExpression) {
1463
+ switch ($value[0]) {
1464
+ case "keyword":
1465
+ if ($color = $this->coerceColor($value)) {
1466
+ return $color;
1467
+ }
1468
+ break;
1469
+ case "raw_color":
1470
+ return $this->coerceColor($value);
1471
+ }
1472
+ }
1473
+
1474
+ return $value;
1475
+ }
1476
+
1477
+
1478
+ // coerce a value for use in color operation
1479
+ protected function coerceColor($value) {
1480
+ switch($value[0]) {
1481
+ case 'color': return $value;
1482
+ case 'raw_color':
1483
+ $c = array("color", 0, 0, 0);
1484
+ $colorStr = substr($value[1], 1);
1485
+ $num = hexdec($colorStr);
1486
+ $width = strlen($colorStr) == 3 ? 16 : 256;
1487
+
1488
+ for ($i = 3; $i > 0; $i--) { // 3 2 1
1489
+ $t = $num % $width;
1490
+ $num /= $width;
1491
+
1492
+ $c[$i] = $t * (256/$width) + $t * floor(16/$width);
1493
+ }
1494
+
1495
+ return $c;
1496
+ case 'keyword':
1497
+ $name = $value[1];
1498
+ if (isset(self::$cssColors[$name])) {
1499
+ $rgba = explode(',', self::$cssColors[$name]);
1500
+
1501
+ if(isset($rgba[3]))
1502
+ return array('color', $rgba[0], $rgba[1], $rgba[2], $rgba[3]);
1503
+
1504
+ return array('color', $rgba[0], $rgba[1], $rgba[2]);
1505
+ }
1506
+ return null;
1507
+ }
1508
+ }
1509
+
1510
+ // make something string like into a string
1511
+ protected function coerceString($value) {
1512
+ switch ($value[0]) {
1513
+ case "string":
1514
+ return $value;
1515
+ case "keyword":
1516
+ return array("string", "", array($value[1]));
1517
+ }
1518
+ return null;
1519
+ }
1520
+
1521
+ // turn list of length 1 into value type
1522
+ protected function flattenList($value) {
1523
+ if ($value[0] == "list" && count($value[2]) == 1) {
1524
+ return $this->flattenList($value[2][0]);
1525
+ }
1526
+ return $value;
1527
+ }
1528
+
1529
+ protected function toBool($a) {
1530
+ if ($a) return self::$TRUE;
1531
+ else return self::$FALSE;
1532
+ }
1533
+
1534
+ // evaluate an expression
1535
+ protected function evaluate($exp) {
1536
+ list(, $op, $left, $right, $whiteBefore, $whiteAfter) = $exp;
1537
+
1538
+ $left = $this->reduce($left, true);
1539
+ $right = $this->reduce($right, true);
1540
+
1541
+ if ($leftColor = $this->coerceColor($left)) {
1542
+ $left = $leftColor;
1543
+ }
1544
+
1545
+ if ($rightColor = $this->coerceColor($right)) {
1546
+ $right = $rightColor;
1547
+ }
1548
+
1549
+ $ltype = $left[0];
1550
+ $rtype = $right[0];
1551
+
1552
+ // operators that work on all types
1553
+ if ($op == "and") {
1554
+ return $this->toBool($left == self::$TRUE && $right == self::$TRUE);
1555
+ }
1556
+
1557
+ if ($op == "=") {
1558
+ return $this->toBool($this->eq($left, $right) );
1559
+ }
1560
+
1561
+ if ($op == "+" && !is_null($str = $this->stringConcatenate($left, $right))) {
1562
+ return $str;
1563
+ }
1564
+
1565
+ // type based operators
1566
+ $fname = "op_${ltype}_${rtype}";
1567
+ if (is_callable(array($this, $fname))) {
1568
+ $out = $this->$fname($op, $left, $right);
1569
+ if (!is_null($out)) return $out;
1570
+ }
1571
+
1572
+ // make the expression look it did before being parsed
1573
+ $paddedOp = $op;
1574
+ if ($whiteBefore) $paddedOp = " " . $paddedOp;
1575
+ if ($whiteAfter) $paddedOp .= " ";
1576
+
1577
+ return array("string", "", array($left, $paddedOp, $right));
1578
+ }
1579
+
1580
+ protected function stringConcatenate($left, $right) {
1581
+ if ($strLeft = $this->coerceString($left)) {
1582
+ if ($right[0] == "string") {
1583
+ $right[1] = "";
1584
+ }
1585
+ $strLeft[2][] = $right;
1586
+ return $strLeft;
1587
+ }
1588
+
1589
+ if ($strRight = $this->coerceString($right)) {
1590
+ array_unshift($strRight[2], $left);
1591
+ return $strRight;
1592
+ }
1593
+ }
1594
+
1595
+
1596
+ // make sure a color's components don't go out of bounds
1597
+ protected function fixColor($c) {
1598
+ foreach (range(1, 3) as $i) {
1599
+ if ($c[$i] < 0) $c[$i] = 0;
1600
+ if ($c[$i] > 255) $c[$i] = 255;
1601
+ }
1602
+
1603
+ return $c;
1604
+ }
1605
+
1606
+ protected function op_number_color($op, $lft, $rgt) {
1607
+ if ($op == '+' || $op == '*') {
1608
+ return $this->op_color_number($op, $rgt, $lft);
1609
+ }
1610
+ }
1611
+
1612
+ protected function op_color_number($op, $lft, $rgt) {
1613
+ if ($rgt[0] == '%') $rgt[1] /= 100;
1614
+
1615
+ return $this->op_color_color($op, $lft,
1616
+ array_fill(1, count($lft) - 1, $rgt[1]));
1617
+ }
1618
+
1619
+ protected function op_color_color($op, $left, $right) {
1620
+ $out = array('color');
1621
+ $max = count($left) > count($right) ? count($left) : count($right);
1622
+ foreach (range(1, $max - 1) as $i) {
1623
+ $lval = isset($left[$i]) ? $left[$i] : 0;
1624
+ $rval = isset($right[$i]) ? $right[$i] : 0;
1625
+ switch ($op) {
1626
+ case '+':
1627
+ $out[] = $lval + $rval;
1628
+ break;
1629
+ case '-':
1630
+ $out[] = $lval - $rval;
1631
+ break;
1632
+ case '*':
1633
+ $out[] = $lval * $rval;
1634
+ break;
1635
+ case '%':
1636
+ $out[] = $lval % $rval;
1637
+ break;
1638
+ case '/':
1639
+ if ($rval == 0) $this->throwError("evaluate error: can't divide by zero");
1640
+ $out[] = $lval / $rval;
1641
+ break;
1642
+ default:
1643
+ $this->throwError('evaluate error: color op number failed on op '.$op);
1644
+ }
1645
+ }
1646
+ return $this->fixColor($out);
1647
+ }
1648
+
1649
+ function lib_red($color){
1650
+ $color = $this->coerceColor($color);
1651
+ if (is_null($color)) {
1652
+ $this->throwError('color expected for red()');
1653
+ }
1654
+
1655
+ return $color[1];
1656
+ }
1657
+
1658
+ function lib_green($color){
1659
+ $color = $this->coerceColor($color);
1660
+ if (is_null($color)) {
1661
+ $this->throwError('color expected for green()');
1662
+ }
1663
+
1664
+ return $color[2];
1665
+ }
1666
+
1667
+ function lib_blue($color){
1668
+ $color = $this->coerceColor($color);
1669
+ if (is_null($color)) {
1670
+ $this->throwError('color expected for blue()');
1671
+ }
1672
+
1673
+ return $color[3];
1674
+ }
1675
+
1676
+
1677
+ // operator on two numbers
1678
+ protected function op_number_number($op, $left, $right) {
1679
+ $unit = empty($left[2]) ? $right[2] : $left[2];
1680
+
1681
+ $value = 0;
1682
+ switch ($op) {
1683
+ case '+':
1684
+ $value = $left[1] + $right[1];
1685
+ break;
1686
+ case '*':
1687
+ $value = $left[1] * $right[1];
1688
+ break;
1689
+ case '-':
1690
+ $value = $left[1] - $right[1];
1691
+ break;
1692
+ case '%':
1693
+ $value = $left[1] % $right[1];
1694
+ break;
1695
+ case '/':
1696
+ if ($right[1] == 0) $this->throwError('parse error: divide by zero');
1697
+ $value = $left[1] / $right[1];
1698
+ break;
1699
+ case '<':
1700
+ return $this->toBool($left[1] < $right[1]);
1701
+ case '>':
1702
+ return $this->toBool($left[1] > $right[1]);
1703
+ case '>=':
1704
+ return $this->toBool($left[1] >= $right[1]);
1705
+ case '=<':
1706
+ return $this->toBool($left[1] <= $right[1]);
1707
+ default:
1708
+ $this->throwError('parse error: unknown number operator: '.$op);
1709
+ }
1710
+
1711
+ return array("number", $value, $unit);
1712
+ }
1713
+
1714
+
1715
+ /* environment functions */
1716
+
1717
+ protected function makeOutputBlock($type, $selectors = null) {
1718
+ $b = new stdclass;
1719
+ $b->lines = array();
1720
+ $b->children = array();
1721
+ $b->selectors = $selectors;
1722
+ $b->type = $type;
1723
+ $b->parent = $this->scope;
1724
+ return $b;
1725
+ }
1726
+
1727
+ // the state of execution
1728
+ protected function pushEnv($block = null) {
1729
+ $e = new stdclass;
1730
+ $e->parent = $this->env;
1731
+ $e->store = array();
1732
+ $e->block = $block;
1733
+
1734
+ $this->env = $e;
1735
+ return $e;
1736
+ }
1737
+
1738
+ // pop something off the stack
1739
+ protected function popEnv() {
1740
+ $old = $this->env;
1741
+ $this->env = $this->env->parent;
1742
+ return $old;
1743
+ }
1744
+
1745
+ // set something in the current env
1746
+ protected function set($name, $value) {
1747
+ $this->env->store[$name] = $value;
1748
+ }
1749
+
1750
+
1751
+ // get the highest occurrence entry for a name
1752
+ protected function get($name, $default=null) {
1753
+ $current = $this->env;
1754
+
1755
+ $isArguments = $name == $this->vPrefix . 'arguments';
1756
+ while ($current) {
1757
+ if ($isArguments && isset($current->arguments)) {
1758
+ return array('list', ' ', $current->arguments);
1759
+ }
1760
+
1761
+ if (isset($current->store[$name]))
1762
+ return $current->store[$name];
1763
+ else {
1764
+ $current = isset($current->storeParent) ?
1765
+ $current->storeParent : $current->parent;
1766
+ }
1767
+ }
1768
+
1769
+ return $default;
1770
+ }
1771
+
1772
+ // inject array of unparsed strings into environment as variables
1773
+ protected function injectVariables($args) {
1774
+ $this->pushEnv();
1775
+ $parser = new lessc_parser($this, __METHOD__);
1776
+ foreach ($args as $name => $strValue) {
1777
+ if ($name{0} != '@') $name = '@'.$name;
1778
+ $parser->count = 0;
1779
+ $parser->buffer = (string)$strValue;
1780
+ if (!$parser->propertyValue($value)) {
1781
+ throw new Exception("failed to parse passed in variable $name: $strValue");
1782
+ }
1783
+
1784
+ $this->set($name, $value);
1785
+ }
1786
+ }
1787
+
1788
+ /**
1789
+ * Initialize any static state, can initialize parser for a file
1790
+ * $opts isn't used yet
1791
+ */
1792
+ public function __construct($fname = null) {
1793
+ if ($fname !== null) {
1794
+ // used for deprecated parse method
1795
+ $this->_parseFile = $fname;
1796
+ }
1797
+ }
1798
+
1799
+ public function compile($string, $name = null) {
1800
+ $locale = setlocale(LC_NUMERIC, 0);
1801
+ setlocale(LC_NUMERIC, "C");
1802
+
1803
+ $this->parser = $this->makeParser($name);
1804
+ $root = $this->parser->parse($string);
1805
+
1806
+ $this->env = null;
1807
+ $this->scope = null;
1808
+
1809
+ $this->formatter = $this->newFormatter();
1810
+
1811
+ if (!empty($this->registeredVars)) {
1812
+ $this->injectVariables($this->registeredVars);
1813
+ }
1814
+
1815
+ $this->sourceParser = $this->parser; // used for error messages
1816
+ $this->compileBlock($root);
1817
+
1818
+ ob_start();
1819
+ $this->formatter->block($this->scope);
1820
+ $out = ob_get_clean();
1821
+ setlocale(LC_NUMERIC, $locale);
1822
+ return $out;
1823
+ }
1824
+
1825
+ public function compileFile($fname, $outFname = null) {
1826
+ if (!is_readable($fname)) {
1827
+ throw new Exception('load error: failed to find '.$fname);
1828
+ }
1829
+
1830
+ $pi = pathinfo($fname);
1831
+
1832
+ $oldImport = $this->importDir;
1833
+
1834
+ $this->importDir = (array)$this->importDir;
1835
+ $this->importDir[] = $pi['dirname'].'/';
1836
+
1837
+ $this->addParsedFile($fname);
1838
+
1839
+ $out = $this->compile($GLOBALS['wp_filesystem']->get_contents($fname), $fname);
1840
+
1841
+ $this->importDir = $oldImport;
1842
+
1843
+ if ($outFname !== null) {
1844
+ return $GLOBALS['wp_filesystem']->put_contents($outFname, $out);
1845
+ }
1846
+
1847
+ return $out;
1848
+ }
1849
+
1850
+ // compile only if changed input has changed or output doesn't exist
1851
+ public function checkedCompile($in, $out) {
1852
+ if (!is_file($out) || filemtime($in) > filemtime($out)) {
1853
+ $this->compileFile($in, $out);
1854
+ return true;
1855
+ }
1856
+ return false;
1857
+ }
1858
+
1859
+ /**
1860
+ * Execute lessphp on a .less file or a lessphp cache structure
1861
+ *
1862
+ * The lessphp cache structure contains information about a specific
1863
+ * less file having been parsed. It can be used as a hint for future
1864
+ * calls to determine whether or not a rebuild is required.
1865
+ *
1866
+ * The cache structure contains two important keys that may be used
1867
+ * externally:
1868
+ *
1869
+ * compiled: The final compiled CSS
1870
+ * updated: The time (in seconds) the CSS was last compiled
1871
+ *
1872
+ * The cache structure is a plain-ol' PHP associative array and can
1873
+ * be serialized and unserialized without a hitch.
1874
+ *
1875
+ * @param mixed $in Input
1876
+ * @param bool $force Force rebuild?
1877
+ * @return array lessphp cache structure
1878
+ */
1879
+ public function cachedCompile($in, $force = false) {
1880
+ // assume no root
1881
+ $root = null;
1882
+
1883
+ if (is_string($in)) {
1884
+ $root = $in;
1885
+ } elseif (is_array($in) and isset($in['root'])) {
1886
+ if ($force or ! isset($in['files'])) {
1887
+ // If we are forcing a recompile or if for some reason the
1888
+ // structure does not contain any file information we should
1889
+ // specify the root to trigger a rebuild.
1890
+ $root = $in['root'];
1891
+ } elseif (isset($in['files']) and is_array($in['files'])) {
1892
+ foreach ($in['files'] as $fname => $ftime ) {
1893
+ if (!file_exists($fname) or filemtime($fname) > $ftime) {
1894
+ // One of the files we knew about previously has changed
1895
+ // so we should look at our incoming root again.
1896
+ $root = $in['root'];
1897
+ break;
1898
+ }
1899
+ }
1900
+ }
1901
+ } else {
1902
+ // TODO: Throw an exception? We got neither a string nor something
1903
+ // that looks like a compatible lessphp cache structure.
1904
+ return null;
1905
+ }
1906
+
1907
+ if ($root !== null) {
1908
+ // If we have a root value which means we should rebuild.
1909
+ $out = array();
1910
+ $out['root'] = $root;
1911
+ $out['compiled'] = $this->compileFile($root);
1912
+ $out['files'] = $this->allParsedFiles();
1913
+ $out['updated'] = time();
1914
+ return $out;
1915
+ } else {
1916
+ // No changes, pass back the structure
1917
+ // we were given initially.
1918
+ return $in;
1919
+ }
1920
+
1921
+ }
1922
+
1923
+ // parse and compile buffer
1924
+ // This is deprecated
1925
+ public function parse($str = null, $initialVariables = null) {
1926
+ if (is_array($str)) {
1927
+ $initialVariables = $str;
1928
+ $str = null;
1929
+ }
1930
+
1931
+ $oldVars = $this->registeredVars;
1932
+ if ($initialVariables !== null) {
1933
+ $this->setVariables($initialVariables);
1934
+ }
1935
+
1936
+ if ($str == null) {
1937
+ if (empty($this->_parseFile)) {
1938
+ throw new exception("nothing to parse");
1939
+ }
1940
+
1941
+ $out = $this->compileFile($this->_parseFile);
1942
+ } else {
1943
+ $out = $this->compile($str);
1944
+ }
1945
+
1946
+ $this->registeredVars = $oldVars;
1947
+ return $out;
1948
+ }
1949
+
1950
+ protected function makeParser($name) {
1951
+ $parser = new lessc_parser($this, $name);
1952
+ $parser->writeComments = $this->preserveComments;
1953
+
1954
+ return $parser;
1955
+ }
1956
+
1957
+ public function setFormatter($name) {
1958
+ $this->formatterName = $name;
1959
+ }
1960
+
1961
+ protected function newFormatter() {
1962
+ $className = "lessc_formatter_lessjs";
1963
+ if (!empty($this->formatterName)) {
1964
+ if (!is_string($this->formatterName))
1965
+ return $this->formatterName;
1966
+ $className = "lessc_formatter_$this->formatterName";
1967
+ }
1968
+
1969
+ return new $className;
1970
+ }
1971
+
1972
+ public function setPreserveComments($preserve) {
1973
+ $this->preserveComments = $preserve;
1974
+ }
1975
+
1976
+ public function registerFunction($name, $func) {
1977
+ $this->libFunctions[$name] = $func;
1978
+ }
1979
+
1980
+ public function unregisterFunction($name) {
1981
+ unset($this->libFunctions[$name]);
1982
+ }
1983
+
1984
+ public function setVariables($variables) {
1985
+ $this->registeredVars = array_merge($this->registeredVars, $variables);
1986
+ }
1987
+
1988
+ public function unsetVariable($name) {
1989
+ unset($this->registeredVars[$name]);
1990
+ }
1991
+
1992
+ public function setImportDir($dirs) {
1993
+ $this->importDir = (array)$dirs;
1994
+ }
1995
+
1996
+ public function addImportDir($dir) {
1997
+ $this->importDir = (array)$this->importDir;
1998
+ $this->importDir[] = $dir;
1999
+ }
2000
+
2001
+ public function allParsedFiles() {
2002
+ return $this->allParsedFiles;
2003
+ }
2004
+
2005
+ protected function addParsedFile($file) {
2006
+ $this->allParsedFiles[realpath($file)] = filemtime($file);
2007
+ }
2008
+
2009
+ /**
2010
+ * Uses the current value of $this->count to show line and line number
2011
+ */
2012
+ protected function throwError($msg = null) {
2013
+ if ($this->sourceLoc >= 0) {
2014
+ $this->sourceParser->throwError($msg, $this->sourceLoc);
2015
+ }
2016
+ throw new exception($msg);
2017
+ }
2018
+
2019
+ // compile file $in to file $out if $in is newer than $out
2020
+ // returns true when it compiles, false otherwise
2021
+ public static function ccompile($in, $out, $less = null) {
2022
+ if ($less === null) {
2023
+ $less = new self;
2024
+ }
2025
+ return $less->checkedCompile($in, $out);
2026
+ }
2027
+
2028
+ public static function cexecute($in, $force = false, $less = null) {
2029
+ if ($less === null) {
2030
+ $less = new self;
2031
+ }
2032
+ return $less->cachedCompile($in, $force);
2033
+ }
2034
+
2035
+ static protected $cssColors = array(
2036
+ 'aliceblue' => '240,248,255',
2037
+ 'antiquewhite' => '250,235,215',
2038
+ 'aqua' => '0,255,255',
2039
+ 'aquamarine' => '127,255,212',
2040
+ 'azure' => '240,255,255',
2041
+ 'beige' => '245,245,220',
2042
+ 'bisque' => '255,228,196',
2043
+ 'black' => '0,0,0',
2044
+ 'blanchedalmond' => '255,235,205',
2045
+ 'blue' => '0,0,255',
2046
+ 'blueviolet' => '138,43,226',
2047
+ 'brown' => '165,42,42',
2048
+ 'burlywood' => '222,184,135',
2049
+ 'cadetblue' => '95,158,160',
2050
+ 'chartreuse' => '127,255,0',
2051
+ 'chocolate' => '210,105,30',
2052
+ 'coral' => '255,127,80',
2053
+ 'cornflowerblue' => '100,149,237',
2054
+ 'cornsilk' => '255,248,220',
2055
+ 'crimson' => '220,20,60',
2056
+ 'cyan' => '0,255,255',
2057
+ 'darkblue' => '0,0,139',
2058
+ 'darkcyan' => '0,139,139',
2059
+ 'darkgoldenrod' => '184,134,11',
2060
+ 'darkgray' => '169,169,169',
2061
+ 'darkgreen' => '0,100,0',
2062
+ 'darkgrey' => '169,169,169',
2063
+ 'darkkhaki' => '189,183,107',
2064
+ 'darkmagenta' => '139,0,139',
2065
+ 'darkolivegreen' => '85,107,47',
2066
+ 'darkorange' => '255,140,0',
2067
+ 'darkorchid' => '153,50,204',
2068
+ 'darkred' => '139,0,0',
2069
+ 'darksalmon' => '233,150,122',
2070
+ 'darkseagreen' => '143,188,143',
2071
+ 'darkslateblue' => '72,61,139',
2072
+ 'darkslategray' => '47,79,79',
2073
+ 'darkslategrey' => '47,79,79',
2074
+ 'darkturquoise' => '0,206,209',
2075
+ 'darkviolet' => '148,0,211',
2076
+ 'deeppink' => '255,20,147',
2077
+ 'deepskyblue' => '0,191,255',
2078
+ 'dimgray' => '105,105,105',
2079
+ 'dimgrey' => '105,105,105',
2080
+ 'dodgerblue' => '30,144,255',
2081
+ 'firebrick' => '178,34,34',
2082
+ 'floralwhite' => '255,250,240',
2083
+ 'forestgreen' => '34,139,34',
2084
+ 'fuchsia' => '255,0,255',
2085
+ 'gainsboro' => '220,220,220',
2086
+ 'ghostwhite' => '248,248,255',
2087
+ 'gold' => '255,215,0',
2088
+ 'goldenrod' => '218,165,32',
2089
+ 'gray' => '128,128,128',
2090
+ 'green' => '0,128,0',
2091
+ 'greenyellow' => '173,255,47',
2092
+ 'grey' => '128,128,128',
2093
+ 'honeydew' => '240,255,240',
2094
+ 'hotpink' => '255,105,180',
2095
+ 'indianred' => '205,92,92',
2096
+ 'indigo' => '75,0,130',
2097
+ 'ivory' => '255,255,240',
2098
+ 'khaki' => '240,230,140',
2099
+ 'lavender' => '230,230,250',
2100
+ 'lavenderblush' => '255,240,245',
2101
+ 'lawngreen' => '124,252,0',
2102
+ 'lemonchiffon' => '255,250,205',
2103
+ 'lightblue' => '173,216,230',
2104
+ 'lightcoral' => '240,128,128',
2105
+ 'lightcyan' => '224,255,255',
2106
+ 'lightgoldenrodyellow' => '250,250,210',
2107
+ 'lightgray' => '211,211,211',
2108
+ 'lightgreen' => '144,238,144',
2109
+ 'lightgrey' => '211,211,211',
2110
+ 'lightpink' => '255,182,193',
2111
+ 'lightsalmon' => '255,160,122',
2112
+ 'lightseagreen' => '32,178,170',
2113
+ 'lightskyblue' => '135,206,250',
2114
+ 'lightslategray' => '119,136,153',
2115
+ 'lightslategrey' => '119,136,153',
2116
+ 'lightsteelblue' => '176,196,222',
2117
+ 'lightyellow' => '255,255,224',
2118
+ 'lime' => '0,255,0',
2119
+ 'limegreen' => '50,205,50',
2120
+ 'linen' => '250,240,230',
2121
+ 'magenta' => '255,0,255',
2122
+ 'maroon' => '128,0,0',
2123
+ 'mediumaquamarine' => '102,205,170',
2124
+ 'mediumblue' => '0,0,205',
2125
+ 'mediumorchid' => '186,85,211',
2126
+ 'mediumpurple' => '147,112,219',
2127
+ 'mediumseagreen' => '60,179,113',
2128
+ 'mediumslateblue' => '123,104,238',
2129
+ 'mediumspringgreen' => '0,250,154',
2130
+ 'mediumturquoise' => '72,209,204',
2131
+ 'mediumvioletred' => '199,21,133',
2132
+ 'midnightblue' => '25,25,112',
2133
+ 'mintcream' => '245,255,250',
2134
+ 'mistyrose' => '255,228,225',
2135
+ 'moccasin' => '255,228,181',
2136
+ 'navajowhite' => '255,222,173',
2137
+ 'navy' => '0,0,128',
2138
+ 'oldlace' => '253,245,230',
2139
+ 'olive' => '128,128,0',
2140
+ 'olivedrab' => '107,142,35',
2141
+ 'orange' => '255,165,0',
2142
+ 'orangered' => '255,69,0',
2143
+ 'orchid' => '218,112,214',
2144
+ 'palegoldenrod' => '238,232,170',
2145
+ 'palegreen' => '152,251,152',
2146
+ 'paleturquoise' => '175,238,238',
2147
+ 'palevioletred' => '219,112,147',
2148
+ 'papayawhip' => '255,239,213',
2149
+ 'peachpuff' => '255,218,185',
2150
+ 'peru' => '205,133,63',
2151
+ 'pink' => '255,192,203',
2152
+ 'plum' => '221,160,221',
2153
+ 'powderblue' => '176,224,230',
2154
+ 'purple' => '128,0,128',
2155
+ 'red' => '255,0,0',
2156
+ 'rosybrown' => '188,143,143',
2157
+ 'royalblue' => '65,105,225',
2158
+ 'saddlebrown' => '139,69,19',
2159
+ 'salmon' => '250,128,114',
2160
+ 'sandybrown' => '244,164,96',
2161
+ 'seagreen' => '46,139,87',
2162
+ 'seashell' => '255,245,238',
2163
+ 'sienna' => '160,82,45',
2164
+ 'silver' => '192,192,192',
2165
+ 'skyblue' => '135,206,235',
2166
+ 'slateblue' => '106,90,205',
2167
+ 'slategray' => '112,128,144',
2168
+ 'slategrey' => '112,128,144',
2169
+ 'snow' => '255,250,250',
2170
+ 'springgreen' => '0,255,127',
2171
+ 'steelblue' => '70,130,180',
2172
+ 'tan' => '210,180,140',
2173
+ 'teal' => '0,128,128',
2174
+ 'thistle' => '216,191,216',
2175
+ 'tomato' => '255,99,71',
2176
+ 'transparent' => '0,0,0,0',
2177
+ 'turquoise' => '64,224,208',
2178
+ 'violet' => '238,130,238',
2179
+ 'wheat' => '245,222,179',
2180
+ 'white' => '255,255,255',
2181
+ 'whitesmoke' => '245,245,245',
2182
+ 'yellow' => '255,255,0',
2183
+ 'yellowgreen' => '154,205,50'
2184
+ );
2185
+ }
2186
+
2187
+ // responsible for taking a string of LESS code and converting it into a
2188
+ // syntax tree
2189
+ /**
2190
+ * @ignore
2191
+ */
2192
+ class lessc_parser {
2193
+ static protected $nextBlockId = 0; // used to uniquely identify blocks
2194
+
2195
+ static protected $precedence = array(
2196
+ '=<' => 0,
2197
+ '>=' => 0,
2198
+ '=' => 0,
2199
+ '<' => 0,
2200
+ '>' => 0,
2201
+
2202
+ '+' => 1,
2203
+ '-' => 1,
2204
+ '*' => 2,
2205
+ '/' => 2,
2206
+ '%' => 2,
2207
+ );
2208
+
2209
+ static protected $whitePattern;
2210
+ static protected $commentMulti;
2211
+
2212
+ static protected $commentSingle = "//";
2213
+ static protected $commentMultiLeft = "/*";
2214
+ static protected $commentMultiRight = "*/";
2215
+
2216
+ // regex string to match any of the operators
2217
+ static protected $operatorString;
2218
+
2219
+ // these properties will supress division unless it's inside parenthases
2220
+ static protected $supressDivisionProps =
2221
+ array('/border-radius$/i', '/^font$/i');
2222
+
2223
+ protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "viewport", "-moz-viewport", "-o-viewport", "-ms-viewport");
2224
+ protected $lineDirectives = array("charset");
2225
+
2226
+ /**
2227
+ * if we are in parens we can be more liberal with whitespace around
2228
+ * operators because it must evaluate to a single value and thus is less
2229
+ * ambiguous.
2230
+ *
2231
+ * Consider:
2232
+ * property1: 10 -5; // is two numbers, 10 and -5
2233
+ * property2: (10 -5); // should evaluate to 5
2234
+ */
2235
+ protected $inParens = false;
2236
+
2237
+ // caches preg escaped literals
2238
+ static protected $literalCache = array();
2239
+
2240
+ public function __construct($lessc, $sourceName = null) {
2241
+ $this->eatWhiteDefault = true;
2242
+ // reference to less needed for vPrefix, mPrefix, and parentSelector
2243
+ $this->lessc = $lessc;
2244
+
2245
+ $this->sourceName = $sourceName; // name used for error messages
2246
+
2247
+ $this->writeComments = false;
2248
+
2249
+ if (!self::$operatorString) {
2250
+ self::$operatorString =
2251
+ '('.implode('|', array_map(array('JupiterX_Lessc', 'preg_quote'),
2252
+ array_keys(self::$precedence))).')';
2253
+
2254
+ $commentSingle = JupiterX_Lessc::preg_quote(self::$commentSingle);
2255
+ $commentMultiLeft = JupiterX_Lessc::preg_quote(self::$commentMultiLeft);
2256
+ $commentMultiRight = JupiterX_Lessc::preg_quote(self::$commentMultiRight);
2257
+
2258
+ self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight;
2259
+ self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais';
2260
+ }
2261
+ }
2262
+
2263
+ public function parse($buffer) {
2264
+ $this->count = 0;
2265
+ $this->line = 1;
2266
+
2267
+ $this->env = null; // block stack
2268
+ $this->buffer = $this->writeComments ? $buffer : $this->removeComments($buffer);
2269
+ $this->pushSpecialBlock("root");
2270
+ $this->eatWhiteDefault = true;
2271
+ $this->seenComments = array();
2272
+
2273
+ // trim whitespace on head
2274
+ // if (preg_match('/^\s+/', $this->buffer, $m)) {
2275
+ // $this->line += substr_count($m[0], "\n");
2276
+ // $this->buffer = ltrim($this->buffer);
2277
+ // }
2278
+ $this->whitespace();
2279
+
2280
+ // parse the entire file
2281
+ $lastCount = $this->count;
2282
+ while (false !== $this->parseChunk());
2283
+
2284
+ if ($this->count != strlen($this->buffer))
2285
+ $this->throwError();
2286
+
2287
+ // TODO report where the block was opened
2288
+ if (!is_null($this->env->parent))
2289
+ throw new exception('parse error: unclosed block');
2290
+
2291
+ return $this->env;
2292
+ }
2293
+
2294
+ /**
2295
+ * Parse a single chunk off the head of the buffer and append it to the
2296
+ * current parse environment.
2297
+ * Returns false when the buffer is empty, or when there is an error.
2298
+ *
2299
+ * This function is called repeatedly until the entire document is
2300
+ * parsed.
2301
+ *
2302
+ * This parser is most similar to a recursive descent parser. Single
2303
+ * functions represent discrete grammatical rules for the language, and
2304
+ * they are able to capture the text that represents those rules.
2305
+ *
2306
+ * Consider the function lessc::keyword(). (all parse functions are
2307
+ * structured the same)
2308
+ *
2309
+ * The function takes a single reference argument. When calling the
2310
+ * function it will attempt to match a keyword on the head of the buffer.
2311
+ * If it is successful, it will place the keyword in the referenced
2312
+ * argument, advance the position in the buffer, and return true. If it
2313
+ * fails then it won't advance the buffer and it will return false.
2314
+ *
2315
+ * All of these parse functions are powered by lessc::match(), which behaves
2316
+ * the same way, but takes a literal regular expression. Sometimes it is
2317
+ * more convenient to use match instead of creating a new function.
2318
+ *
2319
+ * Because of the format of the functions, to parse an entire string of
2320
+ * grammatical rules, you can chain them together using &&.
2321
+ *
2322
+ * But, if some of the rules in the chain succeed before one fails, then
2323
+ * the buffer position will be left at an invalid state. In order to
2324
+ * avoid this, lessc::seek() is used to remember and set buffer positions.
2325
+ *
2326
+ * Before parsing a chain, use $s = $this->seek() to remember the current
2327
+ * position into $s. Then if a chain fails, use $this->seek($s) to
2328
+ * go back where we started.
2329
+ */
2330
+ protected function parseChunk() {
2331
+ if (empty($this->buffer)) return false;
2332
+ $s = $this->seek();
2333
+
2334
+ // setting a property
2335
+ if ($this->keyword($key) && $this->assign() &&
2336
+ $this->propertyValue($value, $key) && $this->end())
2337
+ {
2338
+ $this->append(array('assign', $key, $value), $s);
2339
+ return true;
2340
+ } else {
2341
+ $this->seek($s);
2342
+ }
2343
+
2344
+
2345
+ // look for special css blocks
2346
+ if ($this->literal('@', false)) {
2347
+ $this->count--;
2348
+
2349
+ // media
2350
+ if ($this->literal('@media')) {
2351
+ if (($this->mediaQueryList($mediaQueries) || true)
2352
+ && $this->literal('{'))
2353
+ {
2354
+ $media = $this->pushSpecialBlock("media");
2355
+ $media->queries = is_null($mediaQueries) ? array() : $mediaQueries;
2356
+ return true;
2357
+ } else {
2358
+ $this->seek($s);
2359
+ return false;
2360
+ }
2361
+ }
2362
+
2363
+ if ($this->literal("@", false) && $this->keyword($dirName)) {
2364
+ if ($this->isDirective($dirName, $this->blockDirectives)) {
2365
+ if (($this->openString("{", $dirValue, null, array(";")) || true) &&
2366
+ $this->literal("{"))
2367
+ {
2368
+ $dir = $this->pushSpecialBlock("directive");
2369
+ $dir->name = $dirName;
2370
+ if (isset($dirValue)) $dir->value = $dirValue;
2371
+ return true;
2372
+ }
2373
+ } elseif ($this->isDirective($dirName, $this->lineDirectives)) {
2374
+ if ($this->propertyValue($dirValue) && $this->end()) {
2375
+ $this->append(array("directive", $dirName, $dirValue));
2376
+ return true;
2377
+ }
2378
+ }
2379
+ }
2380
+
2381
+ $this->seek($s);
2382
+ }
2383
+
2384
+ // setting a variable
2385
+ if ($this->variable($var) && $this->assign() &&
2386
+ $this->propertyValue($value) && $this->end())
2387
+ {
2388
+ $this->append(array('assign', $var, $value), $s);
2389
+ return true;
2390
+ } else {
2391
+ $this->seek($s);
2392
+ }
2393
+
2394
+ if ($this->import($importValue)) {
2395
+ $this->append($importValue, $s);
2396
+ return true;
2397
+ }
2398
+
2399
+ // opening parametric mixin
2400
+ if ($this->tag($tag, true) && $this->argumentDef($args, $isVararg) &&
2401
+ ($this->guards($guards) || true) &&
2402
+ $this->literal('{'))
2403
+ {
2404
+ $block = $this->pushBlock($this->fixTags(array($tag)));
2405
+ $block->args = $args;
2406
+ $block->isVararg = $isVararg;
2407
+ if (!empty($guards)) $block->guards = $guards;
2408
+ return true;
2409
+ } else {
2410
+ $this->seek($s);
2411
+ }
2412
+
2413
+ // opening a simple block
2414
+ if ($this->tags($tags) && $this->literal('{')) {
2415
+ $tags = $this->fixTags($tags);
2416
+ $this->pushBlock($tags);
2417
+ return true;
2418
+ } else {
2419
+ $this->seek($s);
2420
+ }
2421
+
2422
+ // closing a block
2423
+ if ($this->literal('}', false)) {
2424
+ try {
2425
+ $block = $this->pop();
2426
+ } catch (exception $e) {
2427
+ $this->seek($s);
2428
+ $this->throwError($e->getMessage());
2429
+ }
2430
+
2431
+ $hidden = false;
2432
+ if (is_null($block->type)) {
2433
+ $hidden = true;
2434
+ if (!isset($block->args)) {
2435
+ foreach ($block->tags as $tag) {
2436
+ if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
2437
+ $hidden = false;
2438
+ break;
2439
+ }
2440
+ }
2441
+ }
2442
+
2443
+ foreach ($block->tags as $tag) {
2444
+ if (is_string($tag)) {
2445
+ $this->env->children[$tag][] = $block;
2446
+ }
2447
+ }
2448
+ }
2449
+
2450
+ if (!$hidden) {
2451
+ $this->append(array('block', $block), $s);
2452
+ }
2453
+
2454
+ // this is done here so comments aren't bundled into he block that
2455
+ // was just closed
2456
+ $this->whitespace();
2457
+ return true;
2458
+ }
2459
+
2460
+ // mixin
2461
+ if ($this->mixinTags($tags) &&
2462
+ ($this->argumentDef($argv, $isVararg) || true) &&
2463
+ ($this->keyword($suffix) || true) && $this->end())
2464
+ {
2465
+ $tags = $this->fixTags($tags);
2466
+ $this->append(array('mixin', $tags, $argv, $suffix), $s);
2467
+ return true;
2468
+ } else {
2469
+ $this->seek($s);
2470
+ }
2471
+
2472
+ // spare ;
2473
+ if ($this->literal(';')) return true;
2474
+
2475
+ return false; // got nothing, throw error
2476
+ }
2477
+
2478
+ protected function isDirective($dirname, $directives) {
2479
+ // TODO: cache pattern in parser
2480
+ $pattern = implode("|",
2481
+ array_map(array("JupiterX_Lessc", "preg_quote"), $directives));
2482
+ $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i';
2483
+
2484
+ return preg_match($pattern, $dirname);
2485
+ }
2486
+
2487
+ protected function fixTags($tags) {
2488
+ // move @ tags out of variable namespace
2489
+ foreach ($tags as &$tag) {
2490
+ if ($tag{0} == $this->lessc->vPrefix)
2491
+ $tag[0] = $this->lessc->mPrefix;
2492
+ }
2493
+ return $tags;
2494
+ }
2495
+
2496
+ // a list of expressions
2497
+ protected function expressionList(&$exps) {
2498
+ $values = array();
2499
+
2500
+ while ($this->expression($exp)) {
2501
+ $values[] = $exp;
2502
+ }
2503
+
2504
+ if (count($values) == 0) return false;
2505
+
2506
+ $exps = JupiterX_Lessc::compressList($values, ' ');
2507
+ return true;
2508
+ }
2509
+
2510
+ /**
2511
+ * Attempt to consume an expression.
2512
+ * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code
2513
+ */
2514
+ protected function expression(&$out) {
2515
+ if ($this->value($lhs)) {
2516
+ $out = $this->expHelper($lhs, 0);
2517
+
2518
+ // look for / shorthand
2519
+ if (!empty($this->env->supressedDivision)) {
2520
+ unset($this->env->supressedDivision);
2521
+ $s = $this->seek();
2522
+ if ($this->literal("/") && $this->value($rhs)) {
2523
+ $out = array("list", "",
2524
+ array($out, array("keyword", "/"), $rhs));
2525
+ } else {
2526
+ $this->seek($s);
2527
+ }
2528
+ }
2529
+
2530
+ return true;
2531
+ }
2532
+ return false;
2533
+ }
2534
+
2535
+ /**
2536
+ * recursively parse infix equation with $lhs at precedence $minP
2537
+ */
2538
+ protected function expHelper($lhs, $minP) {
2539
+ $this->inExp = true;
2540
+ $ss = $this->seek();
2541
+
2542
+ while (true) {
2543
+ $whiteBefore = isset($this->buffer[$this->count - 1]) &&
2544
+ ctype_space($this->buffer[$this->count - 1]);
2545
+
2546
+ // If there is whitespace before the operator, then we require
2547
+ // whitespace after the operator for it to be an expression
2548
+ $needWhite = $whiteBefore && !$this->inParens;
2549
+
2550
+ if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
2551
+ if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) {
2552
+ foreach (self::$supressDivisionProps as $pattern) {
2553
+ if (preg_match($pattern, $this->env->currentProperty)) {
2554
+ $this->env->supressedDivision = true;
2555
+ break 2;
2556
+ }
2557
+ }
2558
+ }
2559
+
2560
+
2561
+ $whiteAfter = isset($this->buffer[$this->count - 1]) &&
2562
+ ctype_space($this->buffer[$this->count - 1]);
2563
+
2564
+ if (!$this->value($rhs)) break;
2565
+
2566
+ // peek for next operator to see what to do with rhs
2567
+ if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > self::$precedence[$m[1]]) {
2568
+ $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]);
2569
+ }
2570
+
2571
+ $lhs = array('expression', $m[1], $lhs, $rhs, $whiteBefore, $whiteAfter);
2572
+ $ss = $this->seek();
2573
+
2574
+ continue;
2575
+ }
2576
+
2577
+ break;
2578
+ }
2579
+
2580
+ $this->seek($ss);
2581
+
2582
+ return $lhs;
2583
+ }
2584
+
2585
+ // consume a list of values for a property
2586
+ public function propertyValue(&$value, $keyName = null) {
2587
+ $values = array();
2588
+
2589
+ if ($keyName !== null) $this->env->currentProperty = $keyName;
2590
+
2591
+ $s = null;
2592
+ while ($this->expressionList($v)) {
2593
+ $values[] = $v;
2594
+ $s = $this->seek();
2595
+ if (!$this->literal(',')) break;
2596
+ }
2597
+
2598
+ if ($s) $this->seek($s);
2599
+
2600
+ if ($keyName !== null) unset($this->env->currentProperty);
2601
+
2602
+ if (count($values) == 0) return false;
2603
+
2604
+ $value = JupiterX_Lessc::compressList($values, ', ');
2605
+ return true;
2606
+ }
2607
+
2608
+ protected function parenValue(&$out) {
2609
+ $s = $this->seek();
2610
+
2611
+ // speed shortcut
2612
+ if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "(") {
2613
+ return false;
2614
+ }
2615
+
2616
+ $inParens = $this->inParens;
2617
+ if ($this->literal("(") &&
2618
+ ($this->inParens = true) && $this->expression($exp) &&
2619
+ $this->literal(")"))
2620
+ {
2621
+ $out = $exp;
2622
+ $this->inParens = $inParens;
2623
+ return true;
2624
+ } else {
2625
+ $this->inParens = $inParens;
2626
+ $this->seek($s);
2627
+ }
2628
+
2629
+ return false;
2630
+ }
2631
+
2632
+ // a single value
2633
+ protected function value(&$value) {
2634
+ $s = $this->seek();
2635
+
2636
+ // speed shortcut
2637
+ if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "-") {
2638
+ // negation
2639
+ if ($this->literal("-", false) &&
2640
+ (($this->variable($inner) && $inner = array("variable", $inner)) ||
2641
+ $this->unit($inner) ||
2642
+ $this->parenValue($inner)))
2643
+ {
2644
+ $value = array("unary", "-", $inner);
2645
+ return true;
2646
+ } else {
2647
+ $this->seek($s);
2648
+ }
2649
+ }
2650
+
2651
+ if ($this->parenValue($value)) return true;
2652
+ if ($this->unit($value)) return true;
2653
+ if ($this->color($value)) return true;
2654
+ if ($this->func($value)) return true;
2655
+ if ($this->string($value)) return true;
2656
+
2657
+ if ($this->keyword($word)) {
2658
+ $value = array('keyword', $word);
2659
+ return true;
2660
+ }
2661
+
2662
+ // try a variable
2663
+ if ($this->variable($var)) {
2664
+ $value = array('variable', $var);
2665
+ return true;
2666
+ }
2667
+
2668
+ // unquote string (should this work on any type?
2669
+ if ($this->literal("~") && $this->string($str)) {
2670
+ $value = array("escape", $str);
2671
+ return true;
2672
+ } else {
2673
+ $this->seek($s);
2674
+ }
2675
+
2676
+ // css hack: \0
2677
+ if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
2678
+ $value = array('keyword', '\\'.$m[1]);
2679
+ return true;
2680
+ } else {
2681
+ $this->seek($s);
2682
+ }
2683
+
2684
+ return false;
2685
+ }
2686
+
2687
+ // an import statement
2688
+ protected function import(&$out) {
2689
+ $s = $this->seek();
2690
+ if (!$this->literal('@import')) return false;
2691
+
2692
+ // @import "something.css" media;
2693
+ // @import url("something.css") media;
2694
+ // @import url(something.css) media;
2695
+
2696
+ if ($this->propertyValue($value)) {
2697
+ $out = array("import", $value);
2698
+ return true;
2699
+ }
2700
+ }
2701
+
2702
+ protected function mediaQueryList(&$out) {
2703
+ if ($this->genericList($list, "mediaQuery", ",", false)) {
2704
+ $out = $list[2];
2705
+ return true;
2706
+ }
2707
+ return false;
2708
+ }
2709
+
2710
+ protected function mediaQuery(&$out) {
2711
+ $s = $this->seek();
2712
+
2713
+ $expressions = null;
2714
+ $parts = array();
2715
+
2716
+ if (($this->literal("only") && ($only = true) || $this->literal("not") && ($not = true) || true) && $this->keyword($mediaType)) {
2717
+ $prop = array("mediaType");
2718
+ if (isset($only)) $prop[] = "only";
2719
+ if (isset($not)) $prop[] = "not";
2720
+ $prop[] = $mediaType;
2721
+ $parts[] = $prop;
2722
+ } else {
2723
+ $this->seek($s);
2724
+ }
2725
+
2726
+
2727
+ if (!empty($mediaType) && !$this->literal("and")) {
2728
+ // ~
2729
+ } else {
2730
+ $this->genericList($expressions, "mediaExpression", "and", false);
2731
+ if (is_array($expressions)) $parts = array_merge($parts, $expressions[2]);
2732
+ }
2733
+
2734
+ if (count($parts) == 0) {
2735
+ $this->seek($s);
2736
+ return false;
2737
+ }
2738
+
2739
+ $out = $parts;
2740
+ return true;
2741
+ }
2742
+
2743
+ protected function mediaExpression(&$out) {
2744
+ $s = $this->seek();
2745
+ $value = null;
2746
+ if ($this->literal("(") &&
2747
+ $this->keyword($feature) &&
2748
+ ($this->literal(":") && $this->expression($value) || true) &&
2749
+ $this->literal(")"))
2750
+ {
2751
+ $out = array("mediaExp", $feature);
2752
+ if ($value) $out[] = $value;
2753
+ return true;
2754
+ } elseif ($this->variable($variable)) {
2755
+ $out = array('variable', $variable);
2756
+ return true;
2757
+ }
2758
+
2759
+ $this->seek($s);
2760
+ return false;
2761
+ }
2762
+
2763
+ // an unbounded string stopped by $end
2764
+ protected function openString($end, &$out, $nestingOpen=null, $rejectStrs = null) {
2765
+ $oldWhite = $this->eatWhiteDefault;
2766
+ $this->eatWhiteDefault = false;
2767
+
2768
+ $stop = array("'", '"', "@{", $end);
2769
+ $stop = array_map(array("JupiterX_Lessc", "preg_quote"), $stop);
2770
+ // $stop[] = self::$commentMulti;
2771
+
2772
+ if (!is_null($rejectStrs)) {
2773
+ $stop = array_merge($stop, $rejectStrs);
2774
+ }
2775
+
2776
+ $patt = '(.*?)('.implode("|", $stop).')';
2777
+
2778
+ $nestingLevel = 0;
2779
+
2780
+ $content = array();
2781
+ while ($this->match($patt, $m, false)) {
2782
+ if (!empty($m[1])) {
2783
+ $content[] = $m[1];
2784
+ if ($nestingOpen) {
2785
+ $nestingLevel += substr_count($m[1], $nestingOpen);
2786
+ }
2787
+ }
2788
+
2789
+ $tok = $m[2];
2790
+
2791
+ $this->count-= strlen($tok);
2792
+ if ($tok == $end) {
2793
+ if ($nestingLevel == 0) {
2794
+ break;
2795
+ } else {
2796
+ $nestingLevel--;
2797
+ }
2798
+ }
2799
+
2800
+ if (($tok == "'" || $tok == '"') && $this->string($str)) {
2801
+ $content[] = $str;
2802
+ continue;
2803
+ }
2804
+
2805
+ if ($tok == "@{" && $this->interpolation($inter)) {
2806
+ $content[] = $inter;
2807
+ continue;
2808
+ }
2809
+
2810
+ if (!empty($rejectStrs) && in_array($tok, $rejectStrs)) {
2811
+ break;
2812
+ }
2813
+
2814
+ $content[] = $tok;
2815
+ $this->count+= strlen($tok);
2816
+ }
2817
+
2818
+ $this->eatWhiteDefault = $oldWhite;
2819
+
2820
+ if (count($content) == 0) return false;
2821
+
2822
+ // trim the end
2823
+ if (is_string(end($content))) {
2824
+ $content[count($content) - 1] = rtrim(end($content));
2825
+ }
2826
+
2827
+ $out = array("string", "", $content);
2828
+ return true;
2829
+ }
2830
+
2831
+ protected function string(&$out) {
2832
+ $s = $this->seek();
2833
+ if ($this->literal('"', false)) {
2834
+ $delim = '"';
2835
+ } elseif ($this->literal("'", false)) {
2836
+ $delim = "'";
2837
+ } else {
2838
+ return false;
2839
+ }
2840
+
2841
+ $content = array();
2842
+
2843
+ // look for either ending delim , escape, or string interpolation
2844
+ $patt = '([^\n]*?)(@\{|\\\\|' .
2845
+ JupiterX_Lessc::preg_quote($delim).')';
2846
+
2847
+ $oldWhite = $this->eatWhiteDefault;
2848
+ $this->eatWhiteDefault = false;
2849
+
2850
+ while ($this->match($patt, $m, false)) {
2851
+ $content[] = $m[1];
2852
+ if ($m[2] == "@{") {
2853
+ $this->count -= strlen($m[2]);
2854
+ if ($this->interpolation($inter, false)) {
2855
+ $content[] = $inter;
2856
+ } else {
2857
+ $this->count += strlen($m[2]);
2858
+ $content[] = "@{"; // ignore it
2859
+ }
2860
+ } elseif ($m[2] == '\\') {
2861
+ $content[] = $m[2];
2862
+ if ($this->literal($delim, false)) {
2863
+ $content[] = $delim;
2864
+ }
2865
+ } else {
2866
+ $this->count -= strlen($delim);
2867
+ break; // delim
2868
+ }
2869
+ }
2870
+
2871
+ $this->eatWhiteDefault = $oldWhite;
2872
+
2873
+ if ($this->literal($delim)) {
2874
+ $out = array("string", $delim, $content);
2875
+ return true;
2876
+ }
2877
+
2878
+ $this->seek($s);
2879
+ return false;
2880
+ }
2881
+
2882
+ protected function interpolation(&$out) {
2883
+ $oldWhite = $this->eatWhiteDefault;
2884
+ $this->eatWhiteDefault = true;
2885
+
2886
+ $s = $this->seek();
2887
+ if ($this->literal("@{") &&
2888
+ $this->openString("}", $interp, null, array("'", '"', ";")) &&
2889
+ $this->literal("}", false))
2890
+ {
2891
+ $out = array("interpolate", $interp);
2892
+ $this->eatWhiteDefault = $oldWhite;
2893
+ if ($this->eatWhiteDefault) $this->whitespace();
2894
+ return true;
2895
+ }
2896
+
2897
+ $this->eatWhiteDefault = $oldWhite;
2898
+ $this->seek($s);
2899
+ return false;
2900
+ }
2901
+
2902
+ protected function unit(&$unit) {
2903
+ // speed shortcut
2904
+ if (isset($this->buffer[$this->count])) {
2905
+ $char = $this->buffer[$this->count];
2906
+ if (!ctype_digit($char) && $char != ".") return false;
2907
+ }
2908
+
2909
+ if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) {
2910
+ $unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]);
2911
+ return true;
2912
+ }
2913
+ return false;
2914
+ }
2915
+
2916
+ // a # color
2917
+ protected function color(&$out) {
2918
+ if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) {
2919
+ if (strlen($m[1]) > 7) {
2920
+ $out = array("string", "", array($m[1]));
2921
+ } else {
2922
+ $out = array("raw_color", $m[1]);
2923
+ }
2924
+ return true;
2925
+ }
2926
+
2927
+ return false;
2928
+ }
2929
+
2930
+ // consume an argument definition list surrounded by ()
2931
+ // each argument is a variable name with optional value
2932
+ // or at the end a ... or a variable named followed by ...
2933
+ // arguments are separated by , unless a ; is in the list, then ; is the
2934
+ // delimiter.
2935
+ protected function argumentDef(&$args, &$isVararg) {
2936
+ $s = $this->seek();
2937
+ if (!$this->literal('(')) return false;
2938
+
2939
+ $values = array();
2940
+ $delim = ",";
2941
+ $method = "expressionList";
2942
+
2943
+ $isVararg = false;
2944
+ while (true) {
2945
+ if ($this->literal("...")) {
2946
+ $isVararg = true;
2947
+ break;
2948
+ }
2949
+
2950
+ if ($this->$method($value)) {
2951
+ if ($value[0] == "variable") {
2952
+ $arg = array("arg", $value[1]);
2953
+ $ss = $this->seek();
2954
+
2955
+ if ($this->assign() && $this->$method($rhs)) {
2956
+ $arg[] = $rhs;
2957
+ } else {
2958
+ $this->seek($ss);
2959
+ if ($this->literal("...")) {
2960
+ $arg[0] = "rest";
2961
+ $isVararg = true;
2962
+ }
2963
+ }
2964
+
2965
+ $values[] = $arg;
2966
+ if ($isVararg) break;
2967
+ continue;
2968
+ } else {
2969
+ $values[] = array("lit", $value);
2970
+ }
2971
+ }
2972
+
2973
+
2974
+ if (!$this->literal($delim)) {
2975
+ if ($delim == "," && $this->literal(";")) {
2976
+ // found new delim, convert existing args
2977
+ $delim = ";";
2978
+ $method = "propertyValue";
2979
+
2980
+ // transform arg list
2981
+ if (isset($values[1])) { // 2 items
2982
+ $newList = array();
2983
+ foreach ($values as $i => $arg) {
2984
+ switch($arg[0]) {
2985
+ case "arg":
2986
+ if ($i) {
2987
+ $this->throwError("Cannot mix ; and , as delimiter types");
2988
+ }
2989
+ $newList[] = $arg[2];
2990
+ break;
2991
+ case "lit":
2992
+ $newList[] = $arg[1];
2993
+ break;
2994
+ case "rest":
2995
+ $this->throwError("Unexpected rest before semicolon");
2996
+ }
2997
+ }
2998
+
2999
+ $newList = array("list", ", ", $newList);
3000
+
3001
+ switch ($values[0][0]) {
3002
+ case "arg":
3003
+ $newArg = array("arg", $values[0][1], $newList);
3004
+ break;
3005
+ case "lit":
3006
+ $newArg = array("lit", $newList);
3007
+ break;
3008
+ }
3009
+
3010
+ } elseif ($values) { // 1 item
3011
+ $newArg = $values[0];
3012
+ }
3013
+
3014
+ if ($newArg) {
3015
+ $values = array($newArg);
3016
+ }
3017
+ } else {
3018
+ break;
3019
+ }
3020
+ }
3021
+ }
3022
+
3023
+ if (!$this->literal(')')) {
3024
+ $this->seek($s);
3025
+ return false;
3026
+ }
3027
+
3028
+ $args = $values;
3029
+
3030
+ return true;
3031
+ }
3032
+
3033
+ // consume a list of tags
3034
+ // this accepts a hanging delimiter
3035
+ protected function tags(&$tags, $simple = false, $delim = ',') {
3036
+ $tags = array();
3037
+ while ($this->tag($tt, $simple)) {
3038
+ $tags[] = $tt;
3039
+ if (!$this->literal($delim)) break;
3040
+ }
3041
+ if (count($tags) == 0) return false;
3042
+
3043
+ return true;
3044
+ }
3045
+
3046
+ // list of tags of specifying mixin path
3047
+ // optionally separated by > (lazy, accepts extra >)
3048
+ protected function mixinTags(&$tags) {
3049
+ $s = $this->seek();
3050
+ $tags = array();
3051
+ while ($this->tag($tt, true)) {
3052
+ $tags[] = $tt;
3053
+ $this->literal(">");
3054
+ }
3055
+
3056
+ if (count($tags) == 0) return false;
3057
+
3058
+ return true;
3059
+ }
3060
+
3061
+ // a bracketed value (contained within in a tag definition)
3062
+ protected function tagBracket(&$parts, &$hasExpression) {
3063
+ // speed shortcut
3064
+ if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "[") {
3065
+ return false;
3066
+ }
3067
+
3068
+ $s = $this->seek();
3069
+
3070
+ $hasInterpolation = false;
3071
+
3072
+ if ($this->literal("[", false)) {
3073
+ $attrParts = array("[");
3074
+ // keyword, string, operator
3075
+ while (true) {
3076
+ if ($this->literal("]", false)) {
3077
+ $this->count--;
3078
+ break; // get out early
3079
+ }
3080
+
3081
+ if ($this->match('\s+', $m)) {
3082
+ $attrParts[] = " ";
3083
+ continue;
3084
+ }
3085
+ if ($this->string($str)) {
3086
+ // escape parent selector, (yuck)
3087
+ foreach ($str[2] as &$chunk) {
3088
+ $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk);
3089
+ }
3090
+
3091
+ $attrParts[] = $str;
3092
+ $hasInterpolation = true;
3093
+ continue;
3094
+ }
3095
+
3096
+ if ($this->keyword($word)) {
3097
+ $attrParts[] = $word;
3098
+ continue;
3099
+ }
3100
+
3101
+ if ($this->interpolation($inter, false)) {
3102
+ $attrParts[] = $inter;
3103
+ $hasInterpolation = true;
3104
+ continue;
3105
+ }
3106
+
3107
+ // operator, handles attr namespace too
3108
+ if ($this->match('[|-~\$\*\^=]+', $m)) {
3109
+ $attrParts[] = $m[0];
3110
+ continue;
3111
+ }
3112
+
3113
+ break;
3114
+ }
3115
+
3116
+ if ($this->literal("]", false)) {
3117
+ $attrParts[] = "]";
3118
+ foreach ($attrParts as $part) {
3119
+ $parts[] = $part;
3120
+ }
3121
+ $hasExpression = $hasExpression || $hasInterpolation;
3122
+ return true;
3123
+ }
3124
+ $this->seek($s);
3125
+ }
3126
+
3127
+ $this->seek($s);
3128
+ return false;
3129
+ }
3130
+
3131
+ // a space separated list of selectors
3132
+ protected function tag(&$tag, $simple = false) {
3133
+ if ($simple)
3134
+ $chars = '^@,:;{}\][>\(\) "\'';
3135
+ else
3136
+ $chars = '^@,;{}["\'';
3137
+
3138
+ $s = $this->seek();
3139
+
3140
+ $hasExpression = false;
3141
+ $parts = array();
3142
+ while ($this->tagBracket($parts, $hasExpression));
3143
+
3144
+ $oldWhite = $this->eatWhiteDefault;
3145
+ $this->eatWhiteDefault = false;
3146
+
3147
+ while (true) {
3148
+ if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) {
3149
+ $parts[] = $m[1];
3150
+ if ($simple) break;
3151
+
3152
+ while ($this->tagBracket($parts, $hasExpression));
3153
+ continue;
3154
+ }
3155
+
3156
+ if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "@") {
3157
+ if ($this->interpolation($interp)) {
3158
+ $hasExpression = true;
3159
+ $interp[2] = true; // don't unescape
3160
+ $parts[] = $interp;
3161
+ continue;
3162
+ }
3163
+
3164
+ if ($this->literal("@")) {
3165
+ $parts[] = "@";
3166
+ continue;
3167
+ }
3168
+ }
3169
+
3170
+ if ($this->unit($unit)) { // for keyframes
3171
+ $parts[] = $unit[1];
3172
+ $parts[] = $unit[2];
3173
+ continue;
3174
+ }
3175
+
3176
+ break;
3177
+ }
3178
+
3179
+ $this->eatWhiteDefault = $oldWhite;
3180
+ if (!$parts) {
3181
+ $this->seek($s);
3182
+ return false;
3183
+ }
3184
+
3185
+ if ($hasExpression) {
3186
+ $tag = array("exp", array("string", "", $parts));
3187
+ } else {
3188
+ $tag = trim(implode($parts));
3189
+ }
3190
+
3191
+ $this->whitespace();
3192
+ return true;
3193
+ }
3194
+
3195
+ // a css function
3196
+ protected function func(&$func) {
3197
+ $s = $this->seek();
3198
+
3199
+ if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
3200
+ $fname = $m[1];
3201
+
3202
+ $sPreArgs = $this->seek();
3203
+
3204
+ $args = array();
3205
+ while (true) {
3206
+ $ss = $this->seek();
3207
+ // this ugly nonsense is for ie filter properties
3208
+ if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) {
3209
+ $args[] = array("string", "", array($name, "=", $value));
3210
+ } else {
3211
+ $this->seek($ss);
3212
+ if ($this->expressionList($value)) {
3213
+ $args[] = $value;
3214
+ }
3215
+ }
3216
+
3217
+ if (!$this->literal(',')) break;
3218
+ }
3219
+ $args = array('list', ',', $args);
3220
+
3221
+ if ($this->literal(')')) {
3222
+ $func = array('function', $fname, $args);
3223
+ return true;
3224
+ } elseif ($fname == 'url') {
3225
+ // couldn't parse and in url? treat as string
3226
+ $this->seek($sPreArgs);
3227
+ if ($this->openString(")", $string) && $this->literal(")")) {
3228
+ $func = array('function', $fname, $string);
3229
+ return true;
3230
+ }
3231
+ }
3232
+ }
3233
+
3234
+ $this->seek($s);
3235
+ return false;
3236
+ }
3237
+
3238
+ // consume a less variable
3239
+ protected function variable(&$name) {
3240
+ $s = $this->seek();
3241
+ if ($this->literal($this->lessc->vPrefix, false) &&
3242
+ ($this->variable($sub) || $this->keyword($name)))
3243
+ {
3244
+ if (!empty($sub)) {
3245
+ $name = array('variable', $sub);
3246
+ } else {
3247
+ $name = $this->lessc->vPrefix.$name;
3248
+ }
3249
+ return true;
3250
+ }
3251
+
3252
+ $name = null;
3253
+ $this->seek($s);
3254
+ return false;
3255
+ }
3256
+
3257
+ /**
3258
+ * Consume an assignment operator
3259
+ * Can optionally take a name that will be set to the current property name
3260
+ */
3261
+ protected function assign($name = null) {
3262
+ if ($name) $this->currentProperty = $name;
3263
+ return $this->literal(':') || $this->literal('=');
3264
+ }
3265
+
3266
+ // consume a keyword
3267
+ protected function keyword(&$word) {
3268
+ if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) {
3269
+ $word = $m[1];
3270
+ return true;
3271
+ }
3272
+ return false;
3273
+ }
3274
+
3275
+ // consume an end of statement delimiter
3276
+ protected function end() {
3277
+ if ($this->literal(';')) {
3278
+ return true;
3279
+ } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
3280
+ // if there is end of file or a closing block next then we don't need a ;
3281
+ return true;
3282
+ }
3283
+ return false;
3284
+ }
3285
+
3286
+ protected function guards(&$guards) {
3287
+ $s = $this->seek();
3288
+
3289
+ if (!$this->literal("when")) {
3290
+ $this->seek($s);
3291
+ return false;
3292
+ }
3293
+
3294
+ $guards = array();
3295
+
3296
+ while ($this->guardGroup($g)) {
3297
+ $guards[] = $g;
3298
+ if (!$this->literal(",")) break;
3299
+ }
3300
+
3301
+ if (count($guards) == 0) {
3302
+ $guards = null;
3303
+ $this->seek($s);
3304
+ return false;
3305
+ }
3306
+
3307
+ return true;
3308
+ }
3309
+
3310
+ // a bunch of guards that are and'd together
3311
+ // TODO rename to guardGroup
3312
+ protected function guardGroup(&$guardGroup) {
3313
+ $s = $this->seek();
3314
+ $guardGroup = array();
3315
+ while ($this->guard($guard)) {
3316
+ $guardGroup[] = $guard;
3317
+ if (!$this->literal("and")) break;
3318
+ }
3319
+
3320
+ if (count($guardGroup) == 0) {
3321
+ $guardGroup = null;
3322
+ $this->seek($s);
3323
+ return false;
3324
+ }
3325
+
3326
+ return true;
3327
+ }
3328
+
3329
+ protected function guard(&$guard) {
3330
+ $s = $this->seek();
3331
+ $negate = $this->literal("not");
3332
+
3333
+ if ($this->literal("(") && $this->expression($exp) && $this->literal(")")) {
3334
+ $guard = $exp;
3335
+ if ($negate) $guard = array("negate", $guard);
3336
+ return true;
3337
+ }
3338
+
3339
+ $this->seek($s);
3340
+ return false;
3341
+ }
3342
+
3343
+ /* raw parsing functions */
3344
+
3345
+ protected function literal($what, $eatWhitespace = null) {
3346
+ if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
3347
+
3348
+ // shortcut on single letter
3349
+ if (!isset($what[1]) && isset($this->buffer[$this->count])) {
3350
+ if ($this->buffer[$this->count] == $what) {
3351
+ if (!$eatWhitespace) {
3352
+ $this->count++;
3353
+ return true;
3354
+ }
3355
+ // goes below...
3356
+ } else {
3357
+ return false;
3358
+ }
3359
+ }
3360
+
3361
+ if (!isset(self::$literalCache[$what])) {
3362
+ self::$literalCache[$what] = JupiterX_Lessc::preg_quote($what);
3363
+ }
3364
+
3365
+ return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
3366
+ }
3367
+
3368
+ protected function genericList(&$out, $parseItem, $delim="", $flatten=true) {
3369
+ $s = $this->seek();
3370
+ $items = array();
3371
+ while ($this->$parseItem($value)) {
3372
+ $items[] = $value;
3373
+ if ($delim) {
3374
+ if (!$this->literal($delim)) break;
3375
+ }
3376
+ }
3377
+
3378
+ if (count($items) == 0) {
3379
+ $this->seek($s);
3380
+ return false;
3381
+ }
3382
+
3383
+ if ($flatten && count($items) == 1) {
3384
+ $out = $items[0];
3385
+ } else {
3386
+ $out = array("list", $delim, $items);
3387
+ }
3388
+
3389
+ return true;
3390
+ }
3391
+
3392
+
3393
+ // advance counter to next occurrence of $what
3394
+ // $until - don't include $what in advance
3395
+ // $allowNewline, if string, will be used as valid char set
3396
+ protected function to($what, &$out, $until = false, $allowNewline = false) {
3397
+ if (is_string($allowNewline)) {
3398
+ $validChars = $allowNewline;
3399
+ } else {
3400
+ $validChars = $allowNewline ? "." : "[^\n]";
3401
+ }
3402
+ if (!$this->match('('.$validChars.'*?)'.JupiterX_Lessc::preg_quote($what), $m, !$until)) return false;
3403
+ if ($until) $this->count -= strlen($what); // give back $what
3404
+ $out = $m[1];
3405
+ return true;
3406
+ }
3407
+
3408
+ // try to match something on head of buffer
3409
+ protected function match($regex, &$out, $eatWhitespace = null) {
3410
+ if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
3411
+
3412
+ $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
3413
+ if (preg_match($r, $this->buffer, $out, null, $this->count)) {
3414
+ $this->count += strlen($out[0]);
3415
+ if ($eatWhitespace && $this->writeComments) $this->whitespace();
3416
+ return true;
3417
+ }
3418
+ return false;
3419
+ }
3420
+
3421
+ // match some whitespace
3422
+ protected function whitespace() {
3423
+ if ($this->writeComments) {
3424
+ $gotWhite = false;
3425
+ while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) {
3426
+ if (isset($m[1]) && empty($this->commentsSeen[$this->count])) {
3427
+ $this->append(array("comment", $m[1]));
3428
+ $this->commentsSeen[$this->count] = true;
3429
+ }
3430
+ $this->count += strlen($m[0]);
3431
+ $gotWhite = true;
3432
+ }
3433
+ return $gotWhite;
3434
+ } else {
3435
+ $this->match("", $m);
3436
+ return strlen($m[0]) > 0;
3437
+ }
3438
+ }
3439
+
3440
+ // match something without consuming it
3441
+ protected function peek($regex, &$out = null, $from=null) {
3442
+ if (is_null($from)) $from = $this->count;
3443
+ $r = '/'.$regex.'/Ais';
3444
+ $result = preg_match($r, $this->buffer, $out, null, $from);
3445
+
3446
+ return $result;
3447
+ }
3448
+
3449
+ // seek to a spot in the buffer or return where we are on no argument
3450
+ protected function seek($where = null) {
3451
+ if ($where === null) return $this->count;
3452
+ else $this->count = $where;
3453
+ return true;
3454
+ }
3455
+
3456
+ /* misc functions */
3457
+
3458
+ public function throwError($msg = "parse error", $count = null) {
3459
+ $count = is_null($count) ? $this->count : $count;
3460
+
3461
+ $line = $this->line +
3462
+ substr_count(substr($this->buffer, 0, $count), "\n");
3463
+
3464
+ if (!empty($this->sourceName)) {
3465
+ $loc = "$this->sourceName on line $line";
3466
+ } else {
3467
+ $loc = "line: $line";
3468
+ }
3469
+
3470
+ // TODO this depends on $this->count
3471
+ if ($this->peek("(.*?)(\n|$)", $m, $count)) {
3472
+ throw new exception("$msg: failed at `$m[1]` $loc");
3473
+ } else {
3474
+ throw new exception("$msg: $loc");
3475
+ }
3476
+ }
3477
+
3478
+ protected function pushBlock($selectors=null, $type=null) {
3479
+ $b = new stdclass;
3480
+ $b->parent = $this->env;
3481
+
3482
+ $b->type = $type;
3483
+ $b->id = self::$nextBlockId++;
3484
+
3485
+ $b->isVararg = false; // TODO: kill me from here
3486
+ $b->tags = $selectors;
3487
+
3488
+ $b->props = array();
3489
+ $b->children = array();
3490
+
3491
+ $this->env = $b;
3492
+ return $b;
3493
+ }
3494
+
3495
+ // push a block that doesn't multiply tags
3496
+ protected function pushSpecialBlock($type) {
3497
+ return $this->pushBlock(null, $type);
3498
+ }
3499
+
3500
+ // append a property to the current block
3501
+ protected function append($prop, $pos = null) {
3502
+ if ($pos !== null) $prop[-1] = $pos;
3503
+ $this->env->props[] = $prop;
3504
+ }
3505
+
3506
+ // pop something off the stack
3507
+ protected function pop() {
3508
+ $old = $this->env;
3509
+ $this->env = $this->env->parent;
3510
+ return $old;
3511
+ }
3512
+
3513
+ // remove comments from $text
3514
+ // todo: make it work for all functions, not just url
3515
+ protected function removeComments($text) {
3516
+ $look = array(
3517
+ 'url(', '//', '/*', '"', "'"
3518
+ );
3519
+
3520
+ $out = '';
3521
+ $min = null;
3522
+ while (true) {
3523
+ // find the next item
3524
+ foreach ($look as $token) {
3525
+ $pos = strpos($text, $token);
3526
+ if ($pos !== false) {
3527
+ if (!isset($min) || $pos < $min[1]) $min = array($token, $pos);
3528
+ }
3529
+ }
3530
+
3531
+ if (is_null($min)) break;
3532
+
3533
+ $count = $min[1];
3534
+ $skip = 0;
3535
+ $newlines = 0;
3536
+ switch ($min[0]) {
3537
+ case 'url(':
3538
+ if (preg_match('/url\(.*?\)/', $text, $m, 0, $count))
3539
+ $count += strlen($m[0]) - strlen($min[0]);
3540
+ break;
3541
+ case '"':
3542
+ case "'":
3543
+ if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count))
3544
+ $count += strlen($m[0]) - 1;
3545
+ break;
3546
+ case '//':
3547
+ $skip = strpos($text, "\n", $count);
3548
+ if ($skip === false) $skip = strlen($text) - $count;
3549
+ else $skip -= $count;
3550
+ break;
3551
+ case '/*':
3552
+ if (preg_match('/\/\*.*?\*\//s', $text, $m, 0, $count)) {
3553
+ $skip = strlen($m[0]);
3554
+ $newlines = substr_count($m[0], "\n");
3555
+ }
3556
+ break;
3557
+ }
3558
+
3559
+ if ($skip == 0) $count += strlen($min[0]);
3560
+
3561
+ $out .= substr($text, 0, $count).str_repeat("\n", $newlines);
3562
+ $text = substr($text, $count + $skip);
3563
+
3564
+ $min = null;
3565
+ }
3566
+
3567
+ return $out.$text;
3568
+ }
3569
+
3570
+ }
3571
+
3572
+ /**
3573
+ * @ignore
3574
+ */
3575
+ class lessc_formatter_classic {
3576
+ public $indentChar = " ";
3577
+
3578
+ public $break = "\n";
3579
+ public $open = " {";
3580
+ public $close = "}";
3581
+ public $selectorSeparator = ", ";
3582
+ public $assignSeparator = ":";
3583
+
3584
+ public $openSingle = " { ";
3585
+ public $closeSingle = " }";
3586
+
3587
+ public $disableSingle = false;
3588
+ public $breakSelectors = false;
3589
+
3590
+ public $compressColors = false;
3591
+
3592
+ public function __construct() {
3593
+ $this->indentLevel = 0;
3594
+ }
3595
+
3596
+ public function indentStr($n = 0) {
3597
+ return str_repeat($this->indentChar, max($this->indentLevel + $n, 0));
3598
+ }
3599
+
3600
+ public function property($name, $value) {
3601
+ return $name . $this->assignSeparator . $value . ";";
3602
+ }
3603
+
3604
+ protected function isEmpty($block) {
3605
+ if (empty($block->lines)) {
3606
+ foreach ($block->children as $child) {
3607
+ if (!$this->isEmpty($child)) return false;
3608
+ }
3609
+
3610
+ return true;
3611
+ }
3612
+ return false;
3613
+ }
3614
+
3615
+ public function block($block) {
3616
+ if ($this->isEmpty($block)) return;
3617
+
3618
+ $inner = $pre = $this->indentStr();
3619
+
3620
+ $isSingle = !$this->disableSingle &&
3621
+ is_null($block->type) && count($block->lines) == 1;
3622
+
3623
+ if (!empty($block->selectors)) {
3624
+ $this->indentLevel++;
3625
+
3626
+ if ($this->breakSelectors) {
3627
+ $selectorSeparator = $this->selectorSeparator . $this->break . $pre;
3628
+ } else {
3629
+ $selectorSeparator = $this->selectorSeparator;
3630
+ }
3631
+
3632
+ echo $pre .
3633
+ implode($selectorSeparator, $block->selectors);
3634
+ if ($isSingle) {
3635
+ echo $this->openSingle;
3636
+ $inner = "";
3637
+ } else {
3638
+ echo $this->open . $this->break;
3639
+ $inner = $this->indentStr();
3640
+ }
3641
+
3642
+ }
3643
+
3644
+ if (!empty($block->lines)) {
3645
+ $glue = $this->break.$inner;
3646
+ echo $inner . implode($glue, $block->lines);
3647
+ if (!$isSingle && !empty($block->children)) {
3648
+ echo $this->break;
3649
+ }
3650
+ }
3651
+
3652
+ foreach ($block->children as $child) {
3653
+ $this->block($child);
3654
+ }
3655
+
3656
+ if (!empty($block->selectors)) {
3657
+ if (!$isSingle && empty($block->children)) echo $this->break;
3658
+
3659
+ if ($isSingle) {
3660
+ echo $this->closeSingle . $this->break;
3661
+ } else {
3662
+ echo $pre . $this->close . $this->break;
3663
+ }
3664
+
3665
+ $this->indentLevel--;
3666
+ }
3667
+ }
3668
+ }
3669
+
3670
+ /**
3671
+ * @ignore
3672
+ */
3673
+ class lessc_formatter_compressed extends lessc_formatter_classic {
3674
+ public $disableSingle = true;
3675
+ public $open = "{";
3676
+ public $selectorSeparator = ",";
3677
+ public $assignSeparator = ":";
3678
+ public $break = "";
3679
+ public $compressColors = true;
3680
+
3681
+ public function indentStr($n = 0) {
3682
+ return "";
3683
+ }
3684
+ }
3685
+
3686
+ /**
3687
+ * @ignore
3688
+ */
3689
+ class lessc_formatter_lessjs extends lessc_formatter_classic {
3690
+ public $disableSingle = true;
3691
+ public $breakSelectors = true;
3692
+ public $assignSeparator = ": ";
3693
+ public $selectorSeparator = ",";
3694
+ }
includes/control-panel/class-image-sizes.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This class provides the methods to Store and retrieve Image sizes from database.
4
+ *
5
+ * @package JupiterX_Core\Control_Panel\Image_Sizes
6
+ *
7
+ * @since 1.2.0
8
+ */
9
+
10
+ /**
11
+ * Store and retrieve Image sizes.
12
+ *
13
+ * @since 1.2.0
14
+ */
15
+ class JupiterX_Control_Panel_Image_Sizes {
16
+
17
+ /**
18
+ * Return list of the stored image sizes.
19
+ *
20
+ * If empty, it will return default sample size.
21
+ *
22
+ * @since 1.2.0
23
+ *
24
+ * @return array
25
+ */
26
+ public static function get_available_image_sizes() {
27
+ $options = get_option( JUPITERX_IMAGE_SIZE_OPTION );
28
+
29
+ if ( empty( $options ) ) {
30
+ $options = [
31
+ [
32
+ 'size_w' => 500,
33
+ 'size_h' => 500,
34
+ 'size_n' => 'Image Size 500x500',
35
+ 'size_c' => 'on',
36
+ ],
37
+ ];
38
+ }
39
+
40
+ return $options;
41
+ }
42
+
43
+ /**
44
+ * Class constructor.
45
+ *
46
+ * @since 1.2.0
47
+ */
48
+ public function __construct() {
49
+ add_filter( 'jupiterx_control_panel_pane_image_sizes', [ $this, 'view' ] );
50
+ add_action( 'wp_ajax_jupiterx_save_image_sizes', [ $this, 'save_image_size' ] );
51
+ }
52
+
53
+ /**
54
+ * Image sizes HTML directory.
55
+ *
56
+ * @since 1.2.0
57
+ *
58
+ * @return string
59
+ */
60
+ public function view() {
61
+ return jupiterx_core()->plugin_dir() . 'includes/control-panel/views/image-sizes.php';
62
+ }
63
+
64
+ /**
65
+ * Process image sizes data passed via admin-ajax.php and store it in wp_options table.
66
+ *
67
+ * @since 1.2.0
68
+ */
69
+ public function save_image_size() {
70
+ check_ajax_referer( 'ajax-image-sizes-options', 'security' );
71
+
72
+ $options = [];
73
+
74
+ if ( empty( $_POST['options'] ) ) {
75
+ wp_send_json_error( esc_html__( 'Options are not valid.', 'jupiterx-core' ) );
76
+ }
77
+
78
+ // phpcs:disable
79
+ $options = array_map( 'sanitize_text_field', $_POST['options'] );
80
+ // phpcs:enable
81
+
82
+ $options_array = [];
83
+
84
+ foreach ( $options as $sizes ) {
85
+ parse_str( $sizes, $output );
86
+ $options_array[] = $output;
87
+ }
88
+
89
+ update_option( JUPITERX_IMAGE_SIZE_OPTION, $options_array );
90
+
91
+ wp_die( 1 );
92
+ }
93
+ }
94
+
95
+ new JupiterX_Control_Panel_Image_Sizes();
includes/control-panel/class-settings.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings API: JupiterX_Control_Panel_Settings base class
4
+ *
5
+ * @package JupiterX_Core\Framework\Control_Panel\Settings
6
+ *
7
+ * @since 1.4.0
8
+ */
9
+
10
+ if ( ! class_exists( 'JupiterX_Control_Panel_Settings' ) ) {
11
+ /**
12
+ * Settings.
13
+ *
14
+ * @since 1.4.0
15
+ */
16
+ class JupiterX_Control_Panel_Settings {
17
+
18
+ /**
19
+ * Constructor.
20
+ *
21
+ * @since 1.4.0
22
+ */
23
+ public function __construct() {
24
+ add_filter( 'jupiterx_control_panel_pane_settings', [ $this, 'view' ] );
25
+ add_action( 'wp_ajax_jupiterx_cp_settings', [ $this, 'ajax_handler' ] );
26
+ }
27
+
28
+ /**
29
+ * Settings HTML path.
30
+ *
31
+ * @since 1.4.0
32
+ *
33
+ * @return string
34
+ */
35
+ public function view() {
36
+ return jupiterx_core()->plugin_dir() . 'includes/control-panel/views/settings.php';
37
+ }
38
+
39
+ /**
40
+ * Map the requests to proper methods.
41
+ *
42
+ * @since 1.4.0
43
+ */
44
+ public function ajax_handler() {
45
+ check_ajax_referer( 'jupiterx_control_panel', 'nonce' );
46
+
47
+ $type = jupiterx_post( 'type' );
48
+
49
+ if ( ! $type ) {
50
+ wp_send_json_error(
51
+ __( 'Type param is missing.', 'jupiterx-core' )
52
+ );
53
+ }
54
+
55
+ if ( 'flush' === $type ) {
56
+ $this->flush();
57
+ }
58
+
59
+ if ( 'save' === $type ) {
60
+ $this->save();
61
+ }
62
+
63
+ wp_send_json_error(
64
+ /* translators: Function request type to initialize. */
65
+ sprintf( esc_html__( 'Type param (%s) is not valid.', 'jupiterx-core' ), $type )
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Flush assets cache.
71
+ *
72
+ * @since 1.4.0
73
+ */
74
+ public function flush() {
75
+ if ( function_exists( 'jupiterx_flush_compiler' ) ) {
76
+ jupiterx_flush_compiler( 'jupiterx-core' );
77
+ }
78
+
79
+ jupiterx_elementor_flush_cache();
80
+
81
+ wp_send_json_success( esc_html__( 'Assets flushed successfully.', 'jupiterx-core' ) );
82
+ }
83
+
84
+ /**
85
+ * Save settings.
86
+ *
87
+ * @since 1.4.0
88
+ */
89
+ public function save() {
90
+ $fields = jupiterx_post( 'fields' );
91
+
92
+ if ( ! $fields ) {
93
+ wp_send_json_error( esc_html__( 'Fields param is missing.', 'jupiterx-core' ) );
94
+ }
95
+
96
+ if ( ! jupiterx_is_pro() ) {
97
+ $pro_fields = [
98
+ 'jupiterx_adobe_fonts_project_id',
99
+ 'jupiterx_tracking_codes_after_head',
100
+ 'jupiterx_tracking_codes_before_head',
101
+ 'jupiterx_tracking_codes_after_body',
102
+ 'jupiterx_tracking_codes_before_body',
103
+ ];
104
+
105
+ foreach ( $pro_fields as $name ) {
106
+ unset( $fields[ $name ] );
107
+ }
108
+ }
109
+
110
+ foreach ( $fields as $key => $value ) {
111
+ update_option( $key, $value );
112
+ }
113
+
114
+ wp_send_json_success( esc_html__( 'Settings saved successfully.', 'jupiterx-core' ) );
115
+ }
116
+
117
+ }
118
+
119
+ new JupiterX_Control_Panel_Settings();
120
+ }
includes/control-panel/functions.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Jupiter Control Panel component.
4
+ *
5
+ * @package JupiterX_Core\Control_Panel
6
+ */
7
+
8
+ /**
9
+ * Run on control panel init.
10
+ *
11
+ * @since 1.2.0
12
+ */
13
+ add_action( 'jupiterx_control_panel_init', function() {
14
+ jupiterx_core()->load_files( [
15
+ 'control-panel/includes/class-helpers',
16
+ 'control-panel/includes/class-filesystem',
17
+ 'control-panel/class-image-sizes',
18
+ 'control-panel/class-settings',
19
+ 'control-panel/install-template',
20
+ ] );
21
+ } );
22
+
23
+ /**
24
+ * Get started quick guide.
25
+ *
26
+ * @since 1.2.0
27
+ */
28
+ add_action( 'jupiterx_control_panel_get_started', function() {
29
+ ?>
30
+ <h6><?php esc_html_e( 'Get started:', 'jupiterx-core' ); ?></h6>
31
+ <iframe class="mb-4" width="400" height="225" src="https://www.youtube.com/embed/fnlzOHECEDo?modestbranding=1" frameborder="0" allowfullscreen></iframe>
32
+ <?php
33
+ } );
34
+
35
+ /**
36
+ * Core additional settings.
37
+ *
38
+ * @since 1.2.0
39
+ */
40
+ add_action( 'jupiterx_control_panel_after_theme_settings', function() {
41
+ ?>
42
+ <div class="form-group col-md-6">
43
+ <label for="jupiterx-cp-settings-svg-support">
44
+ <?php esc_html_e( 'SVG Support', 'jupiterx-core' ); ?>
45
+ </label>
46
+ <input type="hidden" name="jupiterx_svg_support" value="0">
47
+ <div class="jupiterx-switch">
48
+ <input type="checkbox" id="jupiterx-cp-settings-svg-support" name="jupiterx_svg_support" value="1" <?php echo esc_attr( ( empty( get_option( 'jupiterx_svg_support' ) ) ) ? '' : 'checked' ); ?>>
49
+ <label for="jupiterx-cp-settings-svg-support"></label>
50
+ </div>
51
+ <small class="form-text text-muted">
52
+ <?php esc_html_e( 'Enable this option to upload SVG to WordPress Media Library.', 'jupiterx-core' ); ?>
53
+ </small>
54
+ </div>
55
+ <div class="col-md-12">
56
+ <hr />
57
+ </div>
58
+ <div class="form-group col-md-6">
59
+ <label for="jupiterx-cp-settings-google-analytics-id"><?php esc_html_e( 'Google Analytics ID', 'jupiterx-core' ); ?></label>
60
+ <?php jupiterx_the_help_link( 'http://help.artbees.net/how-to-s/theme-options/adding-google-analytics-code-into-jupiter-x', esc_html__( 'Adding Google Analytics code into Jupiter X', 'jupiterx-core' ) ); ?>
61
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-google-analytics-id" value="<?php echo esc_attr( get_option( 'jupiterx_google_analytics_id' ) ); ?>" name="jupiterx_google_analytics_id" placeholder="UA-45******-*">
62
+ </div>
63
+ <div class="form-group col-md-6">
64
+ <label for="jupiterx-cp-settings-google-analytics-anonymization"><?php esc_html_e( 'IP Anonymization', 'jupiterx-core' ); ?></label>
65
+ <input type="hidden" name="jupiterx_google_analytics_anonymization" value="0">
66
+ <div class="jupiterx-switch">
67
+ <input type="checkbox" id="jupiterx-cp-settings-google-analytics-anonymization" name="jupiterx_google_analytics_anonymization" value="1" <?php echo esc_attr( get_option( 'jupiterx_google_analytics_anonymization', true ) ? 'checked' : '' ); ?>>
68
+ <label for="jupiterx-cp-settings-google-analytics-anonymization"></label>
69
+ </div>
70
+ <small class="form-text text-muted"><?php esc_html_e( 'Enable IP Anonymization for Google Analytics.', 'jupiterx-core' ); ?></small>
71
+ </div>
72
+ <div class="form-group col-md-12">
73
+ <label for="jupiterx-cp-settings-adobe-project-id"><?php esc_html_e( 'Adobe Fonts Project ID', 'jupiterx-core' ); ?></label>
74
+ <?php jupiterx_the_help_link( 'http://help.artbees.net/how-to-s/typography/using-adobe-fonts-formerly-typekit-in-jupiter-x', esc_html__( 'Using Adobe fonts (formerly Typekit) in Jupiter X', 'jupiterx-core' ) ); ?>
75
+ <?php jupiterx_pro_badge(); ?>
76
+ <input <?php echo esc_attr( ( ! jupiterx_is_pro() ) ? 'disabled' : '' ); ?> type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-adobe-project-id" value="<?php echo esc_attr( get_option( 'jupiterx_adobe_fonts_project_id' ) ); ?>" name="jupiterx_adobe_fonts_project_id" placeholder="ezv****">
77
+ </div>
78
+ <div class="col-md-12"><hr></div>
79
+ <div class="form-group col-md-6">
80
+ <label for="jupiterx-cp-settings-tracking-codes-after-head">
81
+ <?php /* translators: %s: html */ ?>
82
+ <?php printf( esc_html__( 'Tracking Codes After %s Tag', 'jupiterx-core' ), '<code>&#x3C;head&#x3E;</code>' ); ?>
83
+ <?php jupiterx_pro_badge(); ?>
84
+ </label>
85
+ <textarea <?php echo esc_attr( ( ! jupiterx_is_pro() ) ? 'disabled' : '' ); ?> class="jupiterx-form-control" rows="7" id="jupiterx-cp-settings-tracking-codes-after-head" name="jupiterx_tracking_codes_after_head" rows="3"><?php echo esc_html( stripslashes( get_option( 'jupiterx_tracking_codes_after_head' ) ) ); ?></textarea>
86
+ </div>
87
+ <div class="form-group col-md-6">
88
+ <label for="jupiterx-cp-settings-tracking-codes-before-head">
89
+ <?php /* translators: %s: html */ ?>
90
+ <?php printf( esc_html__( 'Tracking Codes Before %s Tag', 'jupiterx-core' ), '<code>&#x3C;/head&#x3E;</code>' ); ?>
91
+ <?php jupiterx_pro_badge(); ?>
92
+ </label>
93
+ <textarea <?php echo esc_attr( ( ! jupiterx_is_pro() ) ? 'disabled' : '' ); ?> class="jupiterx-form-control" rows="7" id="jupiterx-cp-settings-tracking-codes-before-head" name="jupiterx_tracking_codes_before_head" rows="3"><?php echo esc_html( stripslashes( get_option( 'jupiterx_tracking_codes_before_head' ) ) ); ?></textarea>
94
+ </div>
95
+ <div class="form-group col-md-6">
96
+ <label for="jupiterx-cp-settings-tracking-codes-after-body">
97
+ <?php /* translators: %s: html */ ?>
98
+ <?php printf( esc_html__( 'Tracking Codes After %s Tag', 'jupiterx-core' ), '<code>&#x3C;body&#x3E;</code>' ); ?>
99
+ <?php jupiterx_pro_badge(); ?>
100
+ </label>
101
+ <textarea <?php echo esc_attr( ( ! jupiterx_is_pro() ) ? 'disabled' : '' ); ?> class="jupiterx-form-control" rows="7" id="jupiterx-cp-settings-tracking-codes-after-body" name="jupiterx_tracking_codes_after_body" rows="3"><?php echo esc_html( stripslashes( get_option( 'jupiterx_tracking_codes_after_body' ) ) ); ?></textarea>
102
+ </div>
103
+ <div class="form-group col-md-6">
104
+ <label for="jupiterx-cp-settings-tracking-codes-before-body">
105
+ <?php /* translators: %s: html */ ?>
106
+ <?php printf( esc_html__( 'Tracking Codes Before %s Tag', 'jupiterx-core' ), '<code>&#x3C;/body&#x3E;</code>' ); ?>
107
+ <?php jupiterx_pro_badge(); ?>
108
+ </label>
109
+ <textarea <?php echo esc_attr( ( ! jupiterx_is_pro() ) ? 'disabled' : '' ); ?> class="jupiterx-form-control" rows="7" id="jupiterx-cp-settings-tracking-codes-before-body" name="jupiterx_tracking_codes_before_body" rows="3"><?php echo esc_html( stripslashes( get_option( 'jupiterx_tracking_codes_before_body' ) ) ); ?></textarea>
110
+ </div>
111
+ <?php
112
+ } );
includes/control-panel/includes/class-filesystem.php ADDED
@@ -0,0 +1,613 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class helper as wrapper of built-in WP wp_filesystem object
5
+ *
6
+ * @version 1.0.0
7
+ * @author Sofyan Sitorus <sofyan@artbees.net>
8
+ *
9
+ * @since 5.7
10
+ */
11
+
12
+ require_once ABSPATH . 'wp-admin/includes/file.php';
13
+ require_once ABSPATH . 'wp-admin/includes/template.php';
14
+ require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
15
+
16
+
17
+ if ( ! class_exists( 'JupiterX_Filesystem' ) ) {
18
+
19
+ /**
20
+ * Filesystem class.
21
+ *
22
+ * @since 1.7.0
23
+ */
24
+ class JupiterX_Filesystem {
25
+
26
+ /**
27
+ * @var array
28
+ */
29
+ private $options = [];
30
+
31
+ /**
32
+ * @var array
33
+ */
34
+ public $errors = [];
35
+
36
+ /**
37
+ * @var null
38
+ */
39
+ public $wp_filesystem = null;
40
+
41
+ /**
42
+ * @var array
43
+ */
44
+ private $creds_data = [];
45
+
46
+ /**
47
+ * @var boolean
48
+ */
49
+ private $initialized = false;
50
+
51
+ /**
52
+ * Constructor
53
+ *
54
+ * @param (array) $args The arguments for the object options. Default: []
55
+ * @param (boolean) $init Whether to initialise the object instantly. Default: false.
56
+ * @param (boolean) $force Whether to force create new instance of $wp_filesystem object. Default: false.
57
+ */
58
+ public function __construct( $args = [], $init = false, $force = false ) {
59
+ $this->errors = new WP_Error();
60
+
61
+ $args = wp_parse_args(
62
+ (array) $args, [
63
+ 'form_post' => '', // (string) The URL to post the form to. Default: ''.
64
+ 'type' => '', // (string) Chosen type of filesystem. Default: ''.
65
+ 'error' => false, // (boolean) Whether the current request has failed to connect. Default: false.
66
+ 'context' => '', // (string) Full path to the directory that is tested for being writable. Default: WP_CONTENT_DIR.
67
+ 'extra_fields' => null, // (array) Extra POST fields in array key value pair format. Default: null.
68
+ 'allow_relaxed_file_ownership' => false, // (boolean) Whether to allow Group/World writable. Default: false.
69
+ 'override' => true, // (boolean) Whether to override some built-in function with custom function. Default: true.
70
+ ]
71
+ );
72
+
73
+ foreach ( $args as $key => $value ) {
74
+ $this->setOption( $key, $value );
75
+ }
76
+
77
+ if ( $init ) {
78
+ $this->init( $force );
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Initialize the wp_filesystem object
84
+ *
85
+ * @param (boolean) $force Whether to force create new instance of $wp_filesystem object. Default: false.
86
+ * @return boolean
87
+ */
88
+ public function init( $force = false ) {
89
+
90
+ global $wp_filesystem;
91
+
92
+ $this->initialized = true;
93
+
94
+ if ( ! $force && $wp_filesystem && $wp_filesystem instanceof WP_Filesystem_Base ) {
95
+
96
+ $this->wp_filesystem = $wp_filesystem;
97
+ return true;
98
+
99
+ } else {
100
+
101
+ $this->creds_data = request_filesystem_credentials(
102
+ $this->getOption( 'form_post' ),
103
+ $this->getOption( 'type' ),
104
+ $this->getOption( 'error' ),
105
+ $this->getOption( 'context' ),
106
+ $this->getOption( 'extra_fields' ),
107
+ $this->getOption( 'allow_relaxed_file_ownership' )
108
+ );
109
+
110
+ if ( ! WP_Filesystem( $this->creds_data, $this->getOption( 'context' ), $this->getOption( 'allow_relaxed_file_ownership' ) ) ) {
111
+
112
+ if ( isset( $wp_filesystem->errors ) && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
113
+ $this->add_error( $wp_filesystem->errors->get_error_code(), $wp_filesystem->errors->get_error_message(), $wp_filesystem->errors->get_error_data() );
114
+ } else {
115
+ $this->add_error( 'unable_to_connect_to_filesystem', __( 'Unable to connect to the filesystem. Please confirm your credentials.', 'jupiterx' ), $this->creds_data );
116
+ }
117
+
118
+ return false;
119
+ } else {
120
+
121
+ $this->wp_filesystem = $wp_filesystem;
122
+
123
+ return true;
124
+ }
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Magic method to call the wp_filesystem method
130
+ *
131
+ * @param string $method
132
+ * @param array $args
133
+ * @return mixed
134
+ * @see wp-admin/includes/class-wp-filesystem-base.php for complete methods available
135
+ */
136
+ public function __call( $method, $args ) {
137
+
138
+ // Try to initialize the wp_filesystem object
139
+ if ( ! $this->initialized ) {
140
+ $this->init();
141
+ }
142
+
143
+ // Stop execution if wp_filesystem objetc is empty
144
+ if ( ! $this->wp_filesystem || ! $this->wp_filesystem instanceof WP_Filesystem_Base ) {
145
+ return false;
146
+ }
147
+
148
+ // Do the magic, Abracadabra...!
149
+ switch ( $method ) {
150
+ case 'mkdir':
151
+ case 'put_contents':
152
+ case 'copy':
153
+ case 'is_writable':
154
+ if ( $this->getOption( 'override' ) ) {
155
+ $result = call_user_func_array( [ $this, $method . '_override' ], $args );
156
+ } else {
157
+ $result = call_user_func_array( [ $this->wp_filesystem, $method ], $args );
158
+ }
159
+
160
+ break;
161
+
162
+ case 'unzip':
163
+ $result = call_user_func_array( [ $this, $method . '_custom' ], $args );
164
+
165
+ break;
166
+
167
+ default:
168
+ if ( ! is_callable( [ $this->wp_filesystem, $method ] ) ) {
169
+ $this->add_error( 'invalid_wp_filesystem_method_' . $method, __( 'Invalid method for $wp_filesystem object!', 'jupiterx' ) );
170
+ $result = false;
171
+ } else {
172
+ $result = call_user_func_array( [ $this->wp_filesystem, $method ], $args );
173
+ }
174
+
175
+ break;
176
+ }
177
+
178
+ $this->setErrors();
179
+
180
+ return $result;
181
+ }
182
+
183
+ /**
184
+ * Create directory recursively
185
+ *
186
+ * @param (string) $path
187
+ * @param (boolean) $chmod
188
+ * @param (boolean) $chown
189
+ * @param (boolean) $chgrp
190
+ * @return boolean
191
+ */
192
+ private function mkdir_override( $path, $chmod = false, $chown = false, $chgrp = false ) {
193
+ // Check if $path already exists
194
+ if ( $this->is_dir( $path ) ) {
195
+ return true;
196
+ } else {
197
+
198
+ // If file exists has same name with directory, delete it
199
+ if ( $this->exists( $path ) ) {
200
+ $this->delete( $path );
201
+ }
202
+
203
+ $path = str_replace( '\\', '/', $path );
204
+
205
+ // Split path as folder chunks.
206
+ $folders = explode( '/', trim( $path, '/' ) );
207
+
208
+ $path_prefix = str_replace( implode( '/', $folders ), '', rtrim( $path, '/' ) );
209
+
210
+ if ( $folders ) {
211
+ $new_folders = [];
212
+
213
+ // Check directories nested, create new if not exixts.
214
+ foreach ( $folders as $folder ) {
215
+ $new_folders[] = trim( $folder, '/' );
216
+ $new_folder = $path_prefix . implode( '/', $new_folders );
217
+
218
+ // Ignore folders outside open_basedir.
219
+ if ( $this->is_open_basedir_restricted( $new_folder ) ) {
220
+ continue;
221
+ }
222
+
223
+ // Skip if $new_folder already exists
224
+ if ( $this->is_dir( $new_folder ) ) {
225
+ continue;
226
+ }
227
+
228
+ // If file exists has same name with $new_folder, delete it
229
+ if ( $this->exists( $new_folder ) ) {
230
+ $this->delete( $new_folder );
231
+ }
232
+
233
+ // Create the $new_folder
234
+ if ( ! $this->wp_filesystem->mkdir( $new_folder, $chmod, $chown, $chgrp ) ) {
235
+ $this->add_error( 'can_not_create_directory', sprintf( __( 'Can\'t create directory %s', 'jupiterx' ), $new_folder ) );
236
+ return false;
237
+ }
238
+ }
239
+ }
240
+ return true;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Write contents to a file
246
+ *
247
+ * @param (string) $file
248
+ * @param (string) $contents
249
+ * @param (boolean) $mode
250
+ * @return boolean
251
+ */
252
+ private function put_contents_override( $file, $contents, $mode = false ) {
253
+
254
+ if ( $this->is_dir( $file ) ) {
255
+ $this->add_error( 'directory_exists_has_same_name', sprintf( __( 'A directory exists has same name %s', 'jupiterx' ), $new_folder ) );
256
+ return false;
257
+ }
258
+
259
+ $path = dirname( $file );
260
+
261
+ if ( ! $this->is_dir( $path ) ) {
262
+ $this->mkdir( $path );
263
+ }
264
+
265
+ return $this->wp_filesystem->put_contents( $file, $contents, $mode );
266
+ }
267
+
268
+ /**
269
+ * Copy file
270
+ *
271
+ * @param (string) $source
272
+ * @param (string) $destination
273
+ * @param (boolean) $overwrite
274
+ * @param (boolean) $mode
275
+ * @return boolean
276
+ */
277
+ private function copy_override( $source, $destination, $overwrite = true, $mode = false ) {
278
+ if ( ! $overwrite && $this->exists( $destination ) ) {
279
+ $this->add_error( 'file_already_exists', sprintf( __( 'File already exists %s', 'jupiterx' ), $new_folder ) );
280
+ return false;
281
+ }
282
+
283
+ if ( ! $this->exists( $source ) ) {
284
+ $this->add_error( 'copy_source_file_not_exists', sprintf( __( 'Copy source file not exists: %s', 'jupiterx' ), $source ) );
285
+ return false;
286
+ }
287
+
288
+ if ( ! $this->is_file( $source ) ) {
289
+ $this->add_error( 'copy_source_file_not_valid', sprintf( __( 'Copy source file not valid: %s', 'jupiterx' ), $source ) );
290
+ return false;
291
+ }
292
+
293
+ if ( ! $this->is_readable( $source ) ) {
294
+ $this->add_error( 'copy_source_file_not_readable', sprintf( __( 'Copy source file not readable: %s', 'jupiterx' ), $source ) );
295
+ return false;
296
+ }
297
+
298
+ $content = $this->get_contents( $source );
299
+
300
+ if ( false === $content ) {
301
+ return false;
302
+ }
303
+
304
+ return $this->put_contents( $destination, $content, $mode );
305
+ }
306
+
307
+ /**
308
+ * Check if file or directory is writable
309
+ *
310
+ * @param (string) $file
311
+ * @return boolean
312
+ */
313
+ private function is_writable_override( $file ) {
314
+
315
+ if ( $this->is_dir( $file ) ) {
316
+ $temp_file = trailingslashit( $file ) . time() . '-' . uniqid() . '.tmp';
317
+
318
+ $this->put_contents( $temp_file, '' );
319
+
320
+ $is_writable = $this->wp_filesystem->is_writable( $temp_file );
321
+
322
+ $this->delete( $temp_file );
323
+
324
+ return $is_writable;
325
+ } else {
326
+ // Create the file if not exists
327
+ if ( ! $this->exists( $file ) ) {
328
+ $this->put_contents( $file, '' );
329
+ }
330
+ return $this->wp_filesystem->is_writable( $file );
331
+ }
332
+ }
333
+
334
+ /**
335
+ * Create zip file of a folder and paste to a destination.
336
+ *
337
+ * @since 1.0.3
338
+ *
339
+ * @param string $folder Target folder to zip.
340
+ * @param string $destination Destination to save the zip.
341
+ * @param string $enclose Enclose all files inside a folder name.
342
+ *
343
+ * @return boolean Zipping status.
344
+ */
345
+ public function zip_folder( $folder, $destination, $enclose ) {
346
+ if ( ! $this->exists( $folder ) ) {
347
+ return false;
348
+ }
349
+
350
+ $temp_file = tempnam( WP_CONTENT_DIR, 'zip' );
351
+
352
+ $zip = new ZipArchive();
353
+
354
+ $zip->open( $temp_file );
355
+
356
+ $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $folder ) );
357
+
358
+ foreach ( $files as $name => $file ) {
359
+ if ( $file->isDir() ) {
360
+ continue;
361
+ }
362
+
363
+ $file_path = $file->getRealPath();
364
+
365
+ $relative_path = substr( $file_path, strlen( $folder ) + 1 );
366
+
367
+ if ( ! empty( $enclose ) ) {
368
+ $relative_path = $enclose . '/' . $relative_path;
369
+ }
370
+
371
+ $zip->addFile( $file_path, $relative_path );
372
+ }
373
+
374
+ $zip->close();
375
+
376
+ // Copy the temp file to directory.
377
+ $this->copy( $temp_file, $destination );
378
+
379
+ // Delete temp file.
380
+ $this->delete( $temp_file );
381
+
382
+ // Check to make sure the file exists.
383
+ return $this->exists( $destination );
384
+ }
385
+
386
+ /**
387
+ * Extract zip file.
388
+ *
389
+ * @param [type] $source The source zip file.
390
+ * @param [type] $destination The destination path.
391
+ * @return [type] [description]
392
+ */
393
+ public function unzip_custom( $source, $destination ) {
394
+ if ( ! $this->exists( $source ) ) {
395
+ $this->add_error( 'zip_source_file_not_exists', sprintf( __( 'Zip source file not exists: %s', 'jupiterx' ), $source ) );
396
+ return false;
397
+ }
398
+
399
+ if ( ! $this->is_file( $source ) ) {
400
+ $this->add_error( 'zip_source_file_not_valid', sprintf( __( 'Zip source file not valid: %s', 'jupiterx' ), $source ) );
401
+ return false;
402
+ }
403
+
404
+ if ( ! $this->is_readable( $source ) ) {
405
+ $this->add_error( 'zip_source_file_not_readable', sprintf( __( 'Zip source file not readable: %s', 'jupiterx' ), $source ) );
406
+ return false;
407
+ }
408
+
409
+ // Check $destination is valid
410
+ if ( ! $this->is_dir( $destination ) ) {
411
+
412
+ // If file exists has same name with $destination, delete it
413
+ if ( $this->exists( $destination ) ) {
414
+ $this->delete( $destination );
415
+ }
416
+
417
+ // Try create new $destination path
418
+ if ( ! $this->mkdir( $destination ) ) {
419
+ $this->add_error( 'fail_create_unzip_destination_directory', sprintf( __( 'Failed to create unzip destination directory: %s', 'jupiterx' ), $destination ) );
420
+ return false;
421
+ }
422
+ }
423
+
424
+ // Check $destination is writable
425
+ if ( ! $this->is_writable( $destination ) ) {
426
+ $this->add_error( 'unzip_destination_not_writable', sprintf( __( 'Unzip destination is not writable: %s', 'jupiterx' ), $destination ) );
427
+ return false;
428
+ }
429
+
430
+ global $wp_filesystem;
431
+
432
+ $wp_filesystem = $this->wp_filesystem;
433
+
434
+ $unzip_file = unzip_file( $source, $destination );
435
+
436
+ if ( is_wp_error( $unzip_file ) ) {
437
+ $this->add_error( $unzip_file->get_error_code(), $unzip_file->get_error_message() );
438
+ return false;
439
+ } elseif ( ! $unzip_file ) {
440
+ $this->add_error( 'failed_unzipping_file', sprintf( __( 'Failed unzipping file: %s', 'jupiterx' ), $source ) );
441
+ return false;
442
+ }
443
+ return true;
444
+ }
445
+
446
+ /**
447
+ * Set options data
448
+ *
449
+ * @param (string) $key
450
+ * @param (string) $value
451
+ * @return void
452
+ */
453
+ public function setOption( $key, $value ) {
454
+ switch ( $key ) {
455
+ case 'context':
456
+ if ( ! empty( $value ) ) {
457
+ $value = is_dir( $value ) ? $value : dirname( $value );
458
+ $value = untrailingslashit( $value );
459
+ }
460
+ break;
461
+ }
462
+ $this->options[ $key ] = $value;
463
+ }
464
+
465
+ /**
466
+ * Get options data
467
+ *
468
+ * @param (string) $key
469
+ * @param (null|string) $default
470
+ * @return mixed
471
+ */
472
+ public function getOption( $key = null, $default = null ) {
473
+ if ( null === $key ) {
474
+ return $this->options;
475
+ } else {
476
+ return isset( $this->options[ $key ] ) ? $this->options[ $key ] : $default;
477
+ }
478
+ }
479
+
480
+ /**
481
+ * Delete options data
482
+ *
483
+ * @param (string) $key
484
+ * @return void
485
+ */
486
+ public function deleteOption( $key ) {
487
+ unset( $this->options[ $key ] );
488
+ }
489
+
490
+ /**
491
+ * Set errors data taken from the wp_filesystem errors
492
+ *
493
+ * @return void
494
+ */
495
+ private function setErrors() {
496
+ if ( isset( $this->wp_filesystem->errors ) && is_wp_error( $this->wp_filesystem->errors ) && $this->wp_filesystem->errors->get_error_code() ) {
497
+ $this->add_error( $this->wp_filesystem->errors->get_error_code(), $this->wp_filesystem->errors->get_error_message() );
498
+ }
499
+ }
500
+
501
+ /**
502
+ * Get current connection method
503
+ *
504
+ * @return mixed
505
+ */
506
+ public function getConnectionMethod() {
507
+ return isset( $this->wp_filesystem->method ) ? $this->wp_filesystem->method : false;
508
+ }
509
+
510
+ /**
511
+ * Get credentials data
512
+ *
513
+ * @return mixed
514
+ */
515
+ public function getCredsData() {
516
+ return $this->creds_data;
517
+ }
518
+
519
+ /**
520
+ * Get all errors
521
+ *
522
+ * @return object Will return the WP_Error object
523
+ */
524
+ public function get_errors() {
525
+ return $this->errors;
526
+ }
527
+
528
+ /**
529
+ * Retrieve all error codes
530
+ *
531
+ * @return array
532
+ */
533
+ public function get_error_codes() {
534
+ return $this->errors->get_error_codes();
535
+ }
536
+
537
+ /**
538
+ * Retrieve first error code available
539
+ *
540
+ * @return string, int or Empty if there is no error codes
541
+ */
542
+ public function get_error_code() {
543
+ return $this->errors->get_error_code();
544
+ }
545
+
546
+ /**
547
+ * Retrieve all error messages or error messages matching code
548
+ *
549
+ * @param (string) $code
550
+ * @return array
551
+ */
552
+ public function get_error_messages( $code = '' ) {
553
+ return $this->errors->get_error_messages( $code );
554
+ }
555
+
556
+ /**
557
+ * Get the first error message available or error message matching code
558
+ *
559
+ * @param (string) $code
560
+ * @return string
561
+ */
562
+ public function get_error_message( $code = '' ) {
563
+ return $this->errors->get_error_message( $code );
564
+ }
565
+
566
+ /**
567
+ * Append more error messages to list of error messages.
568
+ *
569
+ * @param (string) $code
570
+ * @param (string) $message
571
+ * @param (array) $data
572
+ * @return void
573
+ */
574
+ public function add_error( $code, $message, $data = '' ) {
575
+ // Log the error
576
+ if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
577
+ error_log( 'JupiterX_Filesystem Error Code: ' . $code );
578
+ error_log( 'JupiterX_Filesystem Error Message: ' . $message );
579
+ if ( $data && ! is_resource( $data ) ) {
580
+ error_log( 'JupiterX_Filesystem Error Data: ' . wp_json_encode( $data ) );
581
+ }
582
+ }
583
+ $this->errors->add( $code, $message, $data );
584
+ }
585
+
586
+ /**
587
+ * Check path is outside open_basedir paths.
588
+ *
589
+ * @param string $path
590
+ * @return boolean
591
+ */
592
+ public function is_open_basedir_restricted( $path ) {
593
+ $open_basedir_paths = ini_get('open_basedir');
594
+
595
+ if ( empty( $open_basedir_paths ) ) {
596
+ return false;
597
+ }
598
+
599
+ $open_basedir_paths = explode( PATH_SEPARATOR, $open_basedir_paths );
600
+
601
+ foreach ( $open_basedir_paths as $open_basedir_path ) {
602
+ if (
603
+ strpos( $open_basedir_path, $path ) === 0 &&
604
+ $open_basedir_path !== $path
605
+ ) {
606
+ return true;
607
+ }
608
+ }
609
+
610
+ return false;
611
+ }
612
+ }
613
+ }
includes/control-panel/includes/class-helpers.php ADDED
@@ -0,0 +1,492 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'JupiterX_Control_Panel_Helpers' ) ) {
3
+ /**
4
+ * Helper functions class.
5
+ *
6
+ * @since 1.7.0
7
+ */
8
+ class JupiterX_Control_Panel_Helpers {
9
+
10
+ /**
11
+ * Method that is resposible to unzip compress files .
12
+ * it used native WordPress functions.
13
+ *
14
+ * @since 1.0.0
15
+ * @author Artbees <info@artbees.net>
16
+ *
17
+ * @param str $zip_path compress file absolute path.
18
+ * @param str $dest_path Where should it be uncompressed.
19
+ *
20
+ * @return bool will return boolean status of action
21
+ */
22
+ public static function un_zip( $zip_path, $dest_path ) {
23
+
24
+ $zip_path = realpath( $zip_path );
25
+ $dest_path = realpath( $dest_path );
26
+
27
+ $jupiterx_filesystem = new JupiterX_Filesystem(
28
+ array(
29
+ 'context' => $dest_path,
30
+ )
31
+ );
32
+
33
+ if ( $jupiterx_filesystem->get_error_code() ) {
34
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
35
+ return false;
36
+ }
37
+
38
+ if ( ! $jupiterx_filesystem->exists( $zip_path ) ) {
39
+ throw new Exception( __( 'Zip file that you are looking for is not exist', 'jupiterx' ) );
40
+ return false;
41
+ }
42
+
43
+ if ( ! $jupiterx_filesystem->exists( $dest_path ) ) {
44
+ if ( ! $jupiterx_filesystem->mkdir( $dest_path ) ) {
45
+ throw new Exception( __( 'Unzip destination path not exist', 'jupiterx' ) );
46
+ return false;
47
+ }
48
+ }
49
+
50
+ if ( ! $jupiterx_filesystem->is_writable( $dest_path ) ) {
51
+ throw new Exception( __( 'Unzip destination is not writable , Please resolve this issue first.', 'jupiterx' ) );
52
+ return false;
53
+ }
54
+
55
+ $unzipfile = unzip_file( $zip_path, $dest_path );
56
+ if ( is_wp_error( $unzipfile ) ) {
57
+ throw new Exception( $unzipfile->get_error_message(), 1 );
58
+ return false;
59
+ }
60
+ return true;
61
+ }
62
+ /**
63
+ * You can create a directory using this helper , it will check the dest directory for if its writable or not then
64
+ * try to create new one
65
+ *
66
+ * @since 1.0.0
67
+ * @author Artbees <info@artbees.net>
68
+ *
69
+ * @param str $path path of directory that need to be created.
70
+ * @param int $perm permission of new directory , default is : 0775.
71
+ *
72
+ * @return bool will return boolean status of action , all message is setted to $this->message()
73
+ */
74
+ public static function check_perm_and_create( $path, $perm = 0775 ) {
75
+
76
+ $jupiterx_filesystem = new JupiterX_Filesystem(
77
+ array(
78
+ 'context' => $path,
79
+ )
80
+ );
81
+
82
+ if ( $jupiterx_filesystem->get_error_code() ) {
83
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
84
+ return false;
85
+ }
86
+
87
+ if ( $jupiterx_filesystem->exists( $path ) ) {
88
+ if ( ! $jupiterx_filesystem->is_writable( $path ) ) {
89
+ throw new Exception( sprintf( __( '%s directory is not writable', 'jupiterx' ), $path ) );
90
+ return false;
91
+ }
92
+ return true;
93
+ } else {
94
+ if ( ! $jupiterx_filesystem->mkdir( $path, $perm ) ) {
95
+ throw new Exception( sprintf( __( 'Can\'t create directory %s', 'jupiterx' ), $path ) );
96
+ return false;
97
+ }
98
+ return true;
99
+ }
100
+ }
101
+ /**
102
+ * This method is resposible to download file from url and save it on server.
103
+ * it will check if curl is available or not and then decide to use curl or file_get_content
104
+ *
105
+ * @since 1.0.0
106
+ * @author Artbees <info@artbees.net>
107
+ *
108
+ * @param string $url url of file (http://yahoo.com/test-plugin.zip).
109
+ * @param string $file_name name of the fire that should be create at destination directory.
110
+ * @param string $dest_directory absolute path of directory that file save on it.
111
+ *
112
+ * @return bool will return action status
113
+ */
114
+ public static function upload_from_url( $url, $file_name, $dest_directory, $remote_args = [] ) {
115
+ set_time_limit( 0 );
116
+
117
+ try {
118
+ self::check_perm_and_create( $dest_directory );
119
+ } catch ( Exception $e ) {
120
+ throw new Exception( sprintf( __( 'Destination directory is not ready for upload . {%s}', 'jupiterx' ), $dest_directory ) );
121
+ return false;
122
+ }
123
+
124
+
125
+ $response = wp_remote_get( $url, array_merge( [ 'timeout' => 120 ], $remote_args ) );
126
+
127
+ if ( is_wp_error( $response ) ) {
128
+ throw new Exception( $response->get_error_message() );
129
+ return false;
130
+ }
131
+
132
+ $response_body = wp_remote_retrieve_body( $response );
133
+
134
+ if ( is_wp_error( $response_body ) ) {
135
+ throw new Exception( $response_body->get_error_message() );
136
+ return false;
137
+ }
138
+
139
+ $jupiterx_filesystem = new JupiterX_Filesystem(
140
+ array(
141
+ 'context' => $dest_directory,
142
+ )
143
+ );
144
+
145
+ if ( $jupiterx_filesystem->get_error_code() ) {
146
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
147
+ return false;
148
+ }
149
+
150
+ if ( ! $jupiterx_filesystem->put_contents( $dest_directory . $file_name, $response_body ) ) {
151
+ throw new Exception( sprintf( __( "Can't write file to {%s}", 'jupiterx' ), $dest_directory . $file_name ) );
152
+ return false;
153
+ }
154
+
155
+ return $dest_directory . $file_name;
156
+ }
157
+
158
+ /**
159
+ * This method is resposible to delete a directory or file.
160
+ * if the path is pointing to a directory it will remove all the includes file recursivly and then remove directory at last step
161
+ * if the path is pointing to a file it will remove it
162
+ *
163
+ * @since 1.0.0
164
+ * @author Artbees <info@artbees.net>
165
+ *
166
+ * @param str $dir for example (/var/www/jupiter/wp-content/plugins).
167
+ *
168
+ * @return bool true or false
169
+ */
170
+ public static function delete_file_and_dir( $dir ) {
171
+
172
+ if ( empty( $dir ) == true || strlen( $dir ) < 2 ) {
173
+ return false;
174
+ }
175
+
176
+ $dir = realpath( $dir );
177
+
178
+ $jupiterx_filesystem = new JupiterX_Filesystem(
179
+ array(
180
+ 'context' => $dir,
181
+ )
182
+ );
183
+
184
+ if ( $jupiterx_filesystem->get_error_code() ) {
185
+ return false;
186
+ }
187
+
188
+ if ( ! $jupiterx_filesystem->exists( $dir ) ) {
189
+ return true;
190
+ }
191
+
192
+ if ( $jupiterx_filesystem->is_dir( $dir ) ) {
193
+ return $jupiterx_filesystem->rmdir( $dir, true );
194
+ } else {
195
+ return $jupiterx_filesystem->delete( $dir );
196
+ }
197
+
198
+ }
199
+
200
+
201
+ /**
202
+ * Prevents cache.
203
+ * Deletes cache files and transients.
204
+ *
205
+ * @since 1.0.0
206
+ */
207
+
208
+ public static function prevent_cache_plugins() {
209
+ if ( function_exists( 'w3tc_pgcache_flush' ) ) {
210
+ w3tc_pgcache_flush();
211
+ // W3 Total Cache: Page cache flushed.
212
+ } elseif ( function_exists( 'wp_cache_clear_cache' ) ) {
213
+ wp_cache_clear_cache();
214
+ // WP Super Cache: Page cache cleared.
215
+ } elseif ( function_exists( 'rocket_clean_domain' ) ) {
216
+ rocket_clean_domain();
217
+ // WP Rocket: Domain cache purged.
218
+ }
219
+
220
+ if ( ! defined( 'DONOTCACHEPAGE' ) ) {
221
+ define( 'DONOTCACHEPAGE', true );
222
+ }
223
+
224
+ if ( ! defined( 'DONOTCACHCEOBJECT' ) ) {
225
+ define( 'DONOTCACHCEOBJECT', true );
226
+ }
227
+
228
+ if ( ! defined( 'DONOTMINIFY' ) ) {
229
+ define( 'DONOTMINIFY', true );
230
+ }
231
+
232
+ if ( ! defined( 'DONOTCACHEDB' ) ) {
233
+ define( 'DONOTCACHEDB', true );
234
+ }
235
+
236
+ if ( ! defined( 'DONOTCDN' ) ) {
237
+ define( 'DONOTCDN', true );
238
+ }
239
+ }
240
+
241
+ /**
242
+ * Safely and securely get file from server.
243
+ * It attempts to read file using WordPress native file read functions
244
+ * If it fails, we use wp_remote_get. if the site is ssl enabled, we try to convert it http as some servers may fail to get file
245
+ *
246
+ * @author Artbees <info@artbees.net>
247
+ *
248
+ * @param $file_url string its directory URL.
249
+ * @param $file_dir string its directory Path.
250
+ *
251
+ * @return $wp_file_body string
252
+ */
253
+ public static function getFileBody( $file_uri, $file_dir ) {
254
+
255
+ $wp_remote_get_file_body = '';
256
+ $file_dir = realpath( $file_dir );
257
+
258
+ $jupiterx_filesystem = new JupiterX_Filesystem(
259
+ array(
260
+ 'context' => $file_dir,
261
+ )
262
+ );
263
+
264
+ if ( $jupiterx_filesystem->get_error_code() ) {
265
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
266
+ return false;
267
+ }
268
+
269
+ $wp_get_file_body = $jupiterx_filesystem->get_contents( $file_dir );
270
+ if ( false == $wp_get_file_body ) {
271
+ $wp_remote_get_file = wp_remote_get( $file_uri );
272
+
273
+ if ( is_array( $wp_remote_get_file ) && array_key_exists( 'body', $wp_remote_get_file ) ) {
274
+ $wp_remote_get_file_body = $wp_remote_get_file['body'];
275
+
276
+ } elseif ( is_numeric( strpos( $file_uri, 'https://' ) ) ) {
277
+
278
+ $file_uri = str_replace( 'https://', 'http://', $file_uri );
279
+ $wp_remote_get_file = wp_remote_get( $file_uri );
280
+
281
+ if ( ! is_array( $wp_remote_get_file ) || ! array_key_exists( 'body', $wp_remote_get_file ) ) {
282
+ throw new Exception( __( 'SSL connection error. Code: template-assets-get', 'jupiterx' ) );
283
+ return false;
284
+ }
285
+
286
+ $wp_remote_get_file_body = $wp_remote_get_file['body'];
287
+ }
288
+
289
+ $wp_file_body = $wp_remote_get_file_body;
290
+
291
+ } else {
292
+ $wp_file_body = $wp_get_file_body;
293
+ }
294
+ return $wp_file_body;
295
+ }
296
+
297
+ /**
298
+ * Check if the request is done through a localhost.
299
+ *
300
+ * @author Artbees <info@artbees.net>
301
+ *
302
+ * @return boolean
303
+ */
304
+ public static function is_localhost() {
305
+ return ('127.0.0.1' == $_SERVER['REMOTE_ADDR'] || 'localhost' == $_SERVER['REMOTE_ADDR'] || '::1' == $_SERVER['REMOTE_ADDR']) ? 1 : 0;
306
+ }
307
+
308
+ /**
309
+ * Convert alphabetical bit size to numericals
310
+ *
311
+ * @author Artbees <info@artbees.net>
312
+ *
313
+ * @return number
314
+ */
315
+ public static function let_to_num( $size ) {
316
+ $l = substr( $size, -1 );
317
+ $ret = substr( $size, 0, -1 );
318
+
319
+ switch ( strtoupper( $l ) ) {
320
+ case 'P':
321
+ $ret *= 1024;
322
+ case 'T':
323
+ $ret *= 1024;
324
+ case 'G':
325
+ $ret *= 1024;
326
+ case 'M':
327
+ $ret *= 1024;
328
+ case 'K':
329
+ $ret *= 1024;
330
+ }
331
+
332
+ return $ret;
333
+ }
334
+
335
+ /**
336
+ * Convert boolean value to a string value (e.g. from true to 'true')
337
+ *
338
+ * @author Artbees <info@artbees.net>
339
+ *
340
+ * @return String
341
+ */
342
+ public static function make_bool_string( $var ) {
343
+ if ( false == $var || 'false' == $var || 0 == $var || '0' == $var || '' == $var || empty( $var ) ) {
344
+ return 'false';
345
+ }
346
+ return 'true';
347
+ }
348
+
349
+ /**
350
+ * It will create a compress file from list of files
351
+ *
352
+ * @author Artbees <info@artbees.net>
353
+ *
354
+ * @param array $files for example : array('preload-images/5.jpg','kwicks/ringo.gif','rod.jpg','reddit.gif');.
355
+ * @param string $destination name of the file or full address of destination for example : my-archive.zip.
356
+ * @param boolean $overwrite if destionation exist , should it overwrite the compress file ?.
357
+ *
358
+ * @return boolean true if completed and false if something goes wrong
359
+ */
360
+ public static function zip( $files = array(), $destination = '', $overwrite = false ) {
361
+
362
+ $jupiterx_filesystem = new JupiterX_Filesystem(
363
+ array(
364
+ 'context' => $destination,
365
+ )
366
+ );
367
+
368
+ if ( $jupiterx_filesystem->get_error_code() ) {
369
+ return false;
370
+ }
371
+
372
+ // if the zip file already exists and overwrite is false, return false.
373
+ if ( $jupiterx_filesystem->exists( $destination ) && ! $overwrite ) {
374
+ return false;
375
+ }
376
+
377
+ $valid_files = array();
378
+
379
+ // if files were passed in...
380
+ if ( is_array( $files ) ) {
381
+ // cycle through each file.
382
+ foreach ( $files as $file_name => $file_path ) {
383
+ // make sure the file exists.
384
+ if ( $jupiterx_filesystem->exists( $file_path ) ) {
385
+ $valid_files[ $file_name ] = $file_path;
386
+ }
387
+ }
388
+ }
389
+ // if we have good files...
390
+ if ( count( $valid_files ) ) {
391
+
392
+ $temp_file = tempnam( sys_get_temp_dir(), 'zip' );
393
+
394
+ if ( class_exists( 'ZipArchive', false ) ) {
395
+ $zip = new ZipArchive();
396
+
397
+ // Try open the temp file.
398
+ $zip->open( $temp_file );
399
+
400
+ // add the files to archive.
401
+ foreach ( $valid_files as $file_name => $file_path ) {
402
+ $zip->addFile( $file_path, $file_name );
403
+ }
404
+
405
+ // close the zip -- done!
406
+ $zip->close();
407
+
408
+ } else {
409
+
410
+ mbstring_binary_safe_encoding();
411
+
412
+ require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
413
+
414
+ $zip = new PclZip( $temp_file );
415
+
416
+ foreach ( $valid_files as $file_name => $file_path ) {
417
+ $zip->create( $file_path, $file_name );
418
+ }
419
+
420
+ reset_mbstring_encoding();
421
+ }
422
+
423
+ // add the files to archive.
424
+ foreach ( $valid_files as $file_name => $file_path ) {
425
+ $zip->addFile( $file_path, $file_name );
426
+ }
427
+
428
+ // debug
429
+ // echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;
430
+ // close the zip -- done!
431
+ $zip->close();
432
+
433
+ // Copy the temp file to destination.
434
+ $jupiterx_filesystem->copy( $temp_file, $destination, true, 0644 );
435
+
436
+ // Try delete the temp file.
437
+ $jupiterx_filesystem->delete( $temp_file );
438
+
439
+ // check to make sure the file exists.
440
+ return $jupiterx_filesystem->exists( $destination );
441
+
442
+ }
443
+ return false;
444
+ }
445
+
446
+ public static function search_multdim( $array, $key, $value ) {
447
+ return (array_search( $value, array_column( $array, $key ) ));
448
+ }
449
+ /**
450
+ * It will check wether wordpress-importer plugin is exist in plugin directory or not.
451
+ * if exist it will return the WordPress importer file
452
+ * if not it will use jupiter version
453
+ *
454
+ * @author Artbees <info@artbees.net>
455
+ * @copyright Artbees LTD (c)
456
+ * @link https://artbees.net
457
+ * @since Version 5.5
458
+ */
459
+ public static function include_wordpress_importer() {
460
+
461
+ if ( ! class_exists( 'WP_Importer' ) ) {
462
+ defined( 'WP_LOAD_IMPORTERS' ) || define( 'WP_LOAD_IMPORTERS', true );
463
+ include ABSPATH . '/wp-admin/includes/class-wp-importer.php';
464
+ }
465
+
466
+ if ( ! class_exists( 'WXR_Importer' ) ) {
467
+ include JUPITERX_CONTROL_PANEL_PATH . 'includes/importer/class-logger.php';
468
+ include JUPITERX_CONTROL_PANEL_PATH . 'includes/importer/class-logger-serversentevents.php';
469
+ include JUPITERX_CONTROL_PANEL_PATH . 'includes/importer/class-wxr-import-info.php';
470
+ include JUPITERX_CONTROL_PANEL_PATH . 'includes/importer/class-wxr-importer.php';
471
+ }
472
+
473
+ if ( ! class_exists( 'JupiterX_Importer' ) ) {
474
+ include JUPITERX_CONTROL_PANEL_PATH . 'includes/importer/class-jupiterx-importer.php';
475
+ }
476
+
477
+ return true;
478
+ }
479
+ /**
480
+ * It will return permission of directory
481
+ *
482
+ * @author Artbees <info@artbees.net>
483
+ *
484
+ * @param string $path Full path of directory.
485
+ *
486
+ * @return int
487
+ */
488
+ public static function get_perm( $path ) {
489
+ return substr( sprintf( '%o', fileperms( ABSPATH . $path ) ), -4 );
490
+ }
491
+ }
492
+ }
includes/control-panel/install-template.php ADDED
@@ -0,0 +1,1852 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This class is responsible manage all jupiter templates
4
+ * it will communicate with artbees API and get list of templates , install them or remove them.
5
+ *
6
+ * @author Artbees <info@artbees.net>
7
+ * @copyright Artbees LTD (c)
8
+ *
9
+ * @link https://artbees.net
10
+ * @since 1.0
11
+ * @version 1.0
12
+ */
13
+ if ( ! class_exists( 'JupiterX_Control_Panel_Install_Template' ) ) {
14
+ class JupiterX_Control_Panel_Install_Template {
15
+
16
+
17
+ private $layer_slider_slug = 'layerslider';
18
+
19
+ private $theme_name;
20
+
21
+ public function setThemeName( $theme_name ) {
22
+ $this->theme_name = $theme_name;
23
+ }
24
+
25
+ public function getThemeName() {
26
+ return $this->theme_name;
27
+ }
28
+
29
+ private $api_url;
30
+
31
+ public function setApiURL( $api_url ) {
32
+ $this->api_url = $api_url;
33
+ }
34
+
35
+ public function getApiURL() {
36
+ return $this->api_url;
37
+ }
38
+
39
+ private $template_id;
40
+
41
+ public function setTemplateID( $template_id ) {
42
+ $this->template_id = $template_id;
43
+ }
44
+
45
+ public function getTemplateID() {
46
+ return intval( $this->template_id );
47
+ }
48
+
49
+ private $template_name;
50
+
51
+ public function setTemplateName( $template_name ) {
52
+ $this->template_name = $template_name;
53
+ }
54
+
55
+ public function getTemplateName() {
56
+ return strtolower( $this->template_name );
57
+ }
58
+
59
+ private $template_file_name;
60
+
61
+ public function setTemplateFileName( $template_file_name ) {
62
+ $this->template_file_name = $template_file_name;
63
+ }
64
+
65
+ public function getTemplateFileName() {
66
+ return $this->template_file_name;
67
+ }
68
+
69
+ private $template_remote_address;
70
+
71
+ public function setTemplateRemoteAddress( $template_remote_address ) {
72
+ $this->template_remote_address = $template_remote_address;
73
+ }
74
+
75
+ public function getTemplateRemoteAddress() {
76
+ return $this->template_remote_address;
77
+ }
78
+
79
+ private $template_content_file_name;
80
+
81
+ public function setTemplateContentFileName( $template_content_file_name ) {
82
+ $this->template_content_file_name = $template_content_file_name;
83
+ }
84
+
85
+ public function getTemplateContentFileName() {
86
+ return $this->template_content_file_name;
87
+ }
88
+
89
+ private $widget_file_name;
90
+
91
+ public function setWidgetFileName( $widget_file_name ) {
92
+ $this->widget_file_name = $widget_file_name;
93
+ }
94
+
95
+ public function getWidgetFileName() {
96
+ return $this->widget_file_name;
97
+ }
98
+
99
+ /**
100
+ * Settings filename.
101
+ *
102
+ * @since 1.0
103
+ * @var string
104
+ */
105
+ private $settings_file_name;
106
+
107
+ /**
108
+ * Set Settings filename.
109
+ *
110
+ * @since 1.0
111
+ * @param string $settings_file_name Settings filename.
112
+ */
113
+ public function set_settings_file_name( $settings_file_name ) {
114
+ $this->settings_file_name = $settings_file_name;
115
+ }
116
+
117
+ /**
118
+ * Get Settings filename.
119
+ *
120
+ * @since 1.0
121
+ * @return string Settings filename.
122
+ */
123
+ public function get_settings_file_name() {
124
+ return $this->settings_file_name;
125
+ }
126
+
127
+ private $upload_dir;
128
+
129
+ public function setUploadDir( $upload_dir ) {
130
+ $this->upload_dir = $upload_dir;
131
+ }
132
+
133
+ public function getUploadDir() {
134
+ return $this->upload_dir;
135
+ }
136
+
137
+ private $base_path;
138
+
139
+ public function setBasePath( $base_path ) {
140
+ $this->base_path = $base_path;
141
+ }
142
+
143
+ public function getBasePath() {
144
+ return $this->base_path;
145
+ }
146
+
147
+ private $base_url;
148
+
149
+ public function setBaseUrl( $base_url ) {
150
+ $this->base_url = $base_url;
151
+ }
152
+
153
+ public function getBaseUrl() {
154
+ return $this->base_url;
155
+ }
156
+
157
+ private $message;
158
+
159
+ public function setMessage( $message ) {
160
+ $this->message = $message;
161
+ }
162
+
163
+ public function getMessage() {
164
+ return $this->message;
165
+ }
166
+
167
+ /**
168
+ * Construct.
169
+ *
170
+ * @param bool $system_text_env if you want to create an instance of this method for phpunit it should be true
171
+ */
172
+ public function __construct() {
173
+
174
+ add_filter( 'jupiterx_control_panel_pane_install_templates', [ $this, 'view' ] );
175
+
176
+ // Get TGMPA.
177
+ if ( class_exists( 'TGM_Plugin_Activation' ) ) {
178
+ $this->tgmpa = isset( $GLOBALS['tgmpa'] ) ? $GLOBALS['tgmpa'] : TGM_Plugin_Activation::get_instance();
179
+ }
180
+
181
+ $menu_items_access = get_site_option( 'menu_items' );
182
+
183
+ @set_time_limit( 0 );
184
+
185
+ $this->setThemeName( 'jupiterx' );
186
+
187
+ $this->setApiURL( 'https://artbees.net/api/v2/' );
188
+
189
+ $this->setUploadDir( wp_upload_dir() );
190
+ $this->setBasePath( $this->getUploadDir()['basedir'] . '/jupiterx_templates/' );
191
+ $this->setBaseUrl( $this->getUploadDir()['baseurl'] . '/jupiterx_templates/' );
192
+
193
+ $this->setTemplateContentFileName( 'theme_content.xml' );
194
+ $this->setWidgetFileName( 'widget_data.wie' );
195
+ $this->set_settings_file_name( 'settings.json' );
196
+ global $wpdb;
197
+
198
+ if ( ! defined( 'JupiterX_LOAD_IMPORTERS' ) ) {
199
+ define( 'JupiterX_LOAD_IMPORTERS', true );
200
+ }
201
+
202
+ add_filter( 'tgmpa_load', '__return_true', 10, 1 );
203
+
204
+ add_action( 'wp_ajax_abb_template_lazy_load', array( &$this, 'loadTemplatesFromApi' ) );
205
+ add_action( 'wp_ajax_abb_install_template_procedure', array( &$this, 'install_template_procedure' ) );
206
+
207
+ // Action only for importing theme content with Server-Sent Event.
208
+ add_action( 'wp_ajax_abb_install_template_sse', array( &$this, 'import_theme_content_sse' ) );
209
+
210
+ add_action( 'wp_ajax_abb_get_templates_categories', array( &$this, 'getTemplateCategoryListFromApi' ) );
211
+ add_action( 'wp_ajax_abb_restore_latest_db', array( &$this, 'restoreLatestDB' ) );
212
+ add_action( 'wp_ajax_abb_is_restore_db', array( &$this, 'isRestoreDB' ) );
213
+
214
+ add_action( 'wp_ajax_abb_uninstall_template', array( &$this, 'uninstallTemplate' ) );
215
+ add_action( 'wp_ajax_abb_get_template_psd_link', array( &$this, 'get_template_psd_link' ) );
216
+ }
217
+
218
+ /**
219
+ * Settings HTML path.
220
+ *
221
+ * @since 1.4.0
222
+ *
223
+ * @return string
224
+ */
225
+ public function view() {
226
+ return jupiterx_core()->plugin_dir() . 'includes/control-panel/views/install-templates.php';
227
+ }
228
+
229
+ public function install_template_procedure() {
230
+ $template_id = ( isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : 0 );
231
+ $this->setTemplateID( $template_id );
232
+ $template_name = ( isset( $_POST['template_name'] ) ? sanitize_text_field( $_POST['template_name'] ) : null );
233
+ $import_media = ( isset( $_POST['import_media'] ) ? sanitize_text_field( $_POST['import_media'] ) : false );
234
+ $type = ( isset( $_POST['type'] ) ? sanitize_text_field( $_POST['type'] ) : null );
235
+ $partial_import = ( isset( $_POST['partial_import'] ) ? filter_var( $_POST['partial_import'], FILTER_VALIDATE_BOOLEAN ) : false );
236
+
237
+ if ( is_null( $template_name ) || is_null( $type ) ) {
238
+ $this->message( 'System problem at installing , please contact support', false );
239
+ return false;
240
+ }
241
+
242
+ switch ( $type ) {
243
+ case 'preparation':
244
+ $this->preparation( $template_name );
245
+ break;
246
+ case 'backup_db':
247
+ $this->backupDB();
248
+ break;
249
+ case 'backup_media_records':
250
+ $this->backup_media_records();
251
+ break;
252
+ case 'restore_media_records':
253
+ $this->restore_media_records();
254
+ break;
255
+ case 'reset_db':
256
+ $this->resetDB();
257
+ break;
258
+ case 'upload':
259
+ $this->uploadTemplateToServer( $template_name );
260
+ break;
261
+ case 'unzip':
262
+ $this->unzipTemplateInServer( $template_name );
263
+ break;
264
+ case 'validate':
265
+ $this->validateTemplateFiles( $template_name );
266
+ break;
267
+ case 'install_plugins':
268
+ $this->installRequiredPlugins( $template_name );
269
+ break;
270
+ case 'activate_plugins':
271
+ $this->activateRequiredPlugins( $template_name );
272
+ break;
273
+ case 'theme_content':
274
+ $this->importThemeContent( $template_name, $import_media, $partial_import );
275
+ break;
276
+ case 'setup_pages':
277
+ $this->setUpPages( $template_name );
278
+ break;
279
+ case 'plugins_content':
280
+ $this->import_plugins_content( $template_name );
281
+ break;
282
+ case 'settings':
283
+ $this->import_settings( $template_name );
284
+ break;
285
+ case 'menu_locations':
286
+ $this->importMenuLocations( $template_name );
287
+ break;
288
+ case 'theme_widget':
289
+ $this->importThemeWidgets( $template_name );
290
+ break;
291
+ case 'finalize':
292
+ $this->finalizeImporting( $template_name, $partial_import );
293
+ break;
294
+ }
295
+ }
296
+ public function reinitializeData( $template_name ) {
297
+ try {
298
+ if ( empty( $template_name ) ) {
299
+ throw new Exception( 'Choose template first' );
300
+ }
301
+ $this->setTemplateName( $template_name );
302
+ if (
303
+ file_exists( $this->getAssetsAddress( 'template_content_path', $this->getTemplateName() ) ) == false ||
304
+ file_exists( $this->getAssetsAddress( 'widget_path', $this->getTemplateName() ) ) == false ||
305
+ file_exists( $this->getAssetsAddress( 'settings_path', $this->getTemplateName() ) ) == false
306
+ ) {
307
+ throw new Exception( "Some template assets are missing Template Name : $template_name, Contact support." );
308
+ } else {
309
+ return true;
310
+ }
311
+ } catch ( Exception $e ) {
312
+ $this->message( $e->getMessage(), false );
313
+ return false;
314
+ }
315
+ }
316
+
317
+ /**
318
+ * Reinitilize Template file is exist or not for SEE request.
319
+ *
320
+ * @since 1.0
321
+ *
322
+ * @throws Exception If template name empty.
323
+ * @throws Exception If template file is not exist.
324
+ *
325
+ * @param string $template_name The template name will be imported.
326
+ * @param string $template_id The template ID will be imported.
327
+ * @return boolean File status.
328
+ */
329
+ public function reinitialize_data_sse( $template_name, $template_id ) {
330
+ try {
331
+
332
+ // Check template name and ID.
333
+ if ( empty( $template_name ) || empty( $template_id ) ) {
334
+ throw new Exception( 'Choose template first!' );
335
+ }
336
+
337
+ $this->setTemplateName( $template_name );
338
+ $this->setTemplateID( $template_id );
339
+
340
+ // Check template file exist or not.
341
+ if ( false === file_exists( $this->getAssetsAddress( 'template_content_path', $this->getTemplateName() ) ) ) {
342
+ throw new Exception( 'Template content does not exist - Contact support.' );
343
+ }
344
+
345
+ return true;
346
+ } catch ( Exception $e ) {
347
+ $this->message_sse( $e->getMessage(), true );
348
+ exit;
349
+ }
350
+ }
351
+
352
+ /**
353
+ * Method that is resposible to pass plugin list to UI base on lazy load condition.
354
+ *
355
+ * @param str $_POST[from] from number.
356
+ * @param str $_POST[count] how many.
357
+ *
358
+ * @return bool will return boolean status of action , all message is setted to $this->message()
359
+ */
360
+ public function loadTemplatesFromApi() {
361
+ try {
362
+ $from = ( isset( $_POST['from'] ) ? intval( $_POST['from'] ) : null );
363
+ $count = ( isset( $_POST['count'] ) ? intval( $_POST['count'] ) : null );
364
+ $template_id = ( isset( $_POST['template_id'] ) ? intval( $_POST['template_id'] ) : 0 );
365
+ $template_name = ( isset( $_POST['template_name'] ) ? sanitize_text_field( $_POST['template_name'] ) : null );
366
+ $template_category = ( isset( $_POST['template_category'] ) ? sanitize_text_field( $_POST['template_category'] ) : null );
367
+
368
+ if ( is_null( $from ) || is_null( $count ) ) {
369
+ throw new Exception( 'System problem , please contact support', 1001 );
370
+ return false;
371
+ }
372
+ $getTemplateListArgs = [
373
+ 'pagination_start' => $from,
374
+ 'pagination_count' => $count,
375
+ 'template_category' => $template_category,
376
+ 'template_name' => $template_name,
377
+ 'template_id' => $template_id,
378
+ ];
379
+ $list_of_templates = $this->getTemplateListFromApi( $getTemplateListArgs );
380
+
381
+ if ( ! is_array( $list_of_templates ) ) {
382
+ throw new Exception( 'Template list is not what we expected' );
383
+ }
384
+
385
+ if ( jupiterx_is_pro() ) {
386
+ foreach ( $list_of_templates as $index => $template ) {
387
+ $list_of_templates[ $index ]->free_template = '1';
388
+ }
389
+ }
390
+
391
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
392
+ $backups = $db_manager->is_restore_db();
393
+ $this->message(
394
+ 'Successfull', true, array(
395
+ 'templates' => $list_of_templates,
396
+ 'backups' => $backups,
397
+ )
398
+ );
399
+ return true;
400
+
401
+ } catch ( Exception $e ) {
402
+ $this->message( $e->getMessage(), false );
403
+ return false;
404
+ }
405
+ }
406
+ public function preparation( $template_name ) {
407
+ try {
408
+ $this->message( 'All is ready.', true );
409
+ return true;
410
+ } catch ( Exception $e ) {
411
+ $this->message( $e->getMessage(), false );
412
+ return false;
413
+ }
414
+ }
415
+ public function backupDB() {
416
+ try {
417
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
418
+ $dm_response = $db_manager->backup_db();
419
+ if ( false == $dm_response ) {
420
+ throw new Exception( $db_manager->get_error_message() );
421
+ }
422
+
423
+ $this->message( 'Backup created.', true );
424
+ return true;
425
+
426
+ } catch ( Exception $e ) {
427
+ $this->message( $e->getMessage(), false );
428
+ return false;
429
+ }
430
+ }
431
+ public function backup_media_records() {
432
+ try {
433
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
434
+
435
+ $dm_response = $db_manager->backup_media_records();
436
+
437
+ if ( false == $dm_response ) {
438
+ throw new Exception( $db_manager->get_error_message() );
439
+ }
440
+ $this->message( 'Media records backup created.', true );
441
+ return true;
442
+
443
+ } catch ( Exception $e ) {
444
+ $this->message( $e->getMessage(), false );
445
+ return false;
446
+ }
447
+ }
448
+ public function restore_media_records() {
449
+ try {
450
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
451
+
452
+ $dm_response = $db_manager->restore_media_records();
453
+
454
+ if ( false == $dm_response ) {
455
+ throw new Exception( $db_manager->get_error_message() );
456
+ }
457
+ $this->message( 'Media records restored successfully', true );
458
+ return true;
459
+
460
+ } catch ( Exception $e ) {
461
+ $this->message( $e->getMessage(), false );
462
+ return false;
463
+ }
464
+ }
465
+ public function isRestoreDB() {
466
+ try {
467
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
468
+ $result = $db_manager->is_restore_db();
469
+ if ( is_array( $result ) ) {
470
+ $this->message( 'Successfull', true, $result );
471
+ return true;
472
+ } else {
473
+ throw new Exception( 'Result is not what we expected' );
474
+ }
475
+ } catch ( Exception $e ) {
476
+ $this->message( $e->getMessage(), false );
477
+ return false;
478
+ }
479
+ }
480
+ public function restoreLatestDB() {
481
+ try {
482
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
483
+ $return = $db_manager->restore_latest_db();
484
+ if ( false == $return ) {
485
+ throw new Exception( $db_manager->get_error_message() );
486
+ }
487
+ JupiterX_Control_Panel_Helpers::prevent_cache_plugins();
488
+ $this->message( 'Restore completed!', true );
489
+ return true;
490
+ } catch ( Exception $e ) {
491
+ $this->message( $e->getMessage(), false );
492
+ return false;
493
+ }
494
+ }
495
+ public function resetDB() {
496
+ try {
497
+ $tables = array(
498
+ 'comments',
499
+ 'commentmeta',
500
+ 'links',
501
+ // 'options',
502
+ 'postmeta',
503
+ 'posts',
504
+ 'term_relationships',
505
+ 'termmeta',
506
+ 'terms',
507
+ 'term_taxonomy',
508
+ );
509
+
510
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
511
+ if ( jupiterx_is_callable( 'SitePress' ) ) {
512
+ $tables[] = 'icl_translations';
513
+ }
514
+
515
+ $this->resetWordpressDatabase( $tables, array(), false );
516
+ $this->message( 'Database reseted', true );
517
+
518
+ return true;
519
+ } catch ( Exception $e ) {
520
+ $this->message( $e->getMessage(), false );
521
+
522
+ return false;
523
+ }
524
+ }
525
+ public function uploadTemplateToServer( $template_name ) {
526
+ try {
527
+ $this->setTemplateName( $template_name );
528
+ $getTemplateName = $this->getTemplateName();
529
+ if ( empty( $getTemplateName ) ) {
530
+ throw new Exception( 'Choose one template first' );
531
+ }
532
+ $url = $this->getTemplateDownloadLink( $this->getTemplateName(), 'download' );
533
+ $template_file_name = $this->getTemplateDownloadLink( $this->getTemplateName(), 'filename' );
534
+ $this->setTemplateRemoteAddress( $url );
535
+ if ( filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
536
+ throw new Exception( 'Template source URL is not validate' );
537
+ }
538
+ JupiterX_Control_Panel_Helpers::upload_from_url( $this->getTemplateRemoteAddress(), $template_file_name, $this->getBasePath() );
539
+ $this->message( 'Uploaded to server', true );
540
+ return true;
541
+ } catch ( Exception $e ) {
542
+ $this->message( $e->getMessage(), false );
543
+ return false;
544
+ }
545
+ }
546
+ public function unzipTemplateInServer( $template_name ) {
547
+ try {
548
+ $this->setTemplateName( $template_name );
549
+ $getTemplateName = $this->getTemplateName();
550
+ if ( empty( $getTemplateName ) ) {
551
+ throw new Exception( 'Choose one template first' );
552
+ }
553
+
554
+ $response = $this->getTemplateDownloadLink( $this->getTemplateName(), 'filename' );
555
+
556
+ $this->setTemplateFileName( $response );
557
+
558
+ $jupiterx_filesystem = new JupiterX_Filesystem(
559
+ array(
560
+ 'context' => $this->getBasePath(),
561
+ )
562
+ );
563
+
564
+ if ( $jupiterx_filesystem->get_error_code() ) {
565
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
566
+ return false;
567
+ }
568
+
569
+ if ( ! $jupiterx_filesystem->exists( $this->getBasePath() . $this->getTemplateName() ) ) {
570
+ JupiterX_Control_Panel_Helpers::un_zip( $this->getBasePath() . $this->getTemplateFileName(), $this->getBasePath() );
571
+ } else {
572
+ if ( $jupiterx_filesystem->rmdir( $this->getBasePath() . $this->getTemplateName(), true ) ) {
573
+ JupiterX_Control_Panel_Helpers::un_zip( $this->getBasePath() . $this->getTemplateFileName(), $this->getBasePath() );
574
+ }
575
+ }
576
+
577
+ $jupiterx_filesystem->delete( $this->getBasePath() . $this->getTemplateFileName() );
578
+
579
+ $this->message( 'Completed', true );
580
+
581
+ return true;
582
+ } catch ( Exception $e ) {
583
+ $this->message( $e->getMessage(), false );
584
+
585
+ return false;
586
+ }
587
+ }
588
+ public function validateTemplateFiles( $template_name ) {
589
+ try {
590
+ if ( empty( $template_name ) ) {
591
+ throw new Exception( 'Choose template first' );
592
+ }
593
+
594
+ $jupiterx_filesystem = new JupiterX_Filesystem(
595
+ array(
596
+ 'context' => $this->getBasePath(),
597
+ )
598
+ );
599
+
600
+ if ( $jupiterx_filesystem->get_error_code() ) {
601
+ throw new Exception( $jupiterx_filesystem->get_error_message() );
602
+ return false;
603
+ }
604
+
605
+ $this->setTemplateName( $template_name );
606
+ if (
607
+ $jupiterx_filesystem->exists( $this->getAssetsAddress( 'template_content_path', $this->getTemplateName() ) ) == false ||
608
+ $jupiterx_filesystem->exists( $this->getAssetsAddress( 'widget_path', $this->getTemplateName() ) ) == false ||
609
+ $jupiterx_filesystem->exists( $this->getAssetsAddress( 'settings_path', $this->getTemplateName() ) ) == false
610
+ ) {
611
+ throw new Exception( "Some template assets are missing Template Name : $template_name, Contact support." );
612
+ } else {
613
+ $this->message( 'Completed', true );
614
+ return true;
615
+ }
616
+ } catch ( Exception $e ) {
617
+ $this->message( $e->getMessage(), false );
618
+
619
+ return false;
620
+ }
621
+ }
622
+
623
+ public function installRequiredPlugins( $template_name ) {
624
+
625
+ $plugin_install_access = is_multisite() ? is_super_admin() : ( current_user_can( 'install_themes' ) && current_user_can( 'activate_plugins' ) );
626
+ $single_site_message = 'You are not allowed to install a new plugin or template because your user role does not have required permissions.';
627
+ $multi_site_message = 'Template installation is only allowed for user with Super Admin role. Please contact your website\'s administrator.<a class="btn btn-link" href="https://themes.artbees.net/docs/installing-a-template/">Learn More</a>';
628
+
629
+ if ( ! $plugin_install_access ) {
630
+ $message = $single_site_message;
631
+ if ( is_multisite() ) {
632
+ $message = $multi_site_message;
633
+ }
634
+ $this->message( $message, false );
635
+ }
636
+
637
+ $template_settings = $this->getSettingsData( $template_name );
638
+ $actions = [];
639
+ $plugins_to_install = [];
640
+ $tgmpa_url = $this->tgmpa->get_tgmpa_url();
641
+ $template_plugins = $template_settings['options']['jupiterx_support_plugins'];
642
+
643
+ $template_plugins = array_diff( $template_plugins, ['jupiterx-pro', 'advanced-custom-fields-pro'] );
644
+
645
+ $template_plugins[] = 'advanced-custom-fields';
646
+
647
+ foreach ( $template_plugins as $slug ) {
648
+
649
+ if ( ! $this->tgmpa->is_plugin_active( $slug ) || false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
650
+ if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
651
+ $plugins_to_install[] = $slug;
652
+ }
653
+ }
654
+ }
655
+
656
+ if ( ! empty( $plugins_to_install ) ) {
657
+ $actions['install'] = [
658
+ 'url' => $tgmpa_url,
659
+ 'plugin' => $plugins_to_install,
660
+ 'tgmpa-page' => $this->tgmpa->menu,
661
+ 'plugin_status' => 'all',
662
+ '_wpnonce' => wp_create_nonce( 'bulk-plugins' ),
663
+ 'action' => 'tgmpa-bulk-install',
664
+ 'action2' => - 1,
665
+ 'message' => esc_html__( 'Installing', 'jupiterx' ),
666
+ ];
667
+ }
668
+
669
+ $actions['url'] = $tgmpa_url;
670
+ $actions['status'] = true;
671
+
672
+ wp_send_json( $actions );
673
+ }
674
+
675
+ public function activateRequiredPlugins( $template_name ) {
676
+
677
+ $template_settings = $this->getSettingsData( $template_name );
678
+ $actions = [];
679
+ $tgmpa_url = $this->tgmpa->get_tgmpa_url();
680
+ $template_plugins = $template_settings['options']['jupiterx_support_plugins'];
681
+
682
+ $template_plugins = array_diff( $template_plugins, ['jupiterx-pro', 'advanced-custom-fields-pro'] );
683
+
684
+ $template_plugins[] = 'advanced-custom-fields';
685
+
686
+ $actions['activate'] = [
687
+ 'url' => $tgmpa_url,
688
+ 'plugin' => $template_plugins,
689
+ 'tgmpa-page' => $this->tgmpa->menu,
690
+ 'plugin_status' => 'all',
691
+ '_wpnonce' => wp_create_nonce( 'bulk-plugins' ),
692
+ 'action' => 'tgmpa-bulk-activate',
693
+ 'action2' => - 1,
694
+ 'message' => esc_html__( 'Activating', 'jupiterx' ),
695
+ ];
696
+
697
+ $actions['url'] = $tgmpa_url;
698
+ $actions['status'] = true;
699
+
700
+ wp_send_json( $actions );
701
+ }
702
+
703
+
704
+ /**
705
+ * Import plugins content.
706
+ *
707
+ * @since 1.0.3
708
+ */
709
+ public function import_plugins_content( $template_name ) {
710
+
711
+ try {
712
+ $this->setTemplateName( $template_name );
713
+ // Get template settings.
714
+ $settings = $this->getSettingsData( $this->getTemplateName() );
715
+
716
+ // Supported plugins list.
717
+ $supported_plugins = $settings['options']['jupiterx_support_plugins'];
718
+
719
+ // Run plugins importer.
720
+ foreach ( $supported_plugins as $plugin ) {
721
+ if ( is_callable( [ $this, "import_{$plugin}_content" ] ) ) {
722
+ call_user_func( [ $this, "import_{$plugin}_content" ] );
723
+ }
724
+ }
725
+
726
+ $this->message( esc_html__( 'Data of plugins have imported.', 'jupiterx'), true );
727
+
728
+ return true;
729
+ } catch ( Exception $e ) {
730
+ $this->message( $e->getMessage(), false );
731
+ return false;
732
+ }
733
+
734
+ }
735
+
736
+ /**
737
+ * Import Revolution Slider content.
738
+ *
739
+ * @since 1.0.3
740
+ */
741
+ public function import_revslider_content() {
742
+ if ( ! class_exists( 'RevSlider' ) ) {
743
+ return;
744
+ }
745
+
746
+ $filesystem = new JupiterX_Filesystem( [
747
+ 'context' => $this->getBasePath(),
748
+ ] );
749
+
750
+ $revslider_folder = $this->getBasePath() . sanitize_title( $this->getTemplateName() ) . '/revslider';
751
+
752
+ // Check extracted template if `revslider` folder exists inside.
753
+ if ( ! $filesystem->exists( $revslider_folder ) ) {
754
+ return;
755
+ }
756
+
757
+ $revslider = new RevSlider();
758
+
759
+ $sliders = glob( $revslider_folder . '/*.zip' );
760
+
761
+ if ( empty( $sliders ) ) {
762
+ return;
763
+ }
764
+
765
+ global $wpdb;
766
+
767
+ $tables = [
768
+ 'revslider_css',
769
+ 'revslider_layer_animations',
770
+ 'revslider_navigations',
771
+ 'revslider_sliders',
772
+ 'revslider_slides',
773
+ 'revslider_static_slides',
774
+ ];
775
+
776
+ // Truncate tables.
777
+ foreach ( $tables as $table ) {
778
+ $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}{$table}" );
779
+ }
780
+
781
+ // Import sliders.
782
+ foreach ( $sliders as $slide ) {
783
+ /**
784
+ * Start import slider.
785
+ *
786
+ * @param boolean Update animation.
787
+ * @param boolean Deprecated static param.
788
+ * @param mixed Slider file path.
789
+ * @param boolean Template slide.
790
+ * @param boolean Single slide.
791
+ * @param boolean Update navigation.
792
+ */
793
+ $revslider->importSliderFromPost( true, true, $slide, false, false, true );
794
+ }
795
+ }
796
+
797
+ /**
798
+ * Import theme content via Server-Sent Events request.
799
+ *
800
+ *
801
+ * @throws Exception If template data is empty.
802
+ * @throws Exception If preliminary data is empty.
803
+ */
804
+ public function import_theme_content_sse() {
805
+ try {
806
+ /*
807
+ * Filter data input from GET method. Eventsource doesn't allow us to use
808
+ * POST method.
809
+ */
810
+ $template_name = '';
811
+ if ( ! empty( $_GET['template_name'] ) ) {
812
+ // WPCS: XSS ok, CSRF ok.
813
+ $template_name = sanitize_text_field( $_GET['template_name'] );
814
+ }
815
+
816
+ $template_id = '';
817
+ if ( ! empty( $_GET['template_id'] ) ) {
818
+ // WPCS: XSS ok, CSRF ok.
819
+ $template_id = sanitize_text_field( $_GET['template_id'] );
820
+ }
821
+
822
+ $fetch_attachments = 'false';
823
+ if ( ! empty( $_GET['fetch_attachments'] ) ) {
824
+ // WPCS: XSS ok, CSRF ok.
825
+ $fetch_attachments = sanitize_text_field( $_GET['fetch_attachments'] );
826
+ }
827
+
828
+ $partial_import = false;
829
+ if ( ! empty( $_GET['partial_import'] ) ) {
830
+ // phpcs:ignore
831
+ $partial_import = filter_var( $_GET['partial_import'], FILTER_VALIDATE_BOOLEAN );
832
+ }
833
+
834
+ // Include wordpress-importer class.
835
+ JupiterX_Control_Panel_Helpers::include_wordpress_importer();
836
+ $this->reinitialize_data_sse( $template_name, $template_id );
837
+
838
+ // Set importer options as an array.
839
+ $options = array(
840
+ 'fetch_attachments' => filter_var( $fetch_attachments, FILTER_VALIDATE_BOOLEAN ),
841
+ 'default_author' => get_current_user_id(),
842
+ );
843
+
844
+ // Create new instance for Importer.
845
+ $importer = new JupiterX_Importer( $options, $partial_import );
846
+ $logger = new WP_Importer_Logger_ServerSentEvents();
847
+ $importer->set_logger( $logger );
848
+
849
+ // Get preliminary information.
850
+ $file = $this->getAssetsAddress( 'template_content_path', $this->getTemplateName() );
851
+ $pre_data = $importer->get_preliminary_information( $file );
852
+ if ( is_wp_error( $pre_data ) ) {
853
+ throw new Exception( $pre_data->get_error_message() );
854
+ }
855
+
856
+ // @codingStandardsIgnoreStart
857
+ // Turn off PHP output compression, allow us to print the log.
858
+ $previous = error_reporting(error_reporting() ^ E_WARNING);
859
+
860
+ // Configuration disabled for theme check plugin.
861
+ // ini_set('output_buffering', 'off');
862
+ // ini_set('zlib.output_compression', false);
863
+
864
+ error_reporting($previous);
865
+ // @codingStandardsIgnoreEnd
866
+
867
+ if ( $GLOBALS['is_nginx'] ) {
868
+ // Setting this header instructs Nginx to disable fastcgi_buffering
869
+ // and disable gzip for this request.
870
+ header( 'X-Accel-Buffering: no' );
871
+ header( 'Content-Encoding: none' );
872
+ }
873
+
874
+ // Start the event stream here to record all the logs.
875
+ header( 'Content-Type: text/event-stream' );
876
+ header( 'Cache-Control: no-cache' );
877
+
878
+ // Time to run the import!
879
+ set_time_limit( 0 );
880
+
881
+ // Ensure we're not buffered.
882
+ wp_ob_end_flush_all();
883
+ flush();
884
+
885
+ // Run import process.
886
+ $process = $importer->import( $file );
887
+
888
+ // Setup complete response.
889
+ $complete = array(
890
+ 'status' => true, // The process is complete no matter success or not.
891
+ 'error' => false, // Message error if any.
892
+ 'data' => null, // Compatibility with current Ajax.
893
+ 'message' => 'Template contents were imported.',
894
+ );
895
+
896
+ // Check if the request is error, then set the message.
897
+ if ( is_wp_error( $process ) ) {
898
+ $complete['error'] = $process->get_error_message();
899
+ }
900
+
901
+ $this->message_sse( $complete );
902
+ exit;
903
+
904
+ } catch ( Exception $e ) {
905
+ $this->message_sse( $e->getMessage(), true );
906
+ exit;
907
+ }
908
+ }
909
+
910
+ /**
911
+ * Get settings.json data.
912
+ *
913
+ */
914
+ public function getSettingsData( $template_name ) {
915
+
916
+ $this->setTemplateName( $template_name );
917
+ $settings_url = $this->getAssetsAddress( 'settings_url', $this->getTemplateName() );
918
+ $settings_path = $this->getAssetsAddress( 'settings_path', $this->getTemplateName() );
919
+ $response = JupiterX_Control_Panel_Helpers::getFileBody( $settings_url, $settings_path );
920
+
921
+ return json_decode( $response, true );
922
+ }
923
+
924
+ /**
925
+ * Send a Server-Sent Events message.
926
+ *
927
+ *
928
+ * @param mixed $message Data to be JSON-encoded and sent in the message.
929
+ * @param boolean $need_header Send response along with the header.
930
+ */
931
+ public function message_sse( $message, $need_header = false ) {
932
+ // Add header to start event stream only if needed.
933
+ if ( $need_header ) {
934
+ // Start the event stream.
935
+ header( 'Content-Type: text/event-stream' );
936
+ header( 'Cache-Control: no-cache' );
937
+ }
938
+
939
+ // Convert any message data as an array.
940
+ if ( ! is_array( $message ) ) {
941
+ $message = array(
942
+ 'message' => $message,
943
+ );
944
+ }
945
+
946
+ // Set message event and pass the data.
947
+ echo "event: message\n";
948
+ echo 'data: ' . wp_json_encode( $message ) . "\n\n";
949
+
950
+ flush();
951
+ }
952
+
953
+ public function importThemeContent( $template_name, $fetch_attachments = false, $partial_import = false ) {
954
+ try {
955
+
956
+ // Include wordpress-importer class.
957
+ JupiterX_Control_Panel_Helpers::include_wordpress_importer();
958
+ $this->reinitializeData( $template_name );
959
+ // Set importer options as an array.
960
+ $options = array(
961
+ 'fetch_attachments' => filter_var( $fetch_attachments, FILTER_VALIDATE_BOOLEAN ),
962
+ 'default_author' => get_current_user_id(),
963
+ );
964
+
965
+ // Create new instance for Importer.
966
+ $importer = new WXR_Importer( $options, $partial_import );
967
+ $logger = new WP_Importer_Logger_ServerSentEvents();
968
+ $importer->set_logger( $logger );
969
+
970
+ // Get preliminary information.
971
+ $file = $this->getAssetsAddress( 'template_content_path', $this->getTemplateName() );
972
+ $data = $importer->get_preliminary_information( $file );
973
+ if ( is_wp_error( $data ) ) {
974
+ $this->message( 'Error in parsing theme_content.xml!', false );
975
+ return false;
976
+ }
977
+
978
+ // Run import process.
979
+ ob_start();
980
+ $importer->import( $file );
981
+ ob_end_clean();
982
+
983
+ $this->message( 'Template contents were imported.', true );
984
+ return true;
985
+
986
+ } catch ( Exception $e ) {
987
+ $this->message( $e->getMessage(), false );
988
+ return false;
989
+ }
990
+ }
991
+ public function importMenuLocations( $template_name ) {
992
+ try {
993
+ $settings = $this->getSettingsData( $template_name );
994
+
995
+ $nav_menus = wp_get_nav_menus();
996
+
997
+ if ( ! isset( $settings['options']['jupiterx_menu_locations'] ) || empty( $settings['options']['jupiterx_menu_locations'] ) || empty( $nav_menus ) ) {
998
+ $this->message( 'There were no menu locations to import.', true );
999
+ }
1000
+
1001
+ $menu_locations = $settings['options']['jupiterx_menu_locations'];
1002
+
1003
+ $locations = [];
1004
+
1005
+ foreach ( $nav_menus as $menu ) {
1006
+ if ( in_array( $menu->name, $menu_locations, true ) ) {
1007
+ $location_key = array_search( $menu->name, $menu_locations, true );
1008
+ $locations[ $location_key ] = $menu->term_id;
1009
+ }
1010
+ }
1011
+
1012
+ set_theme_mod( 'nav_menu_locations', $locations );
1013
+
1014
+ $this->message( 'Navigation locations is configured.', true, [ $locations ] );
1015
+
1016
+ return true;
1017
+ } catch ( Exception $e ) {
1018
+ $this->message( $e->getMessage(), false );
1019
+
1020
+ return false;
1021
+ } // End try().
1022
+ }
1023
+
1024
+ public function setUpPages( $template_name ) {
1025
+ try {
1026
+ $package_data = $this->getSettingsData( $template_name );
1027
+
1028
+ // Set homepage.
1029
+ if(isset($package_data['options']['page_on_front'])) {
1030
+ $homepage_title = $package_data['options']['page_on_front'];
1031
+ if ( ! empty( $homepage_title ) ) {
1032
+ $homepage = get_page_by_title( $homepage_title );
1033
+ }
1034
+ if ( ! empty( $homepage->ID ) ) {
1035
+ update_option( 'page_on_front', $homepage->ID );
1036
+ update_option( 'show_on_front', 'page' );
1037
+ }
1038
+ }
1039
+
1040
+ // Set shop page.
1041
+ if(isset($package_data['options']['woocommerce_shop_page_id'])) {
1042
+ $shop_title = $package_data['options']['woocommerce_shop_page_id'];
1043
+ if ( ! empty( $shop_title ) ) {
1044
+ $shop_page = get_page_by_title( $shop_title );
1045
+ }
1046
+ if ( ! empty( $shop_page->ID ) ) {
1047
+ update_option( 'woocommerce_shop_page_id', $shop_page->ID );
1048
+ }
1049
+ }
1050
+
1051
+ // Set cart page.
1052
+ if(isset($package_data['options']['woocommerce_cart_page_id'])) {
1053
+ $cart_title = $package_data['options']['woocommerce_cart_page_id'];
1054
+ if ( ! empty( $cart_title ) ) {
1055
+ $cart_page = get_page_by_title( $cart_title );
1056
+ }
1057
+ if ( ! empty( $cart_page->ID ) ) {
1058
+ update_option( 'woocommerce_cart_page_id', $cart_page->ID );
1059
+ }
1060
+ }
1061
+
1062
+ // Set Checkout page.
1063
+ if(isset($package_data['options']['woocommerce_checkout_page_id'])) {
1064
+ $checkout_title = $package_data['options']['woocommerce_checkout_page_id'];
1065
+ if ( ! empty( $checkout_title ) ) {
1066
+ $checkout_page = get_page_by_title( $checkout_title );
1067
+ }
1068
+ if ( ! empty( $checkout_page->ID ) ) {
1069
+ update_option( 'woocommerce_checkout_page_id', $checkout_page->ID );
1070
+ }
1071
+ }
1072
+
1073
+ // Set My Account page.
1074
+ if ( isset( $package_data['options']['woocommerce_myaccount_page_id'] ) ) {
1075
+ $myaccount_title = $package_data['options']['woocommerce_myaccount_page_id'];
1076
+
1077
+ if ( ! empty( $myaccount_title ) ) {
1078
+ $myaccount_page = get_page_by_title( $myaccount_title );
1079
+ }
1080
+
1081
+ if ( ! empty( $myaccount_page->ID ) ) {
1082
+ update_option( 'woocommerce_myaccount_page_id', $myaccount_page->ID );
1083
+ }
1084
+ }
1085
+
1086
+ $this->message( 'pages are configured.', true );
1087
+
1088
+ return true;
1089
+ } catch ( Exception $e ) {
1090
+ $this->message( $e->getMessage(), false );
1091
+
1092
+ return false;
1093
+ } // End try().
1094
+ }
1095
+ /**
1096
+ * Import Settings options.
1097
+ *
1098
+ * @param string $template_name Name of template.
1099
+ * @return mixed
1100
+ * @throws Exception When Settings file is empty.
1101
+ */
1102
+ public function import_settings( $template_name ) {
1103
+ try {
1104
+ $this->reinitializeData( $template_name );
1105
+ $data = $this->getSettingsData( $template_name );
1106
+
1107
+ // Data checks.
1108
+ if ( 'array' != gettype( $data ) ) {
1109
+ throw new Exception(
1110
+ sprintf( esc_html__( 'Error importing settings! Please check that you uploaded (%s) a settings export file.', 'jupiterx' ), $file_name )
1111
+ );
1112
+ }
1113
+ if ( ! isset( $data['template'] ) || ! isset( $data['mods'] ) ) {
1114
+ throw new Exception(
1115
+ sprintf( esc_html__( 'Error importing settings! template Please check that you uploaded (%s) a settings export file.', 'jupiterx' ), $file_name )
1116
+ );
1117
+ }
1118
+
1119
+ // Clear theme mods.
1120
+ remove_theme_mods();
1121
+
1122
+ $data['mods'] = JupiterX_Control_Panel_Export_Import::_import_images( $data['mods'] );
1123
+
1124
+ // If wp_css is set then import it.
1125
+ if ( function_exists( 'wp_update_custom_css_post' ) && isset( $data['wp_css'] ) && '' !== $data['wp_css'] ) {
1126
+ wp_update_custom_css_post( $data['wp_css'] );
1127
+ }
1128
+
1129
+ // Exclude nav menu locations in this process.
1130
+ if ( isset( $data['mods']['nav_menu_locations'] ) ) {
1131
+ unset( $data['mods']['nav_menu_locations'] );
1132
+ }
1133
+
1134
+ // Loop through the mods.
1135
+ foreach ( $data['mods'] as $key => $val ) {
1136
+ set_theme_mod( $key, $val );
1137
+ }
1138
+
1139
+ // Set Jet Menu options.
1140
+ if ( isset( $data['options']['jet_menu_options'] ) ) {
1141
+ update_option( 'jet_menu_options', $data['options']['jet_menu_options'] );
1142
+ }
1143
+
1144
+ // Set Jet Popup options.
1145
+ if ( isset( $data['options']['jet_popup_conditions'] ) ) {
1146
+ update_option( 'jet_popup_conditions', $data['options']['jet_popup_conditions'] );
1147
+ }
1148
+
1149
+ // Set Jupiter X custom siderbars option.
1150
+ if ( isset( $data['options']['jupiterx_custom_sidebars'] ) ) {
1151
+ update_option( 'jupiterx_custom_sidebars', $data['options']['jupiterx_custom_sidebars'] );
1152
+ }
1153
+
1154
+ // Set extra options.
1155
+ if ( ! empty( $data['options']['extra'] ) ) {
1156
+ foreach( $data['options']['extra'] as $key => $val ) {
1157
+ update_option( $key, $val );
1158
+ }
1159
+ }
1160
+
1161
+ $this->message( 'Settings are imported.', true );
1162
+ return true;
1163
+
1164
+ } catch ( Exception $e ) {
1165
+ $this->message( $e->getMessage(), false );
1166
+
1167
+ return false;
1168
+ }
1169
+ }
1170
+ public function importThemeWidgets( $template_name ) {
1171
+ $this->reinitializeData( $template_name );
1172
+ try {
1173
+ $data = JupiterX_Control_Panel_Helpers::getFileBody(
1174
+ $this->getAssetsAddress( 'widget_url', $this->getTemplateName() ),
1175
+ $this->getAssetsAddress( 'widget_path', $this->getTemplateName() )
1176
+ );
1177
+ $data = json_decode( $data, true );
1178
+ $this->import_widget_data( $data );
1179
+
1180
+ $this->message( 'Widgets are imported.', true );
1181
+
1182
+ return true;
1183
+ } catch ( Exception $e ) {
1184
+ $this->message( $e->getMessage(), false );
1185
+
1186
+ return false;
1187
+ }
1188
+ }
1189
+ public function finalizeImporting( $template_name, $partial_import = false ) {
1190
+ $this->reinitializeData( $template_name );
1191
+ $template_name = sanitize_title( $template_name );
1192
+ // Check if it had something to import.
1193
+ try {
1194
+ /*
1195
+ $json_url = $this->getAssetsAddress( 'json_url', $this->getTemplateName() );
1196
+ $json_path = $this->getAssetsAddress( 'json_path', $this->getTemplateName() );
1197
+ $response = JupiterX_Control_Panel_Helpers::getFileBody( $json_url, $json_path );
1198
+ $plugins = json_decode( $response, true );
1199
+ if (
1200
+ empty( $plugins['importing_data'] ) == false &&
1201
+ is_array( $plugins['importing_data'] ) &&
1202
+ count( $plugins['importing_data'] ) > 0 ) {
1203
+ foreach ( $plugins['importing_data'] as $key => $value ) {
1204
+ switch ( $value['name'] ) {
1205
+ case 'layer-slider':
1206
+ $ls_content_path = $this->getBasePath() . $template_name . '/' . $value['content_path'];
1207
+ if ( file_exists( $ls_content_path ) ) {
1208
+ $this->importLayerSliderContent( $ls_content_path );
1209
+ }
1210
+ break;
1211
+ }
1212
+ }
1213
+ }*/
1214
+
1215
+ if ( ! $this->cleanInstallFiles( $template_name ) ) {
1216
+ throw new Exception( 'Can not remove installation source files' );
1217
+ return false;
1218
+ }
1219
+
1220
+ if ( ! $partial_import ) {
1221
+ update_option( 'jupiterx_template_installed', $this->getTemplateName() );
1222
+ update_option( 'jupiterx_template_installed_id', $this->getTemplateID() );
1223
+ }
1224
+
1225
+ jupiterx_flush_compiler( 'jupiterx' );
1226
+
1227
+ jupiterx_elementor_flush_cache();
1228
+
1229
+ $this->message( 'Data imported successfully', true );
1230
+ return true;
1231
+
1232
+ } catch ( Exception $e ) {
1233
+ $this->message( $e->getMessage(), false );
1234
+
1235
+ return false;
1236
+ }
1237
+ }
1238
+
1239
+ /**
1240
+ * Set default value Raven nav menus recursively.
1241
+ *
1242
+ * @access public
1243
+ * @since 1.4.0
1244
+ *
1245
+ * @param array $element Template element.
1246
+ * @param array $list Raven menu default list.
1247
+ * @return void
1248
+ */
1249
+ public function set_default_raven_menu_list( &$element, $list )
1250
+ {
1251
+ if (
1252
+ isset( $element['elType'] ) &&
1253
+ $element['elType'] === 'widget' &&
1254
+ isset( $element['widgetType'] ) &&
1255
+ $element['widgetType'] === 'raven-nav-menu' &&
1256
+ ! isset( $element['settings']['list'] )
1257
+ ) {
1258
+ $element['settings']['list'] = $list;
1259
+ return;
1260
+ }
1261
+
1262
+ foreach( $element['elements'] as &$inner_element ) {
1263
+ $this->set_default_raven_menu_list( $inner_element, $list );
1264
+ }
1265
+ }
1266
+
1267
+ /**
1268
+ * Clean install files
1269
+ *
1270
+ * @param $template_name
1271
+ * @author Artbees Team
1272
+ * @return bool
1273
+ */
1274
+ private function cleanInstallFiles( $template_name ) {
1275
+ $jupiterx_filesystem = new JupiterX_Filesystem(
1276
+ array(
1277
+ 'context' => $this->getBasePath(),
1278
+ )
1279
+ );
1280
+
1281
+ // Deleting Template Source Folder.
1282
+ $template_path = $this->getBasePath() . sanitize_title( $template_name );
1283
+ if ( $jupiterx_filesystem->exists( $template_path ) && $jupiterx_filesystem->is_dir( $template_path ) && ! $jupiterx_filesystem->delete( $template_path, true ) ) {
1284
+ return false;
1285
+ }
1286
+
1287
+ // Deleting Template Source Zip file.
1288
+ $template_zip = $template_path . '.zip';
1289
+ if ( $jupiterx_filesystem->exists( $template_zip ) && $jupiterx_filesystem->is_file( $template_zip ) && ! $jupiterx_filesystem->delete( $template_zip ) ) {
1290
+ return false;
1291
+ }
1292
+
1293
+ return true;
1294
+ }
1295
+ public function uninstallTemplate() {
1296
+ try {
1297
+ $tables = array(
1298
+ 'comments',
1299
+ 'commentmeta',
1300
+ 'links',
1301
+ 'options',
1302
+ 'postmeta',
1303
+ 'posts',
1304
+ 'term_relationships',
1305
+ 'termmeta',
1306
+ 'terms',
1307
+ 'term_taxonomy',
1308
+ );
1309
+
1310
+ $db_manager = new JupiterX_Control_Panel_Database_Manager();
1311
+
1312
+ $db_manager->backup_media_records();
1313
+
1314
+ $reset = $this->resetWordpressDatabase( $tables, array(), true );
1315
+
1316
+ $db_manager->restore_media_records();
1317
+
1318
+ if ( ! $reset ) {
1319
+ throw new Exception( 'Failed to uninstall template. Please try again.' );
1320
+ }
1321
+
1322
+ $this->message( 'Template uninstall success.', true );
1323
+ return true;
1324
+ } catch ( Exception $e ) {
1325
+ $this->message( $e->getMessage(), false );
1326
+
1327
+ return false;
1328
+ }
1329
+ }
1330
+ public function availableWidgets() {
1331
+ global $wp_registered_widget_controls;
1332
+ $widget_controls = $wp_registered_widget_controls;
1333
+ $available_widgets = array();
1334
+ foreach ( $widget_controls as $widget ) {
1335
+ if ( ! empty( $widget['id_base'] ) && ! isset( $available_widgets[ $widget['id_base'] ] ) ) {
1336
+ $available_widgets[ $widget['id_base'] ]['id_base'] = $widget['id_base'];
1337
+ $available_widgets[ $widget['id_base'] ]['name'] = $widget['name'];
1338
+ }
1339
+ }
1340
+
1341
+ return apply_filters( 'available_widgets', $available_widgets );
1342
+ }
1343
+
1344
+ /**
1345
+ * Import widgets' data.
1346
+ *
1347
+ * @throws Exception If can not read widget data.
1348
+ *
1349
+ * @param array $data Widgets' data.
1350
+ * @return boolean
1351
+ */
1352
+ public function import_widget_data( $data ) {
1353
+ global $wp_registered_sidebars;
1354
+
1355
+ $available_widgets = $this->availableWidgets();
1356
+ $widget_instances = array();
1357
+ foreach ( $available_widgets as $widget_data ) {
1358
+ $widget_instances[ $widget_data['id_base'] ] = get_option( 'widget_' . $widget_data['id_base'] );
1359
+ }
1360
+ if ( empty( $data ) || ! is_array( $data ) ) {
1361
+ throw new Exception( 'Widget data could not be read. Please try a different file.' );
1362
+ }
1363
+ $results = array();
1364
+ foreach ( $data as $sidebar_id => $widgets ) {
1365
+ if ( 'wp_inactive_widgets' == $sidebar_id ) {
1366
+ continue;
1367
+ }
1368
+ if ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ) {
1369
+ $sidebar_available = true;
1370
+ $use_sidebar_id = $sidebar_id;
1371
+ $sidebar_message_type = 'success';
1372
+ $sidebar_message = '';
1373
+ } else {
1374
+ $sidebar_available = false;
1375
+ $use_sidebar_id = 'wp_inactive_widgets';
1376
+ $sidebar_message_type = 'error';
1377
+ $sidebar_message = 'Sidebar does not exist in theme (using Inactive)';
1378
+ }
1379
+ $results[ $sidebar_id ]['name'] = ! empty( $wp_registered_sidebars[ $sidebar_id ]['name'] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : $sidebar_id;
1380
+ $results[ $sidebar_id ]['message_type'] = $sidebar_message_type;
1381
+ $results[ $sidebar_id ]['message'] = $sidebar_message;
1382
+ $results[ $sidebar_id ]['widgets'] = array();
1383
+ foreach ( $widgets as $widget_instance_id => $widget ) {
1384
+ $fail = false;
1385
+ $id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id );
1386
+ $instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id );
1387
+ if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) {
1388
+ $fail = true;
1389
+ $widget_message_type = 'error';
1390
+ $widget_message = 'Site does not support widget';
1391
+ }
1392
+ $widget = apply_filters( 'jupiterx_widget_settings', $widget );
1393
+ if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) {
1394
+ $sidebars_widgets = get_option( 'sidebars_widgets' );
1395
+ $sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array();
1396
+ $single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array();
1397
+ foreach ( $single_widget_instances as $check_id => $check_widget ) {
1398
+ if ( in_array( "$id_base-$check_id", $sidebar_widgets ) && (array) $widget == $check_widget ) {
1399
+ $fail = true;
1400
+ $widget_message_type = 'warning';
1401
+ $widget_message = 'Widget already exists';
1402
+ break;
1403
+ }
1404
+ }
1405
+ }
1406
+ if ( ! $fail ) {
1407
+ $single_widget_instances = get_option( 'widget_' . $id_base );
1408
+ $single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array(
1409
+ '_multiwidget' => 1,
1410
+ );
1411
+ $single_widget_instances[] = (array) $widget;
1412
+ end( $single_widget_instances );
1413
+ $new_instance_id_number = key( $single_widget_instances );
1414
+ if ( '0' === strval( $new_instance_id_number ) ) {
1415
+ $new_instance_id_number = 1;
1416
+ $single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0];
1417
+ unset( $single_widget_instances[0] );
1418
+ }
1419
+ if ( isset( $single_widget_instances['_multiwidget'] ) ) {
1420
+ $multiwidget = $single_widget_instances['_multiwidget'];
1421
+ unset( $single_widget_instances['_multiwidget'] );
1422
+ $single_widget_instances['_multiwidget'] = $multiwidget;
1423
+ }
1424
+ update_option( 'widget_' . $id_base, $single_widget_instances );
1425
+ $sidebars_widgets = get_option( 'sidebars_widgets' );
1426
+ $new_instance_id = $id_base . '-' . $new_instance_id_number;
1427
+ $sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id;
1428
+ update_option( 'sidebars_widgets', $sidebars_widgets );
1429
+ if ( $sidebar_available ) {
1430
+ $widget_message_type = 'success';
1431
+ $widget_message = 'Imported';
1432
+ } else {
1433
+ $widget_message_type = 'warning';
1434
+ $widget_message = 'Imported to Inactive';
1435
+ }
1436
+ }
1437
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base;
1438
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget->title ) ? $widget->title : '';
1439
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type;
1440
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message;
1441
+ } // End foreach().
1442
+ } // End foreach().
1443
+
1444
+ return true;
1445
+ }
1446
+ /**
1447
+ * It will empty all or custom database tables of WordPress and install WordPress again if needed.
1448
+ *
1449
+ * @param array $table which table need to be empty ? example : array('user' , 'usermeta')
1450
+ * table names should be without any prefix
1451
+ * @param bool $install_needed if WordPress need to be installed after reseting database
1452
+ * it should be false or true
1453
+ *
1454
+ * @return bool return if everything looks good and throwing errors on problems
1455
+ */
1456
+ public function resetWordpressDatabase( $tables = array(), $exclude_tables = array(), $install_needed = false ) {
1457
+ global $wpdb, $reactivate_wp_reset_additional, $current_user;
1458
+
1459
+ if ( $install_needed ) {
1460
+
1461
+ require_once ABSPATH . '/wp-admin/includes/upgrade.php';
1462
+
1463
+ $new_options = array();
1464
+
1465
+ $old_options = array(
1466
+ 'artbees_api_key',
1467
+ 'active_plugins',
1468
+ 'jupiterx_setup_wizard_current_page',
1469
+ 'jupiterx_setup_wizard_hide_notice',
1470
+ );
1471
+
1472
+ $blogname = get_option( 'blogname' );
1473
+ $blog_public = get_option( 'blog_public' );
1474
+ $site_url = site_url();
1475
+ $current_theme = wp_get_theme();
1476
+
1477
+ foreach ( $old_options as $old_option_key ) {
1478
+ $new_options[ $old_option_key ] = get_option( $old_option_key );
1479
+ }
1480
+
1481
+ if ( 'admin' != $current_user->user_login ) {
1482
+ $user = get_user_by( 'login', 'admin' );
1483
+ }
1484
+
1485
+ if ( empty( $user->user_level ) || $user->user_level < 10 ) {
1486
+ $user = $current_user;
1487
+ $session_tokens = get_user_meta( $user->ID, 'session_tokens', true );
1488
+ }
1489
+
1490
+ // Check if we need all the tables or specific table.
1491
+ if ( is_array( $tables ) && count( $tables ) > 0 ) {
1492
+ array_walk(
1493
+ $tables, function ( &$value, $key ) use ( $wpdb ) {
1494
+ $value = $wpdb->prefix . $value;
1495
+ }
1496
+ );
1497
+ } else {
1498
+ $prefix = str_replace( '_', '\_', $wpdb->prefix );
1499
+ $tables = $wpdb->get_col( "SHOW TABLES LIKE '{$prefix}%'" );
1500
+ }
1501
+
1502
+ // exclude table if its valued.
1503
+ if ( is_array( $exclude_tables ) && count( $exclude_tables ) > 0 ) {
1504
+ array_walk(
1505
+ $exclude_tables, function ( &$ex_value, $key ) use ( $wpdb ) {
1506
+ $ex_value = $wpdb->prefix . $ex_value;
1507
+ }
1508
+ );
1509
+ $tables = array_diff( $tables, $exclude_tables );
1510
+ }
1511
+ // Removing data from WordPress tables.
1512
+ foreach ( $tables as $table ) {
1513
+ $wpdb->query( "DROP TABLE $table" );
1514
+ }
1515
+
1516
+ $result = wp_install( $blogname, $user->user_login, $user->user_email, $blog_public );
1517
+ switch_theme( $current_theme->get_stylesheet() );
1518
+
1519
+ /* GoDaddy Patch => GD have a problem of cleaning siteurl option value after reseting database */
1520
+ if ( site_url() == '' ) {
1521
+ $wpdb->update(
1522
+ $wpdb->options, array(
1523
+ 'option_value' => $site_url,
1524
+ ),array(
1525
+ 'option_name' => 'siteurl',
1526
+ )
1527
+ );
1528
+ }
1529
+ extract( $result, EXTR_SKIP );
1530
+
1531
+ $query = $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = %s, user_activation_key = '' WHERE ID = %d", $user->user_pass, $user_id );
1532
+ $wpdb->query( $query );
1533
+
1534
+ $get_user_meta = function_exists( 'get_user_meta' ) ? 'get_user_meta' : 'get_usermeta';
1535
+ $update_user_meta = function_exists( 'update_user_meta' ) ? 'update_user_meta' : 'update_usermeta';
1536
+
1537
+ if ( $get_user_meta($user_id, 'default_password_nag') ) {
1538
+ $update_user_meta($user_id, 'default_password_nag', false);
1539
+ }
1540
+
1541
+ if ( $get_user_meta($user_id, $wpdb->prefix . 'default_password_nag') ) {
1542
+ $update_user_meta($user_id, $wpdb->prefix . 'default_password_nag', false);
1543
+ }
1544
+
1545
+ wp_clear_auth_cookie();
1546
+ wp_set_current_user( $user_id, $user->user_login );
1547
+ if ( $session_tokens ) {
1548
+ delete_user_meta( $user->ID, 'session_tokens' );
1549
+ update_user_meta( $user->ID, 'session_tokens', $session_tokens );
1550
+ }
1551
+
1552
+ wp_set_auth_cookie( $user_id, true );
1553
+ do_action( 'wp_login', $user->user_login, $user );
1554
+
1555
+ if ( $new_options ) {
1556
+ foreach ( $new_options as $key => $value ) {
1557
+ update_option( $key, $value );
1558
+ }
1559
+ }
1560
+ return true;
1561
+ } else {
1562
+
1563
+ $jupiterx_temp_installed = get_option( 'jupiterx_template_installed' );
1564
+
1565
+ if ( $jupiterx_temp_installed ) {
1566
+
1567
+ // Delete option data for page_on_front.
1568
+ if ( get_option( 'page_on_front' ) ) {
1569
+ delete_option( 'page_on_front' );
1570
+ }
1571
+
1572
+ // Delete option data for show_on_front.
1573
+ if ( get_option( 'show_on_front' ) ) {
1574
+ delete_option( 'show_on_front' );
1575
+ }
1576
+
1577
+ // Delete option data for woocommerce_shop_page_id.
1578
+ if ( get_option( 'woocommerce_shop_page_id' ) ) {
1579
+ delete_option( 'woocommerce_shop_page_id' );
1580
+ }
1581
+
1582
+ // Delete widgets.
1583
+ $wpdb->query( "DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE '%widget%';" );
1584
+
1585
+ }// End if().
1586
+
1587
+ // truncate tables.
1588
+ foreach ( $tables as $table ) {
1589
+ $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}{$table}" );
1590
+ }
1591
+
1592
+ return true;
1593
+ }// End if().
1594
+ }
1595
+
1596
+ private function setResponseForApiTemplateList( $url, $configs ) {
1597
+ $headers = array(
1598
+ 'theme-name' => $this->getThemeName(),
1599
+ 'pagination-start' => isset( $configs['pagination_start'] ) ? $configs['pagination_start'] : 0,
1600
+ 'pagination-count' => isset( $configs['pagination_count'] ) ? $configs['pagination_count'] : 1,
1601
+ );
1602
+
1603
+ if ( isset( $configs['template_id'] ) && is_null( $configs['template_id'] ) == false ) {
1604
+ $headers['template-id'] = $configs['template_id'];
1605
+ }
1606
+
1607
+ if ( isset( $configs['template_name'] ) && is_null( $configs['template_name'] ) == false ) {
1608
+ $headers['template-name'] = $configs['template_name'];
1609
+ }
1610
+
1611
+ if ( isset( $configs['template_category'] ) && is_null( $configs['template_category'] ) == false ) {
1612
+ $headers['template-category'] = $configs['template_category'];
1613
+ }
1614
+
1615
+ return $this->wp_remote_get( $url, $headers );
1616
+ }
1617
+ /**
1618
+ * This method is resposible to get template list from api and create download link if template need to extract from WordPress repo.
1619
+ *
1620
+ * @param str $template_name if template name is valued it will return array of information about the this template.
1621
+ * but if template is valued as false it will return all templates information
1622
+ *
1623
+ * @return array will return array of templates
1624
+ */
1625
+ public function getTemplateListFromApi( $configs ) {
1626
+ if ( ! is_array( $configs ) ) {
1627
+ $configs = array();
1628
+ }
1629
+ $url = $this->getApiURL() . 'theme/templates';
1630
+ $response = $this->setResponseForApiTemplateList( $url, $configs );
1631
+ if ( false == isset( $response->bool ) || false == $response->bool ) {
1632
+ throw new Exception( $response->message );
1633
+ }
1634
+ return $response->data;
1635
+ }
1636
+ public function getTemplateDownloadLink( $template_name = '', $type = 'download' ) {
1637
+ $url = $this->getApiURL() . 'theme/download-template';
1638
+ $response = $this->wp_remote_get( $url, array(
1639
+ 'template-name' => $template_name,
1640
+ 'type' => $type,
1641
+ ) );
1642
+
1643
+ if ( false == isset( $response->bool ) || false == $response->bool ) {
1644
+ throw new Exception( $response->message );
1645
+ }
1646
+
1647
+ /**
1648
+ * Filters the template download url.
1649
+ *
1650
+ * @param string $response->data Download url.
1651
+ */
1652
+ return apply_filters( 'jupiterx_template_download_url', $response->data, $type );
1653
+ }
1654
+
1655
+ /**
1656
+ * Gets psd file download link.
1657
+ *
1658
+ */
1659
+ public function get_template_psd_link() {
1660
+ $template_name = sanitize_text_field( $_POST['template_name'] );
1661
+ try {
1662
+ $response = $this->getTemplateDownloadLink( $template_name, 'download-psd' );
1663
+ $this->message(
1664
+ 'Successfull', true, array(
1665
+ 'psd_link' => $response,
1666
+ )
1667
+ );
1668
+ return true;
1669
+ } catch ( Exception $e ) {
1670
+ $this->message( $e->getMessage(), false );
1671
+ return false;
1672
+ } // End try().
1673
+ }
1674
+
1675
+ /**
1676
+ * This method is resposible to get templates categories list from api
1677
+ *
1678
+ * @param str $template_name if template name is valued it will return array of information about the this template.
1679
+ * but if template is valued as false it will return all templates information.
1680
+ *
1681
+ * @return array will return array of plugins.
1682
+ */
1683
+ public function getTemplateCategoryListFromApi() {
1684
+ try {
1685
+ $url = $this->getApiURL() . 'theme/template-categories';
1686
+ $response = $this->wp_remote_get( $url );
1687
+ if ( false == isset( $response->bool ) || false == $response->bool ) {
1688
+ throw new Exception( $response->message );
1689
+ }
1690
+ $this->message( 'Successfull', true, $response->data );
1691
+ return true;
1692
+ } catch ( Exception $e ) {
1693
+ $this->message( $e->getMessage(), false );
1694
+ return false;
1695
+ }
1696
+ }
1697
+ /**
1698
+ * We need to make assets addresses dynamic and fully proccess.
1699
+ * in one method for future development
1700
+ * it will get the type of address and will return full address in string
1701
+ * example :
1702
+ * for (options_url) type , it will return something like this
1703
+ * (http://localhost/jupiter/wp-content/uploads/jupiterx_templates/dia/options.txt).
1704
+ *
1705
+ * For (options_path) type , it will return something like this.
1706
+ * (/usr/apache/www/wp-content/uploads/jupiterx_templates/dia/options.txt)
1707
+ *
1708
+ * @param str $which_one Which address do you need.
1709
+ * @param str $template_name such as.
1710
+ */
1711
+ public function getAssetsAddress( $which_one, $template_name ) {
1712
+ $template_name = sanitize_title( $template_name );
1713
+ switch ( $which_one ) {
1714
+ case 'template_content_url':
1715
+ return $this->getBaseUrl() . $template_name . '/' . $this->getTemplateContentFileName();
1716
+ break;
1717
+ case 'template_content_path':
1718
+ return $this->getBasePath() . $template_name . '/' . $this->getTemplateContentFileName();
1719
+ break;
1720
+ case 'widget_url':
1721
+ return $this->getBaseUrl() . $template_name . '/' . $this->getWidgetFileName();
1722
+ break;
1723
+ case 'widget_path':
1724
+ return $this->getBasePath() . $template_name . '/' . $this->getWidgetFileName();
1725
+ break;
1726
+ case 'settings_url':
1727
+ return $this->getBaseUrl() . $template_name . '/' . $this->get_settings_file_name();
1728
+ break;
1729
+ case 'settings_path':
1730
+ return $this->getBasePath() . $template_name . '/' . $this->get_settings_file_name();
1731
+ break;
1732
+ default:
1733
+ throw new Exception( 'File name you are looking for is not introduced.' );
1734
+
1735
+ return false;
1736
+ break;
1737
+ }
1738
+ }
1739
+
1740
+ public function find_plugin_path( $plugin_slug ) {
1741
+ $plugins = get_plugins();
1742
+ foreach ( $plugins as $plugin_address => $plugin_data ) {
1743
+
1744
+ // Extract slug from address
1745
+ if ( strlen( $plugin_address ) == basename( $plugin_address ) ) {
1746
+ $slug = strtolower( str_replace( '.php', '', $plugin_address ) );
1747
+ } else {
1748
+ $slug = strtolower( str_replace( '/' . basename( $plugin_address ), '', $plugin_address ) );
1749
+ }
1750
+ // Check if slug exists
1751
+ if ( strtolower( $plugin_slug ) == $slug ) {
1752
+ return $plugin_address;
1753
+ }
1754
+ }
1755
+ return false;
1756
+ }
1757
+
1758
+ public function importLayerSliderContent( $content_path ) {
1759
+ global $wpdb;
1760
+ $ls_path = $this->find_plugin_path( $this->layer_slider_slug );
1761
+
1762
+ if ( $ls_path == false ) {
1763
+ throw new Exception( 'LayerSlider is not installed , install it first' );
1764
+ return false;
1765
+ }
1766
+
1767
+ if ( defined( LS_PLUGIN_VERSION ) ) {
1768
+ throw new Exception( 'LayerSlider is installed but not activated , activate it first' );
1769
+ return false;
1770
+ }
1771
+ // Empty layerslider table first.
1772
+ $table = $wpdb->prefix . 'layerslider';
1773
+ $wpdb->query( "TRUNCATE TABLE $table" );
1774
+
1775
+ // Try to import configs.
1776
+ $ls_plugin_root_path = pathinfo( $plugin->get_plugins_dir() . $ls_path );
1777
+ include $ls_plugin_root_path['dirname'] . '/classes/class.ls.importutil.php';
1778
+ new LS_ImportUtil( $content_path );
1779
+ return true;
1780
+ }
1781
+
1782
+ /**
1783
+ * Reusable wrapper method for WP remote getter.
1784
+ *
1785
+ * Method only returns response body.
1786
+ */
1787
+ public function wp_remote_get( $url = '', $headers = [] ) {
1788
+ $required_headers = [
1789
+ 'api-key' => get_option( 'artbees_api_key' ),
1790
+ 'domain' => esc_url_raw( $_SERVER['SERVER_NAME'] ),
1791
+ ];
1792
+
1793
+ // Combined headers.
1794
+ $headers = array_merge( $headers, $required_headers );
1795
+
1796
+ $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $url, [
1797
+ 'sslverify' => false,
1798
+ 'headers' => $headers,
1799
+ ] ) ) );
1800
+
1801
+ return $response;
1802
+ }
1803
+
1804
+ /**
1805
+ * This method is resposible to manage all the classes messages.
1806
+ */
1807
+ public function message( $message, $status, $data = null ) {
1808
+ $response = [
1809
+ 'message' => jupiterx_logic_message_helper( 'template-management', $message ),
1810
+ 'status' => $status,
1811
+ 'data' => $data,
1812
+ ];
1813
+
1814
+ wp_send_json( $response );
1815
+ }
1816
+ }
1817
+ }
1818
+
1819
+ if ( ! function_exists( 'jupiterx_disable_woocommerce' ) ) {
1820
+ /* Disable woocommerce redirection */
1821
+ add_action( 'admin_init', 'jupiterx_disable_woocommerce', 5 );
1822
+ /**
1823
+ * Disable Woocommerce redirect for template install
1824
+ *
1825
+ */
1826
+ function jupiterx_disable_woocommerce() {
1827
+ delete_transient( '_wc_activation_redirect' );
1828
+ add_filter(
1829
+ 'woocommerce_prevent_automatic_wizard_redirect', function () {
1830
+ return true;
1831
+ }
1832
+ );
1833
+ }
1834
+ }
1835
+
1836
+
1837
+ add_filter(
1838
+ 'pre_transient__wc_activation_redirect', function () {
1839
+ return 0;
1840
+ }
1841
+ );
1842
+
1843
+ add_filter(
1844
+ 'pre_transient__vc_page_welcome_redirect', function () {
1845
+ return 0;
1846
+ }
1847
+ );
1848
+
1849
+ global $abb_phpunit;
1850
+ if ( empty( $abb_phpunit ) || $abb_phpunit == false ) {
1851
+ new JupiterX_Control_Panel_Install_Template();
1852
+ }
includes/control-panel/views/image-sizes.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Image sizes template.
4
+ *
5
+ * @package JupiterX_Core\Control_Panel\Image_Sizes
6
+ *
7
+ * @since 1.2.0
8
+ */
9
+
10
+ if ( ! JUPITERX_CONTROL_PANEL_IMAGE_SIZES ) {
11
+ return;
12
+ }
13
+ ?>
14
+ <div class="jupiterx-cp-pane-box" id="jupiterx-cp-image-sizes">
15
+ <h3>
16
+ <?php esc_html_e( 'Image Sizes', 'jupiterx-core' ); ?>
17
+ <?php jupiterx_the_help_link( 'http://help.artbees.net/customizer/configuring-images/custom-size-for-images', esc_html__( 'Custom size for images', 'jupiterx-core' ) ); ?>
18
+ </h3>
19
+ <button type="button" class="btn btn-primary image-size-add-new-btn js__cp-clist-add-item">
20
+ <?php esc_html_e( 'Add a New Size', 'jupiterx-core' ); ?>
21
+ </button>
22
+ <div class="jupiterx-wrap jupiterx-img-size-wrap">
23
+ <div class="jupiterx-img-size">
24
+ <div class="jupiterx-img-size-list js__jupiterx-img-size-list clearfix mb-3">
25
+ <?php
26
+ foreach ( JupiterX_Control_Panel_Image_Sizes::get_available_image_sizes() as $size ) :
27
+ if ( ! empty( $size['size_n'] ) && ! empty( $size['size_w'] ) && ! empty( $size['size_h'] ) ) :
28
+ ?>
29
+ <div class="jupiterx-img-size-item js__cp-image-size-item">
30
+ <div class="jupiterx-img-size-item-inner jupiterx-card">
31
+ <div class="jupiterx-card-body fetch-input-data">
32
+ <div class="js__size-name mb-3">
33
+ <strong><?php esc_html_e( 'Name', 'jupiterx-core' ); ?>:</strong> <?php echo wp_kses_post( $size['size_n'] ); ?>
34
+ </div>
35
+ <div class="js__size-dimension mb-3">
36
+ <strong><?php esc_html_e( 'Size', 'jupiterx-core' ); ?>:</strong> <?php echo wp_kses_post( $size['size_w'] ); ?>px <?php echo wp_kses_post( $size['size_h'] ); ?>px
37
+ </div>
38
+ <div class="js__size-crop mb-3">
39
+ <strong><?php esc_html_e( 'Crop', 'jupiterx-core' ); ?>:</strong>
40
+ <?php if ( 'on' === $size['size_c'] ) : ?>
41
+ <span class="status-state status-true"></span>
42
+ <?php else : ?>
43
+ <span class="status-state status-false"></span>
44
+ <?php endif; ?>
45
+ </div>
46
+ <button type="button" class="btn btn-outline-success js__cp-clist-edit-item mr-1"><?php esc_html_e( 'Edit', 'jupiterx-core' ); ?></button>
47
+ <button type="button" class="btn btn-outline-danger js__cp-clist-remove-item"><?php esc_html_e( 'Remove', 'jupiterx-core' ); ?></button>
48
+ <input name="size_n" type="hidden" value="<?php echo esc_attr( $size['size_n'] ); ?>" />
49
+ <input name="size_w" type="hidden" value="<?php echo esc_attr( $size['size_w'] ); ?>" />
50
+ <input name="size_h" type="hidden" value="<?php echo esc_attr( $size['size_h'] ); ?>" />
51
+ <input name="size_c" type="hidden" value="<?php echo esc_attr( $size['size_c'] ); ?>" />
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <?php
56
+ endif;
57
+ endforeach;
58
+ ?>
59
+ </div>
60
+ <div class="clearfix"></div>
61
+ </div>
62
+ <?php wp_nonce_field( 'ajax-image-sizes-options', 'security' ); ?>
63
+ </div>
64
+ </div>
includes/control-panel/views/install-templates.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! JUPITERX_CONTROL_PANEL_TEMPLATES ) {
4
+ return;
5
+ }
6
+
7
+ $menu_items_access = get_site_option( 'menu_items' );
8
+
9
+ if ( is_multisite() && ! isset( $menu_items_access['plugins'] ) && ! current_user_can( 'manage_network_plugins' ) ) : ?>
10
+ <div class="jupiterx-cp-pane-box" id="jupiterx-no-templates">
11
+ <div class="alert alert-warning" role="alert">
12
+
13
+ <?php esc_html_e( 'Template installation is only allowed for user with Super Admin role. Please contact your website\'s administrator.', 'jupiterx' ); ?>
14
+ <a class="btn btn-link" href="https://themes.artbees.net/docs/installing-a-template/" data-content="" data-toggle="popover" data-placement="bottom">
15
+ <?php esc_html_e( 'Read More', 'jupiterx' ); ?>
16
+ </a>
17
+ </div>
18
+ </div>
19
+ <?php
20
+ endif;
21
+
22
+ $installed_template_data_attr = '';
23
+ $installed_template_id = get_option( 'jupiterx_template_installed_id', '' );
24
+ $installed_template_data_attr .= ' data-installed-template-id="' . esc_attr( $installed_template_id ) . '"';
25
+ $installed_template = get_option( 'jupiterx_template_installed', '' );
26
+ $installed_template_data_attr .= ' data-installed-template="' . esc_attr( $installed_template ) . '"';
27
+ wp_print_request_filesystem_credentials_modal();
28
+ ?>
29
+ <div class="jupiterx-cp-pane-box" id="jupiterx-cp-templates">
30
+
31
+ <!-- Restore Button wrap -->
32
+ <div id="js__restore-template-wrap" class="jupiterx-restore-template-wrap">
33
+ <a class="btn btn-primary jupiterx-button--restore-backup" id="js__restore-template-btn" href="#" data-content="" data-toggle="popover" data-placement="bottom">
34
+ <?php esc_html_e( 'Restore from Last Backup', 'jupiterx' ); ?>
35
+ </a>
36
+ </div>
37
+ <!-- End of Restore Button wrap -->
38
+
39
+ <!-- Installed Template wrap -->
40
+ <div id="js__installed-template-wrap" class="jupiterx-cp-installed-template">
41
+ <h3>
42
+ <?php esc_html_e( 'Installed Template', 'jupiterx' ); ?>
43
+ <?php jupiterx_the_help_link( 'http://help.artbees.net/getting-started/templates/installing-a-template', esc_html__( 'Installing a Template', 'jupiterx' ) ); ?>
44
+ </h3>
45
+ <div id="js__installed-template" <?php echo $installed_template_data_attr; ?>></div>
46
+ <div class="clearfix"></div>
47
+ </div>
48
+ <!-- End of installed template -->
49
+
50
+ <div class="jupiterx-cp-install-template">
51
+ <h3>
52
+ <?php esc_html_e( 'Templates', 'jupiterx' ); ?>
53
+ <?php jupiterx_the_help_link( 'http://help.artbees.net/getting-started/templates/installing-a-template', esc_html__( 'Installing a Template', 'jupiterx' ) ); ?>
54
+ </h3>
55
+ <div class="input-group jupiterx-cp-template-search">
56
+ <div class="input-group-prepend">
57
+ <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><?php esc_html_e( 'All Categories', 'jupiterx' ); ?></button>
58
+ <input class="jupiterx-select-box-value" id="js__templates-category-filter" type="hidden">
59
+ <div class="dropdown-menu js__template-category-list-wrap">
60
+ </div>
61
+ </div>
62
+ <input type="text" class="jupiterx-form-control" id="js__template-search" placeholder="<?php esc_html_e( 'Search...', 'jupiterx' ); ?>">
63
+ </div>
64
+
65
+ <div id="js__new-templates-list" class="jupiterx-cp-template-items"></div>
66
+
67
+ <div class="abb-template-page-load-more" data-from="0">
68
+ <svg class="jupiterx-spinner" width="50px" height="50px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
69
+ <circle class="jupiterx-spinner-path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
70
+ </svg>
71
+ </div>
72
+ </div>
73
+ </div>
includes/control-panel/views/settings.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings template.
4
+ *
5
+ * @package JupiterX_Core\Control_Panel\Settings
6
+ *
7
+ * @since 1.4.0
8
+ */
9
+
10
+ if ( ! JUPITERX_CONTROL_PANEL_SETTINGS ) {
11
+ return;
12
+ }
13
+ ?>
14
+ <div class="jupiterx-cp-pane-box bootstrap-wrapper">
15
+ <h3><?php esc_html_e( 'Settings', 'jupiterx-core' ); ?></h3>
16
+ <div class="jupiterx-cp-export-wrap">
17
+ <form class="jupiterx-cp-settings-form" action="#">
18
+ <div class="form-row">
19
+ <div class="form-group col-md-12">
20
+ <button type="button" class="btn btn-secondary jupiterx-cp-settings-flush"><?php esc_html_e( 'Flush Assets Cache', 'jupiterx-core' ); ?></button>
21
+ <span class="jupiterx-cp-settings-flush-feedback text-muted ml-2 d-none"><?php esc_html_e( 'Flushing...', 'jupiterx-core' ); ?></span>
22
+ <small class="form-text text-muted"><?php esc_html_e( 'Clear CSS, Javascript and images cached files. New cached versions will be compiled/created on page load.', 'jupiterx-core' ); ?></small>
23
+ </div>
24
+ <div class="col-md-12"><hr></div>
25
+ <div class="form-group col-md-6">
26
+ <label for="jupiterx-cp-settings-dev-mode"><?php esc_html_e( 'Development Mode', 'jupiterx-core' ); ?></label>
27
+ <input type="hidden" name="jupiterx_dev_mode" value="0">
28
+ <div class="jupiterx-switch">
29
+ <input type="checkbox" id="jupiterx-cp-settings-dev-mode" name="jupiterx_dev_mode" value="1" <?php checked( get_option( 'jupiterx_dev_mode' ), true ); ?>>
30
+ <label for="jupiterx-cp-settings-dev-mode"></label>
31
+ </div>
32
+ <small class="form-text text-muted"><?php esc_html_e( 'This option should be enabled while your website is in development.', 'jupiterx-core' ); ?></small>
33
+ </div>
34
+ <div class="form-group col-md-6">
35
+ <label for="jupiterx-cp-settings-cache-busting"><?php esc_html_e( 'Cache Busting', 'jupiterx-core' ); ?></label>
36
+ <input type="hidden" name="jupiterx_cache_busting" value="0">
37
+ <div class="jupiterx-switch">
38
+ <input type="checkbox" id="jupiterx-cp-settings-cache-busting" name="jupiterx_cache_busting" value="1" <?php checked( get_option( 'jupiterx_cache_busting', true ) ); ?>>
39
+ <label for="jupiterx-cp-settings-cache-busting"></label>
40
+ </div>
41
+ <small class="form-text text-muted"><?php esc_html_e( 'Enable cache busting technique.', 'jupiterx-core' ); ?></small>
42
+ </div>
43
+ <?php do_action( 'jupiterx_control_panel_after_theme_settings' ); ?>
44
+ <?php if ( jupiterx_is_premium() && class_exists( 'Jupiter_Donut' ) ) : ?>
45
+ <div class="col-md-12"><hr></div>
46
+ <h5 class="col-md-12 mb-3">Donut Plugin</h5>
47
+ <div class="form-group col-md-6">
48
+ <label for="jupiterx-cp-settings-donut-twitter-consumer-key"><?php esc_html_e( 'Twitter Consumer Key', 'jupiterx-core' ); ?></label>
49
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-twitter-consumer-key" value="<?php echo esc_attr( get_option( 'jupiterx_donut_twitter_consumer_key' ) ); ?>" name="jupiterx_donut_twitter_consumer_key">
50
+ </div>
51
+ <div class="form-group col-md-6">
52
+ <label for="jupiterx-cp-settings-donut-twitter-consumer-secret"><?php esc_html_e( 'Twitter Consumer Secret', 'jupiterx-core' ); ?></label>
53
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-twitter-consumer-secret" value="<?php echo esc_attr( get_option( 'jupiterx_donut_twitter_consumer_secret' ) ); ?>" name="jupiterx_donut_twitter_consumer_secret">
54
+ </div>
55
+ <div class="form-group col-md-6">
56
+ <label for="jupiterx-cp-settings-donut-twitter-access-token"><?php esc_html_e( 'Twitter Access Token', 'jupiterx-core' ); ?></label>
57
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-twitter-access-token" value="<?php echo esc_attr( get_option( 'jupiterx_donut_twitter_access_token' ) ); ?>" name="jupiterx_donut_twitter_access_token">
58
+ </div>
59
+ <div class="form-group col-md-6">
60
+ <label for="jupiterx-cp-settings-donut-twitter-access-token-secret"><?php esc_html_e( 'Twitter Access Token Secret', 'jupiterx-core' ); ?></label>
61
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-twitter-access-token-secret" value="<?php echo esc_attr( get_option( 'jupiterx_donut_twitter_access_token_secret' ) ); ?>" name="jupiterx_donut_twitter_access_token_secret">
62
+ </div>
63
+ <div class="form-group col-md-6">
64
+ <label for="jupiterx-cp-settings-donut-mailchimp-api-key"><?php esc_html_e( 'MailChimp API Key', 'jupiterx-core' ); ?></label>
65
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-mailchimp-api-key" value="<?php echo esc_attr( get_option( 'jupiterx_donut_mailchimp_api_key' ) ); ?>" name="jupiterx_donut_mailchimp_api_key">
66
+ </div>
67
+ <div class="form-group col-md-6">
68
+ <label for="jupiterx-cp-settings-donut-mailchimp-list-id"><?php esc_html_e( 'Mailchimp List ID', 'jupiterx-core' ); ?></label>
69
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-mailchimp-list-id" value="<?php echo esc_attr( get_option( 'jupiterx_donut_mailchimp_list_id' ) ); ?>" name="jupiterx_donut_mailchimp_list_id">
70
+ </div>
71
+ <div class="form-group col-md-6">
72
+ <label for="jupiterx-cp-settings-donut-google-maps-api-key"><?php esc_html_e( 'Google Maps API Key', 'jupiterx-core' ); ?></label>
73
+ <input type="text" class="jupiterx-form-control" id="jupiterx-cp-settings-donut-google-maps-api-key" value="<?php echo esc_attr( get_option( 'jupiterx_donut_google_maps_api_key' ) ); ?>" name="jupiterx_donut_google_maps_api_key">
74
+ </div>
75
+ <?php endif; ?>
76
+ </div>
77
+ <div class="mt-2">
78
+ <button type="submit" class="btn btn-primary"><?php esc_html_e( 'Save Settings', 'jupiterx-core' ); ?></button>
79
+ <span class="jupiterx-cp-settings-save-feedback text-muted ml-2 d-none"><?php esc_html_e( 'Saving...', 'jupiterx-core' ); ?></span>
80
+ </div>
81
+ </form>
82
+ </div>
83
+ </div>
includes/customizer/functions.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Jupiter Customizer component.
4
+ *
5
+ * @package JupiterX_Core\Customizer
6
+ */
7
+
8
+ /**
9
+ * Load Kirki library.
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ function jupiterx_customizer_kirki() {
14
+ jupiterx_core()->load_files( [ 'customizer/vendors/kirki/kirki' ] );
15
+ }
includes/customizer/vendors/kirki/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Aristeides Stathopoulos
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 all
13
+ 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 THE
21
+ SOFTWARE.
includes/customizer/vendors/kirki/assets/css/kirki-styles.css ADDED
File without changes
includes/customizer/vendors/kirki/assets/images/1c.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/2cl.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/2cr.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/3cl.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/3cm.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/3cr.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/jquery.fs.stepper-arrows.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/kirki-bottom.png ADDED
Binary file
includes/customizer/vendors/kirki/assets/images/kirki-bottom.svg ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ width="71.497665"
11
+ height="23.886881"
12
+ version="1.1"
13
+ xml:space="preserve"
14
+ style="clip-rule:evenodd;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1"
15
+ id="svg2"
16
+ inkscape:version="0.91 r13725"
17
+ sodipodi:docname="kirki-bottom.svg"><metadata
18
+ id="metadata56"><rdf:RDF><cc:Work
19
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
20
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
21
+ id="defs54" /><sodipodi:namedview
22
+ pagecolor="#ffffff"
23
+ bordercolor="#666666"
24
+ borderopacity="1"
25
+ objecttolerance="10"
26
+ gridtolerance="10"
27
+ guidetolerance="10"
28
+ inkscape:pageopacity="0"
29
+ inkscape:pageshadow="2"
30
+ inkscape:window-width="1871"
31
+ inkscape:window-height="1056"
32
+ id="namedview52"
33
+ showgrid="false"
34
+ fit-margin-top="0"
35
+ fit-margin-left="0"
36
+ fit-margin-right="0"
37
+ fit-margin-bottom="0"
38
+ inkscape:zoom="4.6669048"
39
+ inkscape:cx="-1.0852472"
40
+ inkscape:cy="-7.0625365"
41
+ inkscape:window-x="49"
42
+ inkscape:window-y="24"
43
+ inkscape:window-maximized="1"
44
+ inkscape:current-layer="svg2" /><g
45
+ id="g4242"
46
+ transform="translate(-3.71284,-0.18012)"
47
+ inkscape:export-xdpi="94"
48
+ inkscape:export-ydpi="94"><path
49
+ inkscape:export-ydpi="94.19397"
50
+ inkscape:export-xdpi="94.19397"
51
+ inkscape:connector-curvature="0"
52
+ id="path46"
53
+ style="fill:none;stroke:#000000;stroke-width:0.2;stroke-miterlimit:1;stroke-dasharray:none"
54
+ d="m 10.4064,22.5387 -0.3276,0 0,1.4283 -1.65866,0 -0.31673,-2.9188 C 5.488,18.886 3.81284,15.6275 3.81284,12.0084 c 0,-2.71119 0.9401,-5.22001 2.5246,-7.23473 L 6.0704,2.31269 l 2.90602,0 C 10.8759,1.02464 13.1284,0.28012 15.5411,0.28012 c 2.4127,0 4.6652,0.74452 6.5647,2.03257 l 2.8545,0 -0.2609,2.40411 c 1.6102,2.01928 2.57,4.55213 2.57,7.2916 0,3.6568 -1.7103,6.9454 -4.3471,9.0859 l -0.3117,2.8727 -1.6586,0 0,-1.4283 -0.2761,0 c -1.5432,0.7637 -3.2923,1.1979 -5.1348,1.1979 -1.8425,0 -3.5916,-0.4342 -5.1347,-1.1979 z" /><g
55
+ inkscape:export-ydpi="94.19397"
56
+ inkscape:export-xdpi="94.19397"
57
+ style="stroke-width:0.2;stroke-miterlimit:1;stroke-dasharray:none"
58
+ id="g48"><path
59
+ d="m 15.4462,11.8498 c 3.4224,0 6.1968,2.104 6.1968,4.6994 0,2.5955 -2.7744,4.6995 -6.1968,4.6995 -3.4224,0 -6.19678,-2.104 -6.19678,-4.6995 0,-2.5954 2.77438,-4.6994 6.19678,-4.6994 z m -1.9811,2.9947 c 0.5725,0 1.0366,0.8148 1.0366,1.8199 0,1.0051 -0.4641,1.8199 -1.0366,1.8199 -0.5725,0 -1.0366,-0.8148 -1.0366,-1.8199 0,-1.0051 0.4641,-1.8199 1.0366,-1.8199 z m 4.0544,0 c 0.5726,0 1.0367,0.8148 1.0367,1.8199 0,1.0051 -0.4641,1.8199 -1.0367,1.8199 -0.5725,0 -1.0366,-0.8148 -1.0366,-1.8199 0,-1.0051 0.4641,-1.8199 1.0366,-1.8199 z"
60
+ style="fill:none;stroke:#000000;stroke-width:0.2;stroke-miterlimit:1;stroke-dasharray:none"
61
+ id="path50"
62
+ inkscape:connector-curvature="0" /></g></g><g
63
+ id="g20"
64
+ style="fill:#000000;fill-opacity:0.20408164"
65
+ inkscape:export-xdpi="94.19397"
66
+ inkscape:export-ydpi="94.19397"
67
+ transform="matrix(0.34650485,0,0,0.34650485,30.267064,8.7780735)"><text
68
+ xml:space="preserve"
69
+ style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:40px;line-height:125%;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:0.20408164;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
70
+ x="-7.2853427"
71
+ y="42.141983"
72
+ id="text4234"
73
+ sodipodi:linespacing="125%"><tspan
74
+ sodipodi:role="line"
75
+ id="tspan4236"
76
+ x="-7.2853427"
77
+ y="42.141983">toolkit</tspan></text>
78
+ </g><text
79
+ xml:space="preserve"
80
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15.76700211px;line-height:125%;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:0.10204079;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
81
+ x="27.568701"
82
+ y="11.573637"
83
+ id="text4238"
84
+ sodipodi:linespacing="125%"
85
+ inkscape:export-xdpi="94"
86
+ inkscape:export-ydpi="94"><tspan
87
+ sodipodi:role="line"
88
+ id="tspan4240"
89
+ x="27.568701"
90
+ y="11.573637">KIRKI</tspan></text>
91
+ </svg>
includes/customizer/vendors/kirki/assets/images/kirki-logo.svg ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ width="50"
11
+ height="50"
12
+ version="1.1"
13
+ xml:space="preserve"
14
+ style="clip-rule:evenodd;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1"
15
+ id="svg4136"
16
+ inkscape:version="0.91 r13725"
17
+ sodipodi:docname="kirki-logo.svg"><metadata
18
+ id="metadata4190"><rdf:RDF><cc:Work
19
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
20
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
21
+ id="defs4188" /><sodipodi:namedview
22
+ pagecolor="#ffffff"
23
+ bordercolor="#666666"
24
+ borderopacity="1"
25
+ objecttolerance="10"
26
+ gridtolerance="10"
27
+ guidetolerance="10"
28
+ inkscape:pageopacity="0"
29
+ inkscape:pageshadow="2"
30
+ inkscape:window-width="1871"
31
+ inkscape:window-height="1056"
32
+ id="namedview4186"
33
+ showgrid="false"
34
+ fit-margin-top="0"
35
+ fit-margin-left="0"
36
+ fit-margin-right="0"
37
+ fit-margin-bottom="0"
38
+ inkscape:zoom="15.188889"
39
+ inkscape:cx="41.22716"
40
+ inkscape:cy="11.507"
41
+ inkscape:window-x="49"
42
+ inkscape:window-y="24"
43
+ inkscape:window-maximized="1"
44
+ inkscape:current-layer="svg4136" /><path
45
+ id="path4184"
46
+ style="fill:none;stroke:#000000;stroke-width:0.16830143px"
47
+ d="m 24.80031,24.424072 c 7.199936,0 13.036629,4.426328 13.036629,9.886447 0,5.46033 -5.836693,9.886658 -13.036629,9.886658 -7.199935,0 -13.036587,-4.426328 -13.036587,-9.886658 0,-5.460119 5.836652,-9.886447 13.036587,-9.886447 z m -4.167774,6.300154 c 1.204407,0 2.180766,1.71415 2.180766,3.828647 0,2.114498 -0.976359,3.828648 -2.180766,3.828648 -1.204407,0 -2.180766,-1.71415 -2.180766,-3.828648 0,-2.114497 0.976359,-3.828647 2.180766,-3.828647 z m 8.529516,0 c 1.204618,0 2.180977,1.71415 2.180977,3.828647 0,2.114498 -0.976359,3.828648 -2.180977,3.828648 -1.204407,0 -2.180765,-1.71415 -2.180765,-3.828648 0,-2.114497 0.976358,-3.828647 2.180765,-3.828647 z m -14.964311,16.186812 -0.689195,0 0,3.004811 -3.489435,0 -0.6663266,-6.140478 C 3.8505687,39.226604 0.32642086,32.371476 0.32642086,24.75773 c 0,-5.703715 1.97775214,-10.98169 5.31117244,-15.2201932 l -0.5617902,-5.177331 6.1135919,0 c 3.996065,-2.709758 8.734802,-4.27605494 13.810563,-4.27605494 5.075761,0 9.814498,1.56629694 13.810605,4.27605494 l 6.005206,0 -0.548873,5.05769 c 3.387487,4.2480962 5.406683,9.5766252 5.406683,15.3398342 0,7.693058 -3.598074,14.61151 -9.145289,19.114625 l -0.655745,6.043494 -3.489309,0 0,-3.004811 -0.58085,0 c -3.246535,1.606647 -6.926236,2.520103 -10.802428,2.520103 -3.876192,0 -7.555893,-0.913456 -10.802217,-2.520103 z"
48
+ inkscape:connector-curvature="0" /></svg>
includes/customizer/vendors/kirki/assets/vendor/fontawesome/fontawesome.json ADDED
@@ -0,0 +1,8315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "icons": [
3
+ {
4
+ "name": "Glass",
5
+ "id": "glass",
6
+ "unicode": "f000",
7
+ "created": 1,
8
+ "filter": [
9
+ "martini",
10
+ "drink",
11
+ "bar",
12
+ "alcohol",
13
+ "liquor"
14
+ ],
15
+ "categories": [
16
+ "Web Application Icons"
17
+ ]
18
+ },
19
+ {
20
+ "name": "Music",
21
+ "id": "music",
22
+ "unicode": "f001",
23
+ "created": 1,
24
+ "filter": [
25
+ "note",
26
+ "sound"
27
+ ],
28
+ "categories": [
29
+ "Web Application Icons"
30
+ ]
31
+ },
32
+ {
33
+ "name": "Search",
34
+ "id": "search",
35
+ "unicode": "f002",
36
+ "created": 1,
37
+ "filter": [
38
+ "magnify",
39
+ "zoom",
40
+ "enlarge",
41
+ "bigger"
42
+ ],
43
+ "categories": [
44
+ "Web Application Icons"
45
+ ]
46
+ },
47
+ {
48
+ "name": "Envelope Outlined",
49
+ "id": "envelope-o",
50
+ "unicode": "f003",
51
+ "created": 1,
52
+ "filter": [
53
+ "email",
54
+ "e-mail",
55
+ "letter",
56
+ "support",
57
+ "mail",
58
+ "message",
59
+ "notification"
60
+ ],
61
+ "categories": [
62
+ "Web Application Icons"
63
+ ]
64
+ },
65
+ {
66
+ "name": "Heart",
67
+ "id": "heart",
68
+ "unicode": "f004",
69
+ "created": 1,
70
+ "filter": [
71
+ "love",
72
+ "like",
73
+ "favorite"
74
+ ],
75
+ "categories": [
76
+ "Web Application Icons",
77
+ "Medical Icons"
78
+ ]
79
+ },
80
+ {
81
+ "name": "Star",
82
+ "id": "star",
83
+ "unicode": "f005",
84
+ "created": 1,
85
+ "filter": [
86
+ "award",
87
+ "achievement",
88
+ "night",
89
+ "rating",
90
+ "score",
91
+ "favorite"
92
+ ],
93
+ "categories": [
94
+ "Web Application Icons"
95
+ ]
96
+ },
97
+ {
98
+ "name": "Star Outlined",
99
+ "id": "star-o",
100
+ "unicode": "f006",
101
+ "created": 1,
102
+ "filter": [
103
+ "award",
104
+ "achievement",
105
+ "night",
106
+ "rating",
107
+ "score",
108
+ "favorite"
109
+ ],
110
+ "categories": [
111
+ "Web Application Icons"
112
+ ]
113
+ },
114
+ {
115
+ "name": "User",
116
+ "id": "user",
117
+ "unicode": "f007",
118
+ "created": 1,
119
+ "filter": [
120
+ "person",
121
+ "man",
122
+ "head",
123
+ "profile"
124
+ ],
125
+ "categories": [
126
+ "Web Application Icons"
127
+ ]
128
+ },
129
+ {
130
+ "name": "Film",
131
+ "id": "film",
132
+ "unicode": "f008",
133
+ "created": 1,
134
+ "filter": [
135
+ "movie"
136
+ ],
137
+ "categories": [
138
+ "Web Application Icons"
139
+ ]
140
+ },
141
+ {
142
+ "name": "th-large",
143
+ "id": "th-large",
144
+ "unicode": "f009",
145
+ "created": 1,
146
+ "filter": [
147
+ "blocks",
148
+ "squares",
149
+ "boxes",
150
+ "grid"
151
+ ],
152
+ "categories": [
153
+ "Text Editor Icons"
154
+ ]
155
+ },
156
+ {
157
+ "name": "th",
158
+ "id": "th",
159
+ "unicode": "f00a",
160
+ "created": 1,
161
+ "filter": [
162
+ "blocks",
163
+ "squares",
164
+ "boxes",
165
+ "grid"
166
+ ],
167
+ "categories": [
168
+ "Text Editor Icons"
169
+ ]
170
+ },
171
+ {
172
+ "name": "th-list",
173
+ "id": "th-list",
174
+ "unicode": "f00b",
175
+ "created": 1,
176
+ "filter": [
177
+ "ul",
178
+ "ol",
179
+ "checklist",
180
+ "finished",
181
+ "completed",
182
+ "done",
183
+ "todo"
184
+ ],
185
+ "categories": [
186
+ "Text Editor Icons"
187
+ ]
188
+ },
189
+ {
190
+ "name": "Check",
191
+ "id": "check",
192
+ "unicode": "f00c",
193
+ "created": 1,
194
+ "filter": [
195
+ "checkmark",
196
+ "done",
197
+ "todo",
198
+ "agree",
199
+ "accept",
200
+ "confirm",
201
+ "tick",
202
+ "ok"
203
+ ],
204
+ "categories": [
205
+ "Web Application Icons"
206
+ ]
207
+ },
208
+ {
209
+ "name": "Times",
210
+ "id": "times",
211
+ "unicode": "f00d",
212
+ "created": 1,
213
+ "aliases": [
214
+ "remove",
215
+ "close"
216
+ ],
217
+ "filter": [
218
+ "close",
219
+ "exit",
220
+ "x",
221
+ "cross"
222
+ ],
223
+ "categories": [
224
+ "Web Application Icons"
225
+ ]
226
+ },
227
+ {
228
+ "name": "Search Plus",
229
+ "id": "search-plus",
230
+ "unicode": "f00e",
231
+ "created": 1,
232
+ "filter": [
233
+ "magnify",
234
+ "zoom",
235
+ "enlarge",
236
+ "bigger"
237
+ ],
238
+ "categories": [
239
+ "Web Application Icons"
240
+ ]
241
+ },
242
+ {
243
+ "name": "Search Minus",
244
+ "id": "search-minus",
245
+ "unicode": "f010",
246
+ "created": 1,
247
+ "filter": [
248
+ "magnify",
249
+ "minify",
250
+ "zoom",
251
+ "smaller"
252
+ ],
253
+ "categories": [
254
+ "Web Application Icons"
255
+ ]
256
+ },
257
+ {
258
+ "name": "Power Off",
259
+ "id": "power-off",
260
+ "unicode": "f011",
261
+ "created": 1,
262
+ "filter": [
263
+ "on"
264
+ ],
265
+ "categories": [
266
+ "Web Application Icons"
267
+ ]
268
+ },
269
+ {
270
+ "name": "signal",
271
+ "id": "signal",
272
+ "unicode": "f012",
273
+ "created": 1,
274
+ "filter": [
275
+ "graph",
276
+ "bars"
277
+ ],
278
+ "categories": [
279
+ "Web Application Icons"
280
+ ]
281
+ },
282
+ {
283
+ "name": "cog",
284
+ "id": "cog",
285
+ "unicode": "f013",
286
+ "created": 1,
287
+ "filter": [
288
+ "settings"
289
+ ],
290
+ "aliases": [
291
+ "gear"
292
+ ],
293
+ "categories": [
294
+ "Web Application Icons",
295
+ "Spinner Icons"
296
+ ]
297
+ },
298
+ {
299
+ "name": "Trash Outlined",
300
+ "id": "trash-o",
301
+ "unicode": "f014",
302
+ "created": 1,
303
+ "filter": [
304
+ "garbage",
305
+ "delete",
306
+ "remove",
307
+ "trash",
308
+ "hide"
309
+ ],
310
+ "categories": [
311
+ "Web Application Icons"
312
+ ]
313
+ },
314
+ {
315
+ "name": "home",
316
+ "id": "home",
317
+ "unicode": "f015",
318
+ "created": 1,
319
+ "filter": [
320
+ "main",
321
+ "house"
322
+ ],
323
+ "categories": [
324
+ "Web Application Icons"
325
+ ]
326
+ },
327
+ {
328
+ "name": "File Outlined",
329
+ "id": "file-o",
330
+ "unicode": "f016",
331
+ "created": 1,
332
+ "filter": [
333
+ "new",
334
+ "page",
335
+ "pdf",
336
+ "document"
337
+ ],
338
+ "categories": [
339
+ "Text Editor Icons",
340
+ "File Type Icons"
341
+ ]
342
+ },
343
+ {
344
+ "name": "Clock Outlined",
345
+ "id": "clock-o",
346
+ "unicode": "f017",
347
+ "created": 1,
348
+ "filter": [
349
+ "watch",
350
+ "timer",
351
+ "late",
352
+ "timestamp"
353
+ ],
354
+ "categories": [
355
+ "Web Application Icons"
356
+ ]
357
+ },
358
+ {
359
+ "name": "road",
360
+ "id": "road",
361
+ "unicode": "f018",
362
+ "created": 1,
363
+ "filter": [
364
+ "street"
365
+ ],
366
+ "categories": [
367
+ "Web Application Icons"
368
+ ]
369
+ },
370
+ {
371
+ "name": "Download",
372
+ "id": "download",
373
+ "unicode": "f019",
374
+ "created": 1,
375
+ "filter": [
376
+ "import"
377
+ ],
378
+ "categories": [
379
+ "Web Application Icons"
380
+ ]
381
+ },
382
+ {
383
+ "name": "Arrow Circle Outlined Down",
384
+ "id": "arrow-circle-o-down",
385
+ "unicode": "f01a",
386
+ "created": 1,
387
+ "filter": [
388
+ "download"
389
+ ],
390
+ "categories": [
391
+ "Directional Icons"
392
+ ]
393
+ },
394
+ {
395
+ "name": "Arrow Circle Outlined Up",
396
+ "id": "arrow-circle-o-up",
397
+ "unicode": "f01b",
398
+ "created": 1,
399
+ "categories": [
400
+ "Directional Icons"
401
+ ]
402
+ },
403
+ {
404
+ "name": "inbox",
405
+ "id": "inbox",
406
+ "unicode": "f01c",
407
+ "created": 1,
408
+ "categories": [
409
+ "Web Application Icons"
410
+ ]
411
+ },
412
+ {
413
+ "name": "Play Circle Outlined",
414
+ "id": "play-circle-o",
415
+ "unicode": "f01d",
416
+ "created": 1,
417
+ "categories": [
418
+ "Video Player Icons"
419
+ ]
420
+ },
421
+ {
422
+ "name": "Repeat",
423
+ "id": "repeat",
424
+ "unicode": "f01e",
425
+ "created": 1,
426
+ "filter": [
427
+ "redo",
428
+ "forward"
429
+ ],
430
+ "aliases": [
431
+ "rotate-right"
432
+ ],
433
+ "categories": [
434
+ "Text Editor Icons"
435
+ ]
436
+ },
437
+ {
438
+ "name": "refresh",
439
+ "id": "refresh",
440
+ "unicode": "f021",
441
+ "created": 1,
442
+ "filter": [
443
+ "reload",
444
+ "sync"
445
+ ],
446
+ "categories": [
447
+ "Web Application Icons",
448
+ "Spinner Icons"
449
+ ]
450
+ },
451
+ {
452
+ "name": "list-alt",
453
+ "id": "list-alt",
454
+ "unicode": "f022",
455
+ "created": 1,
456
+ "filter": [
457
+ "ul",
458
+ "ol",
459
+ "checklist",
460
+ "finished",
461
+ "completed",
462
+ "done",
463
+ "todo"
464
+ ],
465
+ "categories": [
466
+ "Text Editor Icons"
467
+ ]
468
+ },
469
+ {
470
+ "name": "lock",
471
+ "id": "lock",
472
+ "unicode": "f023",
473
+ "created": 1,
474
+ "filter": [
475
+ "protect",
476
+ "admin",
477
+ "security"
478
+ ],
479
+ "categories": [
480
+ "Web Application Icons"
481
+ ]
482
+ },
483
+ {
484
+ "name": "flag",
485
+ "id": "flag",
486
+ "unicode": "f024",
487
+ "created": 1,
488
+ "filter": [
489
+ "report",
490
+ "notification",
491
+ "notify"
492
+ ],
493
+ "categories": [
494
+ "Web Application Icons"
495
+ ]
496
+ },
497
+ {
498
+ "name": "headphones",
499
+ "id": "headphones",
500
+ "unicode": "f025",
501
+ "created": 1,
502
+ "filter": [
503
+ "sound",
504
+ "listen",
505
+ "music",
506
+ "audio"
507
+ ],
508
+ "categories": [
509
+ "Web Application Icons"
510
+ ]
511
+ },
512
+ {
513
+ "name": "volume-off",
514
+ "id": "volume-off",
515
+ "unicode": "f026",
516
+ "created": 1,
517
+ "filter": [
518
+ "audio",
519
+ "mute",
520
+ "sound",
521
+ "music"
522
+ ],
523
+ "categories": [
524
+ "Web Application Icons"
525
+ ]
526
+ },
527
+ {
528
+ "name": "volume-down",
529
+ "id": "volume-down",
530
+ "unicode": "f027",
531
+ "created": 1,
532
+ "filter": [
533
+ "audio",
534
+ "lower",
535
+ "quieter",
536
+ "sound",
537
+ "music"
538
+ ],
539
+ "categories": [
540
+ "Web Application Icons"
541
+ ]
542
+ },
543
+ {
544
+ "name": "volume-up",
545
+ "id": "volume-up",
546
+ "unicode": "f028",
547
+ "created": 1,
548
+ "filter": [
549
+ "audio",
550
+ "higher",
551
+ "louder",
552
+ "sound",
553
+ "music"
554
+ ],
555
+ "categories": [
556
+ "Web Application Icons"
557
+ ]
558
+ },
559
+ {
560
+ "name": "qrcode",
561
+ "id": "qrcode",
562
+ "unicode": "f029",
563
+ "created": 1,
564
+ "filter": [
565
+ "scan"
566
+ ],
567
+ "categories": [
568
+ "Web Application Icons"
569
+ ]
570
+ },
571
+ {
572
+ "name": "barcode",
573
+ "id": "barcode",
574
+ "unicode": "f02a",
575
+ "created": 1,
576
+ "filter": [
577
+ "scan"
578
+ ],
579
+ "categories": [
580
+ "Web Application Icons"
581
+ ]
582
+ },
583
+ {
584
+ "name": "tag",
585
+ "id": "tag",
586
+ "unicode": "f02b",
587
+ "created": 1,
588
+ "filter": [
589
+ "label"
590
+ ],
591
+ "categories": [
592
+ "Web Application Icons"
593
+ ]
594
+ },
595
+ {
596
+ "name": "tags",
597
+ "id": "tags",
598
+ "unicode": "f02c",
599
+ "created": 1,
600
+ "filter": [
601
+ "labels"
602
+ ],
603
+ "categories": [
604
+ "Web Application Icons"
605
+ ]
606
+ },
607
+ {
608
+ "name": "book",
609
+ "id": "book",
610
+ "unicode": "f02d",
611
+ "created": 1,
612
+ "filter": [
613
+ "read",
614
+ "documentation"
615
+ ],
616
+ "categories": [
617
+ "Web Application Icons"
618
+ ]
619
+ },
620
+ {
621
+ "name": "bookmark",
622
+ "id": "bookmark",
623
+ "unicode": "f02e",
624
+ "created": 1,
625
+ "filter": [
626
+ "save"
627
+ ],
628
+ "categories": [
629
+ "Web Application Icons"
630
+ ]
631
+ },
632
+ {
633
+ "name": "print",
634
+ "id": "print",
635
+ "unicode": "f02f",
636
+ "created": 1,
637
+ "categories": [
638
+ "Web Application Icons"
639
+ ]
640
+ },
641
+ {
642
+ "name": "camera",
643
+ "id": "camera",
644
+ "unicode": "f030",
645
+ "created": 1,
646
+ "filter": [
647
+ "photo",
648
+ "picture",
649
+ "record"
650
+ ],
651
+ "categories": [
652
+ "Web Application Icons"
653
+ ]
654
+ },
655
+ {
656
+ "name": "font",
657
+ "id": "font",
658
+ "unicode": "f031",
659
+ "created": 1,
660
+ "filter": [
661
+ "text"
662
+ ],
663
+ "categories": [
664
+ "Text Editor Icons"
665
+ ]
666
+ },
667
+ {
668
+ "name": "bold",
669
+ "id": "bold",
670
+ "unicode": "f032",
671
+ "created": 1,
672
+ "categories": [
673
+ "Text Editor Icons"
674
+ ]
675
+ },
676
+ {
677
+ "name": "italic",
678
+ "id": "italic",
679
+ "unicode": "f033",
680
+ "created": 1,
681
+ "filter": [
682
+ "italics"
683
+ ],
684
+ "categories": [
685
+ "Text Editor Icons"
686
+ ]
687
+ },
688
+ {
689
+ "name": "text-height",
690
+ "id": "text-height",
691
+ "unicode": "f034",
692
+ "created": 1,
693
+ "categories": [
694
+ "Text Editor Icons"
695
+ ]
696
+ },
697
+ {
698
+ "name": "text-width",
699
+ "id": "text-width",
700
+ "unicode": "f035",
701
+ "created": 1,
702
+ "categories": [
703
+ "Text Editor Icons"
704
+ ]
705
+ },
706
+ {
707
+ "name": "align-left",
708
+ "id": "align-left",
709
+ "unicode": "f036",
710
+ "created": 1,
711
+ "filter": [
712
+ "text"
713
+ ],
714
+ "categories": [
715
+ "Text Editor Icons"
716
+ ]
717
+ },
718
+ {
719
+ "name": "align-center",
720
+ "id": "align-center",
721
+ "unicode": "f037",
722
+ "created": 1,
723
+ "filter": [
724
+ "middle",
725
+ "text"
726
+ ],
727
+ "categories": [
728
+ "Text Editor Icons"
729
+ ]
730
+ },
731
+ {
732
+ "name": "align-right",
733
+ "id": "align-right",
734
+ "unicode": "f038",
735
+ "created": 1,
736
+ "filter": [
737
+ "text"
738
+ ],
739
+ "categories": [
740
+ "Text Editor Icons"
741
+ ]
742
+ },
743
+ {
744
+ "name": "align-justify",
745
+ "id": "align-justify",
746
+ "unicode": "f039",
747
+ "created": 1,
748
+ "filter": [
749
+ "text"
750
+ ],
751
+ "categories": [
752
+ "Text Editor Icons"
753
+ ]
754
+ },
755
+ {
756
+ "name": "list",
757
+ "id": "list",
758
+ "unicode": "f03a",
759
+ "created": 1,
760
+ "filter": [
761
+ "ul",
762
+ "ol",
763
+ "checklist",
764
+ "finished",
765
+ "completed",
766
+ "done",
767
+ "todo"
768
+ ],
769
+ "categories": [
770
+ "Text Editor Icons"
771
+ ]
772
+ },
773
+ {
774
+ "name": "Outdent",
775
+ "id": "outdent",
776
+ "unicode": "f03b",
777
+ "created": 1,
778
+ "aliases": [
779
+ "dedent"
780
+ ],
781
+ "categories": [
782
+ "Text Editor Icons"
783
+ ]
784
+ },
785
+ {
786
+ "name": "Indent",
787
+ "id": "indent",
788
+ "unicode": "f03c",
789
+ "created": 1,
790
+ "categories": [
791
+ "Text Editor Icons"
792
+ ]
793
+ },
794
+ {
795
+ "name": "Video Camera",
796
+ "id": "video-camera",
797
+ "unicode": "f03d",
798
+ "created": 1,
799
+ "filter": [
800
+ "film",
801
+ "movie",
802
+ "record"
803
+ ],
804
+ "categories": [
805
+ "Web Application Icons"
806
+ ]
807
+ },
808
+ {
809
+ "name": "Picture Outlined",
810
+ "id": "picture-o",
811
+ "unicode": "f03e",
812
+ "created": 1,
813
+ "aliases": [
814
+ "photo",
815
+ "image"
816
+ ],
817
+ "categories": [
818
+ "Web Application Icons"
819
+ ]
820
+ },
821
+ {
822
+ "name": "pencil",
823
+ "id": "pencil",
824
+ "unicode": "f040",
825
+ "created": 1,
826
+ "filter": [
827
+ "write",
828
+ "edit",
829
+ "update"
830
+ ],
831
+ "categories": [
832
+ "Web Application Icons"
833
+ ]
834
+ },
835
+ {
836
+ "name": "map-marker",
837
+ "id": "map-marker",
838
+ "unicode": "f041",
839
+ "created": 1,
840
+ "filter": [
841
+ "map",
842
+ "pin",
843
+ "location",
844
+ "coordinates",
845
+ "localize",
846
+ "address",
847
+ "travel",
848
+ "where",
849
+ "place"
850
+ ],
851
+ "categories": [
852
+ "Web Application Icons"
853
+ ]
854
+ },
855
+ {
856
+ "name": "adjust",
857
+ "id": "adjust",
858
+ "unicode": "f042",
859
+ "created": 1,
860
+ "filter": [
861
+ "contrast"
862
+ ],
863
+ "categories": [
864
+ "Web Application Icons"
865
+ ]
866
+ },
867
+ {
868
+ "name": "tint",
869
+ "id": "tint",
870
+ "unicode": "f043",
871
+ "created": 1,
872
+ "filter": [
873
+ "raindrop",
874
+ "waterdrop",
875
+ "drop",
876
+ "droplet"
877
+ ],
878
+ "categories": [
879
+ "Web Application Icons"
880
+ ]
881
+ },
882
+ {
883
+ "name": "Pencil Square Outlined",
884
+ "id": "pencil-square-o",
885
+ "unicode": "f044",
886
+ "created": 1,
887
+ "filter": [
888
+ "write",
889
+ "edit",
890
+ "update"
891
+ ],
892
+ "aliases": [
893
+ "edit"
894
+ ],
895
+ "categories": [
896
+ "Web Application Icons"
897
+ ]
898
+ },
899
+ {
900
+ "name": "Share Square Outlined",
901
+ "id": "share-square-o",
902
+ "unicode": "f045",
903
+ "created": 1,
904
+ "filter": [
905
+ "social",
906
+ "send",
907
+ "arrow"
908
+ ],
909
+ "categories": [
910
+ "Web Application Icons"
911
+ ]
912
+ },
913
+ {
914
+ "name": "Check Square Outlined",
915
+ "id": "check-square-o",
916
+ "unicode": "f046",
917
+ "created": 1,
918
+ "filter": [
919
+ "todo",
920
+ "done",
921
+ "agree",
922
+ "accept",
923
+ "confirm",
924
+ "ok"
925
+ ],
926
+ "categories": [
927
+ "Web Application Icons",
928
+ "Form Control Icons"
929
+ ]
930
+ },
931
+ {
932
+ "name": "Arrows",
933
+ "id": "arrows",
934
+ "unicode": "f047",
935
+ "created": 1,
936
+ "filter": [
937
+ "move",
938
+ "reorder",
939
+ "resize"
940
+ ],
941
+ "categories": [
942
+ "Web Application Icons",
943
+ "Directional Icons"
944
+ ]
945
+ },
946
+ {
947
+ "name": "step-backward",
948
+ "id": "step-backward",
949
+ "unicode": "f048",
950
+ "created": 1,
951
+ "filter": [
952
+ "rewind",
953
+ "previous",
954
+ "beginning",
955
+ "start",
956
+ "first"
957
+ ],
958
+ "categories": [
959
+ "Video Player Icons"
960
+ ]
961
+ },
962
+ {
963
+ "name": "fast-backward",
964
+ "id": "fast-backward",
965
+ "unicode": "f049",
966
+ "created": 1,
967
+ "filter": [
968
+ "rewind",
969
+ "previous",
970
+ "beginning",
971
+ "start",
972
+ "first"
973
+ ],
974
+ "categories": [
975
+ "Video Player Icons"
976
+ ]
977
+ },
978
+ {
979
+ "name": "backward",
980
+ "id": "backward",
981
+ "unicode": "f04a",
982
+ "created": 1,
983
+ "filter": [
984
+ "rewind",
985
+ "previous"
986
+ ],
987
+ "categories": [
988
+ "Video Player Icons"
989
+ ]
990
+ },
991
+ {
992
+ "name": "play",
993
+ "id": "play",
994
+ "unicode": "f04b",
995
+ "created": 1,
996
+ "filter": [
997
+ "start",
998
+ "playing",
999
+ "music",
1000
+ "sound"
1001
+ ],
1002
+ "categories": [
1003
+ "Video Player Icons"
1004
+ ]
1005
+ },
1006
+ {
1007
+ "name": "pause",
1008
+ "id": "pause",
1009
+ "unicode": "f04c",
1010
+ "created": 1,
1011
+ "filter": [
1012
+ "wait"
1013
+ ],
1014
+ "categories": [
1015
+ "Video Player Icons"
1016
+ ]
1017
+ },
1018
+ {
1019
+ "name": "stop",
1020
+ "id": "stop",
1021
+ "unicode": "f04d",
1022
+ "created": 1,
1023
+ "filter": [
1024
+ "block",
1025
+ "box",
1026
+ "square"
1027
+ ],
1028
+ "categories": [
1029
+ "Video Player Icons"
1030
+ ]
1031
+ },
1032
+ {
1033
+ "name": "forward",
1034
+ "id": "forward",
1035
+ "unicode": "f04e",
1036
+ "created": 1,
1037
+ "filter": [
1038
+ "forward",
1039
+ "next"
1040
+ ],
1041
+ "categories": [
1042
+ "Video Player Icons"
1043
+ ]
1044
+ },
1045
+ {
1046
+ "name": "fast-forward",
1047
+ "id": "fast-forward",
1048
+ "unicode": "f050",
1049
+ "created": 1,
1050
+ "filter": [
1051
+ "next",
1052
+ "end",
1053
+ "last"
1054
+ ],
1055
+ "categories": [
1056
+ "Video Player Icons"
1057
+ ]
1058
+ },
1059
+ {
1060
+ "name": "step-forward",
1061
+ "id": "step-forward",
1062
+ "unicode": "f051",
1063
+ "created": 1,
1064
+ "filter": [
1065
+ "next",
1066
+ "end",
1067
+ "last"
1068
+ ],
1069
+ "categories": [
1070
+ "Video Player Icons"
1071
+ ]
1072
+ },
1073
+ {
1074
+ "name": "eject",
1075
+ "id": "eject",
1076
+ "unicode": "f052",
1077
+ "created": 1,
1078
+ "categories": [
1079
+ "Video Player Icons"
1080
+ ]
1081
+ },
1082
+ {
1083
+ "name": "chevron-left",
1084
+ "id": "chevron-left",
1085
+ "unicode": "f053",
1086
+ "created": 1,
1087
+ "filter": [
1088
+ "bracket",
1089
+ "previous",
1090
+ "back"
1091
+ ],
1092
+ "categories": [
1093
+ "Directional Icons"
1094
+ ]
1095
+ },
1096
+ {
1097
+ "name": "chevron-right",
1098
+ "id": "chevron-right",
1099
+ "unicode": "f054",
1100
+ "created": 1,
1101
+ "filter": [
1102
+ "bracket",
1103
+ "next",
1104
+ "forward"
1105
+ ],
1106
+ "categories": [
1107
+ "Directional Icons"
1108
+ ]
1109
+ },
1110
+ {
1111
+ "name": "Plus Circle",
1112
+ "id": "plus-circle",
1113
+ "unicode": "f055",
1114
+ "created": 1,
1115
+ "filter": [
1116
+ "add",
1117
+ "new",
1118
+ "create",
1119
+ "expand"
1120
+ ],
1121
+ "categories": [
1122
+ "Web Application Icons"
1123
+ ]
1124
+ },
1125
+ {
1126
+ "name": "Minus Circle",
1127
+ "id": "minus-circle",
1128
+ "unicode": "f056",
1129
+ "created": 1,
1130
+ "filter": [
1131
+ "delete",
1132
+ "remove",
1133
+ "trash",
1134
+ "hide"
1135
+ ],
1136
+ "categories": [
1137
+ "Web Application Icons"
1138
+ ]
1139
+ },
1140
+ {
1141
+ "name": "Times Circle",
1142
+ "id": "times-circle",
1143
+ "unicode": "f057",
1144
+ "created": 1,
1145
+ "filter": [
1146
+ "close",
1147
+ "exit",
1148
+ "x"
1149
+ ],
1150
+ "categories": [
1151
+ "Web Application Icons"
1152
+ ]
1153
+ },
1154
+ {
1155
+ "name": "Check Circle",
1156
+ "id": "check-circle",
1157
+ "unicode": "f058",
1158
+ "created": 1,
1159
+ "filter": [
1160
+ "todo",
1161
+ "done",
1162
+ "agree",
1163
+ "accept",
1164
+ "confirm",
1165
+ "ok"
1166
+ ],
1167
+ "categories": [
1168
+ "Web Application Icons"
1169
+ ]
1170
+ },
1171
+ {
1172
+ "name": "Question Circle",
1173
+ "id": "question-circle",
1174
+ "unicode": "f059",
1175
+ "filter": [
1176
+ "help",
1177
+ "information",
1178
+ "unknown",
1179
+ "support"
1180
+ ],
1181
+ "created": 1,
1182
+ "categories": [
1183
+ "Web Application Icons"
1184
+ ]
1185
+ },
1186
+ {
1187
+ "name": "Info Circle",
1188
+ "id": "info-circle",
1189
+ "unicode": "f05a",
1190
+ "created": 1,
1191
+ "filter": [
1192
+ "help",
1193
+ "information",
1194
+ "more",
1195
+ "details"
1196
+ ],
1197
+ "categories": [
1198
+ "Web Application Icons"
1199
+ ]
1200
+ },
1201
+ {
1202
+ "name": "Crosshairs",
1203
+ "id": "crosshairs",
1204
+ "unicode": "f05b",
1205
+ "created": 1,
1206
+ "filter": [
1207
+ "picker"
1208
+ ],
1209
+ "categories": [
1210
+ "Web Application Icons"
1211
+ ]
1212
+ },
1213
+ {
1214
+ "name": "Times Circle Outlined",
1215
+ "id": "times-circle-o",
1216
+ "unicode": "f05c",
1217
+ "created": 1,
1218
+ "filter": [
1219
+ "close",
1220
+ "exit",
1221
+ "x"
1222
+ ],
1223
+ "categories": [
1224
+ "Web Application Icons"
1225
+ ]
1226
+ },
1227
+ {
1228
+ "name": "Check Circle Outlined",
1229
+ "id": "check-circle-o",
1230
+ "unicode": "f05d",
1231
+ "created": 1,
1232
+ "filter": [
1233
+ "todo",
1234
+ "done",
1235
+ "agree",
1236
+ "accept",
1237
+ "confirm",
1238
+ "ok"
1239
+ ],
1240
+ "categories": [
1241
+ "Web Application Icons"
1242
+ ]
1243
+ },
1244
+ {
1245
+ "name": "ban",
1246
+ "id": "ban",
1247
+ "unicode": "f05e",
1248
+ "created": 1,
1249
+ "filter": [
1250
+ "delete",
1251
+ "remove",
1252
+ "trash",
1253
+ "hide",
1254
+ "block",
1255
+ "stop",
1256
+ "abort",
1257
+ "cancel"
1258
+ ],
1259
+ "categories": [
1260
+ "Web Application Icons"
1261
+ ]
1262
+ },
1263
+ {
1264
+ "name": "arrow-left",
1265
+ "id": "arrow-left",
1266
+ "unicode": "f060",
1267
+ "created": 1,
1268
+ "filter": [
1269
+ "previous",
1270
+ "back"
1271
+ ],
1272
+ "categories": [
1273
+ "Directional Icons"
1274
+ ]
1275
+ },
1276
+ {
1277
+ "name": "arrow-right",
1278
+ "id": "arrow-right",
1279
+ "unicode": "f061",
1280
+ "created": 1,
1281
+ "filter": [
1282
+ "next",
1283
+ "forward"
1284
+ ],
1285
+ "categories": [
1286
+ "Directional Icons"
1287
+ ]
1288
+ },
1289
+ {
1290
+ "name": "arrow-up",
1291
+ "id": "arrow-up",
1292
+ "unicode": "f062",
1293
+ "created": 1,
1294
+ "categories": [
1295
+ "Directional Icons"
1296
+ ]
1297
+ },
1298
+ {
1299
+ "name": "arrow-down",
1300
+ "id": "arrow-down",
1301
+ "unicode": "f063",
1302
+ "created": 1,
1303
+ "filter": [
1304
+ "download"
1305
+ ],
1306
+ "categories": [
1307
+ "Directional Icons"
1308
+ ]
1309
+ },
1310
+ {
1311
+ "name": "Share",
1312
+ "id": "share",
1313
+ "unicode": "f064",
1314
+ "created": 1,
1315
+ "aliases": [
1316
+ "mail-forward"
1317
+ ],
1318
+ "categories": [
1319
+ "Web Application Icons"
1320
+ ]
1321
+ },
1322
+ {
1323
+ "name": "Expand",
1324
+ "id": "expand",
1325
+ "unicode": "f065",
1326
+ "created": 1,
1327
+ "filter": [
1328
+ "enlarge",
1329
+ "bigger",
1330
+ "resize"
1331
+ ],
1332
+ "categories": [
1333
+ "Video Player Icons"
1334
+ ]
1335
+ },
1336
+ {
1337
+ "name": "Compress",
1338
+ "id": "compress",
1339
+ "unicode": "f066",
1340
+ "created": 1,
1341
+ "filter": [
1342
+ "collapse",
1343
+ "combine",
1344
+ "contract",
1345
+ "merge",
1346
+ "smaller"
1347
+ ],
1348
+ "categories": [
1349
+ "Video Player Icons"
1350
+ ]
1351
+ },
1352
+ {
1353
+ "name": "plus",
1354
+ "id": "plus",
1355
+ "unicode": "f067",
1356
+ "created": 1,
1357
+ "filter": [
1358
+ "add",
1359
+ "new",
1360
+ "create",
1361
+ "expand"
1362
+ ],
1363
+ "categories": [
1364
+ "Web Application Icons"
1365
+ ]
1366
+ },
1367
+ {
1368
+ "name": "minus",
1369
+ "id": "minus",
1370
+ "unicode": "f068",
1371
+ "created": 1,
1372
+ "filter": [
1373
+ "hide",
1374
+ "minify",
1375
+ "delete",
1376
+ "remove",
1377
+ "trash",
1378
+ "hide",
1379
+ "collapse"
1380
+ ],
1381
+ "categories": [
1382
+ "Web Application Icons"
1383
+ ]
1384
+ },
1385
+ {
1386
+ "name": "asterisk",
1387
+ "id": "asterisk",
1388
+ "unicode": "f069",
1389
+ "created": 1,
1390
+ "filter": [
1391
+ "details"
1392
+ ],
1393
+ "categories": [
1394
+ "Web Application Icons"
1395
+ ]
1396
+ },
1397
+ {
1398
+ "name": "Exclamation Circle",
1399
+ "id": "exclamation-circle",
1400
+ "unicode": "f06a",
1401
+ "created": 1,
1402
+ "filter": [
1403
+ "warning",
1404
+ "error",
1405
+ "problem",
1406
+ "notification",
1407
+ "alert"
1408
+ ],
1409
+ "categories": [
1410
+ "Web Application Icons"
1411
+ ]
1412
+ },
1413
+ {
1414
+ "name": "gift",
1415
+ "id": "gift",
1416
+ "unicode": "f06b",
1417
+ "created": 1,
1418
+ "filter": [
1419
+ "present"
1420
+ ],
1421
+ "categories": [
1422
+ "Web Application Icons"
1423
+ ]
1424
+ },
1425
+ {
1426
+ "name": "leaf",
1427
+ "id": "leaf",
1428
+ "unicode": "f06c",
1429
+ "created": 1,
1430
+ "filter": [
1431
+ "eco",
1432
+ "nature",
1433
+ "plant"
1434
+ ],
1435
+ "categories": [
1436
+ "Web Application Icons"
1437
+ ]
1438
+ },
1439
+ {
1440
+ "name": "fire",
1441
+ "id": "fire",
1442
+ "unicode": "f06d",
1443
+ "created": 1,
1444
+ "filter": [
1445
+ "flame",
1446
+ "hot",
1447
+ "popular"
1448
+ ],
1449
+ "categories": [
1450
+ "Web Application Icons"
1451
+ ]
1452
+ },
1453
+ {
1454
+ "name": "Eye",
1455
+ "id": "eye",
1456
+ "unicode": "f06e",
1457
+ "created": 1,
1458
+ "filter": [
1459
+ "show",
1460
+ "visible",
1461
+ "views"
1462
+ ],
1463
+ "categories": [
1464
+ "Web Application Icons"
1465
+ ]
1466
+ },
1467
+ {
1468
+ "name": "Eye Slash",
1469
+ "id": "eye-slash",
1470
+ "unicode": "f070",
1471
+ "created": 1,
1472
+ "filter": [
1473
+ "toggle",
1474
+ "show",
1475
+ "hide",
1476
+ "visible",
1477
+ "visiblity",
1478
+ "views"
1479
+ ],
1480
+ "categories": [
1481
+ "Web Application Icons"
1482
+ ]
1483
+ },
1484
+ {
1485
+ "name": "Exclamation Triangle",
1486
+ "id": "exclamation-triangle",
1487
+ "unicode": "f071",
1488
+ "created": 1,
1489
+ "filter": [
1490
+ "warning",
1491
+ "error",
1492
+ "problem",
1493
+ "notification",
1494
+ "alert"
1495
+ ],
1496
+ "aliases": [
1497
+ "warning"
1498
+ ],
1499
+ "categories": [
1500
+ "Web Application Icons"
1501
+ ]
1502
+ },
1503
+ {
1504
+ "name": "plane",
1505
+ "id": "plane",
1506
+ "unicode": "f072",
1507
+ "created": 1,
1508
+ "filter": [
1509
+ "travel",
1510
+ "trip",
1511
+ "location",
1512
+ "destination",
1513
+ "airplane",
1514
+ "fly",
1515
+ "mode"
1516
+ ],
1517
+ "categories": [
1518
+ "Web Application Icons",
1519
+ "Transportation Icons"
1520
+ ]
1521
+ },
1522
+ {
1523
+ "name": "calendar",
1524
+ "id": "calendar",
1525
+ "unicode": "f073",
1526
+ "created": 1,
1527
+ "filter": [
1528
+ "date",
1529
+ "time",
1530
+ "when",
1531
+ "event"
1532
+ ],
1533
+ "categories": [
1534
+ "Web Application Icons"
1535
+ ]
1536
+ },
1537
+ {
1538
+ "name": "random",
1539
+ "id": "random",
1540
+ "unicode": "f074",
1541
+ "created": 1,
1542
+ "filter": [
1543
+ "sort",
1544
+ "shuffle"
1545
+ ],
1546
+ "categories": [
1547
+ "Web Application Icons",
1548
+ "Video Player Icons"
1549
+ ]
1550
+ },
1551
+ {
1552
+ "name": "comment",
1553
+ "id": "comment",
1554
+ "unicode": "f075",
1555
+ "created": 1,
1556
+ "filter": [
1557
+ "speech",
1558
+ "notification",
1559
+ "note",
1560
+ "chat",
1561
+ "bubble",
1562
+ "feedback",
1563
+ "message",
1564
+ "texting",
1565
+ "sms",
1566
+ "conversation"
1567
+ ],
1568
+ "categories": [
1569
+ "Web Application Icons"
1570
+ ]
1571
+ },
1572
+ {
1573
+ "name": "magnet",
1574
+ "id": "magnet",
1575
+ "unicode": "f076",
1576
+ "created": 1,
1577
+ "categories": [
1578
+ "Web Application Icons"
1579
+ ]
1580
+ },
1581
+ {
1582
+ "name": "chevron-up",
1583
+ "id": "chevron-up",
1584
+ "unicode": "f077",
1585
+ "created": 1,
1586
+ "categories": [
1587
+ "Directional Icons"
1588
+ ]
1589
+ },
1590
+ {
1591
+ "name": "chevron-down",
1592
+ "id": "chevron-down",
1593
+ "unicode": "f078",
1594
+ "created": 1,
1595
+ "categories": [
1596
+ "Directional Icons"
1597
+ ]
1598
+ },
1599
+ {
1600
+ "name": "retweet",
1601
+ "id": "retweet",
1602
+ "unicode": "f079",
1603
+ "created": 1,
1604
+ "filter": [
1605
+ "refresh",
1606
+ "reload",
1607
+ "share"
1608
+ ],
1609
+ "categories": [
1610
+ "Web Application Icons"
1611
+ ]
1612
+ },
1613
+ {
1614
+ "name": "shopping-cart",
1615
+ "id": "shopping-cart",
1616
+ "unicode": "f07a",
1617
+ "created": 1,
1618
+ "filter": [
1619
+ "checkout",
1620
+ "buy",
1621
+ "purchase",
1622
+ "payment"
1623
+ ],
1624
+ "categories": [
1625
+ "Web Application Icons"
1626
+ ]
1627
+ },
1628
+ {
1629
+ "name": "Folder",
1630
+ "id": "folder",
1631
+ "unicode": "f07b",
1632
+ "created": 1,
1633
+ "categories": [
1634
+ "Web Application Icons"
1635
+ ]
1636
+ },
1637
+ {
1638
+ "name": "Folder Open",
1639
+ "id": "folder-open",
1640
+ "unicode": "f07c",
1641
+ "created": 1,
1642
+ "categories": [
1643
+ "Web Application Icons"
1644
+ ]
1645
+ },
1646
+ {
1647
+ "name": "Arrows Vertical",
1648
+ "id": "arrows-v",
1649
+ "unicode": "f07d",
1650
+ "created": 1,
1651
+ "filter": [
1652
+ "resize"
1653
+ ],
1654
+ "categories": [
1655
+ "Web Application Icons",
1656
+ "Directional Icons"
1657
+ ]
1658
+ },
1659
+ {
1660
+ "name": "Arrows Horizontal",
1661
+ "id": "arrows-h",
1662
+ "unicode": "f07e",
1663
+ "created": 1,
1664
+ "filter": [
1665
+ "resize"
1666
+ ],
1667
+ "categories": [
1668
+ "Web Application Icons",
1669
+ "Directional Icons"
1670
+ ]
1671
+ },
1672
+ {
1673
+ "name": "Bar Chart",
1674
+ "id": "bar-chart",
1675
+ "unicode": "f080",
1676
+ "created": 1,
1677
+ "aliases": [
1678
+ "bar-chart-o"
1679
+ ],
1680
+ "filter": [
1681
+ "graph",
1682
+ "analytics"
1683
+ ],
1684
+ "categories": [
1685
+ "Web Application Icons",
1686
+ "Chart Icons"
1687
+ ]
1688
+ },
1689
+ {
1690
+ "name": "Twitter Square",
1691
+ "id": "twitter-square",
1692
+ "unicode": "f081",
1693
+ "created": 1,
1694
+ "filter": [
1695
+ "tweet",
1696
+ "social network"
1697
+ ],
1698
+ "categories": [
1699
+ "Brand Icons"
1700
+ ]
1701
+ },
1702
+ {
1703
+ "name": "Facebook Square",
1704
+ "id": "facebook-square",
1705
+ "unicode": "f082",
1706
+ "created": 1,
1707
+ "filter": [
1708
+ "social network"
1709
+ ],
1710
+ "categories": [
1711
+ "Brand Icons"
1712
+ ]
1713
+ },
1714
+ {
1715
+ "name": "camera-retro",
1716
+ "id": "camera-retro",
1717
+ "unicode": "f083",
1718
+ "created": 1,
1719
+ "filter": [
1720
+ "photo",
1721
+ "picture",
1722
+ "record"
1723
+ ],
1724
+ "categories": [
1725
+ "Web Application Icons"
1726
+ ]
1727
+ },
1728
+ {
1729
+ "name": "key",
1730
+ "id": "key",
1731
+ "unicode": "f084",
1732
+ "created": 1,
1733
+ "filter": [
1734
+ "unlock",
1735
+ "password"
1736
+ ],
1737
+ "categories": [
1738
+ "Web Application Icons"
1739
+ ]
1740
+ },
1741
+ {
1742
+ "name": "cogs",
1743
+ "id": "cogs",
1744
+ "unicode": "f085",
1745
+ "created": 1,
1746
+ "aliases": [
1747
+ "gears"
1748
+ ],
1749
+ "filter": [
1750
+ "settings"
1751
+ ],
1752
+ "categories": [
1753
+ "Web Application Icons"
1754
+ ]
1755
+ },
1756
+ {
1757
+ "name": "comments",
1758
+ "id": "comments",
1759
+ "unicode": "f086",
1760
+ "created": 1,
1761
+ "filter": [
1762
+ "speech",
1763
+ "notification",
1764
+ "note",
1765
+ "chat",
1766
+ "bubble",
1767
+ "feedback",
1768
+ "message",
1769
+ "texting",
1770
+ "sms",
1771
+ "conversation"
1772
+ ],
1773
+ "categories": [
1774
+ "Web Application Icons"
1775
+ ]
1776
+ },
1777
+ {
1778
+ "name": "Thumbs Up Outlined",
1779
+ "id": "thumbs-o-up",
1780
+ "unicode": "f087",
1781
+ "created": 1,
1782
+ "filter": [
1783
+ "like",
1784
+ "approve",
1785
+ "favorite",
1786
+ "agree",
1787
+ "hand"
1788
+ ],
1789
+ "categories": [
1790
+ "Web Application Icons",
1791
+ "Hand Icons"
1792
+ ]
1793
+ },
1794
+ {
1795
+ "name": "Thumbs Down Outlined",
1796
+ "id": "thumbs-o-down",
1797
+ "unicode": "f088",
1798
+ "created": 1,
1799
+ "filter": [
1800
+ "dislike",
1801
+ "disapprove",
1802
+ "disagree",
1803
+ "hand"
1804
+ ],
1805
+ "categories": [
1806
+ "Web Application Icons",
1807
+ "Hand Icons"
1808
+ ]
1809
+ },
1810
+ {
1811
+ "name": "star-half",
1812
+ "id": "star-half",
1813
+ "unicode": "f089",
1814
+ "created": 1,
1815
+ "filter": [
1816
+ "award",
1817
+ "achievement",
1818
+ "rating",
1819
+ "score"
1820
+ ],
1821
+ "categories": [
1822
+ "Web Application Icons"
1823
+ ]
1824
+ },
1825
+ {
1826
+ "name": "Heart Outlined",
1827
+ "id": "heart-o",
1828
+ "unicode": "f08a",
1829
+ "created": 1,
1830
+ "filter": [
1831
+ "love",
1832
+ "like",
1833
+ "favorite"
1834
+ ],
1835
+ "categories": [
1836
+ "Web Application Icons",
1837
+ "Medical Icons"
1838
+ ]
1839
+ },
1840
+ {
1841
+ "name": "Sign Out",
1842
+ "id": "sign-out",
1843
+ "unicode": "f08b",
1844
+ "created": 1,
1845
+ "filter": [
1846
+ "log out",
1847
+ "logout",
1848
+ "leave",
1849
+ "exit",
1850
+ "arrow"
1851
+ ],
1852
+ "categories": [
1853
+ "Web Application Icons"
1854
+ ]
1855
+ },
1856
+ {
1857
+ "name": "LinkedIn Square",
1858
+ "id": "linkedin-square",
1859
+ "unicode": "f08c",
1860
+ "created": 1,
1861
+ "categories": [
1862
+ "Brand Icons"
1863
+ ]
1864
+ },
1865
+ {
1866
+ "name": "Thumb Tack",
1867
+ "id": "thumb-tack",
1868
+ "unicode": "f08d",
1869
+ "created": 1,
1870
+ "filter": [
1871
+ "marker",
1872
+ "pin",
1873
+ "location",
1874
+ "coordinates"
1875
+ ],
1876
+ "categories": [
1877
+ "Web Application Icons"
1878
+ ]
1879
+ },
1880
+ {
1881
+ "name": "External Link",
1882
+ "id": "external-link",
1883
+ "unicode": "f08e",
1884
+ "created": 1,
1885
+ "filter": [
1886
+ "open",
1887
+ "new"
1888
+ ],
1889
+ "categories": [
1890
+ "Web Application Icons"
1891
+ ]
1892
+ },
1893
+ {
1894
+ "name": "Sign In",
1895
+ "id": "sign-in",
1896
+ "unicode": "f090",
1897
+ "created": 1,
1898
+ "filter": [
1899
+ "enter",
1900
+ "join",
1901
+ "log in",
1902
+ "login",
1903
+ "sign up",
1904
+ "sign in",
1905
+ "signin",
1906
+ "signup",
1907
+ "arrow"
1908
+ ],
1909
+ "categories": [
1910
+ "Web Application Icons"
1911
+ ]
1912
+ },
1913
+ {
1914
+ "name": "trophy",
1915
+ "id": "trophy",
1916
+ "unicode": "f091",
1917
+ "created": 1,
1918
+ "filter": [
1919
+ "award",
1920
+ "achievement",
1921
+ "cup",
1922
+ "winner",
1923
+ "game"
1924
+ ],
1925
+ "categories": [
1926
+ "Web Application Icons"
1927
+ ]
1928
+ },
1929
+ {
1930
+ "name": "GitHub Square",
1931
+ "id": "github-square",
1932
+ "unicode": "f092",
1933
+ "created": 1,
1934
+ "url": "github.com/logos",
1935
+ "filter": [
1936
+ "octocat"
1937
+ ],
1938
+ "categories": [
1939
+ "Brand Icons"
1940
+ ]
1941
+ },
1942
+ {
1943
+ "name": "Upload",
1944
+ "id": "upload",
1945
+ "unicode": "f093",
1946
+ "created": 1,
1947
+ "filter": [
1948
+ "import"
1949
+ ],
1950
+ "categories": [
1951
+ "Web Application Icons"
1952
+ ]
1953
+ },
1954
+ {
1955
+ "name": "Lemon Outlined",
1956
+ "id": "lemon-o",
1957
+ "unicode": "f094",
1958
+ "created": 1,
1959
+ "filter": [
1960
+ "food"
1961
+ ],
1962
+ "categories": [
1963
+ "Web Application Icons"
1964
+ ]
1965
+ },
1966
+ {
1967
+ "name": "Phone",
1968
+ "id": "phone",
1969
+ "unicode": "f095",
1970
+ "created": 2,
1971
+ "filter": [
1972
+ "call",
1973
+ "voice",
1974
+ "number",
1975
+ "support",
1976
+ "earphone",
1977
+ "telephone"
1978
+ ],
1979
+ "categories": [
1980
+ "Web Application Icons"
1981
+ ]
1982
+ },
1983
+ {
1984
+ "name": "Square Outlined",
1985
+ "id": "square-o",
1986
+ "unicode": "f096",
1987
+ "created": 2,
1988
+ "filter": [
1989
+ "block",
1990
+ "square",
1991
+ "box"
1992
+ ],
1993
+ "categories": [
1994
+ "Web Application Icons",
1995
+ "Form Control Icons"
1996
+ ]
1997
+ },
1998
+ {
1999
+ "name": "Bookmark Outlined",
2000
+ "id": "bookmark-o",
2001
+ "unicode": "f097",
2002
+ "created": 2,
2003
+ "filter": [
2004
+ "save"
2005
+ ],
2006
+ "categories": [
2007
+ "Web Application Icons"
2008
+ ]
2009
+ },
2010
+ {
2011
+ "name": "Phone Square",
2012
+ "id": "phone-square",
2013
+ "unicode": "f098",
2014
+ "created": 2,
2015
+ "filter": [
2016
+ "call",
2017
+ "voice",
2018
+ "number",
2019
+ "support",
2020
+ "telephone"
2021
+ ],
2022
+ "categories": [
2023
+ "Web Application Icons"
2024
+ ]
2025
+ },
2026
+ {
2027
+ "name": "Twitter",
2028
+ "id": "twitter",
2029
+ "unicode": "f099",
2030
+ "created": 2,
2031
+ "filter": [
2032
+ "tweet",
2033
+ "social network"
2034
+ ],
2035
+ "categories": [
2036
+ "Brand Icons"
2037
+ ]
2038
+ },
2039
+ {
2040
+ "name": "Facebook",
2041
+ "id": "facebook",
2042
+ "unicode": "f09a",
2043
+ "created": 2,
2044
+ "aliases": [
2045
+ "facebook-f"
2046
+ ],
2047
+ "filter": [
2048
+ "social network"
2049
+ ],
2050
+ "categories": [
2051
+ "Brand Icons"
2052
+ ]
2053
+ },
2054
+ {
2055
+ "name": "GitHub",
2056
+ "id": "github",
2057
+ "unicode": "f09b",
2058
+ "created": 2,
2059
+ "url": "github.com/logos",
2060
+ "filter": [
2061
+ "octocat"
2062
+ ],
2063
+ "categories": [
2064
+ "Brand Icons"
2065
+ ]
2066
+ },
2067
+ {
2068
+ "name": "unlock",
2069
+ "id": "unlock",
2070
+ "unicode": "f09c",
2071
+ "created": 2,
2072
+ "filter": [
2073
+ "protect",
2074
+ "admin",
2075
+ "password",
2076
+ "lock"
2077
+ ],
2078
+ "categories": [
2079
+ "Web Application Icons"
2080
+ ]
2081
+ },
2082
+ {
2083
+ "name": "credit-card",
2084
+ "id": "credit-card",
2085
+ "unicode": "f09d",
2086
+ "created": 2,
2087
+ "filter": [
2088
+ "money",
2089
+ "buy",
2090
+ "debit",
2091
+ "checkout",
2092
+ "purchase",
2093
+ "payment"
2094
+ ],
2095
+ "categories": [
2096
+ "Web Application Icons",
2097
+ "Payment Icons"
2098
+ ]
2099
+ },
2100
+ {
2101
+ "name": "rss",
2102
+ "id": "rss",
2103
+ "unicode": "f09e",
2104
+ "created": 2,
2105
+ "filter": [
2106
+ "blog"
2107
+ ],
2108
+ "aliases": [
2109
+ "feed"
2110
+ ],
2111
+ "categories": [
2112
+ "Web Application Icons"
2113
+ ]
2114
+ },
2115
+ {
2116
+ "name": "HDD",
2117
+ "id": "hdd-o",
2118
+ "unicode": "f0a0",
2119
+ "created": 2,
2120
+ "filter": [
2121
+ "harddrive",
2122
+ "hard drive",
2123
+ "storage",
2124
+ "save"
2125
+ ],
2126
+ "categories": [
2127
+ "Web Application Icons"
2128
+ ]
2129
+ },
2130
+ {
2131
+ "name": "bullhorn",
2132
+ "id": "bullhorn",
2133
+ "unicode": "f0a1",
2134
+ "created": 2,
2135
+ "filter": [
2136
+ "announcement",
2137
+ "share",
2138
+ "broadcast",
2139
+ "louder",
2140
+ "megaphone"
2141
+ ],
2142
+ "categories": [
2143
+ "Web Application Icons"
2144
+ ]
2145
+ },
2146
+ {
2147
+ "name": "bell",
2148
+ "id": "bell",
2149
+ "unicode": "f0f3",
2150
+ "created": 2,
2151
+ "filter": [
2152
+ "alert",
2153
+ "reminder",
2154
+ "notification"
2155
+ ],
2156
+ "categories": [
2157
+ "Web Application Icons"
2158
+ ]
2159
+ },
2160
+ {
2161
+ "name": "certificate",
2162
+ "id": "certificate",
2163
+ "unicode": "f0a3",
2164
+ "created": 2,
2165
+ "filter": [
2166
+ "badge",
2167
+ "star"
2168
+ ],
2169
+ "categories": [
2170
+ "Web Application Icons"
2171
+ ]
2172
+ },
2173
+ {
2174
+ "name": "Hand Outlined Right",
2175
+ "id": "hand-o-right",
2176
+ "unicode": "f0a4",
2177
+ "created": 2,
2178
+ "filter": [
2179
+ "point",
2180
+ "right",
2181
+ "next",
2182
+ "forward",
2183
+ "finger"
2184
+ ],
2185
+ "categories": [
2186
+ "Directional Icons",
2187
+ "Hand Icons"
2188
+ ]
2189
+ },
2190
+ {
2191
+ "name": "Hand Outlined Left",
2192
+ "id": "hand-o-left",
2193
+ "unicode": "f0a5",
2194
+ "created": 2,
2195
+ "filter": [
2196
+ "point",
2197
+ "left",
2198
+ "previous",
2199
+ "back",
2200
+ "finger"
2201
+ ],
2202
+ "categories": [
2203
+ "Directional Icons",
2204
+ "Hand Icons"
2205
+ ]
2206
+ },
2207
+ {
2208
+ "name": "Hand Outlined Up",
2209
+ "id": "hand-o-up",
2210
+ "unicode": "f0a6",
2211
+ "created": 2,
2212
+ "filter": [
2213
+ "point",
2214
+ "finger"
2215
+ ],
2216
+ "categories": [
2217
+ "Directional Icons",
2218
+ "Hand Icons"
2219
+ ]
2220
+ },
2221
+ {
2222
+ "name": "Hand Outlined Down",
2223
+ "id": "hand-o-down",
2224
+ "unicode": "f0a7",
2225
+ "created": 2,
2226
+ "filter": [
2227
+ "point",
2228
+ "finger"
2229
+ ],
2230
+ "categories": [
2231
+ "Directional Icons",
2232
+ "Hand Icons"
2233
+ ]
2234
+ },
2235
+ {
2236
+ "name": "Arrow Circle Left",
2237
+ "id": "arrow-circle-left",
2238
+ "unicode": "f0a8",
2239
+ "created": 2,
2240
+ "filter": [
2241
+ "previous",
2242
+ "back"
2243
+ ],
2244
+ "categories": [
2245
+ "Directional Icons"
2246
+ ]
2247
+ },
2248
+ {
2249
+ "name": "Arrow Circle Right",
2250
+ "id": "arrow-circle-right",
2251
+ "unicode": "f0a9",
2252
+ "created": 2,
2253
+ "filter": [
2254
+ "next",
2255
+ "forward"
2256
+ ],
2257
+ "categories": [
2258
+ "Directional Icons"
2259
+ ]
2260
+ },
2261
+ {
2262
+ "name": "Arrow Circle Up",
2263
+ "id": "arrow-circle-up",
2264
+ "unicode": "f0aa",
2265
+ "created": 2,
2266
+ "categories": [
2267
+ "Directional Icons"
2268
+ ]
2269
+ },
2270
+ {
2271
+ "name": "Arrow Circle Down",
2272
+ "id": "arrow-circle-down",
2273
+ "unicode": "f0ab",
2274
+ "created": 2,
2275
+ "filter": [
2276
+ "download"
2277
+ ],
2278
+ "categories": [
2279
+ "Directional Icons"
2280
+ ]
2281
+ },
2282
+ {
2283
+ "name": "Globe",
2284
+ "id": "globe",
2285
+ "unicode": "f0ac",
2286
+ "created": 2,
2287
+ "filter": [
2288
+ "world",
2289
+ "planet",
2290
+ "map",
2291
+ "place",
2292
+ "travel",
2293
+ "earth",
2294
+ "global",
2295
+ "translate",
2296
+ "all",
2297
+ "language",
2298
+ "localize",
2299
+ "location",
2300
+ "coordinates",
2301
+ "country"
2302
+ ],
2303
+ "categories": [
2304
+ "Web Application Icons"
2305
+ ]
2306
+ },
2307
+ {
2308
+ "name": "Wrench",
2309
+ "id": "wrench",
2310
+ "unicode": "f0ad",
2311
+ "created": 2,
2312
+ "filter": [
2313
+ "settings",
2314
+ "fix",
2315
+ "update",
2316
+ "spanner"
2317
+ ],
2318
+ "categories": [
2319
+ "Web Application Icons"
2320
+ ]
2321
+ },
2322
+ {
2323
+ "name": "Tasks",
2324
+ "id": "tasks",
2325
+ "unicode": "f0ae",
2326
+ "created": 2,
2327
+ "filter": [
2328
+ "progress",
2329
+ "loading",
2330
+ "downloading",
2331
+ "downloads",
2332
+ "settings"
2333
+ ],
2334
+ "categories": [
2335
+ "Web Application Icons"
2336
+ ]
2337
+ },
2338
+ {
2339
+ "name": "Filter",
2340
+ "id": "filter",
2341
+ "unicode": "f0b0",
2342
+ "created": 2,
2343
+ "filter": [
2344
+ "funnel",
2345
+ "options"
2346
+ ],
2347
+ "categories": [
2348
+ "Web Application Icons"
2349
+ ]
2350
+ },
2351
+ {
2352
+ "name": "Briefcase",
2353
+ "id": "briefcase",
2354
+ "unicode": "f0b1",
2355
+ "created": 2,
2356
+ "filter": [
2357
+ "work",
2358
+ "business",
2359
+ "office",
2360
+ "luggage",
2361
+ "bag"
2362
+ ],
2363
+ "categories": [
2364
+ "Web Application Icons"
2365
+ ]
2366
+ },
2367
+ {
2368
+ "name": "Arrows Alt",
2369
+ "id": "arrows-alt",
2370
+ "unicode": "f0b2",
2371
+ "created": 2,
2372
+ "filter": [
2373
+ "expand",
2374
+ "enlarge",
2375
+ "fullscreen",
2376
+ "bigger",
2377
+ "move",
2378
+ "reorder",
2379
+ "resize",
2380
+ "arrow"
2381
+ ],
2382
+ "categories": [
2383
+ "Video Player Icons",
2384
+ "Directional Icons"
2385
+ ]
2386
+ },
2387
+ {
2388
+ "name": "Users",
2389
+ "id": "users",
2390
+ "unicode": "f0c0",
2391
+ "created": 2,
2392
+ "filter": [
2393
+ "people",
2394
+ "profiles",
2395
+ "persons"
2396
+ ],
2397
+ "aliases": [
2398
+ "group"
2399
+ ],
2400
+ "categories": [
2401
+ "Web Application Icons"
2402
+ ]
2403
+ },
2404
+ {
2405
+ "name": "Link",
2406
+ "id": "link",
2407
+ "unicode": "f0c1",
2408
+ "created": 2,
2409
+ "filter": [
2410
+ "chain"
2411
+ ],
2412
+ "aliases": [
2413
+ "chain"
2414
+ ],
2415
+ "categories": [
2416
+ "Text Editor Icons"
2417
+ ]
2418
+ },
2419
+ {
2420
+ "name": "Cloud",
2421
+ "id": "cloud",
2422
+ "filter": [
2423
+ "save"
2424
+ ],
2425
+ "unicode": "f0c2",
2426
+ "created": 2,
2427
+ "categories": [
2428
+ "Web Application Icons"
2429
+ ]
2430
+ },
2431
+ {
2432
+ "name": "Flask",
2433
+ "id": "flask",
2434
+ "unicode": "f0c3",
2435
+ "created": 2,
2436
+ "filter": [
2437
+ "science",
2438
+ "beaker",
2439
+ "experimental",
2440
+ "labs"
2441
+ ],
2442
+ "categories": [
2443
+ "Web Application Icons"
2444
+ ]
2445
+ },
2446
+ {
2447
+ "name": "Scissors",
2448
+ "id": "scissors",
2449
+ "unicode": "f0c4",
2450
+ "created": 2,
2451
+ "aliases": [
2452
+ "cut"
2453
+ ],
2454
+ "categories": [
2455
+ "Text Editor Icons"
2456
+ ]
2457
+ },
2458
+ {
2459
+ "name": "Files Outlined",
2460
+ "id": "files-o",
2461
+ "unicode": "f0c5",
2462
+ "created": 2,
2463
+ "filter": [
2464
+ "duplicate",
2465
+ "clone",
2466
+ "copy"
2467
+ ],
2468
+ "aliases": [
2469
+ "copy"
2470
+ ],
2471
+ "categories": [
2472
+ "Text Editor Icons"
2473
+ ]
2474
+ },
2475
+ {
2476
+ "name": "Paperclip",
2477
+ "id": "paperclip",
2478
+ "unicode": "f0c6",
2479
+ "created": 2,
2480
+ "filter": [
2481
+ "attachment"
2482
+ ],
2483
+ "categories": [
2484
+ "Text Editor Icons"
2485
+ ]
2486
+ },
2487
+ {
2488
+ "name": "Floppy Outlined",
2489
+ "id": "floppy-o",
2490
+ "unicode": "f0c7",
2491
+ "created": 2,
2492
+ "aliases": [
2493
+ "save"
2494
+ ],
2495
+ "categories": [
2496
+ "Text Editor Icons"
2497
+ ]
2498
+ },
2499
+ {
2500
+ "name": "Square",
2501
+ "id": "square",
2502
+ "unicode": "f0c8",
2503
+ "created": 2,
2504
+ "filter": [
2505
+ "block",
2506
+ "box"
2507
+ ],
2508
+ "categories": [
2509
+ "Web Application Icons",
2510
+ "Form Control Icons"
2511
+ ]
2512
+ },
2513
+ {
2514
+ "name": "Bars",
2515
+ "id": "bars",
2516
+ "unicode": "f0c9",
2517
+ "created": 2,
2518
+ "aliases": [
2519
+ "navicon",
2520
+ "reorder"
2521
+ ],
2522
+ "filter": [
2523
+ "menu",
2524
+ "drag",
2525
+ "reorder",
2526
+ "settings",
2527
+ "list",
2528
+ "ul",
2529
+ "ol",
2530
+ "checklist",
2531
+ "todo",
2532
+ "list",
2533
+ "hamburger"
2534
+ ],
2535
+ "categories": [
2536
+ "Web Application Icons"
2537
+ ]
2538
+ },
2539
+ {
2540
+ "name": "list-ul",
2541
+ "id": "list-ul",
2542
+ "unicode": "f0ca",
2543
+ "created": 2,
2544
+ "filter": [
2545
+ "ul",
2546
+ "ol",
2547
+ "checklist",
2548
+ "todo",
2549
+ "list"
2550
+ ],
2551
+ "categories": [
2552
+ "Text Editor Icons"
2553
+ ]
2554
+ },
2555
+ {
2556
+ "name": "list-ol",
2557
+ "id": "list-ol",
2558
+ "unicode": "f0cb",
2559
+ "created": 2,
2560
+ "filter": [
2561
+ "ul",
2562
+ "ol",
2563
+ "checklist",
2564
+ "list",
2565
+ "todo",
2566
+ "list",
2567
+ "numbers"
2568
+ ],
2569
+ "categories": [
2570
+ "Text Editor Icons"
2571
+ ]
2572
+ },
2573
+ {
2574
+ "name": "Strikethrough",
2575
+ "id": "strikethrough",
2576
+ "unicode": "f0cc",
2577
+ "created": 2,
2578
+ "categories": [
2579
+ "Text Editor Icons"
2580
+ ]
2581
+ },
2582
+ {
2583
+ "name": "Underline",
2584
+ "id": "underline",
2585
+ "unicode": "f0cd",
2586
+ "created": 2,
2587
+ "categories": [
2588
+ "Text Editor Icons"
2589
+ ]
2590
+ },
2591
+ {
2592
+ "name": "table",
2593
+ "id": "table",
2594
+ "unicode": "f0ce",
2595
+ "created": 2,
2596
+ "filter": [
2597
+ "data",
2598
+ "excel",
2599
+ "spreadsheet"
2600
+ ],
2601
+ "categories": [
2602
+ "Text Editor Icons"
2603
+ ]
2604
+ },
2605
+ {
2606
+ "name": "magic",
2607
+ "id": "magic",
2608
+ "unicode": "f0d0",
2609
+ "created": 2,
2610
+ "filter": [
2611
+ "wizard",
2612
+ "automatic",
2613
+ "autocomplete"
2614
+ ],
2615
+ "categories": [
2616
+ "Web Application Icons"
2617
+ ]
2618
+ },
2619
+ {
2620
+ "name": "truck",
2621
+ "id": "truck",
2622
+ "unicode": "f0d1",
2623
+ "created": 2,
2624
+ "filter": [
2625
+ "shipping"
2626
+ ],
2627
+ "categories": [
2628
+ "Web Application Icons",
2629
+ "Transportation Icons"
2630
+ ]
2631
+ },
2632
+ {
2633
+ "name": "Pinterest",
2634
+ "id": "pinterest",
2635
+ "unicode": "f0d2",
2636
+ "created": 2,
2637
+ "categories": [
2638
+ "Brand Icons"
2639
+ ]
2640
+ },
2641
+ {
2642
+ "name": "Pinterest Square",
2643
+ "id": "pinterest-square",
2644
+ "unicode": "f0d3",
2645
+ "created": 2,
2646
+ "categories": [
2647
+ "Brand Icons"
2648
+ ]
2649
+ },
2650
+ {
2651
+ "name": "Google Plus Square",
2652
+ "id": "google-plus-square",
2653
+ "unicode": "f0d4",
2654
+ "created": 2,
2655
+ "filter": [
2656
+ "social network"
2657
+ ],
2658
+ "categories": [
2659
+ "Brand Icons"
2660
+ ]
2661
+ },
2662
+ {
2663
+ "name": "Google Plus",
2664
+ "id": "google-plus",
2665
+ "unicode": "f0d5",
2666
+ "created": 2,
2667
+ "filter": [
2668
+ "social network"
2669
+ ],
2670
+ "categories": [
2671
+ "Brand Icons"
2672
+ ]
2673
+ },
2674
+ {
2675
+ "name": "Money",
2676
+ "id": "money",
2677
+ "unicode": "f0d6",
2678
+ "created": 2,
2679
+ "filter": [
2680
+ "cash",
2681
+ "money",
2682
+ "buy",
2683
+ "checkout",
2684
+ "purchase",
2685
+ "payment"
2686
+ ],
2687
+ "categories": [
2688
+ "Web Application Icons",
2689
+ "Currency Icons"
2690
+ ]
2691
+ },
2692
+ {
2693
+ "name": "Caret Down",
2694
+ "id": "caret-down",
2695
+ "unicode": "f0d7",
2696
+ "created": 2,
2697
+ "filter": [
2698
+ "more",
2699
+ "dropdown",
2700
+ "menu",
2701
+ "triangle down",
2702
+ "arrow"
2703
+ ],
2704
+ "categories": [
2705
+ "Directional Icons"
2706
+ ]
2707
+ },
2708
+ {
2709
+ "name": "Caret Up",
2710
+ "id": "caret-up",
2711
+ "unicode": "f0d8",
2712
+ "created": 2,
2713
+ "filter": [
2714
+ "triangle up",
2715
+ "arrow"
2716
+ ],
2717
+ "categories": [
2718
+ "Directional Icons"
2719
+ ]
2720
+ },
2721
+ {
2722
+ "name": "Caret Left",
2723
+ "id": "caret-left",
2724
+ "unicode": "f0d9",
2725
+ "created": 2,
2726
+ "filter": [
2727
+ "previous",
2728
+ "back",
2729
+ "triangle left",
2730
+ "arrow"
2731
+ ],
2732
+ "categories": [
2733
+ "Directional Icons"
2734
+ ]
2735
+ },
2736
+ {
2737
+ "name": "Caret Right",
2738
+ "id": "caret-right",
2739
+ "unicode": "f0da",
2740
+ "created": 2,
2741
+ "filter": [
2742
+ "next",
2743
+ "forward",
2744
+ "triangle right",
2745
+ "arrow"
2746
+ ],
2747
+ "categories": [
2748
+ "Directional Icons"
2749
+ ]
2750
+ },
2751
+ {
2752
+ "name": "Columns",
2753
+ "id": "columns",
2754
+ "unicode": "f0db",
2755
+ "created": 2,
2756
+ "filter": [
2757
+ "split",
2758
+ "panes"
2759
+ ],
2760
+ "categories": [
2761
+ "Text Editor Icons"
2762
+ ]
2763
+ },
2764
+ {
2765
+ "name": "Sort",
2766
+ "id": "sort",
2767
+ "unicode": "f0dc",
2768
+ "created": 2,
2769
+ "filter": [
2770
+ "order"
2771
+ ],
2772
+ "aliases": [
2773
+ "unsorted"
2774
+ ],
2775
+ "categories": [
2776
+ "Web Application Icons"
2777
+ ]
2778
+ },
2779
+ {
2780
+ "name": "Sort Descending",
2781
+ "id": "sort-desc",
2782
+ "unicode": "f0dd",
2783
+ "created": 2,
2784
+ "filter": [
2785
+ "dropdown",
2786
+ "more",
2787
+ "menu",
2788
+ "arrow"
2789
+ ],
2790
+ "aliases": [
2791
+ "sort-down"
2792
+ ],
2793
+ "categories": [
2794
+ "Web Application Icons"
2795
+ ]
2796
+ },
2797
+ {
2798
+ "name": "Sort Ascending",
2799
+ "id": "sort-asc",
2800
+ "unicode": "f0de",
2801
+ "created": 2,
2802
+ "aliases": [
2803
+ "sort-up"
2804
+ ],
2805
+ "filter": [
2806
+ "arrow"
2807
+ ],
2808
+ "categories": [
2809
+ "Web Application Icons"
2810
+ ]
2811
+ },
2812
+ {
2813
+ "name": "Envelope",
2814
+ "id": "envelope",
2815
+ "unicode": "f0e0",
2816
+ "created": 2,
2817
+ "filter": [
2818
+ "email",
2819
+ "e-mail",
2820
+ "letter",
2821
+ "support",
2822
+ "mail",
2823
+ "message",
2824
+ "notification"
2825
+ ],
2826
+ "categories": [
2827
+ "Web Application Icons"
2828
+ ]
2829
+ },
2830
+ {
2831
+ "name": "LinkedIn",
2832
+ "id": "linkedin",
2833
+ "unicode": "f0e1",
2834
+ "created": 2,
2835
+ "categories": [
2836
+ "Brand Icons"
2837
+ ]
2838
+ },
2839
+ {
2840
+ "name": "Undo",
2841
+ "id": "undo",
2842
+ "unicode": "f0e2",
2843
+ "created": 2,
2844
+ "filter": [
2845
+ "back"
2846
+ ],
2847
+ "aliases": [
2848
+ "rotate-left"
2849
+ ],
2850
+ "categories": [
2851
+ "Text Editor Icons"
2852
+ ]
2853
+ },
2854
+ {
2855
+ "name": "Gavel",
2856
+ "id": "gavel",
2857
+ "unicode": "f0e3",
2858
+ "created": 2,
2859
+ "filter": [
2860
+ "judge",
2861
+ "lawyer",
2862
+ "opinion"
2863
+ ],
2864
+ "aliases": [
2865
+ "legal"
2866
+ ],
2867
+ "categories": [
2868
+ "Web Application Icons"
2869
+ ]
2870
+ },
2871
+ {
2872
+ "name": "Tachometer",
2873
+ "id": "tachometer",
2874
+ "unicode": "f0e4",
2875
+ "created": 2,
2876
+ "filter": [
2877
+ "speedometer",
2878
+ "fast"
2879
+ ],
2880
+ "aliases": [
2881
+ "dashboard"
2882
+ ],
2883
+ "categories": [
2884
+ "Web Application Icons"
2885
+ ]
2886
+ },
2887
+ {
2888
+ "name": "comment-o",
2889
+ "id": "comment-o",
2890
+ "unicode": "f0e5",
2891
+ "created": 2,
2892
+ "filter": [
2893
+ "speech",
2894
+ "notification",
2895
+ "note",
2896
+ "chat",
2897
+ "bubble",
2898
+ "feedback",
2899
+ "message",
2900
+ "texting",
2901
+ "sms",
2902
+ "conversation"
2903
+ ],
2904
+ "categories": [
2905
+ "Web Application Icons"
2906
+ ]
2907
+ },
2908
+ {
2909
+ "name": "comments-o",
2910
+ "id": "comments-o",
2911
+ "unicode": "f0e6",
2912
+ "created": 2,
2913
+ "filter": [
2914
+ "speech",
2915
+ "notification",
2916
+ "note",
2917
+ "chat",
2918
+ "bubble",
2919
+ "feedback",
2920
+ "message",
2921
+ "texting",
2922
+ "sms",
2923
+ "conversation"
2924
+ ],
2925
+ "categories": [
2926
+ "Web Application Icons"
2927
+ ]
2928
+ },
2929
+ {
2930
+ "name": "Lightning Bolt",
2931
+ "id": "bolt",
2932
+ "unicode": "f0e7",
2933
+ "created": 2,
2934
+ "filter": [
2935
+ "lightning",
2936
+ "weather"
2937
+ ],
2938
+ "aliases": [
2939
+ "flash"
2940
+ ],
2941
+ "categories": [
2942
+ "Web Application Icons"
2943
+ ]
2944
+ },
2945
+ {
2946
+ "name": "Sitemap",
2947
+ "id": "sitemap",
2948
+ "unicode": "f0e8",
2949
+ "created": 2,
2950
+ "filter": [
2951
+ "directory",
2952
+ "hierarchy",
2953
+ "organization"
2954
+ ],
2955
+ "categories": [
2956
+ "Web Application Icons"
2957
+ ]
2958
+ },
2959
+ {
2960
+ "name": "Umbrella",
2961
+ "id": "umbrella",
2962
+ "unicode": "f0e9",
2963
+ "created": 2,
2964
+ "categories": [
2965
+ "Web Application Icons"
2966
+ ]
2967
+ },
2968
+ {
2969
+ "name": "Clipboard",
2970
+ "id": "clipboard",
2971
+ "unicode": "f0ea",
2972
+ "created": 2,
2973
+ "filter": [
2974
+ "copy"
2975
+ ],
2976
+ "aliases": [
2977
+ "paste"
2978
+ ],
2979
+ "categories": [
2980
+ "Text Editor Icons"
2981
+ ]
2982
+ },
2983
+ {
2984
+ "name": "Lightbulb Outlined",
2985
+ "id": "lightbulb-o",
2986
+ "unicode": "f0eb",
2987
+ "created": 3,
2988
+ "filter": [
2989
+ "idea",
2990
+ "inspiration"
2991
+ ],
2992
+ "categories": [
2993
+ "Web Application Icons"
2994
+ ]
2995
+ },
2996
+ {
2997
+ "name": "Exchange",
2998
+ "id": "exchange",
2999
+ "unicode": "f0ec",
3000
+ "created": 3,
3001
+ "filter": [
3002
+ "transfer",
3003
+ "arrows",
3004
+ "arrow"
3005
+ ],
3006
+ "categories": [
3007
+ "Web Application Icons",
3008
+ "Directional Icons"
3009
+ ]
3010
+ },
3011
+ {
3012
+ "name": "Cloud Download",
3013
+ "id": "cloud-download",
3014
+ "unicode": "f0ed",
3015
+ "created": 3,
3016
+ "filter": [
3017
+ "import"
3018
+ ],
3019
+ "categories": [
3020
+ "Web Application Icons"
3021
+ ]
3022
+ },
3023
+ {
3024
+ "name": "Cloud Upload",
3025
+ "id": "cloud-upload",
3026
+ "unicode": "f0ee",
3027
+ "created": 3,
3028
+ "filter": [
3029
+ "import"
3030
+ ],
3031
+ "categories": [
3032
+ "Web Application Icons"
3033
+ ]
3034
+ },
3035
+ {
3036
+ "name": "user-md",
3037
+ "id": "user-md",
3038
+ "unicode": "f0f0",
3039
+ "created": 2,
3040
+ "filter": [
3041
+ "doctor",
3042
+ "profile",
3043
+ "medical",
3044
+ "nurse"
3045
+ ],
3046
+ "categories": [
3047
+ "Medical Icons"
3048
+ ]
3049
+ },
3050
+ {
3051
+ "name": "Stethoscope",
3052
+ "id": "stethoscope",
3053
+ "unicode": "f0f1",
3054
+ "created": 3,
3055
+ "categories": [
3056
+ "Medical Icons"
3057
+ ]
3058
+ },
3059
+ {
3060
+ "name": "Suitcase",
3061
+ "id": "suitcase",
3062
+ "unicode": "f0f2",
3063
+ "created": 3,
3064
+ "filter": [
3065
+ "trip",
3066
+ "luggage",
3067
+ "travel",
3068
+ "move",
3069
+ "baggage"
3070
+ ],
3071
+ "categories": [
3072
+ "Web Application Icons"
3073
+ ]
3074
+ },
3075
+ {
3076
+ "name": "Bell Outlined",
3077
+ "id": "bell-o",
3078
+ "unicode": "f0a2",
3079
+ "created": 3,
3080
+ "filter": [
3081
+ "alert",
3082
+ "reminder",
3083
+ "notification"
3084
+ ],
3085
+ "categories": [
3086
+ "Web Application Icons"
3087
+ ]
3088
+ },
3089
+ {
3090
+ "name": "Coffee",
3091
+ "id": "coffee",
3092
+ "unicode": "f0f4",
3093
+ "created": 3,
3094
+ "filter": [
3095
+ "morning",
3096
+ "mug",
3097
+ "breakfast",
3098
+ "tea",
3099
+ "drink",
3100
+ "cafe"
3101
+ ],
3102
+ "categories": [
3103
+ "Web Application Icons"
3104
+ ]
3105
+ },
3106
+ {
3107
+ "name": "Cutlery",
3108
+ "id": "cutlery",
3109
+ "unicode": "f0f5",
3110
+ "created": 3,
3111
+ "filter": [
3112
+ "food",
3113
+ "restaurant",
3114
+ "spoon",
3115
+ "knife",
3116
+ "dinner",
3117
+ "eat"
3118
+ ],
3119
+ "categories": [
3120
+ "Web Application Icons"
3121
+ ]
3122
+ },
3123
+ {
3124
+ "name": "File Text Outlined",
3125
+ "id": "file-text-o",
3126
+ "unicode": "f0f6",
3127
+ "created": 3,
3128
+ "filter": [
3129
+ "new",
3130
+ "page",
3131
+ "pdf",
3132
+ "document"
3133
+ ],
3134
+ "categories": [
3135
+ "Text Editor Icons",
3136
+ "File Type Icons"
3137
+ ]
3138
+ },
3139
+ {
3140
+ "name": "Building Outlined",
3141
+ "id": "building-o",
3142
+ "unicode": "f0f7",
3143
+ "created": 3,
3144
+ "filter": [
3145
+ "work",
3146
+ "business",
3147
+ "apartment",
3148
+ "office",
3149
+ "company"
3150
+ ],
3151
+ "categories": [
3152
+ "Web Application Icons"
3153
+ ]
3154
+ },
3155
+ {
3156
+ "name": "hospital Outlined",
3157
+ "id": "hospital-o",
3158
+ "unicode": "f0f8",
3159
+ "created": 3,
3160
+ "filter": [
3161
+ "building"
3162
+ ],
3163
+ "categories": [
3164
+ "Medical Icons"
3165
+ ]
3166
+ },
3167
+ {
3168
+ "name": "ambulance",
3169
+ "id": "ambulance",
3170
+ "unicode": "f0f9",
3171
+ "created": 3,
3172
+ "filter": [
3173
+ "vehicle",
3174
+ "support",
3175
+ "help"
3176
+ ],
3177
+ "categories": [
3178
+ "Medical Icons",
3179
+ "Transportation Icons"
3180
+ ]
3181
+ },
3182
+ {
3183
+ "name": "medkit",
3184
+ "id": "medkit",
3185
+ "unicode": "f0fa",
3186
+ "created": 3,
3187
+ "filter": [
3188
+ "first aid",
3189
+ "firstaid",
3190
+ "help",
3191
+ "support",
3192
+ "health"
3193
+ ],
3194
+ "categories": [
3195
+ "Medical Icons"
3196
+ ]
3197
+ },
3198
+ {
3199
+ "name": "fighter-jet",
3200
+ "id": "fighter-jet",
3201
+ "unicode": "f0fb",
3202
+ "created": 3,
3203
+ "filter": [
3204
+ "fly",
3205
+ "plane",
3206
+ "airplane",
3207
+ "quick",
3208
+ "fast",
3209
+ "travel"
3210
+ ],
3211
+ "categories": [
3212
+ "Web Application Icons",
3213
+ "Transportation Icons"
3214
+ ]
3215
+ },
3216
+ {
3217
+ "name": "beer",
3218
+ "id": "beer",
3219
+ "unicode": "f0fc",
3220
+ "created": 3,
3221
+ "filter": [
3222
+ "alcohol",
3223
+ "stein",
3224
+ "drink",
3225
+ "mug",
3226
+ "bar",
3227
+ "liquor"
3228
+ ],
3229
+ "categories": [
3230
+ "Web Application Icons"
3231
+ ]
3232
+ },
3233
+ {
3234
+ "name": "H Square",
3235
+ "id": "h-square",
3236
+ "unicode": "f0fd",
3237
+ "created": 3,
3238
+ "filter": [
3239
+ "hospital",
3240
+ "hotel"
3241
+ ],
3242
+ "categories": [
3243
+ "Medical Icons"
3244
+ ]
3245
+ },
3246
+ {
3247
+ "name": "Plus Square",
3248
+ "id": "plus-square",
3249
+ "unicode": "f0fe",
3250
+ "created": 3,
3251
+ "filter": [
3252
+ "add",
3253
+ "new",
3254
+ "create",
3255
+ "expand"
3256
+ ],
3257
+ "categories": [
3258
+ "Medical Icons",
3259
+ "Web Application Icons",
3260
+ "Form Control Icons"
3261
+ ]
3262
+ },
3263
+ {
3264
+ "name": "Angle Double Left",
3265
+ "id": "angle-double-left",
3266
+ "unicode": "f100",
3267
+ "created": 3,
3268
+ "filter": [
3269
+ "laquo",
3270
+ "quote",
3271
+ "previous",
3272
+ "back",
3273
+ "arrows"
3274
+ ],
3275
+ "categories": [
3276
+ "Directional Icons"
3277
+ ]
3278
+ },
3279
+ {
3280
+ "name": "Angle Double Right",
3281
+ "id": "angle-double-right",
3282
+ "unicode": "f101",
3283
+ "created": 3,
3284
+ "filter": [
3285
+ "raquo",
3286
+ "quote",
3287
+ "next",
3288
+ "forward",
3289
+ "arrows"
3290
+ ],
3291
+ "categories": [
3292
+ "Directional Icons"
3293
+ ]
3294
+ },
3295
+ {
3296
+ "name": "Angle Double Up",
3297
+ "id": "angle-double-up",
3298
+ "unicode": "f102",
3299
+ "created": 3,
3300
+ "filter": [
3301
+ "arrows"
3302
+ ],
3303
+ "categories": [
3304
+ "Directional Icons"
3305
+ ]
3306
+ },
3307
+ {
3308
+ "name": "Angle Double Down",
3309
+ "id": "angle-double-down",
3310
+ "unicode": "f103",
3311
+ "created": 3,
3312
+ "filter": [
3313
+ "arrows"
3314
+ ],
3315
+ "categories": [
3316
+ "Directional Icons"
3317
+ ]
3318
+ },
3319
+ {
3320
+ "name": "angle-left",
3321
+ "id": "angle-left",
3322
+ "unicode": "f104",
3323
+ "created": 3,
3324
+ "filter": [
3325
+ "previous",
3326
+ "back",
3327
+ "arrow"
3328
+ ],
3329
+ "categories": [
3330
+ "Directional Icons"
3331
+ ]
3332
+ },
3333
+ {
3334
+ "name": "angle-right",
3335
+ "id": "angle-right",
3336
+ "unicode": "f105",
3337
+ "created": 3,
3338
+ "filter": [
3339
+ "next",
3340
+ "forward",
3341
+ "arrow"
3342
+ ],
3343
+ "categories": [
3344
+ "Directional Icons"
3345
+ ]
3346
+ },
3347
+ {
3348
+ "name": "angle-up",
3349
+ "id": "angle-up",
3350
+ "unicode": "f106",
3351
+ "created": 3,
3352
+ "filter": [
3353
+ "arrow"
3354
+ ],
3355
+ "categories": [
3356
+ "Directional Icons"
3357
+ ]
3358
+ },
3359
+ {
3360
+ "name": "angle-down",
3361
+ "id": "angle-down",
3362
+ "unicode": "f107",
3363
+ "created": 3,
3364
+ "filter": [
3365
+ "arrow"
3366
+ ],
3367
+ "categories": [
3368
+ "Directional Icons"
3369
+ ]
3370
+ },
3371
+ {
3372
+ "name": "Desktop",
3373
+ "id": "desktop",
3374
+ "unicode": "f108",
3375
+ "created": 3,
3376
+ "filter": [
3377
+ "monitor",
3378
+ "screen",
3379
+ "desktop",
3380
+ "computer",
3381
+ "demo",
3382
+ "device"
3383
+ ],
3384
+ "categories": [
3385
+ "Web Application Icons"
3386
+ ]
3387
+ },
3388
+ {
3389
+ "name": "Laptop",
3390
+ "id": "laptop",
3391
+ "unicode": "f109",
3392
+ "created": 3,
3393
+ "filter": [
3394
+ "demo",
3395
+ "computer",
3396
+ "device"
3397
+ ],
3398
+ "categories": [
3399
+ "Web Application Icons"
3400
+ ]
3401
+ },
3402
+ {
3403
+ "name": "tablet",
3404
+ "id": "tablet",
3405
+ "unicode": "f10a",
3406
+ "created": 3,
3407
+ "filter": [
3408
+ "ipad",
3409
+ "device"
3410
+ ],
3411
+ "categories": [
3412
+ "Web Application Icons"
3413
+ ]
3414
+ },
3415
+ {
3416
+ "name": "Mobile Phone",
3417
+ "id": "mobile",
3418
+ "unicode": "f10b",
3419
+ "created": 3,
3420
+ "filter": [
3421
+ "cell phone",
3422
+ "cellphone",
3423
+ "text",
3424
+ "call",
3425
+ "iphone",
3426
+ "number",
3427
+ "telephone"
3428
+ ],
3429
+ "aliases": [
3430
+ "mobile-phone"
3431
+ ],
3432
+ "categories": [
3433
+ "Web Application Icons"
3434
+ ]
3435
+ },
3436
+ {
3437
+ "name": "Circle Outlined",
3438
+ "id": "circle-o",
3439
+ "unicode": "f10c",
3440
+ "created": 3,
3441
+ "categories": [
3442
+ "Web Application Icons",
3443
+ "Form Control Icons"
3444
+ ]
3445
+ },
3446
+ {
3447
+ "name": "quote-left",
3448
+ "id": "quote-left",
3449
+ "unicode": "f10d",
3450
+ "created": 3,
3451
+ "categories": [
3452
+ "Web Application Icons"
3453
+ ]
3454
+ },
3455
+ {
3456
+ "name": "quote-right",
3457
+ "id": "quote-right",
3458
+ "unicode": "f10e",
3459
+ "created": 3,
3460
+ "categories": [
3461
+ "Web Application Icons"
3462
+ ]
3463
+ },
3464
+ {
3465
+ "name": "Spinner",
3466
+ "id": "spinner",
3467
+ "unicode": "f110",
3468
+ "created": 3,
3469
+ "filter": [
3470
+ "loading",
3471
+ "progress"
3472
+ ],
3473
+ "categories": [
3474
+ "Web Application Icons",
3475
+ "Spinner Icons"
3476
+ ]
3477
+ },
3478
+ {
3479
+ "name": "Circle",
3480
+ "id": "circle",
3481
+ "unicode": "f111",
3482
+ "created": 3,
3483
+ "filter": [
3484
+ "dot",
3485
+ "notification"
3486
+ ],
3487
+ "categories": [
3488
+ "Web Application Icons",
3489
+ "Form Control Icons"
3490
+ ]
3491
+ },
3492
+ {
3493
+ "name": "Reply",
3494
+ "id": "reply",
3495
+ "unicode": "f112",
3496
+ "created": 3,
3497
+ "aliases": [
3498
+ "mail-reply"
3499
+ ],
3500
+ "categories": [
3501
+ "Web Application Icons"
3502
+ ]
3503
+ },
3504
+ {
3505
+ "name": "GitHub Alt",
3506
+ "id": "github-alt",
3507
+ "unicode": "f113",
3508
+ "created": 3,
3509
+ "url": "github.com/logos",
3510
+ "filter": [
3511
+ "octocat"
3512
+ ],
3513
+ "categories": [
3514
+ "Brand Icons"
3515
+ ]
3516
+ },
3517
+ {
3518
+ "name": "Folder Outlined",
3519
+ "id": "folder-o",
3520
+ "unicode": "f114",
3521
+ "created": 3,
3522
+ "categories": [
3523
+ "Web Application Icons"
3524
+ ]
3525
+ },
3526
+ {
3527
+ "name": "Folder Open Outlined",
3528
+ "id": "folder-open-o",
3529
+ "unicode": "f115",
3530
+ "created": 3,
3531
+ "categories": [
3532
+ "Web Application Icons"
3533
+ ]
3534
+ },
3535
+ {
3536
+ "name": "Smile Outlined",
3537
+ "id": "smile-o",
3538
+ "unicode": "f118",
3539
+ "created": 3.1,
3540
+ "filter": [
3541
+ "face",
3542
+ "emoticon",
3543
+ "happy",
3544
+ "approve",
3545
+ "satisfied",
3546
+ "rating"
3547
+ ],
3548
+ "categories": [
3549
+ "Web Application Icons"
3550
+ ]
3551
+ },
3552
+ {
3553
+ "name": "Frown Outlined",
3554
+ "id": "frown-o",
3555
+ "unicode": "f119",
3556
+ "created": 3.1,
3557
+ "filter": [
3558
+ "face",
3559
+ "emoticon",
3560
+ "sad",
3561
+ "disapprove",
3562
+ "rating"
3563
+ ],
3564
+ "categories": [
3565
+ "Web Application Icons"
3566
+ ]
3567
+ },
3568
+ {
3569
+ "name": "Meh Outlined",
3570
+ "id": "meh-o",
3571
+ "unicode": "f11a",
3572
+ "created": 3.1,
3573
+ "filter": [
3574
+ "face",
3575
+ "emoticon",
3576
+ "rating",
3577
+ "neutral"
3578
+ ],
3579
+ "categories": [
3580
+ "Web Application Icons"
3581
+ ]
3582
+ },
3583
+ {
3584
+ "name": "Gamepad",
3585
+ "id": "gamepad",
3586
+ "unicode": "f11b",
3587
+ "created": 3.1,
3588
+ "filter": [
3589
+ "controller"
3590
+ ],
3591
+ "categories": [
3592
+ "Web Application Icons"
3593
+ ]
3594
+ },
3595
+ {
3596
+ "name": "Keyboard Outlined",
3597
+ "id": "keyboard-o",
3598
+ "unicode": "f11c",
3599
+ "created": 3.1,
3600
+ "filter": [
3601
+ "type",
3602
+ "input"
3603
+ ],
3604
+ "categories": [
3605
+ "Web Application Icons"
3606
+ ]
3607
+ },
3608
+ {
3609
+ "name": "Flag Outlined",
3610
+ "id": "flag-o",
3611
+ "unicode": "f11d",
3612
+ "created": 3.1,
3613
+ "filter": [
3614
+ "report",
3615
+ "notification"
3616
+ ],
3617
+ "categories": [
3618
+ "Web Application Icons"
3619
+ ]
3620
+ },
3621
+ {
3622
+ "name": "flag-checkered",
3623
+ "id": "flag-checkered",
3624
+ "unicode": "f11e",
3625
+ "created": 3.1,
3626
+ "filter": [
3627
+ "report",
3628
+ "notification",
3629
+ "notify"
3630
+ ],
3631
+ "categories": [
3632
+ "Web Application Icons"
3633
+ ]
3634
+ },
3635
+ {
3636
+ "name": "Terminal",
3637
+ "id": "terminal",
3638
+ "unicode": "f120",
3639
+ "created": 3.1,
3640
+ "filter": [
3641
+ "command",
3642
+ "prompt",
3643
+ "code"
3644
+ ],
3645
+ "categories": [
3646
+ "Web Application Icons"
3647
+ ]
3648
+ },
3649
+ {
3650
+ "name": "Code",
3651
+ "id": "code",
3652
+ "unicode": "f121",
3653
+ "created": 3.1,
3654
+ "filter": [
3655
+ "html",
3656
+ "brackets"
3657
+ ],
3658
+ "categories": [
3659
+ "Web Application Icons"
3660
+ ]
3661
+ },
3662
+ {
3663
+ "name": "reply-all",
3664
+ "id": "reply-all",
3665
+ "unicode": "f122",
3666
+ "created": 3.1,
3667
+ "aliases": [
3668
+ "mail-reply-all"
3669
+ ],
3670
+ "categories": [
3671
+ "Web Application Icons"
3672
+ ]
3673
+ },
3674
+ {
3675
+ "name": "Star Half Outlined",
3676
+ "id": "star-half-o",
3677
+ "unicode": "f123",
3678
+ "created": 3.1,
3679
+ "filter": [
3680
+ "award",
3681
+ "achievement",
3682
+ "rating",
3683
+ "score"
3684
+ ],
3685
+ "aliases": [
3686
+ "star-half-empty",
3687
+ "star-half-full"
3688
+ ],
3689
+ "categories": [
3690
+ "Web Application Icons"
3691
+ ]
3692
+ },
3693
+ {
3694
+ "name": "location-arrow",
3695
+ "id": "location-arrow",
3696
+ "unicode": "f124",
3697
+ "created": 3.1,
3698
+ "filter": [
3699
+ "map",
3700
+ "coordinates",
3701
+ "location",
3702
+ "address",
3703
+ "place",
3704
+ "where"
3705
+ ],
3706
+ "categories": [
3707
+ "Web Application Icons"
3708
+ ]
3709
+ },
3710
+ {
3711
+ "name": "crop",
3712
+ "id": "crop",
3713
+ "unicode": "f125",
3714
+ "created": 3.1,
3715
+ "categories": [
3716
+ "Web Application Icons"
3717
+ ]
3718
+ },
3719
+ {
3720
+ "name": "code-fork",
3721
+ "id": "code-fork",
3722
+ "unicode": "f126",
3723
+ "created": 3.1,
3724
+ "filter": [
3725
+ "git",
3726
+ "fork",
3727
+ "vcs",
3728
+ "svn",
3729
+ "github",
3730
+ "rebase",
3731
+ "version",
3732
+ "merge"
3733
+ ],
3734
+ "categories": [
3735
+ "Web Application Icons"
3736
+ ]
3737
+ },
3738
+ {
3739
+ "name": "Chain Broken",
3740
+ "id": "chain-broken",
3741
+ "unicode": "f127",
3742
+ "created": 3.1,
3743
+ "filter": [
3744
+ "remove"
3745
+ ],
3746
+ "aliases": [
3747
+ "unlink"
3748
+ ],
3749
+ "categories": [
3750
+ "Text Editor Icons"
3751
+ ]
3752
+ },
3753
+ {
3754
+ "name": "Question",
3755
+ "id": "question",
3756
+ "unicode": "f128",
3757
+ "created": 3.1,
3758
+ "filter": [
3759
+ "help",
3760
+ "information",
3761
+ "unknown",
3762
+ "support"
3763
+ ],
3764
+ "categories": [
3765
+ "Web Application Icons"
3766
+ ]
3767
+ },
3768
+ {
3769
+ "name": "Info",
3770
+ "id": "info",
3771
+ "unicode": "f129",
3772
+ "created": 3.1,
3773
+ "filter": [
3774
+ "help",
3775
+ "information",
3776
+ "more",
3777
+ "details"
3778
+ ],
3779
+ "categories": [
3780
+ "Web Application Icons"
3781
+ ]
3782
+ },
3783
+ {
3784
+ "name": "exclamation",
3785
+ "id": "exclamation",
3786
+ "unicode": "f12a",
3787
+ "created": 3.1,
3788
+ "filter": [
3789
+ "warning",
3790
+ "error",
3791
+ "problem",
3792
+ "notification",
3793
+ "notify",
3794
+ "alert"
3795
+ ],
3796
+ "categories": [
3797
+ "Web Application Icons"
3798
+ ]
3799
+ },
3800
+ {
3801
+ "name": "superscript",
3802
+ "id": "superscript",
3803
+ "unicode": "f12b",
3804
+ "created": 3.1,
3805
+ "filter": [
3806
+ "exponential"
3807
+ ],
3808
+ "categories": [
3809
+ "Text Editor Icons"
3810
+ ]
3811
+ },
3812
+ {
3813
+ "name": "subscript",
3814
+ "id": "subscript",
3815
+ "unicode": "f12c",
3816
+ "created": 3.1,
3817
+ "categories": [
3818
+ "Text Editor Icons"
3819
+ ]
3820
+ },
3821
+ {
3822
+ "name": "eraser",
3823
+ "id": "eraser",
3824
+ "unicode": "f12d",
3825
+ "created": 3.1,
3826
+ "filter": [
3827
+ "remove",
3828
+ "delete"
3829
+ ],
3830
+ "categories": [
3831
+ "Text Editor Icons",
3832
+ "Web Application Icons"
3833
+ ]
3834
+ },
3835
+ {
3836
+ "name": "Puzzle Piece",
3837
+ "id": "puzzle-piece",
3838
+ "unicode": "f12e",
3839
+ "created": 3.1,
3840
+ "filter": [
3841
+ "addon",
3842
+ "add-on",
3843
+ "section"
3844
+ ],
3845
+ "categories": [
3846
+ "Web Application Icons"
3847
+ ]
3848
+ },
3849
+ {
3850
+ "name": "microphone",
3851
+ "id": "microphone",
3852
+ "unicode": "f130",
3853
+ "created": 3.1,
3854
+ "filter": [
3855
+ "record",
3856
+ "voice",
3857
+ "sound"
3858
+ ],
3859
+ "categories": [
3860
+ "Web Application Icons"
3861
+ ]
3862
+ },
3863
+ {
3864
+ "name": "Microphone Slash",
3865
+ "id": "microphone-slash",
3866
+ "unicode": "f131",
3867
+ "created": 3.1,
3868
+ "filter": [
3869
+ "record",
3870
+ "voice",
3871
+ "sound",
3872
+ "mute"
3873
+ ],
3874
+ "categories": [
3875
+ "Web Application Icons"
3876
+ ]
3877
+ },
3878
+ {
3879
+ "name": "shield",
3880
+ "id": "shield",
3881
+ "unicode": "f132",
3882
+ "created": 3.1,
3883
+ "filter": [
3884
+ "award",
3885
+ "achievement",
3886
+ "security",
3887
+ "winner"
3888
+ ],
3889
+ "categories": [
3890
+ "Web Application Icons"
3891
+ ]
3892
+ },
3893
+ {
3894
+ "name": "calendar-o",
3895
+ "id": "calendar-o",
3896
+ "unicode": "f133",
3897
+ "created": 3.1,
3898
+ "filter": [
3899
+ "date",
3900
+ "time",
3901
+ "when",
3902
+ "event"
3903
+ ],
3904
+ "categories": [
3905
+ "Web Application Icons"
3906
+ ]
3907
+ },
3908
+ {
3909
+ "name": "fire-extinguisher",
3910
+ "id": "fire-extinguisher",
3911
+ "unicode": "f134",
3912
+ "created": 3.1,
3913
+ "categories": [
3914
+ "Web Application Icons"
3915
+ ]
3916
+ },
3917
+ {
3918
+ "name": "rocket",
3919
+ "id": "rocket",
3920
+ "unicode": "f135",
3921
+ "created": 3.1,
3922
+ "filter": [
3923
+ "app"
3924
+ ],
3925
+ "categories": [
3926
+ "Web Application Icons",
3927
+ "Transportation Icons"
3928
+ ]
3929
+ },
3930
+ {
3931
+ "name": "MaxCDN",
3932
+ "id": "maxcdn",
3933
+ "unicode": "f136",
3934
+ "created": 3.1,
3935
+ "categories": [
3936
+ "Brand Icons"
3937
+ ]
3938
+ },
3939
+ {
3940
+ "name": "Chevron Circle Left",
3941
+ "id": "chevron-circle-left",
3942
+ "unicode": "f137",
3943
+ "created": 3.1,
3944
+ "filter": [
3945
+ "previous",
3946
+ "back",
3947
+ "arrow"
3948
+ ],
3949
+ "categories": [
3950
+ "Directional Icons"
3951
+ ]
3952
+ },
3953
+ {
3954
+ "name": "Chevron Circle Right",
3955
+ "id": "chevron-circle-right",
3956
+ "unicode": "f138",
3957
+ "created": 3.1,
3958
+ "filter": [
3959
+ "next",
3960
+ "forward",
3961
+ "arrow"
3962
+ ],
3963
+ "categories": [
3964
+ "Directional Icons"
3965
+ ]
3966
+ },
3967
+ {
3968
+ "name": "Chevron Circle Up",
3969
+ "id": "chevron-circle-up",
3970
+ "unicode": "f139",
3971
+ "created": 3.1,
3972
+ "filter": [
3973
+ "arrow"
3974
+ ],
3975
+ "categories": [
3976
+ "Directional Icons"
3977
+ ]
3978
+ },
3979
+ {
3980
+ "name": "Chevron Circle Down",
3981
+ "id": "chevron-circle-down",
3982
+ "unicode": "f13a",
3983
+ "created": 3.1,
3984
+ "filter": [
3985
+ "more",
3986
+ "dropdown",
3987
+ "menu",
3988
+ "arrow"
3989
+ ],
3990
+ "categories": [
3991
+ "Directional Icons"
3992
+ ]
3993
+ },
3994
+ {
3995
+ "name": "HTML 5 Logo",
3996
+ "id": "html5",
3997
+ "unicode": "f13b",
3998
+ "created": 3.1,
3999
+ "code": [
4000
+ "code",
4001
+ "html5"
4002
+ ],
4003
+ "categories": [
4004
+ "Brand Icons"
4005
+ ]
4006
+ },
4007
+ {
4008
+ "name": "CSS 3 Logo",
4009
+ "id": "css3",
4010
+ "unicode": "f13c",
4011
+ "created": 3.1,
4012
+ "filter": [
4013
+ "code"
4014
+ ],
4015
+ "categories": [
4016
+ "Brand Icons"
4017
+ ]
4018
+ },
4019
+ {
4020
+ "name": "Anchor",
4021
+ "id": "anchor",
4022
+ "unicode": "f13d",
4023
+ "created": 3.1,
4024
+ "filter": [
4025
+ "link"
4026
+ ],
4027
+ "categories": [
4028
+ "Web Application Icons"
4029
+ ]
4030
+ },
4031
+ {
4032
+ "name": "Unlock Alt",
4033
+ "id": "unlock-alt",
4034
+ "unicode": "f13e",
4035
+ "created": 3.1,
4036
+ "filter": [
4037
+ "protect",
4038
+ "admin",
4039
+ "password",
4040
+ "lock"
4041
+ ],
4042
+ "categories": [
4043
+ "Web Application Icons"
4044
+ ]
4045
+ },
4046
+ {
4047
+ "name": "Bullseye",
4048
+ "id": "bullseye",
4049
+ "unicode": "f140",
4050
+ "created": 3.1,
4051
+ "filter": [
4052
+ "target"
4053
+ ],
4054
+ "categories": [
4055
+ "Web Application Icons"
4056
+ ]
4057
+ },
4058
+ {
4059
+ "name": "Ellipsis Horizontal",
4060
+ "id": "ellipsis-h",
4061
+ "unicode": "f141",
4062
+ "created": 3.1,
4063
+ "filter": [
4064
+ "dots"
4065
+ ],
4066
+ "categories": [
4067
+ "Web Application Icons"
4068
+ ]
4069
+ },
4070
+ {
4071
+ "name": "Ellipsis Vertical",
4072
+ "id": "ellipsis-v",
4073
+ "unicode": "f142",
4074
+ "created": 3.1,
4075
+ "filter": [
4076
+ "dots"
4077
+ ],
4078
+ "categories": [
4079
+ "Web Application Icons"
4080
+ ]
4081
+ },
4082
+ {
4083
+ "name": "RSS Square",
4084
+ "id": "rss-square",
4085
+ "unicode": "f143",
4086
+ "created": 3.1,
4087
+ "filter": [
4088
+ "feed",
4089
+ "blog"
4090
+ ],
4091
+ "categories": [
4092
+ "Web Application Icons"
4093
+ ]
4094
+ },
4095
+ {
4096
+ "name": "Play Circle",
4097
+ "id": "play-circle",
4098
+ "unicode": "f144",
4099
+ "created": 3.1,
4100
+ "filter": [
4101
+ "start",
4102
+ "playing"
4103
+ ],
4104
+ "categories": [
4105
+ "Video Player Icons"
4106
+ ]
4107
+ },
4108
+ {
4109
+ "name": "Ticket",
4110
+ "id": "ticket",
4111
+ "unicode": "f145",
4112
+ "created": 3.1,
4113
+ "filter": [
4114
+ "movie",
4115
+ "pass",
4116
+ "support"
4117
+ ],
4118
+ "categories": [
4119
+ "Web Application Icons"
4120
+ ]
4121
+ },
4122
+ {
4123
+ "name": "Minus Square",
4124
+ "id": "minus-square",
4125
+ "unicode": "f146",
4126
+ "created": 3.1,
4127
+ "filter": [
4128
+ "hide",
4129
+ "minify",
4130
+ "delete",
4131
+ "remove",
4132
+ "trash",
4133
+ "hide",
4134
+ "collapse"
4135
+ ],
4136
+ "categories": [
4137
+ "Web Application Icons",
4138
+ "Form Control Icons"
4139
+ ]
4140
+ },
4141
+ {
4142
+ "name": "Minus Square Outlined",
4143
+ "id": "minus-square-o",
4144
+ "unicode": "f147",
4145
+ "created": 3.1,
4146
+ "filter": [
4147
+ "hide",
4148
+ "minify",
4149
+ "delete",
4150
+ "remove",
4151
+ "trash",
4152
+ "hide",
4153
+ "collapse"
4154
+ ],
4155
+ "categories": [
4156
+ "Web Application Icons",
4157
+ "Form Control Icons"
4158
+ ]
4159
+ },
4160
+ {
4161
+ "name": "Level Up",
4162
+ "id": "level-up",
4163
+ "unicode": "f148",
4164
+ "created": 3.1,
4165
+ "filter": [
4166
+ "arrow"
4167
+ ],
4168
+ "categories": [
4169
+ "Web Application Icons"
4170
+ ]
4171
+ },
4172
+ {
4173
+ "name": "Level Down",
4174
+ "id": "level-down",
4175
+ "unicode": "f149",
4176
+ "created": 3.1,
4177
+ "filter": [
4178
+ "arrow"
4179
+ ],
4180
+ "categories": [
4181
+ "Web Application Icons"
4182
+ ]
4183
+ },
4184
+ {
4185
+ "name": "Check Square",
4186
+ "id": "check-square",
4187
+ "unicode": "f14a",
4188
+ "created": 3.1,
4189
+ "filter": [
4190
+ "checkmark",
4191
+ "done",
4192
+ "todo",
4193
+ "agree",
4194
+ "accept",
4195
+ "confirm",
4196
+ "ok"
4197
+ ],
4198
+ "categories": [
4199
+ "Web Application Icons",
4200
+ "Form Control Icons"
4201
+ ]
4202
+ },
4203
+ {
4204
+ "name": "Pencil Square",
4205
+ "id": "pencil-square",
4206
+ "unicode": "f14b",
4207
+ "created": 3.1,
4208
+ "filter": [
4209
+ "write",
4210
+ "edit",
4211
+ "update"
4212
+ ],
4213
+ "categories": [
4214
+ "Web Application Icons"
4215
+ ]
4216
+ },
4217
+ {
4218
+ "name": "External Link Square",
4219
+ "id": "external-link-square",
4220
+ "unicode": "f14c",
4221
+ "created": 3.1,
4222
+ "filter": [
4223
+ "open",
4224
+ "new"
4225
+ ],
4226
+ "categories": [
4227
+ "Web Application Icons"
4228
+ ]
4229
+ },
4230
+ {
4231
+ "name": "Share Square",
4232
+ "id": "share-square",
4233
+ "unicode": "f14d",
4234
+ "created": 3.1,
4235
+ "filter": [
4236
+ "social",
4237
+ "send"
4238
+ ],
4239
+ "categories": [
4240
+ "Web Application Icons"
4241
+ ]
4242
+ },
4243
+ {
4244
+ "name": "Compass",
4245
+ "id": "compass",
4246
+ "unicode": "f14e",
4247
+ "created": 3.2,
4248
+ "filter": [
4249
+ "safari",
4250
+ "directory",
4251
+ "menu",
4252
+ "location"
4253
+ ],
4254
+ "categories": [
4255
+ "Web Application Icons"
4256
+ ]
4257
+ },
4258
+ {
4259
+ "name": "Caret Square Outlined Down",
4260
+ "id": "caret-square-o-down",
4261
+ "unicode": "f150",
4262
+ "created": 3.2,
4263
+ "aliases": [
4264
+ "toggle-down"
4265
+ ],
4266
+ "filter": [
4267
+ "more",
4268
+ "dropdown",
4269
+ "menu"
4270
+ ],
4271
+ "categories": [
4272
+ "Web Application Icons",
4273
+ "Directional Icons"
4274
+ ]
4275
+ },
4276
+ {
4277
+ "name": "Caret Square Outlined Up",
4278
+ "id": "caret-square-o-up",
4279
+ "unicode": "f151",
4280
+ "created": 3.2,
4281
+ "aliases": [
4282
+ "toggle-up"
4283
+ ],
4284
+ "categories": [
4285
+ "Web Application Icons",
4286
+ "Directional Icons"
4287
+ ]
4288
+ },
4289
+ {
4290
+ "name": "Caret Square Outlined Right",
4291
+ "id": "caret-square-o-right",
4292
+ "unicode": "f152",
4293
+ "created": 3.2,
4294
+ "filter": [
4295
+ "next",
4296
+ "forward"
4297
+ ],
4298
+ "aliases": [
4299
+ "toggle-right"
4300
+ ],
4301
+ "categories": [
4302
+ "Web Application Icons",
4303
+ "Directional Icons"
4304
+ ]
4305
+ },
4306
+ {
4307
+ "name": "Euro (EUR)",
4308
+ "id": "eur",
4309
+ "unicode": "f153",
4310
+ "created": 3.2,
4311
+ "aliases": [
4312
+ "euro"
4313
+ ],
4314
+ "categories": [
4315
+ "Currency Icons"
4316
+ ]
4317
+ },
4318
+ {
4319
+ "name": "GBP",
4320
+ "id": "gbp",
4321
+ "unicode": "f154",
4322
+ "created": 3.2,
4323
+ "categories": [
4324
+ "Currency Icons"
4325
+ ]
4326
+ },
4327
+ {
4328
+ "name": "US Dollar",
4329
+ "id": "usd",
4330
+ "unicode": "f155",
4331
+ "created": 3.2,
4332
+ "aliases": [
4333
+ "dollar"
4334
+ ],
4335
+ "categories": [
4336
+ "Currency Icons"
4337
+ ]
4338
+ },
4339
+ {
4340
+ "name": "Indian Rupee (INR)",
4341
+ "id": "inr",
4342
+ "unicode": "f156",
4343
+ "created": 3.2,
4344
+ "aliases": [
4345
+ "rupee"
4346
+ ],
4347
+ "categories": [
4348
+ "Currency Icons"
4349
+ ]
4350
+ },
4351
+ {
4352
+ "name": "Japanese Yen (JPY)",
4353
+ "id": "jpy",
4354
+ "unicode": "f157",
4355
+ "created": 3.2,
4356
+ "aliases": [
4357
+ "cny",
4358
+ "rmb",
4359
+ "yen"
4360
+ ],
4361
+ "categories": [
4362
+ "Currency Icons"
4363
+ ]
4364
+ },
4365
+ {
4366
+ "name": "Russian Ruble (RUB)",
4367
+ "id": "rub",
4368
+ "unicode": "f158",
4369
+ "created": 4,
4370
+ "aliases": [
4371
+ "ruble",
4372
+ "rouble"
4373
+ ],
4374
+ "categories": [
4375
+ "Currency Icons"
4376
+ ]
4377
+ },
4378
+ {
4379
+ "name": "Korean Won (KRW)",
4380
+ "id": "krw",
4381
+ "unicode": "f159",
4382
+ "created": 3.2,
4383
+ "aliases": [
4384
+ "won"
4385
+ ],
4386
+ "categories": [
4387
+ "Currency Icons"
4388
+ ]
4389
+ },
4390
+ {
4391
+ "name": "Bitcoin (BTC)",
4392
+ "id": "btc",
4393
+ "unicode": "f15a",
4394
+ "created": 3.2,
4395
+ "aliases": [
4396
+ "bitcoin"
4397
+ ],
4398
+ "categories": [
4399
+ "Currency Icons",
4400
+ "Brand Icons"
4401
+ ]
4402
+ },
4403
+ {
4404
+ "name": "File",
4405
+ "id": "file",
4406
+ "unicode": "f15b",
4407
+ "created": 3.2,
4408
+ "filter": [
4409
+ "new",
4410
+ "page",
4411
+ "pdf",
4412
+ "document"
4413
+ ],
4414
+ "categories": [
4415
+ "Text Editor Icons",
4416
+ "File Type Icons"
4417
+ ]
4418
+ },
4419
+ {
4420
+ "name": "File Text",
4421
+ "id": "file-text",
4422
+ "unicode": "f15c",
4423
+ "created": 3.2,
4424
+ "filter": [
4425
+ "new",
4426
+ "page",
4427
+ "pdf",
4428
+ "document"
4429
+ ],
4430
+ "categories": [
4431
+ "Text Editor Icons",
4432
+ "File Type Icons"
4433
+ ]
4434
+ },
4435
+ {
4436
+ "name": "Sort Alpha Ascending",
4437
+ "id": "sort-alpha-asc",
4438
+ "unicode": "f15d",
4439
+ "created": 3.2,
4440
+ "categories": [
4441
+ "Web Application Icons"
4442
+ ]
4443
+ },
4444
+ {
4445
+ "name": "Sort Alpha Descending",
4446
+ "id": "sort-alpha-desc",
4447
+ "unicode": "f15e",
4448
+ "created": 3.2,
4449
+ "categories": [
4450
+ "Web Application Icons"
4451
+ ]
4452
+ },
4453
+ {
4454
+ "name": "Sort Amount Ascending",
4455
+ "id": "sort-amount-asc",
4456
+ "unicode": "f160",
4457
+ "created": 3.2,
4458
+ "categories": [
4459
+ "Web Application Icons"
4460
+ ]
4461
+ },
4462
+ {
4463
+ "name": "Sort Amount Descending",
4464
+ "id": "sort-amount-desc",
4465
+ "unicode": "f161",
4466
+ "created": 3.2,
4467
+ "categories": [
4468
+ "Web Application Icons"
4469
+ ]
4470
+ },
4471
+ {
4472
+ "name": "Sort Numeric Ascending",
4473
+ "id": "sort-numeric-asc",
4474
+ "unicode": "f162",
4475
+ "created": 3.2,
4476
+ "filter": [
4477
+ "numbers"
4478
+ ],
4479
+ "categories": [
4480
+ "Web Application Icons"
4481
+ ]
4482
+ },
4483
+ {
4484
+ "name": "Sort Numeric Descending",
4485
+ "id": "sort-numeric-desc",
4486
+ "unicode": "f163",
4487
+ "created": 3.2,
4488
+ "filter": [
4489
+ "numbers"
4490
+ ],
4491
+ "categories": [
4492
+ "Web Application Icons"
4493
+ ]
4494
+ },
4495
+ {
4496
+ "name": "thumbs-up",
4497
+ "id": "thumbs-up",
4498
+ "unicode": "f164",
4499
+ "created": 3.2,
4500
+ "filter": [
4501
+ "like",
4502
+ "favorite",
4503
+ "approve",
4504
+ "agree",
4505
+ "hand"
4506
+ ],
4507
+ "categories": [
4508
+ "Web Application Icons",
4509
+ "Hand Icons"
4510
+ ]
4511
+ },
4512
+ {
4513
+ "name": "thumbs-down",
4514
+ "id": "thumbs-down",
4515
+ "unicode": "f165",
4516
+ "created": 3.2,
4517
+ "filter": [
4518
+ "dislike",
4519
+ "disapprove",
4520
+ "disagree",
4521
+ "hand"
4522
+ ],
4523
+ "categories": [
4524
+ "Web Application Icons",
4525
+ "Hand Icons"
4526
+ ]
4527
+ },
4528
+ {
4529
+ "name": "YouTube Square",
4530
+ "id": "youtube-square",
4531
+ "unicode": "f166",
4532
+ "created": 3.2,
4533
+ "filter": [
4534
+ "video",
4535
+ "film"
4536
+ ],
4537
+ "categories": [
4538
+ "Brand Icons"
4539
+ ]
4540
+ },
4541
+ {
4542
+ "name": "YouTube",
4543
+ "id": "youtube",
4544
+ "unicode": "f167",
4545
+ "created": 3.2,
4546
+ "filter": [
4547
+ "video",
4548
+ "film"
4549
+ ],
4550
+ "categories": [
4551
+ "Brand Icons"
4552
+ ]
4553
+ },
4554
+ {
4555
+ "name": "Xing",
4556
+ "id": "xing",
4557
+ "unicode": "f168",
4558
+ "created": 3.2,
4559
+ "categories": [
4560
+ "Brand Icons"
4561
+ ]
4562
+ },
4563
+ {
4564
+ "name": "Xing Square",
4565
+ "id": "xing-square",
4566
+ "unicode": "f169",
4567
+ "created": 3.2,
4568
+ "categories": [
4569
+ "Brand Icons"
4570
+ ]
4571
+ },
4572
+ {
4573
+ "name": "YouTube Play",
4574
+ "id": "youtube-play",
4575
+ "unicode": "f16a",
4576
+ "created": 3.2,
4577
+ "filter": [
4578
+ "start",
4579
+ "playing"
4580
+ ],
4581
+ "categories": [
4582
+ "Brand Icons",
4583
+ "Video Player Icons"
4584
+ ]
4585
+ },
4586
+ {
4587
+ "name": "Dropbox",
4588
+ "id": "dropbox",
4589
+ "unicode": "f16b",
4590
+ "created": 3.2,
4591
+ "categories": [
4592
+ "Brand Icons"
4593
+ ]
4594
+ },
4595
+ {
4596
+ "name": "Stack Overflow",
4597
+ "id": "stack-overflow",
4598
+ "unicode": "f16c",
4599
+ "created": 3.2,
4600
+ "categories": [
4601
+ "Brand Icons"
4602
+ ]
4603
+ },
4604
+ {
4605
+ "name": "Instagram",
4606
+ "id": "instagram",
4607
+ "unicode": "f16d",
4608
+ "created": 4.6,
4609
+ "categories": [
4610
+ "Brand Icons"
4611
+ ]
4612
+ },
4613
+ {
4614
+ "name": "Flickr",
4615
+ "id": "flickr",
4616
+ "unicode": "f16e",
4617
+ "created": 3.2,
4618
+ "categories": [
4619
+ "Brand Icons"
4620
+ ]
4621
+ },
4622
+ {
4623
+ "name": "App.net",
4624
+ "id": "adn",
4625
+ "unicode": "f170",
4626
+ "created": 3.2,
4627
+ "categories": [
4628
+ "Brand Icons"
4629
+ ]
4630
+ },
4631
+ {
4632
+ "name": "Bitbucket",
4633
+ "id": "bitbucket",
4634
+ "unicode": "f171",
4635
+ "created": 3.2,
4636
+ "filter": [
4637
+ "git"
4638
+ ],
4639
+ "categories": [
4640
+ "Brand Icons"
4641
+ ]
4642
+ },
4643
+ {
4644
+ "name": "Bitbucket Square",
4645
+ "id": "bitbucket-square",
4646
+ "unicode": "f172",
4647
+ "created": 3.2,
4648
+ "filter": [
4649
+ "git"
4650
+ ],
4651
+ "categories": [
4652
+ "Brand Icons"
4653
+ ]
4654
+ },
4655
+ {
4656
+ "name": "Tumblr",
4657
+ "id": "tumblr",
4658
+ "unicode": "f173",
4659
+ "created": 3.2,
4660
+ "categories": [
4661
+ "Brand Icons"
4662
+ ]
4663
+ },
4664
+ {
4665
+ "name": "Tumblr Square",
4666
+ "id": "tumblr-square",
4667
+ "unicode": "f174",
4668
+ "created": 3.2,
4669
+ "categories": [
4670
+ "Brand Icons"
4671
+ ]
4672
+ },
4673
+ {
4674
+ "name": "Long Arrow Down",
4675
+ "id": "long-arrow-down",
4676
+ "unicode": "f175",
4677
+ "created": 3.2,
4678
+ "categories": [
4679
+ "Directional Icons"
4680
+ ]
4681
+ },
4682
+ {
4683
+ "name": "Long Arrow Up",
4684
+ "id": "long-arrow-up",
4685
+ "unicode": "f176",
4686
+ "created": 3.2,
4687
+ "categories": [
4688
+ "Directional Icons"
4689
+ ]
4690
+ },
4691
+ {
4692
+ "name": "Long Arrow Left",
4693
+ "id": "long-arrow-left",
4694
+ "unicode": "f177",
4695
+ "created": 3.2,
4696
+ "filter": [
4697
+ "previous",
4698
+ "back"
4699
+ ],
4700
+ "categories": [
4701
+ "Directional Icons"
4702
+ ]
4703
+ },
4704
+ {
4705
+ "name": "Long Arrow Right",
4706
+ "id": "long-arrow-right",
4707
+ "unicode": "f178",
4708
+ "created": 3.2,
4709
+ "categories": [
4710
+ "Directional Icons"
4711
+ ]
4712
+ },
4713
+ {
4714
+ "name": "Apple",
4715
+ "id": "apple",
4716
+ "unicode": "f179",
4717
+ "created": 3.2,
4718
+ "filter": [
4719
+ "osx",
4720
+ "food"
4721
+ ],
4722
+ "categories": [
4723
+ "Brand Icons"
4724
+ ]
4725
+ },
4726
+ {
4727
+ "name": "Windows",
4728
+ "id": "windows",
4729
+ "unicode": "f17a",
4730
+ "created": 3.2,
4731
+ "filter": [
4732
+ "microsoft"
4733
+ ],
4734
+ "categories": [
4735
+ "Brand Icons"
4736
+ ]
4737
+ },
4738
+ {
4739
+ "name": "Android",
4740
+ "id": "android",
4741
+ "unicode": "f17b",
4742
+ "created": 3.2,
4743
+ "filter": [
4744
+ "robot"
4745
+ ],
4746
+ "categories": [
4747
+ "Brand Icons"
4748
+ ]
4749
+ },
4750
+ {
4751
+ "name": "Linux",
4752
+ "id": "linux",
4753
+ "unicode": "f17c",
4754
+ "created": 3.2,
4755
+ "filter": [
4756
+ "tux"
4757
+ ],
4758
+ "categories": [
4759
+ "Brand Icons"
4760
+ ]
4761
+ },
4762
+ {
4763
+ "name": "Dribbble",
4764
+ "id": "dribbble",
4765
+ "unicode": "f17d",
4766
+ "created": 3.2,
4767
+ "categories": [
4768
+ "Brand Icons"
4769
+ ]
4770
+ },
4771
+ {
4772
+ "name": "Skype",
4773
+ "id": "skype",
4774
+ "unicode": "f17e",
4775
+ "created": 3.2,
4776
+ "categories": [
4777
+ "Brand Icons"
4778
+ ]
4779
+ },
4780
+ {
4781
+ "name": "Foursquare",
4782
+ "id": "foursquare",
4783
+ "unicode": "f180",
4784
+ "created": 3.2,
4785
+ "categories": [
4786
+ "Brand Icons"
4787
+ ]
4788
+ },
4789
+ {
4790
+ "name": "Trello",
4791
+ "id": "trello",
4792
+ "unicode": "f181",
4793
+ "created": 3.2,
4794
+ "categories": [
4795
+ "Brand Icons"
4796
+ ]
4797
+ },
4798
+ {
4799
+ "name": "Female",
4800
+ "id": "female",
4801
+ "unicode": "f182",
4802
+ "created": 3.2,
4803
+ "filter": [
4804
+ "woman",
4805
+ "user",
4806
+ "person",
4807
+ "profile"
4808
+ ],
4809
+ "categories": [
4810
+ "Web Application Icons"
4811
+ ]
4812
+ },
4813
+ {
4814
+ "name": "Male",
4815
+ "id": "male",
4816
+ "unicode": "f183",
4817
+ "created": 3.2,
4818
+ "filter": [
4819
+ "man",
4820
+ "user",
4821
+ "person",
4822
+ "profile"
4823
+ ],
4824
+ "categories": [
4825
+ "Web Application Icons"
4826
+ ]
4827
+ },
4828
+ {
4829
+ "name": "Gratipay (Gittip)",
4830
+ "id": "gratipay",
4831
+ "unicode": "f184",
4832
+ "created": 3.2,
4833
+ "aliases": [
4834
+ "gittip"
4835
+ ],
4836
+ "filter": [
4837
+ "heart",
4838
+ "like",
4839
+ "favorite",
4840
+ "love"
4841
+ ],
4842
+ "categories": [
4843
+ "Brand Icons"
4844
+ ]
4845
+ },
4846
+ {
4847
+ "name": "Sun Outlined",
4848
+ "id": "sun-o",
4849
+ "unicode": "f185",
4850
+ "created": 3.2,
4851
+ "filter": [
4852
+ "weather",
4853
+ "contrast",
4854
+ "lighter",
4855
+ "brighten",
4856
+ "day"
4857
+ ],
4858
+ "categories": [
4859
+ "Web Application Icons"
4860
+ ]
4861
+ },
4862
+ {
4863
+ "name": "Moon Outlined",
4864
+ "id": "moon-o",
4865
+ "unicode": "f186",
4866
+ "created": 3.2,
4867
+ "filter": [
4868
+ "night",
4869
+ "darker",
4870
+ "contrast"
4871
+ ],
4872
+ "categories": [
4873
+ "Web Application Icons"
4874
+ ]
4875
+ },
4876
+ {
4877
+ "name": "Archive",
4878
+ "id": "archive",
4879
+ "unicode": "f187",
4880
+ "created": 3.2,
4881
+ "filter": [
4882
+ "box",
4883
+ "storage"
4884
+ ],
4885
+ "categories": [
4886
+ "Web Application Icons"
4887
+ ]
4888
+ },
4889
+ {
4890
+ "name": "Bug",
4891
+ "id": "bug",
4892
+ "unicode": "f188",
4893
+ "created": 3.2,
4894
+ "filter": [
4895
+ "report",
4896
+ "insect"
4897
+ ],
4898
+ "categories": [
4899
+ "Web Application Icons"
4900
+ ]
4901
+ },
4902
+ {
4903
+ "name": "VK",
4904
+ "id": "vk",
4905
+ "unicode": "f189",
4906
+ "created": 3.2,
4907
+ "categories": [
4908
+ "Brand Icons"
4909
+ ]
4910
+ },
4911
+ {
4912
+ "name": "Weibo",
4913
+ "id": "weibo",
4914
+ "unicode": "f18a",
4915
+ "created": 3.2,
4916
+ "categories": [
4917
+ "Brand Icons"
4918
+ ]
4919
+ },
4920
+ {
4921
+ "name": "Renren",
4922
+ "id": "renren",
4923
+ "unicode": "f18b",
4924
+ "created": 3.2,
4925
+ "categories": [
4926
+ "Brand Icons"
4927
+ ]
4928
+ },
4929
+ {
4930
+ "name": "Pagelines",
4931
+ "id": "pagelines",
4932
+ "unicode": "f18c",
4933
+ "created": 4,
4934
+ "filter": [
4935
+ "leaf",
4936
+ "leaves",
4937
+ "tree",
4938
+ "plant",
4939
+ "eco",
4940
+ "nature"
4941
+ ],
4942
+ "categories": [
4943
+ "Brand Icons"
4944
+ ]
4945
+ },
4946
+ {
4947
+ "name": "Stack Exchange",
4948
+ "id": "stack-exchange",
4949
+ "unicode": "f18d",
4950
+ "created": 4,
4951
+ "categories": [
4952
+ "Brand Icons"
4953
+ ]
4954
+ },
4955
+ {
4956
+ "name": "Arrow Circle Outlined Right",
4957
+ "id": "arrow-circle-o-right",
4958
+ "unicode": "f18e",
4959
+ "created": 4,
4960
+ "filter": [
4961
+ "next",
4962
+ "forward"
4963
+ ],
4964
+ "categories": [
4965
+ "Directional Icons"
4966
+ ]
4967
+ },
4968
+ {
4969
+ "name": "Arrow Circle Outlined Left",
4970
+ "id": "arrow-circle-o-left",
4971
+ "unicode": "f190",
4972
+ "created": 4,
4973
+ "filter": [
4974
+ "previous",
4975
+ "back"
4976
+ ],
4977
+ "categories": [
4978
+ "Directional Icons"
4979
+ ]
4980
+ },
4981
+ {
4982
+ "name": "Caret Square Outlined Left",
4983
+ "id": "caret-square-o-left",
4984
+ "unicode": "f191",
4985
+ "created": 4,
4986
+ "filter": [
4987
+ "previous",
4988
+ "back"
4989
+ ],
4990
+ "aliases": [
4991
+ "toggle-left"
4992
+ ],
4993
+ "categories": [
4994
+ "Web Application Icons",
4995
+ "Directional Icons"
4996
+ ]
4997
+ },
4998
+ {
4999
+ "name": "Dot Circle Outlined",
5000
+ "id": "dot-circle-o",
5001
+ "unicode": "f192",
5002
+ "created": 4,
5003
+ "filter": [
5004
+ "target",
5005
+ "bullseye",
5006
+ "notification"
5007
+ ],
5008
+ "categories": [
5009
+ "Web Application Icons",
5010
+ "Form Control Icons"
5011
+ ]
5012
+ },
5013
+ {
5014
+ "name": "Wheelchair",
5015
+ "id": "wheelchair",
5016
+ "unicode": "f193",
5017
+ "created": 4,
5018
+ "filter": [
5019
+ "handicap",
5020
+ "person"
5021
+ ],
5022
+ "categories": [
5023
+ "Web Application Icons",
5024
+ "Medical Icons",
5025
+ "Transportation Icons",
5026
+ "Accessibility Icons"
5027
+ ]
5028
+ },
5029
+ {
5030
+ "name": "Vimeo Square",
5031
+ "id": "vimeo-square",
5032
+ "unicode": "f194",
5033
+ "created": 4,
5034
+ "categories": [
5035
+ "Brand Icons"
5036
+ ]
5037
+ },
5038
+ {
5039
+ "name": "Turkish Lira (TRY)",
5040
+ "id": "try",
5041
+ "unicode": "f195",
5042
+ "created": 4,
5043
+ "aliases": [
5044
+ "turkish-lira"
5045
+ ],
5046
+ "categories": [
5047
+ "Currency Icons"
5048
+ ]
5049
+ },
5050
+ {
5051
+ "name": "Plus Square Outlined",
5052
+ "id": "plus-square-o",
5053
+ "unicode": "f196",
5054
+ "created": 4,
5055
+ "filter": [
5056
+ "add",
5057
+ "new",
5058
+ "create",
5059
+ "expand"
5060
+ ],
5061
+ "categories": [
5062
+ "Web Application Icons",
5063
+ "Form Control Icons"
5064
+ ]
5065
+ },
5066
+ {
5067
+ "name": "Space Shuttle",
5068
+ "id": "space-shuttle",
5069
+ "unicode": "f197",
5070
+ "created": 4.1,
5071
+ "filter": null,
5072
+ "categories": [
5073
+ "Web Application Icons",
5074
+ "Transportation Icons"
5075
+ ]
5076
+ },
5077
+ {
5078
+ "name": "Slack Logo",
5079
+ "id": "slack",
5080
+ "unicode": "f198",
5081
+ "created": 4.1,
5082
+ "filter": [
5083
+ "hashtag",
5084
+ "anchor",
5085
+ "hash"
5086
+ ],
5087
+ "categories": [
5088
+ "Brand Icons"
5089
+ ]
5090
+ },
5091
+ {
5092
+ "name": "Envelope Square",
5093
+ "id": "envelope-square",
5094
+ "unicode": "f199",
5095
+ "created": 4.1,
5096
+ "filter": [
5097
+ "email",
5098
+ "e-mail",
5099
+ "letter",
5100
+ "support",
5101
+ "mail",
5102
+ "message",
5103
+ "notification"
5104
+ ],
5105
+ "categories": [
5106
+ "Web Application Icons"
5107
+ ]
5108
+ },
5109
+ {
5110
+ "name": "WordPress Logo",
5111
+ "id": "wordpress",
5112
+ "unicode": "f19a",
5113
+ "created": 4.1,
5114
+ "categories": [
5115
+ "Brand Icons"
5116
+ ]
5117
+ },
5118
+ {
5119
+ "name": "OpenID",
5120
+ "id": "openid",
5121
+ "unicode": "f19b",
5122
+ "created": 4.1,
5123
+ "categories": [
5124
+ "Brand Icons"
5125
+ ]
5126
+ },
5127
+ {
5128
+ "name": "University",
5129
+ "id": "university",
5130
+ "unicode": "f19c",
5131
+ "created": 4.1,
5132
+ "aliases": [
5133
+ "institution",
5134
+ "bank"
5135
+ ],
5136
+ "categories": [
5137
+ "Web Application Icons"
5138
+ ]
5139
+ },
5140
+ {
5141
+ "name": "Graduation Cap",
5142
+ "id": "graduation-cap",
5143
+ "unicode": "f19d",
5144
+ "created": 4.1,
5145
+ "aliases": [
5146
+ "mortar-board"
5147
+ ],
5148
+ "filter": [
5149
+ "learning",
5150
+ "school",
5151
+ "student"
5152
+ ],
5153
+ "categories": [
5154
+ "Web Application Icons"
5155
+ ]
5156
+ },
5157
+ {
5158
+ "name": "Yahoo Logo",
5159
+ "id": "yahoo",
5160
+ "unicode": "f19e",
5161
+ "created": 4.1,
5162
+ "categories": [
5163
+ "Brand Icons"
5164
+ ]
5165
+ },
5166
+ {
5167
+ "name": "Google Logo",
5168
+ "id": "google",
5169
+ "unicode": "f1a0",
5170
+ "created": 4.1,
5171
+ "categories": [
5172
+ "Brand Icons"
5173
+ ]
5174
+ },
5175
+ {
5176
+ "name": "reddit Logo",
5177
+ "id": "reddit",
5178
+ "unicode": "f1a1",
5179
+ "created": 4.1,
5180
+ "categories": [
5181
+ "Brand Icons"
5182
+ ]
5183
+ },
5184
+ {
5185
+ "name": "reddit Square",
5186
+ "id": "reddit-square",
5187
+ "unicode": "f1a2",
5188
+ "created": 4.1,
5189
+ "categories": [
5190
+ "Brand Icons"
5191
+ ]
5192
+ },
5193
+ {
5194
+ "name": "StumbleUpon Circle",
5195
+ "id": "stumbleupon-circle",
5196
+ "unicode": "f1a3",
5197
+ "created": 4.1,
5198
+ "categories": [
5199
+ "Brand Icons"
5200
+ ]
5201
+ },
5202
+ {
5203
+ "name": "StumbleUpon Logo",
5204
+ "id": "stumbleupon",
5205
+ "unicode": "f1a4",
5206
+ "created": 4.1,
5207
+ "categories": [
5208
+ "Brand Icons"
5209
+ ]
5210
+ },
5211
+ {
5212
+ "name": "Delicious Logo",
5213
+ "id": "delicious",
5214
+ "unicode": "f1a5",
5215
+ "created": 4.1,
5216
+ "categories": [
5217
+ "Brand Icons"
5218
+ ]
5219
+ },
5220
+ {
5221
+ "name": "Digg Logo",
5222
+ "id": "digg",
5223
+ "unicode": "f1a6",
5224
+ "created": 4.1,
5225
+ "categories": [
5226
+ "Brand Icons"
5227
+ ]
5228
+ },
5229
+ {
5230
+ "name": "Pied Piper PP Logo (Old)",
5231
+ "id": "pied-piper-pp",
5232
+ "unicode": "f1a7",
5233
+ "created": 4.1,
5234
+ "categories": [
5235
+ "Brand Icons"
5236
+ ]
5237
+ },
5238
+ {
5239
+ "name": "Pied Piper Alternate Logo",
5240
+ "id": "pied-piper-alt",
5241
+ "unicode": "f1a8",
5242
+ "created": 4.1,
5243
+ "categories": [
5244
+ "Brand Icons"
5245
+ ]
5246
+ },
5247
+ {
5248
+ "name": "Drupal Logo",
5249
+ "id": "drupal",
5250
+ "unicode": "f1a9",
5251
+ "created": 4.1,
5252
+ "categories": [
5253
+ "Brand Icons"
5254
+ ]
5255
+ },
5256
+ {
5257
+ "name": "Joomla Logo",
5258
+ "id": "joomla",
5259
+ "unicode": "f1aa",
5260
+ "created": 4.1,
5261
+ "categories": [
5262
+ "Brand Icons"
5263
+ ]
5264
+ },
5265
+ {
5266
+ "name": "Language",
5267
+ "id": "language",
5268
+ "unicode": "f1ab",
5269
+ "created": 4.1,
5270
+ "categories": [
5271
+ "Web Application Icons"
5272
+ ]
5273
+ },
5274
+ {
5275
+ "name": "Fax",
5276
+ "id": "fax",
5277
+ "unicode": "f1ac",
5278
+ "created": 4.1,
5279
+ "categories": [
5280
+ "Web Application Icons"
5281
+ ]
5282
+ },
5283
+ {
5284
+ "name": "Building",
5285
+ "id": "building",
5286
+ "unicode": "f1ad",
5287
+ "created": 4.1,
5288
+ "filter": [
5289
+ "work",
5290
+ "business",
5291
+ "apartment",
5292
+ "office",
5293
+ "company"
5294
+ ],
5295
+ "categories": [
5296
+ "Web Application Icons"
5297
+ ]
5298
+ },
5299
+ {
5300
+ "name": "Child",
5301
+ "id": "child",
5302
+ "unicode": "f1ae",
5303
+ "created": 4.1,
5304
+ "categories": [
5305
+ "Web Application Icons"
5306
+ ]
5307
+ },
5308
+ {
5309
+ "name": "Paw",
5310
+ "id": "paw",
5311
+ "unicode": "f1b0",
5312
+ "created": 4.1,
5313
+ "filter": [
5314
+ "pet"
5315
+ ],
5316
+ "categories": [
5317
+ "Web Application Icons"
5318
+ ]
5319
+ },
5320
+ {
5321
+ "name": "spoon",
5322
+ "id": "spoon",
5323
+ "unicode": "f1b1",
5324
+ "created": 4.1,
5325
+ "categories": [
5326
+ "Web Application Icons"
5327
+ ]
5328
+ },
5329
+ {
5330
+ "name": "Cube",
5331
+ "id": "cube",
5332
+ "unicode": "f1b2",
5333
+ "created": 4.1,
5334
+ "categories": [
5335
+ "Web Application Icons"
5336
+ ]
5337
+ },
5338
+ {
5339
+ "name": "Cubes",
5340
+ "id": "cubes",
5341
+ "unicode": "f1b3",
5342
+ "created": 4.1,
5343
+ "categories": [
5344
+ "Web Application Icons"
5345
+ ]
5346
+ },
5347
+ {
5348
+ "name": "Behance",
5349
+ "id": "behance",
5350
+ "unicode": "f1b4",
5351
+ "created": 4.1,
5352
+ "categories": [
5353
+ "Brand Icons"
5354
+ ]
5355
+ },
5356
+ {
5357
+ "name": "Behance Square",
5358
+ "id": "behance-square",
5359
+ "unicode": "f1b5",
5360
+ "created": 4.1,
5361
+ "categories": [
5362
+ "Brand Icons"
5363
+ ]
5364
+ },
5365
+ {
5366
+ "name": "Steam",
5367
+ "id": "steam",
5368
+ "unicode": "f1b6",
5369
+ "created": 4.1,
5370
+ "categories": [
5371
+ "Brand Icons"
5372
+ ]
5373
+ },
5374
+ {
5375
+ "name": "Steam Square",
5376
+ "id": "steam-square",
5377
+ "unicode": "f1b7",
5378
+ "created": 4.1,
5379
+ "categories": [
5380
+ "Brand Icons"
5381
+ ]
5382
+ },
5383
+ {
5384
+ "name": "Recycle",
5385
+ "id": "recycle",
5386
+ "unicode": "f1b8",
5387
+ "created": 4.1,
5388
+ "categories": [
5389
+ "Web Application Icons"
5390
+ ]
5391
+ },
5392
+ {
5393
+ "name": "Car",
5394
+ "id": "car",
5395
+ "unicode": "f1b9",
5396
+ "created": 4.1,
5397
+ "aliases": [
5398
+ "automobile"
5399
+ ],
5400
+ "filter": [
5401
+ "vehicle"
5402
+ ],
5403
+ "categories": [
5404
+ "Web Application Icons",
5405
+ "Transportation Icons"
5406
+ ]
5407
+ },
5408
+ {
5409
+ "name": "Taxi",
5410
+ "id": "taxi",
5411
+ "unicode": "f1ba",
5412
+ "created": 4.1,
5413
+ "aliases": [
5414
+ "cab"
5415
+ ],
5416
+ "filter": [
5417
+ "vehicle"
5418
+ ],
5419
+ "categories": [
5420
+ "Web Application Icons",
5421
+ "Transportation Icons"
5422
+ ]
5423
+ },
5424
+ {
5425
+ "name": "Tree",
5426
+ "id": "tree",
5427
+ "unicode": "f1bb",
5428
+ "created": 4.1,
5429
+ "categories": [
5430
+ "Web Application Icons"
5431
+ ]
5432
+ },
5433
+ {
5434
+ "name": "Spotify",
5435
+ "id": "spotify",
5436
+ "unicode": "f1bc",
5437
+ "created": 4.1,
5438
+ "categories": [
5439
+ "Brand Icons"
5440
+ ]
5441
+ },
5442
+ {
5443
+ "name": "deviantART",
5444
+ "id": "deviantart",
5445
+ "unicode": "f1bd",
5446
+ "created": 4.1,
5447
+ "categories": [
5448
+ "Brand Icons"
5449
+ ]
5450
+ },
5451
+ {
5452
+ "name": "SoundCloud",
5453
+ "id": "soundcloud",
5454
+ "unicode": "f1be",
5455
+ "created": 4.1,
5456
+ "categories": [
5457
+ "Brand Icons"
5458
+ ]
5459
+ },
5460
+ {
5461
+ "name": "Database",
5462
+ "id": "database",
5463
+ "unicode": "f1c0",
5464
+ "created": 4.1,
5465
+ "categories": [
5466
+ "Web Application Icons"
5467
+ ]
5468
+ },
5469
+ {
5470
+ "name": "PDF File Outlined",
5471
+ "id": "file-pdf-o",
5472
+ "unicode": "f1c1",
5473
+ "created": 4.1,
5474
+ "categories": [
5475
+ "Web Application Icons",
5476
+ "File Type Icons"
5477
+ ]
5478
+ },
5479
+ {
5480
+ "name": "Word File Outlined",
5481
+ "id": "file-word-o",
5482
+ "unicode": "f1c2",
5483
+ "created": 4.1,
5484
+ "categories": [
5485
+ "Web Application Icons",
5486
+ "File Type Icons"
5487
+ ]
5488
+ },
5489
+ {
5490
+ "name": "Excel File Outlined",
5491
+ "id": "file-excel-o",
5492
+ "unicode": "f1c3",
5493
+ "created": 4.1,
5494
+ "categories": [
5495
+ "Web Application Icons",
5496
+ "File Type Icons"
5497
+ ]
5498
+ },
5499
+ {
5500
+ "name": "Powerpoint File Outlined",
5501
+ "id": "file-powerpoint-o",
5502
+ "unicode": "f1c4",
5503
+ "created": 4.1,
5504
+ "categories": [
5505
+ "Web Application Icons",
5506
+ "File Type Icons"
5507
+ ]
5508
+ },
5509
+ {
5510
+ "name": "Image File Outlined",
5511
+ "id": "file-image-o",
5512
+ "unicode": "f1c5",
5513
+ "created": 4.1,
5514
+ "aliases": [
5515
+ "file-photo-o",
5516
+ "file-picture-o"
5517
+ ],
5518
+ "categories": [
5519
+ "Web Application Icons",
5520
+ "File Type Icons"
5521
+ ]
5522
+ },
5523
+ {
5524
+ "name": "Archive File Outlined",
5525
+ "id": "file-archive-o",
5526
+ "unicode": "f1c6",
5527
+ "created": 4.1,
5528
+ "aliases": [
5529
+ "file-zip-o"
5530
+ ],
5531
+ "categories": [
5532
+ "Web Application Icons",
5533
+ "File Type Icons"
5534
+ ]
5535
+ },
5536
+ {
5537
+ "name": "Audio File Outlined",
5538
+ "id": "file-audio-o",
5539
+ "unicode": "f1c7",
5540
+ "created": 4.1,
5541
+ "aliases": [
5542
+ "file-sound-o"
5543
+ ],
5544
+ "categories": [
5545
+ "Web Application Icons",
5546
+ "File Type Icons"
5547
+ ]
5548
+ },
5549
+ {
5550
+ "name": "Video File Outlined",
5551
+ "id": "file-video-o",
5552
+ "unicode": "f1c8",
5553
+ "created": 4.1,
5554
+ "aliases": [
5555
+ "file-movie-o"
5556
+ ],
5557
+ "categories": [
5558
+ "Web Application Icons",
5559
+ "File Type Icons"
5560
+ ]
5561
+ },
5562
+ {
5563
+ "name": "Code File Outlined",
5564
+ "id": "file-code-o",
5565
+ "unicode": "f1c9",
5566
+ "created": 4.1,
5567
+ "categories": [
5568
+ "Web Application Icons",
5569
+ "File Type Icons"
5570
+ ]
5571
+ },
5572
+ {
5573
+ "name": "Vine",
5574
+ "id": "vine",
5575
+ "unicode": "f1ca",
5576
+ "created": 4.1,
5577
+ "categories": [
5578
+ "Brand Icons"
5579
+ ]
5580
+ },
5581
+ {
5582
+ "name": "Codepen",
5583
+ "id": "codepen",
5584
+ "unicode": "f1cb",
5585
+ "created": 4.1,
5586
+ "categories": [
5587
+ "Brand Icons"
5588
+ ]
5589
+ },
5590
+ {
5591
+ "name": "jsFiddle",
5592
+ "id": "jsfiddle",
5593
+ "unicode": "f1cc",
5594
+ "created": 4.1,
5595
+ "categories": [
5596
+ "Brand Icons"
5597
+ ]
5598
+ },
5599
+ {
5600
+ "name": "Life Ring",
5601
+ "id": "life-ring",
5602
+ "unicode": "f1cd",
5603
+ "created": 4.1,
5604
+ "aliases": [
5605
+ {
5606
+ "life-bouy": "Deprecated - remove in 5.0.0"
5607
+ },
5608
+ "life-buoy",
5609
+ "life-saver",
5610
+ "support"
5611
+ ],
5612
+ "categories": [
5613
+ "Web Application Icons"
5614
+ ]
5615
+ },
5616
+ {
5617
+ "name": "Circle Outlined Notched",
5618
+ "id": "circle-o-notch",
5619
+ "unicode": "f1ce",
5620
+ "created": 4.1,
5621
+ "categories": [
5622
+ "Web Application Icons",
5623
+ "Spinner Icons"
5624
+ ]
5625
+ },
5626
+ {
5627
+ "name": "Rebel Alliance",
5628
+ "id": "rebel",
5629
+ "unicode": "f1d0",
5630
+ "created": 4.1,
5631
+ "aliases": [
5632
+ "ra",
5633
+ "resistance"
5634
+ ],
5635
+ "categories": [
5636
+ "Brand Icons"
5637
+ ]
5638
+ },
5639
+ {
5640
+ "name": "Galactic Empire",
5641
+ "id": "empire",
5642
+ "unicode": "f1d1",
5643
+ "created": 4.1,
5644
+ "aliases": [
5645
+ "ge"
5646
+ ],
5647
+ "categories": [
5648
+ "Brand Icons"
5649
+ ]
5650
+ },
5651
+ {
5652
+ "name": "Git Square",
5653
+ "id": "git-square",
5654
+ "unicode": "f1d2",
5655
+ "created": 4.1,
5656
+ "categories": [
5657
+ "Brand Icons"
5658
+ ]
5659
+ },
5660
+ {
5661
+ "name": "Git",
5662
+ "id": "git",
5663
+ "unicode": "f1d3",
5664
+ "created": 4.1,
5665
+ "categories": [
5666
+ "Brand Icons"
5667
+ ]
5668
+ },
5669
+ {
5670
+ "name": "Hacker News",
5671
+ "id": "hacker-news",
5672
+ "unicode": "f1d4",
5673
+ "created": 4.1,
5674
+ "aliases": [
5675
+ "y-combinator-square",
5676
+ "yc-square"
5677
+ ],
5678
+ "categories": [
5679
+ "Brand Icons"
5680
+ ]
5681
+ },
5682
+ {
5683
+ "name": "Tencent Weibo",
5684
+ "id": "tencent-weibo",
5685
+ "unicode": "f1d5",
5686
+ "created": 4.1,
5687
+ "categories": [
5688
+ "Brand Icons"
5689
+ ]
5690
+ },
5691
+ {
5692
+ "name": "QQ",
5693
+ "id": "qq",
5694
+ "unicode": "f1d6",
5695
+ "created": 4.1,
5696
+ "categories": [
5697
+ "Brand Icons"
5698
+ ]
5699
+ },
5700
+ {
5701
+ "name": "Weixin (WeChat)",
5702
+ "id": "weixin",
5703
+ "unicode": "f1d7",
5704
+ "created": 4.1,
5705
+ "aliases": [
5706
+ "wechat"
5707
+ ],
5708
+ "categories": [
5709
+ "Brand Icons"
5710
+ ]
5711
+ },
5712
+ {
5713
+ "name": "Paper Plane",
5714
+ "id": "paper-plane",
5715
+ "unicode": "f1d8",
5716
+ "created": 4.1,
5717
+ "aliases": [
5718
+ "send"
5719
+ ],
5720
+ "categories": [
5721
+ "Web Application Icons"
5722
+ ]
5723
+ },
5724
+ {
5725
+ "name": "Paper Plane Outlined",
5726
+ "id": "paper-plane-o",
5727
+ "unicode": "f1d9",
5728
+ "created": 4.1,
5729
+ "aliases": [
5730
+ "send-o"
5731
+ ],
5732
+ "categories": [
5733
+ "Web Application Icons"
5734
+ ]
5735
+ },
5736
+ {
5737
+ "name": "History",
5738
+ "id": "history",
5739
+ "unicode": "f1da",
5740
+ "created": 4.1,
5741
+ "categories": [
5742
+ "Web Application Icons"
5743
+ ]
5744
+ },
5745
+ {
5746
+ "name": "Circle Outlined Thin",
5747
+ "id": "circle-thin",
5748
+ "unicode": "f1db",
5749
+ "created": 4.1,
5750
+ "categories": [
5751
+ "Web Application Icons"
5752
+ ]
5753
+ },
5754
+ {
5755
+ "name": "header",
5756
+ "id": "header",
5757
+ "unicode": "f1dc",
5758
+ "created": 4.1,
5759
+ "filter": [
5760
+ "heading"
5761
+ ],
5762
+ "categories": [
5763
+ "Text Editor Icons"
5764
+ ]
5765
+ },
5766
+ {
5767
+ "name": "paragraph",
5768
+ "id": "paragraph",
5769
+ "unicode": "f1dd",
5770
+ "created": 4.1,
5771
+ "categories": [
5772
+ "Text Editor Icons"
5773
+ ]
5774
+ },
5775
+ {
5776
+ "name": "Sliders",
5777
+ "id": "sliders",
5778
+ "unicode": "f1de",
5779
+ "created": 4.1,
5780
+ "filter": [
5781
+ "settings"
5782
+ ],
5783
+ "categories": [
5784
+ "Web Application Icons"
5785
+ ]
5786
+ },
5787
+ {
5788
+ "name": "Share Alt",
5789
+ "id": "share-alt",
5790
+ "unicode": "f1e0",
5791
+ "created": 4.1,
5792
+ "categories": [
5793
+ "Web Application Icons",
5794
+ "Brand Icons"
5795
+ ]
5796
+ },
5797
+ {
5798
+ "name": "Share Alt Square",
5799
+ "id": "share-alt-square",
5800
+ "unicode": "f1e1",
5801
+ "created": 4.1,
5802
+ "categories": [
5803
+ "Web Application Icons",
5804
+ "Brand Icons"
5805
+ ]
5806
+ },
5807
+ {
5808
+ "name": "Bomb",
5809
+ "id": "bomb",
5810
+ "unicode": "f1e2",
5811
+ "created": 4.1,
5812
+ "categories": [
5813
+ "Web Application Icons"
5814
+ ]
5815
+ },
5816
+ {
5817
+ "name": "Futbol Outlined",
5818
+ "id": "futbol-o",
5819
+ "unicode": "f1e3",
5820
+ "created": 4.2,
5821
+ "aliases": [
5822
+ "soccer-ball-o"
5823
+ ],
5824
+ "categories": [
5825
+ "Web Application Icons"
5826
+ ]
5827
+ },
5828
+ {
5829
+ "name": "TTY",
5830
+ "id": "tty",
5831
+ "unicode": "f1e4",
5832
+ "created": 4.2,
5833
+ "categories": [
5834
+ "Web Application Icons",
5835
+ "Accessibility Icons"
5836
+ ]
5837
+ },
5838
+ {
5839
+ "name": "Binoculars",
5840
+ "id": "binoculars",
5841
+ "unicode": "f1e5",
5842
+ "created": 4.2,
5843
+ "categories": [
5844
+ "Web Application Icons"
5845
+ ]
5846
+ },
5847
+ {
5848
+ "name": "Plug",
5849
+ "id": "plug",
5850
+ "unicode": "f1e6",
5851
+ "created": 4.2,
5852
+ "filter": [
5853
+ "power",
5854
+ "connect"
5855
+ ],
5856
+ "categories": [
5857
+ "Web Application Icons"
5858
+ ]
5859
+ },
5860
+ {
5861
+ "name": "Slideshare",
5862
+ "id": "slideshare",
5863
+ "unicode": "f1e7",
5864
+ "created": 4.2,
5865
+ "categories": [
5866
+ "Brand Icons"
5867
+ ]
5868
+ },
5869
+ {
5870
+ "name": "Twitch",
5871
+ "id": "twitch",
5872
+ "unicode": "f1e8",
5873
+ "created": 4.2,
5874
+ "categories": [
5875
+ "Brand Icons"
5876
+ ]
5877
+ },
5878
+ {
5879
+ "name": "Yelp",
5880
+ "id": "yelp",
5881
+ "unicode": "f1e9",
5882
+ "created": 4.2,
5883
+ "categories": [
5884
+ "Brand Icons"
5885
+ ]
5886
+ },
5887
+ {
5888
+ "name": "Newspaper Outlined",
5889
+ "id": "newspaper-o",
5890
+ "unicode": "f1ea",
5891
+ "created": 4.2,
5892
+ "filter": [
5893
+ "press"
5894
+ ],
5895
+ "categories": [
5896
+ "Web Application Icons"
5897
+ ]
5898
+ },
5899
+ {
5900
+ "name": "WiFi",
5901
+ "id": "wifi",
5902
+ "unicode": "f1eb",
5903
+ "created": 4.2,
5904
+ "categories": [
5905
+ "Web Application Icons"
5906
+ ]
5907
+ },
5908
+ {
5909
+ "name": "Calculator",
5910
+ "id": "calculator",
5911
+ "unicode": "f1ec",
5912
+ "created": 4.2,
5913
+ "categories": [
5914
+ "Web Application Icons"
5915
+ ]
5916
+ },
5917
+ {
5918
+ "name": "Paypal",
5919
+ "id": "paypal",
5920
+ "unicode": "f1ed",
5921
+ "created": 4.2,
5922
+ "categories": [
5923
+ "Brand Icons",
5924
+ "Payment Icons"
5925
+ ]
5926
+ },
5927
+ {
5928
+ "name": "Google Wallet",
5929
+ "id": "google-wallet",
5930
+ "unicode": "f1ee",
5931
+ "created": 4.2,
5932
+ "categories": [
5933
+ "Brand Icons",
5934
+ "Payment Icons"
5935
+ ]
5936
+ },
5937
+ {
5938
+ "name": "Visa Credit Card",
5939
+ "id": "cc-visa",
5940
+ "unicode": "f1f0",
5941
+ "created": 4.2,
5942
+ "categories": [
5943
+ "Brand Icons",
5944
+ "Payment Icons"
5945
+ ]
5946
+ },
5947
+ {
5948
+ "name": "MasterCard Credit Card",
5949
+ "id": "cc-mastercard",
5950
+ "unicode": "f1f1",
5951
+ "created": 4.2,
5952
+ "categories": [
5953
+ "Brand Icons",
5954
+ "Payment Icons"
5955
+ ]
5956
+ },
5957
+ {
5958
+ "name": "Discover Credit Card",
5959
+ "id": "cc-discover",
5960
+ "unicode": "f1f2",
5961
+ "created": 4.2,
5962
+ "categories": [
5963
+ "Brand Icons",
5964
+ "Payment Icons"
5965
+ ]
5966
+ },
5967
+ {
5968
+ "name": "American Express Credit Card",
5969
+ "id": "cc-amex",
5970
+ "unicode": "f1f3",
5971
+ "created": 4.2,
5972
+ "filter": [
5973
+ "amex"
5974
+ ],
5975
+ "categories": [
5976
+ "Brand Icons",
5977
+ "Payment Icons"
5978
+ ]
5979
+ },
5980
+ {
5981
+ "name": "Paypal Credit Card",
5982
+ "id": "cc-paypal",
5983
+ "unicode": "f1f4",
5984
+ "created": 4.2,
5985
+ "categories": [
5986
+ "Brand Icons",
5987
+ "Payment Icons"
5988
+ ]
5989
+ },
5990
+ {
5991
+ "name": "Stripe Credit Card",
5992
+ "id": "cc-stripe",
5993
+ "unicode": "f1f5",
5994
+ "created": 4.2,
5995
+ "categories": [
5996
+ "Brand Icons",
5997
+ "Payment Icons"
5998
+ ]
5999
+ },
6000
+ {
6001
+ "name": "Bell Slash",
6002
+ "id": "bell-slash",
6003
+ "unicode": "f1f6",
6004
+ "created": 4.2,
6005
+ "categories": [
6006
+ "Web Application Icons"
6007
+ ]
6008
+ },
6009
+ {
6010
+ "name": "Bell Slash Outlined",
6011
+ "id": "bell-slash-o",
6012
+ "unicode": "f1f7",
6013
+ "created": 4.2,
6014
+ "categories": [
6015
+ "Web Application Icons"
6016
+ ]
6017
+ },
6018
+ {
6019
+ "name": "Trash",
6020
+ "id": "trash",
6021
+ "unicode": "f1f8",
6022
+ "created": 4.2,
6023
+ "filter": [
6024
+ "garbage",
6025
+ "delete",
6026
+ "remove",
6027
+ "hide"
6028
+ ],
6029
+ "categories": [
6030
+ "Web Application Icons"
6031
+ ]
6032
+ },
6033
+ {
6034
+ "name": "Copyright",
6035
+ "id": "copyright",
6036
+ "unicode": "f1f9",
6037
+ "created": 4.2,
6038
+ "categories": [
6039
+ "Web Application Icons"
6040
+ ]
6041
+ },
6042
+ {
6043
+ "name": "At",
6044
+ "id": "at",
6045
+ "unicode": "f1fa",
6046
+ "created": 4.2,
6047
+ "filter": [
6048
+ "email",
6049
+ "e-mail"
6050
+ ],
6051
+ "categories": [
6052
+ "Web Application Icons"
6053
+ ]
6054
+ },
6055
+ {
6056
+ "name": "Eyedropper",
6057
+ "id": "eyedropper",
6058
+ "unicode": "f1fb",
6059
+ "created": 4.2,
6060
+ "categories": [
6061
+ "Web Application Icons"
6062
+ ]
6063
+ },
6064
+ {
6065
+ "name": "Paint Brush",
6066
+ "id": "paint-brush",
6067
+ "unicode": "f1fc",
6068
+ "created": 4.2,
6069
+ "categories": [
6070
+ "Web Application Icons"
6071
+ ]
6072
+ },
6073
+ {
6074
+ "name": "Birthday Cake",
6075
+ "id": "birthday-cake",
6076
+ "unicode": "f1fd",
6077
+ "created": 4.2,
6078
+ "categories": [
6079
+ "Web Application Icons"
6080
+ ]
6081
+ },
6082
+ {
6083
+ "name": "Area Chart",
6084
+ "id": "area-chart",
6085
+ "unicode": "f1fe",
6086
+ "created": 4.2,
6087
+ "filter": [
6088
+ "graph",
6089
+ "analytics"
6090
+ ],
6091
+ "categories": [
6092
+ "Web Application Icons",
6093
+ "Chart Icons"
6094
+ ]
6095
+ },
6096
+ {
6097
+ "name": "Pie Chart",
6098
+ "id": "pie-chart",
6099
+ "unicode": "f200",
6100
+ "created": 4.2,
6101
+ "filter": [
6102
+ "graph",
6103
+ "analytics"
6104
+ ],
6105
+ "categories": [
6106
+ "Web Application Icons",
6107
+ "Chart Icons"
6108
+ ]
6109
+ },
6110
+ {
6111
+ "name": "Line Chart",
6112
+ "id": "line-chart",
6113
+ "unicode": "f201",
6114
+ "created": 4.2,
6115
+ "filter": [
6116
+ "graph",
6117
+ "analytics"
6118
+ ],
6119
+ "categories": [
6120
+ "Web Application Icons",
6121
+ "Chart Icons"
6122
+ ]
6123
+ },
6124
+ {
6125
+ "name": "last.fm",
6126
+ "id": "lastfm",
6127
+ "unicode": "f202",
6128
+ "created": 4.2,
6129
+ "categories": [
6130
+ "Brand Icons"
6131
+ ]
6132
+ },
6133
+ {
6134
+ "name": "last.fm Square",
6135
+ "id": "lastfm-square",
6136
+ "unicode": "f203",
6137
+ "created": 4.2,
6138
+ "categories": [
6139
+ "Brand Icons"
6140
+ ]
6141
+ },
6142
+ {
6143
+ "name": "Toggle Off",
6144
+ "id": "toggle-off",
6145
+ "unicode": "f204",
6146
+ "created": 4.2,
6147
+ "categories": [
6148
+ "Web Application Icons"
6149
+ ]
6150
+ },
6151
+ {
6152
+ "name": "Toggle On",
6153
+ "id": "toggle-on",
6154
+ "unicode": "f205",
6155
+ "created": 4.2,
6156
+ "categories": [
6157
+ "Web Application Icons"
6158
+ ]
6159
+ },
6160
+ {
6161
+ "name": "Bicycle",
6162
+ "id": "bicycle",
6163
+ "unicode": "f206",
6164
+ "created": 4.2,
6165
+ "filter": [
6166
+ "vehicle",
6167
+ "bike"
6168
+ ],
6169
+ "categories": [
6170
+ "Web Application Icons",
6171
+ "Transportation Icons"
6172
+ ]
6173
+ },
6174
+ {
6175
+ "name": "Bus",
6176
+ "id": "bus",
6177
+ "unicode": "f207",
6178
+ "created": 4.2,
6179
+ "filter": [
6180
+ "vehicle"
6181
+ ],
6182
+ "categories": [
6183
+ "Web Application Icons",
6184
+ "Transportation Icons"
6185
+ ]
6186
+ },
6187
+ {
6188
+ "name": "ioxhost",
6189
+ "id": "ioxhost",
6190
+ "unicode": "f208",
6191
+ "created": 4.2,
6192
+ "url": "ioxhost.co.uk",
6193
+ "categories": [
6194
+ "Brand Icons"
6195
+ ]
6196
+ },
6197
+ {
6198
+ "name": "AngelList",
6199
+ "id": "angellist",
6200
+ "unicode": "f209",
6201
+ "created": 4.2,
6202
+ "categories": [
6203
+ "Brand Icons"
6204
+ ]
6205
+ },
6206
+ {
6207
+ "name": "Closed Captions",
6208
+ "id": "cc",
6209
+ "unicode": "f20a",
6210
+ "created": 4.2,
6211
+ "categories": [
6212
+ "Web Application Icons",
6213
+ "Accessibility Icons"
6214
+ ]
6215
+ },
6216
+ {
6217
+ "name": "Shekel (ILS)",
6218
+ "id": "ils",
6219
+ "unicode": "f20b",
6220
+ "created": 4.2,
6221
+ "aliases": [
6222
+ "shekel",
6223
+ "sheqel"
6224
+ ],
6225
+ "categories": [
6226
+ "Currency Icons"
6227
+ ]
6228
+ },
6229
+ {
6230
+ "name": "meanpath",
6231
+ "id": "meanpath",
6232
+ "unicode": "f20c",
6233
+ "created": 4.2,
6234
+ "url": "meanpath.com",
6235
+ "categories": [
6236
+ "Brand Icons"
6237
+ ]
6238
+ },
6239
+ {
6240
+ "name": "BuySellAds",
6241
+ "id": "buysellads",
6242
+ "unicode": "f20d",
6243
+ "created": 4.3,
6244
+ "url": "buysellads.com",
6245
+ "categories": [
6246
+ "Brand Icons"
6247
+ ]
6248
+ },
6249
+ {
6250
+ "name": "Connect Develop",
6251
+ "id": "connectdevelop",
6252
+ "unicode": "f20e",
6253
+ "created": 4.3,
6254
+ "url": "connectdevelop.com",
6255
+ "categories": [
6256
+ "Brand Icons"
6257
+ ]
6258
+ },
6259
+ {
6260
+ "name": "DashCube",
6261
+ "id": "dashcube",
6262
+ "unicode": "f210",
6263
+ "created": 4.3,
6264
+ "url": "dashcube.com",
6265
+ "categories": [
6266
+ "Brand Icons"
6267
+ ]
6268
+ },
6269
+ {
6270
+ "name": "Forumbee",
6271
+ "id": "forumbee",
6272
+ "unicode": "f211",
6273
+ "created": 4.3,
6274
+ "url": "forumbee.com",
6275
+ "categories": [
6276
+ "Brand Icons"
6277
+ ]
6278
+ },
6279
+ {
6280
+ "name": "Leanpub",
6281
+ "id": "leanpub",
6282
+ "unicode": "f212",
6283
+ "created": 4.3,
6284
+ "url": "leanpub.com",
6285
+ "categories": [
6286
+ "Brand Icons"
6287
+ ]
6288
+ },
6289
+ {
6290
+ "name": "Sellsy",
6291
+ "id": "sellsy",
6292
+ "unicode": "f213",
6293
+ "created": 4.3,
6294
+ "url": "sellsy.com",
6295
+ "categories": [
6296
+ "Brand Icons"
6297
+ ]
6298
+ },
6299
+ {
6300
+ "name": "Shirts in Bulk",
6301
+ "id": "shirtsinbulk",
6302
+ "unicode": "f214",
6303
+ "created": 4.3,
6304
+ "url": "shirtsinbulk.com",
6305
+ "categories": [
6306
+ "Brand Icons"
6307
+ ]
6308
+ },
6309
+ {
6310
+ "name": "SimplyBuilt",
6311
+ "id": "simplybuilt",
6312
+ "unicode": "f215",
6313
+ "created": 4.3,
6314
+ "url": "simplybuilt.com",
6315
+ "categories": [
6316
+ "Brand Icons"
6317
+ ]
6318
+ },
6319
+ {
6320
+ "name": "skyatlas",
6321
+ "id": "skyatlas",
6322
+ "unicode": "f216",
6323
+ "created": 4.3,
6324
+ "url": "skyatlas.com",
6325
+ "categories": [
6326
+ "Brand Icons"
6327
+ ]
6328
+ },
6329
+ {
6330
+ "name": "Add to Shopping Cart",
6331
+ "id": "cart-plus",
6332
+ "unicode": "f217",
6333
+ "created": 4.3,
6334
+ "filter": [
6335
+ "add",
6336
+ "shopping"
6337
+ ],
6338
+ "categories": [
6339
+ "Web Application Icons"
6340
+ ]
6341
+ },
6342
+ {
6343
+ "name": "Shopping Cart Arrow Down",
6344
+ "id": "cart-arrow-down",
6345
+ "unicode": "f218",
6346
+ "created": 4.3,
6347
+ "filter": [
6348
+ "shopping"
6349
+ ],
6350
+ "categories": [
6351
+ "Web Application Icons"
6352
+ ]
6353
+ },
6354
+ {
6355
+ "name": "Diamond",
6356
+ "id": "diamond",
6357
+ "unicode": "f219",
6358
+ "created": 4.3,
6359
+ "filter": [
6360
+ "gem",
6361
+ "gemstone"
6362
+ ],
6363
+ "categories": [
6364
+ "Web Application Icons"
6365
+ ]
6366
+ },
6367
+ {
6368
+ "name": "Ship",
6369
+ "id": "ship",
6370
+ "unicode": "f21a",
6371
+ "created": 4.3,
6372
+ "filter": [
6373
+ "boat",
6374
+ "sea"
6375
+ ],
6376
+ "categories": [
6377
+ "Web Application Icons",
6378
+ "Transportation Icons"
6379
+ ]
6380
+ },
6381
+ {
6382
+ "name": "User Secret",
6383
+ "id": "user-secret",
6384
+ "unicode": "f21b",
6385
+ "created": 4.3,
6386
+ "filter": [
6387
+ "whisper",
6388
+ "spy",
6389
+ "incognito",
6390
+ "privacy"
6391
+ ],
6392
+ "categories": [
6393
+ "Web Application Icons"
6394
+ ]
6395
+ },
6396
+ {
6397
+ "name": "Motorcycle",
6398
+ "id": "motorcycle",
6399
+ "unicode": "f21c",
6400
+ "created": 4.3,
6401
+ "filter": [
6402
+ "vehicle",
6403
+ "bike"
6404
+ ],
6405
+ "categories": [
6406
+ "Web Application Icons",
6407
+ "Transportation Icons"
6408
+ ]
6409
+ },
6410
+ {
6411
+ "name": "Street View",
6412
+ "id": "street-view",
6413
+ "unicode": "f21d",
6414
+ "created": 4.3,
6415
+ "filter": [
6416
+ "map"
6417
+ ],
6418
+ "categories": [
6419
+ "Web Application Icons"
6420
+ ]
6421
+ },
6422
+ {
6423
+ "name": "Heartbeat",
6424
+ "id": "heartbeat",
6425
+ "unicode": "f21e",
6426
+ "created": 4.3,
6427
+ "filter": [
6428
+ "ekg"
6429
+ ],
6430
+ "categories": [
6431
+ "Web Application Icons",
6432
+ "Medical Icons"
6433
+ ]
6434
+ },
6435
+ {
6436
+ "name": "Venus",
6437
+ "id": "venus",
6438
+ "unicode": "f221",
6439
+ "created": 4.3,
6440
+ "filter": [
6441
+ "female"
6442
+ ],
6443
+ "categories": [
6444
+ "Gender Icons"
6445
+ ]
6446
+ },
6447
+ {
6448
+ "name": "Mars",
6449
+ "id": "mars",
6450
+ "unicode": "f222",
6451
+ "created": 4.3,
6452
+ "filter": [
6453
+ "male"
6454
+ ],
6455
+ "categories": [
6456
+ "Gender Icons"
6457
+ ]
6458
+ },
6459
+ {
6460
+ "name": "Mercury",
6461
+ "id": "mercury",
6462
+ "unicode": "f223",
6463
+ "created": 4.3,
6464
+ "filter": [
6465
+ "transgender"
6466
+ ],
6467
+ "categories": [
6468
+ "Gender Icons"
6469
+ ]
6470
+ },
6471
+ {
6472
+ "name": "Transgender",
6473
+ "id": "transgender",
6474
+ "unicode": "f224",
6475
+ "created": 4.3,
6476
+ "aliases": [
6477
+ "intersex"
6478
+ ],
6479
+ "categories": [
6480
+ "Gender Icons"
6481
+ ]
6482
+ },
6483
+ {
6484
+ "name": "Transgender Alt",
6485
+ "id": "transgender-alt",
6486
+ "unicode": "f225",
6487
+ "created": 4.3,
6488
+ "categories": [
6489
+ "Gender Icons"
6490
+ ]
6491
+ },
6492
+ {
6493
+ "name": "Venus Double",
6494
+ "id": "venus-double",
6495
+ "unicode": "f226",
6496
+ "created": 4.3,
6497
+ "categories": [
6498
+ "Gender Icons"
6499
+ ]
6500
+ },
6501
+ {
6502
+ "name": "Mars Double",
6503
+ "id": "mars-double",
6504
+ "unicode": "f227",
6505
+ "created": 4.3,
6506
+ "categories": [
6507
+ "Gender Icons"
6508
+ ]
6509
+ },
6510
+ {
6511
+ "name": "Venus Mars",
6512
+ "id": "venus-mars",
6513
+ "unicode": "f228",
6514
+ "created": 4.3,
6515
+ "categories": [
6516
+ "Gender Icons"
6517
+ ]
6518
+ },
6519
+ {
6520
+ "name": "Mars Stroke",
6521
+ "id": "mars-stroke",
6522
+ "unicode": "f229",
6523
+ "created": 4.3,
6524
+ "categories": [
6525
+ "Gender Icons"
6526
+ ]
6527
+ },
6528
+ {
6529
+ "name": "Mars Stroke Vertical",
6530
+ "id": "mars-stroke-v",
6531
+ "unicode": "f22a",
6532
+ "created": 4.3,
6533
+ "categories": [
6534
+ "Gender Icons"
6535
+ ]
6536
+ },
6537
+ {
6538
+ "name": "Mars Stroke Horizontal",
6539
+ "id": "mars-stroke-h",
6540
+ "unicode": "f22b",
6541
+ "created": 4.3,
6542
+ "categories": [
6543
+ "Gender Icons"
6544
+ ]
6545
+ },
6546
+ {
6547
+ "name": "Neuter",
6548
+ "id": "neuter",
6549
+ "unicode": "f22c",
6550
+ "created": 4.3,
6551
+ "categories": [
6552
+ "Gender Icons"
6553
+ ]
6554
+ },
6555
+ {
6556
+ "name": "Genderless",
6557
+ "id": "genderless",
6558
+ "unicode": "f22d",
6559
+ "created": 4.4,
6560
+ "categories": [
6561
+ "Gender Icons"
6562
+ ]
6563
+ },
6564
+ {
6565
+ "name": "Facebook Official",
6566
+ "id": "facebook-official",
6567
+ "unicode": "f230",
6568
+ "created": 4.3,
6569
+ "categories": [
6570
+ "Brand Icons"
6571
+ ]
6572
+ },
6573
+ {
6574
+ "name": "Pinterest P",
6575
+ "id": "pinterest-p",
6576
+ "unicode": "f231",
6577
+ "created": 4.3,
6578
+ "categories": [
6579
+ "Brand Icons"
6580
+ ]
6581
+ },
6582
+ {
6583
+ "name": "What's App",
6584
+ "id": "whatsapp",
6585
+ "unicode": "f232",
6586
+ "created": 4.3,
6587
+ "categories": [
6588
+ "Brand Icons"
6589
+ ]
6590
+ },
6591
+ {
6592
+ "name": "Server",
6593
+ "id": "server",
6594
+ "unicode": "f233",
6595
+ "created": 4.3,
6596
+ "categories": [
6597
+ "Web Application Icons"
6598
+ ]
6599
+ },
6600
+ {
6601
+ "name": "Add User",
6602
+ "id": "user-plus",
6603
+ "unicode": "f234",
6604
+ "created": 4.3,
6605
+ "filter": [
6606
+ "sign up",
6607
+ "signup"
6608
+ ],
6609
+ "categories": [
6610
+ "Web Application Icons"
6611
+ ]
6612
+ },
6613
+ {
6614
+ "name": "Remove User",
6615
+ "id": "user-times",
6616
+ "unicode": "f235",
6617
+ "created": 4.3,
6618
+ "categories": [
6619
+ "Web Application Icons"
6620
+ ]
6621
+ },
6622
+ {
6623
+ "name": "Bed",
6624
+ "id": "bed",
6625
+ "unicode": "f236",
6626
+ "created": 4.3,
6627
+ "filter": [
6628
+ "travel"
6629
+ ],
6630
+ "aliases": [
6631
+ "hotel"
6632
+ ],
6633
+ "categories": [
6634
+ "Web Application Icons"
6635
+ ]
6636
+ },
6637
+ {
6638
+ "name": "Viacoin",
6639
+ "id": "viacoin",
6640
+ "unicode": "f237",
6641
+ "created": 4.3,
6642
+ "url": "viacoin.org",
6643
+ "categories": [
6644
+ "Brand Icons"
6645
+ ]
6646
+ },
6647
+ {
6648
+ "name": "Train",
6649
+ "id": "train",
6650
+ "unicode": "f238",
6651
+ "created": 4.3,
6652
+ "categories": [
6653
+ "Transportation Icons"
6654
+ ]
6655
+ },
6656
+ {
6657
+ "name": "Subway",
6658
+ "id": "subway",
6659
+ "unicode": "f239",
6660
+ "created": 4.3,
6661
+ "categories": [
6662
+ "Transportation Icons"
6663
+ ]
6664
+ },
6665
+ {
6666
+ "name": "Medium",
6667
+ "id": "medium",
6668
+ "unicode": "f23a",
6669
+ "created": 4.3,
6670
+ "categories": [
6671
+ "Brand Icons"
6672
+ ]
6673
+ },
6674
+ {
6675
+ "name": "Y Combinator",
6676
+ "id": "y-combinator",
6677
+ "unicode": "f23b",
6678
+ "created": 4.4,
6679
+ "aliases": [
6680
+ "yc"
6681
+ ],
6682
+ "categories": [
6683
+ "Brand Icons"
6684
+ ]
6685
+ },
6686
+ {
6687
+ "name": "Optin Monster",
6688
+ "id": "optin-monster",
6689
+ "unicode": "f23c",
6690
+ "created": 4.4,
6691
+ "url": "optinmonster.com",
6692
+ "categories": [
6693
+ "Brand Icons"
6694
+ ]
6695
+ },
6696
+ {
6697
+ "name": "OpenCart",
6698
+ "id": "opencart",
6699
+ "unicode": "f23d",
6700
+ "created": 4.4,
6701
+ "url": "opencart.com",
6702
+ "categories": [
6703
+ "Brand Icons"
6704
+ ]
6705
+ },
6706
+ {
6707
+ "name": "ExpeditedSSL",
6708
+ "id": "expeditedssl",
6709
+ "unicode": "f23e",
6710
+ "created": 4.4,
6711
+ "categories": [
6712
+ "Brand Icons"
6713
+ ]
6714
+ },
6715
+ {
6716
+ "name": "Battery Full",
6717
+ "id": "battery-full",
6718
+ "unicode": "f240",
6719
+ "created": 4.4,
6720
+ "aliases": [
6721
+ "battery-4",
6722
+ "battery"
6723
+ ],
6724
+ "filter": [
6725
+ "power"
6726
+ ],
6727
+ "categories": [
6728
+ "Web Application Icons"
6729
+ ]
6730
+ },
6731
+ {
6732
+ "name": "Battery 3/4 Full",
6733
+ "id": "battery-three-quarters",
6734
+ "unicode": "f241",
6735
+ "created": 4.4,
6736
+ "aliases": [
6737
+ "battery-3"
6738
+ ],
6739
+ "filter": [
6740
+ "power"
6741
+ ],
6742
+ "categories": [
6743
+ "Web Application Icons"
6744
+ ]
6745
+ },
6746
+ {
6747
+ "name": "Battery 1/2 Full",
6748
+ "id": "battery-half",
6749
+ "unicode": "f242",
6750
+ "created": 4.4,
6751
+ "aliases": [
6752
+ "battery-2"
6753
+ ],
6754
+ "filter": [
6755
+ "power"
6756
+ ],
6757
+ "categories": [
6758
+ "Web Application Icons"
6759
+ ]
6760
+ },
6761
+ {
6762
+ "name": "Battery 1/4 Full",
6763
+ "id": "battery-quarter",
6764
+ "unicode": "f243",
6765
+ "created": 4.4,
6766
+ "aliases": [
6767
+ "battery-1"
6768
+ ],
6769
+ "filter": [
6770
+ "power"
6771
+ ],
6772
+ "categories": [
6773
+ "Web Application Icons"
6774
+ ]
6775
+ },
6776
+ {
6777
+ "name": "Battery Empty",
6778
+ "id": "battery-empty",
6779
+ "unicode": "f244",
6780
+ "created": 4.4,
6781
+ "aliases": [
6782
+ "battery-0"
6783
+ ],
6784
+ "filter": [
6785
+ "power"
6786
+ ],
6787
+ "categories": [
6788
+ "Web Application Icons"
6789
+ ]
6790
+ },
6791
+ {
6792
+ "name": "Mouse Pointer",
6793
+ "id": "mouse-pointer",
6794
+ "unicode": "f245",
6795
+ "created": 4.4,
6796
+ "categories": [
6797
+ "Web Application Icons"
6798
+ ]
6799
+ },
6800
+ {
6801
+ "name": "I Beam Cursor",
6802
+ "id": "i-cursor",
6803
+ "unicode": "f246",
6804
+ "created": 4.4,
6805
+ "categories": [
6806
+ "Web Application Icons"
6807
+ ]
6808
+ },
6809
+ {
6810
+ "name": "Object Group",
6811
+ "id": "object-group",
6812
+ "unicode": "f247",
6813
+ "created": 4.4,
6814
+ "categories": [
6815
+ "Web Application Icons"
6816
+ ]
6817
+ },
6818
+ {
6819
+ "name": "Object Ungroup",
6820
+ "id": "object-ungroup",
6821
+ "unicode": "f248",
6822
+ "created": 4.4,
6823
+ "categories": [
6824
+ "Web Application Icons"
6825
+ ]
6826
+ },
6827
+ {
6828
+ "name": "Sticky Note",
6829
+ "id": "sticky-note",
6830
+ "unicode": "f249",
6831
+ "created": 4.4,
6832
+ "categories": [
6833
+ "Web Application Icons"
6834
+ ]
6835
+ },
6836
+ {
6837
+ "name": "Sticky Note Outlined",
6838
+ "id": "sticky-note-o",
6839
+ "unicode": "f24a",
6840
+ "created": 4.4,
6841
+ "categories": [
6842
+ "Web Application Icons"
6843
+ ]
6844
+ },
6845
+ {
6846
+ "name": "JCB Credit Card",
6847
+ "id": "cc-jcb",
6848
+ "unicode": "f24b",
6849
+ "created": 4.4,
6850
+ "categories": [
6851
+ "Brand Icons",
6852
+ "Payment Icons"
6853
+ ]
6854
+ },
6855
+ {
6856
+ "name": "Diner's Club Credit Card",
6857
+ "id": "cc-diners-club",
6858
+ "unicode": "f24c",
6859
+ "created": 4.4,
6860
+ "categories": [
6861
+ "Brand Icons",
6862
+ "Payment Icons"
6863
+ ]
6864
+ },
6865
+ {
6866
+ "name": "Clone",
6867
+ "id": "clone",
6868
+ "unicode": "f24d",
6869
+ "created": 4.4,
6870
+ "filter": [
6871
+ "copy"
6872
+ ],
6873
+ "categories": [
6874
+ "Web Application Icons"
6875
+ ]
6876
+ },
6877
+ {
6878
+ "name": "Balance Scale",
6879
+ "id": "balance-scale",
6880
+ "unicode": "f24e",
6881
+ "created": 4.4,
6882
+ "categories": [
6883
+ "Web Application Icons"
6884
+ ]
6885
+ },
6886
+ {
6887
+ "name": "Hourglass Outlined",
6888
+ "id": "hourglass-o",
6889
+ "unicode": "f250",
6890
+ "created": 4.4,
6891
+ "categories": [
6892
+ "Web Application Icons"
6893
+ ]
6894
+ },
6895
+ {
6896
+ "name": "Hourglass Start",
6897
+ "id": "hourglass-start",
6898
+ "unicode": "f251",
6899
+ "created": 4.4,
6900
+ "aliases": [
6901
+ "hourglass-1"
6902
+ ],
6903
+ "categories": [
6904
+ "Web Application Icons"
6905
+ ]
6906
+ },
6907
+ {
6908
+ "name": "Hourglass Half",
6909
+ "id": "hourglass-half",
6910
+ "unicode": "f252",
6911
+ "created": 4.4,
6912
+ "aliases": [
6913
+ "hourglass-2"
6914
+ ],
6915
+ "categories": [
6916
+ "Web Application Icons"
6917
+ ]
6918
+ },
6919
+ {
6920
+ "name": "Hourglass End",
6921
+ "id": "hourglass-end",
6922
+ "unicode": "f253",
6923
+ "created": 4.4,
6924
+ "aliases": [
6925
+ "hourglass-3"
6926
+ ],
6927
+ "categories": [
6928
+ "Web Application Icons"
6929
+ ]
6930
+ },
6931
+ {
6932
+ "name": "Hourglass",
6933
+ "id": "hourglass",
6934
+ "unicode": "f254",
6935
+ "created": 4.4,
6936
+ "categories": [
6937
+ "Web Application Icons"
6938
+ ]
6939
+ },
6940
+ {
6941
+ "name": "Rock (Hand)",
6942
+ "id": "hand-rock-o",
6943
+ "unicode": "f255",
6944
+ "created": 4.4,
6945
+ "aliases": [
6946
+ "hand-grab-o"
6947
+ ],
6948
+ "categories": [
6949
+ "Web Application Icons",
6950
+ "Hand Icons"
6951
+ ]
6952
+ },
6953
+ {
6954
+ "name": "Paper (Hand)",
6955
+ "id": "hand-paper-o",
6956
+ "unicode": "f256",
6957
+ "created": 4.4,
6958
+ "aliases": [
6959
+ "hand-stop-o"
6960
+ ],
6961
+ "filter": [
6962
+ "stop"
6963
+ ],
6964
+ "categories": [
6965
+ "Web Application Icons",
6966
+ "Hand Icons"
6967
+ ]
6968
+ },
6969
+ {
6970
+ "name": "Scissors (Hand)",
6971
+ "id": "hand-scissors-o",
6972
+ "unicode": "f257",
6973
+ "created": 4.4,
6974
+ "categories": [
6975
+ "Web Application Icons",
6976
+ "Hand Icons"
6977
+ ]
6978
+ },
6979
+ {
6980
+ "name": "Lizard (Hand)",
6981
+ "id": "hand-lizard-o",
6982
+ "unicode": "f258",
6983
+ "created": 4.4,
6984
+ "categories": [
6985
+ "Web Application Icons",
6986
+ "Hand Icons"
6987
+ ]
6988
+ },
6989
+ {
6990
+ "name": "Spock (Hand)",
6991
+ "id": "hand-spock-o",
6992
+ "unicode": "f259",
6993
+ "created": 4.4,
6994
+ "categories": [
6995
+ "Web Application Icons",
6996
+ "Hand Icons"
6997
+ ]
6998
+ },
6999
+ {
7000
+ "name": "Hand Pointer",
7001
+ "id": "hand-pointer-o",
7002
+ "unicode": "f25a",
7003
+ "created": 4.4,
7004
+ "categories": [
7005
+ "Web Application Icons",
7006
+ "Hand Icons"
7007
+ ]
7008
+ },
7009
+ {
7010
+ "name": "Hand Peace",
7011
+ "id": "hand-peace-o",
7012
+ "unicode": "f25b",
7013
+ "created": 4.4,
7014
+ "categories": [
7015
+ "Web Application Icons",
7016
+ "Hand Icons"
7017
+ ]
7018
+ },
7019
+ {
7020
+ "name": "Trademark",
7021
+ "id": "trademark",
7022
+ "unicode": "f25c",
7023
+ "created": 4.4,
7024
+ "categories": [
7025
+ "Web Application Icons"
7026
+ ]
7027
+ },
7028
+ {
7029
+ "name": "Registered Trademark",
7030
+ "id": "registered",
7031
+ "unicode": "f25d",
7032
+ "created": 4.4,
7033
+ "categories": [
7034
+ "Web Application Icons"
7035
+ ]
7036
+ },
7037
+ {
7038
+ "name": "Creative Commons",
7039
+ "id": "creative-commons",
7040
+ "unicode": "f25e",
7041
+ "created": 4.4,
7042
+ "categories": [
7043
+ "Web Application Icons"
7044
+ ]
7045
+ },
7046
+ {
7047
+ "name": "GG Currency",
7048
+ "id": "gg",
7049
+ "unicode": "f260",
7050
+ "created": 4.4,
7051
+ "categories": [
7052
+ "Currency Icons",
7053
+ "Brand Icons"
7054
+ ]
7055
+ },
7056
+ {
7057
+ "name": "GG Currency Circle",
7058
+ "id": "gg-circle",
7059
+ "unicode": "f261",
7060
+ "created": 4.4,
7061
+ "categories": [
7062
+ "Currency Icons",
7063
+ "Brand Icons"
7064
+ ]
7065
+ },
7066
+ {
7067
+ "name": "TripAdvisor",
7068
+ "id": "tripadvisor",
7069
+ "unicode": "f262",
7070
+ "created": 4.4,
7071
+ "categories": [
7072
+ "Brand Icons"
7073
+ ]
7074
+ },
7075
+ {
7076
+ "name": "Odnoklassniki",
7077
+ "id": "odnoklassniki",
7078
+ "unicode": "f263",
7079
+ "created": 4.4,
7080
+ "categories": [
7081
+ "Brand Icons"
7082
+ ]
7083
+ },
7084
+ {
7085
+ "name": "Odnoklassniki Square",
7086
+ "id": "odnoklassniki-square",
7087
+ "unicode": "f264",
7088
+ "created": 4.4,
7089
+ "categories": [
7090
+ "Brand Icons"
7091
+ ]
7092
+ },
7093
+ {
7094
+ "name": "Get Pocket",
7095
+ "id": "get-pocket",
7096
+ "unicode": "f265",
7097
+ "created": 4.4,
7098
+ "categories": [
7099
+ "Brand Icons"
7100
+ ]
7101
+ },
7102
+ {
7103
+ "name": "Wikipedia W",
7104
+ "id": "wikipedia-w",
7105
+ "unicode": "f266",
7106
+ "created": 4.4,
7107
+ "categories": [
7108
+ "Brand Icons"
7109
+ ]
7110
+ },
7111
+ {
7112
+ "name": "Safari",
7113
+ "id": "safari",
7114
+ "unicode": "f267",
7115
+ "created": 4.4,
7116
+ "filter": [
7117
+ "browser"
7118
+ ],
7119
+ "categories": [
7120
+ "Brand Icons"
7121
+ ]
7122
+ },
7123
+ {
7124
+ "name": "Chrome",
7125
+ "id": "chrome",
7126
+ "unicode": "f268",
7127
+ "created": 4.4,
7128
+ "filter": [
7129
+ "browser"
7130
+ ],
7131
+ "categories": [
7132
+ "Brand Icons"
7133
+ ]
7134
+ },
7135
+ {
7136
+ "name": "Firefox",
7137
+ "id": "firefox",
7138
+ "unicode": "f269",
7139
+ "created": 4.4,
7140
+ "filter": [
7141
+ "browser"
7142
+ ],
7143
+ "categories": [
7144
+ "Brand Icons"
7145
+ ]
7146
+ },
7147
+ {
7148
+ "name": "Opera",
7149
+ "id": "opera",
7150
+ "unicode": "f26a",
7151
+ "created": 4.4,
7152
+ "categories": [
7153
+ "Brand Icons"
7154
+ ]
7155
+ },
7156
+ {
7157
+ "name": "Internet-explorer",
7158
+ "id": "internet-explorer",
7159
+ "unicode": "f26b",
7160
+ "created": 4.4,
7161
+ "filter": [
7162
+ "browser",
7163
+ "ie"
7164
+ ],
7165
+ "categories": [
7166
+ "Brand Icons"
7167
+ ]
7168
+ },
7169
+ {
7170
+ "name": "Television",
7171
+ "id": "television",
7172
+ "unicode": "f26c",
7173
+ "created": 4.4,
7174
+ "aliases": [
7175
+ "tv"
7176
+ ],
7177
+ "filter": [
7178
+ "display",
7179
+ "computer",
7180
+ "monitor"
7181
+ ],
7182
+ "categories": [
7183
+ "Web Application Icons"
7184
+ ]
7185
+ },
7186
+ {
7187
+ "name": "Contao",
7188
+ "id": "contao",
7189
+ "unicode": "f26d",
7190
+ "created": 4.4,
7191
+ "categories": [
7192
+ "Brand Icons"
7193
+ ]
7194
+ },
7195
+ {
7196
+ "name": "500px",
7197
+ "id": "500px",
7198
+ "unicode": "f26e",
7199
+ "created": 4.4,
7200
+ "categories": [
7201
+ "Brand Icons"
7202
+ ]
7203
+ },
7204
+ {
7205
+ "name": "Amazon",
7206
+ "id": "amazon",
7207
+ "unicode": "f270",
7208
+ "created": 4.4,
7209
+ "categories": [
7210
+ "Brand Icons"
7211
+ ]
7212
+ },
7213
+ {
7214
+ "name": "Calendar Plus Outlined",
7215
+ "id": "calendar-plus-o",
7216
+ "unicode": "f271",
7217
+ "created": 4.4,
7218
+ "categories": [
7219
+ "Web Application Icons"
7220
+ ]
7221
+ },
7222
+ {
7223
+ "name": "Calendar Minus Outlined",
7224
+ "id": "calendar-minus-o",
7225
+ "unicode": "f272",
7226
+ "created": 4.4,
7227
+ "categories": [
7228
+ "Web Application Icons"
7229
+ ]
7230
+ },
7231
+ {
7232
+ "name": "Calendar Times Outlined",
7233
+ "id": "calendar-times-o",
7234
+ "unicode": "f273",
7235
+ "created": 4.4,
7236
+ "categories": [
7237
+ "Web Application Icons"
7238
+ ]
7239
+ },
7240
+ {
7241
+ "name": "Calendar Check Outlined",
7242
+ "id": "calendar-check-o",
7243
+ "unicode": "f274",
7244
+ "created": 4.4,
7245
+ "filter": [
7246
+ "ok"
7247
+ ],
7248
+ "categories": [
7249
+ "Web Application Icons"
7250
+ ]
7251
+ },
7252
+ {
7253
+ "name": "Industry",
7254
+ "id": "industry",
7255
+ "unicode": "f275",
7256
+ "created": 4.4,
7257
+ "filter": [
7258
+ "factory"
7259
+ ],
7260
+ "categories": [
7261
+ "Web Application Icons"
7262
+ ]
7263
+ },
7264
+ {
7265
+ "name": "Map Pin",
7266
+ "id": "map-pin",
7267
+ "unicode": "f276",
7268
+ "created": 4.4,
7269
+ "categories": [
7270
+ "Web Application Icons"
7271
+ ]
7272
+ },
7273
+ {
7274
+ "name": "Map Signs",
7275
+ "id": "map-signs",
7276
+ "unicode": "f277",
7277
+ "created": 4.4,
7278
+ "categories": [
7279
+ "Web Application Icons"
7280
+ ]
7281
+ },
7282
+ {
7283
+ "name": "Map Outlined",
7284
+ "id": "map-o",
7285
+ "unicode": "f278",
7286
+ "created": 4.4,
7287
+ "categories": [
7288
+ "Web Application Icons"
7289
+ ]
7290
+ },
7291
+ {
7292
+ "name": "Map",
7293
+ "id": "map",
7294
+ "unicode": "f279",
7295
+ "created": 4.4,
7296
+ "categories": [
7297
+ "Web Application Icons"
7298
+ ]
7299
+ },
7300
+ {
7301
+ "name": "Commenting",
7302
+ "id": "commenting",
7303
+ "unicode": "f27a",
7304
+ "created": 4.4,
7305
+ "filter": [
7306
+ "speech",
7307
+ "notification",
7308
+ "note",
7309
+ "chat",
7310
+ "bubble",
7311
+ "feedback",
7312
+ "message",
7313
+ "texting",
7314
+ "sms",
7315
+ "conversation"
7316
+ ],
7317
+ "categories": [
7318
+ "Web Application Icons"
7319
+ ]
7320
+ },
7321
+ {
7322
+ "name": "Commenting Outlined",
7323
+ "id": "commenting-o",
7324
+ "unicode": "f27b",
7325
+ "created": 4.4,
7326
+ "filter": [
7327
+ "speech",
7328
+ "notification",
7329
+ "note",
7330
+ "chat",
7331
+ "bubble",
7332
+ "feedback",
7333
+ "message",
7334
+ "texting",
7335
+ "sms",
7336
+ "conversation"
7337
+ ],
7338
+ "categories": [
7339
+ "Web Application Icons"
7340
+ ]
7341
+ },
7342
+ {
7343
+ "name": "Houzz",
7344
+ "id": "houzz",
7345
+ "unicode": "f27c",
7346
+ "created": 4.4,
7347
+ "categories": [
7348
+ "Brand Icons"
7349
+ ]
7350
+ },
7351
+ {
7352
+ "name": "Vimeo",
7353
+ "id": "vimeo",
7354
+ "unicode": "f27d",
7355
+ "created": 4.4,
7356
+ "categories": [
7357
+ "Brand Icons"
7358
+ ]
7359
+ },
7360
+ {
7361
+ "name": "Font Awesome Black Tie",
7362
+ "id": "black-tie",
7363
+ "unicode": "f27e",
7364
+ "created": 4.4,
7365
+ "url": "blacktie.io",
7366
+ "categories": [
7367
+ "Brand Icons"
7368
+ ]
7369
+ },
7370
+ {
7371
+ "name": "Fonticons",
7372
+ "id": "fonticons",
7373
+ "unicode": "f280",
7374
+ "created": 4.4,
7375
+ "url": "fonticons.com",
7376
+ "categories": [
7377
+ "Brand Icons"
7378
+ ]
7379
+ },
7380
+ {
7381
+ "name": "reddit Alien",
7382
+ "id": "reddit-alien",
7383
+ "unicode": "f281",
7384
+ "created": 4.5,
7385
+ "categories": [
7386
+ "Brand Icons"
7387
+ ]
7388
+ },
7389
+ {
7390
+ "name": "Edge Browser",
7391
+ "id": "edge",
7392
+ "unicode": "f282",
7393
+ "created": 4.5,
7394
+ "filter": [
7395
+ "browser",
7396
+ "ie"
7397
+ ],
7398
+ "categories": [
7399
+ "Brand Icons"
7400
+ ]
7401
+ },
7402
+ {
7403
+ "name": "Credit Card",
7404
+ "id": "credit-card-alt",
7405
+ "unicode": "f283",
7406
+ "created": 4.5,
7407
+ "filter": [
7408
+ "money",
7409
+ "buy",
7410
+ "debit",
7411
+ "checkout",
7412
+ "purchase",
7413
+ "payment",
7414
+ "credit card"
7415
+ ],
7416
+ "categories": [
7417
+ "Payment Icons",
7418
+ "Web Application Icons"
7419
+ ]
7420
+ },
7421
+ {
7422
+ "name": "Codie Pie",
7423
+ "id": "codiepie",
7424
+ "unicode": "f284",
7425
+ "created": 4.5,
7426
+ "url": "codiepie.com",
7427
+ "categories": [
7428
+ "Brand Icons"
7429
+ ]
7430
+ },
7431
+ {
7432
+ "name": "MODX",
7433
+ "id": "modx",
7434
+ "unicode": "f285",
7435
+ "created": 4.5,
7436
+ "categories": [
7437
+ "Brand Icons"
7438
+ ]
7439
+ },
7440
+ {
7441
+ "name": "Fort Awesome",
7442
+ "id": "fort-awesome",
7443
+ "unicode": "f286",
7444
+ "created": 4.5,
7445
+ "url": "fortawesome.com",
7446
+ "categories": [
7447
+ "Brand Icons"
7448
+ ]
7449
+ },
7450
+ {
7451
+ "name": "USB",
7452
+ "id": "usb",
7453
+ "unicode": "f287",
7454
+ "created": 4.5,
7455
+ "categories": [
7456
+ "Brand Icons"
7457
+ ]
7458
+ },
7459
+ {
7460
+ "name": "Product Hunt",
7461
+ "id": "product-hunt",
7462
+ "unicode": "f288",
7463
+ "created": 4.5,
7464
+ "categories": [
7465
+ "Brand Icons"
7466
+ ]
7467
+ },
7468
+ {
7469
+ "name": "Mixcloud",
7470
+ "id": "mixcloud",
7471
+ "unicode": "f289",
7472
+ "created": 4.5,
7473
+ "categories": [
7474
+ "Brand Icons"
7475
+ ]
7476
+ },
7477
+ {
7478
+ "name": "Scribd",
7479
+ "id": "scribd",
7480
+ "unicode": "f28a",
7481
+ "created": 4.5,
7482
+ "categories": [
7483
+ "Brand Icons"
7484
+ ]
7485
+ },
7486
+ {
7487
+ "name": "Pause Circle",
7488
+ "id": "pause-circle",
7489
+ "unicode": "f28b",
7490
+ "created": 4.5,
7491
+ "categories": [
7492
+ "Video Player Icons"
7493
+ ]
7494
+ },
7495
+ {
7496
+ "name": "Pause Circle Outlined",
7497
+ "id": "pause-circle-o",
7498
+ "unicode": "f28c",
7499
+ "created": 4.5,
7500
+ "categories": [
7501
+ "Video Player Icons"
7502
+ ]
7503
+ },
7504
+ {
7505
+ "name": "Stop Circle",
7506
+ "id": "stop-circle",
7507
+ "unicode": "f28d",
7508
+ "created": 4.5,
7509
+ "categories": [
7510
+ "Video Player Icons"
7511
+ ]
7512
+ },
7513
+ {
7514
+ "name": "Stop Circle Outlined",
7515
+ "id": "stop-circle-o",
7516
+ "unicode": "f28e",
7517
+ "created": 4.5,
7518
+ "categories": [
7519
+ "Video Player Icons"
7520
+ ]
7521
+ },
7522
+ {
7523
+ "name": "Shopping Bag",
7524
+ "id": "shopping-bag",
7525
+ "unicode": "f290",
7526
+ "created": 4.5,
7527
+ "categories": [
7528
+ "Web Application Icons"
7529
+ ]
7530
+ },
7531
+ {
7532
+ "name": "Shopping Basket",
7533
+ "id": "shopping-basket",
7534
+ "unicode": "f291",
7535
+ "created": 4.5,
7536
+ "categories": [
7537
+ "Web Application Icons"
7538
+ ]
7539
+ },
7540
+ {
7541
+ "name": "Hashtag",
7542
+ "id": "hashtag",
7543
+ "unicode": "f292",
7544
+ "created": 4.5,
7545
+ "categories": [
7546
+ "Web Application Icons"
7547
+ ]
7548
+ },
7549
+ {
7550
+ "name": "Bluetooth",
7551
+ "id": "bluetooth",
7552
+ "unicode": "f293",
7553
+ "created": 4.5,
7554
+ "categories": [
7555
+ "Web Application Icons",
7556
+ "Brand Icons"
7557
+ ]
7558
+ },
7559
+ {
7560
+ "name": "Bluetooth",
7561
+ "id": "bluetooth-b",
7562
+ "unicode": "f294",
7563
+ "created": 4.5,
7564
+ "categories": [
7565
+ "Web Application Icons",
7566
+ "Brand Icons"
7567
+ ]
7568
+ },
7569
+ {
7570
+ "name": "Percent",
7571
+ "id": "percent",
7572
+ "unicode": "f295",
7573
+ "created": 4.5,
7574
+ "categories": [
7575
+ "Web Application Icons"
7576
+ ]
7577
+ },
7578
+ {
7579
+ "name": "GitLab",
7580
+ "id": "gitlab",
7581
+ "unicode": "f296",
7582
+ "created": 4.6,
7583
+ "url": "gitlab.com",
7584
+ "categories": [
7585
+ "Brand Icons"
7586
+ ]
7587
+ },
7588
+ {
7589
+ "name": "WPBeginner",
7590
+ "id": "wpbeginner",
7591
+ "unicode": "f297",
7592
+ "created": 4.6,
7593
+ "url": "wpbeginner.com",
7594
+ "categories": [
7595
+ "Brand Icons"
7596
+ ]
7597
+ },
7598
+ {
7599
+ "name": "WPForms",
7600
+ "id": "wpforms",
7601
+ "unicode": "f298",
7602
+ "created": 4.6,
7603
+ "url": "wpforms.com",
7604
+ "categories": [
7605
+ "Brand Icons"
7606
+ ]
7607
+ },
7608
+ {
7609
+ "name": "Envira Gallery",
7610
+ "id": "envira",
7611
+ "unicode": "f299",
7612
+ "created": 4.6,
7613
+ "url": "enviragallery.com",
7614
+ "filter": [
7615
+ "leaf"
7616
+ ],
7617
+ "categories": [
7618
+ "Brand Icons"
7619
+ ]
7620
+ },
7621
+ {
7622
+ "name": "Universal Access",
7623
+ "id": "universal-access",
7624
+ "unicode": "f29a",
7625
+ "created": 4.6,
7626
+ "categories": [
7627
+ "Web Application Icons",
7628
+ "Accessibility Icons"
7629
+ ]
7630
+ },
7631
+ {
7632
+ "name": "Wheelchair Alt",
7633
+ "id": "wheelchair-alt",
7634
+ "unicode": "f29b",
7635
+ "created": 4.6,
7636
+ "filter": [
7637
+ "handicap",
7638
+ "person"
7639
+ ],
7640
+ "categories": [
7641
+ "Web Application Icons",
7642
+ "Medical Icons",
7643
+ "Transportation Icons",
7644
+ "Accessibility Icons"
7645
+ ]
7646
+ },
7647
+ {
7648
+ "name": "Question Circle Outlined",
7649
+ "id": "question-circle-o",
7650
+ "unicode": "f29c",
7651
+ "created": 4.6,
7652
+ "categories": [
7653
+ "Web Application Icons",
7654
+ "Accessibility Icons"
7655
+ ]
7656
+ },
7657
+ {
7658
+ "name": "Blind",
7659
+ "id": "blind",
7660
+ "unicode": "f29d",
7661
+ "created": 4.6,
7662
+ "categories": [
7663
+ "Web Application Icons",
7664
+ "Accessibility Icons"
7665
+ ]
7666
+ },
7667
+ {
7668
+ "name": "Audio Description",
7669
+ "id": "audio-description",
7670
+ "unicode": "f29e",
7671
+ "created": 4.6,
7672
+ "categories": [
7673
+ "Web Application Icons",
7674
+ "Accessibility Icons"
7675
+ ]
7676
+ },
7677
+ {
7678
+ "name": "Volume Control Phone",
7679
+ "id": "volume-control-phone",
7680
+ "unicode": "f2a0",
7681
+ "created": 4.6,
7682
+ "filter": [
7683
+ "telephone"
7684
+ ],
7685
+ "categories": [
7686
+ "Web Application Icons",
7687
+ "Accessibility Icons"
7688
+ ]
7689
+ },
7690
+ {
7691
+ "name": "Braille",
7692
+ "id": "braille",
7693
+ "unicode": "f2a1",
7694
+ "created": 4.6,
7695
+ "categories": [
7696
+ "Web Application Icons",
7697
+ "Accessibility Icons"
7698
+ ]
7699
+ },
7700
+ {
7701
+ "name": "Assistive Listening Systems",
7702
+ "id": "assistive-listening-systems",
7703
+ "unicode": "f2a2",
7704
+ "created": 4.6,
7705
+ "categories": [
7706
+ "Web Application Icons",
7707
+ "Accessibility Icons"
7708
+ ]
7709
+ },
7710
+ {
7711
+ "name": "American Sign Language Interpreting",
7712
+ "id": "american-sign-language-interpreting",
7713
+ "unicode": "f2a3",
7714
+ "created": 4.6,
7715
+ "aliases": [
7716
+ "asl-interpreting"
7717
+ ],
7718
+ "categories": [
7719
+ "Web Application Icons",
7720
+ "Accessibility Icons"
7721
+ ]
7722
+ },
7723
+ {
7724
+ "name": "Deaf",
7725
+ "id": "deaf",
7726
+ "unicode": "f2a4",
7727
+ "created": 4.6,
7728
+ "aliases": [
7729
+ "deafness",
7730
+ "hard-of-hearing"
7731
+ ],
7732
+ "categories": [
7733
+ "Web Application Icons",
7734
+ "Accessibility Icons"
7735
+ ]
7736
+ },
7737
+ {
7738
+ "name": "Glide",
7739
+ "id": "glide",
7740
+ "unicode": "f2a5",
7741
+ "created": 4.6,
7742
+ "categories": [
7743
+ "Brand Icons"
7744
+ ]
7745
+ },
7746
+ {
7747
+ "name": "Glide G",
7748
+ "id": "glide-g",
7749
+ "unicode": "f2a6",
7750
+ "created": 4.6,
7751
+ "categories": [
7752
+ "Brand Icons"
7753
+ ]
7754
+ },
7755
+ {
7756
+ "name": "Sign Language",
7757
+ "id": "sign-language",
7758
+ "unicode": "f2a7",
7759
+ "created": 4.6,
7760
+ "aliases": [
7761
+ "signing"
7762
+ ],
7763
+ "categories": [
7764
+ "Web Application Icons",
7765
+ "Accessibility Icons"
7766
+ ]
7767
+ },
7768
+ {
7769
+ "name": "Low Vision",
7770
+ "id": "low-vision",
7771
+ "unicode": "f2a8",
7772
+ "created": 4.6,
7773
+ "categories": [
7774
+ "Web Application Icons",
7775
+ "Accessibility Icons"
7776
+ ]
7777
+ },
7778
+ {
7779
+ "name": "Viadeo",
7780
+ "id": "viadeo",
7781
+ "unicode": "f2a9",
7782
+ "created": 4.6,
7783
+ "categories": [
7784
+ "Brand Icons"
7785
+ ]
7786
+ },
7787
+ {
7788
+ "name": "Viadeo Square",
7789
+ "id": "viadeo-square",
7790
+ "unicode": "f2aa",
7791
+ "created": 4.6,
7792
+ "categories": [
7793
+ "Brand Icons"
7794
+ ]
7795
+ },
7796
+ {
7797
+ "name": "Snapchat",
7798
+ "id": "snapchat",
7799
+ "unicode": "f2ab",
7800
+ "created": 4.6,
7801
+ "categories": [
7802
+ "Brand Icons"
7803
+ ]
7804
+ },
7805
+ {
7806
+ "name": "Snapchat Ghost",
7807
+ "id": "snapchat-ghost",
7808
+ "unicode": "f2ac",
7809
+ "created": 4.6,
7810
+ "categories": [
7811
+ "Brand Icons"
7812
+ ]
7813
+ },
7814
+ {
7815
+ "name": "Snapchat Square",
7816
+ "id": "snapchat-square",
7817
+ "unicode": "f2ad",
7818
+ "created": 4.6,
7819
+ "categories": [
7820
+ "Brand Icons"
7821
+ ]
7822
+ },
7823
+ {
7824
+ "name": "Pied Piper Logo",
7825
+ "id": "pied-piper",
7826
+ "unicode": "f2ae",
7827
+ "created": 4.6,
7828
+ "categories": [
7829
+ "Brand Icons"
7830
+ ]
7831
+ },
7832
+ {
7833
+ "name": "First Order",
7834
+ "id": "first-order",
7835
+ "unicode": "f2b0",
7836
+ "created": 4.6,
7837
+ "categories": [
7838
+ "Brand Icons"
7839
+ ]
7840
+ },
7841
+ {
7842
+ "name": "Yoast",
7843
+ "id": "yoast",
7844
+ "unicode": "f2b1",
7845
+ "created": 4.6,
7846
+ "url": "yoast.com",
7847
+ "categories": [
7848
+ "Brand Icons"
7849
+ ]
7850
+ },
7851
+ {
7852
+ "name": "ThemeIsle",
7853
+ "id": "themeisle",
7854
+ "unicode": "f2b2",
7855
+ "created": 4.6,
7856
+ "url": "themeisle.com",
7857
+ "categories": [
7858
+ "Brand Icons"
7859
+ ]
7860
+ },
7861
+ {
7862
+ "name": "Google Plus Official",
7863
+ "id": "google-plus-official",
7864
+ "unicode": "f2b3",
7865
+ "created": 4.6,
7866
+ "aliases": [
7867
+ "google-plus-circle"
7868
+ ],
7869
+ "categories": [
7870
+ "Brand Icons"
7871
+ ]
7872
+ },
7873
+ {
7874
+ "name": "Font Awesome",
7875
+ "id": "font-awesome",
7876
+ "unicode": "f2b4",
7877
+ "created": 4.6,
7878
+ "aliases": [
7879
+ "fa"
7880
+ ],
7881
+ "categories": [
7882
+ "Brand Icons"
7883
+ ]
7884
+ },
7885
+ {
7886
+ "name": "Handshake Outlined",
7887
+ "id": "handshake-o",
7888
+ "unicode": "f2b5",
7889
+ "created": 4.7,
7890
+ "categories": [
7891
+ "Web Application Icons"
7892
+ ]
7893
+ },
7894
+ {
7895
+ "name": "Envelope Open",
7896
+ "id": "envelope-open",
7897
+ "unicode": "f2b6",
7898
+ "created": 4.7,
7899
+ "filter": [
7900
+ "email",
7901
+ "e-mail",
7902
+ "letter",
7903
+ "support",
7904
+ "mail",
7905
+ "message",
7906
+ "notification"
7907
+ ],
7908
+ "categories": [
7909
+ "Web Application Icons"
7910
+ ]
7911
+ },
7912
+ {
7913
+ "name": "Envelope Open Outlined",
7914
+ "id": "envelope-open-o",
7915
+ "unicode": "f2b7",
7916
+ "created": 4.7,
7917
+ "filter": [
7918
+ "email",
7919
+ "e-mail",
7920
+ "letter",
7921
+ "support",
7922
+ "mail",
7923
+ "message",
7924
+ "notification"
7925
+ ],
7926
+ "categories": [
7927
+ "Web Application Icons"
7928
+ ]
7929
+ },
7930
+ {
7931
+ "name": "Linode",
7932
+ "id": "linode",
7933
+ "unicode": "f2b8",
7934
+ "created": 4.7,
7935
+ "url": "linode.com",
7936
+ "categories": [
7937
+ "Brand Icons"
7938
+ ]
7939
+ },
7940
+ {
7941
+ "name": "Address Book",
7942
+ "id": "address-book",
7943
+ "unicode": "f2b9",
7944
+ "created": 4.7,
7945
+ "categories": [
7946
+ "Web Application Icons"
7947
+ ]
7948
+ },
7949
+ {
7950
+ "name": "Address Book Outlined",
7951
+ "id": "address-book-o",
7952
+ "unicode": "f2ba",
7953
+ "created": 4.7,
7954
+ "categories": [
7955
+ "Web Application Icons"
7956
+ ]
7957
+ },
7958
+ {
7959
+ "name": "Address Card",
7960
+ "id": "address-card",
7961
+ "unicode": "f2bb",
7962
+ "created": 4.7,
7963
+ "aliases": [
7964
+ "vcard"
7965
+ ],
7966
+ "categories": [
7967
+ "Web Application Icons"
7968
+ ]
7969
+ },
7970
+ {
7971
+ "name": "Address Card Outlined",
7972
+ "id": "address-card-o",
7973
+ "unicode": "f2bc",
7974
+ "created": 4.7,
7975
+ "aliases": [
7976
+ "vcard-o"
7977
+ ],
7978
+ "categories": [
7979
+ "Web Application Icons"
7980
+ ]
7981
+ },
7982
+ {
7983
+ "name": "User Circle",
7984
+ "id": "user-circle",
7985
+ "unicode": "f2bd",
7986
+ "created": 4.7,
7987
+ "categories": [
7988
+ "Web Application Icons"
7989
+ ]
7990
+ },
7991
+ {
7992
+ "name": "User Circle Outlined",
7993
+ "id": "user-circle-o",
7994
+ "unicode": "f2be",
7995
+ "created": 4.7,
7996
+ "categories": [
7997
+ "Web Application Icons"
7998
+ ]
7999
+ },
8000
+ {
8001
+ "name": "User Outlined",
8002
+ "id": "user-o",
8003
+ "unicode": "f2c0",
8004
+ "created": 4.7,
8005
+ "categories": [
8006
+ "Web Application Icons"
8007
+ ]
8008
+ },
8009
+ {
8010
+ "name": "Identification Badge",
8011
+ "id": "id-badge",
8012
+ "unicode": "f2c1",
8013
+ "created": 4.7,
8014
+ "categories": [
8015
+ "Web Application Icons"
8016
+ ]
8017
+ },
8018
+ {
8019
+ "name": "Identification Card",
8020
+ "id": "id-card",
8021
+ "unicode": "f2c2",
8022
+ "created": 4.7,
8023
+ "aliases": [
8024
+ "drivers-license"
8025
+ ],
8026
+ "categories": [
8027
+ "Web Application Icons"
8028
+ ]
8029
+ },
8030
+ {
8031
+ "name": "Identification Card Outlined",
8032
+ "id": "id-card-o",
8033
+ "unicode": "f2c3",
8034
+ "created": 4.7,
8035
+ "aliases": [
8036
+ "drivers-license-o"
8037
+ ],
8038
+ "categories": [
8039
+ "Web Application Icons"
8040
+ ]
8041
+ },
8042
+ {
8043
+ "name": "Quora",
8044
+ "id": "quora",
8045
+ "unicode": "f2c4",
8046
+ "created": 4.7,
8047
+ "categories": [
8048
+ "Brand Icons"
8049
+ ]
8050
+ },
8051
+ {
8052
+ "name": "Free Code Camp",
8053
+ "id": "free-code-camp",
8054
+ "unicode": "f2c5",
8055
+ "created": 4.7,
8056
+ "categories": [
8057
+ "Brand Icons"
8058
+ ]
8059
+ },
8060
+ {
8061
+ "name": "Telegram",
8062
+ "id": "telegram",
8063
+ "unicode": "f2c6",
8064
+ "created": 4.7,
8065
+ "categories": [
8066
+ "Brand Icons"
8067
+ ]
8068
+ },
8069
+ {
8070
+ "name": "Thermometer Full",
8071
+ "id": "thermometer-full",
8072
+ "unicode": "f2c7",
8073
+ "created": 4.7,
8074
+ "aliases": [
8075
+ "thermometer-4",
8076
+ "thermometer"
8077
+ ],
8078
+ "categories": [
8079
+ "Web Application Icons"
8080
+ ]
8081
+ },
8082
+ {
8083
+ "name": "Thermometer 3/4 Full",
8084
+ "id": "thermometer-three-quarters",
8085
+ "unicode": "f2c8",
8086
+ "created": 4.7,
8087
+ "aliases": [
8088
+ "thermometer-3"
8089
+ ],
8090
+ "categories": [
8091
+ "Web Application Icons"
8092
+ ]
8093
+ },
8094
+ {
8095
+ "name": "Thermometer 1/2 Full",
8096
+ "id": "thermometer-half",
8097
+ "unicode": "f2c9",
8098
+ "created": 4.7,
8099
+ "aliases": [
8100
+ "thermometer-2"
8101
+ ],
8102
+ "categories": [
8103
+ "Web Application Icons"
8104
+ ]
8105
+ },
8106
+ {
8107
+ "name": "Thermometer 1/4 Full",
8108
+ "id": "thermometer-quarter",
8109
+ "unicode": "f2ca",
8110
+ "created": 4.7,
8111
+ "aliases": [
8112
+ "thermometer-1"
8113
+ ],
8114
+ "categories": [
8115
+ "Web Application Icons"
8116
+ ]
8117
+ },
8118
+ {
8119
+ "name": "Thermometer Empty",
8120
+ "id": "thermometer-empty",
8121
+ "unicode": "f2cb",
8122
+ "created": 4.7,
8123
+ "aliases": [
8124
+ "thermometer-0"
8125
+ ],
8126
+ "categories": [
8127
+ "Web Application Icons"
8128
+ ]
8129
+ },
8130
+ {
8131
+ "name": "Shower",
8132
+ "id": "shower",
8133
+ "unicode": "f2cc",
8134
+ "created": 4.7,
8135
+ "categories": [
8136
+ "Web Application Icons"
8137
+ ]
8138
+ },
8139
+ {
8140
+ "name": "Bath",
8141
+ "id": "bath",
8142
+ "unicode": "f2cd",
8143
+ "created": 4.7,
8144
+ "aliases": [
8145
+ "bathtub",
8146
+ "s15"
8147
+ ],
8148
+ "categories": [
8149
+ "Web Application Icons"
8150
+ ]
8151
+ },
8152
+ {
8153
+ "name": "Podcast",
8154
+ "id": "podcast",
8155
+ "unicode": "f2ce",
8156
+ "created": 4.7,
8157
+ "categories": [
8158
+ "Web Application Icons"
8159
+ ]
8160
+ },
8161
+ {
8162
+ "name": "Window Maximize",
8163
+ "id": "window-maximize",
8164
+ "unicode": "f2d0",
8165
+ "created": 4.7,
8166
+ "categories": [
8167
+ "Web Application Icons"
8168
+ ]
8169
+ },
8170
+ {
8171
+ "name": "Window Minimize",
8172
+ "id": "window-minimize",
8173
+ "unicode": "f2d1",
8174
+ "created": 4.7,
8175
+ "categories": [
8176
+ "Web Application Icons"
8177
+ ]
8178
+ },
8179
+ {
8180
+ "name": "Window Restore",
8181
+ "id": "window-restore",
8182
+ "unicode": "f2d2",
8183
+ "created": 4.7,
8184
+ "categories": [
8185
+ "Web Application Icons"
8186
+ ]
8187
+ },
8188
+ {
8189
+ "name": "Window Close",
8190
+ "id": "window-close",
8191
+ "unicode": "f2d3",
8192
+ "created": 4.7,
8193
+ "aliases": [
8194
+ "times-rectangle"
8195
+ ],
8196
+ "categories": [
8197
+ "Web Application Icons"
8198
+ ]
8199
+ },
8200
+ {
8201
+ "name": "Window Close Outline",
8202
+ "id": "window-close-o",
8203
+ "unicode": "f2d4",
8204
+ "created": 4.7,
8205
+ "aliases": [
8206
+ "times-rectangle-o"
8207
+ ],
8208
+ "categories": [
8209
+ "Web Application Icons"
8210
+ ]
8211
+ },
8212
+ {
8213
+ "name": "Bandcamp",
8214
+ "id": "bandcamp",
8215
+ "unicode": "f2d5",
8216
+ "created": 4.7,
8217
+ "categories": [
8218
+ "Brand Icons"
8219
+ ]
8220
+ },
8221
+ {
8222
+ "name": "Grav",
8223
+ "id": "grav",
8224
+ "unicode": "f2d6",
8225
+ "created": 4.7,
8226
+ "categories": [
8227
+ "Brand Icons"
8228
+ ]
8229
+ },
8230
+ {
8231
+ "name": "Etsy",
8232
+ "id": "etsy",
8233
+ "unicode": "f2d7",
8234
+ "created": 4.7,
8235
+ "categories": [
8236
+ "Brand Icons"
8237
+ ]
8238
+ },
8239
+ {
8240
+ "name": "IMDB",
8241
+ "id": "imdb",
8242
+ "unicode": "f2d8",
8243
+ "created": 4.7,
8244
+ "categories": [
8245
+ "Brand Icons"
8246
+ ]
8247
+ },
8248
+ {
8249
+ "name": "Ravelry",
8250
+ "id": "ravelry",
8251
+ "unicode": "f2d9",
8252
+ "created": 4.7,
8253
+ "categories": [
8254
+ "Brand Icons"
8255
+ ]
8256
+ },
8257
+ {
8258
+ "name": "Eercast",
8259
+ "id": "eercast",
8260
+ "unicode": "f2da",
8261
+ "created": 4.7,
8262
+ "url": "eercast.com",
8263
+ "categories": [
8264
+ "Brand Icons"
8265
+ ]
8266
+ },
8267
+ {
8268
+ "name": "Microchip",
8269
+ "id": "microchip",
8270
+ "unicode": "f2db",
8271
+ "created": 4.7,
8272
+ "categories": [
8273
+ "Web Application Icons"
8274
+ ]
8275
+ },
8276
+ {
8277
+ "name": "Snowflake Outlined",
8278
+ "id": "snowflake-o",
8279
+ "unicode": "f2dc",
8280
+ "created": 4.7,
8281
+ "categories": [
8282
+ "Web Application Icons"
8283
+ ]
8284
+ },
8285
+ {
8286
+ "name": "Superpowers",
8287
+ "id": "superpowers",
8288
+ "unicode": "f2dd",
8289
+ "created": 4.7,
8290
+ "url": "superpowers.io",
8291
+ "categories": [
8292
+ "Brand Icons"
8293
+ ]
8294
+ },
8295
+ {
8296
+ "name": "WPExplorer",
8297
+ "id": "wpexplorer",
8298
+ "unicode": "f2de",
8299
+ "created": 4.7,
8300
+ "url": "wpexplorer.com",
8301
+ "categories": [
8302
+ "Brand Icons"
8303
+ ]
8304
+ },
8305
+ {
8306
+ "name": "Meetup",
8307
+ "id": "meetup",
8308
+ "unicode": "f2e0",
8309
+ "created": 4.7,
8310
+ "categories": [
8311
+ "Brand Icons"
8312
+ ]
8313
+ }
8314
+ ]
8315
+ }
includes/customizer/vendors/kirki/assets/vendor/selectWoo/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[data-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[data-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[data-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[data-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; }
includes/customizer/vendors/kirki/assets/vendor/selectWoo/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[data-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[data-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[data-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[data-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}
includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/selectWoo.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[data-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[data-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[data-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[data-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; }
includes/customizer/vendors/kirki/assets/vendor/selectWoo/css/selectWoo.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[data-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[data-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[data-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[data-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}
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ar.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/az.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/bg.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ca.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/cs.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/da.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/de.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/el.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/en.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/es.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/et.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/eu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fa.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{errorLoading:function(){return"Tuloksia ei saatu ladattua."},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(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/fr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/gl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/he.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/hy.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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/hy",[],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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/id.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/is.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/it.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ja.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/km.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ko.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/lt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/lv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/mk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ms.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/nb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/nl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pt-BR.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/pt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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":"caractere",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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ro.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/ru.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sr-Cyrl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/sv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/th.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/tr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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{errorLoading:function(){return"Sonuç yüklenemedi"},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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/uk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/vi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/zh-CN.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/i18n/zh-TW.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 1.0.1 | 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}})();
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.full.js ADDED
@@ -0,0 +1,6553 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * SelectWoo 1.0.1
3
+ * https://github.com/woocommerce/selectWoo
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/woocommerce/selectWoo/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 module === 'object' && module.exports) {
13
+ // Node/CommonJS
14
+ module.exports = function (root, jQuery) {
15
+ if (jQuery === undefined) {
16
+ // require('jQuery') returns a factory that requires window to
17
+ // build a jQuery instance, we normalize how we use modules
18
+ // that require this pattern but the window provided is a noop
19
+ // if it's defined (how jquery works)
20
+ if (typeof window !== 'undefined') {
21
+ jQuery = require('jquery');
22
+ }
23
+ else {
24
+ jQuery = require('jquery')(root);
25
+ }
26
+ }
27
+ factory(jQuery);
28
+ return jQuery;
29
+ };
30
+ } else {
31
+ // Browser globals
32
+ factory(jQuery);
33
+ }
34
+ } (function (jQuery) {
35
+ // This is needed so we can catch the AMD loader configuration and use it
36
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
37
+ // returns the AMD loader references.
38
+ var S2 =(function () {
39
+ // Restore the Select2 AMD loader so it can be used
40
+ // Needed mostly in the language files, where the loader is not inserted
41
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
42
+ var S2 = jQuery.fn.select2.amd;
43
+ }
44
+ var S2;(function () { if (!S2 || !S2.requirejs) {
45
+ if (!S2) { S2 = {}; } else { require = S2; }
46
+ /**
47
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
48
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
49
+ */
50
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
51
+ //be followed.
52
+ /*global setTimeout: false */
53
+
54
+ var requirejs, require, define;
55
+ (function (undef) {
56
+ var main, req, makeMap, handlers,
57
+ defined = {},
58
+ waiting = {},
59
+ config = {},
60
+ defining = {},
61
+ hasOwn = Object.prototype.hasOwnProperty,
62
+ aps = [].slice,
63
+ jsSuffixRegExp = /\.js$/;
64
+
65
+ function hasProp(obj, prop) {
66
+ return hasOwn.call(obj, prop);
67
+ }
68
+
69
+ /**
70
+ * Given a relative module name, like ./something, normalize it to
71
+ * a real name that can be mapped to a path.
72
+ * @param {String} name the relative name
73
+ * @param {String} baseName a real name that the name arg is relative
74
+ * to.
75
+ * @returns {String} normalized name
76
+ */
77
+ function normalize(name, baseName) {
78
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
79
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
80
+ baseParts = baseName && baseName.split("/"),
81
+ map = config.map,
82
+ starMap = (map && map['*']) || {};
83
+
84
+ //Adjust any relative paths.
85
+ if (name) {
86
+ name = name.split('/');
87
+ lastIndex = name.length - 1;
88
+
89
+ // If wanting node ID compatibility, strip .js from end
90
+ // of IDs. Have to do this here, and not in nameToUrl
91
+ // because node allows either .js or non .js to map
92
+ // to same file.
93
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
94
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
95
+ }
96
+
97
+ // Starts with a '.' so need the baseName
98
+ if (name[0].charAt(0) === '.' && baseParts) {
99
+ //Convert baseName to array, and lop off the last part,
100
+ //so that . matches that 'directory' and not name of the baseName's
101
+ //module. For instance, baseName of 'one/two/three', maps to
102
+ //'one/two/three.js', but we want the directory, 'one/two' for
103
+ //this normalization.
104
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
105
+ name = normalizedBaseParts.concat(name);
106
+ }
107
+
108
+ //start trimDots
109
+ for (i = 0; i < name.length; i++) {
110
+ part = name[i];
111
+ if (part === '.') {
112
+ name.splice(i, 1);
113
+ i -= 1;
114
+ } else if (part === '..') {
115
+ // If at the start, or previous value is still ..,
116
+ // keep them so that when converted to a path it may
117
+ // still work when converted to a path, even though
118
+ // as an ID it is less than ideal. In larger point
119
+ // releases, may be better to just kick out an error.
120
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
121
+ continue;
122
+ } else if (i > 0) {
123
+ name.splice(i - 1, 2);
124
+ i -= 2;
125
+ }
126
+ }
127
+ }
128
+ //end trimDots
129
+
130
+ name = name.join('/');
131
+ }
132
+
133
+ //Apply map config if available.
134
+ if ((baseParts || starMap) && map) {
135
+ nameParts = name.split('/');
136
+
137
+ for (i = nameParts.length; i > 0; i -= 1) {
138
+ nameSegment = nameParts.slice(0, i).join("/");
139
+
140
+ if (baseParts) {
141
+ //Find the longest baseName segment match in the config.
142
+ //So, do joins on the biggest to smallest lengths of baseParts.
143
+ for (j = baseParts.length; j > 0; j -= 1) {
144
+ mapValue = map[baseParts.slice(0, j).join('/')];
145
+
146
+ //baseName segment has config, find if it has one for
147
+ //this name.
148
+ if (mapValue) {
149
+ mapValue = mapValue[nameSegment];
150
+ if (mapValue) {
151
+ //Match, update name to the new value.
152
+ foundMap = mapValue;
153
+ foundI = i;
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ if (foundMap) {
161
+ break;
162
+ }
163
+
164
+ //Check for a star map match, but just hold on to it,
165
+ //if there is a shorter segment match later in a matching
166
+ //config, then favor over this star map.
167
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
168
+ foundStarMap = starMap[nameSegment];
169
+ starI = i;
170
+ }
171
+ }
172
+
173
+ if (!foundMap && foundStarMap) {
174
+ foundMap = foundStarMap;
175
+ foundI = starI;
176
+ }
177
+
178
+ if (foundMap) {
179
+ nameParts.splice(0, foundI, foundMap);
180
+ name = nameParts.join('/');
181
+ }
182
+ }
183
+
184
+ return name;
185
+ }
186
+
187
+ function makeRequire(relName, forceSync) {
188
+ return function () {
189
+ //A version of a require function that passes a moduleName
190
+ //value for items that may need to
191
+ //look up paths relative to the moduleName
192
+ var args = aps.call(arguments, 0);
193
+
194
+ //If first arg is not require('string'), and there is only
195
+ //one arg, it is the array form without a callback. Insert
196
+ //a null so that the following concat is correct.
197
+ if (typeof args[0] !== 'string' && args.length === 1) {
198
+ args.push(null);
199
+ }
200
+ return req.apply(undef, args.concat([relName, forceSync]));
201
+ };
202
+ }
203
+
204
+ function makeNormalize(relName) {
205
+ return function (name) {
206
+ return normalize(name, relName);
207
+ };
208
+ }
209
+
210
+ function makeLoad(depName) {
211
+ return function (value) {
212
+ defined[depName] = value;
213
+ };
214
+ }
215
+
216
+ function callDep(name) {
217
+ if (hasProp(waiting, name)) {
218
+ var args = waiting[name];
219
+ delete waiting[name];
220
+ defining[name] = true;
221
+ main.apply(undef, args);
222
+ }
223
+
224
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
225
+ throw new Error('No ' + name);
226
+ }
227
+ return defined[name];
228
+ }
229
+
230
+ //Turns a plugin!resource to [plugin, resource]
231
+ //with the plugin being undefined if the name
232
+ //did not have a plugin prefix.
233
+ function splitPrefix(name) {
234
+ var prefix,
235
+ index = name ? name.indexOf('!') : -1;
236
+ if (index > -1) {
237
+ prefix = name.substring(0, index);
238
+ name = name.substring(index + 1, name.length);
239
+ }
240
+ return [prefix, name];
241
+ }
242
+
243
+ //Creates a parts array for a relName where first part is plugin ID,
244
+ //second part is resource ID. Assumes relName has already been normalized.
245
+ function makeRelParts(relName) {
246
+ return relName ? splitPrefix(relName) : [];
247
+ }
248
+
249
+ /**
250
+ * Makes a name map, normalizing the name, and using a plugin
251
+ * for normalization if necessary. Grabs a ref to plugin
252
+ * too, as an optimization.
253
+ */
254
+ makeMap = function (name, relParts) {
255
+ var plugin,
256
+ parts = splitPrefix(name),
257
+ prefix = parts[0],
258
+ relResourceName = relParts[1];
259
+
260
+ name = parts[1];
261
+
262
+ if (prefix) {
263
+ prefix = normalize(prefix, relResourceName);
264
+ plugin = callDep(prefix);
265
+ }
266
+
267
+ //Normalize according
268
+ if (prefix) {
269
+ if (plugin && plugin.normalize) {
270
+ name = plugin.normalize(name, makeNormalize(relResourceName));
271
+ } else {
272
+ name = normalize(name, relResourceName);
273
+ }
274
+ } else {
275
+ name = normalize(name, relResourceName);
276
+ parts = splitPrefix(name);
277
+ prefix = parts[0];
278
+ name = parts[1];
279
+ if (prefix) {
280
+ plugin = callDep(prefix);
281
+ }
282
+ }
283
+
284
+ //Using ridiculous property names for space reasons
285
+ return {
286
+ f: prefix ? prefix + '!' + name : name, //fullName
287
+ n: name,
288
+ pr: prefix,
289
+ p: plugin
290
+ };
291
+ };
292
+
293
+ function makeConfig(name) {
294
+ return function () {
295
+ return (config && config.config && config.config[name]) || {};
296
+ };
297
+ }
298
+
299
+ handlers = {
300
+ require: function (name) {
301
+ return makeRequire(name);
302
+ },
303
+ exports: function (name) {
304
+ var e = defined[name];
305
+ if (typeof e !== 'undefined') {
306
+ return e;
307
+ } else {
308
+ return (defined[name] = {});
309
+ }
310
+ },
311
+ module: function (name) {
312
+ return {
313
+ id: name,
314
+ uri: '',
315
+ exports: defined[name],
316
+ config: makeConfig(name)
317
+ };
318
+ }
319
+ };
320
+
321
+ main = function (name, deps, callback, relName) {
322
+ var cjsModule, depName, ret, map, i, relParts,
323
+ args = [],
324
+ callbackType = typeof callback,
325
+ usingExports;
326
+
327
+ //Use name if no relName
328
+ relName = relName || name;
329
+ relParts = makeRelParts(relName);
330
+
331
+ //Call the callback to define the module, if necessary.
332
+ if (callbackType === 'undefined' || callbackType === 'function') {
333
+ //Pull out the defined dependencies and pass the ordered
334
+ //values to the callback.
335
+ //Default to [require, exports, module] if no deps
336
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
337
+ for (i = 0; i < deps.length; i += 1) {
338
+ map = makeMap(deps[i], relParts);
339
+ depName = map.f;
340
+
341
+ //Fast path CommonJS standard dependencies.
342
+ if (depName === "require") {
343
+ args[i] = handlers.require(name);
344
+ } else if (depName === "exports") {
345
+ //CommonJS module spec 1.1
346
+ args[i] = handlers.exports(name);
347
+ usingExports = true;
348
+ } else if (depName === "module") {
349
+ //CommonJS module spec 1.1
350
+ cjsModule = args[i] = handlers.module(name);
351
+ } else if (hasProp(defined, depName) ||
352
+ hasProp(waiting, depName) ||
353
+ hasProp(defining, depName)) {
354
+ args[i] = callDep(depName);
355
+ } else if (map.p) {
356
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
357
+ args[i] = defined[depName];
358
+ } else {
359
+ throw new Error(name + ' missing ' + depName);
360
+ }
361
+ }
362
+
363
+ ret = callback ? callback.apply(defined[name], args) : undefined;
364
+
365
+ if (name) {
366
+ //If setting exports via "module" is in play,
367
+ //favor that over return value and exports. After that,
368
+ //favor a non-undefined return value over exports use.
369
+ if (cjsModule && cjsModule.exports !== undef &&
370
+ cjsModule.exports !== defined[name]) {
371
+ defined[name] = cjsModule.exports;
372
+ } else if (ret !== undef || !usingExports) {
373
+ //Use the return value from the function.
374
+ defined[name] = ret;
375
+ }
376
+ }
377
+ } else if (name) {
378
+ //May just be an object definition for the module. Only
379
+ //worry about defining if have a module name.
380
+ defined[name] = callback;
381
+ }
382
+ };
383
+
384
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
385
+ if (typeof deps === "string") {
386
+ if (handlers[deps]) {
387
+ //callback in this case is really relName
388
+ return handlers[deps](callback);
389
+ }
390
+ //Just return the module wanted. In this scenario, the
391
+ //deps arg is the module name, and second arg (if passed)
392
+ //is just the relName.
393
+ //Normalize module name, if it contains . or ..
394
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
395
+ } else if (!deps.splice) {
396
+ //deps is a config object, not an array.
397
+ config = deps;
398
+ if (config.deps) {
399
+ req(config.deps, config.callback);
400
+ }
401
+ if (!callback) {
402
+ return;
403
+ }
404
+
405
+ if (callback.splice) {
406
+ //callback is an array, which means it is a dependency list.
407
+ //Adjust args if there are dependencies
408
+ deps = callback;
409
+ callback = relName;
410
+ relName = null;
411
+ } else {
412
+ deps = undef;
413
+ }
414
+ }
415
+
416
+ //Support require(['a'])
417
+ callback = callback || function () {};
418
+
419
+ //If relName is a function, it is an errback handler,
420
+ //so remove it.
421
+ if (typeof relName === 'function') {
422
+ relName = forceSync;
423
+ forceSync = alt;
424
+ }
425
+
426
+ //Simulate async callback;
427
+ if (forceSync) {
428
+ main(undef, deps, callback, relName);
429
+ } else {
430
+ //Using a non-zero value because of concern for what old browsers
431
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
432
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
433
+ //If want a value immediately, use require('id') instead -- something
434
+ //that works in almond on the global level, but not guaranteed and
435
+ //unlikely to work in other AMD implementations.
436
+ setTimeout(function () {
437
+ main(undef, deps, callback, relName);
438
+ }, 4);
439
+ }
440
+
441
+ return req;
442
+ };
443
+
444
+ /**
445
+ * Just drops the config on the floor, but returns req in case
446
+ * the config return value is used.
447
+ */
448
+ req.config = function (cfg) {
449
+ return req(cfg);
450
+ };
451
+
452
+ /**
453
+ * Expose module registry for debugging and tooling
454
+ */
455
+ requirejs._defined = defined;
456
+
457
+ define = function (name, deps, callback) {
458
+ if (typeof name !== 'string') {
459
+ throw new Error('See almond README: incorrect module build, no module name');
460
+ }
461
+
462
+ //This module may not have dependencies
463
+ if (!deps.splice) {
464
+ //deps is not an array, so probably means
465
+ //an object literal or factory function for
466
+ //the value. Adjust args.
467
+ callback = deps;
468
+ deps = [];
469
+ }
470
+
471
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
472
+ waiting[name] = [name, deps, callback];
473
+ }
474
+ };
475
+
476
+ define.amd = {
477
+ jQuery: true
478
+ };
479
+ }());
480
+
481
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
482
+ }
483
+ }());
484
+ S2.define("almond", function(){});
485
+
486
+ /* global jQuery:false, $:false */
487
+ S2.define('jquery',[],function () {
488
+ var _$ = jQuery || $;
489
+
490
+ if (_$ == null && console && console.error) {
491
+ console.error(
492
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
493
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
494
+ 'web page.'
495
+ );
496
+ }
497
+
498
+ return _$;
499
+ });
500
+
501
+ S2.define('select2/utils',[
502
+ 'jquery'
503
+ ], function ($) {
504
+ var Utils = {};
505
+
506
+ Utils.Extend = function (ChildClass, SuperClass) {
507
+ var __hasProp = {}.hasOwnProperty;
508
+
509
+ function BaseConstructor () {
510
+ this.constructor = ChildClass;
511
+ }
512
+
513
+ for (var key in SuperClass) {
514
+ if (__hasProp.call(SuperClass, key)) {
515
+ ChildClass[key] = SuperClass[key];
516
+ }
517
+ }
518
+
519
+ BaseConstructor.prototype = SuperClass.prototype;
520
+ ChildClass.prototype = new BaseConstructor();
521
+ ChildClass.__super__ = SuperClass.prototype;
522
+
523
+ return ChildClass;
524
+ };
525
+
526
+ function getMethods (theClass) {
527
+ var proto = theClass.prototype;
528
+
529
+ var methods = [];
530
+
531
+ for (var methodName in proto) {
532
+ var m = proto[methodName];
533
+
534
+ if (typeof m !== 'function') {
535
+ continue;
536
+ }
537
+
538
+ if (methodName === 'constructor') {
539
+ continue;
540
+ }
541
+
542
+ methods.push(methodName);
543
+ }
544
+
545
+ return methods;
546
+ }
547
+
548
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
549
+ var decoratedMethods = getMethods(DecoratorClass);
550
+ var superMethods = getMethods(SuperClass);
551
+
552
+ function DecoratedClass () {
553
+ var unshift = Array.prototype.unshift;
554
+
555
+ var argCount = DecoratorClass.prototype.constructor.length;
556
+
557
+ var calledConstructor = SuperClass.prototype.constructor;
558
+
559
+ if (argCount > 0) {
560
+ unshift.call(arguments, SuperClass.prototype.constructor);
561
+
562
+ calledConstructor = DecoratorClass.prototype.constructor;
563
+ }
564
+
565
+ calledConstructor.apply(this, arguments);
566
+ }
567
+
568
+ DecoratorClass.displayName = SuperClass.displayName;
569
+
570
+ function ctr () {
571
+ this.constructor = DecoratedClass;
572
+ }
573
+
574
+ DecoratedClass.prototype = new ctr();
575
+
576
+ for (var m = 0; m < superMethods.length; m++) {
577
+ var superMethod = superMethods[m];
578
+
579
+ DecoratedClass.prototype[superMethod] =
580
+ SuperClass.prototype[superMethod];
581
+ }
582
+
583
+ var calledMethod = function (methodName) {
584
+ // Stub out the original method if it's not decorating an actual method
585
+ var originalMethod = function () {};
586
+
587
+ if (methodName in DecoratedClass.prototype) {
588
+ originalMethod = DecoratedClass.prototype[methodName];
589
+ }
590
+
591
+ var decoratedMethod = DecoratorClass.prototype[methodName];
592
+
593
+ return function () {
594
+ var unshift = Array.prototype.unshift;
595
+
596
+ unshift.call(arguments, originalMethod);
597
+
598
+ return decoratedMethod.apply(this, arguments);
599
+ };
600
+ };
601
+
602
+ for (var d = 0; d < decoratedMethods.length; d++) {
603
+ var decoratedMethod = decoratedMethods[d];
604
+
605
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
606
+ }
607
+
608
+ return DecoratedClass;
609
+ };
610
+
611
+ var Observable = function () {
612
+ this.listeners = {};
613
+ };
614
+
615
+ Observable.prototype.on = function (event, callback) {
616
+ this.listeners = this.listeners || {};
617
+
618
+ if (event in this.listeners) {
619
+ this.listeners[event].push(callback);
620
+ } else {
621
+ this.listeners[event] = [callback];
622
+ }
623
+ };
624
+
625
+ Observable.prototype.trigger = function (event) {
626
+ var slice = Array.prototype.slice;
627
+ var params = slice.call(arguments, 1);
628
+
629
+ this.listeners = this.listeners || {};
630
+
631
+ // Params should always come in as an array
632
+ if (params == null) {
633
+ params = [];
634
+ }
635
+
636
+ // If there are no arguments to the event, use a temporary object
637
+ if (params.length === 0) {
638
+ params.push({});
639
+ }
640
+
641
+ // Set the `_type` of the first object to the event
642
+ params[0]._type = event;
643
+
644
+ if (event in this.listeners) {
645
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
646
+ }
647
+
648
+ if ('*' in this.listeners) {
649
+ this.invoke(this.listeners['*'], arguments);
650
+ }
651
+ };
652
+
653
+ Observable.prototype.invoke = function (listeners, params) {
654
+ for (var i = 0, len = listeners.length; i < len; i++) {
655
+ listeners[i].apply(this, params);
656
+ }
657
+ };
658
+
659
+ Utils.Observable = Observable;
660
+
661
+ Utils.generateChars = function (length) {
662
+ var chars = '';
663
+
664
+ for (var i = 0; i < length; i++) {
665
+ var randomChar = Math.floor(Math.random() * 36);
666
+ chars += randomChar.toString(36);
667
+ }
668
+
669
+ return chars;
670
+ };
671
+
672
+ Utils.bind = function (func, context) {
673
+ return function () {
674
+ func.apply(context, arguments);
675
+ };
676
+ };
677
+
678
+ Utils._convertData = function (data) {
679
+ for (var originalKey in data) {
680
+ var keys = originalKey.split('-');
681
+
682
+ var dataLevel = data;
683
+
684
+ if (keys.length === 1) {
685
+ continue;
686
+ }
687
+
688
+ for (var k = 0; k < keys.length; k++) {
689
+ var key = keys[k];
690
+
691
+ // Lowercase the first letter
692
+ // By default, dash-separated becomes camelCase
693
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
694
+
695
+ if (!(key in dataLevel)) {
696
+ dataLevel[key] = {};
697
+ }
698
+
699
+ if (k == keys.length - 1) {
700
+ dataLevel[key] = data[originalKey];
701
+ }
702
+
703
+ dataLevel = dataLevel[key];
704
+ }
705
+
706
+ delete data[originalKey];
707
+ }
708
+
709
+ return data;
710
+ };
711
+
712
+ Utils.hasScroll = function (index, el) {
713
+ // Adapted from the function created by @ShadowScripter
714
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
715
+ // The original code can be found at
716
+ // http://codereview.stackexchange.com/q/13338
717
+ // and was designed to be used with the Sizzle selector engine.
718
+
719
+ var $el = $(el);
720
+ var overflowX = el.style.overflowX;
721
+ var overflowY = el.style.overflowY;
722
+
723
+ //Check both x and y declarations
724
+ if (overflowX === overflowY &&
725
+ (overflowY === 'hidden' || overflowY === 'visible')) {
726
+ return false;
727
+ }
728
+
729
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
730
+ return true;
731
+ }
732
+
733
+ return ($el.innerHeight() < el.scrollHeight ||
734
+ $el.innerWidth() < el.scrollWidth);
735
+ };
736
+
737
+ Utils.escapeMarkup = function (markup) {
738
+ var replaceMap = {
739
+ '\\': '&#92;',
740
+ '&': '&amp;',
741
+ '<': '&lt;',
742
+ '>': '&gt;',
743
+ '"': '&quot;',
744
+ '\'': '&#39;',
745
+ '/': '&#47;'
746
+ };
747
+
748
+ // Do not try to escape the markup if it's not a string
749
+ if (typeof markup !== 'string') {
750
+ return markup;
751
+ }
752
+
753
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
754
+ return replaceMap[match];
755
+ });
756
+ };
757
+
758
+ // Append an array of jQuery nodes to a given element.
759
+ Utils.appendMany = function ($element, $nodes) {
760
+ // jQuery 1.7.x does not support $.fn.append() with an array
761
+ // Fall back to a jQuery object collection using $.fn.add()
762
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
763
+ var $jqNodes = $();
764
+
765
+ $.map($nodes, function (node) {
766
+ $jqNodes = $jqNodes.add(node);
767
+ });
768
+
769
+ $nodes = $jqNodes;
770
+ }
771
+
772
+ $element.append($nodes);
773
+ };
774
+
775
+ // Determine whether the browser is on a touchscreen device.
776
+ Utils.isTouchscreen = function() {
777
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
778
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
779
+ }
780
+ return Utils._isTouchscreenCache;
781
+ }
782
+
783
+ return Utils;
784
+ });
785
+
786
+ S2.define('select2/results',[
787
+ 'jquery',
788
+ './utils'
789
+ ], function ($, Utils) {
790
+ function Results ($element, options, dataAdapter) {
791
+ this.$element = $element;
792
+ this.data = dataAdapter;
793
+ this.options = options;
794
+
795
+ Results.__super__.constructor.call(this);
796
+ }
797
+
798
+ Utils.Extend(Results, Utils.Observable);
799
+
800
+ Results.prototype.render = function () {
801
+ var $results = $(
802
+ '<ul class="select2-results__options" role="listbox" tabindex="-1"></ul>'
803
+ );
804
+
805
+ if (this.options.get('multiple')) {
806
+ $results.attr('aria-multiselectable', 'true');
807
+ }
808
+
809
+ this.$results = $results;
810
+
811
+ return $results;
812
+ };
813
+
814
+ Results.prototype.clear = function () {
815
+ this.$results.empty();
816
+ };
817
+
818
+ Results.prototype.displayMessage = function (params) {
819
+ var escapeMarkup = this.options.get('escapeMarkup');
820
+
821
+ this.clear();
822
+ this.hideLoading();
823
+
824
+ var $message = $(
825
+ '<li role="alert" aria-live="assertive"' +
826
+ ' class="select2-results__option"></li>'
827
+ );
828
+
829
+ var message = this.options.get('translations').get(params.message);
830
+
831
+ $message.append(
832
+ escapeMarkup(
833
+ message(params.args)
834
+ )
835
+ );
836
+
837
+ $message[0].className += ' select2-results__message';
838
+
839
+ this.$results.append($message);
840
+ };
841
+
842
+ Results.prototype.hideMessages = function () {
843
+ this.$results.find('.select2-results__message').remove();
844
+ };
845
+
846
+ Results.prototype.append = function (data) {
847
+ this.hideLoading();
848
+
849
+ var $options = [];
850
+
851
+ if (data.results == null || data.results.length === 0) {
852
+ if (this.$results.children().length === 0) {
853
+ this.trigger('results:message', {
854
+ message: 'noResults'
855
+ });
856
+ }
857
+
858
+ return;
859
+ }
860
+
861
+ data.results = this.sort(data.results);
862
+
863
+ for (var d = 0; d < data.results.length; d++) {
864
+ var item = data.results[d];
865
+
866
+ var $option = this.option(item);
867
+
868
+ $options.push($option);
869
+ }
870
+
871
+ this.$results.append($options);
872
+ };
873
+
874
+ Results.prototype.position = function ($results, $dropdown) {
875
+ var $resultsContainer = $dropdown.find('.select2-results');
876
+ $resultsContainer.append($results);
877
+ };
878
+
879
+ Results.prototype.sort = function (data) {
880
+ var sorter = this.options.get('sorter');
881
+
882
+ return sorter(data);
883
+ };
884
+
885
+ Results.prototype.highlightFirstItem = function () {
886
+ var $options = this.$results
887
+ .find('.select2-results__option[data-selected]');
888
+
889
+ var $selected = $options.filter('[data-selected=true]');
890
+
891
+ // Check if there are any selected options
892
+ if ($selected.length > 0) {
893
+ // If there are selected options, highlight the first
894
+ $selected.first().trigger('mouseenter');
895
+ } else {
896
+ // If there are no selected options, highlight the first option
897
+ // in the dropdown
898
+ $options.first().trigger('mouseenter');
899
+ }
900
+
901
+ this.ensureHighlightVisible();
902
+ };
903
+
904
+ Results.prototype.setClasses = function () {
905
+ var self = this;
906
+
907
+ this.data.current(function (selected) {
908
+ var selectedIds = $.map(selected, function (s) {
909
+ return s.id.toString();
910
+ });
911
+
912
+ var $options = self.$results
913
+ .find('.select2-results__option[data-selected]');
914
+
915
+ $options.each(function () {
916
+ var $option = $(this);
917
+
918
+ var item = $.data(this, 'data');
919
+
920
+ // id needs to be converted to a string when comparing
921
+ var id = '' + item.id;
922
+
923
+ if ((item.element != null && item.element.selected) ||
924
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
925
+ $option.attr('data-selected', 'true');
926
+ } else {
927
+ $option.attr('data-selected', 'false');
928
+ }
929
+ });
930
+
931
+ });
932
+ };
933
+
934
+ Results.prototype.showLoading = function (params) {
935
+ this.hideLoading();
936
+
937
+ var loadingMore = this.options.get('translations').get('searching');
938
+
939
+ var loading = {
940
+ disabled: true,
941
+ loading: true,
942
+ text: loadingMore(params)
943
+ };
944
+ var $loading = this.option(loading);
945
+ $loading.className += ' loading-results';
946
+
947
+ this.$results.prepend($loading);
948
+ };
949
+
950
+ Results.prototype.hideLoading = function () {
951
+ this.$results.find('.loading-results').remove();
952
+ };
953
+
954
+ Results.prototype.option = function (data) {
955
+ var option = document.createElement('li');
956
+ option.className = 'select2-results__option';
957
+
958
+ var attrs = {
959
+ 'role': 'option',
960
+ 'data-selected': 'false',
961
+ 'tabindex': -1
962
+ };
963
+
964
+ if (data.disabled) {
965
+ delete attrs['data-selected'];
966
+ attrs['aria-disabled'] = 'true';
967
+ }
968
+
969
+ if (data.id == null) {
970
+ delete attrs['data-selected'];
971
+ }
972
+
973
+ if (data._resultId != null) {
974
+ option.id = data._resultId;
975
+ }
976
+
977
+ if (data.title) {
978
+ option.title = data.title;
979
+ }
980
+
981
+ if (data.children) {
982
+ attrs['aria-label'] = data.text;
983
+ delete attrs['data-selected'];
984
+ }
985
+
986
+ for (var attr in attrs) {
987
+ var val = attrs[attr];
988
+
989
+ option.setAttribute(attr, val);
990
+ }
991
+
992
+ if (data.children) {
993
+ var $option = $(option);
994
+
995
+ var label = document.createElement('strong');
996
+ label.className = 'select2-results__group';
997
+
998
+ var $label = $(label);
999
+ this.template(data, label);
1000
+ $label.attr('role', 'presentation');
1001
+
1002
+ var $children = [];
1003
+
1004
+ for (var c = 0; c < data.children.length; c++) {
1005
+ var child = data.children[c];
1006
+
1007
+ var $child = this.option(child);
1008
+
1009
+ $children.push($child);
1010
+ }
1011
+
1012
+ var $childrenContainer = $('<ul></ul>', {
1013
+ 'class': 'select2-results__options select2-results__options--nested',
1014
+ 'role': 'listbox'
1015
+ });
1016
+ $childrenContainer.append($children);
1017
+ $option.attr('role', 'list');
1018
+
1019
+ $option.append(label);
1020
+ $option.append($childrenContainer);
1021
+ } else {
1022
+ this.template(data, option);
1023
+ }
1024
+
1025
+ $.data(option, 'data', data);
1026
+
1027
+ return option;
1028
+ };
1029
+
1030
+ Results.prototype.bind = function (container, $container) {
1031
+ var self = this;
1032
+
1033
+ var id = container.id + '-results';
1034
+
1035
+ this.$results.attr('id', id);
1036
+
1037
+ container.on('results:all', function (params) {
1038
+ self.clear();
1039
+ self.append(params.data);
1040
+
1041
+ if (container.isOpen()) {
1042
+ self.setClasses();
1043
+ self.highlightFirstItem();
1044
+ }
1045
+ });
1046
+
1047
+ container.on('results:append', function (params) {
1048
+ self.append(params.data);
1049
+
1050
+ if (container.isOpen()) {
1051
+ self.setClasses();
1052
+ }
1053
+ });
1054
+
1055
+ container.on('query', function (params) {
1056
+ self.hideMessages();
1057
+ self.showLoading(params);
1058
+ });
1059
+
1060
+ container.on('select', function () {
1061
+ if (!container.isOpen()) {
1062
+ return;
1063
+ }
1064
+
1065
+ self.setClasses();
1066
+ self.highlightFirstItem();
1067
+ });
1068
+
1069
+ container.on('unselect', function () {
1070
+ if (!container.isOpen()) {
1071
+ return;
1072
+ }
1073
+
1074
+ self.setClasses();
1075
+ self.highlightFirstItem();
1076
+ });
1077
+
1078
+ container.on('open', function () {
1079
+ // When the dropdown is open, aria-expended="true"
1080
+ self.$results.attr('aria-expanded', 'true');
1081
+ self.$results.attr('aria-hidden', 'false');
1082
+
1083
+ self.setClasses();
1084
+ self.ensureHighlightVisible();
1085
+ });
1086
+
1087
+ container.on('close', function () {
1088
+ // When the dropdown is closed, aria-expended="false"
1089
+ self.$results.attr('aria-expanded', 'false');
1090
+ self.$results.attr('aria-hidden', 'true');
1091
+ self.$results.removeAttr('aria-activedescendant');
1092
+ });
1093
+
1094
+ container.on('results:toggle', function () {
1095
+ var $highlighted = self.getHighlightedResults();
1096
+
1097
+ if ($highlighted.length === 0) {
1098
+ return;
1099
+ }
1100
+
1101
+ $highlighted.trigger('mouseup');
1102
+ });
1103
+
1104
+ container.on('results:select', function () {
1105
+ var $highlighted = self.getHighlightedResults();
1106
+
1107
+ if ($highlighted.length === 0) {
1108
+ return;
1109
+ }
1110
+
1111
+ var data = $highlighted.data('data');
1112
+
1113
+ if ($highlighted.attr('data-selected') == 'true') {
1114
+ self.trigger('close', {});
1115
+ } else {
1116
+ self.trigger('select', {
1117
+ data: data
1118
+ });
1119
+ }
1120
+ });
1121
+
1122
+ container.on('results:previous', function () {
1123
+ var $highlighted = self.getHighlightedResults();
1124
+
1125
+ var $options = self.$results.find('[data-selected]');
1126
+
1127
+ var currentIndex = $options.index($highlighted);
1128
+
1129
+ // If we are already at te top, don't move further
1130
+ if (currentIndex === 0) {
1131
+ return;
1132
+ }
1133
+
1134
+ var nextIndex = currentIndex - 1;
1135
+
1136
+ // If none are highlighted, highlight the first
1137
+ if ($highlighted.length === 0) {
1138
+ nextIndex = 0;
1139
+ }
1140
+
1141
+ var $next = $options.eq(nextIndex);
1142
+
1143
+ $next.trigger('mouseenter');
1144
+
1145
+ var currentOffset = self.$results.offset().top;
1146
+ var nextTop = $next.offset().top;
1147
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
1148
+
1149
+ if (nextIndex === 0) {
1150
+ self.$results.scrollTop(0);
1151
+ } else if (nextTop - currentOffset < 0) {
1152
+ self.$results.scrollTop(nextOffset);
1153
+ }
1154
+ });
1155
+
1156
+ container.on('results:next', function () {
1157
+ var $highlighted = self.getHighlightedResults();
1158
+
1159
+ var $options = self.$results.find('[data-selected]');
1160
+
1161
+ var currentIndex = $options.index($highlighted);
1162
+
1163
+ var nextIndex = currentIndex + 1;
1164
+
1165
+ // If we are at the last option, stay there
1166
+ if (nextIndex >= $options.length) {
1167
+ return;
1168
+ }
1169
+
1170
+ var $next = $options.eq(nextIndex);
1171
+
1172
+ $next.trigger('mouseenter');
1173
+
1174
+ var currentOffset = self.$results.offset().top +
1175
+ self.$results.outerHeight(false);
1176
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
1177
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
1178
+
1179
+ if (nextIndex === 0) {
1180
+ self.$results.scrollTop(0);
1181
+ } else if (nextBottom > currentOffset) {
1182
+ self.$results.scrollTop(nextOffset);
1183
+ }
1184
+ });
1185
+
1186
+ container.on('results:focus', function (params) {
1187
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
1188
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
1189
+ });
1190
+
1191
+ container.on('results:message', function (params) {
1192
+ self.displayMessage(params);
1193
+ });
1194
+
1195
+ if ($.fn.mousewheel) {
1196
+ this.$results.on('mousewheel', function (e) {
1197
+ var top = self.$results.scrollTop();
1198
+
1199
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
1200
+
1201
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
1202
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
1203
+
1204
+ if (isAtTop) {
1205
+ self.$results.scrollTop(0);
1206
+
1207
+ e.preventDefault();
1208
+ e.stopPropagation();
1209
+ } else if (isAtBottom) {
1210
+ self.$results.scrollTop(
1211
+ self.$results.get(0).scrollHeight - self.$results.height()
1212
+ );
1213
+
1214
+ e.preventDefault();
1215
+ e.stopPropagation();
1216
+ }
1217
+ });
1218
+ }
1219
+
1220
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
1221
+ function (evt) {
1222
+ var $this = $(this);
1223
+
1224
+ var data = $this.data('data');
1225
+
1226
+ if ($this.attr('data-selected') === 'true') {
1227
+ if (self.options.get('multiple')) {
1228
+ self.trigger('unselect', {
1229
+ originalEvent: evt,
1230
+ data: data
1231
+ });
1232
+ } else {
1233
+ self.trigger('close', {});
1234
+ }
1235
+
1236
+ return;
1237
+ }
1238
+
1239
+ self.trigger('select', {
1240
+ originalEvent: evt,
1241
+ data: data
1242
+ });
1243
+ });
1244
+
1245
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
1246
+ function (evt) {
1247
+ var data = $(this).data('data');
1248
+
1249
+ self.getHighlightedResults()
1250
+ .removeClass('select2-results__option--highlighted')
1251
+ .attr('aria-selected', 'false');
1252
+
1253
+ self.trigger('results:focus', {
1254
+ data: data,
1255
+ element: $(this)
1256
+ });
1257
+ });
1258
+ };
1259
+
1260
+ Results.prototype.getHighlightedResults = function () {
1261
+ var $highlighted = this.$results
1262
+ .find('.select2-results__option--highlighted');
1263
+
1264
+ return $highlighted;
1265
+ };
1266
+
1267
+ Results.prototype.destroy = function () {
1268
+ this.$results.remove();
1269
+ };
1270
+
1271
+ Results.prototype.ensureHighlightVisible = function () {
1272
+ var $highlighted = this.getHighlightedResults();
1273
+
1274
+ if ($highlighted.length === 0) {
1275
+ return;
1276
+ }
1277
+
1278
+ var $options = this.$results.find('[data-selected]');
1279
+
1280
+ var currentIndex = $options.index($highlighted);
1281
+
1282
+ var currentOffset = this.$results.offset().top;
1283
+ var nextTop = $highlighted.offset().top;
1284
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
1285
+
1286
+ var offsetDelta = nextTop - currentOffset;
1287
+ nextOffset -= $highlighted.outerHeight(false) * 2;
1288
+
1289
+ if (currentIndex <= 2) {
1290
+ this.$results.scrollTop(0);
1291
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
1292
+ this.$results.scrollTop(nextOffset);
1293
+ }
1294
+ };
1295
+
1296
+ Results.prototype.template = function (result, container) {
1297
+ var template = this.options.get('templateResult');
1298
+ var escapeMarkup = this.options.get('escapeMarkup');
1299
+
1300
+ var content = template(result, container);
1301
+
1302
+ if (content == null) {
1303
+ container.style.display = 'none';
1304
+ } else if (typeof content === 'string') {
1305
+ container.innerHTML = escapeMarkup(content);
1306
+ } else {
1307
+ $(container).append(content);
1308
+ }
1309
+ };
1310
+
1311
+ return Results;
1312
+ });
1313
+
1314
+ S2.define('select2/keys',[
1315
+
1316
+ ], function () {
1317
+ var KEYS = {
1318
+ BACKSPACE: 8,
1319
+ TAB: 9,
1320
+ ENTER: 13,
1321
+ SHIFT: 16,
1322
+ CTRL: 17,
1323
+ ALT: 18,
1324
+ ESC: 27,
1325
+ SPACE: 32,
1326
+ PAGE_UP: 33,
1327
+ PAGE_DOWN: 34,
1328
+ END: 35,
1329
+ HOME: 36,
1330
+ LEFT: 37,
1331
+ UP: 38,
1332
+ RIGHT: 39,
1333
+ DOWN: 40,
1334
+ DELETE: 46
1335
+ };
1336
+
1337
+ return KEYS;
1338
+ });
1339
+
1340
+ S2.define('select2/selection/base',[
1341
+ 'jquery',
1342
+ '../utils',
1343
+ '../keys'
1344
+ ], function ($, Utils, KEYS) {
1345
+ function BaseSelection ($element, options) {
1346
+ this.$element = $element;
1347
+ this.options = options;
1348
+
1349
+ BaseSelection.__super__.constructor.call(this);
1350
+ }
1351
+
1352
+ Utils.Extend(BaseSelection, Utils.Observable);
1353
+
1354
+ BaseSelection.prototype.render = function () {
1355
+ var $selection = $(
1356
+ '<span class="select2-selection" ' +
1357
+ ' aria-haspopup="true" aria-expanded="false">' +
1358
+ '</span>'
1359
+ );
1360
+
1361
+ this._tabindex = 0;
1362
+
1363
+ if (this.$element.data('old-tabindex') != null) {
1364
+ this._tabindex = this.$element.data('old-tabindex');
1365
+ } else if (this.$element.attr('tabindex') != null) {
1366
+ this._tabindex = this.$element.attr('tabindex');
1367
+ }
1368
+
1369
+ $selection.attr('title', this.$element.attr('title'));
1370
+ $selection.attr('tabindex', this._tabindex);
1371
+
1372
+ this.$selection = $selection;
1373
+
1374
+ return $selection;
1375
+ };
1376
+
1377
+ BaseSelection.prototype.bind = function (container, $container) {
1378
+ var self = this;
1379
+
1380
+ var id = container.id + '-container';
1381
+ var resultsId = container.id + '-results';
1382
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
1383
+
1384
+ this.container = container;
1385
+
1386
+ this.$selection.on('focus', function (evt) {
1387
+ self.trigger('focus', evt);
1388
+ });
1389
+
1390
+ this.$selection.on('blur', function (evt) {
1391
+ self._handleBlur(evt);
1392
+ });
1393
+
1394
+ this.$selection.on('keydown', function (evt) {
1395
+ self.trigger('keypress', evt);
1396
+
1397
+ if (evt.which === KEYS.SPACE) {
1398
+ evt.preventDefault();
1399
+ }
1400
+ });
1401
+
1402
+ container.on('results:focus', function (params) {
1403
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
1404
+ });
1405
+
1406
+ container.on('selection:update', function (params) {
1407
+ self.update(params.data);
1408
+ });
1409
+
1410
+ container.on('open', function () {
1411
+ // When the dropdown is open, aria-expanded="true"
1412
+ self.$selection.attr('aria-expanded', 'true');
1413
+ self.$selection.attr('aria-owns', resultsId);
1414
+
1415
+ self._attachCloseHandler(container);
1416
+ });
1417
+
1418
+ container.on('close', function () {
1419
+ // When the dropdown is closed, aria-expanded="false"
1420
+ self.$selection.attr('aria-expanded', 'false');
1421
+ self.$selection.removeAttr('aria-activedescendant');
1422
+ self.$selection.removeAttr('aria-owns');
1423
+
1424
+ // This needs to be delayed as the active element is the body when the
1425
+ // key is pressed.
1426
+ window.setTimeout(function () {
1427
+ self.$selection.focus();
1428
+ }, 1);
1429
+
1430
+ self._detachCloseHandler(container);
1431
+ });
1432
+
1433
+ container.on('enable', function () {
1434
+ self.$selection.attr('tabindex', self._tabindex);
1435
+ });
1436
+
1437
+ container.on('disable', function () {
1438
+ self.$selection.attr('tabindex', '-1');
1439
+ });
1440
+ };
1441
+
1442
+ BaseSelection.prototype._handleBlur = function (evt) {
1443
+ var self = this;
1444
+
1445
+ // This needs to be delayed as the active element is the body when the tab
1446
+ // key is pressed, possibly along with others.
1447
+ window.setTimeout(function () {
1448
+ // Don't trigger `blur` if the focus is still in the selection
1449
+ if (
1450
+ (document.activeElement == self.$selection[0]) ||
1451
+ ($.contains(self.$selection[0], document.activeElement))
1452
+ ) {
1453
+ return;
1454
+ }
1455
+
1456
+ self.trigger('blur', evt);
1457
+ }, 1);
1458
+ };
1459
+
1460
+ BaseSelection.prototype._attachCloseHandler = function (container) {
1461
+ var self = this;
1462
+
1463
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
1464
+ var $target = $(e.target);
1465
+
1466
+ var $select = $target.closest('.select2');
1467
+
1468
+ var $all = $('.select2.select2-container--open');
1469
+
1470
+ $all.each(function () {
1471
+ var $this = $(this);
1472
+
1473
+ if (this == $select[0]) {
1474
+ return;
1475
+ }
1476
+
1477
+ var $element = $this.data('element');
1478
+
1479
+ $element.select2('close');
1480
+ });
1481
+ });
1482
+ };
1483
+
1484
+ BaseSelection.prototype._detachCloseHandler = function (container) {
1485
+ $(document.body).off('mousedown.select2.' + container.id);
1486
+ };
1487
+
1488
+ BaseSelection.prototype.position = function ($selection, $container) {
1489
+ var $selectionContainer = $container.find('.selection');
1490
+ $selectionContainer.append($selection);
1491
+ };
1492
+
1493
+ BaseSelection.prototype.destroy = function () {
1494
+ this._detachCloseHandler(this.container);
1495
+ };
1496
+
1497
+ BaseSelection.prototype.update = function (data) {
1498
+ throw new Error('The `update` method must be defined in child classes.');
1499
+ };
1500
+
1501
+ return BaseSelection;
1502
+ });
1503
+
1504
+ S2.define('select2/selection/single',[
1505
+ 'jquery',
1506
+ './base',
1507
+ '../utils',
1508
+ '../keys'
1509
+ ], function ($, BaseSelection, Utils, KEYS) {
1510
+ function SingleSelection () {
1511
+ SingleSelection.__super__.constructor.apply(this, arguments);
1512
+ }
1513
+
1514
+ Utils.Extend(SingleSelection, BaseSelection);
1515
+
1516
+ SingleSelection.prototype.render = function () {
1517
+ var $selection = SingleSelection.__super__.render.call(this);
1518
+
1519
+ $selection.addClass('select2-selection--single');
1520
+
1521
+ $selection.html(
1522
+ '<span class="select2-selection__rendered"></span>' +
1523
+ '<span class="select2-selection__arrow" role="presentation">' +
1524
+ '<b role="presentation"></b>' +
1525
+ '</span>'
1526
+ );
1527
+
1528
+ return $selection;
1529
+ };
1530
+
1531
+ SingleSelection.prototype.bind = function (container, $container) {
1532
+ var self = this;
1533
+
1534
+ SingleSelection.__super__.bind.apply(this, arguments);
1535
+
1536
+ var id = container.id + '-container';
1537
+
1538
+ this.$selection.find('.select2-selection__rendered')
1539
+ .attr('id', id)
1540
+ .attr('role', 'textbox')
1541
+ .attr('aria-readonly', 'true');
1542
+ this.$selection.attr('aria-labelledby', id);
1543
+
1544
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
1545
+ this.$selection.attr('role', 'combobox');
1546
+
1547
+ this.$selection.on('mousedown', function (evt) {
1548
+ // Only respond to left clicks
1549
+ if (evt.which !== 1) {
1550
+ return;
1551
+ }
1552
+
1553
+ self.trigger('toggle', {
1554
+ originalEvent: evt
1555
+ });
1556
+ });
1557
+
1558
+ this.$selection.on('focus', function (evt) {
1559
+ // User focuses on the container
1560
+ });
1561
+
1562
+ this.$selection.on('keydown', function (evt) {
1563
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
1564
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
1565
+ container.open();
1566
+ }
1567
+ });
1568
+
1569
+ this.$selection.on('blur', function (evt) {
1570
+ // User exits the container
1571
+ });
1572
+
1573
+ container.on('focus', function (evt) {
1574
+ if (!container.isOpen()) {
1575
+ self.$selection.focus();
1576
+ }
1577
+ });
1578
+
1579
+ container.on('selection:update', function (params) {
1580
+ self.update(params.data);
1581
+ });
1582
+ };
1583
+
1584
+ SingleSelection.prototype.clear = function () {
1585
+ this.$selection.find('.select2-selection__rendered').empty();
1586
+ };
1587
+
1588
+ SingleSelection.prototype.display = function (data, container) {
1589
+ var template = this.options.get('templateSelection');
1590
+ var escapeMarkup = this.options.get('escapeMarkup');
1591
+
1592
+ return escapeMarkup(template(data, container));
1593
+ };
1594
+
1595
+ SingleSelection.prototype.selectionContainer = function () {
1596
+ return $('<span></span>');
1597
+ };
1598
+
1599
+ SingleSelection.prototype.update = function (data) {
1600
+ if (data.length === 0) {
1601
+ this.clear();
1602
+ return;
1603
+ }
1604
+
1605
+ var selection = data[0];
1606
+
1607
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1608
+ var formatted = this.display(selection, $rendered);
1609
+
1610
+ $rendered.empty().append(formatted);
1611
+ $rendered.prop('title', selection.title || selection.text);
1612
+ };
1613
+
1614
+ return SingleSelection;
1615
+ });
1616
+
1617
+ S2.define('select2/selection/multiple',[
1618
+ 'jquery',
1619
+ './base',
1620
+ '../utils'
1621
+ ], function ($, BaseSelection, Utils) {
1622
+ function MultipleSelection ($element, options) {
1623
+ MultipleSelection.__super__.constructor.apply(this, arguments);
1624
+ }
1625
+
1626
+ Utils.Extend(MultipleSelection, BaseSelection);
1627
+
1628
+ MultipleSelection.prototype.render = function () {
1629
+ var $selection = MultipleSelection.__super__.render.call(this);
1630
+
1631
+ $selection.addClass('select2-selection--multiple');
1632
+
1633
+ $selection.html(
1634
+ '<ul class="select2-selection__rendered" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></ul>'
1635
+ );
1636
+
1637
+ return $selection;
1638
+ };
1639
+
1640
+ MultipleSelection.prototype.bind = function (container, $container) {
1641
+ var self = this;
1642
+
1643
+ MultipleSelection.__super__.bind.apply(this, arguments);
1644
+
1645
+ this.$selection.on('click', function (evt) {
1646
+ self.trigger('toggle', {
1647
+ originalEvent: evt
1648
+ });
1649
+ });
1650
+
1651
+ this.$selection.on(
1652
+ 'click',
1653
+ '.select2-selection__choice__remove',
1654
+ function (evt) {
1655
+ // Ignore the event if it is disabled
1656
+ if (self.options.get('disabled')) {
1657
+ return;
1658
+ }
1659
+
1660
+ var $remove = $(this);
1661
+ var $selection = $remove.parent();
1662
+
1663
+ var data = $selection.data('data');
1664
+
1665
+ self.trigger('unselect', {
1666
+ originalEvent: evt,
1667
+ data: data
1668
+ });
1669
+ }
1670
+ );
1671
+ };
1672
+
1673
+ MultipleSelection.prototype.clear = function () {
1674
+ this.$selection.find('.select2-selection__rendered').empty();
1675
+ };
1676
+
1677
+ MultipleSelection.prototype.display = function (data, container) {
1678
+ var template = this.options.get('templateSelection');
1679
+ var escapeMarkup = this.options.get('escapeMarkup');
1680
+
1681
+ return escapeMarkup(template(data, container));
1682
+ };
1683
+
1684
+ MultipleSelection.prototype.selectionContainer = function () {
1685
+ var $container = $(
1686
+ '<li class="select2-selection__choice">' +
1687
+ '<span class="select2-selection__choice__remove" role="presentation" aria-hidden="true">' +
1688
+ '&times;' +
1689
+ '</span>' +
1690
+ '</li>'
1691
+ );
1692
+
1693
+ return $container;
1694
+ };
1695
+
1696
+ MultipleSelection.prototype.update = function (data) {
1697
+ var self = this;
1698
+ this.clear();
1699
+
1700
+ if (data.length === 0) {
1701
+ return;
1702
+ }
1703
+
1704
+ var $selections = [];
1705
+
1706
+ for (var d = 0; d < data.length; d++) {
1707
+ var selection = data[d];
1708
+
1709
+ var $selection = this.selectionContainer();
1710
+ var formatted = this.display(selection, $selection).trim();
1711
+
1712
+ $selection.append(formatted);
1713
+ $selection.prop('title', selection.title || selection.text);
1714
+
1715
+ $selection.data('data', selection);
1716
+
1717
+ $selections.push($selection);
1718
+ }
1719
+
1720
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1721
+
1722
+ Utils.appendMany($rendered, $selections);
1723
+
1724
+ // Return cursor to search field after updating.
1725
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
1726
+ if ('undefined' !== typeof this.$search) {
1727
+ setTimeout(function(){
1728
+ self.$search.focus();
1729
+ }, 1);
1730
+ }
1731
+ };
1732
+
1733
+ return MultipleSelection;
1734
+ });
1735
+
1736
+ S2.define('select2/selection/placeholder',[
1737
+ '../utils'
1738
+ ], function (Utils) {
1739
+ function Placeholder (decorated, $element, options) {
1740
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
1741
+
1742
+ decorated.call(this, $element, options);
1743
+ }
1744
+
1745
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
1746
+ if (typeof placeholder === 'string') {
1747
+ placeholder = {
1748
+ id: '',
1749
+ text: placeholder
1750
+ };
1751
+ }
1752
+
1753
+ return placeholder;
1754
+ };
1755
+
1756
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
1757
+ var $placeholder = this.selectionContainer();
1758
+
1759
+ $placeholder.html(this.display(placeholder));
1760
+ $placeholder.addClass('select2-selection__placeholder')
1761
+ .removeClass('select2-selection__choice');
1762
+
1763
+ return $placeholder;
1764
+ };
1765
+
1766
+ Placeholder.prototype.update = function (decorated, data) {
1767
+ var singlePlaceholder = (
1768
+ data.length == 1 && data[0].id != this.placeholder.id
1769
+ );
1770
+ var multipleSelections = data.length > 1;
1771
+
1772
+ if (multipleSelections || singlePlaceholder) {
1773
+ return decorated.call(this, data);
1774
+ }
1775
+
1776
+ this.clear();
1777
+
1778
+ var $placeholder = this.createPlaceholder(this.placeholder);
1779
+
1780
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
1781
+ };
1782
+
1783
+ return Placeholder;
1784
+ });
1785
+
1786
+ S2.define('select2/selection/allowClear',[
1787
+ 'jquery',
1788
+ '../keys'
1789
+ ], function ($, KEYS) {
1790
+ function AllowClear () { }
1791
+
1792
+ AllowClear.prototype.bind = function (decorated, container, $container) {
1793
+ var self = this;
1794
+
1795
+ decorated.call(this, container, $container);
1796
+
1797
+ if (this.placeholder == null) {
1798
+ if (this.options.get('debug') && window.console && console.error) {
1799
+ console.error(
1800
+ 'Select2: The `allowClear` option should be used in combination ' +
1801
+ 'with the `placeholder` option.'
1802
+ );
1803
+ }
1804
+ }
1805
+
1806
+ this.$selection.on('mousedown', '.select2-selection__clear',
1807
+ function (evt) {
1808
+ self._handleClear(evt);
1809
+ });
1810
+
1811
+ container.on('keypress', function (evt) {
1812
+ self._handleKeyboardClear(evt, container);
1813
+ });
1814
+ };
1815
+
1816
+ AllowClear.prototype._handleClear = function (_, evt) {
1817
+ // Ignore the event if it is disabled
1818
+ if (this.options.get('disabled')) {
1819
+ return;
1820
+ }
1821
+
1822
+ var $clear = this.$selection.find('.select2-selection__clear');
1823
+
1824
+ // Ignore the event if nothing has been selected
1825
+ if ($clear.length === 0) {
1826
+ return;
1827
+ }
1828
+
1829
+ evt.stopPropagation();
1830
+
1831
+ var data = $clear.data('data');
1832
+
1833
+ for (var d = 0; d < data.length; d++) {
1834
+ var unselectData = {
1835
+ data: data[d]
1836
+ };
1837
+
1838
+ // Trigger the `unselect` event, so people can prevent it from being
1839
+ // cleared.
1840
+ this.trigger('unselect', unselectData);
1841
+
1842
+ // If the event was prevented, don't clear it out.
1843
+ if (unselectData.prevented) {
1844
+ return;
1845
+ }
1846
+ }
1847
+
1848
+ this.$element.val(this.placeholder.id).trigger('change');
1849
+
1850
+ this.trigger('toggle', {});
1851
+ };
1852
+
1853
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
1854
+ if (container.isOpen()) {
1855
+ return;
1856
+ }
1857
+
1858
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
1859
+ this._handleClear(evt);
1860
+ }
1861
+ };
1862
+
1863
+ AllowClear.prototype.update = function (decorated, data) {
1864
+ decorated.call(this, data);
1865
+
1866
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
1867
+ data.length === 0) {
1868
+ return;
1869
+ }
1870
+
1871
+ var $remove = $(
1872
+ '<span class="select2-selection__clear">' +
1873
+ '&times;' +
1874
+ '</span>'
1875
+ );
1876
+ $remove.data('data', data);
1877
+
1878
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
1879
+ };
1880
+
1881
+ return AllowClear;
1882
+ });
1883
+
1884
+ S2.define('select2/selection/search',[
1885
+ 'jquery',
1886
+ '../utils',
1887
+ '../keys'
1888
+ ], function ($, Utils, KEYS) {
1889
+ function Search (decorated, $element, options) {
1890
+ decorated.call(this, $element, options);
1891
+ }
1892
+
1893
+ Search.prototype.render = function (decorated) {
1894
+ var $search = $(
1895
+ '<li class="select2-search select2-search--inline">' +
1896
+ '<input class="select2-search__field" type="text" tabindex="-1"' +
1897
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1898
+ ' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
1899
+ '</li>'
1900
+ );
1901
+
1902
+ this.$searchContainer = $search;
1903
+ this.$search = $search.find('input');
1904
+
1905
+ var $rendered = decorated.call(this);
1906
+
1907
+ this._transferTabIndex();
1908
+
1909
+ return $rendered;
1910
+ };
1911
+
1912
+ Search.prototype.bind = function (decorated, container, $container) {
1913
+ var self = this;
1914
+ var resultsId = container.id + '-results';
1915
+
1916
+ decorated.call(this, container, $container);
1917
+
1918
+ container.on('open', function () {
1919
+ self.$search.attr('aria-owns', resultsId);
1920
+ self.$search.trigger('focus');
1921
+ });
1922
+
1923
+ container.on('close', function () {
1924
+ self.$search.val('');
1925
+ self.$search.removeAttr('aria-activedescendant');
1926
+ self.$search.removeAttr('aria-owns');
1927
+ self.$search.trigger('focus');
1928
+ });
1929
+
1930
+ container.on('enable', function () {
1931
+ self.$search.prop('disabled', false);
1932
+
1933
+ self._transferTabIndex();
1934
+ });
1935
+
1936
+ container.on('disable', function () {
1937
+ self.$search.prop('disabled', true);
1938
+ });
1939
+
1940
+ container.on('focus', function (evt) {
1941
+ self.$search.trigger('focus');
1942
+ });
1943
+
1944
+ container.on('results:focus', function (params) {
1945
+ self.$search.attr('aria-activedescendant', params.data._resultId);
1946
+ });
1947
+
1948
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1949
+ self.trigger('focus', evt);
1950
+ });
1951
+
1952
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1953
+ self._handleBlur(evt);
1954
+ });
1955
+
1956
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
1957
+ evt.stopPropagation();
1958
+
1959
+ self.trigger('keypress', evt);
1960
+
1961
+ self._keyUpPrevented = evt.isDefaultPrevented();
1962
+
1963
+ var key = evt.which;
1964
+
1965
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
1966
+ var $previousChoice = self.$searchContainer
1967
+ .prev('.select2-selection__choice');
1968
+
1969
+ if ($previousChoice.length > 0) {
1970
+ var item = $previousChoice.data('data');
1971
+
1972
+ self.searchRemoveChoice(item);
1973
+
1974
+ evt.preventDefault();
1975
+ }
1976
+ }
1977
+ });
1978
+
1979
+ // Try to detect the IE version should the `documentMode` property that
1980
+ // is stored on the document. This is only implemented in IE and is
1981
+ // slightly cleaner than doing a user agent check.
1982
+ // This property is not available in Edge, but Edge also doesn't have
1983
+ // this bug.
1984
+ var msie = document.documentMode;
1985
+ var disableInputEvents = msie && msie <= 11;
1986
+
1987
+ // Workaround for browsers which do not support the `input` event
1988
+ // This will prevent double-triggering of events for browsers which support
1989
+ // both the `keyup` and `input` events.
1990
+ this.$selection.on(
1991
+ 'input.searchcheck',
1992
+ '.select2-search--inline',
1993
+ function (evt) {
1994
+ // IE will trigger the `input` event when a placeholder is used on a
1995
+ // search box. To get around this issue, we are forced to ignore all
1996
+ // `input` events in IE and keep using `keyup`.
1997
+ if (disableInputEvents) {
1998
+ self.$selection.off('input.search input.searchcheck');
1999
+ return;
2000
+ }
2001
+
2002
+ // Unbind the duplicated `keyup` event
2003
+ self.$selection.off('keyup.search');
2004
+ }
2005
+ );
2006
+
2007
+ this.$selection.on(
2008
+ 'keyup.search input.search',
2009
+ '.select2-search--inline',
2010
+ function (evt) {
2011
+ // IE will trigger the `input` event when a placeholder is used on a
2012
+ // search box. To get around this issue, we are forced to ignore all
2013
+ // `input` events in IE and keep using `keyup`.
2014
+ if (disableInputEvents && evt.type === 'input') {
2015
+ self.$selection.off('input.search input.searchcheck');
2016
+ return;
2017
+ }
2018
+
2019
+ var key = evt.which;
2020
+
2021
+ // We can freely ignore events from modifier keys
2022
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
2023
+ return;
2024
+ }
2025
+
2026
+ // Tabbing will be handled during the `keydown` phase
2027
+ if (key == KEYS.TAB) {
2028
+ return;
2029
+ }
2030
+
2031
+ self.handleSearch(evt);
2032
+ }
2033
+ );
2034
+ };
2035
+
2036
+ /**
2037
+ * This method will transfer the tabindex attribute from the rendered
2038
+ * selection to the search box. This allows for the search box to be used as
2039
+ * the primary focus instead of the selection container.
2040
+ *
2041
+ * @private
2042
+ */
2043
+ Search.prototype._transferTabIndex = function (decorated) {
2044
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
2045
+ this.$selection.attr('tabindex', '-1');
2046
+ };
2047
+
2048
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
2049
+ this.$search.attr('placeholder', placeholder.text);
2050
+ };
2051
+
2052
+ Search.prototype.update = function (decorated, data) {
2053
+ var searchHadFocus = this.$search[0] == document.activeElement;
2054
+
2055
+ this.$search.attr('placeholder', '');
2056
+
2057
+ decorated.call(this, data);
2058
+
2059
+ this.$selection.find('.select2-selection__rendered')
2060
+ .append(this.$searchContainer);
2061
+
2062
+ this.resizeSearch();
2063
+ if (searchHadFocus) {
2064
+ this.$search.focus();
2065
+ }
2066
+ };
2067
+
2068
+ Search.prototype.handleSearch = function () {
2069
+ this.resizeSearch();
2070
+
2071
+ if (!this._keyUpPrevented) {
2072
+ var input = this.$search.val();
2073
+
2074
+ this.trigger('query', {
2075
+ term: input
2076
+ });
2077
+ }
2078
+
2079
+ this._keyUpPrevented = false;
2080
+ };
2081
+
2082
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
2083
+ this.trigger('unselect', {
2084
+ data: item
2085
+ });
2086
+
2087
+ this.$search.val(item.text);
2088
+ this.handleSearch();
2089
+ };
2090
+
2091
+ Search.prototype.resizeSearch = function () {
2092
+ this.$search.css('width', '25px');
2093
+
2094
+ var width = '';
2095
+
2096
+ if (this.$search.attr('placeholder') !== '') {
2097
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
2098
+ } else {
2099
+ var minimumWidth = this.$search.val().length + 1;
2100
+
2101
+ width = (minimumWidth * 0.75) + 'em';
2102
+ }
2103
+
2104
+ this.$search.css('width', width);
2105
+ };
2106
+
2107
+ return Search;
2108
+ });
2109
+
2110
+ S2.define('select2/selection/eventRelay',[
2111
+ 'jquery'
2112
+ ], function ($) {
2113
+ function EventRelay () { }
2114
+
2115
+ EventRelay.prototype.bind = function (decorated, container, $container) {
2116
+ var self = this;
2117
+ var relayEvents = [
2118
+ 'open', 'opening',
2119
+ 'close', 'closing',
2120
+ 'select', 'selecting',
2121
+ 'unselect', 'unselecting'
2122
+ ];
2123
+
2124
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
2125
+
2126
+ decorated.call(this, container, $container);
2127
+
2128
+ container.on('*', function (name, params) {
2129
+ // Ignore events that should not be relayed
2130
+ if ($.inArray(name, relayEvents) === -1) {
2131
+ return;
2132
+ }
2133
+
2134
+ // The parameters should always be an object
2135
+ params = params || {};
2136
+
2137
+ // Generate the jQuery event for the Select2 event
2138
+ var evt = $.Event('select2:' + name, {
2139
+ params: params
2140
+ });
2141
+
2142
+ self.$element.trigger(evt);
2143
+
2144
+ // Only handle preventable events if it was one
2145
+ if ($.inArray(name, preventableEvents) === -1) {
2146
+ return;
2147
+ }
2148
+
2149
+ params.prevented = evt.isDefaultPrevented();
2150
+ });
2151
+ };
2152
+
2153
+ return EventRelay;
2154
+ });
2155
+
2156
+ S2.define('select2/translation',[
2157
+ 'jquery',
2158
+ 'require'
2159
+ ], function ($, require) {
2160
+ function Translation (dict) {
2161
+ this.dict = dict || {};
2162
+ }
2163
+
2164
+ Translation.prototype.all = function () {
2165
+ return this.dict;
2166
+ };
2167
+
2168
+ Translation.prototype.get = function (key) {
2169
+ return this.dict[key];
2170
+ };
2171
+
2172
+ Translation.prototype.extend = function (translation) {
2173
+ this.dict = $.extend({}, translation.all(), this.dict);
2174
+ };
2175
+
2176
+ // Static functions
2177
+
2178
+ Translation._cache = {};
2179
+
2180
+ Translation.loadPath = function (path) {
2181
+ if (!(path in Translation._cache)) {
2182
+ var translations = require(path);
2183
+
2184
+ Translation._cache[path] = translations;
2185
+ }
2186
+
2187
+ return new Translation(Translation._cache[path]);
2188
+ };
2189
+
2190
+ return Translation;
2191
+ });
2192
+
2193
+ S2.define('select2/diacritics',[
2194
+
2195
+ ], function () {
2196
+ var diacritics = {
2197
+ '\u24B6': 'A',
2198
+ '\uFF21': 'A',
2199
+ '\u00C0': 'A',
2200
+ '\u00C1': 'A',
2201
+ '\u00C2': 'A',
2202
+ '\u1EA6': 'A',
2203
+ '\u1EA4': 'A',
2204
+ '\u1EAA': 'A',
2205
+ '\u1EA8': 'A',
2206
+ '\u00C3': 'A',
2207
+ '\u0100': 'A',
2208
+ '\u0102': 'A',
2209
+ '\u1EB0': 'A',
2210
+ '\u1EAE': 'A',
2211
+ '\u1EB4': 'A',
2212
+ '\u1EB2': 'A',
2213
+ '\u0226': 'A',
2214
+ '\u01E0': 'A',
2215
+ '\u00C4': 'A',
2216
+ '\u01DE': 'A',
2217
+ '\u1EA2': 'A',
2218
+ '\u00C5': 'A',
2219
+ '\u01FA': 'A',
2220
+ '\u01CD': 'A',
2221
+ '\u0200': 'A',
2222
+ '\u0202': 'A',
2223
+ '\u1EA0': 'A',
2224
+ '\u1EAC': 'A',
2225
+ '\u1EB6': 'A',
2226
+ '\u1E00': 'A',
2227
+ '\u0104': 'A',
2228
+ '\u023A': 'A',
2229
+ '\u2C6F': 'A',
2230
+ '\uA732': 'AA',
2231
+ '\u00C6': 'AE',
2232
+ '\u01FC': 'AE',
2233
+ '\u01E2': 'AE',
2234
+ '\uA734': 'AO',
2235
+ '\uA736': 'AU',
2236
+ '\uA738': 'AV',
2237
+ '\uA73A': 'AV',
2238
+ '\uA73C': 'AY',
2239
+ '\u24B7': 'B',
2240
+ '\uFF22': 'B',
2241
+ '\u1E02': 'B',
2242
+ '\u1E04': 'B',
2243
+ '\u1E06': 'B',
2244
+ '\u0243': 'B',
2245
+ '\u0182': 'B',
2246
+ '\u0181': 'B',
2247
+ '\u24B8': 'C',
2248
+ '\uFF23': 'C',
2249
+ '\u0106': 'C',
2250
+ '\u0108': 'C',
2251
+ '\u010A': 'C',
2252
+ '\u010C': 'C',
2253
+ '\u00C7': 'C',
2254
+ '\u1E08': 'C',
2255
+ '\u0187': 'C',
2256
+ '\u023B': 'C',
2257
+ '\uA73E': 'C',
2258
+ '\u24B9': 'D',
2259
+ '\uFF24': 'D',
2260
+ '\u1E0A': 'D',
2261
+ '\u010E': 'D',
2262
+ '\u1E0C': 'D',
2263
+ '\u1E10': 'D',
2264
+ '\u1E12': 'D',
2265
+ '\u1E0E': 'D',
2266
+ '\u0110': 'D',
2267
+ '\u018B': 'D',
2268
+ '\u018A': 'D',
2269
+ '\u0189': 'D',
2270
+ '\uA779': 'D',
2271
+ '\u01F1': 'DZ',
2272
+ '\u01C4': 'DZ',
2273
+ '\u01F2': 'Dz',
2274
+ '\u01C5': 'Dz',
2275
+ '\u24BA': 'E',
2276
+ '\uFF25': 'E',
2277
+ '\u00C8': 'E',
2278
+ '\u00C9': 'E',
2279
+ '\u00CA': 'E',
2280
+ '\u1EC0': 'E',
2281
+ '\u1EBE': 'E',
2282
+ '\u1EC4': 'E',
2283
+ '\u1EC2': 'E',
2284
+ '\u1EBC': 'E',
2285
+ '\u0112': 'E',
2286
+ '\u1E14': 'E',
2287
+ '\u1E16': 'E',
2288
+ '\u0114': 'E',
2289
+ '\u0116': 'E',
2290
+ '\u00CB': 'E',
2291
+ '\u1EBA': 'E',
2292
+ '\u011A': 'E',
2293
+ '\u0204': 'E',
2294
+ '\u0206': 'E',
2295
+ '\u1EB8': 'E',
2296
+ '\u1EC6': 'E',
2297
+ '\u0228': 'E',
2298
+ '\u1E1C': 'E',
2299
+ '\u0118': 'E',
2300
+ '\u1E18': 'E',
2301
+ '\u1E1A': 'E',
2302
+ '\u0190': 'E',
2303
+ '\u018E': 'E',
2304
+ '\u24BB': 'F',
2305
+ '\uFF26': 'F',
2306
+ '\u1E1E': 'F',
2307
+ '\u0191': 'F',
2308
+ '\uA77B': 'F',
2309
+ '\u24BC': 'G',
2310
+ '\uFF27': 'G',
2311
+ '\u01F4': 'G',
2312
+ '\u011C': 'G',
2313
+ '\u1E20': 'G',
2314
+ '\u011E': 'G',
2315
+ '\u0120': 'G',
2316
+ '\u01E6': 'G',
2317
+ '\u0122': 'G',
2318
+ '\u01E4': 'G',
2319
+ '\u0193': 'G',
2320
+ '\uA7A0': 'G',
2321
+ '\uA77D': 'G',
2322
+ '\uA77E': 'G',
2323
+ '\u24BD': 'H',
2324
+ '\uFF28': 'H',
2325
+ '\u0124': 'H',
2326
+ '\u1E22': 'H',
2327
+ '\u1E26': 'H',
2328
+ '\u021E': 'H',
2329
+ '\u1E24': 'H',
2330
+ '\u1E28': 'H',
2331
+ '\u1E2A': 'H',
2332
+ '\u0126': 'H',
2333
+ '\u2C67': 'H',
2334
+ '\u2C75': 'H',
2335
+ '\uA78D': 'H',
2336
+ '\u24BE': 'I',
2337
+ '\uFF29': 'I',
2338
+ '\u00CC': 'I',
2339
+ '\u00CD': 'I',
2340
+ '\u00CE': 'I',
2341
+ '\u0128': 'I',
2342
+ '\u012A': 'I',
2343
+ '\u012C': 'I',
2344
+ '\u0130': 'I',
2345
+ '\u00CF': 'I',
2346
+ '\u1E2E': 'I',
2347
+ '\u1EC8': 'I',
2348
+ '\u01CF': 'I',
2349
+ '\u0208': 'I',
2350
+ '\u020A': 'I',
2351
+ '\u1ECA': 'I',
2352
+ '\u012E': 'I',
2353
+ '\u1E2C': 'I',
2354
+ '\u0197': 'I',
2355
+ '\u24BF': 'J',
2356
+ '\uFF2A': 'J',
2357
+ '\u0134': 'J',
2358
+ '\u0248': 'J',
2359
+ '\u24C0': 'K',
2360
+ '\uFF2B': 'K',
2361
+ '\u1E30': 'K',
2362
+ '\u01E8': 'K',
2363
+ '\u1E32': 'K',
2364
+ '\u0136': 'K',
2365
+ '\u1E34': 'K',
2366
+ '\u0198': 'K',
2367
+ '\u2C69': 'K',
2368
+ '\uA740': 'K',
2369
+ '\uA742': 'K',
2370
+ '\uA744': 'K',
2371
+ '\uA7A2': 'K',
2372
+ '\u24C1': 'L',
2373
+ '\uFF2C': 'L',
2374
+ '\u013F': 'L',
2375
+ '\u0139': 'L',
2376
+ '\u013D': 'L',
2377
+ '\u1E36': 'L',
2378
+ '\u1E38': 'L',
2379
+ '\u013B': 'L',
2380
+ '\u1E3C': 'L',
2381
+ '\u1E3A': 'L',
2382
+ '\u0141': 'L',
2383
+ '\u023D': 'L',
2384
+ '\u2C62': 'L',
2385
+ '\u2C60': 'L',
2386
+ '\uA748': 'L',
2387
+ '\uA746': 'L',
2388
+ '\uA780': 'L',
2389
+ '\u01C7': 'LJ',
2390
+ '\u01C8': 'Lj',
2391
+ '\u24C2': 'M',
2392
+ '\uFF2D': 'M',
2393
+ '\u1E3E': 'M',
2394
+ '\u1E40': 'M',
2395
+ '\u1E42': 'M',
2396
+ '\u2C6E': 'M',
2397
+ '\u019C': 'M',
2398
+ '\u24C3': 'N',
2399
+ '\uFF2E': 'N',
2400
+ '\u01F8': 'N',
2401
+ '\u0143': 'N',
2402
+ '\u00D1': 'N',
2403
+ '\u1E44': 'N',
2404
+ '\u0147': 'N',
2405
+ '\u1E46': 'N',
2406
+ '\u0145': 'N',
2407
+ '\u1E4A': 'N',
2408
+ '\u1E48': 'N',
2409
+ '\u0220': 'N',
2410
+ '\u019D': 'N',
2411
+ '\uA790': 'N',
2412
+ '\uA7A4': 'N',
2413
+ '\u01CA': 'NJ',
2414
+ '\u01CB': 'Nj',
2415
+ '\u24C4': 'O',
2416
+ '\uFF2F': 'O',
2417
+ '\u00D2': 'O',
2418
+ '\u00D3': 'O',
2419
+ '\u00D4': 'O',
2420
+ '\u1ED2': 'O',
2421
+ '\u1ED0': 'O',
2422
+ '\u1ED6': 'O',
2423
+ '\u1ED4': 'O',
2424
+ '\u00D5': 'O',
2425
+ '\u1E4C': 'O',
2426
+ '\u022C': 'O',
2427
+ '\u1E4E': 'O',
2428
+ '\u014C': 'O',
2429
+ '\u1E50': 'O',
2430
+ '\u1E52': 'O',
2431
+ '\u014E': 'O',
2432
+ '\u022E': 'O',
2433
+ '\u0230': 'O',
2434
+ '\u00D6': 'O',
2435
+ '\u022A': 'O',
2436
+ '\u1ECE': 'O',
2437
+ '\u0150': 'O',
2438
+ '\u01D1': 'O',
2439
+ '\u020C': 'O',
2440
+ '\u020E': 'O',
2441
+ '\u01A0': 'O',
2442
+ '\u1EDC': 'O',
2443
+ '\u1EDA': 'O',
2444
+ '\u1EE0': 'O',
2445
+ '\u1EDE': 'O',
2446
+ '\u1EE2': 'O',
2447
+ '\u1ECC': 'O',
2448
+ '\u1ED8': 'O',
2449
+ '\u01EA': 'O',
2450
+ '\u01EC': 'O',
2451
+ '\u00D8': 'O',
2452
+ '\u01FE': 'O',
2453
+ '\u0186': 'O',
2454
+ '\u019F': 'O',
2455
+ '\uA74A': 'O',
2456
+ '\uA74C': 'O',
2457
+ '\u01A2': 'OI',
2458
+ '\uA74E': 'OO',
2459
+ '\u0222': 'OU',
2460
+ '\u24C5': 'P',
2461
+ '\uFF30': 'P',
2462
+ '\u1E54': 'P',
2463
+ '\u1E56': 'P',
2464
+ '\u01A4': 'P',
2465
+ '\u2C63': 'P',
2466
+ '\uA750': 'P',
2467
+ '\uA752': 'P',
2468
+ '\uA754': 'P',
2469
+ '\u24C6': 'Q',
2470
+ '\uFF31': 'Q',
2471
+ '\uA756': 'Q',
2472
+ '\uA758': 'Q',
2473
+ '\u024A': 'Q',
2474
+ '\u24C7': 'R',
2475
+ '\uFF32': 'R',
2476
+ '\u0154': 'R',
2477
+ '\u1E58': 'R',
2478
+ '\u0158': 'R',
2479
+ '\u0210': 'R',
2480
+ '\u0212': 'R',
2481
+ '\u1E5A': 'R',
2482
+ '\u1E5C': 'R',
2483
+ '\u0156': 'R',
2484
+ '\u1E5E': 'R',
2485
+ '\u024C': 'R',
2486
+ '\u2C64': 'R',
2487
+ '\uA75A': 'R',
2488
+ '\uA7A6': 'R',
2489
+ '\uA782': 'R',
2490
+ '\u24C8': 'S',
2491
+ '\uFF33': 'S',
2492
+ '\u1E9E': 'S',
2493
+ '\u015A': 'S',
2494
+ '\u1E64': 'S',
2495
+ '\u015C': 'S',
2496
+ '\u1E60': 'S',
2497
+ '\u0160': 'S',
2498
+ '\u1E66': 'S',
2499
+ '\u1E62': 'S',
2500
+ '\u1E68': 'S',
2501
+ '\u0218': 'S',
2502
+ '\u015E': 'S',
2503
+ '\u2C7E': 'S',
2504
+ '\uA7A8': 'S',
2505
+ '\uA784': 'S',
2506
+ '\u24C9': 'T',
2507
+ '\uFF34': 'T',
2508
+ '\u1E6A': 'T',
2509
+ '\u0164': 'T',
2510
+ '\u1E6C': 'T',
2511
+ '\u021A': 'T',
2512
+ '\u0162': 'T',
2513
+ '\u1E70': 'T',
2514
+ '\u1E6E': 'T',
2515
+ '\u0166': 'T',
2516
+ '\u01AC': 'T',
2517
+ '\u01AE': 'T',
2518
+ '\u023E': 'T',
2519
+ '\uA786': 'T',
2520
+ '\uA728': 'TZ',
2521
+ '\u24CA': 'U',
2522
+ '\uFF35': 'U',
2523
+ '\u00D9': 'U',
2524
+ '\u00DA': 'U',
2525
+ '\u00DB': 'U',
2526
+ '\u0168': 'U',
2527
+ '\u1E78': 'U',
2528
+ '\u016A': 'U',
2529
+ '\u1E7A': 'U',
2530
+ '\u016C': 'U',
2531
+ '\u00DC': 'U',
2532
+ '\u01DB': 'U',
2533
+ '\u01D7': 'U',
2534
+ '\u01D5': 'U',
2535
+ '\u01D9': 'U',
2536
+ '\u1EE6': 'U',
2537
+ '\u016E': 'U',
2538
+ '\u0170': 'U',
2539
+ '\u01D3': 'U',
2540
+ '\u0214': 'U',
2541
+ '\u0216': 'U',
2542
+ '\u01AF': 'U',
2543
+ '\u1EEA': 'U',
2544
+ '\u1EE8': 'U',
2545
+ '\u1EEE': 'U',
2546
+ '\u1EEC': 'U',
2547
+ '\u1EF0': 'U',
2548
+ '\u1EE4': 'U',
2549
+ '\u1E72': 'U',
2550
+ '\u0172': 'U',
2551
+ '\u1E76': 'U',
2552
+ '\u1E74': 'U',
2553
+ '\u0244': 'U',
2554
+ '\u24CB': 'V',
2555
+ '\uFF36': 'V',
2556
+ '\u1E7C': 'V',
2557
+ '\u1E7E': 'V',
2558
+ '\u01B2': 'V',
2559
+ '\uA75E': 'V',
2560
+ '\u0245': 'V',
2561
+ '\uA760': 'VY',
2562
+ '\u24CC': 'W',
2563
+ '\uFF37': 'W',
2564
+ '\u1E80': 'W',
2565
+ '\u1E82': 'W',
2566
+ '\u0174': 'W',
2567
+ '\u1E86': 'W',
2568
+ '\u1E84': 'W',
2569
+ '\u1E88': 'W',
2570
+ '\u2C72': 'W',
2571
+ '\u24CD': 'X',
2572
+ '\uFF38': 'X',
2573
+ '\u1E8A': 'X',
2574
+ '\u1E8C': 'X',
2575
+ '\u24CE': 'Y',
2576
+ '\uFF39': 'Y',
2577
+ '\u1EF2': 'Y',
2578
+ '\u00DD': 'Y',
2579
+ '\u0176': 'Y',
2580
+ '\u1EF8': 'Y',
2581
+ '\u0232': 'Y',
2582
+ '\u1E8E': 'Y',
2583
+ '\u0178': 'Y',
2584
+ '\u1EF6': 'Y',
2585
+ '\u1EF4': 'Y',
2586
+ '\u01B3': 'Y',
2587
+ '\u024E': 'Y',
2588
+ '\u1EFE': 'Y',
2589
+ '\u24CF': 'Z',
2590
+ '\uFF3A': 'Z',
2591
+ '\u0179': 'Z',
2592
+ '\u1E90': 'Z',
2593
+ '\u017B': 'Z',
2594
+ '\u017D': 'Z',
2595
+ '\u1E92': 'Z',
2596
+ '\u1E94': 'Z',
2597
+ '\u01B5': 'Z',
2598
+ '\u0224': 'Z',
2599
+ '\u2C7F': 'Z',
2600
+ '\u2C6B': 'Z',
2601
+ '\uA762': 'Z',
2602
+ '\u24D0': 'a',
2603
+ '\uFF41': 'a',
2604
+ '\u1E9A': 'a',
2605
+ '\u00E0': 'a',
2606
+ '\u00E1': 'a',
2607
+ '\u00E2': 'a',
2608
+ '\u1EA7': 'a',
2609
+ '\u1EA5': 'a',
2610
+ '\u1EAB': 'a',
2611
+ '\u1EA9': 'a',
2612
+ '\u00E3': 'a',
2613
+ '\u0101': 'a',
2614
+ '\u0103': 'a',
2615
+ '\u1EB1': 'a',
2616
+ '\u1EAF': 'a',
2617
+ '\u1EB5': 'a',
2618
+ '\u1EB3': 'a',
2619
+ '\u0227': 'a',
2620
+ '\u01E1': 'a',
2621
+ '\u00E4': 'a',
2622
+ '\u01DF': 'a',
2623
+ '\u1EA3': 'a',
2624
+ '\u00E5': 'a',
2625
+ '\u01FB': 'a',
2626
+ '\u01CE': 'a',
2627
+ '\u0201': 'a',
2628
+ '\u0203': 'a',
2629
+ '\u1EA1': 'a',
2630
+ '\u1EAD': 'a',
2631
+ '\u1EB7': 'a',
2632
+ '\u1E01': 'a',
2633
+ '\u0105': 'a',
2634
+ '\u2C65': 'a',
2635
+ '\u0250': 'a',
2636
+ '\uA733': 'aa',
2637
+ '\u00E6': 'ae',
2638
+ '\u01FD': 'ae',
2639
+ '\u01E3': 'ae',
2640
+ '\uA735': 'ao',
2641
+ '\uA737': 'au',
2642
+ '\uA739': 'av',
2643
+ '\uA73B': 'av',
2644
+ '\uA73D': 'ay',
2645
+ '\u24D1': 'b',
2646
+ '\uFF42': 'b',
2647
+ '\u1E03': 'b',
2648
+ '\u1E05': 'b',
2649
+ '\u1E07': 'b',
2650
+ '\u0180': 'b',
2651
+ '\u0183': 'b',
2652
+ '\u0253': 'b',
2653
+ '\u24D2': 'c',
2654
+ '\uFF43': 'c',
2655
+ '\u0107': 'c',
2656
+ '\u0109': 'c',
2657
+ '\u010B': 'c',
2658
+ '\u010D': 'c',
2659
+ '\u00E7': 'c',
2660
+ '\u1E09': 'c',
2661
+ '\u0188': 'c',
2662
+ '\u023C': 'c',
2663
+ '\uA73F': 'c',
2664
+ '\u2184': 'c',
2665
+ '\u24D3': 'd',
2666
+ '\uFF44': 'd',
2667
+ '\u1E0B': 'd',
2668
+ '\u010F': 'd',
2669
+ '\u1E0D': 'd',
2670
+ '\u1E11': 'd',
2671
+ '\u1E13': 'd',
2672
+ '\u1E0F': 'd',
2673
+ '\u0111': 'd',
2674
+ '\u018C': 'd',
2675
+ '\u0256': 'd',
2676
+ '\u0257': 'd',
2677
+ '\uA77A': 'd',
2678
+ '\u01F3': 'dz',
2679
+ '\u01C6': 'dz',
2680
+ '\u24D4': 'e',
2681
+ '\uFF45': 'e',
2682
+ '\u00E8': 'e',
2683
+ '\u00E9': 'e',
2684
+ '\u00EA': 'e',
2685
+ '\u1EC1': 'e',
2686
+ '\u1EBF': 'e',
2687
+ '\u1EC5': 'e',
2688
+ '\u1EC3': 'e',
2689
+ '\u1EBD': 'e',
2690
+ '\u0113': 'e',
2691
+ '\u1E15': 'e',
2692
+ '\u1E17': 'e',
2693
+ '\u0115': 'e',
2694
+ '\u0117': 'e',
2695
+ '\u00EB': 'e',
2696
+ '\u1EBB': 'e',
2697
+ '\u011B': 'e',
2698
+ '\u0205': 'e',
2699
+ '\u0207': 'e',
2700
+ '\u1EB9': 'e',
2701
+ '\u1EC7': 'e',
2702
+ '\u0229': 'e',
2703
+ '\u1E1D': 'e',
2704
+ '\u0119': 'e',
2705
+ '\u1E19': 'e',
2706
+ '\u1E1B': 'e',
2707
+ '\u0247': 'e',
2708
+ '\u025B': 'e',
2709
+ '\u01DD': 'e',
2710
+ '\u24D5': 'f',
2711
+ '\uFF46': 'f',
2712
+ '\u1E1F': 'f',
2713
+ '\u0192': 'f',
2714
+ '\uA77C': 'f',
2715
+ '\u24D6': 'g',
2716
+ '\uFF47': 'g',
2717
+ '\u01F5': 'g',
2718
+ '\u011D': 'g',
2719
+ '\u1E21': 'g',
2720
+ '\u011F': 'g',
2721
+ '\u0121': 'g',
2722
+ '\u01E7': 'g',
2723
+ '\u0123': 'g',
2724
+ '\u01E5': 'g',
2725
+ '\u0260': 'g',
2726
+ '\uA7A1': 'g',
2727
+ '\u1D79': 'g',
2728
+ '\uA77F': 'g',
2729
+ '\u24D7': 'h',
2730
+ '\uFF48': 'h',
2731
+ '\u0125': 'h',
2732
+ '\u1E23': 'h',
2733
+ '\u1E27': 'h',
2734
+ '\u021F': 'h',
2735
+ '\u1E25': 'h',
2736
+ '\u1E29': 'h',
2737
+ '\u1E2B': 'h',
2738
+ '\u1E96': 'h',
2739
+ '\u0127': 'h',
2740
+ '\u2C68': 'h',
2741
+ '\u2C76': 'h',
2742
+ '\u0265': 'h',
2743
+ '\u0195': 'hv',
2744
+ '\u24D8': 'i',
2745
+ '\uFF49': 'i',
2746
+ '\u00EC': 'i',
2747
+ '\u00ED': 'i',
2748
+ '\u00EE': 'i',
2749
+ '\u0129': 'i',
2750
+ '\u012B': 'i',
2751
+ '\u012D': 'i',
2752
+ '\u00EF': 'i',
2753
+ '\u1E2F': 'i',
2754
+ '\u1EC9': 'i',
2755
+ '\u01D0': 'i',
2756
+ '\u0209': 'i',
2757
+ '\u020B': 'i',
2758
+ '\u1ECB': 'i',
2759
+ '\u012F': 'i',
2760
+ '\u1E2D': 'i',
2761
+ '\u0268': 'i',
2762
+ '\u0131': 'i',
2763
+ '\u24D9': 'j',
2764
+ '\uFF4A': 'j',
2765
+ '\u0135': 'j',
2766
+ '\u01F0': 'j',
2767
+ '\u0249': 'j',
2768
+ '\u24DA': 'k',
2769
+ '\uFF4B': 'k',
2770
+ '\u1E31': 'k',
2771
+ '\u01E9': 'k',
2772
+ '\u1E33': 'k',
2773
+ '\u0137': 'k',
2774
+ '\u1E35': 'k',
2775
+ '\u0199': 'k',
2776
+ '\u2C6A': 'k',
2777
+ '\uA741': 'k',
2778
+ '\uA743': 'k',
2779
+ '\uA745': 'k',
2780
+ '\uA7A3': 'k',
2781
+ '\u24DB': 'l',
2782
+ '\uFF4C': 'l',
2783
+ '\u0140': 'l',
2784
+ '\u013A': 'l',
2785
+ '\u013E': 'l',
2786
+ '\u1E37': 'l',
2787
+ '\u1E39': 'l',
2788
+ '\u013C': 'l',
2789
+ '\u1E3D': 'l',
2790
+ '\u1E3B': 'l',
2791
+ '\u017F': 'l',
2792
+ '\u0142': 'l',
2793
+ '\u019A': 'l',
2794
+ '\u026B': 'l',
2795
+ '\u2C61': 'l',
2796
+ '\uA749': 'l',
2797
+ '\uA781': 'l',
2798
+ '\uA747': 'l',
2799
+ '\u01C9': 'lj',
2800
+ '\u24DC': 'm',
2801
+ '\uFF4D': 'm',
2802
+ '\u1E3F': 'm',
2803
+ '\u1E41': 'm',
2804
+ '\u1E43': 'm',
2805
+ '\u0271': 'm',
2806
+ '\u026F': 'm',
2807
+ '\u24DD': 'n',
2808
+ '\uFF4E': 'n',
2809
+ '\u01F9': 'n',
2810
+ '\u0144': 'n',
2811
+ '\u00F1': 'n',
2812
+ '\u1E45': 'n',
2813
+ '\u0148': 'n',
2814
+ '\u1E47': 'n',
2815
+ '\u0146': 'n',
2816
+ '\u1E4B': 'n',
2817
+ '\u1E49': 'n',
2818
+ '\u019E': 'n',
2819
+ '\u0272': 'n',
2820
+ '\u0149': 'n',
2821
+ '\uA791': 'n',
2822
+ '\uA7A5': 'n',
2823
+ '\u01CC': 'nj',
2824
+ '\u24DE': 'o',
2825
+ '\uFF4F': 'o',
2826
+ '\u00F2': 'o',
2827
+ '\u00F3': 'o',
2828
+ '\u00F4': 'o',
2829
+ '\u1ED3': 'o',
2830
+ '\u1ED1': 'o',
2831
+ '\u1ED7': 'o',
2832
+ '\u1ED5': 'o',
2833
+ '\u00F5': 'o',
2834
+ '\u1E4D': 'o',
2835
+ '\u022D': 'o',
2836
+ '\u1E4F': 'o',
2837
+ '\u014D': 'o',
2838
+ '\u1E51': 'o',
2839
+ '\u1E53': 'o',
2840
+ '\u014F': 'o',
2841
+ '\u022F': 'o',
2842
+ '\u0231': 'o',
2843
+ '\u00F6': 'o',
2844
+ '\u022B': 'o',
2845
+ '\u1ECF': 'o',
2846
+ '\u0151': 'o',
2847
+ '\u01D2': 'o',
2848
+ '\u020D': 'o',
2849
+ '\u020F': 'o',
2850
+ '\u01A1': 'o',
2851
+ '\u1EDD': 'o',
2852
+ '\u1EDB': 'o',
2853
+ '\u1EE1': 'o',
2854
+ '\u1EDF': 'o',
2855
+ '\u1EE3': 'o',
2856
+ '\u1ECD': 'o',
2857
+ '\u1ED9': 'o',
2858
+ '\u01EB': 'o',
2859
+ '\u01ED': 'o',
2860
+ '\u00F8': 'o',
2861
+ '\u01FF': 'o',
2862
+ '\u0254': 'o',
2863
+ '\uA74B': 'o',
2864
+ '\uA74D': 'o',
2865
+ '\u0275': 'o',
2866
+ '\u01A3': 'oi',
2867
+ '\u0223': 'ou',
2868
+ '\uA74F': 'oo',
2869
+ '\u24DF': 'p',
2870
+ '\uFF50': 'p',
2871
+ '\u1E55': 'p',
2872
+ '\u1E57': 'p',
2873
+ '\u01A5': 'p',
2874
+ '\u1D7D': 'p',
2875
+ '\uA751': 'p',
2876
+ '\uA753': 'p',
2877
+ '\uA755': 'p',
2878
+ '\u24E0': 'q',
2879
+ '\uFF51': 'q',
2880
+ '\u024B': 'q',
2881
+ '\uA757': 'q',
2882
+ '\uA759': 'q',
2883
+ '\u24E1': 'r',
2884
+ '\uFF52': 'r',
2885
+ '\u0155': 'r',
2886
+ '\u1E59': 'r',
2887
+ '\u0159': 'r',
2888
+ '\u0211': 'r',
2889
+ '\u0213': 'r',
2890
+ '\u1E5B': 'r',
2891
+ '\u1E5D': 'r',
2892
+ '\u0157': 'r',
2893
+ '\u1E5F': 'r',
2894
+ '\u024D': 'r',
2895
+ '\u027D': 'r',
2896
+ '\uA75B': 'r',
2897
+ '\uA7A7': 'r',
2898
+ '\uA783': 'r',
2899
+ '\u24E2': 's',
2900
+ '\uFF53': 's',
2901
+ '\u00DF': 's',
2902
+ '\u015B': 's',
2903
+ '\u1E65': 's',
2904
+ '\u015D': 's',
2905
+ '\u1E61': 's',
2906
+ '\u0161': 's',
2907
+ '\u1E67': 's',
2908
+ '\u1E63': 's',
2909
+ '\u1E69': 's',
2910
+ '\u0219': 's',
2911
+ '\u015F': 's',
2912
+ '\u023F': 's',
2913
+ '\uA7A9': 's',
2914
+ '\uA785': 's',
2915
+ '\u1E9B': 's',
2916
+ '\u24E3': 't',
2917
+ '\uFF54': 't',
2918
+ '\u1E6B': 't',
2919
+ '\u1E97': 't',
2920
+ '\u0165': 't',
2921
+ '\u1E6D': 't',
2922
+ '\u021B': 't',
2923
+ '\u0163': 't',
2924
+ '\u1E71': 't',
2925
+ '\u1E6F': 't',
2926
+ '\u0167': 't',
2927
+ '\u01AD': 't',
2928
+ '\u0288': 't',
2929
+ '\u2C66': 't',
2930
+ '\uA787': 't',
2931
+ '\uA729': 'tz',
2932
+ '\u24E4': 'u',
2933
+ '\uFF55': 'u',
2934
+ '\u00F9': 'u',
2935
+ '\u00FA': 'u',
2936
+ '\u00FB': 'u',
2937
+ '\u0169': 'u',
2938
+ '\u1E79': 'u',
2939
+ '\u016B': 'u',
2940
+ '\u1E7B': 'u',
2941
+ '\u016D': 'u',
2942
+ '\u00FC': 'u',
2943
+ '\u01DC': 'u',
2944
+ '\u01D8': 'u',
2945
+ '\u01D6': 'u',
2946
+ '\u01DA': 'u',
2947
+ '\u1EE7': 'u',
2948
+ '\u016F': 'u',
2949
+ '\u0171': 'u',
2950
+ '\u01D4': 'u',
2951
+ '\u0215': 'u',
2952
+ '\u0217': 'u',
2953
+ '\u01B0': 'u',
2954
+ '\u1EEB': 'u',
2955
+ '\u1EE9': 'u',
2956
+ '\u1EEF': 'u',
2957
+ '\u1EED': 'u',
2958
+ '\u1EF1': 'u',
2959
+ '\u1EE5': 'u',
2960
+ '\u1E73': 'u',
2961
+ '\u0173': 'u',
2962
+ '\u1E77': 'u',
2963
+ '\u1E75': 'u',
2964
+ '\u0289': 'u',
2965
+ '\u24E5': 'v',
2966
+ '\uFF56': 'v',
2967
+ '\u1E7D': 'v',
2968
+ '\u1E7F': 'v',
2969
+ '\u028B': 'v',
2970
+ '\uA75F': 'v',
2971
+ '\u028C': 'v',
2972
+ '\uA761': 'vy',
2973
+ '\u24E6': 'w',
2974
+ '\uFF57': 'w',
2975
+ '\u1E81': 'w',
2976
+ '\u1E83': 'w',
2977
+ '\u0175': 'w',
2978
+ '\u1E87': 'w',
2979
+ '\u1E85': 'w',
2980
+ '\u1E98': 'w',
2981
+ '\u1E89': 'w',
2982
+ '\u2C73': 'w',
2983
+ '\u24E7': 'x',
2984
+ '\uFF58': 'x',
2985
+ '\u1E8B': 'x',
2986
+ '\u1E8D': 'x',
2987
+ '\u24E8': 'y',
2988
+ '\uFF59': 'y',
2989
+ '\u1EF3': 'y',
2990
+ '\u00FD': 'y',
2991
+ '\u0177': 'y',
2992
+ '\u1EF9': 'y',
2993
+ '\u0233': 'y',
2994
+ '\u1E8F': 'y',
2995
+ '\u00FF': 'y',
2996
+ '\u1EF7': 'y',
2997
+ '\u1E99': 'y',
2998
+ '\u1EF5': 'y',
2999
+ '\u01B4': 'y',
3000
+ '\u024F': 'y',
3001
+ '\u1EFF': 'y',
3002
+ '\u24E9': 'z',
3003
+ '\uFF5A': 'z',
3004
+ '\u017A': 'z',
3005
+ '\u1E91': 'z',
3006
+ '\u017C': 'z',
3007
+ '\u017E': 'z',
3008
+ '\u1E93': 'z',
3009
+ '\u1E95': 'z',
3010
+ '\u01B6': 'z',
3011
+ '\u0225': 'z',
3012
+ '\u0240': 'z',
3013
+ '\u2C6C': 'z',
3014
+ '\uA763': 'z',
3015
+ '\u0386': '\u0391',
3016
+ '\u0388': '\u0395',
3017
+ '\u0389': '\u0397',
3018
+ '\u038A': '\u0399',
3019
+ '\u03AA': '\u0399',
3020
+ '\u038C': '\u039F',
3021
+ '\u038E': '\u03A5',
3022
+ '\u03AB': '\u03A5',
3023
+ '\u038F': '\u03A9',
3024
+ '\u03AC': '\u03B1',
3025
+ '\u03AD': '\u03B5',
3026
+ '\u03AE': '\u03B7',
3027
+ '\u03AF': '\u03B9',
3028
+ '\u03CA': '\u03B9',
3029
+ '\u0390': '\u03B9',
3030
+ '\u03CC': '\u03BF',
3031
+ '\u03CD': '\u03C5',
3032
+ '\u03CB': '\u03C5',
3033
+ '\u03B0': '\u03C5',
3034
+ '\u03C9': '\u03C9',
3035
+ '\u03C2': '\u03C3'
3036
+ };
3037
+
3038
+ return diacritics;
3039
+ });
3040
+
3041
+ S2.define('select2/data/base',[
3042
+ '../utils'
3043
+ ], function (Utils) {
3044
+ function BaseAdapter ($element, options) {
3045
+ BaseAdapter.__super__.constructor.call(this);
3046
+ }
3047
+
3048
+ Utils.Extend(BaseAdapter, Utils.Observable);
3049
+
3050
+ BaseAdapter.prototype.current = function (callback) {
3051
+ throw new Error('The `current` method must be defined in child classes.');
3052
+ };
3053
+
3054
+ BaseAdapter.prototype.query = function (params, callback) {
3055
+ throw new Error('The `query` method must be defined in child classes.');
3056
+ };
3057
+
3058
+ BaseAdapter.prototype.bind = function (container, $container) {
3059
+ // Can be implemented in subclasses
3060
+ };
3061
+
3062
+ BaseAdapter.prototype.destroy = function () {
3063
+ // Can be implemented in subclasses
3064
+ };
3065
+
3066
+ BaseAdapter.prototype.generateResultId = function (container, data) {
3067
+ var id = '';
3068
+
3069
+ if (container != null) {
3070
+ id += container.id
3071
+ } else {
3072
+ id += Utils.generateChars(4);
3073
+ }
3074
+
3075
+ id += '-result-';
3076
+ id += Utils.generateChars(4);
3077
+
3078
+ if (data.id != null) {
3079
+ id += '-' + data.id.toString();
3080
+ } else {
3081
+ id += '-' + Utils.generateChars(4);
3082
+ }
3083
+ return id;
3084
+ };
3085
+
3086
+ return BaseAdapter;
3087
+ });
3088
+
3089
+ S2.define('select2/data/select',[
3090
+ './base',
3091
+ '../utils',
3092
+ 'jquery'
3093
+ ], function (BaseAdapter, Utils, $) {
3094
+ function SelectAdapter ($element, options) {
3095
+ this.$element = $element;
3096
+ this.options = options;
3097
+
3098
+ SelectAdapter.__super__.constructor.call(this);
3099
+ }
3100
+
3101
+ Utils.Extend(SelectAdapter, BaseAdapter);
3102
+
3103
+ SelectAdapter.prototype.current = function (callback) {
3104
+ var data = [];
3105
+ var self = this;
3106
+
3107
+ this.$element.find(':selected').each(function () {
3108
+ var $option = $(this);
3109
+
3110
+ var option = self.item($option);
3111
+
3112
+ data.push(option);
3113
+ });
3114
+
3115
+ callback(data);
3116
+ };
3117
+
3118
+ SelectAdapter.prototype.select = function (data) {
3119
+ var self = this;
3120
+
3121
+ data.selected = true;
3122
+
3123
+ // If data.element is a DOM node, use it instead
3124
+ if ($(data.element).is('option')) {
3125
+ data.element.selected = true;
3126
+
3127
+ this.$element.trigger('change');
3128
+
3129
+ return;
3130
+ }
3131
+
3132
+ if (this.$element.prop('multiple')) {
3133
+ this.current(function (currentData) {
3134
+ var val = [];
3135
+
3136
+ data = [data];
3137
+ data.push.apply(data, currentData);
3138
+
3139
+ for (var d = 0; d < data.length; d++) {
3140
+ var id = data[d].id;
3141
+
3142
+ if ($.inArray(id, val) === -1) {
3143
+ val.push(id);
3144
+ }
3145
+ }
3146
+
3147
+ self.$element.val(val);
3148
+ self.$element.trigger('change');
3149
+ });
3150
+ } else {
3151
+ var val = data.id;
3152
+
3153
+ this.$element.val(val);
3154
+ this.$element.trigger('change');
3155
+ }
3156
+ };
3157
+
3158
+ SelectAdapter.prototype.unselect = function (data) {
3159
+ var self = this;
3160
+
3161
+ if (!this.$element.prop('multiple')) {
3162
+ return;
3163
+ }
3164
+
3165
+ data.selected = false;
3166
+
3167
+ if ($(data.element).is('option')) {
3168
+ data.element.selected = false;
3169
+
3170
+ this.$element.trigger('change');
3171
+
3172
+ return;
3173
+ }
3174
+
3175
+ this.current(function (currentData) {
3176
+ var val = [];
3177
+
3178
+ for (var d = 0; d < currentData.length; d++) {
3179
+ var id = currentData[d].id;
3180
+
3181
+ if (id !== data.id && $.inArray(id, val) === -1) {
3182
+ val.push(id);
3183
+ }
3184
+ }
3185
+
3186
+ self.$element.val(val);
3187
+
3188
+ self.$element.trigger('change');
3189
+ });
3190
+ };
3191
+
3192
+ SelectAdapter.prototype.bind = function (container, $container) {
3193
+ var self = this;
3194
+
3195
+ this.container = container;
3196
+
3197
+ container.on('select', function (params) {
3198
+ self.select(params.data);
3199
+ });
3200
+
3201
+ container.on('unselect', function (params) {
3202
+ self.unselect(params.data);
3203
+ });
3204
+ };
3205
+
3206
+ SelectAdapter.prototype.destroy = function () {
3207
+ // Remove anything added to child elements
3208
+ this.$element.find('*').each(function () {
3209
+ // Remove any custom data set by Select2
3210
+ $.removeData(this, 'data');
3211
+ });
3212
+ };
3213
+
3214
+ SelectAdapter.prototype.query = function (params, callback) {
3215
+ var data = [];
3216
+ var self = this;
3217
+
3218
+ var $options = this.$element.children();
3219
+
3220
+ $options.each(function () {
3221
+ var $option = $(this);
3222
+
3223
+ if (!$option.is('option') && !$option.is('optgroup')) {
3224
+ return;
3225
+ }
3226
+
3227
+ var option = self.item($option);
3228
+
3229
+ var matches = self.matches(params, option);
3230
+
3231
+ if (matches !== null) {
3232
+ data.push(matches);
3233
+ }
3234
+ });
3235
+
3236
+ callback({
3237
+ results: data
3238
+ });
3239
+ };
3240
+
3241
+ SelectAdapter.prototype.addOptions = function ($options) {
3242
+ Utils.appendMany(this.$element, $options);
3243
+ };
3244
+
3245
+ SelectAdapter.prototype.option = function (data) {
3246
+ var option;
3247
+
3248
+ if (data.children) {
3249
+ option = document.createElement('optgroup');
3250
+ option.label = data.text;
3251
+ } else {
3252
+ option = document.createElement('option');
3253
+
3254
+ if (option.textContent !== undefined) {
3255
+ option.textContent = data.text;
3256
+ } else {
3257
+ option.innerText = data.text;
3258
+ }
3259
+ }
3260
+
3261
+ if (data.id !== undefined) {
3262
+ option.value = data.id;
3263
+ }
3264
+
3265
+ if (data.disabled) {
3266
+ option.disabled = true;
3267
+ }
3268
+
3269
+ if (data.selected) {
3270
+ option.selected = true;
3271
+ }
3272
+
3273
+ if (data.title) {
3274
+ option.title = data.title;
3275
+ }
3276
+
3277
+ var $option = $(option);
3278
+
3279
+ var normalizedData = this._normalizeItem(data);
3280
+ normalizedData.element = option;
3281
+
3282
+ // Override the option's data with the combined data
3283
+ $.data(option, 'data', normalizedData);
3284
+
3285
+ return $option;
3286
+ };
3287
+
3288
+ SelectAdapter.prototype.item = function ($option) {
3289
+ var data = {};
3290
+
3291
+ data = $.data($option[0], 'data');
3292
+
3293
+ if (data != null) {
3294
+ return data;
3295
+ }
3296
+
3297
+ if ($option.is('option')) {
3298
+ data = {
3299
+ id: $option.val(),
3300
+ text: $option.text(),
3301
+ disabled: $option.prop('disabled'),
3302
+ selected: $option.prop('selected'),
3303
+ title: $option.prop('title')
3304
+ };
3305
+ } else if ($option.is('optgroup')) {
3306
+ data = {
3307
+ text: $option.prop('label'),
3308
+ children: [],
3309
+ title: $option.prop('title')
3310
+ };
3311
+
3312
+ var $children = $option.children('option');
3313
+ var children = [];
3314
+
3315
+ for (var c = 0; c < $children.length; c++) {
3316
+ var $child = $($children[c]);
3317
+
3318
+ var child = this.item($child);
3319
+
3320
+ children.push(child);
3321
+ }
3322
+
3323
+ data.children = children;
3324
+ }
3325
+
3326
+ data = this._normalizeItem(data);
3327
+ data.element = $option[0];
3328
+
3329
+ $.data($option[0], 'data', data);
3330
+
3331
+ return data;
3332
+ };
3333
+
3334
+ SelectAdapter.prototype._normalizeItem = function (item) {
3335
+ if (!$.isPlainObject(item)) {
3336
+ item = {
3337
+ id: item,
3338
+ text: item
3339
+ };
3340
+ }
3341
+
3342
+ item = $.extend({}, {
3343
+ text: ''
3344
+ }, item);
3345
+
3346
+ var defaults = {
3347
+ selected: false,
3348
+ disabled: false
3349
+ };
3350
+
3351
+ if (item.id != null) {
3352
+ item.id = item.id.toString();
3353
+ }
3354
+
3355
+ if (item.text != null) {
3356
+ item.text = item.text.toString();
3357
+ }
3358
+
3359
+ if (item._resultId == null && item.id) {
3360
+ item._resultId = this.generateResultId(this.container, item);
3361
+ }
3362
+
3363
+ return $.extend({}, defaults, item);
3364
+ };
3365
+
3366
+ SelectAdapter.prototype.matches = function (params, data) {
3367
+ var matcher = this.options.get('matcher');
3368
+
3369
+ return matcher(params, data);
3370
+ };
3371
+
3372
+ return SelectAdapter;
3373
+ });
3374
+
3375
+ S2.define('select2/data/array',[
3376
+ './select',
3377
+ '../utils',
3378
+ 'jquery'
3379
+ ], function (SelectAdapter, Utils, $) {
3380
+ function ArrayAdapter ($element, options) {
3381
+ var data = options.get('data') || [];
3382
+
3383
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
3384
+
3385
+ this.addOptions(this.convertToOptions(data));
3386
+ }
3387
+
3388
+ Utils.Extend(ArrayAdapter, SelectAdapter);
3389
+
3390
+ ArrayAdapter.prototype.select = function (data) {
3391
+ var $option = this.$element.find('option').filter(function (i, elm) {
3392
+ return elm.value == data.id.toString();
3393
+ });
3394
+
3395
+ if ($option.length === 0) {
3396
+ $option = this.option(data);
3397
+
3398
+ this.addOptions($option);
3399
+ }
3400
+
3401
+ ArrayAdapter.__super__.select.call(this, data);
3402
+ };
3403
+
3404
+ ArrayAdapter.prototype.convertToOptions = function (data) {
3405
+ var self = this;
3406
+
3407
+ var $existing = this.$element.find('option');
3408
+ var existingIds = $existing.map(function () {
3409
+ return self.item($(this)).id;
3410
+ }).get();
3411
+
3412
+ var $options = [];
3413
+
3414
+ // Filter out all items except for the one passed in the argument
3415
+ function onlyItem (item) {
3416
+ return function () {
3417
+ return $(this).val() == item.id;
3418
+ };
3419
+ }
3420
+
3421
+ for (var d = 0; d < data.length; d++) {
3422
+ var item = this._normalizeItem(data[d]);
3423
+
3424
+ // Skip items which were pre-loaded, only merge the data
3425
+ if ($.inArray(item.id, existingIds) >= 0) {
3426
+ var $existingOption = $existing.filter(onlyItem(item));
3427
+
3428
+ var existingData = this.item($existingOption);
3429
+ var newData = $.extend(true, {}, item, existingData);
3430
+
3431
+ var $newOption = this.option(newData);
3432
+
3433
+ $existingOption.replaceWith($newOption);
3434
+
3435
+ continue;
3436
+ }
3437
+
3438
+ var $option = this.option(item);
3439
+
3440
+ if (item.children) {
3441
+ var $children = this.convertToOptions(item.children);
3442
+
3443
+ Utils.appendMany($option, $children);
3444
+ }
3445
+
3446
+ $options.push($option);
3447
+ }
3448
+
3449
+ return $options;
3450
+ };
3451
+
3452
+ return ArrayAdapter;
3453
+ });
3454
+
3455
+ S2.define('select2/data/ajax',[
3456
+ './array',
3457
+ '../utils',
3458
+ 'jquery'
3459
+ ], function (ArrayAdapter, Utils, $) {
3460
+ function AjaxAdapter ($element, options) {
3461
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
3462
+
3463
+ if (this.ajaxOptions.processResults != null) {
3464
+ this.processResults = this.ajaxOptions.processResults;
3465
+ }
3466
+
3467
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
3468
+ }
3469
+
3470
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
3471
+
3472
+ AjaxAdapter.prototype._applyDefaults = function (options) {
3473
+ var defaults = {
3474
+ data: function (params) {
3475
+ return $.extend({}, params, {
3476
+ q: params.term
3477
+ });
3478
+ },
3479
+ transport: function (params, success, failure) {
3480
+ var $request = $.ajax(params);
3481
+
3482
+ $request.then(success);
3483
+ $request.fail(failure);
3484
+
3485
+ return $request;
3486
+ }
3487
+ };
3488
+
3489
+ return $.extend({}, defaults, options, true);
3490
+ };
3491
+
3492
+ AjaxAdapter.prototype.processResults = function (results) {
3493
+ return results;
3494
+ };
3495
+
3496
+ AjaxAdapter.prototype.query = function (params, callback) {
3497
+ var matches = [];
3498
+ var self = this;
3499
+
3500
+ if (this._request != null) {
3501
+ // JSONP requests cannot always be aborted
3502
+ if ($.isFunction(this._request.abort)) {
3503
+ this._request.abort();
3504
+ }
3505
+
3506
+ this._request = null;
3507
+ }
3508
+
3509
+ var options = $.extend({
3510
+ type: 'GET'
3511
+ }, this.ajaxOptions);
3512
+
3513
+ if (typeof options.url === 'function') {
3514
+ options.url = options.url.call(this.$element, params);
3515
+ }
3516
+
3517
+ if (typeof options.data === 'function') {
3518
+ options.data = options.data.call(this.$element, params);
3519
+ }
3520
+
3521
+ function request () {
3522
+ var $request = options.transport(options, function (data) {
3523
+ var results = self.processResults(data, params);
3524
+
3525
+ if (self.options.get('debug') && window.console && console.error) {
3526
+ // Check to make sure that the response included a `results` key.
3527
+ if (!results || !results.results || !$.isArray(results.results)) {
3528
+ console.error(
3529
+ 'Select2: The AJAX results did not return an array in the ' +
3530
+ '`results` key of the response.'
3531
+ );
3532
+ }
3533
+ }
3534
+
3535
+ callback(results);
3536
+ self.container.focusOnActiveElement();
3537
+ }, function () {
3538
+ // Attempt to detect if a request was aborted
3539
+ // Only works if the transport exposes a status property
3540
+ if ($request.status && $request.status === '0') {
3541
+ return;
3542
+ }
3543
+
3544
+ self.trigger('results:message', {
3545
+ message: 'errorLoading'
3546
+ });
3547
+ });
3548
+
3549
+ self._request = $request;
3550
+ }
3551
+
3552
+ if (this.ajaxOptions.delay && params.term != null) {
3553
+ if (this._queryTimeout) {
3554
+ window.clearTimeout(this._queryTimeout);
3555
+ }
3556
+
3557
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
3558
+ } else {
3559
+ request();
3560
+ }
3561
+ };
3562
+
3563
+ return AjaxAdapter;
3564
+ });
3565
+
3566
+ S2.define('select2/data/tags',[
3567
+ 'jquery'
3568
+ ], function ($) {
3569
+ function Tags (decorated, $element, options) {
3570
+ var tags = options.get('tags');
3571
+
3572
+ var createTag = options.get('createTag');
3573
+
3574
+ if (createTag !== undefined) {
3575
+ this.createTag = createTag;
3576
+ }
3577
+
3578
+ var insertTag = options.get('insertTag');
3579
+
3580
+ if (insertTag !== undefined) {
3581
+ this.insertTag = insertTag;
3582
+ }
3583
+
3584
+ decorated.call(this, $element, options);
3585
+
3586
+ if ($.isArray(tags)) {
3587
+ for (var t = 0; t < tags.length; t++) {
3588
+ var tag = tags[t];
3589
+ var item = this._normalizeItem(tag);
3590
+
3591
+ var $option = this.option(item);
3592
+
3593
+ this.$element.append($option);
3594
+ }
3595
+ }
3596
+ }
3597
+
3598
+ Tags.prototype.query = function (decorated, params, callback) {
3599
+ var self = this;
3600
+
3601
+ this._removeOldTags();
3602
+
3603
+ if (params.term == null || params.page != null) {
3604
+ decorated.call(this, params, callback);
3605
+ return;
3606
+ }
3607
+
3608
+ function wrapper (obj, child) {
3609
+ var data = obj.results;
3610
+
3611
+ for (var i = 0; i < data.length; i++) {
3612
+ var option = data[i];
3613
+
3614
+ var checkChildren = (
3615
+ option.children != null &&
3616
+ !wrapper({
3617
+ results: option.children
3618
+ }, true)
3619
+ );
3620
+
3621
+ var optionText = (option.text || '').toUpperCase();
3622
+ var paramsTerm = (params.term || '').toUpperCase();
3623
+
3624
+ var checkText = optionText === paramsTerm;
3625
+
3626
+ if (checkText || checkChildren) {
3627
+ if (child) {
3628
+ return false;
3629
+ }
3630
+
3631
+ obj.data = data;
3632
+ callback(obj);
3633
+
3634
+ return;
3635
+ }
3636
+ }
3637
+
3638
+ if (child) {
3639
+ return true;
3640
+ }
3641
+
3642
+ var tag = self.createTag(params);
3643
+
3644
+ if (tag != null) {
3645
+ var $option = self.option(tag);
3646
+ $option.attr('data-select2-tag', true);
3647
+
3648
+ self.addOptions([$option]);
3649
+
3650
+ self.insertTag(data, tag);
3651
+ }
3652
+
3653
+ obj.results = data;
3654
+
3655
+ callback(obj);
3656
+ }
3657
+
3658
+ decorated.call(this, params, wrapper);
3659
+ };
3660
+
3661
+ Tags.prototype.createTag = function (decorated, params) {
3662
+ var term = $.trim(params.term);
3663
+
3664
+ if (term === '') {
3665
+ return null;
3666
+ }
3667
+
3668
+ return {
3669
+ id: term,
3670
+ text: term
3671
+ };
3672
+ };
3673
+
3674
+ Tags.prototype.insertTag = function (_, data, tag) {
3675
+ data.unshift(tag);
3676
+ };
3677
+
3678
+ Tags.prototype._removeOldTags = function (_) {
3679
+ var tag = this._lastTag;
3680
+
3681
+ var $options = this.$element.find('option[data-select2-tag]');
3682
+
3683
+ $options.each(function () {
3684
+ if (this.selected) {
3685
+ return;
3686
+ }
3687
+
3688
+ $(this).remove();
3689
+ });
3690
+ };
3691
+
3692
+ return Tags;
3693
+ });
3694
+
3695
+ S2.define('select2/data/tokenizer',[
3696
+ 'jquery'
3697
+ ], function ($) {
3698
+ function Tokenizer (decorated, $element, options) {
3699
+ var tokenizer = options.get('tokenizer');
3700
+
3701
+ if (tokenizer !== undefined) {
3702
+ this.tokenizer = tokenizer;
3703
+ }
3704
+
3705
+ decorated.call(this, $element, options);
3706
+ }
3707
+
3708
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
3709
+ decorated.call(this, container, $container);
3710
+
3711
+ this.$search = container.dropdown.$search || container.selection.$search ||
3712
+ $container.find('.select2-search__field');
3713
+ };
3714
+
3715
+ Tokenizer.prototype.query = function (decorated, params, callback) {
3716
+ var self = this;
3717
+
3718
+ function createAndSelect (data) {
3719
+ // Normalize the data object so we can use it for checks
3720
+ var item = self._normalizeItem(data);
3721
+
3722
+ // Check if the data object already exists as a tag
3723
+ // Select it if it doesn't
3724
+ var $existingOptions = self.$element.find('option').filter(function () {
3725
+ return $(this).val() === item.id;
3726
+ });
3727
+
3728
+ // If an existing option wasn't found for it, create the option
3729
+ if (!$existingOptions.length) {
3730
+ var $option = self.option(item);
3731
+ $option.attr('data-select2-tag', true);
3732
+
3733
+ self._removeOldTags();
3734
+ self.addOptions([$option]);
3735
+ }
3736
+
3737
+ // Select the item, now that we know there is an option for it
3738
+ select(item);
3739
+ }
3740
+
3741
+ function select (data) {
3742
+ self.trigger('select', {
3743
+ data: data
3744
+ });
3745
+ }
3746
+
3747
+ params.term = params.term || '';
3748
+
3749
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
3750
+
3751
+ if (tokenData.term !== params.term) {
3752
+ // Replace the search term if we have the search box
3753
+ if (this.$search.length) {
3754
+ this.$search.val(tokenData.term);
3755
+ this.$search.focus();
3756
+ }
3757
+
3758
+ params.term = tokenData.term;
3759
+ }
3760
+
3761
+ decorated.call(this, params, callback);
3762
+ };
3763
+
3764
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
3765
+ var separators = options.get('tokenSeparators') || [];
3766
+ var term = params.term;
3767
+ var i = 0;
3768
+
3769
+ var createTag = this.createTag || function (params) {
3770
+ return {
3771
+ id: params.term,
3772
+ text: params.term
3773
+ };
3774
+ };
3775
+
3776
+ while (i < term.length) {
3777
+ var termChar = term[i];
3778
+
3779
+ if ($.inArray(termChar, separators) === -1) {
3780
+ i++;
3781
+
3782
+ continue;
3783
+ }
3784
+
3785
+ var part = term.substr(0, i);
3786
+ var partParams = $.extend({}, params, {
3787
+ term: part
3788
+ });
3789
+
3790
+ var data = createTag(partParams);
3791
+
3792
+ if (data == null) {
3793
+ i++;
3794
+ continue;
3795
+ }
3796
+
3797
+ callback(data);
3798
+
3799
+ // Reset the term to not include the tokenized portion
3800
+ term = term.substr(i + 1) || '';
3801
+ i = 0;
3802
+ }
3803
+
3804
+ return {
3805
+ term: term
3806
+ };
3807
+ };
3808
+
3809
+ return Tokenizer;
3810
+ });
3811
+
3812
+ S2.define('select2/data/minimumInputLength',[
3813
+
3814
+ ], function () {
3815
+ function MinimumInputLength (decorated, $e, options) {
3816
+ this.minimumInputLength = options.get('minimumInputLength');
3817
+
3818
+ decorated.call(this, $e, options);
3819
+ }
3820
+
3821
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
3822
+ params.term = params.term || '';
3823
+
3824
+ if (params.term.length < this.minimumInputLength) {
3825
+ this.trigger('results:message', {
3826
+ message: 'inputTooShort',
3827
+ args: {
3828
+ minimum: this.minimumInputLength,
3829
+ input: params.term,
3830
+ params: params
3831
+ }
3832
+ });
3833
+
3834
+ return;
3835
+ }
3836
+
3837
+ decorated.call(this, params, callback);
3838
+ };
3839
+
3840
+ return MinimumInputLength;
3841
+ });
3842
+
3843
+ S2.define('select2/data/maximumInputLength',[
3844
+
3845
+ ], function () {
3846
+ function MaximumInputLength (decorated, $e, options) {
3847
+ this.maximumInputLength = options.get('maximumInputLength');
3848
+
3849
+ decorated.call(this, $e, options);
3850
+ }
3851
+
3852
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
3853
+ params.term = params.term || '';
3854
+
3855
+ if (this.maximumInputLength > 0 &&
3856
+ params.term.length > this.maximumInputLength) {
3857
+ this.trigger('results:message', {
3858
+ message: 'inputTooLong',
3859
+ args: {
3860
+ maximum: this.maximumInputLength,
3861
+ input: params.term,
3862
+ params: params
3863
+ }
3864
+ });
3865
+
3866
+ return;
3867
+ }
3868
+
3869
+ decorated.call(this, params, callback);
3870
+ };
3871
+
3872
+ return MaximumInputLength;
3873
+ });
3874
+
3875
+ S2.define('select2/data/maximumSelectionLength',[
3876
+
3877
+ ], function (){
3878
+ function MaximumSelectionLength (decorated, $e, options) {
3879
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
3880
+
3881
+ decorated.call(this, $e, options);
3882
+ }
3883
+
3884
+ MaximumSelectionLength.prototype.query =
3885
+ function (decorated, params, callback) {
3886
+ var self = this;
3887
+
3888
+ this.current(function (currentData) {
3889
+ var count = currentData != null ? currentData.length : 0;
3890
+ if (self.maximumSelectionLength > 0 &&
3891
+ count >= self.maximumSelectionLength) {
3892
+ self.trigger('results:message', {
3893
+ message: 'maximumSelected',
3894
+ args: {
3895
+ maximum: self.maximumSelectionLength
3896
+ }
3897
+ });
3898
+ return;
3899
+ }
3900
+ decorated.call(self, params, callback);
3901
+ });
3902
+ };
3903
+
3904
+ return MaximumSelectionLength;
3905
+ });
3906
+
3907
+ S2.define('select2/dropdown',[
3908
+ 'jquery',
3909
+ './utils'
3910
+ ], function ($, Utils) {
3911
+ function Dropdown ($element, options) {
3912
+ this.$element = $element;
3913
+ this.options = options;
3914
+
3915
+ Dropdown.__super__.constructor.call(this);
3916
+ }
3917
+
3918
+ Utils.Extend(Dropdown, Utils.Observable);
3919
+
3920
+ Dropdown.prototype.render = function () {
3921
+ var $dropdown = $(
3922
+ '<span class="select2-dropdown">' +
3923
+ '<span class="select2-results"></span>' +
3924
+ '</span>'
3925
+ );
3926
+
3927
+ $dropdown.attr('dir', this.options.get('dir'));
3928
+
3929
+ this.$dropdown = $dropdown;
3930
+
3931
+ return $dropdown;
3932
+ };
3933
+
3934
+ Dropdown.prototype.bind = function () {
3935
+ // Should be implemented in subclasses
3936
+ };
3937
+
3938
+ Dropdown.prototype.position = function ($dropdown, $container) {
3939
+ // Should be implmented in subclasses
3940
+ };
3941
+
3942
+ Dropdown.prototype.destroy = function () {
3943
+ // Remove the dropdown from the DOM
3944
+ this.$dropdown.remove();
3945
+ };
3946
+
3947
+ return Dropdown;
3948
+ });
3949
+
3950
+ S2.define('select2/dropdown/search',[
3951
+ 'jquery',
3952
+ '../utils'
3953
+ ], function ($, Utils) {
3954
+ function Search () { }
3955
+
3956
+ Search.prototype.render = function (decorated) {
3957
+ var $rendered = decorated.call(this);
3958
+
3959
+ var $search = $(
3960
+ '<span class="select2-search select2-search--dropdown">' +
3961
+ '<input class="select2-search__field" type="text" tabindex="-1"' +
3962
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
3963
+ ' spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" />' +
3964
+ '</span>'
3965
+ );
3966
+
3967
+ this.$searchContainer = $search;
3968
+ this.$search = $search.find('input');
3969
+
3970
+ $rendered.prepend($search);
3971
+
3972
+ return $rendered;
3973
+ };
3974
+
3975
+ Search.prototype.bind = function (decorated, container, $container) {
3976
+ var self = this;
3977
+ var resultsId = container.id + '-results';
3978
+
3979
+ decorated.call(this, container, $container);
3980
+
3981
+ this.$search.on('keydown', function (evt) {
3982
+ self.trigger('keypress', evt);
3983
+
3984
+ self._keyUpPrevented = evt.isDefaultPrevented();
3985
+ });
3986
+
3987
+ // Workaround for browsers which do not support the `input` event
3988
+ // This will prevent double-triggering of events for browsers which support
3989
+ // both the `keyup` and `input` events.
3990
+ this.$search.on('input', function (evt) {
3991
+ // Unbind the duplicated `keyup` event
3992
+ $(this).off('keyup');
3993
+ });
3994
+
3995
+ this.$search.on('keyup input', function (evt) {
3996
+ self.handleSearch(evt);
3997
+ });
3998
+
3999
+ container.on('open', function () {
4000
+ self.$search.attr('tabindex', 0);
4001
+ self.$search.attr('aria-owns', resultsId);
4002
+ self.$search.focus();
4003
+
4004
+ window.setTimeout(function () {
4005
+ self.$search.focus();
4006
+ }, 0);
4007
+ });
4008
+
4009
+ container.on('close', function () {
4010
+ self.$search.attr('tabindex', -1);
4011
+ self.$search.removeAttr('aria-activedescendant');
4012
+ self.$search.removeAttr('aria-owns');
4013
+ self.$search.val('');
4014
+ });
4015
+
4016
+ container.on('focus', function () {
4017
+ if (container.isOpen()) {
4018
+ self.$search.focus();
4019
+ }
4020
+ });
4021
+
4022
+ container.on('results:all', function (params) {
4023
+ if (params.query.term == null || params.query.term === '') {
4024
+ var showSearch = self.showSearch(params);
4025
+
4026
+ if (showSearch) {
4027
+ self.$searchContainer.removeClass('select2-search--hide');
4028
+ } else {
4029
+ self.$searchContainer.addClass('select2-search--hide');
4030
+ }
4031
+ }
4032
+ });
4033
+
4034
+ container.on('results:focus', function (params) {
4035
+ self.$search.attr('aria-activedescendant', params.data._resultId);
4036
+ });
4037
+ };
4038
+
4039
+ Search.prototype.handleSearch = function (evt) {
4040
+ if (!this._keyUpPrevented) {
4041
+ var input = this.$search.val();
4042
+
4043
+ this.trigger('query', {
4044
+ term: input
4045
+ });
4046
+ }
4047
+
4048
+ this._keyUpPrevented = false;
4049
+ };
4050
+
4051
+ Search.prototype.showSearch = function (_, params) {
4052
+ return true;
4053
+ };
4054
+
4055
+ return Search;
4056
+ });
4057
+
4058
+ S2.define('select2/dropdown/hidePlaceholder',[
4059
+
4060
+ ], function () {
4061
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
4062
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
4063
+
4064
+ decorated.call(this, $element, options, dataAdapter);
4065
+ }
4066
+
4067
+ HidePlaceholder.prototype.append = function (decorated, data) {
4068
+ data.results = this.removePlaceholder(data.results);
4069
+
4070
+ decorated.call(this, data);
4071
+ };
4072
+
4073
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
4074
+ if (typeof placeholder === 'string') {
4075
+ placeholder = {
4076
+ id: '',
4077
+ text: placeholder
4078
+ };
4079
+ }
4080
+
4081
+ return placeholder;
4082
+ };
4083
+
4084
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
4085
+ var modifiedData = data.slice(0);
4086
+
4087
+ for (var d = data.length - 1; d >= 0; d--) {
4088
+ var item = data[d];
4089
+
4090
+ if (this.placeholder.id === item.id) {
4091
+ modifiedData.splice(d, 1);
4092
+ }
4093
+ }
4094
+
4095
+ return modifiedData;
4096
+ };
4097
+
4098
+ return HidePlaceholder;
4099
+ });
4100
+
4101
+ S2.define('select2/dropdown/infiniteScroll',[
4102
+ 'jquery'
4103
+ ], function ($) {
4104
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
4105
+ this.lastParams = {};
4106
+
4107
+ decorated.call(this, $element, options, dataAdapter);
4108
+
4109
+ this.$loadingMore = this.createLoadingMore();
4110
+ this.loading = false;
4111
+ }
4112
+
4113
+ InfiniteScroll.prototype.append = function (decorated, data) {
4114
+ this.$loadingMore.remove();
4115
+ this.loading = false;
4116
+
4117
+ decorated.call(this, data);
4118
+
4119
+ if (this.showLoadingMore(data)) {
4120
+ this.$results.append(this.$loadingMore);
4121
+ }
4122
+ };
4123
+
4124
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
4125
+ var self = this;
4126
+
4127
+ decorated.call(this, container, $container);
4128
+
4129
+ container.on('query', function (params) {
4130
+ self.lastParams = params;
4131
+ self.loading = true;
4132
+ });
4133
+
4134
+ container.on('query:append', function (params) {
4135
+ self.lastParams = params;
4136
+ self.loading = true;
4137
+ });
4138
+
4139
+ this.$results.on('scroll', function () {
4140
+ var isLoadMoreVisible = $.contains(
4141
+ document.documentElement,
4142
+ self.$loadingMore[0]
4143
+ );
4144
+
4145
+ if (self.loading || !isLoadMoreVisible) {
4146
+ return;
4147
+ }
4148
+
4149
+ var currentOffset = self.$results.offset().top +
4150
+ self.$results.outerHeight(false);
4151
+ var loadingMoreOffset = self.$loadingMore.offset().top +
4152
+ self.$loadingMore.outerHeight(false);
4153
+
4154
+ if (currentOffset + 50 >= loadingMoreOffset) {
4155
+ self.loadMore();
4156
+ }
4157
+ });
4158
+ };
4159
+
4160
+ InfiniteScroll.prototype.loadMore = function () {
4161
+ this.loading = true;
4162
+
4163
+ var params = $.extend({}, {page: 1}, this.lastParams);
4164
+
4165
+ params.page++;
4166
+
4167
+ this.trigger('query:append', params);
4168
+ };
4169
+
4170
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
4171
+ return data.pagination && data.pagination.more;
4172
+ };
4173
+
4174
+ InfiniteScroll.prototype.createLoadingMore = function () {
4175
+ var $option = $(
4176
+ '<li ' +
4177
+ 'class="select2-results__option select2-results__option--load-more"' +
4178
+ 'role="option" aria-disabled="true"></li>'
4179
+ );
4180
+
4181
+ var message = this.options.get('translations').get('loadingMore');
4182
+
4183
+ $option.html(message(this.lastParams));
4184
+
4185
+ return $option;
4186
+ };
4187
+
4188
+ return InfiniteScroll;
4189
+ });
4190
+
4191
+ S2.define('select2/dropdown/attachBody',[
4192
+ 'jquery',
4193
+ '../utils'
4194
+ ], function ($, Utils) {
4195
+ function AttachBody (decorated, $element, options) {
4196
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
4197
+
4198
+ decorated.call(this, $element, options);
4199
+ }
4200
+
4201
+ AttachBody.prototype.bind = function (decorated, container, $container) {
4202
+ var self = this;
4203
+
4204
+ var setupResultsEvents = false;
4205
+
4206
+ decorated.call(this, container, $container);
4207
+
4208
+ container.on('open', function () {
4209
+ self._showDropdown();
4210
+ self._attachPositioningHandler(container);
4211
+
4212
+ if (!setupResultsEvents) {
4213
+ setupResultsEvents = true;
4214
+
4215
+ container.on('results:all', function () {
4216
+ self._positionDropdown();
4217
+ self._resizeDropdown();
4218
+ });
4219
+
4220
+ container.on('results:append', function () {
4221
+ self._positionDropdown();
4222
+ self._resizeDropdown();
4223
+ });
4224
+ }
4225
+ });
4226
+
4227
+ container.on('close', function () {
4228
+ self._hideDropdown();
4229
+ self._detachPositioningHandler(container);
4230
+ });
4231
+
4232
+ this.$dropdownContainer.on('mousedown', function (evt) {
4233
+ evt.stopPropagation();
4234
+ });
4235
+ };
4236
+
4237
+ AttachBody.prototype.destroy = function (decorated) {
4238
+ decorated.call(this);
4239
+
4240
+ this.$dropdownContainer.remove();
4241
+ };
4242
+
4243
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
4244
+ // Clone all of the container classes
4245
+ $dropdown.attr('class', $container.attr('class'));
4246
+
4247
+ $dropdown.removeClass('select2');
4248
+ $dropdown.addClass('select2-container--open');
4249
+
4250
+ $dropdown.css({
4251
+ position: 'absolute',
4252
+ top: -999999
4253
+ });
4254
+
4255
+ this.$container = $container;
4256
+ };
4257
+
4258
+ AttachBody.prototype.render = function (decorated) {
4259
+ var $container = $('<span></span>');
4260
+
4261
+ var $dropdown = decorated.call(this);
4262
+ $container.append($dropdown);
4263
+
4264
+ this.$dropdownContainer = $container;
4265
+
4266
+ return $container;
4267
+ };
4268
+
4269
+ AttachBody.prototype._hideDropdown = function (decorated) {
4270
+ this.$dropdownContainer.detach();
4271
+ };
4272
+
4273
+ AttachBody.prototype._attachPositioningHandler =
4274
+ function (decorated, container) {
4275
+ var self = this;
4276
+
4277
+ var scrollEvent = 'scroll.select2.' + container.id;
4278
+ var resizeEvent = 'resize.select2.' + container.id;
4279
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4280
+
4281
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4282
+ $watchers.each(function () {
4283
+ $(this).data('select2-scroll-position', {
4284
+ x: $(this).scrollLeft(),
4285
+ y: $(this).scrollTop()
4286
+ });
4287
+ });
4288
+
4289
+ $watchers.on(scrollEvent, function (ev) {
4290
+ var position = $(this).data('select2-scroll-position');
4291
+ $(this).scrollTop(position.y);
4292
+ });
4293
+
4294
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
4295
+ function (e) {
4296
+ self._positionDropdown();
4297
+ self._resizeDropdown();
4298
+ });
4299
+ };
4300
+
4301
+ AttachBody.prototype._detachPositioningHandler =
4302
+ function (decorated, container) {
4303
+ var scrollEvent = 'scroll.select2.' + container.id;
4304
+ var resizeEvent = 'resize.select2.' + container.id;
4305
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4306
+
4307
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4308
+ $watchers.off(scrollEvent);
4309
+
4310
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
4311
+ };
4312
+
4313
+ AttachBody.prototype._positionDropdown = function () {
4314
+ var $window = $(window);
4315
+
4316
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
4317
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
4318
+
4319
+ var newDirection = null;
4320
+
4321
+ var offset = this.$container.offset();
4322
+
4323
+ offset.bottom = offset.top + this.$container.outerHeight(false);
4324
+
4325
+ var container = {
4326
+ height: this.$container.outerHeight(false)
4327
+ };
4328
+
4329
+ container.top = offset.top;
4330
+ container.bottom = offset.top + container.height;
4331
+
4332
+ var dropdown = {
4333
+ height: this.$dropdown.outerHeight(false)
4334
+ };
4335
+
4336
+ var viewport = {
4337
+ top: $window.scrollTop(),
4338
+ bottom: $window.scrollTop() + $window.height()
4339
+ };
4340
+
4341
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
4342
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
4343
+
4344
+ var css = {
4345
+ left: offset.left,
4346
+ top: container.bottom
4347
+ };
4348
+
4349
+ // Determine what the parent element is to use for calciulating the offset
4350
+ var $offsetParent = this.$dropdownParent;
4351
+
4352
+ // For statically positoned elements, we need to get the element
4353
+ // that is determining the offset
4354
+ if ($offsetParent.css('position') === 'static') {
4355
+ $offsetParent = $offsetParent.offsetParent();
4356
+ }
4357
+
4358
+ var parentOffset = $offsetParent.offset();
4359
+
4360
+ css.top -= parentOffset.top;
4361
+ css.left -= parentOffset.left;
4362
+
4363
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
4364
+ newDirection = 'below';
4365
+ }
4366
+
4367
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
4368
+ newDirection = 'above';
4369
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
4370
+ newDirection = 'below';
4371
+ }
4372
+
4373
+ if (newDirection == 'above' ||
4374
+ (isCurrentlyAbove && newDirection !== 'below')) {
4375
+ css.top = container.top - parentOffset.top - dropdown.height;
4376
+ }
4377
+
4378
+ if (newDirection != null) {
4379
+ this.$dropdown
4380
+ .removeClass('select2-dropdown--below select2-dropdown--above')
4381
+ .addClass('select2-dropdown--' + newDirection);
4382
+ this.$container
4383
+ .removeClass('select2-container--below select2-container--above')
4384
+ .addClass('select2-container--' + newDirection);
4385
+ }
4386
+
4387
+ this.$dropdownContainer.css(css);
4388
+ };
4389
+
4390
+ AttachBody.prototype._resizeDropdown = function () {
4391
+ var css = {
4392
+ width: this.$container.outerWidth(false) + 'px'
4393
+ };
4394
+
4395
+ if (this.options.get('dropdownAutoWidth')) {
4396
+ css.minWidth = css.width;
4397
+ css.position = 'relative';
4398
+ css.width = 'auto';
4399
+ }
4400
+
4401
+ this.$dropdown.css(css);
4402
+ };
4403
+
4404
+ AttachBody.prototype._showDropdown = function (decorated) {
4405
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
4406
+
4407
+ this._positionDropdown();
4408
+ this._resizeDropdown();
4409
+ };
4410
+
4411
+ return AttachBody;
4412
+ });
4413
+
4414
+ S2.define('select2/dropdown/minimumResultsForSearch',[
4415
+
4416
+ ], function () {
4417
+ function countResults (data) {
4418
+ var count = 0;
4419
+
4420
+ for (var d = 0; d < data.length; d++) {
4421
+ var item = data[d];
4422
+
4423
+ if (item.children) {
4424
+ count += countResults(item.children);
4425
+ } else {
4426
+ count++;
4427
+ }
4428
+ }
4429
+
4430
+ return count;
4431
+ }
4432
+
4433
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
4434
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
4435
+
4436
+ if (this.minimumResultsForSearch < 0) {
4437
+ this.minimumResultsForSearch = Infinity;
4438
+ }
4439
+
4440
+ decorated.call(this, $element, options, dataAdapter);
4441
+ }
4442
+
4443
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
4444
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
4445
+ return false;
4446
+ }
4447
+
4448
+ return decorated.call(this, params);
4449
+ };
4450
+
4451
+ return MinimumResultsForSearch;
4452
+ });
4453
+
4454
+ S2.define('select2/dropdown/selectOnClose',[
4455
+
4456
+ ], function () {
4457
+ function SelectOnClose () { }
4458
+
4459
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
4460
+ var self = this;
4461
+
4462
+ decorated.call(this, container, $container);
4463
+
4464
+ container.on('close', function (params) {
4465
+ self._handleSelectOnClose(params);
4466
+ });
4467
+ };
4468
+
4469
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
4470
+ if (params && params.originalSelect2Event != null) {
4471
+ var event = params.originalSelect2Event;
4472
+
4473
+ // Don't select an item if the close event was triggered from a select or
4474
+ // unselect event
4475
+ if (event._type === 'select' || event._type === 'unselect') {
4476
+ return;
4477
+ }
4478
+ }
4479
+
4480
+ var $highlightedResults = this.getHighlightedResults();
4481
+
4482
+ // Only select highlighted results
4483
+ if ($highlightedResults.length < 1) {
4484
+ return;
4485
+ }
4486
+
4487
+ var data = $highlightedResults.data('data');
4488
+
4489
+ // Don't re-select already selected resulte
4490
+ if (
4491
+ (data.element != null && data.element.selected) ||
4492
+ (data.element == null && data.selected)
4493
+ ) {
4494
+ return;
4495
+ }
4496
+
4497
+ this.trigger('select', {
4498
+ data: data
4499
+ });
4500
+ };
4501
+
4502
+ return SelectOnClose;
4503
+ });
4504
+
4505
+ S2.define('select2/dropdown/closeOnSelect',[
4506
+
4507
+ ], function () {
4508
+ function CloseOnSelect () { }
4509
+
4510
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
4511
+ var self = this;
4512
+
4513
+ decorated.call(this, container, $container);
4514
+
4515
+ container.on('select', function (evt) {
4516
+ self._selectTriggered(evt);
4517
+ });
4518
+
4519
+ container.on('unselect', function (evt) {
4520
+ self._selectTriggered(evt);
4521
+ });
4522
+ };
4523
+
4524
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
4525
+ var originalEvent = evt.originalEvent;
4526
+
4527
+ // Don't close if the control key is being held
4528
+ if (originalEvent && originalEvent.ctrlKey) {
4529
+ return;
4530
+ }
4531
+
4532
+ this.trigger('close', {
4533
+ originalEvent: originalEvent,
4534
+ originalSelect2Event: evt
4535
+ });
4536
+ };
4537
+
4538
+ return CloseOnSelect;
4539
+ });
4540
+
4541
+ S2.define('select2/i18n/en',[],function () {
4542
+ // English
4543
+ return {
4544
+ errorLoading: function () {
4545
+ return 'The results could not be loaded.';
4546
+ },
4547
+ inputTooLong: function (args) {
4548
+ var overChars = args.input.length - args.maximum;
4549
+
4550
+ var message = 'Please delete ' + overChars + ' character';
4551
+
4552
+ if (overChars != 1) {
4553
+ message += 's';
4554
+ }
4555
+
4556
+ return message;
4557
+ },
4558
+ inputTooShort: function (args) {
4559
+ var remainingChars = args.minimum - args.input.length;
4560
+
4561
+ var message = 'Please enter ' + remainingChars + ' or more characters';
4562
+
4563
+ return message;
4564
+ },
4565
+ loadingMore: function () {
4566
+ return 'Loading more results…';
4567
+ },
4568
+ maximumSelected: function (args) {
4569
+ var message = 'You can only select ' + args.maximum + ' item';
4570
+
4571
+ if (args.maximum != 1) {
4572
+ message += 's';
4573
+ }
4574
+
4575
+ return message;
4576
+ },
4577
+ noResults: function () {
4578
+ return 'No results found';
4579
+ },
4580
+ searching: function () {
4581
+ return 'Searching…';
4582
+ }
4583
+ };
4584
+ });
4585
+
4586
+ S2.define('select2/defaults',[
4587
+ 'jquery',
4588
+ 'require',
4589
+
4590
+ './results',
4591
+
4592
+ './selection/single',
4593
+ './selection/multiple',
4594
+ './selection/placeholder',
4595
+ './selection/allowClear',
4596
+ './selection/search',
4597
+ './selection/eventRelay',
4598
+
4599
+ './utils',
4600
+ './translation',
4601
+ './diacritics',
4602
+
4603
+ './data/select',
4604
+ './data/array',
4605
+ './data/ajax',
4606
+ './data/tags',
4607
+ './data/tokenizer',
4608
+ './data/minimumInputLength',
4609
+ './data/maximumInputLength',
4610
+ './data/maximumSelectionLength',
4611
+
4612
+ './dropdown',
4613
+ './dropdown/search',
4614
+ './dropdown/hidePlaceholder',
4615
+ './dropdown/infiniteScroll',
4616
+ './dropdown/attachBody',
4617
+ './dropdown/minimumResultsForSearch',
4618
+ './dropdown/selectOnClose',
4619
+ './dropdown/closeOnSelect',
4620
+
4621
+ './i18n/en'
4622
+ ], function ($, require,
4623
+
4624
+ ResultsList,
4625
+
4626
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
4627
+ SelectionSearch, EventRelay,
4628
+
4629
+ Utils, Translation, DIACRITICS,
4630
+
4631
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
4632
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
4633
+
4634
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
4635
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
4636
+
4637
+ EnglishTranslation) {
4638
+ function Defaults () {
4639
+ this.reset();
4640
+ }
4641
+
4642
+ Defaults.prototype.apply = function (options) {
4643
+ options = $.extend(true, {}, this.defaults, options);
4644
+
4645
+ if (options.dataAdapter == null) {
4646
+ if (options.ajax != null) {
4647
+ options.dataAdapter = AjaxData;
4648
+ } else if (options.data != null) {
4649
+ options.dataAdapter = ArrayData;
4650
+ } else {
4651
+ options.dataAdapter = SelectData;
4652
+ }
4653
+
4654
+ if (options.minimumInputLength > 0) {
4655
+ options.dataAdapter = Utils.Decorate(
4656
+ options.dataAdapter,
4657
+ MinimumInputLength
4658
+ );
4659
+ }
4660
+
4661
+ if (options.maximumInputLength > 0) {
4662
+ options.dataAdapter = Utils.Decorate(
4663
+ options.dataAdapter,
4664
+ MaximumInputLength
4665
+ );
4666
+ }
4667
+
4668
+ if (options.maximumSelectionLength > 0) {
4669
+ options.dataAdapter = Utils.Decorate(
4670
+ options.dataAdapter,
4671
+ MaximumSelectionLength
4672
+ );
4673
+ }
4674
+
4675
+ if (options.tags) {
4676
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
4677
+ }
4678
+
4679
+ if (options.tokenSeparators != null || options.tokenizer != null) {
4680
+ options.dataAdapter = Utils.Decorate(
4681
+ options.dataAdapter,
4682
+ Tokenizer
4683
+ );
4684
+ }
4685
+
4686
+ if (options.query != null) {
4687
+ var Query = require(options.amdBase + 'compat/query');
4688
+
4689
+ options.dataAdapter = Utils.Decorate(
4690
+ options.dataAdapter,
4691
+ Query
4692
+ );
4693
+ }
4694
+
4695
+ if (options.initSelection != null) {
4696
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
4697
+
4698
+ options.dataAdapter = Utils.Decorate(
4699
+ options.dataAdapter,
4700
+ InitSelection
4701
+ );
4702
+ }
4703
+ }
4704
+
4705
+ if (options.resultsAdapter == null) {
4706
+ options.resultsAdapter = ResultsList;
4707
+
4708
+ if (options.ajax != null) {
4709
+ options.resultsAdapter = Utils.Decorate(
4710
+ options.resultsAdapter,
4711
+ InfiniteScroll
4712
+ );
4713
+ }
4714
+
4715
+ if (options.placeholder != null) {
4716
+ options.resultsAdapter = Utils.Decorate(
4717
+ options.resultsAdapter,
4718
+ HidePlaceholder
4719
+ );
4720
+ }
4721
+
4722
+ if (options.selectOnClose) {
4723
+ options.resultsAdapter = Utils.Decorate(
4724
+ options.resultsAdapter,
4725
+ SelectOnClose
4726
+ );
4727
+ }
4728
+ }
4729
+
4730
+ if (options.dropdownAdapter == null) {
4731
+ if (options.multiple) {
4732
+ options.dropdownAdapter = Dropdown;
4733
+ } else {
4734
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
4735
+
4736
+ options.dropdownAdapter = SearchableDropdown;
4737
+ }
4738
+
4739
+ if (options.minimumResultsForSearch !== 0) {
4740
+ options.dropdownAdapter = Utils.Decorate(
4741
+ options.dropdownAdapter,
4742
+ MinimumResultsForSearch
4743
+ );
4744
+ }
4745
+
4746
+ if (options.closeOnSelect) {
4747
+ options.dropdownAdapter = Utils.Decorate(
4748
+ options.dropdownAdapter,
4749
+ CloseOnSelect
4750
+ );
4751
+ }
4752
+
4753
+ if (
4754
+ options.dropdownCssClass != null ||
4755
+ options.dropdownCss != null ||
4756
+ options.adaptDropdownCssClass != null
4757
+ ) {
4758
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
4759
+
4760
+ options.dropdownAdapter = Utils.Decorate(
4761
+ options.dropdownAdapter,
4762
+ DropdownCSS
4763
+ );
4764
+ }
4765
+
4766
+ options.dropdownAdapter = Utils.Decorate(
4767
+ options.dropdownAdapter,
4768
+ AttachBody
4769
+ );
4770
+ }
4771
+
4772
+ if (options.selectionAdapter == null) {
4773
+ if (options.multiple) {
4774
+ options.selectionAdapter = MultipleSelection;
4775
+ } else {
4776
+ options.selectionAdapter = SingleSelection;
4777
+ }
4778
+
4779
+ // Add the placeholder mixin if a placeholder was specified
4780
+ if (options.placeholder != null) {
4781
+ options.selectionAdapter = Utils.Decorate(
4782
+ options.selectionAdapter,
4783
+ Placeholder
4784
+ );
4785
+ }
4786
+
4787
+ if (options.allowClear) {
4788
+ options.selectionAdapter = Utils.Decorate(
4789
+ options.selectionAdapter,
4790
+ AllowClear
4791
+ );
4792
+ }
4793
+
4794
+ if (options.multiple) {
4795
+ options.selectionAdapter = Utils.Decorate(
4796
+ options.selectionAdapter,
4797
+ SelectionSearch
4798
+ );
4799
+ }
4800
+
4801
+ if (
4802
+ options.containerCssClass != null ||
4803
+ options.containerCss != null ||
4804
+ options.adaptContainerCssClass != null
4805
+ ) {
4806
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
4807
+
4808
+ options.selectionAdapter = Utils.Decorate(
4809
+ options.selectionAdapter,
4810
+ ContainerCSS
4811
+ );
4812
+ }
4813
+
4814
+ options.selectionAdapter = Utils.Decorate(
4815
+ options.selectionAdapter,
4816
+ EventRelay
4817
+ );
4818
+ }
4819
+
4820
+ if (typeof options.language === 'string') {
4821
+ // Check if the language is specified with a region
4822
+ if (options.language.indexOf('-') > 0) {
4823
+ // Extract the region information if it is included
4824
+ var languageParts = options.language.split('-');
4825
+ var baseLanguage = languageParts[0];
4826
+
4827
+ options.language = [options.language, baseLanguage];
4828
+ } else {
4829
+ options.language = [options.language];
4830
+ }
4831
+ }
4832
+
4833
+ if ($.isArray(options.language)) {
4834
+ var languages = new Translation();
4835
+ options.language.push('en');
4836
+
4837
+ var languageNames = options.language;
4838
+
4839
+ for (var l = 0; l < languageNames.length; l++) {
4840
+ var name = languageNames[l];
4841
+ var language = {};
4842
+
4843
+ try {
4844
+ // Try to load it with the original name
4845
+ language = Translation.loadPath(name);
4846
+ } catch (e) {
4847
+ try {
4848
+ // If we couldn't load it, check if it wasn't the full path
4849
+ name = this.defaults.amdLanguageBase + name;
4850
+ language = Translation.loadPath(name);
4851
+ } catch (ex) {
4852
+ // The translation could not be loaded at all. Sometimes this is
4853
+ // because of a configuration problem, other times this can be
4854
+ // because of how Select2 helps load all possible translation files.
4855
+ if (options.debug && window.console && console.warn) {
4856
+ console.warn(
4857
+ 'Select2: The language file for "' + name + '" could not be ' +
4858
+ 'automatically loaded. A fallback will be used instead.'
4859
+ );
4860
+ }
4861
+
4862
+ continue;
4863
+ }
4864
+ }
4865
+
4866
+ languages.extend(language);
4867
+ }
4868
+
4869
+ options.translations = languages;
4870
+ } else {
4871
+ var baseTranslation = Translation.loadPath(
4872
+ this.defaults.amdLanguageBase + 'en'
4873
+ );
4874
+ var customTranslation = new Translation(options.language);
4875
+
4876
+ customTranslation.extend(baseTranslation);
4877
+
4878
+ options.translations = customTranslation;
4879
+ }
4880
+
4881
+ return options;
4882
+ };
4883
+
4884
+ Defaults.prototype.reset = function () {
4885
+ function stripDiacritics (text) {
4886
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
4887
+ function match(a) {
4888
+ return DIACRITICS[a] || a;
4889
+ }
4890
+
4891
+ return text.replace(/[^\u0000-\u007E]/g, match);
4892
+ }
4893
+
4894
+ function matcher (params, data) {
4895
+ // Always return the object if there is nothing to compare
4896
+ if ($.trim(params.term) === '') {
4897
+ return data;
4898
+ }
4899
+
4900
+ // Do a recursive check for options with children
4901
+ if (data.children && data.children.length > 0) {
4902
+ // Clone the data object if there are children
4903
+ // This is required as we modify the object to remove any non-matches
4904
+ var match = $.extend(true, {}, data);
4905
+
4906
+ // Check each child of the option
4907
+ for (var c = data.children.length - 1; c >= 0; c--) {
4908
+ var child = data.children[c];
4909
+
4910
+ var matches = matcher(params, child);
4911
+
4912
+ // If there wasn't a match, remove the object in the array
4913
+ if (matches == null) {
4914
+ match.children.splice(c, 1);
4915
+ }
4916
+ }
4917
+
4918
+ // If any children matched, return the new object
4919
+ if (match.children.length > 0) {
4920
+ return match;
4921
+ }
4922
+
4923
+ // If there were no matching children, check just the plain object
4924
+ return matcher(params, match);
4925
+ }
4926
+
4927
+ var original = stripDiacritics(data.text).toUpperCase();
4928
+ var term = stripDiacritics(params.term).toUpperCase();
4929
+
4930
+ // Check if the text contains the term
4931
+ if (original.indexOf(term) > -1) {
4932
+ return data;
4933
+ }
4934
+
4935
+ // If it doesn't contain the term, don't return anything
4936
+ return null;
4937
+ }
4938
+
4939
+ this.defaults = {
4940
+ amdBase: './',
4941
+ amdLanguageBase: './i18n/',
4942
+ closeOnSelect: true,
4943
+ debug: false,
4944
+ dropdownAutoWidth: false,
4945
+ escapeMarkup: Utils.escapeMarkup,
4946
+ language: EnglishTranslation,
4947
+ matcher: matcher,
4948
+ minimumInputLength: 0,
4949
+ maximumInputLength: 0,
4950
+ maximumSelectionLength: 0,
4951
+ minimumResultsForSearch: 0,
4952
+ selectOnClose: false,
4953
+ sorter: function (data) {
4954
+ return data;
4955
+ },
4956
+ templateResult: function (result) {
4957
+ return result.text;
4958
+ },
4959
+ templateSelection: function (selection) {
4960
+ return selection.text;
4961
+ },
4962
+ theme: 'default',
4963
+ width: 'resolve'
4964
+ };
4965
+ };
4966
+
4967
+ Defaults.prototype.set = function (key, value) {
4968
+ var camelKey = $.camelCase(key);
4969
+
4970
+ var data = {};
4971
+ data[camelKey] = value;
4972
+
4973
+ var convertedData = Utils._convertData(data);
4974
+
4975
+ $.extend(this.defaults, convertedData);
4976
+ };
4977
+
4978
+ var defaults = new Defaults();
4979
+
4980
+ return defaults;
4981
+ });
4982
+
4983
+ S2.define('select2/options',[
4984
+ 'require',
4985
+ 'jquery',
4986
+ './defaults',
4987
+ './utils'
4988
+ ], function (require, $, Defaults, Utils) {
4989
+ function Options (options, $element) {
4990
+ this.options = options;
4991
+
4992
+ if ($element != null) {
4993
+ this.fromElement($element);
4994
+ }
4995
+
4996
+ this.options = Defaults.apply(this.options);
4997
+
4998
+ if ($element && $element.is('input')) {
4999
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
5000
+
5001
+ this.options.dataAdapter = Utils.Decorate(
5002
+ this.options.dataAdapter,
5003
+ InputCompat
5004
+ );
5005
+ }
5006
+ }
5007
+
5008
+ Options.prototype.fromElement = function ($e) {
5009
+ var excludedData = ['select2'];
5010
+
5011
+ if (this.options.multiple == null) {
5012
+ this.options.multiple = $e.prop('multiple');
5013
+ }
5014
+
5015
+ if (this.options.disabled == null) {
5016
+ this.options.disabled = $e.prop('disabled');
5017
+ }
5018
+
5019
+ if (this.options.language == null) {
5020
+ if ($e.prop('lang')) {
5021
+ this.options.language = $e.prop('lang').toLowerCase();
5022
+ } else if ($e.closest('[lang]').prop('lang')) {
5023
+ this.options.language = $e.closest('[lang]').prop('lang');
5024
+ }
5025
+ }
5026
+
5027
+ if (this.options.dir == null) {
5028
+ if ($e.prop('dir')) {
5029
+ this.options.dir = $e.prop('dir');
5030
+ } else if ($e.closest('[dir]').prop('dir')) {
5031
+ this.options.dir = $e.closest('[dir]').prop('dir');
5032
+ } else {
5033
+ this.options.dir = 'ltr';
5034
+ }
5035
+ }
5036
+
5037
+ $e.prop('disabled', this.options.disabled);
5038
+ $e.prop('multiple', this.options.multiple);
5039
+
5040
+ if ($e.data('select2Tags')) {
5041
+ if (this.options.debug && window.console && console.warn) {
5042
+ console.warn(
5043
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
5044
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
5045
+ 'removed in future versions of Select2.'
5046
+ );
5047
+ }
5048
+
5049
+ $e.data('data', $e.data('select2Tags'));
5050
+ $e.data('tags', true);
5051
+ }
5052
+
5053
+ if ($e.data('ajaxUrl')) {
5054
+ if (this.options.debug && window.console && console.warn) {
5055
+ console.warn(
5056
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
5057
+ '`data-ajax--url` and support for the old attribute will be removed' +
5058
+ ' in future versions of Select2.'
5059
+ );
5060
+ }
5061
+
5062
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
5063
+ $e.data('ajax--url', $e.data('ajaxUrl'));
5064
+ }
5065
+
5066
+ var dataset = {};
5067
+
5068
+ // Prefer the element's `dataset` attribute if it exists
5069
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
5070
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
5071
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
5072
+ } else {
5073
+ dataset = $e.data();
5074
+ }
5075
+
5076
+ var data = $.extend(true, {}, dataset);
5077
+
5078
+ data = Utils._convertData(data);
5079
+
5080
+ for (var key in data) {
5081
+ if ($.inArray(key, excludedData) > -1) {
5082
+ continue;
5083
+ }
5084
+
5085
+ if ($.isPlainObject(this.options[key])) {
5086
+ $.extend(this.options[key], data[key]);
5087
+ } else {
5088
+ this.options[key] = data[key];
5089
+ }
5090
+ }
5091
+
5092
+ return this;
5093
+ };
5094
+
5095
+ Options.prototype.get = function (key) {
5096
+ return this.options[key];
5097
+ };
5098
+
5099
+ Options.prototype.set = function (key, val) {
5100
+ this.options[key] = val;
5101
+ };
5102
+
5103
+ return Options;
5104
+ });
5105
+
5106
+ S2.define('select2/core',[
5107
+ 'jquery',
5108
+ './options',
5109
+ './utils',
5110
+ './keys'
5111
+ ], function ($, Options, Utils, KEYS) {
5112
+ var Select2 = function ($element, options) {
5113
+ if ($element.data('select2') != null) {
5114
+ $element.data('select2').destroy();
5115
+ }
5116
+
5117
+ this.$element = $element;
5118
+
5119
+ this.id = this._generateId($element);
5120
+
5121
+ options = options || {};
5122
+
5123
+ this.options = new Options(options, $element);
5124
+
5125
+ Select2.__super__.constructor.call(this);
5126
+
5127
+ // Set up the tabindex
5128
+
5129
+ var tabindex = $element.attr('tabindex') || 0;
5130
+ $element.data('old-tabindex', tabindex);
5131
+ $element.attr('tabindex', '-1');
5132
+
5133
+ // Set up containers and adapters
5134
+
5135
+ var DataAdapter = this.options.get('dataAdapter');
5136
+ this.dataAdapter = new DataAdapter($element, this.options);
5137
+
5138
+ var $container = this.render();
5139
+
5140
+ this._placeContainer($container);
5141
+
5142
+ var SelectionAdapter = this.options.get('selectionAdapter');
5143
+ this.selection = new SelectionAdapter($element, this.options);
5144
+ this.$selection = this.selection.render();
5145
+
5146
+ this.selection.position(this.$selection, $container);
5147
+
5148
+ var DropdownAdapter = this.options.get('dropdownAdapter');
5149
+ this.dropdown = new DropdownAdapter($element, this.options);
5150
+ this.$dropdown = this.dropdown.render();
5151
+
5152
+ this.dropdown.position(this.$dropdown, $container);
5153
+
5154
+ var ResultsAdapter = this.options.get('resultsAdapter');
5155
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
5156
+ this.$results = this.results.render();
5157
+
5158
+ this.results.position(this.$results, this.$dropdown);
5159
+
5160
+ // Bind events
5161
+
5162
+ var self = this;
5163
+
5164
+ // Bind the container to all of the adapters
5165
+ this._bindAdapters();
5166
+
5167
+ // Register any DOM event handlers
5168
+ this._registerDomEvents();
5169
+
5170
+ // Register any internal event handlers
5171
+ this._registerDataEvents();
5172
+ this._registerSelectionEvents();
5173
+ this._registerDropdownEvents();
5174
+ this._registerResultsEvents();
5175
+ this._registerEvents();
5176
+
5177
+ // Set the initial state
5178
+ this.dataAdapter.current(function (initialData) {
5179
+ self.trigger('selection:update', {
5180
+ data: initialData
5181
+ });
5182
+ });
5183
+
5184
+ // Hide the original select
5185
+ $element.addClass('select2-hidden-accessible');
5186
+ $element.attr('aria-hidden', 'true');
5187
+
5188
+ // Synchronize any monitored attributes
5189
+ this._syncAttributes();
5190
+
5191
+ $element.data('select2', this);
5192
+ };
5193
+
5194
+ Utils.Extend(Select2, Utils.Observable);
5195
+
5196
+ Select2.prototype._generateId = function ($element) {
5197
+ var id = '';
5198
+
5199
+ if ($element.attr('id') != null) {
5200
+ id = $element.attr('id');
5201
+ } else if ($element.attr('name') != null) {
5202
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
5203
+ } else {
5204
+ id = Utils.generateChars(4);
5205
+ }
5206
+
5207
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
5208
+ id = 'select2-' + id;
5209
+
5210
+ return id;
5211
+ };
5212
+
5213
+ Select2.prototype._placeContainer = function ($container) {
5214
+ $container.insertAfter(this.$element);
5215
+
5216
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
5217
+
5218
+ if (width != null) {
5219
+ $container.css('width', width);
5220
+ }
5221
+ };
5222
+
5223
+ Select2.prototype._resolveWidth = function ($element, method) {
5224
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
5225
+
5226
+ if (method == 'resolve') {
5227
+ var styleWidth = this._resolveWidth($element, 'style');
5228
+
5229
+ if (styleWidth != null) {
5230
+ return styleWidth;
5231
+ }
5232
+
5233
+ return this._resolveWidth($element, 'element');
5234
+ }
5235
+
5236
+ if (method == 'element') {
5237
+ var elementWidth = $element.outerWidth(false);
5238
+
5239
+ if (elementWidth <= 0) {
5240
+ return 'auto';
5241
+ }
5242
+
5243
+ return elementWidth + 'px';
5244
+ }
5245
+
5246
+ if (method == 'style') {
5247
+ var style = $element.attr('style');
5248
+
5249
+ if (typeof(style) !== 'string') {
5250
+ return null;
5251
+ }
5252
+
5253
+ var attrs = style.split(';');
5254
+
5255
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
5256
+ var attr = attrs[i].replace(/\s/g, '');
5257
+ var matches = attr.match(WIDTH);
5258
+
5259
+ if (matches !== null && matches.length >= 1) {
5260
+ return matches[1];
5261
+ }
5262
+ }
5263
+
5264
+ return null;
5265
+ }
5266
+
5267
+ return method;
5268
+ };
5269
+
5270
+ Select2.prototype._bindAdapters = function () {
5271
+ this.dataAdapter.bind(this, this.$container);
5272
+ this.selection.bind(this, this.$container);
5273
+
5274
+ this.dropdown.bind(this, this.$container);
5275
+ this.results.bind(this, this.$container);
5276
+ };
5277
+
5278
+ Select2.prototype._registerDomEvents = function () {
5279
+ var self = this;
5280
+
5281
+ this.$element.on('change.select2', function () {
5282
+ self.dataAdapter.current(function (data) {
5283
+ self.trigger('selection:update', {
5284
+ data: data
5285
+ });
5286
+ });
5287
+ });
5288
+
5289
+ this.$element.on('focus.select2', function (evt) {
5290
+ self.trigger('focus', evt);
5291
+ });
5292
+
5293
+ this._syncA = Utils.bind(this._syncAttributes, this);
5294
+ this._syncS = Utils.bind(this._syncSubtree, this);
5295
+
5296
+ if (this.$element[0].attachEvent) {
5297
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
5298
+ }
5299
+
5300
+ var observer = window.MutationObserver ||
5301
+ window.WebKitMutationObserver ||
5302
+ window.MozMutationObserver
5303
+ ;
5304
+
5305
+ if (observer != null) {
5306
+ this._observer = new observer(function (mutations) {
5307
+ $.each(mutations, self._syncA);
5308
+ $.each(mutations, self._syncS);
5309
+ });
5310
+ this._observer.observe(this.$element[0], {
5311
+ attributes: true,
5312
+ childList: true,
5313
+ subtree: false
5314
+ });
5315
+ } else if (this.$element[0].addEventListener) {
5316
+ this.$element[0].addEventListener(
5317
+ 'DOMAttrModified',
5318
+ self._syncA,
5319
+ false
5320
+ );
5321
+ this.$element[0].addEventListener(
5322
+ 'DOMNodeInserted',
5323
+ self._syncS,
5324
+ false
5325
+ );
5326
+ this.$element[0].addEventListener(
5327
+ 'DOMNodeRemoved',
5328
+ self._syncS,
5329
+ false
5330
+ );
5331
+ }
5332
+ };
5333
+
5334
+ Select2.prototype._registerDataEvents = function () {
5335
+ var self = this;
5336
+
5337
+ this.dataAdapter.on('*', function (name, params) {
5338
+ self.trigger(name, params);
5339
+ });
5340
+ };
5341
+
5342
+ Select2.prototype._registerSelectionEvents = function () {
5343
+ var self = this;
5344
+ var nonRelayEvents = ['toggle', 'focus'];
5345
+
5346
+ this.selection.on('toggle', function () {
5347
+ self.toggleDropdown();
5348
+ });
5349
+
5350
+ this.selection.on('focus', function (params) {
5351
+ self.focus(params);
5352
+ });
5353
+
5354
+ this.selection.on('*', function (name, params) {
5355
+ if ($.inArray(name, nonRelayEvents) !== -1) {
5356
+ return;
5357
+ }
5358
+
5359
+ self.trigger(name, params);
5360
+ });
5361
+ };
5362
+
5363
+ Select2.prototype._registerDropdownEvents = function () {
5364
+ var self = this;
5365
+
5366
+ this.dropdown.on('*', function (name, params) {
5367
+ self.trigger(name, params);
5368
+ });
5369
+ };
5370
+
5371
+ Select2.prototype._registerResultsEvents = function () {
5372
+ var self = this;
5373
+
5374
+ this.results.on('*', function (name, params) {
5375
+ self.trigger(name, params);
5376
+ });
5377
+ };
5378
+
5379
+ Select2.prototype._registerEvents = function () {
5380
+ var self = this;
5381
+
5382
+ this.on('open', function () {
5383
+ self.$container.addClass('select2-container--open');
5384
+ });
5385
+
5386
+ this.on('close', function () {
5387
+ self.$container.removeClass('select2-container--open');
5388
+ });
5389
+
5390
+ this.on('enable', function () {
5391
+ self.$container.removeClass('select2-container--disabled');
5392
+ });
5393
+
5394
+ this.on('disable', function () {
5395
+ self.$container.addClass('select2-container--disabled');
5396
+ });
5397
+
5398
+ this.on('blur', function () {
5399
+ self.$container.removeClass('select2-container--focus');
5400
+ });
5401
+
5402
+ this.on('query', function (params) {
5403
+ if (!self.isOpen()) {
5404
+ self.trigger('open', {});
5405
+ }
5406
+
5407
+ this.dataAdapter.query(params, function (data) {
5408
+ self.trigger('results:all', {
5409
+ data: data,
5410
+ query: params
5411
+ });
5412
+ });
5413
+ });
5414
+
5415
+ this.on('query:append', function (params) {
5416
+ this.dataAdapter.query(params, function (data) {
5417
+ self.trigger('results:append', {
5418
+ data: data,
5419
+ query: params
5420
+ });
5421
+ });
5422
+ });
5423
+
5424
+ this.on('open', function(){
5425
+ // Focus on the active element when opening dropdown.
5426
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
5427
+ setTimeout(function(){
5428
+ self.focusOnActiveElement();
5429
+ }, 1);
5430
+ });
5431
+
5432
+ $(document).on('keydown', function (evt) {
5433
+ var key = evt.which;
5434
+ if (self.isOpen()) {
5435
+ if (key === KEYS.ESC || key === KEYS.TAB ||
5436
+ (key === KEYS.UP && evt.altKey)) {
5437
+ self.close();
5438
+
5439
+ evt.preventDefault();
5440
+ } else if (key === KEYS.ENTER) {
5441
+ self.trigger('results:select', {});
5442
+
5443
+ evt.preventDefault();
5444
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5445
+ self.trigger('results:toggle', {});
5446
+
5447
+ evt.preventDefault();
5448
+ } else if (key === KEYS.UP) {
5449
+ self.trigger('results:previous', {});
5450
+
5451
+ evt.preventDefault();
5452
+ } else if (key === KEYS.DOWN) {
5453
+ self.trigger('results:next', {});
5454
+
5455
+ evt.preventDefault();
5456
+ }
5457
+
5458
+ // Move the focus to the selected element on keyboard navigation.
5459
+ // Required for screen readers to work properly.
5460
+ if (key === KEYS.DOWN || key === KEYS.UP) {
5461
+ self.focusOnActiveElement();
5462
+ } else {
5463
+ // Focus on the search if user starts typing.
5464
+ var $searchField = self.$dropdown.find('.select2-search__field');
5465
+ if (! $searchField.length) {
5466
+ $searchField = self.$container.find('.select2-search__field');
5467
+ }
5468
+ $searchField.focus();
5469
+ // Focus back to active selection when finished typing.
5470
+ // Small delay so typed character can be read by screen reader.
5471
+ setTimeout(function(){
5472
+ self.focusOnActiveElement();
5473
+ }, 1000);
5474
+ }
5475
+
5476
+ } else if (self.hasFocus()) {
5477
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
5478
+ (key === KEYS.DOWN && evt.altKey)) {
5479
+ self.open();
5480
+ evt.preventDefault();
5481
+ }
5482
+ }
5483
+ });
5484
+ };
5485
+
5486
+ Select2.prototype.focusOnActiveElement = function () {
5487
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
5488
+ if (! Utils.isTouchscreen()) {
5489
+ this.$results.find('li.select2-results__option--highlighted').focus();
5490
+ }
5491
+ };
5492
+
5493
+ Select2.prototype._syncAttributes = function () {
5494
+ this.options.set('disabled', this.$element.prop('disabled'));
5495
+
5496
+ if (this.options.get('disabled')) {
5497
+ if (this.isOpen()) {
5498
+ this.close();
5499
+ }
5500
+
5501
+ this.trigger('disable', {});
5502
+ } else {
5503
+ this.trigger('enable', {});
5504
+ }
5505
+ };
5506
+
5507
+ Select2.prototype._syncSubtree = function (evt, mutations) {
5508
+ var changed = false;
5509
+ var self = this;
5510
+
5511
+ // Ignore any mutation events raised for elements that aren't options or
5512
+ // optgroups. This handles the case when the select element is destroyed
5513
+ if (
5514
+ evt && evt.target && (
5515
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
5516
+ )
5517
+ ) {
5518
+ return;
5519
+ }
5520
+
5521
+ if (!mutations) {
5522
+ // If mutation events aren't supported, then we can only assume that the
5523
+ // change affected the selections
5524
+ changed = true;
5525
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
5526
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
5527
+ var node = mutations.addedNodes[n];
5528
+
5529
+ if (node.selected) {
5530
+ changed = true;
5531
+ }
5532
+ }
5533
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
5534
+ changed = true;
5535
+ }
5536
+
5537
+ // Only re-pull the data if we think there is a change
5538
+ if (changed) {
5539
+ this.dataAdapter.current(function (currentData) {
5540
+ self.trigger('selection:update', {
5541
+ data: currentData
5542
+ });
5543
+ });
5544
+ }
5545
+ };
5546
+
5547
+ /**
5548
+ * Override the trigger method to automatically trigger pre-events when
5549
+ * there are events that can be prevented.
5550
+ */
5551
+ Select2.prototype.trigger = function (name, args) {
5552
+ var actualTrigger = Select2.__super__.trigger;
5553
+ var preTriggerMap = {
5554
+ 'open': 'opening',
5555
+ 'close': 'closing',
5556
+ 'select': 'selecting',
5557
+ 'unselect': 'unselecting'
5558
+ };
5559
+
5560
+ if (args === undefined) {
5561
+ args = {};
5562
+ }
5563
+
5564
+ if (name in preTriggerMap) {
5565
+ var preTriggerName = preTriggerMap[name];
5566
+ var preTriggerArgs = {
5567
+ prevented: false,
5568
+ name: name,
5569
+ args: args
5570
+ };
5571
+
5572
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
5573
+
5574
+ if (preTriggerArgs.prevented) {
5575
+ args.prevented = true;
5576
+
5577
+ return;
5578
+ }
5579
+ }
5580
+
5581
+ actualTrigger.call(this, name, args);
5582
+ };
5583
+
5584
+ Select2.prototype.toggleDropdown = function () {
5585
+ if (this.options.get('disabled')) {
5586
+ return;
5587
+ }
5588
+
5589
+ if (this.isOpen()) {
5590
+ this.close();
5591
+ } else {
5592
+ this.open();
5593
+ }
5594
+ };
5595
+
5596
+ Select2.prototype.open = function () {
5597
+ if (this.isOpen()) {
5598
+ return;
5599
+ }
5600
+
5601
+ this.trigger('query', {});
5602
+ };
5603
+
5604
+ Select2.prototype.close = function () {
5605
+ if (!this.isOpen()) {
5606
+ return;
5607
+ }
5608
+
5609
+ this.trigger('close', {});
5610
+ };
5611
+
5612
+ Select2.prototype.isOpen = function () {
5613
+ return this.$container.hasClass('select2-container--open');
5614
+ };
5615
+
5616
+ Select2.prototype.hasFocus = function () {
5617
+ return this.$container.hasClass('select2-container--focus');
5618
+ };
5619
+
5620
+ Select2.prototype.focus = function (data) {
5621
+ // No need to re-trigger focus events if we are already focused
5622
+ if (this.hasFocus()) {
5623
+ return;
5624
+ }
5625
+
5626
+ this.$container.addClass('select2-container--focus');
5627
+ this.trigger('focus', {});
5628
+ };
5629
+
5630
+ Select2.prototype.enable = function (args) {
5631
+ if (this.options.get('debug') && window.console && console.warn) {
5632
+ console.warn(
5633
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
5634
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
5635
+ ' instead.'
5636
+ );
5637
+ }
5638
+
5639
+ if (args == null || args.length === 0) {
5640
+ args = [true];
5641
+ }
5642
+
5643
+ var disabled = !args[0];
5644
+
5645
+ this.$element.prop('disabled', disabled);
5646
+ };
5647
+
5648
+ Select2.prototype.data = function () {
5649
+ if (this.options.get('debug') &&
5650
+ arguments.length > 0 && window.console && console.warn) {
5651
+ console.warn(
5652
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
5653
+ 'should consider setting the value instead using `$element.val()`.'
5654
+ );
5655
+ }
5656
+
5657
+ var data = [];
5658
+
5659
+ this.dataAdapter.current(function (currentData) {
5660
+ data = currentData;
5661
+ });
5662
+
5663
+ return data;
5664
+ };
5665
+
5666
+ Select2.prototype.val = function (args) {
5667
+ if (this.options.get('debug') && window.console && console.warn) {
5668
+ console.warn(
5669
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
5670
+ ' removed in later Select2 versions. Use $element.val() instead.'
5671
+ );
5672
+ }
5673
+
5674
+ if (args == null || args.length === 0) {
5675
+ return this.$element.val();
5676
+ }
5677
+
5678
+ var newVal = args[0];
5679
+
5680
+ if ($.isArray(newVal)) {
5681
+ newVal = $.map(newVal, function (obj) {
5682
+ return obj.toString();
5683
+ });
5684
+ }
5685
+
5686
+ this.$element.val(newVal).trigger('change');
5687
+ };
5688
+
5689
+ Select2.prototype.destroy = function () {
5690
+ this.$container.remove();
5691
+
5692
+ if (this.$element[0].detachEvent) {
5693
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
5694
+ }
5695
+
5696
+ if (this._observer != null) {
5697
+ this._observer.disconnect();
5698
+ this._observer = null;
5699
+ } else if (this.$element[0].removeEventListener) {
5700
+ this.$element[0]
5701
+ .removeEventListener('DOMAttrModified', this._syncA, false);
5702
+ this.$element[0]
5703
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
5704
+ this.$element[0]
5705
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
5706
+ }
5707
+
5708
+ this._syncA = null;
5709
+ this._syncS = null;
5710
+
5711
+ this.$element.off('.select2');
5712
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5713
+
5714
+ this.$element.removeClass('select2-hidden-accessible');
5715
+ this.$element.attr('aria-hidden', 'false');
5716
+ this.$element.removeData('select2');
5717
+
5718
+ this.dataAdapter.destroy();
5719
+ this.selection.destroy();
5720
+ this.dropdown.destroy();
5721
+ this.results.destroy();
5722
+
5723
+ this.dataAdapter = null;
5724
+ this.selection = null;
5725
+ this.dropdown = null;
5726
+ this.results = null;
5727
+ };
5728
+
5729
+ Select2.prototype.render = function () {
5730
+ var $container = $(
5731
+ '<span class="select2 select2-container">' +
5732
+ '<span class="selection"></span>' +
5733
+ '<span class="dropdown-wrapper" aria-hidden="true"></span>' +
5734
+ '</span>'
5735
+ );
5736
+
5737
+ $container.attr('dir', this.options.get('dir'));
5738
+
5739
+ this.$container = $container;
5740
+
5741
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
5742
+
5743
+ $container.data('element', this.$element);
5744
+
5745
+ return $container;
5746
+ };
5747
+
5748
+ return Select2;
5749
+ });
5750
+
5751
+ S2.define('select2/compat/utils',[
5752
+ 'jquery'
5753
+ ], function ($) {
5754
+ function syncCssClasses ($dest, $src, adapter) {
5755
+ var classes, replacements = [], adapted;
5756
+
5757
+ classes = $.trim($dest.attr('class'));
5758
+
5759
+ if (classes) {
5760
+ classes = '' + classes; // for IE which returns object
5761
+
5762
+ $(classes.split(/\s+/)).each(function () {
5763
+ // Save all Select2 classes
5764
+ if (this.indexOf('select2-') === 0) {
5765
+ replacements.push(this);
5766
+ }
5767
+ });
5768
+ }
5769
+
5770
+ classes = $.trim($src.attr('class'));
5771
+
5772
+ if (classes) {
5773
+ classes = '' + classes; // for IE which returns object
5774
+
5775
+ $(classes.split(/\s+/)).each(function () {
5776
+ // Only adapt non-Select2 classes
5777
+ if (this.indexOf('select2-') !== 0) {
5778
+ adapted = adapter(this);
5779
+
5780
+ if (adapted != null) {
5781
+ replacements.push(adapted);
5782
+ }
5783
+ }
5784
+ });
5785
+ }
5786
+
5787
+ $dest.attr('class', replacements.join(' '));
5788
+ }
5789
+
5790
+ return {
5791
+ syncCssClasses: syncCssClasses
5792
+ };
5793
+ });
5794
+
5795
+ S2.define('select2/compat/containerCss',[
5796
+ 'jquery',
5797
+ './utils'
5798
+ ], function ($, CompatUtils) {
5799
+ // No-op CSS adapter that discards all classes by default
5800
+ function _containerAdapter (clazz) {
5801
+ return null;
5802
+ }
5803
+
5804
+ function ContainerCSS () { }
5805
+
5806
+ ContainerCSS.prototype.render = function (decorated) {
5807
+ var $container = decorated.call(this);
5808
+
5809
+ var containerCssClass = this.options.get('containerCssClass') || '';
5810
+
5811
+ if ($.isFunction(containerCssClass)) {
5812
+ containerCssClass = containerCssClass(this.$element);
5813
+ }
5814
+
5815
+ var containerCssAdapter = this.options.get('adaptContainerCssClass');
5816
+ containerCssAdapter = containerCssAdapter || _containerAdapter;
5817
+
5818
+ if (containerCssClass.indexOf(':all:') !== -1) {
5819
+ containerCssClass = containerCssClass.replace(':all:', '');
5820
+
5821
+ var _cssAdapter = containerCssAdapter;
5822
+
5823
+ containerCssAdapter = function (clazz) {
5824
+ var adapted = _cssAdapter(clazz);
5825
+
5826
+ if (adapted != null) {
5827
+ // Append the old one along with the adapted one
5828
+ return adapted + ' ' + clazz;
5829
+ }
5830
+
5831
+ return clazz;
5832
+ };
5833
+ }
5834
+
5835
+ var containerCss = this.options.get('containerCss') || {};
5836
+
5837
+ if ($.isFunction(containerCss)) {
5838
+ containerCss = containerCss(this.$element);
5839
+ }
5840
+
5841
+ CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
5842
+
5843
+ $container.css(containerCss);
5844
+ $container.addClass(containerCssClass);
5845
+
5846
+ return $container;
5847
+ };
5848
+
5849
+ return ContainerCSS;
5850
+ });
5851
+
5852
+ S2.define('select2/compat/dropdownCss',[
5853
+ 'jquery',
5854
+ './utils'
5855
+ ], function ($, CompatUtils) {
5856
+ // No-op CSS adapter that discards all classes by default
5857
+ function _dropdownAdapter (clazz) {
5858
+ return null;
5859
+ }
5860
+
5861
+ function DropdownCSS () { }
5862
+
5863
+ DropdownCSS.prototype.render = function (decorated) {
5864
+ var $dropdown = decorated.call(this);
5865
+
5866
+ var dropdownCssClass = this.options.get('dropdownCssClass') || '';
5867
+
5868
+ if ($.isFunction(dropdownCssClass)) {
5869
+ dropdownCssClass = dropdownCssClass(this.$element);
5870
+ }
5871
+
5872
+ var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
5873
+ dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
5874
+
5875
+ if (dropdownCssClass.indexOf(':all:') !== -1) {
5876
+ dropdownCssClass = dropdownCssClass.replace(':all:', '');
5877
+
5878
+ var _cssAdapter = dropdownCssAdapter;
5879
+
5880
+ dropdownCssAdapter = function (clazz) {
5881
+ var adapted = _cssAdapter(clazz);
5882
+
5883
+ if (adapted != null) {
5884
+ // Append the old one along with the adapted one
5885
+ return adapted + ' ' + clazz;
5886
+ }
5887
+
5888
+ return clazz;
5889
+ };
5890
+ }
5891
+
5892
+ var dropdownCss = this.options.get('dropdownCss') || {};
5893
+
5894
+ if ($.isFunction(dropdownCss)) {
5895
+ dropdownCss = dropdownCss(this.$element);
5896
+ }
5897
+
5898
+ CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
5899
+
5900
+ $dropdown.css(dropdownCss);
5901
+ $dropdown.addClass(dropdownCssClass);
5902
+
5903
+ return $dropdown;
5904
+ };
5905
+
5906
+ return DropdownCSS;
5907
+ });
5908
+
5909
+ S2.define('select2/compat/initSelection',[
5910
+ 'jquery'
5911
+ ], function ($) {
5912
+ function InitSelection (decorated, $element, options) {
5913
+ if (options.get('debug') && window.console && console.warn) {
5914
+ console.warn(
5915
+ 'Select2: The `initSelection` option has been deprecated in favor' +
5916
+ ' of a custom data adapter that overrides the `current` method. ' +
5917
+ 'This method is now called multiple times instead of a single ' +
5918
+ 'time when the instance is initialized. Support will be removed ' +
5919
+ 'for the `initSelection` option in future versions of Select2'
5920
+ );
5921
+ }
5922
+
5923
+ this.initSelection = options.get('initSelection');
5924
+ this._isInitialized = false;
5925
+
5926
+ decorated.call(this, $element, options);
5927
+ }
5928
+
5929
+ InitSelection.prototype.current = function (decorated, callback) {
5930
+ var self = this;
5931
+
5932
+ if (this._isInitialized) {
5933
+ decorated.call(this, callback);
5934
+
5935
+ return;
5936
+ }
5937
+
5938
+ this.initSelection.call(null, this.$element, function (data) {
5939
+ self._isInitialized = true;
5940
+
5941
+ if (!$.isArray(data)) {
5942
+ data = [data];
5943
+ }
5944
+
5945
+ callback(data);
5946
+ });
5947
+ };
5948
+
5949
+ return InitSelection;
5950
+ });
5951
+
5952
+ S2.define('select2/compat/inputData',[
5953
+ 'jquery'
5954
+ ], function ($) {
5955
+ function InputData (decorated, $element, options) {
5956
+ this._currentData = [];
5957
+ this._valueSeparator = options.get('valueSeparator') || ',';
5958
+
5959
+ if ($element.prop('type') === 'hidden') {
5960
+ if (options.get('debug') && console && console.warn) {
5961
+ console.warn(
5962
+ 'Select2: Using a hidden input with Select2 is no longer ' +
5963
+ 'supported and may stop working in the future. It is recommended ' +
5964
+ 'to use a `<select>` element instead.'
5965
+ );
5966
+ }
5967
+ }
5968
+
5969
+ decorated.call(this, $element, options);
5970
+ }
5971
+
5972
+ InputData.prototype.current = function (_, callback) {
5973
+ function getSelected (data, selectedIds) {
5974
+ var selected = [];
5975
+
5976
+ if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
5977
+ data.selected = true;
5978
+ selected.push(data);
5979
+ } else {
5980
+ data.selected = false;
5981
+ }
5982
+
5983
+ if (data.children) {
5984
+ selected.push.apply(selected, getSelected(data.children, selectedIds));
5985
+ }
5986
+
5987
+ return selected;
5988
+ }
5989
+
5990
+ var selected = [];
5991
+
5992
+ for (var d = 0; d < this._currentData.length; d++) {
5993
+ var data = this._currentData[d];
5994
+
5995
+ selected.push.apply(
5996
+ selected,
5997
+ getSelected(
5998
+ data,
5999
+ this.$element.val().split(
6000
+ this._valueSeparator
6001
+ )
6002
+ )
6003
+ );
6004
+ }
6005
+
6006
+ callback(selected);
6007
+ };
6008
+
6009
+ InputData.prototype.select = function (_, data) {
6010
+ if (!this.options.get('multiple')) {
6011
+ this.current(function (allData) {
6012
+ $.map(allData, function (data) {
6013
+ data.selected = false;
6014
+ });
6015
+ });
6016
+
6017
+ this.$element.val(data.id);
6018
+ this.$element.trigger('change');
6019
+ } else {
6020
+ var value = this.$element.val();
6021
+ value += this._valueSeparator + data.id;
6022
+
6023
+ this.$element.val(value);
6024
+ this.$element.trigger('change');
6025
+ }
6026
+ };
6027
+
6028
+ InputData.prototype.unselect = function (_, data) {
6029
+ var self = this;
6030
+
6031
+ data.selected = false;
6032
+
6033
+ this.current(function (allData) {
6034
+ var values = [];
6035
+
6036
+ for (var d = 0; d < allData.length; d++) {
6037
+ var item = allData[d];
6038
+
6039
+ if (data.id == item.id) {
6040
+ continue;
6041
+ }
6042
+
6043
+ values.push(item.id);
6044
+ }
6045
+
6046
+ self.$element.val(values.join(self._valueSeparator));
6047
+ self.$element.trigger('change');
6048
+ });
6049
+ };
6050
+
6051
+ InputData.prototype.query = function (_, params, callback) {
6052
+ var results = [];
6053
+
6054
+ for (var d = 0; d < this._currentData.length; d++) {
6055
+ var data = this._currentData[d];
6056
+
6057
+ var matches = this.matches(params, data);
6058
+
6059
+ if (matches !== null) {
6060
+ results.push(matches);
6061
+ }
6062
+ }
6063
+
6064
+ callback({
6065
+ results: results
6066
+ });
6067
+ };
6068
+
6069
+ InputData.prototype.addOptions = function (_, $options) {
6070
+ var options = $.map($options, function ($option) {
6071
+ return $.data($option[0], 'data');
6072
+ });
6073
+
6074
+ this._currentData.push.apply(this._currentData, options);
6075
+ };
6076
+
6077
+ return InputData;
6078
+ });
6079
+
6080
+ S2.define('select2/compat/matcher',[
6081
+ 'jquery'
6082
+ ], function ($) {
6083
+ function oldMatcher (matcher) {
6084
+ function wrappedMatcher (params, data) {
6085
+ var match = $.extend(true, {}, data);
6086
+
6087
+ if (params.term == null || $.trim(params.term) === '') {
6088
+ return match;
6089
+ }
6090
+
6091
+ if (data.children) {
6092
+ for (var c = data.children.length - 1; c >= 0; c--) {
6093
+ var child = data.children[c];
6094
+
6095
+ // Check if the child object matches
6096
+ // The old matcher returned a boolean true or false
6097
+ var doesMatch = matcher(params.term, child.text, child);
6098
+
6099
+ // If the child didn't match, pop it off
6100
+ if (!doesMatch) {
6101
+ match.children.splice(c, 1);
6102
+ }
6103
+ }
6104
+
6105
+ if (match.children.length > 0) {
6106
+ return match;
6107
+ }
6108
+ }
6109
+
6110
+ if (matcher(params.term, data.text, data)) {
6111
+ return match;
6112
+ }
6113
+
6114
+ return null;
6115
+ }
6116
+
6117
+ return wrappedMatcher;
6118
+ }
6119
+
6120
+ return oldMatcher;
6121
+ });
6122
+
6123
+ S2.define('select2/compat/query',[
6124
+
6125
+ ], function () {
6126
+ function Query (decorated, $element, options) {
6127
+ if (options.get('debug') && window.console && console.warn) {
6128
+ console.warn(
6129
+ 'Select2: The `query` option has been deprecated in favor of a ' +
6130
+ 'custom data adapter that overrides the `query` method. Support ' +
6131
+ 'will be removed for the `query` option in future versions of ' +
6132
+ 'Select2.'
6133
+ );
6134
+ }
6135
+
6136
+ decorated.call(this, $element, options);
6137
+ }
6138
+
6139
+ Query.prototype.query = function (_, params, callback) {
6140
+ params.callback = callback;
6141
+
6142
+ var query = this.options.get('query');
6143
+
6144
+ query.call(null, params);
6145
+ };
6146
+
6147
+ return Query;
6148
+ });
6149
+
6150
+ S2.define('select2/dropdown/attachContainer',[
6151
+
6152
+ ], function () {
6153
+ function AttachContainer (decorated, $element, options) {
6154
+ decorated.call(this, $element, options);
6155
+ }
6156
+
6157
+ AttachContainer.prototype.position =
6158
+ function (decorated, $dropdown, $container) {
6159
+ var $dropdownContainer = $container.find('.dropdown-wrapper');
6160
+ $dropdownContainer.append($dropdown);
6161
+
6162
+ $dropdown.addClass('select2-dropdown--below');
6163
+ $container.addClass('select2-container--below');
6164
+ };
6165
+
6166
+ return AttachContainer;
6167
+ });
6168
+
6169
+ S2.define('select2/dropdown/stopPropagation',[
6170
+
6171
+ ], function () {
6172
+ function StopPropagation () { }
6173
+
6174
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
6175
+ decorated.call(this, container, $container);
6176
+
6177
+ var stoppedEvents = [
6178
+ 'blur',
6179
+ 'change',
6180
+ 'click',
6181
+ 'dblclick',
6182
+ 'focus',
6183
+ 'focusin',
6184
+ 'focusout',
6185
+ 'input',
6186
+ 'keydown',
6187
+ 'keyup',
6188
+ 'keypress',
6189
+ 'mousedown',
6190
+ 'mouseenter',
6191
+ 'mouseleave',
6192
+ 'mousemove',
6193
+ 'mouseover',
6194
+ 'mouseup',
6195
+ 'search',
6196
+ 'touchend',
6197
+ 'touchstart'
6198
+ ];
6199
+
6200
+ this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
6201
+ evt.stopPropagation();
6202
+ });
6203
+ };
6204
+
6205
+ return StopPropagation;
6206
+ });
6207
+
6208
+ S2.define('select2/selection/stopPropagation',[
6209
+
6210
+ ], function () {
6211
+ function StopPropagation () { }
6212
+
6213
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
6214
+ decorated.call(this, container, $container);
6215
+
6216
+ var stoppedEvents = [
6217
+ 'blur',
6218
+ 'change',
6219
+ 'click',
6220
+ 'dblclick',
6221
+ 'focus',
6222
+ 'focusin',
6223
+ 'focusout',
6224
+ 'input',
6225
+ 'keydown',
6226
+ 'keyup',
6227
+ 'keypress',
6228
+ 'mousedown',
6229
+ 'mouseenter',
6230
+ 'mouseleave',
6231
+ 'mousemove',
6232
+ 'mouseover',
6233
+ 'mouseup',
6234
+ 'search',
6235
+ 'touchend',
6236
+ 'touchstart'
6237
+ ];
6238
+
6239
+ this.$selection.on(stoppedEvents.join(' '), function (evt) {
6240
+ evt.stopPropagation();
6241
+ });
6242
+ };
6243
+
6244
+ return StopPropagation;
6245
+ });
6246
+
6247
+ /*!
6248
+ * jQuery Mousewheel 3.1.13
6249
+ *
6250
+ * Copyright jQuery Foundation and other contributors
6251
+ * Released under the MIT license
6252
+ * http://jquery.org/license
6253
+ */
6254
+
6255
+ (function (factory) {
6256
+ if ( typeof S2.define === 'function' && S2.define.amd ) {
6257
+ // AMD. Register as an anonymous module.
6258
+ S2.define('jquery-mousewheel',['jquery'], factory);
6259
+ } else if (typeof exports === 'object') {
6260
+ // Node/CommonJS style for Browserify
6261
+ module.exports = factory;
6262
+ } else {
6263
+ // Browser globals
6264
+ factory(jQuery);
6265
+ }
6266
+ }(function ($) {
6267
+
6268
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
6269
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
6270
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
6271
+ slice = Array.prototype.slice,
6272
+ nullLowestDeltaTimeout, lowestDelta;
6273
+
6274
+ if ( $.event.fixHooks ) {
6275
+ for ( var i = toFix.length; i; ) {
6276
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
6277
+ }
6278
+ }
6279
+
6280
+ var special = $.event.special.mousewheel = {
6281
+ version: '3.1.12',
6282
+
6283
+ setup: function() {
6284
+ if ( this.addEventListener ) {
6285
+ for ( var i = toBind.length; i; ) {
6286
+ this.addEventListener( toBind[--i], handler, false );
6287
+ }
6288
+ } else {
6289
+ this.onmousewheel = handler;
6290
+ }
6291
+ // Store the line height and page height for this particular element
6292
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
6293
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
6294
+ },
6295
+
6296
+ teardown: function() {
6297
+ if ( this.removeEventListener ) {
6298
+ for ( var i = toBind.length; i; ) {
6299
+ this.removeEventListener( toBind[--i], handler, false );
6300
+ }
6301
+ } else {
6302
+ this.onmousewheel = null;
6303
+ }
6304
+ // Clean up the data we added to the element
6305
+ $.removeData(this, 'mousewheel-line-height');
6306
+ $.removeData(this, 'mousewheel-page-height');
6307
+ },
6308
+
6309
+ getLineHeight: function(elem) {
6310
+ var $elem = $(elem),
6311
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
6312
+ if (!$parent.length) {
6313
+ $parent = $('body');
6314
+ }
6315
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
6316
+ },
6317
+
6318
+ getPageHeight: function(elem) {
6319
+ return $(elem).height();
6320
+ },
6321
+
6322
+ settings: {
6323
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
6324
+ normalizeOffset: true // calls getBoundingClientRect for each event
6325
+ }
6326
+ };
6327
+
6328
+ $.fn.extend({
6329
+ mousewheel: function(fn) {
6330
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
6331
+ },
6332
+
6333
+ unmousewheel: function(fn) {
6334
+ return this.unbind('mousewheel', fn);
6335
+ }
6336
+ });
6337
+
6338
+
6339
+ function handler(event) {
6340
+ var orgEvent = event || window.event,
6341
+ args = slice.call(arguments, 1),
6342
+ delta = 0,
6343
+ deltaX = 0,
6344
+ deltaY = 0,
6345
+ absDelta = 0,
6346
+ offsetX = 0,
6347
+ offsetY = 0;
6348
+ event = $.event.fix(orgEvent);
6349
+ event.type = 'mousewheel';
6350
+
6351
+ // Old school scrollwheel delta
6352
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
6353
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
6354
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
6355
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
6356
+
6357
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
6358
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
6359
+ deltaX = deltaY * -1;
6360
+ deltaY = 0;
6361
+ }
6362
+
6363
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
6364
+ delta = deltaY === 0 ? deltaX : deltaY;
6365
+
6366
+ // New school wheel delta (wheel event)
6367
+ if ( 'deltaY' in orgEvent ) {
6368
+ deltaY = orgEvent.deltaY * -1;
6369
+ delta = deltaY;
6370
+ }
6371
+ if ( 'deltaX' in orgEvent ) {
6372
+ deltaX = orgEvent.deltaX;
6373
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
6374
+ }
6375
+
6376
+ // No change actually happened, no reason to go any further
6377
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
6378
+
6379
+ // Need to convert lines and pages to pixels if we aren't already in pixels
6380
+ // There are three delta modes:
6381
+ // * deltaMode 0 is by pixels, nothing to do
6382
+ // * deltaMode 1 is by lines
6383
+ // * deltaMode 2 is by pages
6384
+ if ( orgEvent.deltaMode === 1 ) {
6385
+ var lineHeight = $.data(this, 'mousewheel-line-height');
6386
+ delta *= lineHeight;
6387
+ deltaY *= lineHeight;
6388
+ deltaX *= lineHeight;
6389
+ } else if ( orgEvent.deltaMode === 2 ) {
6390
+ var pageHeight = $.data(this, 'mousewheel-page-height');
6391
+ delta *= pageHeight;
6392
+ deltaY *= pageHeight;
6393
+ deltaX *= pageHeight;
6394
+ }
6395
+
6396
+ // Store lowest absolute delta to normalize the delta values
6397
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
6398
+
6399
+ if ( !lowestDelta || absDelta < lowestDelta ) {
6400
+ lowestDelta = absDelta;
6401
+
6402
+ // Adjust older deltas if necessary
6403
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
6404
+ lowestDelta /= 40;
6405
+ }
6406
+ }
6407
+
6408
+ // Adjust older deltas if necessary
6409
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
6410
+ // Divide all the things by 40!
6411
+ delta /= 40;
6412
+ deltaX /= 40;
6413
+ deltaY /= 40;
6414
+ }
6415
+
6416
+ // Get a whole, normalized value for the deltas
6417
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
6418
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
6419
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
6420
+
6421
+ // Normalise offsetX and offsetY properties
6422
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
6423
+ var boundingRect = this.getBoundingClientRect();
6424
+ offsetX = event.clientX - boundingRect.left;
6425
+ offsetY = event.clientY - boundingRect.top;
6426
+ }
6427
+
6428
+ // Add information to the event object
6429
+ event.deltaX = deltaX;
6430
+ event.deltaY = deltaY;
6431
+ event.deltaFactor = lowestDelta;
6432
+ event.offsetX = offsetX;
6433
+ event.offsetY = offsetY;
6434
+ // Go ahead and set deltaMode to 0 since we converted to pixels
6435
+ // Although this is a little odd since we overwrite the deltaX/Y
6436
+ // properties with normalized deltas.
6437
+ event.deltaMode = 0;
6438
+
6439
+ // Add event and delta to the front of the arguments
6440
+ args.unshift(event, delta, deltaX, deltaY);
6441
+
6442
+ // Clearout lowestDelta after sometime to better
6443
+ // handle multiple device types that give different
6444
+ // a different lowestDelta
6445
+ // Ex: trackpad = 3 and mouse wheel = 120
6446
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
6447
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
6448
+
6449
+ return ($.event.dispatch || $.event.handle).apply(this, args);
6450
+ }
6451
+
6452
+ function nullLowestDelta() {
6453
+ lowestDelta = null;
6454
+ }
6455
+
6456
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
6457
+ // If this is an older event and the delta is divisable by 120,
6458
+ // then we are assuming that the browser is treating this as an
6459
+ // older mouse wheel event and that we should divide the deltas
6460
+ // by 40 to try and get a more usable deltaFactor.
6461
+ // Side note, this actually impacts the reported scroll distance
6462
+ // in older browsers and can cause scrolling to be slower than native.
6463
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
6464
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
6465
+ }
6466
+
6467
+ }));
6468
+
6469
+ S2.define('jquery.select2',[
6470
+ 'jquery',
6471
+ 'jquery-mousewheel',
6472
+
6473
+ './select2/core',
6474
+ './select2/defaults'
6475
+ ], function ($, _, Select2, Defaults) {
6476
+ if ($.fn.selectWoo == null) {
6477
+ // All methods that should return the element
6478
+ var thisMethods = ['open', 'close', 'destroy'];
6479
+
6480
+ $.fn.selectWoo = function (options) {
6481
+ options = options || {};
6482
+
6483
+ if (typeof options === 'object') {
6484
+ this.each(function () {
6485
+ var instanceOptions = $.extend(true, {}, options);
6486
+
6487
+ var instance = new Select2($(this), instanceOptions);
6488
+ });
6489
+
6490
+ return this;
6491
+ } else if (typeof options === 'string') {
6492
+ var ret;
6493
+ var args = Array.prototype.slice.call(arguments, 1);
6494
+
6495
+ this.each(function () {
6496
+ var instance = $(this).data('select2');
6497
+
6498
+ if (instance == null && window.console && console.error) {
6499
+ console.error(
6500
+ 'The select2(\'' + options + '\') method was called on an ' +
6501
+ 'element that is not using Select2.'
6502
+ );
6503
+ }
6504
+
6505
+ ret = instance[options].apply(instance, args);
6506
+ });
6507
+
6508
+ // Check if we should be returning `this`
6509
+ if ($.inArray(options, thisMethods) > -1) {
6510
+ return this;
6511
+ }
6512
+
6513
+ return ret;
6514
+ } else {
6515
+ throw new Error('Invalid arguments for Select2: ' + options);
6516
+ }
6517
+ };
6518
+ }
6519
+
6520
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
6521
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
6522
+ }
6523
+
6524
+ if ($.fn.selectWoo.defaults == null) {
6525
+ $.fn.selectWoo.defaults = Defaults;
6526
+ }
6527
+
6528
+ // Also register selectWoo under select2 if select2 is not already present.
6529
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
6530
+
6531
+ return Select2;
6532
+ });
6533
+
6534
+ // Return the AMD loader configuration so it can be used outside of this file
6535
+ return {
6536
+ define: S2.define,
6537
+ require: S2.require
6538
+ };
6539
+ }());
6540
+
6541
+ // Autoload the jQuery bindings
6542
+ // We know that all of the modules exist above this, so we're safe
6543
+ var select2 = S2.require('jquery.select2');
6544
+
6545
+ // Hold the AMD module references on the jQuery function that was just loaded
6546
+ // This allows Select2 to use the internal loader outside of this file, such
6547
+ // as in the language files.
6548
+ jQuery.fn.select2.amd = S2;
6549
+ jQuery.fn.selectWoo.amd = S2;
6550
+
6551
+ // Return the Select2 instance for anyone who is importing it.
6552
+ return select2;
6553
+ }));
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.full.min.js ADDED
@@ -0,0 +1 @@
 
1
+ /*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(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 v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[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=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[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 a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.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?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,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(r,a)||e(s,a)||(s[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){"function"==typeof b[d]&&("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(){return Array.prototype.unshift.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;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).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||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},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.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},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="listbox" tabindex="-1"></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="alert" 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){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[data-selected]"),b=a.filter("[data-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()});b.$results.find(".select2-results__option[data-selected]").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("data-selected","true"):b.attr("data-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:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-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";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k<b.children.length;k++){var l=b.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}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("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-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):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-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").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),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[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-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),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&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(){return{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}}),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" 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,a.id+"-results");this.options.get("minimumResultsForSearch");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"),window.setTimeout(function(){d.$selection.focus()},1),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");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").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).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),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");return this.options.get("escapeMarkup")(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" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></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");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation" aria-hidden="true">&times;</span></li>')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e<a.length;e++){var f=a[e],g=this.selectionContainer(),h=this.display(f,g).trim();g.append(h),g.prop("title",f.title||f.text),g.data("data",f),d.push(g)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,d),void 0!==this.$search&&setTimeout(function(){b.$search.focus()},1)}},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;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},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="text" 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,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),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.data._resultId)}),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){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"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{a=.75*(this.$search.val().length+1)+"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(){return{"Ⓐ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),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="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},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");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")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");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;this.$element.children().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),void 0!==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(null!=(b=c.data(a[0],"data")))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&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(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),e.container.focusOnActiveElement()},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);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);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){this._lastTag;this.$element.find("option[data-select2-tag]").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);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}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){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});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){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});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;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});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="text" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";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.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),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){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},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){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&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="option" 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;this.$container.parents().filter(b.hasScroll).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)&&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){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},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()}return 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(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){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 O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}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--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-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)},new D}),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 e<=0?"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;h<i;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 b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},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},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-")&&null!=(f=d(this))&&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;if(this._isInitialized)return void b.call(this,c);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];b(c.term,g.text,g)||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,this.options.get("query").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){c.find(".dropdown-wrapper").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||n<f)&&(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.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=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&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.js ADDED
@@ -0,0 +1,5842 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * SelectWoo 1.0.1
3
+ * https://github.com/woocommerce/selectWoo
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/woocommerce/selectWoo/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 module === 'object' && module.exports) {
13
+ // Node/CommonJS
14
+ module.exports = function (root, jQuery) {
15
+ if (jQuery === undefined) {
16
+ // require('jQuery') returns a factory that requires window to
17
+ // build a jQuery instance, we normalize how we use modules
18
+ // that require this pattern but the window provided is a noop
19
+ // if it's defined (how jquery works)
20
+ if (typeof window !== 'undefined') {
21
+ jQuery = require('jquery');
22
+ }
23
+ else {
24
+ jQuery = require('jquery')(root);
25
+ }
26
+ }
27
+ factory(jQuery);
28
+ return jQuery;
29
+ };
30
+ } else {
31
+ // Browser globals
32
+ factory(jQuery);
33
+ }
34
+ } (function (jQuery) {
35
+ // This is needed so we can catch the AMD loader configuration and use it
36
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
37
+ // returns the AMD loader references.
38
+ var S2 =(function () {
39
+ // Restore the Select2 AMD loader so it can be used
40
+ // Needed mostly in the language files, where the loader is not inserted
41
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
42
+ var S2 = jQuery.fn.select2.amd;
43
+ }
44
+ var S2;(function () { if (!S2 || !S2.requirejs) {
45
+ if (!S2) { S2 = {}; } else { require = S2; }
46
+ /**
47
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
48
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
49
+ */
50
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
51
+ //be followed.
52
+ /*global setTimeout: false */
53
+
54
+ var requirejs, require, define;
55
+ (function (undef) {
56
+ var main, req, makeMap, handlers,
57
+ defined = {},
58
+ waiting = {},
59
+ config = {},
60
+ defining = {},
61
+ hasOwn = Object.prototype.hasOwnProperty,
62
+ aps = [].slice,
63
+ jsSuffixRegExp = /\.js$/;
64
+
65
+ function hasProp(obj, prop) {
66
+ return hasOwn.call(obj, prop);
67
+ }
68
+
69
+ /**
70
+ * Given a relative module name, like ./something, normalize it to
71
+ * a real name that can be mapped to a path.
72
+ * @param {String} name the relative name
73
+ * @param {String} baseName a real name that the name arg is relative
74
+ * to.
75
+ * @returns {String} normalized name
76
+ */
77
+ function normalize(name, baseName) {
78
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
79
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
80
+ baseParts = baseName && baseName.split("/"),
81
+ map = config.map,
82
+ starMap = (map && map['*']) || {};
83
+
84
+ //Adjust any relative paths.
85
+ if (name) {
86
+ name = name.split('/');
87
+ lastIndex = name.length - 1;
88
+
89
+ // If wanting node ID compatibility, strip .js from end
90
+ // of IDs. Have to do this here, and not in nameToUrl
91
+ // because node allows either .js or non .js to map
92
+ // to same file.
93
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
94
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
95
+ }
96
+
97
+ // Starts with a '.' so need the baseName
98
+ if (name[0].charAt(0) === '.' && baseParts) {
99
+ //Convert baseName to array, and lop off the last part,
100
+ //so that . matches that 'directory' and not name of the baseName's
101
+ //module. For instance, baseName of 'one/two/three', maps to
102
+ //'one/two/three.js', but we want the directory, 'one/two' for
103
+ //this normalization.
104
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
105
+ name = normalizedBaseParts.concat(name);
106
+ }
107
+
108
+ //start trimDots
109
+ for (i = 0; i < name.length; i++) {
110
+ part = name[i];
111
+ if (part === '.') {
112
+ name.splice(i, 1);
113
+ i -= 1;
114
+ } else if (part === '..') {
115
+ // If at the start, or previous value is still ..,
116
+ // keep them so that when converted to a path it may
117
+ // still work when converted to a path, even though
118
+ // as an ID it is less than ideal. In larger point
119
+ // releases, may be better to just kick out an error.
120
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
121
+ continue;
122
+ } else if (i > 0) {
123
+ name.splice(i - 1, 2);
124
+ i -= 2;
125
+ }
126
+ }
127
+ }
128
+ //end trimDots
129
+
130
+ name = name.join('/');
131
+ }
132
+
133
+ //Apply map config if available.
134
+ if ((baseParts || starMap) && map) {
135
+ nameParts = name.split('/');
136
+
137
+ for (i = nameParts.length; i > 0; i -= 1) {
138
+ nameSegment = nameParts.slice(0, i).join("/");
139
+
140
+ if (baseParts) {
141
+ //Find the longest baseName segment match in the config.
142
+ //So, do joins on the biggest to smallest lengths of baseParts.
143
+ for (j = baseParts.length; j > 0; j -= 1) {
144
+ mapValue = map[baseParts.slice(0, j).join('/')];
145
+
146
+ //baseName segment has config, find if it has one for
147
+ //this name.
148
+ if (mapValue) {
149
+ mapValue = mapValue[nameSegment];
150
+ if (mapValue) {
151
+ //Match, update name to the new value.
152
+ foundMap = mapValue;
153
+ foundI = i;
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ if (foundMap) {
161
+ break;
162
+ }
163
+
164
+ //Check for a star map match, but just hold on to it,
165
+ //if there is a shorter segment match later in a matching
166
+ //config, then favor over this star map.
167
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
168
+ foundStarMap = starMap[nameSegment];
169
+ starI = i;
170
+ }
171
+ }
172
+
173
+ if (!foundMap && foundStarMap) {
174
+ foundMap = foundStarMap;
175
+ foundI = starI;
176
+ }
177
+
178
+ if (foundMap) {
179
+ nameParts.splice(0, foundI, foundMap);
180
+ name = nameParts.join('/');
181
+ }
182
+ }
183
+
184
+ return name;
185
+ }
186
+
187
+ function makeRequire(relName, forceSync) {
188
+ return function () {
189
+ //A version of a require function that passes a moduleName
190
+ //value for items that may need to
191
+ //look up paths relative to the moduleName
192
+ var args = aps.call(arguments, 0);
193
+
194
+ //If first arg is not require('string'), and there is only
195
+ //one arg, it is the array form without a callback. Insert
196
+ //a null so that the following concat is correct.
197
+ if (typeof args[0] !== 'string' && args.length === 1) {
198
+ args.push(null);
199
+ }
200
+ return req.apply(undef, args.concat([relName, forceSync]));
201
+ };
202
+ }
203
+
204
+ function makeNormalize(relName) {
205
+ return function (name) {
206
+ return normalize(name, relName);
207
+ };
208
+ }
209
+
210
+ function makeLoad(depName) {
211
+ return function (value) {
212
+ defined[depName] = value;
213
+ };
214
+ }
215
+
216
+ function callDep(name) {
217
+ if (hasProp(waiting, name)) {
218
+ var args = waiting[name];
219
+ delete waiting[name];
220
+ defining[name] = true;
221
+ main.apply(undef, args);
222
+ }
223
+
224
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
225
+ throw new Error('No ' + name);
226
+ }
227
+ return defined[name];
228
+ }
229
+
230
+ //Turns a plugin!resource to [plugin, resource]
231
+ //with the plugin being undefined if the name
232
+ //did not have a plugin prefix.
233
+ function splitPrefix(name) {
234
+ var prefix,
235
+ index = name ? name.indexOf('!') : -1;
236
+ if (index > -1) {
237
+ prefix = name.substring(0, index);
238
+ name = name.substring(index + 1, name.length);
239
+ }
240
+ return [prefix, name];
241
+ }
242
+
243
+ //Creates a parts array for a relName where first part is plugin ID,
244
+ //second part is resource ID. Assumes relName has already been normalized.
245
+ function makeRelParts(relName) {
246
+ return relName ? splitPrefix(relName) : [];
247
+ }
248
+
249
+ /**
250
+ * Makes a name map, normalizing the name, and using a plugin
251
+ * for normalization if necessary. Grabs a ref to plugin
252
+ * too, as an optimization.
253
+ */
254
+ makeMap = function (name, relParts) {
255
+ var plugin,
256
+ parts = splitPrefix(name),
257
+ prefix = parts[0],
258
+ relResourceName = relParts[1];
259
+
260
+ name = parts[1];
261
+
262
+ if (prefix) {
263
+ prefix = normalize(prefix, relResourceName);
264
+ plugin = callDep(prefix);
265
+ }
266
+
267
+ //Normalize according
268
+ if (prefix) {
269
+ if (plugin && plugin.normalize) {
270
+ name = plugin.normalize(name, makeNormalize(relResourceName));
271
+ } else {
272
+ name = normalize(name, relResourceName);
273
+ }
274
+ } else {
275
+ name = normalize(name, relResourceName);
276
+ parts = splitPrefix(name);
277
+ prefix = parts[0];
278
+ name = parts[1];
279
+ if (prefix) {
280
+ plugin = callDep(prefix);
281
+ }
282
+ }
283
+
284
+ //Using ridiculous property names for space reasons
285
+ return {
286
+ f: prefix ? prefix + '!' + name : name, //fullName
287
+ n: name,
288
+ pr: prefix,
289
+ p: plugin
290
+ };
291
+ };
292
+
293
+ function makeConfig(name) {
294
+ return function () {
295
+ return (config && config.config && config.config[name]) || {};
296
+ };
297
+ }
298
+
299
+ handlers = {
300
+ require: function (name) {
301
+ return makeRequire(name);
302
+ },
303
+ exports: function (name) {
304
+ var e = defined[name];
305
+ if (typeof e !== 'undefined') {
306
+ return e;
307
+ } else {
308
+ return (defined[name] = {});
309
+ }
310
+ },
311
+ module: function (name) {
312
+ return {
313
+ id: name,
314
+ uri: '',
315
+ exports: defined[name],
316
+ config: makeConfig(name)
317
+ };
318
+ }
319
+ };
320
+
321
+ main = function (name, deps, callback, relName) {
322
+ var cjsModule, depName, ret, map, i, relParts,
323
+ args = [],
324
+ callbackType = typeof callback,
325
+ usingExports;
326
+
327
+ //Use name if no relName
328
+ relName = relName || name;
329
+ relParts = makeRelParts(relName);
330
+
331
+ //Call the callback to define the module, if necessary.
332
+ if (callbackType === 'undefined' || callbackType === 'function') {
333
+ //Pull out the defined dependencies and pass the ordered
334
+ //values to the callback.
335
+ //Default to [require, exports, module] if no deps
336
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
337
+ for (i = 0; i < deps.length; i += 1) {
338
+ map = makeMap(deps[i], relParts);
339
+ depName = map.f;
340
+
341
+ //Fast path CommonJS standard dependencies.
342
+ if (depName === "require") {
343
+ args[i] = handlers.require(name);
344
+ } else if (depName === "exports") {
345
+ //CommonJS module spec 1.1
346
+ args[i] = handlers.exports(name);
347
+ usingExports = true;
348
+ } else if (depName === "module") {
349
+ //CommonJS module spec 1.1
350
+ cjsModule = args[i] = handlers.module(name);
351
+ } else if (hasProp(defined, depName) ||
352
+ hasProp(waiting, depName) ||
353
+ hasProp(defining, depName)) {
354
+ args[i] = callDep(depName);
355
+ } else if (map.p) {
356
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
357
+ args[i] = defined[depName];
358
+ } else {
359
+ throw new Error(name + ' missing ' + depName);
360
+ }
361
+ }
362
+
363
+ ret = callback ? callback.apply(defined[name], args) : undefined;
364
+
365
+ if (name) {
366
+ //If setting exports via "module" is in play,
367
+ //favor that over return value and exports. After that,
368
+ //favor a non-undefined return value over exports use.
369
+ if (cjsModule && cjsModule.exports !== undef &&
370
+ cjsModule.exports !== defined[name]) {
371
+ defined[name] = cjsModule.exports;
372
+ } else if (ret !== undef || !usingExports) {
373
+ //Use the return value from the function.
374
+ defined[name] = ret;
375
+ }
376
+ }
377
+ } else if (name) {
378
+ //May just be an object definition for the module. Only
379
+ //worry about defining if have a module name.
380
+ defined[name] = callback;
381
+ }
382
+ };
383
+
384
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
385
+ if (typeof deps === "string") {
386
+ if (handlers[deps]) {
387
+ //callback in this case is really relName
388
+ return handlers[deps](callback);
389
+ }
390
+ //Just return the module wanted. In this scenario, the
391
+ //deps arg is the module name, and second arg (if passed)
392
+ //is just the relName.
393
+ //Normalize module name, if it contains . or ..
394
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
395
+ } else if (!deps.splice) {
396
+ //deps is a config object, not an array.
397
+ config = deps;
398
+ if (config.deps) {
399
+ req(config.deps, config.callback);
400
+ }
401
+ if (!callback) {
402
+ return;
403
+ }
404
+
405
+ if (callback.splice) {
406
+ //callback is an array, which means it is a dependency list.
407
+ //Adjust args if there are dependencies
408
+ deps = callback;
409
+ callback = relName;
410
+ relName = null;
411
+ } else {
412
+ deps = undef;
413
+ }
414
+ }
415
+
416
+ //Support require(['a'])
417
+ callback = callback || function () {};
418
+
419
+ //If relName is a function, it is an errback handler,
420
+ //so remove it.
421
+ if (typeof relName === 'function') {
422
+ relName = forceSync;
423
+ forceSync = alt;
424
+ }
425
+
426
+ //Simulate async callback;
427
+ if (forceSync) {
428
+ main(undef, deps, callback, relName);
429
+ } else {
430
+ //Using a non-zero value because of concern for what old browsers
431
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
432
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
433
+ //If want a value immediately, use require('id') instead -- something
434
+ //that works in almond on the global level, but not guaranteed and
435
+ //unlikely to work in other AMD implementations.
436
+ setTimeout(function () {
437
+ main(undef, deps, callback, relName);
438
+ }, 4);
439
+ }
440
+
441
+ return req;
442
+ };
443
+
444
+ /**
445
+ * Just drops the config on the floor, but returns req in case
446
+ * the config return value is used.
447
+ */
448
+ req.config = function (cfg) {
449
+ return req(cfg);
450
+ };
451
+
452
+ /**
453
+ * Expose module registry for debugging and tooling
454
+ */
455
+ requirejs._defined = defined;
456
+
457
+ define = function (name, deps, callback) {
458
+ if (typeof name !== 'string') {
459
+ throw new Error('See almond README: incorrect module build, no module name');
460
+ }
461
+
462
+ //This module may not have dependencies
463
+ if (!deps.splice) {
464
+ //deps is not an array, so probably means
465
+ //an object literal or factory function for
466
+ //the value. Adjust args.
467
+ callback = deps;
468
+ deps = [];
469
+ }
470
+
471
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
472
+ waiting[name] = [name, deps, callback];
473
+ }
474
+ };
475
+
476
+ define.amd = {
477
+ jQuery: true
478
+ };
479
+ }());
480
+
481
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
482
+ }
483
+ }());
484
+ S2.define("almond", function(){});
485
+
486
+ /* global jQuery:false, $:false */
487
+ S2.define('jquery',[],function () {
488
+ var _$ = jQuery || $;
489
+
490
+ if (_$ == null && console && console.error) {
491
+ console.error(
492
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
493
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
494
+ 'web page.'
495
+ );
496
+ }
497
+
498
+ return _$;
499
+ });
500
+
501
+ S2.define('select2/utils',[
502
+ 'jquery'
503
+ ], function ($) {
504
+ var Utils = {};
505
+
506
+ Utils.Extend = function (ChildClass, SuperClass) {
507
+ var __hasProp = {}.hasOwnProperty;
508
+
509
+ function BaseConstructor () {
510
+ this.constructor = ChildClass;
511
+ }
512
+
513
+ for (var key in SuperClass) {
514
+ if (__hasProp.call(SuperClass, key)) {
515
+ ChildClass[key] = SuperClass[key];
516
+ }
517
+ }
518
+
519
+ BaseConstructor.prototype = SuperClass.prototype;
520
+ ChildClass.prototype = new BaseConstructor();
521
+ ChildClass.__super__ = SuperClass.prototype;
522
+
523
+ return ChildClass;
524
+ };
525
+
526
+ function getMethods (theClass) {
527
+ var proto = theClass.prototype;
528
+
529
+ var methods = [];
530
+
531
+ for (var methodName in proto) {
532
+ var m = proto[methodName];
533
+
534
+ if (typeof m !== 'function') {
535
+ continue;
536
+ }
537
+
538
+ if (methodName === 'constructor') {
539
+ continue;
540
+ }
541
+
542
+ methods.push(methodName);
543
+ }
544
+
545
+ return methods;
546
+ }
547
+
548
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
549
+ var decoratedMethods = getMethods(DecoratorClass);
550
+ var superMethods = getMethods(SuperClass);
551
+
552
+ function DecoratedClass () {
553
+ var unshift = Array.prototype.unshift;
554
+
555
+ var argCount = DecoratorClass.prototype.constructor.length;
556
+
557
+ var calledConstructor = SuperClass.prototype.constructor;
558
+
559
+ if (argCount > 0) {
560
+ unshift.call(arguments, SuperClass.prototype.constructor);
561
+
562
+ calledConstructor = DecoratorClass.prototype.constructor;
563
+ }
564
+
565
+ calledConstructor.apply(this, arguments);
566
+ }
567
+
568
+ DecoratorClass.displayName = SuperClass.displayName;
569
+
570
+ function ctr () {
571
+ this.constructor = DecoratedClass;
572
+ }
573
+
574
+ DecoratedClass.prototype = new ctr();
575
+
576
+ for (var m = 0; m < superMethods.length; m++) {
577
+ var superMethod = superMethods[m];
578
+
579
+ DecoratedClass.prototype[superMethod] =
580
+ SuperClass.prototype[superMethod];
581
+ }
582
+
583
+ var calledMethod = function (methodName) {
584
+ // Stub out the original method if it's not decorating an actual method
585
+ var originalMethod = function () {};
586
+
587
+ if (methodName in DecoratedClass.prototype) {
588
+ originalMethod = DecoratedClass.prototype[methodName];
589
+ }
590
+
591
+ var decoratedMethod = DecoratorClass.prototype[methodName];
592
+
593
+ return function () {
594
+ var unshift = Array.prototype.unshift;
595
+
596
+ unshift.call(arguments, originalMethod);
597
+
598
+ return decoratedMethod.apply(this, arguments);
599
+ };
600
+ };
601
+
602
+ for (var d = 0; d < decoratedMethods.length; d++) {
603
+ var decoratedMethod = decoratedMethods[d];
604
+
605
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
606
+ }
607
+
608
+ return DecoratedClass;
609
+ };
610
+
611
+ var Observable = function () {
612
+ this.listeners = {};
613
+ };
614
+
615
+ Observable.prototype.on = function (event, callback) {
616
+ this.listeners = this.listeners || {};
617
+
618
+ if (event in this.listeners) {
619
+ this.listeners[event].push(callback);
620
+ } else {
621
+ this.listeners[event] = [callback];
622
+ }
623
+ };
624
+
625
+ Observable.prototype.trigger = function (event) {
626
+ var slice = Array.prototype.slice;
627
+ var params = slice.call(arguments, 1);
628
+
629
+ this.listeners = this.listeners || {};
630
+
631
+ // Params should always come in as an array
632
+ if (params == null) {
633
+ params = [];
634
+ }
635
+
636
+ // If there are no arguments to the event, use a temporary object
637
+ if (params.length === 0) {
638
+ params.push({});
639
+ }
640
+
641
+ // Set the `_type` of the first object to the event
642
+ params[0]._type = event;
643
+
644
+ if (event in this.listeners) {
645
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
646
+ }
647
+
648
+ if ('*' in this.listeners) {
649
+ this.invoke(this.listeners['*'], arguments);
650
+ }
651
+ };
652
+
653
+ Observable.prototype.invoke = function (listeners, params) {
654
+ for (var i = 0, len = listeners.length; i < len; i++) {
655
+ listeners[i].apply(this, params);
656
+ }
657
+ };
658
+
659
+ Utils.Observable = Observable;
660
+
661
+ Utils.generateChars = function (length) {
662
+ var chars = '';
663
+
664
+ for (var i = 0; i < length; i++) {
665
+ var randomChar = Math.floor(Math.random() * 36);
666
+ chars += randomChar.toString(36);
667
+ }
668
+
669
+ return chars;
670
+ };
671
+
672
+ Utils.bind = function (func, context) {
673
+ return function () {
674
+ func.apply(context, arguments);
675
+ };
676
+ };
677
+
678
+ Utils._convertData = function (data) {
679
+ for (var originalKey in data) {
680
+ var keys = originalKey.split('-');
681
+
682
+ var dataLevel = data;
683
+
684
+ if (keys.length === 1) {
685
+ continue;
686
+ }
687
+
688
+ for (var k = 0; k < keys.length; k++) {
689
+ var key = keys[k];
690
+
691
+ // Lowercase the first letter
692
+ // By default, dash-separated becomes camelCase
693
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
694
+
695
+ if (!(key in dataLevel)) {
696
+ dataLevel[key] = {};
697
+ }
698
+
699
+ if (k == keys.length - 1) {
700
+ dataLevel[key] = data[originalKey];
701
+ }
702
+
703
+ dataLevel = dataLevel[key];
704
+ }
705
+
706
+ delete data[originalKey];
707
+ }
708
+
709
+ return data;
710
+ };
711
+
712
+ Utils.hasScroll = function (index, el) {
713
+ // Adapted from the function created by @ShadowScripter
714
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
715
+ // The original code can be found at
716
+ // http://codereview.stackexchange.com/q/13338
717
+ // and was designed to be used with the Sizzle selector engine.
718
+
719
+ var $el = $(el);
720
+ var overflowX = el.style.overflowX;
721
+ var overflowY = el.style.overflowY;
722
+
723
+ //Check both x and y declarations
724
+ if (overflowX === overflowY &&
725
+ (overflowY === 'hidden' || overflowY === 'visible')) {
726
+ return false;
727
+ }
728
+
729
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
730
+ return true;
731
+ }
732
+
733
+ return ($el.innerHeight() < el.scrollHeight ||
734
+ $el.innerWidth() < el.scrollWidth);
735
+ };
736
+
737
+ Utils.escapeMarkup = function (markup) {
738
+ var replaceMap = {
739
+ '\\': '&#92;',
740
+ '&': '&amp;',
741
+ '<': '&lt;',
742
+ '>': '&gt;',
743
+ '"': '&quot;',
744
+ '\'': '&#39;',
745
+ '/': '&#47;'
746
+ };
747
+
748
+ // Do not try to escape the markup if it's not a string
749
+ if (typeof markup !== 'string') {
750
+ return markup;
751
+ }
752
+
753
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
754
+ return replaceMap[match];
755
+ });
756
+ };
757
+
758
+ // Append an array of jQuery nodes to a given element.
759
+ Utils.appendMany = function ($element, $nodes) {
760
+ // jQuery 1.7.x does not support $.fn.append() with an array
761
+ // Fall back to a jQuery object collection using $.fn.add()
762
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
763
+ var $jqNodes = $();
764
+
765
+ $.map($nodes, function (node) {
766
+ $jqNodes = $jqNodes.add(node);
767
+ });
768
+
769
+ $nodes = $jqNodes;
770
+ }
771
+
772
+ $element.append($nodes);
773
+ };
774
+
775
+ // Determine whether the browser is on a touchscreen device.
776
+ Utils.isTouchscreen = function() {
777
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
778
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
779
+ }
780
+ return Utils._isTouchscreenCache;
781
+ }
782
+
783
+ return Utils;
784
+ });
785
+
786
+ S2.define('select2/results',[
787
+ 'jquery',
788
+ './utils'
789
+ ], function ($, Utils) {
790
+ function Results ($element, options, dataAdapter) {
791
+ this.$element = $element;
792
+ this.data = dataAdapter;
793
+ this.options = options;
794
+
795
+ Results.__super__.constructor.call(this);
796
+ }
797
+
798
+ Utils.Extend(Results, Utils.Observable);
799
+
800
+ Results.prototype.render = function () {
801
+ var $results = $(
802
+ '<ul class="select2-results__options" role="listbox" tabindex="-1"></ul>'
803
+ );
804
+
805
+ if (this.options.get('multiple')) {
806
+ $results.attr('aria-multiselectable', 'true');
807
+ }
808
+
809
+ this.$results = $results;
810
+
811
+ return $results;
812
+ };
813
+
814
+ Results.prototype.clear = function () {
815
+ this.$results.empty();
816
+ };
817
+
818
+ Results.prototype.displayMessage = function (params) {
819
+ var escapeMarkup = this.options.get('escapeMarkup');
820
+
821
+ this.clear();
822
+ this.hideLoading();
823
+
824
+ var $message = $(
825
+ '<li role="alert" aria-live="assertive"' +
826
+ ' class="select2-results__option"></li>'
827
+ );
828
+
829
+ var message = this.options.get('translations').get(params.message);
830
+
831
+ $message.append(
832
+ escapeMarkup(
833
+ message(params.args)
834
+ )
835
+ );
836
+
837
+ $message[0].className += ' select2-results__message';
838
+
839
+ this.$results.append($message);
840
+ };
841
+
842
+ Results.prototype.hideMessages = function () {
843
+ this.$results.find('.select2-results__message').remove();
844
+ };
845
+
846
+ Results.prototype.append = function (data) {
847
+ this.hideLoading();
848
+
849
+ var $options = [];
850
+
851
+ if (data.results == null || data.results.length === 0) {
852
+ if (this.$results.children().length === 0) {
853
+ this.trigger('results:message', {
854
+ message: 'noResults'
855
+ });
856
+ }
857
+
858
+ return;
859
+ }
860
+
861
+ data.results = this.sort(data.results);
862
+
863
+ for (var d = 0; d < data.results.length; d++) {
864
+ var item = data.results[d];
865
+
866
+ var $option = this.option(item);
867
+
868
+ $options.push($option);
869
+ }
870
+
871
+ this.$results.append($options);
872
+ };
873
+
874
+ Results.prototype.position = function ($results, $dropdown) {
875
+ var $resultsContainer = $dropdown.find('.select2-results');
876
+ $resultsContainer.append($results);
877
+ };
878
+
879
+ Results.prototype.sort = function (data) {
880
+ var sorter = this.options.get('sorter');
881
+
882
+ return sorter(data);
883
+ };
884
+
885
+ Results.prototype.highlightFirstItem = function () {
886
+ var $options = this.$results
887
+ .find('.select2-results__option[data-selected]');
888
+
889
+ var $selected = $options.filter('[data-selected=true]');
890
+
891
+ // Check if there are any selected options
892
+ if ($selected.length > 0) {
893
+ // If there are selected options, highlight the first
894
+ $selected.first().trigger('mouseenter');
895
+ } else {
896
+ // If there are no selected options, highlight the first option
897
+ // in the dropdown
898
+ $options.first().trigger('mouseenter');
899
+ }
900
+
901
+ this.ensureHighlightVisible();
902
+ };
903
+
904
+ Results.prototype.setClasses = function () {
905
+ var self = this;
906
+
907
+ this.data.current(function (selected) {
908
+ var selectedIds = $.map(selected, function (s) {
909
+ return s.id.toString();
910
+ });
911
+
912
+ var $options = self.$results
913
+ .find('.select2-results__option[data-selected]');
914
+
915
+ $options.each(function () {
916
+ var $option = $(this);
917
+
918
+ var item = $.data(this, 'data');
919
+
920
+ // id needs to be converted to a string when comparing
921
+ var id = '' + item.id;
922
+
923
+ if ((item.element != null && item.element.selected) ||
924
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
925
+ $option.attr('data-selected', 'true');
926
+ } else {
927
+ $option.attr('data-selected', 'false');
928
+ }
929
+ });
930
+
931
+ });
932
+ };
933
+
934
+ Results.prototype.showLoading = function (params) {
935
+ this.hideLoading();
936
+
937
+ var loadingMore = this.options.get('translations').get('searching');
938
+
939
+ var loading = {
940
+ disabled: true,
941
+ loading: true,
942
+ text: loadingMore(params)
943
+ };
944
+ var $loading = this.option(loading);
945
+ $loading.className += ' loading-results';
946
+
947
+ this.$results.prepend($loading);
948
+ };
949
+
950
+ Results.prototype.hideLoading = function () {
951
+ this.$results.find('.loading-results').remove();
952
+ };
953
+
954
+ Results.prototype.option = function (data) {
955
+ var option = document.createElement('li');
956
+ option.className = 'select2-results__option';
957
+
958
+ var attrs = {
959
+ 'role': 'option',
960
+ 'data-selected': 'false',
961
+ 'tabindex': -1
962
+ };
963
+
964
+ if (data.disabled) {
965
+ delete attrs['data-selected'];
966
+ attrs['aria-disabled'] = 'true';
967
+ }
968
+
969
+ if (data.id == null) {
970
+ delete attrs['data-selected'];
971
+ }
972
+
973
+ if (data._resultId != null) {
974
+ option.id = data._resultId;
975
+ }
976
+
977
+ if (data.title) {
978
+ option.title = data.title;
979
+ }
980
+
981
+ if (data.children) {
982
+ attrs['aria-label'] = data.text;
983
+ delete attrs['data-selected'];
984
+ }
985
+
986
+ for (var attr in attrs) {
987
+ var val = attrs[attr];
988
+
989
+ option.setAttribute(attr, val);
990
+ }
991
+
992
+ if (data.children) {
993
+ var $option = $(option);
994
+
995
+ var label = document.createElement('strong');
996
+ label.className = 'select2-results__group';
997
+
998
+ var $label = $(label);
999
+ this.template(data, label);
1000
+ $label.attr('role', 'presentation');
1001
+
1002
+ var $children = [];
1003
+
1004
+ for (var c = 0; c < data.children.length; c++) {
1005
+ var child = data.children[c];
1006
+
1007
+ var $child = this.option(child);
1008
+
1009
+ $children.push($child);
1010
+ }
1011
+
1012
+ var $childrenContainer = $('<ul></ul>', {
1013
+ 'class': 'select2-results__options select2-results__options--nested',
1014
+ 'role': 'listbox'
1015
+ });
1016
+ $childrenContainer.append($children);
1017
+ $option.attr('role', 'list');
1018
+
1019
+ $option.append(label);
1020
+ $option.append($childrenContainer);
1021
+ } else {
1022
+ this.template(data, option);
1023
+ }
1024
+
1025
+ $.data(option, 'data', data);
1026
+
1027
+ return option;
1028
+ };
1029
+
1030
+ Results.prototype.bind = function (container, $container) {
1031
+ var self = this;
1032
+
1033
+ var id = container.id + '-results';
1034
+
1035
+ this.$results.attr('id', id);
1036
+
1037
+ container.on('results:all', function (params) {
1038
+ self.clear();
1039
+ self.append(params.data);
1040
+
1041
+ if (container.isOpen()) {
1042
+ self.setClasses();
1043
+ self.highlightFirstItem();
1044
+ }
1045
+ });
1046
+
1047
+ container.on('results:append', function (params) {
1048
+ self.append(params.data);
1049
+
1050
+ if (container.isOpen()) {
1051
+ self.setClasses();
1052
+ }
1053
+ });
1054
+
1055
+ container.on('query', function (params) {
1056
+ self.hideMessages();
1057
+ self.showLoading(params);
1058
+ });
1059
+
1060
+ container.on('select', function () {
1061
+ if (!container.isOpen()) {
1062
+ return;
1063
+ }
1064
+
1065
+ self.setClasses();
1066
+ self.highlightFirstItem();
1067
+ });
1068
+
1069
+ container.on('unselect', function () {
1070
+ if (!container.isOpen()) {
1071
+ return;
1072
+ }
1073
+
1074
+ self.setClasses();
1075
+ self.highlightFirstItem();
1076
+ });
1077
+
1078
+ container.on('open', function () {
1079
+ // When the dropdown is open, aria-expended="true"
1080
+ self.$results.attr('aria-expanded', 'true');
1081
+ self.$results.attr('aria-hidden', 'false');
1082
+
1083
+ self.setClasses();
1084
+ self.ensureHighlightVisible();
1085
+ });
1086
+
1087
+ container.on('close', function () {
1088
+ // When the dropdown is closed, aria-expended="false"
1089
+ self.$results.attr('aria-expanded', 'false');
1090
+ self.$results.attr('aria-hidden', 'true');
1091
+ self.$results.removeAttr('aria-activedescendant');
1092
+ });
1093
+
1094
+ container.on('results:toggle', function () {
1095
+ var $highlighted = self.getHighlightedResults();
1096
+
1097
+ if ($highlighted.length === 0) {
1098
+ return;
1099
+ }
1100
+
1101
+ $highlighted.trigger('mouseup');
1102
+ });
1103
+
1104
+ container.on('results:select', function () {
1105
+ var $highlighted = self.getHighlightedResults();
1106
+
1107
+ if ($highlighted.length === 0) {
1108
+ return;
1109
+ }
1110
+
1111
+ var data = $highlighted.data('data');
1112
+
1113
+ if ($highlighted.attr('data-selected') == 'true') {
1114
+ self.trigger('close', {});
1115
+ } else {
1116
+ self.trigger('select', {
1117
+ data: data
1118
+ });
1119
+ }
1120
+ });
1121
+
1122
+ container.on('results:previous', function () {
1123
+ var $highlighted = self.getHighlightedResults();
1124
+
1125
+ var $options = self.$results.find('[data-selected]');
1126
+
1127
+ var currentIndex = $options.index($highlighted);
1128
+
1129
+ // If we are already at te top, don't move further
1130
+ if (currentIndex === 0) {
1131
+ return;
1132
+ }
1133
+
1134
+ var nextIndex = currentIndex - 1;
1135
+
1136
+ // If none are highlighted, highlight the first
1137
+ if ($highlighted.length === 0) {
1138
+ nextIndex = 0;
1139
+ }
1140
+
1141
+ var $next = $options.eq(nextIndex);
1142
+
1143
+ $next.trigger('mouseenter');
1144
+
1145
+ var currentOffset = self.$results.offset().top;
1146
+ var nextTop = $next.offset().top;
1147
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
1148
+
1149
+ if (nextIndex === 0) {
1150
+ self.$results.scrollTop(0);
1151
+ } else if (nextTop - currentOffset < 0) {
1152
+ self.$results.scrollTop(nextOffset);
1153
+ }
1154
+ });
1155
+
1156
+ container.on('results:next', function () {
1157
+ var $highlighted = self.getHighlightedResults();
1158
+
1159
+ var $options = self.$results.find('[data-selected]');
1160
+
1161
+ var currentIndex = $options.index($highlighted);
1162
+
1163
+ var nextIndex = currentIndex + 1;
1164
+
1165
+ // If we are at the last option, stay there
1166
+ if (nextIndex >= $options.length) {
1167
+ return;
1168
+ }
1169
+
1170
+ var $next = $options.eq(nextIndex);
1171
+
1172
+ $next.trigger('mouseenter');
1173
+
1174
+ var currentOffset = self.$results.offset().top +
1175
+ self.$results.outerHeight(false);
1176
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
1177
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
1178
+
1179
+ if (nextIndex === 0) {
1180
+ self.$results.scrollTop(0);
1181
+ } else if (nextBottom > currentOffset) {
1182
+ self.$results.scrollTop(nextOffset);
1183
+ }
1184
+ });
1185
+
1186
+ container.on('results:focus', function (params) {
1187
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
1188
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
1189
+ });
1190
+
1191
+ container.on('results:message', function (params) {
1192
+ self.displayMessage(params);
1193
+ });
1194
+
1195
+ if ($.fn.mousewheel) {
1196
+ this.$results.on('mousewheel', function (e) {
1197
+ var top = self.$results.scrollTop();
1198
+
1199
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
1200
+
1201
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
1202
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
1203
+
1204
+ if (isAtTop) {
1205
+ self.$results.scrollTop(0);
1206
+
1207
+ e.preventDefault();
1208
+ e.stopPropagation();
1209
+ } else if (isAtBottom) {
1210
+ self.$results.scrollTop(
1211
+ self.$results.get(0).scrollHeight - self.$results.height()
1212
+ );
1213
+
1214
+ e.preventDefault();
1215
+ e.stopPropagation();
1216
+ }
1217
+ });
1218
+ }
1219
+
1220
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
1221
+ function (evt) {
1222
+ var $this = $(this);
1223
+
1224
+ var data = $this.data('data');
1225
+
1226
+ if ($this.attr('data-selected') === 'true') {
1227
+ if (self.options.get('multiple')) {
1228
+ self.trigger('unselect', {
1229
+ originalEvent: evt,
1230
+ data: data
1231
+ });
1232
+ } else {
1233
+ self.trigger('close', {});
1234
+ }
1235
+
1236
+ return;
1237
+ }
1238
+
1239
+ self.trigger('select', {
1240
+ originalEvent: evt,
1241
+ data: data
1242
+ });
1243
+ });
1244
+
1245
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
1246
+ function (evt) {
1247
+ var data = $(this).data('data');
1248
+
1249
+ self.getHighlightedResults()
1250
+ .removeClass('select2-results__option--highlighted')
1251
+ .attr('aria-selected', 'false');
1252
+
1253
+ self.trigger('results:focus', {
1254
+ data: data,
1255
+ element: $(this)
1256
+ });
1257
+ });
1258
+ };
1259
+
1260
+ Results.prototype.getHighlightedResults = function () {
1261
+ var $highlighted = this.$results
1262
+ .find('.select2-results__option--highlighted');
1263
+
1264
+ return $highlighted;
1265
+ };
1266
+
1267
+ Results.prototype.destroy = function () {
1268
+ this.$results.remove();
1269
+ };
1270
+
1271
+ Results.prototype.ensureHighlightVisible = function () {
1272
+ var $highlighted = this.getHighlightedResults();
1273
+
1274
+ if ($highlighted.length === 0) {
1275
+ return;
1276
+ }
1277
+
1278
+ var $options = this.$results.find('[data-selected]');
1279
+
1280
+ var currentIndex = $options.index($highlighted);
1281
+
1282
+ var currentOffset = this.$results.offset().top;
1283
+ var nextTop = $highlighted.offset().top;
1284
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
1285
+
1286
+ var offsetDelta = nextTop - currentOffset;
1287
+ nextOffset -= $highlighted.outerHeight(false) * 2;
1288
+
1289
+ if (currentIndex <= 2) {
1290
+ this.$results.scrollTop(0);
1291
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
1292
+ this.$results.scrollTop(nextOffset);
1293
+ }
1294
+ };
1295
+
1296
+ Results.prototype.template = function (result, container) {
1297
+ var template = this.options.get('templateResult');
1298
+ var escapeMarkup = this.options.get('escapeMarkup');
1299
+
1300
+ var content = template(result, container);
1301
+
1302
+ if (content == null) {
1303
+ container.style.display = 'none';
1304
+ } else if (typeof content === 'string') {
1305
+ container.innerHTML = escapeMarkup(content);
1306
+ } else {
1307
+ $(container).append(content);
1308
+ }
1309
+ };
1310
+
1311
+ return Results;
1312
+ });
1313
+
1314
+ S2.define('select2/keys',[
1315
+
1316
+ ], function () {
1317
+ var KEYS = {
1318
+ BACKSPACE: 8,
1319
+ TAB: 9,
1320
+ ENTER: 13,
1321
+ SHIFT: 16,
1322
+ CTRL: 17,
1323
+ ALT: 18,
1324
+ ESC: 27,
1325
+ SPACE: 32,
1326
+ PAGE_UP: 33,
1327
+ PAGE_DOWN: 34,
1328
+ END: 35,
1329
+ HOME: 36,
1330
+ LEFT: 37,
1331
+ UP: 38,
1332
+ RIGHT: 39,
1333
+ DOWN: 40,
1334
+ DELETE: 46
1335
+ };
1336
+
1337
+ return KEYS;
1338
+ });
1339
+
1340
+ S2.define('select2/selection/base',[
1341
+ 'jquery',
1342
+ '../utils',
1343
+ '../keys'
1344
+ ], function ($, Utils, KEYS) {
1345
+ function BaseSelection ($element, options) {
1346
+ this.$element = $element;
1347
+ this.options = options;
1348
+
1349
+ BaseSelection.__super__.constructor.call(this);
1350
+ }
1351
+
1352
+ Utils.Extend(BaseSelection, Utils.Observable);
1353
+
1354
+ BaseSelection.prototype.render = function () {
1355
+ var $selection = $(
1356
+ '<span class="select2-selection" ' +
1357
+ ' aria-haspopup="true" aria-expanded="false">' +
1358
+ '</span>'
1359
+ );
1360
+
1361
+ this._tabindex = 0;
1362
+
1363
+ if (this.$element.data('old-tabindex') != null) {
1364
+ this._tabindex = this.$element.data('old-tabindex');
1365
+ } else if (this.$element.attr('tabindex') != null) {
1366
+ this._tabindex = this.$element.attr('tabindex');
1367
+ }
1368
+
1369
+ $selection.attr('title', this.$element.attr('title'));
1370
+ $selection.attr('tabindex', this._tabindex);
1371
+
1372
+ this.$selection = $selection;
1373
+
1374
+ return $selection;
1375
+ };
1376
+
1377
+ BaseSelection.prototype.bind = function (container, $container) {
1378
+ var self = this;
1379
+
1380
+ var id = container.id + '-container';
1381
+ var resultsId = container.id + '-results';
1382
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
1383
+
1384
+ this.container = container;
1385
+
1386
+ this.$selection.on('focus', function (evt) {
1387
+ self.trigger('focus', evt);
1388
+ });
1389
+
1390
+ this.$selection.on('blur', function (evt) {
1391
+ self._handleBlur(evt);
1392
+ });
1393
+
1394
+ this.$selection.on('keydown', function (evt) {
1395
+ self.trigger('keypress', evt);
1396
+
1397
+ if (evt.which === KEYS.SPACE) {
1398
+ evt.preventDefault();
1399
+ }
1400
+ });
1401
+
1402
+ container.on('results:focus', function (params) {
1403
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
1404
+ });
1405
+
1406
+ container.on('selection:update', function (params) {
1407
+ self.update(params.data);
1408
+ });
1409
+
1410
+ container.on('open', function () {
1411
+ // When the dropdown is open, aria-expanded="true"
1412
+ self.$selection.attr('aria-expanded', 'true');
1413
+ self.$selection.attr('aria-owns', resultsId);
1414
+
1415
+ self._attachCloseHandler(container);
1416
+ });
1417
+
1418
+ container.on('close', function () {
1419
+ // When the dropdown is closed, aria-expanded="false"
1420
+ self.$selection.attr('aria-expanded', 'false');
1421
+ self.$selection.removeAttr('aria-activedescendant');
1422
+ self.$selection.removeAttr('aria-owns');
1423
+
1424
+ // This needs to be delayed as the active element is the body when the
1425
+ // key is pressed.
1426
+ window.setTimeout(function () {
1427
+ self.$selection.focus();
1428
+ }, 1);
1429
+
1430
+ self._detachCloseHandler(container);
1431
+ });
1432
+
1433
+ container.on('enable', function () {
1434
+ self.$selection.attr('tabindex', self._tabindex);
1435
+ });
1436
+
1437
+ container.on('disable', function () {
1438
+ self.$selection.attr('tabindex', '-1');
1439
+ });
1440
+ };
1441
+
1442
+ BaseSelection.prototype._handleBlur = function (evt) {
1443
+ var self = this;
1444
+
1445
+ // This needs to be delayed as the active element is the body when the tab
1446
+ // key is pressed, possibly along with others.
1447
+ window.setTimeout(function () {
1448
+ // Don't trigger `blur` if the focus is still in the selection
1449
+ if (
1450
+ (document.activeElement == self.$selection[0]) ||
1451
+ ($.contains(self.$selection[0], document.activeElement))
1452
+ ) {
1453
+ return;
1454
+ }
1455
+
1456
+ self.trigger('blur', evt);
1457
+ }, 1);
1458
+ };
1459
+
1460
+ BaseSelection.prototype._attachCloseHandler = function (container) {
1461
+ var self = this;
1462
+
1463
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
1464
+ var $target = $(e.target);
1465
+
1466
+ var $select = $target.closest('.select2');
1467
+
1468
+ var $all = $('.select2.select2-container--open');
1469
+
1470
+ $all.each(function () {
1471
+ var $this = $(this);
1472
+
1473
+ if (this == $select[0]) {
1474
+ return;
1475
+ }
1476
+
1477
+ var $element = $this.data('element');
1478
+
1479
+ $element.select2('close');
1480
+ });
1481
+ });
1482
+ };
1483
+
1484
+ BaseSelection.prototype._detachCloseHandler = function (container) {
1485
+ $(document.body).off('mousedown.select2.' + container.id);
1486
+ };
1487
+
1488
+ BaseSelection.prototype.position = function ($selection, $container) {
1489
+ var $selectionContainer = $container.find('.selection');
1490
+ $selectionContainer.append($selection);
1491
+ };
1492
+
1493
+ BaseSelection.prototype.destroy = function () {
1494
+ this._detachCloseHandler(this.container);
1495
+ };
1496
+
1497
+ BaseSelection.prototype.update = function (data) {
1498
+ throw new Error('The `update` method must be defined in child classes.');
1499
+ };
1500
+
1501
+ return BaseSelection;
1502
+ });
1503
+
1504
+ S2.define('select2/selection/single',[
1505
+ 'jquery',
1506
+ './base',
1507
+ '../utils',
1508
+ '../keys'
1509
+ ], function ($, BaseSelection, Utils, KEYS) {
1510
+ function SingleSelection () {
1511
+ SingleSelection.__super__.constructor.apply(this, arguments);
1512
+ }
1513
+
1514
+ Utils.Extend(SingleSelection, BaseSelection);
1515
+
1516
+ SingleSelection.prototype.render = function () {
1517
+ var $selection = SingleSelection.__super__.render.call(this);
1518
+
1519
+ $selection.addClass('select2-selection--single');
1520
+
1521
+ $selection.html(
1522
+ '<span class="select2-selection__rendered"></span>' +
1523
+ '<span class="select2-selection__arrow" role="presentation">' +
1524
+ '<b role="presentation"></b>' +
1525
+ '</span>'
1526
+ );
1527
+
1528
+ return $selection;
1529
+ };
1530
+
1531
+ SingleSelection.prototype.bind = function (container, $container) {
1532
+ var self = this;
1533
+
1534
+ SingleSelection.__super__.bind.apply(this, arguments);
1535
+
1536
+ var id = container.id + '-container';
1537
+
1538
+ this.$selection.find('.select2-selection__rendered')
1539
+ .attr('id', id)
1540
+ .attr('role', 'textbox')
1541
+ .attr('aria-readonly', 'true');
1542
+ this.$selection.attr('aria-labelledby', id);
1543
+
1544
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
1545
+ this.$selection.attr('role', 'combobox');
1546
+
1547
+ this.$selection.on('mousedown', function (evt) {
1548
+ // Only respond to left clicks
1549
+ if (evt.which !== 1) {
1550
+ return;
1551
+ }
1552
+
1553
+ self.trigger('toggle', {
1554
+ originalEvent: evt
1555
+ });
1556
+ });
1557
+
1558
+ this.$selection.on('focus', function (evt) {
1559
+ // User focuses on the container
1560
+ });
1561
+
1562
+ this.$selection.on('keydown', function (evt) {
1563
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
1564
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
1565
+ container.open();
1566
+ }
1567
+ });
1568
+
1569
+ this.$selection.on('blur', function (evt) {
1570
+ // User exits the container
1571
+ });
1572
+
1573
+ container.on('focus', function (evt) {
1574
+ if (!container.isOpen()) {
1575
+ self.$selection.focus();
1576
+ }
1577
+ });
1578
+
1579
+ container.on('selection:update', function (params) {
1580
+ self.update(params.data);
1581
+ });
1582
+ };
1583
+
1584
+ SingleSelection.prototype.clear = function () {
1585
+ this.$selection.find('.select2-selection__rendered').empty();
1586
+ };
1587
+
1588
+ SingleSelection.prototype.display = function (data, container) {
1589
+ var template = this.options.get('templateSelection');
1590
+ var escapeMarkup = this.options.get('escapeMarkup');
1591
+
1592
+ return escapeMarkup(template(data, container));
1593
+ };
1594
+
1595
+ SingleSelection.prototype.selectionContainer = function () {
1596
+ return $('<span></span>');
1597
+ };
1598
+
1599
+ SingleSelection.prototype.update = function (data) {
1600
+ if (data.length === 0) {
1601
+ this.clear();
1602
+ return;
1603
+ }
1604
+
1605
+ var selection = data[0];
1606
+
1607
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1608
+ var formatted = this.display(selection, $rendered);
1609
+
1610
+ $rendered.empty().append(formatted);
1611
+ $rendered.prop('title', selection.title || selection.text);
1612
+ };
1613
+
1614
+ return SingleSelection;
1615
+ });
1616
+
1617
+ S2.define('select2/selection/multiple',[
1618
+ 'jquery',
1619
+ './base',
1620
+ '../utils'
1621
+ ], function ($, BaseSelection, Utils) {
1622
+ function MultipleSelection ($element, options) {
1623
+ MultipleSelection.__super__.constructor.apply(this, arguments);
1624
+ }
1625
+
1626
+ Utils.Extend(MultipleSelection, BaseSelection);
1627
+
1628
+ MultipleSelection.prototype.render = function () {
1629
+ var $selection = MultipleSelection.__super__.render.call(this);
1630
+
1631
+ $selection.addClass('select2-selection--multiple');
1632
+
1633
+ $selection.html(
1634
+ '<ul class="select2-selection__rendered" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></ul>'
1635
+ );
1636
+
1637
+ return $selection;
1638
+ };
1639
+
1640
+ MultipleSelection.prototype.bind = function (container, $container) {
1641
+ var self = this;
1642
+
1643
+ MultipleSelection.__super__.bind.apply(this, arguments);
1644
+
1645
+ this.$selection.on('click', function (evt) {
1646
+ self.trigger('toggle', {
1647
+ originalEvent: evt
1648
+ });
1649
+ });
1650
+
1651
+ this.$selection.on(
1652
+ 'click',
1653
+ '.select2-selection__choice__remove',
1654
+ function (evt) {
1655
+ // Ignore the event if it is disabled
1656
+ if (self.options.get('disabled')) {
1657
+ return;
1658
+ }
1659
+
1660
+ var $remove = $(this);
1661
+ var $selection = $remove.parent();
1662
+
1663
+ var data = $selection.data('data');
1664
+
1665
+ self.trigger('unselect', {
1666
+ originalEvent: evt,
1667
+ data: data
1668
+ });
1669
+ }
1670
+ );
1671
+ };
1672
+
1673
+ MultipleSelection.prototype.clear = function () {
1674
+ this.$selection.find('.select2-selection__rendered').empty();
1675
+ };
1676
+
1677
+ MultipleSelection.prototype.display = function (data, container) {
1678
+ var template = this.options.get('templateSelection');
1679
+ var escapeMarkup = this.options.get('escapeMarkup');
1680
+
1681
+ return escapeMarkup(template(data, container));
1682
+ };
1683
+
1684
+ MultipleSelection.prototype.selectionContainer = function () {
1685
+ var $container = $(
1686
+ '<li class="select2-selection__choice">' +
1687
+ '<span class="select2-selection__choice__remove" role="presentation" aria-hidden="true">' +
1688
+ '&times;' +
1689
+ '</span>' +
1690
+ '</li>'
1691
+ );
1692
+
1693
+ return $container;
1694
+ };
1695
+
1696
+ MultipleSelection.prototype.update = function (data) {
1697
+ var self = this;
1698
+ this.clear();
1699
+
1700
+ if (data.length === 0) {
1701
+ return;
1702
+ }
1703
+
1704
+ var $selections = [];
1705
+
1706
+ for (var d = 0; d < data.length; d++) {
1707
+ var selection = data[d];
1708
+
1709
+ var $selection = this.selectionContainer();
1710
+ var formatted = this.display(selection, $selection).trim();
1711
+
1712
+ $selection.append(formatted);
1713
+ $selection.prop('title', selection.title || selection.text);
1714
+
1715
+ $selection.data('data', selection);
1716
+
1717
+ $selections.push($selection);
1718
+ }
1719
+
1720
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1721
+
1722
+ Utils.appendMany($rendered, $selections);
1723
+
1724
+ // Return cursor to search field after updating.
1725
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
1726
+ if ('undefined' !== typeof this.$search) {
1727
+ setTimeout(function(){
1728
+ self.$search.focus();
1729
+ }, 1);
1730
+ }
1731
+ };
1732
+
1733
+ return MultipleSelection;
1734
+ });
1735
+
1736
+ S2.define('select2/selection/placeholder',[
1737
+ '../utils'
1738
+ ], function (Utils) {
1739
+ function Placeholder (decorated, $element, options) {
1740
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
1741
+
1742
+ decorated.call(this, $element, options);
1743
+ }
1744
+
1745
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
1746
+ if (typeof placeholder === 'string') {
1747
+ placeholder = {
1748
+ id: '',
1749
+ text: placeholder
1750
+ };
1751
+ }
1752
+
1753
+ return placeholder;
1754
+ };
1755
+
1756
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
1757
+ var $placeholder = this.selectionContainer();
1758
+
1759
+ $placeholder.html(this.display(placeholder));
1760
+ $placeholder.addClass('select2-selection__placeholder')
1761
+ .removeClass('select2-selection__choice');
1762
+
1763
+ return $placeholder;
1764
+ };
1765
+
1766
+ Placeholder.prototype.update = function (decorated, data) {
1767
+ var singlePlaceholder = (
1768
+ data.length == 1 && data[0].id != this.placeholder.id
1769
+ );
1770
+ var multipleSelections = data.length > 1;
1771
+
1772
+ if (multipleSelections || singlePlaceholder) {
1773
+ return decorated.call(this, data);
1774
+ }
1775
+
1776
+ this.clear();
1777
+
1778
+ var $placeholder = this.createPlaceholder(this.placeholder);
1779
+
1780
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
1781
+ };
1782
+
1783
+ return Placeholder;
1784
+ });
1785
+
1786
+ S2.define('select2/selection/allowClear',[
1787
+ 'jquery',
1788
+ '../keys'
1789
+ ], function ($, KEYS) {
1790
+ function AllowClear () { }
1791
+
1792
+ AllowClear.prototype.bind = function (decorated, container, $container) {
1793
+ var self = this;
1794
+
1795
+ decorated.call(this, container, $container);
1796
+
1797
+ if (this.placeholder == null) {
1798
+ if (this.options.get('debug') && window.console && console.error) {
1799
+ console.error(
1800
+ 'Select2: The `allowClear` option should be used in combination ' +
1801
+ 'with the `placeholder` option.'
1802
+ );
1803
+ }
1804
+ }
1805
+
1806
+ this.$selection.on('mousedown', '.select2-selection__clear',
1807
+ function (evt) {
1808
+ self._handleClear(evt);
1809
+ });
1810
+
1811
+ container.on('keypress', function (evt) {
1812
+ self._handleKeyboardClear(evt, container);
1813
+ });
1814
+ };
1815
+
1816
+ AllowClear.prototype._handleClear = function (_, evt) {
1817
+ // Ignore the event if it is disabled
1818
+ if (this.options.get('disabled')) {
1819
+ return;
1820
+ }
1821
+
1822
+ var $clear = this.$selection.find('.select2-selection__clear');
1823
+
1824
+ // Ignore the event if nothing has been selected
1825
+ if ($clear.length === 0) {
1826
+ return;
1827
+ }
1828
+
1829
+ evt.stopPropagation();
1830
+
1831
+ var data = $clear.data('data');
1832
+
1833
+ for (var d = 0; d < data.length; d++) {
1834
+ var unselectData = {
1835
+ data: data[d]
1836
+ };
1837
+
1838
+ // Trigger the `unselect` event, so people can prevent it from being
1839
+ // cleared.
1840
+ this.trigger('unselect', unselectData);
1841
+
1842
+ // If the event was prevented, don't clear it out.
1843
+ if (unselectData.prevented) {
1844
+ return;
1845
+ }
1846
+ }
1847
+
1848
+ this.$element.val(this.placeholder.id).trigger('change');
1849
+
1850
+ this.trigger('toggle', {});
1851
+ };
1852
+
1853
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
1854
+ if (container.isOpen()) {
1855
+ return;
1856
+ }
1857
+
1858
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
1859
+ this._handleClear(evt);
1860
+ }
1861
+ };
1862
+
1863
+ AllowClear.prototype.update = function (decorated, data) {
1864
+ decorated.call(this, data);
1865
+
1866
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
1867
+ data.length === 0) {
1868
+ return;
1869
+ }
1870
+
1871
+ var $remove = $(
1872
+ '<span class="select2-selection__clear">' +
1873
+ '&times;' +
1874
+ '</span>'
1875
+ );
1876
+ $remove.data('data', data);
1877
+
1878
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
1879
+ };
1880
+
1881
+ return AllowClear;
1882
+ });
1883
+
1884
+ S2.define('select2/selection/search',[
1885
+ 'jquery',
1886
+ '../utils',
1887
+ '../keys'
1888
+ ], function ($, Utils, KEYS) {
1889
+ function Search (decorated, $element, options) {
1890
+ decorated.call(this, $element, options);
1891
+ }
1892
+
1893
+ Search.prototype.render = function (decorated) {
1894
+ var $search = $(
1895
+ '<li class="select2-search select2-search--inline">' +
1896
+ '<input class="select2-search__field" type="text" tabindex="-1"' +
1897
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1898
+ ' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
1899
+ '</li>'
1900
+ );
1901
+
1902
+ this.$searchContainer = $search;
1903
+ this.$search = $search.find('input');
1904
+
1905
+ var $rendered = decorated.call(this);
1906
+
1907
+ this._transferTabIndex();
1908
+
1909
+ return $rendered;
1910
+ };
1911
+
1912
+ Search.prototype.bind = function (decorated, container, $container) {
1913
+ var self = this;
1914
+ var resultsId = container.id + '-results';
1915
+
1916
+ decorated.call(this, container, $container);
1917
+
1918
+ container.on('open', function () {
1919
+ self.$search.attr('aria-owns', resultsId);
1920
+ self.$search.trigger('focus');
1921
+ });
1922
+
1923
+ container.on('close', function () {
1924
+ self.$search.val('');
1925
+ self.$search.removeAttr('aria-activedescendant');
1926
+ self.$search.removeAttr('aria-owns');
1927
+ self.$search.trigger('focus');
1928
+ });
1929
+
1930
+ container.on('enable', function () {
1931
+ self.$search.prop('disabled', false);
1932
+
1933
+ self._transferTabIndex();
1934
+ });
1935
+
1936
+ container.on('disable', function () {
1937
+ self.$search.prop('disabled', true);
1938
+ });
1939
+
1940
+ container.on('focus', function (evt) {
1941
+ self.$search.trigger('focus');
1942
+ });
1943
+
1944
+ container.on('results:focus', function (params) {
1945
+ self.$search.attr('aria-activedescendant', params.data._resultId);
1946
+ });
1947
+
1948
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1949
+ self.trigger('focus', evt);
1950
+ });
1951
+
1952
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1953
+ self._handleBlur(evt);
1954
+ });
1955
+
1956
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
1957
+ evt.stopPropagation();
1958
+
1959
+ self.trigger('keypress', evt);
1960
+
1961
+ self._keyUpPrevented = evt.isDefaultPrevented();
1962
+
1963
+ var key = evt.which;
1964
+
1965
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
1966
+ var $previousChoice = self.$searchContainer
1967
+ .prev('.select2-selection__choice');
1968
+
1969
+ if ($previousChoice.length > 0) {
1970
+ var item = $previousChoice.data('data');
1971
+
1972
+ self.searchRemoveChoice(item);
1973
+
1974
+ evt.preventDefault();
1975
+ }
1976
+ }
1977
+ });
1978
+
1979
+ // Try to detect the IE version should the `documentMode` property that
1980
+ // is stored on the document. This is only implemented in IE and is
1981
+ // slightly cleaner than doing a user agent check.
1982
+ // This property is not available in Edge, but Edge also doesn't have
1983
+ // this bug.
1984
+ var msie = document.documentMode;
1985
+ var disableInputEvents = msie && msie <= 11;
1986
+
1987
+ // Workaround for browsers which do not support the `input` event
1988
+ // This will prevent double-triggering of events for browsers which support
1989
+ // both the `keyup` and `input` events.
1990
+ this.$selection.on(
1991
+ 'input.searchcheck',
1992
+ '.select2-search--inline',
1993
+ function (evt) {
1994
+ // IE will trigger the `input` event when a placeholder is used on a
1995
+ // search box. To get around this issue, we are forced to ignore all
1996
+ // `input` events in IE and keep using `keyup`.
1997
+ if (disableInputEvents) {
1998
+ self.$selection.off('input.search input.searchcheck');
1999
+ return;
2000
+ }
2001
+
2002
+ // Unbind the duplicated `keyup` event
2003
+ self.$selection.off('keyup.search');
2004
+ }
2005
+ );
2006
+
2007
+ this.$selection.on(
2008
+ 'keyup.search input.search',
2009
+ '.select2-search--inline',
2010
+ function (evt) {
2011
+ // IE will trigger the `input` event when a placeholder is used on a
2012
+ // search box. To get around this issue, we are forced to ignore all
2013
+ // `input` events in IE and keep using `keyup`.
2014
+ if (disableInputEvents && evt.type === 'input') {
2015
+ self.$selection.off('input.search input.searchcheck');
2016
+ return;
2017
+ }
2018
+
2019
+ var key = evt.which;
2020
+
2021
+ // We can freely ignore events from modifier keys
2022
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
2023
+ return;
2024
+ }
2025
+
2026
+ // Tabbing will be handled during the `keydown` phase
2027
+ if (key == KEYS.TAB) {
2028
+ return;
2029
+ }
2030
+
2031
+ self.handleSearch(evt);
2032
+ }
2033
+ );
2034
+ };
2035
+
2036
+ /**
2037
+ * This method will transfer the tabindex attribute from the rendered
2038
+ * selection to the search box. This allows for the search box to be used as
2039
+ * the primary focus instead of the selection container.
2040
+ *
2041
+ * @private
2042
+ */
2043
+ Search.prototype._transferTabIndex = function (decorated) {
2044
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
2045
+ this.$selection.attr('tabindex', '-1');
2046
+ };
2047
+
2048
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
2049
+ this.$search.attr('placeholder', placeholder.text);
2050
+ };
2051
+
2052
+ Search.prototype.update = function (decorated, data) {
2053
+ var searchHadFocus = this.$search[0] == document.activeElement;
2054
+
2055
+ this.$search.attr('placeholder', '');
2056
+
2057
+ decorated.call(this, data);
2058
+
2059
+ this.$selection.find('.select2-selection__rendered')
2060
+ .append(this.$searchContainer);
2061
+
2062
+ this.resizeSearch();
2063
+ if (searchHadFocus) {
2064
+ this.$search.focus();
2065
+ }
2066
+ };
2067
+
2068
+ Search.prototype.handleSearch = function () {
2069
+ this.resizeSearch();
2070
+
2071
+ if (!this._keyUpPrevented) {
2072
+ var input = this.$search.val();
2073
+
2074
+ this.trigger('query', {
2075
+ term: input
2076
+ });
2077
+ }
2078
+
2079
+ this._keyUpPrevented = false;
2080
+ };
2081
+
2082
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
2083
+ this.trigger('unselect', {
2084
+ data: item
2085
+ });
2086
+
2087
+ this.$search.val(item.text);
2088
+ this.handleSearch();
2089
+ };
2090
+
2091
+ Search.prototype.resizeSearch = function () {
2092
+ this.$search.css('width', '25px');
2093
+
2094
+ var width = '';
2095
+
2096
+ if (this.$search.attr('placeholder') !== '') {
2097
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
2098
+ } else {
2099
+ var minimumWidth = this.$search.val().length + 1;
2100
+
2101
+ width = (minimumWidth * 0.75) + 'em';
2102
+ }
2103
+
2104
+ this.$search.css('width', width);
2105
+ };
2106
+
2107
+ return Search;
2108
+ });
2109
+
2110
+ S2.define('select2/selection/eventRelay',[
2111
+ 'jquery'
2112
+ ], function ($) {
2113
+ function EventRelay () { }
2114
+
2115
+ EventRelay.prototype.bind = function (decorated, container, $container) {
2116
+ var self = this;
2117
+ var relayEvents = [
2118
+ 'open', 'opening',
2119
+ 'close', 'closing',
2120
+ 'select', 'selecting',
2121
+ 'unselect', 'unselecting'
2122
+ ];
2123
+
2124
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
2125
+
2126
+ decorated.call(this, container, $container);
2127
+
2128
+ container.on('*', function (name, params) {
2129
+ // Ignore events that should not be relayed
2130
+ if ($.inArray(name, relayEvents) === -1) {
2131
+ return;
2132
+ }
2133
+
2134
+ // The parameters should always be an object
2135
+ params = params || {};
2136
+
2137
+ // Generate the jQuery event for the Select2 event
2138
+ var evt = $.Event('select2:' + name, {
2139
+ params: params
2140
+ });
2141
+
2142
+ self.$element.trigger(evt);
2143
+
2144
+ // Only handle preventable events if it was one
2145
+ if ($.inArray(name, preventableEvents) === -1) {
2146
+ return;
2147
+ }
2148
+
2149
+ params.prevented = evt.isDefaultPrevented();
2150
+ });
2151
+ };
2152
+
2153
+ return EventRelay;
2154
+ });
2155
+
2156
+ S2.define('select2/translation',[
2157
+ 'jquery',
2158
+ 'require'
2159
+ ], function ($, require) {
2160
+ function Translation (dict) {
2161
+ this.dict = dict || {};
2162
+ }
2163
+
2164
+ Translation.prototype.all = function () {
2165
+ return this.dict;
2166
+ };
2167
+
2168
+ Translation.prototype.get = function (key) {
2169
+ return this.dict[key];
2170
+ };
2171
+
2172
+ Translation.prototype.extend = function (translation) {
2173
+ this.dict = $.extend({}, translation.all(), this.dict);
2174
+ };
2175
+
2176
+ // Static functions
2177
+
2178
+ Translation._cache = {};
2179
+
2180
+ Translation.loadPath = function (path) {
2181
+ if (!(path in Translation._cache)) {
2182
+ var translations = require(path);
2183
+
2184
+ Translation._cache[path] = translations;
2185
+ }
2186
+
2187
+ return new Translation(Translation._cache[path]);
2188
+ };
2189
+
2190
+ return Translation;
2191
+ });
2192
+
2193
+ S2.define('select2/diacritics',[
2194
+
2195
+ ], function () {
2196
+ var diacritics = {
2197
+ '\u24B6': 'A',
2198
+ '\uFF21': 'A',
2199
+ '\u00C0': 'A',
2200
+ '\u00C1': 'A',
2201
+ '\u00C2': 'A',
2202
+ '\u1EA6': 'A',
2203
+ '\u1EA4': 'A',
2204
+ '\u1EAA': 'A',
2205
+ '\u1EA8': 'A',
2206
+ '\u00C3': 'A',
2207
+ '\u0100': 'A',
2208
+ '\u0102': 'A',
2209
+ '\u1EB0': 'A',
2210
+ '\u1EAE': 'A',
2211
+ '\u1EB4': 'A',
2212
+ '\u1EB2': 'A',
2213
+ '\u0226': 'A',
2214
+ '\u01E0': 'A',
2215
+ '\u00C4': 'A',
2216
+ '\u01DE': 'A',
2217
+ '\u1EA2': 'A',
2218
+ '\u00C5': 'A',
2219
+ '\u01FA': 'A',
2220
+ '\u01CD': 'A',
2221
+ '\u0200': 'A',
2222
+ '\u0202': 'A',
2223
+ '\u1EA0': 'A',
2224
+ '\u1EAC': 'A',
2225
+ '\u1EB6': 'A',
2226
+ '\u1E00': 'A',
2227
+ '\u0104': 'A',
2228
+ '\u023A': 'A',
2229
+ '\u2C6F': 'A',
2230
+ '\uA732': 'AA',
2231
+ '\u00C6': 'AE',
2232
+ '\u01FC': 'AE',
2233
+ '\u01E2': 'AE',
2234
+ '\uA734': 'AO',
2235
+ '\uA736': 'AU',
2236
+ '\uA738': 'AV',
2237
+ '\uA73A': 'AV',
2238
+ '\uA73C': 'AY',
2239
+ '\u24B7': 'B',
2240
+ '\uFF22': 'B',
2241
+ '\u1E02': 'B',
2242
+ '\u1E04': 'B',
2243
+ '\u1E06': 'B',
2244
+ '\u0243': 'B',
2245
+ '\u0182': 'B',
2246
+ '\u0181': 'B',
2247
+ '\u24B8': 'C',
2248
+ '\uFF23': 'C',
2249
+ '\u0106': 'C',
2250
+ '\u0108': 'C',
2251
+ '\u010A': 'C',
2252
+ '\u010C': 'C',
2253
+ '\u00C7': 'C',
2254
+ '\u1E08': 'C',
2255
+ '\u0187': 'C',
2256
+ '\u023B': 'C',
2257
+ '\uA73E': 'C',
2258
+ '\u24B9': 'D',
2259
+ '\uFF24': 'D',
2260
+ '\u1E0A': 'D',
2261
+ '\u010E': 'D',
2262
+ '\u1E0C': 'D',
2263
+ '\u1E10': 'D',
2264
+ '\u1E12': 'D',
2265
+ '\u1E0E': 'D',
2266
+ '\u0110': 'D',
2267
+ '\u018B': 'D',
2268
+ '\u018A': 'D',
2269
+ '\u0189': 'D',
2270
+ '\uA779': 'D',
2271
+ '\u01F1': 'DZ',
2272
+ '\u01C4': 'DZ',
2273
+ '\u01F2': 'Dz',
2274
+ '\u01C5': 'Dz',
2275
+ '\u24BA': 'E',
2276
+ '\uFF25': 'E',
2277
+ '\u00C8': 'E',
2278
+ '\u00C9': 'E',
2279
+ '\u00CA': 'E',
2280
+ '\u1EC0': 'E',
2281
+ '\u1EBE': 'E',
2282
+ '\u1EC4': 'E',
2283
+ '\u1EC2': 'E',
2284
+ '\u1EBC': 'E',
2285
+ '\u0112': 'E',
2286
+ '\u1E14': 'E',
2287
+ '\u1E16': 'E',
2288
+ '\u0114': 'E',
2289
+ '\u0116': 'E',
2290
+ '\u00CB': 'E',
2291
+ '\u1EBA': 'E',
2292
+ '\u011A': 'E',
2293
+ '\u0204': 'E',
2294
+ '\u0206': 'E',
2295
+ '\u1EB8': 'E',
2296
+ '\u1EC6': 'E',
2297
+ '\u0228': 'E',
2298
+ '\u1E1C': 'E',
2299
+ '\u0118': 'E',
2300
+ '\u1E18': 'E',
2301
+ '\u1E1A': 'E',
2302
+ '\u0190': 'E',
2303
+ '\u018E': 'E',
2304
+ '\u24BB': 'F',
2305
+ '\uFF26': 'F',
2306
+ '\u1E1E': 'F',
2307
+ '\u0191': 'F',
2308
+ '\uA77B': 'F',
2309
+ '\u24BC': 'G',
2310
+ '\uFF27': 'G',
2311
+ '\u01F4': 'G',
2312
+ '\u011C': 'G',
2313
+ '\u1E20': 'G',
2314
+ '\u011E': 'G',
2315
+ '\u0120': 'G',
2316
+ '\u01E6': 'G',
2317
+ '\u0122': 'G',
2318
+ '\u01E4': 'G',
2319
+ '\u0193': 'G',
2320
+ '\uA7A0': 'G',
2321
+ '\uA77D': 'G',
2322
+ '\uA77E': 'G',
2323
+ '\u24BD': 'H',
2324
+ '\uFF28': 'H',
2325
+ '\u0124': 'H',
2326
+ '\u1E22': 'H',
2327
+ '\u1E26': 'H',
2328
+ '\u021E': 'H',
2329
+ '\u1E24': 'H',
2330
+ '\u1E28': 'H',
2331
+ '\u1E2A': 'H',
2332
+ '\u0126': 'H',
2333
+ '\u2C67': 'H',
2334
+ '\u2C75': 'H',
2335
+ '\uA78D': 'H',
2336
+ '\u24BE': 'I',
2337
+ '\uFF29': 'I',
2338
+ '\u00CC': 'I',
2339
+ '\u00CD': 'I',
2340
+ '\u00CE': 'I',
2341
+ '\u0128': 'I',
2342
+ '\u012A': 'I',
2343
+ '\u012C': 'I',
2344
+ '\u0130': 'I',
2345
+ '\u00CF': 'I',
2346
+ '\u1E2E': 'I',
2347
+ '\u1EC8': 'I',
2348
+ '\u01CF': 'I',
2349
+ '\u0208': 'I',
2350
+ '\u020A': 'I',
2351
+ '\u1ECA': 'I',
2352
+ '\u012E': 'I',
2353
+ '\u1E2C': 'I',
2354
+ '\u0197': 'I',
2355
+ '\u24BF': 'J',
2356
+ '\uFF2A': 'J',
2357
+ '\u0134': 'J',
2358
+ '\u0248': 'J',
2359
+ '\u24C0': 'K',
2360
+ '\uFF2B': 'K',
2361
+ '\u1E30': 'K',
2362
+ '\u01E8': 'K',
2363
+ '\u1E32': 'K',
2364
+ '\u0136': 'K',
2365
+ '\u1E34': 'K',
2366
+ '\u0198': 'K',
2367
+ '\u2C69': 'K',
2368
+ '\uA740': 'K',
2369
+ '\uA742': 'K',
2370
+ '\uA744': 'K',
2371
+ '\uA7A2': 'K',
2372
+ '\u24C1': 'L',
2373
+ '\uFF2C': 'L',
2374
+ '\u013F': 'L',
2375
+ '\u0139': 'L',
2376
+ '\u013D': 'L',
2377
+ '\u1E36': 'L',
2378
+ '\u1E38': 'L',
2379
+ '\u013B': 'L',
2380
+ '\u1E3C': 'L',
2381
+ '\u1E3A': 'L',
2382
+ '\u0141': 'L',
2383
+ '\u023D': 'L',
2384
+ '\u2C62': 'L',
2385
+ '\u2C60': 'L',
2386
+ '\uA748': 'L',
2387
+ '\uA746': 'L',
2388
+ '\uA780': 'L',
2389
+ '\u01C7': 'LJ',
2390
+ '\u01C8': 'Lj',
2391
+ '\u24C2': 'M',
2392
+ '\uFF2D': 'M',
2393
+ '\u1E3E': 'M',
2394
+ '\u1E40': 'M',
2395
+ '\u1E42': 'M',
2396
+ '\u2C6E': 'M',
2397
+ '\u019C': 'M',
2398
+ '\u24C3': 'N',
2399
+ '\uFF2E': 'N',
2400
+ '\u01F8': 'N',
2401
+ '\u0143': 'N',
2402
+ '\u00D1': 'N',
2403
+ '\u1E44': 'N',
2404
+ '\u0147': 'N',
2405
+ '\u1E46': 'N',
2406
+ '\u0145': 'N',
2407
+ '\u1E4A': 'N',
2408
+ '\u1E48': 'N',
2409
+ '\u0220': 'N',
2410
+ '\u019D': 'N',
2411
+ '\uA790': 'N',
2412
+ '\uA7A4': 'N',
2413
+ '\u01CA': 'NJ',
2414
+ '\u01CB': 'Nj',
2415
+ '\u24C4': 'O',
2416
+ '\uFF2F': 'O',
2417
+ '\u00D2': 'O',
2418
+ '\u00D3': 'O',
2419
+ '\u00D4': 'O',
2420
+ '\u1ED2': 'O',
2421
+ '\u1ED0': 'O',
2422
+ '\u1ED6': 'O',
2423
+ '\u1ED4': 'O',
2424
+ '\u00D5': 'O',
2425
+ '\u1E4C': 'O',
2426
+ '\u022C': 'O',
2427
+ '\u1E4E': 'O',
2428
+ '\u014C': 'O',
2429
+ '\u1E50': 'O',
2430
+ '\u1E52': 'O',
2431
+ '\u014E': 'O',
2432
+ '\u022E': 'O',
2433
+ '\u0230': 'O',
2434
+ '\u00D6': 'O',
2435
+ '\u022A': 'O',
2436
+ '\u1ECE': 'O',
2437
+ '\u0150': 'O',
2438
+ '\u01D1': 'O',
2439
+ '\u020C': 'O',
2440
+ '\u020E': 'O',
2441
+ '\u01A0': 'O',
2442
+ '\u1EDC': 'O',
2443
+ '\u1EDA': 'O',
2444
+ '\u1EE0': 'O',
2445
+ '\u1EDE': 'O',
2446
+ '\u1EE2': 'O',
2447
+ '\u1ECC': 'O',
2448
+ '\u1ED8': 'O',
2449
+ '\u01EA': 'O',
2450
+ '\u01EC': 'O',
2451
+ '\u00D8': 'O',
2452
+ '\u01FE': 'O',
2453
+ '\u0186': 'O',
2454
+ '\u019F': 'O',
2455
+ '\uA74A': 'O',
2456
+ '\uA74C': 'O',
2457
+ '\u01A2': 'OI',
2458
+ '\uA74E': 'OO',
2459
+ '\u0222': 'OU',
2460
+ '\u24C5': 'P',
2461
+ '\uFF30': 'P',
2462
+ '\u1E54': 'P',
2463
+ '\u1E56': 'P',
2464
+ '\u01A4': 'P',
2465
+ '\u2C63': 'P',
2466
+ '\uA750': 'P',
2467
+ '\uA752': 'P',
2468
+ '\uA754': 'P',
2469
+ '\u24C6': 'Q',
2470
+ '\uFF31': 'Q',
2471
+ '\uA756': 'Q',
2472
+ '\uA758': 'Q',
2473
+ '\u024A': 'Q',
2474
+ '\u24C7': 'R',
2475
+ '\uFF32': 'R',
2476
+ '\u0154': 'R',
2477
+ '\u1E58': 'R',
2478
+ '\u0158': 'R',
2479
+ '\u0210': 'R',
2480
+ '\u0212': 'R',
2481
+ '\u1E5A': 'R',
2482
+ '\u1E5C': 'R',
2483
+ '\u0156': 'R',
2484
+ '\u1E5E': 'R',
2485
+ '\u024C': 'R',
2486
+ '\u2C64': 'R',
2487
+ '\uA75A': 'R',
2488
+ '\uA7A6': 'R',
2489
+ '\uA782': 'R',
2490
+ '\u24C8': 'S',
2491
+ '\uFF33': 'S',
2492
+ '\u1E9E': 'S',
2493
+ '\u015A': 'S',
2494
+ '\u1E64': 'S',
2495
+ '\u015C': 'S',
2496
+ '\u1E60': 'S',
2497
+ '\u0160': 'S',
2498
+ '\u1E66': 'S',
2499
+ '\u1E62': 'S',
2500
+ '\u1E68': 'S',
2501
+ '\u0218': 'S',
2502
+ '\u015E': 'S',
2503
+ '\u2C7E': 'S',
2504
+ '\uA7A8': 'S',
2505
+ '\uA784': 'S',
2506
+ '\u24C9': 'T',
2507
+ '\uFF34': 'T',
2508
+ '\u1E6A': 'T',
2509
+ '\u0164': 'T',
2510
+ '\u1E6C': 'T',
2511
+ '\u021A': 'T',
2512
+ '\u0162': 'T',
2513
+ '\u1E70': 'T',
2514
+ '\u1E6E': 'T',
2515
+ '\u0166': 'T',
2516
+ '\u01AC': 'T',
2517
+ '\u01AE': 'T',
2518
+ '\u023E': 'T',
2519
+ '\uA786': 'T',
2520
+ '\uA728': 'TZ',
2521
+ '\u24CA': 'U',
2522
+ '\uFF35': 'U',
2523
+ '\u00D9': 'U',
2524
+ '\u00DA': 'U',
2525
+ '\u00DB': 'U',
2526
+ '\u0168': 'U',
2527
+ '\u1E78': 'U',
2528
+ '\u016A': 'U',
2529
+ '\u1E7A': 'U',
2530
+ '\u016C': 'U',
2531
+ '\u00DC': 'U',
2532
+ '\u01DB': 'U',
2533
+ '\u01D7': 'U',
2534
+ '\u01D5': 'U',
2535
+ '\u01D9': 'U',
2536
+ '\u1EE6': 'U',
2537
+ '\u016E': 'U',
2538
+ '\u0170': 'U',
2539
+ '\u01D3': 'U',
2540
+ '\u0214': 'U',
2541
+ '\u0216': 'U',
2542
+ '\u01AF': 'U',
2543
+ '\u1EEA': 'U',
2544
+ '\u1EE8': 'U',
2545
+ '\u1EEE': 'U',
2546
+ '\u1EEC': 'U',
2547
+ '\u1EF0': 'U',
2548
+ '\u1EE4': 'U',
2549
+ '\u1E72': 'U',
2550
+ '\u0172': 'U',
2551
+ '\u1E76': 'U',
2552
+ '\u1E74': 'U',
2553
+ '\u0244': 'U',
2554
+ '\u24CB': 'V',
2555
+ '\uFF36': 'V',
2556
+ '\u1E7C': 'V',
2557
+ '\u1E7E': 'V',
2558
+ '\u01B2': 'V',
2559
+ '\uA75E': 'V',
2560
+ '\u0245': 'V',
2561
+ '\uA760': 'VY',
2562
+ '\u24CC': 'W',
2563
+ '\uFF37': 'W',
2564
+ '\u1E80': 'W',
2565
+ '\u1E82': 'W',
2566
+ '\u0174': 'W',
2567
+ '\u1E86': 'W',
2568
+ '\u1E84': 'W',
2569
+ '\u1E88': 'W',
2570
+ '\u2C72': 'W',
2571
+ '\u24CD': 'X',
2572
+ '\uFF38': 'X',
2573
+ '\u1E8A': 'X',
2574
+ '\u1E8C': 'X',
2575
+ '\u24CE': 'Y',
2576
+ '\uFF39': 'Y',
2577
+ '\u1EF2': 'Y',
2578
+ '\u00DD': 'Y',
2579
+ '\u0176': 'Y',
2580
+ '\u1EF8': 'Y',
2581
+ '\u0232': 'Y',
2582
+ '\u1E8E': 'Y',
2583
+ '\u0178': 'Y',
2584
+ '\u1EF6': 'Y',
2585
+ '\u1EF4': 'Y',
2586
+ '\u01B3': 'Y',
2587
+ '\u024E': 'Y',
2588
+ '\u1EFE': 'Y',
2589
+ '\u24CF': 'Z',
2590
+ '\uFF3A': 'Z',
2591
+ '\u0179': 'Z',
2592
+ '\u1E90': 'Z',
2593
+ '\u017B': 'Z',
2594
+ '\u017D': 'Z',
2595
+ '\u1E92': 'Z',
2596
+ '\u1E94': 'Z',
2597
+ '\u01B5': 'Z',
2598
+ '\u0224': 'Z',
2599
+ '\u2C7F': 'Z',
2600
+ '\u2C6B': 'Z',
2601
+ '\uA762': 'Z',
2602
+ '\u24D0': 'a',
2603
+ '\uFF41': 'a',
2604
+ '\u1E9A': 'a',
2605
+ '\u00E0': 'a',
2606
+ '\u00E1': 'a',
2607
+ '\u00E2': 'a',
2608
+ '\u1EA7': 'a',
2609
+ '\u1EA5': 'a',
2610
+ '\u1EAB': 'a',
2611
+ '\u1EA9': 'a',
2612
+ '\u00E3': 'a',
2613
+ '\u0101': 'a',
2614
+ '\u0103': 'a',
2615
+ '\u1EB1': 'a',
2616
+ '\u1EAF': 'a',
2617
+ '\u1EB5': 'a',
2618
+ '\u1EB3': 'a',
2619
+ '\u0227': 'a',
2620
+ '\u01E1': 'a',
2621
+ '\u00E4': 'a',
2622
+ '\u01DF': 'a',
2623
+ '\u1EA3': 'a',
2624
+ '\u00E5': 'a',
2625
+ '\u01FB': 'a',
2626
+ '\u01CE': 'a',
2627
+ '\u0201': 'a',
2628
+ '\u0203': 'a',
2629
+ '\u1EA1': 'a',
2630
+ '\u1EAD': 'a',
2631
+ '\u1EB7': 'a',
2632
+ '\u1E01': 'a',
2633
+ '\u0105': 'a',
2634
+ '\u2C65': 'a',
2635
+ '\u0250': 'a',
2636
+ '\uA733': 'aa',
2637
+ '\u00E6': 'ae',
2638
+ '\u01FD': 'ae',
2639
+ '\u01E3': 'ae',
2640
+ '\uA735': 'ao',
2641
+ '\uA737': 'au',
2642
+ '\uA739': 'av',
2643
+ '\uA73B': 'av',
2644
+ '\uA73D': 'ay',
2645
+ '\u24D1': 'b',
2646
+ '\uFF42': 'b',
2647
+ '\u1E03': 'b',
2648
+ '\u1E05': 'b',
2649
+ '\u1E07': 'b',
2650
+ '\u0180': 'b',
2651
+ '\u0183': 'b',
2652
+ '\u0253': 'b',
2653
+ '\u24D2': 'c',
2654
+ '\uFF43': 'c',
2655
+ '\u0107': 'c',
2656
+ '\u0109': 'c',
2657
+ '\u010B': 'c',
2658
+ '\u010D': 'c',
2659
+ '\u00E7': 'c',
2660
+ '\u1E09': 'c',
2661
+ '\u0188': 'c',
2662
+ '\u023C': 'c',
2663
+ '\uA73F': 'c',
2664
+ '\u2184': 'c',
2665
+ '\u24D3': 'd',
2666
+ '\uFF44': 'd',
2667
+ '\u1E0B': 'd',
2668
+ '\u010F': 'd',
2669
+ '\u1E0D': 'd',
2670
+ '\u1E11': 'd',
2671
+ '\u1E13': 'd',
2672
+ '\u1E0F': 'd',
2673
+ '\u0111': 'd',
2674
+ '\u018C': 'd',
2675
+ '\u0256': 'd',
2676
+ '\u0257': 'd',
2677
+ '\uA77A': 'd',
2678
+ '\u01F3': 'dz',
2679
+ '\u01C6': 'dz',
2680
+ '\u24D4': 'e',
2681
+ '\uFF45': 'e',
2682
+ '\u00E8': 'e',
2683
+ '\u00E9': 'e',
2684
+ '\u00EA': 'e',
2685
+ '\u1EC1': 'e',
2686
+ '\u1EBF': 'e',
2687
+ '\u1EC5': 'e',
2688
+ '\u1EC3': 'e',
2689
+ '\u1EBD': 'e',
2690
+ '\u0113': 'e',
2691
+ '\u1E15': 'e',
2692
+ '\u1E17': 'e',
2693
+ '\u0115': 'e',
2694
+ '\u0117': 'e',
2695
+ '\u00EB': 'e',
2696
+ '\u1EBB': 'e',
2697
+ '\u011B': 'e',
2698
+ '\u0205': 'e',
2699
+ '\u0207': 'e',
2700
+ '\u1EB9': 'e',
2701
+ '\u1EC7': 'e',
2702
+ '\u0229': 'e',
2703
+ '\u1E1D': 'e',
2704
+ '\u0119': 'e',
2705
+ '\u1E19': 'e',
2706
+ '\u1E1B': 'e',
2707
+ '\u0247': 'e',
2708
+ '\u025B': 'e',
2709
+ '\u01DD': 'e',
2710
+ '\u24D5': 'f',
2711
+ '\uFF46': 'f',
2712
+ '\u1E1F': 'f',
2713
+ '\u0192': 'f',
2714
+ '\uA77C': 'f',
2715
+ '\u24D6': 'g',
2716
+ '\uFF47': 'g',
2717
+ '\u01F5': 'g',
2718
+ '\u011D': 'g',
2719
+ '\u1E21': 'g',
2720
+ '\u011F': 'g',
2721
+ '\u0121': 'g',
2722
+ '\u01E7': 'g',
2723
+ '\u0123': 'g',
2724
+ '\u01E5': 'g',
2725
+ '\u0260': 'g',
2726
+ '\uA7A1': 'g',
2727
+ '\u1D79': 'g',
2728
+ '\uA77F': 'g',
2729
+ '\u24D7': 'h',
2730
+ '\uFF48': 'h',
2731
+ '\u0125': 'h',
2732
+ '\u1E23': 'h',
2733
+ '\u1E27': 'h',
2734
+ '\u021F': 'h',
2735
+ '\u1E25': 'h',
2736
+ '\u1E29': 'h',
2737
+ '\u1E2B': 'h',
2738
+ '\u1E96': 'h',
2739
+ '\u0127': 'h',
2740
+ '\u2C68': 'h',
2741
+ '\u2C76': 'h',
2742
+ '\u0265': 'h',
2743
+ '\u0195': 'hv',
2744
+ '\u24D8': 'i',
2745
+ '\uFF49': 'i',
2746
+ '\u00EC': 'i',
2747
+ '\u00ED': 'i',
2748
+ '\u00EE': 'i',
2749
+ '\u0129': 'i',
2750
+ '\u012B': 'i',
2751
+ '\u012D': 'i',
2752
+ '\u00EF': 'i',
2753
+ '\u1E2F': 'i',
2754
+ '\u1EC9': 'i',
2755
+ '\u01D0': 'i',
2756
+ '\u0209': 'i',
2757
+ '\u020B': 'i',
2758
+ '\u1ECB': 'i',
2759
+ '\u012F': 'i',
2760
+ '\u1E2D': 'i',
2761
+ '\u0268': 'i',
2762
+ '\u0131': 'i',
2763
+ '\u24D9': 'j',
2764
+ '\uFF4A': 'j',
2765
+ '\u0135': 'j',
2766
+ '\u01F0': 'j',
2767
+ '\u0249': 'j',
2768
+ '\u24DA': 'k',
2769
+ '\uFF4B': 'k',
2770
+ '\u1E31': 'k',
2771
+ '\u01E9': 'k',
2772
+ '\u1E33': 'k',
2773
+ '\u0137': 'k',
2774
+ '\u1E35': 'k',
2775
+ '\u0199': 'k',
2776
+ '\u2C6A': 'k',
2777
+ '\uA741': 'k',
2778
+ '\uA743': 'k',
2779
+ '\uA745': 'k',
2780
+ '\uA7A3': 'k',
2781
+ '\u24DB': 'l',
2782
+ '\uFF4C': 'l',
2783
+ '\u0140': 'l',
2784
+ '\u013A': 'l',
2785
+ '\u013E': 'l',
2786
+ '\u1E37': 'l',
2787
+ '\u1E39': 'l',
2788
+ '\u013C': 'l',
2789
+ '\u1E3D': 'l',
2790
+ '\u1E3B': 'l',
2791
+ '\u017F': 'l',
2792
+ '\u0142': 'l',
2793
+ '\u019A': 'l',
2794
+ '\u026B': 'l',
2795
+ '\u2C61': 'l',
2796
+ '\uA749': 'l',
2797
+ '\uA781': 'l',
2798
+ '\uA747': 'l',
2799
+ '\u01C9': 'lj',
2800
+ '\u24DC': 'm',
2801
+ '\uFF4D': 'm',
2802
+ '\u1E3F': 'm',
2803
+ '\u1E41': 'm',
2804
+ '\u1E43': 'm',
2805
+ '\u0271': 'm',
2806
+ '\u026F': 'm',
2807
+ '\u24DD': 'n',
2808
+ '\uFF4E': 'n',
2809
+ '\u01F9': 'n',
2810
+ '\u0144': 'n',
2811
+ '\u00F1': 'n',
2812
+ '\u1E45': 'n',
2813
+ '\u0148': 'n',
2814
+ '\u1E47': 'n',
2815
+ '\u0146': 'n',
2816
+ '\u1E4B': 'n',
2817
+ '\u1E49': 'n',
2818
+ '\u019E': 'n',
2819
+ '\u0272': 'n',
2820
+ '\u0149': 'n',
2821
+ '\uA791': 'n',
2822
+ '\uA7A5': 'n',
2823
+ '\u01CC': 'nj',
2824
+ '\u24DE': 'o',
2825
+ '\uFF4F': 'o',
2826
+ '\u00F2': 'o',
2827
+ '\u00F3': 'o',
2828
+ '\u00F4': 'o',
2829
+ '\u1ED3': 'o',
2830
+ '\u1ED1': 'o',
2831
+ '\u1ED7': 'o',
2832
+ '\u1ED5': 'o',
2833
+ '\u00F5': 'o',
2834
+ '\u1E4D': 'o',
2835
+ '\u022D': 'o',
2836
+ '\u1E4F': 'o',
2837
+ '\u014D': 'o',
2838
+ '\u1E51': 'o',
2839
+ '\u1E53': 'o',
2840
+ '\u014F': 'o',
2841
+ '\u022F': 'o',
2842
+ '\u0231': 'o',
2843
+ '\u00F6': 'o',
2844
+ '\u022B': 'o',
2845
+ '\u1ECF': 'o',
2846
+ '\u0151': 'o',
2847
+ '\u01D2': 'o',
2848
+ '\u020D': 'o',
2849
+ '\u020F': 'o',
2850
+ '\u01A1': 'o',
2851
+ '\u1EDD': 'o',
2852
+ '\u1EDB': 'o',
2853
+ '\u1EE1': 'o',
2854
+ '\u1EDF': 'o',
2855
+ '\u1EE3': 'o',
2856
+ '\u1ECD': 'o',
2857
+ '\u1ED9': 'o',
2858
+ '\u01EB': 'o',
2859
+ '\u01ED': 'o',
2860
+ '\u00F8': 'o',
2861
+ '\u01FF': 'o',
2862
+ '\u0254': 'o',
2863
+ '\uA74B': 'o',
2864
+ '\uA74D': 'o',
2865
+ '\u0275': 'o',
2866
+ '\u01A3': 'oi',
2867
+ '\u0223': 'ou',
2868
+ '\uA74F': 'oo',
2869
+ '\u24DF': 'p',
2870
+ '\uFF50': 'p',
2871
+ '\u1E55': 'p',
2872
+ '\u1E57': 'p',
2873
+ '\u01A5': 'p',
2874
+ '\u1D7D': 'p',
2875
+ '\uA751': 'p',
2876
+ '\uA753': 'p',
2877
+ '\uA755': 'p',
2878
+ '\u24E0': 'q',
2879
+ '\uFF51': 'q',
2880
+ '\u024B': 'q',
2881
+ '\uA757': 'q',
2882
+ '\uA759': 'q',
2883
+ '\u24E1': 'r',
2884
+ '\uFF52': 'r',
2885
+ '\u0155': 'r',
2886
+ '\u1E59': 'r',
2887
+ '\u0159': 'r',
2888
+ '\u0211': 'r',
2889
+ '\u0213': 'r',
2890
+ '\u1E5B': 'r',
2891
+ '\u1E5D': 'r',
2892
+ '\u0157': 'r',
2893
+ '\u1E5F': 'r',
2894
+ '\u024D': 'r',
2895
+ '\u027D': 'r',
2896
+ '\uA75B': 'r',
2897
+ '\uA7A7': 'r',
2898
+ '\uA783': 'r',
2899
+ '\u24E2': 's',
2900
+ '\uFF53': 's',
2901
+ '\u00DF': 's',
2902
+ '\u015B': 's',
2903
+ '\u1E65': 's',
2904
+ '\u015D': 's',
2905
+ '\u1E61': 's',
2906
+ '\u0161': 's',
2907
+ '\u1E67': 's',
2908
+ '\u1E63': 's',
2909
+ '\u1E69': 's',
2910
+ '\u0219': 's',
2911
+ '\u015F': 's',
2912
+ '\u023F': 's',
2913
+ '\uA7A9': 's',
2914
+ '\uA785': 's',
2915
+ '\u1E9B': 's',
2916
+ '\u24E3': 't',
2917
+ '\uFF54': 't',
2918
+ '\u1E6B': 't',
2919
+ '\u1E97': 't',
2920
+ '\u0165': 't',
2921
+ '\u1E6D': 't',
2922
+ '\u021B': 't',
2923
+ '\u0163': 't',
2924
+ '\u1E71': 't',
2925
+ '\u1E6F': 't',
2926
+ '\u0167': 't',
2927
+ '\u01AD': 't',
2928
+ '\u0288': 't',
2929
+ '\u2C66': 't',
2930
+ '\uA787': 't',
2931
+ '\uA729': 'tz',
2932
+ '\u24E4': 'u',
2933
+ '\uFF55': 'u',
2934
+ '\u00F9': 'u',
2935
+ '\u00FA': 'u',
2936
+ '\u00FB': 'u',
2937
+ '\u0169': 'u',
2938
+ '\u1E79': 'u',
2939
+ '\u016B': 'u',
2940
+ '\u1E7B': 'u',
2941
+ '\u016D': 'u',
2942
+ '\u00FC': 'u',
2943
+ '\u01DC': 'u',
2944
+ '\u01D8': 'u',
2945
+ '\u01D6': 'u',
2946
+ '\u01DA': 'u',
2947
+ '\u1EE7': 'u',
2948
+ '\u016F': 'u',
2949
+ '\u0171': 'u',
2950
+ '\u01D4': 'u',
2951
+ '\u0215': 'u',
2952
+ '\u0217': 'u',
2953
+ '\u01B0': 'u',
2954
+ '\u1EEB': 'u',
2955
+ '\u1EE9': 'u',
2956
+ '\u1EEF': 'u',
2957
+ '\u1EED': 'u',
2958
+ '\u1EF1': 'u',
2959
+ '\u1EE5': 'u',
2960
+ '\u1E73': 'u',
2961
+ '\u0173': 'u',
2962
+ '\u1E77': 'u',
2963
+ '\u1E75': 'u',
2964
+ '\u0289': 'u',
2965
+ '\u24E5': 'v',
2966
+ '\uFF56': 'v',
2967
+ '\u1E7D': 'v',
2968
+ '\u1E7F': 'v',
2969
+ '\u028B': 'v',
2970
+ '\uA75F': 'v',
2971
+ '\u028C': 'v',
2972
+ '\uA761': 'vy',
2973
+ '\u24E6': 'w',
2974
+ '\uFF57': 'w',
2975
+ '\u1E81': 'w',
2976
+ '\u1E83': 'w',
2977
+ '\u0175': 'w',
2978
+ '\u1E87': 'w',
2979
+ '\u1E85': 'w',
2980
+ '\u1E98': 'w',
2981
+ '\u1E89': 'w',
2982
+ '\u2C73': 'w',
2983
+ '\u24E7': 'x',
2984
+ '\uFF58': 'x',
2985
+ '\u1E8B': 'x',
2986
+ '\u1E8D': 'x',
2987
+ '\u24E8': 'y',
2988
+ '\uFF59': 'y',
2989
+ '\u1EF3': 'y',
2990
+ '\u00FD': 'y',
2991
+ '\u0177': 'y',
2992
+ '\u1EF9': 'y',
2993
+ '\u0233': 'y',
2994
+ '\u1E8F': 'y',
2995
+ '\u00FF': 'y',
2996
+ '\u1EF7': 'y',
2997
+ '\u1E99': 'y',
2998
+ '\u1EF5': 'y',
2999
+ '\u01B4': 'y',
3000
+ '\u024F': 'y',
3001
+ '\u1EFF': 'y',
3002
+ '\u24E9': 'z',
3003
+ '\uFF5A': 'z',
3004
+ '\u017A': 'z',
3005
+ '\u1E91': 'z',
3006
+ '\u017C': 'z',
3007
+ '\u017E': 'z',
3008
+ '\u1E93': 'z',
3009
+ '\u1E95': 'z',
3010
+ '\u01B6': 'z',
3011
+ '\u0225': 'z',
3012
+ '\u0240': 'z',
3013
+ '\u2C6C': 'z',
3014
+ '\uA763': 'z',
3015
+ '\u0386': '\u0391',
3016
+ '\u0388': '\u0395',
3017
+ '\u0389': '\u0397',
3018
+ '\u038A': '\u0399',
3019
+ '\u03AA': '\u0399',
3020
+ '\u038C': '\u039F',
3021
+ '\u038E': '\u03A5',
3022
+ '\u03AB': '\u03A5',
3023
+ '\u038F': '\u03A9',
3024
+ '\u03AC': '\u03B1',
3025
+ '\u03AD': '\u03B5',
3026
+ '\u03AE': '\u03B7',
3027
+ '\u03AF': '\u03B9',
3028
+ '\u03CA': '\u03B9',
3029
+ '\u0390': '\u03B9',
3030
+ '\u03CC': '\u03BF',
3031
+ '\u03CD': '\u03C5',
3032
+ '\u03CB': '\u03C5',
3033
+ '\u03B0': '\u03C5',
3034
+ '\u03C9': '\u03C9',
3035
+ '\u03C2': '\u03C3'
3036
+ };
3037
+
3038
+ return diacritics;
3039
+ });
3040
+
3041
+ S2.define('select2/data/base',[
3042
+ '../utils'
3043
+ ], function (Utils) {
3044
+ function BaseAdapter ($element, options) {
3045
+ BaseAdapter.__super__.constructor.call(this);
3046
+ }
3047
+
3048
+ Utils.Extend(BaseAdapter, Utils.Observable);
3049
+
3050
+ BaseAdapter.prototype.current = function (callback) {
3051
+ throw new Error('The `current` method must be defined in child classes.');
3052
+ };
3053
+
3054
+ BaseAdapter.prototype.query = function (params, callback) {
3055
+ throw new Error('The `query` method must be defined in child classes.');
3056
+ };
3057
+
3058
+ BaseAdapter.prototype.bind = function (container, $container) {
3059
+ // Can be implemented in subclasses
3060
+ };
3061
+
3062
+ BaseAdapter.prototype.destroy = function () {
3063
+ // Can be implemented in subclasses
3064
+ };
3065
+
3066
+ BaseAdapter.prototype.generateResultId = function (container, data) {
3067
+ var id = '';
3068
+
3069
+ if (container != null) {
3070
+ id += container.id
3071
+ } else {
3072
+ id += Utils.generateChars(4);
3073
+ }
3074
+
3075
+ id += '-result-';
3076
+ id += Utils.generateChars(4);
3077
+
3078
+ if (data.id != null) {
3079
+ id += '-' + data.id.toString();
3080
+ } else {
3081
+ id += '-' + Utils.generateChars(4);
3082
+ }
3083
+ return id;
3084
+ };
3085
+
3086
+ return BaseAdapter;
3087
+ });
3088
+
3089
+ S2.define('select2/data/select',[
3090
+ './base',
3091
+ '../utils',
3092
+ 'jquery'
3093
+ ], function (BaseAdapter, Utils, $) {
3094
+ function SelectAdapter ($element, options) {
3095
+ this.$element = $element;
3096
+ this.options = options;
3097
+
3098
+ SelectAdapter.__super__.constructor.call(this);
3099
+ }
3100
+
3101
+ Utils.Extend(SelectAdapter, BaseAdapter);
3102
+
3103
+ SelectAdapter.prototype.current = function (callback) {
3104
+ var data = [];
3105
+ var self = this;
3106
+
3107
+ this.$element.find(':selected').each(function () {
3108
+ var $option = $(this);
3109
+
3110
+ var option = self.item($option);
3111
+
3112
+ data.push(option);
3113
+ });
3114
+
3115
+ callback(data);
3116
+ };
3117
+
3118
+ SelectAdapter.prototype.select = function (data) {
3119
+ var self = this;
3120
+
3121
+ data.selected = true;
3122
+
3123
+ // If data.element is a DOM node, use it instead
3124
+ if ($(data.element).is('option')) {
3125
+ data.element.selected = true;
3126
+
3127
+ this.$element.trigger('change');
3128
+
3129
+ return;
3130
+ }
3131
+
3132
+ if (this.$element.prop('multiple')) {
3133
+ this.current(function (currentData) {
3134
+ var val = [];
3135
+
3136
+ data = [data];
3137
+ data.push.apply(data, currentData);
3138
+
3139
+ for (var d = 0; d < data.length; d++) {
3140
+ var id = data[d].id;
3141
+
3142
+ if ($.inArray(id, val) === -1) {
3143
+ val.push(id);
3144
+ }
3145
+ }
3146
+
3147
+ self.$element.val(val);
3148
+ self.$element.trigger('change');
3149
+ });
3150
+ } else {
3151
+ var val = data.id;
3152
+
3153
+ this.$element.val(val);
3154
+ this.$element.trigger('change');
3155
+ }
3156
+ };
3157
+
3158
+ SelectAdapter.prototype.unselect = function (data) {
3159
+ var self = this;
3160
+
3161
+ if (!this.$element.prop('multiple')) {
3162
+ return;
3163
+ }
3164
+
3165
+ data.selected = false;
3166
+
3167
+ if ($(data.element).is('option')) {
3168
+ data.element.selected = false;
3169
+
3170
+ this.$element.trigger('change');
3171
+
3172
+ return;
3173
+ }
3174
+
3175
+ this.current(function (currentData) {
3176
+ var val = [];
3177
+
3178
+ for (var d = 0; d < currentData.length; d++) {
3179
+ var id = currentData[d].id;
3180
+
3181
+ if (id !== data.id && $.inArray(id, val) === -1) {
3182
+ val.push(id);
3183
+ }
3184
+ }
3185
+
3186
+ self.$element.val(val);
3187
+
3188
+ self.$element.trigger('change');
3189
+ });
3190
+ };
3191
+
3192
+ SelectAdapter.prototype.bind = function (container, $container) {
3193
+ var self = this;
3194
+
3195
+ this.container = container;
3196
+
3197
+ container.on('select', function (params) {
3198
+ self.select(params.data);
3199
+ });
3200
+
3201
+ container.on('unselect', function (params) {
3202
+ self.unselect(params.data);
3203
+ });
3204
+ };
3205
+
3206
+ SelectAdapter.prototype.destroy = function () {
3207
+ // Remove anything added to child elements
3208
+ this.$element.find('*').each(function () {
3209
+ // Remove any custom data set by Select2
3210
+ $.removeData(this, 'data');
3211
+ });
3212
+ };
3213
+
3214
+ SelectAdapter.prototype.query = function (params, callback) {
3215
+ var data = [];
3216
+ var self = this;
3217
+
3218
+ var $options = this.$element.children();
3219
+
3220
+ $options.each(function () {
3221
+ var $option = $(this);
3222
+
3223
+ if (!$option.is('option') && !$option.is('optgroup')) {
3224
+ return;
3225
+ }
3226
+
3227
+ var option = self.item($option);
3228
+
3229
+ var matches = self.matches(params, option);
3230
+
3231
+ if (matches !== null) {
3232
+ data.push(matches);
3233
+ }
3234
+ });
3235
+
3236
+ callback({
3237
+ results: data
3238
+ });
3239
+ };
3240
+
3241
+ SelectAdapter.prototype.addOptions = function ($options) {
3242
+ Utils.appendMany(this.$element, $options);
3243
+ };
3244
+
3245
+ SelectAdapter.prototype.option = function (data) {
3246
+ var option;
3247
+
3248
+ if (data.children) {
3249
+ option = document.createElement('optgroup');
3250
+ option.label = data.text;
3251
+ } else {
3252
+ option = document.createElement('option');
3253
+
3254
+ if (option.textContent !== undefined) {
3255
+ option.textContent = data.text;
3256
+ } else {
3257
+ option.innerText = data.text;
3258
+ }
3259
+ }
3260
+
3261
+ if (data.id !== undefined) {
3262
+ option.value = data.id;
3263
+ }
3264
+
3265
+ if (data.disabled) {
3266
+ option.disabled = true;
3267
+ }
3268
+
3269
+ if (data.selected) {
3270
+ option.selected = true;
3271
+ }
3272
+
3273
+ if (data.title) {
3274
+ option.title = data.title;
3275
+ }
3276
+
3277
+ var $option = $(option);
3278
+
3279
+ var normalizedData = this._normalizeItem(data);
3280
+ normalizedData.element = option;
3281
+
3282
+ // Override the option's data with the combined data
3283
+ $.data(option, 'data', normalizedData);
3284
+
3285
+ return $option;
3286
+ };
3287
+
3288
+ SelectAdapter.prototype.item = function ($option) {
3289
+ var data = {};
3290
+
3291
+ data = $.data($option[0], 'data');
3292
+
3293
+ if (data != null) {
3294
+ return data;
3295
+ }
3296
+
3297
+ if ($option.is('option')) {
3298
+ data = {
3299
+ id: $option.val(),
3300
+ text: $option.text(),
3301
+ disabled: $option.prop('disabled'),
3302
+ selected: $option.prop('selected'),
3303
+ title: $option.prop('title')
3304
+ };
3305
+ } else if ($option.is('optgroup')) {
3306
+ data = {
3307
+ text: $option.prop('label'),
3308
+ children: [],
3309
+ title: $option.prop('title')
3310
+ };
3311
+
3312
+ var $children = $option.children('option');
3313
+ var children = [];
3314
+
3315
+ for (var c = 0; c < $children.length; c++) {
3316
+ var $child = $($children[c]);
3317
+
3318
+ var child = this.item($child);
3319
+
3320
+ children.push(child);
3321
+ }
3322
+
3323
+ data.children = children;
3324
+ }
3325
+
3326
+ data = this._normalizeItem(data);
3327
+ data.element = $option[0];
3328
+
3329
+ $.data($option[0], 'data', data);
3330
+
3331
+ return data;
3332
+ };
3333
+
3334
+ SelectAdapter.prototype._normalizeItem = function (item) {
3335
+ if (!$.isPlainObject(item)) {
3336
+ item = {
3337
+ id: item,
3338
+ text: item
3339
+ };
3340
+ }
3341
+
3342
+ item = $.extend({}, {
3343
+ text: ''
3344
+ }, item);
3345
+
3346
+ var defaults = {
3347
+ selected: false,
3348
+ disabled: false
3349
+ };
3350
+
3351
+ if (item.id != null) {
3352
+ item.id = item.id.toString();
3353
+ }
3354
+
3355
+ if (item.text != null) {
3356
+ item.text = item.text.toString();
3357
+ }
3358
+
3359
+ if (item._resultId == null && item.id) {
3360
+ item._resultId = this.generateResultId(this.container, item);
3361
+ }
3362
+
3363
+ return $.extend({}, defaults, item);
3364
+ };
3365
+
3366
+ SelectAdapter.prototype.matches = function (params, data) {
3367
+ var matcher = this.options.get('matcher');
3368
+
3369
+ return matcher(params, data);
3370
+ };
3371
+
3372
+ return SelectAdapter;
3373
+ });
3374
+
3375
+ S2.define('select2/data/array',[
3376
+ './select',
3377
+ '../utils',
3378
+ 'jquery'
3379
+ ], function (SelectAdapter, Utils, $) {
3380
+ function ArrayAdapter ($element, options) {
3381
+ var data = options.get('data') || [];
3382
+
3383
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
3384
+
3385
+ this.addOptions(this.convertToOptions(data));
3386
+ }
3387
+
3388
+ Utils.Extend(ArrayAdapter, SelectAdapter);
3389
+
3390
+ ArrayAdapter.prototype.select = function (data) {
3391
+ var $option = this.$element.find('option').filter(function (i, elm) {
3392
+ return elm.value == data.id.toString();
3393
+ });
3394
+
3395
+ if ($option.length === 0) {
3396
+ $option = this.option(data);
3397
+
3398
+ this.addOptions($option);
3399
+ }
3400
+
3401
+ ArrayAdapter.__super__.select.call(this, data);
3402
+ };
3403
+
3404
+ ArrayAdapter.prototype.convertToOptions = function (data) {
3405
+ var self = this;
3406
+
3407
+ var $existing = this.$element.find('option');
3408
+ var existingIds = $existing.map(function () {
3409
+ return self.item($(this)).id;
3410
+ }).get();
3411
+
3412
+ var $options = [];
3413
+
3414
+ // Filter out all items except for the one passed in the argument
3415
+ function onlyItem (item) {
3416
+ return function () {
3417
+ return $(this).val() == item.id;
3418
+ };
3419
+ }
3420
+
3421
+ for (var d = 0; d < data.length; d++) {
3422
+ var item = this._normalizeItem(data[d]);
3423
+
3424
+ // Skip items which were pre-loaded, only merge the data
3425
+ if ($.inArray(item.id, existingIds) >= 0) {
3426
+ var $existingOption = $existing.filter(onlyItem(item));
3427
+
3428
+ var existingData = this.item($existingOption);
3429
+ var newData = $.extend(true, {}, item, existingData);
3430
+
3431
+ var $newOption = this.option(newData);
3432
+
3433
+ $existingOption.replaceWith($newOption);
3434
+
3435
+ continue;
3436
+ }
3437
+
3438
+ var $option = this.option(item);
3439
+
3440
+ if (item.children) {
3441
+ var $children = this.convertToOptions(item.children);
3442
+
3443
+ Utils.appendMany($option, $children);
3444
+ }
3445
+
3446
+ $options.push($option);
3447
+ }
3448
+
3449
+ return $options;
3450
+ };
3451
+
3452
+ return ArrayAdapter;
3453
+ });
3454
+
3455
+ S2.define('select2/data/ajax',[
3456
+ './array',
3457
+ '../utils',
3458
+ 'jquery'
3459
+ ], function (ArrayAdapter, Utils, $) {
3460
+ function AjaxAdapter ($element, options) {
3461
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
3462
+
3463
+ if (this.ajaxOptions.processResults != null) {
3464
+ this.processResults = this.ajaxOptions.processResults;
3465
+ }
3466
+
3467
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
3468
+ }
3469
+
3470
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
3471
+
3472
+ AjaxAdapter.prototype._applyDefaults = function (options) {
3473
+ var defaults = {
3474
+ data: function (params) {
3475
+ return $.extend({}, params, {
3476
+ q: params.term
3477
+ });
3478
+ },
3479
+ transport: function (params, success, failure) {
3480
+ var $request = $.ajax(params);
3481
+
3482
+ $request.then(success);
3483
+ $request.fail(failure);
3484
+
3485
+ return $request;
3486
+ }
3487
+ };
3488
+
3489
+ return $.extend({}, defaults, options, true);
3490
+ };
3491
+
3492
+ AjaxAdapter.prototype.processResults = function (results) {
3493
+ return results;
3494
+ };
3495
+
3496
+ AjaxAdapter.prototype.query = function (params, callback) {
3497
+ var matches = [];
3498
+ var self = this;
3499
+
3500
+ if (this._request != null) {
3501
+ // JSONP requests cannot always be aborted
3502
+ if ($.isFunction(this._request.abort)) {
3503
+ this._request.abort();
3504
+ }
3505
+
3506
+ this._request = null;
3507
+ }
3508
+
3509
+ var options = $.extend({
3510
+ type: 'GET'
3511
+ }, this.ajaxOptions);
3512
+
3513
+ if (typeof options.url === 'function') {
3514
+ options.url = options.url.call(this.$element, params);
3515
+ }
3516
+
3517
+ if (typeof options.data === 'function') {
3518
+ options.data = options.data.call(this.$element, params);
3519
+ }
3520
+
3521
+ function request () {
3522
+ var $request = options.transport(options, function (data) {
3523
+ var results = self.processResults(data, params);
3524
+
3525
+ if (self.options.get('debug') && window.console && console.error) {
3526
+ // Check to make sure that the response included a `results` key.
3527
+ if (!results || !results.results || !$.isArray(results.results)) {
3528
+ console.error(
3529
+ 'Select2: The AJAX results did not return an array in the ' +
3530
+ '`results` key of the response.'
3531
+ );
3532
+ }
3533
+ }
3534
+
3535
+ callback(results);
3536
+ self.container.focusOnActiveElement();
3537
+ }, function () {
3538
+ // Attempt to detect if a request was aborted
3539
+ // Only works if the transport exposes a status property
3540
+ if ($request.status && $request.status === '0') {
3541
+ return;
3542
+ }
3543
+
3544
+ self.trigger('results:message', {
3545
+ message: 'errorLoading'
3546
+ });
3547
+ });
3548
+
3549
+ self._request = $request;
3550
+ }
3551
+
3552
+ if (this.ajaxOptions.delay && params.term != null) {
3553
+ if (this._queryTimeout) {
3554
+ window.clearTimeout(this._queryTimeout);
3555
+ }
3556
+
3557
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
3558
+ } else {
3559
+ request();
3560
+ }
3561
+ };
3562
+
3563
+ return AjaxAdapter;
3564
+ });
3565
+
3566
+ S2.define('select2/data/tags',[
3567
+ 'jquery'
3568
+ ], function ($) {
3569
+ function Tags (decorated, $element, options) {
3570
+ var tags = options.get('tags');
3571
+
3572
+ var createTag = options.get('createTag');
3573
+
3574
+ if (createTag !== undefined) {
3575
+ this.createTag = createTag;
3576
+ }
3577
+
3578
+ var insertTag = options.get('insertTag');
3579
+
3580
+ if (insertTag !== undefined) {
3581
+ this.insertTag = insertTag;
3582
+ }
3583
+
3584
+ decorated.call(this, $element, options);
3585
+
3586
+ if ($.isArray(tags)) {
3587
+ for (var t = 0; t < tags.length; t++) {
3588
+ var tag = tags[t];
3589
+ var item = this._normalizeItem(tag);
3590
+
3591
+ var $option = this.option(item);
3592
+
3593
+ this.$element.append($option);
3594
+ }
3595
+ }
3596
+ }
3597
+
3598
+ Tags.prototype.query = function (decorated, params, callback) {
3599
+ var self = this;
3600
+
3601
+ this._removeOldTags();
3602
+
3603
+ if (params.term == null || params.page != null) {
3604
+ decorated.call(this, params, callback);
3605
+ return;
3606
+ }
3607
+
3608
+ function wrapper (obj, child) {
3609
+ var data = obj.results;
3610
+
3611
+ for (var i = 0; i < data.length; i++) {
3612
+ var option = data[i];
3613
+
3614
+ var checkChildren = (
3615
+ option.children != null &&
3616
+ !wrapper({
3617
+ results: option.children
3618
+ }, true)
3619
+ );
3620
+
3621
+ var optionText = (option.text || '').toUpperCase();
3622
+ var paramsTerm = (params.term || '').toUpperCase();
3623
+
3624
+ var checkText = optionText === paramsTerm;
3625
+
3626
+ if (checkText || checkChildren) {
3627
+ if (child) {
3628
+ return false;
3629
+ }
3630
+
3631
+ obj.data = data;
3632
+ callback(obj);
3633
+
3634
+ return;
3635
+ }
3636
+ }
3637
+
3638
+ if (child) {
3639
+ return true;
3640
+ }
3641
+
3642
+ var tag = self.createTag(params);
3643
+
3644
+ if (tag != null) {
3645
+ var $option = self.option(tag);
3646
+ $option.attr('data-select2-tag', true);
3647
+
3648
+ self.addOptions([$option]);
3649
+
3650
+ self.insertTag(data, tag);
3651
+ }
3652
+
3653
+ obj.results = data;
3654
+
3655
+ callback(obj);
3656
+ }
3657
+
3658
+ decorated.call(this, params, wrapper);
3659
+ };
3660
+
3661
+ Tags.prototype.createTag = function (decorated, params) {
3662
+ var term = $.trim(params.term);
3663
+
3664
+ if (term === '') {
3665
+ return null;
3666
+ }
3667
+
3668
+ return {
3669
+ id: term,
3670
+ text: term
3671
+ };
3672
+ };
3673
+
3674
+ Tags.prototype.insertTag = function (_, data, tag) {
3675
+ data.unshift(tag);
3676
+ };
3677
+
3678
+ Tags.prototype._removeOldTags = function (_) {
3679
+ var tag = this._lastTag;
3680
+
3681
+ var $options = this.$element.find('option[data-select2-tag]');
3682
+
3683
+ $options.each(function () {
3684
+ if (this.selected) {
3685
+ return;
3686
+ }
3687
+
3688
+ $(this).remove();
3689
+ });
3690
+ };
3691
+
3692
+ return Tags;
3693
+ });
3694
+
3695
+ S2.define('select2/data/tokenizer',[
3696
+ 'jquery'
3697
+ ], function ($) {
3698
+ function Tokenizer (decorated, $element, options) {
3699
+ var tokenizer = options.get('tokenizer');
3700
+
3701
+ if (tokenizer !== undefined) {
3702
+ this.tokenizer = tokenizer;
3703
+ }
3704
+
3705
+ decorated.call(this, $element, options);
3706
+ }
3707
+
3708
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
3709
+ decorated.call(this, container, $container);
3710
+
3711
+ this.$search = container.dropdown.$search || container.selection.$search ||
3712
+ $container.find('.select2-search__field');
3713
+ };
3714
+
3715
+ Tokenizer.prototype.query = function (decorated, params, callback) {
3716
+ var self = this;
3717
+
3718
+ function createAndSelect (data) {
3719
+ // Normalize the data object so we can use it for checks
3720
+ var item = self._normalizeItem(data);
3721
+
3722
+ // Check if the data object already exists as a tag
3723
+ // Select it if it doesn't
3724
+ var $existingOptions = self.$element.find('option').filter(function () {
3725
+ return $(this).val() === item.id;
3726
+ });
3727
+
3728
+ // If an existing option wasn't found for it, create the option
3729
+ if (!$existingOptions.length) {
3730
+ var $option = self.option(item);
3731
+ $option.attr('data-select2-tag', true);
3732
+
3733
+ self._removeOldTags();
3734
+ self.addOptions([$option]);
3735
+ }
3736
+
3737
+ // Select the item, now that we know there is an option for it
3738
+ select(item);
3739
+ }
3740
+
3741
+ function select (data) {
3742
+ self.trigger('select', {
3743
+ data: data
3744
+ });
3745
+ }
3746
+
3747
+ params.term = params.term || '';
3748
+
3749
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
3750
+
3751
+ if (tokenData.term !== params.term) {
3752
+ // Replace the search term if we have the search box
3753
+ if (this.$search.length) {
3754
+ this.$search.val(tokenData.term);
3755
+ this.$search.focus();
3756
+ }
3757
+
3758
+ params.term = tokenData.term;
3759
+ }
3760
+
3761
+ decorated.call(this, params, callback);
3762
+ };
3763
+
3764
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
3765
+ var separators = options.get('tokenSeparators') || [];
3766
+ var term = params.term;
3767
+ var i = 0;
3768
+
3769
+ var createTag = this.createTag || function (params) {
3770
+ return {
3771
+ id: params.term,
3772
+ text: params.term
3773
+ };
3774
+ };
3775
+
3776
+ while (i < term.length) {
3777
+ var termChar = term[i];
3778
+
3779
+ if ($.inArray(termChar, separators) === -1) {
3780
+ i++;
3781
+
3782
+ continue;
3783
+ }
3784
+
3785
+ var part = term.substr(0, i);
3786
+ var partParams = $.extend({}, params, {
3787
+ term: part
3788
+ });
3789
+
3790
+ var data = createTag(partParams);
3791
+
3792
+ if (data == null) {
3793
+ i++;
3794
+ continue;
3795
+ }
3796
+
3797
+ callback(data);
3798
+
3799
+ // Reset the term to not include the tokenized portion
3800
+ term = term.substr(i + 1) || '';
3801
+ i = 0;
3802
+ }
3803
+
3804
+ return {
3805
+ term: term
3806
+ };
3807
+ };
3808
+
3809
+ return Tokenizer;
3810
+ });
3811
+
3812
+ S2.define('select2/data/minimumInputLength',[
3813
+
3814
+ ], function () {
3815
+ function MinimumInputLength (decorated, $e, options) {
3816
+ this.minimumInputLength = options.get('minimumInputLength');
3817
+
3818
+ decorated.call(this, $e, options);
3819
+ }
3820
+
3821
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
3822
+ params.term = params.term || '';
3823
+
3824
+ if (params.term.length < this.minimumInputLength) {
3825
+ this.trigger('results:message', {
3826
+ message: 'inputTooShort',
3827
+ args: {
3828
+ minimum: this.minimumInputLength,
3829
+ input: params.term,
3830
+ params: params
3831
+ }
3832
+ });
3833
+
3834
+ return;
3835
+ }
3836
+
3837
+ decorated.call(this, params, callback);
3838
+ };
3839
+
3840
+ return MinimumInputLength;
3841
+ });
3842
+
3843
+ S2.define('select2/data/maximumInputLength',[
3844
+
3845
+ ], function () {
3846
+ function MaximumInputLength (decorated, $e, options) {
3847
+ this.maximumInputLength = options.get('maximumInputLength');
3848
+
3849
+ decorated.call(this, $e, options);
3850
+ }
3851
+
3852
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
3853
+ params.term = params.term || '';
3854
+
3855
+ if (this.maximumInputLength > 0 &&
3856
+ params.term.length > this.maximumInputLength) {
3857
+ this.trigger('results:message', {
3858
+ message: 'inputTooLong',
3859
+ args: {
3860
+ maximum: this.maximumInputLength,
3861
+ input: params.term,
3862
+ params: params
3863
+ }
3864
+ });
3865
+
3866
+ return;
3867
+ }
3868
+
3869
+ decorated.call(this, params, callback);
3870
+ };
3871
+
3872
+ return MaximumInputLength;
3873
+ });
3874
+
3875
+ S2.define('select2/data/maximumSelectionLength',[
3876
+
3877
+ ], function (){
3878
+ function MaximumSelectionLength (decorated, $e, options) {
3879
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
3880
+
3881
+ decorated.call(this, $e, options);
3882
+ }
3883
+
3884
+ MaximumSelectionLength.prototype.query =
3885
+ function (decorated, params, callback) {
3886
+ var self = this;
3887
+
3888
+ this.current(function (currentData) {
3889
+ var count = currentData != null ? currentData.length : 0;
3890
+ if (self.maximumSelectionLength > 0 &&
3891
+ count >= self.maximumSelectionLength) {
3892
+ self.trigger('results:message', {
3893
+ message: 'maximumSelected',
3894
+ args: {
3895
+ maximum: self.maximumSelectionLength
3896
+ }
3897
+ });
3898
+ return;
3899
+ }
3900
+ decorated.call(self, params, callback);
3901
+ });
3902
+ };
3903
+
3904
+ return MaximumSelectionLength;
3905
+ });
3906
+
3907
+ S2.define('select2/dropdown',[
3908
+ 'jquery',
3909
+ './utils'
3910
+ ], function ($, Utils) {
3911
+ function Dropdown ($element, options) {
3912
+ this.$element = $element;
3913
+ this.options = options;
3914
+
3915
+ Dropdown.__super__.constructor.call(this);
3916
+ }
3917
+
3918
+ Utils.Extend(Dropdown, Utils.Observable);
3919
+
3920
+ Dropdown.prototype.render = function () {
3921
+ var $dropdown = $(
3922
+ '<span class="select2-dropdown">' +
3923
+ '<span class="select2-results"></span>' +
3924
+ '</span>'
3925
+ );
3926
+
3927
+ $dropdown.attr('dir', this.options.get('dir'));
3928
+
3929
+ this.$dropdown = $dropdown;
3930
+
3931
+ return $dropdown;
3932
+ };
3933
+
3934
+ Dropdown.prototype.bind = function () {
3935
+ // Should be implemented in subclasses
3936
+ };
3937
+
3938
+ Dropdown.prototype.position = function ($dropdown, $container) {
3939
+ // Should be implmented in subclasses
3940
+ };
3941
+
3942
+ Dropdown.prototype.destroy = function () {
3943
+ // Remove the dropdown from the DOM
3944
+ this.$dropdown.remove();
3945
+ };
3946
+
3947
+ return Dropdown;
3948
+ });
3949
+
3950
+ S2.define('select2/dropdown/search',[
3951
+ 'jquery',
3952
+ '../utils'
3953
+ ], function ($, Utils) {
3954
+ function Search () { }
3955
+
3956
+ Search.prototype.render = function (decorated) {
3957
+ var $rendered = decorated.call(this);
3958
+
3959
+ var $search = $(
3960
+ '<span class="select2-search select2-search--dropdown">' +
3961
+ '<input class="select2-search__field" type="text" tabindex="-1"' +
3962
+ ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
3963
+ ' spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" />' +
3964
+ '</span>'
3965
+ );
3966
+
3967
+ this.$searchContainer = $search;
3968
+ this.$search = $search.find('input');
3969
+
3970
+ $rendered.prepend($search);
3971
+
3972
+ return $rendered;
3973
+ };
3974
+
3975
+ Search.prototype.bind = function (decorated, container, $container) {
3976
+ var self = this;
3977
+ var resultsId = container.id + '-results';
3978
+
3979
+ decorated.call(this, container, $container);
3980
+
3981
+ this.$search.on('keydown', function (evt) {
3982
+ self.trigger('keypress', evt);
3983
+
3984
+ self._keyUpPrevented = evt.isDefaultPrevented();
3985
+ });
3986
+
3987
+ // Workaround for browsers which do not support the `input` event
3988
+ // This will prevent double-triggering of events for browsers which support
3989
+ // both the `keyup` and `input` events.
3990
+ this.$search.on('input', function (evt) {
3991
+ // Unbind the duplicated `keyup` event
3992
+ $(this).off('keyup');
3993
+ });
3994
+
3995
+ this.$search.on('keyup input', function (evt) {
3996
+ self.handleSearch(evt);
3997
+ });
3998
+
3999
+ container.on('open', function () {
4000
+ self.$search.attr('tabindex', 0);
4001
+ self.$search.attr('aria-owns', resultsId);
4002
+ self.$search.focus();
4003
+
4004
+ window.setTimeout(function () {
4005
+ self.$search.focus();
4006
+ }, 0);
4007
+ });
4008
+
4009
+ container.on('close', function () {
4010
+ self.$search.attr('tabindex', -1);
4011
+ self.$search.removeAttr('aria-activedescendant');
4012
+ self.$search.removeAttr('aria-owns');
4013
+ self.$search.val('');
4014
+ });
4015
+
4016
+ container.on('focus', function () {
4017
+ if (container.isOpen()) {
4018
+ self.$search.focus();
4019
+ }
4020
+ });
4021
+
4022
+ container.on('results:all', function (params) {
4023
+ if (params.query.term == null || params.query.term === '') {
4024
+ var showSearch = self.showSearch(params);
4025
+
4026
+ if (showSearch) {
4027
+ self.$searchContainer.removeClass('select2-search--hide');
4028
+ } else {
4029
+ self.$searchContainer.addClass('select2-search--hide');
4030
+ }
4031
+ }
4032
+ });
4033
+
4034
+ container.on('results:focus', function (params) {
4035
+ self.$search.attr('aria-activedescendant', params.data._resultId);
4036
+ });
4037
+ };
4038
+
4039
+ Search.prototype.handleSearch = function (evt) {
4040
+ if (!this._keyUpPrevented) {
4041
+ var input = this.$search.val();
4042
+
4043
+ this.trigger('query', {
4044
+ term: input
4045
+ });
4046
+ }
4047
+
4048
+ this._keyUpPrevented = false;
4049
+ };
4050
+
4051
+ Search.prototype.showSearch = function (_, params) {
4052
+ return true;
4053
+ };
4054
+
4055
+ return Search;
4056
+ });
4057
+
4058
+ S2.define('select2/dropdown/hidePlaceholder',[
4059
+
4060
+ ], function () {
4061
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
4062
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
4063
+
4064
+ decorated.call(this, $element, options, dataAdapter);
4065
+ }
4066
+
4067
+ HidePlaceholder.prototype.append = function (decorated, data) {
4068
+ data.results = this.removePlaceholder(data.results);
4069
+
4070
+ decorated.call(this, data);
4071
+ };
4072
+
4073
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
4074
+ if (typeof placeholder === 'string') {
4075
+ placeholder = {
4076
+ id: '',
4077
+ text: placeholder
4078
+ };
4079
+ }
4080
+
4081
+ return placeholder;
4082
+ };
4083
+
4084
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
4085
+ var modifiedData = data.slice(0);
4086
+
4087
+ for (var d = data.length - 1; d >= 0; d--) {
4088
+ var item = data[d];
4089
+
4090
+ if (this.placeholder.id === item.id) {
4091
+ modifiedData.splice(d, 1);
4092
+ }
4093
+ }
4094
+
4095
+ return modifiedData;
4096
+ };
4097
+
4098
+ return HidePlaceholder;
4099
+ });
4100
+
4101
+ S2.define('select2/dropdown/infiniteScroll',[
4102
+ 'jquery'
4103
+ ], function ($) {
4104
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
4105
+ this.lastParams = {};
4106
+
4107
+ decorated.call(this, $element, options, dataAdapter);
4108
+
4109
+ this.$loadingMore = this.createLoadingMore();
4110
+ this.loading = false;
4111
+ }
4112
+
4113
+ InfiniteScroll.prototype.append = function (decorated, data) {
4114
+ this.$loadingMore.remove();
4115
+ this.loading = false;
4116
+
4117
+ decorated.call(this, data);
4118
+
4119
+ if (this.showLoadingMore(data)) {
4120
+ this.$results.append(this.$loadingMore);
4121
+ }
4122
+ };
4123
+
4124
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
4125
+ var self = this;
4126
+
4127
+ decorated.call(this, container, $container);
4128
+
4129
+ container.on('query', function (params) {
4130
+ self.lastParams = params;
4131
+ self.loading = true;
4132
+ });
4133
+
4134
+ container.on('query:append', function (params) {
4135
+ self.lastParams = params;
4136
+ self.loading = true;
4137
+ });
4138
+
4139
+ this.$results.on('scroll', function () {
4140
+ var isLoadMoreVisible = $.contains(
4141
+ document.documentElement,
4142
+ self.$loadingMore[0]
4143
+ );
4144
+
4145
+ if (self.loading || !isLoadMoreVisible) {
4146
+ return;
4147
+ }
4148
+
4149
+ var currentOffset = self.$results.offset().top +
4150
+ self.$results.outerHeight(false);
4151
+ var loadingMoreOffset = self.$loadingMore.offset().top +
4152
+ self.$loadingMore.outerHeight(false);
4153
+
4154
+ if (currentOffset + 50 >= loadingMoreOffset) {
4155
+ self.loadMore();
4156
+ }
4157
+ });
4158
+ };
4159
+
4160
+ InfiniteScroll.prototype.loadMore = function () {
4161
+ this.loading = true;
4162
+
4163
+ var params = $.extend({}, {page: 1}, this.lastParams);
4164
+
4165
+ params.page++;
4166
+
4167
+ this.trigger('query:append', params);
4168
+ };
4169
+
4170
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
4171
+ return data.pagination && data.pagination.more;
4172
+ };
4173
+
4174
+ InfiniteScroll.prototype.createLoadingMore = function () {
4175
+ var $option = $(
4176
+ '<li ' +
4177
+ 'class="select2-results__option select2-results__option--load-more"' +
4178
+ 'role="option" aria-disabled="true"></li>'
4179
+ );
4180
+
4181
+ var message = this.options.get('translations').get('loadingMore');
4182
+
4183
+ $option.html(message(this.lastParams));
4184
+
4185
+ return $option;
4186
+ };
4187
+
4188
+ return InfiniteScroll;
4189
+ });
4190
+
4191
+ S2.define('select2/dropdown/attachBody',[
4192
+ 'jquery',
4193
+ '../utils'
4194
+ ], function ($, Utils) {
4195
+ function AttachBody (decorated, $element, options) {
4196
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
4197
+
4198
+ decorated.call(this, $element, options);
4199
+ }
4200
+
4201
+ AttachBody.prototype.bind = function (decorated, container, $container) {
4202
+ var self = this;
4203
+
4204
+ var setupResultsEvents = false;
4205
+
4206
+ decorated.call(this, container, $container);
4207
+
4208
+ container.on('open', function () {
4209
+ self._showDropdown();
4210
+ self._attachPositioningHandler(container);
4211
+
4212
+ if (!setupResultsEvents) {
4213
+ setupResultsEvents = true;
4214
+
4215
+ container.on('results:all', function () {
4216
+ self._positionDropdown();
4217
+ self._resizeDropdown();
4218
+ });
4219
+
4220
+ container.on('results:append', function () {
4221
+ self._positionDropdown();
4222
+ self._resizeDropdown();
4223
+ });
4224
+ }
4225
+ });
4226
+
4227
+ container.on('close', function () {
4228
+ self._hideDropdown();
4229
+ self._detachPositioningHandler(container);
4230
+ });
4231
+
4232
+ this.$dropdownContainer.on('mousedown', function (evt) {
4233
+ evt.stopPropagation();
4234
+ });
4235
+ };
4236
+
4237
+ AttachBody.prototype.destroy = function (decorated) {
4238
+ decorated.call(this);
4239
+
4240
+ this.$dropdownContainer.remove();
4241
+ };
4242
+
4243
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
4244
+ // Clone all of the container classes
4245
+ $dropdown.attr('class', $container.attr('class'));
4246
+
4247
+ $dropdown.removeClass('select2');
4248
+ $dropdown.addClass('select2-container--open');
4249
+
4250
+ $dropdown.css({
4251
+ position: 'absolute',
4252
+ top: -999999
4253
+ });
4254
+
4255
+ this.$container = $container;
4256
+ };
4257
+
4258
+ AttachBody.prototype.render = function (decorated) {
4259
+ var $container = $('<span></span>');
4260
+
4261
+ var $dropdown = decorated.call(this);
4262
+ $container.append($dropdown);
4263
+
4264
+ this.$dropdownContainer = $container;
4265
+
4266
+ return $container;
4267
+ };
4268
+
4269
+ AttachBody.prototype._hideDropdown = function (decorated) {
4270
+ this.$dropdownContainer.detach();
4271
+ };
4272
+
4273
+ AttachBody.prototype._attachPositioningHandler =
4274
+ function (decorated, container) {
4275
+ var self = this;
4276
+
4277
+ var scrollEvent = 'scroll.select2.' + container.id;
4278
+ var resizeEvent = 'resize.select2.' + container.id;
4279
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4280
+
4281
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4282
+ $watchers.each(function () {
4283
+ $(this).data('select2-scroll-position', {
4284
+ x: $(this).scrollLeft(),
4285
+ y: $(this).scrollTop()
4286
+ });
4287
+ });
4288
+
4289
+ $watchers.on(scrollEvent, function (ev) {
4290
+ var position = $(this).data('select2-scroll-position');
4291
+ $(this).scrollTop(position.y);
4292
+ });
4293
+
4294
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
4295
+ function (e) {
4296
+ self._positionDropdown();
4297
+ self._resizeDropdown();
4298
+ });
4299
+ };
4300
+
4301
+ AttachBody.prototype._detachPositioningHandler =
4302
+ function (decorated, container) {
4303
+ var scrollEvent = 'scroll.select2.' + container.id;
4304
+ var resizeEvent = 'resize.select2.' + container.id;
4305
+ var orientationEvent = 'orientationchange.select2.' + container.id;
4306
+
4307
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
4308
+ $watchers.off(scrollEvent);
4309
+
4310
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
4311
+ };
4312
+
4313
+ AttachBody.prototype._positionDropdown = function () {
4314
+ var $window = $(window);
4315
+
4316
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
4317
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
4318
+
4319
+ var newDirection = null;
4320
+
4321
+ var offset = this.$container.offset();
4322
+
4323
+ offset.bottom = offset.top + this.$container.outerHeight(false);
4324
+
4325
+ var container = {
4326
+ height: this.$container.outerHeight(false)
4327
+ };
4328
+
4329
+ container.top = offset.top;
4330
+ container.bottom = offset.top + container.height;
4331
+
4332
+ var dropdown = {
4333
+ height: this.$dropdown.outerHeight(false)
4334
+ };
4335
+
4336
+ var viewport = {
4337
+ top: $window.scrollTop(),
4338
+ bottom: $window.scrollTop() + $window.height()
4339
+ };
4340
+
4341
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
4342
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
4343
+
4344
+ var css = {
4345
+ left: offset.left,
4346
+ top: container.bottom
4347
+ };
4348
+
4349
+ // Determine what the parent element is to use for calciulating the offset
4350
+ var $offsetParent = this.$dropdownParent;
4351
+
4352
+ // For statically positoned elements, we need to get the element
4353
+ // that is determining the offset
4354
+ if ($offsetParent.css('position') === 'static') {
4355
+ $offsetParent = $offsetParent.offsetParent();
4356
+ }
4357
+
4358
+ var parentOffset = $offsetParent.offset();
4359
+
4360
+ css.top -= parentOffset.top;
4361
+ css.left -= parentOffset.left;
4362
+
4363
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
4364
+ newDirection = 'below';
4365
+ }
4366
+
4367
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
4368
+ newDirection = 'above';
4369
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
4370
+ newDirection = 'below';
4371
+ }
4372
+
4373
+ if (newDirection == 'above' ||
4374
+ (isCurrentlyAbove && newDirection !== 'below')) {
4375
+ css.top = container.top - parentOffset.top - dropdown.height;
4376
+ }
4377
+
4378
+ if (newDirection != null) {
4379
+ this.$dropdown
4380
+ .removeClass('select2-dropdown--below select2-dropdown--above')
4381
+ .addClass('select2-dropdown--' + newDirection);
4382
+ this.$container
4383
+ .removeClass('select2-container--below select2-container--above')
4384
+ .addClass('select2-container--' + newDirection);
4385
+ }
4386
+
4387
+ this.$dropdownContainer.css(css);
4388
+ };
4389
+
4390
+ AttachBody.prototype._resizeDropdown = function () {
4391
+ var css = {
4392
+ width: this.$container.outerWidth(false) + 'px'
4393
+ };
4394
+
4395
+ if (this.options.get('dropdownAutoWidth')) {
4396
+ css.minWidth = css.width;
4397
+ css.position = 'relative';
4398
+ css.width = 'auto';
4399
+ }
4400
+
4401
+ this.$dropdown.css(css);
4402
+ };
4403
+
4404
+ AttachBody.prototype._showDropdown = function (decorated) {
4405
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
4406
+
4407
+ this._positionDropdown();
4408
+ this._resizeDropdown();
4409
+ };
4410
+
4411
+ return AttachBody;
4412
+ });
4413
+
4414
+ S2.define('select2/dropdown/minimumResultsForSearch',[
4415
+
4416
+ ], function () {
4417
+ function countResults (data) {
4418
+ var count = 0;
4419
+
4420
+ for (var d = 0; d < data.length; d++) {
4421
+ var item = data[d];
4422
+
4423
+ if (item.children) {
4424
+ count += countResults(item.children);
4425
+ } else {
4426
+ count++;
4427
+ }
4428
+ }
4429
+
4430
+ return count;
4431
+ }
4432
+
4433
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
4434
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
4435
+
4436
+ if (this.minimumResultsForSearch < 0) {
4437
+ this.minimumResultsForSearch = Infinity;
4438
+ }
4439
+
4440
+ decorated.call(this, $element, options, dataAdapter);
4441
+ }
4442
+
4443
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
4444
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
4445
+ return false;
4446
+ }
4447
+
4448
+ return decorated.call(this, params);
4449
+ };
4450
+
4451
+ return MinimumResultsForSearch;
4452
+ });
4453
+
4454
+ S2.define('select2/dropdown/selectOnClose',[
4455
+
4456
+ ], function () {
4457
+ function SelectOnClose () { }
4458
+
4459
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
4460
+ var self = this;
4461
+
4462
+ decorated.call(this, container, $container);
4463
+
4464
+ container.on('close', function (params) {
4465
+ self._handleSelectOnClose(params);
4466
+ });
4467
+ };
4468
+
4469
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
4470
+ if (params && params.originalSelect2Event != null) {
4471
+ var event = params.originalSelect2Event;
4472
+
4473
+ // Don't select an item if the close event was triggered from a select or
4474
+ // unselect event
4475
+ if (event._type === 'select' || event._type === 'unselect') {
4476
+ return;
4477
+ }
4478
+ }
4479
+
4480
+ var $highlightedResults = this.getHighlightedResults();
4481
+
4482
+ // Only select highlighted results
4483
+ if ($highlightedResults.length < 1) {
4484
+ return;
4485
+ }
4486
+
4487
+ var data = $highlightedResults.data('data');
4488
+
4489
+ // Don't re-select already selected resulte
4490
+ if (
4491
+ (data.element != null && data.element.selected) ||
4492
+ (data.element == null && data.selected)
4493
+ ) {
4494
+ return;
4495
+ }
4496
+
4497
+ this.trigger('select', {
4498
+ data: data
4499
+ });
4500
+ };
4501
+
4502
+ return SelectOnClose;
4503
+ });
4504
+
4505
+ S2.define('select2/dropdown/closeOnSelect',[
4506
+
4507
+ ], function () {
4508
+ function CloseOnSelect () { }
4509
+
4510
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
4511
+ var self = this;
4512
+
4513
+ decorated.call(this, container, $container);
4514
+
4515
+ container.on('select', function (evt) {
4516
+ self._selectTriggered(evt);
4517
+ });
4518
+
4519
+ container.on('unselect', function (evt) {
4520
+ self._selectTriggered(evt);
4521
+ });
4522
+ };
4523
+
4524
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
4525
+ var originalEvent = evt.originalEvent;
4526
+
4527
+ // Don't close if the control key is being held
4528
+ if (originalEvent && originalEvent.ctrlKey) {
4529
+ return;
4530
+ }
4531
+
4532
+ this.trigger('close', {
4533
+ originalEvent: originalEvent,
4534
+ originalSelect2Event: evt
4535
+ });
4536
+ };
4537
+
4538
+ return CloseOnSelect;
4539
+ });
4540
+
4541
+ S2.define('select2/i18n/en',[],function () {
4542
+ // English
4543
+ return {
4544
+ errorLoading: function () {
4545
+ return 'The results could not be loaded.';
4546
+ },
4547
+ inputTooLong: function (args) {
4548
+ var overChars = args.input.length - args.maximum;
4549
+
4550
+ var message = 'Please delete ' + overChars + ' character';
4551
+
4552
+ if (overChars != 1) {
4553
+ message += 's';
4554
+ }
4555
+
4556
+ return message;
4557
+ },
4558
+ inputTooShort: function (args) {
4559
+ var remainingChars = args.minimum - args.input.length;
4560
+
4561
+ var message = 'Please enter ' + remainingChars + ' or more characters';
4562
+
4563
+ return message;
4564
+ },
4565
+ loadingMore: function () {
4566
+ return 'Loading more results…';
4567
+ },
4568
+ maximumSelected: function (args) {
4569
+ var message = 'You can only select ' + args.maximum + ' item';
4570
+
4571
+ if (args.maximum != 1) {
4572
+ message += 's';
4573
+ }
4574
+
4575
+ return message;
4576
+ },
4577
+ noResults: function () {
4578
+ return 'No results found';
4579
+ },
4580
+ searching: function () {
4581
+ return 'Searching…';
4582
+ }
4583
+ };
4584
+ });
4585
+
4586
+ S2.define('select2/defaults',[
4587
+ 'jquery',
4588
+ 'require',
4589
+
4590
+ './results',
4591
+
4592
+ './selection/single',
4593
+ './selection/multiple',
4594
+ './selection/placeholder',
4595
+ './selection/allowClear',
4596
+ './selection/search',
4597
+ './selection/eventRelay',
4598
+
4599
+ './utils',
4600
+ './translation',
4601
+ './diacritics',
4602
+
4603
+ './data/select',
4604
+ './data/array',
4605
+ './data/ajax',
4606
+ './data/tags',
4607
+ './data/tokenizer',
4608
+ './data/minimumInputLength',
4609
+ './data/maximumInputLength',
4610
+ './data/maximumSelectionLength',
4611
+
4612
+ './dropdown',
4613
+ './dropdown/search',
4614
+ './dropdown/hidePlaceholder',
4615
+ './dropdown/infiniteScroll',
4616
+ './dropdown/attachBody',
4617
+ './dropdown/minimumResultsForSearch',
4618
+ './dropdown/selectOnClose',
4619
+ './dropdown/closeOnSelect',
4620
+
4621
+ './i18n/en'
4622
+ ], function ($, require,
4623
+
4624
+ ResultsList,
4625
+
4626
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
4627
+ SelectionSearch, EventRelay,
4628
+
4629
+ Utils, Translation, DIACRITICS,
4630
+
4631
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
4632
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
4633
+
4634
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
4635
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
4636
+
4637
+ EnglishTranslation) {
4638
+ function Defaults () {
4639
+ this.reset();
4640
+ }
4641
+
4642
+ Defaults.prototype.apply = function (options) {
4643
+ options = $.extend(true, {}, this.defaults, options);
4644
+
4645
+ if (options.dataAdapter == null) {
4646
+ if (options.ajax != null) {
4647
+ options.dataAdapter = AjaxData;
4648
+ } else if (options.data != null) {
4649
+ options.dataAdapter = ArrayData;
4650
+ } else {
4651
+ options.dataAdapter = SelectData;
4652
+ }
4653
+
4654
+ if (options.minimumInputLength > 0) {
4655
+ options.dataAdapter = Utils.Decorate(
4656
+ options.dataAdapter,
4657
+ MinimumInputLength
4658
+ );
4659
+ }
4660
+
4661
+ if (options.maximumInputLength > 0) {
4662
+ options.dataAdapter = Utils.Decorate(
4663
+ options.dataAdapter,
4664
+ MaximumInputLength
4665
+ );
4666
+ }
4667
+
4668
+ if (options.maximumSelectionLength > 0) {
4669
+ options.dataAdapter = Utils.Decorate(
4670
+ options.dataAdapter,
4671
+ MaximumSelectionLength
4672
+ );
4673
+ }
4674
+
4675
+ if (options.tags) {
4676
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
4677
+ }
4678
+
4679
+ if (options.tokenSeparators != null || options.tokenizer != null) {
4680
+ options.dataAdapter = Utils.Decorate(
4681
+ options.dataAdapter,
4682
+ Tokenizer
4683
+ );
4684
+ }
4685
+
4686
+ if (options.query != null) {
4687
+ var Query = require(options.amdBase + 'compat/query');
4688
+
4689
+ options.dataAdapter = Utils.Decorate(
4690
+ options.dataAdapter,
4691
+ Query
4692
+ );
4693
+ }
4694
+
4695
+ if (options.initSelection != null) {
4696
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
4697
+
4698
+ options.dataAdapter = Utils.Decorate(
4699
+ options.dataAdapter,
4700
+ InitSelection
4701
+ );
4702
+ }
4703
+ }
4704
+
4705
+ if (options.resultsAdapter == null) {
4706
+ options.resultsAdapter = ResultsList;
4707
+
4708
+ if (options.ajax != null) {
4709
+ options.resultsAdapter = Utils.Decorate(
4710
+ options.resultsAdapter,
4711
+ InfiniteScroll
4712
+ );
4713
+ }
4714
+
4715
+ if (options.placeholder != null) {
4716
+ options.resultsAdapter = Utils.Decorate(
4717
+ options.resultsAdapter,
4718
+ HidePlaceholder
4719
+ );
4720
+ }
4721
+
4722
+ if (options.selectOnClose) {
4723
+ options.resultsAdapter = Utils.Decorate(
4724
+ options.resultsAdapter,
4725
+ SelectOnClose
4726
+ );
4727
+ }
4728
+ }
4729
+
4730
+ if (options.dropdownAdapter == null) {
4731
+ if (options.multiple) {
4732
+ options.dropdownAdapter = Dropdown;
4733
+ } else {
4734
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
4735
+
4736
+ options.dropdownAdapter = SearchableDropdown;
4737
+ }
4738
+
4739
+ if (options.minimumResultsForSearch !== 0) {
4740
+ options.dropdownAdapter = Utils.Decorate(
4741
+ options.dropdownAdapter,
4742
+ MinimumResultsForSearch
4743
+ );
4744
+ }
4745
+
4746
+ if (options.closeOnSelect) {
4747
+ options.dropdownAdapter = Utils.Decorate(
4748
+ options.dropdownAdapter,
4749
+ CloseOnSelect
4750
+ );
4751
+ }
4752
+
4753
+ if (
4754
+ options.dropdownCssClass != null ||
4755
+ options.dropdownCss != null ||
4756
+ options.adaptDropdownCssClass != null
4757
+ ) {
4758
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
4759
+
4760
+ options.dropdownAdapter = Utils.Decorate(
4761
+ options.dropdownAdapter,
4762
+ DropdownCSS
4763
+ );
4764
+ }
4765
+
4766
+ options.dropdownAdapter = Utils.Decorate(
4767
+ options.dropdownAdapter,
4768
+ AttachBody
4769
+ );
4770
+ }
4771
+
4772
+ if (options.selectionAdapter == null) {
4773
+ if (options.multiple) {
4774
+ options.selectionAdapter = MultipleSelection;
4775
+ } else {
4776
+ options.selectionAdapter = SingleSelection;
4777
+ }
4778
+
4779
+ // Add the placeholder mixin if a placeholder was specified
4780
+ if (options.placeholder != null) {
4781
+ options.selectionAdapter = Utils.Decorate(
4782
+ options.selectionAdapter,
4783
+ Placeholder
4784
+ );
4785
+ }
4786
+
4787
+ if (options.allowClear) {
4788
+ options.selectionAdapter = Utils.Decorate(
4789
+ options.selectionAdapter,
4790
+ AllowClear
4791
+ );
4792
+ }
4793
+
4794
+ if (options.multiple) {
4795
+ options.selectionAdapter = Utils.Decorate(
4796
+ options.selectionAdapter,
4797
+ SelectionSearch
4798
+ );
4799
+ }
4800
+
4801
+ if (
4802
+ options.containerCssClass != null ||
4803
+ options.containerCss != null ||
4804
+ options.adaptContainerCssClass != null
4805
+ ) {
4806
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
4807
+
4808
+ options.selectionAdapter = Utils.Decorate(
4809
+ options.selectionAdapter,
4810
+ ContainerCSS
4811
+ );
4812
+ }
4813
+
4814
+ options.selectionAdapter = Utils.Decorate(
4815
+ options.selectionAdapter,
4816
+ EventRelay
4817
+ );
4818
+ }
4819
+
4820
+ if (typeof options.language === 'string') {
4821
+ // Check if the language is specified with a region
4822
+ if (options.language.indexOf('-') > 0) {
4823
+ // Extract the region information if it is included
4824
+ var languageParts = options.language.split('-');
4825
+ var baseLanguage = languageParts[0];
4826
+
4827
+ options.language = [options.language, baseLanguage];
4828
+ } else {
4829
+ options.language = [options.language];
4830
+ }
4831
+ }
4832
+
4833
+ if ($.isArray(options.language)) {
4834
+ var languages = new Translation();
4835
+ options.language.push('en');
4836
+
4837
+ var languageNames = options.language;
4838
+
4839
+ for (var l = 0; l < languageNames.length; l++) {
4840
+ var name = languageNames[l];
4841
+ var language = {};
4842
+
4843
+ try {
4844
+ // Try to load it with the original name
4845
+ language = Translation.loadPath(name);
4846
+ } catch (e) {
4847
+ try {
4848
+ // If we couldn't load it, check if it wasn't the full path
4849
+ name = this.defaults.amdLanguageBase + name;
4850
+ language = Translation.loadPath(name);
4851
+ } catch (ex) {
4852
+ // The translation could not be loaded at all. Sometimes this is
4853
+ // because of a configuration problem, other times this can be
4854
+ // because of how Select2 helps load all possible translation files.
4855
+ if (options.debug && window.console && console.warn) {
4856
+ console.warn(
4857
+ 'Select2: The language file for "' + name + '" could not be ' +
4858
+ 'automatically loaded. A fallback will be used instead.'
4859
+ );
4860
+ }
4861
+
4862
+ continue;
4863
+ }
4864
+ }
4865
+
4866
+ languages.extend(language);
4867
+ }
4868
+
4869
+ options.translations = languages;
4870
+ } else {
4871
+ var baseTranslation = Translation.loadPath(
4872
+ this.defaults.amdLanguageBase + 'en'
4873
+ );
4874
+ var customTranslation = new Translation(options.language);
4875
+
4876
+ customTranslation.extend(baseTranslation);
4877
+
4878
+ options.translations = customTranslation;
4879
+ }
4880
+
4881
+ return options;
4882
+ };
4883
+
4884
+ Defaults.prototype.reset = function () {
4885
+ function stripDiacritics (text) {
4886
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
4887
+ function match(a) {
4888
+ return DIACRITICS[a] || a;
4889
+ }
4890
+
4891
+ return text.replace(/[^\u0000-\u007E]/g, match);
4892
+ }
4893
+
4894
+ function matcher (params, data) {
4895
+ // Always return the object if there is nothing to compare
4896
+ if ($.trim(params.term) === '') {
4897
+ return data;
4898
+ }
4899
+
4900
+ // Do a recursive check for options with children
4901
+ if (data.children && data.children.length > 0) {
4902
+ // Clone the data object if there are children
4903
+ // This is required as we modify the object to remove any non-matches
4904
+ var match = $.extend(true, {}, data);
4905
+
4906
+ // Check each child of the option
4907
+ for (var c = data.children.length - 1; c >= 0; c--) {
4908
+ var child = data.children[c];
4909
+
4910
+ var matches = matcher(params, child);
4911
+
4912
+ // If there wasn't a match, remove the object in the array
4913
+ if (matches == null) {
4914
+ match.children.splice(c, 1);
4915
+ }
4916
+ }
4917
+
4918
+ // If any children matched, return the new object
4919
+ if (match.children.length > 0) {
4920
+ return match;
4921
+ }
4922
+
4923
+ // If there were no matching children, check just the plain object
4924
+ return matcher(params, match);
4925
+ }
4926
+
4927
+ var original = stripDiacritics(data.text).toUpperCase();
4928
+ var term = stripDiacritics(params.term).toUpperCase();
4929
+
4930
+ // Check if the text contains the term
4931
+ if (original.indexOf(term) > -1) {
4932
+ return data;
4933
+ }
4934
+
4935
+ // If it doesn't contain the term, don't return anything
4936
+ return null;
4937
+ }
4938
+
4939
+ this.defaults = {
4940
+ amdBase: './',
4941
+ amdLanguageBase: './i18n/',
4942
+ closeOnSelect: true,
4943
+ debug: false,
4944
+ dropdownAutoWidth: false,
4945
+ escapeMarkup: Utils.escapeMarkup,
4946
+ language: EnglishTranslation,
4947
+ matcher: matcher,
4948
+ minimumInputLength: 0,
4949
+ maximumInputLength: 0,
4950
+ maximumSelectionLength: 0,
4951
+ minimumResultsForSearch: 0,
4952
+ selectOnClose: false,
4953
+ sorter: function (data) {
4954
+ return data;
4955
+ },
4956
+ templateResult: function (result) {
4957
+ return result.text;
4958
+ },
4959
+ templateSelection: function (selection) {
4960
+ return selection.text;
4961
+ },
4962
+ theme: 'default',
4963
+ width: 'resolve'
4964
+ };
4965
+ };
4966
+
4967
+ Defaults.prototype.set = function (key, value) {
4968
+ var camelKey = $.camelCase(key);
4969
+
4970
+ var data = {};
4971
+ data[camelKey] = value;
4972
+
4973
+ var convertedData = Utils._convertData(data);
4974
+
4975
+ $.extend(this.defaults, convertedData);
4976
+ };
4977
+
4978
+ var defaults = new Defaults();
4979
+
4980
+ return defaults;
4981
+ });
4982
+
4983
+ S2.define('select2/options',[
4984
+ 'require',
4985
+ 'jquery',
4986
+ './defaults',
4987
+ './utils'
4988
+ ], function (require, $, Defaults, Utils) {
4989
+ function Options (options, $element) {
4990
+ this.options = options;
4991
+
4992
+ if ($element != null) {
4993
+ this.fromElement($element);
4994
+ }
4995
+
4996
+ this.options = Defaults.apply(this.options);
4997
+
4998
+ if ($element && $element.is('input')) {
4999
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
5000
+
5001
+ this.options.dataAdapter = Utils.Decorate(
5002
+ this.options.dataAdapter,
5003
+ InputCompat
5004
+ );
5005
+ }
5006
+ }
5007
+
5008
+ Options.prototype.fromElement = function ($e) {
5009
+ var excludedData = ['select2'];
5010
+
5011
+ if (this.options.multiple == null) {
5012
+ this.options.multiple = $e.prop('multiple');
5013
+ }
5014
+
5015
+ if (this.options.disabled == null) {
5016
+ this.options.disabled = $e.prop('disabled');
5017
+ }
5018
+
5019
+ if (this.options.language == null) {
5020
+ if ($e.prop('lang')) {
5021
+ this.options.language = $e.prop('lang').toLowerCase();
5022
+ } else if ($e.closest('[lang]').prop('lang')) {
5023
+ this.options.language = $e.closest('[lang]').prop('lang');
5024
+ }
5025
+ }
5026
+
5027
+ if (this.options.dir == null) {
5028
+ if ($e.prop('dir')) {
5029
+ this.options.dir = $e.prop('dir');
5030
+ } else if ($e.closest('[dir]').prop('dir')) {
5031
+ this.options.dir = $e.closest('[dir]').prop('dir');
5032
+ } else {
5033
+ this.options.dir = 'ltr';
5034
+ }
5035
+ }
5036
+
5037
+ $e.prop('disabled', this.options.disabled);
5038
+ $e.prop('multiple', this.options.multiple);
5039
+
5040
+ if ($e.data('select2Tags')) {
5041
+ if (this.options.debug && window.console && console.warn) {
5042
+ console.warn(
5043
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
5044
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
5045
+ 'removed in future versions of Select2.'
5046
+ );
5047
+ }
5048
+
5049
+ $e.data('data', $e.data('select2Tags'));
5050
+ $e.data('tags', true);
5051
+ }
5052
+
5053
+ if ($e.data('ajaxUrl')) {
5054
+ if (this.options.debug && window.console && console.warn) {
5055
+ console.warn(
5056
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
5057
+ '`data-ajax--url` and support for the old attribute will be removed' +
5058
+ ' in future versions of Select2.'
5059
+ );
5060
+ }
5061
+
5062
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
5063
+ $e.data('ajax--url', $e.data('ajaxUrl'));
5064
+ }
5065
+
5066
+ var dataset = {};
5067
+
5068
+ // Prefer the element's `dataset` attribute if it exists
5069
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
5070
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
5071
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
5072
+ } else {
5073
+ dataset = $e.data();
5074
+ }
5075
+
5076
+ var data = $.extend(true, {}, dataset);
5077
+
5078
+ data = Utils._convertData(data);
5079
+
5080
+ for (var key in data) {
5081
+ if ($.inArray(key, excludedData) > -1) {
5082
+ continue;
5083
+ }
5084
+
5085
+ if ($.isPlainObject(this.options[key])) {
5086
+ $.extend(this.options[key], data[key]);
5087
+ } else {
5088
+ this.options[key] = data[key];
5089
+ }
5090
+ }
5091
+
5092
+ return this;
5093
+ };
5094
+
5095
+ Options.prototype.get = function (key) {
5096
+ return this.options[key];
5097
+ };
5098
+
5099
+ Options.prototype.set = function (key, val) {
5100
+ this.options[key] = val;
5101
+ };
5102
+
5103
+ return Options;
5104
+ });
5105
+
5106
+ S2.define('select2/core',[
5107
+ 'jquery',
5108
+ './options',
5109
+ './utils',
5110
+ './keys'
5111
+ ], function ($, Options, Utils, KEYS) {
5112
+ var Select2 = function ($element, options) {
5113
+ if ($element.data('select2') != null) {
5114
+ $element.data('select2').destroy();
5115
+ }
5116
+
5117
+ this.$element = $element;
5118
+
5119
+ this.id = this._generateId($element);
5120
+
5121
+ options = options || {};
5122
+
5123
+ this.options = new Options(options, $element);
5124
+
5125
+ Select2.__super__.constructor.call(this);
5126
+
5127
+ // Set up the tabindex
5128
+
5129
+ var tabindex = $element.attr('tabindex') || 0;
5130
+ $element.data('old-tabindex', tabindex);
5131
+ $element.attr('tabindex', '-1');
5132
+
5133
+ // Set up containers and adapters
5134
+
5135
+ var DataAdapter = this.options.get('dataAdapter');
5136
+ this.dataAdapter = new DataAdapter($element, this.options);
5137
+
5138
+ var $container = this.render();
5139
+
5140
+ this._placeContainer($container);
5141
+
5142
+ var SelectionAdapter = this.options.get('selectionAdapter');
5143
+ this.selection = new SelectionAdapter($element, this.options);
5144
+ this.$selection = this.selection.render();
5145
+
5146
+ this.selection.position(this.$selection, $container);
5147
+
5148
+ var DropdownAdapter = this.options.get('dropdownAdapter');
5149
+ this.dropdown = new DropdownAdapter($element, this.options);
5150
+ this.$dropdown = this.dropdown.render();
5151
+
5152
+ this.dropdown.position(this.$dropdown, $container);
5153
+
5154
+ var ResultsAdapter = this.options.get('resultsAdapter');
5155
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
5156
+ this.$results = this.results.render();
5157
+
5158
+ this.results.position(this.$results, this.$dropdown);
5159
+
5160
+ // Bind events
5161
+
5162
+ var self = this;
5163
+
5164
+ // Bind the container to all of the adapters
5165
+ this._bindAdapters();
5166
+
5167
+ // Register any DOM event handlers
5168
+ this._registerDomEvents();
5169
+
5170
+ // Register any internal event handlers
5171
+ this._registerDataEvents();
5172
+ this._registerSelectionEvents();
5173
+ this._registerDropdownEvents();
5174
+ this._registerResultsEvents();
5175
+ this._registerEvents();
5176
+
5177
+ // Set the initial state
5178
+ this.dataAdapter.current(function (initialData) {
5179
+ self.trigger('selection:update', {
5180
+ data: initialData
5181
+ });
5182
+ });
5183
+
5184
+ // Hide the original select
5185
+ $element.addClass('select2-hidden-accessible');
5186
+ $element.attr('aria-hidden', 'true');
5187
+
5188
+ // Synchronize any monitored attributes
5189
+ this._syncAttributes();
5190
+
5191
+ $element.data('select2', this);
5192
+ };
5193
+
5194
+ Utils.Extend(Select2, Utils.Observable);
5195
+
5196
+ Select2.prototype._generateId = function ($element) {
5197
+ var id = '';
5198
+
5199
+ if ($element.attr('id') != null) {
5200
+ id = $element.attr('id');
5201
+ } else if ($element.attr('name') != null) {
5202
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
5203
+ } else {
5204
+ id = Utils.generateChars(4);
5205
+ }
5206
+
5207
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
5208
+ id = 'select2-' + id;
5209
+
5210
+ return id;
5211
+ };
5212
+
5213
+ Select2.prototype._placeContainer = function ($container) {
5214
+ $container.insertAfter(this.$element);
5215
+
5216
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
5217
+
5218
+ if (width != null) {
5219
+ $container.css('width', width);
5220
+ }
5221
+ };
5222
+
5223
+ Select2.prototype._resolveWidth = function ($element, method) {
5224
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
5225
+
5226
+ if (method == 'resolve') {
5227
+ var styleWidth = this._resolveWidth($element, 'style');
5228
+
5229
+ if (styleWidth != null) {
5230
+ return styleWidth;
5231
+ }
5232
+
5233
+ return this._resolveWidth($element, 'element');
5234
+ }
5235
+
5236
+ if (method == 'element') {
5237
+ var elementWidth = $element.outerWidth(false);
5238
+
5239
+ if (elementWidth <= 0) {
5240
+ return 'auto';
5241
+ }
5242
+
5243
+ return elementWidth + 'px';
5244
+ }
5245
+
5246
+ if (method == 'style') {
5247
+ var style = $element.attr('style');
5248
+
5249
+ if (typeof(style) !== 'string') {
5250
+ return null;
5251
+ }
5252
+
5253
+ var attrs = style.split(';');
5254
+
5255
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
5256
+ var attr = attrs[i].replace(/\s/g, '');
5257
+ var matches = attr.match(WIDTH);
5258
+
5259
+ if (matches !== null && matches.length >= 1) {
5260
+ return matches[1];
5261
+ }
5262
+ }
5263
+
5264
+ return null;
5265
+ }
5266
+
5267
+ return method;
5268
+ };
5269
+
5270
+ Select2.prototype._bindAdapters = function () {
5271
+ this.dataAdapter.bind(this, this.$container);
5272
+ this.selection.bind(this, this.$container);
5273
+
5274
+ this.dropdown.bind(this, this.$container);
5275
+ this.results.bind(this, this.$container);
5276
+ };
5277
+
5278
+ Select2.prototype._registerDomEvents = function () {
5279
+ var self = this;
5280
+
5281
+ this.$element.on('change.select2', function () {
5282
+ self.dataAdapter.current(function (data) {
5283
+ self.trigger('selection:update', {
5284
+ data: data
5285
+ });
5286
+ });
5287
+ });
5288
+
5289
+ this.$element.on('focus.select2', function (evt) {
5290
+ self.trigger('focus', evt);
5291
+ });
5292
+
5293
+ this._syncA = Utils.bind(this._syncAttributes, this);
5294
+ this._syncS = Utils.bind(this._syncSubtree, this);
5295
+
5296
+ if (this.$element[0].attachEvent) {
5297
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
5298
+ }
5299
+
5300
+ var observer = window.MutationObserver ||
5301
+ window.WebKitMutationObserver ||
5302
+ window.MozMutationObserver
5303
+ ;
5304
+
5305
+ if (observer != null) {
5306
+ this._observer = new observer(function (mutations) {
5307
+ $.each(mutations, self._syncA);
5308
+ $.each(mutations, self._syncS);
5309
+ });
5310
+ this._observer.observe(this.$element[0], {
5311
+ attributes: true,
5312
+ childList: true,
5313
+ subtree: false
5314
+ });
5315
+ } else if (this.$element[0].addEventListener) {
5316
+ this.$element[0].addEventListener(
5317
+ 'DOMAttrModified',
5318
+ self._syncA,
5319
+ false
5320
+ );
5321
+ this.$element[0].addEventListener(
5322
+ 'DOMNodeInserted',
5323
+ self._syncS,
5324
+ false
5325
+ );
5326
+ this.$element[0].addEventListener(
5327
+ 'DOMNodeRemoved',
5328
+ self._syncS,
5329
+ false
5330
+ );
5331
+ }
5332
+ };
5333
+
5334
+ Select2.prototype._registerDataEvents = function () {
5335
+ var self = this;
5336
+
5337
+ this.dataAdapter.on('*', function (name, params) {
5338
+ self.trigger(name, params);
5339
+ });
5340
+ };
5341
+
5342
+ Select2.prototype._registerSelectionEvents = function () {
5343
+ var self = this;
5344
+ var nonRelayEvents = ['toggle', 'focus'];
5345
+
5346
+ this.selection.on('toggle', function () {
5347
+ self.toggleDropdown();
5348
+ });
5349
+
5350
+ this.selection.on('focus', function (params) {
5351
+ self.focus(params);
5352
+ });
5353
+
5354
+ this.selection.on('*', function (name, params) {
5355
+ if ($.inArray(name, nonRelayEvents) !== -1) {
5356
+ return;
5357
+ }
5358
+
5359
+ self.trigger(name, params);
5360
+ });
5361
+ };
5362
+
5363
+ Select2.prototype._registerDropdownEvents = function () {
5364
+ var self = this;
5365
+
5366
+ this.dropdown.on('*', function (name, params) {
5367
+ self.trigger(name, params);
5368
+ });
5369
+ };
5370
+
5371
+ Select2.prototype._registerResultsEvents = function () {
5372
+ var self = this;
5373
+
5374
+ this.results.on('*', function (name, params) {
5375
+ self.trigger(name, params);
5376
+ });
5377
+ };
5378
+
5379
+ Select2.prototype._registerEvents = function () {
5380
+ var self = this;
5381
+
5382
+ this.on('open', function () {
5383
+ self.$container.addClass('select2-container--open');
5384
+ });
5385
+
5386
+ this.on('close', function () {
5387
+ self.$container.removeClass('select2-container--open');
5388
+ });
5389
+
5390
+ this.on('enable', function () {
5391
+ self.$container.removeClass('select2-container--disabled');
5392
+ });
5393
+
5394
+ this.on('disable', function () {
5395
+ self.$container.addClass('select2-container--disabled');
5396
+ });
5397
+
5398
+ this.on('blur', function () {
5399
+ self.$container.removeClass('select2-container--focus');
5400
+ });
5401
+
5402
+ this.on('query', function (params) {
5403
+ if (!self.isOpen()) {
5404
+ self.trigger('open', {});
5405
+ }
5406
+
5407
+ this.dataAdapter.query(params, function (data) {
5408
+ self.trigger('results:all', {
5409
+ data: data,
5410
+ query: params
5411
+ });
5412
+ });
5413
+ });
5414
+
5415
+ this.on('query:append', function (params) {
5416
+ this.dataAdapter.query(params, function (data) {
5417
+ self.trigger('results:append', {
5418
+ data: data,
5419
+ query: params
5420
+ });
5421
+ });
5422
+ });
5423
+
5424
+ this.on('open', function(){
5425
+ // Focus on the active element when opening dropdown.
5426
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
5427
+ setTimeout(function(){
5428
+ self.focusOnActiveElement();
5429
+ }, 1);
5430
+ });
5431
+
5432
+ $(document).on('keydown', function (evt) {
5433
+ var key = evt.which;
5434
+ if (self.isOpen()) {
5435
+ if (key === KEYS.ESC || key === KEYS.TAB ||
5436
+ (key === KEYS.UP && evt.altKey)) {
5437
+ self.close();
5438
+
5439
+ evt.preventDefault();
5440
+ } else if (key === KEYS.ENTER) {
5441
+ self.trigger('results:select', {});
5442
+
5443
+ evt.preventDefault();
5444
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5445
+ self.trigger('results:toggle', {});
5446
+
5447
+ evt.preventDefault();
5448
+ } else if (key === KEYS.UP) {
5449
+ self.trigger('results:previous', {});
5450
+
5451
+ evt.preventDefault();
5452
+ } else if (key === KEYS.DOWN) {
5453
+ self.trigger('results:next', {});
5454
+
5455
+ evt.preventDefault();
5456
+ }
5457
+
5458
+ // Move the focus to the selected element on keyboard navigation.
5459
+ // Required for screen readers to work properly.
5460
+ if (key === KEYS.DOWN || key === KEYS.UP) {
5461
+ self.focusOnActiveElement();
5462
+ } else {
5463
+ // Focus on the search if user starts typing.
5464
+ var $searchField = self.$dropdown.find('.select2-search__field');
5465
+ if (! $searchField.length) {
5466
+ $searchField = self.$container.find('.select2-search__field');
5467
+ }
5468
+ $searchField.focus();
5469
+ // Focus back to active selection when finished typing.
5470
+ // Small delay so typed character can be read by screen reader.
5471
+ setTimeout(function(){
5472
+ self.focusOnActiveElement();
5473
+ }, 1000);
5474
+ }
5475
+
5476
+ } else if (self.hasFocus()) {
5477
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
5478
+ (key === KEYS.DOWN && evt.altKey)) {
5479
+ self.open();
5480
+ evt.preventDefault();
5481
+ }
5482
+ }
5483
+ });
5484
+ };
5485
+
5486
+ Select2.prototype.focusOnActiveElement = function () {
5487
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
5488
+ if (! Utils.isTouchscreen()) {
5489
+ this.$results.find('li.select2-results__option--highlighted').focus();
5490
+ }
5491
+ };
5492
+
5493
+ Select2.prototype._syncAttributes = function () {
5494
+ this.options.set('disabled', this.$element.prop('disabled'));
5495
+
5496
+ if (this.options.get('disabled')) {
5497
+ if (this.isOpen()) {
5498
+ this.close();
5499
+ }
5500
+
5501
+ this.trigger('disable', {});
5502
+ } else {
5503
+ this.trigger('enable', {});
5504
+ }
5505
+ };
5506
+
5507
+ Select2.prototype._syncSubtree = function (evt, mutations) {
5508
+ var changed = false;
5509
+ var self = this;
5510
+
5511
+ // Ignore any mutation events raised for elements that aren't options or
5512
+ // optgroups. This handles the case when the select element is destroyed
5513
+ if (
5514
+ evt && evt.target && (
5515
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
5516
+ )
5517
+ ) {
5518
+ return;
5519
+ }
5520
+
5521
+ if (!mutations) {
5522
+ // If mutation events aren't supported, then we can only assume that the
5523
+ // change affected the selections
5524
+ changed = true;
5525
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
5526
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
5527
+ var node = mutations.addedNodes[n];
5528
+
5529
+ if (node.selected) {
5530
+ changed = true;
5531
+ }
5532
+ }
5533
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
5534
+ changed = true;
5535
+ }
5536
+
5537
+ // Only re-pull the data if we think there is a change
5538
+ if (changed) {
5539
+ this.dataAdapter.current(function (currentData) {
5540
+ self.trigger('selection:update', {
5541
+ data: currentData
5542
+ });
5543
+ });
5544
+ }
5545
+ };
5546
+
5547
+ /**
5548
+ * Override the trigger method to automatically trigger pre-events when
5549
+ * there are events that can be prevented.
5550
+ */
5551
+ Select2.prototype.trigger = function (name, args) {
5552
+ var actualTrigger = Select2.__super__.trigger;
5553
+ var preTriggerMap = {
5554
+ 'open': 'opening',
5555
+ 'close': 'closing',
5556
+ 'select': 'selecting',
5557
+ 'unselect': 'unselecting'
5558
+ };
5559
+
5560
+ if (args === undefined) {
5561
+ args = {};
5562
+ }
5563
+
5564
+ if (name in preTriggerMap) {
5565
+ var preTriggerName = preTriggerMap[name];
5566
+ var preTriggerArgs = {
5567
+ prevented: false,
5568
+ name: name,
5569
+ args: args
5570
+ };
5571
+
5572
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
5573
+
5574
+ if (preTriggerArgs.prevented) {
5575
+ args.prevented = true;
5576
+
5577
+ return;
5578
+ }
5579
+ }
5580
+
5581
+ actualTrigger.call(this, name, args);
5582
+ };
5583
+
5584
+ Select2.prototype.toggleDropdown = function () {
5585
+ if (this.options.get('disabled')) {
5586
+ return;
5587
+ }
5588
+
5589
+ if (this.isOpen()) {
5590
+ this.close();
5591
+ } else {
5592
+ this.open();
5593
+ }
5594
+ };
5595
+
5596
+ Select2.prototype.open = function () {
5597
+ if (this.isOpen()) {
5598
+ return;
5599
+ }
5600
+
5601
+ this.trigger('query', {});
5602
+ };
5603
+
5604
+ Select2.prototype.close = function () {
5605
+ if (!this.isOpen()) {
5606
+ return;
5607
+ }
5608
+
5609
+ this.trigger('close', {});
5610
+ };
5611
+
5612
+ Select2.prototype.isOpen = function () {
5613
+ return this.$container.hasClass('select2-container--open');
5614
+ };
5615
+
5616
+ Select2.prototype.hasFocus = function () {
5617
+ return this.$container.hasClass('select2-container--focus');
5618
+ };
5619
+
5620
+ Select2.prototype.focus = function (data) {
5621
+ // No need to re-trigger focus events if we are already focused
5622
+ if (this.hasFocus()) {
5623
+ return;
5624
+ }
5625
+
5626
+ this.$container.addClass('select2-container--focus');
5627
+ this.trigger('focus', {});
5628
+ };
5629
+
5630
+ Select2.prototype.enable = function (args) {
5631
+ if (this.options.get('debug') && window.console && console.warn) {
5632
+ console.warn(
5633
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
5634
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
5635
+ ' instead.'
5636
+ );
5637
+ }
5638
+
5639
+ if (args == null || args.length === 0) {
5640
+ args = [true];
5641
+ }
5642
+
5643
+ var disabled = !args[0];
5644
+
5645
+ this.$element.prop('disabled', disabled);
5646
+ };
5647
+
5648
+ Select2.prototype.data = function () {
5649
+ if (this.options.get('debug') &&
5650
+ arguments.length > 0 && window.console && console.warn) {
5651
+ console.warn(
5652
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
5653
+ 'should consider setting the value instead using `$element.val()`.'
5654
+ );
5655
+ }
5656
+
5657
+ var data = [];
5658
+
5659
+ this.dataAdapter.current(function (currentData) {
5660
+ data = currentData;
5661
+ });
5662
+
5663
+ return data;
5664
+ };
5665
+
5666
+ Select2.prototype.val = function (args) {
5667
+ if (this.options.get('debug') && window.console && console.warn) {
5668
+ console.warn(
5669
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
5670
+ ' removed in later Select2 versions. Use $element.val() instead.'
5671
+ );
5672
+ }
5673
+
5674
+ if (args == null || args.length === 0) {
5675
+ return this.$element.val();
5676
+ }
5677
+
5678
+ var newVal = args[0];
5679
+
5680
+ if ($.isArray(newVal)) {
5681
+ newVal = $.map(newVal, function (obj) {
5682
+ return obj.toString();
5683
+ });
5684
+ }
5685
+
5686
+ this.$element.val(newVal).trigger('change');
5687
+ };
5688
+
5689
+ Select2.prototype.destroy = function () {
5690
+ this.$container.remove();
5691
+
5692
+ if (this.$element[0].detachEvent) {
5693
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
5694
+ }
5695
+
5696
+ if (this._observer != null) {
5697
+ this._observer.disconnect();
5698
+ this._observer = null;
5699
+ } else if (this.$element[0].removeEventListener) {
5700
+ this.$element[0]
5701
+ .removeEventListener('DOMAttrModified', this._syncA, false);
5702
+ this.$element[0]
5703
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
5704
+ this.$element[0]
5705
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
5706
+ }
5707
+
5708
+ this._syncA = null;
5709
+ this._syncS = null;
5710
+
5711
+ this.$element.off('.select2');
5712
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5713
+
5714
+ this.$element.removeClass('select2-hidden-accessible');
5715
+ this.$element.attr('aria-hidden', 'false');
5716
+ this.$element.removeData('select2');
5717
+
5718
+ this.dataAdapter.destroy();
5719
+ this.selection.destroy();
5720
+ this.dropdown.destroy();
5721
+ this.results.destroy();
5722
+
5723
+ this.dataAdapter = null;
5724
+ this.selection = null;
5725
+ this.dropdown = null;
5726
+ this.results = null;
5727
+ };
5728
+
5729
+ Select2.prototype.render = function () {
5730
+ var $container = $(
5731
+ '<span class="select2 select2-container">' +
5732
+ '<span class="selection"></span>' +
5733
+ '<span class="dropdown-wrapper" aria-hidden="true"></span>' +
5734
+ '</span>'
5735
+ );
5736
+
5737
+ $container.attr('dir', this.options.get('dir'));
5738
+
5739
+ this.$container = $container;
5740
+
5741
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
5742
+
5743
+ $container.data('element', this.$element);
5744
+
5745
+ return $container;
5746
+ };
5747
+
5748
+ return Select2;
5749
+ });
5750
+
5751
+ S2.define('jquery-mousewheel',[
5752
+ 'jquery'
5753
+ ], function ($) {
5754
+ // Used to shim jQuery.mousewheel for non-full builds.
5755
+ return $;
5756
+ });
5757
+
5758
+ S2.define('jquery.select2',[
5759
+ 'jquery',
5760
+ 'jquery-mousewheel',
5761
+
5762
+ './select2/core',
5763
+ './select2/defaults'
5764
+ ], function ($, _, Select2, Defaults) {
5765
+ if ($.fn.selectWoo == null) {
5766
+ // All methods that should return the element
5767
+ var thisMethods = ['open', 'close', 'destroy'];
5768
+
5769
+ $.fn.selectWoo = function (options) {
5770
+ options = options || {};
5771
+
5772
+ if (typeof options === 'object') {
5773
+ this.each(function () {
5774
+ var instanceOptions = $.extend(true, {}, options);
5775
+
5776
+ var instance = new Select2($(this), instanceOptions);
5777
+ });
5778
+
5779
+ return this;
5780
+ } else if (typeof options === 'string') {
5781
+ var ret;
5782
+ var args = Array.prototype.slice.call(arguments, 1);
5783
+
5784
+ this.each(function () {
5785
+ var instance = $(this).data('select2');
5786
+
5787
+ if (instance == null && window.console && console.error) {
5788
+ console.error(
5789
+ 'The select2(\'' + options + '\') method was called on an ' +
5790
+ 'element that is not using Select2.'
5791
+ );
5792
+ }
5793
+
5794
+ ret = instance[options].apply(instance, args);
5795
+ });
5796
+
5797
+ // Check if we should be returning `this`
5798
+ if ($.inArray(options, thisMethods) > -1) {
5799
+ return this;
5800
+ }
5801
+
5802
+ return ret;
5803
+ } else {
5804
+ throw new Error('Invalid arguments for Select2: ' + options);
5805
+ }
5806
+ };
5807
+ }
5808
+
5809
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
5810
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
5811
+ }
5812
+
5813
+ if ($.fn.selectWoo.defaults == null) {
5814
+ $.fn.selectWoo.defaults = Defaults;
5815
+ }
5816
+
5817
+ // Also register selectWoo under select2 if select2 is not already present.
5818
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
5819
+
5820
+ return Select2;
5821
+ });
5822
+
5823
+ // Return the AMD loader configuration so it can be used outside of this file
5824
+ return {
5825
+ define: S2.define,
5826
+ require: S2.require
5827
+ };
5828
+ }());
5829
+
5830
+ // Autoload the jQuery bindings
5831
+ // We know that all of the modules exist above this, so we're safe
5832
+ var select2 = S2.require('jquery.select2');
5833
+
5834
+ // Hold the AMD module references on the jQuery function that was just loaded
5835
+ // This allows Select2 to use the internal loader outside of this file, such
5836
+ // as in the language files.
5837
+ jQuery.fn.select2.amd = S2;
5838
+ jQuery.fn.selectWoo.amd = S2;
5839
+
5840
+ // Return the Select2 instance for anyone who is importing it.
5841
+ return select2;
5842
+ }));
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/select2.min.js ADDED
@@ -0,0 +1 @@
 
1
+ /*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(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 v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[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=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[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 a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.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?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,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(r,a)||e(s,a)||(s[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){"function"==typeof b[d]&&("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(){return Array.prototype.unshift.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;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).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||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},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.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},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="listbox" tabindex="-1"></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="alert" 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){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[data-selected]"),b=a.filter("[data-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()});b.$results.find(".select2-results__option[data-selected]").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("data-selected","true"):b.attr("data-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:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-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";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k<b.children.length;k++){var l=b.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}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("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-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):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-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").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),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[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-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),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&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(){return{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}}),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" 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,a.id+"-results");this.options.get("minimumResultsForSearch");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"),window.setTimeout(function(){d.$selection.focus()},1),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");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").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).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),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");return this.options.get("escapeMarkup")(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" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></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");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation" aria-hidden="true">&times;</span></li>')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e<a.length;e++){var f=a[e],g=this.selectionContainer(),h=this.display(f,g).trim();g.append(h),g.prop("title",f.title||f.text),g.data("data",f),d.push(g)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,d),void 0!==this.$search&&setTimeout(function(){b.$search.focus()},1)}},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;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},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="text" 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,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),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.data._resultId)}),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){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"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{a=.75*(this.$search.val().length+1)+"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(){return{"Ⓐ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),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="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},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");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")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");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;this.$element.children().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),void 0!==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(null!=(b=c.data(a[0],"data")))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&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(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),e.container.focusOnActiveElement()},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);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);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){this._lastTag;this.$element.find("option[data-select2-tag]").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);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}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){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});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){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});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;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});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="text" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";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.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),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){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},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){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&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="option" 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;this.$container.parents().filter(b.hasScroll).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)&&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){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},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()}return 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(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){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 O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}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--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-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)},new D}),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 e<=0?"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;h<i;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 b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},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},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.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=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&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
includes/customizer/vendors/kirki/assets/vendor/selectWoo/js/selectWoo.full.js ADDED
@@ -0,0 +1,6553 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * SelectWoo 1.0.1
3
+ * https://github.com/woocommerce/selectWoo
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/woocommerce/selectWoo/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 module === 'object' && module.exports) {
13
+ // Node/CommonJS
14
+ module.exports = function (root, jQuery) {
15
+ if (jQuery === undefined) {
16
+ // require('jQuery') returns a factory that requires window to
17
+ // build a jQuery instance, we normalize how we use modules
18
+ // that require this pattern but the window provided is a noop
19
+ // if it's defined (how jquery works)
20
+ if (typeof window !== 'undefined') {
21
+ jQuery = require('jquery');
22
+ }
23
+ else {
24
+ jQuery = require('jquery')(root);
25
+ }
26
+ }
27
+ factory(jQuery);
28
+ return jQuery;
29
+ };
30
+ } else {
31
+ // Browser globals
32
+ factory(jQuery);
33
+ }
34
+ } (function (jQuery) {
35
+ // This is needed so we can catch the AMD loader configuration and use it
36
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
37
+ // returns the AMD loader references.
38
+ var S2 =(function () {
39
+ // Restore the Select2 AMD loader so it can be used
40
+ // Needed mostly in the language files, where the loader is not inserted
41
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
42
+ var S2 = jQuery.fn.select2.amd;
43
+ }
44
+ var S2;(function () { if (!S2 || !S2.requirejs) {
45
+ if (!S2) { S2 = {}; } else { require = S2; }
46
+ /**
47
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
48
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
49
+ */
50
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
51
+ //be followed.
52
+ /*global setTimeout: false */
53
+
54
+ var requirejs, require, define;
55
+ (function (undef) {
56
+ var main, req, makeMap, handlers,
57
+ defined = {},
58
+ waiting = {},
59
+ config = {},
60
+ defining = {},
61
+ hasOwn = Object.prototype.hasOwnProperty,
62
+ aps = [].slice,
63
+ jsSuffixRegExp = /\.js$/;
64
+
65
+ function hasProp(obj, prop) {
66
+ return hasOwn.call(obj, prop);
67
+ }
68
+
69
+ /**
70
+ * Given a relative module name, like ./something, normalize it to
71
+ * a real name that can be mapped to a path.
72
+ * @param {String} name the relative name
73
+ * @param {String} baseName a real name that the name arg is relative
74
+ * to.
75
+ * @returns {String} normalized name
76
+ */
77
+ function normalize(name, baseName) {
78
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
79
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
80
+ baseParts = baseName && baseName.split("/"),
81
+ map = config.map,
82
+ starMap = (map && map['*']) || {};
83
+
84
+ //Adjust any relative paths.
85
+ if (name) {
86
+ name = name.split('/');
87
+ lastIndex = name.length - 1;
88
+
89
+ // If wanting node ID compatibility, strip .js from end
90
+ // of IDs. Have to do this here, and not in nameToUrl
91
+ // because node allows either .js or non .js to map
92
+ // to same file.
93
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
94
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
95
+ }
96
+
97
+ // Starts with a '.' so need the baseName
98
+ if (name[0].charAt(0) === '.' && baseParts) {
99
+ //Convert baseName to array, and lop off the last part,
100
+ //so that . matches that 'directory' and not name of the baseName's
101
+ //module. For instance, baseName of 'one/two/three', maps to
102
+ //'one/two/three.js', but we want the directory, 'one/two' for
103
+ //this normalization.
104
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
105
+ name = normalizedBaseParts.concat(name);
106
+ }
107
+
108
+ //start trimDots
109
+ for (i = 0; i < name.length; i++) {
110
+ part = name[i];
111
+ if (part === '.') {
112
+ name.splice(i, 1);
113
+ i -= 1;
114
+ } else if (part === '..') {
115
+ // If at the start, or previous value is still ..,
116
+ // keep them so that when converted to a path it may
117
+ // still work when converted to a path, even though
118
+ // as an ID it is less than ideal. In larger point
119
+ // releases, may be better to just kick out an error.
120
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
121
+ continue;
122
+ } else if (i > 0) {
123
+ name.splice(i - 1, 2);
124
+ i -= 2;
125
+ }
126
+ }
127
+ }
128
+ //end trimDots
129
+
130
+ name = name.join('/');
131
+ }
132
+
133
+ //Apply map config if available.
134
+ if ((baseParts || starMap) && map) {
135
+ nameParts = name.split('/');
136
+
137
+ for (i = nameParts.length; i > 0; i -= 1) {
138
+ nameSegment = nameParts.slice(0, i).join("/");
139
+
140
+ if (baseParts) {
141
+ //Find the longest baseName segment match in the config.
142
+ //So, do joins on the biggest to smallest lengths of baseParts.
143
+ for (j = baseParts.length; j > 0; j -= 1) {
144
+ mapValue = map[baseParts.slice(0, j).join('/')];
145
+
146
+ //baseName segment has config, find if it has one for
147
+ //this name.
148
+ if (mapValue) {
149
+ mapValue = mapValue[nameSegment];
150
+ if (mapValue) {
151
+ //Match, update name to the new value.
152
+ foundMap = mapValue;
153
+ foundI = i;
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ if (foundMap) {
161
+ break;
162
+ }
163
+
164
+ //Check for a star map match, but just hold on to it,
165
+ //if there is a shorter segment match later in a matching
166
+ //config, then favor over this star map.
167
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
168
+ foundStarMap = starMap[nameSegment];
169
+ starI = i;
170
+ }
171
+ }
172
+
173
+ if (!foundMap && foundStarMap) {
174
+ foundMap = foundStarMap;
175
+ foundI = starI;
176
+ }
177
+
178
+ if (foundMap) {
179
+ nameParts.splice(0, foundI, foundMap);
180
+ name = nameParts.join('/');
181
+ }
182
+ }
183
+
184
+ return name;
185
+ }
186
+
187
+ function makeRequire(relName, forceSync) {
188
+ return function () {
189
+ //A version of a require function that passes a moduleName
190
+ //value for items that may need to
191
+ //look up paths relative to the moduleName
192
+ var args = aps.call(arguments, 0);
193
+
194
+ //If first arg is not require('string'), and there is only
195
+ //one arg, it is the array form without a callback. Insert
196
+ //a null so that the following concat is correct.
197
+ if (typeof args[0] !== 'string' && args.length === 1) {
198
+ args.push(null);
199
+ }
200
+ return req.apply(undef, args.concat([relName, forceSync]));
201
+ };
202
+ }
203
+
204
+ function makeNormalize(relName) {
205
+ return function (name) {
206
+ return normalize(name, relName);
207
+ };
208
+ }
209
+
210
+ function makeLoad(depName) {
211
+ return function (value) {
212
+ defined[depName] = value;
213
+ };
214
+ }
215
+
216
+ function callDep(name) {
217
+ if (hasProp(waiting, name)) {
218
+ var args = waiting[name];
219
+ delete waiting[name];
220
+ defining[name] = true;
221
+ main.apply(undef, args);
222
+ }
223
+
224
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
225
+ throw new Error('No ' + name);
226
+ }
227
+ return defined[name];
228
+ }
229
+
230
+ //Turns a plugin!resource to [plugin, resource]
231
+ //with the plugin being undefined if the name
232
+ //did not have a plugin prefix.
233
+ function splitPrefix(name) {
234
+ var prefix,
235
+ index = name ? name.indexOf('!') : -1;
236
+ if (index > -1) {
237
+ prefix = name.substring(0, index);
238
+ name = name.substring(index + 1, name.length);
239
+ }
240
+ return [prefix, name];
241
+ }
242
+
243
+ //Creates a parts array for a relName where first part is plugin ID,
244
+ //second part is resource ID. Assumes relName has already been normalized.
245
+ function makeRelParts(relName) {
246
+ return relName ? splitPrefix(relName) : [];
247
+ }
248
+
249
+ /**
250
+ * Makes a name map, normalizing the name, and using a plugin
251
+ * for normalization if necessary. Grabs a ref to plugin
252
+ * too, as an optimization.
253
+ */
254
+ makeMap = function (name, relParts) {
255
+ var plugin,
256
+ parts = splitPrefix(name),
257
+ prefix = parts[0],
258
+ relResourceName = relParts[1];
259
+
260
+ name = parts[1];
261
+
262
+ if (prefix) {
263
+ prefix = normalize(prefix, relResourceName);
264
+ plugin = callDep(prefix);
265
+ }
266
+
267
+ //Normalize according
268
+ if (prefix) {
269
+ if (plugin && plugin.normalize) {
270
+ name = plugin.normalize(name, makeNormalize(relResourceName));
271
+ } else {
272
+ name = normalize(name, relResourceName);
273
+ }
274
+ } else {
275
+ name = normalize(name, relResourceName);
276
+ parts = splitPrefix(name);
277
+ prefix = parts[0];
278
+ name = parts[1];
279
+ if (prefix) {
280
+ plugin = callDep(prefix);
281
+ }
282
+ }
283
+
284
+ //Using ridiculous property names for space reasons
285
+ return {
286
+ f: prefix ? prefix + '!' + name : name, //fullName
287
+ n: name,
288
+ pr: prefix,
289
+ p: plugin
290
+ };
291
+ };
292
+
293
+ function makeConfig(name) {
294
+ return function () {
295
+ return (config && config.config && config.config[name]) || {};
296
+ };
297
+ }
298
+
299
+ handlers = {
300
+ require: function (name) {
301
+ return makeRequire(name);
302
+ },
303
+ exports: function (name) {
304
+ var e = defined[name];
305
+ if (typeof e !== 'undefined') {
306
+ return e;
307
+ } else {
308
+ return (defined[name] = {});
309
+ }
310
+ },
311
+ module: function (name) {
312
+ return {
313
+ id: name,
314
+ uri: '',
315
+ exports: defined[name],
316
+ config: makeConfig(name)
317
+ };
318
+ }
319
+ };
320
+
321
+ main = function (name, deps, callback, relName) {
322
+ var cjsModule, depName, ret, map, i, relParts,
323
+ args = [],
324
+ callbackType = typeof callback,
325
+ usingExports;
326
+
327
+ //Use name if no relName
328
+ relName = relName || name;
329
+ relParts = makeRelParts(relName);
330
+
331
+ //Call the callback to define the module, if necessary.
332
+ if (callbackType === 'undefined' || callbackType === 'function') {
333
+ //Pull out the defined dependencies and pass the ordered
334
+ //values to the callback.
335
+ //Default to [require, exports, module] if no deps
336
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
337
+ for (i = 0; i < deps.length; i += 1) {
338
+ map = makeMap(deps[i], relParts);
339
+ depName = map.f;
340
+
341
+ //Fast path CommonJS standard dependencies.
342
+ if (depName === "require") {
343
+ args[i] = handlers.require(name);
344
+ } else if (depName === "exports") {
345
+ //CommonJS module spec 1.1
346
+ args[i] = handlers.exports(name);
347
+ usingExports = true;
348
+ } else if (depName === "module") {
349
+ //CommonJS module spec 1.1
350
+ cjsModule = args[i] = handlers.module(name);
351
+ } else if (hasProp(defined, depName) ||
352
+ hasProp(waiting, depName) ||
353
+ hasProp(defining, depName)) {
354
+ args[i] = callDep(depName);
355
+ } else if (map.p) {
356
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
357
+ args[i] = defined[depName];
358
+ } else {
359
+ throw new Error(name + ' missing ' + depName);
360
+ }
361
+ }
362
+
363
+ ret = callback ? callback.apply(defined[name], args) : undefined;
364
+
365
+ if (name) {
366
+ //If setting exports via "module" is in play,
367
+ //favor that over return value and exports. After that,
368
+ //favor a non-undefined return value over exports use.
369
+ if (cjsModule && cjsModule.exports !== undef &&
370
+ cjsModule.exports !== defined[name]) {
371
+ defined[name] = cjsModule.exports;
372
+ } else if (ret !== undef || !usingExports) {
373
+ //Use the return value from the function.
374
+ defined[name] = ret;
375
+ }
376
+ }
377
+ } else if (name) {
378
+ //May just be an object definition for the module. Only
379
+ //worry about defining if have a module name.
380
+ defined[name] = callback;
381
+ }
382
+ };
383
+
384
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
385
+ if (typeof deps === "string") {
386
+ if (handlers[deps]) {
387
+ //callback in this case is really relName
388
+ return handlers[deps](callback);
389
+ }
390
+ //Just return the module wanted. In this scenario, the
391
+ //deps arg is the module name, and second arg (if passed)
392
+ //is just the relName.
393
+ //Normalize module name, if it contains . or ..
394
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
395
+ } else if (!deps.splice) {
396
+ //deps is a config object, not an array.
397
+ config = deps;
398
+ if (config.deps) {
399
+ req(config.deps, config.callback);
400
+ }
401
+ if (!callback) {
402
+ return;
403
+ }
404
+
405
+ if (callback.splice) {
406
+ //callback is an array, which means it is a dependency list.
407
+ //Adjust args if there are dependencies
408
+ deps = callback;
409
+ callback = relName;
410
+ relName = null;
411
+ } else {
412
+ deps = undef;
413
+ }
414
+ }
415
+
416
+ //Support require(['a'])
417
+ callback = callback || function () {};
418
+
419
+ //If relName is a function, it is an errback handler,
420
+ //so remove it.
421
+ if (typeof relName === 'function') {
422
+ relName = forceSync;
423
+ forceSync = alt;
424
+ }
425
+
426
+ //Simulate async callback;
427
+ if (forceSync) {
428
+ main(undef, deps, callback, relName);
429
+ } else {
430
+ //Using a non-zero value because of concern for what old browsers
431
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
432
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
433
+ //If want a value immediately, use require('id') instead -- something
434
+ //that works in almond on the global level, but not guaranteed and
435
+ //unlikely to work in other AMD implementations.
436
+ setTimeout(function () {
437
+ main(undef, deps, callback, relName);
438
+ }, 4);
439
+ }
440
+
441
+ return req;
442
+ };
443
+
444
+ /**
445
+ * Just drops the config on the floor, but returns req in case
446
+ * the config return value is used.
447
+ */
448
+ req.config = function (cfg) {
449
+ return req(cfg);
450
+ };
451
+
452
+ /**
453
+ * Expose module registry for debugging and tooling
454
+ */
455
+ requirejs._defined = defined;
456
+
457
+ define = function (name, deps, callback) {
458
+ if (typeof name !== 'string') {
459
+ throw new Error('See almond README: incorrect module build, no module name');
460
+ }
461
+
462
+ //This module may not have dependencies
463
+ if (!deps.splice) {
464
+ //deps is not an array, so probably means
465
+ //an object literal or factory function for
466
+ //the value. Adjust args.
467
+ callback = deps;
468
+ deps = [];
469
+ }
470
+
471
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
472
+ waiting[name] = [name, deps, callback];
473
+ }
474
+ };
475
+
476
+ define.amd = {
477
+ jQuery: true
478
+ };
479
+ }());
480
+
481
+ S2.requirejs = requirejs;S2.require = require;S2.define = define;
482
+ }
483
+ }());
484
+ S2.define("almond", function(){});
485
+
486
+ /* global jQuery:false, $:false */
487
+ S2.define('jquery',[],function () {
488
+ var _$ = jQuery || $;
489
+
490
+ if (_$ == null && console && console.error) {
491
+ console.error(
492
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
493
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
494
+ 'web page.'
495
+ );
496
+ }
497
+
498
+ return _$;
499
+ });
500
+
501
+ S2.define('select2/utils',[
502
+ 'jquery'
503
+ ], function ($) {
504
+ var Utils = {};
505
+
506
+ Utils.Extend = function (ChildClass, SuperClass) {
507
+ var __hasProp = {}.hasOwnProperty;
508
+
509
+ function BaseConstructor () {
510
+ this.constructor = ChildClass;
511
+ }
512
+
513
+ for (var key in SuperClass) {
514
+ if (__hasProp.call(SuperClass, key)) {
515
+ ChildClass[key] = SuperClass[key];
516
+ }
517
+ }
518
+
519
+ BaseConstructor.prototype = SuperClass.prototype;
520
+ ChildClass.prototype = new BaseConstructor();
521
+ ChildClass.__super__ = SuperClass.prototype;
522
+
523
+ return ChildClass;
524
+ };
525
+
526
+ function getMethods (theClass) {
527
+ var proto = theClass.prototype;
528
+
529
+ var methods = [];
530
+
531
+ for (var methodName in proto) {
532
+ var m = proto[methodName];
533
+
534
+ if (typeof m !== 'function') {
535
+ continue;
536
+ }
537
+
538
+ if (methodName === 'constructor') {
539
+ continue;
540
+ }
541
+
542
+ methods.push(methodName);
543
+ }
544
+
545
+ return methods;
546
+ }
547
+
548
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
549
+ var decoratedMethods = getMethods(DecoratorClass);
550
+ var superMethods = getMethods(SuperClass);
551
+
552
+ function DecoratedClass () {
553
+ var unshift = Array.prototype.unshift;
554
+
555
+ var argCount = DecoratorClass.prototype.constructor.length;
556
+
557
+ var calledConstructor = SuperClass.prototype.constructor;
558
+
559
+ if (argCount > 0) {
560
+ unshift.call(arguments, SuperClass.prototype.constructor);
561
+
562
+ calledConstructor = DecoratorClass.prototype.constructor;
563
+ }
564
+
565
+ calledConstructor.apply(this, arguments);
566
+ }
567
+
568
+ DecoratorClass.displayName = SuperClass.displayName;
569
+
570
+ function ctr () {
571
+ this.constructor = DecoratedClass;
572
+ }
573
+
574
+ DecoratedClass.prototype = new ctr();
575
+
576
+ for (var m = 0; m < superMethods.length; m++) {
577
+ var superMethod = superMethods[m];
578
+
579
+ DecoratedClass.prototype[superMethod] =
580
+ SuperClass.prototype[superMethod];
581
+ }
582
+
583
+ var calledMethod = function (methodName) {
584
+ // Stub out the original method if it's not decorating an actual method
585
+ var originalMethod = function () {};
586
+
587
+ if (methodName in DecoratedClass.prototype) {
588
+ originalMethod = DecoratedClass.prototype[methodName];
589
+ }
590
+
591
+ var decoratedMethod = DecoratorClass.prototype[methodName];
592
+
593
+ return function () {
594
+ var unshift = Array.prototype.unshift;
595
+
596
+ unshift.call(arguments, originalMethod);
597
+
598
+ return decoratedMethod.apply(this, arguments);
599
+ };
600
+ };
601
+
602
+ for (var d = 0; d < decoratedMethods.length; d++) {
603
+ var decoratedMethod = decoratedMethods[d];
604
+
605
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
606
+ }
607
+
608
+ return DecoratedClass;
609
+ };
610
+
611
+ var Observable = function () {
612
+ this.listeners = {};
613
+ };
614
+
615
+ Observable.prototype.on = function (event, callback) {
616
+ this.listeners = this.listeners || {};
617
+
618
+ if (event in this.listeners) {
619
+ this.listeners[event].push(callback);
620
+ } else {
621
+ this.listeners[event] = [callback];
622
+ }
623
+ };
624
+
625
+ Observable.prototype.trigger = function (event) {
626
+ var slice = Array.prototype.slice;
627
+ var params = slice.call(arguments, 1);
628
+
629
+ this.listeners = this.listeners || {};
630
+
631
+ // Params should always come in as an array
632
+ if (params == null) {
633
+ params = [];
634
+ }
635
+
636
+ // If there are no arguments to the event, use a temporary object
637
+ if (params.length === 0) {
638
+ params.push({});
639
+ }
640
+
641
+ // Set the `_type` of the first object to the event
642
+ params[0]._type = event;
643
+
644
+ if (event in this.listeners) {
645
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
646
+ }
647
+
648
+ if ('*' in this.listeners) {
649
+ this.invoke(this.listeners['*'], arguments);
650
+ }
651
+ };
652
+
653
+ Observable.prototype.invoke = function (listeners, params) {
654
+ for (var i = 0, len = listeners.length; i < len; i++) {
655
+ listeners[i].apply(this, params);
656
+ }
657
+ };
658
+
659
+ Utils.Observable = Observable;
660
+
661
+ Utils.generateChars = function (length) {
662
+ var chars = '';
663
+
664
+ for (var i = 0; i < length; i++) {
665
+ var randomChar = Math.floor(Math.random() * 36);
666
+ chars += randomChar.toString(36);
667
+ }
668
+
669
+ return chars;
670
+ };
671
+
672
+ Utils.bind = function (func, context) {
673
+ return function () {
674
+ func.apply(context, arguments);
675
+ };
676
+ };
677
+
678
+ Utils._convertData = function (data) {
679
+ for (var originalKey in data) {
680
+ var keys = originalKey.split('-');
681
+
682
+ var dataLevel = data;
683
+
684
+ if (keys.length === 1) {
685
+ continue;
686
+ }
687
+
688
+ for (var k = 0; k < keys.length; k++) {
689
+ var key = keys[k];
690
+
691
+ // Lowercase the first letter
692
+ // By default, dash-separated becomes camelCase
693
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
694
+
695
+ if (!(key in dataLevel)) {
696
+ dataLevel[key] = {};
697
+ }
698
+
699
+ if (k == keys.length - 1) {
700
+ dataLevel[key] = data[originalKey];
701
+ }
702
+
703
+ dataLevel = dataLevel[key];
704
+ }
705
+
706
+ delete data[originalKey];
707
+ }
708
+
709
+ return data;
710
+ };
711
+
712
+ Utils.hasScroll = function (index, el) {
713
+ // Adapted from the function created by @ShadowScripter
714
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
715
+ // The original code can be found at
716
+ // http://codereview.stackexchange.com/q/13338
717
+ // and was designed to be used with the Sizzle selector engine.
718
+
719
+ var $el = $(el);
720
+ var overflowX = el.style.overflowX;
721
+ var overflowY = el.style.overflowY;
722
+
723
+ //Check both x and y declarations
724
+ if (overflowX === overflowY &&
725
+ (overflowY === 'hidden' || overflowY === 'visible')) {
726
+ return false;
727
+ }
728
+
729
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
730
+ return true;
731
+ }
732
+
733
+ return ($el.innerHeight() < el.scrollHeight ||
734
+ $el.innerWidth() < el.scrollWidth);
735
+ };
736
+
737
+ Utils.escapeMarkup = function (markup) {
738
+ var replaceMap = {
739
+ '\\': '&#92;',
740
+ '&': '&amp;',
741
+ '<': '&lt;',
742
+ '>': '&gt;',
743
+ '"': '&quot;',
744
+ '\'': '&#39;',
745
+ '/': '&#47;'
746
+ };
747
+
748
+ // Do not try to escape the markup if it's not a string
749
+ if (typeof markup !== 'string') {
750
+ return markup;
751
+ }
752
+
753
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
754
+ return replaceMap[match];
755
+ });
756
+ };
757
+
758
+ // Append an array of jQuery nodes to a given element.
759
+ Utils.appendMany = function ($element, $nodes) {
760
+ // jQuery 1.7.x does not support $.fn.append() with an array
761
+ // Fall back to a jQuery object collection using $.fn.add()
762
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
763
+ var $jqNodes = $();
764
+
765
+ $.map($nodes, function (node) {
766
+ $jqNodes = $jqNodes.add(node);
767
+ });
768
+
769
+ $nodes = $jqNodes;
770
+ }
771
+
772
+ $element.append($nodes);
773
+ };
774
+
775
+ // Determine whether the browser is on a touchscreen device.
776
+ Utils.isTouchscreen = function() {
777
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
778
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
779
+ }
780
+ return Utils._isTouchscreenCache;
781
+ }
782
+
783
+ return Utils;
784
+ });
785
+
786
+ S2.define('select2/results',[
787
+ 'jquery',
788
+ './utils'
789
+ ], function ($, Utils) {
790
+ function Results ($element, options, dataAdapter) {
791
+ this.$element = $element;
792
+ this.data = dataAdapter;
793
+ this.options = options;
794
+
795
+ Results.__super__.constructor.call(this);
796
+ }
797
+
798
+ Utils.Extend(Results, Utils.Observable);
799
+
800
+ Results.prototype.render = function () {
801
+ var $results = $(
802
+ '<ul class="select2-results__options" role="listbox" tabindex="-1"></ul>'
803
+ );
804
+
805
+ if (this.options.get('multiple')) {
806
+ $results.attr('aria-multiselectable', 'true');
807
+ }
808
+
809
+ this.$results = $results;
810
+
811
+ return $results;
812
+ };
813
+
814
+ Results.prototype.clear = function () {
815
+ this.$results.empty();
816
+ };
817
+
818
+ Results.prototype.displayMessage = function (params) {
819
+ var escapeMarkup = this.options.get('escapeMarkup');
820
+
821
+ this.clear();
822
+ this.hideLoading();
823
+
824
+ var $message = $(
825
+ '<li role="alert" aria-live="assertive"' +
826
+ ' class="select2-results__option"></li>'
827
+ );
828
+
829
+ var message = this.options.get('translations').get(params.message);
830
+
831
+ $message.append(
832
+ escapeMarkup(
833
+ message(params.args)
834
+ )
835
+ );
836
+
837
+ $message[0].className += ' select2-results__message';
838
+
839
+ this.$results.append($message);
840
+ };
841
+
842
+ Results.prototype.hideMessages = function () {
843
+ this.$results.find('.select2-results__message').remove();
844
+ };
845
+
846
+ Results.prototype.append = function (data) {
847
+ this.hideLoading();
848
+
849
+ var $options = [];
850
+
851
+ if (data.results == null || data.results.length === 0) {
852
+ if (this.$results.children().length === 0) {
853
+ this.trigger('results:message', {
854
+ message: 'noResults'
855
+ });
856
+ }
857
+
858
+ return;
859
+ }
860
+
861
+ data.results = this.sort(data.results);
862
+
863
+ for (var d = 0; d < data.results.length; d++) {
864
+ var item = data.results[d];
865
+
866
+ var $option = this.option(item);
867
+
868
+ $options.push($option);
869
+ }
870
+
871
+ this.$results.append($options);
872
+ };
873
+
874
+ Results.prototype.position = function ($results, $dropdown) {
875
+ var $resultsContainer = $dropdown.find('.select2-results');
876
+ $resultsContainer.append($results);
877
+ };
878
+
879
+ Results.prototype.sort = function (data) {
880
+ var sorter = this.options.get('sorter');
881
+
882
+ return sorter(data);
883
+ };
884
+
885
+ Results.prototype.highlightFirstItem = function () {
886
+ var $options = this.$results
887
+ .find('.select2-results__option[data-selected]');
888
+
889
+ var $selected = $options.filter('[data-selected=true]');
890
+
891
+ // Check if there are any selected options
892
+ if ($selected.length > 0) {
893
+ // If there are selected options, highlight the first
894
+ $selected.first().trigger('mouseenter');
895
+ } else {
896
+ // If there are no selected options, highlight the first option
897
+ // in the dropdown
898
+ $options.first().trigger('mouseenter');
899
+ }
900
+
901
+ this.ensureHighlightVisible();
902
+ };
903
+
904
+ Results.prototype.setClasses = function () {
905
+ var self = this;
906
+
907
+ this.data.current(function (selected) {
908
+ var selectedIds = $.map(selected, function (s) {
909
+ return s.id.toString();
910
+ });
911
+
912
+ var $options = self.$results
913
+ .find('.select2-results__option[data-selected]');
914
+
915
+ $options.each(function () {
916
+ var $option = $(this);
917
+
918
+ var item = $.data(this, 'data');
919
+
920
+ // id needs to be converted to a string when comparing
921
+ var id = '' + item.id;
922
+
923
+ if ((item.element != null && item.element.selected) ||
924
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
925
+ $option.attr('data-selected', 'true');
926
+ } else {
927
+ $option.attr('data-selected', 'false');
928
+ }
929
+ });
930
+
931
+ });
932
+ };
933
+
934
+ Results.prototype.showLoading = function (params) {
935
+ this.hideLoading();
936
+
937
+ var loadingMore = this.options.get('translations').get('searching');
938
+
939
+ var loading = {
940
+ disabled: true,
941
+ loading: true,
942
+ text: loadingMore(params)
943
+ };
944
+ var $loading = this.option(loading);
945
+ $loading.className += ' loading-results';
946
+
947
+ this.$results.prepend($loading);
948
+ };
949
+
950
+ Results.prototype.hideLoading = function () {
951
+ this.$results.find('.loading-results').remove();
952
+ };
953
+
954
+ Results.prototype.option = function (data) {
955
+ var option = document.createElement('li');
956
+ option.className = 'select2-results__option';
957
+
958
+ var attrs = {
959
+ 'role': 'option',
960
+ 'data-selected': 'false',
961
+ 'tabindex': -1
962
+ };
963
+
964
+ if (data.disabled) {
965
+ delete attrs['data-selected'];
966
+ attrs['aria-disabled'] = 'true';
967
+ }
968
+
969
+ if (data.id == null) {
970
+ delete attrs['data-selected'];
971
+ }
972
+
973
+ if (data._resultId != null) {
974
+ option.id = data._resultId;
975
+ }
976
+
977
+ if (data.title) {
978
+ option.title = data.title;
979
+ }
980
+
981
+ if (data.children) {
982
+ attrs['aria-label'] = data.text;
983
+ delete attrs['data-selected'];
984
+ }
985
+
986
+ for (var attr in attrs) {
987
+ var val = attrs[attr];
988
+
989
+ option.setAttribute(attr, val);
990
+ }
991
+
992
+ if (data.children) {
993
+ var $option = $(option);
994
+
995
+ var label = document.createElement('strong');
996
+ label.className = 'select2-results__group';
997
+
998
+ var $label = $(label);
999
+ this.template(data, label);
1000
+ $label.attr('role', 'presentation');
1001
+
1002
+ var $children = [];
1003
+
1004
+ for (var c = 0; c < data.children.length; c++) {
1005
+ var child = data.children[c];
1006
+
1007
+ var $child = this.option(child);
1008
+
1009
+ $children.push($child);
1010
+ }
1011
+
1012
+ var $childrenContainer = $('<ul></ul>', {
1013
+ 'class': 'select2-results__options select2-results__options--nested',
1014
+ 'role': 'listbox'
1015
+ });
1016
+ $childrenContainer.append($children);
1017
+ $option.attr('role', 'list');
1018
+
1019
+ $option.append(label);
1020
+ $option.append($childrenContainer);
1021
+ } else {
1022
+ this.template(data, option);
1023
+ }
1024
+
1025
+ $.data(option, 'data', data);
1026
+
1027
+ return option;
1028
+ };
1029
+
1030
+ Results.prototype.bind = function (container, $container) {
1031
+ var self = this;
1032
+
1033
+ var id = container.id + '-results';
1034
+
1035
+ this.$results.attr('id', id);
1036
+
1037
+ container.on('results:all', function (params) {
1038
+ self.clear();
1039
+ self.append(params.data);
1040
+
1041
+ if (container.isOpen()) {
1042
+ self.setClasses();
1043
+ self.highlightFirstItem();
1044
+ }
1045
+ });
1046
+
1047
+ container.on('results:append', function (params) {
1048
+ self.append(params.data);
1049
+
1050
+ if (container.isOpen()) {
1051
+ self.setClasses();
1052
+ }
1053
+ });
1054
+
1055
+ container.on('query', function (params) {
1056
+ self.hideMessages();
1057
+ self.showLoading(params);
1058
+ });
1059
+
1060
+ container.on('select', function () {
1061
+ if (!container.isOpen()) {
1062
+ return;
1063
+ }
1064
+
1065
+ self.setClasses();
1066
+ self.highlightFirstItem();
1067
+ });
1068
+
1069
+ container.on('unselect', function () {
1070
+ if (!container.isOpen()) {
1071
+ return;
1072
+ }
1073
+
1074
+ self.setClasses();
1075
+ self.highlightFirstItem();
1076
+ });
1077
+
1078
+ container.on('open', function () {
1079
+ // When the dropdown is open, aria-expended="true"
1080
+ self.$results.attr('aria-expanded', 'true');
1081
+ self.$results.attr('aria-hidden', 'false');
1082
+
1083
+ self.setClasses();
1084
+ self.ensureHighlightVisible();
1085
+ });
1086
+
1087
+ container.on('close', function () {
1088
+ // When the dropdown is closed, aria-expended="false"
1089
+ self.$results.attr('aria-expanded', 'false');
1090
+ self.$results.attr('aria-hidden', 'true');
1091
+ self.$results.removeAttr('aria-activedescendant');
1092
+ });
1093
+
1094
+ container.on('results:toggle', function () {
1095
+ var $highlighted = self.getHighlightedResults();
1096
+
1097
+ if ($highlighted.length === 0) {
1098
+ return;
1099
+ }
1100
+
1101
+ $highlighted.trigger('mouseup');
1102
+ });
1103
+
1104
+ container.on('results:select', function () {
1105
+ var $highlighted = self.getHighlightedResults();
1106
+
1107
+ if ($highlighted.length === 0) {
1108
+ return;
1109
+ }
1110
+
1111
+ var data = $highlighted.data('data');
1112
+
1113
+ if ($highlighted.attr('data-selected') == 'true') {
1114
+ self.trigger('close', {});
1115
+ } else {
1116
+ self.trigger('select', {
1117
+ data: data
1118
+ });
1119
+ }
1120
+ });
1121
+
1122
+ container.on('results:previous', function () {
1123
+ var $highlighted = self.getHighlightedResults();
1124
+
1125
+ var $options = self.$results.find('[data-selected]');
1126
+
1127
+ var currentIndex = $options.index($highlighted);
1128
+
1129
+ // If we are already at te top, don't move further
1130
+ if (currentIndex === 0) {
1131
+ return;
1132
+ }
1133
+
1134
+ var nextIndex = currentIndex - 1;
1135
+
1136
+ // If none are highlighted, highlight the first
1137
+ if ($highlighted.length === 0) {
1138
+ nextIndex = 0;
1139
+ }
1140
+
1141
+ var $next = $options.eq(nextIndex);
1142
+
1143
+ $next.trigger('mouseenter');
1144
+
1145
+ var currentOffset = self.$results.offset().top;
1146
+ var nextTop = $next.offset().top;
1147
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
1148
+
1149
+ if (nextIndex === 0) {
1150
+ self.$results.scrollTop(0);
1151
+ } else if (nextTop - currentOffset < 0) {
1152
+ self.$results.scrollTop(nextOffset);
1153
+ }
1154
+ });
1155
+
1156
+ container.on('results:next', function () {
1157
+ var $highlighted = self.getHighlightedResults();
1158
+
1159
+ var $options = self.$results.find('[data-selected]');
1160
+
1161
+ var currentIndex = $options.index($highlighted);
1162
+
1163
+ var nextIndex = currentIndex + 1;
1164
+
1165
+ // If we are at the last option, stay there
1166
+ if (nextIndex >= $options.length) {
1167
+ return;
1168
+ }
1169
+
1170
+ var $next = $options.eq(nextIndex);
1171
+
1172
+ $next.trigger('mouseenter');
1173
+
1174
+ var currentOffset = self.$results.offset().top +
1175
+ self.$results.outerHeight(false);
1176
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
1177
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
1178
+
1179
+ if (nextIndex === 0) {
1180
+ self.$results.scrollTop(0);
1181
+ } else if (nextBottom > currentOffset) {
1182
+ self.$results.scrollTop(nextOffset);
1183
+ }
1184
+ });
1185
+
1186
+ container.on('results:focus', function (params) {
1187
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
1188
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
1189
+ });
1190
+
1191
+ container.on('results:message', function (params) {
1192
+ self.displayMessage(params);
1193
+ });
1194
+
1195
+ if ($.fn.mousewheel) {
1196
+ this.$results.on('mousewheel', function (e) {
1197
+ var top = self.$results.scrollTop();
1198
+
1199
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
1200
+
1201
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
1202
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
1203
+
1204
+ if (isAtTop) {
1205
+ self.$results.scrollTop(0);
1206
+
1207
+ e.preventDefault();
1208
+ e.stopPropagation();
1209
+ } else if (isAtBottom) {
1210
+ self.$results.scrollTop(
1211
+ self.$results.get(0).scrollHeight - self.$results.height()
1212
+ );
1213
+
1214
+ e.preventDefault();
1215
+ e.stopPropagation();
1216
+ }
1217
+ });
1218
+ }
1219
+
1220
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
1221
+ function (evt) {
1222
+ var $this = $(this);
1223
+
1224
+ var data = $this.data('data');
1225
+
1226
+ if ($this.attr('data-selected') === 'true') {
1227
+ if (self.options.get('multiple')) {
1228
+ self.trigger('unselect', {
1229
+ originalEvent: evt,
1230
+ data: data
1231
+ });
1232
+ } else {
1233
+ self.trigger('close', {});
1234
+ }
1235
+
1236
+ return;
1237
+ }
1238
+
1239
+ self.trigger('select', {
1240
+ originalEvent: evt,
1241
+ data: data
1242
+ });
1243
+ });
1244
+
1245
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
1246
+ function (evt) {
1247
+ var data = $(this).data('data');
1248
+
1249
+ self.getHighlightedResults()
1250
+ .removeClass('select2-results__option--highlighted')
1251
+ .attr('aria-selected', 'false');
1252
+
1253
+ self.trigger('results:focus', {
1254
+ data: data,
1255
+ element: $(this)
1256
+ });
1257
+ });
1258
+ };
1259
+
1260
+ Results.prototype.getHighlightedResults = function () {
1261
+ var $highlighted = this.$results
1262
+ .find('.select2-results__option--highlighted');
1263
+
1264
+ return $highlighted;
1265
+ };
1266
+
1267
+ Results.prototype.destroy = function () {
1268
+ this.$results.remove();
1269
+ };
1270
+
1271
+ Results.prototype.ensureHighlightVisible = function () {
1272
+ var $highlighted = this.getHighlightedResults();
1273
+
1274
+ if ($highlighted.length === 0) {
1275
+ return;
1276
+ }
1277
+
1278
+ var $options = this.$results.find('[data-selected]');
1279
+
1280
+ var currentIndex = $options.index($highlighted);
1281
+
1282
+ var currentOffset = this.$results.offset().top;
1283
+ var nextTop = $highlighted.offset().top;
1284
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
1285
+
1286
+ var offsetDelta = nextTop - currentOffset;
1287
+ nextOffset -= $highlighted.outerHeight(false) * 2;
1288
+
1289
+ if (currentIndex <= 2) {
1290
+ this.$results.scrollTop(0);
1291
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
1292
+ this.$results.scrollTop(nextOffset);
1293
+ }
1294
+ };
1295
+
1296
+ Results.prototype.template = function (result, container) {
1297
+ var template = this.options.get('templateResult');
1298
+ var escapeMarkup = this.options.get('escapeMarkup');
1299
+
1300
+ var content = template(result, container);
1301
+
1302
+ if (content == null) {
1303
+ container.style.display = 'none';
1304
+ } else if (typeof content === 'string') {
1305
+ container.innerHTML = escapeMarkup(content);
1306
+ } else {
1307
+ $(container).append(content);
1308
+ }
1309
+ };
1310
+
1311
+ return Results;
1312
+ });
1313
+
1314
+ S2.define('select2/keys',[
1315
+
1316
+ ], function () {
1317
+ var KEYS = {
1318
+ BACKSPACE: 8,
1319
+ TAB: 9,
1320
+ ENTER: 13,
1321
+ SHIFT: 16,
1322
+ CTRL: 17,
1323
+ ALT: 18,
1324
+ ESC: 27,
1325
+ SPACE: 32,
1326
+ PAGE_UP: 33,
1327
+ PAGE_DOWN: 34,
1328
+ END: 35,
1329
+ HOME: 36,
1330
+ LEFT: 37,
1331
+ UP: 38,
1332
+ RIGHT: 39,
1333
+ DOWN: 40,
1334
+ DELETE: 46
1335
+ };
1336
+
1337
+ return KEYS;
1338
+ });
1339
+
1340
+ S2.define('select2/selection/base',[
1341
+ 'jquery',
1342
+ '../utils',
1343
+ '../keys'
1344
+ ], function ($, Utils, KEYS) {
1345
+ function BaseSelection ($element, options) {
1346
+ this.$element = $element;
1347
+ this.options = options;
1348
+
1349
+ BaseSelection.__super__.constructor.call(this);
1350
+ }
1351
+
1352
+ Utils.Extend(BaseSelection, Utils.Observable);
1353
+
1354
+ BaseSelection.prototype.render = function () {
1355
+ var $selection = $(
1356
+ '<span class="select2-selection" ' +
1357
+ ' aria-haspopup="true" aria-expanded="false">' +
1358
+ '</span>'
1359
+ );
1360
+
1361
+ this._tabindex = 0;
1362
+
1363
+ if (this.$element.data('old-tabindex') != null) {
1364
+ this._tabindex = this.$element.data('old-tabindex');
1365
+ } else if (this.$element.attr('tabindex') != null) {
1366
+ this._tabindex = this.$element.attr('tabindex');
1367
+ }
1368
+
1369
+ $selection.attr('title', this.$element.attr('title'));
1370
+ $selection.attr('tabindex', this._tabindex);
1371
+
1372
+ this.$selection = $selection;
1373
+
1374
+ return $selection;
1375
+ };
1376
+
1377
+ BaseSelection.prototype.bind = function (container, $container) {
1378
+ var self = this;
1379
+
1380
+ var id = container.id + '-container';
1381
+ var resultsId = container.id + '-results';
1382
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
1383
+
1384
+ this.container = container;
1385
+
1386
+ this.$selection.on('focus', function (evt) {
1387
+ self.trigger('focus', evt);
1388
+ });
1389
+
1390
+ this.$selection.on('blur', function (evt) {
1391
+ self._handleBlur(evt);
1392
+ });
1393
+
1394
+ this.$selection.on('keydown', function (evt) {
1395
+ self.trigger('keypress', evt);
1396
+
1397
+ if (evt.which === KEYS.SPACE) {
1398
+ evt.preventDefault();
1399
+ }
1400
+ });
1401
+
1402
+ container.on('results:focus', function (params) {
1403
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
1404
+ });
1405
+
1406
+ container.on('selection:update', function (params) {
1407
+ self.update(params.data);
1408
+ });
1409
+
1410
+ container.on('open', function () {
1411
+ // When the dropdown is open, aria-expanded="true"
1412
+ self.$selection.attr('aria-expanded', 'true');
1413
+ self.$selection.attr('aria-owns', resultsId);
1414
+
1415
+ self._attachCloseHandler(container);
1416
+ });
1417
+
1418
+ container.on('close', function () {
1419
+ // When the dropdown is closed, aria-expanded="false"
1420
+ self.$selection.attr('aria-expanded', 'false');
1421
+ self.$selection.removeAttr('aria-activedescendant');
1422
+ self.$selection.removeAttr('aria-owns');
1423
+
1424
+ // This needs to be delayed as the active element is the body when the
1425
+ // key is pressed.
1426
+ window.setTimeout(function () {
1427
+ self.$selection.focus();
1428
+ }, 1);
1429
+
1430
+ self._detachCloseHandler(container);
1431
+ });
1432
+
1433
+ container.on('enable', function () {
1434
+ self.$selection.attr('tabindex', self._tabindex);
1435
+ });
1436
+
1437
+ container.on('disable', function () {
1438
+ self.$selection.attr('tabindex', '-1');
1439
+ });
1440
+ };
1441
+
1442
+ BaseSelection.prototype._handleBlur = function (evt) {
1443
+ var self = this;
1444
+
1445
+ // This needs to be delayed as the active element is the body when the tab
1446
+ // key is pressed, possibly along with others.
1447
+ window.setTimeout(function () {
1448
+ // Don't trigger `blur` if the focus is still in the selection
1449
+ if (
1450
+ (document.activeElement == self.$selection[0]) ||
1451
+ ($.contains(self.$selection[0], document.activeElement))
1452
+ ) {
1453
+ return;
1454
+ }
1455
+
1456
+ self.trigger('blur', evt);
1457
+ }, 1);
1458
+ };
1459
+
1460
+ BaseSelection.prototype._attachCloseHandler = function (container) {
1461
+ var self = this;
1462
+
1463
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
1464
+ var $target = $(e.target);
1465
+
1466
+ var $select = $target.closest('.select2');
1467
+
1468
+ var $all = $('.select2.select2-container--open');
1469
+
1470
+ $all.each(function () {
1471
+ var $this = $(this);
1472
+
1473
+ if (this == $select[0]) {
1474
+ return;
1475
+ }
1476
+
1477
+ var $element = $this.data('element');
1478
+
1479
+ $element.select2('close');
1480
+ });
1481
+ });
1482
+ };
1483
+
1484
+ BaseSelection.prototype._detachCloseHandler = function (container) {
1485
+ $(document.body).off('mousedown.select2.' + container.id);
1486
+ };
1487
+
1488
+ BaseSelection.prototype.position = function ($selection, $container) {
1489
+ var $selectionContainer = $container.find('.selection');
1490
+ $selectionContainer.append($selection);
1491
+ };
1492
+
1493
+ BaseSelection.prototype.destroy = function () {
1494
+ this._detachCloseHandler(this.container);
1495
+ };
1496
+
1497
+ BaseSelection.prototype.update = function (data) {
1498
+ throw new Error('The `update` method must be defined in child classes.');
1499
+ };
1500
+
1501
+ return BaseSelection;
1502
+ });
1503
+
1504
+ S2.define('select2/selection/single',[
1505
+ 'jquery',
1506
+ './base',
1507
+ '../utils',
1508
+ '../keys'
1509
+ ], function ($, BaseSelection, Utils, KEYS) {
1510
+ function SingleSelection () {
1511
+ SingleSelection.__super__.constructor.apply(this, arguments);
1512
+ }
1513
+
1514
+ Utils.Extend(SingleSelection, BaseSelection);
1515
+
1516
+ SingleSelection.prototype.render = function () {
1517
+ var $selection = SingleSelection.__super__.render.call(this);
1518
+
1519
+ $selection.addClass('select2-selection--single');
1520
+
1521
+ $selection.html(
1522
+ '<span class="select2-selection__rendered"></span>' +
1523
+ '<span class="select2-selection__arrow" role="presentation">' +
1524
+ '<b role="presentation"></b>' +
1525
+ '</span>'
1526
+ );
1527
+
1528
+ return $selection;
1529
+ };
1530
+
1531
+ SingleSelection.prototype.bind = function (container, $container) {
1532
+ var self = this;
1533
+
1534
+ SingleSelection.__super__.bind.apply(this, arguments);
1535
+
1536
+ var id = container.id + '-container';
1537
+
1538
+ this.$selection.find('.select2-selection__rendered')
1539
+ .attr('id', id)
1540
+ .attr('role', 'textbox')
1541
+ .attr('aria-readonly', 'true');
1542
+ this.$selection.attr('aria-labelledby', id);
1543
+
1544
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
1545
+ this.$selection.attr('role', 'combobox');
1546
+
1547
+ this.$selection.on('mousedown', function (evt) {
1548
+ // Only respond to left clicks
1549
+ if (evt.which !== 1) {
1550
+ return;
1551
+ }
1552
+
1553
+ self.trigger('toggle', {
1554
+ originalEvent: evt
1555
+ });
1556
+ });
1557
+
1558
+ this.$selection.on('focus', function (evt) {
1559
+ // User focuses on the container
1560
+ });
1561
+
1562
+ this.$selection.on('keydown', function (evt) {
1563
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
1564
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
1565
+ container.open();
1566
+ }
1567
+ });
1568
+
1569
+ this.$selection.on('blur', function (evt) {
1570
+ // User exits the container
1571
+ });
1572
+
1573
+ container.on('focus', function (evt) {
1574
+ if (!container.isOpen()) {
1575
+ self.$selection.focus();
1576
+ }
1577
+ });
1578
+
1579
+ container.on('selection:update', function (params) {
1580
+ self.update(params.data);
1581
+ });
1582
+ };
1583
+
1584
+ SingleSelection.prototype.clear = function () {
1585
+ this.$selection.find('.select2-selection__rendered').empty();
1586
+ };
1587
+
1588
+ SingleSelection.prototype.display = function (data, container) {
1589
+ var template = this.options.get('templateSelection');
1590
+ var escapeMarkup = this.options.get('escapeMarkup');
1591
+
1592
+ return escapeMarkup(template(data, container));
1593
+ };
1594
+
1595
+ SingleSelection.prototype.selectionContainer = function () {
1596
+ return $('<span></span>');
1597
+ };
1598
+
1599
+ SingleSelection.prototype.update = function (data) {
1600
+ if (data.length === 0) {
1601
+ this.clear();
1602
+ return;
1603
+ }
1604
+
1605
+ var selection = data[0];
1606
+
1607
+ var $rendered = this.$selection.find('.select2-selection__rendered');
1608
+ var formatted = this.display(selection, $rendered);
1609
+
1610
+ $rendered.empty().append(formatted);
1611
+ $rendered.prop('title', selection.title || selection.text);
1612
+ };
1613
+
1614
+ return SingleSelection;
1615
+ });
1616
+
1617
+ S2.define('select2/selection/multiple',[
1618
+ 'jquery',
1619
+ './base',
1620
+ '../utils'
1621
+ ], function ($, BaseSelection, Utils) {
1622
+ function MultipleSelection ($element, options) {
1623
+ MultipleSelection.__super__.constructor.apply(this, arguments);
1624
+ }
1625
+
1626
+ Utils.Extend(MultipleSelection, BaseSelection);
1627
+
1628
+ MultipleSelection.prototype.render = function () {
1629
+ var $selection = MultipleSelection.__super__.render.call(this);
1630
+
1631
+ $selection.addClass('select2-selection--multiple');
1632
+
1633
+ $selection.html(
1634
+ '<ul class="select2-selection__rendered" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></ul>'
1635
+ );
1636
+
1637
+ return $selection;
1638
+ };
1639
+
1640
+ MultipleSelection.prototype.bind = function (container, $container) {
1641
+ var self = this;
1642
+
1643
+ MultipleSelection.__super__.bind.apply(this, arguments);
1644
+
1645
+ this.$selection.on('click', function (evt) {
1646
+ self.trigger('toggle', {
1647
+ originalEvent: evt
1648
+ });
1649
+ });
1650
+
1651
+ this.$selection.on(
1652
+ 'click',
1653
+ '.select2-selection__choice__remove',
1654
+ function (evt) {
1655
+ // Ignore the event if it is disabled
1656
+ if (self.options.get('disabled')) {
1657
+ return;
1658
+ }
1659
+
1660
+ var $remove = $(this);
1661
+ var $selection = $remove.parent();
1662
+
1663
+ var data = $selection.data('data');
1664
+
1665
+ self.trigger('unselect', {
1666
+ originalEvent: evt,
1667
+ data: data
1668
+ });
1669
+ }
1670
+ );
1671
+ };
1672
+
1673
+ MultipleSelection.prototype.clear = function () {
1674
+ this.$selection.find('.select2-selection__rendered').empty();
1675
+ };
1676
+
1677
+ MultipleSelection.prototype.display = function (data,