Stop User Enumeration - Version 1.4.0

Version Description

  • Remove freemius library and optional registration
  • Add donation and contribution notices
Download this release

Release Info

Developer fullworks
Plugin Icon 128x128 Stop User Enumeration
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.33 to 1.4.0

Files changed (86) hide show
  1. admin/class-admin-pages.php +17 -76
  2. admin/class-admin-settings.php +65 -35
  3. admin/css/images/logocrop200.svg +168 -168
  4. fail2ban/filter.d/wordpress-userenum.conf +26 -26
  5. frontend/class-frontend.php +1 -3
  6. gnugeneralpubliclicence.txt +87 -87
  7. includes/class-core.php +2 -3
  8. includes/class-freemius-config.php +0 -44
  9. includes/vendor/alanef/plugindonation_lib/PluginDonation.php +586 -0
  10. includes/vendor/alanef/plugindonation_lib/composer.lock +18 -0
  11. includes/vendor/alanef/plugindonation_lib/images/QRcodes/BCH.png +0 -0
  12. includes/vendor/alanef/plugindonation_lib/images/QRcodes/BTC.png +0 -0
  13. includes/vendor/alanef/plugindonation_lib/images/QRcodes/DOGE.png +0 -0
  14. includes/vendor/alanef/plugindonation_lib/images/QRcodes/ETH.png +0 -0
  15. includes/vendor/alanef/plugindonation_lib/images/logos/BCH.png +0 -0
  16. includes/vendor/alanef/plugindonation_lib/images/logos/BTC.png +0 -0
  17. includes/vendor/alanef/plugindonation_lib/images/logos/DOGE.png +0 -0
  18. includes/vendor/alanef/plugindonation_lib/images/logos/ETH.png +0 -0
  19. includes/vendor/alanef/plugindonation_lib/images/logos/PP.png +0 -0
  20. includes/vendor/alanef/plugindonation_lib/images/logos/PPcards.png +0 -0
  21. includes/vendor/alanef/plugindonation_lib/images/logos/github.png +0 -0
  22. includes/vendor/alanef/plugindonation_lib/images/logos/reviews.png +0 -0
  23. includes/vendor/alanef/plugindonation_lib/images/logos/translate.png +0 -0
  24. includes/vendor/alanef/plugindonation_lib/js/admin.js +50 -0
  25. includes/vendor/alanef/plugindonation_lib/languages/plugin-donation-lib.pot +50 -0
  26. includes/vendor/alanef/plugindonation_lib/package-lock.json +8594 -0
  27. includes/vendor/autoload.php +7 -0
  28. includes/vendor/composer/ClassLoader.php +572 -0
  29. includes/vendor/composer/InstalledVersions.php +350 -0
  30. includes/vendor/composer/LICENSE +21 -0
  31. includes/vendor/composer/autoload_classmap.php +10 -0
  32. includes/vendor/composer/autoload_namespaces.php +10 -0
  33. includes/vendor/composer/autoload_psr4.php +10 -0
  34. includes/vendor/composer/autoload_real.php +57 -0
  35. includes/vendor/composer/autoload_static.php +47 -0
  36. includes/vendor/composer/installed.json +250 -0
  37. includes/vendor/composer/installed.php +67 -0
  38. includes/vendor/composer/installers/LICENSE +19 -0
  39. includes/vendor/composer/installers/phpunit.xml.dist +25 -0
  40. includes/vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
  41. includes/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
  42. includes/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +130 -0
  43. includes/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +21 -0
  44. includes/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
  45. includes/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +11 -0
  46. includes/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +9 -0
  47. includes/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
  48. includes/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +12 -0
  49. includes/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
  50. includes/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
  51. includes/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +21 -0
  52. includes/vendor/composer/installers/src/Composer/Installers/Installer.php +138 -0
  53. includes/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
  54. includes/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
  55. includes/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
  56. includes/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
  57. includes/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
  58. includes/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
  59. includes/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
  60. includes/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
  61. includes/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +21 -0
  62. includes/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +9 -0
  63. includes/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
  64. includes/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
  65. includes/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
  66. includes/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +58 -0
  67. includes/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +36 -0
  68. includes/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
  69. includes/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +14 -0
  70. includes/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +33 -0
  71. includes/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
  72. includes/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +11 -0
  73. includes/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
  74. includes/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
  75. includes/vendor/composer/installers/src/bootstrap.php +13 -0
  76. includes/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +46 -0
  77. includes/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +349 -0
  78. includes/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php +48 -0
  79. includes/vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php +64 -0
  80. includes/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php +64 -0
  81. includes/vendor/composer/installers/tests/bootstrap.php +4 -0
  82. includes/vendor/composer/platform_check.php +26 -0
  83. includes/vendor/freemius/wordpress-sdk/LICENSE.txt +0 -674
  84. includes/vendor/freemius/wordpress-sdk/config.php +0 -391
  85. includes/vendor/freemius/wordpress-sdk/includes/class-freemius-abstract.php +0 -597
  86. includes/vendor/freemius/wordpress-sdk/includes/class-freemius.php +0 -11572
admin/class-admin-pages.php CHANGED
@@ -3,52 +3,28 @@
3
 
4
  namespace Stop_User_Enumeration\Admin;
5
 
6
-
7
  /**
8
  * Class Settings
 
9
  * @package Stop_User_Enumeration\Admin
10
  */
11
  class Admin_Pages {
12
 
13
  public $block_table_obj;
14
  protected $settings_page; // toplevel appearance etc followed by slug
15
-
16
-
17
- // for the block report
18
  protected $settings_page_id = 'settings_page_stop-user-enumeration';
19
-
20
- //
21
  protected $settings_title;
22
-
23
  protected $plugin_name;
24
  protected $version;
25
- protected $freemius;
26
-
27
 
28
  public function __construct() {
29
-
30
-
31
  }
32
 
33
-
34
  public static function set_screen( $status, $option, $value ) {
35
  return $value;
36
  }
37
 
38
  public function settings_setup() {
39
-
40
- /* top level
41
- add_menu_page(
42
- $this->settings_title, // Page Title
43
- $this->settings_title, // Menu Title
44
- 'manage_options', // Capability
45
- 'stop-user-enumeration', // Page Slug
46
- array( $this, 'settings_page' ), // Settings Page Function Callback
47
- 'dashicons-shield', // Menu Icon
48
- 70 // Menu Position
49
- );
50
- */
51
- /* Add settings menu page */
52
  add_submenu_page(
53
  'options-general.php',
54
  $this->settings_title, /* Page Title */
@@ -57,13 +33,9 @@ class Admin_Pages {
57
  'stop-user-enumeration', /* Page Slug */
58
  array( $this, 'settings_page' ) /* Settings Page Function Callback */
59
  );
60
-
61
  $this->register_settings();
62
-
63
-
64
  /* Vars */
65
  $page_hook_id = $this->settings_page_id;
66
-
67
  /* Do stuff in settings page, such as adding scripts, etc. */
68
  if ( ! empty( $this->settings_page ) ) {
69
  /* Load the JavaScript needed for the settings screen. */
@@ -76,7 +48,7 @@ class Admin_Pages {
76
  }
77
 
78
  public function register_settings() {
79
- // overide in extended class
80
  }
81
 
82
  public function enqueue_scripts( $hook_suffix ) {
@@ -90,19 +62,19 @@ class Admin_Pages {
90
 
91
  public function footer_scripts() {
92
  $page_hook_id = $this->settings_page_id;
93
- //@ TODO think about localize and enqueue
94
  ?>
95
  <script type="text/javascript">
96
  //<![CDATA[
97
  jQuery(document).ready(function ($) {
98
  // toggle
99
  $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
100
- postboxes.add_postbox_toggles('<?php echo $page_hook_id; ?>');
101
  // display spinner
102
  $('#fx-smb-form').submit(function () {
103
  $('#publishing-action .spinner').css('visibility', 'visible');
104
  });
105
- // confirm before reset
106
  $('#delete-action input').on('click', function () {
107
  return confirm('Are you sure want to do this?');
108
  });
@@ -125,83 +97,63 @@ class Admin_Pages {
125
  *
126
  */
127
  public function settings_page() {
128
-
129
  /* global vars */
130
  global $hook_suffix;
131
- if ( $this->settings_page_id == $hook_suffix ) {
132
-
133
-
134
  /* enable add_meta_boxes function in this page. */
135
  do_action( $this->settings_page_id . '_settings_page_boxes', $hook_suffix );
136
  ?>
137
-
138
  <div class="wrap">
139
-
140
- <h2><?php echo $this->settings_title; ?></h2>
141
-
142
  <?php
143
  global $pagenow;
144
- if ( $pagenow !== "options-general.php" ) {
145
  settings_errors();
146
- } ?>
 
147
 
148
  <div class="fs-settings-meta-box-wrap">
149
 
150
  <form id="fs-smb-form" method="post" action="options.php">
151
 
152
- <?php settings_fields( $this->option_group ); // options group
 
153
  ?>
154
  <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
155
  <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
156
-
157
  <div id="poststuff">
158
-
159
  <div id="post-body"
160
- class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
161
-
162
  <div id="postbox-container-1" class="postbox-container">
163
-
164
  <?php do_meta_boxes( $hook_suffix, 'side', null ); ?>
165
  <!-- #side-sortables -->
166
-
167
  </div><!-- #postbox-container-1 -->
168
-
169
  <div id="postbox-container-2" class="postbox-container">
170
-
171
  <?php do_meta_boxes( $hook_suffix, 'normal', null ); ?>
172
  <!-- #normal-sortables -->
173
-
174
  <?php do_meta_boxes( $hook_suffix, 'advanced', null ); ?>
175
  <!-- #advanced-sortables -->
176
-
177
  </div><!-- #postbox-container-2 -->
178
-
179
  </div><!-- #post-body -->
180
-
181
  <br class="clear">
182
-
183
  </div><!-- #poststuff -->
184
-
185
  </form>
186
-
187
  </div><!-- .fs-settings-meta-box-wrap -->
188
-
189
  </div><!-- .wrap -->
190
  <?php
191
  }
192
-
193
  }
194
 
195
  public function add_required_meta_boxes() {
196
  global $hook_suffix;
197
 
198
- if ( $this->settings_page_id == $hook_suffix ) {
199
 
200
  $this->add_meta_boxes();
201
 
202
  add_meta_box(
203
  'submitdiv', /* Meta Box ID */
204
- __( 'Save Options', 'stop-user-enumeration' ), /* Title */
205
  array( $this, 'submit_meta_box' ), /* Function Callback */
206
  $this->settings_page_id, /* Screen: Our Settings Page */
207
  'side', /* Context */
@@ -218,38 +170,29 @@ class Admin_Pages {
218
 
219
  ?>
220
  <div id="submitpost" class="submitbox">
221
-
222
  <div id="major-publishing-actions">
223
-
224
  <div id="delete-action">
225
- <input type="submit" name="<?php echo "{$this->option_group}-reset"; ?>"
226
- id="<?php echo "{$this->option_group}-reset"; ?>"
227
  class="button"
228
  value="Reset Settings">
229
  </div><!-- #delete-action -->
230
-
231
  <div id="publishing-action">
232
  <span class="spinner"></span>
233
  <?php submit_button( esc_attr__( 'Save', 'stop-user-enumeration' ), 'primary', 'submit', false ); ?>
234
  </div>
235
-
236
  <div class="clear"></div>
237
-
238
  </div><!-- #major-publishing-actions -->
239
-
240
  </div><!-- #submitpost -->
241
-
242
  <?php
243
  }
244
 
245
  public function reset_sanitize( $settings ) {
246
  /* Add Update Notice */
247
-
248
  if ( ! empty( $settings ) ) {
249
  add_settings_error( $this->option_group, '', esc_html__( 'Settings reset to defaults.', 'stop-user-enumeration' ), 'updated' );
250
  /* Delete Option */
251
  $this->delete_options();
252
-
253
  }
254
 
255
  return $settings;
@@ -258,6 +201,4 @@ class Admin_Pages {
258
  public function delete_options() {
259
  // for extended class to manage
260
  }
261
-
262
-
263
  }
3
 
4
  namespace Stop_User_Enumeration\Admin;
5
 
 
6
  /**
7
  * Class Settings
8
+ *
9
  * @package Stop_User_Enumeration\Admin
10
  */
11
  class Admin_Pages {
12
 
13
  public $block_table_obj;
14
  protected $settings_page; // toplevel appearance etc followed by slug
 
 
 
15
  protected $settings_page_id = 'settings_page_stop-user-enumeration';
 
 
16
  protected $settings_title;
 
17
  protected $plugin_name;
18
  protected $version;
 
 
19
 
20
  public function __construct() {
 
 
21
  }
22
 
 
23
  public static function set_screen( $status, $option, $value ) {
24
  return $value;
25
  }
26
 
27
  public function settings_setup() {
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  add_submenu_page(
29
  'options-general.php',
30
  $this->settings_title, /* Page Title */
33
  'stop-user-enumeration', /* Page Slug */
34
  array( $this, 'settings_page' ) /* Settings Page Function Callback */
35
  );
 
36
  $this->register_settings();
 
 
37
  /* Vars */
38
  $page_hook_id = $this->settings_page_id;
 
39
  /* Do stuff in settings page, such as adding scripts, etc. */
40
  if ( ! empty( $this->settings_page ) ) {
41
  /* Load the JavaScript needed for the settings screen. */
48
  }
49
 
50
  public function register_settings() {
51
+ // override in extended class
52
  }
53
 
54
  public function enqueue_scripts( $hook_suffix ) {
62
 
63
  public function footer_scripts() {
64
  $page_hook_id = $this->settings_page_id;
65
+ // @TODO think about local script
66
  ?>
67
  <script type="text/javascript">
68
  //<![CDATA[
69
  jQuery(document).ready(function ($) {
70
  // toggle
71
  $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
72
+ postboxes.add_postbox_toggles('<?php echo esc_attr( $page_hook_id ); ?>');
73
  // display spinner
74
  $('#fx-smb-form').submit(function () {
75
  $('#publishing-action .spinner').css('visibility', 'visible');
76
  });
77
+ // confirm before reset
78
  $('#delete-action input').on('click', function () {
79
  return confirm('Are you sure want to do this?');
80
  });
97
  *
98
  */
99
  public function settings_page() {
 
100
  /* global vars */
101
  global $hook_suffix;
102
+ if ( $this->settings_page_id === $hook_suffix ) {
 
 
103
  /* enable add_meta_boxes function in this page. */
104
  do_action( $this->settings_page_id . '_settings_page_boxes', $hook_suffix );
105
  ?>
 
106
  <div class="wrap">
107
+ <h2><?php echo esc_html( $this->settings_title ); ?></h2>
 
 
108
  <?php
109
  global $pagenow;
110
+ if ( $pagenow !== 'options-general.php' ) {
111
  settings_errors();
112
+ }
113
+ ?>
114
 
115
  <div class="fs-settings-meta-box-wrap">
116
 
117
  <form id="fs-smb-form" method="post" action="options.php">
118
 
119
+ <?php
120
+ settings_fields( $this->option_group ); // options group
121
  ?>
122
  <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
123
  <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
 
124
  <div id="poststuff">
 
125
  <div id="post-body"
126
+ class="metabox-holder columns-<?php echo 1 === (int) get_current_screen()->get_columns() ? '1' : '2'; ?>">
 
127
  <div id="postbox-container-1" class="postbox-container">
 
128
  <?php do_meta_boxes( $hook_suffix, 'side', null ); ?>
129
  <!-- #side-sortables -->
 
130
  </div><!-- #postbox-container-1 -->
 
131
  <div id="postbox-container-2" class="postbox-container">
 
132
  <?php do_meta_boxes( $hook_suffix, 'normal', null ); ?>
133
  <!-- #normal-sortables -->
 
134
  <?php do_meta_boxes( $hook_suffix, 'advanced', null ); ?>
135
  <!-- #advanced-sortables -->
 
136
  </div><!-- #postbox-container-2 -->
 
137
  </div><!-- #post-body -->
 
138
  <br class="clear">
 
139
  </div><!-- #poststuff -->
 
140
  </form>
 
141
  </div><!-- .fs-settings-meta-box-wrap -->
 
142
  </div><!-- .wrap -->
143
  <?php
144
  }
 
145
  }
146
 
147
  public function add_required_meta_boxes() {
148
  global $hook_suffix;
149
 
150
+ if ( $this->settings_page_id === $hook_suffix ) {
151
 
152
  $this->add_meta_boxes();
153
 
154
  add_meta_box(
155
  'submitdiv', /* Meta Box ID */
156
+ esc_html__( 'Save Options', 'stop-user-enumeration' ), /* Title */
157
  array( $this, 'submit_meta_box' ), /* Function Callback */
158
  $this->settings_page_id, /* Screen: Our Settings Page */
159
  'side', /* Context */
170
 
171
  ?>
172
  <div id="submitpost" class="submitbox">
 
173
  <div id="major-publishing-actions">
 
174
  <div id="delete-action">
175
+ <input type="submit" name="<?php echo esc_attr( "{$this->option_group}-reset" ); ?>"
176
+ id="<?php echo esc_attr( "{$this->option_group}-reset" ); ?>"
177
  class="button"
178
  value="Reset Settings">
179
  </div><!-- #delete-action -->
 
180
  <div id="publishing-action">
181
  <span class="spinner"></span>
182
  <?php submit_button( esc_attr__( 'Save', 'stop-user-enumeration' ), 'primary', 'submit', false ); ?>
183
  </div>
 
184
  <div class="clear"></div>
 
185
  </div><!-- #major-publishing-actions -->
 
186
  </div><!-- #submitpost -->
 
187
  <?php
188
  }
189
 
190
  public function reset_sanitize( $settings ) {
191
  /* Add Update Notice */
 
192
  if ( ! empty( $settings ) ) {
193
  add_settings_error( $this->option_group, '', esc_html__( 'Settings reset to defaults.', 'stop-user-enumeration' ), 'updated' );
194
  /* Delete Option */
195
  $this->delete_options();
 
196
  }
197
 
198
  return $settings;
201
  public function delete_options() {
202
  // for extended class to manage
203
  }
 
 
204
  }
admin/class-admin-settings.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  namespace Stop_User_Enumeration\Admin;
10
 
11
-
12
  use Freemius;
13
 
14
  /**
@@ -18,7 +18,6 @@ use Freemius;
18
  class Admin_Settings extends Admin_Pages {
19
 
20
  protected $settings_page;
21
- // protected $settings_page_id = 'toplevel_page_stop-user-enumeration'; // top level
22
  protected $settings_page_id = 'settings_page_stop-user-enumeration';
23
  protected $option_group = 'stop-user-enumeration';
24
  protected $settings_title;
@@ -28,16 +27,19 @@ class Admin_Settings extends Admin_Pages {
28
  *
29
  * @param string $plugin_name
30
  * @param string $version plugin version.
31
- * @param Freemius $freemius Freemius SDK.
32
  */
33
 
34
- public function __construct( $plugin_name, $version, $freemius ) {
35
- $this->plugin_name = $plugin_name;
36
- $this->version = $version;
37
- $this->freemius = $freemius;
38
-
39
-
40
  $this->settings_title = esc_html__( 'Stop User Enumeration', 'stop-user-enumeration' );
 
 
 
 
 
 
 
41
  parent::__construct();
42
  }
43
 
@@ -57,7 +59,8 @@ class Admin_Settings extends Admin_Pages {
57
  $this->plugin_name,
58
  plugin_dir_url( __FILE__ ) . 'css/admin.css',
59
  array(),
60
- $this->version, 'all'
 
61
  );
62
  }
63
 
@@ -69,7 +72,6 @@ class Admin_Settings extends Admin_Pages {
69
  array( $this, 'sanitize_settings' ) /* Sanitize Callback */
70
  );
71
 
72
-
73
  /* Add settings menu page */
74
  $this->settings_page = add_submenu_page(
75
  'stop-user-enumeration',
@@ -134,27 +136,42 @@ class Admin_Settings extends Admin_Pages {
134
  ?>
135
  <table class="form-table">
136
  <tbody>
 
137
  <tr class="alternate">
138
  <th scope="row"><?php _e( 'About this Plugin', 'stop-user-enumeration' ); ?></th>
139
  <td><p>
140
  <?php esc_html_e( 'Stop User Enumeration detects attempts by malicious scanners to identify your users', 'stop-user-enumeration' ); ?>
141
- </p><p><?php esc_html_e( 'If a bot or user is caught scanning for user names they are denied access and their IP is
142
- logged', 'stop-user-enumeration' ); ?>
143
- </p><p>
144
- <?php esc_html_e( 'When you are viewing an admin page, the plugin does nothing, this is designed this way as it is
145
- assumed admin user have authority, bear this in mind when testing.', 'stop-user-enumeration' ); ?>
146
- </p><br><p><?php esc_html_e( 'This plugin is best used in conjunction with a blocking tool to exclude the IP for longer. If you
147
- are on a VPS or dedicated server where you have root access you can install and configure', 'stop-user-enumeration' ); ?>
148
- <a href="https://www.fail2ban.org" target="_blank">fail2ban</a></p><br><p>
149
- <?php esc_html_e( 'Also note: It is very common for users to leave their Display Name and Nickname the same as their Username, in which case the Username is leaked by so many things. Best to check at least your admins don\'t do this', 'stop-user-enumeration' ); ?>
150
  </p>
151
- </td>
152
- </tr>
153
- <tr>
154
- <th scope="row"><?php _e( 'Support', 'stop-user-enumeration' ); ?></th>
155
- <td>
156
- <?php _e( '<a class="button-secondary"
157
- href="https://wordpress.org/support/plugin/stop-user-enumeration/" target="_blank">WordPress.org support forum</a>', 'stop-user-enumeration' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  </td>
159
  </tr>
160
  </tbody>
@@ -221,9 +238,9 @@ class Admin_Settings extends Admin_Pages {
221
  <th scope="row"><?php esc_html_e( 'Stop oEmbed calls revealing user ids', 'stop-user-enumeration' ); ?></th>
222
  <td>
223
  <label for="stop-user-enumeration[stop_oembed]"><input type="checkbox"
224
- name="stop-user-enumeration[stop_oembed]"
225
- id="stop-user-enumeration[stop_oembed]"
226
- value="on"
227
  <?php checked( 'on', $options['stop_oembed'] ); ?>>
228
  <?php esc_html_e( 'WordPress reveals the user login ID through oEmbed calls by including the Author Archive link which contains the user id. When in many cases just the Author Name is enough. Note: remember it is not good idea to have login user id equal to your display name', 'stop-user-enumeration' ); ?>
229
  </label>
@@ -249,9 +266,17 @@ class Admin_Settings extends Admin_Pages {
249
  id="stop-user-enumeration[log_auth]"
250
  value="on"
251
  <?php checked( 'on', $options['log_auth'] ); ?>>
252
- <?php printf( esc_html__( 'Leave this ticked if you are using %1$sFail2Ban%2$s on your VPS to block attempts at enumeration.%3$s If you are not running Fail2Ban or on a shared host this does not need to be ticked, however it normally will not cause a problem being ticked.'
253
- , 'stop-user-enumeration' ),
254
- '<a href="http://www.fail2ban.org/wiki/index.php/Main_Page" target="_blank">', '</a>', '<br>' ); ?>
 
 
 
 
 
 
 
 
255
  </label>
256
  </td>
257
  </tr>
@@ -263,8 +288,13 @@ class Admin_Settings extends Admin_Pages {
263
  id="stop-user-enumeration[comment_jquery]"
264
  value="on"
265
  <?php checked( 'on', $options['comment_jquery'] ); ?>>
266
- <?php esc_html_e( 'This plugin uses JavaScript to remove any numbers from a comment author name, this is because numbers trigger enumeration checking. You can untick this if you do not use comments on your site or you use a different comment method than standard',
267
- 'stop-user-enumeration' ); ?></label>
 
 
 
 
 
268
  </td>
269
  </tr>
270
  </tbody>
8
 
9
  namespace Stop_User_Enumeration\Admin;
10
 
11
+ use AlanEFPluginDonation\PluginDonation;
12
  use Freemius;
13
 
14
  /**
18
  class Admin_Settings extends Admin_Pages {
19
 
20
  protected $settings_page;
 
21
  protected $settings_page_id = 'settings_page_stop-user-enumeration';
22
  protected $option_group = 'stop-user-enumeration';
23
  protected $settings_title;
27
  *
28
  * @param string $plugin_name
29
  * @param string $version plugin version.
 
30
  */
31
 
32
+ public function __construct( $plugin_name, $version ) {
33
+ $this->plugin_name = $plugin_name;
34
+ $this->version = $version;
 
 
 
35
  $this->settings_title = esc_html__( 'Stop User Enumeration', 'stop-user-enumeration' );
36
+ $this->donation = new PluginDonation(
37
+ 'stop-user-enumeration',
38
+ $this->settings_page_id,
39
+ 'stop-user-enumeration/stop-user-enumeration.php',
40
+ admin_url( 'options-general.php?page=stop-user-enumeration' ),
41
+ $this->settings_title
42
+ );
43
  parent::__construct();
44
  }
45
 
59
  $this->plugin_name,
60
  plugin_dir_url( __FILE__ ) . 'css/admin.css',
61
  array(),
62
+ $this->version,
63
+ 'all'
64
  );
65
  }
66
 
72
  array( $this, 'sanitize_settings' ) /* Sanitize Callback */
73
  );
74
 
 
75
  /* Add settings menu page */
76
  $this->settings_page = add_submenu_page(
77
  'stop-user-enumeration',
136
  ?>
137
  <table class="form-table">
138
  <tbody>
139
+ <?php $this->donation->display(); ?>
140
  <tr class="alternate">
141
  <th scope="row"><?php _e( 'About this Plugin', 'stop-user-enumeration' ); ?></th>
142
  <td><p>
143
  <?php esc_html_e( 'Stop User Enumeration detects attempts by malicious scanners to identify your users', 'stop-user-enumeration' ); ?>
 
 
 
 
 
 
 
 
 
144
  </p>
145
+ <p>
146
+ <?php
147
+ esc_html_e(
148
+ 'If a bot or user is caught scanning for user names they are denied access and their IP is
149
+ logged',
150
+ 'stop-user-enumeration'
151
+ );
152
+ ?>
153
+ </p>
154
+ <p>
155
+ <?php
156
+ esc_html_e(
157
+ 'When you are viewing an admin page, the plugin does nothing, this is designed this way as it is
158
+ assumed admin user have authority, bear this in mind when testing.',
159
+ 'stop-user-enumeration'
160
+ );
161
+ ?>
162
+ </p><br>
163
+ <p>
164
+ <?php
165
+ esc_html_e(
166
+ 'This plugin is best used in conjunction with a blocking tool to exclude the IP for longer. If you
167
+ are on a VPS or dedicated server where you have root access you can install and configure',
168
+ 'stop-user-enumeration'
169
+ );
170
+ ?>
171
+ <a href="https://www.fail2ban.org" target="_blank">fail2ban</a></p><br>
172
+ <p>
173
+ <?php esc_html_e( 'Also note: It is very common for users to leave their Display Name and Nickname the same as their Username, in which case the Username is leaked by so many things. Best to check at least your admins don\'t do this', 'stop-user-enumeration' ); ?>
174
+ </p>
175
  </td>
176
  </tr>
177
  </tbody>
238
  <th scope="row"><?php esc_html_e( 'Stop oEmbed calls revealing user ids', 'stop-user-enumeration' ); ?></th>
239
  <td>
240
  <label for="stop-user-enumeration[stop_oembed]"><input type="checkbox"
241
+ name="stop-user-enumeration[stop_oembed]"
242
+ id="stop-user-enumeration[stop_oembed]"
243
+ value="on"
244
  <?php checked( 'on', $options['stop_oembed'] ); ?>>
245
  <?php esc_html_e( 'WordPress reveals the user login ID through oEmbed calls by including the Author Archive link which contains the user id. When in many cases just the Author Name is enough. Note: remember it is not good idea to have login user id equal to your display name', 'stop-user-enumeration' ); ?>
246
  </label>
266
  id="stop-user-enumeration[log_auth]"
267
  value="on"
268
  <?php checked( 'on', $options['log_auth'] ); ?>>
269
+ <?php
270
+ printf(
271
+ esc_html__(
272
+ 'Leave this ticked if you are using %1$sFail2Ban%2$s on your VPS to block attempts at enumeration.%3$s If you are not running Fail2Ban or on a shared host this does not need to be ticked, however it normally will not cause a problem being ticked.',
273
+ 'stop-user-enumeration'
274
+ ),
275
+ '<a href="http://www.fail2ban.org/wiki/index.php/Main_Page" target="_blank">',
276
+ '</a>',
277
+ '<br>'
278
+ );
279
+ ?>
280
  </label>
281
  </td>
282
  </tr>
288
  id="stop-user-enumeration[comment_jquery]"
289
  value="on"
290
  <?php checked( 'on', $options['comment_jquery'] ); ?>>
291
+ <?php
292
+ esc_html_e(
293
+ 'This plugin uses JavaScript to remove any numbers from a comment author name, this is because numbers trigger enumeration checking. You can untick this if you do not use comments on your site or you use a different comment method than standard',
294
+ 'stop-user-enumeration'
295
+ );
296
+ ?>
297
+ </label>
298
  </td>
299
  </tr>
300
  </tbody>
admin/css/images/logocrop200.svg CHANGED
@@ -1,168 +1,168 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
5
- y="0px"
6
- width="200px" height="76px" viewBox="155 120 650 240" enable-background="new 155 120 650 240" xml:space="preserve">
7
- <g>
8
- <g>
9
- <g>
10
- <g>
11
- <g>
12
- <polygon fill="#FFFFFF" points="490.944,228.154 490.944,241.871 464.354,241.871 457.962,235.479 457.962,201.596
13
- 464.354,195.205 473.802,195.205 473.802,228.154 "/>
14
- </g>
15
- <g>
16
- <polygon fill="#FFFFFF" points="530.71,228.064 530.71,241.871 504.12,241.871 497.725,235.479 497.725,201.596
17
- 504.12,195.205 513.563,195.205 513.563,228.064 "/>
18
- </g>
19
- <g>
20
- <polygon fill="#FFFFFF" points="592.916,201.59 582.713,241.871 567.111,241.871 562.673,227.875 558.355,241.871
21
- 542.736,241.871 532.541,201.586 538.919,195.205 547.427,195.205 551.119,213.185 557.269,195.205 568.548,195.205
22
- 574.451,213.137 578.328,195.205 586.531,195.205 "/>
23
- </g>
24
- <g>
25
- <path fill="#FFFFFF" d="M635.226,201.282c-4.015-4.318-9.502-6.497-16.362-6.497c-6.837,0-12.367,2.199-16.341,6.537
26
- c-3.955,4.277-5.951,10.067-5.951,17.25c0,7.122,1.996,12.893,5.932,17.188c3.993,4.358,9.501,6.577,16.36,6.577
27
- c6.86,0,12.348-2.178,16.362-6.496c3.975-4.237,5.972-10.047,5.972-17.27C641.197,211.348,639.2,205.539,635.226,201.282z
28
- M624.716,223.01c-0.383,1.27-0.929,2.38-1.594,3.288c-0.545,0.726-1.151,1.23-1.857,1.553
29
- c-0.785,0.364-1.553,0.544-2.359,0.544c-0.809,0-1.574-0.161-2.341-0.504c-0.706-0.303-1.332-0.807-1.895-1.574
30
- c-0.646-0.826-1.172-1.936-1.575-3.248c-0.404-1.372-0.627-3.188-0.627-5.406c0-2.138,0.223-3.066,0.666-4.56
31
- c0.424-1.372,0.928-2.481,1.536-3.247c0.662-0.788,1.309-1.333,1.913-1.594c0.666-0.284,1.454-0.445,2.322-0.445
32
- c0.807,0,1.552,0.162,2.321,0.484c0.685,0.303,1.309,0.827,1.896,1.555c0.625,0.826,1.149,1.936,1.554,3.288
33
- c0.423,1.433,0.625,2.36,0.625,4.499C625.301,219.902,625.099,221.718,624.716,223.01z"/>
34
- </g>
35
- <g>
36
- <path fill="#FFFFFF" d="M678.5,222.364c1.495-1.09,2.765-2.36,3.835-3.813c1.754-2.441,2.643-5.569,2.643-9.281
37
- c0-2.724-0.565-5.064-1.694-6.939c-1.09-1.816-2.563-3.309-4.4-4.499c-1.733-1.09-3.651-1.817-5.708-2.16
38
- c-1.836-0.302-3.995-0.463-6.435-0.463h-12.914l-6.395,6.395v33.874l6.395,6.395h9.401v-13.638l11.058,13.638h14.627v-6.355
39
- L678.5,222.364z M669.142,212.499c-0.162,0.362-0.426,0.685-0.81,0.968l-0.04,0.04c-0.402,0.323-0.907,0.545-1.552,0.646
40
- c-1.01,0.181-1.756,0.283-3.29,0.283h-0.242v-6.718h0.849c1.289,0,1.836,0.04,2.684,0.121c0.604,0.06,1.149,0.181,1.572,0.363
41
- c0.605,0.263,0.746,0.524,0.786,0.605c0.224,0.404,0.325,0.969,0.325,1.655C669.424,211.671,669.24,212.256,669.142,212.499z"
42
- />
43
- </g>
44
- <g>
45
- <polygon fill="#FFFFFF" points="735.213,235.544 735.213,241.871 720.386,241.871 711.356,228.327 711.356,241.871
46
- 701.911,241.871 695.518,235.479 695.518,201.596 701.911,195.205 711.356,195.205 711.356,207.706 720.36,195.205
47
- 728.111,195.205 734.451,201.544 722.461,217.146 "/>
48
- </g>
49
- <g>
50
- <path fill="#FFFFFF" d="M779.546,226.588c0,4.89-1.947,8.88-5.793,11.859c-3.682,2.843-8.646,4.288-14.743,4.288
51
- c-3.411,0-6.47-0.338-9.093-1.008c-2.557-0.648-4.977-1.48-7.185-2.45l-0.416-0.179v-10.587h7.973
52
- c0.674,0.338,1.361,0.64,2.059,0.905c2.315,0.869,4.572,1.315,6.718,1.315c0.515,0,1.226-0.059,2.133-0.178
53
- c0.963-0.129,1.503-0.313,1.784-0.446l0.053-0.026c0.457-0.194,0.831-0.465,1.139-0.813c0.056-0.067,0.234-0.268,0.234-0.888
54
- c0-0.415-0.121-0.663-0.452-0.928c-0.595-0.477-1.344-0.833-2.202-1.058c-1.411-0.37-2.932-0.734-4.531-1.064
55
- c-1.728-0.359-3.365-0.807-4.865-1.323c-3.696-1.304-6.413-3.132-8.086-5.432c-1.696-2.324-2.549-5.217-2.549-8.607
56
- c0-4.667,1.992-8.489,5.916-11.361c3.718-2.722,8.381-4.102,13.849-4.102c2.659,0,5.341,0.277,7.973,0.813
57
- c2.63,0.539,5.037,1.287,7.138,2.223l0.331,0.181l-0.018,10.035h-8.612c-0.025-0.009-0.049-0.022-0.079-0.034
58
- c-1.998-0.824-4.086-1.242-6.186-1.242c-0.805,0-1.521,0.057-2.135,0.164c-0.56,0.101-1.168,0.305-1.814,0.606
59
- c-0.378,0.17-0.694,0.424-0.971,0.765c-0.178,0.223-0.252,0.42-0.252,0.672c0,0.516,0.151,0.753,0.381,0.941
60
- c0.179,0.145,0.973,0.681,3.59,1.286c1.42,0.326,2.783,0.644,4.108,0.946c1.395,0.317,2.896,0.764,4.47,1.319
61
- c3.312,1.199,5.845,2.87,7.525,4.966C778.665,220.323,779.546,223.164,779.546,226.588z"/>
62
- </g>
63
- <path fill="#FFFFFF" d="M449.788,201.655v21.8c0,5.833-1.757,10.444-5.225,13.688c-3.412,3.198-8.388,4.818-14.78,4.818
64
- c-6.201,0-11.117-1.584-14.595-4.708c-3.569-3.207-5.38-7.837-5.38-13.771v-21.828l6.395-6.387h9.447v27.053
65
- c0,2.771,0.567,4.091,1.049,4.711c0.19,0.257,0.789,1.027,3.085,1.027c2.278,0,2.913-0.768,3.128-1.018
66
- c0.383-0.475,1.038-1.708,1.038-4.721v-27.053h9.445L449.788,201.655z"/>
67
- <polygon fill="#FFFFFF" points="384.683,208.295 384.683,214.884 398.705,214.884 398.705,228.642 384.683,228.642
68
- 384.683,242.628 375.005,242.628 368.419,236.037 368.419,201.122 375.005,194.54 395.905,194.54 402.496,201.122
69
- 402.496,208.295 "/>
70
- </g>
71
- </g>
72
- <g>
73
- <polygon fill="#FFFFFF" points="263.001,232.068 269.6,238.664 269.6,245.867 251.764,245.867 251.764,252.465 265.805,252.465
74
- 265.805,266.243 251.764,266.243 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 "/>
75
- <path fill="#FFFFFF" d="M310.474,163.353c-0.767-0.464-1.532-0.929-2.321-1.393c-3.913-2.239-8.008-4.337-12.206-6.273
76
- c-1.048-0.484-2.098-0.949-3.126-1.413c-1.089-0.464-2.159-0.928-3.207-1.371c-0.243-0.122-0.505-0.223-0.767-0.323l-0.808-0.343
77
- c-0.545-0.201-1.069-0.423-1.593-0.646c-0.525-0.2-1.048-0.402-1.553-0.624c-0.546-0.202-1.089-0.404-1.615-0.606
78
- c-2.057-0.807-4.175-1.553-6.173-2.279c-2.118-0.707-4.096-1.392-5.952-2.018c-0.887-0.302-1.895-0.604-2.825-0.908
79
- c-0.929-0.281-1.815-0.544-2.662-0.826c-0.423-0.122-0.847-0.264-1.251-0.384c-0.201-0.061-0.403-0.121-0.604-0.182
80
- c-0.223-0.06-0.424-0.122-0.646-0.182c-0.828-0.242-1.614-0.464-2.36-0.686c-0.766-0.223-1.474-0.423-2.118-0.605
81
- c-0.727-0.182-1.374-0.363-1.998-0.545c-0.604-0.162-1.17-0.302-1.694-0.443c-0.263-0.062-0.504-0.143-0.747-0.202
82
- c-0.242-0.062-0.485-0.123-0.705-0.162c-1.817-0.464-2.744-0.686-2.744-0.686h-0.282c0,0-0.928,0.222-2.725,0.686
83
- c-0.242,0.039-0.484,0.1-0.725,0.162c-0.242,0.059-0.485,0.14-0.747,0.202c-0.525,0.141-1.089,0.281-1.696,0.443
84
- c-0.625,0.182-1.271,0.363-1.976,0.545c-0.667,0.182-1.371,0.383-2.118,0.605c-0.747,0.222-1.554,0.443-2.381,0.686
85
- c-0.202,0.06-0.424,0.122-0.645,0.182c-0.204,0.061-0.404,0.121-0.605,0.182c-0.404,0.12-0.827,0.262-1.251,0.384
86
- c-0.847,0.281-1.735,0.544-2.664,0.826c-0.928,0.304-1.937,0.606-2.826,0.908c-1.833,0.626-3.831,1.311-5.93,2.018
87
- c-1.998,0.726-4.116,1.472-6.194,2.279c-0.524,0.202-1.069,0.405-1.593,0.606c-0.525,0.222-1.029,0.424-1.575,0.624
88
- c-0.524,0.223-1.048,0.445-1.592,0.646c-0.264,0.122-0.526,0.223-0.808,0.343c-0.262,0.101-0.524,0.202-0.767,0.323
89
- c-1.05,0.443-2.118,0.907-3.208,1.371c-1.03,0.464-2.079,0.929-3.148,1.413c-4.156,1.937-8.272,4.035-12.186,6.273
90
- c-1.008,0.585-1.998,1.191-2.985,1.796l-22.718,51.143c0.565,6.839,1.454,13.899,2.705,21.063
91
- c1.271,7.242,2.904,14.588,4.963,21.951c2.038,7.342,4.458,14.706,7.282,21.95c0.343,0.908,0.707,1.795,1.07,2.703
92
- c0.362,0.888,0.727,1.797,1.09,2.683c0.767,1.815,1.513,3.592,2.32,5.367c1.572,3.55,3.247,7.041,4.982,10.491
93
- c3.489,6.898,7.284,13.555,11.258,19.891c0.686,1.07,1.352,2.117,2.036,3.168l45.455,25.582l45.576-25.663
94
- c0.685-1.029,1.332-2.057,1.998-3.087c3.973-6.336,7.766-12.992,11.257-19.891c1.734-3.45,3.408-6.941,4.983-10.491
95
- c0.806-1.775,1.553-3.552,2.319-5.367c0.384-0.886,0.727-1.795,1.088-2.683c0.365-0.908,0.728-1.795,1.09-2.703
96
- c2.806-7.244,5.247-14.608,7.285-21.95c2.037-7.362,3.672-14.708,4.943-21.951c1.19-6.859,2.078-13.617,2.642-20.174
97
- L310.474,163.353z M223.198,192.828c0-15.112,12.307-27.417,27.417-27.417c15.132,0,27.418,12.306,27.418,27.417v11.923
98
- l-11.843-2.482v-9.44c0-8.595-6.98-15.576-15.575-15.576c-8.574,0-15.554,6.981-15.554,15.576v9.44l-11.863,2.482V192.828z
99
- M290.722,259.563c-0.707,3.414-1.594,6.822-2.603,10.172c-0.504,1.693-1.028,3.348-1.594,5.002
100
- c-0.545,1.655-1.07,3.268-1.655,4.883c-2.259,6.397-4.578,12.366-6.515,17.47c-0.485,1.292-0.95,2.521-1.393,3.674
101
- c-0.485,1.168-1.332,2.278-2.4,3.327c-1.111,1.027-2.401,1.997-3.976,2.905c-0.382,0.222-0.747,0.443-1.109,0.667
102
- c-0.424,0.203-0.848,0.423-1.251,0.624c-0.767,0.426-1.674,0.808-2.522,1.191c-0.786,0.363-1.775,0.725-2.603,1.048
103
- c-0.848,0.343-1.856,0.645-2.662,0.929c-0.869,0.303-1.615,0.564-2.401,0.808c-0.848,0.241-1.633,0.463-2.32,0.666
104
- c-1.291,0.402-2.724,0.706-3.531,0.926c-0.848,0.204-1.291,0.305-1.291,0.305h-0.565c0,0-0.424-0.101-1.271-0.305
105
- c-0.806-0.22-2.238-0.523-3.531-0.926c-0.705-0.203-1.471-0.425-2.319-0.666c-0.807-0.243-1.534-0.505-2.401-0.808
106
- c-0.827-0.284-1.836-0.586-2.683-0.929c-0.806-0.323-1.795-0.685-2.583-1.048c-0.848-0.384-1.753-0.766-2.522-1.191
107
- c-0.423-0.201-0.825-0.421-1.25-0.624c-0.364-0.224-0.747-0.445-1.131-0.667c-1.574-0.908-2.864-1.878-3.954-2.905
108
- c-1.089-1.049-1.937-2.159-2.399-3.327c-0.445-1.152-0.908-2.382-1.393-3.674c-1.937-5.104-4.257-11.072-6.517-17.47
109
- c-0.583-1.615-1.129-3.228-1.673-4.883c-0.546-1.654-1.089-3.309-1.593-5.002c-0.99-3.35-1.897-6.758-2.583-10.172
110
- c-1.412-6.836-1.978-13.656-1.716-20.052c0.242-6.395,1.231-12.367,2.341-17.491c0.565-2.562,1.17-4.901,1.735-6.98
111
- c0.605-2.078,4.701-3.894,10.127-5.386c0.707-0.183,1.393-0.364,2.058-0.545c0.304-0.081,0.705-0.182,1.129-0.263
112
- c0.403-0.08,0.808-0.162,1.191-0.243c1.573-0.342,3.026-0.645,4.398-0.948l0.524-0.101l0.626-0.101
113
- c0.402-0.081,0.806-0.142,1.21-0.223c0.786-0.122,1.553-0.241,2.28-0.384c0.727-0.121,1.432-0.242,2.079-0.343
114
- c0.323-0.06,0.686-0.122,1.089-0.161c0.363-0.06,0.725-0.101,1.09-0.162c1.432-0.201,2.684-0.362,3.751-0.524
115
- c1.293-0.162,2.361-0.283,3.229-0.384c1.756-0.202,2.663-0.323,2.663-0.323h0.565c0,0,0.908,0.121,2.664,0.323
116
- c0.867,0.101,1.957,0.222,3.227,0.384c1.089,0.162,2.341,0.323,3.773,0.524c0.342,0.061,0.706,0.102,1.089,0.162
117
- c0.384,0.04,0.767,0.102,1.07,0.161c0.666,0.101,1.351,0.222,2.077,0.343c0.727,0.143,1.493,0.262,2.301,0.384
118
- c0.382,0.081,0.786,0.142,1.209,0.223l0.626,0.101l0.504,0.101c1.371,0.303,2.845,0.606,4.398,0.948
119
- c0.403,0.081,0.807,0.163,1.189,0.243c0.424,0.081,0.827,0.182,1.131,0.263c0.686,0.181,1.372,0.362,2.076,0.545
120
- c5.428,1.492,9.503,3.308,10.129,5.386c0.565,2.079,1.17,4.418,1.714,6.98c1.131,5.125,2.118,11.096,2.34,17.491
121
- C292.68,245.907,292.136,252.728,290.722,259.563z"/>
122
- <g>
123
- <g>
124
- <polygon fill="#2E3744" points="251.764,245.867 251.764,252.465 265.805,252.465 265.805,266.243 251.764,266.243
125
- 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 263.001,232.068 269.6,238.664
126
- 269.6,245.867 "/>
127
- <polygon fill="#FFFFFF" points="251.764,245.867 251.764,252.465 265.805,252.465 265.805,266.243 251.764,266.243
128
- 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 263.001,232.068 269.6,238.664
129
- 269.6,245.867 "/>
130
- </g>
131
- </g>
132
- </g>
133
- </g>
134
- <g>
135
- <path fill="#FFFFFF" d="M384.918,292.552c-0.464-0.806-1.21-1.555-2.239-2.18c-1.008-0.645-2.36-1.211-4.034-1.713
136
- c-1.675-0.485-2.887-1.01-3.611-1.535c-0.748-0.525-1.109-1.19-1.109-1.977c0-0.947,0.342-1.675,1.028-2.198
137
- c0.666-0.526,1.613-0.787,2.845-0.787c1.311,0,2.319,0.323,3.026,0.968c0.706,0.625,1.048,1.513,1.048,2.642h3.733
138
- c0-1.249-0.323-2.38-0.989-3.408c-0.686-1.009-1.594-1.797-2.784-2.359c-1.171-0.545-2.502-0.828-4.015-0.828
139
- c-2.26,0-4.097,0.563-5.509,1.693c-1.411,1.131-2.118,2.544-2.118,4.3c0,1.977,0.969,3.589,2.945,4.82
140
- c1.009,0.646,2.401,1.232,4.135,1.757c1.736,0.524,2.948,1.028,3.612,1.553c0.665,0.505,0.988,1.229,0.988,2.178
141
- c0,0.868-0.323,1.572-0.967,2.101c-0.665,0.522-1.636,0.805-2.945,0.805c-1.514,0-2.664-0.344-3.491-1.01
142
- c-0.806-0.685-1.21-1.634-1.21-2.845h-3.753c0,1.353,0.363,2.521,1.09,3.552c0.727,1.01,1.755,1.815,3.068,2.381
143
- c1.31,0.585,2.742,0.868,4.297,0.868c2.359,0,4.235-0.524,5.607-1.596c1.373-1.048,2.059-2.479,2.059-4.274
144
- C385.625,294.346,385.382,293.379,384.918,292.552z"/>
145
- <path fill="#FFFFFF"
146
- d="M431.098,298.038v-6.635h8.856v-2.949h-8.856v-5.969h10.25v-3.007h-14.002v21.566h14.102v-3.007H431.098z"
147
- />
148
- <path fill="#FFFFFF" d="M494.245,297.313c-0.728,0.667-1.835,1.009-3.308,1.009c-1.617,0-2.825-0.627-3.673-1.855
149
- c-0.828-1.211-1.251-3.006-1.251-5.327v-1.915c0.02-2.303,0.464-4.056,1.352-5.246c0.866-1.191,2.118-1.777,3.753-1.777
150
- c1.39,0,2.46,0.344,3.188,1.03c0.724,0.686,1.169,1.796,1.352,3.348h3.732c-0.245-2.359-1.091-4.176-2.542-5.465
151
- c-1.434-1.293-3.35-1.938-5.73-1.938c-1.774,0-3.329,0.424-4.682,1.252c-1.353,0.846-2.379,2.036-3.106,3.592
152
- c-0.705,1.552-1.069,3.348-1.069,5.387v1.997c0.021,1.994,0.385,3.73,1.112,5.244c0.704,1.494,1.711,2.645,3.025,3.47
153
- c1.31,0.806,2.823,1.211,4.539,1.211c2.461,0,4.416-0.646,5.911-1.919c1.472-1.288,2.319-3.084,2.542-5.387h-3.732
154
- C495.455,295.558,494.992,296.668,494.245,297.313z"/>
155
- <path fill="#FFFFFF" d="M553.217,279.479v14.304c0,3.045-1.453,4.559-4.34,4.559c-1.41,0-2.479-0.381-3.226-1.131
156
- c-0.729-0.764-1.089-1.875-1.089-3.309v-14.423h-3.735v14.383c0,2.34,0.728,4.177,2.181,5.489c1.45,1.332,3.409,1.978,5.869,1.978
157
- c2.443,0,4.398-0.665,5.872-1.998c1.474-1.332,2.197-3.146,2.197-5.447v-14.404H553.217z"/>
158
- <path fill="#FFFFFF" d="M610.792,291.866c1.252-0.526,2.222-1.271,2.908-2.241c0.704-0.989,1.049-2.178,1.049-3.632
159
- c0-2.117-0.665-3.732-2.018-4.841c-1.354-1.129-3.289-1.674-5.771-1.674h-7.584v21.566h3.75v-8.291h4.178l4.316,8.291h4.016
160
- v-0.201L610.792,291.866z M606.98,289.728h-3.854v-7.242h3.954c1.294,0.02,2.28,0.363,2.946,0.987
161
- c0.646,0.625,0.99,1.535,0.99,2.684c0,1.109-0.364,1.976-1.071,2.602C609.221,289.406,608.231,289.728,606.98,289.728z"/>
162
- <path fill="#FFFFFF" d="M656.955,279.479v21.566h3.731v-21.566H656.955z"/>
163
- <path fill="#FFFFFF" d="M701.783,279.479v3.007h6.656v18.56h3.713v-18.56h6.738v-3.007H701.783z"/>
164
- <path fill="#FFFFFF" d="M772.374,279.479l-4.942,10.21l-4.963-10.21h-4.176l7.241,13.618v7.948h3.772v-7.948l7.224-13.618H772.374
165
- z"/>
166
- </g>
167
- </g>
168
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
5
+ y="0px"
6
+ width="200px" height="76px" viewBox="155 120 650 240" enable-background="new 155 120 650 240" xml:space="preserve">
7
+ <g>
8
+ <g>
9
+ <g>
10
+ <g>
11
+ <g>
12
+ <polygon fill="#FFFFFF" points="490.944,228.154 490.944,241.871 464.354,241.871 457.962,235.479 457.962,201.596
13
+ 464.354,195.205 473.802,195.205 473.802,228.154 "/>
14
+ </g>
15
+ <g>
16
+ <polygon fill="#FFFFFF" points="530.71,228.064 530.71,241.871 504.12,241.871 497.725,235.479 497.725,201.596
17
+ 504.12,195.205 513.563,195.205 513.563,228.064 "/>
18
+ </g>
19
+ <g>
20
+ <polygon fill="#FFFFFF" points="592.916,201.59 582.713,241.871 567.111,241.871 562.673,227.875 558.355,241.871
21
+ 542.736,241.871 532.541,201.586 538.919,195.205 547.427,195.205 551.119,213.185 557.269,195.205 568.548,195.205
22
+ 574.451,213.137 578.328,195.205 586.531,195.205 "/>
23
+ </g>
24
+ <g>
25
+ <path fill="#FFFFFF" d="M635.226,201.282c-4.015-4.318-9.502-6.497-16.362-6.497c-6.837,0-12.367,2.199-16.341,6.537
26
+ c-3.955,4.277-5.951,10.067-5.951,17.25c0,7.122,1.996,12.893,5.932,17.188c3.993,4.358,9.501,6.577,16.36,6.577
27
+ c6.86,0,12.348-2.178,16.362-6.496c3.975-4.237,5.972-10.047,5.972-17.27C641.197,211.348,639.2,205.539,635.226,201.282z
28
+ M624.716,223.01c-0.383,1.27-0.929,2.38-1.594,3.288c-0.545,0.726-1.151,1.23-1.857,1.553
29
+ c-0.785,0.364-1.553,0.544-2.359,0.544c-0.809,0-1.574-0.161-2.341-0.504c-0.706-0.303-1.332-0.807-1.895-1.574
30
+ c-0.646-0.826-1.172-1.936-1.575-3.248c-0.404-1.372-0.627-3.188-0.627-5.406c0-2.138,0.223-3.066,0.666-4.56
31
+ c0.424-1.372,0.928-2.481,1.536-3.247c0.662-0.788,1.309-1.333,1.913-1.594c0.666-0.284,1.454-0.445,2.322-0.445
32
+ c0.807,0,1.552,0.162,2.321,0.484c0.685,0.303,1.309,0.827,1.896,1.555c0.625,0.826,1.149,1.936,1.554,3.288
33
+ c0.423,1.433,0.625,2.36,0.625,4.499C625.301,219.902,625.099,221.718,624.716,223.01z"/>
34
+ </g>
35
+ <g>
36
+ <path fill="#FFFFFF" d="M678.5,222.364c1.495-1.09,2.765-2.36,3.835-3.813c1.754-2.441,2.643-5.569,2.643-9.281
37
+ c0-2.724-0.565-5.064-1.694-6.939c-1.09-1.816-2.563-3.309-4.4-4.499c-1.733-1.09-3.651-1.817-5.708-2.16
38
+ c-1.836-0.302-3.995-0.463-6.435-0.463h-12.914l-6.395,6.395v33.874l6.395,6.395h9.401v-13.638l11.058,13.638h14.627v-6.355
39
+ L678.5,222.364z M669.142,212.499c-0.162,0.362-0.426,0.685-0.81,0.968l-0.04,0.04c-0.402,0.323-0.907,0.545-1.552,0.646
40
+ c-1.01,0.181-1.756,0.283-3.29,0.283h-0.242v-6.718h0.849c1.289,0,1.836,0.04,2.684,0.121c0.604,0.06,1.149,0.181,1.572,0.363
41
+ c0.605,0.263,0.746,0.524,0.786,0.605c0.224,0.404,0.325,0.969,0.325,1.655C669.424,211.671,669.24,212.256,669.142,212.499z"
42
+ />
43
+ </g>
44
+ <g>
45
+ <polygon fill="#FFFFFF" points="735.213,235.544 735.213,241.871 720.386,241.871 711.356,228.327 711.356,241.871
46
+ 701.911,241.871 695.518,235.479 695.518,201.596 701.911,195.205 711.356,195.205 711.356,207.706 720.36,195.205
47
+ 728.111,195.205 734.451,201.544 722.461,217.146 "/>
48
+ </g>
49
+ <g>
50
+ <path fill="#FFFFFF" d="M779.546,226.588c0,4.89-1.947,8.88-5.793,11.859c-3.682,2.843-8.646,4.288-14.743,4.288
51
+ c-3.411,0-6.47-0.338-9.093-1.008c-2.557-0.648-4.977-1.48-7.185-2.45l-0.416-0.179v-10.587h7.973
52
+ c0.674,0.338,1.361,0.64,2.059,0.905c2.315,0.869,4.572,1.315,6.718,1.315c0.515,0,1.226-0.059,2.133-0.178
53
+ c0.963-0.129,1.503-0.313,1.784-0.446l0.053-0.026c0.457-0.194,0.831-0.465,1.139-0.813c0.056-0.067,0.234-0.268,0.234-0.888
54
+ c0-0.415-0.121-0.663-0.452-0.928c-0.595-0.477-1.344-0.833-2.202-1.058c-1.411-0.37-2.932-0.734-4.531-1.064
55
+ c-1.728-0.359-3.365-0.807-4.865-1.323c-3.696-1.304-6.413-3.132-8.086-5.432c-1.696-2.324-2.549-5.217-2.549-8.607
56
+ c0-4.667,1.992-8.489,5.916-11.361c3.718-2.722,8.381-4.102,13.849-4.102c2.659,0,5.341,0.277,7.973,0.813
57
+ c2.63,0.539,5.037,1.287,7.138,2.223l0.331,0.181l-0.018,10.035h-8.612c-0.025-0.009-0.049-0.022-0.079-0.034
58
+ c-1.998-0.824-4.086-1.242-6.186-1.242c-0.805,0-1.521,0.057-2.135,0.164c-0.56,0.101-1.168,0.305-1.814,0.606
59
+ c-0.378,0.17-0.694,0.424-0.971,0.765c-0.178,0.223-0.252,0.42-0.252,0.672c0,0.516,0.151,0.753,0.381,0.941
60
+ c0.179,0.145,0.973,0.681,3.59,1.286c1.42,0.326,2.783,0.644,4.108,0.946c1.395,0.317,2.896,0.764,4.47,1.319
61
+ c3.312,1.199,5.845,2.87,7.525,4.966C778.665,220.323,779.546,223.164,779.546,226.588z"/>
62
+ </g>
63
+ <path fill="#FFFFFF" d="M449.788,201.655v21.8c0,5.833-1.757,10.444-5.225,13.688c-3.412,3.198-8.388,4.818-14.78,4.818
64
+ c-6.201,0-11.117-1.584-14.595-4.708c-3.569-3.207-5.38-7.837-5.38-13.771v-21.828l6.395-6.387h9.447v27.053
65
+ c0,2.771,0.567,4.091,1.049,4.711c0.19,0.257,0.789,1.027,3.085,1.027c2.278,0,2.913-0.768,3.128-1.018
66
+ c0.383-0.475,1.038-1.708,1.038-4.721v-27.053h9.445L449.788,201.655z"/>
67
+ <polygon fill="#FFFFFF" points="384.683,208.295 384.683,214.884 398.705,214.884 398.705,228.642 384.683,228.642
68
+ 384.683,242.628 375.005,242.628 368.419,236.037 368.419,201.122 375.005,194.54 395.905,194.54 402.496,201.122
69
+ 402.496,208.295 "/>
70
+ </g>
71
+ </g>
72
+ <g>
73
+ <polygon fill="#FFFFFF" points="263.001,232.068 269.6,238.664 269.6,245.867 251.764,245.867 251.764,252.465 265.805,252.465
74
+ 265.805,266.243 251.764,266.243 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 "/>
75
+ <path fill="#FFFFFF" d="M310.474,163.353c-0.767-0.464-1.532-0.929-2.321-1.393c-3.913-2.239-8.008-4.337-12.206-6.273
76
+ c-1.048-0.484-2.098-0.949-3.126-1.413c-1.089-0.464-2.159-0.928-3.207-1.371c-0.243-0.122-0.505-0.223-0.767-0.323l-0.808-0.343
77
+ c-0.545-0.201-1.069-0.423-1.593-0.646c-0.525-0.2-1.048-0.402-1.553-0.624c-0.546-0.202-1.089-0.404-1.615-0.606
78
+ c-2.057-0.807-4.175-1.553-6.173-2.279c-2.118-0.707-4.096-1.392-5.952-2.018c-0.887-0.302-1.895-0.604-2.825-0.908
79
+ c-0.929-0.281-1.815-0.544-2.662-0.826c-0.423-0.122-0.847-0.264-1.251-0.384c-0.201-0.061-0.403-0.121-0.604-0.182
80
+ c-0.223-0.06-0.424-0.122-0.646-0.182c-0.828-0.242-1.614-0.464-2.36-0.686c-0.766-0.223-1.474-0.423-2.118-0.605
81
+ c-0.727-0.182-1.374-0.363-1.998-0.545c-0.604-0.162-1.17-0.302-1.694-0.443c-0.263-0.062-0.504-0.143-0.747-0.202
82
+ c-0.242-0.062-0.485-0.123-0.705-0.162c-1.817-0.464-2.744-0.686-2.744-0.686h-0.282c0,0-0.928,0.222-2.725,0.686
83
+ c-0.242,0.039-0.484,0.1-0.725,0.162c-0.242,0.059-0.485,0.14-0.747,0.202c-0.525,0.141-1.089,0.281-1.696,0.443
84
+ c-0.625,0.182-1.271,0.363-1.976,0.545c-0.667,0.182-1.371,0.383-2.118,0.605c-0.747,0.222-1.554,0.443-2.381,0.686
85
+ c-0.202,0.06-0.424,0.122-0.645,0.182c-0.204,0.061-0.404,0.121-0.605,0.182c-0.404,0.12-0.827,0.262-1.251,0.384
86
+ c-0.847,0.281-1.735,0.544-2.664,0.826c-0.928,0.304-1.937,0.606-2.826,0.908c-1.833,0.626-3.831,1.311-5.93,2.018
87
+ c-1.998,0.726-4.116,1.472-6.194,2.279c-0.524,0.202-1.069,0.405-1.593,0.606c-0.525,0.222-1.029,0.424-1.575,0.624
88
+ c-0.524,0.223-1.048,0.445-1.592,0.646c-0.264,0.122-0.526,0.223-0.808,0.343c-0.262,0.101-0.524,0.202-0.767,0.323
89
+ c-1.05,0.443-2.118,0.907-3.208,1.371c-1.03,0.464-2.079,0.929-3.148,1.413c-4.156,1.937-8.272,4.035-12.186,6.273
90
+ c-1.008,0.585-1.998,1.191-2.985,1.796l-22.718,51.143c0.565,6.839,1.454,13.899,2.705,21.063
91
+ c1.271,7.242,2.904,14.588,4.963,21.951c2.038,7.342,4.458,14.706,7.282,21.95c0.343,0.908,0.707,1.795,1.07,2.703
92
+ c0.362,0.888,0.727,1.797,1.09,2.683c0.767,1.815,1.513,3.592,2.32,5.367c1.572,3.55,3.247,7.041,4.982,10.491
93
+ c3.489,6.898,7.284,13.555,11.258,19.891c0.686,1.07,1.352,2.117,2.036,3.168l45.455,25.582l45.576-25.663
94
+ c0.685-1.029,1.332-2.057,1.998-3.087c3.973-6.336,7.766-12.992,11.257-19.891c1.734-3.45,3.408-6.941,4.983-10.491
95
+ c0.806-1.775,1.553-3.552,2.319-5.367c0.384-0.886,0.727-1.795,1.088-2.683c0.365-0.908,0.728-1.795,1.09-2.703
96
+ c2.806-7.244,5.247-14.608,7.285-21.95c2.037-7.362,3.672-14.708,4.943-21.951c1.19-6.859,2.078-13.617,2.642-20.174
97
+ L310.474,163.353z M223.198,192.828c0-15.112,12.307-27.417,27.417-27.417c15.132,0,27.418,12.306,27.418,27.417v11.923
98
+ l-11.843-2.482v-9.44c0-8.595-6.98-15.576-15.575-15.576c-8.574,0-15.554,6.981-15.554,15.576v9.44l-11.863,2.482V192.828z
99
+ M290.722,259.563c-0.707,3.414-1.594,6.822-2.603,10.172c-0.504,1.693-1.028,3.348-1.594,5.002
100
+ c-0.545,1.655-1.07,3.268-1.655,4.883c-2.259,6.397-4.578,12.366-6.515,17.47c-0.485,1.292-0.95,2.521-1.393,3.674
101
+ c-0.485,1.168-1.332,2.278-2.4,3.327c-1.111,1.027-2.401,1.997-3.976,2.905c-0.382,0.222-0.747,0.443-1.109,0.667
102
+ c-0.424,0.203-0.848,0.423-1.251,0.624c-0.767,0.426-1.674,0.808-2.522,1.191c-0.786,0.363-1.775,0.725-2.603,1.048
103
+ c-0.848,0.343-1.856,0.645-2.662,0.929c-0.869,0.303-1.615,0.564-2.401,0.808c-0.848,0.241-1.633,0.463-2.32,0.666
104
+ c-1.291,0.402-2.724,0.706-3.531,0.926c-0.848,0.204-1.291,0.305-1.291,0.305h-0.565c0,0-0.424-0.101-1.271-0.305
105
+ c-0.806-0.22-2.238-0.523-3.531-0.926c-0.705-0.203-1.471-0.425-2.319-0.666c-0.807-0.243-1.534-0.505-2.401-0.808
106
+ c-0.827-0.284-1.836-0.586-2.683-0.929c-0.806-0.323-1.795-0.685-2.583-1.048c-0.848-0.384-1.753-0.766-2.522-1.191
107
+ c-0.423-0.201-0.825-0.421-1.25-0.624c-0.364-0.224-0.747-0.445-1.131-0.667c-1.574-0.908-2.864-1.878-3.954-2.905
108
+ c-1.089-1.049-1.937-2.159-2.399-3.327c-0.445-1.152-0.908-2.382-1.393-3.674c-1.937-5.104-4.257-11.072-6.517-17.47
109
+ c-0.583-1.615-1.129-3.228-1.673-4.883c-0.546-1.654-1.089-3.309-1.593-5.002c-0.99-3.35-1.897-6.758-2.583-10.172
110
+ c-1.412-6.836-1.978-13.656-1.716-20.052c0.242-6.395,1.231-12.367,2.341-17.491c0.565-2.562,1.17-4.901,1.735-6.98
111
+ c0.605-2.078,4.701-3.894,10.127-5.386c0.707-0.183,1.393-0.364,2.058-0.545c0.304-0.081,0.705-0.182,1.129-0.263
112
+ c0.403-0.08,0.808-0.162,1.191-0.243c1.573-0.342,3.026-0.645,4.398-0.948l0.524-0.101l0.626-0.101
113
+ c0.402-0.081,0.806-0.142,1.21-0.223c0.786-0.122,1.553-0.241,2.28-0.384c0.727-0.121,1.432-0.242,2.079-0.343
114
+ c0.323-0.06,0.686-0.122,1.089-0.161c0.363-0.06,0.725-0.101,1.09-0.162c1.432-0.201,2.684-0.362,3.751-0.524
115
+ c1.293-0.162,2.361-0.283,3.229-0.384c1.756-0.202,2.663-0.323,2.663-0.323h0.565c0,0,0.908,0.121,2.664,0.323
116
+ c0.867,0.101,1.957,0.222,3.227,0.384c1.089,0.162,2.341,0.323,3.773,0.524c0.342,0.061,0.706,0.102,1.089,0.162
117
+ c0.384,0.04,0.767,0.102,1.07,0.161c0.666,0.101,1.351,0.222,2.077,0.343c0.727,0.143,1.493,0.262,2.301,0.384
118
+ c0.382,0.081,0.786,0.142,1.209,0.223l0.626,0.101l0.504,0.101c1.371,0.303,2.845,0.606,4.398,0.948
119
+ c0.403,0.081,0.807,0.163,1.189,0.243c0.424,0.081,0.827,0.182,1.131,0.263c0.686,0.181,1.372,0.362,2.076,0.545
120
+ c5.428,1.492,9.503,3.308,10.129,5.386c0.565,2.079,1.17,4.418,1.714,6.98c1.131,5.125,2.118,11.096,2.34,17.491
121
+ C292.68,245.907,292.136,252.728,290.722,259.563z"/>
122
+ <g>
123
+ <g>
124
+ <polygon fill="#2E3744" points="251.764,245.867 251.764,252.465 265.805,252.465 265.805,266.243 251.764,266.243
125
+ 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 263.001,232.068 269.6,238.664
126
+ 269.6,245.867 "/>
127
+ <polygon fill="#FFFFFF" points="251.764,245.867 251.764,252.465 265.805,252.465 265.805,266.243 251.764,266.243
128
+ 251.764,280.266 242.061,280.266 235.465,273.668 235.465,238.664 242.061,232.068 263.001,232.068 269.6,238.664
129
+ 269.6,245.867 "/>
130
+ </g>
131
+ </g>
132
+ </g>
133
+ </g>
134
+ <g>
135
+ <path fill="#FFFFFF" d="M384.918,292.552c-0.464-0.806-1.21-1.555-2.239-2.18c-1.008-0.645-2.36-1.211-4.034-1.713
136
+ c-1.675-0.485-2.887-1.01-3.611-1.535c-0.748-0.525-1.109-1.19-1.109-1.977c0-0.947,0.342-1.675,1.028-2.198
137
+ c0.666-0.526,1.613-0.787,2.845-0.787c1.311,0,2.319,0.323,3.026,0.968c0.706,0.625,1.048,1.513,1.048,2.642h3.733
138
+ c0-1.249-0.323-2.38-0.989-3.408c-0.686-1.009-1.594-1.797-2.784-2.359c-1.171-0.545-2.502-0.828-4.015-0.828
139
+ c-2.26,0-4.097,0.563-5.509,1.693c-1.411,1.131-2.118,2.544-2.118,4.3c0,1.977,0.969,3.589,2.945,4.82
140
+ c1.009,0.646,2.401,1.232,4.135,1.757c1.736,0.524,2.948,1.028,3.612,1.553c0.665,0.505,0.988,1.229,0.988,2.178
141
+ c0,0.868-0.323,1.572-0.967,2.101c-0.665,0.522-1.636,0.805-2.945,0.805c-1.514,0-2.664-0.344-3.491-1.01
142
+ c-0.806-0.685-1.21-1.634-1.21-2.845h-3.753c0,1.353,0.363,2.521,1.09,3.552c0.727,1.01,1.755,1.815,3.068,2.381
143
+ c1.31,0.585,2.742,0.868,4.297,0.868c2.359,0,4.235-0.524,5.607-1.596c1.373-1.048,2.059-2.479,2.059-4.274
144
+ C385.625,294.346,385.382,293.379,384.918,292.552z"/>
145
+ <path fill="#FFFFFF"
146
+ d="M431.098,298.038v-6.635h8.856v-2.949h-8.856v-5.969h10.25v-3.007h-14.002v21.566h14.102v-3.007H431.098z"
147
+ />
148
+ <path fill="#FFFFFF" d="M494.245,297.313c-0.728,0.667-1.835,1.009-3.308,1.009c-1.617,0-2.825-0.627-3.673-1.855
149
+ c-0.828-1.211-1.251-3.006-1.251-5.327v-1.915c0.02-2.303,0.464-4.056,1.352-5.246c0.866-1.191,2.118-1.777,3.753-1.777
150
+ c1.39,0,2.46,0.344,3.188,1.03c0.724,0.686,1.169,1.796,1.352,3.348h3.732c-0.245-2.359-1.091-4.176-2.542-5.465
151
+ c-1.434-1.293-3.35-1.938-5.73-1.938c-1.774,0-3.329,0.424-4.682,1.252c-1.353,0.846-2.379,2.036-3.106,3.592
152
+ c-0.705,1.552-1.069,3.348-1.069,5.387v1.997c0.021,1.994,0.385,3.73,1.112,5.244c0.704,1.494,1.711,2.645,3.025,3.47
153
+ c1.31,0.806,2.823,1.211,4.539,1.211c2.461,0,4.416-0.646,5.911-1.919c1.472-1.288,2.319-3.084,2.542-5.387h-3.732
154
+ C495.455,295.558,494.992,296.668,494.245,297.313z"/>
155
+ <path fill="#FFFFFF" d="M553.217,279.479v14.304c0,3.045-1.453,4.559-4.34,4.559c-1.41,0-2.479-0.381-3.226-1.131
156
+ c-0.729-0.764-1.089-1.875-1.089-3.309v-14.423h-3.735v14.383c0,2.34,0.728,4.177,2.181,5.489c1.45,1.332,3.409,1.978,5.869,1.978
157
+ c2.443,0,4.398-0.665,5.872-1.998c1.474-1.332,2.197-3.146,2.197-5.447v-14.404H553.217z"/>
158
+ <path fill="#FFFFFF" d="M610.792,291.866c1.252-0.526,2.222-1.271,2.908-2.241c0.704-0.989,1.049-2.178,1.049-3.632
159
+ c0-2.117-0.665-3.732-2.018-4.841c-1.354-1.129-3.289-1.674-5.771-1.674h-7.584v21.566h3.75v-8.291h4.178l4.316,8.291h4.016
160
+ v-0.201L610.792,291.866z M606.98,289.728h-3.854v-7.242h3.954c1.294,0.02,2.28,0.363,2.946,0.987
161
+ c0.646,0.625,0.99,1.535,0.99,2.684c0,1.109-0.364,1.976-1.071,2.602C609.221,289.406,608.231,289.728,606.98,289.728z"/>
162
+ <path fill="#FFFFFF" d="M656.955,279.479v21.566h3.731v-21.566H656.955z"/>
163
+ <path fill="#FFFFFF" d="M701.783,279.479v3.007h6.656v18.56h3.713v-18.56h6.738v-3.007H701.783z"/>
164
+ <path fill="#FFFFFF" d="M772.374,279.479l-4.942,10.21l-4.963-10.21h-4.176l7.241,13.618v7.948h3.772v-7.948l7.224-13.618H772.374
165
+ z"/>
166
+ </g>
167
+ </g>
168
+ </svg>
fail2ban/filter.d/wordpress-userenum.conf CHANGED
@@ -1,26 +1,26 @@
1
- [INCLUDES]
2
-
3
- # Read common prefixes. If any customizations available -- read them from
4
- # common.local
5
- before = common.conf
6
-
7
-
8
- [Definition]
9
-
10
- _daemon = wordpress
11
-
12
- # Option: failregex
13
- # Notes.: regex to match the password failures messages in the logfile. The
14
- # host must be matched by a group named "host". The tag "<HOST>" can
15
- # be used for standard IP/hostname matching and is only an alias for
16
- # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
17
- # Values: TEXT
18
- #
19
- failregex = ^%(__prefix_line)sAttempted user enumeration from <HOST>$
20
-
21
- # Option: ignoreregex
22
- # Notes.: regex to ignore. If this regex matches, the line is ignored.
23
- # Values: TEXT
24
- #
25
- ignoreregex =
26
-
1
+ [INCLUDES]
2
+
3
+ # Read common prefixes. If any customizations available -- read them from
4
+ # common.local
5
+ before = common.conf
6
+
7
+
8
+ [Definition]
9
+
10
+ _daemon = wordpress
11
+
12
+ # Option: failregex
13
+ # Notes.: regex to match the password failures messages in the logfile. The
14
+ # host must be matched by a group named "host". The tag "<HOST>" can
15
+ # be used for standard IP/hostname matching and is only an alias for
16
+ # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
17
+ # Values: TEXT
18
+ #
19
+ failregex = ^%(__prefix_line)sAttempted user enumeration from <HOST>$
20
+
21
+ # Option: ignoreregex
22
+ # Notes.: regex to ignore. If this regex matches, the line is ignored.
23
+ # Values: TEXT
24
+ #
25
+ ignoreregex =
26
+
frontend/class-frontend.php CHANGED
@@ -45,9 +45,7 @@ class FrontEnd {
45
  *
46
  */
47
  public function enqueue_scripts() {
48
-
49
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/frontend.js', array( 'jquery' ), $this->version, false );
50
-
51
  }
52
 
53
 
45
  *
46
  */
47
  public function enqueue_scripts() {
48
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/frontend.js', array(), $this->version, false );
 
 
49
  }
50
 
51
 
gnugeneralpubliclicence.txt CHANGED
@@ -1,87 +1,87 @@
1
- GNU GENERAL PUBLIC LICENSE
2
-
3
- Version 2, June 1991
4
-
5
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
6
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7
-
8
- Everyone is permitted to copy and distribute verbatim copies
9
- of this license document, but changing it is not allowed.
10
- Preamble
11
-
12
- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
13
-
14
- When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
15
-
16
- To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
17
-
18
- For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19
-
20
- We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
21
-
22
- Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
23
-
24
- Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
25
-
26
- The precise terms and conditions for copying, distribution and modification follow.
27
-
28
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
29
-
30
- 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
31
-
32
- Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
33
-
34
- 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
35
-
36
- You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
37
-
38
- 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
39
-
40
- a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
41
- b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
42
- c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
43
- These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
44
-
45
- Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
46
-
47
- In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
48
-
49
- 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
50
-
51
- a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
52
- b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
53
- c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
54
- The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
55
-
56
- If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
57
-
58
- 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
59
-
60
- 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
61
-
62
- 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
63
-
64
- 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
65
-
66
- If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
67
-
68
- It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
69
-
70
- This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
71
-
72
- 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
73
-
74
- 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
75
-
76
- Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
77
-
78
- 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
79
-
80
- NO WARRANTY
81
-
82
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
83
-
84
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
85
-
86
- END OF TERMS AND CONDITIONS
87
-
1
+ GNU GENERAL PUBLIC LICENSE
2
+
3
+ Version 2, June 1991
4
+
5
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
6
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7
+
8
+ Everyone is permitted to copy and distribute verbatim copies
9
+ of this license document, but changing it is not allowed.
10
+ Preamble
11
+
12
+ The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
13
+
14
+ When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
15
+
16
+ To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
17
+
18
+ For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19
+
20
+ We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
21
+
22
+ Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
23
+
24
+ Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
25
+
26
+ The precise terms and conditions for copying, distribution and modification follow.
27
+
28
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
29
+
30
+ 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
31
+
32
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
33
+
34
+ 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
35
+
36
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
37
+
38
+ 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
39
+
40
+ a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
41
+ b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
42
+ c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
43
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
44
+
45
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
46
+
47
+ In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
48
+
49
+ 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
50
+
51
+ a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
52
+ b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
53
+ c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
54
+ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
55
+
56
+ If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
57
+
58
+ 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
59
+
60
+ 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
61
+
62
+ 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
63
+
64
+ 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
65
+
66
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
67
+
68
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
69
+
70
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
71
+
72
+ 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
73
+
74
+ 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
75
+
76
+ Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
77
+
78
+ 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
79
+
80
+ NO WARRANTY
81
+
82
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
83
+
84
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
85
+
86
+ END OF TERMS AND CONDITIONS
87
+
includes/class-core.php CHANGED
@@ -48,10 +48,9 @@ class Core {
48
  * the public-facing side of the site.
49
  *
50
  */
51
- public function __construct( $freemius ) {
52
  $this->plugin_name = 'stop-user-enumeration';
53
  $this->version = STOP_USER_ENUMERATION_PLUGIN_VERSION;
54
- $this->freemius = $freemius;
55
 
56
  // convert settings from legacy settings
57
  if ( $opts = get_option( 'sue_settings_settings' ) ) {
@@ -130,7 +129,7 @@ class Core {
130
 
131
  private function settings_pages() {
132
 
133
- $settings = new Admin_Settings( $this->get_plugin_name(), $this->get_version(), $this->freemius );
134
  $this->loader->add_action( 'admin_enqueue_scripts', $settings, 'enqueue_styles' );
135
  $this->loader->add_action( 'admin_menu', $settings, 'settings_setup' );
136
 
48
  * the public-facing side of the site.
49
  *
50
  */
51
+ public function __construct() {
52
  $this->plugin_name = 'stop-user-enumeration';
53
  $this->version = STOP_USER_ENUMERATION_PLUGIN_VERSION;
 
54
 
55
  // convert settings from legacy settings
56
  if ( $opts = get_option( 'sue_settings_settings' ) ) {
129
 
130
  private function settings_pages() {
131
 
132
+ $settings = new Admin_Settings( $this->get_plugin_name(), $this->get_version() );
133
  $this->loader->add_action( 'admin_enqueue_scripts', $settings, 'enqueue_styles' );
134
  $this->loader->add_action( 'admin_menu', $settings, 'settings_setup' );
135
 
includes/class-freemius-config.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- /**
3
- * Class to load freemius configuration
4
- */
5
-
6
- namespace Stop_User_Enumeration\Includes;
7
-
8
-
9
- class Freemius_Config {
10
-
11
- public function init() {
12
-
13
- global $sue_fs;
14
-
15
- if ( ! isset( $sue_fs ) ) {
16
- // Include Freemius SDK.
17
- require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php';
18
-
19
- $sue_fs = fs_dynamic_init( array(
20
- 'id' => '1318',
21
- 'slug' => 'stop-user-enumeration',
22
- 'type' => 'plugin',
23
- 'public_key' => 'pk_bbbd29c5de1662b6753871351b01f',
24
- 'is_premium' => false,
25
- 'has_addons' => false,
26
- 'has_paid_plans' => false,
27
- 'menu' => array(
28
- 'slug' => 'stop-user-enumeration',
29
- 'account' => false,
30
- 'contact' => false,
31
- 'support' => false,
32
- 'parent' => array(
33
- 'slug' => 'options-general.php',
34
- ),
35
- ),
36
- ) );
37
- }
38
-
39
- return $sue_fs;
40
- }
41
-
42
-
43
- }
44
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/alanef/plugindonation_lib/PluginDonation.php ADDED
@@ -0,0 +1,586 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * @version 1.1
4
+ * @licence GPL2 or Later
5
+ * @copyright Alan Fuller
6
+ */
7
+
8
+ namespace AlanEFPluginDonation;
9
+
10
+ /**
11
+ * @since 1.0
12
+ */
13
+ class PluginDonation {
14
+ /**
15
+ * @var string $plugin_slug plugin base name or slug
16
+ */
17
+ protected $plugin_slug;
18
+ /**
19
+ * @var string $settings_hook the page hook for the plugin settings page
20
+ */
21
+ protected $settings_hook;
22
+ /**
23
+ * @var string $plugin_file the full plugin path file e.g. my-plugin/my-plugin.php
24
+ */
25
+ protected $plugin_file;
26
+ /**
27
+ * @var string $settings_url full url to setiings page with donate info
28
+ */
29
+ protected $settings_url;
30
+ /**
31
+ * @var string $title the plugin name in human form
32
+ */
33
+ protected $title;
34
+
35
+ /**
36
+ * @param string $plugin_slug plugin base name or slug
37
+ * @param string $settings_hook the page hook for the plugin settings page
38
+ * @param string $plugin_file the full plugin path file e.g. my-plugin/my-plugin.php
39
+ * @param string $settings_url the full url for a page with information on how to donate
40
+ * @param string $title the plugin name in human form
41
+ *
42
+ * @since 1.0
43
+ */
44
+ public function __construct( $plugin_slug, $settings_hook, $plugin_file, $settings_url, $title ) {
45
+ $this->plugin_slug = $plugin_slug;
46
+ $this->settings_hook = $settings_hook;
47
+ $this->plugin_file = $plugin_file;
48
+ $this->settings_url = $settings_url;
49
+ $this->title = $title;
50
+ $this->hooks();
51
+ }
52
+
53
+ /**
54
+ * @since 1.0
55
+ */
56
+ private function hooks() {
57
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
58
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
59
+ add_action( 'plugins_loaded', array( $this, 'languages' ) );
60
+ add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
61
+ add_action( 'wp_ajax_pdl_dismiss_notice', array( $this, 'pdl_dismiss_notice' ) );
62
+ add_action( 'wp_ajax_pdl_later_notice', array( $this, 'pdl_later_notice' ) );
63
+ add_action( 'init', array( $this, 'redirect_to_settings' ) );
64
+ add_filter( 'plugin_action_links_' . $this->plugin_file, array( $this, 'settings_link' ) );
65
+ add_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), 10, 2 );
66
+ register_activation_hook( $this->plugin_file, array( $this, 'plugin_activate' ) );
67
+ register_uninstall_hook(
68
+ $this->plugin_file,
69
+ array(
70
+ '\AlanEFPluginDonation\PluginDonation',
71
+ 'plugin_uninstall',
72
+ )
73
+ );
74
+ }
75
+
76
+ /**
77
+ * @since 1.0
78
+ */
79
+ public static function plugin_uninstall() {
80
+ $x = plugin_basename( __FILE__ );
81
+ do {
82
+ $slug = $x;
83
+ $x = dirname( $x );
84
+ } while ( ! empty( $x ) && '.' !== $x );
85
+ delete_option( $slug . '_donate' );
86
+ delete_option( $slug . '_review' );
87
+ }
88
+
89
+ /**
90
+ * @since 1.1
91
+ */
92
+ public function redirect_to_settings() {
93
+ if ( ! current_user_can( 'manage_options' ) ) {
94
+ return;
95
+ }
96
+ if ( get_option( $this->plugin_slug . '-activate', false ) ) {
97
+ delete_option( $this->plugin_slug . '-activate' );
98
+ if ( ! isset( $_GET['activate-multi'] ) ) {
99
+ wp_safe_redirect( $this->settings_url );
100
+ exit;
101
+ }
102
+ }
103
+ }
104
+
105
+ /**
106
+ * @param $links
107
+ *
108
+ * @return array
109
+ * @since 1.1
110
+ *
111
+ */
112
+ public function settings_link( $links ) {
113
+ $settings_link = '<a href="' . esc_url( $this->settings_url ) . '">' . esc_html__( 'Settings', 'stop-wp-emails-going-to-spam' ) . '</a>';
114
+ array_push(
115
+ $links,
116
+ $settings_link
117
+ );
118
+
119
+ return $links;
120
+ }
121
+
122
+ function plugin_meta( $links, $file ) {
123
+
124
+ if ( $this->plugin_file === $file ) {
125
+ $new_links = array(
126
+ '<a href="https://www.paypal.com/donate/?hosted_button_id=UGRBY5CHSD53Q" target="_blank">' . esc_html__( 'Donate to Support', 'stop-wp-emails-going-to-spam' ) . '</a>'
127
+ );
128
+
129
+ $links = array_merge( $links, $new_links );
130
+ }
131
+
132
+ return $links;
133
+ }
134
+
135
+ /**
136
+ * @since 1.0
137
+ */
138
+ public function plugin_activate() {
139
+ add_option( $this->plugin_slug . '-activate', true );
140
+ $this->set_timers();
141
+ }
142
+
143
+ /**
144
+ * Sets the timer data for reminders if not already set
145
+ *
146
+ * @since 1.1
147
+ */
148
+ public function set_timers() {
149
+ $donate = get_option( $this->plugin_slug . '_donate', false );
150
+ if ( false === $donate ) {
151
+ add_option( $this->plugin_slug . '_donate', time() );
152
+ }
153
+ $review = get_option( $this->plugin_slug . '_review', false );
154
+ if ( false === $review ) {
155
+ add_option( $this->plugin_slug . '_review', time() );
156
+ }
157
+ }
158
+
159
+ /**
160
+ * @since 1.0
161
+ */
162
+ public function languages() {
163
+ load_plugin_textdomain(
164
+ 'plugin-donation-lib',
165
+ false,
166
+ dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/plugindonation_lib/languages'
167
+ );
168
+ }
169
+
170
+ /**
171
+ * @param string $hook page hook provided by WordPress
172
+ *
173
+ * @since 1.0
174
+ */
175
+ public function enqueue_styles( $hook ) {
176
+ if ( $hook === $this->settings_hook ) {
177
+ $this->add_inline_admin_style();
178
+
179
+ return;
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Styles for the tab element on the admin display
185
+ *
186
+ * @since 1.0
187
+ */
188
+ private function add_inline_admin_style() {
189
+ $style = <<<EOT
190
+ /* Style the tab */
191
+ .tab {
192
+ overflow: hidden;
193
+ border: 1px solid #ccc;
194
+ background-color: #f1f1f1;
195
+ }
196
+
197
+ /* Style the buttons that are used to open the tab content */
198
+ .tab button {
199
+ background-color: inherit;
200
+ float: left;
201
+ border: none;
202
+ outline: none;
203
+ cursor: pointer;
204
+ padding: 14px 16px;
205
+ transition: 0.3s;
206
+ }
207
+
208
+ /* Change background color of buttons on hover */
209
+ .tab button:hover {
210
+ background-color: #ddd;
211
+ }
212
+
213
+ /* Create an active/current tablink class */
214
+ .tab button.active {
215
+ background-color: #ccc;
216
+ }
217
+
218
+ /* Style the tab content */
219
+ .tabcontent {
220
+ display: none;
221
+ padding: 6px 12px;
222
+ border: 1px solid #ccc;
223
+ border-top: none;
224
+ flex-wrap: wrap;
225
+ gap: 20px;
226
+ align-items: center;
227
+ }
228
+ .tabcontent div {
229
+ flex-grow: 1;
230
+ }
231
+
232
+ .tabcontent div:nth-of-type(2) {
233
+ flex-basis: 250px;
234
+ }
235
+ div.tabcontentwrap div:first-child{
236
+ display: flex;
237
+ }
238
+ EOT;
239
+
240
+ wp_add_inline_style( 'admin-bar', $style );
241
+ }
242
+
243
+ /**
244
+ * @param string $hook page hook provided by WordPress
245
+ *
246
+ * @since 1.0
247
+ */
248
+ public function enqueue_scripts( $hook ) {
249
+ if ( $this->admin_page_we_use() ) {
250
+ wp_enqueue_script( 'plugindonation_lib', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery' ), '1.0', false );
251
+ }
252
+ }
253
+
254
+ /**
255
+ * Only on pages we want to be effective on touch
256
+ *
257
+ * @return bool
258
+ *
259
+ * @since 1.1
260
+ */
261
+ public function admin_page_we_use() {
262
+ $page = get_current_screen()->base;
263
+ $display_on_pages = array(
264
+ 'dashboard',
265
+ 'plugins',
266
+ 'tools',
267
+ 'options-general',
268
+ $this->settings_hook,
269
+ );
270
+
271
+ return in_array( $page, $display_on_pages );
272
+ }
273
+
274
+ /**
275
+ * @since 1.0
276
+ */
277
+ public function display() {
278
+ ?>
279
+ <tr valign="top">
280
+ <th scope="row"><?php esc_html_e( 'Gift a Donation', 'plugin-donation-lib' ); ?></th>
281
+ <td>
282
+ <p>
283
+ <?php esc_html_e( 'Hi, I\'m Alan and I built this free plugin to solve problems I had, and I hope it solves your problem too.', 'plugin-donation-lib' ); ?>
284
+ </p>
285
+ <p>
286
+ <?php esc_html_e( 'It would really help me know that others find it useful and a great way of doing this is to gift me a small donation', 'plugin-donation-lib' ); ?>
287
+ </p>
288
+ <h3>
289
+ <?php esc_html_e( 'Gift a donation: select your desired option', 'plugin-donation-lib' ); ?>
290
+ </h3>
291
+ <!-- Tab links -->
292
+ <div class="tab">
293
+ <button class="tablinks" onclick="openPDLTab(event, 'BTC')"><img height="32"
294
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/BTC.png'; ?>">
295
+ </button>
296
+ <button class="tablinks" onclick="openPDLTab(event, 'PP')"><img height="32"
297
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/PP.png'; ?>">
298
+ </button>
299
+ <button class="tablinks" onclick="openPDLTab(event, 'BCH')"><img height="32"
300
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/BCH.png'; ?>"><br>Bitcoin
301
+ Cash
302
+ </button>
303
+ <button class="tablinks" onclick="openPDLTab(event, 'ETH')"><img height="32"
304
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/ETH.png'; ?>"><br>Ethereum
305
+ </button>
306
+ <button class="tablinks" onclick="openPDLTab(event, 'DOGE')"><img height="32"
307
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/DOGE.png'; ?>"><br>Dogecoin
308
+ </button>
309
+
310
+ </div>
311
+
312
+ <!-- Tab content -->
313
+ <div class="tabcontentwrap">
314
+ <div id="BTC" class="tabcontent">
315
+ <div>
316
+ <img height="48" src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/BTC.png'; ?>">
317
+ </div>
318
+ <div>
319
+ <?php esc_html_e( 'My Bitcoin donation wallet', 'plugin-donation-lib' ); ?><br><br> <strong><a
320
+ href="https://www.blockchain.com/btc/address/bc1q04zt3yxxu282ayg3aev633twpqtw0dzzetp78x">bc1q04zt3yxxu282ayg3aev633twpqtw0dzzetp78x</a></strong>
321
+ </div>
322
+ <div>
323
+ <img height="140"
324
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/QRcodes/BTC.png'; ?>">
325
+ </div>
326
+ </div>
327
+ <div id="PP" class="tabcontent">
328
+ <div><a href="https://www.paypal.com/donate/?hosted_button_id=UGRBY5CHSD53Q"
329
+ target="_blank"><img height="48"
330
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/PP.png'; ?>">
331
+ </a></div>
332
+ <div><a href="https://www.paypal.com/donate/?hosted_button_id=UGRBY5CHSD53Q"
333
+ target="_blank"><?php esc_html_e( 'Gift a donation via PayPal', 'plugin-donation-lib' ); ?>
334
+ </a></div>
335
+ <div><a href="https://www.paypal.com/donate/?hosted_button_id=UGRBY5CHSD53Q"
336
+ target="_blank"><img height="48"
337
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/PPcards.png'; ?>">
338
+ </a></div>
339
+ </div>
340
+ <div id="BCH" class="tabcontent">
341
+ <div><img height="48" src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/BCH.png'; ?>">
342
+ </div>
343
+ <div>
344
+ <?php esc_html_e( 'My Bitcoin Cash address', 'plugin-donation-lib' ); ?><br><br><strong>bitcoincash:qpmn76wad2mwfhk3c9vhx77ex5nqhq2r0ursp8z6mp</strong>
345
+ </div>
346
+ <div>
347
+ <img height="140"
348
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/QRcodes/BCH.png'; ?>">
349
+ </div>
350
+ </div>
351
+
352
+ <div id="ETH" class="tabcontent">
353
+ <div><img height="48" src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/ETH.png'; ?>">
354
+ </div>
355
+ <div>
356
+ <?php esc_html_e( 'My Ethereum address', 'plugin-donation-lib' ); ?><br><br><strong>0x492Bdf65bcB65bC067Ab3886e9B79a7CDe9021BB</strong>
357
+ </div>
358
+ <div>
359
+ <img height="140"
360
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/QRcodes/ETH.png'; ?>">
361
+ </div>
362
+ </div>
363
+ <div id="DOGE" class="tabcontent">
364
+ <h3><img height="48" src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/DOGE.png'; ?>">Dogecoin
365
+ </h3>
366
+ <div>
367
+ <?php esc_html_e( 'My Dogecoin address', 'plugin-donation-lib' ); ?><br><br><strong>D7nB2HsBxNPACis9fSgjqTShe4JfSztAjr</strong>
368
+ </div>
369
+ <div>
370
+ <img height="140"
371
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/QRcodes/DOGE.png'; ?>">
372
+ </div>
373
+ </div>
374
+ </div>
375
+ </td>
376
+ </tr>
377
+ <tr valign="top">
378
+ <th scope="row"><?php esc_html_e( 'Contribute', 'plugin-donation-lib' ); ?></th>
379
+ <td>
380
+ <h3>
381
+ <?php esc_html_e( 'Contribute to the Open Source Project in other ways', 'plugin-donation-lib' ); ?>
382
+ </h3>
383
+ <!-- Tab links -->
384
+ <div class="tab">
385
+ <button class="tablinks" onclick="openPDLTab(event, 'review-tab')"><img height="32"
386
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/reviews.png'; ?>"><br><?php esc_html_e( 'Submit a review', 'plugin-donation-lib' ); ?>
387
+ </button>
388
+ <button class="tablinks" onclick="openPDLTab(event, 'translate-tab')"><img height="32"
389
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/translate.png'; ?>"><br><?php esc_html_e( 'Translate to your language', 'plugin-donation-lib' ); ?>
390
+ </button>
391
+ <button class="tablinks" onclick="openPDLTab(event, 'github-tab')"><img height="32"
392
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/github.png'; ?>"><br>Help
393
+ Develop
394
+ </button>
395
+ </div>
396
+ <!-- Tab content -->
397
+ <div class="tabcontentwrap">
398
+ <div id="review-tab" class="tabcontent">
399
+ <div>
400
+ <a class="button-secondary"
401
+ href="https://wordpress.org/support/plugin/<?php echo esc_attr( $this->plugin_slug ); ?>/reviews/?view=all#new-post"
402
+ target="_blank"><?php esc_html_e( 'SUBMIT A REVIEW', 'plugin-donation-lib' ); ?></a>
403
+ </div>
404
+ <div>
405
+ <p><?php esc_html_e( 'If you are happy with the plugin the we would love a review. Even if you are not so happy feedback is always useful, but if you have issues we would love you to make a support request first so we can try and help.', 'plugin-donation-lib' ); ?></p>
406
+ </div>
407
+ <div>
408
+ <a class="button-secondary"
409
+ href="https://wordpress.org/support/plugin/<?php echo esc_attr( $this->plugin_slug ); ?>/"
410
+ target="_blank"><?php esc_html_e( 'SUPPORT FORUM', 'plugin-donation-lib' ); ?></a>
411
+ </div>
412
+ </div>
413
+ <div id="translate-tab" class="tabcontent">
414
+ <div>
415
+ <a href="https://translate.wordpress.org/projects/wp-plugins/<?php echo esc_attr( $this->plugin_slug ); ?>/"
416
+ target="_blank"><img height="48"
417
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/translate.png'; ?>">
418
+ </a></div>
419
+ <div>
420
+ <p><?php esc_html_e( 'Providing some translations for a plugin is very easy and can be done via the WordPress system. You can easily contribute to the community and you don\'t need to translate it all.', 'plugin-donation-lib' ); ?> </p>
421
+ </div>
422
+ <div><a class="button-secondary"
423
+ href="https://translate.wordpress.org/projects/wp-plugins/<?php echo esc_attr( $this->plugin_slug ); ?>/"
424
+ target="_blank"><?php esc_html_e( 'TRANSLATE INTO YOUR LANGUAGE', 'plugin-donation-lib' ); ?></a>
425
+ </div>
426
+ </div>
427
+ <div id="github-tab" class="tabcontent">
428
+ <div><a href="https://github.com/alanef/<?php echo esc_attr( $this->plugin_slug ); ?>/"
429
+ target="_blank"><img height="48"
430
+ src="<?php echo plugin_dir_url( __FILE__ ) . 'images/logos/github.png'; ?>"></a>
431
+ </div>
432
+ <div>
433
+ <p><?php esc_html_e( 'As an open source project you are welcome to contribute to the development of the software if you can. The development plugin is hosted on GitHub.', 'plugin-donation-lib' ); ?></p>
434
+ </div>
435
+ <div>
436
+ <a class="button-secondary"
437
+ href="https://github.com/alanef/<?php echo esc_attr( $this->plugin_slug ); ?>/"
438
+ target="_blank"><?php esc_html_e( 'CONTRIBUTE ON GITHUB', 'plugin-donation-lib' ); ?></a>
439
+ </div>
440
+ </div>
441
+
442
+ </div>
443
+ </td>
444
+ </tr>
445
+ <tr valign="top">
446
+ <th scope="row"><?php esc_html_e( 'Get Support', 'plugin-donation-lib' ); ?></th>
447
+ <td>
448
+ <a class="button-secondary"
449
+ href="https://wordpress.org/support/plugin/<?php echo esc_attr( $this->plugin_slug ); ?>/"
450
+ target="_blank"><?php esc_html_e( 'WordPress SUPPORT FORUM', 'plugin-donation-lib' ); ?></a>
451
+ </td>
452
+ </tr>
453
+ <?php
454
+ }
455
+
456
+ /**
457
+ * @since 1.0
458
+ */
459
+ public function display_admin_notice() {
460
+ $this->set_timers();
461
+ // Don't display notices to users that can't do anything about it.
462
+ if ( ! current_user_can( 'install_plugins' ) ) {
463
+ return;
464
+ }
465
+ // Notices are only displayed on the dashboard, plugins, tools, and settings admin pages.
466
+ if ( ! $this->admin_page_we_use() ) {
467
+ return;
468
+ }
469
+ $user_id = get_current_user_id();
470
+ $um = get_user_meta( $user_id, $this->plugin_slug . '_pdlib_dismissed_notices', true );
471
+ $notice_donate = $this->plugin_slug . '_pdlib_notice_donate';
472
+ if ( ! isset( $um[ $notice_donate ] ) || true !== $um[ $notice_donate ] ) {
473
+ $donate = get_option( $this->plugin_slug . '_donate' );
474
+ if ( false !== $donate && time() > (int) $donate + ( 6 * WEEK_IN_SECONDS ) ) {
475
+ ?>
476
+ <div id="<?php echo esc_attr( $notice_donate ); ?>"
477
+ class="pdl_notice notice is-dismissible notice-warning">
478
+ <p>
479
+ <?php
480
+ echo esc_html__( 'Hi I\'m Alan and I support the free plugin', 'plugin-dontaion-lib' ) .
481
+ ' <strong>' . esc_html( $this->title ) .
482
+ '</strong> ' . esc_html__( 'for you. You have been using the plugin for a while now and WordPress has probably been through several updates by now. So I\'m asking if you can help keep this plugin free, by donating a very small amount of cash. If you can that would be a fantastic help to keeping this plugin updated.', 'plugin-donate-lib' );
483
+ ?>
484
+ </p>
485
+ <p>
486
+ <a href="<?php echo esc_attr( $this->settings_url ); ?>"><?php esc_html_e( 'Donate via this page', 'plugin-donate-lib' ); ?></a>
487
+ </p>
488
+ <p><a class="remind" href=""><?php esc_html_e( 'Remind me later', 'plugin-donate-lib' ); ?></a></p>
489
+ <p><a class="dismiss"
490
+ href=""><?php esc_html_e( 'I have already donated', 'plugin-donate-lib' ); ?></a></p>
491
+ <p><a class="dismiss"
492
+ href=""><?php esc_html_e( 'I don\'t want to donate, dismiss this notice permanently', 'plugin-donate-lib' ); ?></a>
493
+ </p>
494
+ </div>
495
+ <?php
496
+ }
497
+ }
498
+ $notice_review = $this->plugin_slug . '_pdlib_notice_review';
499
+ if ( ! isset( $um[ $notice_review ] ) || true !== $um[ $notice_review ] ) {
500
+ $review = get_option( $this->plugin_slug . '_review' );
501
+ if ( false !== $review && time() > (int) $review + ( 4 * WEEK_IN_SECONDS ) ) {
502
+ ?>
503
+ <div id="<?php echo esc_attr( $notice_review ); ?>"
504
+ class="pdl_notice notice is-dismissible notice-sucess">
505
+ <p>
506
+ <?php
507
+ echo esc_html__( 'Hi I\'m Alan and you have been using this plugin', 'plugin-dontaion-lib' ) .
508
+ ' <strong>' . esc_html( $this->title ) .
509
+ '</strong> ' . esc_html__( 'for a while - that is awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help spread the word and boost my motivation..', 'plugin-donate-lib' );
510
+ ?>
511
+ </p>
512
+ <p>
513
+ <a target="_blank"
514
+ href="https://wordpress.org/support/plugin/<?php echo esc_attr( $this->plugin_slug ); ?>/reviews/?view=all#new-post"><?php esc_html_e( 'OK, you deserve it', 'plugin-donate-lib' ); ?></a>
515
+ </p>
516
+ <p><a class="remind" href=""><?php esc_html_e( 'Maybe later', 'plugin-donate-lib' ); ?></a></p>
517
+ <p><a class="dismiss"
518
+ href=""><?php esc_html_e( 'Already done', 'plugin-donate-lib' ); ?></a></p>
519
+ <p><a class="dismiss"
520
+ href=""><?php esc_html_e( 'No thanks, dismiss this request', 'plugin-donate-lib' ); ?></a>
521
+ </p>
522
+ </div>
523
+ <?php
524
+ }
525
+ }
526
+ }
527
+
528
+ /**
529
+ * @since 1.0
530
+ */
531
+ public function pdl_dismiss_notice() {
532
+ if ( ! $this->valid_ajax_call() ) {
533
+ return;
534
+ }
535
+ $user_id = get_current_user_id();
536
+ $um = get_user_meta( $user_id, $this->plugin_slug . '_pdlib_dismissed_notices', true );
537
+ if ( ! is_array( $um ) ) {
538
+ $um = array();
539
+ }
540
+ $um[ sanitize_text_field( $_POST['id'] ) ] = true;
541
+ update_user_meta( $user_id, $this->plugin_slug . '_pdlib_dismissed_notices', $um );
542
+ wp_die();
543
+ }
544
+
545
+ /**
546
+ * Check if doing ajax and capability
547
+ *
548
+ * @return bool
549
+ *
550
+ * @since 1.1
551
+ */
552
+ private function valid_ajax_call() {
553
+ if ( ! wp_doing_ajax() ) {
554
+ return false;
555
+ }
556
+ if ( ! current_user_can( 'install_plugins' ) ) {
557
+ return false;
558
+ }
559
+
560
+ return true;
561
+ }
562
+
563
+ /**
564
+ * @since 1.0
565
+ */
566
+ public function pdl_later_notice() {
567
+ if ( ! $this->valid_ajax_call() ) {
568
+ return;
569
+ }
570
+ if ( sanitize_text_field( $_POST['id'] ) === $this->plugin_slug . '_pdlib_notice_donate' ) {
571
+ // donate later
572
+ $donate = get_option( $this->plugin_slug . '_donate' );
573
+ if ( false !== $donate ) {
574
+ update_option( $this->plugin_slug . '_donate', (int) $donate + ( 6 * WEEK_IN_SECONDS ) );
575
+ }
576
+ }
577
+ if ( sanitize_text_field( $_POST['id'] ) === $this->plugin_slug . '_pdlib_notice_review' ) {
578
+ // review later
579
+ $review = get_option( $this->plugin_slug . '_review' );
580
+ if ( false !== $review ) {
581
+ update_option( $this->plugin_slug . '_review', (int) $review + ( 4 * WEEK_IN_SECONDS ) );
582
+ }
583
+ }
584
+ wp_die();
585
+ }
586
+ }
includes/vendor/alanef/plugindonation_lib/composer.lock ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "6a3a0eddbaf96c2f8bd91e8b18db6a55",
8
+ "packages": [],
9
+ "packages-dev": [],
10
+ "aliases": [],
11
+ "minimum-stability": "stable",
12
+ "stability-flags": [],
13
+ "prefer-stable": false,
14
+ "prefer-lowest": false,
15
+ "platform": [],
16
+ "platform-dev": [],
17
+ "plugin-api-version": "2.1.0"
18
+ }
includes/vendor/alanef/plugindonation_lib/images/QRcodes/BCH.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/QRcodes/BTC.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/QRcodes/DOGE.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/QRcodes/ETH.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/BCH.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/BTC.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/DOGE.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/ETH.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/PP.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/PPcards.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/github.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/reviews.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/images/logos/translate.png ADDED
Binary file
includes/vendor/alanef/plugindonation_lib/js/admin.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function openPDLTab(evt, tabName) {
2
+ evt.preventDefault();
3
+ // Declare all variables
4
+ var i, tabcontent, tablinks;
5
+
6
+ // Get all elements with class="tabcontent" and hide them
7
+ tabcontent = document.getElementsByClassName("tabcontent");
8
+ for (i = 0; i < tabcontent.length; i++) {
9
+ tabcontent[i].style.display = "none";
10
+ }
11
+
12
+ // Get all elements with class="tablinks" and remove the class "active"
13
+ tablinks = document.getElementsByClassName("tablinks");
14
+ for (i = 0; i < tablinks.length; i++) {
15
+ tablinks[i].className = tablinks[i].className.replace(" active", "");
16
+ }
17
+
18
+ // Show the current tab, and add an "active" class to the button that opened the tab
19
+ document.getElementById(tabName).style.display = "flex";
20
+ evt.currentTarget.className += " active";
21
+ }
22
+
23
+
24
+ (function ($) {
25
+ 'use strict';
26
+ $(function () {
27
+ $(document).on('click', '.pdl_notice .notice-dismiss, .pdl_notice .dismiss', function (event) {
28
+ let data = {
29
+ action: 'pdl_dismiss_notice',
30
+ id: $(this).closest('div').attr('id')
31
+ };
32
+
33
+ $.post(ajaxurl, data, function (response) {
34
+ console.log(response, 'DONE!');
35
+ location.reload();
36
+ });
37
+ });
38
+ $(document).on('click', '.pdl_notice .remind', function (event) {
39
+ let data = {
40
+ action: 'pdl_later_notice',
41
+ id: $(this).closest('div').attr('id')
42
+ };
43
+
44
+ $.post(ajaxurl, data, function (response) {
45
+ console.log(response, 'DONE!');
46
+ location.reload();
47
+ });
48
+ });
49
+ });
50
+ })(jQuery);
includes/vendor/alanef/plugindonation_lib/languages/plugin-donation-lib.pot ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 plugin-donation-lib
2
+ # This file is distributed under the same license as the plugin-donation-lib package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: plugin-donation-lib\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "X-Poedit-Basepath: ..\n"
10
+ "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
11
+ "X-Poedit-SearchPath-0: .\n"
12
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
13
+ "X-Poedit-SourceCharset: UTF-8\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+
16
+ #: PluginDonation.php:118
17
+ msgid "Hi, I'm Alan and I built this free plugin to solve problems I had, and I hope it solves your problem too."
18
+ msgstr ""
19
+
20
+ #: PluginDonation.php:121
21
+ msgid "It would really help me know that others find it useful and a great way of doing this is to gift me a small donation"
22
+ msgstr ""
23
+
24
+ #: PluginDonation.php:124
25
+ msgid "Gift a donation anoymously via Crypto currency"
26
+ msgstr ""
27
+
28
+ #: PluginDonation.php:170
29
+ msgid "Gift a donation via PayPal"
30
+ msgstr ""
31
+
32
+ #: PluginDonation.php:174
33
+ msgid "PAYPAL DONATE LINK"
34
+ msgstr ""
35
+
36
+ #: PluginDonation.php:177
37
+ msgid "If it worked well for you, why not share that with the community through a review?"
38
+ msgstr ""
39
+
40
+ #: PluginDonation.php:182
41
+ msgid "SUBMIT A REVIEW"
42
+ msgstr ""
43
+
44
+ #: PluginDonation.php:185
45
+ msgid "Or support the community in another way, if you have language skills, why not translate the plugin, it is easy to do"
46
+ msgstr ""
47
+
48
+ #: PluginDonation.php:190
49
+ msgid "TRANSLATE INTO YOUR LANGUAGE"
50
+ msgstr ""
includes/vendor/alanef/plugindonation_lib/package-lock.json ADDED
@@ -0,0 +1,8594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "plugindonation_lib",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 2,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "version": "1.0.0",
9
+ "devDependencies": {
10
+ "gulp": "latest",
11
+ "gulp-notify": "latest",
12
+ "gulp-sort": "latest",
13
+ "gulp-util": "latest",
14
+ "gulp-wp-pot": "latest"
15
+ }
16
+ },
17
+ "node_modules/ansi-colors": {
18
+ "version": "1.1.0",
19
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
20
+ "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
21
+ "dev": true,
22
+ "dependencies": {
23
+ "ansi-wrap": "^0.1.0"
24
+ },
25
+ "engines": {
26
+ "node": ">=0.10.0"
27
+ }
28
+ },
29
+ "node_modules/ansi-gray": {
30
+ "version": "0.1.1",
31
+ "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
32
+ "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
33
+ "dev": true,
34
+ "dependencies": {
35
+ "ansi-wrap": "0.1.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=0.10.0"
39
+ }
40
+ },
41
+ "node_modules/ansi-regex": {
42
+ "version": "2.1.1",
43
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
44
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
45
+ "dev": true,
46
+ "engines": {
47
+ "node": ">=0.10.0"
48
+ }
49
+ },
50
+ "node_modules/ansi-styles": {
51
+ "version": "2.2.1",
52
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
53
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
54
+ "dev": true,
55
+ "engines": {
56
+ "node": ">=0.10.0"
57
+ }
58
+ },
59
+ "node_modules/ansi-wrap": {
60
+ "version": "0.1.0",
61
+ "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
62
+ "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
63
+ "dev": true,
64
+ "engines": {
65
+ "node": ">=0.10.0"
66
+ }
67
+ },
68
+ "node_modules/anymatch": {
69
+ "version": "2.0.0",
70
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
71
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
72
+ "dev": true,
73
+ "dependencies": {
74
+ "micromatch": "^3.1.4",
75
+ "normalize-path": "^2.1.1"
76
+ }
77
+ },
78
+ "node_modules/anymatch/node_modules/normalize-path": {
79
+ "version": "2.1.1",
80
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
81
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
82
+ "dev": true,
83
+ "dependencies": {
84
+ "remove-trailing-separator": "^1.0.1"
85
+ },
86
+ "engines": {
87
+ "node": ">=0.10.0"
88
+ }
89
+ },
90
+ "node_modules/append-buffer": {
91
+ "version": "1.0.2",
92
+ "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
93
+ "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
94
+ "dev": true,
95
+ "dependencies": {
96
+ "buffer-equal": "^1.0.0"
97
+ },
98
+ "engines": {
99
+ "node": ">=0.10.0"
100
+ }
101
+ },
102
+ "node_modules/archy": {
103
+ "version": "1.0.0",
104
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
105
+ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
106
+ "dev": true
107
+ },
108
+ "node_modules/arr-diff": {
109
+ "version": "4.0.0",
110
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
111
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
112
+ "dev": true,
113
+ "engines": {
114
+ "node": ">=0.10.0"
115
+ }
116
+ },
117
+ "node_modules/arr-filter": {
118
+ "version": "1.1.2",
119
+ "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
120
+ "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
121
+ "dev": true,
122
+ "dependencies": {
123
+ "make-iterator": "^1.0.0"
124
+ },
125
+ "engines": {
126
+ "node": ">=0.10.0"
127
+ }
128
+ },
129
+ "node_modules/arr-flatten": {
130
+ "version": "1.1.0",
131
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
132
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
133
+ "dev": true,
134
+ "engines": {
135
+ "node": ">=0.10.0"
136
+ }
137
+ },
138
+ "node_modules/arr-map": {
139
+ "version": "2.0.2",
140
+ "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
141
+ "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
142
+ "dev": true,
143
+ "dependencies": {
144
+ "make-iterator": "^1.0.0"
145
+ },
146
+ "engines": {
147
+ "node": ">=0.10.0"
148
+ }
149
+ },
150
+ "node_modules/arr-union": {
151
+ "version": "3.1.0",
152
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
153
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
154
+ "dev": true,
155
+ "engines": {
156
+ "node": ">=0.10.0"
157
+ }
158
+ },
159
+ "node_modules/array-differ": {
160
+ "version": "1.0.0",
161
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
162
+ "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
163
+ "dev": true,
164
+ "engines": {
165
+ "node": ">=0.10.0"
166
+ }
167
+ },
168
+ "node_modules/array-each": {
169
+ "version": "1.0.1",
170
+ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
171
+ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
172
+ "dev": true,
173
+ "engines": {
174
+ "node": ">=0.10.0"
175
+ }
176
+ },
177
+ "node_modules/array-initial": {
178
+ "version": "1.1.0",
179
+ "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
180
+ "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
181
+ "dev": true,
182
+ "dependencies": {
183
+ "array-slice": "^1.0.0",
184
+ "is-number": "^4.0.0"
185
+ },
186
+ "engines": {
187
+ "node": ">=0.10.0"
188
+ }
189
+ },
190
+ "node_modules/array-initial/node_modules/is-number": {
191
+ "version": "4.0.0",
192
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
193
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
194
+ "dev": true,
195
+ "engines": {
196
+ "node": ">=0.10.0"
197
+ }
198
+ },
199
+ "node_modules/array-last": {
200
+ "version": "1.3.0",
201
+ "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
202
+ "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
203
+ "dev": true,
204
+ "dependencies": {
205
+ "is-number": "^4.0.0"
206
+ },
207
+ "engines": {
208
+ "node": ">=0.10.0"
209
+ }
210
+ },
211
+ "node_modules/array-last/node_modules/is-number": {
212
+ "version": "4.0.0",
213
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
214
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
215
+ "dev": true,
216
+ "engines": {
217
+ "node": ">=0.10.0"
218
+ }
219
+ },
220
+ "node_modules/array-slice": {
221
+ "version": "1.1.0",
222
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
223
+ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
224
+ "dev": true,
225
+ "engines": {
226
+ "node": ">=0.10.0"
227
+ }
228
+ },
229
+ "node_modules/array-sort": {
230
+ "version": "1.0.0",
231
+ "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
232
+ "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
233
+ "dev": true,
234
+ "dependencies": {
235
+ "default-compare": "^1.0.0",
236
+ "get-value": "^2.0.6",
237
+ "kind-of": "^5.0.2"
238
+ },
239
+ "engines": {
240
+ "node": ">=0.10.0"
241
+ }
242
+ },
243
+ "node_modules/array-uniq": {
244
+ "version": "1.0.3",
245
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
246
+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
247
+ "dev": true,
248
+ "engines": {
249
+ "node": ">=0.10.0"
250
+ }
251
+ },
252
+ "node_modules/array-unique": {
253
+ "version": "0.3.2",
254
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
255
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
256
+ "dev": true,
257
+ "engines": {
258
+ "node": ">=0.10.0"
259
+ }
260
+ },
261
+ "node_modules/assign-symbols": {
262
+ "version": "1.0.0",
263
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
264
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
265
+ "dev": true,
266
+ "engines": {
267
+ "node": ">=0.10.0"
268
+ }
269
+ },
270
+ "node_modules/async-done": {
271
+ "version": "1.3.2",
272
+ "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
273
+ "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
274
+ "dev": true,
275
+ "dependencies": {
276
+ "end-of-stream": "^1.1.0",
277
+ "once": "^1.3.2",
278
+ "process-nextick-args": "^2.0.0",
279
+ "stream-exhaust": "^1.0.1"
280
+ },
281
+ "engines": {
282
+ "node": ">= 0.10"
283
+ }
284
+ },
285
+ "node_modules/async-each": {
286
+ "version": "1.0.3",
287
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
288
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
289
+ "dev": true
290
+ },
291
+ "node_modules/async-settle": {
292
+ "version": "1.0.0",
293
+ "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
294
+ "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
295
+ "dev": true,
296
+ "dependencies": {
297
+ "async-done": "^1.2.2"
298
+ },
299
+ "engines": {
300
+ "node": ">= 0.10"
301
+ }
302
+ },
303
+ "node_modules/atob": {
304
+ "version": "2.1.2",
305
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
306
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
307
+ "dev": true,
308
+ "bin": {
309
+ "atob": "bin/atob.js"
310
+ },
311
+ "engines": {
312
+ "node": ">= 4.5.0"
313
+ }
314
+ },
315
+ "node_modules/bach": {
316
+ "version": "1.2.0",
317
+ "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
318
+ "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
319
+ "dev": true,
320
+ "dependencies": {
321
+ "arr-filter": "^1.1.1",
322
+ "arr-flatten": "^1.0.1",
323
+ "arr-map": "^2.0.0",
324
+ "array-each": "^1.0.0",
325
+ "array-initial": "^1.0.0",
326
+ "array-last": "^1.1.1",
327
+ "async-done": "^1.2.2",
328
+ "async-settle": "^1.0.0",
329
+ "now-and-later": "^2.0.0"
330
+ },
331
+ "engines": {
332
+ "node": ">= 0.10"
333
+ }
334
+ },
335
+ "node_modules/balanced-match": {
336
+ "version": "1.0.2",
337
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
338
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
339
+ "dev": true
340
+ },
341
+ "node_modules/base": {
342
+ "version": "0.11.2",
343
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
344
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
345
+ "dev": true,
346
+ "dependencies": {
347
+ "cache-base": "^1.0.1",
348
+ "class-utils": "^0.3.5",
349
+ "component-emitter": "^1.2.1",
350
+ "define-property": "^1.0.0",
351
+ "isobject": "^3.0.1",
352
+ "mixin-deep": "^1.2.0",
353
+ "pascalcase": "^0.1.1"
354
+ },
355
+ "engines": {
356
+ "node": ">=0.10.0"
357
+ }
358
+ },
359
+ "node_modules/base/node_modules/define-property": {
360
+ "version": "1.0.0",
361
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
362
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
363
+ "dev": true,
364
+ "dependencies": {
365
+ "is-descriptor": "^1.0.0"
366
+ },
367
+ "engines": {
368
+ "node": ">=0.10.0"
369
+ }
370
+ },
371
+ "node_modules/beeper": {
372
+ "version": "1.1.1",
373
+ "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
374
+ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
375
+ "dev": true,
376
+ "engines": {
377
+ "node": ">=0.10.0"
378
+ }
379
+ },
380
+ "node_modules/binary-extensions": {
381
+ "version": "1.13.1",
382
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
383
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
384
+ "dev": true,
385
+ "engines": {
386
+ "node": ">=0.10.0"
387
+ }
388
+ },
389
+ "node_modules/bindings": {
390
+ "version": "1.5.0",
391
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
392
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
393
+ "dev": true,
394
+ "optional": true,
395
+ "dependencies": {
396
+ "file-uri-to-path": "1.0.0"
397
+ }
398
+ },
399
+ "node_modules/brace-expansion": {
400
+ "version": "1.1.11",
401
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
402
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
403
+ "dev": true,
404
+ "dependencies": {
405
+ "balanced-match": "^1.0.0",
406
+ "concat-map": "0.0.1"
407
+ }
408
+ },
409
+ "node_modules/braces": {
410
+ "version": "2.3.2",
411
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
412
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
413
+ "dev": true,
414
+ "dependencies": {
415
+ "arr-flatten": "^1.1.0",
416
+ "array-unique": "^0.3.2",
417
+ "extend-shallow": "^2.0.1",
418
+ "fill-range": "^4.0.0",
419
+ "isobject": "^3.0.1",
420
+ "repeat-element": "^1.1.2",
421
+ "snapdragon": "^0.8.1",
422
+ "snapdragon-node": "^2.0.1",
423
+ "split-string": "^3.0.2",
424
+ "to-regex": "^3.0.1"
425
+ },
426
+ "engines": {
427
+ "node": ">=0.10.0"
428
+ }
429
+ },
430
+ "node_modules/buffer-equal": {
431
+ "version": "1.0.0",
432
+ "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
433
+ "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=",
434
+ "dev": true,
435
+ "engines": {
436
+ "node": ">=0.4.0"
437
+ }
438
+ },
439
+ "node_modules/buffer-from": {
440
+ "version": "1.1.2",
441
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
442
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
443
+ "dev": true
444
+ },
445
+ "node_modules/cache-base": {
446
+ "version": "1.0.1",
447
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
448
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
449
+ "dev": true,
450
+ "dependencies": {
451
+ "collection-visit": "^1.0.0",
452
+ "component-emitter": "^1.2.1",
453
+ "get-value": "^2.0.6",
454
+ "has-value": "^1.0.0",
455
+ "isobject": "^3.0.1",
456
+ "set-value": "^2.0.0",
457
+ "to-object-path": "^0.3.0",
458
+ "union-value": "^1.0.0",
459
+ "unset-value": "^1.0.0"
460
+ },
461
+ "engines": {
462
+ "node": ">=0.10.0"
463
+ }
464
+ },
465
+ "node_modules/call-bind": {
466
+ "version": "1.0.2",
467
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
468
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
469
+ "dev": true,
470
+ "dependencies": {
471
+ "function-bind": "^1.1.1",
472
+ "get-intrinsic": "^1.0.2"
473
+ },
474
+ "funding": {
475
+ "url": "https://github.com/sponsors/ljharb"
476
+ }
477
+ },
478
+ "node_modules/camelcase": {
479
+ "version": "3.0.0",
480
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
481
+ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
482
+ "dev": true,
483
+ "engines": {
484
+ "node": ">=0.10.0"
485
+ }
486
+ },
487
+ "node_modules/chalk": {
488
+ "version": "1.1.3",
489
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
490
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
491
+ "dev": true,
492
+ "dependencies": {
493
+ "ansi-styles": "^2.2.1",
494
+ "escape-string-regexp": "^1.0.2",
495
+ "has-ansi": "^2.0.0",
496
+ "strip-ansi": "^3.0.0",
497
+ "supports-color": "^2.0.0"
498
+ },
499
+ "engines": {
500
+ "node": ">=0.10.0"
501
+ }
502
+ },
503
+ "node_modules/chokidar": {
504
+ "version": "2.1.8",
505
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
506
+ "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
507
+ "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.",
508
+ "dev": true,
509
+ "dependencies": {
510
+ "anymatch": "^2.0.0",
511
+ "async-each": "^1.0.1",
512
+ "braces": "^2.3.2",
513
+ "glob-parent": "^3.1.0",
514
+ "inherits": "^2.0.3",
515
+ "is-binary-path": "^1.0.0",
516
+ "is-glob": "^4.0.0",
517
+ "normalize-path": "^3.0.0",
518
+ "path-is-absolute": "^1.0.0",
519
+ "readdirp": "^2.2.1",
520
+ "upath": "^1.1.1"
521
+ },
522
+ "optionalDependencies": {
523
+ "fsevents": "^1.2.7"
524
+ }
525
+ },
526
+ "node_modules/class-utils": {
527
+ "version": "0.3.6",
528
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
529
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
530
+ "dev": true,
531
+ "dependencies": {
532
+ "arr-union": "^3.1.0",
533
+ "define-property": "^0.2.5",
534
+ "isobject": "^3.0.0",
535
+ "static-extend": "^0.1.1"
536
+ },
537
+ "engines": {
538
+ "node": ">=0.10.0"
539
+ }
540
+ },
541
+ "node_modules/class-utils/node_modules/define-property": {
542
+ "version": "0.2.5",
543
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
544
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
545
+ "dev": true,
546
+ "dependencies": {
547
+ "is-descriptor": "^0.1.0"
548
+ },
549
+ "engines": {
550
+ "node": ">=0.10.0"
551
+ }
552
+ },
553
+ "node_modules/class-utils/node_modules/is-accessor-descriptor": {
554
+ "version": "0.1.6",
555
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
556
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
557
+ "dev": true,
558
+ "dependencies": {
559
+ "kind-of": "^3.0.2"
560
+ },
561
+ "engines": {
562
+ "node": ">=0.10.0"
563
+ }
564
+ },
565
+ "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": {
566
+ "version": "3.2.2",
567
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
568
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
569
+ "dev": true,
570
+ "dependencies": {
571
+ "is-buffer": "^1.1.5"
572
+ },
573
+ "engines": {
574
+ "node": ">=0.10.0"
575
+ }
576
+ },
577
+ "node_modules/class-utils/node_modules/is-data-descriptor": {
578
+ "version": "0.1.4",
579
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
580
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
581
+ "dev": true,
582
+ "dependencies": {
583
+ "kind-of": "^3.0.2"
584
+ },
585
+ "engines": {
586
+ "node": ">=0.10.0"
587
+ }
588
+ },
589
+ "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": {
590
+ "version": "3.2.2",
591
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
592
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
593
+ "dev": true,
594
+ "dependencies": {
595
+ "is-buffer": "^1.1.5"
596
+ },
597
+ "engines": {
598
+ "node": ">=0.10.0"
599
+ }
600
+ },
601
+ "node_modules/class-utils/node_modules/is-descriptor": {
602
+ "version": "0.1.6",
603
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
604
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
605
+ "dev": true,
606
+ "dependencies": {
607
+ "is-accessor-descriptor": "^0.1.6",
608
+ "is-data-descriptor": "^0.1.4",
609
+ "kind-of": "^5.0.0"
610
+ },
611
+ "engines": {
612
+ "node": ">=0.10.0"
613
+ }
614
+ },
615
+ "node_modules/cliui": {
616
+ "version": "3.2.0",
617
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
618
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
619
+ "dev": true,
620
+ "dependencies": {
621
+ "string-width": "^1.0.1",
622
+ "strip-ansi": "^3.0.1",
623
+ "wrap-ansi": "^2.0.0"
624
+ }
625
+ },
626
+ "node_modules/clone": {
627
+ "version": "2.1.2",
628
+ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
629
+ "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
630
+ "dev": true,
631
+ "engines": {
632
+ "node": ">=0.8"
633
+ }
634
+ },
635
+ "node_modules/clone-buffer": {
636
+ "version": "1.0.0",
637
+ "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
638
+ "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
639
+ "dev": true,
640
+ "engines": {
641
+ "node": ">= 0.10"
642
+ }
643
+ },
644
+ "node_modules/clone-stats": {
645
+ "version": "1.0.0",
646
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
647
+ "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
648
+ "dev": true
649
+ },
650
+ "node_modules/cloneable-readable": {
651
+ "version": "1.1.3",
652
+ "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
653
+ "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
654
+ "dev": true,
655
+ "dependencies": {
656
+ "inherits": "^2.0.1",
657
+ "process-nextick-args": "^2.0.0",
658
+ "readable-stream": "^2.3.5"
659
+ }
660
+ },
661
+ "node_modules/code-point-at": {
662
+ "version": "1.1.0",
663
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
664
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
665
+ "dev": true,
666
+ "engines": {
667
+ "node": ">=0.10.0"
668
+ }
669
+ },
670
+ "node_modules/collection-map": {
671
+ "version": "1.0.0",
672
+ "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
673
+ "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
674
+ "dev": true,
675
+ "dependencies": {
676
+ "arr-map": "^2.0.2",
677
+ "for-own": "^1.0.0",
678
+ "make-iterator": "^1.0.0"
679
+ },
680
+ "engines": {
681
+ "node": ">=0.10.0"
682
+ }
683
+ },
684
+ "node_modules/collection-visit": {
685
+ "version": "1.0.0",
686
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
687
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
688
+ "dev": true,
689
+ "dependencies": {
690
+ "map-visit": "^1.0.0",
691
+ "object-visit": "^1.0.0"
692
+ },
693
+ "engines": {
694
+ "node": ">=0.10.0"
695
+ }
696
+ },
697
+ "node_modules/color-support": {
698
+ "version": "1.1.3",
699
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
700
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
701
+ "dev": true,
702
+ "bin": {
703
+ "color-support": "bin.js"
704
+ }
705
+ },
706
+ "node_modules/component-emitter": {
707
+ "version": "1.3.0",
708
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
709
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
710
+ "dev": true
711
+ },
712
+ "node_modules/concat-map": {
713
+ "version": "0.0.1",
714
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
715
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
716
+ "dev": true
717
+ },
718
+ "node_modules/concat-stream": {
719
+ "version": "1.6.2",
720
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
721
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
722
+ "dev": true,
723
+ "engines": [
724
+ "node >= 0.8"
725
+ ],
726
+ "dependencies": {
727
+ "buffer-from": "^1.0.0",
728
+ "inherits": "^2.0.3",
729
+ "readable-stream": "^2.2.2",
730
+ "typedarray": "^0.0.6"
731
+ }
732
+ },
733
+ "node_modules/convert-source-map": {
734
+ "version": "1.8.0",
735
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
736
+ "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
737
+ "dev": true,
738
+ "dependencies": {
739
+ "safe-buffer": "~5.1.1"
740
+ }
741
+ },
742
+ "node_modules/copy-descriptor": {
743
+ "version": "0.1.1",
744
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
745
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
746
+ "dev": true,
747
+ "engines": {
748
+ "node": ">=0.10.0"
749
+ }
750
+ },
751
+ "node_modules/copy-props": {
752
+ "version": "2.0.5",
753
+ "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz",
754
+ "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==",
755
+ "dev": true,
756
+ "dependencies": {
757
+ "each-props": "^1.3.2",
758
+ "is-plain-object": "^5.0.0"
759
+ }
760
+ },
761
+ "node_modules/core-util-is": {
762
+ "version": "1.0.3",
763
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
764
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
765
+ "dev": true
766
+ },
767
+ "node_modules/d": {
768
+ "version": "1.0.1",
769
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
770
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
771
+ "dev": true,
772
+ "dependencies": {
773
+ "es5-ext": "^0.10.50",
774
+ "type": "^1.0.1"
775
+ }
776
+ },
777
+ "node_modules/dateformat": {
778
+ "version": "2.2.0",
779
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
780
+ "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=",
781
+ "dev": true,
782
+ "engines": {
783
+ "node": "*"
784
+ }
785
+ },
786
+ "node_modules/debug": {
787
+ "version": "2.6.9",
788
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
789
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
790
+ "dev": true,
791
+ "dependencies": {
792
+ "ms": "2.0.0"
793
+ }
794
+ },
795
+ "node_modules/decamelize": {
796
+ "version": "1.2.0",
797
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
798
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
799
+ "dev": true,
800
+ "engines": {
801
+ "node": ">=0.10.0"
802
+ }
803
+ },
804
+ "node_modules/decode-uri-component": {
805
+ "version": "0.2.0",
806
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
807
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
808
+ "dev": true,
809
+ "engines": {
810
+ "node": ">=0.10"
811
+ }
812
+ },
813
+ "node_modules/default-compare": {
814
+ "version": "1.0.0",
815
+ "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
816
+ "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
817
+ "dev": true,
818
+ "dependencies": {
819
+ "kind-of": "^5.0.2"
820
+ },
821
+ "engines": {
822
+ "node": ">=0.10.0"
823
+ }
824
+ },
825
+ "node_modules/default-resolution": {
826
+ "version": "2.0.0",
827
+ "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
828
+ "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=",
829
+ "dev": true,
830
+ "engines": {
831
+ "node": ">= 0.10"
832
+ }
833
+ },
834
+ "node_modules/define-properties": {
835
+ "version": "1.1.3",
836
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
837
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
838
+ "dev": true,
839
+ "dependencies": {
840
+ "object-keys": "^1.0.12"
841
+ },
842
+ "engines": {
843
+ "node": ">= 0.4"
844
+ }
845
+ },
846
+ "node_modules/define-property": {
847
+ "version": "2.0.2",
848
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
849
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
850
+ "dev": true,
851
+ "dependencies": {
852
+ "is-descriptor": "^1.0.2",
853
+ "isobject": "^3.0.1"
854
+ },
855
+ "engines": {
856
+ "node": ">=0.10.0"
857
+ }
858
+ },
859
+ "node_modules/detect-file": {
860
+ "version": "1.0.0",
861
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
862
+ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
863
+ "dev": true,
864
+ "engines": {
865
+ "node": ">=0.10.0"
866
+ }
867
+ },
868
+ "node_modules/duplexer2": {
869
+ "version": "0.0.2",
870
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
871
+ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
872
+ "dev": true,
873
+ "dependencies": {
874
+ "readable-stream": "~1.1.9"
875
+ }
876
+ },
877
+ "node_modules/duplexer2/node_modules/isarray": {
878
+ "version": "0.0.1",
879
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
880
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
881
+ "dev": true
882
+ },
883
+ "node_modules/duplexer2/node_modules/readable-stream": {
884
+ "version": "1.1.14",
885
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
886
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
887
+ "dev": true,
888
+ "dependencies": {
889
+ "core-util-is": "~1.0.0",
890
+ "inherits": "~2.0.1",
891
+ "isarray": "0.0.1",
892
+ "string_decoder": "~0.10.x"
893
+ }
894
+ },
895
+ "node_modules/duplexer2/node_modules/string_decoder": {
896
+ "version": "0.10.31",
897
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
898
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
899
+ "dev": true
900
+ },
901
+ "node_modules/duplexify": {
902
+ "version": "3.7.1",
903
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
904
+ "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
905
+ "dev": true,
906
+ "dependencies": {
907
+ "end-of-stream": "^1.0.0",
908
+ "inherits": "^2.0.1",
909
+ "readable-stream": "^2.0.0",
910
+ "stream-shift": "^1.0.0"
911
+ }
912
+ },
913
+ "node_modules/each-props": {
914
+ "version": "1.3.2",
915
+ "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
916
+ "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
917
+ "dev": true,
918
+ "dependencies": {
919
+ "is-plain-object": "^2.0.1",
920
+ "object.defaults": "^1.1.0"
921
+ }
922
+ },
923
+ "node_modules/each-props/node_modules/is-plain-object": {
924
+ "version": "2.0.4",
925
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
926
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
927
+ "dev": true,
928
+ "dependencies": {
929
+ "isobject": "^3.0.1"
930
+ },
931
+ "engines": {
932
+ "node": ">=0.10.0"
933
+ }
934
+ },
935
+ "node_modules/end-of-stream": {
936
+ "version": "1.4.4",
937
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
938
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
939
+ "dev": true,
940
+ "dependencies": {
941
+ "once": "^1.4.0"
942
+ }
943
+ },
944
+ "node_modules/error-ex": {
945
+ "version": "1.3.2",
946
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
947
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
948
+ "dev": true,
949
+ "dependencies": {
950
+ "is-arrayish": "^0.2.1"
951
+ }
952
+ },
953
+ "node_modules/es5-ext": {
954
+ "version": "0.10.53",
955
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
956
+ "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
957
+ "dev": true,
958
+ "dependencies": {
959
+ "es6-iterator": "~2.0.3",
960
+ "es6-symbol": "~3.1.3",
961
+ "next-tick": "~1.0.0"
962
+ }
963
+ },
964
+ "node_modules/es6-iterator": {
965
+ "version": "2.0.3",
966
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
967
+ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
968
+ "dev": true,
969
+ "dependencies": {
970
+ "d": "1",
971
+ "es5-ext": "^0.10.35",
972
+ "es6-symbol": "^3.1.1"
973
+ }
974
+ },
975
+ "node_modules/es6-symbol": {
976
+ "version": "3.1.3",
977
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
978
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
979
+ "dev": true,
980
+ "dependencies": {
981
+ "d": "^1.0.1",
982
+ "ext": "^1.1.2"
983
+ }
984
+ },
985
+ "node_modules/es6-weak-map": {
986
+ "version": "2.0.3",
987
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
988
+ "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
989
+ "dev": true,
990
+ "dependencies": {
991
+ "d": "1",
992
+ "es5-ext": "^0.10.46",
993
+ "es6-iterator": "^2.0.3",
994
+ "es6-symbol": "^3.1.1"
995
+ }
996
+ },
997
+ "node_modules/escape-string-regexp": {
998
+ "version": "1.0.5",
999
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
1000
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
1001
+ "dev": true,
1002
+ "engines": {
1003
+ "node": ">=0.8.0"
1004
+ }
1005
+ },
1006
+ "node_modules/expand-brackets": {
1007
+ "version": "2.1.4",
1008
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
1009
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
1010
+ "dev": true,
1011
+ "dependencies": {
1012
+ "debug": "^2.3.3",
1013
+ "define-property": "^0.2.5",
1014
+ "extend-shallow": "^2.0.1",
1015
+ "posix-character-classes": "^0.1.0",
1016
+ "regex-not": "^1.0.0",
1017
+ "snapdragon": "^0.8.1",
1018
+ "to-regex": "^3.0.1"
1019
+ },
1020
+ "engines": {
1021
+ "node": ">=0.10.0"
1022
+ }
1023
+ },
1024
+ "node_modules/expand-brackets/node_modules/define-property": {
1025
+ "version": "0.2.5",
1026
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1027
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
1028
+ "dev": true,
1029
+ "dependencies": {
1030
+ "is-descriptor": "^0.1.0"
1031
+ },
1032
+ "engines": {
1033
+ "node": ">=0.10.0"
1034
+ }
1035
+ },
1036
+ "node_modules/expand-brackets/node_modules/is-accessor-descriptor": {
1037
+ "version": "0.1.6",
1038
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
1039
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
1040
+ "dev": true,
1041
+ "dependencies": {
1042
+ "kind-of": "^3.0.2"
1043
+ },
1044
+ "engines": {
1045
+ "node": ">=0.10.0"
1046
+ }
1047
+ },
1048
+ "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": {
1049
+ "version": "3.2.2",
1050
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1051
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1052
+ "dev": true,
1053
+ "dependencies": {
1054
+ "is-buffer": "^1.1.5"
1055
+ },
1056
+ "engines": {
1057
+ "node": ">=0.10.0"
1058
+ }
1059
+ },
1060
+ "node_modules/expand-brackets/node_modules/is-data-descriptor": {
1061
+ "version": "0.1.4",
1062
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
1063
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
1064
+ "dev": true,
1065
+ "dependencies": {
1066
+ "kind-of": "^3.0.2"
1067
+ },
1068
+ "engines": {
1069
+ "node": ">=0.10.0"
1070
+ }
1071
+ },
1072
+ "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": {
1073
+ "version": "3.2.2",
1074
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1075
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1076
+ "dev": true,
1077
+ "dependencies": {
1078
+ "is-buffer": "^1.1.5"
1079
+ },
1080
+ "engines": {
1081
+ "node": ">=0.10.0"
1082
+ }
1083
+ },
1084
+ "node_modules/expand-brackets/node_modules/is-descriptor": {
1085
+ "version": "0.1.6",
1086
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
1087
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
1088
+ "dev": true,
1089
+ "dependencies": {
1090
+ "is-accessor-descriptor": "^0.1.6",
1091
+ "is-data-descriptor": "^0.1.4",
1092
+ "kind-of": "^5.0.0"
1093
+ },
1094
+ "engines": {
1095
+ "node": ">=0.10.0"
1096
+ }
1097
+ },
1098
+ "node_modules/expand-tilde": {
1099
+ "version": "2.0.2",
1100
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
1101
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
1102
+ "dev": true,
1103
+ "dependencies": {
1104
+ "homedir-polyfill": "^1.0.1"
1105
+ },
1106
+ "engines": {
1107
+ "node": ">=0.10.0"
1108
+ }
1109
+ },
1110
+ "node_modules/ext": {
1111
+ "version": "1.6.0",
1112
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz",
1113
+ "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==",
1114
+ "dev": true,
1115
+ "dependencies": {
1116
+ "type": "^2.5.0"
1117
+ }
1118
+ },
1119
+ "node_modules/ext/node_modules/type": {
1120
+ "version": "2.5.0",
1121
+ "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
1122
+ "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==",
1123
+ "dev": true
1124
+ },
1125
+ "node_modules/extend": {
1126
+ "version": "3.0.2",
1127
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
1128
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
1129
+ "dev": true
1130
+ },
1131
+ "node_modules/extend-shallow": {
1132
+ "version": "2.0.1",
1133
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
1134
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
1135
+ "dev": true,
1136
+ "dependencies": {
1137
+ "is-extendable": "^0.1.0"
1138
+ },
1139
+ "engines": {
1140
+ "node": ">=0.10.0"
1141
+ }
1142
+ },
1143
+ "node_modules/extglob": {
1144
+ "version": "2.0.4",
1145
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
1146
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
1147
+ "dev": true,
1148
+ "dependencies": {
1149
+ "array-unique": "^0.3.2",
1150
+ "define-property": "^1.0.0",
1151
+ "expand-brackets": "^2.1.4",
1152
+ "extend-shallow": "^2.0.1",
1153
+ "fragment-cache": "^0.2.1",
1154
+ "regex-not": "^1.0.0",
1155
+ "snapdragon": "^0.8.1",
1156
+ "to-regex": "^3.0.1"
1157
+ },
1158
+ "engines": {
1159
+ "node": ">=0.10.0"
1160
+ }
1161
+ },
1162
+ "node_modules/extglob/node_modules/define-property": {
1163
+ "version": "1.0.0",
1164
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
1165
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
1166
+ "dev": true,
1167
+ "dependencies": {
1168
+ "is-descriptor": "^1.0.0"
1169
+ },
1170
+ "engines": {
1171
+ "node": ">=0.10.0"
1172
+ }
1173
+ },
1174
+ "node_modules/fancy-log": {
1175
+ "version": "1.3.3",
1176
+ "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
1177
+ "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
1178
+ "dev": true,
1179
+ "dependencies": {
1180
+ "ansi-gray": "^0.1.1",
1181
+ "color-support": "^1.1.3",
1182
+ "parse-node-version": "^1.0.0",
1183
+ "time-stamp": "^1.0.0"
1184
+ },
1185
+ "engines": {
1186
+ "node": ">= 0.10"
1187
+ }
1188
+ },
1189
+ "node_modules/fast-levenshtein": {
1190
+ "version": "1.1.4",
1191
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz",
1192
+ "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=",
1193
+ "dev": true
1194
+ },
1195
+ "node_modules/file-uri-to-path": {
1196
+ "version": "1.0.0",
1197
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
1198
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
1199
+ "dev": true,
1200
+ "optional": true
1201
+ },
1202
+ "node_modules/fill-range": {
1203
+ "version": "4.0.0",
1204
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
1205
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
1206
+ "dev": true,
1207
+ "dependencies": {
1208
+ "extend-shallow": "^2.0.1",
1209
+ "is-number": "^3.0.0",
1210
+ "repeat-string": "^1.6.1",
1211
+ "to-regex-range": "^2.1.0"
1212
+ },
1213
+ "engines": {
1214
+ "node": ">=0.10.0"
1215
+ }
1216
+ },
1217
+ "node_modules/find-up": {
1218
+ "version": "1.1.2",
1219
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
1220
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
1221
+ "dev": true,
1222
+ "dependencies": {
1223
+ "path-exists": "^2.0.0",
1224
+ "pinkie-promise": "^2.0.0"
1225
+ },
1226
+ "engines": {
1227
+ "node": ">=0.10.0"
1228
+ }
1229
+ },
1230
+ "node_modules/findup-sync": {
1231
+ "version": "3.0.0",
1232
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
1233
+ "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
1234
+ "dev": true,
1235
+ "dependencies": {
1236
+ "detect-file": "^1.0.0",
1237
+ "is-glob": "^4.0.0",
1238
+ "micromatch": "^3.0.4",
1239
+ "resolve-dir": "^1.0.1"
1240
+ },
1241
+ "engines": {
1242
+ "node": ">= 0.10"
1243
+ }
1244
+ },
1245
+ "node_modules/fined": {
1246
+ "version": "1.2.0",
1247
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
1248
+ "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
1249
+ "dev": true,
1250
+ "dependencies": {
1251
+ "expand-tilde": "^2.0.2",
1252
+ "is-plain-object": "^2.0.3",
1253
+ "object.defaults": "^1.1.0",
1254
+ "object.pick": "^1.2.0",
1255
+ "parse-filepath": "^1.0.1"
1256
+ },
1257
+ "engines": {
1258
+ "node": ">= 0.10"
1259
+ }
1260
+ },
1261
+ "node_modules/fined/node_modules/is-plain-object": {
1262
+ "version": "2.0.4",
1263
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
1264
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
1265
+ "dev": true,
1266
+ "dependencies": {
1267
+ "isobject": "^3.0.1"
1268
+ },
1269
+ "engines": {
1270
+ "node": ">=0.10.0"
1271
+ }
1272
+ },
1273
+ "node_modules/flagged-respawn": {
1274
+ "version": "1.0.1",
1275
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
1276
+ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
1277
+ "dev": true,
1278
+ "engines": {
1279
+ "node": ">= 0.10"
1280
+ }
1281
+ },
1282
+ "node_modules/flush-write-stream": {
1283
+ "version": "1.1.1",
1284
+ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
1285
+ "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
1286
+ "dev": true,
1287
+ "dependencies": {
1288
+ "inherits": "^2.0.3",
1289
+ "readable-stream": "^2.3.6"
1290
+ }
1291
+ },
1292
+ "node_modules/for-in": {
1293
+ "version": "1.0.2",
1294
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
1295
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
1296
+ "dev": true,
1297
+ "engines": {
1298
+ "node": ">=0.10.0"
1299
+ }
1300
+ },
1301
+ "node_modules/for-own": {
1302
+ "version": "1.0.0",
1303
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
1304
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
1305
+ "dev": true,
1306
+ "dependencies": {
1307
+ "for-in": "^1.0.1"
1308
+ },
1309
+ "engines": {
1310
+ "node": ">=0.10.0"
1311
+ }
1312
+ },
1313
+ "node_modules/fragment-cache": {
1314
+ "version": "0.2.1",
1315
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
1316
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
1317
+ "dev": true,
1318
+ "dependencies": {
1319
+ "map-cache": "^0.2.2"
1320
+ },
1321
+ "engines": {
1322
+ "node": ">=0.10.0"
1323
+ }
1324
+ },
1325
+ "node_modules/fs-mkdirp-stream": {
1326
+ "version": "1.0.0",
1327
+ "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
1328
+ "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
1329
+ "dev": true,
1330
+ "dependencies": {
1331
+ "graceful-fs": "^4.1.11",
1332
+ "through2": "^2.0.3"
1333
+ },
1334
+ "engines": {
1335
+ "node": ">= 0.10"
1336
+ }
1337
+ },
1338
+ "node_modules/fs-mkdirp-stream/node_modules/through2": {
1339
+ "version": "2.0.5",
1340
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
1341
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
1342
+ "dev": true,
1343
+ "dependencies": {
1344
+ "readable-stream": "~2.3.6",
1345
+ "xtend": "~4.0.1"
1346
+ }
1347
+ },
1348
+ "node_modules/fs.realpath": {
1349
+ "version": "1.0.0",
1350
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1351
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
1352
+ "dev": true
1353
+ },
1354
+ "node_modules/fsevents": {
1355
+ "version": "1.2.13",
1356
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
1357
+ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
1358
+ "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
1359
+ "dev": true,
1360
+ "hasInstallScript": true,
1361
+ "optional": true,
1362
+ "os": [
1363
+ "darwin"
1364
+ ],
1365
+ "dependencies": {
1366
+ "bindings": "^1.5.0",
1367
+ "nan": "^2.12.1"
1368
+ },
1369
+ "engines": {
1370
+ "node": ">= 4.0"
1371
+ }
1372
+ },
1373
+ "node_modules/function-bind": {
1374
+ "version": "1.1.1",
1375
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1376
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1377
+ "dev": true
1378
+ },
1379
+ "node_modules/get-caller-file": {
1380
+ "version": "1.0.3",
1381
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
1382
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
1383
+ "dev": true
1384
+ },
1385
+ "node_modules/get-intrinsic": {
1386
+ "version": "1.1.1",
1387
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
1388
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
1389
+ "dev": true,
1390
+ "dependencies": {
1391
+ "function-bind": "^1.1.1",
1392
+ "has": "^1.0.3",
1393
+ "has-symbols": "^1.0.1"
1394
+ },
1395
+ "funding": {
1396
+ "url": "https://github.com/sponsors/ljharb"
1397
+ }
1398
+ },
1399
+ "node_modules/get-value": {
1400
+ "version": "2.0.6",
1401
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
1402
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
1403
+ "dev": true,
1404
+ "engines": {
1405
+ "node": ">=0.10.0"
1406
+ }
1407
+ },
1408
+ "node_modules/glob": {
1409
+ "version": "7.2.0",
1410
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
1411
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
1412
+ "dev": true,
1413
+ "dependencies": {
1414
+ "fs.realpath": "^1.0.0",
1415
+ "inflight": "^1.0.4",
1416
+ "inherits": "2",
1417
+ "minimatch": "^3.0.4",
1418
+ "once": "^1.3.0",
1419
+ "path-is-absolute": "^1.0.0"
1420
+ },
1421
+ "engines": {
1422
+ "node": "*"
1423
+ },
1424
+ "funding": {
1425
+ "url": "https://github.com/sponsors/isaacs"
1426
+ }
1427
+ },
1428
+ "node_modules/glob-parent": {
1429
+ "version": "3.1.0",
1430
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
1431
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
1432
+ "dev": true,
1433
+ "dependencies": {
1434
+ "is-glob": "^3.1.0",
1435
+ "path-dirname": "^1.0.0"
1436
+ }
1437
+ },
1438
+ "node_modules/glob-parent/node_modules/is-glob": {
1439
+ "version": "3.1.0",
1440
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
1441
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
1442
+ "dev": true,
1443
+ "dependencies": {
1444
+ "is-extglob": "^2.1.0"
1445
+ },
1446
+ "engines": {
1447
+ "node": ">=0.10.0"
1448
+ }
1449
+ },
1450
+ "node_modules/glob-stream": {
1451
+ "version": "6.1.0",
1452
+ "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
1453
+ "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
1454
+ "dev": true,
1455
+ "dependencies": {
1456
+ "extend": "^3.0.0",
1457
+ "glob": "^7.1.1",
1458
+ "glob-parent": "^3.1.0",
1459
+ "is-negated-glob": "^1.0.0",
1460
+ "ordered-read-streams": "^1.0.0",
1461
+ "pumpify": "^1.3.5",
1462
+ "readable-stream": "^2.1.5",
1463
+ "remove-trailing-separator": "^1.0.1",
1464
+ "to-absolute-glob": "^2.0.0",
1465
+ "unique-stream": "^2.0.2"
1466
+ },
1467
+ "engines": {
1468
+ "node": ">= 0.10"
1469
+ }
1470
+ },
1471
+ "node_modules/glob-watcher": {
1472
+ "version": "5.0.5",
1473
+ "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz",
1474
+ "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==",
1475
+ "dev": true,
1476
+ "dependencies": {
1477
+ "anymatch": "^2.0.0",
1478
+ "async-done": "^1.2.0",
1479
+ "chokidar": "^2.0.0",
1480
+ "is-negated-glob": "^1.0.0",
1481
+ "just-debounce": "^1.0.0",
1482
+ "normalize-path": "^3.0.0",
1483
+ "object.defaults": "^1.1.0"
1484
+ },
1485
+ "engines": {
1486
+ "node": ">= 0.10"
1487
+ }
1488
+ },
1489
+ "node_modules/global-modules": {
1490
+ "version": "1.0.0",
1491
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
1492
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
1493
+ "dev": true,
1494
+ "dependencies": {
1495
+ "global-prefix": "^1.0.1",
1496
+ "is-windows": "^1.0.1",
1497
+ "resolve-dir": "^1.0.0"
1498
+ },
1499
+ "engines": {
1500
+ "node": ">=0.10.0"
1501
+ }
1502
+ },
1503
+ "node_modules/global-prefix": {
1504
+ "version": "1.0.2",
1505
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
1506
+ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
1507
+ "dev": true,
1508
+ "dependencies": {
1509
+ "expand-tilde": "^2.0.2",
1510
+ "homedir-polyfill": "^1.0.1",
1511
+ "ini": "^1.3.4",
1512
+ "is-windows": "^1.0.1",
1513
+ "which": "^1.2.14"
1514
+ },
1515
+ "engines": {
1516
+ "node": ">=0.10.0"
1517
+ }
1518
+ },
1519
+ "node_modules/global-prefix/node_modules/which": {
1520
+ "version": "1.3.1",
1521
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1522
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1523
+ "dev": true,
1524
+ "dependencies": {
1525
+ "isexe": "^2.0.0"
1526
+ },
1527
+ "bin": {
1528
+ "which": "bin/which"
1529
+ }
1530
+ },
1531
+ "node_modules/glogg": {
1532
+ "version": "1.0.2",
1533
+ "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
1534
+ "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
1535
+ "dev": true,
1536
+ "dependencies": {
1537
+ "sparkles": "^1.0.0"
1538
+ },
1539
+ "engines": {
1540
+ "node": ">= 0.10"
1541
+ }
1542
+ },
1543
+ "node_modules/graceful-fs": {
1544
+ "version": "4.2.8",
1545
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
1546
+ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
1547
+ "dev": true
1548
+ },
1549
+ "node_modules/growly": {
1550
+ "version": "1.3.0",
1551
+ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
1552
+ "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
1553
+ "dev": true
1554
+ },
1555
+ "node_modules/gulp": {
1556
+ "version": "4.0.2",
1557
+ "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
1558
+ "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
1559
+ "dev": true,
1560
+ "dependencies": {
1561
+ "glob-watcher": "^5.0.3",
1562
+ "gulp-cli": "^2.2.0",
1563
+ "undertaker": "^1.2.1",
1564
+ "vinyl-fs": "^3.0.0"
1565
+ },
1566
+ "bin": {
1567
+ "gulp": "bin/gulp.js"
1568
+ },
1569
+ "engines": {
1570
+ "node": ">= 0.10"
1571
+ }
1572
+ },
1573
+ "node_modules/gulp-cli": {
1574
+ "version": "2.3.0",
1575
+ "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz",
1576
+ "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==",
1577
+ "dev": true,
1578
+ "dependencies": {
1579
+ "ansi-colors": "^1.0.1",
1580
+ "archy": "^1.0.0",
1581
+ "array-sort": "^1.0.0",
1582
+ "color-support": "^1.1.3",
1583
+ "concat-stream": "^1.6.0",
1584
+ "copy-props": "^2.0.1",
1585
+ "fancy-log": "^1.3.2",
1586
+ "gulplog": "^1.0.0",
1587
+ "interpret": "^1.4.0",
1588
+ "isobject": "^3.0.1",
1589
+ "liftoff": "^3.1.0",
1590
+ "matchdep": "^2.0.0",
1591
+ "mute-stdout": "^1.0.0",
1592
+ "pretty-hrtime": "^1.0.0",
1593
+ "replace-homedir": "^1.0.0",
1594
+ "semver-greatest-satisfied-range": "^1.1.0",
1595
+ "v8flags": "^3.2.0",
1596
+ "yargs": "^7.1.0"
1597
+ },
1598
+ "bin": {
1599
+ "gulp": "bin/gulp.js"
1600
+ },
1601
+ "engines": {
1602
+ "node": ">= 0.10"
1603
+ }
1604
+ },
1605
+ "node_modules/gulp-notify": {
1606
+ "version": "4.0.0",
1607
+ "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-4.0.0.tgz",
1608
+ "integrity": "sha512-0cdDvZkHVqu4tqrcOI/jL5YdxYEIPQ7+p3YxnO48w5hhPSisvogZ887qL+fpYItg9m4MUhJ5Se8p8xGy3uJESA==",
1609
+ "dev": true,
1610
+ "dependencies": {
1611
+ "ansi-colors": "^4.1.1",
1612
+ "fancy-log": "^1.3.3",
1613
+ "lodash.template": "^4.5.0",
1614
+ "node-notifier": "^9.0.1",
1615
+ "node.extend": "^2.0.2",
1616
+ "plugin-error": "^1.0.1",
1617
+ "through2": "^4.0.2"
1618
+ },
1619
+ "engines": {
1620
+ "node": ">=0.8.0",
1621
+ "npm": ">=1.2.10"
1622
+ }
1623
+ },
1624
+ "node_modules/gulp-notify/node_modules/ansi-colors": {
1625
+ "version": "4.1.1",
1626
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
1627
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
1628
+ "dev": true,
1629
+ "engines": {
1630
+ "node": ">=6"
1631
+ }
1632
+ },
1633
+ "node_modules/gulp-sort": {
1634
+ "version": "2.0.0",
1635
+ "resolved": "https://registry.npmjs.org/gulp-sort/-/gulp-sort-2.0.0.tgz",
1636
+ "integrity": "sha1-xnYqLx8N4KP8WVohWZ0/rI26Gso=",
1637
+ "dev": true,
1638
+ "dependencies": {
1639
+ "through2": "^2.0.1"
1640
+ }
1641
+ },
1642
+ "node_modules/gulp-sort/node_modules/through2": {
1643
+ "version": "2.0.5",
1644
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
1645
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
1646
+ "dev": true,
1647
+ "dependencies": {
1648
+ "readable-stream": "~2.3.6",
1649
+ "xtend": "~4.0.1"
1650
+ }
1651
+ },
1652
+ "node_modules/gulp-util": {
1653
+ "version": "3.0.8",
1654
+ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
1655
+ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
1656
+ "deprecated": "gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5",
1657
+ "dev": true,
1658
+ "dependencies": {
1659
+ "array-differ": "^1.0.0",
1660
+ "array-uniq": "^1.0.2",
1661
+ "beeper": "^1.0.0",
1662
+ "chalk": "^1.0.0",
1663
+ "dateformat": "^2.0.0",
1664
+ "fancy-log": "^1.1.0",
1665
+ "gulplog": "^1.0.0",
1666
+ "has-gulplog": "^0.1.0",
1667
+ "lodash._reescape": "^3.0.0",
1668
+ "lodash._reevaluate": "^3.0.0",
1669
+ "lodash._reinterpolate": "^3.0.0",
1670
+ "lodash.template": "^3.0.0",
1671
+ "minimist": "^1.1.0",
1672
+ "multipipe": "^0.1.2",
1673
+ "object-assign": "^3.0.0",
1674
+ "replace-ext": "0.0.1",
1675
+ "through2": "^2.0.0",
1676
+ "vinyl": "^0.5.0"
1677
+ },
1678
+ "engines": {
1679
+ "node": ">=0.10"
1680
+ }
1681
+ },
1682
+ "node_modules/gulp-util/node_modules/clone": {
1683
+ "version": "1.0.4",
1684
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
1685
+ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
1686
+ "dev": true,
1687
+ "engines": {
1688
+ "node": ">=0.8"
1689
+ }
1690
+ },
1691
+ "node_modules/gulp-util/node_modules/clone-stats": {
1692
+ "version": "0.0.1",
1693
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
1694
+ "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
1695
+ "dev": true
1696
+ },
1697
+ "node_modules/gulp-util/node_modules/lodash.template": {
1698
+ "version": "3.6.2",
1699
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
1700
+ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
1701
+ "dev": true,
1702
+ "dependencies": {
1703
+ "lodash._basecopy": "^3.0.0",
1704
+ "lodash._basetostring": "^3.0.0",
1705
+ "lodash._basevalues": "^3.0.0",
1706
+ "lodash._isiterateecall": "^3.0.0",
1707
+ "lodash._reinterpolate": "^3.0.0",
1708
+ "lodash.escape": "^3.0.0",
1709
+ "lodash.keys": "^3.0.0",
1710
+ "lodash.restparam": "^3.0.0",
1711
+ "lodash.templatesettings": "^3.0.0"
1712
+ }
1713
+ },
1714
+ "node_modules/gulp-util/node_modules/lodash.templatesettings": {
1715
+ "version": "3.1.1",
1716
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
1717
+ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
1718
+ "dev": true,
1719
+ "dependencies": {
1720
+ "lodash._reinterpolate": "^3.0.0",
1721
+ "lodash.escape": "^3.0.0"
1722
+ }
1723
+ },
1724
+ "node_modules/gulp-util/node_modules/replace-ext": {
1725
+ "version": "0.0.1",
1726
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
1727
+ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
1728
+ "dev": true,
1729
+ "engines": {
1730
+ "node": ">= 0.4"
1731
+ }
1732
+ },
1733
+ "node_modules/gulp-util/node_modules/through2": {
1734
+ "version": "2.0.5",
1735
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
1736
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
1737
+ "dev": true,
1738
+ "dependencies": {
1739
+ "readable-stream": "~2.3.6",
1740
+ "xtend": "~4.0.1"
1741
+ }
1742
+ },
1743
+ "node_modules/gulp-util/node_modules/vinyl": {
1744
+ "version": "0.5.3",
1745
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
1746
+ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
1747
+ "dev": true,
1748
+ "dependencies": {
1749
+ "clone": "^1.0.0",
1750
+ "clone-stats": "^0.0.1",
1751
+ "replace-ext": "0.0.1"
1752
+ },
1753
+ "engines": {
1754
+ "node": ">= 0.9"
1755
+ }
1756
+ },
1757
+ "node_modules/gulp-wp-pot": {
1758
+ "version": "2.5.0",
1759
+ "resolved": "https://registry.npmjs.org/gulp-wp-pot/-/gulp-wp-pot-2.5.0.tgz",
1760
+ "integrity": "sha512-3IIVEsgAaRFi4DWv5hRZcM7VEsCtGD4ZxgPL8qPdX+yrSpwD8I2+Q1cP3olXhn7KLJsnGSNuqor5sxo97H5pmQ==",
1761
+ "dev": true,
1762
+ "dependencies": {
1763
+ "plugin-error": "^1.0.1",
1764
+ "vinyl": "^2.2.1",
1765
+ "wp-pot": "^1.9.6"
1766
+ },
1767
+ "engines": {
1768
+ "node": ">=10"
1769
+ }
1770
+ },
1771
+ "node_modules/gulplog": {
1772
+ "version": "1.0.0",
1773
+ "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
1774
+ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
1775
+ "dev": true,
1776
+ "dependencies": {
1777
+ "glogg": "^1.0.0"
1778
+ },
1779
+ "engines": {
1780
+ "node": ">= 0.10"
1781
+ }
1782
+ },
1783
+ "node_modules/has": {
1784
+ "version": "1.0.3",
1785
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1786
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1787
+ "dev": true,
1788
+ "dependencies": {
1789
+ "function-bind": "^1.1.1"
1790
+ },
1791
+ "engines": {
1792
+ "node": ">= 0.4.0"
1793
+ }
1794
+ },
1795
+ "node_modules/has-ansi": {
1796
+ "version": "2.0.0",
1797
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
1798
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
1799
+ "dev": true,
1800
+ "dependencies": {
1801
+ "ansi-regex": "^2.0.0"
1802
+ },
1803
+ "engines": {
1804
+ "node": ">=0.10.0"
1805
+ }
1806
+ },
1807
+ "node_modules/has-gulplog": {
1808
+ "version": "0.1.0",
1809
+ "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
1810
+ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
1811
+ "dev": true,
1812
+ "dependencies": {
1813
+ "sparkles": "^1.0.0"
1814
+ },
1815
+ "engines": {
1816
+ "node": ">= 0.10"
1817
+ }
1818
+ },
1819
+ "node_modules/has-symbols": {
1820
+ "version": "1.0.2",
1821
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
1822
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
1823
+ "dev": true,
1824
+ "engines": {
1825
+ "node": ">= 0.4"
1826
+ },
1827
+ "funding": {
1828
+ "url": "https://github.com/sponsors/ljharb"
1829
+ }
1830
+ },
1831
+ "node_modules/has-value": {
1832
+ "version": "1.0.0",
1833
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
1834
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
1835
+ "dev": true,
1836
+ "dependencies": {
1837
+ "get-value": "^2.0.6",
1838
+ "has-values": "^1.0.0",
1839
+ "isobject": "^3.0.0"
1840
+ },
1841
+ "engines": {
1842
+ "node": ">=0.10.0"
1843
+ }
1844
+ },
1845
+ "node_modules/has-values": {
1846
+ "version": "1.0.0",
1847
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
1848
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
1849
+ "dev": true,
1850
+ "dependencies": {
1851
+ "is-number": "^3.0.0",
1852
+ "kind-of": "^4.0.0"
1853
+ },
1854
+ "engines": {
1855
+ "node": ">=0.10.0"
1856
+ }
1857
+ },
1858
+ "node_modules/has-values/node_modules/kind-of": {
1859
+ "version": "4.0.0",
1860
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
1861
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
1862
+ "dev": true,
1863
+ "dependencies": {
1864
+ "is-buffer": "^1.1.5"
1865
+ },
1866
+ "engines": {
1867
+ "node": ">=0.10.0"
1868
+ }
1869
+ },
1870
+ "node_modules/homedir-polyfill": {
1871
+ "version": "1.0.3",
1872
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
1873
+ "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
1874
+ "dev": true,
1875
+ "dependencies": {
1876
+ "parse-passwd": "^1.0.0"
1877
+ },
1878
+ "engines": {
1879
+ "node": ">=0.10.0"
1880
+ }
1881
+ },
1882
+ "node_modules/hosted-git-info": {
1883
+ "version": "2.8.9",
1884
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
1885
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
1886
+ "dev": true
1887
+ },
1888
+ "node_modules/inflight": {
1889
+ "version": "1.0.6",
1890
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1891
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
1892
+ "dev": true,
1893
+ "dependencies": {
1894
+ "once": "^1.3.0",
1895
+ "wrappy": "1"
1896
+ }
1897
+ },
1898
+ "node_modules/inherits": {
1899
+ "version": "2.0.4",
1900
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1901
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
1902
+ "dev": true
1903
+ },
1904
+ "node_modules/ini": {
1905
+ "version": "1.3.8",
1906
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
1907
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
1908
+ "dev": true
1909
+ },
1910
+ "node_modules/interpret": {
1911
+ "version": "1.4.0",
1912
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
1913
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
1914
+ "dev": true,
1915
+ "engines": {
1916
+ "node": ">= 0.10"
1917
+ }
1918
+ },
1919
+ "node_modules/invert-kv": {
1920
+ "version": "1.0.0",
1921
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
1922
+ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
1923
+ "dev": true,
1924
+ "engines": {
1925
+ "node": ">=0.10.0"
1926
+ }
1927
+ },
1928
+ "node_modules/is": {
1929
+ "version": "3.3.0",
1930
+ "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz",
1931
+ "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==",
1932
+ "dev": true,
1933
+ "engines": {
1934
+ "node": "*"
1935
+ }
1936
+ },
1937
+ "node_modules/is-absolute": {
1938
+ "version": "1.0.0",
1939
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
1940
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
1941
+ "dev": true,
1942
+ "dependencies": {
1943
+ "is-relative": "^1.0.0",
1944
+ "is-windows": "^1.0.1"
1945
+ },
1946
+ "engines": {
1947
+ "node": ">=0.10.0"
1948
+ }
1949
+ },
1950
+ "node_modules/is-accessor-descriptor": {
1951
+ "version": "1.0.0",
1952
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
1953
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
1954
+ "dev": true,
1955
+ "dependencies": {
1956
+ "kind-of": "^6.0.0"
1957
+ },
1958
+ "engines": {
1959
+ "node": ">=0.10.0"
1960
+ }
1961
+ },
1962
+ "node_modules/is-accessor-descriptor/node_modules/kind-of": {
1963
+ "version": "6.0.3",
1964
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
1965
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
1966
+ "dev": true,
1967
+ "engines": {
1968
+ "node": ">=0.10.0"
1969
+ }
1970
+ },
1971
+ "node_modules/is-arrayish": {
1972
+ "version": "0.2.1",
1973
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
1974
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
1975
+ "dev": true
1976
+ },
1977
+ "node_modules/is-binary-path": {
1978
+ "version": "1.0.1",
1979
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
1980
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
1981
+ "dev": true,
1982
+ "dependencies": {
1983
+ "binary-extensions": "^1.0.0"
1984
+ },
1985
+ "engines": {
1986
+ "node": ">=0.10.0"
1987
+ }
1988
+ },
1989
+ "node_modules/is-buffer": {
1990
+ "version": "1.1.6",
1991
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
1992
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
1993
+ "dev": true
1994
+ },
1995
+ "node_modules/is-core-module": {
1996
+ "version": "2.8.0",
1997
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
1998
+ "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
1999
+ "dev": true,
2000
+ "dependencies": {
2001
+ "has": "^1.0.3"
2002
+ },
2003
+ "funding": {
2004
+ "url": "https://github.com/sponsors/ljharb"
2005
+ }
2006
+ },
2007
+ "node_modules/is-data-descriptor": {
2008
+ "version": "1.0.0",
2009
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
2010
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
2011
+ "dev": true,
2012
+ "dependencies": {
2013
+ "kind-of": "^6.0.0"
2014
+ },
2015
+ "engines": {
2016
+ "node": ">=0.10.0"
2017
+ }
2018
+ },
2019
+ "node_modules/is-data-descriptor/node_modules/kind-of": {
2020
+ "version": "6.0.3",
2021
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2022
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2023
+ "dev": true,
2024
+ "engines": {
2025
+ "node": ">=0.10.0"
2026
+ }
2027
+ },
2028
+ "node_modules/is-descriptor": {
2029
+ "version": "1.0.2",
2030
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
2031
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
2032
+ "dev": true,
2033
+ "dependencies": {
2034
+ "is-accessor-descriptor": "^1.0.0",
2035
+ "is-data-descriptor": "^1.0.0",
2036
+ "kind-of": "^6.0.2"
2037
+ },
2038
+ "engines": {
2039
+ "node": ">=0.10.0"
2040
+ }
2041
+ },
2042
+ "node_modules/is-descriptor/node_modules/kind-of": {
2043
+ "version": "6.0.3",
2044
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2045
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2046
+ "dev": true,
2047
+ "engines": {
2048
+ "node": ">=0.10.0"
2049
+ }
2050
+ },
2051
+ "node_modules/is-docker": {
2052
+ "version": "2.2.1",
2053
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
2054
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
2055
+ "dev": true,
2056
+ "bin": {
2057
+ "is-docker": "cli.js"
2058
+ },
2059
+ "engines": {
2060
+ "node": ">=8"
2061
+ },
2062
+ "funding": {
2063
+ "url": "https://github.com/sponsors/sindresorhus"
2064
+ }
2065
+ },
2066
+ "node_modules/is-extendable": {
2067
+ "version": "0.1.1",
2068
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
2069
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
2070
+ "dev": true,
2071
+ "engines": {
2072
+ "node": ">=0.10.0"
2073
+ }
2074
+ },
2075
+ "node_modules/is-extglob": {
2076
+ "version": "2.1.1",
2077
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
2078
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
2079
+ "dev": true,
2080
+ "engines": {
2081
+ "node": ">=0.10.0"
2082
+ }
2083
+ },
2084
+ "node_modules/is-fullwidth-code-point": {
2085
+ "version": "1.0.0",
2086
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
2087
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
2088
+ "dev": true,
2089
+ "dependencies": {
2090
+ "number-is-nan": "^1.0.0"
2091
+ },
2092
+ "engines": {
2093
+ "node": ">=0.10.0"
2094
+ }
2095
+ },
2096
+ "node_modules/is-glob": {
2097
+ "version": "4.0.3",
2098
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
2099
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
2100
+ "dev": true,
2101
+ "dependencies": {
2102
+ "is-extglob": "^2.1.1"
2103
+ },
2104
+ "engines": {
2105
+ "node": ">=0.10.0"
2106
+ }
2107
+ },
2108
+ "node_modules/is-negated-glob": {
2109
+ "version": "1.0.0",
2110
+ "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
2111
+ "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
2112
+ "dev": true,
2113
+ "engines": {
2114
+ "node": ">=0.10.0"
2115
+ }
2116
+ },
2117
+ "node_modules/is-number": {
2118
+ "version": "3.0.0",
2119
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
2120
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
2121
+ "dev": true,
2122
+ "dependencies": {
2123
+ "kind-of": "^3.0.2"
2124
+ },
2125
+ "engines": {
2126
+ "node": ">=0.10.0"
2127
+ }
2128
+ },
2129
+ "node_modules/is-number/node_modules/kind-of": {
2130
+ "version": "3.2.2",
2131
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2132
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2133
+ "dev": true,
2134
+ "dependencies": {
2135
+ "is-buffer": "^1.1.5"
2136
+ },
2137
+ "engines": {
2138
+ "node": ">=0.10.0"
2139
+ }
2140
+ },
2141
+ "node_modules/is-plain-object": {
2142
+ "version": "5.0.0",
2143
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
2144
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
2145
+ "dev": true,
2146
+ "engines": {
2147
+ "node": ">=0.10.0"
2148
+ }
2149
+ },
2150
+ "node_modules/is-relative": {
2151
+ "version": "1.0.0",
2152
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
2153
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
2154
+ "dev": true,
2155
+ "dependencies": {
2156
+ "is-unc-path": "^1.0.0"
2157
+ },
2158
+ "engines": {
2159
+ "node": ">=0.10.0"
2160
+ }
2161
+ },
2162
+ "node_modules/is-unc-path": {
2163
+ "version": "1.0.0",
2164
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
2165
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
2166
+ "dev": true,
2167
+ "dependencies": {
2168
+ "unc-path-regex": "^0.1.2"
2169
+ },
2170
+ "engines": {
2171
+ "node": ">=0.10.0"
2172
+ }
2173
+ },
2174
+ "node_modules/is-utf8": {
2175
+ "version": "0.2.1",
2176
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
2177
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
2178
+ "dev": true
2179
+ },
2180
+ "node_modules/is-valid-glob": {
2181
+ "version": "1.0.0",
2182
+ "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
2183
+ "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
2184
+ "dev": true,
2185
+ "engines": {
2186
+ "node": ">=0.10.0"
2187
+ }
2188
+ },
2189
+ "node_modules/is-windows": {
2190
+ "version": "1.0.2",
2191
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
2192
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
2193
+ "dev": true,
2194
+ "engines": {
2195
+ "node": ">=0.10.0"
2196
+ }
2197
+ },
2198
+ "node_modules/is-wsl": {
2199
+ "version": "2.2.0",
2200
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
2201
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
2202
+ "dev": true,
2203
+ "dependencies": {
2204
+ "is-docker": "^2.0.0"
2205
+ },
2206
+ "engines": {
2207
+ "node": ">=8"
2208
+ }
2209
+ },
2210
+ "node_modules/isarray": {
2211
+ "version": "1.0.0",
2212
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
2213
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
2214
+ "dev": true
2215
+ },
2216
+ "node_modules/isexe": {
2217
+ "version": "2.0.0",
2218
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
2219
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
2220
+ "dev": true
2221
+ },
2222
+ "node_modules/isobject": {
2223
+ "version": "3.0.1",
2224
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
2225
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
2226
+ "dev": true,
2227
+ "engines": {
2228
+ "node": ">=0.10.0"
2229
+ }
2230
+ },
2231
+ "node_modules/json-stable-stringify-without-jsonify": {
2232
+ "version": "1.0.1",
2233
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
2234
+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
2235
+ "dev": true
2236
+ },
2237
+ "node_modules/just-debounce": {
2238
+ "version": "1.1.0",
2239
+ "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz",
2240
+ "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==",
2241
+ "dev": true
2242
+ },
2243
+ "node_modules/kind-of": {
2244
+ "version": "5.1.0",
2245
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
2246
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
2247
+ "dev": true,
2248
+ "engines": {
2249
+ "node": ">=0.10.0"
2250
+ }
2251
+ },
2252
+ "node_modules/last-run": {
2253
+ "version": "1.1.1",
2254
+ "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
2255
+ "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
2256
+ "dev": true,
2257
+ "dependencies": {
2258
+ "default-resolution": "^2.0.0",
2259
+ "es6-weak-map": "^2.0.1"
2260
+ },
2261
+ "engines": {
2262
+ "node": ">= 0.10"
2263
+ }
2264
+ },
2265
+ "node_modules/lazystream": {
2266
+ "version": "1.0.1",
2267
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
2268
+ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",
2269
+ "dev": true,
2270
+ "dependencies": {
2271
+ "readable-stream": "^2.0.5"
2272
+ },
2273
+ "engines": {
2274
+ "node": ">= 0.6.3"
2275
+ }
2276
+ },
2277
+ "node_modules/lcid": {
2278
+ "version": "1.0.0",
2279
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
2280
+ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
2281
+ "dev": true,
2282
+ "dependencies": {
2283
+ "invert-kv": "^1.0.0"
2284
+ },
2285
+ "engines": {
2286
+ "node": ">=0.10.0"
2287
+ }
2288
+ },
2289
+ "node_modules/lead": {
2290
+ "version": "1.0.0",
2291
+ "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
2292
+ "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
2293
+ "dev": true,
2294
+ "dependencies": {
2295
+ "flush-write-stream": "^1.0.2"
2296
+ },
2297
+ "engines": {
2298
+ "node": ">= 0.10"
2299
+ }
2300
+ },
2301
+ "node_modules/liftoff": {
2302
+ "version": "3.1.0",
2303
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
2304
+ "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
2305
+ "dev": true,
2306
+ "dependencies": {
2307
+ "extend": "^3.0.0",
2308
+ "findup-sync": "^3.0.0",
2309
+ "fined": "^1.0.1",
2310
+ "flagged-respawn": "^1.0.0",
2311
+ "is-plain-object": "^2.0.4",
2312
+ "object.map": "^1.0.0",
2313
+ "rechoir": "^0.6.2",
2314
+ "resolve": "^1.1.7"
2315
+ },
2316
+ "engines": {
2317
+ "node": ">= 0.8"
2318
+ }
2319
+ },
2320
+ "node_modules/liftoff/node_modules/is-plain-object": {
2321
+ "version": "2.0.4",
2322
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2323
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2324
+ "dev": true,
2325
+ "dependencies": {
2326
+ "isobject": "^3.0.1"
2327
+ },
2328
+ "engines": {
2329
+ "node": ">=0.10.0"
2330
+ }
2331
+ },
2332
+ "node_modules/load-json-file": {
2333
+ "version": "1.1.0",
2334
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
2335
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
2336
+ "dev": true,
2337
+ "dependencies": {
2338
+ "graceful-fs": "^4.1.2",
2339
+ "parse-json": "^2.2.0",
2340
+ "pify": "^2.0.0",
2341
+ "pinkie-promise": "^2.0.0",
2342
+ "strip-bom": "^2.0.0"
2343
+ },
2344
+ "engines": {
2345
+ "node": ">=0.10.0"
2346
+ }
2347
+ },
2348
+ "node_modules/lodash._basecopy": {
2349
+ "version": "3.0.1",
2350
+ "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
2351
+ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
2352
+ "dev": true
2353
+ },
2354
+ "node_modules/lodash._basetostring": {
2355
+ "version": "3.0.1",
2356
+ "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
2357
+ "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
2358
+ "dev": true
2359
+ },
2360
+ "node_modules/lodash._basevalues": {
2361
+ "version": "3.0.0",
2362
+ "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
2363
+ "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
2364
+ "dev": true
2365
+ },
2366
+ "node_modules/lodash._getnative": {
2367
+ "version": "3.9.1",
2368
+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
2369
+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
2370
+ "dev": true
2371
+ },
2372
+ "node_modules/lodash._isiterateecall": {
2373
+ "version": "3.0.9",
2374
+ "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
2375
+ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
2376
+ "dev": true
2377
+ },
2378
+ "node_modules/lodash._reescape": {
2379
+ "version": "3.0.0",
2380
+ "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
2381
+ "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
2382
+ "dev": true
2383
+ },
2384
+ "node_modules/lodash._reevaluate": {
2385
+ "version": "3.0.0",
2386
+ "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
2387
+ "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
2388
+ "dev": true
2389
+ },
2390
+ "node_modules/lodash._reinterpolate": {
2391
+ "version": "3.0.0",
2392
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
2393
+ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
2394
+ "dev": true
2395
+ },
2396
+ "node_modules/lodash._root": {
2397
+ "version": "3.0.1",
2398
+ "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
2399
+ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
2400
+ "dev": true
2401
+ },
2402
+ "node_modules/lodash.escape": {
2403
+ "version": "3.2.0",
2404
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
2405
+ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
2406
+ "dev": true,
2407
+ "dependencies": {
2408
+ "lodash._root": "^3.0.0"
2409
+ }
2410
+ },
2411
+ "node_modules/lodash.isarguments": {
2412
+ "version": "3.1.0",
2413
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
2414
+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
2415
+ "dev": true
2416
+ },
2417
+ "node_modules/lodash.isarray": {
2418
+ "version": "3.0.4",
2419
+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
2420
+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
2421
+ "dev": true
2422
+ },
2423
+ "node_modules/lodash.keys": {
2424
+ "version": "3.1.2",
2425
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
2426
+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
2427
+ "dev": true,
2428
+ "dependencies": {
2429
+ "lodash._getnative": "^3.0.0",
2430
+ "lodash.isarguments": "^3.0.0",
2431
+ "lodash.isarray": "^3.0.0"
2432
+ }
2433
+ },
2434
+ "node_modules/lodash.restparam": {
2435
+ "version": "3.6.1",
2436
+ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
2437
+ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
2438
+ "dev": true
2439
+ },
2440
+ "node_modules/lodash.template": {
2441
+ "version": "4.5.0",
2442
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz",
2443
+ "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
2444
+ "dev": true,
2445
+ "dependencies": {
2446
+ "lodash._reinterpolate": "^3.0.0",
2447
+ "lodash.templatesettings": "^4.0.0"
2448
+ }
2449
+ },
2450
+ "node_modules/lodash.templatesettings": {
2451
+ "version": "4.2.0",
2452
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz",
2453
+ "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==",
2454
+ "dev": true,
2455
+ "dependencies": {
2456
+ "lodash._reinterpolate": "^3.0.0"
2457
+ }
2458
+ },
2459
+ "node_modules/lru-cache": {
2460
+ "version": "6.0.0",
2461
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
2462
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
2463
+ "dev": true,
2464
+ "dependencies": {
2465
+ "yallist": "^4.0.0"
2466
+ },
2467
+ "engines": {
2468
+ "node": ">=10"
2469
+ }
2470
+ },
2471
+ "node_modules/make-iterator": {
2472
+ "version": "1.0.1",
2473
+ "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
2474
+ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
2475
+ "dev": true,
2476
+ "dependencies": {
2477
+ "kind-of": "^6.0.2"
2478
+ },
2479
+ "engines": {
2480
+ "node": ">=0.10.0"
2481
+ }
2482
+ },
2483
+ "node_modules/make-iterator/node_modules/kind-of": {
2484
+ "version": "6.0.3",
2485
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2486
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2487
+ "dev": true,
2488
+ "engines": {
2489
+ "node": ">=0.10.0"
2490
+ }
2491
+ },
2492
+ "node_modules/map-cache": {
2493
+ "version": "0.2.2",
2494
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
2495
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
2496
+ "dev": true,
2497
+ "engines": {
2498
+ "node": ">=0.10.0"
2499
+ }
2500
+ },
2501
+ "node_modules/map-visit": {
2502
+ "version": "1.0.0",
2503
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
2504
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
2505
+ "dev": true,
2506
+ "dependencies": {
2507
+ "object-visit": "^1.0.0"
2508
+ },
2509
+ "engines": {
2510
+ "node": ">=0.10.0"
2511
+ }
2512
+ },
2513
+ "node_modules/matchdep": {
2514
+ "version": "2.0.0",
2515
+ "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
2516
+ "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
2517
+ "dev": true,
2518
+ "dependencies": {
2519
+ "findup-sync": "^2.0.0",
2520
+ "micromatch": "^3.0.4",
2521
+ "resolve": "^1.4.0",
2522
+ "stack-trace": "0.0.10"
2523
+ },
2524
+ "engines": {
2525
+ "node": ">= 0.10.0"
2526
+ }
2527
+ },
2528
+ "node_modules/matchdep/node_modules/findup-sync": {
2529
+ "version": "2.0.0",
2530
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
2531
+ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
2532
+ "dev": true,
2533
+ "dependencies": {
2534
+ "detect-file": "^1.0.0",
2535
+ "is-glob": "^3.1.0",
2536
+ "micromatch": "^3.0.4",
2537
+ "resolve-dir": "^1.0.1"
2538
+ },
2539
+ "engines": {
2540
+ "node": ">= 0.10"
2541
+ }
2542
+ },
2543
+ "node_modules/matchdep/node_modules/is-glob": {
2544
+ "version": "3.1.0",
2545
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
2546
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
2547
+ "dev": true,
2548
+ "dependencies": {
2549
+ "is-extglob": "^2.1.0"
2550
+ },
2551
+ "engines": {
2552
+ "node": ">=0.10.0"
2553
+ }
2554
+ },
2555
+ "node_modules/matched": {
2556
+ "version": "5.0.1",
2557
+ "resolved": "https://registry.npmjs.org/matched/-/matched-5.0.1.tgz",
2558
+ "integrity": "sha512-E1fhSTPRyhAlNaNvGXAgZQlq1hL0bgYMTk/6bktVlIhzUnX/SZs7296ACdVeNJE8xFNGSuvd9IpI7vSnmcqLvw==",
2559
+ "dev": true,
2560
+ "dependencies": {
2561
+ "glob": "^7.1.6",
2562
+ "picomatch": "^2.2.1"
2563
+ },
2564
+ "engines": {
2565
+ "node": ">=10"
2566
+ },
2567
+ "funding": {
2568
+ "url": "https://github.com/sponsors/jonschlinkert"
2569
+ }
2570
+ },
2571
+ "node_modules/micromatch": {
2572
+ "version": "3.1.10",
2573
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
2574
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
2575
+ "dev": true,
2576
+ "dependencies": {
2577
+ "arr-diff": "^4.0.0",
2578
+ "array-unique": "^0.3.2",
2579
+ "braces": "^2.3.1",
2580
+ "define-property": "^2.0.2",
2581
+ "extend-shallow": "^3.0.2",
2582
+ "extglob": "^2.0.4",
2583
+ "fragment-cache": "^0.2.1",
2584
+ "kind-of": "^6.0.2",
2585
+ "nanomatch": "^1.2.9",
2586
+ "object.pick": "^1.3.0",
2587
+ "regex-not": "^1.0.0",
2588
+ "snapdragon": "^0.8.1",
2589
+ "to-regex": "^3.0.2"
2590
+ },
2591
+ "engines": {
2592
+ "node": ">=0.10.0"
2593
+ }
2594
+ },
2595
+ "node_modules/micromatch/node_modules/extend-shallow": {
2596
+ "version": "3.0.2",
2597
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
2598
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
2599
+ "dev": true,
2600
+ "dependencies": {
2601
+ "assign-symbols": "^1.0.0",
2602
+ "is-extendable": "^1.0.1"
2603
+ },
2604
+ "engines": {
2605
+ "node": ">=0.10.0"
2606
+ }
2607
+ },
2608
+ "node_modules/micromatch/node_modules/is-extendable": {
2609
+ "version": "1.0.1",
2610
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2611
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2612
+ "dev": true,
2613
+ "dependencies": {
2614
+ "is-plain-object": "^2.0.4"
2615
+ },
2616
+ "engines": {
2617
+ "node": ">=0.10.0"
2618
+ }
2619
+ },
2620
+ "node_modules/micromatch/node_modules/is-plain-object": {
2621
+ "version": "2.0.4",
2622
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2623
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2624
+ "dev": true,
2625
+ "dependencies": {
2626
+ "isobject": "^3.0.1"
2627
+ },
2628
+ "engines": {
2629
+ "node": ">=0.10.0"
2630
+ }
2631
+ },
2632
+ "node_modules/micromatch/node_modules/kind-of": {
2633
+ "version": "6.0.3",
2634
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2635
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2636
+ "dev": true,
2637
+ "engines": {
2638
+ "node": ">=0.10.0"
2639
+ }
2640
+ },
2641
+ "node_modules/minimatch": {
2642
+ "version": "3.0.4",
2643
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
2644
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
2645
+ "dev": true,
2646
+ "dependencies": {
2647
+ "brace-expansion": "^1.1.7"
2648
+ },
2649
+ "engines": {
2650
+ "node": "*"
2651
+ }
2652
+ },
2653
+ "node_modules/minimist": {
2654
+ "version": "1.2.5",
2655
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
2656
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
2657
+ "dev": true
2658
+ },
2659
+ "node_modules/mixin-deep": {
2660
+ "version": "1.3.2",
2661
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
2662
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
2663
+ "dev": true,
2664
+ "dependencies": {
2665
+ "for-in": "^1.0.2",
2666
+ "is-extendable": "^1.0.1"
2667
+ },
2668
+ "engines": {
2669
+ "node": ">=0.10.0"
2670
+ }
2671
+ },
2672
+ "node_modules/mixin-deep/node_modules/is-extendable": {
2673
+ "version": "1.0.1",
2674
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2675
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2676
+ "dev": true,
2677
+ "dependencies": {
2678
+ "is-plain-object": "^2.0.4"
2679
+ },
2680
+ "engines": {
2681
+ "node": ">=0.10.0"
2682
+ }
2683
+ },
2684
+ "node_modules/mixin-deep/node_modules/is-plain-object": {
2685
+ "version": "2.0.4",
2686
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2687
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2688
+ "dev": true,
2689
+ "dependencies": {
2690
+ "isobject": "^3.0.1"
2691
+ },
2692
+ "engines": {
2693
+ "node": ">=0.10.0"
2694
+ }
2695
+ },
2696
+ "node_modules/ms": {
2697
+ "version": "2.0.0",
2698
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2699
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
2700
+ "dev": true
2701
+ },
2702
+ "node_modules/multipipe": {
2703
+ "version": "0.1.2",
2704
+ "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
2705
+ "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
2706
+ "dev": true,
2707
+ "dependencies": {
2708
+ "duplexer2": "0.0.2"
2709
+ }
2710
+ },
2711
+ "node_modules/mute-stdout": {
2712
+ "version": "1.0.1",
2713
+ "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
2714
+ "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==",
2715
+ "dev": true,
2716
+ "engines": {
2717
+ "node": ">= 0.10"
2718
+ }
2719
+ },
2720
+ "node_modules/nan": {
2721
+ "version": "2.15.0",
2722
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
2723
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
2724
+ "dev": true,
2725
+ "optional": true
2726
+ },
2727
+ "node_modules/nanomatch": {
2728
+ "version": "1.2.13",
2729
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
2730
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
2731
+ "dev": true,
2732
+ "dependencies": {
2733
+ "arr-diff": "^4.0.0",
2734
+ "array-unique": "^0.3.2",
2735
+ "define-property": "^2.0.2",
2736
+ "extend-shallow": "^3.0.2",
2737
+ "fragment-cache": "^0.2.1",
2738
+ "is-windows": "^1.0.2",
2739
+ "kind-of": "^6.0.2",
2740
+ "object.pick": "^1.3.0",
2741
+ "regex-not": "^1.0.0",
2742
+ "snapdragon": "^0.8.1",
2743
+ "to-regex": "^3.0.1"
2744
+ },
2745
+ "engines": {
2746
+ "node": ">=0.10.0"
2747
+ }
2748
+ },
2749
+ "node_modules/nanomatch/node_modules/extend-shallow": {
2750
+ "version": "3.0.2",
2751
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
2752
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
2753
+ "dev": true,
2754
+ "dependencies": {
2755
+ "assign-symbols": "^1.0.0",
2756
+ "is-extendable": "^1.0.1"
2757
+ },
2758
+ "engines": {
2759
+ "node": ">=0.10.0"
2760
+ }
2761
+ },
2762
+ "node_modules/nanomatch/node_modules/is-extendable": {
2763
+ "version": "1.0.1",
2764
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2765
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2766
+ "dev": true,
2767
+ "dependencies": {
2768
+ "is-plain-object": "^2.0.4"
2769
+ },
2770
+ "engines": {
2771
+ "node": ">=0.10.0"
2772
+ }
2773
+ },
2774
+ "node_modules/nanomatch/node_modules/is-plain-object": {
2775
+ "version": "2.0.4",
2776
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2777
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2778
+ "dev": true,
2779
+ "dependencies": {
2780
+ "isobject": "^3.0.1"
2781
+ },
2782
+ "engines": {
2783
+ "node": ">=0.10.0"
2784
+ }
2785
+ },
2786
+ "node_modules/nanomatch/node_modules/kind-of": {
2787
+ "version": "6.0.3",
2788
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2789
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2790
+ "dev": true,
2791
+ "engines": {
2792
+ "node": ">=0.10.0"
2793
+ }
2794
+ },
2795
+ "node_modules/next-tick": {
2796
+ "version": "1.0.0",
2797
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
2798
+ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
2799
+ "dev": true
2800
+ },
2801
+ "node_modules/node-notifier": {
2802
+ "version": "9.0.1",
2803
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-9.0.1.tgz",
2804
+ "integrity": "sha512-fPNFIp2hF/Dq7qLDzSg4vZ0J4e9v60gJR+Qx7RbjbWqzPDdEqeVpEx5CFeDAELIl+A/woaaNn1fQ5nEVerMxJg==",
2805
+ "dev": true,
2806
+ "dependencies": {
2807
+ "growly": "^1.3.0",
2808
+ "is-wsl": "^2.2.0",
2809
+ "semver": "^7.3.2",
2810
+ "shellwords": "^0.1.1",
2811
+ "uuid": "^8.3.0",
2812
+ "which": "^2.0.2"
2813
+ }
2814
+ },
2815
+ "node_modules/node.extend": {
2816
+ "version": "2.0.2",
2817
+ "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz",
2818
+ "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==",
2819
+ "dev": true,
2820
+ "dependencies": {
2821
+ "has": "^1.0.3",
2822
+ "is": "^3.2.1"
2823
+ },
2824
+ "engines": {
2825
+ "node": ">=0.4.0"
2826
+ }
2827
+ },
2828
+ "node_modules/normalize-package-data": {
2829
+ "version": "2.5.0",
2830
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
2831
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
2832
+ "dev": true,
2833
+ "dependencies": {
2834
+ "hosted-git-info": "^2.1.4",
2835
+ "resolve": "^1.10.0",
2836
+ "semver": "2 || 3 || 4 || 5",
2837
+ "validate-npm-package-license": "^3.0.1"
2838
+ }
2839
+ },
2840
+ "node_modules/normalize-package-data/node_modules/semver": {
2841
+ "version": "5.7.1",
2842
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
2843
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
2844
+ "dev": true,
2845
+ "bin": {
2846
+ "semver": "bin/semver"
2847
+ }
2848
+ },
2849
+ "node_modules/normalize-path": {
2850
+ "version": "3.0.0",
2851
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
2852
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
2853
+ "dev": true,
2854
+ "engines": {
2855
+ "node": ">=0.10.0"
2856
+ }
2857
+ },
2858
+ "node_modules/now-and-later": {
2859
+ "version": "2.0.1",
2860
+ "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
2861
+ "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
2862
+ "dev": true,
2863
+ "dependencies": {
2864
+ "once": "^1.3.2"
2865
+ },
2866
+ "engines": {
2867
+ "node": ">= 0.10"
2868
+ }
2869
+ },
2870
+ "node_modules/number-is-nan": {
2871
+ "version": "1.0.1",
2872
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
2873
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
2874
+ "dev": true,
2875
+ "engines": {
2876
+ "node": ">=0.10.0"
2877
+ }
2878
+ },
2879
+ "node_modules/object-assign": {
2880
+ "version": "3.0.0",
2881
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
2882
+ "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
2883
+ "dev": true,
2884
+ "engines": {
2885
+ "node": ">=0.10.0"
2886
+ }
2887
+ },
2888
+ "node_modules/object-copy": {
2889
+ "version": "0.1.0",
2890
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
2891
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
2892
+ "dev": true,
2893
+ "dependencies": {
2894
+ "copy-descriptor": "^0.1.0",
2895
+ "define-property": "^0.2.5",
2896
+ "kind-of": "^3.0.3"
2897
+ },
2898
+ "engines": {
2899
+ "node": ">=0.10.0"
2900
+ }
2901
+ },
2902
+ "node_modules/object-copy/node_modules/define-property": {
2903
+ "version": "0.2.5",
2904
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2905
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2906
+ "dev": true,
2907
+ "dependencies": {
2908
+ "is-descriptor": "^0.1.0"
2909
+ },
2910
+ "engines": {
2911
+ "node": ">=0.10.0"
2912
+ }
2913
+ },
2914
+ "node_modules/object-copy/node_modules/is-accessor-descriptor": {
2915
+ "version": "0.1.6",
2916
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
2917
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
2918
+ "dev": true,
2919
+ "dependencies": {
2920
+ "kind-of": "^3.0.2"
2921
+ },
2922
+ "engines": {
2923
+ "node": ">=0.10.0"
2924
+ }
2925
+ },
2926
+ "node_modules/object-copy/node_modules/is-data-descriptor": {
2927
+ "version": "0.1.4",
2928
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
2929
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
2930
+ "dev": true,
2931
+ "dependencies": {
2932
+ "kind-of": "^3.0.2"
2933
+ },
2934
+ "engines": {
2935
+ "node": ">=0.10.0"
2936
+ }
2937
+ },
2938
+ "node_modules/object-copy/node_modules/is-descriptor": {
2939
+ "version": "0.1.6",
2940
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
2941
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
2942
+ "dev": true,
2943
+ "dependencies": {
2944
+ "is-accessor-descriptor": "^0.1.6",
2945
+ "is-data-descriptor": "^0.1.4",
2946
+ "kind-of": "^5.0.0"
2947
+ },
2948
+ "engines": {
2949
+ "node": ">=0.10.0"
2950
+ }
2951
+ },
2952
+ "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": {
2953
+ "version": "5.1.0",
2954
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
2955
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
2956
+ "dev": true,
2957
+ "engines": {
2958
+ "node": ">=0.10.0"
2959
+ }
2960
+ },
2961
+ "node_modules/object-copy/node_modules/kind-of": {
2962
+ "version": "3.2.2",
2963
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2964
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2965
+ "dev": true,
2966
+ "dependencies": {
2967
+ "is-buffer": "^1.1.5"
2968
+ },
2969
+ "engines": {
2970
+ "node": ">=0.10.0"
2971
+ }
2972
+ },
2973
+ "node_modules/object-keys": {
2974
+ "version": "1.1.1",
2975
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
2976
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
2977
+ "dev": true,
2978
+ "engines": {
2979
+ "node": ">= 0.4"
2980
+ }
2981
+ },
2982
+ "node_modules/object-visit": {
2983
+ "version": "1.0.1",
2984
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
2985
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
2986
+ "dev": true,
2987
+ "dependencies": {
2988
+ "isobject": "^3.0.0"
2989
+ },
2990
+ "engines": {
2991
+ "node": ">=0.10.0"
2992
+ }
2993
+ },
2994
+ "node_modules/object.assign": {
2995
+ "version": "4.1.2",
2996
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
2997
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
2998
+ "dev": true,
2999
+ "dependencies": {
3000
+ "call-bind": "^1.0.0",
3001
+ "define-properties": "^1.1.3",
3002
+ "has-symbols": "^1.0.1",
3003
+ "object-keys": "^1.1.1"
3004
+ },
3005
+ "engines": {
3006
+ "node": ">= 0.4"
3007
+ },
3008
+ "funding": {
3009
+ "url": "https://github.com/sponsors/ljharb"
3010
+ }
3011
+ },
3012
+ "node_modules/object.defaults": {
3013
+ "version": "1.1.0",
3014
+ "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
3015
+ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
3016
+ "dev": true,
3017
+ "dependencies": {
3018
+ "array-each": "^1.0.1",
3019
+ "array-slice": "^1.0.0",
3020
+ "for-own": "^1.0.0",
3021
+ "isobject": "^3.0.0"
3022
+ },
3023
+ "engines": {
3024
+ "node": ">=0.10.0"
3025
+ }
3026
+ },
3027
+ "node_modules/object.map": {
3028
+ "version": "1.0.1",
3029
+ "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
3030
+ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
3031
+ "dev": true,
3032
+ "dependencies": {
3033
+ "for-own": "^1.0.0",
3034
+ "make-iterator": "^1.0.0"
3035
+ },
3036
+ "engines": {
3037
+ "node": ">=0.10.0"
3038
+ }
3039
+ },
3040
+ "node_modules/object.pick": {
3041
+ "version": "1.3.0",
3042
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
3043
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
3044
+ "dev": true,
3045
+ "dependencies": {
3046
+ "isobject": "^3.0.1"
3047
+ },
3048
+ "engines": {
3049
+ "node": ">=0.10.0"
3050
+ }
3051
+ },
3052
+ "node_modules/object.reduce": {
3053
+ "version": "1.0.1",
3054
+ "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
3055
+ "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
3056
+ "dev": true,
3057
+ "dependencies": {
3058
+ "for-own": "^1.0.0",
3059
+ "make-iterator": "^1.0.0"
3060
+ },
3061
+ "engines": {
3062
+ "node": ">=0.10.0"
3063
+ }
3064
+ },
3065
+ "node_modules/once": {
3066
+ "version": "1.4.0",
3067
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
3068
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
3069
+ "dev": true,
3070
+ "dependencies": {
3071
+ "wrappy": "1"
3072
+ }
3073
+ },
3074
+ "node_modules/ordered-read-streams": {
3075
+ "version": "1.0.1",
3076
+ "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
3077
+ "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
3078
+ "dev": true,
3079
+ "dependencies": {
3080
+ "readable-stream": "^2.0.1"
3081
+ }
3082
+ },
3083
+ "node_modules/os-locale": {
3084
+ "version": "1.4.0",
3085
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
3086
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
3087
+ "dev": true,
3088
+ "dependencies": {
3089
+ "lcid": "^1.0.0"
3090
+ },
3091
+ "engines": {
3092
+ "node": ">=0.10.0"
3093
+ }
3094
+ },
3095
+ "node_modules/parse-filepath": {
3096
+ "version": "1.0.2",
3097
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
3098
+ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
3099
+ "dev": true,
3100
+ "dependencies": {
3101
+ "is-absolute": "^1.0.0",
3102
+ "map-cache": "^0.2.0",
3103
+ "path-root": "^0.1.1"
3104
+ },
3105
+ "engines": {
3106
+ "node": ">=0.8"
3107
+ }
3108
+ },
3109
+ "node_modules/parse-json": {
3110
+ "version": "2.2.0",
3111
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
3112
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
3113
+ "dev": true,
3114
+ "dependencies": {
3115
+ "error-ex": "^1.2.0"
3116
+ },
3117
+ "engines": {
3118
+ "node": ">=0.10.0"
3119
+ }
3120
+ },
3121
+ "node_modules/parse-node-version": {
3122
+ "version": "1.0.1",
3123
+ "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
3124
+ "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
3125
+ "dev": true,
3126
+ "engines": {
3127
+ "node": ">= 0.10"
3128
+ }
3129
+ },
3130
+ "node_modules/parse-passwd": {
3131
+ "version": "1.0.0",
3132
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
3133
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
3134
+ "dev": true,
3135
+ "engines": {
3136
+ "node": ">=0.10.0"
3137
+ }
3138
+ },
3139
+ "node_modules/pascalcase": {
3140
+ "version": "0.1.1",
3141
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
3142
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
3143
+ "dev": true,
3144
+ "engines": {
3145
+ "node": ">=0.10.0"
3146
+ }
3147
+ },
3148
+ "node_modules/path-dirname": {
3149
+ "version": "1.0.2",
3150
+ "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
3151
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
3152
+ "dev": true
3153
+ },
3154
+ "node_modules/path-exists": {
3155
+ "version": "2.1.0",
3156
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
3157
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
3158
+ "dev": true,
3159
+ "dependencies": {
3160
+ "pinkie-promise": "^2.0.0"
3161
+ },
3162
+ "engines": {
3163
+ "node": ">=0.10.0"
3164
+ }
3165
+ },
3166
+ "node_modules/path-is-absolute": {
3167
+ "version": "1.0.1",
3168
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
3169
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
3170
+ "dev": true,
3171
+ "engines": {
3172
+ "node": ">=0.10.0"
3173
+ }
3174
+ },
3175
+ "node_modules/path-parse": {
3176
+ "version": "1.0.7",
3177
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
3178
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
3179
+ "dev": true
3180
+ },
3181
+ "node_modules/path-root": {
3182
+ "version": "0.1.1",
3183
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
3184
+ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
3185
+ "dev": true,
3186
+ "dependencies": {
3187
+ "path-root-regex": "^0.1.0"
3188
+ },
3189
+ "engines": {
3190
+ "node": ">=0.10.0"
3191
+ }
3192
+ },
3193
+ "node_modules/path-root-regex": {
3194
+ "version": "0.1.2",
3195
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
3196
+ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
3197
+ "dev": true,
3198
+ "engines": {
3199
+ "node": ">=0.10.0"
3200
+ }
3201
+ },
3202
+ "node_modules/path-sort": {
3203
+ "version": "0.1.0",
3204
+ "resolved": "https://registry.npmjs.org/path-sort/-/path-sort-0.1.0.tgz",
3205
+ "integrity": "sha1-ywF11Oy/paGP5nTMbXIL/hXguAU=",
3206
+ "dev": true
3207
+ },
3208
+ "node_modules/path-type": {
3209
+ "version": "1.1.0",
3210
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
3211
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
3212
+ "dev": true,
3213
+ "dependencies": {
3214
+ "graceful-fs": "^4.1.2",
3215
+ "pify": "^2.0.0",
3216
+ "pinkie-promise": "^2.0.0"
3217
+ },
3218
+ "engines": {
3219
+ "node": ">=0.10.0"
3220
+ }
3221
+ },
3222
+ "node_modules/php-parser": {
3223
+ "version": "3.0.3",
3224
+ "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.0.3.tgz",
3225
+ "integrity": "sha512-WjbrtYrwmLY9hpoKoq1+mVqJhT0dEVDZRWSpNIw2MpTw3VM/K4C6e0WR4KlU6G/XROkV7tpH4NesV2dDiPxqaw==",
3226
+ "dev": true
3227
+ },
3228
+ "node_modules/picomatch": {
3229
+ "version": "2.3.0",
3230
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
3231
+ "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
3232
+ "dev": true,
3233
+ "engines": {
3234
+ "node": ">=8.6"
3235
+ },
3236
+ "funding": {
3237
+ "url": "https://github.com/sponsors/jonschlinkert"
3238
+ }
3239
+ },
3240
+ "node_modules/pify": {
3241
+ "version": "2.3.0",
3242
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
3243
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
3244
+ "dev": true,
3245
+ "engines": {
3246
+ "node": ">=0.10.0"
3247
+ }
3248
+ },
3249
+ "node_modules/pinkie": {
3250
+ "version": "2.0.4",
3251
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
3252
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
3253
+ "dev": true,
3254
+ "engines": {
3255
+ "node": ">=0.10.0"
3256
+ }
3257
+ },
3258
+ "node_modules/pinkie-promise": {
3259
+ "version": "2.0.1",
3260
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
3261
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
3262
+ "dev": true,
3263
+ "dependencies": {
3264
+ "pinkie": "^2.0.0"
3265
+ },
3266
+ "engines": {
3267
+ "node": ">=0.10.0"
3268
+ }
3269
+ },
3270
+ "node_modules/plugin-error": {
3271
+ "version": "1.0.1",
3272
+ "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
3273
+ "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
3274
+ "dev": true,
3275
+ "dependencies": {
3276
+ "ansi-colors": "^1.0.1",
3277
+ "arr-diff": "^4.0.0",
3278
+ "arr-union": "^3.1.0",
3279
+ "extend-shallow": "^3.0.2"
3280
+ },
3281
+ "engines": {
3282
+ "node": ">= 0.10"
3283
+ }
3284
+ },
3285
+ "node_modules/plugin-error/node_modules/extend-shallow": {
3286
+ "version": "3.0.2",
3287
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
3288
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
3289
+ "dev": true,
3290
+ "dependencies": {
3291
+ "assign-symbols": "^1.0.0",
3292
+ "is-extendable": "^1.0.1"
3293
+ },
3294
+ "engines": {
3295
+ "node": ">=0.10.0"
3296
+ }
3297
+ },
3298
+ "node_modules/plugin-error/node_modules/is-extendable": {
3299
+ "version": "1.0.1",
3300
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
3301
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
3302
+ "dev": true,
3303
+ "dependencies": {
3304
+ "is-plain-object": "^2.0.4"
3305
+ },
3306
+ "engines": {
3307
+ "node": ">=0.10.0"
3308
+ }
3309
+ },
3310
+ "node_modules/plugin-error/node_modules/is-plain-object": {
3311
+ "version": "2.0.4",
3312
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
3313
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
3314
+ "dev": true,
3315
+ "dependencies": {
3316
+ "isobject": "^3.0.1"
3317
+ },
3318
+ "engines": {
3319
+ "node": ">=0.10.0"
3320
+ }
3321
+ },
3322
+ "node_modules/posix-character-classes": {
3323
+ "version": "0.1.1",
3324
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
3325
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
3326
+ "dev": true,
3327
+ "engines": {
3328
+ "node": ">=0.10.0"
3329
+ }
3330
+ },
3331
+ "node_modules/pretty-hrtime": {
3332
+ "version": "1.0.3",
3333
+ "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
3334
+ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
3335
+ "dev": true,
3336
+ "engines": {
3337
+ "node": ">= 0.8"
3338
+ }
3339
+ },
3340
+ "node_modules/process-nextick-args": {
3341
+ "version": "2.0.1",
3342
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
3343
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
3344
+ "dev": true
3345
+ },
3346
+ "node_modules/pump": {
3347
+ "version": "2.0.1",
3348
+ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
3349
+ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
3350
+ "dev": true,
3351
+ "dependencies": {
3352
+ "end-of-stream": "^1.1.0",
3353
+ "once": "^1.3.1"
3354
+ }
3355
+ },
3356
+ "node_modules/pumpify": {
3357
+ "version": "1.5.1",
3358
+ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
3359
+ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
3360
+ "dev": true,
3361
+ "dependencies": {
3362
+ "duplexify": "^3.6.0",
3363
+ "inherits": "^2.0.3",
3364
+ "pump": "^2.0.0"
3365
+ }
3366
+ },
3367
+ "node_modules/read-pkg": {
3368
+ "version": "1.1.0",
3369
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
3370
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
3371
+ "dev": true,
3372
+ "dependencies": {
3373
+ "load-json-file": "^1.0.0",
3374
+ "normalize-package-data": "^2.3.2",
3375
+ "path-type": "^1.0.0"
3376
+ },
3377
+ "engines": {
3378
+ "node": ">=0.10.0"
3379
+ }
3380
+ },
3381
+ "node_modules/read-pkg-up": {
3382
+ "version": "1.0.1",
3383
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
3384
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
3385
+ "dev": true,
3386
+ "dependencies": {
3387
+ "find-up": "^1.0.0",
3388
+ "read-pkg": "^1.0.0"
3389
+ },
3390
+ "engines": {
3391
+ "node": ">=0.10.0"
3392
+ }
3393
+ },
3394
+ "node_modules/readable-stream": {
3395
+ "version": "2.3.7",
3396
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
3397
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
3398
+ "dev": true,
3399
+ "dependencies": {
3400
+ "core-util-is": "~1.0.0",
3401
+ "inherits": "~2.0.3",
3402
+ "isarray": "~1.0.0",
3403
+ "process-nextick-args": "~2.0.0",
3404
+ "safe-buffer": "~5.1.1",
3405
+ "string_decoder": "~1.1.1",
3406
+ "util-deprecate": "~1.0.1"
3407
+ }
3408
+ },
3409
+ "node_modules/readdirp": {
3410
+ "version": "2.2.1",
3411
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
3412
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
3413
+ "dev": true,
3414
+ "dependencies": {
3415
+ "graceful-fs": "^4.1.11",
3416
+ "micromatch": "^3.1.10",
3417
+ "readable-stream": "^2.0.2"
3418
+ },
3419
+ "engines": {
3420
+ "node": ">=0.10"
3421
+ }
3422
+ },
3423
+ "node_modules/rechoir": {
3424
+ "version": "0.6.2",
3425
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
3426
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
3427
+ "dev": true,
3428
+ "dependencies": {
3429
+ "resolve": "^1.1.6"
3430
+ },
3431
+ "engines": {
3432
+ "node": ">= 0.10"
3433
+ }
3434
+ },
3435
+ "node_modules/regex-not": {
3436
+ "version": "1.0.2",
3437
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
3438
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
3439
+ "dev": true,
3440
+ "dependencies": {
3441
+ "extend-shallow": "^3.0.2",
3442
+ "safe-regex": "^1.1.0"
3443
+ },
3444
+ "engines": {
3445
+ "node": ">=0.10.0"
3446
+ }
3447
+ },
3448
+ "node_modules/regex-not/node_modules/extend-shallow": {
3449
+ "version": "3.0.2",
3450
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
3451
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
3452
+ "dev": true,
3453
+ "dependencies": {
3454
+ "assign-symbols": "^1.0.0",
3455
+ "is-extendable": "^1.0.1"
3456
+ },
3457
+ "engines": {
3458
+ "node": ">=0.10.0"
3459
+ }
3460
+ },
3461
+ "node_modules/regex-not/node_modules/is-extendable": {
3462
+ "version": "1.0.1",
3463
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
3464
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
3465
+ "dev": true,
3466
+ "dependencies": {
3467
+ "is-plain-object": "^2.0.4"
3468
+ },
3469
+ "engines": {
3470
+ "node": ">=0.10.0"
3471
+ }
3472
+ },
3473
+ "node_modules/regex-not/node_modules/is-plain-object": {
3474
+ "version": "2.0.4",
3475
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
3476
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
3477
+ "dev": true,
3478
+ "dependencies": {
3479
+ "isobject": "^3.0.1"
3480
+ },
3481
+ "engines": {
3482
+ "node": ">=0.10.0"
3483
+ }
3484
+ },
3485
+ "node_modules/remove-bom-buffer": {
3486
+ "version": "3.0.0",
3487
+ "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
3488
+ "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
3489
+ "dev": true,
3490
+ "dependencies": {
3491
+ "is-buffer": "^1.1.5",
3492
+ "is-utf8": "^0.2.1"
3493
+ },
3494
+ "engines": {
3495
+ "node": ">=0.10.0"
3496
+ }
3497
+ },
3498
+ "node_modules/remove-bom-stream": {
3499
+ "version": "1.2.0",
3500
+ "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
3501
+ "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
3502
+ "dev": true,
3503
+ "dependencies": {
3504
+ "remove-bom-buffer": "^3.0.0",
3505
+ "safe-buffer": "^5.1.0",
3506
+ "through2": "^2.0.3"
3507
+ },
3508
+ "engines": {
3509
+ "node": ">= 0.10"
3510
+ }
3511
+ },
3512
+ "node_modules/remove-bom-stream/node_modules/through2": {
3513
+ "version": "2.0.5",
3514
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
3515
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
3516
+ "dev": true,
3517
+ "dependencies": {
3518
+ "readable-stream": "~2.3.6",
3519
+ "xtend": "~4.0.1"
3520
+ }
3521
+ },
3522
+ "node_modules/remove-trailing-separator": {
3523
+ "version": "1.1.0",
3524
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
3525
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
3526
+ "dev": true
3527
+ },
3528
+ "node_modules/repeat-element": {
3529
+ "version": "1.1.4",
3530
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
3531
+ "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==",
3532
+ "dev": true,
3533
+ "engines": {
3534
+ "node": ">=0.10.0"
3535
+ }
3536
+ },
3537
+ "node_modules/repeat-string": {
3538
+ "version": "1.6.1",
3539
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
3540
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
3541
+ "dev": true,
3542
+ "engines": {
3543
+ "node": ">=0.10"
3544
+ }
3545
+ },
3546
+ "node_modules/replace-ext": {
3547
+ "version": "1.0.1",
3548
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
3549
+ "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==",
3550
+ "dev": true,
3551
+ "engines": {
3552
+ "node": ">= 0.10"
3553
+ }
3554
+ },
3555
+ "node_modules/replace-homedir": {
3556
+ "version": "1.0.0",
3557
+ "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
3558
+ "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
3559
+ "dev": true,
3560
+ "dependencies": {
3561
+ "homedir-polyfill": "^1.0.1",
3562
+ "is-absolute": "^1.0.0",
3563
+ "remove-trailing-separator": "^1.1.0"
3564
+ },
3565
+ "engines": {
3566
+ "node": ">= 0.10"
3567
+ }
3568
+ },
3569
+ "node_modules/require-directory": {
3570
+ "version": "2.1.1",
3571
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
3572
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
3573
+ "dev": true,
3574
+ "engines": {
3575
+ "node": ">=0.10.0"
3576
+ }
3577
+ },
3578
+ "node_modules/require-main-filename": {
3579
+ "version": "1.0.1",
3580
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
3581
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
3582
+ "dev": true
3583
+ },
3584
+ "node_modules/resolve": {
3585
+ "version": "1.20.0",
3586
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
3587
+ "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
3588
+ "dev": true,
3589
+ "dependencies": {
3590
+ "is-core-module": "^2.2.0",
3591
+ "path-parse": "^1.0.6"
3592
+ },
3593
+ "funding": {
3594
+ "url": "https://github.com/sponsors/ljharb"
3595
+ }
3596
+ },
3597
+ "node_modules/resolve-dir": {
3598
+ "version": "1.0.1",
3599
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
3600
+ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
3601
+ "dev": true,
3602
+ "dependencies": {
3603
+ "expand-tilde": "^2.0.0",
3604
+ "global-modules": "^1.0.0"
3605
+ },
3606
+ "engines": {
3607
+ "node": ">=0.10.0"
3608
+ }
3609
+ },
3610
+ "node_modules/resolve-options": {
3611
+ "version": "1.1.0",
3612
+ "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
3613
+ "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
3614
+ "dev": true,
3615
+ "dependencies": {
3616
+ "value-or-function": "^3.0.0"
3617
+ },
3618
+ "engines": {
3619
+ "node": ">= 0.10"
3620
+ }
3621
+ },
3622
+ "node_modules/resolve-url": {
3623
+ "version": "0.2.1",
3624
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
3625
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
3626
+ "deprecated": "https://github.com/lydell/resolve-url#deprecated",
3627
+ "dev": true
3628
+ },
3629
+ "node_modules/ret": {
3630
+ "version": "0.1.15",
3631
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
3632
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
3633
+ "dev": true,
3634
+ "engines": {
3635
+ "node": ">=0.12"
3636
+ }
3637
+ },
3638
+ "node_modules/safe-buffer": {
3639
+ "version": "5.1.2",
3640
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
3641
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
3642
+ "dev": true
3643
+ },
3644
+ "node_modules/safe-regex": {
3645
+ "version": "1.1.0",
3646
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
3647
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
3648
+ "dev": true,
3649
+ "dependencies": {
3650
+ "ret": "~0.1.10"
3651
+ }
3652
+ },
3653
+ "node_modules/semver": {
3654
+ "version": "7.3.5",
3655
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
3656
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
3657
+ "dev": true,
3658
+ "dependencies": {
3659
+ "lru-cache": "^6.0.0"
3660
+ },
3661
+ "bin": {
3662
+ "semver": "bin/semver.js"
3663
+ },
3664
+ "engines": {
3665
+ "node": ">=10"
3666
+ }
3667
+ },
3668
+ "node_modules/semver-greatest-satisfied-range": {
3669
+ "version": "1.1.0",
3670
+ "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
3671
+ "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
3672
+ "dev": true,
3673
+ "dependencies": {
3674
+ "sver-compat": "^1.5.0"
3675
+ },
3676
+ "engines": {
3677
+ "node": ">= 0.10"
3678
+ }
3679
+ },
3680
+ "node_modules/set-blocking": {
3681
+ "version": "2.0.0",
3682
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
3683
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
3684
+ "dev": true
3685
+ },
3686
+ "node_modules/set-value": {
3687
+ "version": "2.0.1",
3688
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
3689
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
3690
+ "dev": true,
3691
+ "dependencies": {
3692
+ "extend-shallow": "^2.0.1",
3693
+ "is-extendable": "^0.1.1",
3694
+ "is-plain-object": "^2.0.3",
3695
+ "split-string": "^3.0.1"
3696
+ },
3697
+ "engines": {
3698
+ "node": ">=0.10.0"
3699
+ }
3700
+ },
3701
+ "node_modules/set-value/node_modules/is-plain-object": {
3702
+ "version": "2.0.4",
3703
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
3704
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
3705
+ "dev": true,
3706
+ "dependencies": {
3707
+ "isobject": "^3.0.1"
3708
+ },
3709
+ "engines": {
3710
+ "node": ">=0.10.0"
3711
+ }
3712
+ },
3713
+ "node_modules/shellwords": {
3714
+ "version": "0.1.1",
3715
+ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
3716
+ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
3717
+ "dev": true
3718
+ },
3719
+ "node_modules/snapdragon": {
3720
+ "version": "0.8.2",
3721
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
3722
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
3723
+ "dev": true,
3724
+ "dependencies": {
3725
+ "base": "^0.11.1",
3726
+ "debug": "^2.2.0",
3727
+ "define-property": "^0.2.5",
3728
+ "extend-shallow": "^2.0.1",
3729
+ "map-cache": "^0.2.2",
3730
+ "source-map": "^0.5.6",
3731
+ "source-map-resolve": "^0.5.0",
3732
+ "use": "^3.1.0"
3733
+ },
3734
+ "engines": {
3735
+ "node": ">=0.10.0"
3736
+ }
3737
+ },
3738
+ "node_modules/snapdragon-node": {
3739
+ "version": "2.1.1",
3740
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
3741
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
3742
+ "dev": true,
3743
+ "dependencies": {
3744
+ "define-property": "^1.0.0",
3745
+ "isobject": "^3.0.0",
3746
+ "snapdragon-util": "^3.0.1"
3747
+ },
3748
+ "engines": {
3749
+ "node": ">=0.10.0"
3750
+ }
3751
+ },
3752
+ "node_modules/snapdragon-node/node_modules/define-property": {
3753
+ "version": "1.0.0",
3754
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
3755
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
3756
+ "dev": true,
3757
+ "dependencies": {
3758
+ "is-descriptor": "^1.0.0"
3759
+ },
3760
+ "engines": {
3761
+ "node": ">=0.10.0"
3762
+ }
3763
+ },
3764
+ "node_modules/snapdragon-util": {
3765
+ "version": "3.0.1",
3766
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
3767
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
3768
+ "dev": true,
3769
+ "dependencies": {
3770
+ "kind-of": "^3.2.0"
3771
+ },
3772
+ "engines": {
3773
+ "node": ">=0.10.0"
3774
+ }
3775
+ },
3776
+ "node_modules/snapdragon-util/node_modules/kind-of": {
3777
+ "version": "3.2.2",
3778
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3779
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3780
+ "dev": true,
3781
+ "dependencies": {
3782
+ "is-buffer": "^1.1.5"
3783
+ },
3784
+ "engines": {
3785
+ "node": ">=0.10.0"
3786
+ }
3787
+ },
3788
+ "node_modules/snapdragon/node_modules/define-property": {
3789
+ "version": "0.2.5",
3790
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
3791
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
3792
+ "dev": true,
3793
+ "dependencies": {
3794
+ "is-descriptor": "^0.1.0"
3795
+ },
3796
+ "engines": {
3797
+ "node": ">=0.10.0"
3798
+ }
3799
+ },
3800
+ "node_modules/snapdragon/node_modules/is-accessor-descriptor": {
3801
+ "version": "0.1.6",
3802
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
3803
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
3804
+ "dev": true,
3805
+ "dependencies": {
3806
+ "kind-of": "^3.0.2"
3807
+ },
3808
+ "engines": {
3809
+ "node": ">=0.10.0"
3810
+ }
3811
+ },
3812
+ "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": {
3813
+ "version": "3.2.2",
3814
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3815
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3816
+ "dev": true,
3817
+ "dependencies": {
3818
+ "is-buffer": "^1.1.5"
3819
+ },
3820
+ "engines": {
3821
+ "node": ">=0.10.0"
3822
+ }
3823
+ },
3824
+ "node_modules/snapdragon/node_modules/is-data-descriptor": {
3825
+ "version": "0.1.4",
3826
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
3827
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
3828
+ "dev": true,
3829
+ "dependencies": {
3830
+ "kind-of": "^3.0.2"
3831
+ },
3832
+ "engines": {
3833
+ "node": ">=0.10.0"
3834
+ }
3835
+ },
3836
+ "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": {
3837
+ "version": "3.2.2",
3838
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3839
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3840
+ "dev": true,
3841
+ "dependencies": {
3842
+ "is-buffer": "^1.1.5"
3843
+ },
3844
+ "engines": {
3845
+ "node": ">=0.10.0"
3846
+ }
3847
+ },
3848
+ "node_modules/snapdragon/node_modules/is-descriptor": {
3849
+ "version": "0.1.6",
3850
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
3851
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
3852
+ "dev": true,
3853
+ "dependencies": {
3854
+ "is-accessor-descriptor": "^0.1.6",
3855
+ "is-data-descriptor": "^0.1.4",
3856
+ "kind-of": "^5.0.0"
3857
+ },
3858
+ "engines": {
3859
+ "node": ">=0.10.0"
3860
+ }
3861
+ },
3862
+ "node_modules/source-map": {
3863
+ "version": "0.5.7",
3864
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
3865
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
3866
+ "dev": true,
3867
+ "engines": {
3868
+ "node": ">=0.10.0"
3869
+ }
3870
+ },
3871
+ "node_modules/source-map-resolve": {
3872
+ "version": "0.5.3",
3873
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
3874
+ "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
3875
+ "dev": true,
3876
+ "dependencies": {
3877
+ "atob": "^2.1.2",
3878
+ "decode-uri-component": "^0.2.0",
3879
+ "resolve-url": "^0.2.1",
3880
+ "source-map-url": "^0.4.0",
3881
+ "urix": "^0.1.0"
3882
+ }
3883
+ },
3884
+ "node_modules/source-map-url": {
3885
+ "version": "0.4.1",
3886
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
3887
+ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
3888
+ "dev": true
3889
+ },
3890
+ "node_modules/sparkles": {
3891
+ "version": "1.0.1",
3892
+ "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
3893
+ "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==",
3894
+ "dev": true,
3895
+ "engines": {
3896
+ "node": ">= 0.10"
3897
+ }
3898
+ },
3899
+ "node_modules/spdx-correct": {
3900
+ "version": "3.1.1",
3901
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
3902
+ "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
3903
+ "dev": true,
3904
+ "dependencies": {
3905
+ "spdx-expression-parse": "^3.0.0",
3906
+ "spdx-license-ids": "^3.0.0"
3907
+ }
3908
+ },
3909
+ "node_modules/spdx-exceptions": {
3910
+ "version": "2.3.0",
3911
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
3912
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
3913
+ "dev": true
3914
+ },
3915
+ "node_modules/spdx-expression-parse": {
3916
+ "version": "3.0.1",
3917
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
3918
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
3919
+ "dev": true,
3920
+ "dependencies": {
3921
+ "spdx-exceptions": "^2.1.0",
3922
+ "spdx-license-ids": "^3.0.0"
3923
+ }
3924
+ },
3925
+ "node_modules/spdx-license-ids": {
3926
+ "version": "3.0.11",
3927
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
3928
+ "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==",
3929
+ "dev": true
3930
+ },
3931
+ "node_modules/split-string": {
3932
+ "version": "3.1.0",
3933
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
3934
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
3935
+ "dev": true,
3936
+ "dependencies": {
3937
+ "extend-shallow": "^3.0.0"
3938
+ },
3939
+ "engines": {
3940
+ "node": ">=0.10.0"
3941
+ }
3942
+ },
3943
+ "node_modules/split-string/node_modules/extend-shallow": {
3944
+ "version": "3.0.2",
3945
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
3946
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
3947
+ "dev": true,
3948
+ "dependencies": {
3949
+ "assign-symbols": "^1.0.0",
3950
+ "is-extendable": "^1.0.1"
3951
+ },
3952
+ "engines": {
3953
+ "node": ">=0.10.0"
3954
+ }
3955
+ },
3956
+ "node_modules/split-string/node_modules/is-extendable": {
3957
+ "version": "1.0.1",
3958
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
3959
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
3960
+ "dev": true,
3961
+ "dependencies": {
3962
+ "is-plain-object": "^2.0.4"
3963
+ },
3964
+ "engines": {
3965
+ "node": ">=0.10.0"
3966
+ }
3967
+ },
3968
+ "node_modules/split-string/node_modules/is-plain-object": {
3969
+ "version": "2.0.4",
3970
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
3971
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
3972
+ "dev": true,
3973
+ "dependencies": {
3974
+ "isobject": "^3.0.1"
3975
+ },
3976
+ "engines": {
3977
+ "node": ">=0.10.0"
3978
+ }
3979
+ },
3980
+ "node_modules/stack-trace": {
3981
+ "version": "0.0.10",
3982
+ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
3983
+ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
3984
+ "dev": true,
3985
+ "engines": {
3986
+ "node": "*"
3987
+ }
3988
+ },
3989
+ "node_modules/static-extend": {
3990
+ "version": "0.1.2",
3991
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
3992
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
3993
+ "dev": true,
3994
+ "dependencies": {
3995
+ "define-property": "^0.2.5",
3996
+ "object-copy": "^0.1.0"
3997
+ },
3998
+ "engines": {
3999
+ "node": ">=0.10.0"
4000
+ }
4001
+ },
4002
+ "node_modules/static-extend/node_modules/define-property": {
4003
+ "version": "0.2.5",
4004
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
4005
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
4006
+ "dev": true,
4007
+ "dependencies": {
4008
+ "is-descriptor": "^0.1.0"
4009
+ },
4010
+ "engines": {
4011
+ "node": ">=0.10.0"
4012
+ }
4013
+ },
4014
+ "node_modules/static-extend/node_modules/is-accessor-descriptor": {
4015
+ "version": "0.1.6",
4016
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
4017
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
4018
+ "dev": true,
4019
+ "dependencies": {
4020
+ "kind-of": "^3.0.2"
4021
+ },
4022
+ "engines": {
4023
+ "node": ">=0.10.0"
4024
+ }
4025
+ },
4026
+ "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": {
4027
+ "version": "3.2.2",
4028
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
4029
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
4030
+ "dev": true,
4031
+ "dependencies": {
4032
+ "is-buffer": "^1.1.5"
4033
+ },
4034
+ "engines": {
4035
+ "node": ">=0.10.0"
4036
+ }
4037
+ },
4038
+ "node_modules/static-extend/node_modules/is-data-descriptor": {
4039
+ "version": "0.1.4",
4040
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
4041
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
4042
+ "dev": true,
4043
+ "dependencies": {
4044
+ "kind-of": "^3.0.2"
4045
+ },
4046
+ "engines": {
4047
+ "node": ">=0.10.0"
4048
+ }
4049
+ },
4050
+ "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": {
4051
+ "version": "3.2.2",
4052
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
4053
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
4054
+ "dev": true,
4055
+ "dependencies": {
4056
+ "is-buffer": "^1.1.5"
4057
+ },
4058
+ "engines": {
4059
+ "node": ">=0.10.0"
4060
+ }
4061
+ },
4062
+ "node_modules/static-extend/node_modules/is-descriptor": {
4063
+ "version": "0.1.6",
4064
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
4065
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
4066
+ "dev": true,
4067
+ "dependencies": {
4068
+ "is-accessor-descriptor": "^0.1.6",
4069
+ "is-data-descriptor": "^0.1.4",
4070
+ "kind-of": "^5.0.0"
4071
+ },
4072
+ "engines": {
4073
+ "node": ">=0.10.0"
4074
+ }
4075
+ },
4076
+ "node_modules/stream-exhaust": {
4077
+ "version": "1.0.2",
4078
+ "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
4079
+ "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
4080
+ "dev": true
4081
+ },
4082
+ "node_modules/stream-shift": {
4083
+ "version": "1.0.1",
4084
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
4085
+ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
4086
+ "dev": true
4087
+ },
4088
+ "node_modules/string_decoder": {
4089
+ "version": "1.1.1",
4090
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
4091
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
4092
+ "dev": true,
4093
+ "dependencies": {
4094
+ "safe-buffer": "~5.1.0"
4095
+ }
4096
+ },
4097
+ "node_modules/string-width": {
4098
+ "version": "1.0.2",
4099
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
4100
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
4101
+ "dev": true,
4102
+ "dependencies": {
4103
+ "code-point-at": "^1.0.0",
4104
+ "is-fullwidth-code-point": "^1.0.0",
4105
+ "strip-ansi": "^3.0.0"
4106
+ },
4107
+ "engines": {
4108
+ "node": ">=0.10.0"
4109
+ }
4110
+ },
4111
+ "node_modules/strip-ansi": {
4112
+ "version": "3.0.1",
4113
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
4114
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
4115
+ "dev": true,
4116
+ "dependencies": {
4117
+ "ansi-regex": "^2.0.0"
4118
+ },
4119
+ "engines": {
4120
+ "node": ">=0.10.0"
4121
+ }
4122
+ },
4123
+ "node_modules/strip-bom": {
4124
+ "version": "2.0.0",
4125
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
4126
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
4127
+ "dev": true,
4128
+ "dependencies": {
4129
+ "is-utf8": "^0.2.0"
4130
+ },
4131
+ "engines": {
4132
+ "node": ">=0.10.0"
4133
+ }
4134
+ },
4135
+ "node_modules/supports-color": {
4136
+ "version": "2.0.0",
4137
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
4138
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
4139
+ "dev": true,
4140
+ "engines": {
4141
+ "node": ">=0.8.0"
4142
+ }
4143
+ },
4144
+ "node_modules/sver-compat": {
4145
+ "version": "1.5.0",
4146
+ "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
4147
+ "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
4148
+ "dev": true,
4149
+ "dependencies": {
4150
+ "es6-iterator": "^2.0.1",
4151
+ "es6-symbol": "^3.1.1"
4152
+ }
4153
+ },
4154
+ "node_modules/through2": {
4155
+ "version": "4.0.2",
4156
+ "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz",
4157
+ "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
4158
+ "dev": true,
4159
+ "dependencies": {
4160
+ "readable-stream": "3"
4161
+ }
4162
+ },
4163
+ "node_modules/through2-filter": {
4164
+ "version": "3.0.0",
4165
+ "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
4166
+ "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
4167
+ "dev": true,
4168
+ "dependencies": {
4169
+ "through2": "~2.0.0",
4170
+ "xtend": "~4.0.0"
4171
+ }
4172
+ },
4173
+ "node_modules/through2-filter/node_modules/through2": {
4174
+ "version": "2.0.5",
4175
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
4176
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
4177
+ "dev": true,
4178
+ "dependencies": {
4179
+ "readable-stream": "~2.3.6",
4180
+ "xtend": "~4.0.1"
4181
+ }
4182
+ },
4183
+ "node_modules/through2/node_modules/readable-stream": {
4184
+ "version": "3.6.0",
4185
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
4186
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
4187
+ "dev": true,
4188
+ "dependencies": {
4189
+ "inherits": "^2.0.3",
4190
+ "string_decoder": "^1.1.1",
4191
+ "util-deprecate": "^1.0.1"
4192
+ },
4193
+ "engines": {
4194
+ "node": ">= 6"
4195
+ }
4196
+ },
4197
+ "node_modules/time-stamp": {
4198
+ "version": "1.1.0",
4199
+ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
4200
+ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
4201
+ "dev": true,
4202
+ "engines": {
4203
+ "node": ">=0.10.0"
4204
+ }
4205
+ },
4206
+ "node_modules/to-absolute-glob": {
4207
+ "version": "2.0.2",
4208
+ "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
4209
+ "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
4210
+ "dev": true,
4211
+ "dependencies": {
4212
+ "is-absolute": "^1.0.0",
4213
+ "is-negated-glob": "^1.0.0"
4214
+ },
4215
+ "engines": {
4216
+ "node": ">=0.10.0"
4217
+ }
4218
+ },
4219
+ "node_modules/to-object-path": {
4220
+ "version": "0.3.0",
4221
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
4222
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
4223
+ "dev": true,
4224
+ "dependencies": {
4225
+ "kind-of": "^3.0.2"
4226
+ },
4227
+ "engines": {
4228
+ "node": ">=0.10.0"
4229
+ }
4230
+ },
4231
+ "node_modules/to-object-path/node_modules/kind-of": {
4232
+ "version": "3.2.2",
4233
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
4234
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
4235
+ "dev": true,
4236
+ "dependencies": {
4237
+ "is-buffer": "^1.1.5"
4238
+ },
4239
+ "engines": {
4240
+ "node": ">=0.10.0"
4241
+ }
4242
+ },
4243
+ "node_modules/to-regex": {
4244
+ "version": "3.0.2",
4245
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
4246
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
4247
+ "dev": true,
4248
+ "dependencies": {
4249
+ "define-property": "^2.0.2",
4250
+ "extend-shallow": "^3.0.2",
4251
+ "regex-not": "^1.0.2",
4252
+ "safe-regex": "^1.1.0"
4253
+ },
4254
+ "engines": {
4255
+ "node": ">=0.10.0"
4256
+ }
4257
+ },
4258
+ "node_modules/to-regex-range": {
4259
+ "version": "2.1.1",
4260
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
4261
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
4262
+ "dev": true,
4263
+ "dependencies": {
4264
+ "is-number": "^3.0.0",
4265
+ "repeat-string": "^1.6.1"
4266
+ },
4267
+ "engines": {
4268
+ "node": ">=0.10.0"
4269
+ }
4270
+ },
4271
+ "node_modules/to-regex/node_modules/extend-shallow": {
4272
+ "version": "3.0.2",
4273
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
4274
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
4275
+ "dev": true,
4276
+ "dependencies": {
4277
+ "assign-symbols": "^1.0.0",
4278
+ "is-extendable": "^1.0.1"
4279
+ },
4280
+ "engines": {
4281
+ "node": ">=0.10.0"
4282
+ }
4283
+ },
4284
+ "node_modules/to-regex/node_modules/is-extendable": {
4285
+ "version": "1.0.1",
4286
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
4287
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
4288
+ "dev": true,
4289
+ "dependencies": {
4290
+ "is-plain-object": "^2.0.4"
4291
+ },
4292
+ "engines": {
4293
+ "node": ">=0.10.0"
4294
+ }
4295
+ },
4296
+ "node_modules/to-regex/node_modules/is-plain-object": {
4297
+ "version": "2.0.4",
4298
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
4299
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
4300
+ "dev": true,
4301
+ "dependencies": {
4302
+ "isobject": "^3.0.1"
4303
+ },
4304
+ "engines": {
4305
+ "node": ">=0.10.0"
4306
+ }
4307
+ },
4308
+ "node_modules/to-through": {
4309
+ "version": "2.0.0",
4310
+ "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
4311
+ "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
4312
+ "dev": true,
4313
+ "dependencies": {
4314
+ "through2": "^2.0.3"
4315
+ },
4316
+ "engines": {
4317
+ "node": ">= 0.10"
4318
+ }
4319
+ },
4320
+ "node_modules/to-through/node_modules/through2": {
4321
+ "version": "2.0.5",
4322
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
4323
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
4324
+ "dev": true,
4325
+ "dependencies": {
4326
+ "readable-stream": "~2.3.6",
4327
+ "xtend": "~4.0.1"
4328
+ }
4329
+ },
4330
+ "node_modules/type": {
4331
+ "version": "1.2.0",
4332
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
4333
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
4334
+ "dev": true
4335
+ },
4336
+ "node_modules/typedarray": {
4337
+ "version": "0.0.6",
4338
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
4339
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
4340
+ "dev": true
4341
+ },
4342
+ "node_modules/unc-path-regex": {
4343
+ "version": "0.1.2",
4344
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
4345
+ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
4346
+ "dev": true,
4347
+ "engines": {
4348
+ "node": ">=0.10.0"
4349
+ }
4350
+ },
4351
+ "node_modules/undertaker": {
4352
+ "version": "1.3.0",
4353
+ "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz",
4354
+ "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==",
4355
+ "dev": true,
4356
+ "dependencies": {
4357
+ "arr-flatten": "^1.0.1",
4358
+ "arr-map": "^2.0.0",
4359
+ "bach": "^1.0.0",
4360
+ "collection-map": "^1.0.0",
4361
+ "es6-weak-map": "^2.0.1",
4362
+ "fast-levenshtein": "^1.0.0",
4363
+ "last-run": "^1.1.0",
4364
+ "object.defaults": "^1.0.0",
4365
+ "object.reduce": "^1.0.0",
4366
+ "undertaker-registry": "^1.0.0"
4367
+ },
4368
+ "engines": {
4369
+ "node": ">= 0.10"
4370
+ }
4371
+ },
4372
+ "node_modules/undertaker-registry": {
4373
+ "version": "1.0.1",
4374
+ "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
4375
+ "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=",
4376
+ "dev": true,
4377
+ "engines": {
4378
+ "node": ">= 0.10"
4379
+ }
4380
+ },
4381
+ "node_modules/union-value": {
4382
+ "version": "1.0.1",
4383
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
4384
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
4385
+ "dev": true,
4386
+ "dependencies": {
4387
+ "arr-union": "^3.1.0",
4388
+ "get-value": "^2.0.6",
4389
+ "is-extendable": "^0.1.1",
4390
+ "set-value": "^2.0.1"
4391
+ },
4392
+ "engines": {
4393
+ "node": ">=0.10.0"
4394
+ }
4395
+ },
4396
+ "node_modules/unique-stream": {
4397
+ "version": "2.3.1",
4398
+ "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
4399
+ "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
4400
+ "dev": true,
4401
+ "dependencies": {
4402
+ "json-stable-stringify-without-jsonify": "^1.0.1",
4403
+ "through2-filter": "^3.0.0"
4404
+ }
4405
+ },
4406
+ "node_modules/unset-value": {
4407
+ "version": "1.0.0",
4408
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
4409
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
4410
+ "dev": true,
4411
+ "dependencies": {
4412
+ "has-value": "^0.3.1",
4413
+ "isobject": "^3.0.0"
4414
+ },
4415
+ "engines": {
4416
+ "node": ">=0.10.0"
4417
+ }
4418
+ },
4419
+ "node_modules/unset-value/node_modules/has-value": {
4420
+ "version": "0.3.1",
4421
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
4422
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
4423
+ "dev": true,
4424
+ "dependencies": {
4425
+ "get-value": "^2.0.3",
4426
+ "has-values": "^0.1.4",
4427
+ "isobject": "^2.0.0"
4428
+ },
4429
+ "engines": {
4430
+ "node": ">=0.10.0"
4431
+ }
4432
+ },
4433
+ "node_modules/unset-value/node_modules/has-value/node_modules/isobject": {
4434
+ "version": "2.1.0",
4435
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
4436
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
4437
+ "dev": true,
4438
+ "dependencies": {
4439
+ "isarray": "1.0.0"
4440
+ },
4441
+ "engines": {
4442
+ "node": ">=0.10.0"
4443
+ }
4444
+ },
4445
+ "node_modules/unset-value/node_modules/has-values": {
4446
+ "version": "0.1.4",
4447
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
4448
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
4449
+ "dev": true,
4450
+ "engines": {
4451
+ "node": ">=0.10.0"
4452
+ }
4453
+ },
4454
+ "node_modules/upath": {
4455
+ "version": "1.2.0",
4456
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
4457
+ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
4458
+ "dev": true,
4459
+ "engines": {
4460
+ "node": ">=4",
4461
+ "yarn": "*"
4462
+ }
4463
+ },
4464
+ "node_modules/urix": {
4465
+ "version": "0.1.0",
4466
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
4467
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
4468
+ "deprecated": "Please see https://github.com/lydell/urix#deprecated",
4469
+ "dev": true
4470
+ },
4471
+ "node_modules/use": {
4472
+ "version": "3.1.1",
4473
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
4474
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
4475
+ "dev": true,
4476
+ "engines": {
4477
+ "node": ">=0.10.0"
4478
+ }
4479
+ },
4480
+ "node_modules/util-deprecate": {
4481
+ "version": "1.0.2",
4482
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
4483
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
4484
+ "dev": true
4485
+ },
4486
+ "node_modules/uuid": {
4487
+ "version": "8.3.2",
4488
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
4489
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
4490
+ "dev": true,
4491
+ "bin": {
4492
+ "uuid": "dist/bin/uuid"
4493
+ }
4494
+ },
4495
+ "node_modules/v8flags": {
4496
+ "version": "3.2.0",
4497
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
4498
+ "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
4499
+ "dev": true,
4500
+ "dependencies": {
4501
+ "homedir-polyfill": "^1.0.1"
4502
+ },
4503
+ "engines": {
4504
+ "node": ">= 0.10"
4505
+ }
4506
+ },
4507
+ "node_modules/validate-npm-package-license": {
4508
+ "version": "3.0.4",
4509
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
4510
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
4511
+ "dev": true,
4512
+ "dependencies": {
4513
+ "spdx-correct": "^3.0.0",
4514
+ "spdx-expression-parse": "^3.0.0"
4515
+ }
4516
+ },
4517
+ "node_modules/value-or-function": {
4518
+ "version": "3.0.0",
4519
+ "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
4520
+ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=",
4521
+ "dev": true,
4522
+ "engines": {
4523
+ "node": ">= 0.10"
4524
+ }
4525
+ },
4526
+ "node_modules/vinyl": {
4527
+ "version": "2.2.1",
4528
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
4529
+ "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
4530
+ "dev": true,
4531
+ "dependencies": {
4532
+ "clone": "^2.1.1",
4533
+ "clone-buffer": "^1.0.0",
4534
+ "clone-stats": "^1.0.0",
4535
+ "cloneable-readable": "^1.0.0",
4536
+ "remove-trailing-separator": "^1.0.1",
4537
+ "replace-ext": "^1.0.0"
4538
+ },
4539
+ "engines": {
4540
+ "node": ">= 0.10"
4541
+ }
4542
+ },
4543
+ "node_modules/vinyl-fs": {
4544
+ "version": "3.0.3",
4545
+ "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
4546
+ "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
4547
+ "dev": true,
4548
+ "dependencies": {
4549
+ "fs-mkdirp-stream": "^1.0.0",
4550
+ "glob-stream": "^6.1.0",
4551
+ "graceful-fs": "^4.0.0",
4552
+ "is-valid-glob": "^1.0.0",
4553
+ "lazystream": "^1.0.0",
4554
+ "lead": "^1.0.0",
4555
+ "object.assign": "^4.0.4",
4556
+ "pumpify": "^1.3.5",
4557
+ "readable-stream": "^2.3.3",
4558
+ "remove-bom-buffer": "^3.0.0",
4559
+ "remove-bom-stream": "^1.2.0",
4560
+ "resolve-options": "^1.1.0",
4561
+ "through2": "^2.0.0",
4562
+ "to-through": "^2.0.0",
4563
+ "value-or-function": "^3.0.0",
4564
+ "vinyl": "^2.0.0",
4565
+ "vinyl-sourcemap": "^1.1.0"
4566
+ },
4567
+ "engines": {
4568
+ "node": ">= 0.10"
4569
+ }
4570
+ },
4571
+ "node_modules/vinyl-fs/node_modules/through2": {
4572
+ "version": "2.0.5",
4573
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
4574
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
4575
+ "dev": true,
4576
+ "dependencies": {
4577
+ "readable-stream": "~2.3.6",
4578
+ "xtend": "~4.0.1"
4579
+ }
4580
+ },
4581
+ "node_modules/vinyl-sourcemap": {
4582
+ "version": "1.1.0",
4583
+ "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
4584
+ "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
4585
+ "dev": true,
4586
+ "dependencies": {
4587
+ "append-buffer": "^1.0.2",
4588
+ "convert-source-map": "^1.5.0",
4589
+ "graceful-fs": "^4.1.6",
4590
+ "normalize-path": "^2.1.1",
4591
+ "now-and-later": "^2.0.0",
4592
+ "remove-bom-buffer": "^3.0.0",
4593
+ "vinyl": "^2.0.0"
4594
+ },
4595
+ "engines": {
4596
+ "node": ">= 0.10"
4597
+ }
4598
+ },
4599
+ "node_modules/vinyl-sourcemap/node_modules/normalize-path": {
4600
+ "version": "2.1.1",
4601
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
4602
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
4603
+ "dev": true,
4604
+ "dependencies": {
4605
+ "remove-trailing-separator": "^1.0.1"
4606
+ },
4607
+ "engines": {
4608
+ "node": ">=0.10.0"
4609
+ }
4610
+ },
4611
+ "node_modules/which": {
4612
+ "version": "2.0.2",
4613
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
4614
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
4615
+ "dev": true,
4616
+ "dependencies": {
4617
+ "isexe": "^2.0.0"
4618
+ },
4619
+ "bin": {
4620
+ "node-which": "bin/node-which"
4621
+ },
4622
+ "engines": {
4623
+ "node": ">= 8"
4624
+ }
4625
+ },
4626
+ "node_modules/which-module": {
4627
+ "version": "1.0.0",
4628
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
4629
+ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
4630
+ "dev": true
4631
+ },
4632
+ "node_modules/wp-pot": {
4633
+ "version": "1.9.9",
4634
+ "resolved": "https://registry.npmjs.org/wp-pot/-/wp-pot-1.9.9.tgz",
4635
+ "integrity": "sha512-cCtSeIyEe1u9DvJdgov4hGakMoabvLIwPZpCMqUKI5FnBoTMu7buQrIJar+JNIeRg/+RRxAKFtq4DsqH5GdJuQ==",
4636
+ "dev": true,
4637
+ "dependencies": {
4638
+ "matched": "^5.0.0",
4639
+ "path-sort": "^0.1.0",
4640
+ "php-parser": "^3.0.2"
4641
+ },
4642
+ "engines": {
4643
+ "node": ">=12"
4644
+ }
4645
+ },
4646
+ "node_modules/wrap-ansi": {
4647
+ "version": "2.1.0",
4648
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
4649
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
4650
+ "dev": true,
4651
+ "dependencies": {
4652
+ "string-width": "^1.0.1",
4653
+ "strip-ansi": "^3.0.1"
4654
+ },
4655
+ "engines": {
4656
+ "node": ">=0.10.0"
4657
+ }
4658
+ },
4659
+ "node_modules/wrappy": {
4660
+ "version": "1.0.2",
4661
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
4662
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
4663
+ "dev": true
4664
+ },
4665
+ "node_modules/xtend": {
4666
+ "version": "4.0.2",
4667
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
4668
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
4669
+ "dev": true,
4670
+ "engines": {
4671
+ "node": ">=0.4"
4672
+ }
4673
+ },
4674
+ "node_modules/y18n": {
4675
+ "version": "3.2.2",
4676
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
4677
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
4678
+ "dev": true
4679
+ },
4680
+ "node_modules/yallist": {
4681
+ "version": "4.0.0",
4682
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
4683
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
4684
+ "dev": true
4685
+ },
4686
+ "node_modules/yargs": {
4687
+ "version": "7.1.2",
4688
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz",
4689
+ "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==",
4690
+ "dev": true,
4691
+ "dependencies": {
4692
+ "camelcase": "^3.0.0",
4693
+ "cliui": "^3.2.0",
4694
+ "decamelize": "^1.1.1",
4695
+ "get-caller-file": "^1.0.1",
4696
+ "os-locale": "^1.4.0",
4697
+ "read-pkg-up": "^1.0.1",
4698
+ "require-directory": "^2.1.1",
4699
+ "require-main-filename": "^1.0.1",
4700
+ "set-blocking": "^2.0.0",
4701
+ "string-width": "^1.0.2",
4702
+ "which-module": "^1.0.0",
4703
+ "y18n": "^3.2.1",
4704
+ "yargs-parser": "^5.0.1"
4705
+ }
4706
+ },
4707
+ "node_modules/yargs-parser": {
4708
+ "version": "5.0.1",
4709
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz",
4710
+ "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==",
4711
+ "dev": true,
4712
+ "dependencies": {
4713
+ "camelcase": "^3.0.0",
4714
+ "object.assign": "^4.1.0"
4715
+ }
4716
+ }
4717
+ },
4718
+ "dependencies": {
4719
+ "ansi-colors": {
4720
+ "version": "1.1.0",
4721
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
4722
+ "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
4723
+ "dev": true,
4724
+ "requires": {
4725
+ "ansi-wrap": "^0.1.0"
4726
+ }
4727
+ },
4728
+ "ansi-gray": {
4729
+ "version": "0.1.1",
4730
+ "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
4731
+ "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
4732
+ "dev": true,
4733
+ "requires": {
4734
+ "ansi-wrap": "0.1.0"
4735
+ }
4736
+ },
4737
+ "ansi-regex": {
4738
+ "version": "2.1.1",
4739
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
4740
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
4741
+ "dev": true
4742
+ },
4743
+ "ansi-styles": {
4744
+ "version": "2.2.1",
4745
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
4746
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
4747
+ "dev": true
4748
+ },
4749
+ "ansi-wrap": {
4750
+ "version": "0.1.0",
4751
+ "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
4752
+ "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
4753
+ "dev": true
4754
+ },
4755
+ "anymatch": {
4756
+ "version": "2.0.0",
4757
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
4758
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
4759
+ "dev": true,
4760
+ "requires": {
4761
+ "micromatch": "^3.1.4",
4762
+ "normalize-path": "^2.1.1"
4763
+ },
4764
+ "dependencies": {
4765
+ "normalize-path": {
4766
+ "version": "2.1.1",
4767
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
4768
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
4769
+ "dev": true,
4770
+ "requires": {
4771
+ "remove-trailing-separator": "^1.0.1"
4772
+ }
4773
+ }
4774
+ }
4775
+ },
4776
+ "append-buffer": {
4777
+ "version": "1.0.2",
4778
+ "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
4779
+ "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
4780
+ "dev": true,
4781
+ "requires": {
4782
+ "buffer-equal": "^1.0.0"
4783
+ }
4784
+ },
4785
+ "archy": {
4786
+ "version": "1.0.0",
4787
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
4788
+ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
4789
+ "dev": true
4790
+ },
4791
+ "arr-diff": {
4792
+ "version": "4.0.0",
4793
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
4794
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
4795
+ "dev": true
4796
+ },
4797
+ "arr-filter": {
4798
+ "version": "1.1.2",
4799
+ "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
4800
+ "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
4801
+ "dev": true,
4802
+ "requires": {
4803
+ "make-iterator": "^1.0.0"
4804
+ }
4805
+ },
4806
+ "arr-flatten": {
4807
+ "version": "1.1.0",
4808
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
4809
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
4810
+ "dev": true
4811
+ },
4812
+ "arr-map": {
4813
+ "version": "2.0.2",
4814
+ "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
4815
+ "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
4816
+ "dev": true,
4817
+ "requires": {
4818
+ "make-iterator": "^1.0.0"
4819
+ }
4820
+ },
4821
+ "arr-union": {
4822
+ "version": "3.1.0",
4823
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
4824
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
4825
+ "dev": true
4826
+ },
4827
+ "array-differ": {
4828
+ "version": "1.0.0",
4829
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
4830
+ "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
4831
+ "dev": true
4832
+ },
4833
+ "array-each": {
4834
+ "version": "1.0.1",
4835
+ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
4836
+ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
4837
+ "dev": true
4838
+ },
4839
+ "array-initial": {
4840
+ "version": "1.1.0",
4841
+ "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
4842
+ "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
4843
+ "dev": true,
4844
+ "requires": {
4845
+ "array-slice": "^1.0.0",
4846
+ "is-number": "^4.0.0"
4847
+ },
4848
+ "dependencies": {
4849
+ "is-number": {
4850
+ "version": "4.0.0",
4851
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
4852
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
4853
+ "dev": true
4854
+ }
4855
+ }
4856
+ },
4857
+ "array-last": {
4858
+ "version": "1.3.0",
4859
+ "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
4860
+ "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
4861
+ "dev": true,
4862
+ "requires": {
4863
+ "is-number": "^4.0.0"
4864
+ },
4865
+ "dependencies": {
4866
+ "is-number": {
4867
+ "version": "4.0.0",
4868
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
4869
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
4870
+ "dev": true
4871
+ }
4872
+ }
4873
+ },
4874
+ "array-slice": {
4875
+ "version": "1.1.0",
4876
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
4877
+ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
4878
+ "dev": true
4879
+ },
4880
+ "array-sort": {
4881
+ "version": "1.0.0",
4882
+ "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
4883
+ "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
4884
+ "dev": true,
4885
+ "requires": {
4886
+ "default-compare": "^1.0.0",
4887
+ "get-value": "^2.0.6",
4888
+ "kind-of": "^5.0.2"
4889
+ }
4890
+ },
4891
+ "array-uniq": {
4892
+ "version": "1.0.3",
4893
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
4894
+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
4895
+ "dev": true
4896
+ },
4897
+ "array-unique": {
4898
+ "version": "0.3.2",
4899
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
4900
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
4901
+ "dev": true
4902
+ },
4903
+ "assign-symbols": {
4904
+ "version": "1.0.0",
4905
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
4906
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
4907
+ "dev": true
4908
+ },
4909
+ "async-done": {
4910
+ "version": "1.3.2",
4911
+ "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
4912
+ "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
4913
+ "dev": true,
4914
+ "requires": {
4915
+ "end-of-stream": "^1.1.0",
4916
+ "once": "^1.3.2",
4917
+ "process-nextick-args": "^2.0.0",
4918
+ "stream-exhaust": "^1.0.1"
4919
+ }
4920
+ },
4921
+ "async-each": {
4922
+ "version": "1.0.3",
4923
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
4924
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
4925
+ "dev": true
4926
+ },
4927
+ "async-settle": {
4928
+ "version": "1.0.0",
4929
+ "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
4930
+ "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
4931
+ "dev": true,
4932
+ "requires": {
4933
+ "async-done": "^1.2.2"
4934
+ }
4935
+ },
4936
+ "atob": {
4937
+ "version": "2.1.2",
4938
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
4939
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
4940
+ "dev": true
4941
+ },
4942
+ "bach": {
4943
+ "version": "1.2.0",
4944
+ "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
4945
+ "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
4946
+ "dev": true,
4947
+ "requires": {
4948
+ "arr-filter": "^1.1.1",
4949
+ "arr-flatten": "^1.0.1",
4950
+ "arr-map": "^2.0.0",
4951
+ "array-each": "^1.0.0",
4952
+ "array-initial": "^1.0.0",
4953
+ "array-last": "^1.1.1",
4954
+ "async-done": "^1.2.2",
4955
+ "async-settle": "^1.0.0",
4956
+ "now-and-later": "^2.0.0"
4957
+ }
4958
+ },
4959
+ "balanced-match": {
4960
+ "version": "1.0.2",
4961
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
4962
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
4963
+ "dev": true
4964
+ },
4965
+ "base": {
4966
+ "version": "0.11.2",
4967
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
4968
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
4969
+ "dev": true,
4970
+ "requires": {
4971
+ "cache-base": "^1.0.1",
4972
+ "class-utils": "^0.3.5",
4973
+ "component-emitter": "^1.2.1",
4974
+ "define-property": "^1.0.0",
4975
+ "isobject": "^3.0.1",
4976
+ "mixin-deep": "^1.2.0",
4977
+ "pascalcase": "^0.1.1"
4978
+ },
4979
+ "dependencies": {
4980
+ "define-property": {
4981
+ "version": "1.0.0",
4982
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
4983
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
4984
+ "dev": true,
4985
+ "requires": {
4986
+ "is-descriptor": "^1.0.0"
4987
+ }
4988
+ }
4989
+ }
4990
+ },
4991
+ "beeper": {
4992
+ "version": "1.1.1",
4993
+ "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
4994
+ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
4995
+ "dev": true
4996
+ },
4997
+ "binary-extensions": {
4998
+ "version": "1.13.1",
4999
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
5000
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
5001
+ "dev": true
5002
+ },
5003
+ "bindings": {
5004
+ "version": "1.5.0",
5005
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
5006
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
5007
+ "dev": true,
5008
+ "optional": true,
5009
+ "requires": {
5010
+ "file-uri-to-path": "1.0.0"
5011
+ }
5012
+ },
5013
+ "brace-expansion": {
5014
+ "version": "1.1.11",
5015
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
5016
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
5017
+ "dev": true,
5018
+ "requires": {
5019
+ "balanced-match": "^1.0.0",
5020
+ "concat-map": "0.0.1"
5021
+ }
5022
+ },
5023
+ "braces": {
5024
+ "version": "2.3.2",
5025
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
5026
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
5027
+ "dev": true,
5028
+ "requires": {
5029
+ "arr-flatten": "^1.1.0",
5030
+ "array-unique": "^0.3.2",
5031
+ "extend-shallow": "^2.0.1",
5032
+ "fill-range": "^4.0.0",
5033
+ "isobject": "^3.0.1",
5034
+ "repeat-element": "^1.1.2",
5035
+ "snapdragon": "^0.8.1",
5036
+ "snapdragon-node": "^2.0.1",
5037
+ "split-string": "^3.0.2",
5038
+ "to-regex": "^3.0.1"
5039
+ }
5040
+ },
5041
+ "buffer-equal": {
5042
+ "version": "1.0.0",
5043
+ "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
5044
+ "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=",
5045
+ "dev": true
5046
+ },
5047
+ "buffer-from": {
5048
+ "version": "1.1.2",
5049
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
5050
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
5051
+ "dev": true
5052
+ },
5053
+ "cache-base": {
5054
+ "version": "1.0.1",
5055
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
5056
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
5057
+ "dev": true,
5058
+ "requires": {
5059
+ "collection-visit": "^1.0.0",
5060
+ "component-emitter": "^1.2.1",
5061
+ "get-value": "^2.0.6",
5062
+ "has-value": "^1.0.0",
5063
+ "isobject": "^3.0.1",
5064
+ "set-value": "^2.0.0",
5065
+ "to-object-path": "^0.3.0",
5066
+ "union-value": "^1.0.0",
5067
+ "unset-value": "^1.0.0"
5068
+ }
5069
+ },
5070
+ "call-bind": {
5071
+ "version": "1.0.2",
5072
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
5073
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
5074
+ "dev": true,
5075
+ "requires": {
5076
+ "function-bind": "^1.1.1",
5077
+ "get-intrinsic": "^1.0.2"
5078
+ }
5079
+ },
5080
+ "camelcase": {
5081
+ "version": "3.0.0",
5082
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
5083
+ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
5084
+ "dev": true
5085
+ },
5086
+ "chalk": {
5087
+ "version": "1.1.3",
5088
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
5089
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
5090
+ "dev": true,
5091
+ "requires": {
5092
+ "ansi-styles": "^2.2.1",
5093
+ "escape-string-regexp": "^1.0.2",
5094
+ "has-ansi": "^2.0.0",
5095
+ "strip-ansi": "^3.0.0",
5096
+ "supports-color": "^2.0.0"
5097
+ }
5098
+ },
5099
+ "chokidar": {
5100
+ "version": "2.1.8",
5101
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
5102
+ "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
5103
+ "dev": true,
5104
+ "requires": {
5105
+ "anymatch": "^2.0.0",
5106
+ "async-each": "^1.0.1",
5107
+ "braces": "^2.3.2",
5108
+ "fsevents": "^1.2.7",
5109
+ "glob-parent": "^3.1.0",
5110
+ "inherits": "^2.0.3",
5111
+ "is-binary-path": "^1.0.0",
5112
+ "is-glob": "^4.0.0",
5113
+ "normalize-path": "^3.0.0",
5114
+ "path-is-absolute": "^1.0.0",
5115
+ "readdirp": "^2.2.1",
5116
+ "upath": "^1.1.1"
5117
+ }
5118
+ },
5119
+ "class-utils": {
5120
+ "version": "0.3.6",
5121
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
5122
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
5123
+ "dev": true,
5124
+ "requires": {
5125
+ "arr-union": "^3.1.0",
5126
+ "define-property": "^0.2.5",
5127
+ "isobject": "^3.0.0",
5128
+ "static-extend": "^0.1.1"
5129
+ },
5130
+ "dependencies": {
5131
+ "define-property": {
5132
+ "version": "0.2.5",
5133
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
5134
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
5135
+ "dev": true,
5136
+ "requires": {
5137
+ "is-descriptor": "^0.1.0"
5138
+ }
5139
+ },
5140
+ "is-accessor-descriptor": {
5141
+ "version": "0.1.6",
5142
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
5143
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
5144
+ "dev": true,
5145
+ "requires": {
5146
+ "kind-of": "^3.0.2"
5147
+ },
5148
+ "dependencies": {
5149
+ "kind-of": {
5150
+ "version": "3.2.2",
5151
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5152
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5153
+ "dev": true,
5154
+ "requires": {
5155
+ "is-buffer": "^1.1.5"
5156
+ }
5157
+ }
5158
+ }
5159
+ },
5160
+ "is-data-descriptor": {
5161
+ "version": "0.1.4",
5162
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
5163
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
5164
+ "dev": true,
5165
+ "requires": {
5166
+ "kind-of": "^3.0.2"
5167
+ },
5168
+ "dependencies": {
5169
+ "kind-of": {
5170
+ "version": "3.2.2",
5171
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5172
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5173
+ "dev": true,
5174
+ "requires": {
5175
+ "is-buffer": "^1.1.5"
5176
+ }
5177
+ }
5178
+ }
5179
+ },
5180
+ "is-descriptor": {
5181
+ "version": "0.1.6",
5182
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
5183
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
5184
+ "dev": true,
5185
+ "requires": {
5186
+ "is-accessor-descriptor": "^0.1.6",
5187
+ "is-data-descriptor": "^0.1.4",
5188
+ "kind-of": "^5.0.0"
5189
+ }
5190
+ }
5191
+ }
5192
+ },
5193
+ "cliui": {
5194
+ "version": "3.2.0",
5195
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
5196
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
5197
+ "dev": true,
5198
+ "requires": {
5199
+ "string-width": "^1.0.1",
5200
+ "strip-ansi": "^3.0.1",
5201
+ "wrap-ansi": "^2.0.0"
5202
+ }
5203
+ },
5204
+ "clone": {
5205
+ "version": "2.1.2",
5206
+ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
5207
+ "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
5208
+ "dev": true
5209
+ },
5210
+ "clone-buffer": {
5211
+ "version": "1.0.0",
5212
+ "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
5213
+ "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
5214
+ "dev": true
5215
+ },
5216
+ "clone-stats": {
5217
+ "version": "1.0.0",
5218
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
5219
+ "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
5220
+ "dev": true
5221
+ },
5222
+ "cloneable-readable": {
5223
+ "version": "1.1.3",
5224
+ "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
5225
+ "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
5226
+ "dev": true,
5227
+ "requires": {
5228
+ "inherits": "^2.0.1",
5229
+ "process-nextick-args": "^2.0.0",
5230
+ "readable-stream": "^2.3.5"
5231
+ }
5232
+ },
5233
+ "code-point-at": {
5234
+ "version": "1.1.0",
5235
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
5236
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
5237
+ "dev": true
5238
+ },
5239
+ "collection-map": {
5240
+ "version": "1.0.0",
5241
+ "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
5242
+ "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
5243
+ "dev": true,
5244
+ "requires": {
5245
+ "arr-map": "^2.0.2",
5246
+ "for-own": "^1.0.0",
5247
+ "make-iterator": "^1.0.0"
5248
+ }
5249
+ },
5250
+ "collection-visit": {
5251
+ "version": "1.0.0",
5252
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
5253
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
5254
+ "dev": true,
5255
+ "requires": {
5256
+ "map-visit": "^1.0.0",
5257
+ "object-visit": "^1.0.0"
5258
+ }
5259
+ },
5260
+ "color-support": {
5261
+ "version": "1.1.3",
5262
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
5263
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
5264
+ "dev": true
5265
+ },
5266
+ "component-emitter": {
5267
+ "version": "1.3.0",
5268
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
5269
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
5270
+ "dev": true
5271
+ },
5272
+ "concat-map": {
5273
+ "version": "0.0.1",
5274
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
5275
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
5276
+ "dev": true
5277
+ },
5278
+ "concat-stream": {
5279
+ "version": "1.6.2",
5280
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
5281
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
5282
+ "dev": true,
5283
+ "requires": {
5284
+ "buffer-from": "^1.0.0",
5285
+ "inherits": "^2.0.3",
5286
+ "readable-stream": "^2.2.2",
5287
+ "typedarray": "^0.0.6"
5288
+ }
5289
+ },
5290
+ "convert-source-map": {
5291
+ "version": "1.8.0",
5292
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
5293
+ "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
5294
+ "dev": true,
5295
+ "requires": {
5296
+ "safe-buffer": "~5.1.1"
5297
+ }
5298
+ },
5299
+ "copy-descriptor": {
5300
+ "version": "0.1.1",
5301
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
5302
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
5303
+ "dev": true
5304
+ },
5305
+ "copy-props": {
5306
+ "version": "2.0.5",
5307
+ "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz",
5308
+ "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==",
5309
+ "dev": true,
5310
+ "requires": {
5311
+ "each-props": "^1.3.2",
5312
+ "is-plain-object": "^5.0.0"
5313
+ }
5314
+ },
5315
+ "core-util-is": {
5316
+ "version": "1.0.3",
5317
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
5318
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
5319
+ "dev": true
5320
+ },
5321
+ "d": {
5322
+ "version": "1.0.1",
5323
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
5324
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
5325
+ "dev": true,
5326
+ "requires": {
5327
+ "es5-ext": "^0.10.50",
5328
+ "type": "^1.0.1"
5329
+ }
5330
+ },
5331
+ "dateformat": {
5332
+ "version": "2.2.0",
5333
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
5334
+ "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=",
5335
+ "dev": true
5336
+ },
5337
+ "debug": {
5338
+ "version": "2.6.9",
5339
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
5340
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
5341
+ "dev": true,
5342
+ "requires": {
5343
+ "ms": "2.0.0"
5344
+ }
5345
+ },
5346
+ "decamelize": {
5347
+ "version": "1.2.0",
5348
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
5349
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
5350
+ "dev": true
5351
+ },
5352
+ "decode-uri-component": {
5353
+ "version": "0.2.0",
5354
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
5355
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
5356
+ "dev": true
5357
+ },
5358
+ "default-compare": {
5359
+ "version": "1.0.0",
5360
+ "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
5361
+ "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
5362
+ "dev": true,
5363
+ "requires": {
5364
+ "kind-of": "^5.0.2"
5365
+ }
5366
+ },
5367
+ "default-resolution": {
5368
+ "version": "2.0.0",
5369
+ "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
5370
+ "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=",
5371
+ "dev": true
5372
+ },
5373
+ "define-properties": {
5374
+ "version": "1.1.3",
5375
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
5376
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
5377
+ "dev": true,
5378
+ "requires": {
5379
+ "object-keys": "^1.0.12"
5380
+ }
5381
+ },
5382
+ "define-property": {
5383
+ "version": "2.0.2",
5384
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
5385
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
5386
+ "dev": true,
5387
+ "requires": {
5388
+ "is-descriptor": "^1.0.2",
5389
+ "isobject": "^3.0.1"
5390
+ }
5391
+ },
5392
+ "detect-file": {
5393
+ "version": "1.0.0",
5394
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
5395
+ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
5396
+ "dev": true
5397
+ },
5398
+ "duplexer2": {
5399
+ "version": "0.0.2",
5400
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
5401
+ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
5402
+ "dev": true,
5403
+ "requires": {
5404
+ "readable-stream": "~1.1.9"
5405
+ },
5406
+ "dependencies": {
5407
+ "isarray": {
5408
+ "version": "0.0.1",
5409
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
5410
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
5411
+ "dev": true
5412
+ },
5413
+ "readable-stream": {
5414
+ "version": "1.1.14",
5415
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
5416
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
5417
+ "dev": true,
5418
+ "requires": {
5419
+ "core-util-is": "~1.0.0",
5420
+ "inherits": "~2.0.1",
5421
+ "isarray": "0.0.1",
5422
+ "string_decoder": "~0.10.x"
5423
+ }
5424
+ },
5425
+ "string_decoder": {
5426
+ "version": "0.10.31",
5427
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
5428
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
5429
+ "dev": true
5430
+ }
5431
+ }
5432
+ },
5433
+ "duplexify": {
5434
+ "version": "3.7.1",
5435
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
5436
+ "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
5437
+ "dev": true,
5438
+ "requires": {
5439
+ "end-of-stream": "^1.0.0",
5440
+ "inherits": "^2.0.1",
5441
+ "readable-stream": "^2.0.0",
5442
+ "stream-shift": "^1.0.0"
5443
+ }
5444
+ },
5445
+ "each-props": {
5446
+ "version": "1.3.2",
5447
+ "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
5448
+ "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
5449
+ "dev": true,
5450
+ "requires": {
5451
+ "is-plain-object": "^2.0.1",
5452
+ "object.defaults": "^1.1.0"
5453
+ },
5454
+ "dependencies": {
5455
+ "is-plain-object": {
5456
+ "version": "2.0.4",
5457
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
5458
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
5459
+ "dev": true,
5460
+ "requires": {
5461
+ "isobject": "^3.0.1"
5462
+ }
5463
+ }
5464
+ }
5465
+ },
5466
+ "end-of-stream": {
5467
+ "version": "1.4.4",
5468
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
5469
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
5470
+ "dev": true,
5471
+ "requires": {
5472
+ "once": "^1.4.0"
5473
+ }
5474
+ },
5475
+ "error-ex": {
5476
+ "version": "1.3.2",
5477
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
5478
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
5479
+ "dev": true,
5480
+ "requires": {
5481
+ "is-arrayish": "^0.2.1"
5482
+ }
5483
+ },
5484
+ "es5-ext": {
5485
+ "version": "0.10.53",
5486
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
5487
+ "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
5488
+ "dev": true,
5489
+ "requires": {
5490
+ "es6-iterator": "~2.0.3",
5491
+ "es6-symbol": "~3.1.3",
5492
+ "next-tick": "~1.0.0"
5493
+ }
5494
+ },
5495
+ "es6-iterator": {
5496
+ "version": "2.0.3",
5497
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
5498
+ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
5499
+ "dev": true,
5500
+ "requires": {
5501
+ "d": "1",
5502
+ "es5-ext": "^0.10.35",
5503
+ "es6-symbol": "^3.1.1"
5504
+ }
5505
+ },
5506
+ "es6-symbol": {
5507
+ "version": "3.1.3",
5508
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
5509
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
5510
+ "dev": true,
5511
+ "requires": {
5512
+ "d": "^1.0.1",
5513
+ "ext": "^1.1.2"
5514
+ }
5515
+ },
5516
+ "es6-weak-map": {
5517
+ "version": "2.0.3",
5518
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
5519
+ "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
5520
+ "dev": true,
5521
+ "requires": {
5522
+ "d": "1",
5523
+ "es5-ext": "^0.10.46",
5524
+ "es6-iterator": "^2.0.3",
5525
+ "es6-symbol": "^3.1.1"
5526
+ }
5527
+ },
5528
+ "escape-string-regexp": {
5529
+ "version": "1.0.5",
5530
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
5531
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
5532
+ "dev": true
5533
+ },
5534
+ "expand-brackets": {
5535
+ "version": "2.1.4",
5536
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
5537
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
5538
+ "dev": true,
5539
+ "requires": {
5540
+ "debug": "^2.3.3",
5541
+ "define-property": "^0.2.5",
5542
+ "extend-shallow": "^2.0.1",
5543
+ "posix-character-classes": "^0.1.0",
5544
+ "regex-not": "^1.0.0",
5545
+ "snapdragon": "^0.8.1",
5546
+ "to-regex": "^3.0.1"
5547
+ },
5548
+ "dependencies": {
5549
+ "define-property": {
5550
+ "version": "0.2.5",
5551
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
5552
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
5553
+ "dev": true,
5554
+ "requires": {
5555
+ "is-descriptor": "^0.1.0"
5556
+ }
5557
+ },
5558
+ "is-accessor-descriptor": {
5559
+ "version": "0.1.6",
5560
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
5561
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
5562
+ "dev": true,
5563
+ "requires": {
5564
+ "kind-of": "^3.0.2"
5565
+ },
5566
+ "dependencies": {
5567
+ "kind-of": {
5568
+ "version": "3.2.2",
5569
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5570
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5571
+ "dev": true,
5572
+ "requires": {
5573
+ "is-buffer": "^1.1.5"
5574
+ }
5575
+ }
5576
+ }
5577
+ },
5578
+ "is-data-descriptor": {
5579
+ "version": "0.1.4",
5580
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
5581
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
5582
+ "dev": true,
5583
+ "requires": {
5584
+ "kind-of": "^3.0.2"
5585
+ },
5586
+ "dependencies": {
5587
+ "kind-of": {
5588
+ "version": "3.2.2",
5589
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
5590
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
5591
+ "dev": true,
5592
+ "requires": {
5593
+ "is-buffer": "^1.1.5"
5594
+ }
5595
+ }
5596
+ }
5597
+ },
5598
+ "is-descriptor": {
5599
+ "version": "0.1.6",
5600
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
5601
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
5602
+ "dev": true,
5603
+ "requires": {
5604
+ "is-accessor-descriptor": "^0.1.6",
5605
+ "is-data-descriptor": "^0.1.4",
5606
+ "kind-of": "^5.0.0"
5607
+ }
5608
+ }
5609
+ }
5610
+ },
5611
+ "expand-tilde": {
5612
+ "version": "2.0.2",
5613
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
5614
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
5615
+ "dev": true,
5616
+ "requires": {
5617
+ "homedir-polyfill": "^1.0.1"
5618
+ }
5619
+ },
5620
+ "ext": {
5621
+ "version": "1.6.0",
5622
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz",
5623
+ "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==",
5624
+ "dev": true,
5625
+ "requires": {
5626
+ "type": "^2.5.0"
5627
+ },
5628
+ "dependencies": {
5629
+ "type": {
5630
+ "version": "2.5.0",
5631
+ "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
5632
+ "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==",
5633
+ "dev": true
5634
+ }
5635
+ }
5636
+ },
5637
+ "extend": {
5638
+ "version": "3.0.2",
5639
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
5640
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
5641
+ "dev": true
5642
+ },
5643
+ "extend-shallow": {
5644
+ "version": "2.0.1",
5645
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
5646
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
5647
+ "dev": true,
5648
+ "requires": {
5649
+ "is-extendable": "^0.1.0"
5650
+ }
5651
+ },
5652
+ "extglob": {
5653
+ "version": "2.0.4",
5654
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
5655
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
5656
+ "dev": true,
5657
+ "requires": {
5658
+ "array-unique": "^0.3.2",
5659
+ "define-property": "^1.0.0",
5660
+ "expand-brackets": "^2.1.4",
5661
+ "extend-shallow": "^2.0.1",
5662
+ "fragment-cache": "^0.2.1",
5663
+ "regex-not": "^1.0.0",
5664
+ "snapdragon": "^0.8.1",
5665
+ "to-regex": "^3.0.1"
5666
+ },
5667
+ "dependencies": {
5668
+ "define-property": {
5669
+ "version": "1.0.0",
5670
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
5671
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
5672
+ "dev": true,
5673
+ "requires": {
5674
+ "is-descriptor": "^1.0.0"
5675
+ }
5676
+ }
5677
+ }
5678
+ },
5679
+ "fancy-log": {
5680
+ "version": "1.3.3",
5681
+ "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
5682
+ "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
5683
+ "dev": true,
5684
+ "requires": {
5685
+ "ansi-gray": "^0.1.1",
5686
+ "color-support": "^1.1.3",
5687
+ "parse-node-version": "^1.0.0",
5688
+ "time-stamp": "^1.0.0"
5689
+ }
5690
+ },
5691
+ "fast-levenshtein": {
5692
+ "version": "1.1.4",
5693
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz",
5694
+ "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=",
5695
+ "dev": true
5696
+ },
5697
+ "file-uri-to-path": {
5698
+ "version": "1.0.0",
5699
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
5700
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
5701
+ "dev": true,
5702
+ "optional": true
5703
+ },
5704
+ "fill-range": {
5705
+ "version": "4.0.0",
5706
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
5707
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
5708
+ "dev": true,
5709
+ "requires": {
5710
+ "extend-shallow": "^2.0.1",
5711
+ "is-number": "^3.0.0",
5712
+ "repeat-string": "^1.6.1",
5713
+ "to-regex-range": "^2.1.0"
5714
+ }
5715
+ },
5716
+ "find-up": {
5717
+ "version": "1.1.2",
5718
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
5719
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
5720
+ "dev": true,
5721
+ "requires": {
5722
+ "path-exists": "^2.0.0",
5723
+ "pinkie-promise": "^2.0.0"
5724
+ }
5725
+ },
5726
+ "findup-sync": {
5727
+ "version": "3.0.0",
5728
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
5729
+ "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
5730
+ "dev": true,
5731
+ "requires": {
5732
+ "detect-file": "^1.0.0",
5733
+ "is-glob": "^4.0.0",
5734
+ "micromatch": "^3.0.4",
5735
+ "resolve-dir": "^1.0.1"
5736
+ }
5737
+ },
5738
+ "fined": {
5739
+ "version": "1.2.0",
5740
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
5741
+ "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
5742
+ "dev": true,
5743
+ "requires": {
5744
+ "expand-tilde": "^2.0.2",
5745
+ "is-plain-object": "^2.0.3",
5746
+ "object.defaults": "^1.1.0",
5747
+ "object.pick": "^1.2.0",
5748
+ "parse-filepath": "^1.0.1"
5749
+ },
5750
+ "dependencies": {
5751
+ "is-plain-object": {
5752
+ "version": "2.0.4",
5753
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
5754
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
5755
+ "dev": true,
5756
+ "requires": {
5757
+ "isobject": "^3.0.1"
5758
+ }
5759
+ }
5760
+ }
5761
+ },
5762
+ "flagged-respawn": {
5763
+ "version": "1.0.1",
5764
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
5765
+ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
5766
+ "dev": true
5767
+ },
5768
+ "flush-write-stream": {
5769
+ "version": "1.1.1",
5770
+ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
5771
+ "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
5772
+ "dev": true,
5773
+ "requires": {
5774
+ "inherits": "^2.0.3",
5775
+ "readable-stream": "^2.3.6"
5776
+ }
5777
+ },
5778
+ "for-in": {
5779
+ "version": "1.0.2",
5780
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
5781
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
5782
+ "dev": true
5783
+ },
5784
+ "for-own": {
5785
+ "version": "1.0.0",
5786
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
5787
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
5788
+ "dev": true,
5789
+ "requires": {
5790
+ "for-in": "^1.0.1"
5791
+ }
5792
+ },
5793
+ "fragment-cache": {
5794
+ "version": "0.2.1",
5795
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
5796
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
5797
+ "dev": true,
5798
+ "requires": {
5799
+ "map-cache": "^0.2.2"
5800
+ }
5801
+ },
5802
+ "fs-mkdirp-stream": {
5803
+ "version": "1.0.0",
5804
+ "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
5805
+ "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
5806
+ "dev": true,
5807
+ "requires": {
5808
+ "graceful-fs": "^4.1.11",
5809
+ "through2": "^2.0.3"
5810
+ },
5811
+ "dependencies": {
5812
+ "through2": {
5813
+ "version": "2.0.5",
5814
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
5815
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
5816
+ "dev": true,
5817
+ "requires": {
5818
+ "readable-stream": "~2.3.6",
5819
+ "xtend": "~4.0.1"
5820
+ }
5821
+ }
5822
+ }
5823
+ },
5824
+ "fs.realpath": {
5825
+ "version": "1.0.0",
5826
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
5827
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
5828
+ "dev": true
5829
+ },
5830
+ "fsevents": {
5831
+ "version": "1.2.13",
5832
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
5833
+ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
5834
+ "dev": true,
5835
+ "optional": true,
5836
+ "requires": {
5837
+ "bindings": "^1.5.0",
5838
+ "nan": "^2.12.1"
5839
+ }
5840
+ },
5841
+ "function-bind": {
5842
+ "version": "1.1.1",
5843
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
5844
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
5845
+ "dev": true
5846
+ },
5847
+ "get-caller-file": {
5848
+ "version": "1.0.3",
5849
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
5850
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
5851
+ "dev": true
5852
+ },
5853
+ "get-intrinsic": {
5854
+ "version": "1.1.1",
5855
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
5856
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
5857
+ "dev": true,
5858
+ "requires": {
5859
+ "function-bind": "^1.1.1",
5860
+ "has": "^1.0.3",
5861
+ "has-symbols": "^1.0.1"
5862
+ }
5863
+ },
5864
+ "get-value": {
5865
+ "version": "2.0.6",
5866
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
5867
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
5868
+ "dev": true
5869
+ },
5870
+ "glob": {
5871
+ "version": "7.2.0",
5872
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
5873
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
5874
+ "dev": true,
5875
+ "requires": {
5876
+ "fs.realpath": "^1.0.0",
5877
+ "inflight": "^1.0.4",
5878
+ "inherits": "2",
5879
+ "minimatch": "^3.0.4",
5880
+ "once": "^1.3.0",
5881
+ "path-is-absolute": "^1.0.0"
5882
+ }
5883
+ },
5884
+ "glob-parent": {
5885
+ "version": "3.1.0",
5886
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
5887
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
5888
+ "dev": true,
5889
+ "requires": {
5890
+ "is-glob": "^3.1.0",
5891
+ "path-dirname": "^1.0.0"
5892
+ },
5893
+ "dependencies": {
5894
+ "is-glob": {
5895
+ "version": "3.1.0",
5896
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
5897
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
5898
+ "dev": true,
5899
+ "requires": {
5900
+ "is-extglob": "^2.1.0"
5901
+ }
5902
+ }
5903
+ }
5904
+ },
5905
+ "glob-stream": {
5906
+ "version": "6.1.0",
5907
+ "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
5908
+ "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
5909
+ "dev": true,
5910
+ "requires": {
5911
+ "extend": "^3.0.0",
5912
+ "glob": "^7.1.1",
5913
+ "glob-parent": "^3.1.0",
5914
+ "is-negated-glob": "^1.0.0",
5915
+ "ordered-read-streams": "^1.0.0",
5916
+ "pumpify": "^1.3.5",
5917
+ "readable-stream": "^2.1.5",
5918
+ "remove-trailing-separator": "^1.0.1",
5919
+ "to-absolute-glob": "^2.0.0",
5920
+ "unique-stream": "^2.0.2"
5921
+ }
5922
+ },
5923
+ "glob-watcher": {
5924
+ "version": "5.0.5",
5925
+ "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz",
5926
+ "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==",
5927
+ "dev": true,
5928
+ "requires": {
5929
+ "anymatch": "^2.0.0",
5930
+ "async-done": "^1.2.0",
5931
+ "chokidar": "^2.0.0",
5932
+ "is-negated-glob": "^1.0.0",
5933
+ "just-debounce": "^1.0.0",
5934
+ "normalize-path": "^3.0.0",
5935
+ "object.defaults": "^1.1.0"
5936
+ }
5937
+ },
5938
+ "global-modules": {
5939
+ "version": "1.0.0",
5940
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
5941
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
5942
+ "dev": true,
5943
+ "requires": {
5944
+ "global-prefix": "^1.0.1",
5945
+ "is-windows": "^1.0.1",
5946
+ "resolve-dir": "^1.0.0"
5947
+ }
5948
+ },
5949
+ "global-prefix": {
5950
+ "version": "1.0.2",
5951
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
5952
+ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
5953
+ "dev": true,
5954
+ "requires": {
5955
+ "expand-tilde": "^2.0.2",
5956
+ "homedir-polyfill": "^1.0.1",
5957
+ "ini": "^1.3.4",
5958
+ "is-windows": "^1.0.1",
5959
+ "which": "^1.2.14"
5960
+ },
5961
+ "dependencies": {
5962
+ "which": {
5963
+ "version": "1.3.1",
5964
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
5965
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
5966
+ "dev": true,
5967
+ "requires": {
5968
+ "isexe": "^2.0.0"
5969
+ }
5970
+ }
5971
+ }
5972
+ },
5973
+ "glogg": {
5974
+ "version": "1.0.2",
5975
+ "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
5976
+ "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
5977
+ "dev": true,
5978
+ "requires": {
5979
+ "sparkles": "^1.0.0"
5980
+ }
5981
+ },
5982
+ "graceful-fs": {
5983
+ "version": "4.2.8",
5984
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
5985
+ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
5986
+ "dev": true
5987
+ },
5988
+ "growly": {
5989
+ "version": "1.3.0",
5990
+ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
5991
+ "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
5992
+ "dev": true
5993
+ },
5994
+ "gulp": {
5995
+ "version": "4.0.2",
5996
+ "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
5997
+ "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
5998
+ "dev": true,
5999
+ "requires": {
6000
+ "glob-watcher": "^5.0.3",
6001
+ "gulp-cli": "^2.2.0",
6002
+ "undertaker": "^1.2.1",
6003
+ "vinyl-fs": "^3.0.0"
6004
+ }
6005
+ },
6006
+ "gulp-cli": {
6007
+ "version": "2.3.0",
6008
+ "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz",
6009
+ "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==",
6010
+ "dev": true,
6011
+ "requires": {
6012
+ "ansi-colors": "^1.0.1",
6013
+ "archy": "^1.0.0",
6014
+ "array-sort": "^1.0.0",
6015
+ "color-support": "^1.1.3",
6016
+ "concat-stream": "^1.6.0",
6017
+ "copy-props": "^2.0.1",
6018
+ "fancy-log": "^1.3.2",
6019
+ "gulplog": "^1.0.0",
6020
+ "interpret": "^1.4.0",
6021
+ "isobject": "^3.0.1",
6022
+ "liftoff": "^3.1.0",
6023
+ "matchdep": "^2.0.0",
6024
+ "mute-stdout": "^1.0.0",
6025
+ "pretty-hrtime": "^1.0.0",
6026
+ "replace-homedir": "^1.0.0",
6027
+ "semver-greatest-satisfied-range": "^1.1.0",
6028
+ "v8flags": "^3.2.0",
6029
+ "yargs": "^7.1.0"
6030
+ }
6031
+ },
6032
+ "gulp-notify": {
6033
+ "version": "4.0.0",
6034
+ "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-4.0.0.tgz",
6035
+ "integrity": "sha512-0cdDvZkHVqu4tqrcOI/jL5YdxYEIPQ7+p3YxnO48w5hhPSisvogZ887qL+fpYItg9m4MUhJ5Se8p8xGy3uJESA==",
6036
+ "dev": true,
6037
+ "requires": {
6038
+ "ansi-colors": "^4.1.1",
6039
+ "fancy-log": "^1.3.3",
6040
+ "lodash.template": "^4.5.0",
6041
+ "node-notifier": "^9.0.1",
6042
+ "node.extend": "^2.0.2",
6043
+ "plugin-error": "^1.0.1",
6044
+ "through2": "^4.0.2"
6045
+ },
6046
+ "dependencies": {
6047
+ "ansi-colors": {
6048
+ "version": "4.1.1",
6049
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
6050
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
6051
+ "dev": true
6052
+ }
6053
+ }
6054
+ },
6055
+ "gulp-sort": {
6056
+ "version": "2.0.0",
6057
+ "resolved": "https://registry.npmjs.org/gulp-sort/-/gulp-sort-2.0.0.tgz",
6058
+ "integrity": "sha1-xnYqLx8N4KP8WVohWZ0/rI26Gso=",
6059
+ "dev": true,
6060
+ "requires": {
6061
+ "through2": "^2.0.1"
6062
+ },
6063
+ "dependencies": {
6064
+ "through2": {
6065
+ "version": "2.0.5",
6066
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
6067
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
6068
+ "dev": true,
6069
+ "requires": {
6070
+ "readable-stream": "~2.3.6",
6071
+ "xtend": "~4.0.1"
6072
+ }
6073
+ }
6074
+ }
6075
+ },
6076
+ "gulp-util": {
6077
+ "version": "3.0.8",
6078
+ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
6079
+ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
6080
+ "dev": true,
6081
+ "requires": {
6082
+ "array-differ": "^1.0.0",
6083
+ "array-uniq": "^1.0.2",
6084
+ "beeper": "^1.0.0",
6085
+ "chalk": "^1.0.0",
6086
+ "dateformat": "^2.0.0",
6087
+ "fancy-log": "^1.1.0",
6088
+ "gulplog": "^1.0.0",
6089
+ "has-gulplog": "^0.1.0",
6090
+ "lodash._reescape": "^3.0.0",
6091
+ "lodash._reevaluate": "^3.0.0",
6092
+ "lodash._reinterpolate": "^3.0.0",
6093
+ "lodash.template": "^3.0.0",
6094
+ "minimist": "^1.1.0",
6095
+ "multipipe": "^0.1.2",
6096
+ "object-assign": "^3.0.0",
6097
+ "replace-ext": "0.0.1",
6098
+ "through2": "^2.0.0",
6099
+ "vinyl": "^0.5.0"
6100
+ },
6101
+ "dependencies": {
6102
+ "clone": {
6103
+ "version": "1.0.4",
6104
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
6105
+ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
6106
+ "dev": true
6107
+ },
6108
+ "clone-stats": {
6109
+ "version": "0.0.1",
6110
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
6111
+ "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
6112
+ "dev": true
6113
+ },
6114
+ "lodash.template": {
6115
+ "version": "3.6.2",
6116
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
6117
+ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
6118
+ "dev": true,
6119
+ "requires": {
6120
+ "lodash._basecopy": "^3.0.0",
6121
+ "lodash._basetostring": "^3.0.0",
6122
+ "lodash._basevalues": "^3.0.0",
6123
+ "lodash._isiterateecall": "^3.0.0",
6124
+ "lodash._reinterpolate": "^3.0.0",
6125
+ "lodash.escape": "^3.0.0",
6126
+ "lodash.keys": "^3.0.0",
6127
+ "lodash.restparam": "^3.0.0",
6128
+ "lodash.templatesettings": "^3.0.0"
6129
+ }
6130
+ },
6131
+ "lodash.templatesettings": {
6132
+ "version": "3.1.1",
6133
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
6134
+ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
6135
+ "dev": true,
6136
+ "requires": {
6137
+ "lodash._reinterpolate": "^3.0.0",
6138
+ "lodash.escape": "^3.0.0"
6139
+ }
6140
+ },
6141
+ "replace-ext": {
6142
+ "version": "0.0.1",
6143
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
6144
+ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
6145
+ "dev": true
6146
+ },
6147
+ "through2": {
6148
+ "version": "2.0.5",
6149
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
6150
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
6151
+ "dev": true,
6152
+ "requires": {
6153
+ "readable-stream": "~2.3.6",
6154
+ "xtend": "~4.0.1"
6155
+ }
6156
+ },
6157
+ "vinyl": {
6158
+ "version": "0.5.3",
6159
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
6160
+ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
6161
+ "dev": true,
6162
+ "requires": {
6163
+ "clone": "^1.0.0",
6164
+ "clone-stats": "^0.0.1",
6165
+ "replace-ext": "0.0.1"
6166
+ }
6167
+ }
6168
+ }
6169
+ },
6170
+ "gulp-wp-pot": {
6171
+ "version": "2.5.0",
6172
+ "resolved": "https://registry.npmjs.org/gulp-wp-pot/-/gulp-wp-pot-2.5.0.tgz",
6173
+ "integrity": "sha512-3IIVEsgAaRFi4DWv5hRZcM7VEsCtGD4ZxgPL8qPdX+yrSpwD8I2+Q1cP3olXhn7KLJsnGSNuqor5sxo97H5pmQ==",
6174
+ "dev": true,
6175
+ "requires": {
6176
+ "plugin-error": "^1.0.1",
6177
+ "vinyl": "^2.2.1",
6178
+ "wp-pot": "^1.9.6"
6179
+ }
6180
+ },
6181
+ "gulplog": {
6182
+ "version": "1.0.0",
6183
+ "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
6184
+ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
6185
+ "dev": true,
6186
+ "requires": {
6187
+ "glogg": "^1.0.0"
6188
+ }
6189
+ },
6190
+ "has": {
6191
+ "version": "1.0.3",
6192
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
6193
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
6194
+ "dev": true,
6195
+ "requires": {
6196
+ "function-bind": "^1.1.1"
6197
+ }
6198
+ },
6199
+ "has-ansi": {
6200
+ "version": "2.0.0",
6201
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
6202
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
6203
+ "dev": true,
6204
+ "requires": {
6205
+ "ansi-regex": "^2.0.0"
6206
+ }
6207
+ },
6208
+ "has-gulplog": {
6209
+ "version": "0.1.0",
6210
+ "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
6211
+ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
6212
+ "dev": true,
6213
+ "requires": {
6214
+ "sparkles": "^1.0.0"
6215
+ }
6216
+ },
6217
+ "has-symbols": {
6218
+ "version": "1.0.2",
6219
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
6220
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
6221
+ "dev": true
6222
+ },
6223
+ "has-value": {
6224
+ "version": "1.0.0",
6225
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
6226
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
6227
+ "dev": true,
6228
+ "requires": {
6229
+ "get-value": "^2.0.6",
6230
+ "has-values": "^1.0.0",
6231
+ "isobject": "^3.0.0"
6232
+ }
6233
+ },
6234
+ "has-values": {
6235
+ "version": "1.0.0",
6236
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
6237
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
6238
+ "dev": true,
6239
+ "requires": {
6240
+ "is-number": "^3.0.0",
6241
+ "kind-of": "^4.0.0"
6242
+ },
6243
+ "dependencies": {
6244
+ "kind-of": {
6245
+ "version": "4.0.0",
6246
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
6247
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
6248
+ "dev": true,
6249
+ "requires": {
6250
+ "is-buffer": "^1.1.5"
6251
+ }
6252
+ }
6253
+ }
6254
+ },
6255
+ "homedir-polyfill": {
6256
+ "version": "1.0.3",
6257
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
6258
+ "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
6259
+ "dev": true,
6260
+ "requires": {
6261
+ "parse-passwd": "^1.0.0"
6262
+ }
6263
+ },
6264
+ "hosted-git-info": {
6265
+ "version": "2.8.9",
6266
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
6267
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
6268
+ "dev": true
6269
+ },
6270
+ "inflight": {
6271
+ "version": "1.0.6",
6272
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
6273
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
6274
+ "dev": true,
6275
+ "requires": {
6276
+ "once": "^1.3.0",
6277
+ "wrappy": "1"
6278
+ }
6279
+ },
6280
+ "inherits": {
6281
+ "version": "2.0.4",
6282
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
6283
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
6284
+ "dev": true
6285
+ },
6286
+ "ini": {
6287
+ "version": "1.3.8",
6288
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
6289
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
6290
+ "dev": true
6291
+ },
6292
+ "interpret": {
6293
+ "version": "1.4.0",
6294
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
6295
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
6296
+ "dev": true
6297
+ },
6298
+ "invert-kv": {
6299
+ "version": "1.0.0",
6300
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
6301
+ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
6302
+ "dev": true
6303
+ },
6304
+ "is": {
6305
+ "version": "3.3.0",
6306
+ "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz",
6307
+ "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==",
6308
+ "dev": true
6309
+ },
6310
+ "is-absolute": {
6311
+ "version": "1.0.0",
6312
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
6313
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
6314
+ "dev": true,
6315
+ "requires": {
6316
+ "is-relative": "^1.0.0",
6317
+ "is-windows": "^1.0.1"
6318
+ }
6319
+ },
6320
+ "is-accessor-descriptor": {
6321
+ "version": "1.0.0",
6322
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
6323
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
6324
+ "dev": true,
6325
+ "requires": {
6326
+ "kind-of": "^6.0.0"
6327
+ },
6328
+ "dependencies": {
6329
+ "kind-of": {
6330
+ "version": "6.0.3",
6331
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
6332
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
6333
+ "dev": true
6334
+ }
6335
+ }
6336
+ },
6337
+ "is-arrayish": {
6338
+ "version": "0.2.1",
6339
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
6340
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
6341
+ "dev": true
6342
+ },
6343
+ "is-binary-path": {
6344
+ "version": "1.0.1",
6345
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
6346
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
6347
+ "dev": true,
6348
+ "requires": {
6349
+ "binary-extensions": "^1.0.0"
6350
+ }
6351
+ },
6352
+ "is-buffer": {
6353
+ "version": "1.1.6",
6354
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
6355
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
6356
+ "dev": true
6357
+ },
6358
+ "is-core-module": {
6359
+ "version": "2.8.0",
6360
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
6361
+ "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
6362
+ "dev": true,
6363
+ "requires": {
6364
+ "has": "^1.0.3"
6365
+ }
6366
+ },
6367
+ "is-data-descriptor": {
6368
+ "version": "1.0.0",
6369
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
6370
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
6371
+ "dev": true,
6372
+ "requires": {
6373
+ "kind-of": "^6.0.0"
6374
+ },
6375
+ "dependencies": {
6376
+ "kind-of": {
6377
+ "version": "6.0.3",
6378
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
6379
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
6380
+ "dev": true
6381
+ }
6382
+ }
6383
+ },
6384
+ "is-descriptor": {
6385
+ "version": "1.0.2",
6386
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
6387
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
6388
+ "dev": true,
6389
+ "requires": {
6390
+ "is-accessor-descriptor": "^1.0.0",
6391
+ "is-data-descriptor": "^1.0.0",
6392
+ "kind-of": "^6.0.2"
6393
+ },
6394
+ "dependencies": {
6395
+ "kind-of": {
6396
+ "version": "6.0.3",
6397
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
6398
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
6399
+ "dev": true
6400
+ }
6401
+ }
6402
+ },
6403
+ "is-docker": {
6404
+ "version": "2.2.1",
6405
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
6406
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
6407
+ "dev": true
6408
+ },
6409
+ "is-extendable": {
6410
+ "version": "0.1.1",
6411
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
6412
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
6413
+ "dev": true
6414
+ },
6415
+ "is-extglob": {
6416
+ "version": "2.1.1",
6417
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
6418
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
6419
+ "dev": true
6420
+ },
6421
+ "is-fullwidth-code-point": {
6422
+ "version": "1.0.0",
6423
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
6424
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
6425
+ "dev": true,
6426
+ "requires": {
6427
+ "number-is-nan": "^1.0.0"
6428
+ }
6429
+ },
6430
+ "is-glob": {
6431
+ "version": "4.0.3",
6432
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
6433
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
6434
+ "dev": true,
6435
+ "requires": {
6436
+ "is-extglob": "^2.1.1"
6437
+ }
6438
+ },
6439
+ "is-negated-glob": {
6440
+ "version": "1.0.0",
6441
+ "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
6442
+ "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
6443
+ "dev": true
6444
+ },
6445
+ "is-number": {
6446
+ "version": "3.0.0",
6447
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
6448
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
6449
+ "dev": true,
6450
+ "requires": {
6451
+ "kind-of": "^3.0.2"
6452
+ },
6453
+ "dependencies": {
6454
+ "kind-of": {
6455
+ "version": "3.2.2",
6456
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
6457
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
6458
+ "dev": true,
6459
+ "requires": {
6460
+ "is-buffer": "^1.1.5"
6461
+ }
6462
+ }
6463
+ }
6464
+ },
6465
+ "is-plain-object": {
6466
+ "version": "5.0.0",
6467
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
6468
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
6469
+ "dev": true
6470
+ },
6471
+ "is-relative": {
6472
+ "version": "1.0.0",
6473
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
6474
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
6475
+ "dev": true,
6476
+ "requires": {
6477
+ "is-unc-path": "^1.0.0"
6478
+ }
6479
+ },
6480
+ "is-unc-path": {
6481
+ "version": "1.0.0",
6482
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
6483
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
6484
+ "dev": true,
6485
+ "requires": {
6486
+ "unc-path-regex": "^0.1.2"
6487
+ }
6488
+ },
6489
+ "is-utf8": {
6490
+ "version": "0.2.1",
6491
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
6492
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
6493
+ "dev": true
6494
+ },
6495
+ "is-valid-glob": {
6496
+ "version": "1.0.0",
6497
+ "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
6498
+ "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
6499
+ "dev": true
6500
+ },
6501
+ "is-windows": {
6502
+ "version": "1.0.2",
6503
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
6504
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
6505
+ "dev": true
6506
+ },
6507
+ "is-wsl": {
6508
+ "version": "2.2.0",
6509
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
6510
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
6511
+ "dev": true,
6512
+ "requires": {
6513
+ "is-docker": "^2.0.0"
6514
+ }
6515
+ },
6516
+ "isarray": {
6517
+ "version": "1.0.0",
6518
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
6519
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
6520
+ "dev": true
6521
+ },
6522
+ "isexe": {
6523
+ "version": "2.0.0",
6524
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
6525
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
6526
+ "dev": true
6527
+ },
6528
+ "isobject": {
6529
+ "version": "3.0.1",
6530
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
6531
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
6532
+ "dev": true
6533
+ },
6534
+ "json-stable-stringify-without-jsonify": {
6535
+ "version": "1.0.1",
6536
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
6537
+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
6538
+ "dev": true
6539
+ },
6540
+ "just-debounce": {
6541
+ "version": "1.1.0",
6542
+ "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz",
6543
+ "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==",
6544
+ "dev": true
6545
+ },
6546
+ "kind-of": {
6547
+ "version": "5.1.0",
6548
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
6549
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
6550
+ "dev": true
6551
+ },
6552
+ "last-run": {
6553
+ "version": "1.1.1",
6554
+ "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
6555
+ "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
6556
+ "dev": true,
6557
+ "requires": {
6558
+ "default-resolution": "^2.0.0",
6559
+ "es6-weak-map": "^2.0.1"
6560
+ }
6561
+ },
6562
+ "lazystream": {
6563
+ "version": "1.0.1",
6564
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
6565
+ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",
6566
+ "dev": true,
6567
+ "requires": {
6568
+ "readable-stream": "^2.0.5"
6569
+ }
6570
+ },
6571
+ "lcid": {
6572
+ "version": "1.0.0",
6573
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
6574
+ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
6575
+ "dev": true,
6576
+ "requires": {
6577
+ "invert-kv": "^1.0.0"
6578
+ }
6579
+ },
6580
+ "lead": {
6581
+ "version": "1.0.0",
6582
+ "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
6583
+ "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
6584
+ "dev": true,
6585
+ "requires": {
6586
+ "flush-write-stream": "^1.0.2"
6587
+ }
6588
+ },
6589
+ "liftoff": {
6590
+ "version": "3.1.0",
6591
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
6592
+ "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
6593
+ "dev": true,
6594
+ "requires": {
6595
+ "extend": "^3.0.0",
6596
+ "findup-sync": "^3.0.0",
6597
+ "fined": "^1.0.1",
6598
+ "flagged-respawn": "^1.0.0",
6599
+ "is-plain-object": "^2.0.4",
6600
+ "object.map": "^1.0.0",
6601
+ "rechoir": "^0.6.2",
6602
+ "resolve": "^1.1.7"
6603
+ },
6604
+ "dependencies": {
6605
+ "is-plain-object": {
6606
+ "version": "2.0.4",
6607
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
6608
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
6609
+ "dev": true,
6610
+ "requires": {
6611
+ "isobject": "^3.0.1"
6612
+ }
6613
+ }
6614
+ }
6615
+ },
6616
+ "load-json-file": {
6617
+ "version": "1.1.0",
6618
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
6619
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
6620
+ "dev": true,
6621
+ "requires": {
6622
+ "graceful-fs": "^4.1.2",
6623
+ "parse-json": "^2.2.0",
6624
+ "pify": "^2.0.0",
6625
+ "pinkie-promise": "^2.0.0",
6626
+ "strip-bom": "^2.0.0"
6627
+ }
6628
+ },
6629
+ "lodash._basecopy": {
6630
+ "version": "3.0.1",
6631
+ "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
6632
+ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
6633
+ "dev": true
6634
+ },
6635
+ "lodash._basetostring": {
6636
+ "version": "3.0.1",
6637
+ "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
6638
+ "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
6639
+ "dev": true
6640
+ },
6641
+ "lodash._basevalues": {
6642
+ "version": "3.0.0",
6643
+ "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
6644
+ "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
6645
+ "dev": true
6646
+ },
6647
+ "lodash._getnative": {
6648
+ "version": "3.9.1",
6649
+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
6650
+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
6651
+ "dev": true
6652
+ },
6653
+ "lodash._isiterateecall": {
6654
+ "version": "3.0.9",
6655
+ "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
6656
+ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
6657
+ "dev": true
6658
+ },
6659
+ "lodash._reescape": {
6660
+ "version": "3.0.0",
6661
+ "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
6662
+ "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
6663
+ "dev": true
6664
+ },
6665
+ "lodash._reevaluate": {
6666
+ "version": "3.0.0",
6667
+ "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
6668
+ "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
6669
+ "dev": true
6670
+ },
6671
+ "lodash._reinterpolate": {
6672
+ "version": "3.0.0",
6673
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
6674
+ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
6675
+ "dev": true
6676
+ },
6677
+ "lodash._root": {
6678
+ "version": "3.0.1",
6679
+ "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
6680
+ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
6681
+ "dev": true
6682
+ },
6683
+ "lodash.escape": {
6684
+ "version": "3.2.0",
6685
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
6686
+ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
6687
+ "dev": true,
6688
+ "requires": {
6689
+ "lodash._root": "^3.0.0"
6690
+ }
6691
+ },
6692
+ "lodash.isarguments": {
6693
+ "version": "3.1.0",
6694
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
6695
+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
6696
+ "dev": true
6697
+ },
6698
+ "lodash.isarray": {
6699
+ "version": "3.0.4",
6700
+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
6701
+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
6702
+ "dev": true
6703
+ },
6704
+ "lodash.keys": {
6705
+ "version": "3.1.2",
6706
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
6707
+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
6708
+ "dev": true,
6709
+ "requires": {
6710
+ "lodash._getnative": "^3.0.0",
6711
+ "lodash.isarguments": "^3.0.0",
6712
+ "lodash.isarray": "^3.0.0"
6713
+ }
6714
+ },
6715
+ "lodash.restparam": {
6716
+ "version": "3.6.1",
6717
+ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
6718
+ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
6719
+ "dev": true
6720
+ },
6721
+ "lodash.template": {
6722
+ "version": "4.5.0",
6723
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz",
6724
+ "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
6725
+ "dev": true,
6726
+ "requires": {
6727
+ "lodash._reinterpolate": "^3.0.0",
6728
+ "lodash.templatesettings": "^4.0.0"
6729
+ }
6730
+ },
6731
+ "lodash.templatesettings": {
6732
+ "version": "4.2.0",
6733
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz",
6734
+ "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==",
6735
+ "dev": true,
6736
+ "requires": {
6737
+ "lodash._reinterpolate": "^3.0.0"
6738
+ }
6739
+ },
6740
+ "lru-cache": {
6741
+ "version": "6.0.0",
6742
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
6743
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
6744
+ "dev": true,
6745
+ "requires": {
6746
+ "yallist": "^4.0.0"
6747
+ }
6748
+ },
6749
+ "make-iterator": {
6750
+ "version": "1.0.1",
6751
+ "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
6752
+ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
6753
+ "dev": true,
6754
+ "requires": {
6755
+ "kind-of": "^6.0.2"
6756
+ },
6757
+ "dependencies": {
6758
+ "kind-of": {
6759
+ "version": "6.0.3",
6760
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
6761
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
6762
+ "dev": true
6763
+ }
6764
+ }
6765
+ },
6766
+ "map-cache": {
6767
+ "version": "0.2.2",
6768
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
6769
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
6770
+ "dev": true
6771
+ },
6772
+ "map-visit": {
6773
+ "version": "1.0.0",
6774
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
6775
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
6776
+ "dev": true,
6777
+ "requires": {
6778
+ "object-visit": "^1.0.0"
6779
+ }
6780
+ },
6781
+ "matchdep": {
6782
+ "version": "2.0.0",
6783
+ "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
6784
+ "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
6785
+ "dev": true,
6786
+ "requires": {
6787
+ "findup-sync": "^2.0.0",
6788
+ "micromatch": "^3.0.4",
6789
+ "resolve": "^1.4.0",
6790
+ "stack-trace": "0.0.10"
6791
+ },
6792
+ "dependencies": {
6793
+ "findup-sync": {
6794
+ "version": "2.0.0",
6795
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
6796
+ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
6797
+ "dev": true,
6798
+ "requires": {
6799
+ "detect-file": "^1.0.0",
6800
+ "is-glob": "^3.1.0",
6801
+ "micromatch": "^3.0.4",
6802
+ "resolve-dir": "^1.0.1"
6803
+ }
6804
+ },
6805
+ "is-glob": {
6806
+ "version": "3.1.0",
6807
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
6808
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
6809
+ "dev": true,
6810
+ "requires": {
6811
+ "is-extglob": "^2.1.0"
6812
+ }
6813
+ }
6814
+ }
6815
+ },
6816
+ "matched": {
6817
+ "version": "5.0.1",
6818
+ "resolved": "https://registry.npmjs.org/matched/-/matched-5.0.1.tgz",
6819
+ "integrity": "sha512-E1fhSTPRyhAlNaNvGXAgZQlq1hL0bgYMTk/6bktVlIhzUnX/SZs7296ACdVeNJE8xFNGSuvd9IpI7vSnmcqLvw==",
6820
+ "dev": true,
6821
+ "requires": {
6822
+ "glob": "^7.1.6",
6823
+ "picomatch": "^2.2.1"
6824
+ }
6825
+ },
6826
+ "micromatch": {
6827
+ "version": "3.1.10",
6828
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
6829
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
6830
+ "dev": true,
6831
+ "requires": {
6832
+ "arr-diff": "^4.0.0",
6833
+ "array-unique": "^0.3.2",
6834
+ "braces": "^2.3.1",
6835
+ "define-property": "^2.0.2",
6836
+ "extend-shallow": "^3.0.2",
6837
+ "extglob": "^2.0.4",
6838
+ "fragment-cache": "^0.2.1",
6839
+ "kind-of": "^6.0.2",
6840
+ "nanomatch": "^1.2.9",
6841
+ "object.pick": "^1.3.0",
6842
+ "regex-not": "^1.0.0",
6843
+ "snapdragon": "^0.8.1",
6844
+ "to-regex": "^3.0.2"
6845
+ },
6846
+ "dependencies": {
6847
+ "extend-shallow": {
6848
+ "version": "3.0.2",
6849
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
6850
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
6851
+ "dev": true,
6852
+ "requires": {
6853
+ "assign-symbols": "^1.0.0",
6854
+ "is-extendable": "^1.0.1"
6855
+ }
6856
+ },
6857
+ "is-extendable": {
6858
+ "version": "1.0.1",
6859
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
6860
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
6861
+ "dev": true,
6862
+ "requires": {
6863
+ "is-plain-object": "^2.0.4"
6864
+ }
6865
+ },
6866
+ "is-plain-object": {
6867
+ "version": "2.0.4",
6868
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
6869
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
6870
+ "dev": true,
6871
+ "requires": {
6872
+ "isobject": "^3.0.1"
6873
+ }
6874
+ },
6875
+ "kind-of": {
6876
+ "version": "6.0.3",
6877
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
6878
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
6879
+ "dev": true
6880
+ }
6881
+ }
6882
+ },
6883
+ "minimatch": {
6884
+ "version": "3.0.4",
6885
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
6886
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
6887
+ "dev": true,
6888
+ "requires": {
6889
+ "brace-expansion": "^1.1.7"
6890
+ }
6891
+ },
6892
+ "minimist": {
6893
+ "version": "1.2.5",
6894
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
6895
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
6896
+ "dev": true
6897
+ },
6898
+ "mixin-deep": {
6899
+ "version": "1.3.2",
6900
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
6901
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
6902
+ "dev": true,
6903
+ "requires": {
6904
+ "for-in": "^1.0.2",
6905
+ "is-extendable": "^1.0.1"
6906
+ },
6907
+ "dependencies": {
6908
+ "is-extendable": {
6909
+ "version": "1.0.1",
6910
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
6911
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
6912
+ "dev": true,
6913
+ "requires": {
6914
+ "is-plain-object": "^2.0.4"
6915
+ }
6916
+ },
6917
+ "is-plain-object": {
6918
+ "version": "2.0.4",
6919
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
6920
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
6921
+ "dev": true,
6922
+ "requires": {
6923
+ "isobject": "^3.0.1"
6924
+ }
6925
+ }
6926
+ }
6927
+ },
6928
+ "ms": {
6929
+ "version": "2.0.0",
6930
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
6931
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
6932
+ "dev": true
6933
+ },
6934
+ "multipipe": {
6935
+ "version": "0.1.2",
6936
+ "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
6937
+ "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
6938
+ "dev": true,
6939
+ "requires": {
6940
+ "duplexer2": "0.0.2"
6941
+ }
6942
+ },
6943
+ "mute-stdout": {
6944
+ "version": "1.0.1",
6945
+ "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
6946
+ "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==",
6947
+ "dev": true
6948
+ },
6949
+ "nan": {
6950
+ "version": "2.15.0",
6951
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
6952
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
6953
+ "dev": true,
6954
+ "optional": true
6955
+ },
6956
+ "nanomatch": {
6957
+ "version": "1.2.13",
6958
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
6959
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
6960
+ "dev": true,
6961
+ "requires": {
6962
+ "arr-diff": "^4.0.0",
6963
+ "array-unique": "^0.3.2",
6964
+ "define-property": "^2.0.2",
6965
+ "extend-shallow": "^3.0.2",
6966
+ "fragment-cache": "^0.2.1",
6967
+ "is-windows": "^1.0.2",
6968
+ "kind-of": "^6.0.2",
6969
+ "object.pick": "^1.3.0",
6970
+ "regex-not": "^1.0.0",
6971
+ "snapdragon": "^0.8.1",
6972
+ "to-regex": "^3.0.1"
6973
+ },
6974
+ "dependencies": {
6975
+ "extend-shallow": {
6976
+ "version": "3.0.2",
6977
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
6978
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
6979
+ "dev": true,
6980
+ "requires": {
6981
+ "assign-symbols": "^1.0.0",
6982
+ "is-extendable": "^1.0.1"
6983
+ }
6984
+ },
6985
+ "is-extendable": {
6986
+ "version": "1.0.1",
6987
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
6988
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
6989
+ "dev": true,
6990
+ "requires": {
6991
+ "is-plain-object": "^2.0.4"
6992
+ }
6993
+ },
6994
+ "is-plain-object": {
6995
+ "version": "2.0.4",
6996
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
6997
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
6998
+ "dev": true,
6999
+ "requires": {
7000
+ "isobject": "^3.0.1"
7001
+ }
7002
+ },
7003
+ "kind-of": {
7004
+ "version": "6.0.3",
7005
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
7006
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
7007
+ "dev": true
7008
+ }
7009
+ }
7010
+ },
7011
+ "next-tick": {
7012
+ "version": "1.0.0",
7013
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
7014
+ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
7015
+ "dev": true
7016
+ },
7017
+ "node-notifier": {
7018
+ "version": "9.0.1",
7019
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-9.0.1.tgz",
7020
+ "integrity": "sha512-fPNFIp2hF/Dq7qLDzSg4vZ0J4e9v60gJR+Qx7RbjbWqzPDdEqeVpEx5CFeDAELIl+A/woaaNn1fQ5nEVerMxJg==",
7021
+ "dev": true,
7022
+ "requires": {
7023
+ "growly": "^1.3.0",
7024
+ "is-wsl": "^2.2.0",
7025
+ "semver": "^7.3.2",
7026
+ "shellwords": "^0.1.1",
7027
+ "uuid": "^8.3.0",
7028
+ "which": "^2.0.2"
7029
+ }
7030
+ },
7031
+ "node.extend": {
7032
+ "version": "2.0.2",
7033
+ "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz",
7034
+ "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==",
7035
+ "dev": true,
7036
+ "requires": {
7037
+ "has": "^1.0.3",
7038
+ "is": "^3.2.1"
7039
+ }
7040
+ },
7041
+ "normalize-package-data": {
7042
+ "version": "2.5.0",
7043
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
7044
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
7045
+ "dev": true,
7046
+ "requires": {
7047
+ "hosted-git-info": "^2.1.4",
7048
+ "resolve": "^1.10.0",
7049
+ "semver": "2 || 3 || 4 || 5",
7050
+ "validate-npm-package-license": "^3.0.1"
7051
+ },
7052
+ "dependencies": {
7053
+ "semver": {
7054
+ "version": "5.7.1",
7055
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
7056
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
7057
+ "dev": true
7058
+ }
7059
+ }
7060
+ },
7061
+ "normalize-path": {
7062
+ "version": "3.0.0",
7063
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
7064
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
7065
+ "dev": true
7066
+ },
7067
+ "now-and-later": {
7068
+ "version": "2.0.1",
7069
+ "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
7070
+ "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
7071
+ "dev": true,
7072
+ "requires": {
7073
+ "once": "^1.3.2"
7074
+ }
7075
+ },
7076
+ "number-is-nan": {
7077
+ "version": "1.0.1",
7078
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
7079
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
7080
+ "dev": true
7081
+ },
7082
+ "object-assign": {
7083
+ "version": "3.0.0",
7084
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
7085
+ "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
7086
+ "dev": true
7087
+ },
7088
+ "object-copy": {
7089
+ "version": "0.1.0",
7090
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
7091
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
7092
+ "dev": true,
7093
+ "requires": {
7094
+ "copy-descriptor": "^0.1.0",
7095
+ "define-property": "^0.2.5",
7096
+ "kind-of": "^3.0.3"
7097
+ },
7098
+ "dependencies": {
7099
+ "define-property": {
7100
+ "version": "0.2.5",
7101
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
7102
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
7103
+ "dev": true,
7104
+ "requires": {
7105
+ "is-descriptor": "^0.1.0"
7106
+ }
7107
+ },
7108
+ "is-accessor-descriptor": {
7109
+ "version": "0.1.6",
7110
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
7111
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
7112
+ "dev": true,
7113
+ "requires": {
7114
+ "kind-of": "^3.0.2"
7115
+ }
7116
+ },
7117
+ "is-data-descriptor": {
7118
+ "version": "0.1.4",
7119
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
7120
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
7121
+ "dev": true,
7122
+ "requires": {
7123
+ "kind-of": "^3.0.2"
7124
+ }
7125
+ },
7126
+ "is-descriptor": {
7127
+ "version": "0.1.6",
7128
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
7129
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
7130
+ "dev": true,
7131
+ "requires": {
7132
+ "is-accessor-descriptor": "^0.1.6",
7133
+ "is-data-descriptor": "^0.1.4",
7134
+ "kind-of": "^5.0.0"
7135
+ },
7136
+ "dependencies": {
7137
+ "kind-of": {
7138
+ "version": "5.1.0",
7139
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
7140
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
7141
+ "dev": true
7142
+ }
7143
+ }
7144
+ },
7145
+ "kind-of": {
7146
+ "version": "3.2.2",
7147
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
7148
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
7149
+ "dev": true,
7150
+ "requires": {
7151
+ "is-buffer": "^1.1.5"
7152
+ }
7153
+ }
7154
+ }
7155
+ },
7156
+ "object-keys": {
7157
+ "version": "1.1.1",
7158
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
7159
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
7160
+ "dev": true
7161
+ },
7162
+ "object-visit": {
7163
+ "version": "1.0.1",
7164
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
7165
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
7166
+ "dev": true,
7167
+ "requires": {
7168
+ "isobject": "^3.0.0"
7169
+ }
7170
+ },
7171
+ "object.assign": {
7172
+ "version": "4.1.2",
7173
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
7174
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
7175
+ "dev": true,
7176
+ "requires": {
7177
+ "call-bind": "^1.0.0",
7178
+ "define-properties": "^1.1.3",
7179
+ "has-symbols": "^1.0.1",
7180
+ "object-keys": "^1.1.1"
7181
+ }
7182
+ },
7183
+ "object.defaults": {
7184
+ "version": "1.1.0",
7185
+ "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
7186
+ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
7187
+ "dev": true,
7188
+ "requires": {
7189
+ "array-each": "^1.0.1",
7190
+ "array-slice": "^1.0.0",
7191
+ "for-own": "^1.0.0",
7192
+ "isobject": "^3.0.0"
7193
+ }
7194
+ },
7195
+ "object.map": {
7196
+ "version": "1.0.1",
7197
+ "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
7198
+ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
7199
+ "dev": true,
7200
+ "requires": {
7201
+ "for-own": "^1.0.0",
7202
+ "make-iterator": "^1.0.0"
7203
+ }
7204
+ },
7205
+ "object.pick": {
7206
+ "version": "1.3.0",
7207
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
7208
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
7209
+ "dev": true,
7210
+ "requires": {
7211
+ "isobject": "^3.0.1"
7212
+ }
7213
+ },
7214
+ "object.reduce": {
7215
+ "version": "1.0.1",
7216
+ "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
7217
+ "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
7218
+ "dev": true,
7219
+ "requires": {
7220
+ "for-own": "^1.0.0",
7221
+ "make-iterator": "^1.0.0"
7222
+ }
7223
+ },
7224
+ "once": {
7225
+ "version": "1.4.0",
7226
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
7227
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
7228
+ "dev": true,
7229
+ "requires": {
7230
+ "wrappy": "1"
7231
+ }
7232
+ },
7233
+ "ordered-read-streams": {
7234
+ "version": "1.0.1",
7235
+ "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
7236
+ "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
7237
+ "dev": true,
7238
+ "requires": {
7239
+ "readable-stream": "^2.0.1"
7240
+ }
7241
+ },
7242
+ "os-locale": {
7243
+ "version": "1.4.0",
7244
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
7245
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
7246
+ "dev": true,
7247
+ "requires": {
7248
+ "lcid": "^1.0.0"
7249
+ }
7250
+ },
7251
+ "parse-filepath": {
7252
+ "version": "1.0.2",
7253
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
7254
+ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
7255
+ "dev": true,
7256
+ "requires": {
7257
+ "is-absolute": "^1.0.0",
7258
+ "map-cache": "^0.2.0",
7259
+ "path-root": "^0.1.1"
7260
+ }
7261
+ },
7262
+ "parse-json": {
7263
+ "version": "2.2.0",
7264
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
7265
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
7266
+ "dev": true,
7267
+ "requires": {
7268
+ "error-ex": "^1.2.0"
7269
+ }
7270
+ },
7271
+ "parse-node-version": {
7272
+ "version": "1.0.1",
7273
+ "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
7274
+ "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
7275
+ "dev": true
7276
+ },
7277
+ "parse-passwd": {
7278
+ "version": "1.0.0",
7279
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
7280
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
7281
+ "dev": true
7282
+ },
7283
+ "pascalcase": {
7284
+ "version": "0.1.1",
7285
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
7286
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
7287
+ "dev": true
7288
+ },
7289
+ "path-dirname": {
7290
+ "version": "1.0.2",
7291
+ "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
7292
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
7293
+ "dev": true
7294
+ },
7295
+ "path-exists": {
7296
+ "version": "2.1.0",
7297
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
7298
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
7299
+ "dev": true,
7300
+ "requires": {
7301
+ "pinkie-promise": "^2.0.0"
7302
+ }
7303
+ },
7304
+ "path-is-absolute": {
7305
+ "version": "1.0.1",
7306
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
7307
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
7308
+ "dev": true
7309
+ },
7310
+ "path-parse": {
7311
+ "version": "1.0.7",
7312
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
7313
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
7314
+ "dev": true
7315
+ },
7316
+ "path-root": {
7317
+ "version": "0.1.1",
7318
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
7319
+ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
7320
+ "dev": true,
7321
+ "requires": {
7322
+ "path-root-regex": "^0.1.0"
7323
+ }
7324
+ },
7325
+ "path-root-regex": {
7326
+ "version": "0.1.2",
7327
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
7328
+ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
7329
+ "dev": true
7330
+ },
7331
+ "path-sort": {
7332
+ "version": "0.1.0",
7333
+ "resolved": "https://registry.npmjs.org/path-sort/-/path-sort-0.1.0.tgz",
7334
+ "integrity": "sha1-ywF11Oy/paGP5nTMbXIL/hXguAU=",
7335
+ "dev": true
7336
+ },
7337
+ "path-type": {
7338
+ "version": "1.1.0",
7339
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
7340
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
7341
+ "dev": true,
7342
+ "requires": {
7343
+ "graceful-fs": "^4.1.2",
7344
+ "pify": "^2.0.0",
7345
+ "pinkie-promise": "^2.0.0"
7346
+ }
7347
+ },
7348
+ "php-parser": {
7349
+ "version": "3.0.3",
7350
+ "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.0.3.tgz",
7351
+ "integrity": "sha512-WjbrtYrwmLY9hpoKoq1+mVqJhT0dEVDZRWSpNIw2MpTw3VM/K4C6e0WR4KlU6G/XROkV7tpH4NesV2dDiPxqaw==",
7352
+ "dev": true
7353
+ },
7354
+ "picomatch": {
7355
+ "version": "2.3.0",
7356
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
7357
+ "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
7358
+ "dev": true
7359
+ },
7360
+ "pify": {
7361
+ "version": "2.3.0",
7362
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
7363
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
7364
+ "dev": true
7365
+ },
7366
+ "pinkie": {
7367
+ "version": "2.0.4",
7368
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
7369
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
7370
+ "dev": true
7371
+ },
7372
+ "pinkie-promise": {
7373
+ "version": "2.0.1",
7374
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
7375
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
7376
+ "dev": true,
7377
+ "requires": {
7378
+ "pinkie": "^2.0.0"
7379
+ }
7380
+ },
7381
+ "plugin-error": {
7382
+ "version": "1.0.1",
7383
+ "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
7384
+ "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
7385
+ "dev": true,
7386
+ "requires": {
7387
+ "ansi-colors": "^1.0.1",
7388
+ "arr-diff": "^4.0.0",
7389
+ "arr-union": "^3.1.0",
7390
+ "extend-shallow": "^3.0.2"
7391
+ },
7392
+ "dependencies": {
7393
+ "extend-shallow": {
7394
+ "version": "3.0.2",
7395
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
7396
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
7397
+ "dev": true,
7398
+ "requires": {
7399
+ "assign-symbols": "^1.0.0",
7400
+ "is-extendable": "^1.0.1"
7401
+ }
7402
+ },
7403
+ "is-extendable": {
7404
+ "version": "1.0.1",
7405
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
7406
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
7407
+ "dev": true,
7408
+ "requires": {
7409
+ "is-plain-object": "^2.0.4"
7410
+ }
7411
+ },
7412
+ "is-plain-object": {
7413
+ "version": "2.0.4",
7414
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
7415
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
7416
+ "dev": true,
7417
+ "requires": {
7418
+ "isobject": "^3.0.1"
7419
+ }
7420
+ }
7421
+ }
7422
+ },
7423
+ "posix-character-classes": {
7424
+ "version": "0.1.1",
7425
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
7426
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
7427
+ "dev": true
7428
+ },
7429
+ "pretty-hrtime": {
7430
+ "version": "1.0.3",
7431
+ "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
7432
+ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
7433
+ "dev": true
7434
+ },
7435
+ "process-nextick-args": {
7436
+ "version": "2.0.1",
7437
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
7438
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
7439
+ "dev": true
7440
+ },
7441
+ "pump": {
7442
+ "version": "2.0.1",
7443
+ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
7444
+ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
7445
+ "dev": true,
7446
+ "requires": {
7447
+ "end-of-stream": "^1.1.0",
7448
+ "once": "^1.3.1"
7449
+ }
7450
+ },
7451
+ "pumpify": {
7452
+ "version": "1.5.1",
7453
+ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
7454
+ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
7455
+ "dev": true,
7456
+ "requires": {
7457
+ "duplexify": "^3.6.0",
7458
+ "inherits": "^2.0.3",
7459
+ "pump": "^2.0.0"
7460
+ }
7461
+ },
7462
+ "read-pkg": {
7463
+ "version": "1.1.0",
7464
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
7465
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
7466
+ "dev": true,
7467
+ "requires": {
7468
+ "load-json-file": "^1.0.0",
7469
+ "normalize-package-data": "^2.3.2",
7470
+ "path-type": "^1.0.0"
7471
+ }
7472
+ },
7473
+ "read-pkg-up": {
7474
+ "version": "1.0.1",
7475
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
7476
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
7477
+ "dev": true,
7478
+ "requires": {
7479
+ "find-up": "^1.0.0",
7480
+ "read-pkg": "^1.0.0"
7481
+ }
7482
+ },
7483
+ "readable-stream": {
7484
+ "version": "2.3.7",
7485
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
7486
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
7487
+ "dev": true,
7488
+ "requires": {
7489
+ "core-util-is": "~1.0.0",
7490
+ "inherits": "~2.0.3",
7491
+ "isarray": "~1.0.0",
7492
+ "process-nextick-args": "~2.0.0",
7493
+ "safe-buffer": "~5.1.1",
7494
+ "string_decoder": "~1.1.1",
7495
+ "util-deprecate": "~1.0.1"
7496
+ }
7497
+ },
7498
+ "readdirp": {
7499
+ "version": "2.2.1",
7500
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
7501
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
7502
+ "dev": true,
7503
+ "requires": {
7504
+ "graceful-fs": "^4.1.11",
7505
+ "micromatch": "^3.1.10",
7506
+ "readable-stream": "^2.0.2"
7507
+ }
7508
+ },
7509
+ "rechoir": {
7510
+ "version": "0.6.2",
7511
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
7512
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
7513
+ "dev": true,
7514
+ "requires": {
7515
+ "resolve": "^1.1.6"
7516
+ }
7517
+ },
7518
+ "regex-not": {
7519
+ "version": "1.0.2",
7520
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
7521
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
7522
+ "dev": true,
7523
+ "requires": {
7524
+ "extend-shallow": "^3.0.2",
7525
+ "safe-regex": "^1.1.0"
7526
+ },
7527
+ "dependencies": {
7528
+ "extend-shallow": {
7529
+ "version": "3.0.2",
7530
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
7531
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
7532
+ "dev": true,
7533
+ "requires": {
7534
+ "assign-symbols": "^1.0.0",
7535
+ "is-extendable": "^1.0.1"
7536
+ }
7537
+ },
7538
+ "is-extendable": {
7539
+ "version": "1.0.1",
7540
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
7541
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
7542
+ "dev": true,
7543
+ "requires": {
7544
+ "is-plain-object": "^2.0.4"
7545
+ }
7546
+ },
7547
+ "is-plain-object": {
7548
+ "version": "2.0.4",
7549
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
7550
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
7551
+ "dev": true,
7552
+ "requires": {
7553
+ "isobject": "^3.0.1"
7554
+ }
7555
+ }
7556
+ }
7557
+ },
7558
+ "remove-bom-buffer": {
7559
+ "version": "3.0.0",
7560
+ "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
7561
+ "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
7562
+ "dev": true,
7563
+ "requires": {
7564
+ "is-buffer": "^1.1.5",
7565
+ "is-utf8": "^0.2.1"
7566
+ }
7567
+ },
7568
+ "remove-bom-stream": {
7569
+ "version": "1.2.0",
7570
+ "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
7571
+ "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
7572
+ "dev": true,
7573
+ "requires": {
7574
+ "remove-bom-buffer": "^3.0.0",
7575
+ "safe-buffer": "^5.1.0",
7576
+ "through2": "^2.0.3"
7577
+ },
7578
+ "dependencies": {
7579
+ "through2": {
7580
+ "version": "2.0.5",
7581
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
7582
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
7583
+ "dev": true,
7584
+ "requires": {
7585
+ "readable-stream": "~2.3.6",
7586
+ "xtend": "~4.0.1"
7587
+ }
7588
+ }
7589
+ }
7590
+ },
7591
+ "remove-trailing-separator": {
7592
+ "version": "1.1.0",
7593
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
7594
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
7595
+ "dev": true
7596
+ },
7597
+ "repeat-element": {
7598
+ "version": "1.1.4",
7599
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
7600
+ "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==",
7601
+ "dev": true
7602
+ },
7603
+ "repeat-string": {
7604
+ "version": "1.6.1",
7605
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
7606
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
7607
+ "dev": true
7608
+ },
7609
+ "replace-ext": {
7610
+ "version": "1.0.1",
7611
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
7612
+ "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==",
7613
+ "dev": true
7614
+ },
7615
+ "replace-homedir": {
7616
+ "version": "1.0.0",
7617
+ "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
7618
+ "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
7619
+ "dev": true,
7620
+ "requires": {
7621
+ "homedir-polyfill": "^1.0.1",
7622
+ "is-absolute": "^1.0.0",
7623
+ "remove-trailing-separator": "^1.1.0"
7624
+ }
7625
+ },
7626
+ "require-directory": {
7627
+ "version": "2.1.1",
7628
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
7629
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
7630
+ "dev": true
7631
+ },
7632
+ "require-main-filename": {
7633
+ "version": "1.0.1",
7634
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
7635
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
7636
+ "dev": true
7637
+ },
7638
+ "resolve": {
7639
+ "version": "1.20.0",
7640
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
7641
+ "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
7642
+ "dev": true,
7643
+ "requires": {
7644
+ "is-core-module": "^2.2.0",
7645
+ "path-parse": "^1.0.6"
7646
+ }
7647
+ },
7648
+ "resolve-dir": {
7649
+ "version": "1.0.1",
7650
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
7651
+ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
7652
+ "dev": true,
7653
+ "requires": {
7654
+ "expand-tilde": "^2.0.0",
7655
+ "global-modules": "^1.0.0"
7656
+ }
7657
+ },
7658
+ "resolve-options": {
7659
+ "version": "1.1.0",
7660
+ "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
7661
+ "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
7662
+ "dev": true,
7663
+ "requires": {
7664
+ "value-or-function": "^3.0.0"
7665
+ }
7666
+ },
7667
+ "resolve-url": {
7668
+ "version": "0.2.1",
7669
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
7670
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
7671
+ "dev": true
7672
+ },
7673
+ "ret": {
7674
+ "version": "0.1.15",
7675
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
7676
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
7677
+ "dev": true
7678
+ },
7679
+ "safe-buffer": {
7680
+ "version": "5.1.2",
7681
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
7682
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
7683
+ "dev": true
7684
+ },
7685
+ "safe-regex": {
7686
+ "version": "1.1.0",
7687
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
7688
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
7689
+ "dev": true,
7690
+ "requires": {
7691
+ "ret": "~0.1.10"
7692
+ }
7693
+ },
7694
+ "semver": {
7695
+ "version": "7.3.5",
7696
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
7697
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
7698
+ "dev": true,
7699
+ "requires": {
7700
+ "lru-cache": "^6.0.0"
7701
+ }
7702
+ },
7703
+ "semver-greatest-satisfied-range": {
7704
+ "version": "1.1.0",
7705
+ "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
7706
+ "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
7707
+ "dev": true,
7708
+ "requires": {
7709
+ "sver-compat": "^1.5.0"
7710
+ }
7711
+ },
7712
+ "set-blocking": {
7713
+ "version": "2.0.0",
7714
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
7715
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
7716
+ "dev": true
7717
+ },
7718
+ "set-value": {
7719
+ "version": "2.0.1",
7720
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
7721
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
7722
+ "dev": true,
7723
+ "requires": {
7724
+ "extend-shallow": "^2.0.1",
7725
+ "is-extendable": "^0.1.1",
7726
+ "is-plain-object": "^2.0.3",
7727
+ "split-string": "^3.0.1"
7728
+ },
7729
+ "dependencies": {
7730
+ "is-plain-object": {
7731
+ "version": "2.0.4",
7732
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
7733
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
7734
+ "dev": true,
7735
+ "requires": {
7736
+ "isobject": "^3.0.1"
7737
+ }
7738
+ }
7739
+ }
7740
+ },
7741
+ "shellwords": {
7742
+ "version": "0.1.1",
7743
+ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
7744
+ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
7745
+ "dev": true
7746
+ },
7747
+ "snapdragon": {
7748
+ "version": "0.8.2",
7749
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
7750
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
7751
+ "dev": true,
7752
+ "requires": {
7753
+ "base": "^0.11.1",
7754
+ "debug": "^2.2.0",
7755
+ "define-property": "^0.2.5",
7756
+ "extend-shallow": "^2.0.1",
7757
+ "map-cache": "^0.2.2",
7758
+ "source-map": "^0.5.6",
7759
+ "source-map-resolve": "^0.5.0",
7760
+ "use": "^3.1.0"
7761
+ },
7762
+ "dependencies": {
7763
+ "define-property": {
7764
+ "version": "0.2.5",
7765
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
7766
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
7767
+ "dev": true,
7768
+ "requires": {
7769
+ "is-descriptor": "^0.1.0"
7770
+ }
7771
+ },
7772
+ "is-accessor-descriptor": {
7773
+ "version": "0.1.6",
7774
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
7775
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
7776
+ "dev": true,
7777
+ "requires": {
7778
+ "kind-of": "^3.0.2"
7779
+ },
7780
+ "dependencies": {
7781
+ "kind-of": {
7782
+ "version": "3.2.2",
7783
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
7784
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
7785
+ "dev": true,
7786
+ "requires": {
7787
+ "is-buffer": "^1.1.5"
7788
+ }
7789
+ }
7790
+ }
7791
+ },
7792
+ "is-data-descriptor": {
7793
+ "version": "0.1.4",
7794
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
7795
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
7796
+ "dev": true,
7797
+ "requires": {
7798
+ "kind-of": "^3.0.2"
7799
+ },
7800
+ "dependencies": {
7801
+ "kind-of": {
7802
+ "version": "3.2.2",
7803
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
7804
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
7805
+ "dev": true,
7806
+ "requires": {
7807
+ "is-buffer": "^1.1.5"
7808
+ }
7809
+ }
7810
+ }
7811
+ },
7812
+ "is-descriptor": {
7813
+ "version": "0.1.6",
7814
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
7815
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
7816
+ "dev": true,
7817
+ "requires": {
7818
+ "is-accessor-descriptor": "^0.1.6",
7819
+ "is-data-descriptor": "^0.1.4",
7820
+ "kind-of": "^5.0.0"
7821
+ }
7822
+ }
7823
+ }
7824
+ },
7825
+ "snapdragon-node": {
7826
+ "version": "2.1.1",
7827
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
7828
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
7829
+ "dev": true,
7830
+ "requires": {
7831
+ "define-property": "^1.0.0",
7832
+ "isobject": "^3.0.0",
7833
+ "snapdragon-util": "^3.0.1"
7834
+ },
7835
+ "dependencies": {
7836
+ "define-property": {
7837
+ "version": "1.0.0",
7838
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
7839
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
7840
+ "dev": true,
7841
+ "requires": {
7842
+ "is-descriptor": "^1.0.0"
7843
+ }
7844
+ }
7845
+ }
7846
+ },
7847
+ "snapdragon-util": {
7848
+ "version": "3.0.1",
7849
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
7850
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
7851
+ "dev": true,
7852
+ "requires": {
7853
+ "kind-of": "^3.2.0"
7854
+ },
7855
+ "dependencies": {
7856
+ "kind-of": {
7857
+ "version": "3.2.2",
7858
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
7859
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
7860
+ "dev": true,
7861
+ "requires": {
7862
+ "is-buffer": "^1.1.5"
7863
+ }
7864
+ }
7865
+ }
7866
+ },
7867
+ "source-map": {
7868
+ "version": "0.5.7",
7869
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
7870
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
7871
+ "dev": true
7872
+ },
7873
+ "source-map-resolve": {
7874
+ "version": "0.5.3",
7875
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
7876
+ "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
7877
+ "dev": true,
7878
+ "requires": {
7879
+ "atob": "^2.1.2",
7880
+ "decode-uri-component": "^0.2.0",
7881
+ "resolve-url": "^0.2.1",
7882
+ "source-map-url": "^0.4.0",
7883
+ "urix": "^0.1.0"
7884
+ }
7885
+ },
7886
+ "source-map-url": {
7887
+ "version": "0.4.1",
7888
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
7889
+ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
7890
+ "dev": true
7891
+ },
7892
+ "sparkles": {
7893
+ "version": "1.0.1",
7894
+ "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
7895
+ "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==",
7896
+ "dev": true
7897
+ },
7898
+ "spdx-correct": {
7899
+ "version": "3.1.1",
7900
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
7901
+ "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
7902
+ "dev": true,
7903
+ "requires": {
7904
+ "spdx-expression-parse": "^3.0.0",
7905
+ "spdx-license-ids": "^3.0.0"
7906
+ }
7907
+ },
7908
+ "spdx-exceptions": {
7909
+ "version": "2.3.0",
7910
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
7911
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
7912
+ "dev": true
7913
+ },
7914
+ "spdx-expression-parse": {
7915
+ "version": "3.0.1",
7916
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
7917
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
7918
+ "dev": true,
7919
+ "requires": {
7920
+ "spdx-exceptions": "^2.1.0",
7921
+ "spdx-license-ids": "^3.0.0"
7922
+ }
7923
+ },
7924
+ "spdx-license-ids": {
7925
+ "version": "3.0.11",
7926
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
7927
+ "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==",
7928
+ "dev": true
7929
+ },
7930
+ "split-string": {
7931
+ "version": "3.1.0",
7932
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
7933
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
7934
+ "dev": true,
7935
+ "requires": {
7936
+ "extend-shallow": "^3.0.0"
7937
+ },
7938
+ "dependencies": {
7939
+ "extend-shallow": {
7940
+ "version": "3.0.2",
7941
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
7942
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
7943
+ "dev": true,
7944
+ "requires": {
7945
+ "assign-symbols": "^1.0.0",
7946
+ "is-extendable": "^1.0.1"
7947
+ }
7948
+ },
7949
+ "is-extendable": {
7950
+ "version": "1.0.1",
7951
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
7952
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
7953
+ "dev": true,
7954
+ "requires": {
7955
+ "is-plain-object": "^2.0.4"
7956
+ }
7957
+ },
7958
+ "is-plain-object": {
7959
+ "version": "2.0.4",
7960
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
7961
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
7962
+ "dev": true,
7963
+ "requires": {
7964
+ "isobject": "^3.0.1"
7965
+ }
7966
+ }
7967
+ }
7968
+ },
7969
+ "stack-trace": {
7970
+ "version": "0.0.10",
7971
+ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
7972
+ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
7973
+ "dev": true
7974
+ },
7975
+ "static-extend": {
7976
+ "version": "0.1.2",
7977
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
7978
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
7979
+ "dev": true,
7980
+ "requires": {
7981
+ "define-property": "^0.2.5",
7982
+ "object-copy": "^0.1.0"
7983
+ },
7984
+ "dependencies": {
7985
+ "define-property": {
7986
+ "version": "0.2.5",
7987
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
7988
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
7989
+ "dev": true,
7990
+ "requires": {
7991
+ "is-descriptor": "^0.1.0"
7992
+ }
7993
+ },
7994
+ "is-accessor-descriptor": {
7995
+ "version": "0.1.6",
7996
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
7997
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
7998
+ "dev": true,
7999
+ "requires": {
8000
+ "kind-of": "^3.0.2"
8001
+ },
8002
+ "dependencies": {
8003
+ "kind-of": {
8004
+ "version": "3.2.2",
8005
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
8006
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
8007
+ "dev": true,
8008
+ "requires": {
8009
+ "is-buffer": "^1.1.5"
8010
+ }
8011
+ }
8012
+ }
8013
+ },
8014
+ "is-data-descriptor": {
8015
+ "version": "0.1.4",
8016
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
8017
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
8018
+ "dev": true,
8019
+ "requires": {
8020
+ "kind-of": "^3.0.2"
8021
+ },
8022
+ "dependencies": {
8023
+ "kind-of": {
8024
+ "version": "3.2.2",
8025
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
8026
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
8027
+ "dev": true,
8028
+ "requires": {
8029
+ "is-buffer": "^1.1.5"
8030
+ }
8031
+ }
8032
+ }
8033
+ },
8034
+ "is-descriptor": {
8035
+ "version": "0.1.6",
8036
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
8037
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
8038
+ "dev": true,
8039
+ "requires": {
8040
+ "is-accessor-descriptor": "^0.1.6",
8041
+ "is-data-descriptor": "^0.1.4",
8042
+ "kind-of": "^5.0.0"
8043
+ }
8044
+ }
8045
+ }
8046
+ },
8047
+ "stream-exhaust": {
8048
+ "version": "1.0.2",
8049
+ "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
8050
+ "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
8051
+ "dev": true
8052
+ },
8053
+ "stream-shift": {
8054
+ "version": "1.0.1",
8055
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
8056
+ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
8057
+ "dev": true
8058
+ },
8059
+ "string_decoder": {
8060
+ "version": "1.1.1",
8061
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
8062
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
8063
+ "dev": true,
8064
+ "requires": {
8065
+ "safe-buffer": "~5.1.0"
8066
+ }
8067
+ },
8068
+ "string-width": {
8069
+ "version": "1.0.2",
8070
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
8071
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
8072
+ "dev": true,
8073
+ "requires": {
8074
+ "code-point-at": "^1.0.0",
8075
+ "is-fullwidth-code-point": "^1.0.0",
8076
+ "strip-ansi": "^3.0.0"
8077
+ }
8078
+ },
8079
+ "strip-ansi": {
8080
+ "version": "3.0.1",
8081
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
8082
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
8083
+ "dev": true,
8084
+ "requires": {
8085
+ "ansi-regex": "^2.0.0"
8086
+ }
8087
+ },
8088
+ "strip-bom": {
8089
+ "version": "2.0.0",
8090
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
8091
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
8092
+ "dev": true,
8093
+ "requires": {
8094
+ "is-utf8": "^0.2.0"
8095
+ }
8096
+ },
8097
+ "supports-color": {
8098
+ "version": "2.0.0",
8099
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
8100
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
8101
+ "dev": true
8102
+ },
8103
+ "sver-compat": {
8104
+ "version": "1.5.0",
8105
+ "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
8106
+ "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
8107
+ "dev": true,
8108
+ "requires": {
8109
+ "es6-iterator": "^2.0.1",
8110
+ "es6-symbol": "^3.1.1"
8111
+ }
8112
+ },
8113
+ "through2": {
8114
+ "version": "4.0.2",
8115
+ "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz",
8116
+ "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
8117
+ "dev": true,
8118
+ "requires": {
8119
+ "readable-stream": "3"
8120
+ },
8121
+ "dependencies": {
8122
+ "readable-stream": {
8123
+ "version": "3.6.0",
8124
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
8125
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
8126
+ "dev": true,
8127
+ "requires": {
8128
+ "inherits": "^2.0.3",
8129
+ "string_decoder": "^1.1.1",
8130
+ "util-deprecate": "^1.0.1"
8131
+ }
8132
+ }
8133
+ }
8134
+ },
8135
+ "through2-filter": {
8136
+ "version": "3.0.0",
8137
+ "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
8138
+ "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
8139
+ "dev": true,
8140
+ "requires": {
8141
+ "through2": "~2.0.0",
8142
+ "xtend": "~4.0.0"
8143
+ },
8144
+ "dependencies": {
8145
+ "through2": {
8146
+ "version": "2.0.5",
8147
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
8148
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
8149
+ "dev": true,
8150
+ "requires": {
8151
+ "readable-stream": "~2.3.6",
8152
+ "xtend": "~4.0.1"
8153
+ }
8154
+ }
8155
+ }
8156
+ },
8157
+ "time-stamp": {
8158
+ "version": "1.1.0",
8159
+ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
8160
+ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
8161
+ "dev": true
8162
+ },
8163
+ "to-absolute-glob": {
8164
+ "version": "2.0.2",
8165
+ "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
8166
+ "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
8167
+ "dev": true,
8168
+ "requires": {
8169
+ "is-absolute": "^1.0.0",
8170
+ "is-negated-glob": "^1.0.0"
8171
+ }
8172
+ },
8173
+ "to-object-path": {
8174
+ "version": "0.3.0",
8175
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
8176
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
8177
+ "dev": true,
8178
+ "requires": {
8179
+ "kind-of": "^3.0.2"
8180
+ },
8181
+ "dependencies": {
8182
+ "kind-of": {
8183
+ "version": "3.2.2",
8184
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
8185
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
8186
+ "dev": true,
8187
+ "requires": {
8188
+ "is-buffer": "^1.1.5"
8189
+ }
8190
+ }
8191
+ }
8192
+ },
8193
+ "to-regex": {
8194
+ "version": "3.0.2",
8195
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
8196
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
8197
+ "dev": true,
8198
+ "requires": {
8199
+ "define-property": "^2.0.2",
8200
+ "extend-shallow": "^3.0.2",
8201
+ "regex-not": "^1.0.2",
8202
+ "safe-regex": "^1.1.0"
8203
+ },
8204
+ "dependencies": {
8205
+ "extend-shallow": {
8206
+ "version": "3.0.2",
8207
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
8208
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
8209
+ "dev": true,
8210
+ "requires": {
8211
+ "assign-symbols": "^1.0.0",
8212
+ "is-extendable": "^1.0.1"
8213
+ }
8214
+ },
8215
+ "is-extendable": {
8216
+ "version": "1.0.1",
8217
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
8218
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
8219
+ "dev": true,
8220
+ "requires": {
8221
+ "is-plain-object": "^2.0.4"
8222
+ }
8223
+ },
8224
+ "is-plain-object": {
8225
+ "version": "2.0.4",
8226
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
8227
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
8228
+ "dev": true,
8229
+ "requires": {
8230
+ "isobject": "^3.0.1"
8231
+ }
8232
+ }
8233
+ }
8234
+ },
8235
+ "to-regex-range": {
8236
+ "version": "2.1.1",
8237
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
8238
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
8239
+ "dev": true,
8240
+ "requires": {
8241
+ "is-number": "^3.0.0",
8242
+ "repeat-string": "^1.6.1"
8243
+ }
8244
+ },
8245
+ "to-through": {
8246
+ "version": "2.0.0",
8247
+ "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
8248
+ "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
8249
+ "dev": true,
8250
+ "requires": {
8251
+ "through2": "^2.0.3"
8252
+ },
8253
+ "dependencies": {
8254
+ "through2": {
8255
+ "version": "2.0.5",
8256
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
8257
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
8258
+ "dev": true,
8259
+ "requires": {
8260
+ "readable-stream": "~2.3.6",
8261
+ "xtend": "~4.0.1"
8262
+ }
8263
+ }
8264
+ }
8265
+ },
8266
+ "type": {
8267
+ "version": "1.2.0",
8268
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
8269
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
8270
+ "dev": true
8271
+ },
8272
+ "typedarray": {
8273
+ "version": "0.0.6",
8274
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
8275
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
8276
+ "dev": true
8277
+ },
8278
+ "unc-path-regex": {
8279
+ "version": "0.1.2",
8280
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
8281
+ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
8282
+ "dev": true
8283
+ },
8284
+ "undertaker": {
8285
+ "version": "1.3.0",
8286
+ "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz",
8287
+ "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==",
8288
+ "dev": true,
8289
+ "requires": {
8290
+ "arr-flatten": "^1.0.1",
8291
+ "arr-map": "^2.0.0",
8292
+ "bach": "^1.0.0",
8293
+ "collection-map": "^1.0.0",
8294
+ "es6-weak-map": "^2.0.1",
8295
+ "fast-levenshtein": "^1.0.0",
8296
+ "last-run": "^1.1.0",
8297
+ "object.defaults": "^1.0.0",
8298
+ "object.reduce": "^1.0.0",
8299
+ "undertaker-registry": "^1.0.0"
8300
+ }
8301
+ },
8302
+ "undertaker-registry": {
8303
+ "version": "1.0.1",
8304
+ "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
8305
+ "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=",
8306
+ "dev": true
8307
+ },
8308
+ "union-value": {
8309
+ "version": "1.0.1",
8310
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
8311
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
8312
+ "dev": true,
8313
+ "requires": {
8314
+ "arr-union": "^3.1.0",
8315
+ "get-value": "^2.0.6",
8316
+ "is-extendable": "^0.1.1",
8317
+ "set-value": "^2.0.1"
8318
+ }
8319
+ },
8320
+ "unique-stream": {
8321
+ "version": "2.3.1",
8322
+ "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
8323
+ "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
8324
+ "dev": true,
8325
+ "requires": {
8326
+ "json-stable-stringify-without-jsonify": "^1.0.1",
8327
+ "through2-filter": "^3.0.0"
8328
+ }
8329
+ },
8330
+ "unset-value": {
8331
+ "version": "1.0.0",
8332
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
8333
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
8334
+ "dev": true,
8335
+ "requires": {
8336
+ "has-value": "^0.3.1",
8337
+ "isobject": "^3.0.0"
8338
+ },
8339
+ "dependencies": {
8340
+ "has-value": {
8341
+ "version": "0.3.1",
8342
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
8343
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
8344
+ "dev": true,
8345
+ "requires": {
8346
+ "get-value": "^2.0.3",
8347
+ "has-values": "^0.1.4",
8348
+ "isobject": "^2.0.0"
8349
+ },
8350
+ "dependencies": {
8351
+ "isobject": {
8352
+ "version": "2.1.0",
8353
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
8354
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
8355
+ "dev": true,
8356
+ "requires": {
8357
+ "isarray": "1.0.0"
8358
+ }
8359
+ }
8360
+ }
8361
+ },
8362
+ "has-values": {
8363
+ "version": "0.1.4",
8364
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
8365
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
8366
+ "dev": true
8367
+ }
8368
+ }
8369
+ },
8370
+ "upath": {
8371
+ "version": "1.2.0",
8372
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
8373
+ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
8374
+ "dev": true
8375
+ },
8376
+ "urix": {
8377
+ "version": "0.1.0",
8378
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
8379
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
8380
+ "dev": true
8381
+ },
8382
+ "use": {
8383
+ "version": "3.1.1",
8384
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
8385
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
8386
+ "dev": true
8387
+ },
8388
+ "util-deprecate": {
8389
+ "version": "1.0.2",
8390
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
8391
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
8392
+ "dev": true
8393
+ },
8394
+ "uuid": {
8395
+ "version": "8.3.2",
8396
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
8397
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
8398
+ "dev": true
8399
+ },
8400
+ "v8flags": {
8401
+ "version": "3.2.0",
8402
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
8403
+ "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
8404
+ "dev": true,
8405
+ "requires": {
8406
+ "homedir-polyfill": "^1.0.1"
8407
+ }
8408
+ },
8409
+ "validate-npm-package-license": {
8410
+ "version": "3.0.4",
8411
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
8412
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
8413
+ "dev": true,
8414
+ "requires": {
8415
+ "spdx-correct": "^3.0.0",
8416
+ "spdx-expression-parse": "^3.0.0"
8417
+ }
8418
+ },
8419
+ "value-or-function": {
8420
+ "version": "3.0.0",
8421
+ "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
8422
+ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=",
8423
+ "dev": true
8424
+ },
8425
+ "vinyl": {
8426
+ "version": "2.2.1",
8427
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
8428
+ "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
8429
+ "dev": true,
8430
+ "requires": {
8431
+ "clone": "^2.1.1",
8432
+ "clone-buffer": "^1.0.0",
8433
+ "clone-stats": "^1.0.0",
8434
+ "cloneable-readable": "^1.0.0",
8435
+ "remove-trailing-separator": "^1.0.1",
8436
+ "replace-ext": "^1.0.0"
8437
+ }
8438
+ },
8439
+ "vinyl-fs": {
8440
+ "version": "3.0.3",
8441
+ "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
8442
+ "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
8443
+ "dev": true,
8444
+ "requires": {
8445
+ "fs-mkdirp-stream": "^1.0.0",
8446
+ "glob-stream": "^6.1.0",
8447
+ "graceful-fs": "^4.0.0",
8448
+ "is-valid-glob": "^1.0.0",
8449
+ "lazystream": "^1.0.0",
8450
+ "lead": "^1.0.0",
8451
+ "object.assign": "^4.0.4",
8452
+ "pumpify": "^1.3.5",
8453
+ "readable-stream": "^2.3.3",
8454
+ "remove-bom-buffer": "^3.0.0",
8455
+ "remove-bom-stream": "^1.2.0",
8456
+ "resolve-options": "^1.1.0",
8457
+ "through2": "^2.0.0",
8458
+ "to-through": "^2.0.0",
8459
+ "value-or-function": "^3.0.0",
8460
+ "vinyl": "^2.0.0",
8461
+ "vinyl-sourcemap": "^1.1.0"
8462
+ },
8463
+ "dependencies": {
8464
+ "through2": {
8465
+ "version": "2.0.5",
8466
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
8467
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
8468
+ "dev": true,
8469
+ "requires": {
8470
+ "readable-stream": "~2.3.6",
8471
+ "xtend": "~4.0.1"
8472
+ }
8473
+ }
8474
+ }
8475
+ },
8476
+ "vinyl-sourcemap": {
8477
+ "version": "1.1.0",
8478
+ "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
8479
+ "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
8480
+ "dev": true,
8481
+ "requires": {
8482
+ "append-buffer": "^1.0.2",
8483
+ "convert-source-map": "^1.5.0",
8484
+ "graceful-fs": "^4.1.6",
8485
+ "normalize-path": "^2.1.1",
8486
+ "now-and-later": "^2.0.0",
8487
+ "remove-bom-buffer": "^3.0.0",
8488
+ "vinyl": "^2.0.0"
8489
+ },
8490
+ "dependencies": {
8491
+ "normalize-path": {
8492
+ "version": "2.1.1",
8493
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
8494
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
8495
+ "dev": true,
8496
+ "requires": {
8497
+ "remove-trailing-separator": "^1.0.1"
8498
+ }
8499
+ }
8500
+ }
8501
+ },
8502
+ "which": {
8503
+ "version": "2.0.2",
8504
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
8505
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
8506
+ "dev": true,
8507
+ "requires": {
8508
+ "isexe": "^2.0.0"
8509
+ }
8510
+ },
8511
+ "which-module": {
8512
+ "version": "1.0.0",
8513
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
8514
+ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
8515
+ "dev": true
8516
+ },
8517
+ "wp-pot": {
8518
+ "version": "1.9.9",
8519
+ "resolved": "https://registry.npmjs.org/wp-pot/-/wp-pot-1.9.9.tgz",
8520
+ "integrity": "sha512-cCtSeIyEe1u9DvJdgov4hGakMoabvLIwPZpCMqUKI5FnBoTMu7buQrIJar+JNIeRg/+RRxAKFtq4DsqH5GdJuQ==",
8521
+ "dev": true,
8522
+ "requires": {
8523
+ "matched": "^5.0.0",
8524
+ "path-sort": "^0.1.0",
8525
+ "php-parser": "^3.0.2"
8526
+ }
8527
+ },
8528
+ "wrap-ansi": {
8529
+ "version": "2.1.0",
8530
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
8531
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
8532
+ "dev": true,
8533
+ "requires": {
8534
+ "string-width": "^1.0.1",
8535
+ "strip-ansi": "^3.0.1"
8536
+ }
8537
+ },
8538
+ "wrappy": {
8539
+ "version": "1.0.2",
8540
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
8541
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
8542
+ "dev": true
8543
+ },
8544
+ "xtend": {
8545
+ "version": "4.0.2",
8546
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
8547
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
8548
+ "dev": true
8549
+ },
8550
+ "y18n": {
8551
+ "version": "3.2.2",
8552
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
8553
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
8554
+ "dev": true
8555
+ },
8556
+ "yallist": {
8557
+ "version": "4.0.0",
8558
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
8559
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
8560
+ "dev": true
8561
+ },
8562
+ "yargs": {
8563
+ "version": "7.1.2",
8564
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz",
8565
+ "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==",
8566
+ "dev": true,
8567
+ "requires": {
8568
+ "camelcase": "^3.0.0",
8569
+ "cliui": "^3.2.0",
8570
+ "decamelize": "^1.1.1",
8571
+ "get-caller-file": "^1.0.1",
8572
+ "os-locale": "^1.4.0",
8573
+ "read-pkg-up": "^1.0.1",
8574
+ "require-directory": "^2.1.1",
8575
+ "require-main-filename": "^1.0.1",
8576
+ "set-blocking": "^2.0.0",
8577
+ "string-width": "^1.0.2",
8578
+ "which-module": "^1.0.0",
8579
+ "y18n": "^3.2.1",
8580
+ "yargs-parser": "^5.0.1"
8581
+ }
8582
+ },
8583
+ "yargs-parser": {
8584
+ "version": "5.0.1",
8585
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz",
8586
+ "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==",
8587
+ "dev": true,
8588
+ "requires": {
8589
+ "camelcase": "^3.0.0",
8590
+ "object.assign": "^4.1.0"
8591
+ }
8592
+ }
8593
+ }
8594
+ }
includes/vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInit2c2da604026521edb10f6a9eaecf3f24::getLoader();
includes/vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ /** @var ?string */
46
+ private $vendorDir;
47
+
48
+ // PSR-4
49
+ /**
50
+ * @var array[]
51
+ * @psalm-var array<string, array<string, int>>
52
+ */
53
+ private $prefixLengthsPsr4 = array();
54
+ /**
55
+ * @var array[]
56
+ * @psalm-var array<string, array<int, string>>
57
+ */
58
+ private $prefixDirsPsr4 = array();
59
+ /**
60
+ * @var array[]
61
+ * @psalm-var array<string, string>
62
+ */
63
+ private $fallbackDirsPsr4 = array();
64
+
65
+ // PSR-0
66
+ /**
67
+ * @var array[]
68
+ * @psalm-var array<string, array<string, string[]>>
69
+ */
70
+ private $prefixesPsr0 = array();
71
+ /**
72
+ * @var array[]
73
+ * @psalm-var array<string, string>
74
+ */
75
+ private $fallbackDirsPsr0 = array();
76
+
77
+ /** @var bool */
78
+ private $useIncludePath = false;
79
+
80
+ /**
81
+ * @var string[]
82
+ * @psalm-var array<string, string>
83
+ */
84
+ private $classMap = array();
85
+
86
+ /** @var bool */
87
+ private $classMapAuthoritative = false;
88
+
89
+ /**
90
+ * @var bool[]
91
+ * @psalm-var array<string, bool>
92
+ */
93
+ private $missingClasses = array();
94
+
95
+ /** @var ?string */
96
+ private $apcuPrefix;
97
+
98
+ /**
99
+ * @var self[]
100
+ */
101
+ private static $registeredLoaders = array();
102
+
103
+ /**
104
+ * @param ?string $vendorDir
105
+ */
106
+ public function __construct($vendorDir = null)
107
+ {
108
+ $this->vendorDir = $vendorDir;
109
+ }
110
+
111
+ /**
112
+ * @return string[]
113
+ */
114
+ public function getPrefixes()
115
+ {
116
+ if (!empty($this->prefixesPsr0)) {
117
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
+ }
119
+
120
+ return array();
121
+ }
122
+
123
+ /**
124
+ * @return array[]
125
+ * @psalm-return array<string, array<int, string>>
126
+ */
127
+ public function getPrefixesPsr4()
128
+ {
129
+ return $this->prefixDirsPsr4;
130
+ }
131
+
132
+ /**
133
+ * @return array[]
134
+ * @psalm-return array<string, string>
135
+ */
136
+ public function getFallbackDirs()
137
+ {
138
+ return $this->fallbackDirsPsr0;
139
+ }
140
+
141
+ /**
142
+ * @return array[]
143
+ * @psalm-return array<string, string>
144
+ */
145
+ public function getFallbackDirsPsr4()
146
+ {
147
+ return $this->fallbackDirsPsr4;
148
+ }
149
+
150
+ /**
151
+ * @return string[] Array of classname => path
152
+ * @psalm-var array<string, string>
153
+ */
154
+ public function getClassMap()
155
+ {
156
+ return $this->classMap;
157
+ }
158
+
159
+ /**
160
+ * @param string[] $classMap Class to filename map
161
+ * @psalm-param array<string, string> $classMap
162
+ *
163
+ * @return void
164
+ */
165
+ public function addClassMap(array $classMap)
166
+ {
167
+ if ($this->classMap) {
168
+ $this->classMap = array_merge($this->classMap, $classMap);
169
+ } else {
170
+ $this->classMap = $classMap;
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Registers a set of PSR-0 directories for a given prefix, either
176
+ * appending or prepending to the ones previously set for this prefix.
177
+ *
178
+ * @param string $prefix The prefix
179
+ * @param string[]|string $paths The PSR-0 root directories
180
+ * @param bool $prepend Whether to prepend the directories
181
+ *
182
+ * @return void
183
+ */
184
+ public function add($prefix, $paths, $prepend = false)
185
+ {
186
+ if (!$prefix) {
187
+ if ($prepend) {
188
+ $this->fallbackDirsPsr0 = array_merge(
189
+ (array) $paths,
190
+ $this->fallbackDirsPsr0
191
+ );
192
+ } else {
193
+ $this->fallbackDirsPsr0 = array_merge(
194
+ $this->fallbackDirsPsr0,
195
+ (array) $paths
196
+ );
197
+ }
198
+
199
+ return;
200
+ }
201
+
202
+ $first = $prefix[0];
203
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
+
206
+ return;
207
+ }
208
+ if ($prepend) {
209
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
210
+ (array) $paths,
211
+ $this->prefixesPsr0[$first][$prefix]
212
+ );
213
+ } else {
214
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
215
+ $this->prefixesPsr0[$first][$prefix],
216
+ (array) $paths
217
+ );
218
+ }
219
+ }
220
+
221
+ /**
222
+ * Registers a set of PSR-4 directories for a given namespace, either
223
+ * appending or prepending to the ones previously set for this namespace.
224
+ *
225
+ * @param string $prefix The prefix/namespace, with trailing '\\'
226
+ * @param string[]|string $paths The PSR-4 base directories
227
+ * @param bool $prepend Whether to prepend the directories
228
+ *
229
+ * @throws \InvalidArgumentException
230
+ *
231
+ * @return void
232
+ */
233
+ public function addPsr4($prefix, $paths, $prepend = false)
234
+ {
235
+ if (!$prefix) {
236
+ // Register directories for the root namespace.
237
+ if ($prepend) {
238
+ $this->fallbackDirsPsr4 = array_merge(
239
+ (array) $paths,
240
+ $this->fallbackDirsPsr4
241
+ );
242
+ } else {
243
+ $this->fallbackDirsPsr4 = array_merge(
244
+ $this->fallbackDirsPsr4,
245
+ (array) $paths
246
+ );
247
+ }
248
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
+ // Register directories for a new namespace.
250
+ $length = strlen($prefix);
251
+ if ('\\' !== $prefix[$length - 1]) {
252
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
+ }
254
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
256
+ } elseif ($prepend) {
257
+ // Prepend directories for an already registered namespace.
258
+ $this->prefixDirsPsr4[$prefix] = array_merge(
259
+ (array) $paths,
260
+ $this->prefixDirsPsr4[$prefix]
261
+ );
262
+ } else {
263
+ // Append directories for an already registered namespace.
264
+ $this->prefixDirsPsr4[$prefix] = array_merge(
265
+ $this->prefixDirsPsr4[$prefix],
266
+ (array) $paths
267
+ );
268
+ }
269
+ }
270
+
271
+ /**
272
+ * Registers a set of PSR-0 directories for a given prefix,
273
+ * replacing any others previously set for this prefix.
274
+ *
275
+ * @param string $prefix The prefix
276
+ * @param string[]|string $paths The PSR-0 base directories
277
+ *
278
+ * @return void
279
+ */
280
+ public function set($prefix, $paths)
281
+ {
282
+ if (!$prefix) {
283
+ $this->fallbackDirsPsr0 = (array) $paths;
284
+ } else {
285
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
+ }
287
+ }
288
+
289
+ /**
290
+ * Registers a set of PSR-4 directories for a given namespace,
291
+ * replacing any others previously set for this namespace.
292
+ *
293
+ * @param string $prefix The prefix/namespace, with trailing '\\'
294
+ * @param string[]|string $paths The PSR-4 base directories
295
+ *
296
+ * @throws \InvalidArgumentException
297
+ *
298
+ * @return void
299
+ */
300
+ public function setPsr4($prefix, $paths)
301
+ {
302
+ if (!$prefix) {
303
+ $this->fallbackDirsPsr4 = (array) $paths;
304
+ } else {
305
+ $length = strlen($prefix);
306
+ if ('\\' !== $prefix[$length - 1]) {
307
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
+ }
309
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
311
+ }
312
+ }
313
+
314
+ /**
315
+ * Turns on searching the include path for class files.
316
+ *
317
+ * @param bool $useIncludePath
318
+ *
319
+ * @return void
320
+ */
321
+ public function setUseIncludePath($useIncludePath)
322
+ {
323
+ $this->useIncludePath = $useIncludePath;
324
+ }
325
+
326
+ /**
327
+ * Can be used to check if the autoloader uses the include path to check
328
+ * for classes.
329
+ *
330
+ * @return bool
331
+ */
332
+ public function getUseIncludePath()
333
+ {
334
+ return $this->useIncludePath;
335
+ }
336
+
337
+ /**
338
+ * Turns off searching the prefix and fallback directories for classes
339
+ * that have not been registered with the class map.
340
+ *
341
+ * @param bool $classMapAuthoritative
342
+ *
343
+ * @return void
344
+ */
345
+ public function setClassMapAuthoritative($classMapAuthoritative)
346
+ {
347
+ $this->classMapAuthoritative = $classMapAuthoritative;
348
+ }
349
+
350
+ /**
351
+ * Should class lookup fail if not found in the current class map?
352
+ *
353
+ * @return bool
354
+ */
355
+ public function isClassMapAuthoritative()
356
+ {
357
+ return $this->classMapAuthoritative;
358
+ }
359
+
360
+ /**
361
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
+ *
363
+ * @param string|null $apcuPrefix
364
+ *
365
+ * @return void
366
+ */
367
+ public function setApcuPrefix($apcuPrefix)
368
+ {
369
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
+ }
371
+
372
+ /**
373
+ * The APCu prefix in use, or null if APCu caching is not enabled.
374
+ *
375
+ * @return string|null
376
+ */
377
+ public function getApcuPrefix()
378
+ {
379
+ return $this->apcuPrefix;
380
+ }
381
+
382
+ /**
383
+ * Registers this instance as an autoloader.
384
+ *
385
+ * @param bool $prepend Whether to prepend the autoloader or not
386
+ *
387
+ * @return void
388
+ */
389
+ public function register($prepend = false)
390
+ {
391
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
+
393
+ if (null === $this->vendorDir) {
394
+ return;
395
+ }
396
+
397
+ if ($prepend) {
398
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
+ } else {
400
+ unset(self::$registeredLoaders[$this->vendorDir]);
401
+ self::$registeredLoaders[$this->vendorDir] = $this;
402
+ }
403
+ }
404
+
405
+ /**
406
+ * Unregisters this instance as an autoloader.
407
+ *
408
+ * @return void
409
+ */
410
+ public function unregister()
411
+ {
412
+ spl_autoload_unregister(array($this, 'loadClass'));
413
+
414
+ if (null !== $this->vendorDir) {
415
+ unset(self::$registeredLoaders[$this->vendorDir]);
416
+ }
417
+ }
418
+
419
+ /**
420
+ * Loads the given class or interface.
421
+ *
422
+ * @param string $class The name of the class
423
+ * @return true|null True if loaded, null otherwise
424
+ */
425
+ public function loadClass($class)
426
+ {
427
+ if ($file = $this->findFile($class)) {
428
+ includeFile($file);
429
+
430
+ return true;
431
+ }
432
+
433
+ return null;
434
+ }
435
+
436
+ /**
437
+ * Finds the path to the file where the class is defined.
438
+ *
439
+ * @param string $class The name of the class
440
+ *
441
+ * @return string|false The path if found, false otherwise
442
+ */
443
+ public function findFile($class)
444
+ {
445
+ // class map lookup
446
+ if (isset($this->classMap[$class])) {
447
+ return $this->classMap[$class];
448
+ }
449
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
+ return false;
451
+ }
452
+ if (null !== $this->apcuPrefix) {
453
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
+ if ($hit) {
455
+ return $file;
456
+ }
457
+ }
458
+
459
+ $file = $this->findFileWithExtension($class, '.php');
460
+
461
+ // Search for Hack files if we are running on HHVM
462
+ if (false === $file && defined('HHVM_VERSION')) {
463
+ $file = $this->findFileWithExtension($class, '.hh');
464
+ }
465
+
466
+ if (null !== $this->apcuPrefix) {
467
+ apcu_add($this->apcuPrefix.$class, $file);
468
+ }
469
+
470
+ if (false === $file) {
471
+ // Remember that this class does not exist.
472
+ $this->missingClasses[$class] = true;
473
+ }
474
+
475
+ return $file;
476
+ }
477
+
478
+ /**
479
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
+ *
481
+ * @return self[]
482
+ */
483
+ public static function getRegisteredLoaders()
484
+ {
485
+ return self::$registeredLoaders;
486
+ }
487
+
488
+ /**
489
+ * @param string $class
490
+ * @param string $ext
491
+ * @return string|false
492
+ */
493
+ private function findFileWithExtension($class, $ext)
494
+ {
495
+ // PSR-4 lookup
496
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
+
498
+ $first = $class[0];
499
+ if (isset($this->prefixLengthsPsr4[$first])) {
500
+ $subPath = $class;
501
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
502
+ $subPath = substr($subPath, 0, $lastPos);
503
+ $search = $subPath . '\\';
504
+ if (isset($this->prefixDirsPsr4[$search])) {
505
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
+ if (file_exists($file = $dir . $pathEnd)) {
508
+ return $file;
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+
515
+ // PSR-4 fallback dirs
516
+ foreach ($this->fallbackDirsPsr4 as $dir) {
517
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
+ return $file;
519
+ }
520
+ }
521
+
522
+ // PSR-0 lookup
523
+ if (false !== $pos = strrpos($class, '\\')) {
524
+ // namespaced class name
525
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
+ } else {
528
+ // PEAR-like class name
529
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
+ }
531
+
532
+ if (isset($this->prefixesPsr0[$first])) {
533
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
+ if (0 === strpos($class, $prefix)) {
535
+ foreach ($dirs as $dir) {
536
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
+ return $file;
538
+ }
539
+ }
540
+ }
541
+ }
542
+ }
543
+
544
+ // PSR-0 fallback dirs
545
+ foreach ($this->fallbackDirsPsr0 as $dir) {
546
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
+ return $file;
548
+ }
549
+ }
550
+
551
+ // PSR-0 include paths.
552
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
+ return $file;
554
+ }
555
+
556
+ return false;
557
+ }
558
+ }
559
+
560
+ /**
561
+ * Scope isolated include.
562
+ *
563
+ * Prevents access to $this/self from included files.
564
+ *
565
+ * @param string $file
566
+ * @return void
567
+ * @private
568
+ */
569
+ function includeFile($file)
570
+ {
571
+ include $file;
572
+ }
includes/vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ */
25
+ class InstalledVersions
26
+ {
27
+ /**
28
+ * @var mixed[]|null
29
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
30
+ */
31
+ private static $installed;
32
+
33
+ /**
34
+ * @var bool|null
35
+ */
36
+ private static $canGetVendors;
37
+
38
+ /**
39
+ * @var array[]
40
+ * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
41
+ */
42
+ private static $installedByVendor = array();
43
+
44
+ /**
45
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
46
+ *
47
+ * @return string[]
48
+ * @psalm-return list<string>
49
+ */
50
+ public static function getInstalledPackages()
51
+ {
52
+ $packages = array();
53
+ foreach (self::getInstalled() as $installed) {
54
+ $packages[] = array_keys($installed['versions']);
55
+ }
56
+
57
+ if (1 === \count($packages)) {
58
+ return $packages[0];
59
+ }
60
+
61
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
62
+ }
63
+
64
+ /**
65
+ * Returns a list of all package names with a specific type e.g. 'library'
66
+ *
67
+ * @param string $type
68
+ * @return string[]
69
+ * @psalm-return list<string>
70
+ */
71
+ public static function getInstalledPackagesByType($type)
72
+ {
73
+ $packagesByType = array();
74
+
75
+ foreach (self::getInstalled() as $installed) {
76
+ foreach ($installed['versions'] as $name => $package) {
77
+ if (isset($package['type']) && $package['type'] === $type) {
78
+ $packagesByType[] = $name;
79
+ }
80
+ }
81
+ }
82
+
83
+ return $packagesByType;
84
+ }
85
+
86
+ /**
87
+ * Checks whether the given package is installed
88
+ *
89
+ * This also returns true if the package name is provided or replaced by another package
90
+ *
91
+ * @param string $packageName
92
+ * @param bool $includeDevRequirements
93
+ * @return bool
94
+ */
95
+ public static function isInstalled($packageName, $includeDevRequirements = true)
96
+ {
97
+ foreach (self::getInstalled() as $installed) {
98
+ if (isset($installed['versions'][$packageName])) {
99
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
100
+ }
101
+ }
102
+
103
+ return false;
104
+ }
105
+
106
+ /**
107
+ * Checks whether the given package satisfies a version constraint
108
+ *
109
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
110
+ *
111
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
112
+ *
113
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
114
+ * @param string $packageName
115
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
116
+ * @return bool
117
+ */
118
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
119
+ {
120
+ $constraint = $parser->parseConstraints($constraint);
121
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
122
+
123
+ return $provided->matches($constraint);
124
+ }
125
+
126
+ /**
127
+ * Returns a version constraint representing all the range(s) which are installed for a given package
128
+ *
129
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
130
+ * whether a given version of a package is installed, and not just whether it exists
131
+ *
132
+ * @param string $packageName
133
+ * @return string Version constraint usable with composer/semver
134
+ */
135
+ public static function getVersionRanges($packageName)
136
+ {
137
+ foreach (self::getInstalled() as $installed) {
138
+ if (!isset($installed['versions'][$packageName])) {
139
+ continue;
140
+ }
141
+
142
+ $ranges = array();
143
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
144
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
145
+ }
146
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
147
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
148
+ }
149
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
150
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
151
+ }
152
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
153
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
154
+ }
155
+
156
+ return implode(' || ', $ranges);
157
+ }
158
+
159
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
160
+ }
161
+
162
+ /**
163
+ * @param string $packageName
164
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
165
+ */
166
+ public static function getVersion($packageName)
167
+ {
168
+ foreach (self::getInstalled() as $installed) {
169
+ if (!isset($installed['versions'][$packageName])) {
170
+ continue;
171
+ }
172
+
173
+ if (!isset($installed['versions'][$packageName]['version'])) {
174
+ return null;
175
+ }
176
+
177
+ return $installed['versions'][$packageName]['version'];
178
+ }
179
+
180
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
181
+ }
182
+
183
+ /**
184
+ * @param string $packageName
185
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
186
+ */
187
+ public static function getPrettyVersion($packageName)
188
+ {
189
+ foreach (self::getInstalled() as $installed) {
190
+ if (!isset($installed['versions'][$packageName])) {
191
+ continue;
192
+ }
193
+
194
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
195
+ return null;
196
+ }
197
+
198
+ return $installed['versions'][$packageName]['pretty_version'];
199
+ }
200
+
201
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
202
+ }
203
+
204
+ /**
205
+ * @param string $packageName
206
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
207
+ */
208
+ public static function getReference($packageName)
209
+ {
210
+ foreach (self::getInstalled() as $installed) {
211
+ if (!isset($installed['versions'][$packageName])) {
212
+ continue;
213
+ }
214
+
215
+ if (!isset($installed['versions'][$packageName]['reference'])) {
216
+ return null;
217
+ }
218
+
219
+ return $installed['versions'][$packageName]['reference'];
220
+ }
221
+
222
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
223
+ }
224
+
225
+ /**
226
+ * @param string $packageName
227
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
228
+ */
229
+ public static function getInstallPath($packageName)
230
+ {
231
+ foreach (self::getInstalled() as $installed) {
232
+ if (!isset($installed['versions'][$packageName])) {
233
+ continue;
234
+ }
235
+
236
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
237
+ }
238
+
239
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
240
+ }
241
+
242
+ /**
243
+ * @return array
244
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
245
+ */
246
+ public static function getRootPackage()
247
+ {
248
+ $installed = self::getInstalled();
249
+
250
+ return $installed[0]['root'];
251
+ }
252
+
253
+ /**
254
+ * Returns the raw installed.php data for custom implementations
255
+ *
256
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
257
+ * @return array[]
258
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
259
+ */
260
+ public static function getRawData()
261
+ {
262
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
263
+
264
+ if (null === self::$installed) {
265
+ // only require the installed.php file if this file is loaded from its dumped location,
266
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
267
+ if (substr(__DIR__, -8, 1) !== 'C') {
268
+ self::$installed = include __DIR__ . '/installed.php';
269
+ } else {
270
+ self::$installed = array();
271
+ }
272
+ }
273
+
274
+ return self::$installed;
275
+ }
276
+
277
+ /**
278
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
279
+ *
280
+ * @return array[]
281
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
282
+ */
283
+ public static function getAllRawData()
284
+ {
285
+ return self::getInstalled();
286
+ }
287
+
288
+ /**
289
+ * Lets you reload the static array from another file
290
+ *
291
+ * This is only useful for complex integrations in which a project needs to use
292
+ * this class but then also needs to execute another project's autoloader in process,
293
+ * and wants to ensure both projects have access to their version of installed.php.
294
+ *
295
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
296
+ * the data it needs from this class, then call reload() with
297
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
298
+ * the project in which it runs can then also use this class safely, without
299
+ * interference between PHPUnit's dependencies and the project's dependencies.
300
+ *
301
+ * @param array[] $data A vendor/composer/installed.php data set
302
+ * @return void
303
+ *
304
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
305
+ */
306
+ public static function reload($data)
307
+ {
308
+ self::$installed = $data;
309
+ self::$installedByVendor = array();
310
+ }
311
+
312
+ /**
313
+ * @return array[]
314
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
315
+ */
316
+ private static function getInstalled()
317
+ {
318
+ if (null === self::$canGetVendors) {
319
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
320
+ }
321
+
322
+ $installed = array();
323
+
324
+ if (self::$canGetVendors) {
325
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
326
+ if (isset(self::$installedByVendor[$vendorDir])) {
327
+ $installed[] = self::$installedByVendor[$vendorDir];
328
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
329
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
330
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
331
+ self::$installed = $installed[count($installed) - 1];
332
+ }
333
+ }
334
+ }
335
+ }
336
+
337
+ if (null === self::$installed) {
338
+ // only require the installed.php file if this file is loaded from its dumped location,
339
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
340
+ if (substr(__DIR__, -8, 1) !== 'C') {
341
+ self::$installed = require __DIR__ . '/installed.php';
342
+ } else {
343
+ self::$installed = array();
344
+ }
345
+ }
346
+ $installed[] = self::$installed;
347
+
348
+ return $installed;
349
+ }
350
+ }
includes/vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
includes/vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname(dirname($vendorDir));
7
+
8
+ return array(
9
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
+ );
includes/vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname(dirname($vendorDir));
7
+
8
+ return array(
9
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
10
+ );
includes/vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname(dirname($vendorDir));
7
+
8
+ return array(
9
+ 'AlanEFPluginDonation\\' => array($vendorDir . '/alanef/plugindonation_lib'),
10
+ );
includes/vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit2c2da604026521edb10f6a9eaecf3f24
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
+ public static function getLoader()
20
+ {
21
+ if (null !== self::$loader) {
22
+ return self::$loader;
23
+ }
24
+
25
+ require __DIR__ . '/platform_check.php';
26
+
27
+ spl_autoload_register(array('ComposerAutoloaderInit2c2da604026521edb10f6a9eaecf3f24', 'loadClassLoader'), true, true);
28
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit2c2da604026521edb10f6a9eaecf3f24', 'loadClassLoader'));
30
+
31
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
+ if ($useStaticLoader) {
33
+ require __DIR__ . '/autoload_static.php';
34
+
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24::getInitializer($loader));
36
+ } else {
37
+ $map = require __DIR__ . '/autoload_namespaces.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->set($namespace, $path);
40
+ }
41
+
42
+ $map = require __DIR__ . '/autoload_psr4.php';
43
+ foreach ($map as $namespace => $path) {
44
+ $loader->setPsr4($namespace, $path);
45
+ }
46
+
47
+ $classMap = require __DIR__ . '/autoload_classmap.php';
48
+ if ($classMap) {
49
+ $loader->addClassMap($classMap);
50
+ }
51
+ }
52
+
53
+ $loader->register(true);
54
+
55
+ return $loader;
56
+ }
57
+ }
includes/vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24
8
+ {
9
+ public static $prefixLengthsPsr4 = array (
10
+ 'A' =>
11
+ array (
12
+ 'AlanEFPluginDonation\\' => 21,
13
+ ),
14
+ );
15
+
16
+ public static $prefixDirsPsr4 = array (
17
+ 'AlanEFPluginDonation\\' =>
18
+ array (
19
+ 0 => __DIR__ . '/..' . '/alanef/plugindonation_lib',
20
+ ),
21
+ );
22
+
23
+ public static $prefixesPsr0 = array (
24
+ 'C' =>
25
+ array (
26
+ 'Composer\\Installers\\' =>
27
+ array (
28
+ 0 => __DIR__ . '/..' . '/composer/installers/src',
29
+ ),
30
+ ),
31
+ );
32
+
33
+ public static $classMap = array (
34
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
35
+ );
36
+
37
+ public static function getInitializer(ClassLoader $loader)
38
+ {
39
+ return \Closure::bind(function () use ($loader) {
40
+ $loader->prefixLengthsPsr4 = ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24::$prefixLengthsPsr4;
41
+ $loader->prefixDirsPsr4 = ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24::$prefixDirsPsr4;
42
+ $loader->prefixesPsr0 = ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24::$prefixesPsr0;
43
+ $loader->classMap = ComposerStaticInit2c2da604026521edb10f6a9eaecf3f24::$classMap;
44
+
45
+ }, null, ClassLoader::class);
46
+ }
47
+ }
includes/vendor/composer/installed.json ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "packages": [
3
+ {
4
+ "name": "alanef/plugindonation_lib",
5
+ "version": "dev-master",
6
+ "version_normalized": "dev-master",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/alanef/plugindonation_lib.git",
10
+ "reference": "63f47f5075fb080c42e44ac9cc6cb2f6618e9ab2"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/alanef/plugindonation_lib/zipball/63f47f5075fb080c42e44ac9cc6cb2f6618e9ab2",
15
+ "reference": "63f47f5075fb080c42e44ac9cc6cb2f6618e9ab2",
16
+ "shasum": ""
17
+ },
18
+ "time": "2021-12-02T16:01:15+00:00",
19
+ "default-branch": true,
20
+ "type": "library",
21
+ "installation-source": "dist",
22
+ "autoload": {
23
+ "psr-4": {
24
+ "AlanEFPluginDonation\\": "/"
25
+ }
26
+ },
27
+ "license": [
28
+ "GPL-2.0-or-later"
29
+ ],
30
+ "authors": [
31
+ {
32
+ "name": "alan",
33
+ "email": "alan@fullworks.net"
34
+ }
35
+ ],
36
+ "description": "Module for adding donation support to free plugins",
37
+ "support": {
38
+ "source": "https://github.com/alanef/plugindonation_lib/tree/master",
39
+ "issues": "https://github.com/alanef/plugindonation_lib/issues"
40
+ },
41
+ "install-path": "../alanef/plugindonation_lib"
42
+ },
43
+ {
44
+ "name": "composer/installers",
45
+ "version": "v1.0.12",
46
+ "version_normalized": "1.0.12.0",
47
+ "source": {
48
+ "type": "git",
49
+ "url": "https://github.com/composer/installers.git",
50
+ "reference": "4127333b03e8b4c08d081958548aae5419d1a2fa"
51
+ },
52
+ "dist": {
53
+ "type": "zip",
54
+ "url": "https://api.github.com/repos/composer/installers/zipball/4127333b03e8b4c08d081958548aae5419d1a2fa",
55
+ "reference": "4127333b03e8b4c08d081958548aae5419d1a2fa",
56
+ "shasum": ""
57
+ },
58
+ "replace": {
59
+ "shama/baton": "*"
60
+ },
61
+ "require-dev": {
62
+ "composer/composer": "1.0.*@dev",
63
+ "phpunit/phpunit": "3.7.*"
64
+ },
65
+ "time": "2014-02-24T04:21:34+00:00",
66
+ "type": "composer-installer",
67
+ "extra": {
68
+ "class": "Composer\\Installers\\Installer",
69
+ "branch-alias": {
70
+ "dev-master": "1.0-dev"
71
+ }
72
+ },
73
+ "installation-source": "dist",
74
+ "autoload": {
75
+ "psr-0": {
76
+ "Composer\\Installers\\": "src/"
77
+ }
78
+ },
79
+ "notification-url": "https://packagist.org/downloads/",
80
+ "license": [
81
+ "MIT"
82
+ ],
83
+ "authors": [
84
+ {
85
+ "name": "Kyle Robinson Young",
86
+ "email": "kyle@dontkry.com",
87
+ "homepage": "https://github.com/shama",
88
+ "role": "Developer"
89
+ }
90
+ ],
91
+ "description": "A multi-framework Composer library installer",
92
+ "homepage": "http://composer.github.com/installers/",
93
+ "keywords": [
94
+ "Craft",
95
+ "Hurad",
96
+ "MODX Evo",
97
+ "OXID",
98
+ "WolfCMS",
99
+ "agl",
100
+ "annotatecms",
101
+ "cakephp",
102
+ "codeigniter",
103
+ "concrete5",
104
+ "croogo",
105
+ "drupal",
106
+ "elgg",
107
+ "fuelphp",
108
+ "installer",
109
+ "joomla",
110
+ "kohana",
111
+ "laravel",
112
+ "lithium",
113
+ "magento",
114
+ "mako",
115
+ "mediawiki",
116
+ "modulework",
117
+ "phpbb",
118
+ "piwik",
119
+ "ppi",
120
+ "shopware",
121
+ "silverstripe",
122
+ "symfony",
123
+ "typo3",
124
+ "wordpress",
125
+ "zend",
126
+ "zikula"
127
+ ],
128
+ "support": {
129
+ "issues": "https://github.com/composer/installers/issues",
130
+ "source": "https://github.com/composer/installers/tree/master"
131
+ },
132
+ "install-path": "./installers"
133
+ },
134
+ {
135
+ "name": "squizlabs/php_codesniffer",
136
+ "version": "3.6.1",
137
+ "version_normalized": "3.6.1.0",
138
+ "source": {
139
+ "type": "git",
140
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
141
+ "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e"
142
+ },
143
+ "dist": {
144
+ "type": "zip",
145
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e",
146
+ "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e",
147
+ "shasum": ""
148
+ },
149
+ "require": {
150
+ "ext-simplexml": "*",
151
+ "ext-tokenizer": "*",
152
+ "ext-xmlwriter": "*",
153
+ "php": ">=5.4.0"
154
+ },
155
+ "require-dev": {
156
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
157
+ },
158
+ "time": "2021-10-11T04:00:11+00:00",
159
+ "bin": [
160
+ "bin/phpcs",
161
+ "bin/phpcbf"
162
+ ],
163
+ "type": "library",
164
+ "extra": {
165
+ "branch-alias": {
166
+ "dev-master": "3.x-dev"
167
+ }
168
+ },
169
+ "installation-source": "dist",
170
+ "notification-url": "https://packagist.org/downloads/",
171
+ "license": [
172
+ "BSD-3-Clause"
173
+ ],
174
+ "authors": [
175
+ {
176
+ "name": "Greg Sherwood",
177
+ "role": "lead"
178
+ }
179
+ ],
180
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
181
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
182
+ "keywords": [
183
+ "phpcs",
184
+ "standards"
185
+ ],
186
+ "support": {
187
+ "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
188
+ "source": "https://github.com/squizlabs/PHP_CodeSniffer",
189
+ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
190
+ },
191
+ "install-path": "../squizlabs/php_codesniffer"
192
+ },
193
+ {
194
+ "name": "wp-coding-standards/wpcs",
195
+ "version": "2.3.0",
196
+ "version_normalized": "2.3.0.0",
197
+ "source": {
198
+ "type": "git",
199
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
200
+ "reference": "7da1894633f168fe244afc6de00d141f27517b62"
201
+ },
202
+ "dist": {
203
+ "type": "zip",
204
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62",
205
+ "reference": "7da1894633f168fe244afc6de00d141f27517b62",
206
+ "shasum": ""
207
+ },
208
+ "require": {
209
+ "php": ">=5.4",
210
+ "squizlabs/php_codesniffer": "^3.3.1"
211
+ },
212
+ "require-dev": {
213
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
214
+ "phpcompatibility/php-compatibility": "^9.0",
215
+ "phpcsstandards/phpcsdevtools": "^1.0",
216
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
217
+ },
218
+ "suggest": {
219
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
220
+ },
221
+ "time": "2020-05-13T23:57:56+00:00",
222
+ "type": "phpcodesniffer-standard",
223
+ "installation-source": "dist",
224
+ "notification-url": "https://packagist.org/downloads/",
225
+ "license": [
226
+ "MIT"
227
+ ],
228
+ "authors": [
229
+ {
230
+ "name": "Contributors",
231
+ "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
232
+ }
233
+ ],
234
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
235
+ "keywords": [
236
+ "phpcs",
237
+ "standards",
238
+ "wordpress"
239
+ ],
240
+ "support": {
241
+ "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
242
+ "source": "https://github.com/WordPress/WordPress-Coding-Standards",
243
+ "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
244
+ },
245
+ "install-path": "../wp-coding-standards/wpcs"
246
+ }
247
+ ],
248
+ "dev": true,
249
+ "dev-package-names": []
250
+ }
includes/vendor/composer/installed.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array(
2
+ 'root' => array(
3
+ 'pretty_version' => '1.0.0+no-version-set',
4
+ 'version' => '1.0.0.0',
5
+ 'type' => 'wordpress-plugin',
6
+ 'install_path' => __DIR__ . '/../../../',
7
+ 'aliases' => array(),
8
+ 'reference' => NULL,
9
+ 'name' => 'fullworks/stop-user-enumeration',
10
+ 'dev' => true,
11
+ ),
12
+ 'versions' => array(
13
+ 'alanef/plugindonation_lib' => array(
14
+ 'pretty_version' => 'dev-master',
15
+ 'version' => 'dev-master',
16
+ 'type' => 'library',
17
+ 'install_path' => __DIR__ . '/../alanef/plugindonation_lib',
18
+ 'aliases' => array(
19
+ 0 => '9999999-dev',
20
+ ),
21
+ 'reference' => '63f47f5075fb080c42e44ac9cc6cb2f6618e9ab2',
22
+ 'dev_requirement' => false,
23
+ ),
24
+ 'composer/installers' => array(
25
+ 'pretty_version' => 'v1.0.12',
26
+ 'version' => '1.0.12.0',
27
+ 'type' => 'composer-installer',
28
+ 'install_path' => __DIR__ . '/./installers',
29
+ 'aliases' => array(),
30
+ 'reference' => '4127333b03e8b4c08d081958548aae5419d1a2fa',
31
+ 'dev_requirement' => false,
32
+ ),
33
+ 'fullworks/stop-user-enumeration' => array(
34
+ 'pretty_version' => '1.0.0+no-version-set',
35
+ 'version' => '1.0.0.0',
36
+ 'type' => 'wordpress-plugin',
37
+ 'install_path' => __DIR__ . '/../../../',
38
+ 'aliases' => array(),
39
+ 'reference' => NULL,
40
+ 'dev_requirement' => false,
41
+ ),
42
+ 'shama/baton' => array(
43
+ 'dev_requirement' => false,
44
+ 'replaced' => array(
45
+ 0 => '*',
46
+ ),
47
+ ),
48
+ 'squizlabs/php_codesniffer' => array(
49
+ 'pretty_version' => '3.6.1',
50
+ 'version' => '3.6.1.0',
51
+ 'type' => 'library',
52
+ 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
53
+ 'aliases' => array(),
54
+ 'reference' => 'f268ca40d54617c6e06757f83f699775c9b3ff2e',
55
+ 'dev_requirement' => false,
56
+ ),
57
+ 'wp-coding-standards/wpcs' => array(
58
+ 'pretty_version' => '2.3.0',
59
+ 'version' => '2.3.0.0',
60
+ 'type' => 'phpcodesniffer-standard',
61
+ 'install_path' => __DIR__ . '/../wp-coding-standards/wpcs',
62
+ 'aliases' => array(),
63
+ 'reference' => '7da1894633f168fe244afc6de00d141f27517b62',
64
+ 'dev_requirement' => false,
65
+ ),
66
+ ),
67
+ );
includes/vendor/composer/installers/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2012 Kyle Robinson Young
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
includes/vendor/composer/installers/phpunit.xml.dist ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <phpunit backupGlobals="false"
4
+ backupStaticAttributes="false"
5
+ colors="true"
6
+ convertErrorsToExceptions="true"
7
+ convertNoticesToExceptions="true"
8
+ convertWarningsToExceptions="true"
9
+ processIsolation="false"
10
+ stopOnFailure="false"
11
+ syntaxCheck="false"
12
+ bootstrap="tests/bootstrap.php"
13
+ >
14
+ <testsuites>
15
+ <testsuite name="Installers Test Suite">
16
+ <directory>tests/Composer/Installers</directory>
17
+ </testsuite>
18
+ </testsuites>
19
+
20
+ <filter>
21
+ <whitelist>
22
+ <directory>src/Composer/Installers</directory>
23
+ </whitelist>
24
+ </filter>
25
+ </phpunit>
includes/vendor/composer/installers/src/Composer/Installers/AglInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AglInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'More/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function($matches) {
16
+ return strtoupper($matches[1]);
17
+ }, $vars['name']);
18
+
19
+ return $vars;
20
+ }
21
+ }
includes/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AnnotateCmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'addons/modules/{$name}/',
8
+ 'component' => 'addons/components/{$name}/',
9
+ 'service' => 'addons/services/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Composer;
5
+ use Composer\Package\PackageInterface;
6
+
7
+ abstract class BaseInstaller
8
+ {
9
+ protected $locations = array();
10
+ protected $composer;
11
+ protected $package;
12
+
13
+ /**
14
+ * Initializes base installer.
15
+ *
16
+ * @param PackageInterface $package
17
+ * @param Composer $composer
18
+ */
19
+ public function __construct(PackageInterface $package = null, Composer $composer = null)
20
+ {
21
+ $this->composer = $composer;
22
+ $this->package = $package;
23
+ }
24
+
25
+ /**
26
+ * Return the install path based on package type.
27
+ *
28
+ * @param PackageInterface $package
29
+ * @param string $frameworkType
30
+ * @return string
31
+ */
32
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
33
+ {
34
+ $type = $this->package->getType();
35
+
36
+ $prettyName = $this->package->getPrettyName();
37
+ if (strpos($prettyName, '/') !== false) {
38
+ list($vendor, $name) = explode('/', $prettyName);
39
+ } else {
40
+ $vendor = '';
41
+ $name = $prettyName;
42
+ }
43
+
44
+ $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
45
+
46
+ $extra = $package->getExtra();
47
+ if (!empty($extra['installer-name'])) {
48
+ $availableVars['name'] = $extra['installer-name'];
49
+ }
50
+
51
+ if ($this->composer->getPackage()) {
52
+ $extra = $this->composer->getPackage()->getExtra();
53
+ if (!empty($extra['installer-paths'])) {
54
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type);
55
+ if ($customPath !== false) {
56
+ return $this->templatePath($customPath, $availableVars);
57
+ }
58
+ }
59
+ }
60
+
61
+ $packageType = substr($type, strlen($frameworkType) + 1);
62
+ if (!isset($this->locations[$packageType])) {
63
+ throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
64
+ }
65
+
66
+ return $this->templatePath($this->locations[$packageType], $availableVars);
67
+ }
68
+
69
+ /**
70
+ * For an installer to override to modify the vars per installer.
71
+ *
72
+ * @param array $vars
73
+ * @return array
74
+ */
75
+ public function inflectPackageVars($vars)
76
+ {
77
+ return $vars;
78
+ }
79
+
80
+ /**
81
+ * Gets the installer's locations
82
+ *
83
+ * @return array
84
+ */
85
+ public function getLocations()
86
+ {
87
+ return $this->locations;
88
+ }
89
+
90
+ /**
91
+ * Replace vars in a path
92
+ *
93
+ * @param string $path
94
+ * @param array $vars
95
+ * @return string
96
+ */
97
+ protected function templatePath($path, array $vars = array())
98
+ {
99
+ if (strpos($path, '{') !== false) {
100
+ extract($vars);
101
+ preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
102
+ if (!empty($matches[1])) {
103
+ foreach ($matches[1] as $var) {
104
+ $path = str_replace('{$' . $var . '}', $$var, $path);
105
+ }
106
+ }
107
+ }
108
+
109
+ return $path;
110
+ }
111
+
112
+ /**
113
+ * Search through a passed paths array for a custom install path.
114
+ *
115
+ * @param array $paths
116
+ * @param string $name
117
+ * @param string $type
118
+ * @return string
119
+ */
120
+ protected function mapCustomInstallPaths(array $paths, $name, $type)
121
+ {
122
+ foreach ($paths as $path => $names) {
123
+ if (in_array($name, $names) || in_array('type:' . $type, $names)) {
124
+ return $path;
125
+ }
126
+ }
127
+
128
+ return false;
129
+ }
130
+ }
includes/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CakePHPInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
16
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
includes/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CodeIgniterInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'application/libraries/{$name}/',
8
+ 'third-party' => 'application/third_party/{$name}/',
9
+ 'module' => 'application/modules/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Concrete5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'block' => 'blocks/{$name}/',
8
+ 'package' => 'packages/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CraftInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'craft/plugins/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CroogoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ 'theme' => 'View/Themed/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
includes/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DrupalInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ 'profile' => 'profiles/{$name}/',
10
+ 'drush' => 'drush/{$name}/',
11
+ );
12
+ }
includes/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ElggInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'mod/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'fuel/app/modules/{$name}/',
8
+ 'package' => 'fuel/packages/{$name}/',
9
+ 'theme' => 'fuel/themes/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class HuradInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ 'theme' => 'View/Themed/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
includes/vendor/composer/installers/src/Composer/Installers/Installer.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Installer\LibraryInstaller;
5
+ use Composer\Package\PackageInterface;
6
+ use Composer\Repository\InstalledRepositoryInterface;
7
+
8
+ class Installer extends LibraryInstaller
9
+ {
10
+ /**
11
+ * Package types to installer class map
12
+ *
13
+ * @var array
14
+ */
15
+ private $supportedTypes = array(
16
+ 'agl' => 'AglInstaller',
17
+ 'annotatecms' => 'AnnotateCmsInstaller',
18
+ 'cakephp' => 'CakePHPInstaller',
19
+ 'codeigniter' => 'CodeIgniterInstaller',
20
+ 'concrete5' => 'Concrete5Installer',
21
+ 'craft' => 'CraftInstaller',
22
+ 'croogo' => 'CroogoInstaller',
23
+ 'drupal' => 'DrupalInstaller',
24
+ 'elgg' => 'ElggInstaller',
25
+ 'piwik' => 'PiwikInstaller',
26
+ 'fuel' => 'FuelInstaller',
27
+ 'hurad' => 'HuradInstaller',
28
+ 'joomla' => 'JoomlaInstaller',
29
+ 'kohana' => 'KohanaInstaller',
30
+ 'laravel' => 'LaravelInstaller',
31
+ 'lithium' => 'LithiumInstaller',
32
+ 'magento' => 'MagentoInstaller',
33
+ 'mako' => 'MakoInstaller',
34
+ 'modxevo' => 'MODXEvoInstaller',
35
+ 'mediawiki' => 'MediaWikiInstaller',
36
+ 'modulework' => 'MODULEWorkInstaller',
37
+ 'oxid' => 'OxidInstaller',
38
+ 'phpbb' => 'PhpBBInstaller',
39
+ 'piwik' => 'PiwikInstaller',
40
+ 'ppi' => 'PPIInstaller',
41
+ 'shopware' => 'ShopwareInstaller',
42
+ 'silverstripe' => 'SilverStripeInstaller',
43
+ 'symfony1' => 'Symfony1Installer',
44
+ 'wolfcms' => 'WolfCMSInstaller',
45
+ 'wordpress' => 'WordPressInstaller',
46
+ 'zend' => 'ZendInstaller',
47
+ 'zikula' => 'ZikulaInstaller',
48
+ 'typo3-flow' => 'TYPO3FlowInstaller',
49
+ 'typo3-cms' => 'TYPO3CmsInstaller',
50
+ );
51
+
52
+ /**
53
+ * {@inheritDoc}
54
+ */
55
+ public function getInstallPath(PackageInterface $package)
56
+ {
57
+ $type = $package->getType();
58
+ $frameworkType = $this->findFrameworkType($type);
59
+
60
+ if ($frameworkType === false) {
61
+ throw new \InvalidArgumentException(
62
+ 'Sorry the package type of this package is not yet supported.'
63
+ );
64
+ }
65
+
66
+ $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
67
+ $installer = new $class($package, $this->composer);
68
+
69
+ return $installer->getInstallPath($package, $frameworkType);
70
+ }
71
+
72
+ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
73
+ {
74
+ if (!$repo->hasPackage($package)) {
75
+ throw new \InvalidArgumentException('Package is not installed: '.$package);
76
+ }
77
+
78
+ $repo->removePackage($package);
79
+
80
+ $installPath = $this->getInstallPath($package);
81
+ $this->io->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem->removeDirectory($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
82
+ }
83
+
84
+ /**
85
+ * {@inheritDoc}
86
+ */
87
+ public function supports($packageType)
88
+ {
89
+ $frameworkType = $this->findFrameworkType($packageType);
90
+
91
+ if ($frameworkType === false) {
92
+ return false;
93
+ }
94
+
95
+ $locationPattern = $this->getLocationPattern($frameworkType);
96
+ return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
97
+ }
98
+
99
+ /**
100
+ * Finds a supported framework type if it exists and returns it
101
+ *
102
+ * @param string $type
103
+ * @return string
104
+ */
105
+ protected function findFrameworkType($type)
106
+ {
107
+ $frameworkType = false;
108
+
109
+ foreach ($this->supportedTypes as $key => $val) {
110
+ if ($key === substr($type, 0, strlen($key))) {
111
+ $frameworkType = substr($type, 0, strlen($key));
112
+ break;
113
+ }
114
+ }
115
+
116
+ return $frameworkType;
117
+ }
118
+
119
+ /**
120
+ * Get the second part of the regular expression to check for support of a
121
+ * package type
122
+ *
123
+ * @param string $frameworkType
124
+ * @return string
125
+ */
126
+ protected function getLocationPattern($frameworkType)
127
+ {
128
+ $pattern = false;
129
+ if (!empty($this->supportedTypes[$frameworkType])) {
130
+ $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
131
+ /** @var BaseInstaller $framework */
132
+ $framework = new $frameworkClass;
133
+ $locations = array_keys($framework->getLocations());
134
+ $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
135
+ }
136
+ return $pattern ? : '(\w+)';
137
+ }
138
+ }
includes/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class JoomlaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'template' => 'templates/{$name}/',
10
+ 'plugin' => 'plugins/{$name}/',
11
+ 'library' => 'libraries/{$name}/',
12
+ );
13
+
14
+ // TODO: Add inflector for mod_ and com_ names
15
+ }
includes/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KohanaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LaravelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LithiumInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ 'source' => 'libraries/_source/{$name}/',
9
+ );
10
+ }
includes/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MODULEWorkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX Evolution specifics when installing packages.
6
+ */
7
+ class MODXEvoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'snippet' => 'assets/snippets/{$name}/',
11
+ 'plugin' => 'assets/plugins/{$name}/',
12
+ 'module' => 'assets/modules/{$name}/',
13
+ 'template' => 'assets/templates/{$name}/',
14
+ 'lib' => 'assets/lib/{$name}/'
15
+ );
16
+ }
includes/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MagentoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'app/design/frontend/{$name}/',
8
+ 'skin' => 'skin/frontend/default/{$name}/',
9
+ 'library' => 'lib/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MakoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'app/packages/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MediaWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase keeping existing uppercase chars.
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
16
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
17
+
18
+ return $vars;
19
+ }
20
+
21
+ }
includes/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OxidInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PPIInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhpBBInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$vendor}/{$name}/',
8
+ 'language' => 'language/{$name}/',
9
+ 'style' => 'styles/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class PiwikInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ */
9
+ class PiwikInstaller extends BaseInstaller
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $locations = array(
15
+ 'plugin' => 'plugins/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
includes/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for shopware
6
+ * @author Benjamin Boit
7
+ */
8
+ class ShopwareInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
12
+ 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
13
+ 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
14
+ 'theme' => 'templates/{$name}/'
15
+ );
16
+
17
+ /**
18
+ * Transforms the names
19
+ * @param array $vars
20
+ * @return array
21
+ */
22
+ public function inflectPackageVars($vars)
23
+ {
24
+ if($vars['type'] === 'shopware-theme') {
25
+ return $this->correctThemeName($vars);
26
+ } else {
27
+ return $this->correctPluginName($vars);
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Changes the name to a camelcased combination of vendor and name
33
+ * @param array $vars
34
+ * @return array
35
+ */
36
+ private function correctPluginName($vars)
37
+ {
38
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
39
+ return strtoupper($matches[0][1]);
40
+ }, $vars['name']);
41
+
42
+ $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
43
+
44
+ return $vars;
45
+ }
46
+
47
+ /**
48
+ * Changes the name to a underscore separated name
49
+ * @param array $vars
50
+ * @return array
51
+ */
52
+ private function correctThemeName($vars)
53
+ {
54
+ $vars['name'] = str_replace('-', '_', $vars['name']);
55
+
56
+ return $vars;
57
+ }
58
+ }
includes/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class SilverStripeInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'module' => '{$name}/',
10
+ 'theme' => 'themes/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Return the install path based on package type.
15
+ *
16
+ * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
17
+ * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return string
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ if (
26
+ $package->getName() == 'silverstripe/framework'
27
+ && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
28
+ && version_compare($package->getVersion(), '2.999.999') < 0
29
+ ) {
30
+ return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
31
+ } else {
32
+ return parent::getInstallPath($package, $frameworkType);
33
+ }
34
+
35
+ }
36
+ }
includes/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin installer for symfony 1.x
6
+ *
7
+ * @author Jérôme Tamarelle <jerome@tamarelle.net>
8
+ */
9
+ class Symfony1Installer extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'plugin' => 'plugins/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
21
+ return strtoupper($matches[0][1]);
22
+ }, $vars['name']);
23
+
24
+ return $vars;
25
+ }
26
+ }
includes/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Extension installer for TYPO3 CMS
6
+ *
7
+ * @author Sascha Egerer <sascha.egerer@dkd.de>
8
+ */
9
+ class TYPO3CmsInstaller extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'extension' => 'typo3conf/ext/{$name}/',
13
+ );
14
+ }
includes/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TYPO3 Flow specifics when installing packages.
6
+ */
7
+ class TYPO3FlowInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'package' => 'Packages/Application/{$name}/',
11
+ 'framework' => 'Packages/Framework/{$name}/',
12
+ 'plugin' => 'Packages/Plugins/{$name}/',
13
+ 'site' => 'Packages/Sites/{$name}/',
14
+ 'boilerplate' => 'Packages/Boilerplates/{$name}/',
15
+ 'build' => 'Build/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Modify the package name to be a TYPO3 Flow style key.
20
+ *
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $autoload = $this->package->getAutoload();
27
+ if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
28
+ $namespace = key($autoload['psr-0']);
29
+ $vars['name'] = str_replace('\\', '.', $namespace);
30
+ }
31
+ return $vars;
32
+ }
33
+ }
includes/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WolfCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wolf/plugins/{$name}/',
8
+ );
9
+ }
includes/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WordPressInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wp-content/plugins/{$name}/',
8
+ 'theme' => 'wp-content/themes/{$name}/',
9
+ 'muplugin' => 'wp-content/mu-plugins/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZendInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'library/{$name}/',
8
+ 'extra' => 'extras/library/{$name}/',
9
+ 'module' => 'module/{$name}/',
10
+ );
11
+ }
includes/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZikulaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$vendor}-{$name}/',
8
+ 'theme' => 'themes/{$vendor}-{$name}/'
9
+ );
10
+ }
includes/vendor/composer/installers/src/bootstrap.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function includeIfExists($file)
3
+ {
4
+ if (file_exists($file)) {
5
+ return include $file;
6
+ }
7
+ }
8
+ if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
9
+ die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
10
+ 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
11
+ 'php composer.phar install'.PHP_EOL);
12
+ }
13
+ return $loader;
includes/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\CakePHPInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+ use Composer\Config;
8
+
9
+ class CakePHPInstallerTest extends TestCase
10
+ {
11
+ private $composer;
12
+ private $io;
13
+
14
+ /**
15
+ * setUp
16
+ *
17
+ * @return void
18
+ */
19
+ public function setUp()
20
+ {
21
+ $this->package = new Package('CamelCased', '1.0', '1.0');
22
+ $this->io = $this->getMock('Composer\IO\PackageInterface');
23
+ $this->composer = new Composer();
24
+ }
25
+
26
+ /**
27
+ * testInflectPackageVars
28
+ *
29
+ * @return void
30
+ */
31
+ public function testInflectPackageVars()
32
+ {
33
+ $installer = new CakePHPInstaller($this->package, $this->composer);
34
+ $result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
35
+ $this->assertEquals($result, array('name' => 'CamelCased'));
36
+
37
+ $installer = new CakePHPInstaller($this->package, $this->composer);
38
+ $result = $installer->inflectPackageVars(array('name' => 'with-dash'));
39
+ $this->assertEquals($result, array('name' => 'WithDash'));
40
+
41
+ $installer = new CakePHPInstaller($this->package, $this->composer);
42
+ $result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
43
+ $this->assertEquals($result, array('name' => 'WithUnderscore'));
44
+ }
45
+
46
+ }
includes/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\Installer;
5
+ use Composer\Util\Filesystem;
6
+ use Composer\Package\Package;
7
+ use Composer\Package\RootPackage;
8
+ use Composer\Composer;
9
+ use Composer\Config;
10
+
11
+ class InstallerTest extends TestCase
12
+ {
13
+ private $composer;
14
+ private $config;
15
+ private $vendorDir;
16
+ private $binDir;
17
+ private $dm;
18
+ private $repository;
19
+ private $io;
20
+ private $fs;
21
+
22
+ /**
23
+ * setUp
24
+ *
25
+ * @return void
26
+ */
27
+ public function setUp()
28
+ {
29
+ $this->fs = new Filesystem;
30
+
31
+ $this->composer = new Composer();
32
+ $this->config = new Config();
33
+ $this->composer->setConfig($this->config);
34
+
35
+ $this->vendorDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-vendor';
36
+ $this->ensureDirectoryExistsAndClear($this->vendorDir);
37
+
38
+ $this->binDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-bin';
39
+ $this->ensureDirectoryExistsAndClear($this->binDir);
40
+
41
+ $this->config->merge(array(
42
+ 'config' => array(
43
+ 'vendor-dir' => $this->vendorDir,
44
+ 'bin-dir' => $this->binDir,
45
+ ),
46
+ ));
47
+
48
+ $this->dm = $this->getMockBuilder('Composer\Downloader\DownloadManager')
49
+ ->disableOriginalConstructor()
50
+ ->getMock();
51
+ $this->composer->setDownloadManager($this->dm);
52
+
53
+ $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
54
+ $this->io = $this->getMock('Composer\IO\IOInterface');
55
+ }
56
+
57
+ /**
58
+ * tearDown
59
+ *
60
+ * @return void
61
+ */
62
+ public function tearDown()
63
+ {
64
+ $this->fs->removeDirectory($this->vendorDir);
65
+ $this->fs->removeDirectory($this->binDir);
66
+ }
67
+
68
+ /**
69
+ * testSupports
70
+ *
71
+ * @return void
72
+ *
73
+ * @dataProvider dataForTestSupport
74
+ */
75
+ public function testSupports($type, $expected)
76
+ {
77
+ $installer = new Installer($this->io, $this->composer);
78
+ $this->assertSame($expected, $installer->supports($type), sprintf('Failed to show support for %s', $type));
79
+ }
80
+
81
+ /**
82
+ * dataForTestSupport
83
+ */
84
+ public function dataForTestSupport()
85
+ {
86
+ return array(
87
+ array('agl-module', true),
88
+ array('annotatecms-module', true),
89
+ array('annotatecms-component', true),
90
+ array('annotatecms-service', true),
91
+ array('cakephp', false),
92
+ array('cakephp-', false),
93
+ array('cakephp-app', false),
94
+ array('cakephp-plugin', true),
95
+ array('codeigniter-app', false),
96
+ array('codeigniter-library', true),
97
+ array('codeigniter-third-party', true),
98
+ array('codeigniter-module', true),
99
+ array('concrete5-block', true),
100
+ array('concrete5-package', true),
101
+ array('concrete5-theme', true),
102
+ array('craft-plugin', true),
103
+ array('croogo-plugin', true),
104
+ array('croogo-theme', true),
105
+ array('drupal-module', true),
106
+ array('elgg-plugin', true),
107
+ array('fuel-module', true),
108
+ array('fuel-package', true),
109
+ array('hurad-plugin', true),
110
+ array('hurad-theme', true),
111
+ array('joomla-library', true),
112
+ array('kohana-module', true),
113
+ array('laravel-library', true),
114
+ array('lithium-library', true),
115
+ array('magento-library', true),
116
+ array('mako-package', true),
117
+ array('modxevo-snippet', true),
118
+ array('modxevo-plugin', true),
119
+ array('modxevo-module', true),
120
+ array('modxevo-template', true),
121
+ array('modxevo-lib', true),
122
+ array('mediawiki-extension', true),
123
+ array('modulework-module', true),
124
+ array('piwik-plugin', true),
125
+ array('phpbb-extension', true),
126
+ array('ppi-module', true),
127
+ array('shopware-backend-plugin', true),
128
+ array('shopware-core-plugin', true),
129
+ array('shopware-frontend-plugin', true),
130
+ array('shopware-theme', true),
131
+ array('silverstripe-module', true),
132
+ array('silverstripe-theme', true),
133
+ array('symfony1-plugin', true),
134
+ array('typo3-flow-plugin', true),
135
+ array('typo3-cms-extension', true),
136
+ array('wolfcms-plugin', true),
137
+ array('wordpress-plugin', true),
138
+ array('wordpress-core', false),
139
+ array('zend-library', true),
140
+ array('zikula-module', true),
141
+ array('zikula-theme', true),
142
+ );
143
+ }
144
+
145
+ /**
146
+ * testInstallPath
147
+ *
148
+ * @dataProvider dataForTestInstallPath
149
+ */
150
+ public function testInstallPath($type, $path, $name, $version = '1.0.0')
151
+ {
152
+ $installer = new Installer($this->io, $this->composer);
153
+ $package = new Package($name, $version, $version);
154
+
155
+ $package->setType($type);
156
+ $result = $installer->getInstallPath($package);
157
+ $this->assertEquals($path, $result);
158
+ }
159
+
160
+ /**
161
+ * dataFormTestInstallPath
162
+ */
163
+ public function dataForTestInstallPath()
164
+ {
165
+ return array(
166
+ array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
167
+ array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
168
+ array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
169
+ array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
170
+ array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
171
+ array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
172
+ array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
173
+ array('concrete5-block', 'blocks/concrete5_block/', 'remo/concrete5_block'),
174
+ array('concrete5-package', 'packages/concrete5_package/', 'remo/concrete5_package'),
175
+ array('concrete5-theme', 'themes/concrete5_theme/', 'remo/concrete5_theme'),
176
+ array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'),
177
+ array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'),
178
+ array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'),
179
+ array('drupal-module', 'modules/my_module/', 'shama/my_module'),
180
+ array('drupal-theme', 'themes/my_module/', 'shama/my_module'),
181
+ array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
182
+ array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
183
+ array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
184
+ array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
185
+ array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
186
+ array('hurad-plugin', 'Plugin/Akismet/', 'atkrad/akismet'),
187
+ array('hurad-theme', 'View/Themed/Hurad2013/', 'atkrad/Hurad2013'),
188
+ array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
189
+ array('kohana-module', 'modules/my_package/', 'shama/my_package'),
190
+ array('laravel-library', 'libraries/my_package/', 'shama/my_package'),
191
+ array('lithium-library', 'libraries/li3_test/', 'user/li3_test'),
192
+ array('magento-library', 'lib/foo/', 'test/foo'),
193
+ array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'),
194
+ array('modxevo-plugin', 'assets/plugins/my_plugin/', 'shama/my_plugin'),
195
+ array('modxevo-module', 'assets/modules/my_module/', 'shama/my_module'),
196
+ array('modxevo-template', 'assets/templates/my_template/', 'shama/my_template'),
197
+ array('modxevo-lib', 'assets/lib/my_lib/', 'shama/my_lib'),
198
+ array('mako-package', 'app/packages/my_package/', 'shama/my_package'),
199
+ array('mediawiki-extension', 'extensions/APC/', 'author/APC' ),
200
+ array('mediawiki-extension', 'extensions/UploadWizard/', 'author/upload-wizard' ),
201
+ array('mediawiki-extension', 'extensions/SyntaxHighlight_GeSHi/', 'author/syntax-highlight_GeSHi' ),
202
+ array('modulework-module', 'modules/my_package/', 'shama/my_package'),
203
+ array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'),
204
+ array('phpbb-extension', 'ext/test/foo/', 'test/foo'),
205
+ array('phpbb-style', 'styles/foo/', 'test/foo'),
206
+ array('phpbb-language', 'language/foo/', 'test/foo'),
207
+ array('ppi-module', 'modules/foo/', 'test/foo'),
208
+ array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
209
+ array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
210
+ array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
211
+ array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
212
+ array('silverstripe-module', 'my_module/', 'shama/my_module'),
213
+ array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
214
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
215
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0-rc1'),
216
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', 'my/branch'),
217
+ array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
218
+ array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
219
+ array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
220
+ array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
221
+ array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
222
+ array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
223
+ array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
224
+ array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
225
+ array('wordpress-muplugin', 'wp-content/mu-plugins/my_plugin/', 'shama/my_plugin'),
226
+ array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'),
227
+ array('zikula-module', 'modules/my-test_module/', 'my/test_module'),
228
+ array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'),
229
+ );
230
+ }
231
+
232
+ /**
233
+ * testGetCakePHPInstallPathException
234
+ *
235
+ * @return void
236
+ *
237
+ * @expectedException \InvalidArgumentException
238
+ */
239
+ public function testGetCakePHPInstallPathException()
240
+ {
241
+ $installer = new Installer($this->io, $this->composer);
242
+ $package = new Package('shama/ftp', '1.0.0', '1.0.0');
243
+
244
+ $package->setType('cakephp-whoops');
245
+ $result = $installer->getInstallPath($package);
246
+ }
247
+
248
+ /**
249
+ * testCustomInstallPath
250
+ */
251
+ public function testCustomInstallPath()
252
+ {
253
+ $installer = new Installer($this->io, $this->composer);
254
+ $package = new Package('shama/ftp', '1.0.0', '1.0.0');
255
+ $package->setType('cakephp-plugin');
256
+ $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
257
+ $this->composer->setPackage($consumerPackage);
258
+ $consumerPackage->setExtra(array(
259
+ 'installer-paths' => array(
260
+ 'my/custom/path/{$name}/' => array(
261
+ 'shama/ftp',
262
+ 'foo/bar',
263
+ ),
264
+ ),
265
+ ));
266
+ $result = $installer->getInstallPath($package);
267
+ $this->assertEquals('my/custom/path/Ftp/', $result);
268
+ }
269
+
270
+ /**
271
+ * testCustomInstallerName
272
+ */
273
+ public function testCustomInstallerName() {
274
+ $installer = new Installer($this->io, $this->composer);
275
+ $package = new Package('shama/cakephp-ftp-plugin', '1.0.0', '1.0.0');
276
+ $package->setType('cakephp-plugin');
277
+ $package->setExtra(array(
278
+ 'installer-name' => 'FTP',
279
+ ));
280
+ $result = $installer->getInstallPath($package);
281
+ $this->assertEquals('Plugin/FTP/', $result);
282
+ }
283
+
284
+ /**
285
+ * testCustomTypePath
286
+ */
287
+ public function testCustomTypePath() {
288
+ $installer = new Installer($this->io, $this->composer);
289
+ $package = new Package('slbmeh/my_plugin', '1.0.0', '1.0.0');
290
+ $package->setType('wordpress-plugin');
291
+ $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
292
+ $this->composer->setPackage($consumerPackage);
293
+ $consumerPackage->setExtra(array(
294
+ 'installer-paths' => array(
295
+ 'my/custom/path/{$name}/' => array(
296
+ 'type:wordpress-plugin'
297
+ ),
298
+ ),
299
+ ));
300
+ $result = $installer->getInstallPath($package);
301
+ $this->assertEquals('my/custom/path/my_plugin/', $result);
302
+ }
303
+
304
+ /**
305
+ * testNoVendorName
306
+ */
307
+ public function testNoVendorName()
308
+ {
309
+ $installer = new Installer($this->io, $this->composer);
310
+ $package = new Package('sfPhpunitPlugin', '1.0.0', '1.0.0');
311
+
312
+ $package->setType('symfony1-plugin');
313
+ $result = $installer->getInstallPath($package);
314
+ $this->assertEquals('plugins/sfPhpunitPlugin/', $result);
315
+ }
316
+
317
+ /**
318
+ * testTypo3Inflection
319
+ */
320
+ public function testTypo3Inflection()
321
+ {
322
+ $installer = new Installer($this->io, $this->composer);
323
+ $package = new Package('typo3/fluid', '1.0.0', '1.0.0');
324
+
325
+ $package->setAutoload(array(
326
+ 'psr-0' => array(
327
+ 'TYPO3\\Fluid' => 'Classes',
328
+ ),
329
+ ));
330
+
331
+ $package->setType('typo3-flow-package');
332
+ $result = $installer->getInstallPath($package);
333
+ $this->assertEquals('Packages/Application/TYPO3.Fluid/', $result);
334
+ }
335
+
336
+ public function testUninstallAndDeletePackageFromLocalRepo()
337
+ {
338
+ $package = new Package('foo', '1.0.0', '1.0.0');
339
+
340
+ $installer = $this->getMock('Composer\Installers\Installer', array('getInstallPath'), array($this->io, $this->composer));
341
+ $installer->expects($this->once())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo'));
342
+
343
+ $repo = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
344
+ $repo->expects($this->once())->method('hasPackage')->with($package)->will($this->returnValue(true));
345
+ $repo->expects($this->once())->method('removePackage')->with($package);
346
+
347
+ $installer->uninstall($repo, $package);
348
+ }
349
+ }
includes/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\MediaWikiInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+ use Composer\Config;
8
+
9
+ class MediaWikiInstallerTest extends \PHPUnit_Framework_TestCase
10
+ {
11
+ /**
12
+ * @var MediaWikiInstaller
13
+ */
14
+ private $installer;
15
+
16
+ public function setUp()
17
+ {
18
+ $this->installer = new MediaWikiInstaller(
19
+ new Package('NyanCat', '4.2', '4.2'),
20
+ new Composer()
21
+ );
22
+ }
23
+
24
+ /**
25
+ * @dataProvider packageNameInflectionProvider
26
+ */
27
+ public function testInflectPackageVars($input, $expected)
28
+ {
29
+ $this->assertEquals(
30
+ $this->installer->inflectPackageVars(array('name' => $input)),
31
+ array('name' => $expected)
32
+ );
33
+ }
34
+
35
+ public function packageNameInflectionProvider()
36
+ {
37
+ return array(
38
+ array(
39
+ 'sub-page-list',
40
+ 'SubPageList',
41
+ ),
42
+ array(
43
+ 'semantic-mediawiki',
44
+ 'SemanticMediawiki',
45
+ )
46
+ );
47
+ }
48
+ }
includes/vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Composer;
5
+ use Composer\Config;
6
+ use Composer\Installers\PiwikInstaller;
7
+ use Composer\Package\Package;
8
+ use Composer\Package\PackageInterface;
9
+
10
+ /**
11
+ * Class PiwikInstallerTest
12
+ *
13
+ * @package Composer\Installers\Test
14
+ */
15
+ class PiwikInstallerTest extends TestCase
16
+ {
17
+ /**
18
+ * @varComposer
19
+ */
20
+ private $composer;
21
+
22
+ /**
23
+ * @var PackageInterface
24
+ */
25
+ private $io;
26
+
27
+ /**
28
+ * @var Package
29
+ */
30
+ private $package;
31
+
32
+ /**
33
+ * setUp
34
+ *
35
+ * @return void
36
+ */
37
+ public function setUp()
38
+ {
39
+ $this->package = new Package('VisitSummary', '1.0', '1.0');
40
+ $this->io = $this->getMock('Composer\IO\PackageInterface');
41
+ $this->composer = new Composer();
42
+ }
43
+
44
+ /**
45
+ * testInflectPackageVars
46
+ *
47
+ * @return void
48
+ */
49
+ public function testInflectPackageVars()
50
+ {
51
+ $installer = new PiwikInstaller($this->package, $this->composer);
52
+ $result = $installer->inflectPackageVars(array('name' => 'VisitSummary'));
53
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
54
+
55
+ $installer = new PiwikInstaller($this->package, $this->composer);
56
+ $result = $installer->inflectPackageVars(array('name' => 'visit-summary'));
57
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
58
+
59
+ $installer = new PiwikInstaller($this->package, $this->composer);
60
+ $result = $installer->inflectPackageVars(array('name' => 'visit_summary'));
61
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
62
+ }
63
+
64
+ }
includes/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Installers\Test;
14
+
15
+ use Composer\Package\Version\VersionParser;
16
+ use Composer\Package\Package;
17
+ use Composer\Package\AliasPackage;
18
+ use Composer\Package\LinkConstraint\VersionConstraint;
19
+ use Composer\Util\Filesystem;
20
+
21
+ abstract class TestCase extends \PHPUnit_Framework_TestCase
22
+ {
23
+ private static $parser;
24
+
25
+ protected static function getVersionParser()
26
+ {
27
+ if (!self::$parser) {
28
+ self::$parser = new VersionParser();
29
+ }
30
+
31
+ return self::$parser;
32
+ }
33
+
34
+ protected function getVersionConstraint($operator, $version)
35
+ {
36
+ return new VersionConstraint(
37
+ $operator,
38
+ self::getVersionParser()->normalize($version)
39
+ );
40
+ }
41
+
42
+ protected function getPackage($name, $version)
43
+ {
44
+ $normVersion = self::getVersionParser()->normalize($version);
45
+
46
+ return new Package($name, $normVersion, $version);
47
+ }
48
+
49
+ protected function getAliasPackage($package, $version)
50
+ {
51
+ $normVersion = self::getVersionParser()->normalize($version);
52
+
53
+ return new AliasPackage($package, $normVersion, $version);
54
+ }
55
+
56
+ protected function ensureDirectoryExistsAndClear($directory)
57
+ {
58
+ $fs = new Filesystem();
59
+ if (is_dir($directory)) {
60
+ $fs->removeDirectory($directory);
61
+ }
62
+ mkdir($directory, 0777, true);
63
+ }
64
+ }
includes/vendor/composer/installers/tests/bootstrap.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+
3
+ $loader = require __DIR__ . '/../src/bootstrap.php';
4
+ $loader->add('Composer\Installers\Test', __DIR__);
includes/vendor/composer/platform_check.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // platform_check.php @generated by Composer
4
+
5
+ $issues = array();
6
+
7
+ if (!(PHP_VERSION_ID >= 50600)) {
8
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
9
+ }
10
+
11
+ if ($issues) {
12
+ if (!headers_sent()) {
13
+ header('HTTP/1.1 500 Internal Server Error');
14
+ }
15
+ if (!ini_get('display_errors')) {
16
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
+ } elseif (!headers_sent()) {
19
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
+ }
21
+ }
22
+ trigger_error(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
+ E_USER_ERROR
25
+ );
26
+ }
includes/vendor/freemius/wordpress-sdk/LICENSE.txt DELETED
@@ -1,674 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
- Preamble
9
-
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
12
-
13
- The licenses for most software and other practical works are designed
14
- to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
- share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- them if you wish), that you receive source code or can get it if you
26
- want it, that you can change the software or use pieces of it in new
27
- free programs, and that you know you can do these things.
28
-
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
-
68
- The precise terms and conditions for copying, distribution and
69
- modification follow.
70
-
71
- TERMS AND CONDITIONS
72
-
73
- 0. Definitions.
74
-
75
- "This License" refers to version 3 of the GNU General Public License.
76
-
77
- "Copyright" also means copyright-like laws that apply to other kinds of
78
- works, such as semiconductor masks.
79
-
80
- "The Program" refers to any copyrightable work licensed under this
81
- License. Each licensee is addressed as "you". "Licensees" and
82
- "recipients" may be individuals or organizations.
83
-
84
- To "modify" a work means to copy from or adapt all or part of the work
85
- in a fashion requiring copyright permission, other than the making of an
86
- exact copy. The resulting work is called a "modified version" of the
87
- earlier work or a work "based on" the earlier work.
88
-
89
- A "covered work" means either the unmodified Program or a work based
90
- on the Program.
91
-
92
- To "propagate" a work means to do anything with it that, without
93
- permission, would make you directly or secondarily liable for
94
- infringement under applicable copyright law, except executing it on a
95
- computer or modifying a private copy. Propagation includes copying,
96
- distribution (with or without modification), making available to the
97
- public, and in some countries other activities as well.
98
-
99
- To "convey" a work means any kind of propagation that enables other
100
- parties to make or receive copies. Mere interaction with a user through
101
- a computer network, with no transfer of a copy, is not conveying.
102
-
103
- An interactive user interface displays "Appropriate Legal Notices"
104
- to the extent that it includes a convenient and prominently visible
105
- feature that (1) displays an appropriate copyright notice, and (2)
106
- tells the user that there is no warranty for the work (except to the
107
- extent that warranties are provided), that licensees may convey the
108
- work under this License, and how to view a copy of this License. If
109
- the interface presents a list of user commands or options, such as a
110
- menu, a prominent item in the list meets this criterion.
111
-
112
- 1. Source Code.
113
-
114
- The "source code" for a work means the preferred form of the work
115
- for making modifications to it. "Object code" means any non-source
116
- form of a work.
117
-
118
- A "Standard Interface" means an interface that either is an official
119
- standard defined by a recognized standards body, or, in the case of
120
- interfaces specified for a particular programming language, one that
121
- is widely used among developers working in that language.
122
-
123
- The "System Libraries" of an executable work include anything, other
124
- than the work as a whole, that (a) is included in the normal form of
125
- packaging a Major Component, but which is not part of that Major
126
- Component, and (b) serves only to enable use of the work with that
127
- Major Component, or to implement a Standard Interface for which an
128
- implementation is available to the public in source code form. A
129
- "Major Component", in this context, means a major essential component
130
- (kernel, window system, and so on) of the specific operating system
131
- (if any) on which the executable work runs, or a compiler used to
132
- produce the work, or an object code interpreter used to run it.
133
-
134
- The "Corresponding Source" for a work in object code form means all
135
- the source code needed to generate, install, and (for an executable
136
- work) run the object code and to modify the work, including scripts to
137
- control those activities. However, it does not include the work's
138
- System Libraries, or general-purpose tools or generally available free
139
- programs which are used unmodified in performing those activities but
140
- which are not part of the work. For example, Corresponding Source
141
- includes interface definition files associated with source files for
142
- the work, and the source code for shared libraries and dynamically
143
- linked subprograms that the work is specifically designed to require,
144
- such as by intimate data communication or control flow between those
145
- subprograms and other parts of the work.
146
-
147
- The Corresponding Source need not include anything that users
148
- can regenerate automatically from other parts of the Corresponding
149
- Source.
150
-
151
- The Corresponding Source for a work in source code form is that
152
- same work.
153
-
154
- 2. Basic Permissions.
155
-
156
- All rights granted under this License are granted for the term of
157
- copyright on the Program, and are irrevocable provided the stated
158
- conditions are met. This License explicitly affirms your unlimited
159
- permission to run the unmodified Program. The output from running a
160
- covered work is covered by this License only if the output, given its
161
- content, constitutes a covered work. This License acknowledges your
162
- rights of fair use or other equivalent, as provided by copyright law.
163
-
164
- You may make, run and propagate covered works that you do not
165
- convey, without conditions so long as your license otherwise remains
166
- in force. You may convey covered works to others for the sole purpose
167
- of having them make modifications exclusively for you, or provide you
168
- with facilities for running those works, provided that you comply with
169
- the terms of this License in conveying all material for which you do
170
- not control copyright. Those thus making or running the covered works
171
- for you must do so exclusively on your behalf, under your direction
172
- and control, on terms that prohibit them from making any copies of
173
- your copyrighted material outside their relationship with you.
174
-
175
- Conveying under any other circumstances is permitted solely under
176
- the conditions stated below. Sublicensing is not allowed; section 10
177
- makes it unnecessary.
178
-
179
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
-
181
- No covered work shall be deemed part of an effective technological
182
- measure under any applicable law fulfilling obligations under article
183
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
- similar laws prohibiting or restricting circumvention of such
185
- measures.
186
-
187
- When you convey a covered work, you waive any legal power to forbid
188
- circumvention of technological measures to the extent such circumvention
189
- is effected by exercising rights under this License with respect to
190
- the covered work, and you disclaim any intention to limit operation or
191
- modification of the work as a means of enforcing, against the work's
192
- users, your or third parties' legal rights to forbid circumvention of
193
- technological measures.
194
-
195
- 4. Conveying Verbatim Copies.
196
-
197
- You may convey verbatim copies of the Program's source code as you
198
- receive it, in any medium, provided that you conspicuously and
199
- appropriately publish on each copy an appropriate copyright notice;
200
- keep intact all notices stating that this License and any
201
- non-permissive terms added in accord with section 7 apply to the code;
202
- keep intact all notices of the absence of any warranty; and give all
203
- recipients a copy of this License along with the Program.
204
-
205
- You may charge any price or no price for each copy that you convey,
206
- and you may offer support or warranty protection for a fee.
207
-
208
- 5. Conveying Modified Source Versions.
209
-
210
- You may convey a work based on the Program, or the modifications to
211
- produce it from the Program, in the form of source code under the
212
- terms of section 4, provided that you also meet all of these conditions:
213
-
214
- a) The work must carry prominent notices stating that you modified
215
- it, and giving a relevant date.
216
-
217
- b) The work must carry prominent notices stating that it is
218
- released under this License and any conditions added under section
219
- 7. This requirement modifies the requirement in section 4 to
220
- "keep intact all notices".
221
-
222
- c) You must license the entire work, as a whole, under this
223
- License to anyone who comes into possession of a copy. This
224
- License will therefore apply, along with any applicable section 7
225
- additional terms, to the whole of the work, and all its parts,
226
- regardless of how they are packaged. This License gives no
227
- permission to license the work in any other way, but it does not
228
- invalidate such permission if you have separately received it.
229
-
230
- d) If the work has interactive user interfaces, each must display
231
- Appropriate Legal Notices; however, if the Program has interactive
232
- interfaces that do not display Appropriate Legal Notices, your
233
- work need not make them do so.
234
-
235
- A compilation of a covered work with other separate and independent
236
- works, which are not by their nature extensions of the covered work,
237
- and which are not combined with it such as to form a larger program,
238
- in or on a volume of a storage or distribution medium, is called an
239
- "aggregate" if the compilation and its resulting copyright are not
240
- used to limit the access or legal rights of the compilation's users
241
- beyond what the individual works permit. Inclusion of a covered work
242
- in an aggregate does not cause this License to apply to the other
243
- parts of the aggregate.
244
-
245
- 6. Conveying Non-Source Forms.
246
-
247
- You may convey a covered work in object code form under the terms
248
- of sections 4 and 5, provided that you also convey the
249
- machine-readable Corresponding Source under the terms of this License,
250
- in one of these ways:
251
-
252
- a) Convey the object code in, or embodied in, a physical product
253
- (including a physical distribution medium), accompanied by the
254
- Corresponding Source fixed on a durable physical medium
255
- customarily used for software interchange.
256
-
257
- b) Convey the object code in, or embodied in, a physical product
258
- (including a physical distribution medium), accompanied by a
259
- written offer, valid for at least three years and valid for as
260
- long as you offer spare parts or customer support for that product
261
- model, to give anyone who possesses the object code either (1) a
262
- copy of the Corresponding Source for all the software in the
263
- product that is covered by this License, on a durable physical
264
- medium customarily used for software interchange, for a price no
265
- more than your reasonable cost of physically performing this
266
- conveying of source, or (2) access to copy the
267
- Corresponding Source from a network server at no charge.
268
-
269
- c) Convey individual copies of the object code with a copy of the
270
- written offer to provide the Corresponding Source. This
271
- alternative is allowed only occasionally and noncommercially, and
272
- only if you received the object code with such an offer, in accord
273
- with subsection 6b.
274
-
275
- d) Convey the object code by offering access from a designated
276
- place (gratis or for a charge), and offer equivalent access to the
277
- Corresponding Source in the same way through the same place at no
278
- further charge. You need not require recipients to copy the
279
- Corresponding Source along with the object code. If the place to
280
- copy the object code is a network server, the Corresponding Source
281
- may be on a different server (operated by you or a third party)
282
- that supports equivalent copying facilities, provided you maintain
283
- clear directions next to the object code saying where to find the
284
- Corresponding Source. Regardless of what server hosts the
285
- Corresponding Source, you remain obligated to ensure that it is
286
- available for as long as needed to satisfy these requirements.
287
-
288
- e) Convey the object code using peer-to-peer transmission, provided
289
- you inform other peers where the object code and Corresponding
290
- Source of the work are being offered to the general public at no
291
- charge under subsection 6d.
292
-
293
- A separable portion of the object code, whose source code is excluded
294
- from the Corresponding Source as a System Library, need not be
295
- included in conveying the object code work.
296
-
297
- A "User Product" is either (1) a "consumer product", which means any
298
- tangible personal property which is normally used for personal, family,
299
- or household purposes, or (2) anything designed or sold for incorporation
300
- into a dwelling. In determining whether a product is a consumer product,
301
- doubtful cases shall be resolved in favor of coverage. For a particular
302
- product received by a particular user, "normally used" refers to a
303
- typical or common use of that class of product, regardless of the status
304
- of the particular user or of the way in which the particular user
305
- actually uses, or expects or is expected to use, the product. A product
306
- is a consumer product regardless of whether the product has substantial
307
- commercial, industrial or non-consumer uses, unless such uses represent
308
- the only significant mode of use of the product.
309
-
310
- "Installation Information" for a User Product means any methods,
311
- procedures, authorization keys, or other information required to install
312
- and execute modified versions of a covered work in that User Product from
313
- a modified version of its Corresponding Source. The information must
314
- suffice to ensure that the continued functioning of the modified object
315
- code is in no case prevented or interfered with solely because
316
- modification has been made.
317
-
318
- If you convey an object code work under this section in, or with, or
319
- specifically for use in, a User Product, and the conveying occurs as
320
- part of a transaction in which the right of possession and use of the
321
- User Product is transferred to the recipient in perpetuity or for a
322
- fixed term (regardless of how the transaction is characterized), the
323
- Corresponding Source conveyed under this section must be accompanied
324
- by the Installation Information. But this requirement does not apply
325
- if neither you nor any third party retains the ability to install
326
- modified object code on the User Product (for example, the work has
327
- been installed in ROM).
328
-
329
- The requirement to provide Installation Information does not include a
330
- requirement to continue to provide support service, warranty, or updates
331
- for a work that has been modified or installed by the recipient, or for
332
- the User Product in which it has been modified or installed. Access to a
333
- network may be denied when the modification itself materially and
334
- adversely affects the operation of the network or violates the rules and
335
- protocols for communication across the network.
336
-
337
- Corresponding Source conveyed, and Installation Information provided,
338
- in accord with this section must be in a format that is publicly
339
- documented (and with an implementation available to the public in
340
- source code form), and must require no special password or key for
341
- unpacking, reading or copying.
342
-
343
- 7. Additional Terms.
344
-
345
- "Additional permissions" are terms that supplement the terms of this
346
- License by making exceptions from one or more of its conditions.
347
- Additional permissions that are applicable to the entire Program shall
348
- be treated as though they were included in this License, to the extent
349
- that they are valid under applicable law. If additional permissions
350
- apply only to part of the Program, that part may be used separately
351
- under those permissions, but the entire Program remains governed by
352
- this License without regard to the additional permissions.
353
-
354
- When you convey a copy of a covered work, you may at your option
355
- remove any additional permissions from that copy, or from any part of
356
- it. (Additional permissions may be written to require their own
357
- removal in certain cases when you modify the work.) You may place
358
- additional permissions on material, added by you to a covered work,
359
- for which you have or can give appropriate copyright permission.
360
-
361
- Notwithstanding any other provision of this License, for material you
362
- add to a covered work, you may (if authorized by the copyright holders of
363
- that material) supplement the terms of this License with terms:
364
-
365
- a) Disclaiming warranty or limiting liability differently from the
366
- terms of sections 15 and 16 of this License; or
367
-
368
- b) Requiring preservation of specified reasonable legal notices or
369
- author attributions in that material or in the Appropriate Legal
370
- Notices displayed by works containing it; or
371
-
372
- c) Prohibiting misrepresentation of the origin of that material, or
373
- requiring that modified versions of such material be marked in
374
- reasonable ways as different from the original version; or
375
-
376
- d) Limiting the use for publicity purposes of names of licensors or
377
- authors of the material; or
378
-
379
- e) Declining to grant rights under trademark law for use of some
380
- trade names, trademarks, or service marks; or
381
-
382
- f) Requiring indemnification of licensors and authors of that
383
- material by anyone who conveys the material (or modified versions of
384
- it) with contractual assumptions of liability to the recipient, for
385
- any liability that these contractual assumptions directly impose on
386
- those licensors and authors.
387
-
388
- All other non-permissive additional terms are considered "further
389
- restrictions" within the meaning of section 10. If the Program as you
390
- received it, or any part of it, contains a notice stating that it is
391
- governed by this License along with a term that is a further
392
- restriction, you may remove that term. If a license document contains
393
- a further restriction but permits relicensing or conveying under this
394
- License, you may add to a covered work material governed by the terms
395
- of that license document, provided that the further restriction does
396
- not survive such relicensing or conveying.
397
-
398
- If you add terms to a covered work in accord with this section, you
399
- must place, in the relevant source files, a statement of the
400
- additional terms that apply to those files, or a notice indicating
401
- where to find the applicable terms.
402
-
403
- Additional terms, permissive or non-permissive, may be stated in the
404
- form of a separately written license, or stated as exceptions;
405
- the above requirements apply either way.
406
-
407
- 8. Termination.
408
-
409
- You may not propagate or modify a covered work except as expressly
410
- provided under this License. Any attempt otherwise to propagate or
411
- modify it is void, and will automatically terminate your rights under
412
- this License (including any patent licenses granted under the third
413
- paragraph of section 11).
414
-
415
- However, if you cease all violation of this License, then your
416
- license from a particular copyright holder is reinstated (a)
417
- provisionally, unless and until the copyright holder explicitly and
418
- finally terminates your license, and (b) permanently, if the copyright
419
- holder fails to notify you of the violation by some reasonable means
420
- prior to 60 days after the cessation.
421
-
422
- Moreover, your license from a particular copyright holder is
423
- reinstated permanently if the copyright holder notifies you of the
424
- violation by some reasonable means, this is the first time you have
425
- received notice of violation of this License (for any work) from that
426
- copyright holder, and you cure the violation prior to 30 days after
427
- your receipt of the notice.
428
-
429
- Termination of your rights under this section does not terminate the
430
- licenses of parties who have received copies or rights from you under
431
- this License. If your rights have been terminated and not permanently
432
- reinstated, you do not qualify to receive new licenses for the same
433
- material under section 10.
434
-
435
- 9. Acceptance Not Required for Having Copies.
436
-
437
- You are not required to accept this License in order to receive or
438
- run a copy of the Program. Ancillary propagation of a covered work
439
- occurring solely as a consequence of using peer-to-peer transmission
440
- to receive a copy likewise does not require acceptance. However,
441
- nothing other than this License grants you permission to propagate or
442
- modify any covered work. These actions infringe copyright if you do
443
- not accept this License. Therefore, by modifying or propagating a
444
- covered work, you indicate your acceptance of this License to do so.
445
-
446
- 10. Automatic Licensing of Downstream Recipients.
447
-
448
- Each time you convey a covered work, the recipient automatically
449
- receives a license from the original licensors, to run, modify and
450
- propagate that work, subject to this License. You are not responsible
451
- for enforcing compliance by third parties with this License.
452
-
453
- An "entity transaction" is a transaction transferring control of an
454
- organization, or substantially all assets of one, or subdividing an
455
- organization, or merging organizations. If propagation of a covered
456
- work results from an entity transaction, each party to that
457
- transaction who receives a copy of the work also receives whatever
458
- licenses to the work the party's predecessor in interest had or could
459
- give under the previous paragraph, plus a right to possession of the
460
- Corresponding Source of the work from the predecessor in interest, if
461
- the predecessor has it or can get it with reasonable efforts.
462
-
463
- You may not impose any further restrictions on the exercise of the
464
- rights granted or affirmed under this License. For example, you may
465
- not impose a license fee, royalty, or other charge for exercise of
466
- rights granted under this License, and you may not initiate litigation
467
- (including a cross-claim or counterclaim in a lawsuit) alleging that
468
- any patent claim is infringed by making, using, selling, offering for
469
- sale, or importing the Program or any portion of it.
470
-
471
- 11. Patents.
472
-
473
- A "contributor" is a copyright holder who authorizes use under this
474
- License of the Program or a work on which the Program is based. The
475
- work thus licensed is called the contributor's "contributor version".
476
-
477
- A contributor's "essential patent claims" are all patent claims
478
- owned or controlled by the contributor, whether already acquired or
479
- hereafter acquired, that would be infringed by some manner, permitted
480
- by this License, of making, using, or selling its contributor version,
481
- but do not include claims that would be infringed only as a
482
- consequence of further modification of the contributor version. For
483
- purposes of this definition, "control" includes the right to grant
484
- patent sublicenses in a manner consistent with the requirements of
485
- this License.
486
-
487
- Each contributor grants you a non-exclusive, worldwide, royalty-free
488
- patent license under the contributor's essential patent claims, to
489
- make, use, sell, offer for sale, import and otherwise run, modify and
490
- propagate the contents of its contributor version.
491
-
492
- In the following three paragraphs, a "patent license" is any express
493
- agreement or commitment, however denominated, not to enforce a patent
494
- (such as an express permission to practice a patent or covenant not to
495
- sue for patent infringement). To "grant" such a patent license to a
496
- party means to make such an agreement or commitment not to enforce a
497
- patent against the party.
498
-
499
- If you convey a covered work, knowingly relying on a patent license,
500
- and the Corresponding Source of the work is not available for anyone
501
- to copy, free of charge and under the terms of this License, through a
502
- publicly available network server or other readily accessible means,
503
- then you must either (1) cause the Corresponding Source to be so
504
- available, or (2) arrange to deprive yourself of the benefit of the
505
- patent license for this particular work, or (3) arrange, in a manner
506
- consistent with the requirements of this License, to extend the patent
507
- license to downstream recipients. "Knowingly relying" means you have
508
- actual knowledge that, but for the patent license, your conveying the
509
- covered work in a country, or your recipient's use of the covered work
510
- in a country, would infringe one or more identifiable patents in that
511
- country that you have reason to believe are valid.
512
-
513
- If, pursuant to or in connection with a single transaction or
514
- arrangement, you convey, or propagate by procuring conveyance of, a
515
- covered work, and grant a patent license to some of the parties
516
- receiving the covered work authorizing them to use, propagate, modify
517
- or convey a specific copy of the covered work, then the patent license
518
- you grant is automatically extended to all recipients of the covered
519
- work and works based on it.
520
-
521
- A patent license is "discriminatory" if it does not include within
522
- the scope of its coverage, prohibits the exercise of, or is
523
- conditioned on the non-exercise of one or more of the rights that are
524
- specifically granted under this License. You may not convey a covered
525
- work if you are a party to an arrangement with a third party that is
526
- in the business of distributing software, under which you make payment
527
- to the third party based on the extent of your activity of conveying
528
- the work, and under which the third party grants, to any of the
529
- parties who would receive the covered work from you, a discriminatory
530
- patent license (a) in connection with copies of the covered work
531
- conveyed by you (or copies made from those copies), or (b) primarily
532
- for and in connection with specific products or compilations that
533
- contain the covered work, unless you entered into that arrangement,
534
- or that patent license was granted, prior to 28 March 2007.
535
-
536
- Nothing in this License shall be construed as excluding or limiting
537
- any implied license or other defenses to infringement that may
538
- otherwise be available to you under applicable patent law.
539
-
540
- 12. No Surrender of Others' Freedom.
541
-
542
- If conditions are imposed on you (whether by court order, agreement or
543
- otherwise) that contradict the conditions of this License, they do not
544
- excuse you from the conditions of this License. If you cannot convey a
545
- covered work so as to satisfy simultaneously your obligations under this
546
- License and any other pertinent obligations, then as a consequence you may
547
- not convey it at all. For example, if you agree to terms that obligate you
548
- to collect a royalty for further conveying from those to whom you convey
549
- the Program, the only way you could satisfy both those terms and this
550
- License would be to refrain entirely from conveying the Program.
551
-
552
- 13. Use with the GNU Affero General Public License.
553
-
554
- Notwithstanding any other provision of this License, you have
555
- permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
557
- combined work, and to convey the resulting work. The terms of this
558
- License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
562
-
563
- 14. Revised Versions of this License.
564
-
565
- The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
568
- address new problems or concerns.
569
-
570
- Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
572
- Public License "or any later version" applies to it, you have the
573
- option of following the terms and conditions either of that numbered
574
- version or of any later version published by the Free Software
575
- Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
577
- by the Free Software Foundation.
578
-
579
- If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
581
- public statement of acceptance of a version permanently authorizes you
582
- to choose that version for the Program.
583
-
584
- Later license versions may give you additional or different
585
- permissions. However, no additional obligations are imposed on any
586
- author or copyright holder as a result of your choosing to follow a
587
- later version.
588
-
589
- 15. Disclaimer of Warranty.
590
-
591
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
- APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
- IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
-
600
- 16. Limitation of Liability.
601
-
602
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
- USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
- PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
- SUCH DAMAGES.
611
-
612
- 17. Interpretation of Sections 15 and 16.
613
-
614
- If the disclaimer of warranty and limitation of liability provided
615
- above cannot be given local legal effect according to their terms,
616
- reviewing courts shall apply local law that most closely approximates
617
- an absolute waiver of all civil liability in connection with the
618
- Program, unless a warranty or assumption of liability accompanies a
619
- copy of the Program in return for a fee.
620
-
621
- END OF TERMS AND CONDITIONS
622
-
623
- How to Apply These Terms to Your New Programs
624
-
625
- If you develop a new program, and you want it to be of the greatest
626
- possible use to the public, the best way to achieve this is to make it
627
- free software which everyone can redistribute and change under these terms.
628
-
629
- To do so, attach the following notices to the program. It is safest
630
- to attach them to the start of each source file to most effectively
631
- state the exclusion of warranty; and each file should have at least
632
- the "copyright" line and a pointer to where the full notice is found.
633
-
634
- {one line to give the program's name and a brief idea of what it does.}
635
- Copyright (C) {year} {name of author}
636
-
637
- This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
639
- the Free Software Foundation, either version 3 of the License, or
640
- (at your option) any later version.
641
-
642
- This program is distributed in the hope that it will be useful,
643
- but WITHOUT ANY WARRANTY; without even the implied warranty of
644
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
646
-
647
- You should have received a copy of the GNU General Public License
648
- along with this program. If not, see <http://www.gnu.org/licenses/>.
649
-
650
- Also add information on how to contact you by electronic and paper mail.
651
-
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- {project} Copyright (C) {year} {fullname}
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
663
-
664
- You should also get your employer (if you work as a programmer) or school,
665
- if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
667
- <http://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
- <http://www.gnu.org/philosophy/why-not-lgpl.html>.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/freemius/wordpress-sdk/config.php DELETED
@@ -1,391 +0,0 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.4
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- if ( ! defined( 'WP_FS__SLUG' ) ) {
14
- define( 'WP_FS__SLUG', 'freemius' );
15
- }
16
- if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
17
- define( 'WP_FS__DEV_MODE', false );
18
- }
19
-
20
- #--------------------------------------------------------------------------------
21
- #region API Connectivity Issues Simulation
22
- #--------------------------------------------------------------------------------
23
-
24
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
25
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
26
- }
27
- if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
28
- define( 'WP_FS__SIMULATE_NO_CURL', false );
29
- }
30
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
31
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
32
- }
33
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
34
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
35
- }
36
- if ( WP_FS__SIMULATE_NO_CURL ) {
37
- define( 'FS_SDK__SIMULATE_NO_CURL', true );
38
- }
39
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
40
- define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
41
- }
42
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
43
- define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
44
- }
45
-
46
- #endregion
47
-
48
- if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
49
- define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
50
- }
51
-
52
- if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
53
- /**
54
- * @since 1.1.7.3
55
- * @author Vova Feldman (@svovaf)
56
- *
57
- * I'm not sure if shared servers periodically change IP, or the subdomain of the
58
- * admin dashboard. Also, I've seen sites that have strange loop of switching
59
- * between domains on a daily basis. Therefore, to eliminate the risk of
60
- * multiple unwanted connectivity test pings, temporary ignore domain or
61
- * server IP changes.
62
- */
63
- define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
64
- }
65
-
66
- /**
67
- * If your dev environment supports custom public network IP setup
68
- * like VVV, please update WP_FS__LOCALHOST_IP with your public IP
69
- * and uncomment it during dev.
70
- */
71
- if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
72
- // VVV default public network IP.
73
- define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
74
-
75
- // define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
76
- }
77
-
78
- /**
79
- * If true and running with secret key, the opt-in process
80
- * will skip the email activation process which is invoked
81
- * when the email of the context user already exist in Freemius
82
- * database (as a security precaution, to prevent sharing user
83
- * secret with unauthorized entity).
84
- *
85
- * IMPORTANT:
86
- * AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
87
- * THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
88
- * CLOCK IS SYNCED.
89
- */
90
- if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
91
- define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
92
- }
93
-
94
-
95
- #--------------------------------------------------------------------------------
96
- #region Directories
97
- #--------------------------------------------------------------------------------
98
-
99
- if ( ! defined( 'WP_FS__DIR' ) ) {
100
- define( 'WP_FS__DIR', dirname( __FILE__ ) );
101
- }
102
- if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
103
- define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
104
- }
105
- if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
106
- define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
107
- }
108
- if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
109
- define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
110
- }
111
- if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
112
- define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
113
- }
114
- if ( ! defined( 'WP_FS__DIR_JS' ) ) {
115
- define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
116
- }
117
- if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
118
- define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
119
- }
120
- if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
121
- define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
122
- }
123
-
124
- #endregion
125
-
126
- /**
127
- * Domain / URL / Address
128
- */
129
- define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
130
- define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
131
- define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
132
-
133
- if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
134
- define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
135
- }
136
- if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
137
- define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
138
- }
139
-
140
- if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
141
- define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
142
- }
143
-
144
- #--------------------------------------------------------------------------------
145
- #region HTTP
146
- #--------------------------------------------------------------------------------
147
-
148
- if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
149
- define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
150
- }
151
-
152
- if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
153
- define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
154
- // Checks if CloudFlare's HTTPS (Flexible SSL support).
155
- isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
156
- 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
157
- ) ||
158
- // Check if HTTPS request.
159
- ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
160
- ( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
161
- );
162
- }
163
-
164
- if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
165
- define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
166
- strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
167
- }
168
-
169
- if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
170
- define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
171
- }
172
-
173
- if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
174
- if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
175
- define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
176
- } else {
177
- define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
178
- is_string( WP_FS__REMOTE_ADDR ) &&
179
- ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
180
- WP_FS__REMOTE_ADDR === '::1' )
181
- );
182
- }
183
- }
184
-
185
- if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
186
- define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
187
- false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
188
- }
189
-
190
- #endregion
191
-
192
- if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
193
- // By default, run with Freemius production servers.
194
- define( 'WP_FS__IS_PRODUCTION_MODE', true );
195
- }
196
-
197
- if ( ! defined( 'WP_FS__ADDRESS' ) ) {
198
- define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
199
- }
200
-
201
-
202
- #--------------------------------------------------------------------------------
203
- #region API
204
- #--------------------------------------------------------------------------------
205
-
206
- if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
207
- define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
208
- }
209
- if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
210
- define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
211
- }
212
-
213
- // Set API address for local testing.
214
- if ( ! WP_FS__IS_PRODUCTION_MODE ) {
215
- if ( ! defined( 'FS_API__ADDRESS' ) ) {
216
- define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
217
- }
218
- if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
219
- define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
220
- }
221
- }
222
-
223
- #endregion
224
-
225
- #--------------------------------------------------------------------------------
226
- #region Checkout
227
- #--------------------------------------------------------------------------------
228
-
229
- if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
230
- define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
231
- }
232
-
233
- if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
234
- define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
235
- }
236
-
237
- if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
238
- define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
239
- }
240
-
241
- #endregion
242
-
243
- define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
244
-
245
- if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
246
- define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
247
- }
248
- if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
249
- define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
250
- }
251
- if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
252
- define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
253
- }
254
- define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
255
-
256
- /**
257
- * Module types
258
- *
259
- * @since 1.2.2
260
- */
261
- define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
262
- define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
263
-
264
- /**
265
- * Billing Frequencies
266
- */
267
- define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
268
- define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
269
- define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
270
-
271
- /**
272
- * Plans
273
- */
274
- define( 'WP_FS__PLAN_DEFAULT_PAID', false );
275
- define( 'WP_FS__PLAN_FREE', 'free' );
276
- define( 'WP_FS__PLAN_TRIAL', 'trial' );
277
-
278
- /**
279
- * Times in seconds
280
- */
281
- if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
282
- define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
283
- }
284
- if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
285
- define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
286
- }
287
- // define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
288
- if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
289
- define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
290
- }
291
- if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
292
- define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
293
- }
294
- if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
295
- define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
296
- }
297
-
298
- #--------------------------------------------------------------------------------
299
- #region Debugging
300
- #--------------------------------------------------------------------------------
301
-
302
- if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
303
- $debug_mode = get_option( 'fs_debug_mode', null );
304
-
305
- if ( $debug_mode === null ) {
306
- $debug_mode = false;
307
- add_option( 'fs_debug_mode', $debug_mode );
308
- }
309
-
310
- define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
311
- }
312
-
313
- if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
314
- define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
315
- }
316
- if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
317
- define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
318
- }
319
- if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
320
- define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
321
- }
322
-
323
- if ( WP_FS__ECHO_DEBUG_SDK ) {
324
- error_reporting( E_ALL );
325
- }
326
-
327
- #endregion
328
-
329
- if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
330
- define( 'WP_FS__SCRIPT_START_TIME', time() );
331
- }
332
- if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
333
- define( 'WP_FS__DEFAULT_PRIORITY', 10 );
334
- }
335
- if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
336
- define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
337
- }
338
-
339
- #--------------------------------------------------------------------------------
340
- #region Multisite Network
341
- #--------------------------------------------------------------------------------
342
-
343
- /**
344
- * Do not use this define directly, it will have the wrong value
345
- * during plugin uninstall/deletion when the inclusion of the plugin
346
- * is triggered due to registration with register_uninstall_hook().
347
- *
348
- * Instead, use fs_is_network_admin().
349
- *
350
- * @author Vova Feldman (@svovaf)
351
- */
352
- if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
353
- define( 'WP_FS__IS_NETWORK_ADMIN',
354
- is_multisite() &&
355
- ( is_network_admin() ||
356
- ( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
357
- ( isset( $_REQUEST['_fs_network_admin'] ) /*||
358
- ( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
359
- ) ||
360
- // Plugin uninstall.
361
- defined( 'WP_UNINSTALL_PLUGIN' ) )
362
- )
363
- );
364
- }
365
-
366
- /**
367
- * Do not use this define directly, it will have the wrong value
368
- * during plugin uninstall/deletion when the inclusion of the plugin
369
- * is triggered due to registration with register_uninstall_hook().
370
- *
371
- * Instead, use fs_is_blog_admin().
372
- *
373
- * @author Vova Feldman (@svovaf)
374
- */
375
- if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
376
- define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
377
- }
378
-
379
- if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
380
- // Set to true to show network level settings even if delegated to site admins.
381
- define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
382
- }
383
-
384
- #endregion
385
-
386
- if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
387
- define( 'WP_FS__DEMO_MODE', false );
388
- }
389
- if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
390
- define( 'FS_SDK__SSLVERIFY', false );
391
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/freemius/wordpress-sdk/includes/class-freemius-abstract.php DELETED
@@ -1,597 +0,0 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
-
14
- /**
15
- * - Each instance of Freemius class represents a single plugin
16
- * install by a single user (the installer of the plugin).
17
- *
18
- * - Each website can only have one install of the same plugin.
19
- *
20
- * - Install entity is only created after a user connects his account with Freemius.
21
- *
22
- * Class Freemius_Abstract
23
- */
24
- abstract class Freemius_Abstract {
25
-
26
- #----------------------------------------------------------------------------------
27
- #region Identity
28
- #----------------------------------------------------------------------------------
29
-
30
- /**
31
- * Check if user has connected his account (opted-in).
32
- *
33
- * Note:
34
- * If the user opted-in and opted-out on a later stage,
35
- * this will still return true. If you want to check if the
36
- * user is currently opted-in, use:
37
- * `$fs->is_registered() && $fs->is_tracking_allowed()`
38
- *
39
- * @since 1.0.1
40
- * @return bool
41
- */
42
- abstract function is_registered();
43
-
44
- /**
45
- * Check if the user skipped connecting the account with Freemius.
46
- *
47
- * @since 1.0.7
48
- *
49
- * @return bool
50
- */
51
- abstract function is_anonymous();
52
-
53
- /**
54
- * Check if the user currently in activation mode.
55
- *
56
- * @since 1.0.7
57
- *
58
- * @return bool
59
- */
60
- abstract function is_activation_mode();
61
-
62
- #endregion
63
-
64
- #----------------------------------------------------------------------------------
65
- #region Usage Tracking
66
- #----------------------------------------------------------------------------------
67
-
68
- /**
69
- * Returns TRUE if the user opted-in and didn't disconnect (opt-out).
70
- *
71
- * @author Leo Fajardo (@leorw)
72
- * @since 1.2.1.5
73
- *
74
- * @return bool
75
- */
76
- abstract function is_tracking_allowed();
77
-
78
- /**
79
- * Returns TRUE if the user never opted-in or manually opted-out.
80
- *
81
- * @author Vova Feldman (@svovaf)
82
- * @since 1.2.1.5
83
- *
84
- * @return bool
85
- */
86
- function is_tracking_prohibited() {
87
- return ! $this->is_registered() || ! $this->is_tracking_allowed();
88
- }
89
-
90
- /**
91
- * Opt-out from usage tracking.
92
- *
93
- * Note: This will not delete the account information but will stop all tracking.
94
- *
95
- * Returns:
96
- * 1. FALSE - If the user never opted-in.
97
- * 2. TRUE - If successfully opted-out.
98
- * 3. object - API Result on failure.
99
- *
100
- * @author Leo Fajardo (@leorw)
101
- * @since 1.2.1.5
102
- *
103
- * @return bool|object
104
- */
105
- abstract function stop_tracking();
106
-
107
- /**
108
- * Opt-in back into usage tracking.
109
- *
110
- * Note: This will only work if the user opted-in previously.
111
- *
112
- * Returns:
113
- * 1. FALSE - If the user never opted-in.
114
- * 2. TRUE - If successfully opted-in back to usage tracking.
115
- * 3. object - API result on failure.
116
- *
117
- * @author Leo Fajardo (@leorw)
118
- * @since 1.2.1.5
119
- *
120
- * @return bool|object
121
- */
122
- abstract function allow_tracking();
123
-
124
- #endregion
125
-
126
- #----------------------------------------------------------------------------------
127
- #region Module Type
128
- #----------------------------------------------------------------------------------
129
-
130
- /**
131
- * Checks if the plugin's type is "plugin". The other type is "theme".
132
- *
133
- * @author Leo Fajardo (@leorw)
134
- * @since 1.2.2
135
- *
136
- * @return bool
137
- */
138
- abstract function is_plugin();
139
-
140
- /**
141
- * Checks if the module type is "theme". The other type is "plugin".
142
- *
143
- * @author Leo Fajardo (@leorw)
144
- * @since 1.2.2
145
- *
146
- * @return bool
147
- */
148
- function is_theme() {
149
- return ( ! $this->is_plugin() );
150
- }
151
-
152
- #endregion
153
-
154
- #----------------------------------------------------------------------------------
155
- #region Permissions
156
- #----------------------------------------------------------------------------------
157
-
158
- /**
159
- * Check if plugin must be WordPress.org compliant.
160
- *
161
- * @since 1.0.7
162
- *
163
- * @return bool
164
- */
165
- abstract function is_org_repo_compliant();
166
-
167
- /**
168
- * Check if plugin is allowed to install executable files.
169
- *
170
- * @author Vova Feldman (@svovaf)
171
- * @since 1.0.5
172
- *
173
- * @return bool
174
- */
175
- function is_allowed_to_install() {
176
- return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
177
- }
178
-
179
- #endregion
180
-
181
- /**
182
- * Check if user in trial or in free plan (not paying).
183
- *
184
- * @author Vova Feldman (@svovaf)
185
- * @since 1.0.4
186
- *
187
- * @return bool
188
- */
189
- function is_not_paying() {
190
- return ( $this->is_trial() || $this->is_free_plan() );
191
- }
192
-
193
- /**
194
- * Check if the user has an activated and valid paid license on current plugin's install.
195
- *
196
- * @since 1.0.9
197
- *
198
- * @return bool
199
- */
200
- abstract function is_paying();
201
-
202
- /**
203
- * Check if the user is paying or in trial.
204
- *
205
- * @since 1.0.9
206
- *
207
- * @return bool
208
- */
209
- function is_paying_or_trial() {
210
- return ( $this->is_paying() || $this->is_trial() );
211
- }
212
-
213
- /**
214
- * Check if user in a trial or have feature enabled license.
215
- *
216
- * @author Vova Feldman (@svovaf)
217
- * @since 1.1.7
218
- *
219
- * @return bool
220
- */
221
- abstract function can_use_premium_code();
222
-
223
- #----------------------------------------------------------------------------------
224
- #region Premium Only
225
- #----------------------------------------------------------------------------------
226
-
227
- /**
228
- * All logic wrapped in methods with "__premium_only()" suffix will be only
229
- * included in the premium code.
230
- *
231
- * Example:
232
- * if ( freemius()->is__premium_only() ) {
233
- * ...
234
- * }
235
- */
236
-
237
- /**
238
- * Returns true when running premium plugin code.
239
- *
240
- * @since 1.0.9
241
- *
242
- * @return bool
243
- */
244
- function is__premium_only() {
245
- return $this->is_premium();
246
- }
247
-
248
- /**
249
- * Check if the user has an activated and valid paid license on current plugin's install.
250
- *
251
- * @since 1.0.9
252
- *
253
- * @return bool
254
- *
255
- */
256
- function is_paying__premium_only() {
257
- return ( $this->is__premium_only() && $this->is_paying() );
258
- }
259
-
260
- /**
261
- * All code wrapped in this statement will be only included in the premium code.
262
- *
263
- * @since 1.0.9
264
- *
265
- * @param string $plan Plan name.
266
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
267
- *
268
- * @return bool
269
- */
270
- function is_plan__premium_only( $plan, $exact = false ) {
271
- return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
272
- }
273
-
274
- /**
275
- * Check if plan matches active license' plan or active trial license' plan.
276
- *
277
- * All code wrapped in this statement will be only included in the premium code.
278
- *
279
- * @since 1.0.9
280
- *
281
- * @param string $plan Plan name.
282
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
283
- *
284
- * @return bool
285
- */
286
- function is_plan_or_trial__premium_only( $plan, $exact = false ) {
287
- return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
288
- }
289
-
290
- /**
291
- * Check if the user is paying or in trial.
292
- *
293
- * All code wrapped in this statement will be only included in the premium code.
294
- *
295
- * @since 1.0.9
296
- *
297
- * @return bool
298
- */
299
- function is_paying_or_trial__premium_only() {
300
- return $this->is_premium() && $this->is_paying_or_trial();
301
- }
302
-
303
- /**
304
- * Check if the user has an activated and valid paid license on current plugin's install.
305
- *
306
- * @since 1.0.4
307
- *
308
- * @return bool
309
- *
310
- * @deprecated Method name is confusing since it's not clear from the name the code will be removed.
311
- * @using Alias to is_paying__premium_only()
312
- */
313
- function is_paying__fs__() {
314
- return $this->is_paying__premium_only();
315
- }
316
-
317
- /**
318
- * Check if user in a trial or have feature enabled license.
319
- *
320
- * All code wrapped in this statement will be only included in the premium code.
321
- *
322
- * @author Vova Feldman (@svovaf)
323
- * @since 1.1.9
324
- *
325
- * @return bool
326
- */
327
- function can_use_premium_code__premium_only() {
328
- return $this->is_premium() && $this->can_use_premium_code();
329
- }
330
-
331
- #endregion
332
-
333
- #----------------------------------------------------------------------------------
334
- #region Trial
335
- #----------------------------------------------------------------------------------
336
-
337
- /**
338
- * Check if the user in a trial.
339
- *
340
- * @since 1.0.3
341
- *
342
- * @return bool
343
- */
344
- abstract function is_trial();
345
-
346
- /**
347
- * Check if trial already utilized.
348
- *
349
- * @since 1.0.9
350
- *
351
- * @return bool
352
- */
353
- abstract function is_trial_utilized();
354
-
355
- #endregion
356
-
357
- #----------------------------------------------------------------------------------
358
- #region Plans
359
- #----------------------------------------------------------------------------------
360
-
361
- /**
362
- * Check if the user is on the free plan of the product.
363
- *
364
- * @since 1.0.4
365
- *
366
- * @return bool
367
- */
368
- abstract function is_free_plan();
369
-
370
- /**
371
- * @since 1.0.2
372
- *
373
- * @param string $plan Plan name.
374
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
375
- *
376
- * @return bool
377
- */
378
- abstract function is_plan( $plan, $exact = false );
379
-
380
- /**
381
- * Check if plan based on trial. If not in trial mode, should return false.
382
- *
383
- * @since 1.0.9
384
- *
385
- * @param string $plan Plan name.
386
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
387
- *
388
- * @return bool
389
- */
390
- abstract function is_trial_plan( $plan, $exact = false );
391
-
392
- /**
393
- * Check if plan matches active license' plan or active trial license' plan.
394
- *
395
- * @since 1.0.9
396
- *
397
- * @param string $plan Plan name.
398
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
399
- *
400
- * @return bool
401
- */
402
- function is_plan_or_trial( $plan, $exact = false ) {
403
- return $this->is_plan( $plan, $exact ) ||
404
- $this->is_trial_plan( $plan, $exact );
405
- }
406
-
407
- /**
408
- * Check if plugin has any paid plans.
409
- *
410
- * @author Vova Feldman (@svovaf)
411
- * @since 1.0.7
412
- *
413
- * @return bool
414
- */
415
- abstract function has_paid_plan();
416
-
417
- /**
418
- * Check if plugin has any free plan, or is it premium only.
419
- *
420
- * Note: If no plans configured, assume plugin is free.
421
- *
422
- * @author Vova Feldman (@svovaf)
423
- * @since 1.0.7
424
- *
425
- * @return bool
426
- */
427
- abstract function has_free_plan();
428
-
429
- /**
430
- * Check if plugin is premium only (no free plans).
431
- *
432
- * NOTE: is__premium_only() is very different method, don't get confused.
433
- *
434
- * @author Vova Feldman (@svovaf)
435
- * @since 1.1.9
436
- *
437
- * @return bool
438
- */
439
- abstract function is_only_premium();
440
-
441
- /**
442
- * Check if module has a premium code version.
443
- *
444
- * Serviceware module might be freemium without any
445
- * premium code version, where the paid features
446
- * are all part of the service.
447
- *
448
- * @author Vova Feldman (@svovaf)
449
- * @since 1.2.1.6
450
- *
451
- * @return bool
452
- */
453
- abstract function has_premium_version();
454
-
455
- /**
456
- * Check if module has any release on Freemius,
457
- * or all plugin's code is on WordPress.org (Serviceware).
458
- *
459
- * @return bool
460
- */
461
- function has_release_on_freemius() {
462
- return ! $this->is_org_repo_compliant() ||
463
- $this->has_premium_version();
464
- }
465
-
466
- /**
467
- * Checks if it's a freemium plugin.
468
- *
469
- * @author Vova Feldman (@svovaf)
470
- * @since 1.1.9
471
- *
472
- * @return bool
473
- */
474
- function is_freemium() {
475
- return $this->has_paid_plan() &&
476
- $this->has_free_plan();
477
- }
478
-
479
- /**
480
- * Check if module has only one plan.
481
- *
482
- * @author Vova Feldman (@svovaf)
483
- * @since 1.2.1.7
484
- *
485
- * @return bool
486
- */
487
- abstract function is_single_plan();
488
-
489
- #endregion
490
-
491
- /**
492
- * Check if running payments in sandbox mode.
493
- *
494
- * @since 1.0.4
495
- *
496
- * @return bool
497
- */
498
- abstract function is_payments_sandbox();
499
-
500
- /**
501
- * Check if running test vs. live plugin.
502
- *
503
- * @since 1.0.5
504
- *
505
- * @return bool
506
- */
507
- abstract function is_live();
508
-
509
- /**
510
- * Check if running premium plugin code.
511
- *
512
- * @since 1.0.5
513
- *
514
- * @return bool
515
- */
516
- abstract function is_premium();
517
-
518
- /**
519
- * Get upgrade URL.
520
- *
521
- * @author Vova Feldman (@svovaf)
522
- * @since 1.0.2
523
- *
524
- * @param string $period Billing cycle.
525
- *
526
- * @return string
527
- */
528
- abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
529
-
530
- /**
531
- * Check if Freemius was first added in a plugin update.
532
- *
533
- * @author Vova Feldman (@svovaf)
534
- * @since 1.1.5
535
- *
536
- * @return bool
537
- */
538
- function is_plugin_update() {
539
- return ! $this->is_plugin_new_install();
540
- }
541
-
542
- /**
543
- * Check if Freemius was part of the plugin when the user installed it first.
544
- *
545
- * @author Vova Feldman (@svovaf)
546
- * @since 1.1.5
547
- *
548
- * @return bool
549
- */
550
- abstract function is_plugin_new_install();
551
-
552
- #----------------------------------------------------------------------------------
553
- #region Marketing
554
- #----------------------------------------------------------------------------------
555
-
556
- /**
557
- * Check if current user purchased any other plugins before.
558
- *
559
- * @author Vova Feldman (@svovaf)
560
- * @since 1.0.9
561
- *
562
- * @return bool
563
- */
564
- abstract function has_purchased_before();
565
-
566
- /**
567
- * Check if current user classified as an agency.
568
- *
569
- * @author Vova Feldman (@svovaf)
570
- * @since 1.0.9
571
- *
572
- * @return bool
573
- */
574
- abstract function is_agency();
575
-
576
- /**
577
- * Check if current user classified as a developer.
578
- *
579
- * @author Vova Feldman (@svovaf)
580
- * @since 1.0.9
581
- *
582
- * @return bool
583
- */
584
- abstract function is_developer();
585
-
586
- /**
587
- * Check if current user classified as a business.
588
- *
589
- * @author Vova Feldman (@svovaf)
590
- * @since 1.0.9
591
- *
592
- * @return bool
593
- */
594
- abstract function is_business();
595
-
596
- #endregion
597
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/freemius/wordpress-sdk/includes/class-freemius.php DELETED
@@ -1,25364 +0,0 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- // "final class"
13
- class Freemius extends Freemius_Abstract {
14
- /**
15
- * SDK Version
16
- *
17
- * @var string
18
- */
19
- public $version = WP_FS__SDK_VERSION;
20
-
21
- #region Plugin Info
22
-
23
- /**
24
- * @since 1.0.1
25
- *
26
- * @var string
27
- */
28
- private $_slug;
29
-
30
- /**
31
- * @since 1.0.0
32
- *
33
- * @var string
34
- */
35
- private $_plugin_basename;
36
- /**
37
- * @since 2.2.1
38
- *
39
- * @var string
40
- */
41
- private $_premium_plugin_basename;
42
- /**
43
- * @since 1.0.0
44
- *
45
- * @var string
46
- */
47
- private $_free_plugin_basename;
48
- /**
49
- * @since 1.0.0
50
- *
51
- * @var string
52
- */
53
- private $_plugin_dir_path;
54
- /**
55
- * @since 1.0.0
56
- *
57
- * @var string
58
- */
59
- private $_plugin_dir_name;
60
- /**
61
- * @since 1.0.0
62
- *
63
- * @var string
64
- */
65
- private $_plugin_main_file_path;
66
- /**
67
- * @var string[]
68
- */
69
- private $_plugin_data;
70
- /**
71
- * @since 1.0.9
72
- *
73
- * @var string
74
- */
75
- private $_plugin_name;
76
- /**
77
- * @since 1.2.2
78
- *
79
- * @var string
80
- */
81
- private $_module_type;
82
-
83
- #endregion Plugin Info
84
-
85
- /**
86
- * @since 1.0.9
87
- *
88
- * @var bool If false, don't turn Freemius on.
89
- */
90
- private $_is_on;
91
-
92
- /**
93
- * @since 1.1.3
94
- *
95
- * @var bool If false, don't turn Freemius on.
96
- */
97
- private $_is_anonymous;
98
-
99
- /**
100
- * @since 1.0.9
101
- * @var bool If false, issues with connectivity to Freemius API.
102
- */
103
- private $_has_api_connection;
104
-
105
- /**
106
- * @since 1.0.9
107
- * @since 2.0.0 Default to true since we need the property during the instance construction, prior to the dynamic_init() execution.
108
- * @var bool Hints the SDK if plugin can support anonymous mode (if skip connect is visible).
109
- */
110
- private $_enable_anonymous = true;
111
-
112
- /**
113
- * @since 1.1.7.5
114
- * @var bool Hints the SDK if plugin should run in anonymous mode (only adds feedback form).
115
- */
116
- private $_anonymous_mode;
117
-
118
- /**
119
- * @since 1.1.9
120
- * @var bool Hints the SDK if plugin have any free plans.
121
- */
122
- private $_is_premium_only;
123
-
124
- /**
125
- * @since 1.2.1.6
126
- * @var bool Hints the SDK if plugin have premium code version at all.
127
- */
128
- private $_has_premium_version;
129
-
130
- /**
131
- * @since 1.2.1.6
132
- * @var bool Hints the SDK if plugin should ignore pending mode by simulating a skip.
133
- */
134
- private $_ignore_pending_mode;
135
-
136
- /**
137
- * @since 1.0.8
138
- * @var bool Hints the SDK if the plugin has any paid plans.
139
- */
140
- private $_has_paid_plans;
141
-
142
- /**
143
- * @since 1.2.1.5
144
- * @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
145
- * without a specified period, if positive - the number of trial days.
146
- */
147
- private $_trial_days = - 1;
148
-
149
- /**
150
- * @since 1.2.1.5
151
- * @var bool Hints the SDK if the trial requires a payment method or not.
152
- */
153
- private $_is_trial_require_payment = false;
154
-
155
- /**
156
- * @since 1.0.7
157
- * @var bool Hints the SDK if the plugin is WordPress.org compliant.
158
- */
159
- private $_is_org_compliant;
160
-
161
- /**
162
- * @since 1.0.7
163
- * @var bool Hints the SDK if the plugin is has add-ons.
164
- */
165
- private $_has_addons;
166
-
167
- /**
168
- * @since 2.4.5
169
- * @var string Navigation type: 'menu' or 'tabs'.
170
- */
171
- private $_navigation;
172
-
173
- const NAVIGATION_MENU = 'menu';
174
- const NAVIGATION_TABS = 'tabs';
175
-
176
- /**
177
- * @since 1.1.6
178
- * @var string[]bool.
179
- */
180
- private $_permissions;
181
-
182
- /**
183
- * @var FS_Storage
184
- */
185
- private $_storage;
186
-
187
- /**
188
- * @since 1.2.2.7
189
- * @var FS_Cache_Manager
190
- */
191
- private $_cache;
192
-
193
- /**
194
- * @since 1.0.0
195
- *
196
- * @var FS_Logger
197
- */
198
- private $_logger;
199
- /**
200
- * @since 1.0.4
201
- *
202
- * @var FS_Plugin
203
- */
204
- private $_plugin = false;
205
- /**
206
- * @since 1.0.4
207
- *
208
- * @var FS_Plugin|false
209
- */
210
- private $_parent_plugin = false;
211
- /**
212
- * @since 1.1.1
213
- *
214
- * @var Freemius
215
- */
216
- private $_parent = false;
217
- /**
218
- * @since 1.0.1
219
- *
220
- * @var FS_User
221
- */
222
- private $_user = false;
223
- /**
224
- * @since 1.0.1
225
- *
226
- * @var FS_Site
227
- */
228
- private $_site = false;
229
- /**
230
- * @since 1.0.1
231
- *
232
- * @var FS_Plugin_License
233
- */
234
- private $_license;
235
- /**
236
- * @since 1.0.2
237
- *
238
- * @var FS_Plugin_Plan[]
239
- */
240
- private $_plans = false;
241
- /**
242
- * @var FS_Plugin_License[]
243
- * @since 1.0.5
244
- */
245
- private $_licenses = false;
246
-
247
- /**
248
- * @since 1.0.1
249
- *
250
- * @var FS_Admin_Menu_Manager
251
- */
252
- private $_menu;
253
-
254
- /**
255
- * @var FS_Admin_Notices
256
- */
257
- private $_admin_notices;
258
-
259
- /**
260
- * @since 1.1.6
261
- *
262
- * @var FS_Admin_Notices
263
- */
264
- private static $_global_admin_notices;
265
-
266
- /**
267
- * @var FS_Logger
268
- * @since 1.0.0
269
- */
270
- private static $_static_logger;
271
-
272
- /**
273
- * @var FS_Options
274
- * @since 1.0.2
275
- */
276
- private static $_accounts;
277
-
278
- /**
279
- * @since 1.2.2
280
- *
281
- * @var number
282
- */
283
- private $_module_id;
284
-
285
- /**
286
- * @var Freemius[]
287
- */
288
- private static $_instances = array();
289
-
290
- /**
291
- * @since 1.2.3
292
- *
293
- * @var FS_Affiliate
294
- */
295
- private $affiliate = null;
296
-
297
- /**
298
- * @since 1.2.3
299
- *
300
- * @var FS_AffiliateTerms
301
- */
302
- private $plugin_affiliate_terms = null;
303
-
304
- /**
305
- * @since 1.2.3
306
- *
307
- * @var FS_AffiliateTerms
308
- */
309
- private $custom_affiliate_terms = null;
310
-
311
- /**
312
- * @since 2.0.0
313
- *
314
- * @var bool
315
- */
316
- private $_is_multisite_integrated;
317
-
318
- /**
319
- * @since 2.0.0
320
- *
321
- * @var bool True if the current request is for a network admin screen and the plugin is network active.
322
- */
323
- private $_is_network_active;
324
-
325
- /**
326
- * @since 2.0.0
327
- *
328
- * @var int|null The original blog ID the plugin was loaded with.
329
- */
330
- private $_blog_id = null;
331
-
332
- /**
333
- * @since 2.0.0
334
- *
335
- * @var int|null The current execution context. When true, run on network context. When int, run on the specified blog context.
336
- */
337
- private $_context_is_network_or_blog_id = null;
338
-
339
- /**
340
- * @since 2.0.0
341
- *
342
- * @var string
343
- */
344
- private $_dynamically_added_top_level_page_hook_name = '';
345
-
346
- /**
347
- * @author Leo Fajardo (@leorw)
348
- * @since 2.3.1
349
- *
350
- * @var bool
351
- */
352
- private $is_whitelabeled;
353
-
354
- /**
355
- * @author Leo Fajardo (@leorw)
356
- * @since 2.4.0
357
- *
358
- * @var bool
359
- */
360
- private $_is_bundle_license_auto_activation_enabled = false;
361
-
362
- #region Uninstall Reasons IDs
363
-
364
- const REASON_NO_LONGER_NEEDED = 1;
365
- const REASON_FOUND_A_BETTER_PLUGIN = 2;
366
- const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
367
- const REASON_BROKE_MY_SITE = 4;
368
- const REASON_SUDDENLY_STOPPED_WORKING = 5;
369
- const REASON_CANT_PAY_ANYMORE = 6;
370
- const REASON_OTHER = 7;
371
- const REASON_DIDNT_WORK = 8;
372
- const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
373
- const REASON_COULDNT_MAKE_IT_WORK = 10;
374
- const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
375
- const REASON_NOT_WORKING = 12;
376
- const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
377
- const REASON_DIDNT_WORK_AS_EXPECTED = 14;
378
- const REASON_TEMPORARY_DEACTIVATION = 15;
379
-
380
- /**
381
- * @author Leo Fajardo (@leorw)
382
- * @since 2.3.1
383
- *
384
- * @var boolean|null
385
- */
386
- private $_use_external_pricing = null;
387
- /**
388
- * @author Leo Fajardo (@leorw)
389
- * @since 2.4.2
390
- *
391
- * @var string|null
392
- */
393
- private $_pricing_js_path = null;
394
-
395
- #endregion
396
-
397
- /* Ctor
398
- ------------------------------------------------------------------------------------------------------------------*/
399
-
400
- /**
401
- * Main singleton instance.
402
- *
403
- * @author Vova Feldman (@svovaf)
404
- * @since 1.0.0
405
- *
406
- * @param number $module_id
407
- * @param string|bool $slug
408
- * @param bool $is_init Since 1.2.1 Is initiation sequence.
409
- */
410
- private function __construct( $module_id, $slug = false, $is_init = false ) {
411
- if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
412
- $this->store_id_slug_type_path_map( $module_id, $slug );
413
- }
414
-
415
- $this->_module_id = $module_id;
416
- $this->_slug = $this->get_slug();
417
- $this->_module_type = $this->get_module_type();
418
-
419
- $this->_blog_id = is_multisite() ? get_current_blog_id() : null;
420
-
421
- $this->_storage = FS_Storage::instance( $this->_module_type, $this->_slug );
422
-
423
- $this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
424
-
425
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
426
-
427
- $this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
428
- $this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
429
- $this->_plugin_basename = $this->get_plugin_basename();
430
- $this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
431
-
432
- $this->_is_multisite_integrated = (
433
- defined( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) &&
434
- ( true === constant( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) )
435
- );
436
-
437
- $this->_is_network_active = (
438
- is_multisite() &&
439
- $this->_is_multisite_integrated &&
440
- // Themes are always network activated, but the ACTUAL activation is per site.
441
- $this->is_plugin() &&
442
- (
443
- is_plugin_active_for_network( $this->_plugin_basename ) ||
444
- // Plugin network level activation or uninstall.
445
- ( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
446
- )
447
- );
448
-
449
- $this->_storage->set_network_active(
450
- $this->_is_network_active,
451
- $this->is_delegated_connection()
452
- );
453
-
454
- if ( ! isset( $this->_storage->is_network_activated ) ) {
455
- $this->_storage->is_network_activated = $this->_is_network_active;
456
- }
457
-
458
- if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
459
- // Update last activation level.
460
- $this->_storage->is_network_activated = $this->_is_network_active;
461
-
462
- $this->maybe_adjust_storage();
463
- }
464
-
465
- #region Migration
466
-
467
- if ( is_multisite() ) {
468
- /**
469
- * If the install_timestamp exists on the site level but doesn't exist on the
470
- * network level storage, it means that we need to process the storage with migration.
471
- *
472
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, install_timestamp will be already set in the network level storage.
473
- *
474
- * @author Vova Feldman (@svovaf)
475
- * @since 2.0.0
476
- */
477
- if ( false === $this->_storage->get( 'install_timestamp', false, true ) &&
478
- false !== $this->_storage->get( 'install_timestamp', false, false )
479
- ) {
480
- // Initiate storage migration.
481
- $this->_storage->migrate_to_network();
482
-
483
- // Migrate module cache to network level storage.
484
- $this->_cache->migrate_to_network();
485
- }
486
- }
487
-
488
- #endregion
489
-
490
- $base_name_split = explode( '/', $this->_plugin_basename );
491
- $this->_plugin_dir_name = $base_name_split[0];
492
-
493
- if ( $this->_logger->is_on() ) {
494
- $this->_logger->info( 'plugin_main_file_path = ' . $this->_plugin_main_file_path );
495
- $this->_logger->info( 'plugin_dir_path = ' . $this->_plugin_dir_path );
496
- $this->_logger->info( 'plugin_basename = ' . $this->_plugin_basename );
497
- $this->_logger->info( 'free_plugin_basename = ' . $this->_free_plugin_basename );
498
- $this->_logger->info( 'plugin_dir_name = ' . $this->_plugin_dir_name );
499
- }
500
-
501
- // Remember link between file to slug.
502
- $this->store_file_slug_map();
503
-
504
- // Store plugin's initial install timestamp.
505
- if ( ! isset( $this->_storage->install_timestamp ) ) {
506
- $this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
507
- }
508
-
509
- if ( ! is_object( $this->_plugin ) ) {
510
- $this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
511
- }
512
-
513
- $this->_admin_notices = FS_Admin_Notices::instance(
514
- $this->_slug . ( $this->is_theme() ? ':theme' : '' ),
515
- /**
516
- * Ensure that the admin notice will always have a title by using the stored plugin title if available and
517
- * retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
518
- *
519
- * @author Leo Fajardo (@leorw)
520
- * @since 1.2.2
521
- */
522
- ( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
523
- $this->get_unique_affix()
524
- );
525
-
526
- if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
527
- fs_request_is_action( 'restart_freemius' )
528
- ) {
529
- FS_Api::clear_cache();
530
- $this->_cache->clear();
531
- }
532
-
533
- $this->register_constructor_hooks();
534
-
535
- /**
536
- * Starting from version 2.0.0, `FS_Site` entities no longer have the `plan` property and have `plan_id`
537
- * instead. This should be called before calling `_load_account()`, otherwise, `$this->_site` will not be
538
- * loaded in `_load_account` for versions of SDK starting from 2.0.0.
539
- *
540
- * @author Leo Fajardo (@leorw)
541
- */
542
- self::migrate_install_plan_to_plan_id( $this->_storage );
543
-
544
- $this->_load_account();
545
-
546
- $this->_version_updates_handler();
547
- }
548
-
549
- /**
550
- * @author Leo Fajardo (@leorw)
551
- * @since 2.3.0
552
- */
553
- private function maybe_adjust_storage() {
554
- $install_timestamp = null;
555
- $prev_is_premium = null;
556
-
557
- $options_to_update = array();
558
-
559
- $is_network_admin = fs_is_network_admin();
560
-
561
- $network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
562
-
563
- if ( ! $is_network_admin ) {
564
- if ( is_null( $network_install_timestamp ) ) {
565
- // Plugin was not network-activated before.
566
- return;
567
- }
568
-
569
- if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
570
- // Set the `install_timestamp` only if it's not yet set.
571
- $install_timestamp = $network_install_timestamp;
572
- }
573
-
574
- $prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
575
- } else {
576
- $current_wp_user = self::_get_current_wp_user();
577
- $current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
578
- $network_user_info = array();
579
-
580
- $skips_count = 0;
581
-
582
- $sites = self::get_sites();
583
- $sites_count = count( $sites );
584
-
585
- $blog_id_2_install_map = array();
586
-
587
- $is_first_non_ignored_blog = true;
588
-
589
- foreach ( $sites as $site ) {
590
- $blog_id = self::get_site_blog_id( $site );
591
-
592
- $blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
593
-
594
- if ( is_null( $blog_install_timestamp ) ) {
595
- // Plugin has not been installed on this blog.
596
- continue;
597
- }
598
-
599
- $is_earlier_install = (
600
- ! is_null( $install_timestamp ) &&
601
- $blog_install_timestamp < $install_timestamp
602
- );
603
-
604
- $install = $this->get_install_by_blog_id( $blog_id );
605
-
606
- $update_network_user_info = false;
607
-
608
- if ( ! is_object( $install ) ) {
609
- if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
610
- // The opt-in decision (whether to skip or opt in) is yet to be made.
611
- continue;
612
- }
613
-
614
- $skips_count ++;
615
- } else {
616
- $blog_id_2_install_map[ $blog_id ] = $install;
617
-
618
- if ( empty( $network_user_info ) ) {
619
- // Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
620
- $update_network_user_info = true;
621
- }
622
-
623
- if ( ! $update_network_user_info &&
624
- is_object( $current_fs_user ) &&
625
- $network_user_info['user_id'] != $current_fs_user->id &&
626
- $install->user_id == $current_fs_user->id
627
- ) {
628
- // If an install that is owned by the current WP user is found, use its user information instead.
629
- $update_network_user_info = true;
630
- }
631
-
632
- if ( ! $update_network_user_info &&
633
- $is_earlier_install &&
634
- ( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
635
- ) {
636
- // Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
637
- $update_network_user_info = true;
638
- }
639
- }
640
-
641
- if ( $update_network_user_info ) {
642
- $network_user_info = array(
643
- 'user_id' => $install->user_id,
644
- 'blog_id' => $blog_id
645
- );
646
- }
647
-
648
- $site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
649
-
650
- if ( $is_first_non_ignored_blog ) {
651
- $prev_is_premium = $site_prev_is_premium;
652
-
653
- if ( is_null( $network_install_timestamp ) ) {
654
- $install_timestamp = $blog_install_timestamp;
655
- }
656
-
657
- $is_first_non_ignored_blog = false;
658
-
659
- continue;
660
- }
661
-
662
- if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
663
- // If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
664
- $prev_is_premium = null;
665
- }
666
-
667
- if ( $is_earlier_install ) {
668
- // If an earlier install timestamp is found.
669
- $install_timestamp = $blog_install_timestamp;
670
- }
671
- }
672
-
673
- $installs_count = count( $blog_id_2_install_map );
674
-
675
- if ( $sites_count === ( $installs_count + $skips_count ) ) {
676
- if ( ! empty( $network_user_info ) ) {
677
- $options_to_update['network_user_id'] = $network_user_info['user_id'];
678
- $options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
679
-
680
- foreach ( $blog_id_2_install_map as $blog_id => $install ) {
681
- if ( $install->user_id == $network_user_info['user_id'] ) {
682
- continue;
683
- }
684
-
685
- $this->_storage->store( 'is_delegated_connection', true, $blog_id );
686
- }
687
- }
688
-
689
- if ( $sites_count === $skips_count ) {
690
- /**
691
- * Assume network-level skipping as the intended action if all actions identified were only
692
- * skipping of the connection (i.e., no opt-ins and delegated connections so far).
693
- */
694
- $options_to_update['is_anonymous_ms'] = true;
695
- } else if ( $sites_count === $installs_count ) {
696
- /**
697
- * Assume network-level opt-in as the intended action if all actions identified were only opt-ins
698
- * (i.e., no delegation and skipping of the connections so far).
699
- */
700
- $options_to_update['is_network_connected'] = true;
701
- }
702
- }
703
- }
704
-
705
- if ( ! is_null( $install_timestamp ) ) {
706
- $options_to_update['install_timestamp'] = $install_timestamp;
707
- }
708
-
709
- if ( ! is_null( $prev_is_premium ) ) {
710
- $options_to_update['prev_is_premium'] = $prev_is_premium;
711
- }
712
-
713
- if ( ! empty( $options_to_update ) ) {
714
- $this->adjust_storage( $options_to_update, $is_network_admin );
715
- }
716
- }
717
-
718
- /**
719
- * @author Leo Fajardo (@leorw)
720
- * @since 2.3.0
721
- *
722
- * @param array $options
723
- * @param bool $is_network_admin
724
- */
725
- private function adjust_storage( $options, $is_network_admin ) {
726
- foreach ( $options as $name => $value ) {
727
- $this->_storage->store( $name, $value, $is_network_admin ? true : null );
728
- }
729
- }
730
-
731
- /**
732
- * Checks whether this module has a settings menu.
733
- *
734
- * @author Leo Fajardo (@leorw)
735
- * @since 1.2.2
736
- *
737
- * @return bool
738
- */
739
- function has_settings_menu() {
740
- return ( $this->_is_network_active && fs_is_network_admin() ) ?
741
- $this->_menu->has_network_menu() :
742
- $this->_menu->has_menu();
743
- }
744
-
745
- /**
746
- * If `true` the opt-in should be shown as a modal dialog box on the themes.php page. WordPress.org themes guidelines prohibit from redirecting the user from the themes.php page after activating a theme.
747
- *
748
- * @author Vova Feldman (@svovaf)
749
- * @since 2.4.5
750
- *
751
- * @return bool
752
- */
753
- function show_opt_in_on_themes_page() {
754
- if ( ! $this->is_free_wp_org_theme() ) {
755
- return false;
756
- }
757
-
758
- if ( ! $this->has_settings_menu() ) {
759
- return true;
760
- }
761
-
762
- return $this->show_settings_with_tabs();
763
- }
764
-
765
- /**
766
- * If `true` the opt-in should be shown on the product's main setting page.
767
- *
768
- * @author Vova Feldman (@svovaf)
769
- * @since 2.4.5
770
- *
771
- * @return bool
772
- *
773
- * @uses show_opt_in_on_themes_page();
774
- */
775
- function show_opt_in_on_setting_page() {
776
- return ! $this->show_opt_in_on_themes_page();
777
- }
778
-
779
- /**
780
- * If `true` the settings should be shown using tabs.
781
- *
782
- * @author Vova Feldman (@svovaf)
783
- * @since 2.4.5
784
- *
785
- * @return bool
786
- */
787
- function show_settings_with_tabs() {
788
- return ( self::NAVIGATION_TABS === $this->_navigation );
789
- }
790
-
791
- /**
792
- * Check if the context module is free wp.org theme.
793
- *
794
- * This method is helpful because:
795
- * 1. wp.org themes are limited to a single submenu item,
796
- * and sub-submenu items are most likely not allowed (never verified).
797
- * 2. wp.org themes are not allowed to redirect the user
798
- * after the theme activation, therefore, the agreed UX
799
- * is showing the opt-in as a modal dialog box after
800
- * activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
801
- *
802
- * @author Vova Feldman (@svovaf)
803
- * @since 1.2.2.7
804
- *
805
- * @return bool
806
- */
807
- function is_free_wp_org_theme() {
808
- return (
809
- $this->is_theme() &&
810
- $this->is_org_repo_compliant() &&
811
- ! $this->is_premium()
812
- );
813
- }
814
-
815
- /**
816
- * Checks whether this a submenu item is visible.
817
- *
818
- * @author Vova Feldman (@svovaf)
819
- * @since 1.2.2.6
820
- * @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
821
- *
822
- * @param string $slug
823
- * @param bool $is_tabs_visibility_check This is used to decide if the associated tab should be shown or hidden.
824
- *
825
- * @return bool
826
- */
827
- function is_submenu_item_visible( $slug, $is_tabs_visibility_check = false ) {
828
- if ( $this->is_admin_page( $slug ) ) {
829
- /**
830
- * It is the current context page, so show the submenu item
831
- * so the user will have the right context page, even if it
832
- * was set to hidden.
833
- */
834
- return true;
835
- }
836
-
837
- if ( ! $this->has_settings_menu() ) {
838
- // No menu settings at all.
839
- return false;
840
- }
841
-
842
- if (
843
- ! $is_tabs_visibility_check &&
844
- $this->is_org_repo_compliant() &&
845
- $this->show_settings_with_tabs()
846
- ) {
847
- /**
848
- * wp.org themes are limited to a single submenu item, and
849
- * sub-submenu items are most likely not allowed (never verified).
850
- */
851
- return false;
852
- }
853
-
854
- return $this->_menu->is_submenu_item_visible( $slug );
855
- }
856
-
857
- /**
858
- * Check if a Freemius page should be accessible via the UI.
859
- *
860
- * @author Vova Feldman (@svovaf)
861
- * @since 1.2.2.7
862
- *
863
- * @param string $slug
864
- *
865
- * @return bool
866
- */
867
- function is_page_visible( $slug ) {
868
- if ( $this->is_admin_page( $slug ) ) {
869
- return true;
870
- }
871
-
872
- return $this->_menu->is_submenu_item_visible( $slug, true, true );
873
- }
874
-
875
- /**
876
- * @author Vova Feldman (@svovaf)
877
- * @since 1.0.9
878
- */
879
- private function _version_updates_handler() {
880
- if ( ! isset( $this->_storage->sdk_version ) || $this->_storage->sdk_version != $this->version ) {
881
- // Freemius version upgrade mode.
882
- $this->_storage->sdk_last_version = $this->_storage->sdk_version;
883
- $this->_storage->sdk_version = $this->version;
884
-
885
- if ( empty( $this->_storage->sdk_last_version ) ||
886
- version_compare( $this->_storage->sdk_last_version, $this->version, '<' )
887
- ) {
888
- $this->_storage->sdk_upgrade_mode = true;
889
- $this->_storage->sdk_downgrade_mode = false;
890
- } else {
891
- $this->_storage->sdk_downgrade_mode = true;
892
- $this->_storage->sdk_upgrade_mode = false;
893
-
894
- }
895
-
896
- $this->do_action( 'sdk_version_update', $this->_storage->sdk_last_version, $this->version );
897
- }
898
-
899
- $plugin_version = $this->get_plugin_version();
900
- if ( ! isset( $this->_storage->plugin_version ) || $this->_storage->plugin_version != $plugin_version ) {
901
- // Plugin version upgrade mode.
902
- $this->_storage->plugin_last_version = $this->_storage->plugin_version;
903
- $this->_storage->plugin_version = $plugin_version;
904
-
905
- if ( empty( $this->_storage->plugin_last_version ) ||
906
- version_compare( $this->_storage->plugin_last_version, $plugin_version, '<' )
907
- ) {
908
- $this->_storage->plugin_upgrade_mode = true;
909
- $this->_storage->plugin_downgrade_mode = false;
910
- } else {
911
- $this->_storage->plugin_downgrade_mode = true;
912
- $this->_storage->plugin_upgrade_mode = false;
913
- }
914
-
915
- if ( ! empty( $this->_storage->plugin_last_version ) ) {
916
- // Different version of the plugin was installed before, therefore it's an update.
917
- $this->_storage->is_plugin_new_install = false;
918
- }
919
-
920
- $this->do_action( 'plugin_version_update', $this->_storage->plugin_last_version, $plugin_version );
921
- }
922
- }
923
-
924
- #--------------------------------------------------------------------------------
925
- #region Data Migration on SDK Update
926
- #--------------------------------------------------------------------------------
927
-
928
- /**
929
- * @author Vova Feldman (@svovaf)
930
- * @since 1.1.5
931
- *
932
- * @param string $sdk_prev_version
933
- * @param string $sdk_version
934
- */
935
- function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
936
- /**
937
- * @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
938
- */
939
- if ( empty( $sdk_prev_version ) ) {
940
- return;
941
- }
942
-
943
- if ( version_compare( $sdk_prev_version, '2.1.0', '<' ) &&
944
- version_compare( $sdk_version, '2.1.0', '>=' )
945
- ) {
946
- $this->_storage->handle_gdpr_admin_notice = true;
947
- }
948
-
949
- if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
950
- version_compare( $sdk_version, '2.0.0', '>=' )
951
- ) {
952
- $this->migrate_to_subscriptions_collection();
953
-
954
- $this->consolidate_licenses();
955
-
956
- // Clear trial_plan since it's now loaded from the plans collection when needed.
957
- $this->_storage->remove( 'trial_plan', true, false );
958
- }
959
-
960
- if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
961
- version_compare( $sdk_version, '1.2.3', '>=' )
962
- ) {
963
- /**
964
- * Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
965
- * invalid.
966
- *
967
- * @author Leo Fajardo (@leorw)
968
- */
969
- $this->remove_invalid_paths();
970
- }
971
-
972
- if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
973
- version_compare( $sdk_version, '1.1.5', '>=' )
974
- ) {
975
- // On version 1.1.5 merged connectivity and is_on data.
976
- if ( isset( $this->_storage->connectivity_test ) ) {
977
- if ( ! isset( $this->_storage->is_on ) ) {
978
- unset( $this->_storage->connectivity_test );
979
- } else {
980
- $connectivity_data = $this->_storage->connectivity_test;
981
- $connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
982
- $connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
983
-
984
- // Override.
985
- $this->_storage->connectivity_test = $connectivity_data;
986
-
987
- // Remove previous structure.
988
- unset( $this->_storage->is_on );
989
- }
990
-
991
- }
992
- }
993
-
994
- if (
995
- version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
996
- version_compare( $sdk_version, '2.2.1', '>=' )
997
- ) {
998
- /**
999
- * Clear the file cache without storing the previous path since it could be a wrong path. For example,
1000
- * in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
1001
- * as the parent plugin's when the add-on was auto-installed since the relevant method names were not
1002
- * skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
1003
- * (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
1004
- * and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
1005
- * related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
1006
- *
1007
- * @author Leo Fajardo (@leorw)
1008
- * @since 2.2.1
1009
- */
1010
- $this->clear_module_main_file_cache( false );
1011
- }
1012
- }
1013
-
1014
- /**
1015
- * @author Leo Fajardo (@leorw)
1016
- * @since 2.0.0
1017
- *
1018
- * @param \FS_Storage $storage
1019
- * @param bool|int|null $blog_id
1020
- */
1021
- private static function migrate_install_plan_to_plan_id( FS_Storage $storage, $blog_id = null ) {
1022
- if ( empty( $storage->sdk_version ) ) {
1023
- // New installation of the plugin, no need to upgrade.
1024
- return;
1025
- }
1026
-
1027
- if ( ! version_compare( $storage->sdk_version, '2.0.0', '<' ) ) {
1028
- // Previous version is >= 2.0.0, so no need to migrate.
1029
- return;
1030
- }
1031
-
1032
- // Alias.
1033
- $module_type = $storage->get_module_type();
1034
- $module_slug = $storage->get_module_slug();
1035
-
1036
- $installs = self::get_all_sites( $module_type, $blog_id );
1037
- $install = isset( $installs[ $module_slug ] ) ? $installs[ $module_slug ] : null;
1038
-
1039
- if ( ! is_object( $install ) ) {
1040
- return;
1041
- }
1042
-
1043
- if ( isset( $install->plan ) && is_object( $install->plan ) ) {
1044
- if ( isset( $install->plan->id ) && ! empty( $install->plan->id ) ) {
1045
- $install->plan_id = self::_decrypt( $install->plan->id );
1046
- }
1047
-
1048
- unset( $install->plan );
1049
-
1050
- $installs[ $module_slug ] = clone $install;
1051
-
1052
- self::set_account_option_by_module(
1053
- $module_type,
1054
- 'sites',
1055
- $installs,
1056
- true,
1057
- $blog_id
1058
- );
1059
- }
1060
- }
1061
-
1062
- /**
1063
- * @author Leo Fajardo (@leorw)
1064
- * @since 2.0.0
1065
- */
1066
- private function migrate_to_subscriptions_collection() {
1067
- if ( ! is_object( $this->_site ) ) {
1068
- return;
1069
- }
1070
-
1071
- if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
1072
- $this->_storage->subscriptions = array( fs_get_entity( $this->_storage->subscription, FS_Subscription::get_class_name() ) );
1073
- }
1074
- }
1075
-
1076
- /**
1077
- * @author Leo Fajardo (@leorw)
1078
- * @since 2.0.0
1079
- */
1080
- private function consolidate_licenses() {
1081
- $plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
1082
- if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
1083
- $plugin_licenses = $plugin_licenses[ $this->_slug ];
1084
- } else {
1085
- $plugin_licenses = array();
1086
- }
1087
-
1088
- $theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
1089
- if ( isset( $theme_licenses[ $this->_slug ] ) ) {
1090
- $theme_licenses = $theme_licenses[ $this->_slug ];
1091
- } else {
1092
- $theme_licenses = array();
1093
- }
1094
-
1095
- if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
1096
- return;
1097
- }
1098
-
1099
- $all_licenses = array();
1100
- $user_id_license_ids_map = array();
1101
-
1102
- foreach ( $plugin_licenses as $user_id => $user_licenses ) {
1103
- if ( is_array( $user_licenses ) ) {
1104
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1105
- $user_id_license_ids_map[ $user_id ] = array();
1106
- }
1107
-
1108
- foreach ( $user_licenses as $user_license ) {
1109
- $all_licenses[] = $user_license;
1110
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1111
- }
1112
- }
1113
- }
1114
-
1115
- foreach ( $theme_licenses as $user_id => $user_licenses ) {
1116
- if ( is_array( $user_licenses ) ) {
1117
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1118
- $user_id_license_ids_map[ $user_id ] = array();
1119
- }
1120
-
1121
- foreach ( $user_licenses as $user_license ) {
1122
- $all_licenses[] = $user_license;
1123
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1124
- }
1125
- }
1126
- }
1127
-
1128
- self::store_user_id_license_ids_map(
1129
- $user_id_license_ids_map,
1130
- $this->_module_id
1131
- );
1132
-
1133
- $this->_store_licenses( true, $this->_module_id, $all_licenses );
1134
- }
1135
-
1136
- /**
1137
- * Remove invalid paths.
1138
- *
1139
- * @author Leo Fajardo (@leorw)
1140
- * @since 1.2.3
1141
- */
1142
- private function remove_invalid_paths() {
1143
- // Remove invalid path that is still associated with the current slug if there's any.
1144
- $file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
1145
- foreach ( $file_slug_map as $plugin_basename => $slug ) {
1146
- if ( $slug === $this->_slug &&
1147
- $plugin_basename !== $this->_plugin_basename &&
1148
- ! file_exists( $this->get_absolute_path( $plugin_basename ) )
1149
- ) {
1150
- unset( $file_slug_map[ $plugin_basename ] );
1151
- self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
1152
-
1153
- break;
1154
- }
1155
- }
1156
- }
1157
-
1158
- /**
1159
- * @author Vova Feldman (@svovaf)
1160
- * @since 1.2.2.7
1161
- *
1162
- * @param string $plugin_prev_version
1163
- * @param string $plugin_version
1164
- */
1165
- function _after_version_update( $plugin_prev_version, $plugin_version ) {
1166
- if ( $this->is_theme() ) {
1167
- // Expire the cache of the previous tabs since the theme may
1168
- // have setting updates.
1169
- $this->_cache->expire( 'tabs' );
1170
- $this->_cache->expire( 'tabs_stylesheets' );
1171
- }
1172
- }
1173
-
1174
- /**
1175
- * A special migration logic for the $_accounts, executed for all the plugins in the system:
1176
- * - Moves some data to the network level storage.
1177
- * - If the plugin's connection was skipped for all sites, set the plugin as if it was network skipped.
1178
- * - If the plugin's connection was ignored for all sites, don't do anything in terms of the network connection.
1179
- * - If the plugin was connected to all sites by the same super-admin, set the plugin as if was network opted-in for all sites.
1180
- * - If there's at least one site that was connected by a super-admin, find the "main super-admin" (the one that installed the majority of the plugin installs) and set the plugin as if was network activated with the main super-admin, set all the sites that were skipped or opted-in with a different user to delegated mode. Then, prompt the currently logged super-admin to choose what to do with the ignored sites.
1181
- * - If there are any sites in the network which the connection decision was not yet taken for, set this plugin into network activation mode so a super-admin can choose what to do with the rest of the sites.
1182
- *
1183
- * @author Vova Feldman (@svovaf)
1184
- * @since 2.0.0
1185
- */
1186
- private static function migrate_accounts_to_network() {
1187
- $sites = self::get_sites();
1188
- $sites_count = count( $sites );
1189
- $connection_status = array();
1190
- $plugin_slugs = array();
1191
- foreach ( $sites as $site ) {
1192
- $blog_id = self::get_site_blog_id( $site );
1193
-
1194
- self::$_accounts->migrate_to_network( $blog_id );
1195
-
1196
- /**
1197
- * Build a list of all Freemius powered plugins slugs.
1198
- */
1199
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array(), $blog_id );
1200
- foreach ( $id_slug_type_path_map as $module_id => $data ) {
1201
- if ( WP_FS__MODULE_TYPE_PLUGIN === $data['type'] ) {
1202
- $plugin_slugs[ $data['slug'] ] = true;
1203
- }
1204
- }
1205
-
1206
- $installs = self::get_account_option( 'sites', WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
1207
-
1208
- if ( is_array( $installs ) ) {
1209
- foreach ( $installs as $slug => $install ) {
1210
- if ( ! isset( $connection_status[ $slug ] ) ) {
1211
- $connection_status[ $slug ] = array();
1212
- }
1213
-
1214
- if ( is_object( $install ) &&
1215
- FS_Site::is_valid_id( $install->id ) &&
1216
- FS_User::is_valid_id( $install->user_id )
1217
- ) {
1218
- $connection_status[ $slug ][ $blog_id ] = $install->user_id;
1219
- }
1220
- }
1221
- }
1222
- }
1223
-
1224
- foreach ( $plugin_slugs as $slug => $true ) {
1225
- if ( ! isset( $connection_status[ $slug ] ) ) {
1226
- $connection_status[ $slug ] = array();
1227
- }
1228
-
1229
- foreach ( $sites as $site ) {
1230
- $blog_id = self::get_site_blog_id( $site );
1231
-
1232
- if ( isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1233
- continue;
1234
- }
1235
-
1236
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1237
-
1238
- $is_anonymous = $storage->get( 'is_anonymous', null, $blog_id );
1239
-
1240
- if ( ! is_null( $is_anonymous ) ) {
1241
- // Since 1.1.3 is_anonymous is an array.
1242
- if ( is_array( $is_anonymous ) && isset( $is_anonymous['is'] ) ) {
1243
- $is_anonymous = $is_anonymous['is'];
1244
- }
1245
-
1246
- if ( is_bool( $is_anonymous ) && true === $is_anonymous ) {
1247
- $connection_status[ $slug ][ $blog_id ] = 'skipped';
1248
- }
1249
- }
1250
-
1251
- if ( ! isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1252
- $connection_status[ $slug ][ $blog_id ] = 'ignored';
1253
- }
1254
- }
1255
- }
1256
-
1257
- $super_admins = array();
1258
-
1259
- foreach ( $connection_status as $slug => $blogs_status ) {
1260
- $skips = 0;
1261
- $ignores = 0;
1262
- $connections = 0;
1263
- $opted_in_users = array();
1264
- $opted_in_super_admins = array();
1265
-
1266
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1267
-
1268
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1269
- if ( 'skipped' === $status_or_user_id ) {
1270
- $skips ++;
1271
- } else if ( 'ignored' === $status_or_user_id ) {
1272
- $ignores ++;
1273
- } else if ( FS_User::is_valid_id( $status_or_user_id ) ) {
1274
- $connections ++;
1275
-
1276
- if ( ! isset( $opted_in_users[ $status_or_user_id ] ) ) {
1277
- $opted_in_users[ $status_or_user_id ] = array();
1278
- }
1279
-
1280
- $opted_in_users[ $status_or_user_id ][] = $blog_id;
1281
-
1282
- if ( isset( $super_admins[ $status_or_user_id ] ) ||
1283
- self::is_super_admin( $status_or_user_id )
1284
- ) {
1285
- // Cache super-admin data.
1286
- $super_admins[ $status_or_user_id ] = true;
1287
-
1288
- // Remember opted-in super-admins for the plugin.
1289
- $opted_in_super_admins[ $status_or_user_id ] = true;
1290
- }
1291
- }
1292
- }
1293
-
1294
- $main_super_admin_user_id = null;
1295
- $all_migrated = false;
1296
- if ( $sites_count == $skips ) {
1297
- // All sites were skipped -> network skip by copying the anonymous mode from any of the sites.
1298
- $storage->is_anonymous_ms = $storage->is_anonymous;
1299
-
1300
- $all_migrated = true;
1301
- } else if ( $sites_count == $ignores ) {
1302
- // Don't do anything, still in activation mode.
1303
-
1304
- $all_migrated = true;
1305
- } else if ( 0 < count( $opted_in_super_admins ) ) {
1306
- // Find the super-admin with the majority of installs.
1307
- $max_installs_by_super_admin = 0;
1308
- foreach ( $opted_in_super_admins as $user_id => $true ) {
1309
- $installs_count = count( $opted_in_users[ $user_id ] );
1310
-
1311
- if ( $installs_count > $max_installs_by_super_admin ) {
1312
- $max_installs_by_super_admin = $installs_count;
1313
- $main_super_admin_user_id = $user_id;
1314
- }
1315
- }
1316
-
1317
- if ( $sites_count == $connections && 1 == count( $opted_in_super_admins ) ) {
1318
- // Super-admin opted-in for all sites in the network.
1319
- $storage->is_network_connected = true;
1320
-
1321
- $all_migrated = true;
1322
- }
1323
-
1324
- // Store network user.
1325
- $storage->network_user_id = $main_super_admin_user_id;
1326
-
1327
- $storage->network_install_blog_id = ( $sites_count == $connections ) ?
1328
- // Since all sites are opted-in, associating with the main site.
1329
- get_current_blog_id() :
1330
- // Associating with the 1st found opted-in site.
1331
- $opted_in_users[ $main_super_admin_user_id ][0];
1332
-
1333
- /**
1334
- * Make sure we migrate the plan ID of the network install, otherwise, if after the migration
1335
- * the 1st page that will be loaded is the network level WP Admin and $storage->network_install_blog_id
1336
- * is different than the main site of the network, the $this->_site will not be set since the plan_id
1337
- * will be empty.
1338
- */
1339
- $storage->migrate_to_network();
1340
- self::migrate_install_plan_to_plan_id( $storage, $storage->network_install_blog_id );
1341
- } else {
1342
- // At least one opt-in. All the opt-in were created by a non-super-admin.
1343
- if ( 0 == $ignores ) {
1344
- // All sites were opted-in or skipped, all by non-super-admin. So delegate all.
1345
- $storage->store( 'is_delegated_connection', true, true );
1346
-
1347
- $all_migrated = true;
1348
- }
1349
- }
1350
-
1351
- if ( ! $all_migrated ) {
1352
- /**
1353
- * Delegate all sites that were:
1354
- * 1) Opted-in by a user that is NOT the main-super-admin.
1355
- * 2) Skipped and non of the sites was opted-in by a super-admin. If any site was opted-in by a super-admin, there will be a main-super-admin, and we consider the skip as if it was done by that user.
1356
- */
1357
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1358
- if ( $status_or_user_id == $main_super_admin_user_id ) {
1359
- continue;
1360
- }
1361
-
1362
- if ( FS_User::is_valid_id( $status_or_user_id ) ||
1363
- ( 'skipped' === $status_or_user_id && is_null( $main_super_admin_user_id ) )
1364
- ) {
1365
- $storage->store( 'is_delegated_connection', true, $blog_id );
1366
- }
1367
- }
1368
- }
1369
-
1370
-
1371
- if ( ( $connections + $skips > 0 ) ) {
1372
- if ( $ignores > 0 ) {
1373
- /**
1374
- * If admin already opted-in or skipped in any of the network sites, and also
1375
- * have sites which the connection decision was not yet taken, set this plugin
1376
- * into network activation mode so the super-admin can choose what to do with
1377
- * the rest of the sites.
1378
- */
1379
- self::set_network_upgrade_mode( $storage );
1380
- }
1381
- }
1382
- }
1383
- }
1384
-
1385
- /**
1386
- * Set a module into network upgrade mode.
1387
- *
1388
- * @author Vova Feldman (@svovaf)
1389
- * @since 2.0.0
1390
- *
1391
- * @param \FS_Storage $storage
1392
- *
1393
- * @return bool
1394
- */
1395
- private static function set_network_upgrade_mode( FS_Storage $storage ) {
1396
- return $storage->is_network_activation = true;
1397
- }
1398
-
1399
- /**
1400
- * Will return true after upgrading to the SDK with the network level integration,
1401
- * when the super-admin involvement is required regarding the rest of the sites.
1402
- *
1403
- * @author Vova Feldman (@svovaf)
1404
- * @since 2.0.0
1405
- *
1406
- * @return bool
1407
- */
1408
- function is_network_upgrade_mode() {
1409
- return $this->_storage->get( 'is_network_activation' );
1410
- }
1411
-
1412
- /**
1413
- * Clear flag after the upgrade mode completion.
1414
- *
1415
- * @author Vova Feldman (@svovaf)
1416
- * @since 2.0.0
1417
- *
1418
- * @return bool True if network activation was on and now completed.
1419
- */
1420
- private function network_upgrade_mode_completed() {
1421
- if ( fs_is_network_admin() && $this->is_network_upgrade_mode() ) {
1422
- $this->_storage->remove( 'is_network_activation' );
1423
-
1424
- return true;
1425
- }
1426
-
1427
- return false;
1428
- }
1429
-
1430
- #endregion
1431
-
1432
- /**
1433
- * This action is connected to the 'plugins_loaded' hook and helps to determine
1434
- * if this is a new plugin installation or a plugin update.
1435
- *
1436
- * There are 3 different use-cases:
1437
- * 1) New plugin installation right with Freemius:
1438
- * 1.1 _activate_plugin_event_hook() will be executed first
1439
- * 1.2 Since $this->_storage->is_plugin_new_install is not set,
1440
- * and $this->_storage->plugin_last_version is not set,
1441
- * $this->_storage->is_plugin_new_install will be set to TRUE.
1442
- * 1.3 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1443
- * be already set to TRUE.
1444
- *
1445
- * 2) Plugin update, didn't have Freemius before, and now have the SDK:
1446
- * 2.1 _activate_plugin_event_hook() will not be executed, because
1447
- * the activation hook do NOT fires on updates since WP 3.1.
1448
- * 2.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1449
- * be empty, therefore, it will be set to FALSE.
1450
- *
1451
- * 3) Plugin update, had Freemius in prev version as well:
1452
- * 3.1 _version_updates_handler() will be executed 1st, since FS was installed
1453
- * before, $this->_storage->plugin_last_version will NOT be empty,
1454
- * therefore, $this->_storage->is_plugin_new_install will be set to FALSE.
1455
- * 3.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install is
1456
- * already set, therefore, it will not be modified.
1457
- *
1458
- * Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
1459
- *
1460
- * NOTE:
1461
- * The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
1462
- * and then, the next immediate PageView is the plugin's main settings page, it will not
1463
- * show the opt-in right away. The reason it will happen is because Freemius execution
1464
- * will be turned off till the plugin is fully loaded at least once
1465
- * (till $this->_storage->was_plugin_loaded is TRUE).
1466
- *
1467
- * @author Vova Feldman (@svovaf)
1468
- * @since 1.1.9
1469
- *
1470
- */
1471
- function _plugins_loaded() {
1472
- // Update flag that plugin was loaded with Freemius at least once.
1473
- $this->_storage->was_plugin_loaded = true;
1474
-
1475
- /**
1476
- * Bug fix - only set to false when it's a plugin, due to the
1477
- * execution sequence of the theme hooks and our methods, if
1478
- * this will be set for themes, Freemius will always assume
1479
- * it's a theme update.
1480
- *
1481
- * @author Vova Feldman (@svovaf)
1482
- * @since 1.2.2.2
1483
- */
1484
- if ( $this->is_plugin() &&
1485
- ! isset( $this->_storage->is_plugin_new_install )
1486
- ) {
1487
- $this->_storage->is_plugin_new_install = (
1488
- ! is_plugin_active( $this->_plugin_basename ) &&
1489
- empty( $this->_storage->plugin_last_version )
1490
- );
1491
- }
1492
- }
1493
-
1494
- /**
1495
- * Add special parameter to WP admin AJAX calls so when we
1496
- * process AJAX calls we can identify its source properly.
1497
- *
1498
- * @author Leo Fajardo (@leorw)
1499
- * @since 2.0.0
1500
- */
1501
- static function _enrich_ajax_url() {
1502
- $admin_param = is_network_admin() ?
1503
- '_fs_network_admin' :
1504
- '_fs_blog_admin';
1505
- ?>
1506
- <script type="text/javascript">
1507
- (function ($) {
1508
- $(document).ajaxSend(function (event, jqxhr, settings) {
1509
- if (settings.url &&
1510
- -1 < settings.url.indexOf('admin-ajax.php') &&
1511
- ! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
1512
- ) {
1513
- if (
1514
- 'string' === typeof settings.data &&
1515
- settings.data.indexOf( 'action=heartbeat' ) > 0
1516
- ) {
1517
- return;
1518
- }
1519
-
1520
- if (settings.url.indexOf('?') > 0) {
1521
- settings.url += '&';
1522
- } else {
1523
- settings.url += '?';
1524
- }
1525
-
1526
- settings.url += '<?php echo $admin_param ?>=true';
1527
- }
1528
- });
1529
- })(jQuery);
1530
- </script>
1531
- <?php
1532
- }
1533
-
1534
- /**
1535
- * Opens the support forum subemenu item in a new browser page.
1536
- *
1537
- * @author Vova Feldman (@svovaf)
1538
- * @since 2.1.4
1539
- */
1540
- static function _open_support_forum_in_new_page() {
1541
- ?>
1542
- <script type="text/javascript">
1543
- (function ($) {
1544
- $('.fs-submenu-item.wp-support-forum').parent().attr( { target: '_blank', rel: 'noopener noreferrer' } );
1545
- })(jQuery);
1546
- </script>
1547
- <?php
1548
- }
1549
-
1550
- /**
1551
- * @author Vova Feldman (@svovaf)
1552
- * @since 1.0.9
1553
- */
1554
- private function register_constructor_hooks() {
1555
- $this->_logger->entrance();
1556
-
1557
- if ( is_admin() ) {
1558
- add_action( 'admin_init', array( &$this, '_hook_action_links_and_register_account_hooks' ) );
1559
-
1560
- if ( $this->is_plugin() ) {
1561
- if ( self::is_plugin_install_page() && true !== fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) {
1562
- /**
1563
- * Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, make
1564
- * Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php)
1565
- * so that they won't interfere with the .org plugins' functionalities on that page (e.g.
1566
- * updating of a .org plugin).
1567
- */
1568
- add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1569
- } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1570
- /**
1571
- * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
1572
- *
1573
- * @author Leo Fajardo (@leorw)
1574
- * @since 2.2.3
1575
- */
1576
- add_action( 'admin_footer', array( 'Freemius', '_prepend_fs_allow_updater_and_dialog_flag_url_param' ) );
1577
- }
1578
-
1579
- $plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
1580
-
1581
- /**
1582
- * @since 1.2.2
1583
- *
1584
- * Hook to both free and premium version activations to support
1585
- * auto deactivation on the other version activation.
1586
- */
1587
- register_activation_hook(
1588
- $plugin_dir . $this->_free_plugin_basename,
1589
- array( &$this, '_activate_plugin_event_hook' )
1590
- );
1591
-
1592
- register_activation_hook(
1593
- $plugin_dir . $this->premium_plugin_basename(),
1594
- array( &$this, '_activate_plugin_event_hook' )
1595
- );
1596
- } else {
1597
- add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
1598
-
1599
- add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
1600
- }
1601
-
1602
- /**
1603
- * Part of the mechanism to identify new plugin install vs. plugin update.
1604
- *
1605
- * @author Vova Feldman (@svovaf)
1606
- * @since 1.1.9
1607
- */
1608
- if ( empty( $this->_storage->was_plugin_loaded ) ) {
1609
- /**
1610
- * During the plugin activation (not theme), 'plugins_loaded' will be already executed
1611
- * when the logic gets here since the activation logic first add the activate plugins,
1612
- * then triggers 'plugins_loaded', and only then include the code of the plugin that
1613
- * is activated. Which means that _plugins_loaded() will NOT be executed during the
1614
- * plugin activation, and that IS intentional.
1615
- *
1616
- * @author Vova Feldman (@svovaf)
1617
- */
1618
- if ( $this->is_plugin() &&
1619
- $this->is_activation_mode( false ) &&
1620
- 0 == did_action( 'plugins_loaded' )
1621
- ) {
1622
- add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
1623
- } else {
1624
- // If was activated before, then it was already loaded before.
1625
- $this->_plugins_loaded();
1626
- }
1627
- }
1628
-
1629
- if ( ! self::is_ajax() ) {
1630
- if ( ! $this->is_addon() ) {
1631
- add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
1632
- }
1633
- }
1634
-
1635
- if ( $this->_storage->handle_gdpr_admin_notice ) {
1636
- add_action( 'init', array( &$this, '_maybe_show_gdpr_admin_notice' ) );
1637
- }
1638
-
1639
- add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
1640
- add_action( 'init', array( &$this, '_maybe_add_pricing_ajax_handler' ) );
1641
- }
1642
-
1643
- if ( $this->is_plugin() ) {
1644
- if ( $this->_is_network_active ) {
1645
- add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
1646
- }
1647
-
1648
- register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
1649
- }
1650
-
1651
- if ( is_multisite() ) {
1652
- add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
1653
- add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
1654
- add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
1655
- add_action( 'deleted_blog', array( &$this, '_after_site_deleted_callback' ), 10, 2 );
1656
-
1657
- add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
1658
- add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
1659
- add_action( 'make_ham_blog', array( &$this, '_after_site_reactivated_callback' ) );
1660
- }
1661
-
1662
- if ( $this->is_theme() &&
1663
- self::is_customizer() &&
1664
- $this->apply_filters( 'show_customizer_upsell', true )
1665
- ) {
1666
- // Register customizer upsell.
1667
- add_action( 'customize_register', array( &$this, '_customizer_register' ) );
1668
- }
1669
-
1670
- add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
1671
-
1672
- if ( $this->is_theme() && ! $this->is_migration() ) {
1673
- add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1674
- }
1675
-
1676
- add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1677
- add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1678
- add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1679
- add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
1680
-
1681
- $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1682
- $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
1683
- $this->add_ajax_action( 'set_data_debug_mode', array( &$this, '_set_data_debug_mode' ) );
1684
- $this->add_ajax_action( 'toggle_whitelabel_mode', array( &$this, '_toggle_whitelabel_mode_ajax_handler' ) );
1685
-
1686
- if ( $this->_is_network_active && fs_is_network_admin() ) {
1687
- $this->add_ajax_action( 'network_activate', array( &$this, '_network_activate_ajax_action' ) );
1688
- }
1689
-
1690
- $this->add_ajax_action( 'install_premium_version', array(
1691
- &$this,
1692
- '_install_premium_version_ajax_action'
1693
- ) );
1694
-
1695
- $this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
1696
-
1697
- $this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
1698
-
1699
- $this->add_action( 'sdk_version_update', array( &$this, '_sdk_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
1700
-
1701
- $this->add_action(
1702
- 'plugin_version_update',
1703
- array( &$this, '_after_version_update' ),
1704
- WP_FS__DEFAULT_PRIORITY,
1705
- 2
1706
- );
1707
- $this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
1708
-
1709
- add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
1710
- add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
1711
- add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_common_css' ) );
1712
-
1713
- /**
1714
- * Handle request to reset anonymous mode for `get_reconnect_url()`.
1715
- *
1716
- * @author Vova Feldman (@svovaf)
1717
- * @since 1.2.1.5
1718
- */
1719
- if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
1720
- $this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
1721
- ) {
1722
- add_action( 'admin_init', array( &$this, 'connect_again' ) );
1723
- }
1724
- }
1725
-
1726
- /**
1727
- * Register the required hooks right after the settings parse is completed.
1728
- *
1729
- * @author Vova Feldman (@svovaf)
1730
- * @since 2.3.1
1731
- */
1732
- private function register_after_settings_parse_hooks() {
1733
- if ( is_admin() &&
1734
- $this->is_theme() &&
1735
- $this->is_premium() &&
1736
- ! $this->has_active_valid_license()
1737
- ) {
1738
- $this->add_ajax_action(
1739
- 'delete_theme_update_data',
1740
- array( &$this, '_delete_theme_update_data_action' )
1741
- );
1742
- }
1743
-
1744
- if ( $this->show_settings_with_tabs() ) {
1745
- /**
1746
- * Include the required hooks to capture the theme settings' page tabs
1747
- * and cache them.
1748
- *
1749
- * @author Vova Feldman (@svovaf)
1750
- * @since 1.2.2.7
1751
- */
1752
- if ( ! $this->_cache->has_valid( 'tabs' ) ) {
1753
- add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
1754
- // Add license activation AJAX callback.
1755
- $this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
1756
-
1757
- add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
1758
- }
1759
-
1760
- add_action(
1761
- 'admin_footer',
1762
- array( &$this, '_add_freemius_tabs' ),
1763
- /**
1764
- * The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
1765
- * That's why the priority is 11 while the tabs capture logic is added
1766
- * with priority 10.
1767
- *
1768
- * @author Vova Feldman (@svovaf)
1769
- */
1770
- 11
1771
- );
1772
- }
1773
-
1774
- if ( ! self::is_ajax() ) {
1775
- if ( ! $this->is_addon() || $this->is_only_premium() ) {
1776
- add_action(
1777
- ( $this->_is_network_active && fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu',
1778
- array( &$this, '_prepare_admin_menu' ),
1779
- WP_FS__LOWEST_PRIORITY
1780
- );
1781
- }
1782
- }
1783
- }
1784
-
1785
- /**
1786
- * Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that
1787
- * they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
1788
- *
1789
- * @author Leo Fajardo (@leorw)
1790
- * @since 2.2.3
1791
- *
1792
- * @param object $updates
1793
- * @param string|null $transient
1794
- *
1795
- * @return object
1796
- */
1797
- static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1798
- if ( is_object( $updates ) && isset( $updates->response ) ) {
1799
- foreach ( $updates->response as $file => $plugin ) {
1800
- if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
1801
- unset( $updates->response[ $file ] );
1802
- }
1803
- }
1804
- }
1805
-
1806
- return $updates;
1807
- }
1808
-
1809
- /**
1810
- * Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle
1811
- * the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
1812
- *
1813
- * @author Leo Fajardo (@leorw)
1814
- * @since 2.2.3
1815
- *
1816
- * @return string
1817
- */
1818
- static function _prepend_fs_allow_updater_and_dialog_flag_url_param() {
1819
- $slug_basename_map = array();
1820
- foreach ( self::$_instances as $instance ) {
1821
- if ( ! $instance->is_plugin() ) {
1822
- continue;
1823
- }
1824
-
1825
- $slug_basename_map[ $instance->get_slug() ] = $instance->premium_plugin_basename();
1826
- }
1827
- ?>
1828
- <script type="text/javascript">
1829
- (function( $ ) {
1830
- var slugBasenameMap = <?php echo json_encode( $slug_basename_map ) ?>;
1831
- for ( var slug in slugBasenameMap ) {
1832
- var basename = slugBasenameMap[ slug ];
1833
-
1834
- // Try to get the plugin rows if on the "Plugins" page.
1835
- var $pluginRows = $( '.wp-list-table.plugins tr[data-plugin="' + basename + '"]');
1836
-
1837
- if ( 0 === $pluginRows.length ) {
1838
- // Try to get the plugin rows if on the "Updates" page.
1839
- var $pluginCheckbox = $( '#update-plugins-table input[type="checkbox"][value="' + basename + '"]' );
1840
- if ( 0 !== $pluginCheckbox.length ) {
1841
- $pluginRows = $pluginCheckbox.parents( 'tr:first' );
1842
- }
1843
- }
1844
-
1845
- if ( 0 === $pluginRows.length ) {
1846
- // No plugin rows found.
1847
- continue;
1848
- }
1849
-
1850
- // Find the "View details" links and add the `fs_allow_updater_and_dialog` param to the URL.
1851
- $pluginRows.find( 'a[href*="plugin-install.php?tab=plugin-information"]' ).each(function() {
1852
- var $this = $( this ),
1853
- href = $this.attr( 'href' ).replace( '?tab=', '?fs_allow_updater_and_dialog=true&tab=');
1854
-
1855
- $this.attr( 'href', href );
1856
- });
1857
- }
1858
- })( jQuery );
1859
- </script>
1860
- <?php
1861
- }
1862
-
1863
- /**
1864
- * @author Leo Fajardo (@leorw)
1865
- * @since 2.3.0
1866
- */
1867
- static function _maybe_add_beta_label_styles() {
1868
- $has_any_beta_version = false;
1869
-
1870
- foreach ( self::$_instances as $instance ) {
1871
- if ( $instance->is_beta() ) {
1872
- $has_any_beta_version = true;
1873
- break;
1874
- }
1875
- }
1876
-
1877
- if ( $has_any_beta_version ) {
1878
- fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
1879
- }
1880
- }
1881
-
1882
- /**
1883
- * @author Leo Fajardo (@leorw)
1884
- * @since 2.3.0
1885
- */
1886
- static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
1887
- $beta_data = array();
1888
-
1889
- foreach ( self::$_instances as $instance ) {
1890
- if ( ! $instance->is_premium() ) {
1891
- continue;
1892
- }
1893
-
1894
- /**
1895
- * If there's an available beta version update, a confirmation message will be shown when the
1896
- * "Update now" link on the "Plugins" or "Themes" page is clicked.
1897
- */
1898
- $has_beta_update = $instance->has_beta_update();
1899
-
1900
- $is_beta = (
1901
- // The "Beta" label is added separately for themes.
1902
- $instance->is_plugin() &&
1903
- $instance->is_beta()
1904
- );
1905
-
1906
- if ( ! $is_beta && ! $has_beta_update ) {
1907
- continue;
1908
- }
1909
-
1910
- $beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
1911
-
1912
- if ( ! $has_beta_update ) {
1913
- continue;
1914
- }
1915
-
1916
- $beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
1917
- '%s %s',
1918
- sprintf(
1919
- fs_esc_attr_inline(
1920
- 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
1921
- 'beta-version-update-caution',
1922
- $instance->get_slug()
1923
- ),
1924
- $instance->get_plugin_title()
1925
- ),
1926
- fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
1927
- );
1928
- }
1929
-
1930
- if ( empty( $beta_data ) ) {
1931
- return;
1932
- }
1933
- ?>
1934
- <script type="text/javascript">
1935
- ( function( $ ) {
1936
- var betaData = <?php echo json_encode( $beta_data ) ?>;
1937
-
1938
- for ( var pluginBasename in betaData ) {
1939
- if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
1940
- continue;
1941
- }
1942
-
1943
- if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
1944
- continue;
1945
- }
1946
-
1947
- var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
1948
- if ( 0 === $parentContainer.length ) {
1949
- continue;
1950
- }
1951
-
1952
- $parentContainer.find( '.plugin-title > strong:first-child').append(
1953
- '<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
1954
- );
1955
- }
1956
-
1957
- setTimeout( function() {
1958
- // Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
1959
- $( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
1960
- var $parentContainer = $( this ).parents( 'tr:first' );
1961
- pluginBasename = ( 0 !== $parentContainer.length ) ?
1962
- $parentContainer.data( 'plugin' ) :
1963
- $( this ).parents( '.theme:first' ).data( 'slug' );
1964
-
1965
- if (
1966
- betaData[ pluginBasename ] &&
1967
- betaData[ pluginBasename ].beta_version_update_confirmation_message &&
1968
- ! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
1969
- ) {
1970
- return false;
1971
- }
1972
- } );
1973
- }, 20 );
1974
- } )( jQuery );
1975
- </script>
1976
- <?php
1977
- }
1978
-
1979
- /**
1980
- * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1981
- * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
1982
- * plugin will trigger inclusion of the free or premium version and if one of them is active during the
1983
- * uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
1984
- *
1985
- * @author Leo Fajardo (@leorw)
1986
- *
1987
- * @since 1.2.0
1988
- */
1989
- private function unregister_uninstall_hook() {
1990
- $uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
1991
- unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
1992
- unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
1993
-
1994
- update_option( 'uninstall_plugins', $uninstallable_plugins );
1995
- }
1996
-
1997
- /**
1998
- * @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
1999
- *
2000
- * @param bool $store_prev_path
2001
- */
2002
- private function clear_module_main_file_cache( $store_prev_path = true ) {
2003
- if ( ! isset( $this->_storage->plugin_main_file ) ||
2004
- empty( $this->_storage->plugin_main_file->path )
2005
- ) {
2006
- return;
2007
- }
2008
-
2009
- if ( ! $store_prev_path ) {
2010
- /**
2011
- * Storing the previous path is not needed when clearing the cache after an SDK version update since
2012
- * the main purpose of the cache clearing in that event is to correct a wrong plugin main file path
2013
- * which causes data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
2014
- *
2015
- * @author Leo Fajardo (@leorw)
2016
- * @since 2.2.1
2017
- */
2018
- unset( $this->_storage->plugin_main_file->path );
2019
- } else {
2020
- $plugin_main_file = clone $this->_storage->plugin_main_file;
2021
-
2022
- // Store cached path (2nd layer cache).
2023
- $plugin_main_file->prev_path = $plugin_main_file->path;
2024
-
2025
- // Clear cached path.
2026
- unset( $plugin_main_file->path );
2027
-
2028
- $this->_storage->plugin_main_file = $plugin_main_file;
2029
- }
2030
-
2031
- /**
2032
- * Clear global cached path.
2033
- *
2034
- * @author Leo Fajardo (@leorw)
2035
- * @since 1.2.2
2036
- */
2037
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
2038
- unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
2039
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
2040
- }
2041
-
2042
- /**
2043
- * @author Leo Fajardo (@leorw)
2044
- * @since 2.0.0
2045
- */
2046
- function _hook_action_links_and_register_account_hooks() {
2047
- if ( $this->is_migration() ) {
2048
- return;
2049
- }
2050
-
2051
- $this->_add_tracking_links();
2052
-
2053
- if ( self::is_plugins_page() && $this->is_plugin() ) {
2054
- $this->hook_plugin_action_links();
2055
- }
2056
-
2057
- $this->_register_account_hooks();
2058
- }
2059
-
2060
- /**
2061
- * @author Vova Feldman (@svovaf)
2062
- * @since 1.0.9
2063
- */
2064
- private function _register_account_hooks() {
2065
- if ( ! is_admin() ) {
2066
- return;
2067
- }
2068
-
2069
- /**
2070
- * Always show the deactivation feedback form since we added
2071
- * automatic free version deactivation upon premium code activation.
2072
- *
2073
- * @since 1.2.1.6
2074
- */
2075
- $this->add_ajax_action(
2076
- 'submit_uninstall_reason',
2077
- array( &$this, '_submit_uninstall_reason_action' )
2078
- );
2079
-
2080
- $this->add_ajax_action(
2081
- 'cancel_subscription_or_trial',
2082
- array( &$this, 'cancel_subscription_or_trial_ajax_action' )
2083
- );
2084
-
2085
- if ( ! $this->is_addon() || $this->is_parent_plugin_installed() ) {
2086
- if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
2087
- ( $this->is_theme() && self::is_themes_page() )
2088
- ) {
2089
- add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
2090
- }
2091
- }
2092
- }
2093
-
2094
- /**
2095
- * Leverage backtrace to find caller plugin file path.
2096
- *
2097
- * @author Vova Feldman (@svovaf)
2098
- * @since 1.0.6
2099
- *
2100
- * @param bool $is_init Is initiation sequence.
2101
- *
2102
- * @return string
2103
- */
2104
- private function _find_caller_plugin_file( $is_init = false ) {
2105
- // Try to load the cached value of the file path.
2106
- if ( isset( $this->_storage->plugin_main_file ) ) {
2107
- $plugin_main_file = $this->_storage->plugin_main_file;
2108
- if ( ! empty( $plugin_main_file->path ) ) {
2109
- $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
2110
- if ( file_exists( $absolute_path ) ) {
2111
- return $absolute_path;
2112
- }
2113
- }
2114
- }
2115
-
2116
- /**
2117
- * @since 1.2.1
2118
- *
2119
- * `clear_module_main_file_cache()` is clearing the plugin's cached path on
2120
- * deactivation. Therefore, if any plugin/theme was initiating `Freemius`
2121
- * with that plugin's slug, it was overriding the empty plugin path with a wrong path.
2122
- *
2123
- * So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
2124
- * when the class instantiator isn't the module.
2125
- */
2126
- if ( ! $is_init ) {
2127
- // Fetch prev path cache.
2128
- if ( isset( $this->_storage->plugin_main_file ) &&
2129
- ! empty( $this->_storage->plugin_main_file->prev_path )
2130
- ) {
2131
- $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
2132
- if ( file_exists( $absolute_path ) ) {
2133
- return $absolute_path;
2134
- }
2135
- }
2136
-
2137
- wp_die(
2138
- $this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
2139
- " Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
2140
- $this->get_text_inline( 'Error', 'error' ),
2141
- array( 'back_link' => true )
2142
- );
2143
- }
2144
-
2145
- /**
2146
- * @since 1.2.1
2147
- *
2148
- * Only the original instantiator that calls dynamic_init can modify the module's path.
2149
- */
2150
- // Find caller module.
2151
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2152
- $this->_storage->plugin_main_file = (object) array(
2153
- 'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
2154
- );
2155
-
2156
- return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
2157
- }
2158
-
2159
- /**
2160
- * @author Leo Fajardo (@leorw)
2161
- * @since 1.2.3
2162
- *
2163
- * @param string $path
2164
- *
2165
- * @return string
2166
- */
2167
- private function get_relative_path( $path ) {
2168
- $module_root_dir = $this->get_module_root_dir_path();
2169
- if ( 0 === strpos( $path, $module_root_dir ) ) {
2170
- $path = substr( $path, strlen( $module_root_dir ) );
2171
- }
2172
-
2173
- return $path;
2174
- }
2175
-
2176
- /**
2177
- * @author Leo Fajardo (@leorw)
2178
- * @since 1.2.3
2179
- *
2180
- * @param string $path
2181
- * @param string|bool $module_type
2182
- *
2183
- * @return string
2184
- */
2185
- private function get_absolute_path( $path, $module_type = false ) {
2186
- $module_root_dir = $this->get_module_root_dir_path( $module_type );
2187
- if ( 0 !== strpos( $path, $module_root_dir ) ) {
2188
- $path = fs_normalize_path( $module_root_dir . $path );
2189
- }
2190
-
2191
- return $path;
2192
- }
2193
-
2194
- /**
2195
- * @author Leo Fajardo (@leorw)
2196
- * @since 1.2.3
2197
- *
2198
- * @param string|bool $module_type
2199
- *
2200
- * @return string
2201
- */
2202
- private function get_module_root_dir_path( $module_type = false ) {
2203
- $is_plugin = empty( $module_type ) ?
2204
- $this->is_plugin() :
2205
- ( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
2206
-
2207
- return fs_normalize_path( trailingslashit( $is_plugin ?
2208
- WP_PLUGIN_DIR :
2209
- get_theme_root( get_stylesheet() ) ) );
2210
- }
2211
-
2212
- /**
2213
- * @author Leo Fajardo (@leorw)
2214
- *
2215
- * @param number $module_id
2216
- * @param string $slug
2217
- *
2218
- * @since 1.2.2
2219
- */
2220
- private function store_id_slug_type_path_map( $module_id, $slug ) {
2221
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2222
-
2223
- $store_option = false;
2224
-
2225
- if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
2226
- $id_slug_type_path_map[ $module_id ] = array(
2227
- 'slug' => $slug
2228
- );
2229
-
2230
- $store_option = true;
2231
- } else if (
2232
- isset( $id_slug_type_path_map[ $module_id ]['slug'] ) &&
2233
- $slug !== $id_slug_type_path_map[ $module_id ]['slug']
2234
- ) {
2235
- $id_slug_type_path_map[ $module_id ]['slug'] = $slug;
2236
- $store_option = true;
2237
- }
2238
-
2239
- if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
2240
- /**
2241
- * This verification is for cases when suddenly the same module
2242
- * is installed but with a different folder name.
2243
- *
2244
- * @author Vova Feldman (@svovaf)
2245
- * @since 1.2.3
2246
- */
2247
- ! file_exists( $this->get_absolute_path(
2248
- $id_slug_type_path_map[ $module_id ]['path'],
2249
- $id_slug_type_path_map[ $module_id ]['type']
2250
- ) )
2251
- ) {
2252
- $caller_main_file_and_type = $this->get_caller_main_file_and_type();
2253
-
2254
- $id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
2255
- $id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
2256
-
2257
- $store_option = true;
2258
- }
2259
-
2260
- if ( $store_option ) {
2261
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
2262
- }
2263
- }
2264
-
2265
- /**
2266
- * Identifies the caller type: plugin or theme.
2267
- *
2268
- * @author Leo Fajardo (@leorw)
2269
- * @since 1.2.2
2270
- *
2271
- * @author Vova Feldman (@svovaf)
2272
- * @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
2273
- * add-ons are relying on loading the SDK from the parent module, and also allows themes including the
2274
- * SDK an internal file instead of directly from functions.php.
2275
- * @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
2276
- */
2277
- private function get_caller_main_file_and_type() {
2278
- self::require_plugin_essentials();
2279
-
2280
- $all_plugins = fs_get_plugins( true );
2281
- $all_plugins_paths = array();
2282
-
2283
- // Get active plugin's main files real full names (might be symlinks).
2284
- foreach ( $all_plugins as $relative_path => $data ) {
2285
- if ( false === strpos( fs_normalize_path( $relative_path ), '/' ) ) {
2286
- /**
2287
- * Ignore plugins that don't have a folder (e.g. Hello Dolly) since they
2288
- * can't really include the SDK.
2289
- *
2290
- * @author Vova Feldman
2291
- * @since 1.2.1.7
2292
- */
2293
- continue;
2294
- }
2295
-
2296
- $all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
2297
- }
2298
-
2299
- $caller_file_candidate = false;
2300
- $caller_map = array();
2301
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2302
- $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
2303
- $plugin_dir_to_skip = false;
2304
-
2305
- for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
2306
- if ( empty( $bt[ $i ]['file'] ) ) {
2307
- continue;
2308
- }
2309
-
2310
- if ( $i > 1 && ! empty( $bt[ $i - 1 ]['file'] ) && $bt[ $i ]['file'] === $bt[ $i - 1 ]['file'] ) {
2311
- // If file same as the prev file in the stack, skip it.
2312
- continue;
2313
- }
2314
-
2315
- if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
2316
- 'do_action',
2317
- 'apply_filter',
2318
- // The string split is stupid, but otherwise, theme check
2319
- // throws info notices.
2320
- 'requir' . 'e_once',
2321
- 'requir' . 'e',
2322
- 'includ' . 'e_once',
2323
- 'includ' . 'e',
2324
- 'install_and_activate_plugin',
2325
- 'try_activate_plugin',
2326
- 'activate_plugin'
2327
- ) )
2328
- ) {
2329
- if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
2330
- /**
2331
- * Store the directory of the activator plugin so that any other file that starts with it
2332
- * cannot be mistakenly chosen as a candidate caller file.
2333
- *
2334
- * @author Leo Fajardo
2335
- *
2336
- * @since 2.3.0
2337
- */
2338
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2339
-
2340
- foreach ( $all_plugins_paths as $plugin_path ) {
2341
- $plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
2342
- if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
2343
- $plugin_dir_to_skip = $plugin_dir;
2344
-
2345
- break;
2346
- }
2347
- }
2348
- }
2349
-
2350
- // Ignore call stack hooks and files inclusion.
2351
- continue;
2352
- }
2353
-
2354
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2355
-
2356
- if ( ! empty( $plugin_dir_to_skip ) ) {
2357
- /**
2358
- * Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
2359
- *
2360
- * @author Leo Fajardo
2361
- *
2362
- * @since 2.3.0
2363
- */
2364
- if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
2365
- continue;
2366
- }
2367
- }
2368
-
2369
- if ( 'functions.php' === basename( $caller_file_path ) ) {
2370
- /**
2371
- * 1. Assumes that theme's starting execution file is functions.php.
2372
- * 2. This complex logic fixes symlink issues (e.g. with Vargant).
2373
- *
2374
- * @author Vova Feldman (@svovaf)
2375
- * @since 1.2.2.5
2376
- */
2377
-
2378
- if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
2379
- $module_type = WP_FS__MODULE_TYPE_THEME;
2380
-
2381
- /**
2382
- * Relative path of the theme, e.g.:
2383
- * `my-theme/functions.php`
2384
- *
2385
- * @author Leo Fajardo (@leorw)
2386
- */
2387
- $caller_file_candidate = basename( dirname( $caller_file_path ) ) .
2388
- '/' .
2389
- basename( $caller_file_path );
2390
-
2391
- continue;
2392
- }
2393
- }
2394
-
2395
- $caller_file_hash = md5( $caller_file_path );
2396
-
2397
- if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
2398
- foreach ( $all_plugins_paths as $plugin_path ) {
2399
- if ( empty( $plugin_path ) ) {
2400
- continue;
2401
- }
2402
-
2403
- if ( false !== strpos( $caller_file_path, fs_normalize_path( dirname( $plugin_path ) . '/' ) ) ) {
2404
- $caller_map[ $caller_file_hash ] = fs_normalize_path( $plugin_path );
2405
- break;
2406
- }
2407
- }
2408
- }
2409
-
2410
- if ( isset( $caller_map[ $caller_file_hash ] ) ) {
2411
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2412
- $caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
2413
- }
2414
- }
2415
-
2416
- return (object) array(
2417
- 'module_type' => $module_type,
2418
- 'path' => $caller_file_candidate
2419
- );
2420
- }
2421
-
2422
- #----------------------------------------------------------------------------------
2423
- #region Deactivation Feedback Form
2424
- #----------------------------------------------------------------------------------
2425
-
2426
- /**
2427
- * Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
2428
- * page.
2429
- *
2430
- * @author Vova Feldman (@svovaf)
2431
- * @author Leo Fajardo (@leorw)
2432
- *
2433
- * @since 1.1.2
2434
- */
2435
- function _add_deactivation_feedback_dialog_box() {
2436
- $subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
2437
- $this->_get_subscription_cancellation_dialog_box_template_params() :
2438
- array();
2439
-
2440
- /**
2441
- * @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
2442
- */
2443
- $show_deactivation_feedback_form = true;
2444
- if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
2445
- $show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
2446
- } else if ( $this->is_addon() ) {
2447
- /**
2448
- * If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
2449
- */
2450
- $show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
2451
- }
2452
-
2453
- $uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
2454
-
2455
- if (
2456
- empty( $subscription_cancellation_dialog_box_template_params ) &&
2457
- ! $show_deactivation_feedback_form &&
2458
- empty( $uninstall_confirmation_message )
2459
- ) {
2460
- return;
2461
- }
2462
-
2463
- $vars = array( 'id' => $this->_module_id );
2464
-
2465
- if ( $show_deactivation_feedback_form ) {
2466
- /* Check the type of user:
2467
- * 1. Long-term (long-term)
2468
- * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
2469
- * 3. Short-term (short-term)
2470
- */
2471
- $is_long_term_user = true;
2472
-
2473
- // Check if the site is at least 2 days old.
2474
- $time_installed = $this->_storage->install_timestamp;
2475
-
2476
- // Difference in seconds.
2477
- $date_diff = time() - $time_installed;
2478
-
2479
- // Convert seconds to days.
2480
- $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
2481
-
2482
- if ( $date_diff_days < 2 ) {
2483
- $is_long_term_user = false;
2484
- }
2485
-
2486
- $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
2487
-
2488
- if ( $is_long_term_user ) {
2489
- $user_type = 'long-term';
2490
- } else {
2491
- if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
2492
- $user_type = 'non-registered-and-non-anonymous-short-term';
2493
- } else {
2494
- $user_type = 'short-term';
2495
- }
2496
- }
2497
-
2498
- $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
2499
-
2500
- $vars['reasons'] = $uninstall_reasons;
2501
- }
2502
-
2503
- $vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
2504
- $vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
2505
- $vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
2506
-
2507
- /**
2508
- * Load the HTML template for the deactivation feedback dialog box.
2509
- *
2510
- * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
2511
- */
2512
- fs_require_template( 'forms/deactivation/form.php', $vars );
2513
- }
2514
-
2515
- /**
2516
- * @author Leo Fajardo (@leorw)
2517
- * @since 1.1.2
2518
- *
2519
- * @param string $user_type
2520
- *
2521
- * @return array The uninstall reasons for the specified user type.
2522
- */
2523
- function _get_uninstall_reasons( $user_type = 'long-term' ) {
2524
- $module_type = $this->_module_type;
2525
-
2526
- $internal_message_template_var = array(
2527
- 'id' => $this->_module_id
2528
- );
2529
-
2530
- $plan = $this->get_plan();
2531
-
2532
- if ( $this->is_registered() && is_object( $plan ) && $plan->has_technical_support() ) {
2533
- $contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
2534
- } else {
2535
- $contact_support_template = '';
2536
- }
2537
-
2538
- $reason_found_better_plugin = array(
2539
- 'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
2540
- 'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
2541
- 'input_type' => 'textfield',
2542
- 'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
2543
- );
2544
-
2545
- $reason_temporary_deactivation = array(
2546
- 'id' => self::REASON_TEMPORARY_DEACTIVATION,
2547
- 'text' => sprintf(
2548
- $this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
2549
- strtolower( $this->is_plugin() ?
2550
- $this->get_text_inline( 'Deactivation', 'deactivation' ) :
2551
- $this->get_text_inline( 'Theme Switch', 'theme-switch' )
2552
- )
2553
- ),
2554
- 'input_type' => '',
2555
- 'input_placeholder' => ''
2556
- );
2557
-
2558
- $reason_other = array(
2559
- 'id' => self::REASON_OTHER,
2560
- 'text' => $this->get_text_inline( 'Other', 'reason-other' ),
2561
- 'input_type' => 'textfield',
2562
- 'input_placeholder' => ''
2563
- );
2564
-
2565
- $long_term_user_reasons = array(
2566
- array(
2567
- 'id' => self::REASON_NO_LONGER_NEEDED,
2568
- 'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
2569
- 'input_type' => '',
2570
- 'input_placeholder' => ''
2571
- ),
2572
- $reason_found_better_plugin,
2573
- array(
2574
- 'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
2575
- 'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
2576
- 'input_type' => '',
2577
- 'input_placeholder' => ''
2578
- ),
2579
- array(
2580
- 'id' => self::REASON_BROKE_MY_SITE,
2581
- 'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
2582
- 'input_type' => '',
2583
- 'input_placeholder' => '',
2584
- 'internal_message' => $contact_support_template
2585
- ),
2586
- array(
2587
- 'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
2588
- 'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
2589
- 'input_type' => '',
2590
- 'input_placeholder' => '',
2591
- 'internal_message' => $contact_support_template
2592
- )
2593
- );
2594
-
2595
- if ( $this->is_paying() ) {
2596
- $long_term_user_reasons[] = array(
2597
- 'id' => self::REASON_CANT_PAY_ANYMORE,
2598
- 'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
2599
- 'input_type' => 'textfield',
2600
- 'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
2601
- );
2602
- }
2603
-
2604
- $reason_dont_share_info = array(
2605
- 'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
2606
- 'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
2607
- 'input_type' => '',
2608
- 'input_placeholder' => ''
2609
- );
2610
-
2611
- /**
2612
- * If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
2613
- * user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
2614
- * (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
2615
- * enabled and the user's account is currently not in pending activation state (similar to the way the Skip
2616
- * button in the opt-in form is shown/hidden).
2617
- */
2618
- if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
2619
- $reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
2620
- }
2621
-
2622
- $uninstall_reasons = array(
2623
- 'long-term' => $long_term_user_reasons,
2624
- 'non-registered-and-non-anonymous-short-term' => array(
2625
- array(
2626
- 'id' => self::REASON_DIDNT_WORK,
2627
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
2628
- 'input_type' => '',
2629
- 'input_placeholder' => ''
2630
- ),
2631
- $reason_dont_share_info,
2632
- $reason_found_better_plugin
2633
- ),
2634
- 'short-term' => array(
2635
- array(
2636
- 'id' => self::REASON_COULDNT_MAKE_IT_WORK,
2637
- 'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
2638
- 'input_type' => '',
2639
- 'input_placeholder' => '',
2640
- 'internal_message' => $contact_support_template
2641
- ),
2642
- $reason_found_better_plugin,
2643
- array(
2644
- 'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
2645
- 'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
2646
- 'input_type' => 'textarea',
2647
- 'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
2648
- ),
2649
- array(
2650
- 'id' => self::REASON_NOT_WORKING,
2651
- 'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
2652
- 'input_type' => 'textarea',
2653
- 'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
2654
- ),
2655
- array(
2656
- 'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
2657
- 'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
2658
- 'input_type' => 'textarea',
2659
- 'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
2660
- ),
2661
- array(
2662
- 'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
2663
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
2664
- 'input_type' => 'textarea',
2665
- 'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
2666
- )
2667
- )
2668
- );
2669
-
2670
- // Randomize the reasons for the current user type.
2671
- shuffle( $uninstall_reasons[ $user_type ] );
2672
-
2673
- // Keep the following reasons as the last items in the list.
2674
- $uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
2675
- $uninstall_reasons[ $user_type ][] = $reason_other;
2676
-
2677
- $uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
2678
-
2679
- return $uninstall_reasons[ $user_type ];
2680
- }
2681
-
2682
- /**
2683
- * Called after the user has submitted his reason for deactivating the plugin.
2684
- *
2685
- * @author Leo Fajardo (@leorw)
2686
- * @since 1.1.2
2687
- */
2688
- function _submit_uninstall_reason_action() {
2689
- $this->_logger->entrance();
2690
-
2691
- $this->check_ajax_referer( 'submit_uninstall_reason' );
2692
-
2693
- $reason_id = fs_request_get( 'reason_id' );
2694
-
2695
- // Check if the given reason ID is an unsigned integer.
2696
- if ( ! ctype_digit( $reason_id ) ) {
2697
- exit;
2698
- }
2699
-
2700
- $reason_info = trim( fs_request_get( 'reason_info', '' ) );
2701
- if ( ! empty( $reason_info ) ) {
2702
- $reason_info = substr( $reason_info, 0, 128 );
2703
- }
2704
-
2705
- $reason = (object) array(
2706
- 'id' => $reason_id,
2707
- 'info' => $reason_info,
2708
- 'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
2709
- );
2710
-
2711
- $this->_storage->store( 'uninstall_reason', $reason );
2712
-
2713
- /**
2714
- * If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
2715
- * not support uninstall hook.
2716
- *
2717
- * @author Leo Fajardo (@leorw)
2718
- * @since 1.2.2
2719
- */
2720
- if ( $this->is_theme() ) {
2721
- if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
2722
- FS_Plugin_Updater::instance( $this )->delete_update_data();
2723
- }
2724
-
2725
- $this->_uninstall_plugin_event( false );
2726
- $this->remove_sdk_reference();
2727
- }
2728
-
2729
- // Print '1' for successful operation.
2730
- echo 1;
2731
- exit;
2732
- }
2733
-
2734
- /**
2735
- * @author Leo Fajardo (@leorw)
2736
- * @since 2.1.4
2737
- */
2738
- function cancel_subscription_or_trial_ajax_action() {
2739
- $this->_logger->entrance();
2740
-
2741
- $this->check_ajax_referer( 'cancel_subscription_or_trial' );
2742
-
2743
- $result = $this->cancel_subscription_or_trial( fs_request_get( 'plugin_id', $this->get_id() ), false );
2744
-
2745
- if ( $this->is_api_error( $result ) ) {
2746
- $this->shoot_ajax_failure( $result->error->message );
2747
- }
2748
-
2749
- $this->shoot_ajax_success();
2750
- }
2751
-
2752
- /**
2753
- * @author Leo Fajardo (@leorw)
2754
- * @since 2.1.4
2755
- *
2756
- * @param number $plugin_id
2757
- *
2758
- * @return object
2759
- */
2760
- private function cancel_subscription_or_trial( $plugin_id ) {
2761
- $fs = null;
2762
- if ( $plugin_id == $this->get_id() ) {
2763
- $fs = $this;
2764
- } else if ( $this->is_addon_activated( $plugin_id ) ) {
2765
- $fs = self::get_instance_by_id( $plugin_id );
2766
- }
2767
-
2768
- $result = null;
2769
-
2770
- if ( ! is_null( $fs ) ) {
2771
- $result = $fs->is_paid_trial() ?
2772
- $fs->_cancel_trial() :
2773
- $fs->_downgrade_site();
2774
- }
2775
-
2776
- return $result;
2777
- }
2778
-
2779
- /**
2780
- * @author Leo Fajardo (@leorw)
2781
- * @since 2.0.2
2782
- */
2783
- function _delete_theme_update_data_action() {
2784
- FS_Plugin_Updater::instance( $this )->delete_update_data();
2785
- }
2786
-
2787
- #endregion
2788
-
2789
- #----------------------------------------------------------------------------------
2790
- #region Instance
2791
- #----------------------------------------------------------------------------------
2792
-
2793
- /**
2794
- * Main singleton instance.
2795
- *
2796
- * @author Vova Feldman (@svovaf)
2797
- * @since 1.0.0
2798
- *
2799
- * @param number $module_id
2800
- * @param string|bool $slug
2801
- * @param bool $is_init Is initiation sequence.
2802
- *
2803
- * @return Freemius|false
2804
- */
2805
- static function instance( $module_id, $slug = false, $is_init = false ) {
2806
- if ( empty( $module_id ) ) {
2807
- return false;
2808
- }
2809
-
2810
- /**
2811
- * Load the essential static data prior to initiating FS_Plugin_Manager since there's an essential MS network migration logic that needs to be executed prior to the initiation.
2812
- */
2813
- self::_load_required_static();
2814
-
2815
- if ( ! is_numeric( $module_id ) ) {
2816
- if ( ! $is_init && true === $slug ) {
2817
- $is_init = true;
2818
- }
2819
-
2820
- $slug = $module_id;
2821
-
2822
- $module = FS_Plugin_Manager::instance( $slug )->get();
2823
-
2824
- if ( is_object( $module ) ) {
2825
- $module_id = $module->id;
2826
- }
2827
- }
2828
-
2829
- $key = 'm_' . $module_id;
2830
-
2831
- if ( ! isset( self::$_instances[ $key ] ) ) {
2832
- self::$_instances[ $key ] = new Freemius( $module_id, $slug, $is_init );
2833
- }
2834
-
2835
- return self::$_instances[ $key ];
2836
- }
2837
-
2838
- /**
2839
- * @author Vova Feldman (@svovaf)
2840
- * @since 1.0.6
2841
- *
2842
- * @param number $addon_id
2843
- *
2844
- * @return bool
2845
- */
2846
- private static function has_instance( $addon_id ) {
2847
- return isset( self::$_instances[ 'm_' . $addon_id ] );
2848
- }
2849
-
2850
- /**
2851
- * @author Leo Fajardo (@leorw)
2852
- * @since 1.2.2
2853
- *
2854
- * @param string|number $id_or_slug
2855
- * @param string $module_type
2856
- *
2857
- * @return number|false
2858
- */
2859
- private static function get_module_id( $id_or_slug, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
2860
- if ( is_numeric( $id_or_slug ) ) {
2861
- return $id_or_slug;
2862
- }
2863
-
2864
- foreach ( self::$_instances as $instance ) {
2865
- // Also check the module type since there can be a plugin and a theme with the same slug.
2866
- if ( ( $module_type === $instance->get_module_type() ) && ( $id_or_slug === $instance->get_slug() ) ) {
2867
- return $instance->get_id();
2868
- }
2869
- }
2870
-
2871
- return false;
2872
- }
2873
-
2874
- /**
2875
- * @author Vova Feldman (@svovaf)
2876
- * @since 1.0.6
2877
- *
2878
- * @param number $id
2879
- *
2880
- * @return false|Freemius
2881
- */
2882
- static function get_instance_by_id( $id ) {
2883
- return isset ( self::$_instances[ 'm_' . $id ] ) ?
2884
- self::$_instances[ 'm_' . $id ] :
2885
- false;
2886
- }
2887
-
2888
- /**
2889
- *
2890
- * @author Vova Feldman (@svovaf)
2891
- * @since 1.0.1
2892
- *
2893
- * @param string $plugin_file
2894
- * @param string $module_type
2895
- *
2896
- * @return false|Freemius
2897
- */
2898
- static function get_instance_by_file( $plugin_file, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
2899
- $slug = self::find_slug_by_basename( $plugin_file );
2900
-
2901
- return ( false !== $slug ) ?
2902
- self::instance( self::get_module_id( $slug, $module_type ) ) :
2903
- false;
2904
- }
2905
-
2906
- /**
2907
- * @author Vova Feldman (@svovaf)
2908
- * @since 1.0.6
2909
- *
2910
- * @return false|Freemius
2911
- */
2912
- function get_parent_instance() {
2913
- return self::get_instance_by_id( $this->_plugin->parent_plugin_id );
2914
- }
2915
-
2916
- /**
2917
- * @author Vova Feldman (@svovaf)
2918
- * @since 1.0.6
2919
- *
2920
- * @param string|number $id_or_slug
2921
- *
2922
- * @return false|Freemius
2923
- */
2924
- function get_addon_instance( $id_or_slug ) {
2925
- $addon_id = self::get_module_id( $id_or_slug );
2926
-
2927
- return self::instance( $addon_id );
2928
- }
2929
-
2930
- #endregion ------------------------------------------------------------------
2931
-
2932
- /**
2933
- * @author Vova Feldman (@svovaf)
2934
- * @since 1.0.6
2935
- *
2936
- * @return bool
2937
- */
2938
- function is_parent_plugin_installed() {
2939
- $is_active = self::has_instance( $this->_plugin->parent_plugin_id );
2940
-
2941
- if ( $is_active ) {
2942
- return true;
2943
- }
2944
-
2945
- /**
2946
- * Parent module might be a theme. If that's the case, the add-on's FS
2947
- * instance will be loaded prior to the theme's FS instance, therefore,
2948
- * we need to check if it's active with a "look ahead".
2949
- *
2950
- * @author Vova Feldman
2951
- * @since 1.2.2.3
2952
- */
2953
- global $fs_active_plugins;
2954
- if ( is_object( $fs_active_plugins ) && is_array( $fs_active_plugins->plugins ) ) {
2955
- $active_theme = wp_get_theme();
2956
-
2957
- foreach ( $fs_active_plugins->plugins as $sdk => $module ) {
2958
- if ( WP_FS__MODULE_TYPE_THEME === $module->type ) {
2959
- if ( $module->plugin_path == $active_theme->get_stylesheet() ) {
2960
- // Parent module is a theme and it's currently active.
2961
- return true;
2962
- }
2963
- }
2964
- }
2965
- }
2966
-
2967
- return false;
2968
- }
2969
-
2970
- /**
2971
- * Check if add-on parent plugin in activation mode.
2972
- *
2973
- * @author Vova Feldman (@svovaf)
2974
- * @since 1.0.7
2975
- *
2976
- * @return bool
2977
- */
2978
- function is_parent_in_activation() {
2979
- $parent_fs = $this->get_parent_instance();
2980
- if ( ! is_object( $parent_fs ) ) {
2981
- return false;
2982
- }
2983
-
2984
- return ( $parent_fs->is_activation_mode() );
2985
- }
2986
-
2987
- /**
2988
- * Is plugin in activation mode.
2989
- *
2990
- * @author Vova Feldman (@svovaf)
2991
- * @since 1.0.7
2992
- *
2993
- * @param bool $and_on
2994
- *
2995
- * @return bool
2996
- */
2997
- function is_activation_mode( $and_on = true ) {
2998
- return fs_is_network_admin() ?
2999
- $this->is_network_activation_mode( $and_on ) :
3000
- $this->is_site_activation_mode( $and_on );
3001
- }
3002
-
3003
- /**
3004
- * Is plugin in activation mode.
3005
- *
3006
- * @author Vova Feldman (@svovaf)
3007
- * @since 1.0.7
3008
- *
3009
- * @param bool $and_on
3010
- *
3011
- * @return bool
3012
- */
3013
- function is_site_activation_mode( $and_on = true ) {
3014
- return (
3015
- ( $this->is_on() || ! $and_on ) &&
3016
- (
3017
- ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
3018
- (
3019
- ( ! $this->is_registered() ||
3020
- ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
3021
- ( ! $this->is_enable_anonymous() ||
3022
- ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
3023
- )
3024
- )
3025
- );
3026
- }
3027
-
3028
- /**
3029
- * Checks if the SDK in network activation mode.
3030
- *
3031
- * @author Leo Fajardo (@leorw)
3032
- * @since 2.0.0
3033
- *
3034
- * @param bool $and_on
3035
- *
3036
- * @return bool
3037
- */
3038
- private function is_network_activation_mode( $and_on = true ) {
3039
- if ( ! $this->_is_network_active ) {
3040
- // Not network activated.
3041
- return false;
3042
- }
3043
-
3044
- if ( $this->is_network_upgrade_mode() ) {
3045
- // Special flag to enforce network activation mode to decide what to do with the sites that are not yet opted-in nor skipped.
3046
- return true;
3047
- }
3048
-
3049
- if ( ! $this->is_site_activation_mode( $and_on ) ) {
3050
- // Whether the context is single site or the network, if the plugin is no longer in activation mode then it is not in network activation mode as well.
3051
- return false;
3052
- }
3053
-
3054
- if ( $this->is_network_delegated_connection() ) {
3055
- // Super-admin delegated the connection to the site admins -> not activation mode.
3056
- return false;
3057
- }
3058
-
3059
- if ( $this->is_network_anonymous() && true !== $this->_storage->require_license_activation ) {
3060
- // Super-admin skipped the connection network wide -> not activation mode.
3061
- return false;
3062
- }
3063
-
3064
- if ( $this->is_network_registered() ) {
3065
- // Super-admin connected at least one site -> not activation mode.
3066
- return false;
3067
- }
3068
-
3069
- return true;
3070
- }
3071
-
3072
- /**
3073
- * Check if current page is the opt-in/pending-activation page.
3074
- *
3075
- * @author Vova Feldman (@svovaf)
3076
- * @since 1.2.1.7
3077
- *
3078
- * @return bool
3079
- */
3080
- function is_activation_page() {
3081
- if ( $this->_menu->is_activation_page( $this->show_opt_in_on_themes_page() ) ) {
3082
- return true;
3083
- }
3084
-
3085
- if ( ! $this->is_activation_mode() ) {
3086
- return false;
3087
- }
3088
-
3089
- // Check if current page is matching the activation page.
3090
- return $this->is_matching_url( $this->get_activation_url() );
3091
- }
3092
-
3093
- /**
3094
- * Check if URL path's are matching and that all querystring
3095
- * arguments of the $sub_url exist in the $url with the same values.
3096
- *
3097
- * WARNING:
3098
- * 1. This method doesn't check if the sub/domain are matching.
3099
- * 2. Ignore case sensitivity.
3100
- *
3101
- * @author Vova Feldman (@svovaf)
3102
- * @since 1.2.1.7
3103
- *
3104
- * @param string $sub_url
3105
- * @param string $url If argument is not set, check if the sub_url matching the current's page URL.
3106
- *
3107
- * @return bool
3108
- */
3109
- private function is_matching_url( $sub_url, $url = '' ) {
3110
- if ( empty( $url ) ) {
3111
- $url = $_SERVER['REQUEST_URI'];
3112
- }
3113
-
3114
- $url = strtolower( $url );
3115
- $sub_url = strtolower( $sub_url );
3116
-
3117
- if ( parse_url( $sub_url, PHP_URL_PATH ) !== parse_url( $url, PHP_URL_PATH ) ) {
3118
- // Different path - DO NOT OVERRIDE PAGE.
3119
- return false;
3120
- }
3121
-
3122
- $url_params = array();
3123
- parse_str( parse_url( $url, PHP_URL_QUERY ), $url_params );
3124
-
3125
- $sub_url_params = array();
3126
- parse_str( parse_url( $sub_url, PHP_URL_QUERY ), $sub_url_params );
3127
-
3128
- foreach ( $sub_url_params as $key => $val ) {
3129
- if ( ! isset( $url_params[ $key ] ) || $val != $url_params[ $key ] ) {
3130
- // Not matching query string - DO NOT OVERRIDE PAGE.
3131
- return false;
3132
- }
3133
- }
3134
-
3135
- return true;
3136
- }
3137
-
3138
- /**
3139
- * Get the basenames of all active plugins for specific blog. Including network activated plugins.
3140
- *
3141
- * @author Vova Feldman (@svovaf)
3142
- * @since 2.0.0
3143
- *
3144
- * @param int $blog_id
3145
- *
3146
- * @return string[]
3147
- */
3148
- private static function get_active_plugins_basenames( $blog_id = 0 ) {
3149
- if ( is_multisite() && $blog_id > 0 ) {
3150
- $active_basenames = get_blog_option( $blog_id, 'active_plugins' );
3151
- } else {
3152
- $active_basenames = get_option( 'active_plugins' );
3153
- }
3154
-
3155
- if ( ! is_array( $active_basenames ) ) {
3156
- $active_basenames = array();
3157
- }
3158
-
3159
- if ( is_multisite() ) {
3160
- $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
3161
-
3162
- if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
3163
- $active_basenames = array_merge( $active_basenames, array_keys( $network_active_basenames ) );
3164
- }
3165
- }
3166
-
3167
- return $active_basenames;
3168
- }
3169
-
3170
- /**
3171
- * @author Leo Fajardo (@leorw)
3172
- * @since 2.3.0
3173
- *
3174
- * @param int $blog_id
3175
- *
3176
- * @return array
3177
- */
3178
- static function get_active_plugins_directories_map( $blog_id = 0 ) {
3179
- $active_basenames = self::get_active_plugins_basenames( $blog_id );
3180
-
3181
- $map = array();
3182
-
3183
- foreach ( $active_basenames as $active_basename ) {
3184
- $active_basename = fs_normalize_path( $active_basename );
3185
-
3186
- if ( false === strpos( $active_basename, '/' ) ) {
3187
- continue;
3188
- }
3189
-
3190
- $map[ dirname( $active_basename ) ] = true;
3191
- }
3192
-
3193
- return $map;
3194
- }
3195
-
3196
- /**
3197
- * Get collection of all active plugins. Including network activated plugins.
3198
- *
3199
- * @author Vova Feldman (@svovaf)
3200
- * @since 1.0.9
3201
- *
3202
- * @param int $blog_id Since 2.0.0
3203
- *
3204
- * @return array[string]array
3205
- */
3206
- private static function get_active_plugins( $blog_id = 0 ) {
3207
- self::require_plugin_essentials();
3208
-
3209
- $active_plugin = array();
3210
- $all_plugins = fs_get_plugins();
3211
- $active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
3212
-
3213
- foreach ( $active_plugins_basenames as $plugin_basename ) {
3214
- $active_plugin[ $plugin_basename ] = $all_plugins[ $plugin_basename ];
3215
- }
3216
-
3217
- return $active_plugin;
3218
- }
3219
-
3220
- /**
3221
- * Get collection of all site active plugins for a specified blog.
3222
- *
3223
- * @author Vova Feldman (@svovaf)
3224
- * @since 2.0.0
3225
- *
3226
- * @param int $blog_id
3227
- *
3228
- * @return array[string]array
3229
- */
3230
- private static function get_site_active_plugins( $blog_id = 0 ) {
3231
- $active_basenames = ( is_multisite() && $blog_id > 0 ) ?
3232
- get_blog_option( $blog_id, 'active_plugins' ) :
3233
- get_option( 'active_plugins' );
3234
-
3235
- $active = array();
3236
-
3237
- if ( ! is_array( $active_basenames ) ) {
3238
- return $active;
3239
- }
3240
-
3241
- foreach ( $active_basenames as $basename ) {
3242
- $active[ $basename ] = array(
3243
- 'is_active' => true,
3244
- 'Version' => '1.0', // Dummy version.
3245
- 'slug' => self::get_plugin_slug( $basename ),
3246
- );
3247
- }
3248
-
3249
- return $active;
3250
- }
3251
-
3252
- /**
3253
- * Get collection of all plugins with their activation status for a specified blog.
3254
- *
3255
- * @author Vova Feldman (@svovaf)
3256
- * @since 1.1.8
3257
- *
3258
- * @param int $blog_id Since 2.0.0
3259
- *
3260
- * @return array Key is the plugin file path and the value is an array of the plugin data.
3261
- */
3262
- private static function get_all_plugins( $blog_id = 0 ) {
3263
- self::require_plugin_essentials();
3264
-
3265
- $all_plugins = fs_get_plugins();
3266
-
3267
- $active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
3268
-
3269
- foreach ( $all_plugins as $basename => &$data ) {
3270
- // By default set to inactive (next foreach update the active plugins).
3271
- $data['is_active'] = false;
3272
- // Enrich with plugin slug.
3273
- $data['slug'] = self::get_plugin_slug( $basename );
3274
- }
3275
-
3276
- // Flag active plugins.
3277
- foreach ( $active_plugins_basenames as $basename ) {
3278
- if ( isset( $all_plugins[ $basename ] ) ) {
3279
- $all_plugins[ $basename ]['is_active'] = true;
3280
- }
3281
- }
3282
-
3283
- return $all_plugins;
3284
- }
3285
-
3286
- /**
3287
- * Get collection of all plugins and if they are network level activated.
3288
- *
3289
- * @author Vova Feldman (@svovaf)
3290
- * @since 2.0.0
3291
- *
3292
- * @return array Key is the plugin basename and the value is an array of the plugin data.
3293
- */
3294
- private static function get_network_plugins() {
3295
- self::require_plugin_essentials();
3296
-
3297
- $all_plugins = fs_get_plugins();
3298
-
3299
- $network_active_basenames = is_multisite() ?
3300
- get_site_option( 'active_sitewide_plugins' ) :
3301
- array();
3302
-
3303
- foreach ( $all_plugins as $basename => &$data ) {
3304
- // By default set to inactive (next foreach update the active plugins).
3305
- $data['is_active'] = false;
3306
- // Enrich with plugin slug.
3307
- $data['slug'] = self::get_plugin_slug( $basename );
3308
- }
3309
-
3310
- // Flag active plugins.
3311
- foreach ( $network_active_basenames as $basename ) {
3312
- if ( isset( $all_plugins[ $basename ] ) ) {
3313
- $all_plugins[ $basename ]['is_active'] = true;
3314
- }
3315
- }
3316
-
3317
- return $all_plugins;
3318
- }
3319
-
3320
- /**
3321
- * Cached result of get_site_transient( 'update_plugins' )
3322
- *
3323
- * @author Vova Feldman (@svovaf)
3324
- * @since 1.1.8
3325
- *
3326
- * @var object
3327
- */
3328
- private static $_plugins_info;
3329
-
3330
- /**
3331
- * Helper function to get specified plugin's slug.
3332
- *
3333
- * @author Vova Feldman (@svovaf)
3334
- * @since 1.1.8
3335
- *
3336
- * @param $basename
3337
- *
3338
- * @return string
3339
- */
3340
- private static function get_plugin_slug( $basename ) {
3341
- if ( ! isset( self::$_plugins_info ) ) {
3342
- self::$_plugins_info = get_site_transient( 'update_plugins' );
3343
- }
3344
-
3345
- $slug = '';
3346
-
3347
- if ( is_object( self::$_plugins_info ) ) {
3348
- if ( isset( self::$_plugins_info->no_update ) &&
3349
- isset( self::$_plugins_info->no_update[ $basename ] ) &&
3350
- ! empty( self::$_plugins_info->no_update[ $basename ]->slug )
3351
- ) {
3352
- $slug = self::$_plugins_info->no_update[ $basename ]->slug;
3353
- } else if ( isset( self::$_plugins_info->response ) &&
3354
- isset( self::$_plugins_info->response[ $basename ] ) &&
3355
- ! empty( self::$_plugins_info->response[ $basename ]->slug )
3356
- ) {
3357
- $slug = self::$_plugins_info->response[ $basename ]->slug;
3358
- }
3359
- }
3360
-
3361
- if ( empty( $slug ) ) {
3362
- // Try to find slug from FS data.
3363
- $slug = self::find_slug_by_basename( $basename );
3364
- }
3365
-
3366
- if ( empty( $slug ) ) {
3367
- // Fallback to plugin's folder name.
3368
- $slug = dirname( $basename );
3369
- }
3370
-
3371
- return $slug;
3372
- }
3373
-
3374
- private static $_statics_loaded = false;
3375
-
3376
- /**
3377
- * Load static resources.
3378
- *
3379
- * @author Vova Feldman (@svovaf)
3380
- * @since 1.0.1
3381
- */
3382
- private static function _load_required_static() {
3383
- if ( self::$_statics_loaded ) {
3384
- return;
3385
- }
3386
-
3387
- self::$_static_logger = FS_Logger::get_logger( WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
3388
-
3389
- self::$_static_logger->entrance();
3390
-
3391
- self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
3392
-
3393
- if ( is_multisite() ) {
3394
- $has_skipped_migration = (
3395
- // 'id_slug_type_path_map' - was never stored on older versions, therefore, not exists on the site level.
3396
- null === self::$_accounts->get_option( 'id_slug_type_path_map', null, false ) &&
3397
- // 'file_slug_map' stored on the site level, so it was running an SDK version before it was integrated with MS-network.
3398
- null !== self::$_accounts->get_option( 'file_slug_map', null, false )
3399
- );
3400
-
3401
- /**
3402
- * If the file_slug_map exists on the site level but doesn't exist on the
3403
- * network level storage, it means that we need to process the storage with migration.
3404
- *
3405
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, file_slug_map will be already set in the network level storage.
3406
- *
3407
- * @author Vova Feldman (@svovaf)
3408
- * @since 2.0.0
3409
- */
3410
- if (
3411
- ( $has_skipped_migration && true !== self::$_accounts->get_option( 'ms_migration_complete', false, true ) ) ||
3412
- ( null === self::$_accounts->get_option( 'file_slug_map', null, true ) &&
3413
- null !== self::$_accounts->get_option( 'file_slug_map', null, false ) )
3414
- ) {
3415
- self::migrate_options_to_network();
3416
- }
3417
- }
3418
-
3419
- self::$_global_admin_notices = FS_Admin_Notices::instance( 'global' );
3420
-
3421
- if ( ! WP_FS__DEMO_MODE ) {
3422
- add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array(
3423
- 'Freemius',
3424
- '_add_debug_section'
3425
- ) );
3426
- }
3427
-
3428
- add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
3429
-
3430
- self::add_ajax_action_static( 'get_debug_log', array( 'Freemius', '_get_debug_log' ) );
3431
-
3432
- self::add_ajax_action_static( 'get_db_option', array( 'Freemius', '_get_db_option' ) );
3433
-
3434
- self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
3435
-
3436
- if ( 0 == did_action( 'plugins_loaded' ) ) {
3437
- add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
3438
- }
3439
-
3440
- add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
3441
- add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
3442
-
3443
- if ( self::is_plugins_page() || self::is_themes_page() ) {
3444
- add_action( 'admin_print_footer_scripts', array( 'Freemius', '_maybe_add_beta_label_styles' ), 9 );
3445
-
3446
- /**
3447
- * Specifically use this hook so that the JS event handlers will work properly on the "Themes"
3448
- * page.
3449
- *
3450
- * @author Leo Fajardo (@leorw)
3451
- * @since 2.3.0
3452
- */
3453
- add_action( 'admin_footer-' . self::get_current_page(), array( 'Freemius', '_maybe_add_beta_label_to_plugins_and_handle_confirmation') );
3454
- }
3455
-
3456
- self::$_statics_loaded = true;
3457
- }
3458
-
3459
- /**
3460
- * @author Leo Fajardo (@leorw)
3461
- *
3462
- * @since 2.1.3
3463
- */
3464
- private static function migrate_options_to_network() {
3465
- self::migrate_accounts_to_network();
3466
-
3467
- // Migrate API options from site level to network level.
3468
- $api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
3469
- $api_network_options->migrate_to_network();
3470
-
3471
- // Migrate API cache to network level storage.
3472
- FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
3473
-
3474
- self::$_accounts->set_option( 'ms_migration_complete', true, true );
3475
- }
3476
-
3477
- #----------------------------------------------------------------------------------
3478
- #region Localization
3479
- #----------------------------------------------------------------------------------
3480
-
3481
- /**
3482
- * Load framework's text domain.
3483
- *
3484
- * @author Vova Feldman (@svovaf)
3485
- * @since 1.2.1
3486
- */
3487
- static function _load_textdomain() {
3488
- if ( ! is_admin() ) {
3489
- return;
3490
- }
3491
-
3492
- global $fs_active_plugins;
3493
-
3494
- // Works both for plugins and themes.
3495
- load_plugin_textdomain(
3496
- 'freemius',
3497
- false,
3498
- $fs_active_plugins->newest->sdk_path . '/languages/'
3499
- );
3500
- }
3501
-
3502
- #endregion
3503
-
3504
- #----------------------------------------------------------------------------------
3505
- #region Debugging
3506
- #----------------------------------------------------------------------------------
3507
-
3508
- /**
3509
- * @author Vova Feldman (@svovaf)
3510
- * @since 1.0.8
3511
- */
3512
- static function _add_debug_section() {
3513
- if ( ! is_super_admin() ) {
3514
- // Add debug page only for super-admins.
3515
- return;
3516
- }
3517
-
3518
- self::$_static_logger->entrance();
3519
-
3520
- $title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION );
3521
-
3522
- if ( WP_FS__DEV_MODE ) {
3523
- // Add top-level debug menu item.
3524
- $hook = FS_Admin_Menu_Manager::add_page(
3525
- $title,
3526
- $title,
3527
- 'manage_options',
3528
- 'freemius',
3529
- array( 'Freemius', '_debug_page_render' )
3530
- );
3531
- } else {
3532
- // Add hidden debug page.
3533
- $hook = FS_Admin_Menu_Manager::add_subpage(
3534
- null,
3535
- $title,
3536
- $title,
3537
- 'manage_options',
3538
- 'freemius',
3539
- array( 'Freemius', '_debug_page_render' )
3540
- );
3541
- }
3542
-
3543
- if ( ! empty( $hook ) ) {
3544
- add_action( "load-$hook", array( 'Freemius', '_debug_page_actions' ) );
3545
- }
3546
- }
3547
-
3548
- /**
3549
- * @author Vova Feldman (@svovaf)
3550
- * @since 1.1.7.3
3551
- */
3552
- static function _toggle_debug_mode() {
3553
- if ( ! is_super_admin() ) {
3554
- return;
3555
- }
3556
-
3557
- $is_on = fs_request_get( 'is_on', false, 'post' );
3558
-
3559
- if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
3560
- update_option( 'fs_debug_mode', $is_on );
3561
-
3562
- // Turn on/off storage logging.
3563
- FS_Logger::_set_storage_logging( ( 1 == $is_on ) );
3564
- }
3565
-
3566
- exit;
3567
- }
3568
-
3569
- /**
3570
- * @author Vova Feldman (@svovaf)
3571
- * @since 1.2.1.6
3572
- */
3573
- static function _get_debug_log() {
3574
- $logs = FS_Logger::load_db_logs(
3575
- fs_request_get( 'filters', false, 'post' ),
3576
- ! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
3577
- ! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
3578
- );
3579
-
3580
- self::shoot_ajax_success( $logs );
3581
- }
3582
-
3583
- /**
3584
- * @author Vova Feldman (@svovaf)
3585
- * @since 1.2.1.7
3586
- */
3587
- static function _get_db_option() {
3588
- check_admin_referer( 'fs_get_db_option' );
3589
-
3590
- $option_name = fs_request_get( 'option_name' );
3591
-
3592
- if ( ! is_super_admin() ||
3593
- ! fs_starts_with( $option_name, 'fs_' )
3594
- ) {
3595
- self::shoot_ajax_failure();
3596
- }
3597
-
3598
- $value = get_option( $option_name );
3599
-
3600
- $result = array(
3601
- 'name' => $option_name,
3602
- );
3603
-
3604
- if ( false !== $value ) {
3605
- if ( ! is_string( $value ) ) {
3606
- $value = json_encode( $value );
3607
- }
3608
-
3609
- $result['value'] = $value;
3610
- }
3611
-
3612
- self::shoot_ajax_success( $result );
3613
- }
3614
-
3615
- /**
3616
- * @author Vova Feldman (@svovaf)
3617
- * @since 1.2.1.7
3618
- */
3619
- static function _set_db_option() {
3620
- check_admin_referer( 'fs_set_db_option' );
3621
-
3622
- $option_name = fs_request_get( 'option_name' );
3623
-
3624
- if ( ! is_super_admin() ||
3625
- ! fs_starts_with( $option_name, 'fs_' )
3626
- ) {
3627
- self::shoot_ajax_failure();
3628
- }
3629
-
3630
- $option_value = fs_request_get( 'option_value' );
3631
-
3632
- if ( ! empty( $option_value ) ) {
3633
- update_option( $option_name, $option_value );
3634
- }
3635
-
3636
- self::shoot_ajax_success();
3637
- }
3638
-
3639
- /**
3640
- * @author Vova Feldman (@svovaf)
3641
- * @since 1.0.8
3642
- */
3643
- static function _debug_page_actions() {
3644
- self::_clean_admin_content_section();
3645
-
3646
- if ( fs_request_is_action( 'restart_freemius' ) ) {
3647
- check_admin_referer( 'restart_freemius' );
3648
-
3649
- if ( ! is_multisite() ) {
3650
- // Clear accounts data.
3651
- self::$_accounts->clear( null, true );
3652
- } else {
3653
- $sites = self::get_sites();
3654
- foreach ( $sites as $site ) {
3655
- $blog_id = self::get_site_blog_id( $site );
3656
- self::$_accounts->clear( $blog_id, true );
3657
- }
3658
-
3659
- // Clear network level storage.
3660
- self::$_accounts->clear( true, true );
3661
- }
3662
-
3663
- // Clear SDK reference cache.
3664
- delete_option( 'fs_active_plugins' );
3665
- } else if ( fs_request_is_action( 'clear_updates_data' ) ) {
3666
- check_admin_referer( 'clear_updates_data' );
3667
-
3668
- if ( ! is_multisite() ) {
3669
- set_site_transient( 'update_plugins', null );
3670
- set_site_transient( 'update_themes', null );
3671
- } else {
3672
- $current_blog_id = get_current_blog_id();
3673
-
3674
- $sites = self::get_sites();
3675
- foreach ( $sites as $site ) {
3676
- switch_to_blog( self::get_site_blog_id( $site ) );
3677
-
3678
- set_site_transient( 'update_plugins', null );
3679
- set_site_transient( 'update_themes', null );
3680
- }
3681
-
3682
- switch_to_blog( $current_blog_id );
3683
- }
3684
- } else if ( fs_request_is_action( 'simulate_trial' ) ) {
3685
- check_admin_referer( 'simulate_trial' );
3686
-
3687
- $fs = freemius( fs_request_get( 'module_id' ) );
3688
-
3689
- // Update SDK install to at least 24 hours before.
3690
- $fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
3691
- // Unset the trial shown timestamp.
3692
- unset( $fs->_storage->trial_promotion_shown );
3693
- } else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) {
3694
- check_admin_referer( 'simulate_network_upgrade' );
3695
-
3696
- $fs = freemius( fs_request_get( 'module_id' ) );
3697
-
3698
- self::set_network_upgrade_mode( $fs->_storage );
3699
- } else if ( fs_request_is_action( 'delete_install' ) ) {
3700
- check_admin_referer( 'delete_install' );
3701
-
3702
- self::_delete_site_by_slug(
3703
- fs_request_get( 'slug' ),
3704
- fs_request_get( 'module_type' ),
3705
- true,
3706
- fs_request_get( 'blog_id', null )
3707
- );
3708
- } else if ( fs_request_is_action( 'delete_user' ) ) {
3709
- check_admin_referer( 'delete_user' );
3710
-
3711
- self::delete_user( fs_request_get( 'user_id' ) );
3712
- } else if ( fs_request_is_action( 'download_logs' ) ) {
3713
- check_admin_referer( 'download_logs' );
3714
-
3715
- $download_url = FS_Logger::download_db_logs(
3716
- fs_request_get( 'filters', false, 'post' )
3717
- );
3718
-
3719
- if ( false === $download_url ) {
3720
- wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' );
3721
- }
3722
-
3723
- fs_redirect( $download_url );
3724
- } else if ( fs_request_is_action( 'migrate_options_to_network' ) ) {
3725
- check_admin_referer( 'migrate_options_to_network' );
3726
-
3727
- self::migrate_options_to_network();
3728
- }
3729
- }
3730
-
3731
- /**
3732
- * @author Vova Feldman (@svovaf)
3733
- * @since 1.0.8
3734
- */
3735
- static function _debug_page_render() {
3736
- self::$_static_logger->entrance();
3737
-
3738
- if ( ! is_multisite() ) {
3739
- $all_plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
3740
- $all_themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME );
3741
- } else {
3742
- $sites = self::get_sites();
3743
-
3744
- $all_plugins_installs = array();
3745
- $all_themes_installs = array();
3746
-
3747
- foreach ( $sites as $site ) {
3748
- $blog_id = self::get_site_blog_id( $site );
3749
-
3750
- $plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
3751
-
3752
- foreach ( $plugins_installs as $slug => $install ) {
3753
- if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
3754
- $all_plugins_installs[ $slug ] = array();
3755
- }
3756
-
3757
- $install->blog_id = $blog_id;
3758
-
3759
- $all_plugins_installs[ $slug ][] = $install;
3760
- }
3761
-
3762
- $themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME, $blog_id );
3763
-
3764
- foreach ( $themes_installs as $slug => $install ) {
3765
- if ( ! isset( $all_themes_installs[ $slug ] ) ) {
3766
- $all_themes_installs[ $slug ] = array();
3767
- }
3768
-
3769
- $install->blog_id = $blog_id;
3770
-
3771
- $all_themes_installs[ $slug ][] = $install;
3772
- }
3773
- }
3774
- }
3775
-
3776
- $licenses_by_module_type = self::get_all_licenses_by_module_type();
3777
-
3778
- $vars = array(
3779
- 'plugin_sites' => $all_plugins_installs,
3780
- 'theme_sites' => $all_themes_installs,
3781
- 'users' => self::get_all_users(),
3782
- 'addons' => self::get_all_addons(),
3783
- 'account_addons' => self::get_all_account_addons(),
3784
- 'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ],
3785
- 'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ]
3786
- );
3787
-
3788
- fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
3789
- fs_require_once_template( 'debug.php', $vars );
3790
- }
3791
-
3792
- #endregion
3793
-
3794
- #----------------------------------------------------------------------------------
3795
- #region Connectivity Issues
3796
- #----------------------------------------------------------------------------------
3797
-
3798
- /**
3799
- * Check if Freemius should be turned on for the current plugin install.
3800
- *
3801
- * Note:
3802
- * $this->_is_on is updated in has_api_connectivity()
3803
- *
3804
- * @author Vova Feldman (@svovaf)
3805
- * @since 1.0.9
3806
- *
3807
- * @return bool
3808
- */
3809
- function is_on() {
3810
- self::$_static_logger->entrance();
3811
-
3812
- if ( isset( $this->_is_on ) ) {
3813
- return $this->_is_on;
3814
- }
3815
-
3816
- // If already installed or pending then sure it's on :)
3817
- if ( $this->is_registered() || $this->is_pending_activation() ) {
3818
- $this->_is_on = true;
3819
-
3820
- return true;
3821
- }
3822
-
3823
- return false;
3824
- }
3825
-
3826
- /**
3827
- * @author Vova Feldman (@svovaf)
3828
- * @since 1.1.7.3
3829
- *
3830
- * @param bool $flush_if_no_connectivity
3831
- *
3832
- * @return bool
3833
- */
3834
- private function should_run_connectivity_test( $flush_if_no_connectivity = false ) {
3835
- if ( ! isset( $this->_storage->connectivity_test ) ) {
3836
- // Connectivity test was never executed, or cache was cleared.
3837
- return true;
3838
- }
3839
-
3840
- if ( WP_FS__PING_API_ON_IP_OR_HOST_CHANGES ) {
3841
- if ( WP_FS__IS_HTTP_REQUEST ) {
3842
- if ( $_SERVER['HTTP_HOST'] != $this->_storage->connectivity_test['host'] ) {
3843
- // Domain changed.
3844
- return true;
3845
- }
3846
-
3847
- if ( WP_FS__REMOTE_ADDR != $this->_storage->connectivity_test['server_ip'] ) {
3848
- // Server IP changed.
3849
- return true;
3850
- }
3851
- }
3852
- }
3853
-
3854
- if ( $this->_storage->connectivity_test['is_connected'] &&
3855
- $this->_storage->connectivity_test['is_active']
3856
- ) {
3857
- // API connected and Freemius is active - no need to run connectivity check.
3858
- return false;
3859
- }
3860
-
3861
- if ( $flush_if_no_connectivity ) {
3862
- /**
3863
- * If explicitly asked to flush when no connectivity - do it only
3864
- * if at least 10 sec passed from the last API connectivity test.
3865
- */
3866
- return ( isset( $this->_storage->connectivity_test['timestamp'] ) &&
3867
- ( WP_FS__SCRIPT_START_TIME - $this->_storage->connectivity_test['timestamp'] ) > 10 );
3868
- }
3869
-
3870
- /**
3871
- * @since 1.1.7 Don't check for connectivity on plugin downgrade.
3872
- */
3873
- $version = $this->get_plugin_version();
3874
- if ( version_compare( $version, $this->_storage->connectivity_test['version'], '>' ) ) {
3875
- // If it's a plugin version upgrade and Freemius is off or no connectivity, run connectivity test.
3876
- return true;
3877
- }
3878
-
3879
- return false;
3880
- }
3881
-
3882
- /**
3883
- * @author Vova Feldman (@svovaf)
3884
- * @since 1.1.7.4
3885
- *
3886
- * @param int|null $blog_id Since 2.0.0.
3887
- * @param bool $is_gdpr_test Since 2.0.2. Perform only the GDPR test.
3888
- *
3889
- * @return object|false
3890
- */
3891
- private function ping( $blog_id = null, $is_gdpr_test = false ) {
3892
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
3893
- return false;
3894
- }
3895
-
3896
- $version = $this->get_plugin_version();
3897
-
3898
- $is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
3899
-
3900
- return $this->get_api_plugin_scope()->ping(
3901
- $this->get_anonymous_id( $blog_id ),
3902
- array(
3903
- 'is_update' => json_encode( $is_update ),
3904
- 'version' => $version,
3905
- 'sdk' => $this->version,
3906
- 'is_admin' => json_encode( is_admin() ),
3907
- 'is_ajax' => json_encode( self::is_ajax() ),
3908
- 'is_cron' => json_encode( self::is_cron() ),
3909
- 'is_gdpr_test' => $is_gdpr_test,
3910
- 'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
3911
- )
3912
- );
3913
- }
3914
-
3915
- /**
3916
- * Check if there's any connectivity issue to Freemius API.
3917
- *
3918
- * @author Vova Feldman (@svovaf)
3919
- * @since 1.0.9
3920
- *
3921
- * @param bool $flush_if_no_connectivity
3922
- *
3923
- * @return bool
3924
- */
3925
- function has_api_connectivity( $flush_if_no_connectivity = false ) {
3926
- $this->_logger->entrance();
3927
-
3928
- if ( isset( $this->_has_api_connection ) && ( $this->_has_api_connection || ! $flush_if_no_connectivity ) ) {
3929
- return $this->_has_api_connection;
3930
- }
3931
-
3932
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY &&
3933
- isset( $this->_storage->connectivity_test ) &&
3934
- true === $this->_storage->connectivity_test['is_connected']
3935
- ) {
3936
- unset( $this->_storage->connectivity_test );
3937
- }
3938
-
3939
- if ( ! $this->should_run_connectivity_test( $flush_if_no_connectivity ) ) {
3940
- $this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
3941
- /**
3942
- * @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
3943
- *
3944
- * @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation.
3945
- */
3946
- $this->_is_on = $this->_storage->connectivity_test['is_active'] ||
3947
- $this->is_premium() ||
3948
- ( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
3949
-
3950
- return $this->_has_api_connection;
3951
- }
3952
-
3953
- $pong = $this->ping();
3954
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
3955
-
3956
- if ( ! $is_connected ) {
3957
- // API failure.
3958
- $this->_add_connectivity_issue_message( $pong );
3959
- }
3960
-
3961
- if ( $is_connected ) {
3962
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
3963
- }
3964
-
3965
- $this->store_connectivity_info( $pong, $is_connected );
3966
-
3967
- return $this->_has_api_connection;
3968
- }
3969
-
3970
- /**
3971
- * @author Vova Feldman (@svovaf)
3972
- * @since 1.1.7.4
3973
- *
3974
- * @param object $pong
3975
- * @param bool $is_connected
3976
- */
3977
- private function store_connectivity_info( $pong, $is_connected ) {
3978
- $this->_logger->entrance();
3979
-
3980
- $version = $this->get_plugin_version();
3981
-
3982
- if ( ! $is_connected || WP_FS__SIMULATE_FREEMIUS_OFF ) {
3983
- $is_active = false;
3984
- } else {
3985
- $is_active = ( isset( $pong->is_active ) && true == $pong->is_active );
3986
- }
3987
-
3988
- $is_active = $this->apply_filters(
3989
- 'is_on',
3990
- $is_active,
3991
- $this->is_plugin_update(),
3992
- $version
3993
- );
3994
-
3995
- $this->_storage->connectivity_test = array(
3996
- 'is_connected' => $is_connected,
3997
- 'host' => $_SERVER['HTTP_HOST'],
3998
- 'server_ip' => WP_FS__REMOTE_ADDR,
3999
- 'is_active' => $is_active,
4000
- 'timestamp' => WP_FS__SCRIPT_START_TIME,
4001
- // Last version with connectivity attempt.
4002
- 'version' => $version,
4003
- );
4004
-
4005
- $this->_has_api_connection = $is_connected;
4006
- $this->_is_on = $is_active || ( WP_FS__DEV_MODE && $is_connected && ! WP_FS__SIMULATE_FREEMIUS_OFF );
4007
- }
4008
-
4009
- /**
4010
- * Force turning Freemius on.
4011
- *
4012
- * @author Vova Feldman (@svovaf)
4013
- * @since 1.1.8.1
4014
- *
4015
- * @return bool TRUE if successfully turned on.
4016
- */
4017
- private function turn_on() {
4018
- $this->_logger->entrance();
4019
-
4020
- if ( $this->is_on() || ! isset( $this->_storage->connectivity_test['is_active'] ) ) {
4021
- return false;
4022
- }
4023
-
4024
- $updated_connectivity = $this->_storage->connectivity_test;
4025
- $updated_connectivity['is_active'] = true;
4026
- $updated_connectivity['timestamp'] = WP_FS__SCRIPT_START_TIME;
4027
- $this->_storage->connectivity_test = $updated_connectivity;
4028
-
4029
- $this->_is_on = true;
4030
-
4031
- return true;
4032
- }
4033
-
4034
- /**
4035
- * Anonymous and unique site identifier (Hash).
4036
- *
4037
- * @author Vova Feldman (@svovaf)
4038
- * @since 1.1.0
4039
- *
4040
- * @param null|int $blog_id Since 2.0.0
4041
- *
4042
- * @return string
4043
- */
4044
- function get_anonymous_id( $blog_id = null ) {
4045
- $unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
4046
-
4047
- if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4048
- $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4049
-
4050
- $secure_auth = SECURE_AUTH_KEY;
4051
- if ( empty( $secure_auth ) ||
4052
- false !== strpos( $secure_auth, ' ' ) ||
4053
- 'put your unique phrase here' === $secure_auth
4054
- ) {
4055
- // Protect against default auth key.
4056
- $secure_auth = md5( microtime() );
4057
- }
4058
-
4059
- /**
4060
- * Base the unique identifier on the WP secure authentication key. Which
4061
- * turns the key into a secret anonymous identifier. This will help us
4062
- * to avoid duplicate installs generation on the backend upon opt-in.
4063
- *
4064
- * @author Vova Feldman (@svovaf)
4065
- * @since 1.2.3
4066
- */
4067
- $unique_id = md5( $key . $secure_auth );
4068
-
4069
- self::$_accounts->set_option( 'unique_id', $unique_id, true, $blog_id );
4070
- }
4071
-
4072
- $this->_logger->departure( $unique_id );
4073
-
4074
- return $unique_id;
4075
- }
4076
-
4077
- /**
4078
- * @author Vova Feldman (@svovaf)
4079
- * @since 1.1.7.4
4080
- *
4081
- * @return \WP_User
4082
- */
4083
- static function _get_current_wp_user() {
4084
- self::require_pluggable_essentials();
4085
- self::wp_cookie_constants();
4086
-
4087
- return wp_get_current_user();
4088
- }
4089
-
4090
- /**
4091
- * Define cookie constants which are required by Freemius::_get_current_wp_user() since
4092
- * it uses wp_get_current_user() which needs the cookie constants set. When a plugin
4093
- * is network activated the cookie constants are only configured after the network
4094
- * plugins activation, therefore, if we don't define those constants WP will throw
4095
- * PHP warnings/notices.
4096
- *
4097
- * @author Vova Feldman (@svovaf)
4098
- * @since 2.1.1
4099
- */
4100
- private static function wp_cookie_constants() {
4101
- if ( defined( 'LOGGED_IN_COOKIE' ) &&
4102
- ( defined( 'AUTH_COOKIE' ) || defined( 'SECURE_AUTH_COOKIE' ) )
4103
- ) {
4104
- return;
4105
- }
4106
-
4107
- /**
4108
- * Used to guarantee unique hash cookies
4109
- *
4110
- * @since 1.5.0
4111
- */
4112
- if ( ! defined( 'COOKIEHASH' ) ) {
4113
- $siteurl = get_site_option( 'siteurl' );
4114
- if ( $siteurl ) {
4115
- define( 'COOKIEHASH', md5( $siteurl ) );
4116
- } else {
4117
- define( 'COOKIEHASH', '' );
4118
- }
4119
- }
4120
-
4121
- if ( ! defined( 'LOGGED_IN_COOKIE' ) ) {
4122
- define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );
4123
- }
4124
-
4125
- /**
4126
- * @since 2.5.0
4127
- */
4128
- if ( ! defined( 'AUTH_COOKIE' ) ) {
4129
- define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );
4130
- }
4131
-
4132
- /**
4133
- * @since 2.6.0
4134
- */
4135
- if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) {
4136
- define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );
4137
- }
4138
- }
4139
-
4140
- /**
4141
- * @author Vova Feldman (@svovaf)
4142
- * @since 2.1.0
4143
- *
4144
- * @return int
4145
- */
4146
- static function get_current_wp_user_id() {
4147
- $wp_user = self::_get_current_wp_user();
4148
-
4149
- return $wp_user->ID;
4150
- }
4151
-
4152
- /**
4153
- * @author Vova Feldman (@svovaf)
4154
- * @since 1.2.1.7
4155
- *
4156
- * @param string $email
4157
- *
4158
- * @return bool
4159
- */
4160
- static function is_valid_email( $email ) {
4161
- if ( false === filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
4162
- return false;
4163
- }
4164
-
4165
- $parts = explode( '@', $email );
4166
-
4167
- if ( 2 !== count( $parts ) || empty( $parts[1] ) ) {
4168
- return false;
4169
- }
4170
-
4171
- $blacklist = array(
4172
- 'admin.',
4173
- 'webmaster.',
4174
- 'localhost.',
4175
- 'dev.',
4176
- 'development.',
4177
- 'test.',
4178
- 'stage.',
4179
- 'staging.',
4180
- );
4181
-
4182
- // Make sure domain is not one of the blacklisted.
4183
- foreach ( $blacklist as $invalid ) {
4184
- if ( 0 === strpos( $parts[1], $invalid ) ) {
4185
- return false;
4186
- }
4187
- }
4188
-
4189
- // Get the UTF encoded domain name.
4190
- $domain = idn_to_ascii( $parts[1] ) . '.';
4191
-
4192
- return ( checkdnsrr( $domain, 'MX' ) || checkdnsrr( $domain, 'A' ) );
4193
- }
4194
-
4195
- /**
4196
- * Generate API connectivity issue message.
4197
- *
4198
- * @author Vova Feldman (@svovaf)
4199
- * @since 1.0.9
4200
- *
4201
- * @param mixed $api_result
4202
- * @param bool $is_first_failure
4203
- */
4204
- function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
4205
- if ( ! $this->is_premium() && $this->_enable_anonymous ) {
4206
- // Don't add message if it's the free version and can run anonymously.
4207
- return;
4208
- }
4209
-
4210
- if ( ! function_exists( 'wp_nonce_url' ) ) {
4211
- require_once ABSPATH . 'wp-includes/functions.php';
4212
- }
4213
-
4214
- $current_user = self::_get_current_wp_user();
4215
- // $admin_email = get_option( 'admin_email' );
4216
- $admin_email = $current_user->user_email;
4217
-
4218
- // Aliases.
4219
- $deactivate_plugin_title = $this->esc_html_inline( 'That\'s exhausting, please deactivate', 'deactivate-plugin-title' );
4220
- $deactivate_plugin_desc = $this->esc_html_inline( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'deactivate-plugin-desc' );
4221
- $install_previous_title = $this->esc_html_inline( 'Let\'s try your previous version', 'install-previous-title' );
4222
- $install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
4223
- $fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
4224
- $fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
4225
- /* translators: %s: product title (e.g. "Awesome Plugin" requires an access to...) */
4226
- $x_requires_access_to_api = $this->esc_html_inline( '%s requires an access to our API.', 'x-requires-access-to-api' );
4227
- $sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
4228
- $happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
4229
-
4230
- $message = false;
4231
- if ( is_object( $api_result ) &&
4232
- isset( $api_result->error ) &&
4233
- isset( $api_result->error->code )
4234
- ) {
4235
- switch ( $api_result->error->code ) {
4236
- case 'curl_missing':
4237
- $missing_methods = '';
4238
- if ( is_array( $api_result->missing_methods ) &&
4239
- ! empty( $api_result->missing_methods )
4240
- ) {
4241
- foreach ( $api_result->missing_methods as $m ) {
4242
- if ( 'curl_version' === $m ) {
4243
- continue;
4244
- }
4245
-
4246
- if ( ! empty( $missing_methods ) ) {
4247
- $missing_methods .= ', ';
4248
- }
4249
-
4250
- $missing_methods .= sprintf( '<code>%s</code>', $m );
4251
- }
4252
-
4253
- if ( ! empty( $missing_methods ) ) {
4254
- $missing_methods = sprintf(
4255
- '<br><br><b>%s</b> %s',
4256
- $this->esc_html_inline( 'Disabled method(s):', 'curl-disabled-methods' ),
4257
- $missing_methods
4258
- );
4259
- }
4260
- }
4261
-
4262
- $message = sprintf(
4263
- $x_requires_access_to_api . ' ' .
4264
- $this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) . ' ' .
4265
- $missing_methods .
4266
- ' %s',
4267
- '<b>' . $this->get_plugin_name() . '</b>',
4268
- sprintf(
4269
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4270
- sprintf(
4271
- '<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
4272
- $this->get_text_inline( 'I don\'t know what is cURL or how to install it, help me!', 'curl-missing-no-clue-title' ),
4273
- ' - ' . sprintf(
4274
- $this->get_text_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'curl-missing-no-clue-desc' ),
4275
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4276
- )
4277
- ),
4278
- sprintf(
4279
- '<b>%s</b> - %s',
4280
- $sysadmin_title,
4281
- esc_html( sprintf( $this->get_text_inline( 'Great, please install cURL and enable it in your php.ini file. In addition, search for the \'disable_functions\' directive in your php.ini file and remove any disabled methods starting with \'curl_\'. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the %s and reactivate it back again.', 'curl-missing-sysadmin-desc' ), $this->get_module_label( true ) ) )
4282
- ),
4283
- sprintf(
4284
- '<a href="%s"><b>%s</b></a> - %s',
4285
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4286
- $deactivate_plugin_title,
4287
- $deactivate_plugin_desc
4288
- )
4289
- )
4290
- );
4291
- break;
4292
- case 'cloudflare_ddos_protection':
4293
- $message = sprintf(
4294
- $x_requires_access_to_api . ' ' .
4295
- $this->esc_html_inline( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'cloudflare-blocks-connection-message' ) . ' ' .
4296
- $happy_to_resolve_issue_asap .
4297
- ' %s',
4298
- '<b>' . $this->get_plugin_name() . '</b>',
4299
- sprintf(
4300
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4301
- sprintf(
4302
- '<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
4303
- $fix_issue_title,
4304
- ' - ' . sprintf(
4305
- $fix_issue_desc,
4306
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4307
- )
4308
- ),
4309
- sprintf(
4310
- '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4311
- sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4312
- $install_previous_title,
4313
- $install_previous_desc
4314
- ),
4315
- sprintf(
4316
- '<a href="%s"><b>%s</b></a> - %s',
4317
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=' . '', 'deactivate-plugin_' . $this->_plugin_basename ),
4318
- $deactivate_plugin_title,
4319
- $deactivate_plugin_desc
4320
- )
4321
- )
4322
- );
4323
- break;
4324
- case 'squid_cache_block':
4325
- $message = sprintf(
4326
- $x_requires_access_to_api . ' ' .
4327
- $this->esc_html_inline( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'squid-blocks-connection-message' ) .
4328
- ' %s',
4329
- '<b>' . $this->get_plugin_name() . '</b>',
4330
- sprintf(
4331
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4332
- sprintf(
4333
- '<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a> - %s',
4334
- $this->esc_html_inline( 'I don\'t know what is Squid or ACL, help me!', 'squid-no-clue-title' ),
4335
- sprintf(
4336
- $this->esc_html_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'squid-no-clue-desc' ),
4337
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4338
- )
4339
- ),
4340
- sprintf(
4341
- '<b>%s</b> - %s',
4342
- $sysadmin_title,
4343
- sprintf(
4344
- $this->esc_html_inline( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.', 'squid-sysadmin-desc' ),
4345
- // We use a filter since the plugin might require additional API connectivity.
4346
- '<b>' . implode( ', ', $this->apply_filters( 'api_domains', array(
4347
- 'api.freemius.com',
4348
- 'wp.freemius.com'
4349
- ) ) ) . '</b>',
4350
- $this->_module_type
4351
- )
4352
- ),
4353
- sprintf(
4354
- '<a href="%s"><b>%s</b></a> - %s',
4355
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4356
- $deactivate_plugin_title,
4357
- $deactivate_plugin_desc
4358
- )
4359
- )
4360
- );
4361
- break;
4362
- // default:
4363
- // $message = $this->get_text_inline( 'connectivity-test-fails-message' );
4364
- // break;
4365
- }
4366
- }
4367
-
4368
- $message_id = 'failed_connect_api';
4369
- $type = 'error';
4370
-
4371
- $connectivity_test_fails_message = $this->esc_html_inline( 'From unknown reason, the API connectivity test failed.', 'connectivity-test-fails-message' );
4372
-
4373
- if ( false === $message ) {
4374
- if ( $is_first_failure ) {
4375
- // First attempt failed.
4376
- $message = sprintf(
4377
- $x_requires_access_to_api . ' ' .
4378
- $connectivity_test_fails_message . ' ' .
4379
- $this->esc_html_inline( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'connectivity-test-maybe-temporary' ) . '<br><br>' .
4380
- '%s',
4381
- '<b>' . $this->get_plugin_name() . '</b>',
4382
- sprintf(
4383
- '<div id="fs_firewall_issue_options">%s %s</div>',
4384
- sprintf(
4385
- '<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
4386
- $this->get_text_inline( 'Yes - do your thing', 'yes-do-your-thing' )
4387
- ),
4388
- sprintf(
4389
- '<a href="%s" class="button">%s</a>',
4390
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4391
- $this->get_text_inline( 'No - just deactivate', 'no-deactivate' )
4392
- )
4393
- )
4394
- );
4395
-
4396
- $message_id = 'failed_connect_api_first';
4397
- $type = 'promotion';
4398
- } else {
4399
- // Second connectivity attempt failed.
4400
- $message = sprintf(
4401
- $x_requires_access_to_api . ' ' .
4402
- $connectivity_test_fails_message . ' ' .
4403
- $happy_to_resolve_issue_asap .
4404
- ' %s',
4405
- '<b>' . $this->get_plugin_name() . '</b>',
4406
- sprintf(
4407
- '<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
4408
- sprintf(
4409
- '<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
4410
- $fix_issue_title,
4411
- ' - ' . sprintf(
4412
- $fix_issue_desc,
4413
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4414
- )
4415
- ),
4416
- sprintf(
4417
- '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4418
- sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4419
- $install_previous_title,
4420
- $install_previous_desc
4421
- ),
4422
- sprintf(
4423
- '<a href="%s"><b>%s</b></a> - %s',
4424
- wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $this->_plugin_basename . '&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_' . $this->_plugin_basename ),
4425
- $deactivate_plugin_title,
4426
- $deactivate_plugin_desc
4427
- )
4428
- )
4429
- );
4430
- }
4431
- }
4432
-
4433
- $this->_admin_notices->add_sticky(
4434
- $message,
4435
- $message_id,
4436
- $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
4437
- $type
4438
- );
4439
- }
4440
-
4441
- /**
4442
- * Handle user request to resolve connectivity issue.
4443
- * This method will send an email to Freemius API technical staff for resolution.
4444
- * The email will contain server's info and installed plugins (might be caching issue).
4445
- *
4446
- * @author Vova Feldman (@svovaf)
4447
- * @since 1.0.9
4448
- */
4449
- function _email_about_firewall_issue() {
4450
- $this->_admin_notices->remove_sticky( 'failed_connect_api' );
4451
-
4452
- $pong = $this->ping();
4453
-
4454
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
4455
-
4456
- if ( $is_connected ) {
4457
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
4458
-
4459
- $this->store_connectivity_info( $pong, $is_connected );
4460
-
4461
- echo $this->get_after_plugin_activation_redirect_url();
4462
- exit;
4463
- }
4464
-
4465
- $current_user = self::_get_current_wp_user();
4466
- $admin_email = $current_user->user_email;
4467
-
4468
- $error_type = fs_request_get( 'error_type', 'general' );
4469
-
4470
- switch ( $error_type ) {
4471
- case 'squid':
4472
- $title = 'Squid ACL Blocking Issue';
4473
- break;
4474
- case 'cloudflare':
4475
- $title = 'CloudFlare Blocking Issue';
4476
- break;
4477
- default:
4478
- $title = 'API Connectivity Issue';
4479
- break;
4480
- }
4481
-
4482
- $custom_email_sections = array();
4483
-
4484
- // Add 'API Error' custom email section.
4485
- $custom_email_sections['api_error'] = array(
4486
- 'title' => 'API Error',
4487
- 'rows' => array(
4488
- 'ping' => array(
4489
- 'API Error',
4490
- is_string( $pong ) ? htmlentities( $pong ) : json_encode( $pong )
4491
- ),
4492
- )
4493
- );
4494
-
4495
- // Send email with technical details to resolve API connectivity issues.
4496
- $this->send_email(
4497
- 'api@freemius.com', // recipient
4498
- $title . ' [' . $this->get_plugin_name() . ']', // subject
4499
- $custom_email_sections,
4500
- array( "Reply-To: $admin_email <$admin_email>" ) // headers
4501
- );
4502
-
4503
- $this->_admin_notices->add_sticky(
4504
- sprintf(
4505
- $this->get_text_inline( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', 'fix-request-sent-message' ),
4506
- '<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
4507
- ),
4508
- 'server_details_sent'
4509
- );
4510
-
4511
- // Action was taken, tell that API connectivity troubleshooting should be off now.
4512
-
4513
- echo "1";
4514
- exit;
4515
- }
4516
-
4517
- /**
4518
- * Handle connectivity test retry approved by the user.
4519
- *
4520
- * @author Vova Feldman (@svovaf)
4521
- * @since 1.1.7.4
4522
- */
4523
- function _retry_connectivity_test() {
4524
- $this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
4525
-
4526
- $pong = $this->ping();
4527
-
4528
- $is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
4529
-
4530
- if ( $is_connected ) {
4531
- FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
4532
-
4533
- $this->store_connectivity_info( $pong, $is_connected );
4534
-
4535
- echo $this->get_after_plugin_activation_redirect_url();
4536
- } else {
4537
- // Add connectivity issue message after 2nd failed attempt.
4538
- $this->_add_connectivity_issue_message( $pong, false );
4539
-
4540
- echo "1";
4541
- }
4542
-
4543
- exit;
4544
- }
4545
-
4546
- static function _add_firewall_issues_javascript() {
4547
- $params = array();
4548
- fs_require_once_template( 'firewall-issues-js.php', $params );
4549
- }
4550
-
4551
- #endregion
4552
-
4553
- #----------------------------------------------------------------------------------
4554
- #region Email
4555
- #----------------------------------------------------------------------------------
4556
-
4557
- /**
4558
- * Generates and sends an HTML email with customizable sections.
4559
- *
4560
- * @author Leo Fajardo (@leorw)
4561
- * @since 1.1.2
4562
- *
4563
- * @param string $to_address
4564
- * @param string $subject
4565
- * @param array $sections
4566
- * @param array $headers
4567
- *
4568
- * @return bool Whether the email contents were sent successfully.
4569
- */
4570
- private function send_email(
4571
- $to_address,
4572
- $subject,
4573
- $sections = array(),
4574
- $headers = array()
4575
- ) {
4576
- $default_sections = $this->get_email_sections();
4577
-
4578
- // Insert new sections or replace the default email sections.
4579
- if ( is_array( $sections ) && ! empty( $sections ) ) {
4580
- foreach ( $sections as $section_id => $custom_section ) {
4581
- if ( ! isset( $default_sections[ $section_id ] ) ) {
4582
- // If the section does not exist, add it.
4583
- $default_sections[ $section_id ] = $custom_section;
4584
- } else {
4585
- // If the section already exists, override it.
4586
- $current_section = $default_sections[ $section_id ];
4587
-
4588
- // Replace the current section's title if a custom section title exists.
4589
- if ( isset( $custom_section['title'] ) ) {
4590
- $current_section['title'] = $custom_section['title'];
4591
- }
4592
-
4593
- // Insert new rows under the current section or replace the default rows.
4594
- if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
4595
- foreach ( $custom_section['rows'] as $row_id => $row ) {
4596
- $current_section['rows'][ $row_id ] = $row;
4597
- }
4598
- }
4599
-
4600
- $default_sections[ $section_id ] = $current_section;
4601
- }
4602
- }
4603
- }
4604
-
4605
- $vars = array( 'sections' => $default_sections );
4606
- $message = fs_get_template( 'email.php', $vars );
4607
-
4608
- // Set the type of email to HTML.
4609
- $headers[] = 'Content-type: text/html; charset=UTF-8';
4610
-
4611
- $header_string = implode( "\r\n", $headers );
4612
-
4613
- return wp_mail(
4614
- $to_address,
4615
- $subject,
4616
- $message,
4617
- $header_string
4618
- );
4619
- }
4620
-
4621
- /**
4622
- * Generates the data for the sections of the email content.
4623
- *
4624
- * @author Leo Fajardo (@leorw)
4625
- * @since 1.1.2
4626
- *
4627
- * @return array
4628
- */
4629
- private function get_email_sections() {
4630
- // Retrieve the current user's information so that we can get the user's email, first name, and last name below.
4631
- $current_user = self::_get_current_wp_user();
4632
-
4633
- // Retrieve the cURL version information so that we can get the version number below.
4634
- $curl_version_information = curl_version();
4635
-
4636
- $active_plugin = self::get_active_plugins();
4637
-
4638
- // Generate the list of active plugins separated by new line.
4639
- $active_plugin_string = '';
4640
- foreach ( $active_plugin as $plugin ) {
4641
- $active_plugin_string .= sprintf(
4642
- '<a href="%s">%s</a> [v%s]<br>',
4643
- $plugin['PluginURI'],
4644
- $plugin['Name'],
4645
- $plugin['Version']
4646
- );
4647
- }
4648
-
4649
- $server_ip = WP_FS__REMOTE_ADDR;
4650
-
4651
- // Add PHP info for deeper investigation.
4652
- ob_start();
4653
- phpinfo();
4654
- $php_info = ob_get_clean();
4655
-
4656
- $api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
4657
-
4658
- // Generate the default email sections.
4659
- $sections = array(
4660
- 'sdk' => array(
4661
- 'title' => 'SDK',
4662
- 'rows' => array(
4663
- 'fs_version' => array( 'FS Version', $this->version ),
4664
- 'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
4665
- )
4666
- ),
4667
- 'plugin' => array(
4668
- 'title' => ucfirst( $this->get_module_type() ),
4669
- 'rows' => array(
4670
- 'name' => array( 'Name', $this->get_plugin_name() ),
4671
- 'version' => array( 'Version', $this->get_plugin_version() )
4672
- )
4673
- ),
4674
- 'api' => array(
4675
- 'title' => 'API Subdomain',
4676
- 'rows' => array(
4677
- 'dns' => array(
4678
- 'DNS_CNAME',
4679
- function_exists( 'dns_get_record' ) ?
4680
- var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
4681
- 'dns_get_record() disabled/blocked'
4682
- ),
4683
- 'ip' => array(
4684
- 'IP',
4685
- function_exists( 'gethostbyname' ) ?
4686
- gethostbyname( $api_domain ) :
4687
- 'gethostbyname() disabled/blocked'
4688
- ),
4689
- ),
4690
- ),
4691
- 'site' => array(
4692
- 'title' => 'Site',
4693
- 'rows' => array(
4694
- 'unique_id' => array( 'Unique ID', $this->get_anonymous_id() ),
4695
- 'address' => array( 'Address', site_url() ),
4696
- 'host' => array(
4697
- 'HTTP_HOST',
4698
- ( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
4699
- ),
4700
- 'hosting' => array(
4701
- 'Hosting Company' => fs_request_has( 'hosting_company' ) ?
4702
- fs_request_get( 'hosting_company' ) :
4703
- 'Unknown',
4704
- ),
4705
- 'server_addr' => array(
4706
- 'SERVER_ADDR',
4707
- '<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
4708
- )
4709
- )
4710
- ),
4711
- 'user' => array(
4712
- 'title' => 'User',
4713
- 'rows' => array(
4714
- 'email' => array( 'Email', $current_user->user_email ),
4715
- 'first' => array( 'First', $current_user->user_firstname ),
4716
- 'last' => array( 'Last', $current_user->user_lastname )
4717
- )
4718
- ),
4719
- 'plugins' => array(
4720
- 'title' => 'Plugins',
4721
- 'rows' => array(
4722
- 'active_plugins' => array( 'Active Plugins', $active_plugin_string )
4723
- )
4724
- ),
4725
- 'php_info' => array(
4726
- 'title' => 'PHP Info',
4727
- 'rows' => array(
4728
- 'info' => array( $php_info )
4729
- ),
4730
- )
4731
- );
4732
-
4733
- // Allow the sections to be modified by other code.
4734
- $sections = $this->apply_filters( 'email_template_sections', $sections );
4735
-
4736
- return $sections;
4737
- }
4738
-
4739
- #endregion
4740
-
4741
- #----------------------------------------------------------------------------------
4742
- #region Initialization
4743
- #----------------------------------------------------------------------------------
4744
-
4745
- /**
4746
- * Init plugin's Freemius instance.
4747
- *
4748
- * @author Vova Feldman (@svovaf)
4749
- * @since 1.0.1
4750
- *
4751
- * @param number $id
4752
- * @param string $public_key
4753
- * @param bool $is_live
4754
- * @param bool $is_premium
4755
- */
4756
- function init( $id, $public_key, $is_live = true, $is_premium = true ) {
4757
- $this->_logger->entrance();
4758
-
4759
- $this->dynamic_init( array(
4760
- 'id' => $id,
4761
- 'public_key' => $public_key,
4762
- 'is_live' => $is_live,
4763
- 'is_premium' => $is_premium,
4764
- ) );
4765
- }
4766
-
4767
- /**
4768
- * Dynamic initiator, originally created to support initiation
4769
- * with parent_id for add-ons.
4770
- *
4771
- * @author Vova Feldman (@svovaf)
4772
- * @since 1.0.6
4773
- *
4774
- * @param array $plugin_info
4775
- *
4776
- * @throws Freemius_Exception
4777
- */
4778
- function dynamic_init( array $plugin_info ) {
4779
- $this->_logger->entrance();
4780
-
4781
- $this->parse_settings( $plugin_info );
4782
-
4783
- $this->register_after_settings_parse_hooks();
4784
-
4785
- if ( $this->should_stop_execution() ) {
4786
- return;
4787
- }
4788
-
4789
- if ( ! $this->is_registered() ) {
4790
- if ( $this->is_anonymous() ) {
4791
- // If user skipped, no need to test connectivity.
4792
- $this->_has_api_connection = true;
4793
- $this->_is_on = true;
4794
- } else {
4795
- if ( ! $this->has_api_connectivity() ) {
4796
- if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
4797
- $this->_admin_notices->has_sticky( 'failed_connect_api' )
4798
- ) {
4799
- if ( ! $this->_enable_anonymous || $this->is_premium() ) {
4800
- // If anonymous mode is disabled, add firewall admin-notice message.
4801
- add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
4802
-
4803
- $ajax_action_suffix = $this->_slug . ( $this->is_theme() ? ':theme' : '' );
4804
- add_action( "wp_ajax_fs_resolve_firewall_issues_{$ajax_action_suffix}", array(
4805
- &$this,
4806
- '_email_about_firewall_issue'
4807
- ) );
4808
-
4809
- add_action( "wp_ajax_fs_retry_connectivity_test_{$ajax_action_suffix}", array(
4810
- &$this,
4811
- '_retry_connectivity_test'
4812
- ) );
4813
-
4814
- /**
4815
- * Currently the admin notice manager relies on the module's type and slug. The new AJAX actions manager uses module IDs, hence, consider to replace the if block above with the commented code below after adjusting the admin notices manager to work with module IDs.
4816
- *
4817
- * @author Vova Feldman (@svovaf)
4818
- * @since 2.0.0
4819
- */
4820
- /*$this->add_ajax_action( 'resolve_firewall_issues', array(
4821
- &$this,
4822
- '_email_about_firewall_issue'
4823
- ) );
4824
-
4825
- $this->add_ajax_action( 'retry_connectivity_test', array(
4826
- &$this,
4827
- '_retry_connectivity_test'
4828
- ) );*/
4829
- }
4830
- }
4831
-
4832
- return;
4833
- } else {
4834
- $this->_admin_notices->remove_sticky( array(
4835
- 'failed_connect_api_first',
4836
- 'failed_connect_api',
4837
- ) );
4838
-
4839
- if ( $this->_anonymous_mode ) {
4840
- // Simulate anonymous mode.
4841
- $this->_is_anonymous = true;
4842
- }
4843
- }
4844
- }
4845
- }
4846
-
4847
- /**
4848
- * This should be executed even if Freemius is off for the core module,
4849
- * otherwise, the add-ons dialogbox won't work properly. This is esepcially
4850
- * relevant when the developer decided to turn FS off for existing users.
4851
- *
4852
- * @author Vova Feldman (@svovaf)
4853
- */
4854
- if ( $this->is_user_in_admin() &&
4855
- 'plugin-information' === fs_request_get( 'tab', false ) &&
4856
- $this->should_use_freemius_updater_and_dialog() &&
4857
- (
4858
- ( $this->is_addon() && $this->get_slug() == fs_request_get( 'plugin', false ) ) ||
4859
- ( $this->has_addons() && $this->get_id() == fs_request_get( 'parent_plugin_id', false ) )
4860
- )
4861
- ) {
4862
- require_once WP_FS__DIR_INCLUDES . '/fs-plugin-info-dialog.php';
4863
-
4864
- new FS_Plugin_Info_Dialog( $this->is_addon() ? $this->get_parent_instance() : $this );
4865
- }
4866
-
4867
- // Check if Freemius is on for the current plugin.
4868
- // This MUST be executed after all the plugin variables has been loaded.
4869
- if ( ! $this->is_registered() && ! $this->is_on() ) {
4870
- return;
4871
- }
4872
-
4873
- if ( $this->has_api_connectivity() ) {
4874
- if ( self::is_cron() ) {
4875
- $this->hook_callback_to_sync_cron();
4876
- } else if ( $this->is_user_in_admin() ) {
4877
- /**
4878
- * Schedule daily data sync cron if:
4879
- *
4880
- * 1. User opted-in (for tracking).
4881
- * 2. If skipped, but later upgraded (opted-in via upgrade).
4882
- *
4883
- * @author Vova Feldman (@svovaf)
4884
- * @since 1.1.7.3
4885
- *
4886
- */
4887
- if ( $this->is_registered() ) {
4888
- if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) {
4889
- $this->schedule_sync_cron();
4890
- }
4891
- }
4892
-
4893
- /**
4894
- * Check if requested for manual blocking background sync.
4895
- */
4896
- if ( fs_request_has( 'background_sync' ) ) {
4897
- $this->run_manual_sync();
4898
- }
4899
- }
4900
- }
4901
-
4902
- if ( $this->is_registered() ) {
4903
- $this->hook_callback_to_install_sync();
4904
- }
4905
-
4906
- if ( $this->is_addon() ) {
4907
- if ( $this->is_parent_plugin_installed() ) {
4908
- // Link to parent FS.
4909
- $this->_parent = self::get_instance_by_id( $this->_plugin->parent_plugin_id );
4910
-
4911
- // Get parent plugin reference.
4912
- $this->_parent_plugin = $this->_parent->get_plugin();
4913
- }
4914
- }
4915
-
4916
- if ( $this->is_user_in_admin() ) {
4917
- if ( $this->is_addon() ) {
4918
- if ( ! $this->is_parent_plugin_installed() ) {
4919
- $parent_name = $this->get_option( $plugin_info, 'parent_name', null );
4920
-
4921
- if ( isset( $plugin_info['parent'] ) ) {
4922
- $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
4923
- }
4924
-
4925
- $this->_admin_notices->add(
4926
- ( ! empty( $parent_name ) ?
4927
- sprintf( $this->get_text_x_inline( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'addon-x-cannot-run-without-y' ), $this->get_plugin_name(), $parent_name ) :
4928
- sprintf( $this->get_text_x_inline( '%s cannot run without the plugin.', 'addonX cannot run...', 'addon-x-cannot-run-without-parent' ), $this->get_plugin_name() )
4929
- ),
4930
- $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
4931
- 'error'
4932
- );
4933
-
4934
- return;
4935
- } else {
4936
- $is_network_admin = fs_is_network_admin();
4937
-
4938
- if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4939
- // If add-on activated and parent not, automatically install parent for the user.
4940
- $this->activate_parent_account( $this->_parent );
4941
- } else if (
4942
- $this->_parent->is_registered() &&
4943
- ! $this->is_registered() &&
4944
- /**
4945
- * If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
4946
- * * Network active and in network admin - network activate add-on account.
4947
- * * Network active and not in network admin - activate add-on account for the current blog.
4948
- * * Not network active and not in network admin - activate add-on account for the current blog.
4949
- *
4950
- * If not registered for add-on, not network active, and in network admin, do not handle the add-on activation.
4951
- *
4952
- * @author Leo Fajardo (@leorw)
4953
- * @since 2.3.0
4954
- */
4955
- ( $this->is_network_active() || ! $is_network_admin )
4956
- ) {
4957
- $premium_license = null;
4958
-
4959
- if (
4960
- ! $this->has_free_plan() &&
4961
- $this->is_bundle_license_auto_activation_enabled() &&
4962
- $this->_parent->is_activated_with_bundle_license()
4963
- ) {
4964
- /**
4965
- * If the add-on has no free plan, try to activate the account only when there's a bundle license.
4966
- *
4967
- * @author Leo Fajardo (@leorw)
4968
- * @since 2.4.0
4969
- */
4970
- $bundle_license = $this->get_active_parent_license( $this->_parent->_get_license()->secret_key, false );
4971
-
4972
- if (
4973
- is_object( $bundle_license ) &&
4974
- ! empty( $bundle_license->products ) &&
4975
- in_array( $this->get_id(), $bundle_license->products )
4976
- ) {
4977
- $premium_license = $bundle_license;
4978
- }
4979
- }
4980
-
4981
- if ( $this->has_free_plan() || is_object( $premium_license) ) {
4982
- // If parent plugin activated, automatically install add-on for the user.
4983
- $this->_activate_addon_account(
4984
- $this->_parent,
4985
- ( $this->is_network_active() && $is_network_admin ) ?
4986
- true :
4987
- get_current_blog_id(),
4988
- $premium_license
4989
- );
4990
- }
4991
- }
4992
-
4993
- // @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
4994
- if ( $this->is_premium() ) {
4995
- // Remove add-on download admin-notice.
4996
- $this->_parent->_admin_notices->remove_sticky( array(
4997
- 'addon_plan_upgraded_' . $this->_slug,
4998
- 'no_addon_license_' . $this->_slug,
4999
- ) );
5000
- }
5001
-
5002
- // $this->deactivate_premium_only_addon_without_license();
5003
- }
5004
- }
5005
-
5006
- add_action( 'admin_init', array( &$this, '_admin_init_action' ) );
5007
-
5008
- // if ( $this->is_registered() ||
5009
- // $this->is_anonymous() ||
5010
- // $this->is_pending_activation()
5011
- // ) {
5012
- // $this->_init_admin();
5013
- // }
5014
- }
5015
-
5016
- /**
5017
- * Should be called outside `$this->is_user_in_admin()` scope
5018
- * because the updater has some logic that needs to be executed
5019
- * during AJAX calls.
5020
- *
5021
- * Currently we need to hook to the `http_request_host_is_external` filter.
5022
- * In the future, there might be additional logic added.
5023
- *
5024
- * @author Vova Feldman
5025
- * @since 1.2.1.6
5026
- */
5027
- if (
5028
- $this->should_use_freemius_updater_and_dialog() &&
5029
- (
5030
- $this->is_premium() ||
5031
- /**
5032
- * If not premium but the premium version is installed, also instantiate the updater so that the
5033
- * plugin information dialog of the premium version will have the information from the server.
5034
- *
5035
- * @author Leo Fajardo (@leorw)
5036
- * @since 2.2.3
5037
- */
5038
- ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
5039
- ) &&
5040
- $this->has_release_on_freemius()
5041
- ) {
5042
- FS_Plugin_Updater::instance( $this );
5043
- }
5044
-
5045
- $this->do_action( 'initiated' );
5046
-
5047
- if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
5048
- if ( isset( $this->_storage->prev_is_premium ) ) {
5049
- $this->apply_filters(
5050
- 'after_code_type_change',
5051
- // New code type.
5052
- $this->_plugin->is_premium
5053
- );
5054
- } else {
5055
- // Set for code type for the first time.
5056
- $this->_storage->prev_is_premium = $this->_plugin->is_premium;
5057
- }
5058
- }
5059
-
5060
- if ( ! $this->is_addon() ) {
5061
- if ( $this->is_registered() ) {
5062
- // Fix for upgrade from versions < 1.0.9.
5063
- if ( ! isset( $this->_storage->activation_timestamp ) ) {
5064
- $this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
5065
- }
5066
-
5067
- $this->do_action( 'after_init_plugin_registered' );
5068
- } else if ( $this->is_anonymous() ) {
5069
- $this->do_action( 'after_init_plugin_anonymous' );
5070
- } else if ( $this->is_pending_activation() ) {
5071
- $this->do_action( 'after_init_plugin_pending_activations' );
5072
- }
5073
- } else {
5074
- if ( $this->is_registered() ) {
5075
- $this->do_action( 'after_init_addon_registered' );
5076
- } else if ( $this->is_anonymous() ) {
5077
- $this->do_action( 'after_init_addon_anonymous' );
5078
- } else if ( $this->is_pending_activation() ) {
5079
- $this->do_action( 'after_init_addon_pending_activations' );
5080
- }
5081
- }
5082
- }
5083
-
5084
- /**
5085
- * @author Leo Fajardo (@leorw)
5086
- * @since 2.2.3
5087
- *
5088
- * @return bool
5089
- */
5090
- private function should_use_freemius_updater_and_dialog() {
5091
- return (
5092
- /**
5093
- * Allow updater and dialog when the `fs_allow_updater_and_dialog` URL query param exists and has `true`
5094
- * value, or when the current page is not the "Add Plugins" page (/plugin-install.php) and the `action`
5095
- * URL query param doesn't exist or its value is not `install-plugin` so that there will be no conflicts
5096
- * with the .org plugins' functionalities (e.g. installation from the "Add Plugins" page and viewing
5097
- * plugin details from .org).
5098
- */
5099
- ( true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) ||
5100
- (
5101
- ! self::is_plugin_install_page() &&
5102
- // Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
5103
- ( 'install-plugin' !== fs_request_get( 'action' ) )
5104
- )
5105
- );
5106
- }
5107
-
5108
- /**
5109
- * @author Leo Fajardo (@leorw)
5110
- *
5111
- * @since 1.2.1.5
5112
- */
5113
- function _stop_tracking_callback() {
5114
- $this->_logger->entrance();
5115
-
5116
- $this->check_ajax_referer( 'stop_tracking' );
5117
-
5118
- $result = $this->stop_tracking( fs_is_network_admin() );
5119
-
5120
- if ( true === $result ) {
5121
- self::shoot_ajax_success();
5122
- }
5123
-
5124
- $this->_logger->api_error( $result );
5125
-
5126
- self::shoot_ajax_failure(
5127
- sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
5128
- ( $this->is_api_error( $result ) && isset( $result->error ) ?
5129
- $result->error->message :
5130
- var_export( $result, true ) )
5131
- );
5132
- }
5133
-
5134
- /**
5135
- * @author Leo Fajardo (@leorw)
5136
- * @since 1.2.1.5
5137
- */
5138
- function _allow_tracking_callback() {
5139
- $this->_logger->entrance();
5140
-
5141
- $this->check_ajax_referer( 'allow_tracking' );
5142
-
5143
- $result = $this->allow_tracking( fs_is_network_admin() );
5144
-
5145
- if ( true === $result ) {
5146
- self::shoot_ajax_success();
5147
- }
5148
-
5149
- $this->_logger->api_error( $result );
5150
-
5151
- self::shoot_ajax_failure(
5152
- sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
5153
- ( $this->is_api_error( $result ) && isset( $result->error ) ?
5154
- $result->error->message :
5155
- var_export( $result, true ) )
5156
- );
5157
- }
5158
-
5159
- /**
5160
- * Opt-out from usage tracking.
5161
- *
5162
- * Note: This will not delete the account information but will stop all tracking.
5163
- *
5164
- * Returns:
5165
- * 1. FALSE - If the user never opted-in.
5166
- * 2. TRUE - If successfully opted-out.
5167
- * 3. object - API result on failure.
5168
- *
5169
- * @author Leo Fajardo (@leorw)
5170
- * @since 1.2.1.5
5171
- *
5172
- * @return bool|object
5173
- */
5174
- function stop_site_tracking() {
5175
- $this->_logger->entrance();
5176
-
5177
- if ( ! $this->is_registered() ) {
5178
- // User never opted-in.
5179
- return false;
5180
- }
5181
-
5182
- if ( $this->is_tracking_prohibited() ) {
5183
- // Already disconnected.
5184
- return true;
5185
- }
5186
-
5187
- // Send update to FS.
5188
- $result = $this->get_api_site_scope()->call( '/?fields=is_disconnected', 'put', array(
5189
- 'is_disconnected' => true
5190
- ) );
5191
-
5192
- if ( ! $this->is_api_result_entity( $result ) ||
5193
- ! isset( $result->is_disconnected ) ||
5194
- ! $result->is_disconnected
5195
- ) {
5196
- $this->_logger->api_error( $result );
5197
-
5198
- return $result;
5199
- }
5200
-
5201
- $this->_site->is_disconnected = $result->is_disconnected;
5202
- $this->_store_site();
5203
-
5204
- $this->clear_sync_cron();
5205
-
5206
- // Successfully disconnected.
5207
- return true;
5208
- }
5209
-
5210
- /**
5211
- * Opt-out network from usage tracking.
5212
- *
5213
- * Note: This will not delete the account information but will stop all tracking.
5214
- *
5215
- * Returns:
5216
- * 1. FALSE - If the user never opted-in.
5217
- * 2. TRUE - If successfully opted-out.
5218
- * 3. object - API result on failure.
5219
- *
5220
- * @author Leo Fajardo (@leorw)
5221
- * @since 1.2.1.5
5222
- *
5223
- * @return bool|object
5224
- */
5225
- function stop_network_tracking() {
5226
- $this->_logger->entrance();
5227
-
5228
- if ( ! $this->is_registered() ) {
5229
- // User never opted-in.
5230
- return false;
5231
- }
5232
-
5233
- $install_id_2_blog_id = array();
5234
- $installs_map = $this->get_blog_install_map();
5235
-
5236
- $opt_out_all = true;
5237
-
5238
- $params = array();
5239
- foreach ( $installs_map as $blog_id => $install ) {
5240
- if ( $install->is_tracking_prohibited() ) {
5241
- // Already opted-out.
5242
- continue;
5243
- }
5244
-
5245
- if ( $this->is_site_delegated_connection( $blog_id ) ) {
5246
- // Opt-out only from non-delegated installs.
5247
- $opt_out_all = false;
5248
- continue;
5249
- }
5250
-
5251
- $params[] = array( 'id' => $install->id );
5252
-
5253
- $install_id_2_blog_id[ $install->id ] = $blog_id;
5254
- }
5255
-
5256
- if ( empty( $install_id_2_blog_id ) ) {
5257
- return true;
5258
- }
5259
-
5260
- $params[] = array( 'is_disconnected' => true );
5261
-
5262
- // Send update to FS.
5263
- $result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
5264
-
5265
- if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
5266
- $this->_logger->api_error( $result );
5267
-
5268
- return $result;
5269
- }
5270
-
5271
- foreach ( $result->installs as $r_install ) {
5272
- $blog_id = $install_id_2_blog_id[ $r_install->id ];
5273
- $install = $installs_map[ $blog_id ];
5274
- $install->is_disconnected = $r_install->is_disconnected;
5275
- $this->_store_site( true, $blog_id, $install );
5276
- }
5277
-
5278
- $this->clear_sync_cron( $opt_out_all );
5279
-
5280
- // Successfully disconnected.
5281
- return true;
5282
- }
5283
-
5284
- /**
5285
- * Opt-out from usage tracking.
5286
- *
5287
- * Note: This will not delete the account information but will stop all tracking.
5288
- *
5289
- * Returns:
5290
- * 1. FALSE - If the user never opted-in.
5291
- * 2. TRUE - If successfully opted-out.
5292
- * 3. object - API result on failure.
5293
- *
5294
- * @author Leo Fajardo (@leorw)
5295
- * @since 1.2.1.5
5296
- *
5297
- * @param bool $is_network_action
5298
- *
5299
- * @return bool|object
5300
- */
5301
- function stop_tracking( $is_network_action = false ) {
5302
- $this->_logger->entrance();
5303
-
5304
- return $is_network_action ?
5305
- $this->stop_network_tracking() :
5306
- $this->stop_site_tracking();
5307
- }
5308
-
5309
- /**
5310
- * Opt-in back into usage tracking.
5311
- *
5312
- * Note: This will only work if the user opted-in previously.
5313
- *
5314
- * Returns:
5315
- * 1. FALSE - If the user never opted-in.
5316
- * 2. TRUE - If successfully opted-in back to usage tracking.
5317
- * 3. object - API result on failure.
5318
- *
5319
- * @author Leo Fajardo (@leorw)
5320
- * @since 1.2.1.5
5321
- *
5322
- * @return bool|object
5323
- */
5324
- function allow_site_tracking() {
5325
- $this->_logger->entrance();
5326
-
5327
- if ( ! $this->is_registered() ) {
5328
- // User never opted-in.
5329
- return false;
5330
- }
5331
-
5332
- if ( $this->is_tracking_allowed() ) {
5333
- // Tracking already allowed.
5334
- return true;
5335
- }
5336
-
5337
- $result = $this->get_api_site_scope()->call( '/?is_disconnected', 'put', array(
5338
- 'is_disconnected' => false
5339
- ) );
5340
-
5341
- if ( ! $this->is_api_result_entity( $result ) ||
5342
- ! isset( $result->is_disconnected ) ||
5343
- $result->is_disconnected
5344
- ) {
5345
- $this->_logger->api_error( $result );
5346
-
5347
- return $result;
5348
- }
5349
-
5350
- $this->_site->is_disconnected = $result->is_disconnected;
5351
- $this->_store_site();
5352
-
5353
- $this->schedule_sync_cron();
5354
-
5355
- // Successfully reconnected.
5356
- return true;
5357
- }
5358
-
5359
- /**
5360
- * Opt-in network back into usage tracking.
5361
- *
5362
- * Note: This will only work if the user opted-in previously.
5363
- *
5364
- * Returns:
5365
- * 1. FALSE - If the user never opted-in.
5366
- * 2. TRUE - If successfully opted-in back to usage tracking.
5367
- * 3. object - API result on failure.
5368
- *
5369
- * @author Leo Fajardo (@leorw)
5370
- * @since 1.2.1.5
5371
- *
5372
- * @return bool|object
5373
- */
5374
- function allow_network_tracking() {
5375
- $this->_logger->entrance();
5376
-
5377
- if ( ! $this->is_registered() ) {
5378
- // User never opted-in.
5379
- return false;
5380
- }
5381
-
5382
- $install_id_2_blog_id = array();
5383
- $installs_map = $this->get_blog_install_map();
5384
-
5385
- $params = array();
5386
- foreach ( $installs_map as $blog_id => $install ) {
5387
- if ( $install->is_tracking_allowed() ) {
5388
- continue;
5389
- }
5390
-
5391
- $params[] = array( 'id' => $install->id );
5392
-
5393
- $install_id_2_blog_id[ $install->id ] = $blog_id;
5394
- }
5395
-
5396
- if ( empty( $install_id_2_blog_id ) ) {
5397
- return true;
5398
- }
5399
-
5400
- $params[] = array( 'is_disconnected' => false );
5401
-
5402
- // Send update to FS.
5403
- $result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
5404
-
5405
-
5406
- if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
5407
- $this->_logger->api_error( $result );
5408
-
5409
- return $result;
5410
- }
5411
-
5412
- foreach ( $result->installs as $r_install ) {
5413
- $blog_id = $install_id_2_blog_id[ $r_install->id ];
5414
- $install = $installs_map[ $blog_id ];
5415
- $install->is_disconnected = $r_install->is_disconnected;
5416
- $this->_store_site( true, $blog_id, $install );
5417
- }
5418
-
5419
- $this->schedule_sync_cron();
5420
-
5421
- // Successfully reconnected.
5422
- return true;
5423
- }
5424
-
5425
- /**
5426
- * Opt-in back into usage tracking.
5427
- *
5428
- * Note: This will only work if the user opted-in previously.
5429
- *
5430
- * Returns:
5431
- * 1. FALSE - If the user never opted-in.
5432
- * 2. TRUE - If successfully opted-in back to usage tracking.
5433
- * 3. object - API result on failure.
5434
- *
5435
- * @author Leo Fajardo (@leorw)
5436
- * @since 1.2.1.5
5437
- *
5438
- * @param bool $is_network_action
5439
- *
5440
- * @return bool|object
5441
- */
5442
- function allow_tracking( $is_network_action = false ) {
5443
- $this->_logger->entrance();
5444
-
5445
- return $is_network_action ?
5446
- $this->allow_network_tracking() :
5447
- $this->allow_site_tracking();
5448
- }
5449
-
5450
- /**
5451
- * If user opted-in and later disabled usage-tracking,
5452
- * re-allow tracking for licensing and updates.
5453
- *
5454
- * @author Leo Fajardo (@leorw)
5455
- * @since 1.2.1.5
5456
- *
5457
- * @param bool $is_context_single_site
5458
- */
5459
- private function reconnect_locally( $is_context_single_site = false ) {
5460
- $this->_logger->entrance();
5461
-
5462
- if ( ! $this->is_registered() ) {
5463
- return;
5464
- }
5465
-
5466
- if ( ! fs_is_network_admin() || $is_context_single_site ) {
5467
- if ( $this->is_tracking_prohibited() ) {
5468
- $this->_site->is_disconnected = false;
5469
- $this->_store_site();
5470
- }
5471
- } else {
5472
- $installs_map = $this->get_blog_install_map();
5473
- foreach ( $installs_map as $blog_id => $install ) {
5474
- /**
5475
- * @var FS_Site $install
5476
- */
5477
- if ( $install->is_tracking_prohibited() ) {
5478
- $install->is_disconnected = false;
5479
- $this->_store_site( true, $blog_id, $install );
5480
- }
5481
- }
5482
- }
5483
- }
5484
-
5485
- /**
5486
- * @author Vova Feldman (@svovaf)
5487
- * @since 2.3.2
5488
- *
5489
- * @return bool
5490
- */
5491
- function is_extensions_tracking_allowed() {
5492
- return ( true === $this->apply_filters(
5493
- 'is_extensions_tracking_allowed',
5494
- $this->_storage->get( 'is_extensions_tracking_allowed', null )
5495
- ) );
5496
- }
5497
-
5498
- /**
5499
- * @author Vova Feldman (@svovaf)
5500
- * @since 2.3.2
5501
- */
5502
- function _update_tracking_permission_callback() {
5503
- $this->_logger->entrance();
5504
-
5505
- $this->check_ajax_referer( 'update_tracking_permission' );
5506
-
5507
- $is_enabled = fs_request_get_bool( 'is_enabled', null );
5508
-
5509
- if ( ! is_bool( $is_enabled ) ) {
5510
- self::shoot_ajax_failure();
5511
- }
5512
-
5513
- $permission = fs_request_get( 'permission' );
5514
-
5515
- switch ( $permission ) {
5516
- case 'extensions':
5517
- $this->update_extensions_tracking_flag( $is_enabled );
5518
- break;
5519
- default:
5520
- $permission = 'no_match';
5521
- }
5522
-
5523
- if ( 'no_match' === $permission ) {
5524
- self::shoot_ajax_failure();
5525
- }
5526
-
5527
- self::shoot_ajax_success( array(
5528
- 'permissions' => array(
5529
- $permission => $is_enabled,
5530
- )
5531
- ) );
5532
- }
5533
-
5534
- /**
5535
- * @author Leo Fajardo (@leorw)
5536
- * @since 2.3.2
5537
- *
5538
- * @param bool|null $is_enabled
5539
- */
5540
- function update_extensions_tracking_flag( $is_enabled ) {
5541
- if ( is_bool( $is_enabled ) ) {
5542
- $this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
5543
- }
5544
- }
5545
-
5546
- /**
5547
- * Parse plugin's settings (as defined by the plugin dev).
5548
- *
5549
- * @author Vova Feldman (@svovaf)
5550
- * @since 1.1.7.3
5551
- *
5552
- * @param array $plugin_info
5553
- *
5554
- * @throws \Freemius_Exception
5555
- */
5556
- private function parse_settings( &$plugin_info ) {
5557
- $this->_logger->entrance();
5558
-
5559
- $id = $this->get_numeric_option( $plugin_info, 'id', false );
5560
- $public_key = $this->get_option( $plugin_info, 'public_key', false );
5561
- $secret_key = $this->get_option( $plugin_info, 'secret_key', null );
5562
- $parent_id = $this->get_numeric_option( $plugin_info, 'parent_id', null );
5563
- $parent_name = $this->get_option( $plugin_info, 'parent_name', null );
5564
-
5565
- /**
5566
- * @author Vova Feldman (@svovaf)
5567
- * @since 1.1.9 Try to pull secret key from external config.
5568
- */
5569
- if ( is_null( $secret_key ) && defined( "WP_FS__{$this->_slug}_SECRET_KEY" ) ) {
5570
- $secret_key = constant( "WP_FS__{$this->_slug}_SECRET_KEY" );
5571
- }
5572
-
5573
- if ( isset( $plugin_info['parent'] ) ) {
5574
- $parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
5575
- // $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null );
5576
- // $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
5577
- // $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
5578
- }
5579
-
5580
- if ( false === $id ) {
5581
- throw new Freemius_Exception( array(
5582
- 'error' => array(
5583
- 'type' => 'ParameterNotSet',
5584
- 'message' => 'Plugin id parameter is not set.',
5585
- 'code' => 'plugin_id_not_set',
5586
- 'http' => 500,
5587
- )
5588
- ) );
5589
- }
5590
- if ( false === $public_key ) {
5591
- throw new Freemius_Exception( array(
5592
- 'error' => array(
5593
- 'type' => 'ParameterNotSet',
5594
- 'message' => 'Plugin public_key parameter is not set.',
5595
- 'code' => 'plugin_public_key_not_set',
5596
- 'http' => 500,
5597
- )
5598
- ) );
5599
- }
5600
-
5601
- $plugin = ( $this->_plugin instanceof FS_Plugin ) ?
5602
- $this->_plugin :
5603
- new FS_Plugin();
5604
-
5605
- $premium_suffix = $this->get_option( $plugin_info, 'premium_suffix', '(Premium)' );
5606
-
5607
- $plugin->update( array(
5608
- 'id' => $id,
5609
- 'type' => $this->get_option( $plugin_info, 'type', $this->_module_type ),
5610
- 'public_key' => $public_key,
5611
- 'slug' => $this->_slug,
5612
- 'premium_slug' => $this->get_option( $plugin_info, 'premium_slug', "{$this->_slug}-premium" ),
5613
- 'parent_plugin_id' => $parent_id,
5614
- 'version' => $this->get_plugin_version(),
5615
- 'title' => $this->get_plugin_name( $premium_suffix ),
5616
- 'file' => $this->_plugin_basename,
5617
- 'is_premium' => $this->get_bool_option( $plugin_info, 'is_premium', true ),
5618
- 'premium_suffix' => $premium_suffix,
5619
- 'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
5620
- 'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
5621
- 'bundle_id' => $this->get_option( $plugin_info, 'bundle_id', null ),
5622
- 'bundle_public_key' => $this->get_option( $plugin_info, 'bundle_public_key', null ),
5623
- ) );
5624
-
5625
- if ( $plugin->is_updated() ) {
5626
- // Update plugin details.
5627
- $this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->store( $plugin );
5628
- }
5629
- // Set the secret key after storing the plugin, we don't want to store the key in the storage.
5630
- $this->_plugin->secret_key = $secret_key;
5631
-
5632
- /**
5633
- * If the product is network integrated and activated and the current view is in the network level Admin dashboard, if the product's network-level menu located differently from the sub-site level, then use the network menu details (when set).
5634
- *
5635
- * @author Vova Feldman
5636
- * @since 2.4.5
5637
- */
5638
- if ( $this->is_network_active() && fs_is_network_admin() ) {
5639
- if ( isset( $plugin_info['menu_network'] ) &&
5640
- is_array( $plugin_info['menu_network'] ) &&
5641
- ! empty( $plugin_info['menu_network'] )
5642
- ) {
5643
- $plugin_info['menu'] = $plugin_info['menu_network'];
5644
- }
5645
- }
5646
-
5647
- if ( ! isset( $plugin_info['menu'] ) ) {
5648
- $plugin_info['menu'] = array();
5649
-
5650
- if ( ! empty( $this->_storage->sdk_last_version ) &&
5651
- version_compare( $this->_storage->sdk_last_version, '1.1.2', '<=' )
5652
- ) {
5653
- // Backward compatibility to 1.1.2
5654
- $plugin_info['menu']['slug'] = isset( $plugin_info['menu_slug'] ) ?
5655
- $plugin_info['menu_slug'] :
5656
- $this->_slug;
5657
- }
5658
- }
5659
-
5660
- $this->_menu = FS_Admin_Menu_Manager::instance(
5661
- $this->_module_id,
5662
- $this->_module_type,
5663
- $this->get_unique_affix()
5664
- );
5665
-
5666
- $this->_menu->init( $plugin_info['menu'], $this->is_addon() );
5667
-
5668
- $this->_has_addons = $this->get_bool_option( $plugin_info, 'has_addons', false );
5669
- $this->_has_paid_plans = $this->get_bool_option( $plugin_info, 'has_paid_plans', true );
5670
- $this->_has_premium_version = $this->get_bool_option( $plugin_info, 'has_premium_version', $this->_has_paid_plans );
5671
- $this->_ignore_pending_mode = $this->get_bool_option( $plugin_info, 'ignore_pending_mode', false );
5672
- $this->_is_org_compliant = $this->get_bool_option( $plugin_info, 'is_org_compliant', true );
5673
- $this->_is_premium_only = $this->get_bool_option( $plugin_info, 'is_premium_only', false );
5674
- if ( $this->_is_premium_only ) {
5675
- // If premium only plugin, disable anonymous mode.
5676
- $this->_enable_anonymous = false;
5677
- $this->_anonymous_mode = false;
5678
- } else {
5679
- $this->_enable_anonymous = $this->get_bool_option( $plugin_info, 'enable_anonymous', true );
5680
- $this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
5681
- }
5682
- $this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
5683
- $this->_is_bundle_license_auto_activation_enabled = $this->get_option( $plugin_info, 'bundle_license_auto_activation', false );
5684
-
5685
- if ( ! empty( $plugin_info['trial'] ) ) {
5686
- $this->_trial_days = $this->get_numeric_option(
5687
- $plugin_info['trial'],
5688
- 'days',
5689
- // Default to 0 - trial without days specification.
5690
- 0
5691
- );
5692
-
5693
- $this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false );
5694
- }
5695
-
5696
- $this->_navigation = $this->get_option(
5697
- $plugin_info,
5698
- 'navigation',
5699
- $this->is_free_wp_org_theme() ?
5700
- self::NAVIGATION_TABS :
5701
- self::NAVIGATION_MENU
5702
- );
5703
- }
5704
-
5705
- /**
5706
- * @param string[] $options
5707
- * @param string $key
5708
- * @param mixed $default
5709
- *
5710
- * @return bool
5711
- */
5712
- private function get_option( &$options, $key, $default = false ) {
5713
- return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
5714
- }
5715
-
5716
- private function get_bool_option( &$options, $key, $default = false ) {
5717
- return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
5718
- }
5719
-
5720
- private function get_numeric_option( &$options, $key, $default = false ) {
5721
- return isset( $options[ $key ] ) && is_numeric( $options[ $key ] ) ? $options[ $key ] : $default;
5722
- }
5723
-
5724
- /**
5725
- * Gate keeper.
5726
- *
5727
- * @author Vova Feldman (@svovaf)
5728
- * @since 1.1.7.3
5729
- *
5730
- * @return bool
5731
- */
5732
- private function should_stop_execution() {
5733
- if ( empty( $this->_storage->was_plugin_loaded ) ) {
5734
- /**
5735
- * Don't execute Freemius until plugin was fully loaded at least once,
5736
- * to give the opportunity for the activation hook to run before pinging
5737
- * the API for connectivity test. This logic is relevant for the
5738
- * identification of new plugin install vs. plugin update.
5739
- *
5740
- * @author Vova Feldman (@svovaf)
5741
- * @since 1.1.9
5742
- */
5743
- return true;
5744
- }
5745
-
5746
- if ( $this->is_activation_mode() ) {
5747
- if ( ! is_admin() ) {
5748
- /**
5749
- * If in activation mode, don't execute Freemius outside of the
5750
- * admin dashboard.
5751
- *
5752
- * @author Vova Feldman (@svovaf)
5753
- * @since 1.1.7.3
5754
- */
5755
- return true;
5756
- }
5757
-
5758
- if ( ! WP_FS__IS_HTTP_REQUEST ) {
5759
- /**
5760
- * If in activation and executed without HTTP context (e.g. CLI, Cronjob),
5761
- * then don't start Freemius.
5762
- *
5763
- * @author Vova Feldman (@svovaf)
5764
- * @since 1.1.6.3
5765
- *
5766
- * @link https://wordpress.org/support/topic/errors-in-the-freemius-class-when-running-in-wordpress-in-cli
5767
- */
5768
- return true;
5769
- }
5770
-
5771
- if ( self::is_cron() ) {
5772
- /**
5773
- * If in activation mode, don't execute Freemius during wp crons
5774
- * (wp crons have HTTP context - called as HTTP request).
5775
- *
5776
- * @author Vova Feldman (@svovaf)
5777
- * @since 1.1.7.3
5778
- */
5779
- return true;
5780
- }
5781
-
5782
- if ( self::is_ajax() &&
5783
- ! $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) &&
5784
- ! $this->_admin_notices->has_sticky( 'failed_connect_api' )
5785
- ) {
5786
- /**
5787
- * During activation, if running in AJAX mode, unless there's a sticky
5788
- * connectivity issue notice, don't run Freemius.
5789
- *
5790
- * @author Vova Feldman (@svovaf)
5791
- * @since 1.1.7.3
5792
- */
5793
- return true;
5794
- }
5795
- }
5796
-
5797
- return false;
5798
- }
5799
-
5800
- /**
5801
- * Triggered after code type has changed.
5802
- *
5803
- * @author Vova Feldman (@svovaf)
5804
- * @since 1.1.9.1
5805
- */
5806
- function _after_code_type_change() {
5807
- $this->_logger->entrance();
5808
-
5809
- if ( $this->is_theme() ) {
5810
- // Expire the cache of the previous tabs since the theme may
5811
- // have setting updates after code type has changed.
5812
- $this->_cache->expire( 'tabs' );
5813
- $this->_cache->expire( 'tabs_stylesheets' );
5814
- }
5815
-
5816
- if ( $this->is_registered() ) {
5817
- if ( ! $this->is_addon() ) {
5818
- add_action(
5819
- is_admin() ? 'admin_init' : 'init',
5820
- array( &$this, '_plugin_code_type_changed' )
5821
- );
5822
- }
5823
-
5824
- if ( $this->is_premium() ) {
5825
- // Purge cached payments after switching to the premium version.
5826
- // @todo This logic doesn't handle purging the cache for serviceware module upgrade.
5827
- $this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
5828
- }
5829
- }
5830
- }
5831
-
5832
- /**
5833
- * Handles plugin's code type change (free <--> premium).
5834
- *
5835
- * @author Vova Feldman (@svovaf)
5836
- * @since 1.0.9
5837
- */
5838
- function _plugin_code_type_changed() {
5839
- $this->_logger->entrance();
5840
-
5841
- if ( $this->is_premium() ) {
5842
- $this->reconnect_locally();
5843
-
5844
- // Activated premium code.
5845
- $this->do_action( 'after_premium_version_activation' );
5846
-
5847
- // Remove all sticky messages related to download of the premium version.
5848
- $this->_admin_notices->remove_sticky( array(
5849
- 'trial_started',
5850
- 'plan_upgraded',
5851
- 'plan_changed',
5852
- 'license_activated',
5853
- ) );
5854
-
5855
- $notice = '';
5856
- if ( ! $this->is_only_premium() ) {
5857
- $notice = sprintf( $this->get_text_inline( 'Premium %s version was successfully activated.', 'premium-activated-message' ), $this->_module_type );
5858
- }
5859
-
5860
- $license_notice = $this->get_license_network_activation_notice();
5861
- if ( ! empty( $license_notice ) ) {
5862
- $notice .= ' ' . $license_notice;
5863
- }
5864
-
5865
- if ( ! empty( $notice ) ) {
5866
- $this->_admin_notices->add_sticky(
5867
- trim( $notice ),
5868
- 'premium_activated',
5869
- $this->get_text_x_inline( 'W00t',
5870
- 'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
5871
- );
5872
- }
5873
- } else {
5874
- // Remove sticky message related to premium code activation.
5875
- $this->_admin_notices->remove_sticky( 'premium_activated' );
5876
-
5877
- // Activated free code (after had the premium before).
5878
- $this->do_action( 'after_free_version_reactivation' );
5879
-
5880
- if ( $this->is_paying() && ! $this->is_premium() ) {
5881
- $this->_admin_notices->add_sticky(
5882
- sprintf(
5883
- /* translators: %s: License type (e.g. you have a professional license) */
5884
- $this->get_text_inline( 'You have a %s license.', 'you-have-x-license' ),
5885
- $this->get_plan_title()
5886
- ) . $this->get_complete_upgrade_instructions(),
5887
- 'plan_upgraded',
5888
- $this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
5889
- );
5890
- }
5891
- }
5892
-
5893
- // Schedule code type changes event.
5894
- $this->schedule_install_sync();
5895
-
5896
- /**
5897
- * Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
5898
- * triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
5899
- * of a specific plugin, its uninstall hook should be unregistered after the "premium" version has been
5900
- * activated. If we don't do that, a fatal error will occur when we try to uninstall the "free" version since
5901
- * the main file of the "free" version will be loaded first before calling the hooked callback. Since the
5902
- * free and premium versions are almost identical (same class or have same functions), a fatal error like
5903
- * "Cannot redeclare class MyClass" or "Cannot redeclare my_function()" will occur.
5904
- */
5905
- $this->unregister_uninstall_hook();
5906
-
5907
- $this->clear_module_main_file_cache();
5908
-
5909
- // Update is_premium of latest version.
5910
- $this->_storage->prev_is_premium = $this->_plugin->is_premium;
5911
- }
5912
-
5913
- #endregion
5914
-
5915
- #----------------------------------------------------------------------------------
5916
- #region Add-ons
5917
- #----------------------------------------------------------------------------------
5918
-
5919
- /**
5920
- * Check if add-on installed and activated on site.
5921
- *
5922
- * @author Vova Feldman (@svovaf)
5923
- * @since 1.0.6
5924
- *
5925
- * @param string|number $id_or_slug
5926
- * @param bool|null $is_premium Since 1.2.1.7 can check for specified add-on version.
5927
- *
5928
- * @return bool
5929
- */
5930
- function is_addon_activated( $id_or_slug, $is_premium = null ) {
5931
- $this->_logger->entrance();
5932
-
5933
- $addon_id = self::get_module_id( $id_or_slug );
5934
- $is_activated = self::has_instance( $addon_id );
5935
-
5936
- if ( ! $is_activated ) {
5937
- return false;
5938
- }
5939
-
5940
- if ( is_bool( $is_premium ) ) {
5941
- // Check if the specified code version is activate.
5942
- $addon = $this->get_addon_instance( $addon_id );
5943
- $is_activated = ( $is_premium === $addon->is_premium() );
5944
- }
5945
-
5946
- return $is_activated;
5947
- }
5948
-
5949
- /**
5950
- * Check if add-on was connected to install
5951
- *
5952
- * @author Vova Feldman (@svovaf)
5953
- * @since 1.1.7
5954
- *
5955
- * @param string|number $id_or_slug
5956
- *
5957
- * @return bool
5958
- */
5959
- function is_addon_connected( $id_or_slug ) {
5960
- $this->_logger->entrance();
5961
-
5962
- $sites = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
5963
-
5964
- $addon_id = self::get_module_id( $id_or_slug );
5965
- $addon = $this->get_addon( $addon_id );
5966
- $slug = $addon->slug;
5967
- if ( ! isset( $sites[ $slug ] ) ) {
5968
- return false;
5969
- }
5970
-
5971
- $site = $sites[ $slug ];
5972
-
5973
- $plugin = FS_Plugin_Manager::instance( $addon_id )->get();
5974
-
5975
- if ( $plugin->parent_plugin_id != $this->_plugin->id ) {
5976
- // The given slug do NOT belong to any of the plugin's add-ons.
5977
- return false;
5978
- }
5979
-
5980
- return ( is_object( $site ) &&
5981
- is_numeric( $site->id ) &&
5982
- is_numeric( $site->user_id ) &&
5983
- FS_Plugin_Plan::is_valid_id( $site->plan_id )
5984
- );
5985
- }
5986
-
5987
- /**
5988
- * Determines if add-on installed.
5989
- *
5990
- * NOTE: This is a heuristic and only works if the folder/file named as the slug.
5991
- *
5992
- * @author Vova Feldman (@svovaf)
5993
- * @since 1.0.6
5994
- *
5995
- * @param string|number $id_or_slug
5996
- *
5997
- * @return bool
5998
- */
5999
- function is_addon_installed( $id_or_slug ) {
6000
- $this->_logger->entrance();
6001
-
6002
- $addon_id = self::get_module_id( $id_or_slug );
6003
-
6004
- return file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->get_addon_basename( $addon_id ) ) );
6005
- }
6006
-
6007
- /**
6008
- * Get add-on basename.
6009
- *
6010
- * @author Vova Feldman (@svovaf)
6011
- * @since 1.0.6
6012
- *
6013
- * @param string|number $id_or_slug
6014
- *
6015
- * @return string
6016
- */
6017
- function get_addon_basename( $id_or_slug ) {
6018
- $addon_id = self::get_module_id( $id_or_slug );
6019
-
6020
- if ( $this->is_addon_activated( $addon_id ) ) {
6021
- return self::instance( $addon_id )->get_plugin_basename();
6022
- }
6023
-
6024
- $addon = $this->get_addon( $addon_id );
6025
- $premium_basename = "{$addon->premium_slug}/{$addon->slug}.php";
6026
-
6027
- if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
6028
- return $premium_basename;
6029
- }
6030
-
6031
- $all_plugins = $this->get_all_plugins();
6032
-
6033
- foreach ( $all_plugins as $basename => $data ) {
6034
- if ( $addon->slug === $data['slug'] ||
6035
- $addon->premium_slug === $data['slug']
6036
- ) {
6037
- return $basename;
6038
- }
6039
- }
6040
-
6041
- $free_basename = "{$addon->slug}/{$addon->slug}.php";
6042
-
6043
- return $free_basename;
6044
- }
6045
-
6046
- /**
6047
- * Get installed add-ons instances.
6048
- *
6049
- * @author Vova Feldman (@svovaf)
6050
- * @since 1.0.6
6051
- *
6052
- * @return Freemius[]
6053
- */
6054
- function get_installed_addons() {
6055
- if ( $this->is_addon() ) {
6056
- // Add-on cannot have add-ons.
6057
- return array();
6058
- }
6059
-
6060
- $installed_addons = array();
6061
-
6062
- foreach ( self::$_instances as $instance ) {
6063
- if ( $instance->is_addon_of( $this->_plugin->id ) ) {
6064
- $installed_addons[] = $instance;
6065
- }
6066
- }
6067
-
6068
- return $installed_addons;
6069
- }
6070
-
6071
- /**
6072
- * Check if any add-ons of the plugin are installed.
6073
- *
6074
- * @author Leo Fajardo (@leorw)
6075
- * @since 1.1.1
6076
- *
6077
- * @return bool
6078
- */
6079
- function has_installed_addons() {
6080
- if ( ! $this->has_addons() ) {
6081
- return false;
6082
- }
6083
-
6084
- foreach ( self::$_instances as $instance ) {
6085
- if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
6086
- if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
6087
- return true;
6088
- }
6089
- }
6090
- }
6091
-
6092
- return false;
6093
- }
6094
-
6095
- /**
6096
- * Tell Freemius that the current plugin is an add-on.
6097
- *
6098
- * @author Vova Feldman (@svovaf)
6099
- * @since 1.0.6
6100
- *
6101
- * @param number $parent_plugin_id The parent plugin ID
6102
- */
6103
- function init_addon( $parent_plugin_id ) {
6104
- $this->_plugin->parent_plugin_id = $parent_plugin_id;
6105
- }
6106
-
6107
- /**
6108
- * @author Vova Feldman (@svovaf)
6109
- * @since 1.0.6
6110
- *
6111
- * @return bool
6112
- */
6113
- function is_addon() {
6114
- return (
6115
- isset( $this->_plugin->parent_plugin_id ) &&
6116
- is_numeric( $this->_plugin->parent_plugin_id )
6117
- );
6118
- }
6119
-
6120
- /**
6121
- * @author Vova Feldman (@svovaf)
6122
- * @since 2.3.2
6123
- *
6124
- * @param number $parent_product_id
6125
- *
6126
- * @return bool
6127
- */
6128
- function is_addon_of( $parent_product_id ) {
6129
- return (
6130
- $this->is_addon() &&
6131
- $parent_product_id == $this->_plugin->parent_plugin_id
6132
- );
6133
- }
6134
-
6135
- /**
6136
- * Deactivate add-on if it's premium only and the user does't have a valid license.
6137
- *
6138
- * @param bool $is_after_trial_cancel
6139
- *
6140
- * @return bool If add-on was deactivated.
6141
- */
6142
- private function deactivate_premium_only_addon_without_license( $is_after_trial_cancel = false ) {
6143
- if ( ! $this->has_free_plan() &&
6144
- ! $this->has_features_enabled_license() &&
6145
- ! $this->_has_premium_license()
6146
- ) {
6147
- if ( $this->is_registered() ) {
6148
- // IF wrapper is turned off because activation_timestamp is currently only stored for plugins (not addons).
6149
- // if (empty($this->_storage->activation_timestamp) ||
6150
- // (WP_FS__SCRIPT_START_TIME - $this->_storage->activation_timestamp) > 30
6151
- // ) {
6152
- /**
6153
- * @todo When it's first fail, there's no reason to try and re-sync because the licenses were just synced after initial activation.
6154
- *
6155
- * Retry syncing the user add-on licenses.
6156
- */
6157
- // Sync licenses.
6158
- $this->_sync_licenses();
6159
- // }
6160
-
6161
- // Try to activate premium license.
6162
- $this->_activate_license( true );
6163
- }
6164
-
6165
- if ( ! $this->has_free_plan() &&
6166
- ! $this->has_features_enabled_license() &&
6167
- ! $this->_has_premium_license()
6168
- ) {
6169
- // @todo Check if deactivate plugins also call the deactivation hook.
6170
-
6171
- $this->_parent->_admin_notices->add_sticky(
6172
- sprintf(
6173
- ( $is_after_trial_cancel ?
6174
- $this->_parent->get_text_inline(
6175
- '%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you\'ll have to purchase a license.',
6176
- 'addon-trial-cancelled-message'
6177
- ) :
6178
- $this->_parent->get_text_inline(
6179
- '%s is a premium only add-on. You have to purchase a license first before activating the plugin.',
6180
- 'addon-no-license-message'
6181
- )
6182
- ),
6183
- '<b>' . $this->_plugin->title . '</b>'
6184
- ) . ' ' . sprintf(
6185
- '<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s &nbsp;&#10140;</a>',
6186
- $this->_parent->addon_url( $this->_slug ),
6187
- esc_attr( sprintf( $this->_parent->get_text_inline( 'More information about %s', 'more-information-about-x' ), $this->_plugin->title ) ),
6188
- $this->_parent->get_text_inline( 'Purchase License', 'purchase-license' )
6189
- ),
6190
- 'no_addon_license_' . $this->_slug,
6191
- ( $is_after_trial_cancel ? '' : $this->_parent->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' ),
6192
- ( $is_after_trial_cancel ? 'success' : 'error' )
6193
- );
6194
-
6195
- deactivate_plugins( array( $this->_plugin_basename ), true );
6196
-
6197
- return true;
6198
- }
6199
- }
6200
-
6201
- return false;
6202
- }
6203
-
6204
- #endregion
6205
-
6206
- #----------------------------------------------------------------------------------
6207
- #region Sandbox
6208
- #----------------------------------------------------------------------------------
6209
-
6210
- /**
6211
- * Set Freemius into sandbox mode for debugging.
6212
- *
6213
- * @author Vova Feldman (@svovaf)
6214
- * @since 1.0.4
6215
- *
6216
- * @param string $secret_key
6217
- */
6218
- function init_sandbox( $secret_key ) {
6219
- $this->_plugin->secret_key = $secret_key;
6220
-
6221
- // Update plugin details.
6222
- FS_Plugin_Manager::instance( $this->_module_id )->update( $this->_plugin, true );
6223
- }
6224
-
6225
- /**
6226
- * Check if running payments in sandbox mode.
6227
- *
6228
- * @author Vova Feldman (@svovaf)
6229
- * @since 1.0.4
6230
- *
6231
- * @return bool
6232
- */
6233
- function is_payments_sandbox() {
6234
- return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key );
6235
- }
6236
-
6237
- #endregion
6238
-
6239
- /**
6240
- * Check if running test vs. live plugin.
6241
- *
6242
- * @author Vova Feldman (@svovaf)
6243
- * @since 1.0.5
6244
- *
6245
- * @return bool
6246
- */
6247
- function is_live() {
6248
- return $this->_plugin->is_live;
6249
- }
6250
-
6251
- /**
6252
- * Check if super-admin skipped connection for all sites in the network.
6253
- *
6254
- * @author Vova Feldman (@svovaf)
6255
- * @since 2.0.0
6256
- */
6257
- function is_network_anonymous() {
6258
- if ( ! $this->_is_network_active ) {
6259
- return false;
6260
- }
6261
-
6262
- $is_anonymous_ms = $this->_storage->get( 'is_anonymous_ms' );
6263
-
6264
- if ( empty( $is_anonymous_ms ) ) {
6265
- return false;
6266
- }
6267
-
6268
- return $is_anonymous_ms['is'];
6269
- }
6270
-
6271
- /**
6272
- * Check if super-admin opted-in for all sites in the network.
6273
- *
6274
- * @author Vova Feldman (@svovaf)
6275
- * @since 2.0.0
6276
- */
6277
- function is_network_connected() {
6278
- if ( ! $this->_is_network_active ) {
6279
- return false;
6280
- }
6281
-
6282
- return $this->_storage->get( 'is_network_connected' );
6283
- }
6284
-
6285
- /**
6286
- * Check if the user skipped connecting the account with Freemius.
6287
- *
6288
- * @author Vova Feldman (@svovaf)
6289
- * @since 1.0.7
6290
- *
6291
- * @return bool
6292
- */
6293
- function is_anonymous() {
6294
- if ( ! isset( $this->_is_anonymous ) ) {
6295
- if ( $this->is_network_anonymous() ) {
6296
- $this->_is_anonymous = true;
6297
- } else if ( ! fs_is_network_admin() ) {
6298
- if ( ! isset( $this->_storage->is_anonymous ) ) {
6299
- // Not skipped.
6300
- $this->_is_anonymous = false;
6301
- } else if ( is_bool( $this->_storage->is_anonymous ) ) {
6302
- // For back compatibility, since the variable was boolean before.
6303
- $this->_is_anonymous = $this->_storage->is_anonymous;
6304
-
6305
- // Upgrade stored data format to 1.1.3 format.
6306
- $this->set_anonymous_mode( $this->_storage->is_anonymous );
6307
- } else {
6308
- // Version 1.1.3 and later.
6309
- $this->_is_anonymous = $this->_storage->is_anonymous['is'];
6310
- }
6311
- }
6312
- }
6313
-
6314
- return $this->_is_anonymous;
6315
- }
6316
-
6317
- /**
6318
- * Check if the user skipped the connection of a specified site.
6319
- *
6320
- * @author Vova Feldman (@svovaf)
6321
- * @since 2.0.0
6322
- *
6323
- * @param int $blog_id
6324
- *
6325
- * @return bool
6326
- */
6327
- function is_anonymous_site( $blog_id = 0 ) {
6328
- if ( $this->is_network_anonymous() ) {
6329
- return true;
6330
- }
6331
-
6332
- $is_anonymous = $this->_storage->get( 'is_anonymous', false, $blog_id );
6333
-
6334
- if ( empty( $is_anonymous ) ) {
6335
- return false;
6336
- }
6337
-
6338
- return $is_anonymous['is'];
6339
- }
6340
-
6341
- /**
6342
- * Check if user connected his account and install pending email activation.
6343
- *
6344
- * @author Vova Feldman (@svovaf)
6345
- * @since 1.0.7
6346
- *
6347
- * @return bool
6348
- */
6349
- function is_pending_activation() {
6350
- return $this->_storage->get( 'is_pending_activation', false );
6351
- }
6352
-
6353
- /**
6354
- * Check if plugin must be WordPress.org compliant.
6355
- *
6356
- * @since 1.0.7
6357
- *
6358
- * @return bool
6359
- */
6360
- function is_org_repo_compliant() {
6361
- return $this->_is_org_compliant;
6362
- }
6363
-
6364
- #--------------------------------------------------------------------------------
6365
- #region WP Cron Common
6366
- #--------------------------------------------------------------------------------
6367
-
6368
- /**
6369
- * @author Vova Feldman (@svovaf)
6370
- * @since 2.0.0
6371
- *
6372
- * @param string $name Cron name.
6373
- *
6374
- * @return object
6375
- */
6376
- private function get_cron_data( $name ) {
6377
- $this->_logger->entrance( $name );
6378
-
6379
- /**
6380
- * @var object $cron_data
6381
- */
6382
- return $this->_storage->get( "{$name}_cron", null );
6383
- }
6384
-
6385
- /**
6386
- * @author Vova Feldman (@svovaf)
6387
- * @since 2.0.0
6388
- *
6389
- * @param string $name Cron name.
6390
- */
6391
- private function clear_cron_data( $name ) {
6392
- $this->_logger->entrance( $name );
6393
-
6394
- $this->_storage->remove( "{$name}_cron" );
6395
- }
6396
-
6397
- /**
6398
- * @author Vova Feldman (@svovaf)
6399
- * @since 2.0.0
6400
- *
6401
- * @param string $name Cron name.
6402
- * @param int $cron_blog_id The cron executing blog ID.
6403
- */
6404
- private function set_cron_data( $name, $cron_blog_id = 0 ) {
6405
- $this->_logger->entrance( $name );
6406
-
6407
- $this->_storage->store( "{$name}_cron", (object) array(
6408
- 'version' => $this->get_plugin_version(),
6409
- 'blog_id' => $cron_blog_id,
6410
- 'sdk_version' => $this->version,
6411
- 'timestamp' => WP_FS__SCRIPT_START_TIME,
6412
- 'on' => true,
6413
- ) );
6414
- }
6415
-
6416
- /**
6417
- * Get the cron's executing blog ID.
6418
- *
6419
- * @author Vova Feldman (@svovaf)
6420
- * @since 2.0.0
6421
- *
6422
- * @param string $name Cron name.
6423
- *
6424
- * @return int
6425
- */
6426
- private function get_cron_blog_id( $name ) {
6427
- $this->_logger->entrance( $name );
6428
-
6429
- /**
6430
- * @var object $cron_data
6431
- */
6432
- $cron_data = $this->get_cron_data( $name );
6433
-
6434
- return ( is_object( $cron_data ) && is_numeric( $cron_data->blog_id ) ) ?
6435
- $cron_data->blog_id :
6436
- 0;
6437
- }
6438
-
6439
- /**
6440
- * @author Vova Feldman (@svovaf)
6441
- * @since 2.0.0
6442
- *
6443
- * @param string $name Cron name.
6444
- *
6445
- * @return bool
6446
- */
6447
- private function is_cron_on( $name ) {
6448
- $this->_logger->entrance( $name );
6449
-
6450
- /**
6451
- * @var object $cron_data
6452
- */
6453
- $cron_data = $this->get_cron_data( $name );
6454
-
6455
- return ( ! is_null( $cron_data ) && true === $cron_data->on );
6456
- }
6457
-
6458
- /**
6459
- * Unix timestamp for previous cron execution or false if never executed.
6460
- *
6461
- * @author Vova Feldman (@svovaf)
6462
- * @since 2.0.0
6463
- *
6464
- * @param string $name Cron name.
6465
- *
6466
- * @return int|false
6467
- */
6468
- private function cron_last_execution( $name ) {
6469
- $this->_logger->entrance( $name );
6470
-
6471
- return $this->_storage->get( "{$name}_timestamp" );
6472
- }
6473
-
6474
- /**
6475
- * Set cron execution time to now.
6476
- *
6477
- * @author Vova Feldman (@svovaf)
6478
- * @since 2.0.0
6479
- *
6480
- * @param string $name Cron name.
6481
- */
6482
- private function set_cron_execution_timestamp( $name ) {
6483
- $this->_logger->entrance( $name );
6484
-
6485
- $this->_storage->store( "{$name}_timestamp", time() );
6486
- }
6487
-
6488
- /**
6489
- * Sets the keepalive time to now.
6490
- *
6491
- * @author Leo Fajardo (@leorw)
6492
- * @since 2.2.3
6493
- *
6494
- * @param bool|null $use_network_level_storage
6495
- */
6496
- private function set_keepalive_timestamp( $use_network_level_storage = null ) {
6497
- $this->_logger->entrance();
6498
-
6499
- $this->_storage->store( 'keepalive_timestamp', time(), $use_network_level_storage );
6500
- }
6501
-
6502
- /**
6503
- * Check if cron was executed in the last $period of seconds.
6504
- *
6505
- * @author Vova Feldman (@svovaf)
6506
- * @since 2.0.0
6507
- *
6508
- * @param string $name Cron name.
6509
- * @param int $period In seconds
6510
- *
6511
- * @return bool
6512
- */
6513
- private function is_cron_executed( $name, $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
6514
- $this->_logger->entrance( $name );
6515
-
6516
- $last_execution = $this->cron_last_execution( $name );
6517
-
6518
- if ( ! is_numeric( $last_execution ) ) {
6519
- return false;
6520
- }
6521
-
6522
- return ( $last_execution > ( WP_FS__SCRIPT_START_TIME - $period ) );
6523
- }
6524
-
6525
- /**
6526
- * WP Cron is executed on a site level. When running in a multisite network environment
6527
- * with the network integration activated, for optimization reasons, we are consolidating
6528
- * the installs data sync cron to be executed only from a single site.
6529
- *
6530
- * @author Vova Feldman (@svovaf)
6531
- * @since 2.0.0
6532
- *
6533
- * @param int $except_blog_id Target any except the excluded blog ID.
6534
- *
6535
- * @return int
6536
- */
6537
- private function get_cron_target_blog_id( $except_blog_id = 0 ) {
6538
- if ( ! is_multisite() ) {
6539
- return 0;
6540
- }
6541
-
6542
- if ( $this->_is_network_active &&
6543
- is_numeric( $this->_storage->network_install_blog_id ) &&
6544
- $except_blog_id != $this->_storage->network_install_blog_id &&
6545
- self::is_site_active( $this->_storage->network_install_blog_id )
6546
- ) {
6547
- // Try to run cron from the main network blog.
6548
- $install = $this->get_install_by_blog_id( $this->_storage->network_install_blog_id );
6549
-
6550
- if ( is_object( $install ) &&
6551
- ( $this->is_premium() || $install->is_tracking_allowed() )
6552
- ) {
6553
- return $this->_storage->network_install_blog_id;
6554
- }
6555
- }
6556
-
6557
- // Get first opted-in blog ID with active tracking.
6558
- $installs = $this->get_blog_install_map();
6559
- foreach ( $installs as $blog_id => $install ) {
6560
- if ( $except_blog_id != $blog_id &&
6561
- self::is_site_active( $blog_id ) &&
6562
- ( $this->is_premium() || $install->is_tracking_allowed() )
6563
- ) {
6564
- return $blog_id;
6565
- }
6566
- }
6567
-
6568
- return 0;
6569
- }
6570
-
6571
- /**
6572
- * @author Vova Feldman (@svovaf)
6573
- * @since 2.0.0
6574
- *
6575
- * @param string $name Cron name.
6576
- * @param string $action_tag Callback action tag.
6577
- * @param bool $is_network_clear If set to TRUE, clear sync cron even if there are installs that are still connected.
6578
- */
6579
- private function clear_cron( $name, $action_tag = '', $is_network_clear = false ) {
6580
- $this->_logger->entrance( $name );
6581
-
6582
- if ( ! $this->is_cron_on( $name ) ) {
6583
- return;
6584
- }
6585
-
6586
- $clear_cron = true;
6587
- if ( ! $is_network_clear && $this->_is_network_active ) {
6588
- $installs = $this->get_blog_install_map();
6589
-
6590
- foreach ( $installs as $blog_id => $install ) {
6591
- /**
6592
- * @var FS_Site $install
6593
- */
6594
- if ( $install->is_tracking_allowed() ) {
6595
- $clear_cron = false;
6596
- break;
6597
- }
6598
- }
6599
- }
6600
-
6601
- if ( ! $clear_cron ) {
6602
- return;
6603
- }
6604
-
6605
- /**
6606
- * @var object $cron_data
6607
- */
6608
- $cron_data = $this->get_cron_data( $name );
6609
-
6610
- $cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
6611
- $cron_data->blog_id :
6612
- 0;
6613
-
6614
- $this->clear_cron_data( $name );
6615
-
6616
- if ( 0 < $cron_blog_id ) {
6617
- switch_to_blog( $cron_blog_id );
6618
- }
6619
-
6620
- if ( empty( $action_tag ) ) {
6621
- $action_tag = $name;
6622
- }
6623
-
6624
- wp_clear_scheduled_hook( $this->get_action_tag( $action_tag ) );
6625
-
6626
- if ( 0 < $cron_blog_id ) {
6627
- restore_current_blog();
6628
- }
6629
- }
6630
-
6631
- /**
6632
- * Unix timestamp for next cron execution or false if not scheduled.
6633
- *
6634
- * @author Vova Feldman (@svovaf)
6635
- * @since 2.0.0
6636
- *
6637
- * @param string $name Cron name.
6638
- * @param string $action_tag Callback action tag.
6639
- *
6640
- * @return int|false
6641
- */
6642
- private function get_next_scheduled_cron( $name, $action_tag = '' ) {
6643
- $this->_logger->entrance( $name );
6644
-
6645
- if ( ! $this->is_cron_on( $name ) ) {
6646
- return false;
6647
- }
6648
-
6649
- /**
6650
- * @var object $cron_data
6651
- */
6652
- $cron_data = $this->get_cron_data( $name );
6653
-
6654
- $cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
6655
- $cron_data->blog_id :
6656
- 0;
6657
-
6658
- if ( 0 < $cron_blog_id ) {
6659
- switch_to_blog( $cron_blog_id );
6660
- }
6661
-
6662
- if ( empty( $action_tag ) ) {
6663
- $action_tag = $name;
6664
- }
6665
-
6666
- $next_scheduled = wp_next_scheduled( $this->get_action_tag( $action_tag ) );
6667
-
6668
- if ( 0 < $cron_blog_id ) {
6669
- restore_current_blog();
6670
- }
6671
-
6672
- return $next_scheduled;
6673
- }
6674
-
6675
- /**
6676
- * @author Vova Feldman (@svovaf)
6677
- * @since 2.0.0
6678
- *
6679
- * @param string $name Cron name.
6680
- * @param string $action_tag Callback action tag.
6681
- * @param string $recurrence 'single' or 'daily'.
6682
- * @param int $start_at Defaults to now.
6683
- * @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
6684
- * @param int $except_blog_id Target any except the excluded blog ID.
6685
- */
6686
- private function schedule_cron(
6687
- $name,
6688
- $action_tag = '',
6689
- $recurrence = 'single',
6690
- $start_at = WP_FS__SCRIPT_START_TIME,
6691
- $randomize_start = true,
6692
- $except_blog_id = 0
6693
- ) {
6694
- $this->_logger->entrance( $name );
6695
-
6696
- $this->clear_cron( $name, $action_tag, true );
6697
-
6698
- $cron_blog_id = $this->get_cron_target_blog_id( $except_blog_id );
6699
-
6700
- if ( is_multisite() && 0 == $cron_blog_id ) {
6701
- // Don't schedule cron since couldn't find a target blog.
6702
- return;
6703
- }
6704
-
6705
- if ( 0 < $cron_blog_id ) {
6706
- switch_to_blog( $cron_blog_id );
6707
- }
6708
-
6709
- if ( 'daily' === $recurrence ) {
6710
- if ( $randomize_start ) {
6711
- // Schedule first sync with a random 12 hour time range from now.
6712
- $start_at += rand( 0, ( WP_FS__TIME_24_HOURS_IN_SEC / 2 ) );
6713
- }
6714
-
6715
- // Schedule daily WP cron.
6716
- wp_schedule_event(
6717
- $start_at,
6718
- 'daily',
6719
- $this->get_action_tag( $action_tag )
6720
- );
6721
- } else if ( 'single' === $recurrence ) {
6722
- // Schedule single cron.
6723
- wp_schedule_single_event(
6724
- $start_at,
6725
- $this->get_action_tag( $action_tag )
6726
- );
6727
- }
6728
-
6729
- $this->set_cron_data( $name, $cron_blog_id );
6730
-
6731
- if ( 0 < $cron_blog_id ) {
6732
- restore_current_blog();
6733
- }
6734
- }
6735
-
6736
- /**
6737
- * Consolidated cron execution for performance optimization. The max number of API requests is based on the number of unique opted-in users.
6738
- * that doesn't halt page loading.
6739
- *
6740
- * @author Vova Feldman (@svovaf)
6741
- * @since 2.0.0
6742
- *
6743
- * @param string $name Cron name.
6744
- * @param callable $callable The function that should be executed.
6745
- */
6746
- private function execute_cron( $name, $callable ) {
6747
- $this->_logger->entrance( $name );
6748
-
6749
- // Store the last time data sync was executed.
6750
- $this->set_cron_execution_timestamp( $name );
6751
-
6752
- // Check if API is temporary down.
6753
- if ( FS_Api::is_temporary_down() ) {
6754
- return;
6755
- }
6756
-
6757
- // @todo Add logic that identifies API latency, and reschedule the next background sync randomly between 8-16 hours.
6758
-
6759
- $users_2_blog_ids = array();
6760
-
6761
- if ( ! is_multisite() ) {
6762
- // Add dummy blog.
6763
- $users_2_blog_ids[0] = array( 0 );
6764
- } else {
6765
- $installs = $this->get_blog_install_map();
6766
- foreach ( $installs as $blog_id => $install ) {
6767
- if ( $this->is_premium() || $install->is_tracking_allowed() ) {
6768
- if ( ! isset( $users_2_blog_ids[ $install->user_id ] ) ) {
6769
- $users_2_blog_ids[ $install->user_id ] = array();
6770
- }
6771
-
6772
- $users_2_blog_ids[ $install->user_id ][] = $blog_id;
6773
- }
6774
- }
6775
- }
6776
-
6777
- $current_blog_id = get_current_blog_id();
6778
-
6779
- foreach ( $users_2_blog_ids as $user_id => $blog_ids ) {
6780
- if ( 0 < $blog_ids[0] ) {
6781
- $this->switch_to_blog( $blog_ids[0] );
6782
- }
6783
-
6784
- call_user_func_array( $callable, array( $blog_ids, ( is_multisite() ? $current_blog_id : null ) ) );
6785
-
6786
- foreach ( $blog_ids as $blog_id ) {
6787
- $this->do_action( "after_{$name}_cron", $blog_id );
6788
- }
6789
- }
6790
-
6791
- if ( is_multisite() ) {
6792
- $this->switch_to_blog( $current_blog_id, fs_is_network_admin() ? $this->get_network_install() : null );
6793
-
6794
- $this->do_action( "after_{$name}_cron_multisite" );
6795
- }
6796
- }
6797
-
6798
- #endregion
6799
-
6800
- #----------------------------------------------------------------------------------
6801
- #region Daily Sync Cron
6802
- #----------------------------------------------------------------------------------
6803
-
6804
-
6805
- /**
6806
- * @author Vova Feldman (@svovaf)
6807
- * @since 2.0.0
6808
- *
6809
- * @return bool
6810
- */
6811
- private function is_sync_cron_scheduled() {
6812
- return $this->is_cron_on( 'sync' );
6813
- }
6814
-
6815
- /**
6816
- * Get the sync cron's executing blog ID.
6817
- *
6818
- * @author Vova Feldman (@svovaf)
6819
- * @since 2.0.0
6820
- *
6821
- * @return int
6822
- */
6823
- private function get_sync_cron_blog_id() {
6824
- return $this->get_cron_blog_id( 'sync' );
6825
- }
6826
-
6827
- /**
6828
- * @author Vova Feldman (@svovaf)
6829
- * @since 1.1.7.3
6830
- */
6831
- private function run_manual_sync() {
6832
- self::require_pluggable_essentials();
6833
-
6834
- if ( ! $this->is_user_admin() ) {
6835
- return;
6836
- }
6837
-
6838
- // Run manual sync.
6839
- $this->_sync_cron();
6840
-
6841
- // Reschedule next cron to run 24 hours from now (performance optimization).
6842
- $this->schedule_sync_cron( time() + WP_FS__TIME_24_HOURS_IN_SEC, false );
6843
- }
6844
-
6845
- /**
6846
- * Data sync cron job. Replaces the background sync non blocking HTTP request
6847
- * that doesn't halt page loading.
6848
- *
6849
- * @author Vova Feldman (@svovaf)
6850
- * @since 1.1.7.3
6851
- * @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
6852
- */
6853
- function _sync_cron() {
6854
- $this->_logger->entrance();
6855
-
6856
- $this->execute_cron( 'sync', array( &$this, '_sync_cron_method' ) );
6857
- }
6858
-
6859
- /**
6860
- * The actual data sync cron logic.
6861
- *
6862
- * @author Vova Feldman (@svovaf)
6863
- * @since 2.0.0
6864
- *
6865
- * @param int[] $blog_ids
6866
- * @param int|null $current_blog_id @since 2.2.3. This is passed from the `execute_cron` method and used by the
6867
- * `_sync_plugin_license` method in order to switch to the previous blog when sending
6868
- * updates for a single site in case `execute_cron` has switched to a different blog.
6869
- */
6870
- function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
6871
- if ( $this->is_registered() ) {
6872
- if ( $this->has_paid_plan() ) {
6873
- // Initiate background plan sync.
6874
- $this->_sync_license( true, false, $current_blog_id );
6875
-
6876
- if ( $this->is_paying() ) {
6877
- // Check for premium plugin updates.
6878
- $this->check_updates( true );
6879
- }
6880
- } else {
6881
- // Sync install(s) (only if something changed locally).
6882
- if ( 1 < count( $blog_ids ) ) {
6883
- $this->sync_installs();
6884
- } else {
6885
- $this->sync_install();
6886
- }
6887
-
6888
- $this->maybe_sync_install_user();
6889
- }
6890
- }
6891
- }
6892
-
6893
- /**
6894
- * Check if sync was executed in the last $period of seconds.
6895
- *
6896
- * @author Vova Feldman (@svovaf)
6897
- * @since 1.1.7.3
6898
- *
6899
- * @param int $period In seconds
6900
- *
6901
- * @return bool
6902
- */
6903
- private function is_sync_executed( $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
6904
- return $this->is_cron_executed( 'sync', $period );
6905
- }
6906
-
6907
- /**
6908
- * @author Vova Feldman (@svovaf)
6909
- * @since 1.1.7.3
6910
- *
6911
- * @return bool
6912
- */
6913
- private function is_sync_cron_on() {
6914
- return $this->is_cron_on( 'sync' );
6915
- }
6916
-
6917
- /**
6918
- * @author Vova Feldman (@svovaf)
6919
- * @since 1.1.7.3
6920
- *
6921
- * @param int $start_at Defaults to now.
6922
- * @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
6923
- * @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
6924
- */
6925
- private function schedule_sync_cron(
6926
- $start_at = WP_FS__SCRIPT_START_TIME,
6927
- $randomize_start = true,
6928
- $except_blog_id = 0
6929
- ) {
6930
- $this->schedule_cron(
6931
- 'sync',
6932
- 'data_sync',
6933
- 'daily',
6934
- $start_at,
6935
- $randomize_start,
6936
- $except_blog_id
6937
- );
6938
- }
6939
-
6940
- /**
6941
- * Add the actual sync function to the cron job hook.
6942
- *
6943
- * @author Vova Feldman (@svovaf)
6944
- * @since 1.1.7.3
6945
- */
6946
- private function hook_callback_to_sync_cron() {
6947
- $this->add_action( 'data_sync', array( &$this, '_sync_cron' ) );
6948
- }
6949
-
6950
- /**
6951
- * @author Vova Feldman (@svovaf)
6952
- * @since 1.1.7.3
6953
- *
6954
- * @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
6955
- */
6956
- private function clear_sync_cron( $is_network_clear = false ) {
6957
- $this->_logger->entrance();
6958
-
6959
- $this->clear_cron( 'sync', 'data_sync', $is_network_clear );
6960
- }
6961
-
6962
- /**
6963
- * Unix timestamp for next sync cron execution or false if not scheduled.
6964
- *
6965
- * @author Vova Feldman (@svovaf)
6966
- * @since 1.1.7.3
6967
- *
6968
- * @return int|false
6969
- */
6970
- function next_sync_cron() {
6971
- return $this->get_next_scheduled_cron( 'sync', 'data_sync' );
6972
- }
6973
-
6974
- /**
6975
- * Unix timestamp for previous sync cron execution or false if never executed.
6976
- *
6977
- * @author Vova Feldman (@svovaf)
6978
- * @since 1.1.7.3
6979
- *
6980
- * @return int|false
6981
- */
6982
- function last_sync_cron() {
6983
- return $this->cron_last_execution( 'sync' );
6984
- }
6985
-
6986
- #endregion Daily Sync Cron ------------------------------------------------------------------
6987
-
6988
- #----------------------------------------------------------------------------------
6989
- #region Async Install Sync
6990
- #----------------------------------------------------------------------------------
6991
-
6992
- /**
6993
- * @author Vova Feldman (@svovaf)
6994
- * @since 1.1.7.3
6995
- *
6996
- * @return bool
6997
- */
6998
- private function is_install_sync_scheduled() {
6999
- return $this->is_cron_on( 'install_sync' );
7000
- }
7001
-
7002
- /**
7003
- * Get the sync cron's executing blog ID.
7004
- *
7005
- * @author Vova Feldman (@svovaf)
7006
- * @since 2.0.0
7007
- *
7008
- * @return int
7009
- */
7010
- private function get_install_sync_cron_blog_id() {
7011
- return $this->get_cron_blog_id( 'install_sync' );
7012
- }
7013
-
7014
- /**
7015
- * Instead of running blocking install sync event, execute non blocking scheduled wp-cron.
7016
- *
7017
- * @author Vova Feldman (@svovaf)
7018
- * @since 1.1.7.3
7019
- *
7020
- * @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
7021
- */
7022
- private function schedule_install_sync( $except_blog_id = 0 ) {
7023
- $this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
7024
- }
7025
-
7026
- /**
7027
- * Unix timestamp for previous install sync cron execution or false if never executed.
7028
- *
7029
- * @todo There's some very strange bug that $this->_storage->install_sync_timestamp value is not being updated. But for sure the sync event is working.
7030
- *
7031
- * @author Vova Feldman (@svovaf)
7032
- * @since 1.1.7.3
7033
- *
7034
- * @return int|false
7035
- */
7036
- function last_install_sync() {
7037
- return $this->cron_last_execution( 'install_sync' );
7038
- }
7039
-
7040
- /**
7041
- * Unix timestamp for next install sync cron execution or false if not scheduled.
7042
- *
7043
- * @author Vova Feldman (@svovaf)
7044
- * @since 1.1.7.3
7045
- *
7046
- * @return int|false
7047
- */
7048
- function next_install_sync() {
7049
- return $this->get_next_scheduled_cron( 'install_sync', 'install_sync' );
7050
- }
7051
-
7052
- /**
7053
- * Add the actual install sync function to the cron job hook.
7054
- *
7055
- * @author Vova Feldman (@svovaf)
7056
- * @since 1.1.7.3
7057
- */
7058
- private function hook_callback_to_install_sync() {
7059
- $this->add_action( 'install_sync', array( &$this, '_run_sync_install' ) );
7060
- }
7061
-
7062
- /**
7063
- * @author Vova Feldman (@svovaf)
7064
- * @since 1.1.7.3
7065
- *
7066
- * @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
7067
- */
7068
- private function clear_install_sync_cron( $is_network_clear = false ) {
7069
- $this->_logger->entrance();
7070
-
7071
- $this->clear_cron( 'install_sync', 'install_sync', $is_network_clear );
7072
- }
7073
-
7074
- /**
7075
- * @author Vova Feldman (@svovaf)
7076
- * @since 1.1.7.3
7077
- * @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
7078
- */
7079
- public function _run_sync_install() {
7080
- $this->_logger->entrance();
7081
-
7082
- $this->execute_cron( 'sync', array( &$this, '_sync_install_cron_method' ) );
7083
- }
7084
-
7085
- /**
7086
- * The actual install(s) sync cron logic.
7087
- *
7088
- * @author Vova Feldman (@svovaf)
7089
- * @since 2.0.0
7090
- *
7091
- * @param int[] $blog_ids
7092
- * @param int|null $current_blog_id
7093
- */
7094
- function _sync_install_cron_method( array $blog_ids, $current_blog_id = null ) {
7095
- if ( $this->is_registered() ) {
7096
- if ( 1 < count( $blog_ids ) ) {
7097
- $this->sync_installs( array(), true );
7098
- } else {
7099
- $this->sync_install( array(), true );
7100
- }
7101
-
7102
- $this->maybe_sync_install_user();
7103
- }
7104
- }
7105
-
7106
- #endregion Async Install Sync ------------------------------------------------------------------
7107
-
7108
- /**
7109
- * Show a notice that activation is currently pending.
7110
- *
7111
- * @author Vova Feldman (@svovaf)
7112
- * @since 1.0.7
7113
- *
7114
- * @param bool|string $email
7115
- * @param bool $is_pending_trial Since 1.2.1.5
7116
- */
7117
- function _add_pending_activation_notice( $email = false, $is_pending_trial = false ) {
7118
- if ( ! is_string( $email ) ) {
7119
- $current_user = self::_get_current_wp_user();
7120
- $email = $current_user->user_email;
7121
- }
7122
-
7123
- $this->_admin_notices->add_sticky(
7124
- sprintf(
7125
- $this->get_text_inline( 'You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s.', 'pending-activation-message' ),
7126
- '<b>' . $this->get_plugin_name() . '</b>',
7127
- '<b>' . $email . '</b>',
7128
- ( $is_pending_trial ?
7129
- $this->get_text_inline( 'start the trial', 'start-the-trial' ) :
7130
- $this->get_text_inline( 'complete the install', 'complete-the-install' ) )
7131
- ),
7132
- 'activation_pending',
7133
- 'Thanks!'
7134
- );
7135
- }
7136
-
7137
- /**
7138
- * Check if currently in plugin activation.
7139
- *
7140
- * @author Vova Feldman (@svovaf)
7141
- * @since 1.1.4
7142
- *
7143
- * @return bool
7144
- */
7145
- function is_plugin_activation() {
7146
- $result = get_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
7147
-
7148
- return !empty($result);
7149
- }
7150
-
7151
- /**
7152
- *
7153
- * NOTE: admin_menu action executed before admin_init.
7154
- *
7155
- * @author Vova Feldman (@svovaf)
7156
- * @since 1.0.7
7157
- */
7158
- function _admin_init_action() {
7159
- $is_migration = $this->is_migration();
7160
-
7161
- /**
7162
- * Automatically redirect to connect/activation page after plugin activation.
7163
- *
7164
- * @since 1.1.7 Do NOT redirect to opt-in when running in network admin mode.
7165
- */
7166
- if ( $this->is_plugin_activation() ) {
7167
- delete_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
7168
-
7169
- if ( isset( $_GET['activate-multi'] ) ) {
7170
- /**
7171
- * Don't redirect if activating multiple plugins at once (bulk activation).
7172
- */
7173
- } else if ( ! $is_migration ) {
7174
- $this->_redirect_on_activation_hook();
7175
- return;
7176
- }
7177
- }
7178
-
7179
- if ( $is_migration ) {
7180
- return;
7181
- }
7182
-
7183
- if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
7184
- check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
7185
-
7186
- $this->skip_connection( null, fs_is_network_admin() );
7187
-
7188
- fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
7189
- }
7190
-
7191
- if ( $this->is_network_activation_mode() &&
7192
- fs_request_is_action( $this->get_unique_affix() . '_delegate_activation' )
7193
- ) {
7194
- check_admin_referer( $this->get_unique_affix() . '_delegate_activation' );
7195
-
7196
- $this->delegate_connection();
7197
-
7198
- fs_redirect( $this->get_after_activation_url( 'after_delegation_url' ) );
7199
- }
7200
-
7201
- $this->_add_upgrade_action_link();
7202
-
7203
- if ( ! ( ! $this->_is_network_active && fs_is_network_admin() ) &&
7204
- (
7205
- ( true === $this->_storage->require_license_activation ) ||
7206
- // Not registered nor anonymous.
7207
- ( ! $this->is_registered() && ! $this->is_anonymous() ) ||
7208
- // OR, network level and in network upgrade mode.
7209
- ( fs_is_network_admin() && $this->_is_network_active && $this->is_network_upgrade_mode() )
7210
- )
7211
- ) {
7212
- if ( ! $this->is_pending_activation() ) {
7213
- if ( ! $this->is_activation_page() ) {
7214
- /**
7215
- * If a user visits any other admin page before activating the premium-only theme with a valid
7216
- * license, reactivate the previous theme.
7217
- *
7218
- * @author Leo Fajardo (@leorw)
7219
- * @since 1.2.2
7220
- */
7221
- if ( $this->is_theme() &&
7222
- ! $this->has_settings_menu() &&
7223
- ! isset( $_REQUEST['fs_action'] ) &&
7224
- $this->can_activate_previous_theme()
7225
- ) {
7226
- if ( $this->is_only_premium() ) {
7227
- $this->activate_previous_theme();
7228
- return;
7229
- }
7230
-
7231
- if ( true === $this->_storage->require_license_activation ) {
7232
- $this->_storage->require_license_activation = false;
7233
- }
7234
- }
7235
-
7236
- if ( ! fs_is_network_admin() &&
7237
- $this->is_network_activation_mode() &&
7238
- ! $this->is_delegated_connection()
7239
- ) {
7240
- return;
7241
- }
7242
-
7243
- if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
7244
- if ( ! $this->_anonymous_mode &&
7245
- ( ! $this->is_addon() || ! $this->_parent->is_anonymous() ) ) {
7246
- // Show notice for new plugin installations.
7247
- $this->_admin_notices->add(
7248
- sprintf(
7249
- $this->get_text_inline( 'You are just one step away - %s', 'you-are-step-away' ),
7250
- sprintf( '<b><a href="%s">%s</a></b>',
7251
- $this->get_activation_url( array(), ! $this->is_delegated_connection() ),
7252
- sprintf( $this->get_text_x_inline( 'Complete "%s" Activation Now',
7253
- '%s - plugin name. As complete "PluginX" activation now', 'activate-x-now' ), $this->get_plugin_name() )
7254
- )
7255
- ),
7256
- '',
7257
- 'update-nag'
7258
- );
7259
- }
7260
- } else {
7261
- if ( $this->should_add_sticky_optin_notice() ) {
7262
- $this->add_sticky_optin_admin_notice();
7263
- }
7264
-
7265
- if ( $this->has_filter( 'optin_pointer_element' ) ) {
7266
- // Don't show admin nag if plugin update.
7267
- wp_enqueue_script( 'wp-pointer' );
7268
- wp_enqueue_style( 'wp-pointer' );
7269
-
7270
- $this->_enqueue_connect_essentials();
7271
-
7272
- add_action( 'admin_print_footer_scripts', array(
7273
- $this,
7274
- '_add_connect_pointer_script'
7275
- ) );
7276
- }
7277
- }
7278
- }
7279
- }
7280
-
7281
- if ( $this->show_opt_in_on_themes_page() &&
7282
- $this->is_activation_page()
7283
- ) {
7284
- $this->_show_theme_activation_optin_dialog();
7285
- }
7286
- }
7287
- }
7288
-
7289
- /**
7290
- * @author Vova Feldman (@svovaf)
7291
- * @since 2.0.0
7292
- *
7293
- * @return bool
7294
- */
7295
- private function should_add_sticky_optin_notice() {
7296
- if ( $this->is_addon() && $this->_parent->is_anonymous() ) {
7297
- return false;
7298
- }
7299
-
7300
- if ( fs_is_network_admin() ) {
7301
- if ( ! $this->_is_network_active ) {
7302
- return false;
7303
- }
7304
-
7305
- if ( ! $this->is_network_activation_mode() ) {
7306
- return false;
7307
- }
7308
-
7309
- return ! isset( $this->_storage->sticky_optin_added_ms );
7310
- }
7311
-
7312
- if ( ! $this->is_activation_mode() ) {
7313
- return false;
7314
- }
7315
-
7316
- // If running from a blog admin and delegated the connection.
7317
- return ! isset( $this->_storage->sticky_optin_added );
7318
- }
7319
-
7320
- /**
7321
- * @author Leo Fajardo (@leorw)
7322
- * @since 2.0.0
7323
- */
7324
- private function add_sticky_optin_admin_notice() {
7325
- if ( ! $this->_is_network_active || ! fs_is_network_admin() ) {
7326
- $this->_storage->sticky_optin_added = true;
7327
- } else {
7328
- $this->_storage->sticky_optin_added_ms = true;
7329
- }
7330
-
7331
- // Show notice for new plugin installations.
7332
- $this->_admin_notices->add_sticky(
7333
- sprintf(
7334
- $this->get_text_inline( 'We made a few tweaks to the %s, %s', 'few-plugin-tweaks' ),
7335
- $this->_module_type,
7336
- sprintf( '<b><a href="%s">%s</a></b>',
7337
- $this->get_activation_url(),
7338
- sprintf( $this->get_text_inline( 'Opt in to make "%s" better!', 'optin-x-now' ), $this->get_plugin_name() )
7339
- )
7340
- ),
7341
- 'connect_account',
7342
- '',
7343
- 'update-nag'
7344
- );
7345
- }
7346
-
7347
- /**
7348
- * Enqueue connect requires scripts and styles.
7349
- *
7350
- * @author Vova Feldman (@svovaf)
7351
- * @since 1.1.4
7352
- */
7353
- function _enqueue_connect_essentials() {
7354
- wp_enqueue_script( 'jquery' );
7355
- wp_enqueue_script( 'json2' );
7356
-
7357
- fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
7358
- fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
7359
-
7360
- fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' );
7361
- }
7362
-
7363
- /**
7364
- * Add connect / opt-in pointer.
7365
- *
7366
- * @author Vova Feldman (@svovaf)
7367
- * @since 1.1.4
7368
- */
7369
- function _add_connect_pointer_script() {
7370
- $vars = array( 'id' => $this->_module_id );
7371
- $pointer_content = fs_get_template( 'connect.php', $vars );
7372
- ?>
7373
- <script type="text/javascript">// <![CDATA[
7374
- jQuery(document).ready(function ($) {
7375
- if ('undefined' !== typeof(jQuery().pointer)) {
7376
-
7377
- var element = <?php echo $this->apply_filters( 'optin_pointer_element', '$("#non_existing_element");' ) ?>;
7378
-
7379
- if (element.length > 0) {
7380
- var optin = $(element).pointer($.extend(true, {}, {
7381
- content : <?php echo json_encode( $pointer_content ) ?>,
7382
- position : {
7383
- edge : 'left',
7384
- align: 'center'
7385
- },
7386
- buttons : function () {
7387
- // Don't show pointer buttons.
7388
- return '';
7389
- },
7390
- pointerWidth: 482
7391
- }, <?php echo $this->apply_filters( 'optin_pointer_options_json', '{}' ) ?>));
7392
-
7393
- <?php
7394
- echo $this->apply_filters( 'optin_pointer_execute', "
7395
-
7396
- optin.pointer('open');
7397
-
7398
- // Tag the opt-in pointer with custom class.
7399
- $('.wp-pointer #fs_connect')
7400
- .parents('.wp-pointer.wp-pointer-top')
7401
- .addClass('fs-opt-in-pointer');
7402
-
7403
- ", 'element', 'optin' ) ?>
7404
- }
7405
- }
7406
- });
7407
- // ]]></script>
7408
- <?php
7409
- }
7410
-
7411
- /**
7412
- * Return current page's URL.
7413
- *
7414
- * @author Vova Feldman (@svovaf)
7415
- * @since 1.0.7
7416
- *
7417
- * @return string
7418
- */
7419
- function current_page_url() {
7420
- $url = 'http';
7421
-
7422
- if ( isset( $_SERVER["HTTPS"] ) ) {
7423
- if ( $_SERVER["HTTPS"] == "on" ) {
7424
- $url .= "s";
7425
- }
7426
- }
7427
- $url .= "://";
7428
- if ( $_SERVER["SERVER_PORT"] != "80" ) {
7429
- $url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
7430
- } else {
7431
- $url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
7432
- }
7433
-
7434
- return esc_url( $url );
7435
- }
7436
-
7437
- /**
7438
- * Check if the current page is the plugin's main admin settings page.
7439
- *
7440
- * @author Vova Feldman (@svovaf)
7441
- * @since 1.0.7
7442
- *
7443
- * @return bool
7444
- */
7445
- function _is_plugin_page() {
7446
- return fs_is_plugin_page( $this->_menu->get_raw_slug() ) ||
7447
- fs_is_plugin_page( $this->_slug );
7448
- }
7449
-
7450
- /* Events
7451
- ------------------------------------------------------------------------------------------------------------------*/
7452
- /**
7453
- * Delete site install from Database.
7454
- *
7455
- * @author Vova Feldman (@svovaf)
7456
- * @since 1.0.1
7457
- *
7458
- * @param bool $store
7459
- * @param int|null $blog_id Since 2.0.0
7460
- *
7461
- * @return false|int The install ID if deleted. Otherwise, FALSE (when install not exist).
7462
- */
7463
- function _delete_site( $store = true, $blog_id = null ) {
7464
- return self::_delete_site_by_slug( $this->_slug, $this->_module_type, $store, $blog_id );
7465
- }
7466
-
7467
- /**
7468
- * Delete site install from Database.
7469
- *
7470
- * @author Vova Feldman (@svovaf)
7471
- * @since 1.2.2.7
7472
- *
7473
- * @param string $slug
7474
- * @param string $module_type
7475
- * @param bool $store
7476
- * @param int|null $blog_id Since 2.0.0
7477
- *
7478
- * @return false|int The install ID if deleted. Otherwise, FALSE (when install not exist).
7479
- */
7480
- static function _delete_site_by_slug( $slug, $module_type, $store = true, $blog_id = null ) {
7481
- $sites = self::get_all_sites( $module_type, $blog_id );
7482
-
7483
- $install_id = false;
7484
-
7485
- if ( isset( $sites[ $slug ] ) ) {
7486
- if ( is_object( $sites[ $slug ] ) ) {
7487
- $install_id = $sites[ $slug ]->id;
7488
- }
7489
-
7490
- unset( $sites[ $slug ] );
7491
-
7492
- self::set_account_option_by_module( $module_type, 'sites', $sites, $store, $blog_id );
7493
- }
7494
-
7495
- return $install_id;
7496
- }
7497
-
7498
- /**
7499
- * Delete user.
7500
- *
7501
- * @author Vova Feldman (@svovaf)
7502
- * @since 2.0.0
7503
- *
7504
- * @param number $user_id
7505
- * @param bool $store
7506
- *
7507
- * @return false|int The user ID if deleted. Otherwise, FALSE (when install not exist).
7508
- */
7509
- private static function delete_user( $user_id, $store = true ) {
7510
- $users = self::get_all_users();
7511
-
7512
- if ( ! is_array( $users ) || ! isset( $users[ $user_id ] ) ) {
7513
- return false;
7514
- }
7515
-
7516
- unset( $users[ $user_id ] );
7517
-
7518
- self::$_accounts->set_option( 'users', $users, $store );
7519
-
7520
- return $user_id;
7521
- }
7522
-
7523
- /**
7524
- * Delete plugin's plans information.
7525
- *
7526
- * @param bool $store Flush to Database if true.
7527
- * @param bool $keep_associated_plans If set to false, delete all plans, even if a plan is associated with an install.
7528
- *
7529
- * @author Vova Feldman (@svovaf)
7530
- * @since 1.0.9
7531
- */
7532
- private function _delete_plans( $store = true, $keep_associated_plans = true ) {
7533
- $this->_logger->entrance();
7534
-
7535
- $plans = self::get_all_plans( $this->_module_type );
7536
-
7537
- $plans_to_keep = array();
7538
-
7539
- if ( $keep_associated_plans ) {
7540
- $plans_ids_to_keep = $this->get_plans_ids_associated_with_installs();
7541
- foreach ( $plans_ids_to_keep as $plan_id ) {
7542
- $plan = self::_get_plan_by_id( $plan_id );
7543
- if ( is_object( $plan ) ) {
7544
- $plans_to_keep[] = self::_encrypt_entity( $plan );
7545
- }
7546
- }
7547
- }
7548
-
7549
- if ( ! empty( $plans_to_keep ) ) {
7550
- $plans[ $this->_slug ] = $plans_to_keep;
7551
- } else {
7552
- unset( $plans[ $this->_slug ] );
7553
- }
7554
-
7555
- $this->set_account_option( 'plans', $plans, $store );
7556
- }
7557
-
7558
- /**
7559
- * Delete all plugin licenses.
7560
- *
7561
- * @author Vova Feldman (@svovaf)
7562
- * @since 1.0.9
7563
- *
7564
- * @param bool $store
7565
- */
7566
- private function _delete_licenses( $store = true ) {
7567
- $this->_logger->entrance();
7568
-
7569
- $all_licenses = self::get_all_licenses();
7570
-
7571
- unset( $all_licenses[ $this->_module_id ] );
7572
-
7573
- self::$_accounts->set_option( 'all_licenses', $all_licenses, $store );
7574
- }
7575
-
7576
- /**
7577
- * Check if Freemius was added on new plugin installation.
7578
- *
7579
- * @author Vova Feldman (@svovaf)
7580
- * @since 1.1.5
7581
- *
7582
- * @return bool
7583
- */
7584
- function is_plugin_new_install() {
7585
- return isset( $this->_storage->is_plugin_new_install ) &&
7586
- $this->_storage->is_plugin_new_install;
7587
- }
7588
-
7589
- /**
7590
- * Check if it's the first plugin release that is running Freemius.
7591
- *
7592
- * @author Vova Feldman (@svovaf)
7593
- * @since 1.2.1.5
7594
- *
7595
- * @return bool
7596
- */
7597
- function is_first_freemius_powered_version() {
7598
- return empty( $this->_storage->plugin_last_version );
7599
- }
7600
-
7601
- /**
7602
- * @author Leo Fajardo (@leorw)
7603
- * @since 1.2.2
7604
- *
7605
- * @return bool|string
7606
- */
7607
- private function get_previous_theme_slug() {
7608
- return isset( $this->_storage->previous_theme ) ?
7609
- $this->_storage->previous_theme :
7610
- false;
7611
- }
7612
-
7613
- /**
7614
- * @author Leo Fajardo (@leorw)
7615
- * @since 1.2.2
7616
- *
7617
- * @return string
7618
- */
7619
- private function can_activate_previous_theme() {
7620
- $slug = $this->get_previous_theme_slug();
7621
- if ( false !== $slug && current_user_can( 'switch_themes' ) ) {
7622
- $theme_instance = wp_get_theme( $slug );
7623
-
7624
- return $theme_instance->exists();
7625
- }
7626
-
7627
- return false;
7628
- }
7629
-
7630
- /**
7631
- * @author Leo Fajardo (@leorw)
7632
- * @since 1.2.2
7633
- */
7634
- private function activate_previous_theme() {
7635
- switch_theme( $this->get_previous_theme_slug() );
7636
- unset( $this->_storage->previous_theme );
7637
-
7638
- global $pagenow;
7639
- if ( 'themes.php' === $pagenow ) {
7640
- /**
7641
- * Refresh the active theme information.
7642
- *
7643
- * @author Leo Fajardo (@leorw)
7644
- * @since 1.2.2
7645
- */
7646
- fs_redirect( $this->admin_url( $pagenow ) );
7647
- }
7648
- }
7649
-
7650
- /**
7651
- * @author Leo Fajardo (@leorw)
7652
- * @since 1.2.2
7653
- *
7654
- * @return string
7655
- */
7656
- function get_previous_theme_activation_url() {
7657
- if ( ! $this->can_activate_previous_theme() ) {
7658
- return '';
7659
- }
7660
-
7661
- /**
7662
- * Activation URL
7663
- *
7664
- * @author Leo Fajardo (@leorw)
7665
- * @since 1.2.2
7666
- */
7667
- return wp_nonce_url(
7668
- $this->admin_url( 'themes.php?action=activate&stylesheet=' . urlencode( $this->get_previous_theme_slug() ) ),
7669
- 'switch-theme_' . $this->get_previous_theme_slug()
7670
- );
7671
- }
7672
-
7673
- /**
7674
- * Saves the slug of the previous theme if it still exists so that it can be used by the logic in the opt-in
7675
- * form that decides whether to add a close button to the opt-in dialog or not. So after a premium-only theme is
7676
- * activated, the close button will appear and will reactivate the previous theme if clicked. If the previous
7677
- * theme doesn't exist, then there will be no close button.
7678
- *
7679
- * @author Leo Fajardo (@leorw)
7680
- * @since 1.2.2
7681
- *
7682
- * @param string $slug_or_name Old theme's slug or name.
7683
- * @param bool|WP_Theme $old_theme WP_Theme instance of the old theme if it still exists.
7684
- */
7685
- function _activate_theme_event_hook( $slug_or_name, $old_theme = false ) {
7686
- $this->_storage->previous_theme = ( false !== $old_theme ) ?
7687
- $old_theme->get_stylesheet() :
7688
- $slug_or_name;
7689
-
7690
- $this->_activate_plugin_event_hook();
7691
- }
7692
-
7693
- /**
7694
- * Plugin activated hook.
7695
- *
7696
- * @author Vova Feldman (@svovaf)
7697
- * @since 1.0.1
7698
- *
7699
- * @uses FS_Api
7700
- */
7701
- function _activate_plugin_event_hook() {
7702
- $this->_logger->entrance( 'slug = ' . $this->_slug );
7703
-
7704
- if ( ! $this->is_user_admin() ) {
7705
- return;
7706
- }
7707
-
7708
- $this->unregister_uninstall_hook();
7709
-
7710
- // Clear API cache on activation.
7711
- FS_Api::clear_cache();
7712
-
7713
- $is_premium_version_activation = $this->is_plugin() ?
7714
- ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
7715
- $this->is_premium();
7716
-
7717
- $this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
7718
-
7719
- if ( $this->is_plugin() ) {
7720
- // This logic is relevant only to plugins since both the free and premium versions of a plugin can be active at the same time.
7721
- // 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
7722
- // 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
7723
- $other_version_basename = $is_premium_version_activation ?
7724
- $this->_free_plugin_basename :
7725
- $this->premium_plugin_basename();
7726
-
7727
- if ( ! $this->_is_network_active ) {
7728
- /**
7729
- * Themes are always network activated, but the ACTUAL activation is per site.
7730
- *
7731
- * During the activation, the plugin isn't yet active, therefore,
7732
- * _is_network_active will be set to false even if it's a network level
7733
- * activation. So we need to fix that by looking at the is_network_admin() value.
7734
- *
7735
- * @author Vova Feldman
7736
- */
7737
- $this->_is_network_active = (
7738
- $this->_is_multisite_integrated &&
7739
- fs_is_network_admin()
7740
- );
7741
- }
7742
-
7743
- /**
7744
- * If the other module version is active, deactivate it.
7745
- *
7746
- * is_plugin_active() checks if the plugin is active on the site or the network level and
7747
- * deactivate_plugins() deactivates the plugin whether it's activated on the site or network level.
7748
- *
7749
- * @author Leo Fajardo (@leorw)
7750
- * @since 1.2.2
7751
- */
7752
- if (
7753
- is_plugin_active( $other_version_basename ) &&
7754
- $this->apply_filters( 'deactivate_on_activation', true )
7755
- ) {
7756
- deactivate_plugins( $other_version_basename );
7757
- }
7758
- }
7759
-
7760
- if ( $this->is_registered() ) {
7761
- if ( $is_premium_version_activation ) {
7762
- $this->reconnect_locally();
7763
- }
7764
-
7765
-
7766
- // Schedule re-activation event and sync.
7767
- // $this->sync_install( array(), true );
7768
- $this->schedule_install_sync();
7769
-
7770
- // If activating the premium module version, add an admin notice to congratulate for an upgrade completion.
7771
- if ( $is_premium_version_activation ) {
7772
- $this->_admin_notices->add(
7773
- sprintf( $this->get_text_inline( 'The upgrade of %s was successfully completed.', 'successful-version-upgrade-message' ), sprintf( '<b>%s</b>', $this->_plugin->title ) ),
7774
- $this->get_text_x_inline( 'W00t',
7775
- 'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
7776
- );
7777
- }
7778
- } else if ( $this->is_anonymous() ) {
7779
- if ( isset( $this->_storage->is_anonymous_ms ) && $this->_storage->is_anonymous_ms['is'] ) {
7780
- $plugin_version = $this->_storage->is_anonymous_ms['version'];
7781
- $network = true;
7782
- } else {
7783
- $plugin_version = $this->_storage->is_anonymous['version'];
7784
- $network = false;
7785
- }
7786
-
7787
- /**
7788
- * Reset "skipped" click cache on the following:
7789
- * 1. Freemius DEV mode.
7790
- * 2. WordPress DEBUG mode.
7791
- * 3. If a plugin and the user skipped the exact same version before.
7792
- *
7793
- * @since 1.2.2.7 Ulrich Pogson (@grapplerulrich) asked to not reset the SKIPPED flag if the exact same THEME version was activated before unless the developer is running with WP_DEBUG on, or Freemius debug mode on (WP_FS__DEV_MODE).
7794
- *
7795
- * @todo 4. If explicitly asked to retry after every activation.
7796
- */
7797
- if ( WP_FS__DEV_MODE ||
7798
- (
7799
- ( $this->is_plugin() || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) &&
7800
- $this->get_plugin_version() == $plugin_version
7801
- )
7802
- ) {
7803
- $this->reset_anonymous_mode( $network );
7804
- }
7805
- }
7806
-
7807
- $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7808
-
7809
- if ( $this->is_addon() && ! $is_trial_or_has_features_enabled_license ) {
7810
- /**
7811
- * When activating an add-on, try to also activate a license.
7812
- *
7813
- * @author Leo Fajardo (@leorw)
7814
- * @since 2.3.0
7815
- */
7816
- if ( ! $this->_is_network_active ) {
7817
- $this->maybe_activate_addon_license();
7818
- } else {
7819
- $this->maybe_network_activate_addon_license();
7820
- }
7821
-
7822
- /**
7823
- * Avoid redirecting to the license activation screen after automatically activating an add-on license.
7824
- *
7825
- * @author Leo Fajardo (@leorw)
7826
- * @since 2.3.0
7827
- */
7828
- $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7829
-
7830
- if ( $is_trial_or_has_features_enabled_license && true === $this->_storage->require_license_activation ) {
7831
- $this->_storage->require_license_activation = false;
7832
- }
7833
- }
7834
-
7835
- if (
7836
- $is_premium_version_activation &&
7837
- (
7838
- ( ! $this->is_registered() && $this->is_anonymous() ) ||
7839
- (
7840
- $this->is_registered() &&
7841
- ! $is_trial_or_has_features_enabled_license
7842
- )
7843
- )
7844
- ) {
7845
- $this->_storage->require_license_activation = true;
7846
- }
7847
-
7848
- if ( ! isset( $this->_storage->is_plugin_new_install ) ) {
7849
- /**
7850
- * If no previous version of plugin's version exist, it means that it's either
7851
- * the first time that the plugin installed on the site, or the plugin was installed
7852
- * before but didn't have Freemius integrated.
7853
- *
7854
- * Since register_activation_hook() do NOT fires on updates since 3.1, and only fires
7855
- * on manual activation via the dashboard, is_plugin_activation() is TRUE
7856
- * only after immediate activation.
7857
- *
7858
- * @since 1.1.4
7859
- * @link https://make.wordpress.org/core/2010/10/27/plugin-activation-hooks-no-longer-fire-for-updates/
7860
- */
7861
- $this->_storage->is_plugin_new_install = empty( $this->_storage->plugin_last_version );
7862
- }
7863
-
7864
- /**
7865
- * Also flush when activating the premium version so that even if Freemius was off before, the API
7866
- * connectivity test can be run again.
7867
- *
7868
- * @author Leo Fajardo (@leorw)
7869
- * @since 2.2.3.1
7870
- */
7871
- $has_api_connectivity = $this->has_api_connectivity( WP_FS__DEV_MODE || $is_premium_version_activation );
7872
-
7873
- if ( ! $this->_anonymous_mode &&
7874
- $has_api_connectivity &&
7875
- ! $this->_isAutoInstall
7876
- ) {
7877
- // Store hint that the plugin was just activated to enable auto-redirection to settings.
7878
- set_transient( "fs_{$this->_module_type}_{$this->_slug}_activated", true, 60 );
7879
- }
7880
-
7881
- /**
7882
- * Activation hook is executed after the plugin's main file is loaded, therefore,
7883
- * after the plugin was loaded. The logic is located at activate_plugin()
7884
- * ./wp-admin/includes/plugin.php.
7885
- *
7886
- * @author Vova Feldman (@svovaf)
7887
- * @since 1.1.9
7888
- */
7889
- $this->_storage->was_plugin_loaded = true;
7890
- }
7891
-
7892
- /**
7893
- * @author Leo Fajardo (@leorw)
7894
- * @since 2.3.0
7895
- */
7896
- private function maybe_activate_addon_license() {
7897
- $parent_fs = $this->get_parent_instance();
7898
-
7899
- if (
7900
- ! is_object( $parent_fs ) ||
7901
- ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() )
7902
- ) {
7903
- // Try to activate a license only if the parent plugin is active and has a valid `install`.
7904
- return;
7905
- }
7906
-
7907
- $license = $this->get_active_parent_license();
7908
- if ( ! is_object( $license ) ) {
7909
- return;
7910
- }
7911
-
7912
- if (
7913
- $this->is_bundle_license_auto_activation_enabled() &&
7914
- ! empty( $license->products )
7915
- ) {
7916
- $this->activate_bundle_license( $license );
7917
-
7918
- return;
7919
- }
7920
-
7921
- if ( ! $this->is_registered() ) {
7922
- // Opt in with a license key.
7923
- $this->opt_in(
7924
- $parent_fs->get_current_or_network_user()->email,
7925
- false,
7926
- false,
7927
- $license->secret_key
7928
- );
7929
- } else {
7930
- // Activate the license.
7931
- $install = $this->get_api_site_scope()->call(
7932
- '/',
7933
- 'put',
7934
- array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
7935
- );
7936
-
7937
- if ( ! FS_Api::is_api_error( $install ) ) {
7938
- $this->_sync_addon_license( $this->get_id(), true );
7939
- }
7940
- }
7941
- }
7942
-
7943
- /**
7944
- * @author Leo Fajardo (@leorw)
7945
- * @since 2.3.0
7946
- *
7947
- * @param FS_Plugin_License $license
7948
- */
7949
- private function maybe_network_activate_addon_license( $license = null ) {
7950
- $parent_fs = $this->get_parent_instance();
7951
- if ( ! is_object( $parent_fs ) || ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() ) ) {
7952
- // Try to activate a license only if the parent plugin is active and has a valid `install`.
7953
- return;
7954
- }
7955
-
7956
- $license = ( ! is_null( $license ) ) ?
7957
- $license :
7958
- $this->get_active_parent_license();
7959
-
7960
- if ( ! is_object( $license ) ) {
7961
- return;
7962
- }
7963
-
7964
- if (
7965
- $this->is_bundle_license_auto_activation_enabled() &&
7966
- ! empty( $license->products )
7967
- ) {
7968
- $this->activate_bundle_license( $license );
7969
-
7970
- return;
7971
- }
7972
-
7973
- if ( ! $this->is_network_registered() ) {
7974
- $sites = $this->get_sites_for_network_level_optin();
7975
-
7976
- if ( count( $sites ) > $license->left() ) {
7977
- // If the add-on is network active, try to activate the license only if it can be activated on all sites.
7978
- return;
7979
- }
7980
-
7981
- // Opt in with a license key.
7982
- $this->opt_in(
7983
- $parent_fs->get_user()->email,
7984
- false,
7985
- false,
7986
- $license->secret_key,
7987
- false,
7988
- false,
7989
- false,
7990
- null,
7991
- $sites
7992
- );
7993
- } else {
7994
- $blog_2_install_map = array();
7995
- $site_ids = array();
7996
-
7997
- $all_sites = Freemius::get_sites();
7998
-
7999
- foreach ( $all_sites as $site ) {
8000
- $blog_id = Freemius::get_site_blog_id( $site );
8001
- $install = $this->get_install_by_blog_id( $blog_id );
8002
-
8003
- if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
8004
- // Skip license activation for installs that are already associated with a license.
8005
- continue;
8006
- }
8007
-
8008
- if ( is_object( $install ) ) {
8009
- $blog_2_install_map[ $blog_id ] = $install;
8010
- } else {
8011
- $site_ids[] = $blog_id;
8012
- }
8013
- }
8014
-
8015
- if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
8016
- return;
8017
- }
8018
-
8019
- $user = $this->get_current_or_network_user();
8020
-
8021
- if ( ! empty( $blog_2_install_map ) ) {
8022
- $result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
8023
-
8024
- if ( true !== $result ) {
8025
- return;
8026
- }
8027
- }
8028
-
8029
- if ( ! empty( $site_ids ) ) {
8030
- $this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
8031
- }
8032
- }
8033
- }
8034
-
8035
- /**
8036
- * Tries to activate a bundle license for all supported products if the current product is activated with a bundle license. This is called after activating an available license (not via the license activation dialog but by clicking on a license activation button) for a product via its "Account" page.
8037
- *
8038
- * @author Leo Fajardo (@leorw)
8039
- * @since 2.4.0
8040
- *
8041
- * @param FS_Plugin_License $license
8042
- * @param array $sites
8043
- * @param int $blog_id
8044
- */
8045
- private function maybe_activate_bundle_license( FS_Plugin_License $license = null, $sites = array(), $blog_id = 0 ) {
8046
- if ( ! is_object( $license ) && $this->has_active_valid_license() ) {
8047
- $license = $this->_license;
8048
- }
8049
-
8050
- if ( ! is_object( $license ) ) {
8051
- return;
8052
- }
8053
-
8054
- $parent_license = ( ! empty( $license->products ) ) ?
8055
- $license :
8056
- $this->get_active_parent_license( $license->secret_key );
8057
-
8058
- if ( is_object( $parent_license ) ) {
8059
- $this->activate_bundle_license( $parent_license, $sites, $blog_id );
8060
- }
8061
- }
8062
-
8063
- /**
8064
- * Try to activate a bundle license for all the bundle products installed on the site.
8065
- * (1) If a child product install already has a license, the bundle license won't be activated.
8066
- * (2) On multi-site networks, if the attempt to activate the bundle license is triggered from the network admin, the bundle license activation will only work for non-delegated sites and only if none of them is associated with a license. Even if one of the sites has the product installed with a license key, skip the bundle license activation for the product.
8067
- * (3) On multi-site networks, if the attempt to activate the bundle license is triggered from a site-level admin, only activate the license if the product is site-level activated or delegated, and the product installation is not yet associated with a license.
8068
- *
8069
- * @author Leo Fajardo (@leorw)
8070
- * @since 2.4.0
8071
- *
8072
- * @param FS_Plugin_License $license
8073
- * @param array $sites
8074
- * @param int $current_blog_id
8075
- */
8076
- private function activate_bundle_license( $license, $sites = array(), $current_blog_id = 0 ) {
8077
- $is_network_admin = fs_is_network_admin();
8078
-
8079
- $installs_by_blog_map = array();
8080
- $site_info_by_blog_map = array();
8081
-
8082
- /**
8083
- * Try to activate the license for all supported products.
8084
- *
8085
- * @author Leo Fajardo
8086
- */
8087
- foreach ( $license->products as $product_id ) {
8088
- $fs = self::get_instance_by_id( $product_id );
8089
-
8090
- if ( ! is_object( $fs ) ) {
8091
- continue;
8092
- }
8093
-
8094
- if ( ! $fs->has_paid_plan() ) {
8095
- continue;
8096
- }
8097
-
8098
- if (
8099
- ! $fs->is_addon() &&
8100
- ! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans )
8101
- ) {
8102
- /**
8103
- * The parent product can be free-only but can have its `has_paid_plan` flag set to `true` when
8104
- * there is a context bundle.
8105
- */
8106
- continue;
8107
- }
8108
-
8109
- if ( $current_blog_id > 0 ) {
8110
- $fs->switch_to_blog( $current_blog_id );
8111
- }
8112
-
8113
- if ( $fs->has_active_valid_license() ) {
8114
- continue;
8115
- }
8116
-
8117
- if ( ! $is_network_admin || $current_blog_id > 0 ) {
8118
- if ( $fs->is_network_active() && ! $fs->is_delegated_connection( $current_blog_id ) ) {
8119
- // Do not try to activate the license in the site level if the product is network active and the connection was not delegated.
8120
- continue;
8121
- }
8122
- } else {
8123
- if ( ! $fs->is_network_active() ) {
8124
- // Do not try to activate the license in the network level if the product is not network active.
8125
- continue;
8126
- }
8127
-
8128
- if ( $fs->is_network_delegated_connection() ) {
8129
- // Do not try to activate the license in the network level if the activation has been delegated to site admins.
8130
- continue;
8131
- }
8132
-
8133
- $has_install_with_license = false;
8134
-
8135
- // Collection of sites that have an install entity that is not activated with a license or non-delegated sites that have no install entity, or both types of site.
8136
- $filtered_sites = array();
8137
-
8138
- if ( empty( $sites ) ) {
8139
- $all_sites = self::get_sites();
8140
-
8141
- foreach ( $all_sites as $site ) {
8142
- $sites[] = array( 'blog_id' => self::get_site_blog_id( $site ) );
8143
- }
8144
- } else {
8145
- // Populate the map here to avoid calling `$fs->get_site_info( $site );` in the other `for` loop below.
8146
- foreach ( $sites as $site ) {
8147
- if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
8148
- continue;
8149
- }
8150
-
8151
- $site_info_by_blog_map[ $site['blog_id'] ] = $site;
8152
- }
8153
- }
8154
-
8155
- foreach ( $sites as $site ) {
8156
- if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
8157
- continue;
8158
- }
8159
-
8160
- $blog_id = $site['blog_id'];
8161
-
8162
- if ( ! isset( $installs_by_blog_map[ $blog_id ] ) ) {
8163
- $installs_by_blog_map[ $blog_id ] = self::get_all_sites( $fs->get_module_type(), $blog_id );
8164
- }
8165
-
8166
- $installs = $installs_by_blog_map[ $blog_id ];
8167
- $install = null;
8168
-
8169
- if ( isset( $installs[ $fs->get_slug() ] ) ) {
8170
- $install = $installs[ $fs->get_slug() ];
8171
-
8172
- if (
8173
- is_object( $install ) &&
8174
- (
8175
- ! FS_Site::is_valid_id( $install->id ) ||
8176
- ! FS_User::is_valid_id( $install->user_id ) ||
8177
- ! FS_Plugin_Plan::is_valid_id( $install->plan_id )
8178
- )
8179
- ) {
8180
- $install = null;
8181
- }
8182
- }
8183
-
8184
- if (
8185
- is_object( $install ) &&
8186
- FS_Plugin_License::is_valid_id( $install->license_id )
8187
- ) {
8188
- $has_install_with_license = true;
8189
- break;
8190
- }
8191
-
8192
- if ( $fs->is_site_delegated_connection( $blog_id ) ) {
8193
- // Site activation delegated, don't activate bundle license on the site in the network admin.
8194
- continue;
8195
- }
8196
-
8197
- if ( ! isset( $site_info_by_blog_map[ $blog_id ] ) ) {
8198
- $site_info_by_blog_map[ $blog_id ] = $fs->get_site_info( $site );
8199
- }
8200
-
8201
- $filtered_sites[] = $site_info_by_blog_map[ $blog_id ];
8202
- }
8203
-
8204
- if ( $has_install_with_license || empty( $filtered_sites ) ) {
8205
- // Do not try to activate the license at the network level if there's any install with a license or there's no site to activate the license on.
8206
- continue;
8207
- }
8208
-
8209
- $sites = $filtered_sites;
8210
- }
8211
-
8212
- $fs->activate_migrated_license(
8213
- $license->secret_key,
8214
- null,
8215
- null,
8216
- $sites,
8217
- ( $current_blog_id > 0 ? $current_blog_id : null )
8218
- );
8219
- }
8220
- }
8221
-
8222
- /**
8223
- * Returns a parent license that can be activated for the context product.
8224
- *
8225
- * @author Leo Fajardo (@leorw)
8226
- * @since 2.3.0
8227
- *
8228
- * @param string|null $license_key
8229
- * @param bool $flush
8230
- *
8231
- * @return FS_Plugin_License
8232
- */
8233
- function get_active_parent_license( $license_key = null, $flush = true ) {
8234
- $parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
8235
-
8236
- $fs = $this;
8237
-
8238
- if ( $this->is_addon() ) {
8239
- $parent_instance = $this->get_parent_instance();
8240
-
8241
- if ( is_object( $parent_instance ) && $parent_instance->is_registered() ) {
8242
- $fs = $parent_instance;
8243
- }
8244
- }
8245
-
8246
- $foreign_licenses = $fs->get_foreign_licenses_info(
8247
- self::get_all_licenses( $this->get_parent_id() )
8248
- );
8249
-
8250
- if ( ! empty ( $foreign_licenses ) ) {
8251
- $foreign_licenses = array(
8252
- // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
8253
- 'ids' => ( urlencode( '+' ) . implode( ',', $foreign_licenses['ids'] ) ),
8254
- 'license_keys' => implode( ',', array_map( 'urlencode', $foreign_licenses['license_keys'] ) )
8255
- );
8256
-
8257
- $parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
8258
- }
8259
-
8260
- $result = $fs->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, $flush );
8261
-
8262
- if (
8263
- ! $this->is_api_result_object( $result, 'licenses' ) ||
8264
- ! is_array( $result->licenses ) ||
8265
- empty( $result->licenses )
8266
- ) {
8267
- return null;
8268
- }
8269
-
8270
- $parent_license = null;
8271
-
8272
- if ( empty( $license_key ) ) {
8273
- $parent_license = $result->licenses[0];
8274
- } else {
8275
- foreach ( $result->licenses as $license ) {
8276
- if ( $license_key === $license->secret_key ) {
8277
- $parent_license = $license;
8278
- break;
8279
- }
8280
- }
8281
- }
8282
-
8283
- if ( ! is_null( $parent_license ) ) {
8284
- $parent_license = new FS_Plugin_License( $parent_license );
8285
- }
8286
-
8287
- return $parent_license;
8288
- }
8289
-
8290
- /**
8291
- * @author Leo Fajardo (@leorw)
8292
- * @since 2.3.0
8293
- *
8294
- * @return array
8295
- */
8296
- function get_sites_for_network_level_optin() {
8297
- $sites = array();
8298
- $all_sites = self::get_sites();
8299
-
8300
- foreach ( $all_sites as $site ) {
8301
- $blog_id = self::get_site_blog_id( $site );
8302
-
8303
- if ( ! $this->is_site_delegated_connection( $blog_id ) &&
8304
- ! $this->is_installed_on_site( $blog_id )
8305
- ) {
8306
- $sites[] = $this->get_site_info( $site );
8307
- }
8308
- }
8309
-
8310
- return $sites;
8311
- }
8312
-
8313
- /**
8314
- * Delete account.
8315
- *
8316
- * @author Vova Feldman (@svovaf)
8317
- * @since 1.0.3
8318
- *
8319
- * @param bool $check_user Enforce checking if user have plugins activation privileges.
8320
- */
8321
- function delete_account_event( $check_user = true ) {
8322
- $this->_logger->entrance( 'slug = ' . $this->_slug );
8323
-
8324
- if ( $check_user && ! $this->is_user_admin() ) {
8325
- return;
8326
- }
8327
-
8328
- $this->do_action( 'before_account_delete' );
8329
-
8330
- // Clear all admin notices.
8331
- $this->_admin_notices->clear_all_sticky( false );
8332
-
8333
- $this->_delete_site( false );
8334
-
8335
- $delete_network_common_data = true;
8336
-
8337
- if ( $this->_is_network_active ) {
8338
- $installs = $this->get_blog_install_map();
8339
-
8340
- // Don't delete common network data unless no other installs left.
8341
- $delete_network_common_data = empty( $installs );
8342
- }
8343
-
8344
- if ( $delete_network_common_data ) {
8345
- $this->_delete_plans( false );
8346
-
8347
- $this->_delete_licenses( false );
8348
-
8349
- // Delete add-ons related to plugin's account.
8350
- $this->_delete_account_addons( false );
8351
- }
8352
-
8353
- // @todo Delete plans and licenses of add-ons.
8354
-
8355
- self::$_accounts->store();
8356
-
8357
- /**
8358
- * IMPORTANT:
8359
- * Clear crons must be executed before clearing all storage.
8360
- * Otherwise, the cron will not be cleared.
8361
- */
8362
- if ( $delete_network_common_data ) {
8363
- $this->clear_sync_cron();
8364
- }
8365
-
8366
- $this->clear_install_sync_cron();
8367
-
8368
- // Clear all storage data.
8369
- $this->_storage->clear_all( true, array(
8370
- 'is_delegated_connection',
8371
- 'connectivity_test',
8372
- 'is_on',
8373
- ), false );
8374
-
8375
- // Send delete event.
8376
- $this->get_api_site_scope()->call( '/', 'delete' );
8377
-
8378
- $this->do_action( 'after_account_delete' );
8379
- }
8380
-
8381
- /**
8382
- * Delete network level account.
8383
- *
8384
- * @author Vova Feldman (@svovaf)
8385
- * @since 2.0.0
8386
- *
8387
- * @param bool $check_user Enforce checking if user have plugins activation privileges.
8388
- */
8389
- function delete_network_account_event( $check_user = true ) {
8390
- $this->_logger->entrance( 'slug = ' . $this->_slug );
8391
-
8392
- if ( $check_user && ! $this->is_user_admin() ) {
8393
- return;
8394
- }
8395
-
8396
- $this->do_action( 'before_network_account_delete' );
8397
-
8398
- // Clear all admin notices.
8399
- $this->_admin_notices->clear_all_sticky();
8400
-
8401
- $this->_delete_plans( false, false );
8402
-
8403
- $this->_delete_licenses( false );
8404
-
8405
- // Delete add-ons related to plugin's account.
8406
- $this->_delete_account_addons( false );
8407
-
8408
- // @todo Delete plans and licenses of add-ons.
8409
-
8410
- self::$_accounts->store( true );
8411
-
8412
- /**
8413
- * IMPORTANT:
8414
- * Clear crons must be executed before clearing all storage.
8415
- * Otherwise, the cron will not be cleared.
8416
- */
8417
- $this->clear_sync_cron( true );
8418
- $this->clear_install_sync_cron( true );
8419
-
8420
- $sites = self::get_sites();
8421
-
8422
- $install_ids = array();
8423
- foreach ( $sites as $site ) {
8424
- $blog_id = self::get_site_blog_id( $site );
8425
-
8426
- if ( $this->is_site_delegated_connection( $blog_id ) ) {
8427
- continue;
8428
- }
8429
-
8430
- $install_id = $this->_delete_site( true, $blog_id );
8431
-
8432
- // Clear all storage data.
8433
- $this->_storage->clear_all( true, array( 'connectivity_test' ), $blog_id );
8434
-
8435
- if ( FS_Site::is_valid_id( $install_id ) ) {
8436
- $install_ids[] = $install_id;
8437
- }
8438
-
8439
- switch_to_blog( $blog_id );
8440
-
8441
- $this->do_action( 'after_account_delete' );
8442
-
8443
- restore_current_blog();
8444
- }
8445
-
8446
- $this->_storage->clear_all( true, array(
8447
- 'connectivity_test',
8448
- 'is_on',
8449
- ), true );
8450
-
8451
- // Send delete event.
8452
- if ( ! empty( $install_ids ) ) {
8453
- $result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json?ids=" . implode( ',', $install_ids ), 'delete' );
8454
- }
8455
-
8456
- $this->do_action( 'after_network_account_delete' );
8457
- }
8458
-
8459
- /**
8460
- * Plugin deactivation hook.
8461
- *
8462
- * @author Vova Feldman (@svovaf)
8463
- * @since 1.0.1
8464
- */
8465
- function _deactivate_plugin_hook() {
8466
- $this->_logger->entrance( 'slug = ' . $this->_slug );
8467
-
8468
- if ( ! $this->is_user_admin() ) {
8469
- return;
8470
- }
8471
-
8472
- $is_network_deactivation = fs_is_network_admin();
8473
- $storage_keys_for_removal = array();
8474
-
8475
- $this->_admin_notices->clear_all_sticky();
8476
-
8477
- $storage_keys_for_removal[] = 'sticky_optin_added';
8478
- if ( isset( $this->_storage->sticky_optin_added ) ) {
8479
- unset( $this->_storage->sticky_optin_added );
8480
- }
8481
-
8482
- if ( ! isset( $this->_storage->is_plugin_new_install ) ) {
8483
- // Remember that plugin was already installed.
8484
- $this->_storage->is_plugin_new_install = false;
8485
- }
8486
-
8487
- // Hook to plugin uninstall.
8488
- register_uninstall_hook( $this->_plugin_main_file_path, array( 'Freemius', '_uninstall_plugin_hook' ) );
8489
-
8490
- $this->clear_module_main_file_cache();
8491
- $this->clear_sync_cron( $this->_is_network_active );
8492
- $this->clear_install_sync_cron();
8493
-
8494
- if ( $this->is_registered() ) {
8495
- if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
8496
- FS_Plugin_Updater::instance( $this )->delete_update_data();
8497
- }
8498
-
8499
- if ( $is_network_deactivation ) {
8500
- // Send deactivation event.
8501
- $this->sync_installs( array(
8502
- 'is_active' => false,
8503
- ) );
8504
- } else {
8505
- // Send deactivation event.
8506
- $this->sync_install( array(
8507
- 'is_active' => false,
8508
- ) );
8509
- }
8510
- } else {
8511
- if ( ! $this->has_api_connectivity() ) {
8512
- // Reset connectivity test cache.
8513
- unset( $this->_storage->connectivity_test );
8514
-
8515
- $storage_keys_for_removal[] = 'connectivity_test';
8516
- }
8517
- }
8518
-
8519
- if ( $is_network_deactivation ) {
8520
- if ( isset( $this->_storage->sticky_optin_added_ms ) ) {
8521
- unset( $this->_storage->sticky_optin_added_ms );
8522
- }
8523
-
8524
- if ( ! empty( $storage_keys_for_removal ) ) {
8525
- $sites = self::get_sites();
8526
-
8527
- foreach ( $sites as $site ) {
8528
- $blog_id = self::get_site_blog_id( $site );
8529
-
8530
- foreach ( $storage_keys_for_removal as $key ) {
8531
- $this->_storage->remove( $key, false, $blog_id );
8532
- }
8533
-
8534
- $this->_storage->save( $blog_id );
8535
- }
8536
- }
8537
- }
8538
-
8539
- // Clear API cache on deactivation.
8540
- FS_Api::clear_cache();
8541
-
8542
- $this->remove_sdk_reference();
8543
- }
8544
-
8545
- /**
8546
- * @author Vova Feldman (@svovaf)
8547
- * @since 1.1.6
8548
- */
8549
- private function remove_sdk_reference() {
8550
- global $fs_active_plugins;
8551
-
8552
- foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
8553
- if ( $this->_plugin_basename == $data->plugin_path ) {
8554
- unset( $fs_active_plugins->plugins[ $sdk_path ] );
8555
- break;
8556
- }
8557
- }
8558
-
8559
- fs_fallback_to_newest_active_sdk();
8560
- }
8561
-
8562
- /**
8563
- * @author Vova Feldman (@svovaf)
8564
- * @since 1.1.3
8565
- *
8566
- * @param bool $is_anonymous
8567
- * @param bool|int $network_or_blog_id Since 2.0.0
8568
- */
8569
- private function set_anonymous_mode( $is_anonymous = true, $network_or_blog_id = 0 ) {
8570
- // Store information regarding skip to try and opt-in the user
8571
- // again in the future.
8572
- $skip_info = array(
8573
- 'is' => $is_anonymous,
8574
- 'timestamp' => WP_FS__SCRIPT_START_TIME,
8575
- 'version' => $this->get_plugin_version(),
8576
- );
8577
-
8578
- if ( true === $network_or_blog_id ) {
8579
- $this->_storage->is_anonymous_ms = $skip_info;
8580
- } else {
8581
- $this->_storage->store( 'is_anonymous', $skip_info, $network_or_blog_id );
8582
- }
8583
-
8584
- $this->network_upgrade_mode_completed();
8585
-
8586
- // Update anonymous mode cache.
8587
- $this->_is_anonymous = $is_anonymous;
8588
- }
8589
-
8590
- /**
8591
- * @author Vova Feldman (@svovaf)
8592
- * @since 2.0.0
8593
- *
8594
- * @param int $blog_id Site ID.
8595
- * @param int $user_id User ID.
8596
- * @param string $domain Site domain.
8597
- * @param string $path Site path.
8598
- * @param int $network_id Network ID. Only relevant on multi-network installations.
8599
- * @param array $meta Metadata. Used to set initial site options.
8600
- *
8601
- * @uses Freemius::is_license_network_active() to check if the context license was network activated by the super-admin.
8602
- * @uses Freemius::is_network_connected() to check if the super-admin network opted-in.
8603
- * @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
8604
- * @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
8605
- */
8606
- function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
8607
- $this->_logger->entrance();
8608
-
8609
- if ( $this->is_premium() &&
8610
- $this->is_network_connected() &&
8611
- is_object( $this->_license ) &&
8612
- $this->_license->can_activate( FS_Site::is_localhost_by_address( $domain ) ) &&
8613
- $this->is_license_network_active( $blog_id )
8614
- ) {
8615
- /**
8616
- * Running the premium version, the license was network activated, and the license can also be activated on the current site -> so try to opt-in with the license key.
8617
- */
8618
- $current_blog_id = get_current_blog_id();
8619
- $license = clone $this->_license;
8620
-
8621
- $this->switch_to_blog( $blog_id );
8622
-
8623
- // Opt-in with network user.
8624
- $this->install_with_user(
8625
- $this->get_network_user(),
8626
- $license->secret_key,
8627
- false,
8628
- false,
8629
- false
8630
- );
8631
-
8632
- if ( is_object( $this->_site ) ) {
8633
- if ( $this->_site->license_id == $license->id ) {
8634
- /**
8635
- * If the license was activated successfully, sync the license data from the remote server.
8636
- */
8637
- $this->_license = $license;
8638
- $this->sync_site_license();
8639
- }
8640
- }
8641
-
8642
- $this->switch_to_blog( $current_blog_id );
8643
-
8644
- if ( is_object( $this->_site ) ) {
8645
- // Already connected (with or without a license), so no need to continue.
8646
- return;
8647
- }
8648
- }
8649
-
8650
- if ( $this->is_network_anonymous() ) {
8651
- /**
8652
- * Opt-in was network skipped so automatically skip the opt-in for the new site.
8653
- */
8654
- $this->skip_site_connection( $blog_id );
8655
- } else if ( $this->is_network_delegated_connection() ) {
8656
- /**
8657
- * Opt-in was network delegated so automatically delegate the opt-in for the new site's admin.
8658
- */
8659
- $this->delegate_site_connection( $blog_id );
8660
- } else if ( $this->is_network_connected() ) {
8661
- /**
8662
- * Opt-in was network activated so automatically opt-in with the network user and new site admin.
8663
- */
8664
- $current_blog_id = get_current_blog_id();
8665
-
8666
- $this->switch_to_blog( $blog_id );
8667
-
8668
- // Opt-in with network user.
8669
- $this->install_with_user(
8670
- $this->get_network_user(),
8671
- false,
8672
- false,
8673
- false,
8674
- false
8675
- );
8676
-
8677
- $this->switch_to_blog( $current_blog_id );
8678
- } else {
8679
- /**
8680
- * If the super-admin mixed different options (connect, skip, delegated):
8681
- * a) If at least one site connection was delegated, then automatically delegate connection.
8682
- * b) Otherwise, it means that at least one site was skipped and at least one site was connected. For a simplified UX in the initial release of the multisite network integration, skip the connection for the newly created site. If the super-admin will want to opt-in they can still do that from the network level Account page.
8683
- */
8684
- $has_delegated_site = false;
8685
-
8686
- $sites = self::get_sites();
8687
- foreach ( $sites as $site ) {
8688
- $blog_id = self::get_site_blog_id( $site );
8689
-
8690
- if ( $this->is_site_delegated_connection( $blog_id ) ) {
8691
- $has_delegated_site = true;
8692
- break;
8693
- }
8694
- }
8695
-
8696
- if ( $has_delegated_site ) {
8697
- $this->delegate_site_connection( $blog_id );
8698
- } else {
8699
- $this->skip_site_connection( $blog_id );
8700
- }
8701
- }
8702
- }
8703
-
8704
- /**
8705
- * @author Vova Feldman (@svovaf)
8706
- * @since 1.1.3
8707
- *
8708
- * @param bool|int $network_or_blog_id Since 2.0.0.
8709
- */
8710
- private function reset_anonymous_mode( $network_or_blog_id = 0 ) {
8711
- if ( true === $network_or_blog_id ) {
8712
- unset( $this->_storage->is_anonymous_ms );
8713
- } else {
8714
- $this->_storage->remove( 'is_anonymous', true, $network_or_blog_id );
8715
- }
8716
-
8717
- /**
8718
- * Ensure that this field is also "false", otherwise, if the current module's type is "theme" and the module
8719
- * has no menus, the opt-in popup will not be shown immediately (in this case, the user will have to click
8720
- * on the admin notice that contains the opt-in link in order to trigger the opt-in popup).
8721
- *
8722
- * @author Leo Fajardo (@leorw)
8723
- * @since 1.2.2
8724
- */
8725
- if ( ! $this->_is_network_active ||
8726
- 0 === $network_or_blog_id ||
8727
- get_current_blog_id() == $network_or_blog_id ||
8728
- ( true === $network_or_blog_id && fs_is_network_admin() )
8729
- ) {
8730
- $this->_is_anonymous = null;
8731
- }
8732
- }
8733
-
8734
- /**
8735
- * This is used to ensure that before redirecting to the opt-in page after resetting the anonymous mode or
8736
- * deleting the account in the network level, the URL of the page to redirect to is correct.
8737
- *
8738
- * @author Leo Fajardo (@leorw)
8739
- *
8740
- * @since 2.1.3
8741
- */
8742
- private function maybe_set_slug_and_network_menu_exists_flag() {
8743
- if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
8744
- $this->_menu->set_slug_and_network_menu_exists_flag( $this->_menu->has_menu() ?
8745
- $this->_menu->get_slug() :
8746
- $this->_slug
8747
- );
8748
- }
8749
- }
8750
-
8751
- /**
8752
- * Clears the anonymous mode and redirects to the opt-in screen.
8753
- *
8754
- * @author Vova Feldman (@svovaf)
8755
- * @since 1.1.7
8756
- */
8757
- function connect_again() {
8758
- if ( ! $this->is_anonymous() ) {
8759
- return;
8760
- }
8761
-
8762
- $this->reset_anonymous_mode( fs_is_network_admin() );
8763
-
8764
- $this->maybe_set_slug_and_network_menu_exists_flag();
8765
-
8766
- fs_redirect( $this->get_activation_url() );
8767
- }
8768
-
8769
- /**
8770
- * Skip account connect, and set anonymous mode.
8771
- *
8772
- * @author Vova Feldman (@svovaf)
8773
- * @since 1.1.1
8774
- *
8775
- * @param array|null $sites Since 2.0.0. Specific sites.
8776
- * @param bool $skip_all_network Since 2.0.0. If true, skip connection for all sites.
8777
- */
8778
- function skip_connection( $sites = null, $skip_all_network = false ) {
8779
- $this->_logger->entrance();
8780
-
8781
- $this->_admin_notices->remove_sticky( 'connect_account' );
8782
-
8783
- if ( $skip_all_network ) {
8784
- $this->set_anonymous_mode( true, true );
8785
- }
8786
-
8787
- if ( ! $skip_all_network && empty( $sites ) ) {
8788
- $this->skip_site_connection();
8789
- } else {
8790
- $uids = array();
8791
-
8792
- if ( $skip_all_network ) {
8793
- $this->set_anonymous_mode( true, true );
8794
-
8795
- $sites = self::get_sites();
8796
- foreach ( $sites as $site ) {
8797
- $blog_id = self::get_site_blog_id( $site );
8798
- $this->skip_site_connection( $blog_id, false );
8799
- $uids[] = $this->get_anonymous_id( $blog_id );
8800
- }
8801
- } else if ( ! empty( $sites ) ) {
8802
- foreach ( $sites as $site ) {
8803
- $uids[] = $site['uid'];
8804
- $this->skip_site_connection( $site['blog_id'], false );
8805
- }
8806
- }
8807
-
8808
- // Send anonymous skip event.
8809
- // No user identified info nor any tracking will be sent after the user skips the opt-in.
8810
- $this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
8811
- 'uids' => $uids,
8812
- ) );
8813
- }
8814
-
8815
- $this->network_upgrade_mode_completed();
8816
- }
8817
-
8818
- /**
8819
- * Skip connection for specific site in the network.
8820
- *
8821
- * @author Vova Feldman (@svovaf)
8822
- * @since 2.0.0
8823
- *
8824
- * @param int|null $blog_id
8825
- * @param bool $send_skip
8826
- */
8827
- private function skip_site_connection( $blog_id = null, $send_skip = true ) {
8828
- $this->_logger->entrance();
8829
-
8830
- $this->_admin_notices->remove_sticky( 'connect_account', $blog_id );
8831
-
8832
- $this->set_anonymous_mode( true, $blog_id );
8833
-
8834
- if ( $send_skip ) {
8835
- $this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
8836
- 'uids' => array( $this->get_anonymous_id( $blog_id ) ),
8837
- ) );
8838
- }
8839
- }
8840
-
8841
- /**
8842
- * Plugin version update hook.
8843
- *
8844
- * @author Vova Feldman (@svovaf)
8845
- * @since 1.0.4
8846
- */
8847
- private function update_plugin_version_event() {
8848
- $this->_logger->entrance();
8849
-
8850
- if ( ! $this->is_registered() ) {
8851
- return;
8852
- }
8853
-
8854
- $this->schedule_install_sync();
8855
- // $this->sync_install( array(), true );
8856
- }
8857
-
8858
- /**
8859
- * Generate an MD5 signature of a plugins collection.
8860
- * This helper methods used to identify changes in a plugins collection.
8861
- *
8862
- * @author Vova Feldman (@svovaf)
8863
- * @since 2.0.0
8864
- *
8865
- * @param array [string]array $plugins
8866
- *
8867
- * @return string
8868
- */
8869
- private function get_plugins_thumbprint( $plugins ) {
8870
- ksort( $plugins );
8871
-
8872
- $thumbprint = '';
8873
- foreach ( $plugins as $basename => $data ) {
8874
- $thumbprint .= $data['slug'] . ',' .
8875
- $data['Version'] . ',' .
8876
- ( $data['is_active'] ? '1' : '0' ) . ';';
8877
- }
8878
-
8879
- return md5( $thumbprint );
8880
- }
8881
-
8882
- /**
8883
- * Return a list of modified plugins since the last sync.
8884
- *
8885
- * Note:
8886
- * There's no point to store a plugins counter since even if the number of
8887
- * plugins didn't change, we still need to check if the versions are all the
8888
- * same and the activity state is similar.
8889
- *
8890
- * @author Vova Feldman (@svovaf)
8891
- * @since 1.1.8
8892
- *
8893
- * @return array|false
8894
- */
8895
- private function get_plugins_data_for_api() {
8896
- // Alias.
8897
- $site_active_plugins_option_name = 'active_plugins';
8898
- $network_plugins_option_name = 'all_plugins';
8899
-
8900
- /**
8901
- * Collection of all site level active plugins.
8902
- */
8903
- $site_active_plugins_cache = self::$_accounts->get_option( $site_active_plugins_option_name );
8904
-
8905
- if ( ! is_object( $site_active_plugins_cache ) ) {
8906
- $site_active_plugins_cache = (object) array(
8907
- 'timestamp' => '',
8908
- 'md5' => '',
8909
- 'plugins' => array(),
8910
- );
8911
- }
8912
-
8913
- $time = time();
8914
-
8915
- if ( ! empty( $site_active_plugins_cache->timestamp ) &&
8916
- ( $time - $site_active_plugins_cache->timestamp ) < WP_FS__TIME_5_MIN_IN_SEC
8917
- ) {
8918
- // Don't send plugin updates if last update was in the past 5 min.
8919
- return false;
8920
- }
8921
-
8922
- // Write timestamp to lock the logic.
8923
- $site_active_plugins_cache->timestamp = $time;
8924
- self::$_accounts->set_option( $site_active_plugins_option_name, $site_active_plugins_cache, true );
8925
-
8926
- // Reload options from DB.
8927
- self::$_accounts->load( true );
8928
- $site_active_plugins_cache = self::$_accounts->get_option( $site_active_plugins_option_name );
8929
-
8930
- if ( $time != $site_active_plugins_cache->timestamp ) {
8931
- // If timestamp is different, then another thread captured the lock.
8932
- return false;
8933
- }
8934
-
8935
- /**
8936
- * Collection of all plugins (network level).
8937
- */
8938
- $network_plugins_cache = self::$_accounts->get_option( $network_plugins_option_name );
8939
-
8940
- if ( ! is_object( $network_plugins_cache ) ) {
8941
- $network_plugins_cache = (object) array(
8942
- 'timestamp' => '',
8943
- 'md5' => '',
8944
- 'plugins' => array(),
8945
- );
8946
- }
8947
-
8948
- // Check if there's a change in plugins.
8949
- $network_plugins = self::get_network_plugins();
8950
- $site_active_plugins = self::get_site_active_plugins();
8951
-
8952
- $network_plugins_thumbprint = $this->get_plugins_thumbprint( $network_plugins );
8953
- $site_active_plugins_thumbprint = $this->get_plugins_thumbprint( $site_active_plugins );
8954
-
8955
- // Check if plugins status changed (version or active/inactive).
8956
- $network_plugins_changed = ( $network_plugins_cache->md5 !== $network_plugins_thumbprint );
8957
- $site_active_plugins_changed = ( $site_active_plugins_cache->md5 !== $site_active_plugins_thumbprint );
8958
-
8959
- if ( ! $network_plugins_changed &&
8960
- ! $site_active_plugins_changed
8961
- ) {
8962
- // No changes.
8963
- return array();
8964
- }
8965
-
8966
- $plugins_update_data = array();
8967
-
8968
- foreach ( $network_plugins_cache->plugins as $basename => $data ) {
8969
- if ( ! isset( $network_plugins[ $basename ] ) ) {
8970
- // Plugin uninstalled.
8971
- $uninstalled_plugin_data = $data;
8972
- $uninstalled_plugin_data['is_active'] = false;
8973
- $uninstalled_plugin_data['is_uninstalled'] = true;
8974
- $plugins_update_data[] = $uninstalled_plugin_data;
8975
-
8976
- unset( $network_plugins[ $basename ] );
8977
-
8978
- unset( $network_plugins_cache->plugins[ $basename ] );
8979
- unset( $site_active_plugins_cache->plugins[ $basename ] );
8980
-
8981
- continue;
8982
- }
8983
-
8984
- $was_active = $data['is_active'] ||
8985
- ( isset( $site_active_plugins_cache->plugins[ $basename ] ) &&
8986
- true === $site_active_plugins_cache->plugins[ $basename ]['is_active'] );
8987
- $is_active = $network_plugins[ $basename ]['is_active'] ||
8988
- ( isset( $site_active_plugins[ $basename ] ) &&
8989
- $site_active_plugins[ $basename ]['is_active'] );
8990
-
8991
- if ( ! isset( $site_active_plugins_cache->plugins[ $basename ] ) &&
8992
- isset( $site_active_plugins[ $basename ] )
8993
- ) {
8994
- // Plugin was site level activated.
8995
- $site_active_plugins_cache->plugins[ $basename ] = $network_plugins[ $basename ];
8996
- $site_active_plugins_cache->plugins[ $basename ]['is_active'] = true;
8997
- } else if ( isset( $site_active_plugins_cache->plugins[ $basename ] ) &&
8998
- ! isset( $site_active_plugins[ $basename ] )
8999
- ) {
9000
- // Plugin was site level deactivated.
9001
- unset( $site_active_plugins_cache->plugins[ $basename ] );
9002
- }
9003
-
9004
- $prev_version = $data['version'];
9005
- $current_version = $network_plugins[ $basename ]['Version'];
9006
-
9007
- if ( $was_active !== $is_active || $prev_version !== $current_version ) {
9008
- // Plugin activated or deactivated, or version changed.
9009
-
9010
- if ( $was_active !== $is_active ) {
9011
- if ( $data['is_active'] != $network_plugins[ $basename ]['is_active'] ) {
9012
- $network_plugins_cache->plugins[ $basename ]['is_active'] = $data['is_active'];
9013
- }
9014
- }
9015
-
9016
- if ( $prev_version !== $current_version ) {
9017
- $network_plugins_cache->plugins[ $basename ]['Version'] = $current_version;
9018
- }
9019
-
9020
- $updated_plugin_data = $data;
9021
- $updated_plugin_data['is_active'] = $is_active;
9022
- $updated_plugin_data['version'] = $current_version;
9023
- $updated_plugin_data['title'] = $network_plugins[ $basename ]['Name'];
9024
- $plugins_update_data[] = $updated_plugin_data;
9025
- }
9026
- }
9027
-
9028
- // Find new plugins that weren't yet seen before.
9029
- foreach ( $network_plugins as $basename => $data ) {
9030
- if ( ! isset( $network_plugins_cache->plugins[ $basename ] ) ) {
9031
- // New plugin.
9032
- $new_plugin = array(
9033
- 'slug' => $data['slug'],
9034
- 'version' => $data['Version'],
9035
- 'title' => $data['Name'],
9036
- 'is_active' => $data['is_active'],
9037
- 'is_uninstalled' => false,
9038
- );
9039
-
9040
- $network_plugins_cache->plugins[ $basename ] = $new_plugin;
9041
-
9042
- $is_site_level_active = (
9043
- isset( $site_active_plugins[ $basename ] ) &&
9044
- $site_active_plugins[ $basename ]['is_active']
9045
- );
9046
-
9047
- /**
9048
- * If not network active, set the activity status based on the site-level plugin status.
9049
- */
9050
- if ( ! $new_plugin['is_active'] ) {
9051
- $new_plugin['is_active'] = $is_site_level_active;
9052
- }
9053
-
9054
- $plugins_update_data[] = $new_plugin;
9055
-
9056
- if ( isset( $site_active_plugins[ $basename ] ) ) {
9057
- $site_active_plugins_cache->plugins[ $basename ] = $new_plugin;
9058
- $site_active_plugins_cache->plugins[ $basename ]['is_active'] = $is_site_level_active;
9059
- }
9060
- }
9061
- }
9062
-
9063
- $site_active_plugins_cache->md5 = $site_active_plugins_thumbprint;
9064
- $site_active_plugins_cache->timestamp = $time;
9065
- self::$_accounts->set_option( $site_active_plugins_option_name, $site_active_plugins_cache, true );
9066
-
9067
- $network_plugins_cache->md5 = $network_plugins_thumbprint;
9068
- $network_plugins_cache->timestamp = $time;
9069
- self::$_accounts->set_option( $network_plugins_option_name, $network_plugins_cache, true );
9070
-
9071
- return $plugins_update_data;
9072
- }
9073
-
9074
- /**
9075
- * Return a list of modified themes since the last sync.
9076
- *
9077
- * Note:
9078
- * There's no point to store a themes counter since even if the number of
9079
- * themes didn't change, we still need to check if the versions are all the
9080
- * same and the activity state is similar.
9081
- *
9082
- * @author Vova Feldman (@svovaf)
9083
- * @since 1.1.8
9084
- *
9085
- * @return array|false
9086
- */
9087
- private function get_themes_data_for_api() {
9088
- // Alias.
9089
- $option_name = 'all_themes';
9090
-
9091
- $all_cached_themes = self::$_accounts->get_option( $option_name );
9092
-
9093
- if ( ! is_object( $all_cached_themes ) ) {
9094
- $all_cached_themes = (object) array(
9095
- 'timestamp' => '',
9096
- 'md5' => '',
9097
- 'themes' => array(),
9098
- );
9099
- }
9100
-
9101
- $time = time();
9102
-
9103
- if ( ! empty( $all_cached_themes->timestamp ) &&
9104
- ( $time - $all_cached_themes->timestamp ) < WP_FS__TIME_5_MIN_IN_SEC
9105
- ) {
9106
- // Don't send theme updates if last update was in the past 5 min.
9107
- return false;
9108
- }
9109
-
9110
- // Write timestamp to lock the logic.
9111
- $all_cached_themes->timestamp = $time;
9112
- self::$_accounts->set_option( $option_name, $all_cached_themes, true );
9113
-
9114
- // Reload options from DB.
9115
- self::$_accounts->load( true );
9116
- $all_cached_themes = self::$_accounts->get_option( $option_name );
9117
-
9118
- if ( $time != $all_cached_themes->timestamp ) {
9119
- // If timestamp is different, then another thread captured the lock.
9120
- return false;
9121
- }
9122
-
9123
- // Get active theme.
9124
- $active_theme = wp_get_theme();
9125
- $active_theme_stylesheet = $active_theme->get_stylesheet();
9126
-
9127
- // Check if there's a change in themes.
9128
- $all_themes = wp_get_themes();
9129
-
9130
- // Check if themes changed.
9131
- ksort( $all_themes );
9132
-
9133
- $themes_signature = '';
9134
- foreach ( $all_themes as $slug => $data ) {
9135
- $is_active = ( $slug === $active_theme_stylesheet );
9136
- $themes_signature .= $slug . ',' .
9137
- $data->version . ',' .
9138
- ( $is_active ? '1' : '0' ) . ';';
9139
- }
9140
-
9141
- // Check if themes status changed (version or active/inactive).
9142
- $themes_changed = ( $all_cached_themes->md5 !== md5( $themes_signature ) );
9143
-
9144
- $themes_update_data = array();
9145
-
9146
- if ( $themes_changed ) {
9147
- // Change in themes, report changes.
9148
-
9149
- // Update existing themes info.
9150
- foreach ( $all_cached_themes->themes as $slug => $data ) {
9151
- $is_active = ( $slug === $active_theme_stylesheet );
9152
-
9153
- if ( ! isset( $all_themes[ $slug ] ) ) {
9154
- // Plugin uninstalled.
9155
- $uninstalled_theme_data = $data;
9156
- $uninstalled_theme_data['is_active'] = false;
9157
- $uninstalled_theme_data['is_uninstalled'] = true;
9158
- $themes_update_data[] = $uninstalled_theme_data;
9159
-
9160
- unset( $all_themes[ $slug ] );
9161
- unset( $all_cached_themes->themes[ $slug ] );
9162
- } else if ( $data['is_active'] !== $is_active ||
9163
- $data['version'] !== $all_themes[ $slug ]->version
9164
- ) {
9165
- // Plugin activated or deactivated, or version changed.
9166
-
9167
- $all_cached_themes->themes[ $slug ]['is_active'] = $is_active;
9168
- $all_cached_themes->themes[ $slug ]['version'] = $all_themes[ $slug ]->version;
9169
-
9170
- $themes_update_data[] = $all_cached_themes->themes[ $slug ];
9171
- }
9172
- }
9173
-
9174
- // Find new themes that weren't yet seen before.
9175
- foreach ( $all_themes as $slug => $data ) {
9176
- if ( ! isset( $all_cached_themes->themes[ $slug ] ) ) {
9177
- $is_active = ( $slug === $active_theme_stylesheet );
9178
-
9179
- // New plugin.
9180
- $new_plugin = array(
9181
- 'slug' => $slug,
9182
- 'version' => $data->version,
9183
- 'title' => $data->name,
9184
- 'is_active' => $is_active,
9185
- 'is_uninstalled' => false,
9186
- );
9187
-
9188
- $themes_update_data[] = $new_plugin;
9189
- $all_cached_themes->themes[ $slug ] = $new_plugin;
9190
- }
9191
- }
9192
-
9193
- $all_cached_themes->md5 = md5( $themes_signature );
9194
- $all_cached_themes->timestamp = time();
9195
- self::$_accounts->set_option( $option_name, $all_cached_themes, true );
9196
- }
9197
-
9198
- return $themes_update_data;
9199
- }
9200
-
9201
- /**
9202
- * Get site data for API install request.
9203
- *
9204
- * @author Vova Feldman (@svovaf)
9205
- * @since 1.1.2
9206
- *
9207
- * @param string[] $override
9208
- * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
9209
- * @param bool $include_themes Since 1.1.8 by default include plugin changes.
9210
- * @param bool $include_blog_data Since 2.3.0 by default include the current blog's data (language, charset, title, and URL).
9211
- *
9212
- * @return array
9213
- */
9214
- private function get_install_data_for_api(
9215
- array $override,
9216
- $include_plugins = true,
9217
- $include_themes = true,
9218
- $include_blog_data = true
9219
- ) {
9220
- if ( $this->is_extensions_tracking_allowed() ) {
9221
- if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
9222
- /**
9223
- * @since 1.1.8 Also send plugin updates.
9224
- */
9225
- if ( $include_plugins && ! isset( $override['plugins'] ) ) {
9226
- $plugins = $this->get_plugins_data_for_api();
9227
- if ( ! empty( $plugins ) ) {
9228
- $override['plugins'] = $plugins;
9229
- }
9230
- }
9231
- }
9232
-
9233
- if ( ! defined( 'WP_FS__TRACK_THEMES' ) || false !== WP_FS__TRACK_THEMES ) {
9234
- /**
9235
- * @since 1.1.8 Also send themes updates.
9236
- */
9237
- if ( $include_themes && ! isset( $override['themes'] ) ) {
9238
- $themes = $this->get_themes_data_for_api();
9239
- if ( ! empty( $themes ) ) {
9240
- $override['themes'] = $themes;
9241
- }
9242
- }
9243
- }
9244
- }
9245
-
9246
- $versions = $this->get_versions();
9247
-
9248
- $blog_data = $include_blog_data ?
9249
- array(
9250
- 'language' => get_bloginfo( 'language' ),
9251
- 'charset' => get_bloginfo( 'charset' ),
9252
- 'title' => get_bloginfo( 'name' ),
9253
- 'url' => get_site_url(),
9254
- ) :
9255
- array();
9256
-
9257
- return array_merge( $versions, $blog_data, array(
9258
- 'version' => $this->get_plugin_version(),
9259
- 'is_premium' => $this->is_premium(),
9260
- // Special params.
9261
- 'is_active' => true,
9262
- 'is_disconnected' => $this->is_tracking_prohibited(),
9263
- 'is_uninstalled' => false,
9264
- ), $override );
9265
- }
9266
-
9267
- /**
9268
- * Update installs details.
9269
- *
9270
- * @todo V1 of multiste network support doesn't support plugin and theme data sending.
9271
- *
9272
- * @author Vova Feldman (@svovaf)
9273
- * @since 2.0.0
9274
- *
9275
- * @param string[] string $override
9276
- * @param bool $only_diff
9277
- * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
9278
- * @param bool $include_themes Since 1.1.8 by default include plugin changes.
9279
- *
9280
- * @return array
9281
- */
9282
- private function get_installs_data_for_api(
9283
- array $override,
9284
- $only_diff = false,
9285
- $include_plugins = true,
9286
- $include_themes = true
9287
- ) {
9288
- /**
9289
- * @since 1.1.8 Also send plugin updates.
9290
- */
9291
- // if ( $include_plugins && ! isset( $override['plugins'] ) ) {
9292
- // $plugins = $this->get_plugins_data_for_api();
9293
- // if ( ! empty( $plugins ) ) {
9294
- // $override['plugins'] = $plugins;
9295
- // }
9296
- // }
9297
- /**
9298
- * @since 1.1.8 Also send themes updates.
9299
- */
9300
- // if ( $include_themes && ! isset( $override['themes'] ) ) {
9301
- // $themes = $this->get_themes_data_for_api();
9302
- // if ( ! empty( $themes ) ) {
9303
- // $override['themes'] = $themes;
9304
- // }
9305
- // }
9306
-
9307
- // Common properties.
9308
- $versions = $this->get_versions();
9309
- $common = array_merge( $versions, array(
9310
- 'version' => $this->get_plugin_version(),
9311
- 'is_premium' => $this->is_premium(),
9312
- ), $override );
9313
-
9314
-
9315
- $is_common_diff_for_any_site = false;
9316
- $common_diff_union = array();
9317
-
9318
- $installs_data = array();
9319
-
9320
- $sites = self::get_sites();
9321
-
9322
- foreach ( $sites as $site ) {
9323
- $blog_id = self::get_site_blog_id( $site );
9324
-
9325
- $install = $this->get_install_by_blog_id( $blog_id );
9326
-
9327
- if ( is_object( $install ) ) {
9328
- if ( $install->user_id != $this->_user->id ) {
9329
- // Install belongs to a different owner.
9330
- continue;
9331
- }
9332
-
9333
- if ( ! $this->is_premium() && $install->is_tracking_prohibited() ) {
9334
- // Don't send updates regarding opted-out installs.
9335
- continue;
9336
- }
9337
-
9338
- $install_data = $this->get_site_info( $site );
9339
-
9340
- $uid = $install_data['uid'];
9341
-
9342
- unset( $install_data['blog_id'] );
9343
- unset( $install_data['uid'] );
9344
-
9345
- $install_data['is_disconnected'] = $install->is_disconnected;
9346
- $install_data['is_active'] = $this->is_active_for_site( $blog_id );
9347
- $install_data['is_uninstalled'] = $install->is_uninstalled;
9348
-
9349
- $common_diff = null;
9350
- $is_common_diff = false;
9351
- if ( $only_diff ) {
9352
- $install_data = $this->get_install_diff_for_api( $install_data, $install, $override );
9353
- $common_diff = $this->get_install_diff_for_api( $common, $install, $override );
9354
-
9355
- $is_common_diff = ! empty( $common_diff );
9356
-
9357
- if ( $is_common_diff ) {
9358
- foreach ( $common_diff as $k => $v ) {
9359
- if ( ! isset( $common_diff_union[ $k ] ) ) {
9360
- $common_diff_union[ $k ] = $v;
9361
- }
9362
- }
9363
- }
9364
-
9365
- $is_common_diff_for_any_site = $is_common_diff_for_any_site || $is_common_diff;
9366
- }
9367
-
9368
- if ( ! empty( $install_data ) || $is_common_diff ) {
9369
- // Add install ID and site unique ID.
9370
- $install_data['id'] = $install->id;
9371
- $install_data['uid'] = $uid;
9372
-
9373
- $installs_data[] = $install_data;
9374
- }
9375
- }
9376
- }
9377
-
9378
- restore_current_blog();
9379
-
9380
- if ( 0 < count( $installs_data ) && ( $is_common_diff_for_any_site || ! $only_diff ) ) {
9381
- if ( ! $only_diff ) {
9382
- $installs_data[] = $common;
9383
- } else if ( ! empty( $common_diff_union ) ) {
9384
- $installs_data[] = $common_diff_union;
9385
- }
9386
- }
9387
-
9388
- foreach ( $installs_data as &$data ) {
9389
- $data = (object) $data;
9390
- }
9391
-
9392
- return $installs_data;
9393
- }
9394
-
9395
- /**
9396
- * Compare site actual data to the stored install data and return the differences for an API data sync.
9397
- *
9398
- * @author Vova Feldman (@svovaf)
9399
- * @since 2.0.0
9400
- *
9401
- * @param array $site
9402
- * @param FS_Site $install
9403
- * @param string[] string $override
9404
- *
9405
- * @return array
9406
- */
9407
- private function get_install_diff_for_api( $site, $install, $override = array() ) {
9408
- $diff = array();
9409
- $special = array();
9410
- $special_override = false;
9411
-
9412
- foreach ( $site as $p => $v ) {
9413
- if ( property_exists( $install, $p ) ) {
9414
- if ( ( is_bool( $install->{$p} ) || ! empty( $install->{$p} ) ) &&
9415
- $install->{$p} != $v
9416
- ) {
9417
- $install->{$p} = $v;
9418
- $diff[ $p ] = $v;
9419
- }
9420
- } else {
9421
- $special[ $p ] = $v;
9422
-
9423
- if ( isset( $override[ $p ] ) ||
9424
- 'plugins' === $p ||
9425
- 'themes' === $p
9426
- ) {
9427
- $special_override = true;
9428
- }
9429
- }
9430
- }
9431
-
9432
- if ( $special_override || 0 < count( $diff ) ) {
9433
- // Add special params only if has at least one
9434
- // standard param, or if explicitly requested to
9435
- // override a special param or a param which is not exist
9436
- // in the install object.
9437
- $diff = array_merge( $diff, $special );
9438
- }
9439
-
9440
- return $diff;
9441
- }
9442
-
9443
- /**
9444
- * Update install only if changed.
9445
- *
9446
- * @author Vova Feldman (@svovaf)
9447
- * @since 1.0.9
9448
- *
9449
- * @param string[] string $override
9450
- * @param bool $flush
9451
- *
9452
- * @return false|object|string
9453
- */
9454
- private function send_install_update( $override = array(), $flush = false ) {
9455
- $this->_logger->entrance();
9456
-
9457
- $check_properties = $this->get_install_data_for_api( $override );
9458
-
9459
- if ( $flush ) {
9460
- $params = $check_properties;
9461
- } else {
9462
- $params = $this->get_install_diff_for_api( $check_properties, $this->_site, $override );
9463
- }
9464
-
9465
- $keepalive_only_update = false;
9466
- if ( empty( $params ) ) {
9467
- $keepalive_only_update = $this->should_send_keepalive_update();
9468
-
9469
- if ( ! $keepalive_only_update ) {
9470
- /**
9471
- * There are no updates to send including keepalive.
9472
- *
9473
- * @author Leo Fajardo (@leorw)
9474
- * @since 2.2.3
9475
- */
9476
- return false;
9477
- }
9478
- }
9479
-
9480
- if ( ! $keepalive_only_update ) {
9481
- /**
9482
- * Do not update the last install sync timestamp after a keepalive-only call since there were no actual
9483
- * updates sent.
9484
- *
9485
- * @author Leo Fajardo (@leorw)
9486
- * @since 2.2.3
9487
- */
9488
- if ( ! is_multisite() ) {
9489
- // Update last install sync timestamp.
9490
- $this->set_cron_execution_timestamp( 'install_sync' );
9491
- }
9492
-
9493
- $params['uid'] = $this->get_anonymous_id();
9494
- }
9495
-
9496
- $this->set_keepalive_timestamp();
9497
-
9498
- // Send updated values to FS.
9499
- $site = $this->get_api_site_scope()->call( '/', 'put', $params );
9500
-
9501
- if ( ! $keepalive_only_update && $this->is_api_result_entity( $site ) ) {
9502
- /**
9503
- * Do not clear scheduled sync after a keepalive-only call since there were no actual updates sent.
9504
- *
9505
- * @author Leo Fajardo (@leorw)
9506
- * @since 2.2.3
9507
- */
9508
- if ( ! is_multisite() ) {
9509
- // I successfully sent install update, clear scheduled sync if exist.
9510
- $this->clear_install_sync_cron();
9511
- }
9512
- }
9513
-
9514
- return $site;
9515
- }
9516
-
9517
- /**
9518
- * Update installs only if changed.
9519
- *
9520
- * @author Vova Feldman (@svovaf)
9521
- * @since 2.0.0
9522
- *
9523
- * @param string[] string $override
9524
- * @param bool $flush
9525
- *
9526
- * @return false|object|string
9527
- */
9528
- private function send_installs_update( $override = array(), $flush = false ) {
9529
- $this->_logger->entrance();
9530
-
9531
- $installs_data = $this->get_installs_data_for_api( $override, ! $flush );
9532
-
9533
- $keepalive_only_update = false;
9534
- if ( empty( $installs_data ) ) {
9535
- /**
9536
- * Pass `true` to use the network level storage since the update is for many installs.
9537
- *
9538
- * @author Leo Fajardo (@leorw)
9539
- * @since 2.2.3
9540
- */
9541
- $keepalive_only_update = $this->should_send_keepalive_update( true );
9542
-
9543
- if ( ! $keepalive_only_update ) {
9544
- /**
9545
- * There are no updates to send including keepalive.
9546
- *
9547
- * @author Leo Fajardo (@leorw)
9548
- * @since 2.2.3
9549
- */
9550
- return false;
9551
- }
9552
- }
9553
-
9554
- if ( ! $keepalive_only_update ) {
9555
- // Update last install sync timestamp if there were actual updates sent (i.e., not a keepalive-only call).
9556
- $this->set_cron_execution_timestamp( 'install_sync' );
9557
- }
9558
-
9559
- /**
9560
- * Pass `true` to use the network level storage since the update is for many installs.
9561
- *
9562
- * @author Leo Fajardo (@leorw)
9563
- * @since 2.2.3
9564
- */
9565
- $this->set_keepalive_timestamp( true );
9566
-
9567
- // Send updated values to FS.
9568
- $result = $this->get_api_user_scope()->call( "/plugins/{$this->_plugin->id}/installs.json", 'put', $installs_data );
9569
-
9570
- if ( ! $keepalive_only_update && $this->is_api_result_object( $result, 'installs' ) ) {
9571
- // I successfully sent installs update (there was an actual update sent and it's not just a keepalive-only call), clear scheduled sync if exist.
9572
- $this->clear_install_sync_cron();
9573
- }
9574
-
9575
- return $result;
9576
- }
9577
-
9578
- /**
9579
- * @author Leo Fajardo (@leorw)
9580
- *
9581
- * @param bool|null $use_network_level_storage
9582
- *
9583
- * @return bool
9584
- */
9585
- private function should_send_keepalive_update( $use_network_level_storage = null ) {
9586
- $keepalive_timestamp = $this->_storage->get( 'keepalive_timestamp', 0, $use_network_level_storage );
9587
-
9588
- if ( $keepalive_timestamp < ( time() - WP_FS__TIME_WEEK_IN_SEC ) ) {
9589
- // If updated more than 7 days ago, trigger a keepalive and update the time it was triggered.
9590
- return true;
9591
- } else {
9592
- // If updated 7 days ago or less, "flip a coin", if the value is 7 trigger a keepalive and update the last time it was triggered.
9593
- return ( 7 == rand( 1, 7 ) );
9594
- }
9595
- }
9596
-
9597
- /**
9598
- * Syncs the install owner's data if needed (i.e., if the install owner is different from the loaded user).
9599
- *
9600
- * @author Leo Fajardo (@leorw)
9601
- * @since 2.3.2
9602
- */
9603
- private function maybe_sync_install_user() {
9604
- if ( $this->_user->id == $this->_site->user_id ) {
9605
- return;
9606
- }
9607
-
9608
- // Fetch user data and store if found.
9609
- $this->sync_user_by_current_install();
9610
- }
9611
-
9612
- /**
9613
- * Update install only if changed.
9614
- *
9615
- * @author Vova Feldman (@svovaf)
9616
- * @since 1.0.9
9617
- *
9618
- * @param string[] string $override
9619
- * @param bool $flush
9620
- */
9621
- private function sync_install( $override = array(), $flush = false ) {
9622
- $this->_logger->entrance();
9623
-
9624
- $site = $this->send_install_update( $override, $flush );
9625
-
9626
- if ( false === $site ) {
9627
- // No sync required.
9628
- return;
9629
- }
9630
-
9631
- if ( ! $this->is_api_result_entity( $site ) ) {
9632
- // Failed to sync, don't update locally.
9633
- return;
9634
- }
9635
-
9636
- $this->_site = new FS_Site( $site );
9637
-
9638
- $this->_store_site( true );
9639
- }
9640
-
9641
- /**
9642
- * Update install only if changed.
9643
- *
9644
- * @author Vova Feldman (@svovaf)
9645
- * @since 1.0.9
9646
- *
9647
- * @param string[] string $override
9648
- * @param bool $flush
9649
- */
9650
- private function sync_installs( $override = array(), $flush = false ) {
9651
- $this->_logger->entrance();
9652
-
9653
- $result = $this->send_installs_update( $override, $flush );
9654
-
9655
- if ( false === $result ) {
9656
- // No sync required.
9657
- return;
9658
- }
9659
-
9660
- if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
9661
- // Failed to sync, don't update locally.
9662
- return;
9663
- }
9664
-
9665
- $address_to_blog_map = $this->get_address_to_blog_map();
9666
-
9667
- foreach ( $result->installs as $install ) {
9668
- $this->_site = new FS_Site( $install );
9669
-
9670
- $address = trailingslashit( fs_strip_url_protocol( $install->url ) );
9671
- $blog_id = $address_to_blog_map[ $address ];
9672
-
9673
- $this->_store_site( true, $blog_id );
9674
- }
9675
- }
9676
-
9677
- /**
9678
- * Track install's custom event.
9679
- *
9680
- * IMPORTANT:
9681
- * Custom event tracking is currently only supported for specific clients.
9682
- * If you are not one of them, please don't use this method. If you will,
9683
- * the API will simply ignore your request based on the plugin ID.
9684
- *
9685
- * Need custom tracking for your plugin or theme?
9686
- * If you are interested in custom event tracking please contact yo@freemius.com
9687
- * for further details.
9688
- *
9689
- * @author Vova Feldman (@svovaf)
9690
- * @since 1.2.1
9691
- *
9692
- * @param string $name Event name.
9693
- * @param array $properties Associative key/value array with primitive values only
9694
- * @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
9695
- * @param bool $once If true, event will be tracked only once. IMPORTANT: Still trigger the API call.
9696
- *
9697
- * @return object|false Event data or FALSE on failure.
9698
- *
9699
- * @throws \Freemius_InvalidArgumentException
9700
- */
9701
- public function track_event( $name, $properties = array(), $process_at = false, $once = false ) {
9702
- $this->_logger->entrance( http_build_query( array( 'name' => $name, 'once' => $once ) ) );
9703
-
9704
- if ( ! $this->is_registered() ) {
9705
- return false;
9706
- }
9707
-
9708
- $event = array( 'type' => $name );
9709
-
9710
- if ( is_numeric( $process_at ) && $process_at > time() ) {
9711
- $event['process_at'] = $process_at;
9712
- }
9713
-
9714
- if ( $once ) {
9715
- $event['once'] = true;
9716
- }
9717
-
9718
- if ( ! empty( $properties ) ) {
9719
- // Verify associative array values are primitive.
9720
- foreach ( $properties as $k => $v ) {
9721
- if ( ! is_scalar( $v ) ) {
9722
- throw new Freemius_InvalidArgumentException( 'The $properties argument must be an associative key/value array with primitive values only.' );
9723
- }
9724
- }
9725
-
9726
- $event['properties'] = $properties;
9727
- }
9728
-
9729
- $result = $this->get_api_site_scope()->call( 'events.json', 'post', $event );
9730
-
9731
- return $this->is_api_error( $result ) ?
9732
- false :
9733
- $result;
9734
- }
9735
-
9736
- /**
9737
- * Track install's custom event only once, but it still triggers the API call.
9738
- *
9739
- * IMPORTANT:
9740
- * Custom event tracking is currently only supported for specific clients.
9741
- * If you are not one of them, please don't use this method. If you will,
9742
- * the API will simply ignore your request based on the plugin ID.
9743
- *
9744
- * Need custom tracking for your plugin or theme?
9745
- * If you are interested in custom event tracking please contact yo@freemius.com
9746
- * for further details.
9747
- *
9748
- * @author Vova Feldman (@svovaf)
9749
- * @since 1.2.1
9750
- *
9751
- * @param string $name Event name.
9752
- * @param array $properties Associative key/value array with primitive values only
9753
- * @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
9754
- *
9755
- * @return object|false Event data or FALSE on failure.
9756
- *
9757
- * @throws \Freemius_InvalidArgumentException
9758
- *
9759
- * @user Freemius::track_event()
9760
- */
9761
- public function track_event_once( $name, $properties = array(), $process_at = false ) {
9762
- return $this->track_event( $name, $properties, $process_at, true );
9763
- }
9764
-
9765
- /**
9766
- * Plugin uninstall hook.
9767
- *
9768
- * @author Vova Feldman (@svovaf)
9769
- * @since 1.0.1
9770
- *
9771
- * @param bool $check_user Enforce checking if user have plugins activation privileges.
9772
- */
9773
- function _uninstall_plugin_event( $check_user = true ) {
9774
- $this->_logger->entrance( 'slug = ' . $this->_slug );
9775
-
9776
- if ( $check_user && ! current_user_can( 'activate_plugins' ) ) {
9777
- return;
9778
- }
9779
-
9780
- $params = array();
9781
- $uninstall_reason = null;
9782
- if ( isset( $this->_storage->uninstall_reason ) ) {
9783
- $uninstall_reason = $this->_storage->uninstall_reason;
9784
- $params['reason_id'] = $uninstall_reason->id;
9785
- $params['reason_info'] = $uninstall_reason->info;
9786
- }
9787
-
9788
- if ( ! $this->is_registered() ) {
9789
- // Send anonymous uninstall event only if user submitted a feedback.
9790
- if ( isset( $uninstall_reason ) ) {
9791
- if ( isset( $uninstall_reason->is_anonymous ) && ! $uninstall_reason->is_anonymous ) {
9792
- $this->opt_in( false, false, false, false, true );
9793
- } else {
9794
- $params['uid'] = $this->get_anonymous_id();
9795
- $this->get_api_plugin_scope()->call( 'uninstall.json', 'put', $params );
9796
- }
9797
- }
9798
- } else {
9799
- $params = array_merge( $params, array(
9800
- 'is_active' => false,
9801
- 'is_uninstalled' => true,
9802
- ) );
9803
-
9804
- if ( $this->_is_network_active ) {
9805
- // Send uninstall event.
9806
- $this->send_installs_update( $params );
9807
- } else {
9808
- // Send uninstall event.
9809
- $this->send_install_update( $params );
9810
- }
9811
- }
9812
-
9813
- // @todo Decide if we want to delete plugin information from db.
9814
- }
9815
-
9816
- /**
9817
- * Set the basename of the current product and hook _activate_plugin_event_hook() to the activation action.
9818
- *
9819
- * @author Vova Feldman (@svovaf)
9820
- * @since 2.2.1
9821
- *
9822
- * @param string $is_premium
9823
- * @param string $caller
9824
- *
9825
- * @return string
9826
- */
9827
- function set_basename( $is_premium, $caller ) {
9828
- $basename = plugin_basename( $caller );
9829
-
9830
- $current_basename = $is_premium ?
9831
- $this->_premium_plugin_basename :
9832
- $this->_free_plugin_basename;
9833
-
9834
- if ( $current_basename == $basename ) {
9835
- // Basename value set correctly.
9836
- return;
9837
- }
9838
-
9839
- if ( $is_premium ) {
9840
- $this->_premium_plugin_basename = $basename;
9841
- } else {
9842
- $this->_free_plugin_basename = $basename;
9843
- }
9844
-
9845
- $plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
9846
-
9847
- register_activation_hook(
9848
- $plugin_dir . $basename,
9849
- array( &$this, '_activate_plugin_event_hook' )
9850
- );
9851
- }
9852
-
9853
- /**
9854
- * @author Vova Feldman (@svovaf)
9855
- * @since 1.1.1
9856
- * @since 2.2.1 If the context product is in its premium version, use the current module's basename, even if it was renamed.
9857
- *
9858
- * @return string
9859
- */
9860
- function premium_plugin_basename() {
9861
- if ( ! isset( $this->_premium_plugin_basename ) ) {
9862
- $this->_premium_plugin_basename = $this->is_premium() ?
9863
- // The product is premium, so use the current basename.
9864
- $this->_plugin_basename :
9865
- $this->get_premium_slug() . '/' . basename( $this->_free_plugin_basename );
9866
- }
9867
-
9868
- return $this->_premium_plugin_basename;
9869
- }
9870
-
9871
- /**
9872
- * Uninstall plugin hook. Called only when connected his account with Freemius for active sites tracking.
9873
- *
9874
- * @author Vova Feldman (@svovaf)
9875
- * @since 1.0.2
9876
- */
9877
- public static function _uninstall_plugin_hook() {
9878
- self::_load_required_static();
9879
-
9880
- self::$_static_logger->entrance();
9881
-
9882
- if ( ! current_user_can( 'activate_plugins' ) ) {
9883
- return;
9884
- }
9885
-
9886
- $plugin_file = substr( current_filter(), strlen( 'uninstall_' ) );
9887
-
9888
- self::$_static_logger->info( 'plugin = ' . $plugin_file );
9889
-
9890
- define( 'WP_FS__UNINSTALL_MODE', true );
9891
-
9892
- $fs = self::get_instance_by_file( $plugin_file );
9893
-
9894
- if ( is_object( $fs ) ) {
9895
- $fs->remove_sdk_reference();
9896
-
9897
- self::require_plugin_essentials();
9898
-
9899
- if ( is_plugin_active( $fs->_free_plugin_basename ) ||
9900
- is_plugin_active( $fs->premium_plugin_basename() )
9901
- ) {
9902
- // Deleting Free or Premium plugin version while the other version still installed.
9903
- return;
9904
- }
9905
-
9906
- $fs->_uninstall_plugin_event();
9907
-
9908
- $fs->do_action( 'after_uninstall' );
9909
- }
9910
- }
9911
-
9912
- #----------------------------------------------------------------------------------
9913
- #region Plugin Information
9914
- #----------------------------------------------------------------------------------
9915
-
9916
- /**
9917
- * Load WordPress core plugin.php essential module.
9918
- *
9919
- * @author Vova Feldman (@svovaf)
9920
- * @since 1.1.1
9921
- */
9922
- private static function require_plugin_essentials() {
9923
- if ( ! function_exists( 'get_plugins' ) ) {
9924
- self::$_static_logger->log( 'Including wp-admin/includes/plugin.php...' );
9925
-
9926
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
9927
- }
9928
- }
9929
-
9930
- /**
9931
- * Load WordPress core pluggable.php module.
9932
- *
9933
- * @author Vova Feldman (@svovaf)
9934
- * @since 1.1.2
9935
- */
9936
- private static function require_pluggable_essentials() {
9937
- if ( ! function_exists( 'wp_get_current_user' ) ) {
9938
- require_once ABSPATH . 'wp-includes/pluggable.php';
9939
- }
9940
- }
9941
-
9942
- /**
9943
- * Return plugin data.
9944
- *
9945
- * @author Vova Feldman (@svovaf)
9946
- * @since 1.0.1
9947
- *
9948
- * @param bool $reparse_plugin_metadata
9949
- *
9950
- * @return array
9951
- */
9952
- function get_plugin_data( $reparse_plugin_metadata = false ) {
9953
- if ( ! isset( $this->_plugin_data ) || $reparse_plugin_metadata ) {
9954
- self::require_plugin_essentials();
9955
-
9956
- if ( $this->is_plugin() ) {
9957
- /**
9958
- * @author Vova Feldman (@svovaf)
9959
- * @since 1.2.0 When using get_plugin_data() do NOT translate plugin data.
9960
- *
9961
- * @link https://github.com/Freemius/wordpress-sdk/issues/77
9962
- */
9963
- $plugin_data = get_plugin_data(
9964
- $this->_plugin_main_file_path,
9965
- false,
9966
- false
9967
- );
9968
- } else {
9969
- $theme_data = wp_get_theme();
9970
-
9971
- if ( $this->_plugin_basename !== $theme_data->get_stylesheet() && is_child_theme() ) {
9972
- $parent_theme = $theme_data->parent();
9973
-
9974
- if ( ( $parent_theme instanceof WP_Theme ) && $this->_plugin_basename === $parent_theme->get_stylesheet() ) {
9975
- $theme_data = $parent_theme;
9976
- }
9977
- }
9978
-
9979
- $plugin_data = array(
9980
- 'Name' => $theme_data->get( 'Name' ),
9981
- 'Version' => $theme_data->get( 'Version' ),
9982
- 'Author' => $theme_data->get( 'Author' ),
9983
- 'Description' => $theme_data->get( 'Description' ),
9984
- 'PluginURI' => $theme_data->get( 'ThemeURI' ),
9985
- );
9986
- }
9987
-
9988
- $this->_plugin_data = $plugin_data;
9989
- }
9990
-
9991
- return $this->_plugin_data;
9992
- }
9993
-
9994
- /**
9995
- * @author Vova Feldman (@svovaf)
9996
- * @since 1.0.1
9997
- * @since 1.2.2.5 If slug not set load slug by module ID.
9998
- *
9999
- * @return string Plugin slug.
10000
- */
10001
- function get_slug() {
10002
- if ( ! isset( $this->_slug ) ) {
10003
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
10004
- $this->_slug = $id_slug_type_path_map[ $this->_module_id ]['slug'];
10005
- }
10006
-
10007
- return $this->_slug;
10008
- }
10009
-
10010
- /**
10011
- * @author Leo Fajardo (@leorw)
10012
- * @since 2.2.1
10013
- *
10014
- * @return string
10015
- */
10016
- function get_premium_slug() {
10017
- return is_object( $this->_plugin ) ?
10018
- $this->_plugin->premium_slug :
10019
- "{$this->_slug}-premium";
10020
- }
10021
-
10022
- /**
10023
- * Retrieve the desired folder name for the product.
10024
- *
10025
- * @author Vova Feldman (@svovaf)
10026
- * @since 1.2.1.7
10027
- *
10028
- * @return string Plugin slug.
10029
- */
10030
- function get_target_folder_name() {
10031
- return $this->can_use_premium_code() ?
10032
- $this->_plugin->premium_slug :
10033
- $this->_slug;
10034
- }
10035
-
10036
- /**
10037
- * @author Vova Feldman (@svovaf)
10038
- * @since 1.0.1
10039
- *
10040
- * @return number Plugin ID.
10041
- */
10042
- function get_id() {
10043
- return $this->_plugin->id;
10044
- }
10045
-
10046
- /**
10047
- * @author Leo Fajardo (@leorw)
10048
- * @since 2.2.4
10049
- *
10050
- * @return number|null Bundle ID.
10051
- */
10052
- function get_bundle_id() {
10053
- return ( isset( $this->_plugin->bundle_id ) && FS_Plugin::is_valid_id( $this->_plugin->bundle_id ) ) ?
10054
- $this->_plugin->bundle_id :
10055
- null;
10056
- }
10057
-
10058
- /**
10059
- * @author Vova Feldman (@svovaf)
10060
- * @since 2.3.1
10061
- *
10062
- * @return string|null Bundle public key.
10063
- */
10064
- function get_bundle_public_key() {
10065
- return isset( $this->_plugin->bundle_public_key ) ?
10066
- $this->_plugin->bundle_public_key :
10067
- null;
10068
- }
10069
-
10070
- /**
10071
- * @author Vova Feldman (@svovaf)
10072
- * @since 1.2.1.5
10073
- *
10074
- * @return string Freemius SDK version
10075
- */
10076
- function get_sdk_version() {
10077
- return $this->version;
10078
- }
10079
-
10080
- /**
10081
- * @author Vova Feldman (@svovaf)
10082
- * @since 1.2.1.5
10083
- *
10084
- * @return number Parent plugin ID (if parent exist).
10085
- */
10086
- function get_parent_id() {
10087
- return $this->is_addon() ?
10088
- $this->get_parent_instance()->get_id() :
10089
- $this->_plugin->id;
10090
- }
10091
-
10092
- /**
10093
- * @author Vova Feldman (@svovaf)
10094
- * @since 2.3.1
10095
- *
10096
- * @return string
10097
- */
10098
- function get_usage_tracking_terms_url() {
10099
- return $this->apply_filters(
10100
- 'usage_tracking_terms_url',
10101
- "https://freemius.com/wordpress/usage-tracking/{$this->_plugin->id}/{$this->_slug}/"
10102
- );
10103
- }
10104
-
10105
- /**
10106
- * @author Vova Feldman (@svovaf)
10107
- * @since 2.3.1
10108
- *
10109
- * @return string
10110
- */
10111
- function get_eula_url() {
10112
- return $this->apply_filters(
10113
- 'eula_url',
10114
- "https://freemius.com/terms/{$this->_plugin->id}/{$this->_slug}/"
10115
- );
10116
- }
10117
-
10118
- /**
10119
- * @author Vova Feldman (@svovaf)
10120
- * @since 1.0.1
10121
- *
10122
- * @return string Plugin public key.
10123
- */
10124
- function get_public_key() {
10125
- return $this->_plugin->public_key;
10126
- }
10127
-
10128
- /**
10129
- * Will be available only on sandbox mode.
10130
- *
10131
- * @author Vova Feldman (@svovaf)
10132
- * @since 1.0.4
10133
- *
10134
- * @return mixed Plugin secret key.
10135
- */
10136
- function get_secret_key() {
10137
- return $this->_plugin->secret_key;
10138
- }
10139
-
10140
- /**
10141
- * @author Vova Feldman (@svovaf)
10142
- * @since 1.1.1
10143
- *
10144
- * @return bool
10145
- */
10146
- function has_secret_key() {
10147
- return ! empty( $this->_plugin->secret_key );
10148
- }
10149
-
10150
- /**
10151
- * @author Vova Feldman (@svovaf)
10152
- * @since 1.0.9
10153
- *
10154
- * @param string|bool $premium_suffix
10155
- *
10156
- * @return string
10157
- */
10158
- function get_plugin_name( $premium_suffix = false ) {
10159
- $this->_logger->entrance();
10160
-
10161
- /**
10162
- * This `if-else` can be squeezed into a single `if` but I intentionally split it for code readability.
10163
- *
10164
- * @author Vova Feldman
10165
- */
10166
- if ( ! isset( $this->_plugin_name ) ) {
10167
- // Name is not yet set.
10168
- $this->set_name( $premium_suffix );
10169
- } else if (
10170
- ! empty( $premium_suffix ) &&
10171
- ( ! is_object( $this->_plugin ) || $this->_plugin->premium_suffix !== $premium_suffix )
10172
- ) {
10173
- // Name is already set, but there's a change in the premium suffix.
10174
- $this->set_name( $premium_suffix );
10175
- }
10176
-
10177
- return $this->_plugin_name;
10178
- }
10179
-
10180
- /**
10181
- * Calculates and stores the product's name. This helper function was created specifically for get_plugin_name() just to make the code clearer.
10182
- *
10183
- * @author Vova Feldman (@svovaf)
10184
- * @since 2.2.1
10185
- *
10186
- * @param string $premium_suffix
10187
- */
10188
- private function set_name( $premium_suffix = '' ) {
10189
- $plugin_data = $this->get_plugin_data();
10190
-
10191
- // Get name.
10192
- $this->_plugin_name = $plugin_data['Name'];
10193
-
10194
- if ( is_string( $premium_suffix ) ) {
10195
- $premium_suffix = trim( $premium_suffix );
10196
-
10197
- if ( ! empty( $premium_suffix ) ) {
10198
- // Check if plugin name contains " (premium)" or a custom suffix and remove it.
10199
- $suffix = ( ' ' . strtolower( $premium_suffix ) );
10200
- $suffix_len = strlen( $suffix );
10201
-
10202
- if ( strlen( $plugin_data['Name'] ) > $suffix_len &&
10203
- $suffix === substr( strtolower( $plugin_data['Name'] ), - $suffix_len )
10204
- ) {
10205
- $this->_plugin_name = substr( $plugin_data['Name'], 0, - $suffix_len );
10206
- }
10207
- }
10208
- }
10209
-
10210
- $this->_logger->departure( 'Name = ' . $this->_plugin_name );
10211
- }
10212
-
10213
- /**
10214
- * @author Vova Feldman (@svovaf)
10215
- * @since 1.0.0
10216
- *
10217
- * @param bool $reparse_plugin_metadata
10218
- *
10219
- * @return string
10220
- */
10221
- function get_plugin_version( $reparse_plugin_metadata = false ) {
10222
- $this->_logger->entrance();
10223
-
10224
- $plugin_data = $this->get_plugin_data( $reparse_plugin_metadata );
10225
-
10226
- $this->_logger->departure( 'Version = ' . $plugin_data['Version'] );
10227
-
10228
- return $this->apply_filters( 'plugin_version', $plugin_data['Version'] );
10229
- }
10230
-
10231
- /**
10232
- * @author Vova Feldman (@svovaf)
10233
- * @since 1.2.1.7
10234
- *
10235
- * @return string
10236
- */
10237
- function get_plugin_title() {
10238
- $this->_logger->entrance();
10239
-
10240
- $title = $this->_plugin->title;
10241
-
10242
- return $this->apply_filters( 'plugin_title', $title );
10243
- }
10244
-
10245
- /**
10246
- * @author Vova Feldman (@svovaf)
10247
- * @since 1.2.2.7
10248
- *
10249
- * @param bool $lowercase
10250
- *
10251
- * @return string
10252
- */
10253
- function get_module_label( $lowercase = false ) {
10254
- $label = $this->is_addon() ?
10255
- $this->get_text_inline( 'Add-On', 'addon' ) :
10256
- ( $this->is_plugin() ?
10257
- $this->get_text_inline( 'Plugin', 'plugin' ) :
10258
- $this->get_text_inline( 'Theme', 'theme' ) );
10259
-
10260
- if ( $lowercase ) {
10261
- $label = strtolower( $label );
10262
- }
10263
-
10264
- return $label;
10265
- }
10266
-
10267
- /**
10268
- * @author Vova Feldman (@svovaf)
10269
- * @since 1.0.4
10270
- *
10271
- * @return string
10272
- */
10273
- function get_plugin_basename() {
10274
- if ( ! isset( $this->_plugin_basename ) ) {
10275
- if ( $this->is_plugin() ) {
10276
- $this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
10277
- } else {
10278
- $this->_plugin_basename = basename( dirname( $this->_plugin_main_file_path ) );
10279
- }
10280
- }
10281
-
10282
- return $this->_plugin_basename;
10283
- }
10284
-
10285
- function get_plugin_folder_name() {
10286
- $this->_logger->entrance();
10287
-
10288
- $plugin_folder = $this->_plugin_basename;
10289
-
10290
- while ( '.' !== dirname( $plugin_folder ) ) {
10291
- $plugin_folder = dirname( $plugin_folder );
10292
- }
10293
-
10294
- $this->_logger->departure( 'Folder Name = ' . $plugin_folder );
10295
-
10296
- return $plugin_folder;
10297
- }
10298
-
10299
- #endregion ------------------------------------------------------------------
10300
-
10301
- /* Account
10302
- ------------------------------------------------------------------------------------------------------------------*/
10303
-
10304
- /**
10305
- * Find plugin's slug by plugin's basename.
10306
- *
10307
- * @author Vova Feldman (@svovaf)
10308
- * @since 1.0.9
10309
- *
10310
- * @param string $plugin_base_name
10311
- *
10312
- * @return false|string
10313
- */
10314
- private static function find_slug_by_basename( $plugin_base_name ) {
10315
- $file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
10316
-
10317
- if ( ! array( $file_slug_map ) || ! isset( $file_slug_map[ $plugin_base_name ] ) ) {
10318
- return false;
10319
- }
10320
-
10321
- return $file_slug_map[ $plugin_base_name ];
10322
- }
10323
-
10324
- /**
10325
- * Store the map between the plugin's basename to the slug.
10326
- *
10327
- * @author Vova Feldman (@svovaf)
10328
- * @since 1.0.9
10329
- */
10330
- private function store_file_slug_map() {
10331
- $file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
10332
-
10333
- if ( ! array( $file_slug_map ) ) {
10334
- $file_slug_map = array();
10335
- }
10336
-
10337
- if ( ! isset( $file_slug_map[ $this->_plugin_basename ] ) ||
10338
- $file_slug_map[ $this->_plugin_basename ] !== $this->_slug
10339
- ) {
10340
- $file_slug_map[ $this->_plugin_basename ] = $this->_slug;
10341
- self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
10342
- }
10343
- }
10344
-
10345
- /**
10346
- * @return array[number]FS_User
10347
- */
10348
- static function get_all_users() {
10349
- $users = self::maybe_get_entities_account_option( 'users', array() );
10350
-
10351
- if ( ! is_array( $users ) ) {
10352
- $users = array();
10353
- }
10354
-
10355
- return $users;
10356
- }
10357
-
10358
- /**
10359
- * @param string $module_type
10360
- * @param null|int $blog_id Since 2.0.0
10361
- *
10362
- * @return array[string]FS_Site
10363
- */
10364
- private static function get_all_sites(
10365
- $module_type = WP_FS__MODULE_TYPE_PLUGIN,
10366
- $blog_id = null
10367
- ) {
10368
- $sites = self::get_account_option( 'sites', $module_type, $blog_id );
10369
-
10370
- if ( ! is_array( $sites ) ) {
10371
- $sites = array();
10372
- }
10373
-
10374
- return $sites;
10375
- }
10376
-
10377
- /**
10378
- * @author Leo Fajardo (@leorw)
10379
- *
10380
- * @since 1.2.2
10381
- *
10382
- * @param string $option_name
10383
- * @param string $module_type
10384
- * @param null|int $network_level_or_blog_id Since 2.0.0
10385
- *
10386
- * @return mixed
10387
- */
10388
- private static function get_account_option( $option_name, $module_type = null, $network_level_or_blog_id = null ) {
10389
- if ( ! is_null( $module_type ) && WP_FS__MODULE_TYPE_PLUGIN !== $module_type ) {
10390
- $option_name = $module_type . '_' . $option_name;
10391
- }
10392
-
10393
- return self::maybe_get_entities_account_option( $option_name, array(), $network_level_or_blog_id );
10394
- }
10395
-
10396
- /**
10397
- * @author Leo Fajardo (@leorw)
10398
- *
10399
- * @since 1.2.2
10400
- *
10401
- * @param string $option_name
10402
- * @param mixed $option_value
10403
- * @param bool $store
10404
- * @param null|int $network_level_or_blog_id Since 2.0.0
10405
- */
10406
- private function set_account_option( $option_name, $option_value, $store, $network_level_or_blog_id = null ) {
10407
- self::set_account_option_by_module(
10408
- $this->_module_type,
10409
- $option_name,
10410
- $option_value,
10411
- $store,
10412
- $network_level_or_blog_id
10413
- );
10414
- }
10415
-
10416
- /**
10417
- * @author Vova Feldman (@svovaf)
10418
- *
10419
- * @since 1.2.2.7
10420
- *
10421
- * @param string $module_type
10422
- * @param string $option_name
10423
- * @param mixed $option_value
10424
- * @param bool $store
10425
- * @param null|int $network_level_or_blog_id Since 2.0.0
10426
- */
10427
- private static function set_account_option_by_module(
10428
- $module_type,
10429
- $option_name,
10430
- $option_value,
10431
- $store,
10432
- $network_level_or_blog_id = null
10433
- ) {
10434
- if ( WP_FS__MODULE_TYPE_PLUGIN != $module_type ) {
10435
- $option_name = $module_type . '_' . $option_name;
10436
- }
10437
-
10438
- self::$_accounts->set_option( $option_name, $option_value, $store, $network_level_or_blog_id );
10439
- }
10440
-
10441
- /**
10442
- * This method can also return non-entity or non-entities collection option like the `user_id_license_ids_map` option.
10443
- *
10444
- * @author Leo Fajardo (@leorw)
10445
- * @since 2.3.1
10446
- *
10447
- * @param string $option_name
10448
- * @param mixed $default
10449
- * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite storage (if there's a network). When `false`, use the current context blog storage. When `null`, the decision which storage to use (MS vs. Current S) will be handled internally and determined based on the $option (based on self::$_SITE_LEVEL_PARAMS).
10450
- *
10451
- * @return mixed|FS_Plugin[]|FS_User[]|FS_Site[]|FS_Plugin_License[]|FS_Plugin_Plan[]|FS_Plugin_Tag[]
10452
- */
10453
- private static function maybe_get_entities_account_option( $option_name, $default = null, $network_level_or_blog_id = null ) {
10454
- $option = self::$_accounts->get_option( $option_name, $default, $network_level_or_blog_id );
10455
-
10456
- $class_name = '';
10457
-
10458
- if ( fs_starts_with( $option_name, WP_FS__MODULE_TYPE_THEME . '_' ) ) {
10459
- $option_name = str_replace( WP_FS__MODULE_TYPE_THEME . '_', '', $option_name );
10460
- }
10461
-
10462
- switch ( $option_name ) {
10463
- case 'plugins':
10464
- case 'themes':
10465
- case 'addons':
10466
- $class_name = FS_Plugin::get_class_name();
10467
- break;
10468
- case 'users':
10469
- $class_name = FS_User::get_class_name();
10470
- break;
10471
- case 'sites':
10472
- $class_name = FS_Site::get_class_name();
10473
- break;
10474
- case 'licenses':
10475
- case 'all_licenses':
10476
- $class_name = FS_Plugin_License::get_class_name();
10477
- break;
10478
- case 'plans':
10479
- $class_name = FS_Plugin_Plan::get_class_name();
10480
- break;
10481
- case 'updates':
10482
- $class_name = FS_Plugin_Tag::get_class_name();
10483
- break;
10484
- }
10485
-
10486
- if ( empty( $class_name ) ) {
10487
- return $option;
10488
- }
10489
-
10490
- return fs_get_entities( $option, $class_name );
10491
- }
10492
-
10493
- /**
10494
- * @author Vova Feldman (@svovaf)
10495
- * @since 1.0.6
10496
- *
10497
- * @param number|null $module_id
10498
- *
10499
- * @return FS_Plugin_License[]
10500
- */
10501
- private static function get_all_licenses( $module_id = null ) {
10502
- $licenses = self::get_account_option( 'all_licenses' );
10503
-
10504
- if ( ! is_array( $licenses ) ) {
10505
- $licenses = array();
10506
- }
10507
-
10508
- if ( is_null( $module_id ) ) {
10509
- return $licenses;
10510
- }
10511
-
10512
- $licenses = isset( $licenses[ $module_id ] ) ?
10513
- $licenses[ $module_id ] :
10514
- array();
10515
-
10516
- return $licenses;
10517
- }
10518
-
10519
- /**
10520
- * @author Leo Fajardo (@leorw)
10521
- * @since 2.0.0
10522
- *
10523
- * @return array
10524
- */
10525
- private static function get_all_licenses_by_module_type() {
10526
- $licenses = self::get_account_option( 'all_licenses' );
10527
-
10528
- $licenses_by_module_type = array(
10529
- WP_FS__MODULE_TYPE_PLUGIN => array(),
10530
- WP_FS__MODULE_TYPE_THEME => array()
10531
- );
10532
-
10533
- if ( ! is_array( $licenses ) ) {
10534
- return $licenses_by_module_type;
10535
- }
10536
-
10537
- foreach ( $licenses as $module_id => $module_licenses ) {
10538
- $fs = self::get_instance_by_id( $module_id );
10539
- if ( false === $fs ) {
10540
- continue;
10541
- }
10542
-
10543
- $licenses_by_module_type[ $fs->_module_type ] = array_merge( $licenses_by_module_type[ $fs->_module_type ], $module_licenses );
10544
- }
10545
-
10546
- return $licenses_by_module_type;
10547
- }
10548
-
10549
- /**
10550
- * @author Leo Fajardo (@leorw)
10551
- * @since 2.0.0
10552
- *
10553
- * @param number $module_id
10554
- * @param number|null $user_id
10555
- *
10556
- * @return array
10557
- */
10558
- private static function get_user_id_license_ids_map( $module_id, $user_id = null ) {
10559
- $all_modules_user_id_license_ids_map = self::get_account_option( 'user_id_license_ids_map' );
10560
-
10561
- if ( ! is_array( $all_modules_user_id_license_ids_map ) ) {
10562
- $all_modules_user_id_license_ids_map = array();
10563
- }
10564
-
10565
- $user_id_license_ids_map = isset( $all_modules_user_id_license_ids_map[ $module_id ] ) ?
10566
- $all_modules_user_id_license_ids_map[ $module_id ] :
10567
- array();
10568
-
10569
- if ( FS_User::is_valid_id( $user_id ) ) {
10570
- $user_id_license_ids_map = isset( $user_id_license_ids_map[ $user_id ] ) ?
10571
- $user_id_license_ids_map[ $user_id ] :
10572
- array();
10573
- }
10574
-
10575
- return $user_id_license_ids_map;
10576
- }
10577
-
10578
- /**
10579
- * @author Leo Fajardo (@leorw)
10580
- * @since 2.0.0
10581
- *
10582
- * @param array $new_user_id_license_ids_map
10583
- * @param number $module_id
10584
- * @param number|null $user_id
10585
- */
10586
- private static function store_user_id_license_ids_map( $new_user_id_license_ids_map, $module_id, $user_id = null ) {
10587
- $all_modules_user_id_license_ids_map = self::get_account_option( 'user_id_license_ids_map' );
10588
- if ( ! is_array( $all_modules_user_id_license_ids_map ) ) {
10589
- $all_modules_user_id_license_ids_map = array();
10590
- }
10591
-
10592
- if ( ! isset( $all_modules_user_id_license_ids_map[ $module_id ] ) ) {
10593
- $all_modules_user_id_license_ids_map[ $module_id ] = array();
10594
- }
10595
-
10596
- if ( FS_User::is_valid_id( $user_id ) ) {
10597
- $all_modules_user_id_license_ids_map[ $module_id ][ $user_id ] = $new_user_id_license_ids_map;
10598
- } else {
10599
- $all_modules_user_id_license_ids_map[ $module_id ] = $new_user_id_license_ids_map;
10600
- }
10601
-
10602
- self::$_accounts->set_option( 'user_id_license_ids_map', $all_modules_user_id_license_ids_map, true );
10603
- }
10604
-
10605
- /**
10606
- * Get a collection of the user's linked license IDs.
10607
- *
10608
- * @author Vova Feldman (@svovaf)
10609
- * @since 2.0.0
10610
- *
10611
- * @param number $user_id
10612
- *
10613
- * @return number[]
10614
- */
10615
- private function get_user_linked_license_ids( $user_id ) {
10616
- return self::get_user_id_license_ids_map( $this->_module_id, $user_id );
10617
- }
10618
-
10619
- /**
10620
- * Override the user's linked license IDs with a new IDs collection.
10621
- *
10622
- * @author Vova Feldman (@svovaf)
10623
- * @since 2.0.0
10624
- *
10625
- * @param number $user_id
10626
- * @param number[] $license_ids
10627
- */
10628
- private function set_user_linked_license_ids( $user_id, array $license_ids ) {
10629
- self::store_user_id_license_ids_map( $license_ids, $this->_module_id, $user_id );
10630
- }
10631
-
10632
- /**
10633
- * Link a specified license ID to a given user.
10634
- *
10635
- * @author Vova Feldman (@svovaf)
10636
- * @since 2.0.0
10637
- *
10638
- * @param number $license_id
10639
- * @param number $user_id
10640
- */
10641
- private function link_license_2_user( $license_id, $user_id ) {
10642
- $license_ids = $this->get_user_linked_license_ids( $user_id );
10643
-
10644
- if ( in_array( $license_id, $license_ids ) ) {
10645
- // License already linked.
10646
- return;
10647
- }
10648
-
10649
- $license_ids[] = $license_id;
10650
-
10651
- $this->set_user_linked_license_ids( $user_id, $license_ids );
10652
- }
10653
-
10654
- /**
10655
- * @param string|bool $module_type
10656
- *
10657
- * @return FS_Plugin_Plan[]
10658
- */
10659
- private static function get_all_plans( $module_type = false ) {
10660
- $plans = self::get_account_option( 'plans', $module_type );
10661
-
10662
- if ( ! is_array( $plans ) ) {
10663
- $plans = array();
10664
- }
10665
-
10666
- return $plans;
10667
- }
10668
-
10669
- /**
10670
- * @author Vova Feldman (@svovaf)
10671
- * @since 1.0.4
10672
- *
10673
- * @return FS_Plugin_Tag[]
10674
- */
10675
- private static function get_all_updates() {
10676
- $updates = self::maybe_get_entities_account_option( 'updates', array() );
10677
-
10678
- if ( ! is_array( $updates ) ) {
10679
- $updates = array();
10680
- }
10681
-
10682
- return $updates;
10683
- }
10684
-
10685
- /**
10686
- * @author Vova Feldman (@svovaf)
10687
- * @since 1.0.6
10688
- *
10689
- * @return array<number,FS_Plugin[]>|false
10690
- */
10691
- private static function get_all_addons() {
10692
- $addons = self::maybe_get_entities_account_option( 'addons', array() );
10693
-
10694
- if ( ! is_array( $addons ) ) {
10695
- $addons = array();
10696
- }
10697
-
10698
- return $addons;
10699
- }
10700
-
10701
- /**
10702
- * @author Vova Feldman (@svovaf)
10703
- * @since 1.0.6
10704
- *
10705
- * @return number[]|false
10706
- */
10707
- private static function get_all_account_addons() {
10708
- $addons = self::$_accounts->get_option( 'account_addons', array() );
10709
-
10710
- if ( ! is_array( $addons ) ) {
10711
- $addons = array();
10712
- }
10713
-
10714
- return $addons;
10715
- }
10716
-
10717
- /**
10718
- * Check if user has connected his account (opted-in).
10719
- *
10720
- * Note:
10721
- * If the user opted-in and opted-out on a later stage,
10722
- * this will still return true. If you want to check if the
10723
- * user is currently opted-in, use:
10724
- * `$fs->is_registered() && $fs->is_tracking_allowed()`
10725
- *
10726
- * @author Vova Feldman (@svovaf)
10727
- * @since 1.0.1
10728
- * @return bool
10729
- */
10730
- function is_registered() {
10731
- return is_object( $this->_user );
10732
- }
10733
-
10734
- /**
10735
- * Returns TRUE if the user opted-in and didn't disconnect (opt-out).
10736
- *
10737
- * @author Leo Fajardo (@leorw)
10738
- * @since 1.2.1.5
10739
- *
10740
- * @return bool
10741
- */
10742
- function is_tracking_allowed() {
10743
- return ( is_object( $this->_site ) && $this->_site->is_tracking_allowed() );
10744
- }
10745
-
10746
- /**
10747
- * @author Leo Fajardo (@leorw)
10748
- * @since 2.4.0
10749
- *
10750
- * @return bool
10751
- */
10752
- function is_bundle_license_auto_activation_enabled() {
10753
- return $this->is_addon() ?
10754
- ( is_object( $this->_parent ) && $this->_parent->is_bundle_license_auto_activation_enabled() ) :
10755
- $this->_is_bundle_license_auto_activation_enabled;
10756
- }
10757
-
10758
- /**
10759
- * @author Vova Feldman (@svovaf)
10760
- * @since 1.0.4
10761
- *
10762
- * @return FS_Plugin
10763
- */
10764
- function get_plugin() {
10765
- return $this->_plugin;
10766
- }
10767
-
10768
- /**
10769
- * @author Vova Feldman (@svovaf)
10770
- * @since 1.0.3
10771
- *
10772
- * @return FS_User
10773
- */
10774
- function get_user() {
10775
- return $this->_user;
10776
- }
10777
-
10778
- /**
10779
- * @author Vova Feldman (@svovaf)
10780
- * @since 1.0.3
10781
- *
10782
- * @return FS_Site
10783
- */
10784
- function get_site() {
10785
- return $this->_site;
10786
- }
10787
-
10788
- /**
10789
- * Get plugin add-ons.
10790
- *
10791
- * @author Vova Feldman (@svovaf)
10792
- * @since 1.0.6
10793
- *
10794
- * @since 1.1.7.3 If not yet loaded, fetch data from the API.
10795
- *
10796
- * @param bool $flush
10797
- *
10798
- * @return FS_Plugin[]|false
10799
- */
10800
- function get_addons( $flush = false ) {
10801
- $this->_logger->entrance();
10802
-
10803
- if ( ! $this->_has_addons ) {
10804
- return false;
10805
- }
10806
-
10807
- $addons = $this->sync_addons( $flush );
10808
-
10809
- return ( ! is_array( $addons ) || empty( $addons ) ) ?
10810
- false :
10811
- $addons;
10812
- }
10813
-
10814
- /**
10815
- * @author Vova Feldman (@svovaf)
10816
- * @since 1.0.6
10817
- *
10818
- * @return number[]|false
10819
- */
10820
- function get_account_addons() {
10821
- $this->_logger->entrance();
10822
-
10823
- $addons = self::get_all_account_addons();
10824
-
10825
- if ( ! is_array( $addons ) ||
10826
- ! isset( $addons[ $this->_plugin->id ] ) ||
10827
- ! is_array( $addons[ $this->_plugin->id ] ) ||
10828
- 0 === count( $addons[ $this->_plugin->id ] )
10829
- ) {
10830
- return false;
10831
- }
10832
-
10833
- return $addons[ $this->_plugin->id ];
10834
- }
10835
-
10836
- /**
10837
- * Check if user has any
10838
- *
10839
- * @author Vova Feldman (@svovaf)
10840
- * @since 1.1.6
10841
- *
10842
- * @return bool
10843
- */
10844
- function has_account_addons() {
10845
- $addons = $this->get_account_addons();
10846
-
10847
- return is_array( $addons ) && ( 0 < count( $addons ) );
10848
- }
10849
-
10850
-
10851
- /**
10852
- * Get add-on by ID (from local data).
10853
- *
10854
- * @author Vova Feldman (@svovaf)
10855
- * @since 1.0.6
10856
- *
10857
- * @param number $id
10858
- *
10859
- * @return FS_Plugin|false
10860
- */
10861
- function get_addon( $id ) {
10862
- $this->_logger->entrance();
10863
-
10864
- $addons = $this->get_addons();
10865
-
10866
- if ( is_array( $addons ) ) {
10867
- foreach ( $addons as $addon ) {
10868
- if ( $id == $addon->id ) {
10869
- return $addon;
10870
- }
10871
- }
10872
- }
10873
-
10874
- return false;
10875
- }
10876
-
10877
- /**
10878
- * Get add-on by slug (from local data).
10879
- *
10880
- * @author Vova Feldman (@svovaf)
10881
- * @since 1.0.6
10882
- *
10883
- * @param string $slug
10884
- *
10885
- * @param bool $flush
10886
- *
10887
- * @return FS_Plugin|false
10888
- */
10889
- function get_addon_by_slug( $slug, $flush = false ) {
10890
- $this->_logger->entrance();
10891
-
10892
- $addons = $this->get_addons( $flush );
10893
-
10894
- if ( is_array( $addons ) ) {
10895
- foreach ( $addons as $addon ) {
10896
- if ( $slug === $addon->slug ) {
10897
- return $addon;
10898
- }
10899
- }
10900
- }
10901
-
10902
- return false;
10903
- }
10904
-
10905
- /**
10906
- * @var array<number,object[]> {
10907
- * @key number Add-on ID.
10908
- * @val object[] The add-on's plans and prices object.
10909
- * }
10910
- */
10911
- private $plans_and_pricing_by_addon_id;
10912
-
10913
- /**
10914
- * @author Leo Fajardo (@leorw)
10915
- * @since 2.3.0
10916
- *
10917
- * @return array<number,object[]> {
10918
- * @key number Add-on ID.
10919
- * @val object[] The add-on's plans and prices object.
10920
- * }
10921
- */
10922
- function _get_addons_plans_and_pricing_map_by_id() {
10923
- if ( ! isset( $this->plans_and_pricing_by_addon_id ) ) {
10924
- $result = $this->get_api_plugin_scope()->get( $this->add_show_pending( "/addons/pricing.json?type=visible" ) );
10925
-
10926
- $plans_and_pricing_by_addon_id = array();
10927
- if ( $this->is_api_result_object( $result, 'addons' ) ) {
10928
- foreach ( $result->addons as $addon ) {
10929
- $plans_and_pricing_by_addon_id[ $addon->id ] = $addon->plans;
10930
- }
10931
- }
10932
-
10933
- $this->plans_and_pricing_by_addon_id = $plans_and_pricing_by_addon_id;
10934
- }
10935
-
10936
- return $this->plans_and_pricing_by_addon_id;
10937
- }
10938
-
10939
- /**
10940
- * @author Leo Fajardo (@leorw)
10941
- * @since 2.3.0
10942
- *
10943
- * @param number $addon_id
10944
- * @param bool $is_installed
10945
- *
10946
- * @return array
10947
- */
10948
- function _get_addon_info( $addon_id, $is_installed ) {
10949
- $addon = $this->get_addon( $addon_id );
10950
-
10951
- if ( ! is_object( $addon ) ) {
10952
- // Unexpected call.
10953
- return array();
10954
- }
10955
-
10956
- $slug = $addon->slug;
10957
-
10958
- $addon_storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
10959
-
10960
- if ( ! fs_is_network_admin() ) {
10961
- // Get blog-level activated installations.
10962
- $sites = self::maybe_get_entities_account_option( 'sites', array() );
10963
- } else {
10964
- $sites = null;
10965
-
10966
- if ( $this->is_addon_activated( $addon_id ) &&
10967
- $this->get_addon_instance( $addon_id )->is_network_active()
10968
- ) {
10969
- if ( FS_Site::is_valid_id( $addon_storage->network_install_blog_id ) ) {
10970
- // Get network-level activated installations.
10971
- $sites = self::maybe_get_entities_account_option(
10972
- 'sites',
10973
- array(),
10974
- $addon_storage->network_install_blog_id
10975
- );
10976
- }
10977
- }
10978
- }
10979
-
10980
- $addon_info = array(
10981
- 'is_connected' => false,
10982
- 'slug' => $slug,
10983
- 'title' => $addon->title,
10984
- 'is_whitelabeled' => $addon_storage->is_whitelabeled
10985
- );
10986
-
10987
- if ( ! $is_installed ) {
10988
- $plans_and_pricing_by_addon_id = $this->_get_addons_plans_and_pricing_map_by_id();
10989
-
10990
- if ( isset( $plans_and_pricing_by_addon_id[ $addon_id ] ) ) {
10991
- $has_paid_plan = false;
10992
- $plans = $plans_and_pricing_by_addon_id[ $addon_id ];
10993
-
10994
- if ( is_array( $plans ) && count( $plans ) > 0 ) {
10995
- foreach ( $plans as $plan ) {
10996
- if ( isset( $plan->pricing ) &&
10997
- is_array( $plan->pricing ) &&
10998
- count( $plan->pricing ) > 0
10999
- ) {
11000
- $has_paid_plan = true;
11001
- break;
11002
- }
11003
- }
11004
- }
11005
-
11006
- $addon_info['has_paid_plan'] = $has_paid_plan;
11007
- }
11008
- }
11009
-
11010
- if ( ! is_array( $sites ) || ! isset( $sites[ $slug ] ) ) {
11011
- return $addon_info;
11012
- }
11013
-
11014
- $site = $sites[ $slug ];
11015
-
11016
- $addon_info['is_connected'] = (
11017
- ( $addon->parent_plugin_id == $this->get_id() ) &&
11018
- is_object( $site ) &&
11019
- FS_Site::is_valid_id( $site->id ) &&
11020
- FS_User::is_valid_id( $site->user_id ) &&
11021
- FS_Plugin_Plan::is_valid_id( $site->plan_id )
11022
- );
11023
-
11024
- if ( $addon_info['is_connected'] && $is_installed ) {
11025
- return $addon_info;
11026
- }
11027
-
11028
- $addon_info['site'] = $site;
11029
-
11030
- $plugins_data = self::maybe_get_entities_account_option( WP_FS__MODULE_TYPE_PLUGIN . 's', array() );
11031
- if ( isset( $plugins_data[ $slug ] ) ) {
11032
- $plugin_data = $plugins_data[ $slug ];
11033
-
11034
- $addon_info['version'] = $plugin_data->version;
11035
- }
11036
-
11037
- $all_plans = self::maybe_get_entities_account_option( 'plans', array() );
11038
- if ( isset( $all_plans[ $slug ] ) ) {
11039
- $plans = $all_plans[ $slug ];
11040
-
11041
- foreach ( $plans as $plan ) {
11042
- if ( $site->plan_id == Freemius::_decrypt( $plan->id ) ) {
11043
- $addon_info['plan_name'] = Freemius::_decrypt( $plan->name );
11044
- $addon_info['plan_title'] = Freemius::_decrypt( $plan->title );
11045
- break;
11046
- }
11047
- }
11048
- }
11049
-
11050
- $licenses = self::maybe_get_entities_account_option( 'all_licenses', array() );
11051
- if ( is_array( $licenses ) && isset( $licenses[ $addon_id ] ) ) {
11052
- foreach ( $licenses[ $addon_id ] as $license ) {
11053
- if ( $license->id == $site->license_id ) {
11054
- $addon_info['license'] = $license;
11055
- break;
11056
- }
11057
- }
11058
- }
11059
-
11060
- if ( isset( $addon_info['license'] ) ) {
11061
- if ( isset( $addon_storage->subscriptions ) &&
11062
- ! empty( $addon_storage->subscriptions )
11063
- ) {
11064
- $addon_subscriptions = fs_get_entities( $addon_storage->subscriptions, FS_Subscription::get_class_name() );
11065
-
11066
- foreach ( $addon_subscriptions as $subscription ) {
11067
- if ( $subscription->license_id == $site->license_id ) {
11068
- $addon_info['subscription'] = $subscription;
11069
- break;
11070
- }
11071
- }
11072
- }
11073
- }
11074
-
11075
- return $addon_info;
11076
- }
11077
-
11078
- /**
11079
- * @author Vova Feldman (@svovaf)
11080
- * @since 2.0.0
11081
- *
11082
- * @param number $user_id
11083
- *
11084
- * @return FS_User
11085
- */
11086
- static function _get_user_by_id( $user_id ) {
11087
- self::$_static_logger->entrance( "user_id = {$user_id}" );
11088
-
11089
- $users = self::get_all_users();
11090
-
11091
- if ( is_array( $users ) ) {
11092
- if ( isset( $users[ $user_id ] ) &&
11093
- $users[ $user_id ] instanceof FS_User &&
11094
- $user_id == $users[ $user_id ]->id
11095
- ) {
11096
- return $users[ $user_id ];
11097
- }
11098
-
11099
- // If user wasn't found by the key, iterate over all the users collection.
11100
- foreach ( $users as $user ) {
11101
- /**
11102
- * @var FS_User $user
11103
- */
11104
- if ( $user_id == $user->id ) {
11105
- return $user;
11106
- }
11107
- }
11108
- }
11109
-
11110
- return null;
11111
- }
11112
-
11113
- /**
11114
- * Checks if a Freemius user_id is associated with a super-admin.
11115
- *
11116
- * @author Vova Feldman (@svovaf)
11117
- * @since 2.0.0
11118
- *
11119
- * @param number $user_id
11120
- *
11121
- * @return bool
11122
- */
11123
- private static function is_super_admin( $user_id ) {
11124
- $is_super_admin = false;
11125
-
11126
- $user = self::_get_user_by_id( $user_id );
11127
-
11128
- if ( $user instanceof FS_User && ! empty( $user->email ) ) {
11129
- self::require_pluggable_essentials();
11130
-
11131
- $wp_user = get_user_by( 'email', $user->email );
11132
-
11133
- if ( $wp_user instanceof WP_User ) {
11134
- $super_admins = get_super_admins();
11135
- $is_super_admin = ( is_array( $super_admins ) && in_array( $wp_user->user_login, $super_admins ) );
11136
- }
11137
- }
11138
-
11139
- return $is_super_admin;
11140
- }
11141
-
11142
- #----------------------------------------------------------------------------------
11143
- #region Plans & Licensing
11144
- #----------------------------------------------------------------------------------
11145
-
11146
- /**
11147
- * Check if running premium plugin code.
11148
- *
11149
- * @author Vova Feldman (@svovaf)
11150
- * @since 1.0.5
11151
- *
11152
- * @return bool
11153
- */
11154
- function is_premium() {
11155
- /**
11156
- * `$this->_plugin` will be `false` when `is_activation_mode` calls this method directly from the
11157
- * `register_constructor_hooks` method.
11158
- *
11159
- * @author Leo Fajardo (@leorw)
11160
- * @since 2.2.3
11161
- */
11162
- return is_object( $this->_plugin ) ?
11163
- $this->_plugin->is_premium :
11164
- false;
11165
- }
11166
-
11167
- /**
11168
- * Get site's plan ID.
11169
- *
11170
- * @author Vova Feldman (@svovaf)
11171
- * @since 1.0.2
11172
- *
11173
- * @return number
11174
- */
11175
- function get_plan_id() {
11176
- return $this->_site->plan_id;
11177
- }
11178
-
11179
- /**
11180
- * Get site's plan title.
11181
- *
11182
- * @author Vova Feldman (@svovaf)
11183
- * @since 1.0.2
11184
- *
11185
- * @return string
11186
- */
11187
- function get_plan_title() {
11188
- $plan = $this->get_plan();
11189
-
11190
- return is_object( $plan ) ? $plan->title : 'PLAN_TITLE';
11191
- }
11192
-
11193
- /**
11194
- * Get site's plan name.
11195
- *
11196
- * @author Vova Feldman (@svovaf)
11197
- * @since 2.0.0
11198
- *
11199
- * @return string
11200
- */
11201
- function get_plan_name() {
11202
- $plan = $this->get_plan();
11203
-
11204
- return is_object( $plan ) ? $plan->name : 'PLAN_NAME';
11205
- }
11206
-
11207
- /**
11208
- * @author Vova Feldman (@svovaf)
11209
- * @since 1.0.9
11210
- *
11211
- * @return FS_Plugin_Plan|false
11212
- */
11213
- function get_plan() {
11214
- if ( ! is_object( $this->_site ) ) {
11215
- return false;
11216
- }
11217
-
11218
- return FS_Plugin_Plan::is_valid_id( $this->_site->plan_id ) ?
11219
- $this->_get_plan_by_id( $this->_site->plan_id ) :
11220
- false;
11221
- }
11222
-
11223
- /**
11224
- * @author Vova Feldman (@svovaf)
11225
- * @since 1.0.3
11226
- *
11227
- * @return bool
11228
- */
11229
- function is_trial() {
11230
- $this->_logger->entrance();
11231
-
11232
- if ( ! $this->is_registered() || ! is_object( $this->_site ) ) {
11233
- return false;
11234
- }
11235
-
11236
- return $this->_site->is_trial();
11237
- }
11238
-
11239
- /**
11240
- * Check if currently in a trial with payment method (credit card or paypal).
11241
- *
11242
- * @author Vova Feldman (@svovaf)
11243
- * @since 1.1.7
11244
- *
11245
- * @return bool
11246
- */
11247
- function is_paid_trial() {
11248
- $this->_logger->entrance();
11249
-
11250
- if ( ! $this->is_trial() ) {
11251
- return false;
11252
- }
11253
-
11254
- if ( ! $this->has_active_valid_license() ) {
11255
- return false;
11256
- }
11257
-
11258
- if ( $this->_site->trial_plan_id != $this->_license->plan_id ) {
11259
- return false;
11260
- }
11261
-
11262
- /**
11263
- * @var FS_Subscription $subscription
11264
- */
11265
- $subscription = $this->_get_subscription( $this->_license->id );
11266
-
11267
- return ( is_object( $subscription ) && $subscription->is_active() );
11268
- }
11269
-
11270
- /**
11271
- * Check if trial already utilized.
11272
- *
11273
- * @since 1.0.9
11274
- *
11275
- * @return bool
11276
- */
11277
- function is_trial_utilized() {
11278
- $this->_logger->entrance();
11279
-
11280
- if ( ! $this->is_registered() ) {
11281
- return false;
11282
- }
11283
-
11284
- return $this->_site->is_trial_utilized();
11285
- }
11286
-
11287
- /**
11288
- * Get trial plan information (if in trial).
11289
- *
11290
- * @author Vova Feldman (@svovaf)
11291
- * @since 1.0.9
11292
- *
11293
- * @return bool|FS_Plugin_Plan
11294
- */
11295
- function get_trial_plan() {
11296
- $this->_logger->entrance();
11297
-
11298
- if ( ! $this->is_trial() ) {
11299
- return false;
11300
- }
11301
-
11302
- // Try to load plan from local cache.
11303
- $trial_plan = $this->_get_plan_by_id( $this->_site->trial_plan_id );
11304
-
11305
- if ( ! is_object( $trial_plan ) ) {
11306
- $trial_plan = $this->_fetch_site_plan( $this->_site->trial_plan_id );
11307
-
11308
- /**
11309
- * If managed to fetch the plan, add it to the plans collection.
11310
- */
11311
- if ( $trial_plan instanceof FS_Plugin_Plan ) {
11312
- if ( ! is_array( $this->_plans ) ) {
11313
- $this->_plans = array();
11314
- }
11315
-
11316
- $this->_plans[] = $trial_plan;
11317
- $this->_store_plans();
11318
- }
11319
- }
11320
-
11321
- if ( $trial_plan instanceof FS_Plugin_Plan ) {
11322
- return $trial_plan;
11323
- }
11324
-
11325
- /**
11326
- * If for some reason failed to get the trial plan, fallback to a dummy name and title.
11327
- */
11328
- $trial_plan = new FS_Plugin_Plan();
11329
- $trial_plan->id = $this->_site->trial_plan_id;
11330
- $trial_plan->name = 'pro';
11331
- $trial_plan->title = 'Pro';
11332
-
11333
- return $trial_plan;
11334
- }
11335
-
11336
- /**
11337
- * Check if the user has an activate, non-expired license on current plugin's install.
11338
- *
11339
- * @since 1.0.9
11340
- *
11341
- * @return bool
11342
- */
11343
- function is_paying() {
11344
- $this->_logger->entrance();
11345
-
11346
- if ( ! $this->is_registered() ) {
11347
- return false;
11348
- }
11349
-
11350
- if ( ! $this->has_paid_plan() ) {
11351
- return false;
11352
- }
11353
-
11354
- return (
11355
- ! $this->is_trial() &&
11356
- 'free' !== $this->get_plan_name() &&
11357
- $this->has_active_valid_license()
11358
- );
11359
- }
11360
-
11361
- /**
11362
- * @author Vova Feldman (@svovaf)
11363
- * @since 1.0.4
11364
- *
11365
- * @return bool
11366
- */
11367
- function is_free_plan() {
11368
- if ( ! $this->is_registered() ) {
11369
- return true;
11370
- }
11371
-
11372
- if ( ! $this->has_paid_plan() ) {
11373
- return true;
11374
- }
11375
-
11376
- return (
11377
- 'free' === $this->get_plan_name() ||
11378
- ! $this->has_features_enabled_license()
11379
- );
11380
- }
11381
-
11382
- /**
11383
- * @author Vova Feldman (@svovaf)
11384
- * @since 1.0.5
11385
- *
11386
- * @return bool
11387
- */
11388
- function _has_premium_license() {
11389
- $this->_logger->entrance();
11390
-
11391
- $premium_license = $this->_get_available_premium_license();
11392
-
11393
- return ( false !== $premium_license );
11394
- }
11395
-
11396
- /**
11397
- * Check if user has any licenses associated with the plugin (including expired or blocking).
11398
- *
11399
- * @author Vova Feldman (@svovaf)
11400
- * @since 1.1.7.3
11401
- *
11402
- * @param bool $including_foreign
11403
- *
11404
- * @return bool
11405
- */
11406
- function has_any_license( $including_foreign = true ) {
11407
- if ( ! is_array( $this->_licenses ) || 0 === count( $this->_licenses ) ) {
11408
- return false;
11409
- }
11410
-
11411
- if ( $including_foreign ) {
11412
- return true;
11413
- }
11414
-
11415
- foreach ( $this->_licenses as $license ) {
11416
- if ( $this->_user->id == $license->user_id ) {
11417
- return true;
11418
- }
11419
- }
11420
-
11421
- return false;
11422
- }
11423
-
11424
- /**
11425
- * @author Vova Feldman (@svovaf)
11426
- * @since 1.0.5
11427
- *
11428
- * @param bool|null $is_localhost
11429
- *
11430
- * @return FS_Plugin_License|false
11431
- */
11432
- function _get_available_premium_license( $is_localhost = null ) {
11433
- $this->_logger->entrance();
11434
-
11435
- $licenses = $this->get_available_premium_licenses( $is_localhost );
11436
- if ( ! empty( $licenses ) ) {
11437
- return $licenses[0];
11438
- }
11439
-
11440
- return false;
11441
- }
11442
-
11443
- /**
11444
- * @author Vova Feldman (@svovaf)
11445
- * @since 1.0.5
11446
- *
11447
- * @param bool|null $is_localhost
11448
- *
11449
- * @return FS_Plugin_License[]
11450
- */
11451
- function get_available_premium_licenses( $is_localhost = null ) {
11452
- $this->_logger->entrance();
11453
-
11454
- $licenses = array();
11455
- if ( ! $this->has_paid_plan() ) {
11456
- return $licenses;
11457
- }
11458
-
11459
- if ( is_array( $this->_licenses ) ) {
11460
- foreach ( $this->_licenses as $license ) {
11461
- if ( ! $license->can_activate( $is_localhost ) ) {
11462
- continue;
11463
- }
11464
-
11465
- $licenses[] = $license;
11466
- }
11467
- }
11468
-
11469
- return $licenses;
11470
- }
11471
-
11472
- /**
11473
- * Sync local plugin plans with remote server.
11474
- *
11475
- * IMPORTANT: If for some reason a site is associated with deleted plan, we'll preserve the plan's information and append it as the last plan. This means that if plan is deleted, the is_plan() method will ALWAYS return true for any given argument (it becomes the most inclusive plan).
11476
- *
11477
- * @author Vova Feldman (@svovaf)
11478
- * @since 1.0.5
11479
- *
11480
- * @return FS_Plugin_Plan[]|object
11481
- */
11482
- function _sync_plans() {
11483
- $plans = $this->_fetch_plugin_plans();
11484
-
11485
- if ( $this->is_array_instanceof( $plans, 'FS_Plugin_Plan' ) ) {
11486
- $plans_map = array();
11487
- foreach ( $plans as $plan ) {
11488
- $plans_map[ $plan->id ] = true;
11489
- }
11490
-
11491
- $plans_ids_to_keep = $this->get_plans_ids_associated_with_installs();
11492
-
11493
- foreach ( $plans_ids_to_keep as $plan_id ) {
11494
- if ( isset( $plans_map[ $plan_id ] ) ) {
11495
- continue;
11496
- }
11497
-
11498
- $missing_plan = self::_get_plan_by_id( $plan_id );
11499
-
11500
- if ( is_object( $missing_plan ) ) {
11501
- $plans[] = $missing_plan;
11502
- }
11503
- }
11504
-
11505
- $this->_plans = $plans;
11506
- $this->_store_plans();
11507
- }
11508
-
11509
- $this->do_action( 'after_plans_sync', $plans );
11510
-
11511
- return $this->_plans;
11512
- }
11513
-
11514
- /**
11515
- * Check if specified plan exists locally. If not, fetch it and store it.
11516
- *
11517
- * @author Vova Feldman (@svovaf)
11518
- * @since 2.0.0
11519
- *
11520
- * @param number $plan_id
11521
- *
11522
- * @return \FS_Plugin_Plan|object The plan entity or the API error object on failure.
11523
- */
11524
- private function sync_plan_if_not_exist( $plan_id ) {
11525
- $plan = self::_get_plan_by_id( $plan_id );
11526
-
11527
- if ( is_object( $plan ) ) {
11528
- // Plan already exists.
11529
- return $plan;
11530
- }
11531
-
11532
- $plan = $this->fetch_plan_by_id( $plan_id );
11533
-
11534
- if ( $plan instanceof FS_Plugin_Plan ) {
11535
- $this->_plans[] = $plan;
11536
- $this->_store_plans();
11537
-
11538
- return $plan;
11539
- }
11540
-
11541
- return $plan;
11542
- }
11543
-
11544
- /**
11545
- * Check if specified license exists locally. If not, fetch it and store it.
11546
- *
11547
- * @author Vova Feldman (@svovaf)
11548
- * @since 2.0.0
11549
- *
11550
- * @param number $license_id
11551
- * @param string $license_key
11552
- *
11553
- * @return \FS_Plugin_Plan|object The plan entity or the API error object on failure.
11554
- */
11555
- private function sync_license_if_not_exist( $license_id, $license_key ) {
11556
- $license = $this->_get_license_by_id( $license_id );
11557
-
11558
- if ( is_object( $license ) ) {
11559
- // License already exists.
11560
- return $license;
11561
- }
11562
-
11563
- $license = $this->fetch_license_by_key( $license_id, $license_key );
11564
-
11565
- if ( $license instanceof FS_Plugin_License ) {
11566
- $this->_licenses[] = $license;
11567
-
11568
- $this->set_license( $license );
11569
-
11570
- $this->_store_licenses();
11571
-
11572
-