FooGallery – Image Gallery WordPress Plugin - Version 2.2.7

Version Description

  • Date Updated : 2022-04-15
  • Fix : Fixed carousel not working when no lightbox is available
  • Fix : Fixed RTL styles on FooGallery admin pages
  • Update : FooGallery client side 2.0.32
Download this release

Release Info

Developer bradvin
Plugin Icon 128x128 FooGallery – Image Gallery WordPress Plugin
Version 2.2.7
Comparing to
See all releases

Code changes from version 2.2.6 to 2.2.7

Files changed (79) hide show
  1. README.txt +8 -2
  2. css/admin-foogallery.css +61 -6
  3. css/admin-page-foogallery-help.css +22 -0
  4. css/foogallery.admin.min.css +1 -1
  5. extensions/default-templates/shared/css/foogallery.css +20 -0
  6. extensions/default-templates/shared/css/foogallery.min.css +1 -1
  7. extensions/default-templates/shared/js/foogallery.js +5 -2
  8. extensions/default-templates/shared/js/foogallery.min.js +2 -2
  9. foogallery.php +2 -2
  10. freemius/assets/css/admin/account.css +1 -1
  11. freemius/assets/css/admin/add-ons.css +2 -2
  12. freemius/assets/css/admin/affiliation.css +1 -1
  13. freemius/assets/css/admin/checkout.css +1 -1
  14. freemius/assets/css/admin/debug.css +1 -1
  15. freemius/assets/css/admin/dialog-boxes.css +2 -2
  16. freemius/assets/css/admin/gdpr-optin-notice.css +1 -1
  17. freemius/assets/css/admin/index.php +2 -2
  18. freemius/assets/css/admin/plugins.css +1 -1
  19. freemius/assets/css/customizer.css +1 -1
  20. freemius/assets/css/index.php +2 -2
  21. freemius/assets/img/index.php +2 -2
  22. freemius/assets/index.php +2 -2
  23. freemius/assets/js/index.php +2 -2
  24. freemius/assets/js/nojquery.ba-postmessage.js +139 -139
  25. freemius/assets/js/nojquery.ba-postmessage.min.js +11 -11
  26. freemius/assets/js/postmessage.js +134 -134
  27. freemius/includes/class-freemius-abstract.php +596 -596
  28. freemius/includes/class-fs-admin-notices.php +320 -320
  29. freemius/includes/class-fs-security.php +85 -85
  30. freemius/includes/class-fs-user-lock.php +125 -125
  31. freemius/includes/customizer/class-fs-customizer-support-section.php +101 -101
  32. freemius/includes/customizer/class-fs-customizer-upsell-control.php +160 -160
  33. freemius/includes/customizer/index.php +2 -2
  34. freemius/includes/debug/class-fs-debug-bar-panel.php +64 -64
  35. freemius/includes/debug/debug-bar-start.php +51 -51
  36. freemius/includes/debug/index.php +2 -2
  37. freemius/includes/entities/class-fs-affiliate-terms.php +127 -127
  38. freemius/includes/entities/class-fs-affiliate.php +83 -83
  39. freemius/includes/entities/class-fs-billing.php +94 -94
  40. freemius/includes/entities/class-fs-entity.php +158 -158
  41. freemius/includes/entities/class-fs-payment.php +167 -167
  42. freemius/includes/entities/class-fs-plugin-info.php +33 -33
  43. freemius/includes/entities/class-fs-plugin-license.php +330 -330
  44. freemius/includes/entities/class-fs-plugin-plan.php +144 -144
  45. freemius/includes/entities/class-fs-plugin-tag.php +59 -59
  46. freemius/includes/entities/class-fs-plugin.php +158 -158
  47. freemius/includes/entities/class-fs-pricing.php +156 -156
  48. freemius/includes/entities/class-fs-scope-entity.php +28 -28
  49. freemius/includes/entities/class-fs-subscription.php +146 -146
  50. freemius/includes/entities/index.php +2 -2
  51. freemius/includes/index.php +2 -2
  52. freemius/includes/l10n.php +48 -48
  53. freemius/includes/managers/class-fs-admin-menu-manager.php +1005 -1005
  54. freemius/includes/managers/class-fs-cache-manager.php +325 -325
  55. freemius/includes/managers/class-fs-gdpr-manager.php +201 -201
  56. freemius/includes/managers/class-fs-key-value-storage.php +391 -391
  57. freemius/includes/managers/class-fs-license-manager.php +103 -103
  58. freemius/includes/managers/class-fs-option-manager.php +521 -521
  59. freemius/includes/managers/class-fs-plan-manager.php +161 -161
  60. freemius/includes/managers/index.php +2 -2
  61. freemius/includes/sdk/Exceptions/index.php +2 -2
  62. freemius/includes/sdk/LICENSE.txt +340 -340
  63. freemius/includes/sdk/index.php +2 -2
  64. freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +43 -43
  65. freemius/includes/supplements/fs-essential-functions-2.2.1.php +44 -44
  66. freemius/includes/supplements/index.php +2 -2
  67. freemius/index.php +2 -2
  68. freemius/languages/index.php +2 -2
  69. freemius/templates/account/billing.php +422 -422
  70. freemius/templates/account/index.php +2 -2
  71. freemius/templates/account/partials/activate-license-button.php +53 -53
  72. freemius/templates/account/partials/deactivate-license-button.php +35 -35
  73. freemius/templates/account/partials/index.php +2 -2
  74. freemius/templates/account/payments.php +58 -58
  75. freemius/templates/add-trial-to-pricing.php +30 -30
  76. freemius/templates/admin-notice.php +76 -76
  77. freemius/templates/auto-installation.php +249 -249
  78. freemius/templates/checkout.php +336 -336
  79. freemius/templates/contact.php +113 -127
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bradvin, steveush, fooplugins
3
  Donate link: https://fooplugins.com
4
  Tags: gallery, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, best gallery plugin, albums, media gallery, video gallery, lightbox
5
  Requires at least: 5.2
6
- Tested up to: 5.9
7
- Stable tag: 2.1.34
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -299,6 +299,12 @@ Please update in order to for FooGallery to work in WP 5.5+!
299
 
300
  == Changelog ==
301
 
 
 
 
 
 
 
302
  = 2.2.6 =
303
  * Date Updated : 2022-03-31
304
  * New : Added new gallery template : Carousel
3
  Donate link: https://fooplugins.com
4
  Tags: gallery, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, best gallery plugin, albums, media gallery, video gallery, lightbox
5
  Requires at least: 5.2
6
+ Tested up to: 6.0
7
+ Stable tag: 2.2.7
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
299
 
300
  == Changelog ==
301
 
302
+ = 2.2.7 =
303
+ * Date Updated : 2022-04-15
304
+ * Fix : Fixed carousel not working when no lightbox is available
305
+ * Fix : Fixed RTL styles on FooGallery admin pages
306
+ * Update : FooGallery client side 2.0.32
307
+
308
  = 2.2.6 =
309
  * Date Updated : 2022-03-31
310
  * New : Added new gallery template : Carousel
css/admin-foogallery.css CHANGED
@@ -128,8 +128,10 @@
128
  .foogallery_template_field th {
129
  vertical-align: top;
130
  text-align: left;
131
- padding-top: 0.3em;
132
- padding-right: 10px;
 
 
133
  }
134
 
135
  .foogallery_template_field textarea {
@@ -262,6 +264,13 @@
262
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
263
  }
264
 
 
 
 
 
 
 
 
265
  .foogallery-help:before {
266
  content: "\f223";
267
  font: 400 30px/1 dashicons !important;
@@ -278,11 +287,21 @@
278
  height: 1em;
279
  }
280
 
 
 
 
 
 
281
  #post-body.columns-2 #postbox-container-1 .foogallery-help {
282
  padding-left: 11px;
283
  margin-left: 5px;
284
  }
285
 
 
 
 
 
 
286
  #post-body.columns-2 #postbox-container-1 .foogallery-help:before {
287
  content: '';
288
  }
@@ -308,6 +327,13 @@ tr.foogallery_template_field[data-foogallery-invisible] {
308
  -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
309
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
310
  }
 
 
 
 
 
 
 
311
 
312
  .foogallery_template_field_type-promo.foogallery_promo_prostarter .foogallery-promo {
313
  border-color: #3397C1;
@@ -333,6 +359,10 @@ tr.foogallery_template_field[data-foogallery-invisible] {
333
  margin-top: -5px;
334
  height: 1em;
335
  }
 
 
 
 
336
 
337
  .foogallery_template_field_type-promo.foogallery_promo_prostarter .foogallery-promo:before {
338
  color: #3397C1;
@@ -346,6 +376,10 @@ tr.foogallery_template_field[data-foogallery-invisible] {
346
  padding-left: 11px;
347
  margin-left: 5px;
348
  }
 
 
 
 
349
 
350
  #post-body.columns-2 #postbox-container-1 .foogallery-promo:before {
351
  content: '';
@@ -356,6 +390,10 @@ tr.foogallery_template_field[data-foogallery-invisible] {
356
  border-color: #1d7b30;
357
  margin-right: 10px;
358
  }
 
 
 
 
359
 
360
  .foogallery_template_field_type-promo .foogallery-promo .button-secondary {
361
  border-color: #1d7b30;
@@ -503,8 +541,8 @@ button[data-balloon]{overflow:visible}[data-balloon]{position:relative}[data-bal
503
  }
504
 
505
  .foogallery-items-view-switch-container {
506
- display: inline-block;
507
- margin-left: 10px;
508
  }
509
 
510
  .foogallery-items-view-switch-container .spinner {
@@ -609,6 +647,10 @@ button[data-balloon]{overflow:visible}[data-balloon]{position:relative}[data-bal
609
  font-size: 24px;
610
  font-weight: normal;
611
  }
 
 
 
 
612
 
613
  .foogallery_preview_container.loading:after {
614
  content: '';
@@ -627,13 +669,26 @@ button[data-balloon]{overflow:visible}[data-balloon]{position:relative}[data-bal
627
  line-height: 1.2;
628
  }
629
 
 
 
 
 
 
630
  .foogallery_template_field_type-thumb_size_no_crop input.small-text+label {
631
  margin-left: 10px;
632
  }
 
 
 
 
633
 
634
  .foogallery_template_field_type-thumb_size_no_crop label+input {
635
  margin-left: 5px;
636
  }
 
 
 
 
637
 
638
  /* changes to the media modal */
639
  .compat-item .compat-attachment-fields th.label label span {
@@ -671,10 +726,10 @@ button[data-balloon]{overflow:visible}[data-balloon]{position:relative}[data-bal
671
  }
672
 
673
  .foogallery-custom-metabox-header .foogallery-template-selector {
674
- margin-left: 10px;
675
  }
676
 
677
  .foogallery-custom-metabox-header .foogallery-template-selector select {
678
  font-size: 13px;
679
- margin-left: 6px;
680
  }
128
  .foogallery_template_field th {
129
  vertical-align: top;
130
  text-align: left;
131
+ padding: 0.3em 10px 0;
132
+ }
133
+ .rtl .foogallery_template_field th {
134
+ text-align: right;
135
  }
136
 
137
  .foogallery_template_field textarea {
264
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
265
  }
266
 
267
+ .rtl .foogallery-help {
268
+ padding: 11px 40px 11px 10px;
269
+ text-align: right;
270
+ border-left: none;
271
+ border-right: 4px solid #1e8cbe;
272
+ }
273
+
274
  .foogallery-help:before {
275
  content: "\f223";
276
  font: 400 30px/1 dashicons !important;
287
  height: 1em;
288
  }
289
 
290
+ .rtl .foogallery-help:before {
291
+ left: auto;
292
+ right: 5px;
293
+ }
294
+
295
  #post-body.columns-2 #postbox-container-1 .foogallery-help {
296
  padding-left: 11px;
297
  margin-left: 5px;
298
  }
299
 
300
+ .rtl #post-body.columns-2 #postbox-container-1 .foogallery-help {
301
+ padding-right: 11px;
302
+ margin-right: 5px;
303
+ }
304
+
305
  #post-body.columns-2 #postbox-container-1 .foogallery-help:before {
306
  content: '';
307
  }
327
  -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
328
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
329
  }
330
+ .rtl .foogallery_template_field_type-promo .foogallery-promo {
331
+ padding: 11px 40px 11px 10px;
332
+ text-align: right;
333
+ margin: 2px 0 0 5px;
334
+ border-left: none;
335
+ border-right: 4px solid #31be4d;
336
+ }
337
 
338
  .foogallery_template_field_type-promo.foogallery_promo_prostarter .foogallery-promo {
339
  border-color: #3397C1;
359
  margin-top: -5px;
360
  height: 1em;
361
  }
362
+ .rtl .foogallery_template_field_type-promo .foogallery-promo:before {
363
+ left: auto;
364
+ right: 5px;
365
+ }
366
 
367
  .foogallery_template_field_type-promo.foogallery_promo_prostarter .foogallery-promo:before {
368
  color: #3397C1;
376
  padding-left: 11px;
377
  margin-left: 5px;
378
  }
379
+ .rtl #post-body.columns-2 #postbox-container-1 .foogallery-promo {
380
+ padding-right: 11px;
381
+ margin-right: 5px;
382
+ }
383
 
384
  #post-body.columns-2 #postbox-container-1 .foogallery-promo:before {
385
  content: '';
390
  border-color: #1d7b30;
391
  margin-right: 10px;
392
  }
393
+ .rtl .foogallery_template_field_type-promo .foogallery-promo .button-primary {
394
+ margin-left: 10px;
395
+ margin-right: 0;
396
+ }
397
 
398
  .foogallery_template_field_type-promo .foogallery-promo .button-secondary {
399
  border-color: #1d7b30;
541
  }
542
 
543
  .foogallery-items-view-switch-container {
544
+ display: inline-flex;
545
+ margin: 0 10px;
546
  }
547
 
548
  .foogallery-items-view-switch-container .spinner {
647
  font-size: 24px;
648
  font-weight: normal;
649
  }
650
+ .rtl .foogallery-items-view .button-hero .dashicons {
651
+ padding-left: 10px;
652
+ padding-right: 0;
653
+ }
654
 
655
  .foogallery_preview_container.loading:after {
656
  content: '';
669
  line-height: 1.2;
670
  }
671
 
672
+ .foogallery_metabox_field-thumb_size_no_crop {
673
+ display: inline-flex;
674
+ align-items: center;
675
+ }
676
+
677
  .foogallery_template_field_type-thumb_size_no_crop input.small-text+label {
678
  margin-left: 10px;
679
  }
680
+ .rtl .foogallery_template_field_type-thumb_size_no_crop input.small-text+label {
681
+ margin-left: 0;
682
+ margin-right: 10px;
683
+ }
684
 
685
  .foogallery_template_field_type-thumb_size_no_crop label+input {
686
  margin-left: 5px;
687
  }
688
+ .rtl .foogallery_template_field_type-thumb_size_no_crop label+input {
689
+ margin-left: 0;
690
+ margin-right: 5px;
691
+ }
692
 
693
  /* changes to the media modal */
694
  .compat-item .compat-attachment-fields th.label label span {
726
  }
727
 
728
  .foogallery-custom-metabox-header .foogallery-template-selector {
729
+ margin: 0 10px;
730
  }
731
 
732
  .foogallery-custom-metabox-header .foogallery-template-selector select {
733
  font-size: 13px;
734
+ margin: 0 6px;
735
  }
css/admin-page-foogallery-help.css CHANGED
@@ -195,6 +195,9 @@ body {
195
  .fgah-feature > header {
196
  text-align: left;
197
  }
 
 
 
198
 
199
  .fgah-feature > header > h3 {
200
  font-size: 1.5em;
@@ -241,10 +244,18 @@ body {
241
  text-align: center;
242
  padding-right: 32px;
243
  }
 
 
 
 
244
  .fgah-feature-right > div > figure {
245
  padding-right: 0;
246
  padding-left: 32px;
247
  }
 
 
 
 
248
 
249
  .fgah-feature > div > ol {
250
 
@@ -299,6 +310,9 @@ body {
299
  background: #4098D7;
300
  background: linear-gradient(45deg, #6638b8 0%, #4098D7 100%);
301
  }
 
 
 
302
 
303
  span.fgah-plan-prostarter {
304
  color: #4098D7;
@@ -380,6 +394,11 @@ span.fgah-plan-commerce {
380
  border: solid 2px #FFFFFF;
381
  float: left;
382
  }
 
 
 
 
 
383
 
384
  .fgah-demo {
385
  display: block;
@@ -394,6 +413,9 @@ span.fgah-plan-commerce {
394
  text-align: left;
395
  margin: 16px;
396
  }
 
 
 
397
  .fgah-demo > header + * {
398
  margin-top: 32px;
399
  }
195
  .fgah-feature > header {
196
  text-align: left;
197
  }
198
+ .rtl .fgah-feature > header {
199
+ text-align: right;
200
+ }
201
 
202
  .fgah-feature > header > h3 {
203
  font-size: 1.5em;
244
  text-align: center;
245
  padding-right: 32px;
246
  }
247
+ .rtl .fgah-feature > div > figure {
248
+ padding-right: 0;
249
+ padding-left: 32px;
250
+ }
251
  .fgah-feature-right > div > figure {
252
  padding-right: 0;
253
  padding-left: 32px;
254
  }
255
+ .rtl .fgah-feature-right > div > figure {
256
+ padding-right: 32px;
257
+ padding-left: 0;
258
+ }
259
 
260
  .fgah-feature > div > ol {
261
 
310
  background: #4098D7;
311
  background: linear-gradient(45deg, #6638b8 0%, #4098D7 100%);
312
  }
313
+ .rtl .fgah-feature-pro > div > dl > dt::before {
314
+ margin: 0 0 0 8px;
315
+ }
316
 
317
  span.fgah-plan-prostarter {
318
  color: #4098D7;
394
  border: solid 2px #FFFFFF;
395
  float: left;
396
  }
397
+ .rtl .fgah-help-list li::before {
398
+ margin-right: 0;
399
+ margin-left: 0.4em;
400
+ float: right;
401
+ }
402
 
403
  .fgah-demo {
404
  display: block;
413
  text-align: left;
414
  margin: 16px;
415
  }
416
+ .rtl .fgah-demo > header {
417
+ text-align: right;
418
+ }
419
  .fgah-demo > header + * {
420
  margin-top: 32px;
421
  }
css/foogallery.admin.min.css CHANGED
@@ -1 +1 @@
1
- .foogallery-settings *{box-sizing:border-box}.foogallery-settings{position:relative;display:flex;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px}.foogallery-settings:after{display:table;content:"";clear:both}.foogallery-vertical-tabs{display:inline-block;position:relative;width:150px;background-color:#f5f5f5;border-right:solid 1px #ccd0d4}.foogallery-vertical-tab{position:relative;font-size:14px;margin:0;padding:7px 0;display:block;box-shadow:none;text-decoration:none;line-height:18px;color:#2271b1;cursor:pointer}.foogallery-settings.can-hover .foogallery-vertical-tab:not(.foogallery-tab-active):hover{color:#4f94d4}.foogallery-settings .foogallery-vertical-tab.foogallery-tab-active{color:#fff;background-color:#2271b1}.foogallery-vertical-tab:after{right:-1px;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:17px;margin-top:-8px;visibility:hidden;opacity:0}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-tab-active:not(.foogallery-show-child-menu):after,.foogallery-settings:not(.is-mobile) .foogallery-vertical-tab.foogallery-tab-active:after{visibility:visible;opacity:1}.foogallery-vertical-tab .dashicons{font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;font-size:20px;width:20px;height:20px;vertical-align:middle;margin:0 3px 0 8px}.foogallery-vertical-tab .foogallery-tab-text{vertical-align:middle}.foogallery-vertical-child-tabs{display:none;margin:7px 0 -7px;color:#555;background-color:#ddd;border-top:1px solid #eee;width:150px;text-align:left}.foogallery-settings:not(.is-mobile) .foogallery-tab-active .foogallery-vertical-child-tabs{display:block}.foogallery-settings.can-hover:not(.is-mobile) .foogallery-vertical-tab.foogallery-show-child-menu:not(.foogallery-tab-active) .foogallery-vertical-child-tabs,.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-show-child-menu .foogallery-vertical-child-tabs{display:block;position:absolute;top:-8px;right:0;transform:translateX(100%);z-index:11}.foogallery-vertical-child-tabs:after{left:-16px;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#ddd;top:17px;margin-top:-8px;visibility:hidden;opacity:0}.foogallery-settings:not(.is-mobile) .foogallery-vertical-tab:not(.foogallery-tab-active):hover .foogallery-vertical-child-tabs:after{visibility:visible;opacity:1}.foogallery-vertical-child-header{position:relative;padding:8px 12px;font-size:14px;font-weight:600;display:none}.foogallery-vertical-child-tab{position:relative;padding:4px 12px;font-size:13px;font-weight:400}.foogallery-vertical-child-tab:first-child{padding:8px 12px 4px}.foogallery-vertical-child-tab:last-child{padding:4px 12px 8px}.foogallery-vertical-child-tab:not(.foogallery-tab-active):hover{color:#0073aa}.foogallery-vertical-child-tab.foogallery-tab-active{font-weight:600}.foogallery-tab-contents{display:inline-block;float:right;width:calc(100% - 150px);background-color:#fff;min-height:400px}.foogallery-tab-content{display:none}.foogallery-tab-content.foogallery-tab-active{display:block}.foogallery-settings.is-mobile .foogallery-vertical-tabs{width:36px}.foogallery-settings.is-mobile .foogallery-vertical-tab{text-align:center}.foogallery-settings.is-mobile .foogallery-vertical-tab:after{border-width:4px;margin-top:-4px}.foogallery-settings.is-mobile .foogallery-vertical-tab .dashicons{margin-right:0}.foogallery-settings.is-mobile .foogallery-vertical-tab>.foogallery-tab-text{display:none}.foogallery-settings.is-mobile .foogallery-vertical-tab>.dashicons{margin:0 3px 0 4px}.foogallery-settings.is-mobile .foogallery-tab-contents{width:calc(100% - 36px)}.foogallery-settings.is-mobile .foogallery-vertical-child-header{display:block}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-show-child-menu:not(.foogallery-tab-active){color:#555;background-color:#ddd}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-tab-active .foogallery-vertical-child-header{color:#fff;background-color:#0073aa}
1
+ .foogallery-settings *{box-sizing:border-box}.foogallery-settings{position:relative;display:flex;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px}.rtl .foogallery-settings{direction:rtl}.foogallery-settings:after{display:table;content:"";clear:both}.foogallery-vertical-tabs{display:inline-block;position:relative;width:150px;background-color:#f5f5f5;border-right:solid 1px #ccd0d4}.foogallery-vertical-tab{position:relative;font-size:14px;margin:0;padding:7px 0;display:block;box-shadow:none;text-decoration:none;line-height:18px;color:#2271b1;cursor:pointer}.foogallery-settings.can-hover .foogallery-vertical-tab:not(.foogallery-tab-active):hover{color:#4f94d4}.foogallery-settings .foogallery-vertical-tab.foogallery-tab-active{color:#fff;background-color:#2271b1}.foogallery-vertical-tab:after{right:-1px;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:17px;margin-top:-8px;visibility:hidden;opacity:0}.rtl .foogallery-vertical-tab:after{right:auto;left:-1px;border-right-color:transparent;border-left-color:#fff}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-tab-active:not(.foogallery-show-child-menu):after,.foogallery-settings:not(.is-mobile) .foogallery-vertical-tab.foogallery-tab-active:after{visibility:visible;opacity:1}.foogallery-vertical-tab .dashicons{font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;font-size:20px;width:20px;height:20px;vertical-align:middle;margin:0 3px 0 8px}.rtl .foogallery-vertical-tab .dashicons{margin:0 8px 0 3px}.foogallery-vertical-tab .foogallery-tab-text{vertical-align:middle}.foogallery-vertical-child-tabs{display:none;margin:7px 0 -7px;color:#555;background-color:#ddd;border-top:1px solid #eee;width:150px;text-align:left}.rtl .foogallery-vertical-child-tabs{text-align:right}.foogallery-settings:not(.is-mobile) .foogallery-tab-active .foogallery-vertical-child-tabs{display:block}.foogallery-settings.can-hover:not(.is-mobile) .foogallery-vertical-tab.foogallery-show-child-menu:not(.foogallery-tab-active) .foogallery-vertical-child-tabs,.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-show-child-menu .foogallery-vertical-child-tabs{display:block;position:absolute;top:-8px;right:0;transform:translateX(100%);z-index:11}.rtl .foogallery-settings.can-hover:not(.is-mobile) .foogallery-vertical-tab.foogallery-show-child-menu:not(.foogallery-tab-active) .foogallery-vertical-child-tabs,.rtl .foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-show-child-menu .foogallery-vertical-child-tabs{left:0;right:auto;transform:translateX(-100%)}.foogallery-vertical-child-tabs:after{left:-16px;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#ddd;top:17px;margin-top:-8px;visibility:hidden;opacity:0}.rtl .foogallery-vertical-child-tabs:after{left:auto;right:-16px;border-right-color:transparent;border-left-color:#ddd}.foogallery-settings:not(.is-mobile) .foogallery-vertical-tab:not(.foogallery-tab-active):hover .foogallery-vertical-child-tabs:after{visibility:visible;opacity:1}.foogallery-vertical-child-header{position:relative;padding:8px 12px;font-size:14px;font-weight:600;display:none}.foogallery-vertical-child-tab{position:relative;padding:4px 12px;font-size:13px;font-weight:400}.foogallery-vertical-child-tab:first-child{padding:8px 12px 4px}.foogallery-vertical-child-tab:last-child{padding:4px 12px 8px}.foogallery-vertical-child-tab:not(.foogallery-tab-active):hover{color:#0073aa}.foogallery-vertical-child-tab.foogallery-tab-active{font-weight:600}.foogallery-tab-contents{display:inline-block;width:calc(100% - 150px);background-color:#fff;min-height:400px}.foogallery-tab-content{display:none}.foogallery-tab-content.foogallery-tab-active{display:block}.foogallery-settings.is-mobile .foogallery-vertical-tabs{width:36px}.foogallery-settings.is-mobile .foogallery-vertical-tab{text-align:center}.foogallery-settings.is-mobile .foogallery-vertical-tab:after{border-width:4px;margin-top:-4px}.foogallery-settings.is-mobile .foogallery-vertical-tab .dashicons{margin-right:0}.foogallery-settings.is-mobile .foogallery-vertical-tab>.foogallery-tab-text{display:none}.foogallery-settings.is-mobile .foogallery-vertical-tab>.dashicons{margin:0 3px 0 4px}.rtl .foogallery-settings.is-mobile .foogallery-vertical-tab>.dashicons{margin:0 4px 0 3px}.foogallery-settings.is-mobile .foogallery-tab-contents{width:calc(100% - 36px)}.foogallery-settings.is-mobile .foogallery-vertical-child-header{display:block}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-show-child-menu:not(.foogallery-tab-active){color:#555;background-color:#ddd}.foogallery-settings.is-mobile .foogallery-vertical-tab.foogallery-tab-active .foogallery-vertical-child-header{color:#fff;background-color:#0073aa}
extensions/default-templates/shared/css/foogallery.css CHANGED
@@ -2925,6 +2925,18 @@
2925
  .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span {
2926
  margin: 0 4px;
2927
  }
 
 
 
 
 
 
 
 
 
 
 
 
2928
 
2929
  /* Captions */
2930
 
@@ -3494,6 +3506,10 @@
3494
  transition: width 100ms linear;
3495
  opacity: var(--fg-carousel-navigation-opacity);
3496
  }
 
 
 
 
3497
  .fg-carousel-bottom {
3498
  display: flex;
3499
  align-items: center;
@@ -3569,6 +3585,10 @@ button.fg-carousel-next:hover {
3569
  width: 1em;
3570
  height: 1em;
3571
  }
 
 
 
 
3572
  .fg-carousel-prev {
3573
  grid-area: prev;
3574
  }
2925
  .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span {
2926
  margin: 0 4px;
2927
  }
2928
+ .rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev {
2929
+ float: right;
2930
+ }
2931
+ .rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before {
2932
+ content: '\2192';
2933
+ }
2934
+ .rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next {
2935
+ float: left;
2936
+ }
2937
+ .rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before {
2938
+ content: '\2190';
2939
+ }
2940
 
2941
  /* Captions */
2942
 
3506
  transition: width 100ms linear;
3507
  opacity: var(--fg-carousel-navigation-opacity);
3508
  }
3509
+ .rtl .fg-carousel-progress {
3510
+ left: auto;
3511
+ right: 0;
3512
+ }
3513
  .fg-carousel-bottom {
3514
  display: flex;
3515
  align-items: center;
3585
  width: 1em;
3586
  height: 1em;
3587
  }
3588
+ .rtl .fg-carousel-prev .fg-icon,
3589
+ .rtl .fg-carousel-next .fg-icon {
3590
+ transform: rotate(180deg);
3591
+ }
3592
  .fg-carousel-prev {
3593
  grid-area: prev;
3594
  }
extensions/default-templates/shared/css/foogallery.min.css CHANGED
@@ -1 +1 @@
1
- .foogallery,.foogallery *{box-sizing:border-box}.foogallery{display:block;z-index:1;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;position:relative;line-height:0;font-size:0;width:100%;max-width:100%}.foogallery .fg-item{display:inline-block;position:relative;background-color:transparent;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.foogallery .fg-item.fg-hidden{display:none!important}.foogallery .fg-item-inner{display:block;position:relative;visibility:hidden;overflow:hidden;opacity:0;z-index:3;margin:0;border:solid 0 transparent}.foogallery .fg-item.fg-error:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-image:url('../img/icons.svg#image');background-color:transparent;background-repeat:no-repeat;background-position:center center;background-size:32px 32px}.foogallery .fg-item.fg-loaded{z-index:4}.foogallery .fg-loaded .fg-item-inner{visibility:visible;opacity:1;z-index:5}.foogallery .fg-error .fg-item-inner{pointer-events:none;cursor:default}.foogallery .fg-thumb{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:4;box-shadow:none}.foogallery .fg-thumb:focus,.foogallery .fg-thumb:hover{border:none;outline:0;text-decoration:none;box-shadow:none}.foogallery .fg-image-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;visibility:hidden;opacity:0}.foogallery .fg-image-wrap{display:block;position:relative}.foogallery .fg-image{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:5;max-width:100%;height:auto;margin:0;width:auto}.foogallery picture.fg-image>img{display:block;position:relative;border:none;outline:0;text-decoration:none;max-width:100%;height:auto;margin:0;width:auto}.foogallery .fg-loaded .fg-thumb{z-index:6}.foogallery .fg-loaded .fg-image{z-index:7}.fg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.foogallery.fg-light .fg-item-inner{background-color:#fff;color:#333;border-color:#fff}.foogallery.fg-dark .fg-item-inner{background-color:#333;color:#fff;border-color:#333}.foogallery.fg-light .fg-item.fg-error,.foogallery.fg-light .fg-item.fg-idle,.foogallery.fg-light .fg-item.fg-loading{background-color:#eee;box-shadow:inset 0 0 0 1px #ddd}.foogallery.fg-dark .fg-item.fg-error,.foogallery.fg-dark .fg-item.fg-idle,.foogallery.fg-dark .fg-item.fg-loading{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery .fg-caption{background-color:rgba(0,0,0,.6);color:#fff}.foogallery .fg-caption a{color:#fff;border-bottom:1px solid #fff}.foogallery.fg-light-overlays .fg-caption{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-light-overlays .fg-caption a{color:#333;border-bottom-color:#333}.foogallery.fg-transparent-overlays .fg-caption{background-color:transparent;color:#fff}.foogallery.fg-transparent-overlays .fg-caption a{color:#fff;border-bottom-color:#fff}.foogallery .fg-image-overlay{background-color:rgba(0,0,0,.6);color:#fff}.foogallery.fg-light-overlays .fg-image-overlay{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-transparent-overlays .fg-image-overlay{background-color:transparent;color:#fff}.fg-exif-light .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#fff;color:#333}.fg-exif-dark .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#333;color:#fff}.fg-exif-rounded .fg-item.fg-item-exif .fg-image-wrap:after{border-radius:3px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{display:inline-block;position:absolute;content:'EXIF';font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:11px;line-height:10px;padding:3px 4px;z-index:7}.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;right:5px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;left:5px}.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;right:5px}.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;left:5px}.foogallery.fg-border-thin .fg-item-inner{border-width:4px}.foogallery.fg-border-medium .fg-item-inner{border-width:10px}.foogallery.fg-border-thick .fg-item-inner{border-width:16px}.foogallery.fg-light.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-dark.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-light.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-light.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-light.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-shadow-inset-small .fg-thumb:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:7}.foogallery.fg-dark.fg-shadow-inset-small .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.foogallery.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%}.foogallery.fg-round-small .fg-item,.foogallery.fg-round-small .fg-item-inner{border-radius:5px}.foogallery.fg-round-medium .fg-item,.foogallery.fg-round-medium .fg-item-inner{border-radius:10px}.foogallery.fg-round-large .fg-item,.foogallery.fg-round-large .fg-item-inner{border-radius:15px}.foogallery.fg-round-full .fg-item,.foogallery.fg-round-full .fg-item-inner{border-radius:50%}.foogallery .fg-loader{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em;height:1em;font-size:5px;visibility:hidden;opacity:0;pointer-events:none}.foogallery .fg-loading .fg-loader{visibility:visible;opacity:1}.fg-loading-default .fg-loader{border-radius:50%;text-indent:-9999em;box-shadow:0 -2.6em 0 0 #828282,1.8em -1.8em 0 0 rgba(130,130,130,.2),2.5em 0 0 0 rgba(130,130,130,.2),1.75em 1.75em 0 0 rgba(130,130,130,.2),0 2.5em 0 0 rgba(130,130,130,.2),-1.8em 1.8em 0 0 rgba(130,130,130,.2),-2.6em 0 0 0 rgba(130,130,130,.5),-1.8em -1.8em 0 0 rgba(130,130,130,.7);-webkit-animation:loading-default 1.1s infinite paused steps(8,start);animation:loading-default 1.1s infinite paused steps(8,start)}.fg-loading-default .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fg-loading-bars .fg-loader,.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{background:#828282;width:1em;height:4em;-webkit-animation:loading-bars 1s infinite paused ease-in-out;animation:loading-bars 1s infinite paused ease-in-out}.fg-loading-bars .fg-loading .fg-loader,.fg-loading-bars .fg-loading .fg-loader:after,.fg-loading-bars .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-bars .fg-loader{color:#828282;text-indent:-9999em;font-size:4px;margin-top:-2em;margin-left:-.5em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{position:absolute;top:0;content:''}.fg-loading-bars .fg-loader:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-bars .fg-loader:after{left:1.5em}@-webkit-keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}.fg-loading-trail .fg-loader{color:#828282;margin-top:0;margin-left:0;font-size:20px;text-indent:-9999em;overflow:hidden;border-radius:50%;-webkit-animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease;animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease}.fg-loading-trail .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@-webkit-keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.fg-loading-pulse .fg-loader,.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{border-radius:50%;width:2.5em;height:2.5em;-webkit-animation:loading-pulse 1.8s infinite both paused ease-in-out;animation:loading-pulse 1.8s infinite both paused ease-in-out}.fg-loading-pulse .fg-loading .fg-loader,.fg-loading-pulse .fg-loading .fg-loader:after,.fg-loading-pulse .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-pulse .fg-loader{color:#828282;font-size:4px;margin-top:-3.75em;margin-left:-1.25em;text-indent:-9999em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{content:'';position:absolute;top:0}.fg-loading-pulse .fg-loader:before{left:-3.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-pulse .fg-loader:after{left:3.5em}@-webkit-keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.fg-loading-dots .fg-loader{color:#828282;font-size:5px;border-radius:50%;text-indent:-9999em;-webkit-animation:loading-dots 1.3s infinite paused linear;animation:loading-dots 1.3s infinite paused linear}.fg-loading-dots .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}.fg-loading-partial .fg-loader,.fg-loading-partial .fg-loader:after{border-radius:50%;width:10em;height:10em}.fg-loading-partial .fg-loader{font-size:4px;text-indent:-9999em;margin-top:0;margin-left:0;border-top:1.1em solid rgba(130,130,130,.2);border-right:1.1em solid rgba(130,130,130,.2);border-bottom:1.1em solid rgba(130,130,130,.2);border-left:1.1em solid #828282;-webkit-animation:loading-partial 1.1s infinite paused linear;animation:loading-partial 1.1s infinite paused linear}.fg-loading-partial .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-fade-in .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-scale-up .fg-item.fg-loaded,.foogallery.fg-loaded-slide-down .fg-item.fg-loaded,.foogallery.fg-loaded-slide-left .fg-item.fg-loaded,.foogallery.fg-loaded-slide-right .fg-item.fg-loaded,.foogallery.fg-loaded-slide-up .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{transition-timing-function:ease;transition-duration:650ms;transition-property:background-color,transform}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fade-in .fg-loaded .fg-item-inner,.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner,.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transition-timing-function:ease;transition-duration:650ms}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{perspective:1300px}.foogallery.fg-loaded-drop .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform:translateZ(400px) translateY(100%) rotateX(-90deg)}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner{transform:translateZ(0) translateY(0) rotateX(0)}.foogallery.fg-loaded-fade-in .fg-item-inner{transition-property:visibility,opacity}.foogallery.fg-loaded-flip .fg-item-inner{transition-property:visibility,opacity,transform;backface-visibility:hidden;transform-style:preserve-3d;transform:rotateY(-180deg)}.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner{transform:rotateY(0)}.foogallery.fg-loaded-fly .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:50% 50% -300px;transform:rotateX(-180deg)}.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery.fg-loaded-scale-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:scale(.6)}.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner{transform:scale(1)}.foogallery.fg-loaded-slide-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(50%)}.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-down .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(-50%)}.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-left .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(50%)}.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-slide-right .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(-50%)}.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-swing-down .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:0 0;transform:rotateX(-80deg)}.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery .fg-caption{visibility:hidden;opacity:0;position:absolute;z-index:8;width:100%;max-height:100%;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3;border:none;text-align:center;cursor:pointer;margin:0}.foogallery .fg-caption a{text-decoration:none}.foogallery .fg-caption a:hover{border-bottom:none}.foogallery .fg-caption-title{box-sizing:content-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:400;padding:0;margin:.4em;height:1.3em;min-height:1.3em;line-height:1.3em}.foogallery .fg-caption-desc{padding:0;margin:.4em;overflow:hidden;height:100%;max-height:100%}.foogallery .fg-caption-title+.fg-caption-desc{margin-top:0}.foogallery .fg-caption-buttons{display:flex;position:relative;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:5px;margin:0}.foogallery .fg-caption-buttons>a{display:inline-block;position:relative;padding:.4em .8em;margin:1px;max-width:100%;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none!important;border:1px solid transparent;border-radius:4px;box-shadow:none;outline:0;opacity:1;transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,opacity,border-color,background-color}@media only screen and (max-width:600px){.foogallery .fg-caption-buttons{align-items:stretch}.foogallery .fg-caption-buttons>a{flex:1}}.foogallery .fg-caption .fg-caption-buttons>a{color:#333;background-color:#fff;border-color:#ccc}.foogallery .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#333;background-color:#e6e6e6;border-color:#adadad;border-bottom:solid 1px}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a{color:#fff;background-color:#444;border-color:#333}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#9d9d9d;background-color:#333;border-color:#222}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-caption-always .fg-item .fg-caption .fg-caption-inner:before{display:none}.foogallery.fg-caption-always .fg-item.fg-loaded .fg-caption{left:0;bottom:0;transition-timing-function:ease;transition-duration:.3s;transition-property:visibility,opacity;visibility:visible;opacity:1}.foogallery.fg-caption-always .fg-caption{text-align:left}.foogallery.fg-caption-hover .fg-caption .fg-caption-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:100%;position:absolute;top:50%;left:0;transform:translateY(-50%);padding:.4em}.foogallery.fg-caption-hover .fg-item.fg-loaded .fg-image-overlay{display:none}.foogallery.fg-c-l .fg-caption,.foogallery.fg-caption-always.fg-c-l .fg-caption{text-align:left}.foogallery.fg-c-c .fg-caption,.foogallery.fg-caption-always.fg-c-c .fg-caption{text-align:center}.foogallery.fg-c-r .fg-caption,.foogallery.fg-caption-always.fg-c-r .fg-caption{text-align:right}.foogallery.fg-c-j .fg-caption,.foogallery.fg-caption-always.fg-c-j .fg-caption{text-align:justify}.foogallery .fg-image-overlay:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-size:32px 32px;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery .fg-caption-inner:before{content:"";display:none;position:relative;width:32px;height:32px;margin:.4em;background-size:32px 32px;vertical-align:middle;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery.fg-hover-cart:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-external:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-eye:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-tint:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-1:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-4:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-default:not(.fg-preset) .fg-caption-inner:before{display:block}.foogallery.fg-hover-cart:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-external:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-eye:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-tint:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-1:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-2:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-3:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-4:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-default:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-video-sticky .fg-type-video.fg-loaded .fg-item-inner .fg-image-overlay{background-color:transparent;visibility:visible;opacity:1;display:block}.foogallery.fg-video-sticky .fg-type-video .fg-caption-inner:before{display:none}.foogallery.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-light')}.foogallery.fg-light-overlays.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-dark')}.foogallery.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-light')}.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-dark')}.foogallery.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-light')}.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-dark')}.foogallery.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-light')}.foogallery.fg-light-overlays.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-dark')}.foogallery.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-light')}.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-dark')}.foogallery.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-light')}.foogallery.fg-light-overlays.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-dark')}.foogallery.fg-hover-external .fg-caption-inner:before,.foogallery.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-light')}.foogallery.fg-light-overlays.fg-hover-external .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-dark')}.foogallery.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-light')}.foogallery.fg-light-overlays.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-dark')}.foogallery.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-light')}.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-dark')}.foogallery.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-light')}.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-dark')}.foogallery.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-light')}.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-dark')}.foogallery.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-light')}.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-dark')}.foogallery.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-light')}.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-dark')}.foogallery.fg-caption-hover.fg-hover-colorize .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-colorize .fg-loaded .fg-image,.foogallery.fg-hover-colorize .fg-loaded .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-loaded .fg-image,.foogallery.fg-hover-grayscale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay,.foogallery.fg-hover-push .fg-loaded .fg-thumb,.foogallery.fg-hover-scale .fg-item.fg-loaded,.foogallery.fg-hover-scale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-loaded .fg-image{transition-timing-function:ease;transition-duration:.3s;backface-visibility:hidden}.foogallery.fg-hover-colorize .fg-image{filter:grayscale(100%);transition-property:filter}.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image{filter:grayscale(0%)}.foogallery.fg-caption-hover.fg-hover-colorize .fg-caption,.foogallery.fg-hover-colorize .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-grayscale .fg-image{filter:grayscale(0%);transition-property:filter}.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image{filter:grayscale(100%)}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-caption,.foogallery.fg-hover-grayscale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:none}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transform:translateX(100%);visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-thumb{transition-property:transform}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-caption{transform:translateY(0)}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb,.foogallery.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb{transform:translateX(-100%)}.foogallery.fg-hover-scale .fg-item{transition-property:transform;z-index:4}.foogallery.fg-hover-scale .fg-item:focus-within,.foogallery.fg-hover-scale .fg-item:hover{transform:scale(1.048);z-index:10}.foogallery.fg-caption-hover.fg-hover-scale .fg-caption,.foogallery.fg-hover-scale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-scale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-scale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-zoomed .fg-image{transition-property:transform;z-index:4}.foogallery.fg-hover-zoomed .fg-item:focus-within .fg-image,.foogallery.fg-hover-zoomed .fg-item:hover .fg-image{transform:scale(1.15)}.foogallery.fg-hover-zoomed .fg-image-wrap{overflow:hidden}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-caption,.foogallery.fg-hover-zoomed .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-zoomed .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:transform,background-color,opacity,visibility;visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-image-overlay{transform:translateY(0) translateX(0)}.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{transform:translateY(100%)}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay{transform:translateY(-100%)}.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay{transform:translateX(100%)}.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay{transform:translateX(-100%)}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-default:after{content:'';display:block;clear:both}.fg-default .fg-item{display:inline-block;vertical-align:top;max-width:100%}.fg-default .fg-item-inner,.fg-default .fg-thumb{display:block;vertical-align:top;max-width:100%}.fg-default .fg-image{border-radius:0;display:block;max-width:100%;height:auto;margin:0;padding:0}.fg-default .fg-image{vertical-align:top}.fg-default.fg-left{text-align:left}.fg-default.fg-center{text-align:center}.fg-default.fg-right{text-align:right}.fg-default.fg-gutter-5{padding-left:5px;margin-bottom:-5px}.fg-default.fg-gutter-5 .fg-item{margin-right:5px;margin-bottom:5px}.fg-default.fg-gutter-10{padding-left:10px;margin-bottom:-10px}.fg-default.fg-gutter-10 .fg-item{margin-right:10px;margin-bottom:10px}.fg-default.fg-gutter-15{padding-left:15px;margin-bottom:-15px}.fg-default.fg-gutter-15 .fg-item{margin-right:15px;margin-bottom:15px}.fg-default.fg-gutter-20{padding-left:20px;margin-bottom:-20px}.fg-default.fg-gutter-20 .fg-item{margin-right:20px;margin-bottom:20px}.fg-default.fg-gutter-25{padding-left:25px;margin-bottom:-25px}.fg-default.fg-gutter-25 .fg-item{margin-right:25px;margin-bottom:25px}@media only screen and (max-width:600px){.fg-default.fg-m-col1 .fg-image,.fg-default.fg-m-col2 .fg-image,.fg-default.fg-m-col3 .fg-image{width:100%}.fg-default.fg-m-col1.fg-gutter-5 .fg-item{width:calc(100% - 10px);min-width:calc(100% - 10px);max-width:calc(100% - 10px)}.fg-default.fg-m-col2.fg-gutter-5 .fg-item{width:calc(50% - 10px);min-width:calc(50% - 10px);max-width:calc(50% - 10px)}.fg-default.fg-m-col3.fg-gutter-5 .fg-item{width:calc(33.33% - 10px);min-width:calc(33.33% - 10px);max-width:calc(33.33% - 10px)}.fg-default.fg-m-col1.fg-gutter-10 .fg-item{width:calc(100% - 20px);min-width:calc(100% - 20px);max-width:calc(100% - 20px)}.fg-default.fg-m-col2.fg-gutter-10 .fg-item{width:calc(50% - 20px);min-width:calc(50% - 20px);max-width:calc(50% - 20px)}.fg-default.fg-m-col3.fg-gutter-10 .fg-item{width:calc(33.33% - 20px);min-width:calc(33.33% - 20px);max-width:calc(33.33% - 20px)}.fg-default.fg-m-col1.fg-gutter-15 .fg-item{width:calc(100% - 30px);min-width:calc(100% - 30px);max-width:calc(100% - 30px)}.fg-default.fg-m-col2.fg-gutter-15 .fg-item{width:calc(50% - 30px);min-width:calc(50% - 30px);max-width:calc(50% - 30px)}.fg-default.fg-m-col3.fg-gutter-15 .fg-item{width:calc(33.33% - 30px);min-width:calc(33.33% - 30px);max-width:calc(33.33% - 30px)}.fg-default.fg-m-col1.fg-gutter-20 .fg-item{width:calc(100% - 40px);min-width:calc(100% - 40px);max-width:calc(100% - 40px)}.fg-default.fg-m-col2.fg-gutter-20 .fg-item{width:calc(50% - 40px);min-width:calc(50% - 40px);max-width:calc(50% - 40px)}.fg-default.fg-m-col3.fg-gutter-20 .fg-item{width:calc(33.33% - 40px);min-width:calc(33.33% - 40px);max-width:calc(33.33% - 40px)}.fg-default.fg-m-col1.fg-gutter-25 .fg-item{width:calc(100% - 50px);min-width:calc(100% - 50px);max-width:calc(100% - 50px)}.fg-default.fg-m-col2.fg-gutter-25 .fg-item{width:calc(50% - 50px);min-width:calc(50% - 50px);max-width:calc(50% - 50px)}.fg-default.fg-m-col3.fg-gutter-25 .fg-item{width:calc(33.33% - 50px);min-width:calc(33.33% - 50px);max-width:calc(33.33% - 50px)}}.fg-masonry *{box-sizing:border-box}.foogallery.fg-masonry{margin:0 auto;text-align:center}.fg-masonry .fg-thumb{display:block}.fg-masonry.fg-fixed .fg-column-width,.fg-masonry.fg-fixed .fg-image,.fg-masonry.fg-fixed .fg-item{max-width:100%}.fg-masonry .fg-column-width{display:inline-block;border:solid 0 transparent}.fg-masonry .fg-column-width,.fg-masonry .fg-gutter-width{position:absolute;height:0;visibility:hidden;opacity:0;pointer-events:none}.fg-masonry.fg-col2 .fg-item .fg-image,.fg-masonry.fg-col3 .fg-item .fg-image,.fg-masonry.fg-col4 .fg-item .fg-image,.fg-masonry.fg-col5 .fg-item .fg-image,.fg-masonry.fg-col6 .fg-item .fg-image,.fg-masonry.fg-fixed .fg-item .fg-image{width:100%;height:auto;max-width:100%}.fg-masonry .fg-item{line-height:0;font-size:0;vertical-align:top}.fg-masonry.fg-col2 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col2 .fg-column-width{width:49.5%}.fg-masonry.fg-col2 .fg-gutter-width{width:1%}.fg-masonry.fg-col2.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col3 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col3 .fg-column-width{width:32.66%}.fg-masonry.fg-col3 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col4 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col4 .fg-column-width{width:24.25%}.fg-masonry.fg-col4 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col5 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col5 .fg-column-width{width:19.2%}.fg-masonry.fg-col5 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:15.83%}.fg-masonry.fg-col6 .fg-column-width{width:15.83%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}@media screen and (max-width:1280px){.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col6 .fg-column-width{width:19.2%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:1024px){.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:24.25%}.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:720px){.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:32.66%}.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:480px){.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:49.5%}.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:320px){.fg-masonry.fg-col2 .fg-item,.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:100%}.fg-masonry.fg-col2 .fg-column-width,.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:100%}.fg-masonry.fg-col2 .fg-gutter-width,.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-none .fg-item,.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width,.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item,.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width,.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:0}}.foogallery.fg-border-thin .fg-column-width{border-width:4px}.foogallery.fg-border-medium .fg-column-width{border-width:10px}.foogallery.fg-border-thick .fg-column-width{border-width:16px}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-masonry.fg-captions-bottom.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-masonry.fg-captions-bottom.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner{display:block;position:relative;max-height:none;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption,.fg-masonry.fg-captions-bottom.fg-light .fg-caption{color:#828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a:hover,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{color:#222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{color:#fff}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-masonry.fg-captions-bottom .fg-caption{border-width:10px}.fg-masonry.fg-captions-bottom .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-masonry.fg-captions-bottom.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-masonry.fg-captions-bottom.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-masonry.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-masonry.fg-transparent .fg-caption{color:#7f7f7f}.fg-masonry.fg-transparent.fg-captions-bottom .fg-caption{border-width:0;border-top-width:10px;border-bottom-width:10px}.fg-masonry.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-masonry.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-transparent .fg-caption-title,.fg-masonry.fg-transparent .fg-caption-title a{color:#333}.fg-masonry.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-masonry.fg-transparent.fg-round-full .fg-item,.fg-masonry.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-masonry.fg-transparent.fg-round-full .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-full .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-masonry.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.fg-justified{box-sizing:border-box;position:relative;text-align:center}.foogallery.fg-justified .fg-item{box-sizing:border-box;display:inline-block;margin:0;padding:0}.foogallery.fg-justified .fg-image,.foogallery.fg-justified .fg-item-inner,.foogallery.fg-justified .fg-thumb{box-sizing:border-box;display:block;margin:0;padding:0}.fg-justified .fg-item{visibility:visible;position:relative}.fg-justified .fg-item-inner{position:relative;width:100%;height:100%}.fg-justified .fg-thumb{position:relative;overflow:hidden}.fg-justified .fg-image{z-index:1}.fg-justified .fg-item.fg-positioned .fg-image-wrap,.fg-justified .fg-item.fg-positioned .fg-thumb{width:100%;height:100%}.fg-justified .fg-item.fg-positioned .fg-image{width:100%!important;height:auto!important;min-height:100%}.fg-simple_portfolio{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;align-content:center}.fg-simple_portfolio .fg-item{position:relative;flex-grow:0;flex-shrink:0;flex-basis:auto;margin:10px;max-width:100%}.fg-simple_portfolio .fg-item-inner{display:flex;flex-direction:column;margin:0;height:100%}.fg-simple_portfolio.fg-captions-top .fg-item-inner{flex-direction:column-reverse}.fg-simple_portfolio .fg-image{height:auto;width:100%}.fg-simple_portfolio .fg-thumb{min-width:auto;min-height:auto}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:100%;height:100%;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-simple_portfolio.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-simple_portfolio.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-simple_portfolio.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-simple_portfolio.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-simple_portfolio .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner{display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-simple_portfolio.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-simple_portfolio.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-simple_portfolio .fg-caption-title{white-space:normal;height:auto}.fg-simple_portfolio.fg-dark .fg-caption,.fg-simple_portfolio.fg-light .fg-caption{color:#828282}.fg-simple_portfolio.fg-dark .fg-caption a,.fg-simple_portfolio.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-simple_portfolio.fg-dark .fg-caption a:hover,.fg-simple_portfolio.fg-light .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-light .fg-caption-title,.fg-simple_portfolio.fg-light .fg-caption-title a{color:#222}.fg-simple_portfolio.fg-dark .fg-caption-title,.fg-simple_portfolio.fg-dark .fg-caption-title a{color:#fff}.fg-simple_portfolio.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-simple_portfolio.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-simple_portfolio .fg-caption{border-width:0}.fg-simple_portfolio .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-simple_portfolio.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-simple_portfolio.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.fg-simple_portfolio.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.fg-simple_portfolio.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.fg-simple_portfolio.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-simple_portfolio.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-simple_portfolio.fg-transparent .fg-caption{color:#7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-transparent .fg-caption-title,.fg-simple_portfolio.fg-transparent .fg-caption-title a{color:#333}.fg-simple_portfolio.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.foogallery.fg-preset.fg-polaroid .fg-item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .35s,background-color .65s}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n+1){-webkit-transform:rotate(3deg);transform:rotate(3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n){-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(3n){-webkit-transform:rotate(1deg);transform:rotate(1deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(5n){-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.foogallery.fg-preset.fg-polaroid .fg-item:hover{-webkit-transform:rotate(0);transform:rotate(0)}.foogallery.fg-preset.fg-polaroid .fg-caption{position:relative;width:auto;font-family:"Segoe Print Regular",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.foogallery.fg-preset.fg-polaroid .fg-caption-inner,.foogallery.fg-preset.fg-polaroid .fg-caption-title{position:relative;width:auto}.foogallery.fg-preset.fg-polaroid .fg-caption-title{text-align:center}.foogallery.fg-preset.fg-polaroid .fg-caption-desc{display:none}.foogallery.fg-light.fg-preset.fg-polaroid .fg-caption-title,.foogallery.fg-preset.fg-polaroid .fg-caption-title{color:#333}.foogallery.fg-dark.fg-preset.fg-polaroid .fg-caption-title{color:#fff}.foogallery.fg-preset.fg-polaroid .fg-caption{border-style:solid;border-color:transparent;border-width:10px}.foogallery.fg-preset.fg-polaroid .fg-caption-title+.fg-caption-desc{margin-top:4px}.foogallery.fg-preset.fg-polaroid.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.foogallery.fg-preset.fg-polaroid.fg-border-medium .fg-caption{border-width:10px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption{border-width:16px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-image-viewer{display:block;font-family:'Open Sans','Helvetica Neue',Arial,sans-serif}.fg-image-viewer.fg-left{text-align:left}.fg-image-viewer.fg-center{text-align:center}.fg-image-viewer.fg-right{text-align:right}.fiv-inner{position:relative;display:inline-block;max-width:100%;overflow:hidden;z-index:6}.fiv-inner .fiv-inner-container{position:relative;overflow:hidden;max-width:100%;border-style:solid;border-width:0;border-bottom-width:4px;z-index:5}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:active,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:hover,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:visited{position:relative;display:block;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item{position:absolute;visibility:visible;opacity:1;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item:first-of-type{position:relative}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb img{display:block;max-width:100%;height:auto;border:none;outline:0;text-decoration:none}.fg-image-viewer .fiv-inner .fiv-ctrls{display:block;text-align:center;font-size:14px;border-style:solid;line-height:34px}.fg-image-viewer .fiv-inner .fiv-ctrls:after{content:'';display:block;clear:both}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count{display:inline-block;font-weight:400;margin:0}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;min-width:80px;position:relative;overflow:hidden;transition:background-color .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{display:block;position:absolute;font-size:24px;line-height:30px;top:0;left:0;width:100%;transform:translateY(0);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover:before{transform:translateY(-100%)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev span{display:block;width:100%;transform:translateY(100%);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover span{transform:translateY(0)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:left}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2190'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:right}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2192'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span{margin:0 4px}.foogallery.fg-image-viewer.fg-caption-always .fg-item-inner .fg-caption{padding:0;border:none}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-desc{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title+.fg-caption-desc{padding:0 10px 10px 10px}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-light .fiv-inner .fiv-inner-container{background-color:#fff;color:#333;border-color:#fff}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#f2f2f2}.fg-image-viewer.fg-light .fiv-next,.fg-image-viewer.fg-light .fiv-prev{box-shadow:inset 0 0 0 1px #ddd}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-dark .fiv-inner .fiv-inner-container{background-color:#333;color:#fff;border-color:#333}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#444}.fg-image-viewer.fg-dark .fiv-next,.fg-image-viewer.fg-dark .fiv-prev{box-shadow:inset 0 0 0 1px #222}.foogallery.fg-image-viewer.fg-border-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin .fg-item-inner{border-width:0}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-inner-container{border-width:4px}.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-inner-container{border-width:10px}.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-inner-container{border-width:16px}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-ctrls{border-top-width:1px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-round-small .fiv-inner{border-radius:5px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-round-medium .fiv-inner{border-radius:10px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-round-large .fiv-inner{border-radius:15px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-full .fiv-inner,.foogallery.fg-image-viewer.fg-round-full .fiv-next,.foogallery.fg-image-viewer.fg-round-full .fiv-prev{border-radius:50%}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fg-item-inner{box-shadow:none}.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fiv-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fiv-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fiv-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-thumbnail,.foogallery.fg-thumbnail.fg-center{text-align:center}.foogallery.fg-thumbnail.fg-left{text-align:left}.foogallery.fg-thumbnail.fg-right{text-align:right}.foogallery.fg-thumbnail.fg-float-left{float:left;width:auto}.foogallery.fg-thumbnail.fg-float-right{float:right;width:auto}.foogallery.fg-thumbnail .fg-item{display:inline-block;vertical-align:top;max-width:100%}.foogallery.fg-thumbnail .fg-image{max-width:100%}.foogallery.fg-thumbnail .fg-st-hidden{display:none}.foogallery-stack-album{text-align:center;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3}.foogallery-stack-album,.foogallery-stack-album *{box-sizing:border-box}.foogallery-stack-album.fg-align-left{text-align:left}.foogallery-stack-album.fg-align-center{text-align:center}.foogallery-stack-album.fg-align-right{text-align:right}.foogallery-stack-album.fg-disable-transitions,.foogallery-stack-album.fg-disable-transitions *{transition:none!important}.fg-header{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative;padding:0;margin:0;border-top:solid 1px #aaa;border-bottom:solid 1px #aaa}.fg-header-title{display:block;margin:0;padding:0 20px;width:100%;text-align:left}.fg-header-active{display:block;margin:0;padding:0 20px;visibility:hidden;opacity:0;width:100%;text-align:right;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-header-back{display:block;padding:0;margin:5px;visibility:hidden;opacity:0;min-width:40px;width:40px;height:40px;border-radius:50%;text-align:center;line-height:38px;color:#999;background:#ddd;background:rgba(200,200,200,.5);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-has-active .fg-header-active,.fg-has-active .fg-header-back{visibility:visible;opacity:1}.fg-piles{display:inline-block;position:relative;transition-property:width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile{display:block;position:absolute;top:0;left:0;list-style:none;padding:0;margin:0;visibility:visible;opacity:1;transition-property:opacity,visibility,top,left,width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile.fg-hidden{visibility:hidden;opacity:0}.fg-pile-item{display:block;position:absolute;top:25px;left:25px;visibility:visible;opacity:1;cursor:pointer;border:10px solid #fff;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition-property:opacity,visibility,top,left,transform;transition-duration:.3s;transition-timing-function:ease-in-out;z-index:1;transform:rotate(0)}.fg-expanded .fg-pile-item{z-index:2;transform:rotate(0)!important}.fg-pile-item.fg-has-cover{z-index:10;transform:rotate(0)!important}.fg-pile-item:nth-child(2){z-index:9}.fg-pile-item:nth-child(3){z-index:8}.fg-pile-item:nth-child(4){z-index:7}.fg-pile-item:nth-child(1n+5){visibility:hidden;opacity:0}.fg-expanded .fg-pile-item:nth-child(1n+4){visibility:visible;opacity:1}.fg-pile-item-thumb{display:block}.fg-pile-item-image{display:block}.fg-pile-item-caption{display:flex;justify-content:center;flex-direction:column;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;margin:0;padding:10px;background-color:rgba(68,68,68,.5);color:#fff;text-align:center;visibility:hidden;opacity:0;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile-item-title{display:block;width:100%;padding:0 0 10px}.fg-pile-item-desc{display:block;width:100%;max-height:100%;border-top:solid 1px currentColor;padding:10px 0 0;overflow:hidden}.fg-pile-item-thumb:hover .fg-pile-item-caption{visibility:visible;opacity:1}.fg-pile-cover{display:flex;justify-content:left;align-items:center;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;visibility:visible;opacity:1;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-expanded .fg-pile-cover{visibility:hidden;opacity:0;pointer-events:none}.fg-pile-cover-content{display:flex;position:relative;background:#fff;color:#333;width:75%;font-weight:700;box-shadow:1px 1px 1px rgba(0,0,0,.1),5px 0 5px -3px rgba(0,0,0,.4),inset 0 0 5px rgba(0,0,0,.04)}.fg-pile-cover-title{text-align:center;padding:10px;width:100%}.fg-pile-cover-count{color:#aaa;padding:10px 5px;background:#f7f7f7;height:100%}:root{--fg-carousel-perspective:150px;--fg-carousel-navigation-size:48px;--fg-carousel-pagination-size:14px;--fg-carousel-progress-size:4px;--fg-carousel-navigation-opacity:0.3;--fg-carousel-transition-speed:650ms;--fg-carousel-ui-speed:300ms}.foogallery.fg-carousel{--fg-carousel-inverse-perspective:calc( -1 * var(--fg-carousel-perspective) );position:relative;overflow:hidden;display:grid;grid-template-columns:var(--fg-carousel-navigation-size) auto var(--fg-carousel-navigation-size);grid-template-rows:auto auto;grid-template-areas:"prev inner next" "bottom bottom bottom"}.fg-carousel-inner{position:relative;grid-area:inner;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;grid-template-areas:"left center right";padding:10px 0;perspective:var(--fg-carousel-perspective);transform:translate3d(0,0,0);transform-style:preserve-3d;backface-visibility:hidden;will-change:contents}.foogallery_preview_container .fg-carousel-inner{transform-style:unset}.fg-carousel-center{position:relative;z-index:-1;pointer-events:none;visibility:hidden}.fg-carousel-center{grid-area:center}.fg-carousel-progress{display:block;position:absolute;visibility:visible;bottom:0;left:0;width:0;height:var(--fg-carousel-progress-size);border-radius:calc(var(--fg-carousel-progress-size)/ 2);transition:width .1s linear;opacity:var(--fg-carousel-navigation-opacity)}.fg-carousel-bottom{display:flex;align-items:center;justify-content:center;position:relative;grid-area:bottom;font-size:var(--fg-carousel-pagination-size);padding:0;margin-bottom:10px}.fg-carousel-bullet{width:1em;height:1em;display:block;padding:0;margin:.3em;border-radius:50%;border:solid 1px transparent;background:0 0;box-shadow:none;outline:0;opacity:var(--fg-carousel-navigation-opacity);cursor:pointer;font-size:inherit;transition:opacity var(--fg-carousel-ui-speed) ease-in}@media only screen and (max-width:782px){.fg-carousel-bullet{width:1.25em;height:1.25em}}.fg-carousel-bullet:hover{background:0 0;box-shadow:none;outline:0;opacity:1}.fg-carousel-bullet.fg-bullet-active{opacity:1}button.fg-carousel-next,button.fg-carousel-prev{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center;font-size:var(--fg-carousel-navigation-size);background:0 0;border:none;box-shadow:none;outline:0;z-index:11;cursor:pointer;opacity:var(--fg-carousel-navigation-opacity);transition:opacity var(--fg-carousel-ui-speed) ease-in;padding:0;margin:0}button.fg-carousel-next:hover,button.fg-carousel-prev:hover{background:0 0;border:none;box-shadow:none;outline:0;opacity:1}.fg-carousel-next .fg-icon,.fg-carousel-prev .fg-icon{width:1em;height:1em}.fg-carousel-prev{grid-area:prev}.fg-carousel-next{grid-area:next}.foogallery.fg-carousel .fg-item{display:block;opacity:0;visibility:hidden;grid-area:center;transform-origin:center center;transform:translate3d(0,200%,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:0s;transition-property:background-color,transform,transform-origin,opacity,visibility;backface-visibility:hidden}.foogallery.fg-carousel .fg-item.fg-loaded{transform:translate3d(0,0,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:calc( var(--fg-carousel-transition-speed) / 2 );transition-property:background-color,transform,transform-origin,opacity,visibility}.foogallery.fg-carousel .fg-item.fg-item-active,.foogallery.fg-carousel .fg-item.fg-item-next,.foogallery.fg-carousel .fg-item.fg-item-prev{opacity:1;visibility:visible}.foogallery.fg-carousel .fg-item.fg-item-active{transform:translate3d(0,0,0)}.foogallery.fg-carousel.fg-dark .fg-carousel-progress,.foogallery.fg-carousel.fg-light.fg-inverted .fg-carousel-progress{background-color:#fff;box-shadow:inset 0 0 0 1px #9d9d9d}.foogallery.fg-carousel.fg-dark button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-bullet{background-color:#fff;border-color:#ccc}.foogallery.fg-carousel.fg-dark button.fg-carousel-next,.foogallery.fg-carousel.fg-dark button.fg-carousel-prev,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-prev{color:#fff;background-color:transparent}.foogallery.fg-carousel.fg-dark.fg-inverted .fg-carousel-progress,.foogallery.fg-carousel.fg-light .fg-carousel-progress{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light button.fg-carousel-bullet{background-color:#444;border-color:#333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-prev,.foogallery.fg-carousel.fg-light button.fg-carousel-next,.foogallery.fg-carousel.fg-light button.fg-carousel-prev{color:#444;background-color:transparent}
1
+ .foogallery,.foogallery *{box-sizing:border-box}.foogallery{display:block;z-index:1;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;position:relative;line-height:0;font-size:0;width:100%;max-width:100%}.foogallery .fg-item{display:inline-block;position:relative;background-color:transparent;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.foogallery .fg-item.fg-hidden{display:none!important}.foogallery .fg-item-inner{display:block;position:relative;visibility:hidden;overflow:hidden;opacity:0;z-index:3;margin:0;border:solid 0 transparent}.foogallery .fg-item.fg-error:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-image:url('../img/icons.svg#image');background-color:transparent;background-repeat:no-repeat;background-position:center center;background-size:32px 32px}.foogallery .fg-item.fg-loaded{z-index:4}.foogallery .fg-loaded .fg-item-inner{visibility:visible;opacity:1;z-index:5}.foogallery .fg-error .fg-item-inner{pointer-events:none;cursor:default}.foogallery .fg-thumb{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:4;box-shadow:none}.foogallery .fg-thumb:focus,.foogallery .fg-thumb:hover{border:none;outline:0;text-decoration:none;box-shadow:none}.foogallery .fg-image-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;visibility:hidden;opacity:0}.foogallery .fg-image-wrap{display:block;position:relative}.foogallery .fg-image{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:5;max-width:100%;height:auto;margin:0;width:auto}.foogallery picture.fg-image>img{display:block;position:relative;border:none;outline:0;text-decoration:none;max-width:100%;height:auto;margin:0;width:auto}.foogallery .fg-loaded .fg-thumb{z-index:6}.foogallery .fg-loaded .fg-image{z-index:7}.fg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.foogallery.fg-light .fg-item-inner{background-color:#fff;color:#333;border-color:#fff}.foogallery.fg-dark .fg-item-inner{background-color:#333;color:#fff;border-color:#333}.foogallery.fg-light .fg-item.fg-error,.foogallery.fg-light .fg-item.fg-idle,.foogallery.fg-light .fg-item.fg-loading{background-color:#eee;box-shadow:inset 0 0 0 1px #ddd}.foogallery.fg-dark .fg-item.fg-error,.foogallery.fg-dark .fg-item.fg-idle,.foogallery.fg-dark .fg-item.fg-loading{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery .fg-caption{background-color:rgba(0,0,0,.6);color:#fff}.foogallery .fg-caption a{color:#fff;border-bottom:1px solid #fff}.foogallery.fg-light-overlays .fg-caption{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-light-overlays .fg-caption a{color:#333;border-bottom-color:#333}.foogallery.fg-transparent-overlays .fg-caption{background-color:transparent;color:#fff}.foogallery.fg-transparent-overlays .fg-caption a{color:#fff;border-bottom-color:#fff}.foogallery .fg-image-overlay{background-color:rgba(0,0,0,.6);color:#fff}.foogallery.fg-light-overlays .fg-image-overlay{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-transparent-overlays .fg-image-overlay{background-color:transparent;color:#fff}.fg-exif-light .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#fff;color:#333}.fg-exif-dark .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#333;color:#fff}.fg-exif-rounded .fg-item.fg-item-exif .fg-image-wrap:after{border-radius:3px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{display:inline-block;position:absolute;content:'EXIF';font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:11px;line-height:10px;padding:3px 4px;z-index:7}.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;right:5px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;left:5px}.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;right:5px}.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;left:5px}.foogallery.fg-border-thin .fg-item-inner{border-width:4px}.foogallery.fg-border-medium .fg-item-inner{border-width:10px}.foogallery.fg-border-thick .fg-item-inner{border-width:16px}.foogallery.fg-light.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-dark.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-light.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-light.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-light.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-shadow-inset-small .fg-thumb:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:7}.foogallery.fg-dark.fg-shadow-inset-small .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.foogallery.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%}.foogallery.fg-round-small .fg-item,.foogallery.fg-round-small .fg-item-inner{border-radius:5px}.foogallery.fg-round-medium .fg-item,.foogallery.fg-round-medium .fg-item-inner{border-radius:10px}.foogallery.fg-round-large .fg-item,.foogallery.fg-round-large .fg-item-inner{border-radius:15px}.foogallery.fg-round-full .fg-item,.foogallery.fg-round-full .fg-item-inner{border-radius:50%}.foogallery .fg-loader{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em;height:1em;font-size:5px;visibility:hidden;opacity:0;pointer-events:none}.foogallery .fg-loading .fg-loader{visibility:visible;opacity:1}.fg-loading-default .fg-loader{border-radius:50%;text-indent:-9999em;box-shadow:0 -2.6em 0 0 #828282,1.8em -1.8em 0 0 rgba(130,130,130,.2),2.5em 0 0 0 rgba(130,130,130,.2),1.75em 1.75em 0 0 rgba(130,130,130,.2),0 2.5em 0 0 rgba(130,130,130,.2),-1.8em 1.8em 0 0 rgba(130,130,130,.2),-2.6em 0 0 0 rgba(130,130,130,.5),-1.8em -1.8em 0 0 rgba(130,130,130,.7);-webkit-animation:loading-default 1.1s infinite paused steps(8,start);animation:loading-default 1.1s infinite paused steps(8,start)}.fg-loading-default .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fg-loading-bars .fg-loader,.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{background:#828282;width:1em;height:4em;-webkit-animation:loading-bars 1s infinite paused ease-in-out;animation:loading-bars 1s infinite paused ease-in-out}.fg-loading-bars .fg-loading .fg-loader,.fg-loading-bars .fg-loading .fg-loader:after,.fg-loading-bars .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-bars .fg-loader{color:#828282;text-indent:-9999em;font-size:4px;margin-top:-2em;margin-left:-.5em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{position:absolute;top:0;content:''}.fg-loading-bars .fg-loader:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-bars .fg-loader:after{left:1.5em}@-webkit-keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}.fg-loading-trail .fg-loader{color:#828282;margin-top:0;margin-left:0;font-size:20px;text-indent:-9999em;overflow:hidden;border-radius:50%;-webkit-animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease;animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease}.fg-loading-trail .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@-webkit-keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.fg-loading-pulse .fg-loader,.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{border-radius:50%;width:2.5em;height:2.5em;-webkit-animation:loading-pulse 1.8s infinite both paused ease-in-out;animation:loading-pulse 1.8s infinite both paused ease-in-out}.fg-loading-pulse .fg-loading .fg-loader,.fg-loading-pulse .fg-loading .fg-loader:after,.fg-loading-pulse .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-pulse .fg-loader{color:#828282;font-size:4px;margin-top:-3.75em;margin-left:-1.25em;text-indent:-9999em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{content:'';position:absolute;top:0}.fg-loading-pulse .fg-loader:before{left:-3.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-pulse .fg-loader:after{left:3.5em}@-webkit-keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.fg-loading-dots .fg-loader{color:#828282;font-size:5px;border-radius:50%;text-indent:-9999em;-webkit-animation:loading-dots 1.3s infinite paused linear;animation:loading-dots 1.3s infinite paused linear}.fg-loading-dots .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}.fg-loading-partial .fg-loader,.fg-loading-partial .fg-loader:after{border-radius:50%;width:10em;height:10em}.fg-loading-partial .fg-loader{font-size:4px;text-indent:-9999em;margin-top:0;margin-left:0;border-top:1.1em solid rgba(130,130,130,.2);border-right:1.1em solid rgba(130,130,130,.2);border-bottom:1.1em solid rgba(130,130,130,.2);border-left:1.1em solid #828282;-webkit-animation:loading-partial 1.1s infinite paused linear;animation:loading-partial 1.1s infinite paused linear}.fg-loading-partial .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-fade-in .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-scale-up .fg-item.fg-loaded,.foogallery.fg-loaded-slide-down .fg-item.fg-loaded,.foogallery.fg-loaded-slide-left .fg-item.fg-loaded,.foogallery.fg-loaded-slide-right .fg-item.fg-loaded,.foogallery.fg-loaded-slide-up .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{transition-timing-function:ease;transition-duration:650ms;transition-property:background-color,transform}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fade-in .fg-loaded .fg-item-inner,.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner,.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transition-timing-function:ease;transition-duration:650ms}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{perspective:1300px}.foogallery.fg-loaded-drop .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform:translateZ(400px) translateY(100%) rotateX(-90deg)}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner{transform:translateZ(0) translateY(0) rotateX(0)}.foogallery.fg-loaded-fade-in .fg-item-inner{transition-property:visibility,opacity}.foogallery.fg-loaded-flip .fg-item-inner{transition-property:visibility,opacity,transform;backface-visibility:hidden;transform-style:preserve-3d;transform:rotateY(-180deg)}.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner{transform:rotateY(0)}.foogallery.fg-loaded-fly .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:50% 50% -300px;transform:rotateX(-180deg)}.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery.fg-loaded-scale-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:scale(.6)}.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner{transform:scale(1)}.foogallery.fg-loaded-slide-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(50%)}.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-down .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(-50%)}.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-left .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(50%)}.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-slide-right .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(-50%)}.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-swing-down .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:0 0;transform:rotateX(-80deg)}.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery .fg-caption{visibility:hidden;opacity:0;position:absolute;z-index:8;width:100%;max-height:100%;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3;border:none;text-align:center;cursor:pointer;margin:0}.foogallery .fg-caption a{text-decoration:none}.foogallery .fg-caption a:hover{border-bottom:none}.foogallery .fg-caption-title{box-sizing:content-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:400;padding:0;margin:.4em;height:1.3em;min-height:1.3em;line-height:1.3em}.foogallery .fg-caption-desc{padding:0;margin:.4em;overflow:hidden;height:100%;max-height:100%}.foogallery .fg-caption-title+.fg-caption-desc{margin-top:0}.foogallery .fg-caption-buttons{display:flex;position:relative;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:5px;margin:0}.foogallery .fg-caption-buttons>a{display:inline-block;position:relative;padding:.4em .8em;margin:1px;max-width:100%;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none!important;border:1px solid transparent;border-radius:4px;box-shadow:none;outline:0;opacity:1;transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,opacity,border-color,background-color}@media only screen and (max-width:600px){.foogallery .fg-caption-buttons{align-items:stretch}.foogallery .fg-caption-buttons>a{flex:1}}.foogallery .fg-caption .fg-caption-buttons>a{color:#333;background-color:#fff;border-color:#ccc}.foogallery .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#333;background-color:#e6e6e6;border-color:#adadad;border-bottom:solid 1px}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a{color:#fff;background-color:#444;border-color:#333}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#9d9d9d;background-color:#333;border-color:#222}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-caption-always .fg-item .fg-caption .fg-caption-inner:before{display:none}.foogallery.fg-caption-always .fg-item.fg-loaded .fg-caption{left:0;bottom:0;transition-timing-function:ease;transition-duration:.3s;transition-property:visibility,opacity;visibility:visible;opacity:1}.foogallery.fg-caption-always .fg-caption{text-align:left}.foogallery.fg-caption-hover .fg-caption .fg-caption-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:100%;position:absolute;top:50%;left:0;transform:translateY(-50%);padding:.4em}.foogallery.fg-caption-hover .fg-item.fg-loaded .fg-image-overlay{display:none}.foogallery.fg-c-l .fg-caption,.foogallery.fg-caption-always.fg-c-l .fg-caption{text-align:left}.foogallery.fg-c-c .fg-caption,.foogallery.fg-caption-always.fg-c-c .fg-caption{text-align:center}.foogallery.fg-c-r .fg-caption,.foogallery.fg-caption-always.fg-c-r .fg-caption{text-align:right}.foogallery.fg-c-j .fg-caption,.foogallery.fg-caption-always.fg-c-j .fg-caption{text-align:justify}.foogallery .fg-image-overlay:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-size:32px 32px;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery .fg-caption-inner:before{content:"";display:none;position:relative;width:32px;height:32px;margin:.4em;background-size:32px 32px;vertical-align:middle;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery.fg-hover-cart:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-external:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-eye:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-tint:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-1:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-4:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-default:not(.fg-preset) .fg-caption-inner:before{display:block}.foogallery.fg-hover-cart:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-external:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-eye:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-tint:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-1:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-2:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-3:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-4:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-default:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-video-sticky .fg-type-video.fg-loaded .fg-item-inner .fg-image-overlay{background-color:transparent;visibility:visible;opacity:1;display:block}.foogallery.fg-video-sticky .fg-type-video .fg-caption-inner:before{display:none}.foogallery.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-light')}.foogallery.fg-light-overlays.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-dark')}.foogallery.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-light')}.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-dark')}.foogallery.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-light')}.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-dark')}.foogallery.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-light')}.foogallery.fg-light-overlays.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-dark')}.foogallery.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-light')}.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-dark')}.foogallery.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-light')}.foogallery.fg-light-overlays.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-dark')}.foogallery.fg-hover-external .fg-caption-inner:before,.foogallery.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-light')}.foogallery.fg-light-overlays.fg-hover-external .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-dark')}.foogallery.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-light')}.foogallery.fg-light-overlays.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-dark')}.foogallery.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-light')}.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-dark')}.foogallery.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-light')}.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-dark')}.foogallery.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-light')}.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-dark')}.foogallery.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-light')}.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-dark')}.foogallery.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-light')}.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-dark')}.foogallery.fg-caption-hover.fg-hover-colorize .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-colorize .fg-loaded .fg-image,.foogallery.fg-hover-colorize .fg-loaded .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-loaded .fg-image,.foogallery.fg-hover-grayscale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay,.foogallery.fg-hover-push .fg-loaded .fg-thumb,.foogallery.fg-hover-scale .fg-item.fg-loaded,.foogallery.fg-hover-scale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-loaded .fg-image{transition-timing-function:ease;transition-duration:.3s;backface-visibility:hidden}.foogallery.fg-hover-colorize .fg-image{filter:grayscale(100%);transition-property:filter}.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image{filter:grayscale(0%)}.foogallery.fg-caption-hover.fg-hover-colorize .fg-caption,.foogallery.fg-hover-colorize .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-grayscale .fg-image{filter:grayscale(0%);transition-property:filter}.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image{filter:grayscale(100%)}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-caption,.foogallery.fg-hover-grayscale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:none}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transform:translateX(100%);visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-thumb{transition-property:transform}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-caption{transform:translateY(0)}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb,.foogallery.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb{transform:translateX(-100%)}.foogallery.fg-hover-scale .fg-item{transition-property:transform;z-index:4}.foogallery.fg-hover-scale .fg-item:focus-within,.foogallery.fg-hover-scale .fg-item:hover{transform:scale(1.048);z-index:10}.foogallery.fg-caption-hover.fg-hover-scale .fg-caption,.foogallery.fg-hover-scale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-scale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-scale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-zoomed .fg-image{transition-property:transform;z-index:4}.foogallery.fg-hover-zoomed .fg-item:focus-within .fg-image,.foogallery.fg-hover-zoomed .fg-item:hover .fg-image{transform:scale(1.15)}.foogallery.fg-hover-zoomed .fg-image-wrap{overflow:hidden}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-caption,.foogallery.fg-hover-zoomed .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-zoomed .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:transform,background-color,opacity,visibility;visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-image-overlay{transform:translateY(0) translateX(0)}.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{transform:translateY(100%)}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay{transform:translateY(-100%)}.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay{transform:translateX(100%)}.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay{transform:translateX(-100%)}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-default:after{content:'';display:block;clear:both}.fg-default .fg-item{display:inline-block;vertical-align:top;max-width:100%}.fg-default .fg-item-inner,.fg-default .fg-thumb{display:block;vertical-align:top;max-width:100%}.fg-default .fg-image{border-radius:0;display:block;max-width:100%;height:auto;margin:0;padding:0}.fg-default .fg-image{vertical-align:top}.fg-default.fg-left{text-align:left}.fg-default.fg-center{text-align:center}.fg-default.fg-right{text-align:right}.fg-default.fg-gutter-5{padding-left:5px;margin-bottom:-5px}.fg-default.fg-gutter-5 .fg-item{margin-right:5px;margin-bottom:5px}.fg-default.fg-gutter-10{padding-left:10px;margin-bottom:-10px}.fg-default.fg-gutter-10 .fg-item{margin-right:10px;margin-bottom:10px}.fg-default.fg-gutter-15{padding-left:15px;margin-bottom:-15px}.fg-default.fg-gutter-15 .fg-item{margin-right:15px;margin-bottom:15px}.fg-default.fg-gutter-20{padding-left:20px;margin-bottom:-20px}.fg-default.fg-gutter-20 .fg-item{margin-right:20px;margin-bottom:20px}.fg-default.fg-gutter-25{padding-left:25px;margin-bottom:-25px}.fg-default.fg-gutter-25 .fg-item{margin-right:25px;margin-bottom:25px}@media only screen and (max-width:600px){.fg-default.fg-m-col1 .fg-image,.fg-default.fg-m-col2 .fg-image,.fg-default.fg-m-col3 .fg-image{width:100%}.fg-default.fg-m-col1.fg-gutter-5 .fg-item{width:calc(100% - 10px);min-width:calc(100% - 10px);max-width:calc(100% - 10px)}.fg-default.fg-m-col2.fg-gutter-5 .fg-item{width:calc(50% - 10px);min-width:calc(50% - 10px);max-width:calc(50% - 10px)}.fg-default.fg-m-col3.fg-gutter-5 .fg-item{width:calc(33.33% - 10px);min-width:calc(33.33% - 10px);max-width:calc(33.33% - 10px)}.fg-default.fg-m-col1.fg-gutter-10 .fg-item{width:calc(100% - 20px);min-width:calc(100% - 20px);max-width:calc(100% - 20px)}.fg-default.fg-m-col2.fg-gutter-10 .fg-item{width:calc(50% - 20px);min-width:calc(50% - 20px);max-width:calc(50% - 20px)}.fg-default.fg-m-col3.fg-gutter-10 .fg-item{width:calc(33.33% - 20px);min-width:calc(33.33% - 20px);max-width:calc(33.33% - 20px)}.fg-default.fg-m-col1.fg-gutter-15 .fg-item{width:calc(100% - 30px);min-width:calc(100% - 30px);max-width:calc(100% - 30px)}.fg-default.fg-m-col2.fg-gutter-15 .fg-item{width:calc(50% - 30px);min-width:calc(50% - 30px);max-width:calc(50% - 30px)}.fg-default.fg-m-col3.fg-gutter-15 .fg-item{width:calc(33.33% - 30px);min-width:calc(33.33% - 30px);max-width:calc(33.33% - 30px)}.fg-default.fg-m-col1.fg-gutter-20 .fg-item{width:calc(100% - 40px);min-width:calc(100% - 40px);max-width:calc(100% - 40px)}.fg-default.fg-m-col2.fg-gutter-20 .fg-item{width:calc(50% - 40px);min-width:calc(50% - 40px);max-width:calc(50% - 40px)}.fg-default.fg-m-col3.fg-gutter-20 .fg-item{width:calc(33.33% - 40px);min-width:calc(33.33% - 40px);max-width:calc(33.33% - 40px)}.fg-default.fg-m-col1.fg-gutter-25 .fg-item{width:calc(100% - 50px);min-width:calc(100% - 50px);max-width:calc(100% - 50px)}.fg-default.fg-m-col2.fg-gutter-25 .fg-item{width:calc(50% - 50px);min-width:calc(50% - 50px);max-width:calc(50% - 50px)}.fg-default.fg-m-col3.fg-gutter-25 .fg-item{width:calc(33.33% - 50px);min-width:calc(33.33% - 50px);max-width:calc(33.33% - 50px)}}.fg-masonry *{box-sizing:border-box}.foogallery.fg-masonry{margin:0 auto;text-align:center}.fg-masonry .fg-thumb{display:block}.fg-masonry.fg-fixed .fg-column-width,.fg-masonry.fg-fixed .fg-image,.fg-masonry.fg-fixed .fg-item{max-width:100%}.fg-masonry .fg-column-width{display:inline-block;border:solid 0 transparent}.fg-masonry .fg-column-width,.fg-masonry .fg-gutter-width{position:absolute;height:0;visibility:hidden;opacity:0;pointer-events:none}.fg-masonry.fg-col2 .fg-item .fg-image,.fg-masonry.fg-col3 .fg-item .fg-image,.fg-masonry.fg-col4 .fg-item .fg-image,.fg-masonry.fg-col5 .fg-item .fg-image,.fg-masonry.fg-col6 .fg-item .fg-image,.fg-masonry.fg-fixed .fg-item .fg-image{width:100%;height:auto;max-width:100%}.fg-masonry .fg-item{line-height:0;font-size:0;vertical-align:top}.fg-masonry.fg-col2 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col2 .fg-column-width{width:49.5%}.fg-masonry.fg-col2 .fg-gutter-width{width:1%}.fg-masonry.fg-col2.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col3 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col3 .fg-column-width{width:32.66%}.fg-masonry.fg-col3 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col4 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col4 .fg-column-width{width:24.25%}.fg-masonry.fg-col4 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col5 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col5 .fg-column-width{width:19.2%}.fg-masonry.fg-col5 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:15.83%}.fg-masonry.fg-col6 .fg-column-width{width:15.83%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}@media screen and (max-width:1280px){.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col6 .fg-column-width{width:19.2%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:1024px){.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:24.25%}.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:720px){.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:32.66%}.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:480px){.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:49.5%}.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:320px){.fg-masonry.fg-col2 .fg-item,.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:100%}.fg-masonry.fg-col2 .fg-column-width,.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:100%}.fg-masonry.fg-col2 .fg-gutter-width,.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-none .fg-item,.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width,.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item,.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width,.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:0}}.foogallery.fg-border-thin .fg-column-width{border-width:4px}.foogallery.fg-border-medium .fg-column-width{border-width:10px}.foogallery.fg-border-thick .fg-column-width{border-width:16px}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-masonry.fg-captions-bottom.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-masonry.fg-captions-bottom.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner{display:block;position:relative;max-height:none;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption,.fg-masonry.fg-captions-bottom.fg-light .fg-caption{color:#828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a:hover,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{color:#222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{color:#fff}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-masonry.fg-captions-bottom .fg-caption{border-width:10px}.fg-masonry.fg-captions-bottom .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-masonry.fg-captions-bottom.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-masonry.fg-captions-bottom.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-masonry.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-masonry.fg-transparent .fg-caption{color:#7f7f7f}.fg-masonry.fg-transparent.fg-captions-bottom .fg-caption{border-width:0;border-top-width:10px;border-bottom-width:10px}.fg-masonry.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-masonry.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-transparent .fg-caption-title,.fg-masonry.fg-transparent .fg-caption-title a{color:#333}.fg-masonry.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-masonry.fg-transparent.fg-round-full .fg-item,.fg-masonry.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-masonry.fg-transparent.fg-round-full .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-full .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-masonry.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.fg-justified{box-sizing:border-box;position:relative;text-align:center}.foogallery.fg-justified .fg-item{box-sizing:border-box;display:inline-block;margin:0;padding:0}.foogallery.fg-justified .fg-image,.foogallery.fg-justified .fg-item-inner,.foogallery.fg-justified .fg-thumb{box-sizing:border-box;display:block;margin:0;padding:0}.fg-justified .fg-item{visibility:visible;position:relative}.fg-justified .fg-item-inner{position:relative;width:100%;height:100%}.fg-justified .fg-thumb{position:relative;overflow:hidden}.fg-justified .fg-image{z-index:1}.fg-justified .fg-item.fg-positioned .fg-image-wrap,.fg-justified .fg-item.fg-positioned .fg-thumb{width:100%;height:100%}.fg-justified .fg-item.fg-positioned .fg-image{width:100%!important;height:auto!important;min-height:100%}.fg-simple_portfolio{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;align-content:center}.fg-simple_portfolio .fg-item{position:relative;flex-grow:0;flex-shrink:0;flex-basis:auto;margin:10px;max-width:100%}.fg-simple_portfolio .fg-item-inner{display:flex;flex-direction:column;margin:0;height:100%}.fg-simple_portfolio.fg-captions-top .fg-item-inner{flex-direction:column-reverse}.fg-simple_portfolio .fg-image{height:auto;width:100%}.fg-simple_portfolio .fg-thumb{min-width:auto;min-height:auto}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:100%;height:100%;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-simple_portfolio.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-simple_portfolio.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-simple_portfolio.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-simple_portfolio.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-simple_portfolio .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner{display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-simple_portfolio.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-simple_portfolio.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-simple_portfolio .fg-caption-title{white-space:normal;height:auto}.fg-simple_portfolio.fg-dark .fg-caption,.fg-simple_portfolio.fg-light .fg-caption{color:#828282}.fg-simple_portfolio.fg-dark .fg-caption a,.fg-simple_portfolio.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-simple_portfolio.fg-dark .fg-caption a:hover,.fg-simple_portfolio.fg-light .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-light .fg-caption-title,.fg-simple_portfolio.fg-light .fg-caption-title a{color:#222}.fg-simple_portfolio.fg-dark .fg-caption-title,.fg-simple_portfolio.fg-dark .fg-caption-title a{color:#fff}.fg-simple_portfolio.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-simple_portfolio.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-simple_portfolio .fg-caption{border-width:0}.fg-simple_portfolio .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-simple_portfolio.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-simple_portfolio.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.fg-simple_portfolio.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.fg-simple_portfolio.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.fg-simple_portfolio.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-simple_portfolio.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-simple_portfolio.fg-transparent .fg-caption{color:#7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-transparent .fg-caption-title,.fg-simple_portfolio.fg-transparent .fg-caption-title a{color:#333}.fg-simple_portfolio.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.foogallery.fg-preset.fg-polaroid .fg-item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .35s,background-color .65s}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n+1){-webkit-transform:rotate(3deg);transform:rotate(3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n){-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(3n){-webkit-transform:rotate(1deg);transform:rotate(1deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(5n){-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.foogallery.fg-preset.fg-polaroid .fg-item:hover{-webkit-transform:rotate(0);transform:rotate(0)}.foogallery.fg-preset.fg-polaroid .fg-caption{position:relative;width:auto;font-family:"Segoe Print Regular",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.foogallery.fg-preset.fg-polaroid .fg-caption-inner,.foogallery.fg-preset.fg-polaroid .fg-caption-title{position:relative;width:auto}.foogallery.fg-preset.fg-polaroid .fg-caption-title{text-align:center}.foogallery.fg-preset.fg-polaroid .fg-caption-desc{display:none}.foogallery.fg-light.fg-preset.fg-polaroid .fg-caption-title,.foogallery.fg-preset.fg-polaroid .fg-caption-title{color:#333}.foogallery.fg-dark.fg-preset.fg-polaroid .fg-caption-title{color:#fff}.foogallery.fg-preset.fg-polaroid .fg-caption{border-style:solid;border-color:transparent;border-width:10px}.foogallery.fg-preset.fg-polaroid .fg-caption-title+.fg-caption-desc{margin-top:4px}.foogallery.fg-preset.fg-polaroid.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.foogallery.fg-preset.fg-polaroid.fg-border-medium .fg-caption{border-width:10px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption{border-width:16px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-image-viewer{display:block;font-family:'Open Sans','Helvetica Neue',Arial,sans-serif}.fg-image-viewer.fg-left{text-align:left}.fg-image-viewer.fg-center{text-align:center}.fg-image-viewer.fg-right{text-align:right}.fiv-inner{position:relative;display:inline-block;max-width:100%;overflow:hidden;z-index:6}.fiv-inner .fiv-inner-container{position:relative;overflow:hidden;max-width:100%;border-style:solid;border-width:0;border-bottom-width:4px;z-index:5}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:active,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:hover,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:visited{position:relative;display:block;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item{position:absolute;visibility:visible;opacity:1;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item:first-of-type{position:relative}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb img{display:block;max-width:100%;height:auto;border:none;outline:0;text-decoration:none}.fg-image-viewer .fiv-inner .fiv-ctrls{display:block;text-align:center;font-size:14px;border-style:solid;line-height:34px}.fg-image-viewer .fiv-inner .fiv-ctrls:after{content:'';display:block;clear:both}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count{display:inline-block;font-weight:400;margin:0}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;min-width:80px;position:relative;overflow:hidden;transition:background-color .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{display:block;position:absolute;font-size:24px;line-height:30px;top:0;left:0;width:100%;transform:translateY(0);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover:before{transform:translateY(-100%)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev span{display:block;width:100%;transform:translateY(100%);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover span{transform:translateY(0)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:left}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2190'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:right}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2192'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span{margin:0 4px}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:right}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2192'}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:left}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2190'}.foogallery.fg-image-viewer.fg-caption-always .fg-item-inner .fg-caption{padding:0;border:none}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-desc{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title+.fg-caption-desc{padding:0 10px 10px 10px}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-light .fiv-inner .fiv-inner-container{background-color:#fff;color:#333;border-color:#fff}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#f2f2f2}.fg-image-viewer.fg-light .fiv-next,.fg-image-viewer.fg-light .fiv-prev{box-shadow:inset 0 0 0 1px #ddd}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-dark .fiv-inner .fiv-inner-container{background-color:#333;color:#fff;border-color:#333}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#444}.fg-image-viewer.fg-dark .fiv-next,.fg-image-viewer.fg-dark .fiv-prev{box-shadow:inset 0 0 0 1px #222}.foogallery.fg-image-viewer.fg-border-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin .fg-item-inner{border-width:0}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-inner-container{border-width:4px}.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-inner-container{border-width:10px}.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-inner-container{border-width:16px}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-ctrls{border-top-width:1px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-round-small .fiv-inner{border-radius:5px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-round-medium .fiv-inner{border-radius:10px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-round-large .fiv-inner{border-radius:15px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-full .fiv-inner,.foogallery.fg-image-viewer.fg-round-full .fiv-next,.foogallery.fg-image-viewer.fg-round-full .fiv-prev{border-radius:50%}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fg-item-inner{box-shadow:none}.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fiv-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fiv-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fiv-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-thumbnail,.foogallery.fg-thumbnail.fg-center{text-align:center}.foogallery.fg-thumbnail.fg-left{text-align:left}.foogallery.fg-thumbnail.fg-right{text-align:right}.foogallery.fg-thumbnail.fg-float-left{float:left;width:auto}.foogallery.fg-thumbnail.fg-float-right{float:right;width:auto}.foogallery.fg-thumbnail .fg-item{display:inline-block;vertical-align:top;max-width:100%}.foogallery.fg-thumbnail .fg-image{max-width:100%}.foogallery.fg-thumbnail .fg-st-hidden{display:none}.foogallery-stack-album{text-align:center;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3}.foogallery-stack-album,.foogallery-stack-album *{box-sizing:border-box}.foogallery-stack-album.fg-align-left{text-align:left}.foogallery-stack-album.fg-align-center{text-align:center}.foogallery-stack-album.fg-align-right{text-align:right}.foogallery-stack-album.fg-disable-transitions,.foogallery-stack-album.fg-disable-transitions *{transition:none!important}.fg-header{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative;padding:0;margin:0;border-top:solid 1px #aaa;border-bottom:solid 1px #aaa}.fg-header-title{display:block;margin:0;padding:0 20px;width:100%;text-align:left}.fg-header-active{display:block;margin:0;padding:0 20px;visibility:hidden;opacity:0;width:100%;text-align:right;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-header-back{display:block;padding:0;margin:5px;visibility:hidden;opacity:0;min-width:40px;width:40px;height:40px;border-radius:50%;text-align:center;line-height:38px;color:#999;background:#ddd;background:rgba(200,200,200,.5);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-has-active .fg-header-active,.fg-has-active .fg-header-back{visibility:visible;opacity:1}.fg-piles{display:inline-block;position:relative;transition-property:width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile{display:block;position:absolute;top:0;left:0;list-style:none;padding:0;margin:0;visibility:visible;opacity:1;transition-property:opacity,visibility,top,left,width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile.fg-hidden{visibility:hidden;opacity:0}.fg-pile-item{display:block;position:absolute;top:25px;left:25px;visibility:visible;opacity:1;cursor:pointer;border:10px solid #fff;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition-property:opacity,visibility,top,left,transform;transition-duration:.3s;transition-timing-function:ease-in-out;z-index:1;transform:rotate(0)}.fg-expanded .fg-pile-item{z-index:2;transform:rotate(0)!important}.fg-pile-item.fg-has-cover{z-index:10;transform:rotate(0)!important}.fg-pile-item:nth-child(2){z-index:9}.fg-pile-item:nth-child(3){z-index:8}.fg-pile-item:nth-child(4){z-index:7}.fg-pile-item:nth-child(1n+5){visibility:hidden;opacity:0}.fg-expanded .fg-pile-item:nth-child(1n+4){visibility:visible;opacity:1}.fg-pile-item-thumb{display:block}.fg-pile-item-image{display:block}.fg-pile-item-caption{display:flex;justify-content:center;flex-direction:column;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;margin:0;padding:10px;background-color:rgba(68,68,68,.5);color:#fff;text-align:center;visibility:hidden;opacity:0;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile-item-title{display:block;width:100%;padding:0 0 10px}.fg-pile-item-desc{display:block;width:100%;max-height:100%;border-top:solid 1px currentColor;padding:10px 0 0;overflow:hidden}.fg-pile-item-thumb:hover .fg-pile-item-caption{visibility:visible;opacity:1}.fg-pile-cover{display:flex;justify-content:left;align-items:center;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;visibility:visible;opacity:1;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-expanded .fg-pile-cover{visibility:hidden;opacity:0;pointer-events:none}.fg-pile-cover-content{display:flex;position:relative;background:#fff;color:#333;width:75%;font-weight:700;box-shadow:1px 1px 1px rgba(0,0,0,.1),5px 0 5px -3px rgba(0,0,0,.4),inset 0 0 5px rgba(0,0,0,.04)}.fg-pile-cover-title{text-align:center;padding:10px;width:100%}.fg-pile-cover-count{color:#aaa;padding:10px 5px;background:#f7f7f7;height:100%}:root{--fg-carousel-perspective:150px;--fg-carousel-navigation-size:48px;--fg-carousel-pagination-size:14px;--fg-carousel-progress-size:4px;--fg-carousel-navigation-opacity:0.3;--fg-carousel-transition-speed:650ms;--fg-carousel-ui-speed:300ms}.foogallery.fg-carousel{--fg-carousel-inverse-perspective:calc( -1 * var(--fg-carousel-perspective) );position:relative;overflow:hidden;display:grid;grid-template-columns:var(--fg-carousel-navigation-size) auto var(--fg-carousel-navigation-size);grid-template-rows:auto auto;grid-template-areas:"prev inner next" "bottom bottom bottom"}.fg-carousel-inner{position:relative;grid-area:inner;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;grid-template-areas:"left center right";padding:10px 0;perspective:var(--fg-carousel-perspective);transform:translate3d(0,0,0);transform-style:preserve-3d;backface-visibility:hidden;will-change:contents}.foogallery_preview_container .fg-carousel-inner{transform-style:unset}.fg-carousel-center{position:relative;z-index:-1;pointer-events:none;visibility:hidden}.fg-carousel-center{grid-area:center}.fg-carousel-progress{display:block;position:absolute;visibility:visible;bottom:0;left:0;width:0;height:var(--fg-carousel-progress-size);border-radius:calc(var(--fg-carousel-progress-size)/ 2);transition:width .1s linear;opacity:var(--fg-carousel-navigation-opacity)}.rtl .fg-carousel-progress{left:auto;right:0}.fg-carousel-bottom{display:flex;align-items:center;justify-content:center;position:relative;grid-area:bottom;font-size:var(--fg-carousel-pagination-size);padding:0;margin-bottom:10px}.fg-carousel-bullet{width:1em;height:1em;display:block;padding:0;margin:.3em;border-radius:50%;border:solid 1px transparent;background:0 0;box-shadow:none;outline:0;opacity:var(--fg-carousel-navigation-opacity);cursor:pointer;font-size:inherit;transition:opacity var(--fg-carousel-ui-speed) ease-in}@media only screen and (max-width:782px){.fg-carousel-bullet{width:1.25em;height:1.25em}}.fg-carousel-bullet:hover{background:0 0;box-shadow:none;outline:0;opacity:1}.fg-carousel-bullet.fg-bullet-active{opacity:1}button.fg-carousel-next,button.fg-carousel-prev{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center;font-size:var(--fg-carousel-navigation-size);background:0 0;border:none;box-shadow:none;outline:0;z-index:11;cursor:pointer;opacity:var(--fg-carousel-navigation-opacity);transition:opacity var(--fg-carousel-ui-speed) ease-in;padding:0;margin:0}button.fg-carousel-next:hover,button.fg-carousel-prev:hover{background:0 0;border:none;box-shadow:none;outline:0;opacity:1}.fg-carousel-next .fg-icon,.fg-carousel-prev .fg-icon{width:1em;height:1em}.rtl .fg-carousel-next .fg-icon,.rtl .fg-carousel-prev .fg-icon{transform:rotate(180deg)}.fg-carousel-prev{grid-area:prev}.fg-carousel-next{grid-area:next}.foogallery.fg-carousel .fg-item{display:block;opacity:0;visibility:hidden;grid-area:center;transform-origin:center center;transform:translate3d(0,200%,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:0s;transition-property:background-color,transform,transform-origin,opacity,visibility;backface-visibility:hidden}.foogallery.fg-carousel .fg-item.fg-loaded{transform:translate3d(0,0,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:calc( var(--fg-carousel-transition-speed) / 2 );transition-property:background-color,transform,transform-origin,opacity,visibility}.foogallery.fg-carousel .fg-item.fg-item-active,.foogallery.fg-carousel .fg-item.fg-item-next,.foogallery.fg-carousel .fg-item.fg-item-prev{opacity:1;visibility:visible}.foogallery.fg-carousel .fg-item.fg-item-active{transform:translate3d(0,0,0)}.foogallery.fg-carousel.fg-dark .fg-carousel-progress,.foogallery.fg-carousel.fg-light.fg-inverted .fg-carousel-progress{background-color:#fff;box-shadow:inset 0 0 0 1px #9d9d9d}.foogallery.fg-carousel.fg-dark button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-bullet{background-color:#fff;border-color:#ccc}.foogallery.fg-carousel.fg-dark button.fg-carousel-next,.foogallery.fg-carousel.fg-dark button.fg-carousel-prev,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-prev{color:#fff;background-color:transparent}.foogallery.fg-carousel.fg-dark.fg-inverted .fg-carousel-progress,.foogallery.fg-carousel.fg-light .fg-carousel-progress{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light button.fg-carousel-bullet{background-color:#444;border-color:#333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-prev,.foogallery.fg-carousel.fg-light button.fg-carousel-next,.foogallery.fg-carousel.fg-light button.fg-carousel-prev{color:#444;background-color:transparent}
extensions/default-templates/shared/js/foogallery.js CHANGED
@@ -11781,6 +11781,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
11781
  self.cache = new Map();
11782
  self.timeouts = new _utils.Timeouts();
11783
  self.interacted = false;
 
11784
  self._firstLayout = true;
11785
  },
11786
 
@@ -11850,6 +11851,8 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
11850
 
11851
  init: function(){
11852
  const self = this;
 
 
11853
  self.elem = {
11854
  inner: self.el.querySelector( self.sel.inner ),
11855
  center: self.el.querySelector( self.sel.center ),
@@ -12183,7 +12186,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12183
  const values = layout.side[i];
12184
  const item = side === "left" ? self.getPrev( place ) : self.getNext( place );
12185
  if ( item instanceof _.Item ){
12186
- let transform = "translate3d(" + ( side === "left" ? "-" : "" ) + values.x + "px, 0,-" + values.z + "px)";
12187
  item.el.classList.add( cls );
12188
  if ( !item.isLoaded ){
12189
  item.el.style.setProperty("transition-duration", "0ms" );
@@ -12240,7 +12243,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12240
  "after-filter-change": self.onAfterFilterChange,
12241
  "layout": self.onLayout
12242
  }, self);
12243
- if ( self.lightbox instanceof _.Panel ){
12244
  self.lightbox.on({
12245
  "open": self.onLightboxOpen,
12246
  "closed": self.onLightboxClosed,
11781
  self.cache = new Map();
11782
  self.timeouts = new _utils.Timeouts();
11783
  self.interacted = false;
11784
+ self.isRTL = false;
11785
  self._firstLayout = true;
11786
  },
11787
 
11851
 
11852
  init: function(){
11853
  const self = this;
11854
+ self.isRTL = window.getComputedStyle(self.el).direction === "rtl";
11855
+
11856
  self.elem = {
11857
  inner: self.el.querySelector( self.sel.inner ),
11858
  center: self.el.querySelector( self.sel.center ),
12186
  const values = layout.side[i];
12187
  const item = side === "left" ? self.getPrev( place ) : self.getNext( place );
12188
  if ( item instanceof _.Item ){
12189
+ let transform = "translate3d(" + ( ( side === "left" && !self.isRTL ) || ( side === "right" && self.isRTL ) ? "-" : "" ) + values.x + "px, 0,-" + values.z + "px)";
12190
  item.el.classList.add( cls );
12191
  if ( !item.isLoaded ){
12192
  item.el.style.setProperty("transition-duration", "0ms" );
12243
  "after-filter-change": self.onAfterFilterChange,
12244
  "layout": self.onLayout
12245
  }, self);
12246
+ if ( !!_.Panel && self.lightbox instanceof _.Panel ){
12247
  self.lightbox.on({
12248
  "open": self.onLightboxOpen,
12249
  "closed": self.onLightboxClosed,
extensions/default-templates/shared/js/foogallery.min.js CHANGED
@@ -1,8 +1,8 @@
1
  /*
2
  * FooGallery - The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
3
- * @version 2.0.30
4
  * @link
5
  * @copyright Steven Usher & Brad Vincent 2015
6
  * @license Released under the GPLv3 license.
7
  */
8
- function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){"use strict";var h,t;function l(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||r(),this.isIntersecting=!!e.intersectionRect;var e=this.boundingClientRect,e=e.width*e.height,t=this.intersectionRect,t=t.width*t.height;this.intersectionRatio=e?Number((t/e).toFixed(4)):this.isIntersecting?1:0}function e(e,t){var n,i,r,t=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(t.root&&1!=t.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,r=null,function(){r=r||setTimeout(function(){n(),r=null},i)}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(t.rootMargin),this.thresholds=this._initThresholds(t.threshold),this.root=t.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function n(e,t,n,i){"function"==typeof e.addEventListener?e.addEventListener(t,n,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function p(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?t.width&&t.height?t:{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}:r()}function r(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function o(e,t){for(var n=t;n;){if(n==e)return!0;n=d(n)}return!1}function d(e){e=e.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}"object"==typeof window&&("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}}):(h=window.document,t=[],e.prototype.THROTTLE_TIMEOUT=100,e.prototype.POLL_INTERVAL=null,e.prototype.USE_MUTATION_OBSERVER=!0,e.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},e.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},e.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},e.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},e.prototype._initThresholds=function(e){e=e||[0];return(e=!Array.isArray(e)?[e]:e).sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},e.prototype._parseRootMargin=function(e){e=(e||"0px").split(/\s+/).map(function(e){e=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},e.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(window,"resize",this._checkForIntersections,!0),n(h,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(h,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},e.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(h,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},e.prototype._checkForIntersections=function(){var s=this._rootIsInDom(),a=s?this._getRootRect():r();this._observationTargets.forEach(function(e){var t=e.element,n=p(t),i=this._rootContainsTarget(t),r=e.entry,o=s&&i&&this._computeTargetAndRootIntersection(t,a),e=e.entry=new l({time:window.performance&&performance.now&&performance.now(),target:t,boundingClientRect:n,rootBounds:a,intersectionRect:o});r?s&&i?this._hasCrossedThreshold(r,e)&&this._queuedEntries.push(e):r&&r.isIntersecting&&this._queuedEntries.push(e):this._queuedEntries.push(e)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},e.prototype._computeTargetAndRootIntersection=function(e,u){if("none"!=window.getComputedStyle(e).display){for(var t,n,i,r,o=p(e),s=d(e),a=!1;!a;){var l=null,c=1==s.nodeType?window.getComputedStyle(s):{};if("none"==c.display)return;if(s==this.root||s==h?(a=!0,l=u):s!=h.body&&s!=h.documentElement&&"visible"!=c.overflow&&(l=p(s)),l&&(c=l,l=o,r=i=n=t=void 0,t=Math.max(c.top,l.top),n=Math.min(c.bottom,l.bottom),i=Math.max(c.left,l.left),c=Math.min(c.right,l.right),r=n-t,!(o=0<=(l=c-i)&&0<=r&&{top:t,bottom:n,left:i,right:c,width:l,height:r})))break;s=d(s)}return o}},e.prototype._getRootRect=function(){var e,t;return t=this.root?p(this.root):(t=h.documentElement,e=h.body,{top:0,left:0,right:t.clientWidth||e.clientWidth,width:t.clientWidth||e.clientWidth,bottom:t.clientHeight||e.clientHeight,height:t.clientHeight||e.clientHeight}),this._expandRectByRootMargin(t)},e.prototype._expandRectByRootMargin=function(n){var e=this._rootMarginValues.map(function(e,t){return"px"==e.unit?e.value:e.value*(t%2?n.width:n.height)/100}),e={top:n.top-e[0],right:n.right+e[1],bottom:n.bottom+e[2],left:n.left-e[3]};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},e.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!=o<i)return!0}},e.prototype._rootIsInDom=function(){return!this.root||o(h,this.root)},e.prototype._rootContainsTarget=function(e){return o(this.root||h,e)},e.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},e.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=e,window.IntersectionObserverEntry=l))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";var a="undefined"!=typeof Map?Map:(Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){e=i(this.__entries__,e),e=this.__entries__[e];return e&&e[1]},e.prototype.set=function(e,t){var n=i(this.__entries__,e);~n?this.__entries__[n][1]=t:this.__entries__.push([e,t])},e.prototype.delete=function(e){var t=this.__entries__,e=i(t,e);~e&&t.splice(e,1)},e.prototype.has=function(e){return!!~i(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},e);function i(e,n){var i=-1;return e.some(function(e,t){return e[0]===n&&(i=t,!0)}),i}function e(){this.__entries__=[]}var n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,t="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(t):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},p=2;var d=["top","right","bottom","left","width","height","size","weight"],f="undefined"!=typeof MutationObserver,g=(r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,e=t.indexOf(e);~e&&t.splice(e,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),0<e.length},r.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),f?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var e=e.propertyName,t=void 0===e?"":e;d.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r);function r(){function e(){o&&(o=!1,i()),s&&n()}function t(){l(e)}function n(){var e=Date.now();if(o){if(e-a<p)return;s=!0}else s=!(o=!0),setTimeout(t,r);a=e}var i,r,o,s,a;this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(i=this.refresh.bind(this),s=o=!(r=20),a=0,n)}var m=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||t},v=h(0,0,0,0);function u(e){return parseFloat(e)||0}function y(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(e,t){return e+u(n["border-"+t+"-width"])},0)}function b(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return v;var i=c(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=e["padding-"+r];t[r]=u(o)}return t}(i),o=r.left+r.right,s=r.top+r.bottom,a=u(i.width),l=u(i.height);return"border-box"===i.boxSizing&&(Math.round(a+o)!==t&&(a-=y(i,"left","right")+o),Math.round(l+s)!==n&&(l-=y(i,"top","bottom")+s)),e!==c(e).document.documentElement&&(i=Math.round(a+o)-t,e=Math.round(l+s)-n,1!==Math.abs(i)&&(a-=i),1!==Math.abs(e)&&(l-=e)),h(r.left,r.top,a,l)}var _="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function w(e){return n?_(e)?h(0,0,(t=(t=e).getBBox()).width,t.height):b(e):v;var t}function h(e,t,n,i){return{x:e,y:t,width:n,height:i}}o.prototype.isActive=function(){var e=w(this.target);return(this.contentRect_=e).width!==this.broadcastWidth||e.height!==this.broadcastHeight},o.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var x=o;function o(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=h(0,0,0,0),this.target=e}var C=function(e,t){n=(t=t).x,i=t.y,o=t.width,t=t.height,r="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(r.prototype),m(r,{x:n,y:i,width:o,height:t,top:i,right:n+o,bottom:t+i,left:n});var n,i,r,o=r;m(this,{target:e,contentRect:o})},E=(s.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},s.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},s.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},s.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},s.prototype.broadcastActive=function(){var e,t;this.hasActive()&&(e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new C(e.target,e.broadcastRect())}),this.callback_.call(e,t,e),this.clearActive())},s.prototype.clearActive=function(){this.activeObservations_.splice(0)},s.prototype.hasActive=function(){return 0<this.activeObservations_.length},s);function s(e,t,n){if(this.activeObservations_=[],this.observations_=new a,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}var $=new("undefined"!=typeof WeakMap?WeakMap:a),F=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=g.getInstance(),t=new E(t,n,this);$.set(this,t)};return["observe","unobserve","disconnect"].forEach(function(t){F.prototype[t]=function(){var e;return(e=$.get(this))[t].apply(e,arguments)}}),void 0!==t.ResizeObserver?t.ResizeObserver:F}),function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){return}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,n){"1.0.0"===n.version&&(n.is={},n.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},n.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},n.is.empty=function(e){if(n.is.undef(e)||null===e)return!0;if(n.is.number(e)&&0===e)return!0;if(n.is.boolean(e)&&!1===e)return!0;if(n.is.string(e)&&0===e.length)return!0;if(n.is.array(e)&&0===e.length)return!0;if(n.is.jq(e)&&0===e.length)return!0;if(n.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},n.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},n.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},n.is.hash=function(e){return n.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},n.is.jq=function(e){return!n.is.undef(t)&&e instanceof t},n.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},n.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!n.is.undef(e)&&null!==e},n.is.promise=function(e){return n.is.object(e)&&n.is.fn(e.then)&&n.is.fn(e.promise)},n.is.size=function(e){return!!(n.is.string(e)&&!n.is.empty(e)||n.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},n.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},n.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,n){var i,r,o,s;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(n)&&(i=e[t],r=u.fn(i)&&c.fn.CONTAINS_SUPER.test(a.call(n)),e[t]=r?(o=i,s=n,function(){var e=this._super,t=(this._super=o,s.apply(this,arguments));return this._super=e,t}):n)},c.fn.expose=function(t,n,e,i){u.object(t)&&u.object(n)&&u.array(e)&&(i=u.undef(i)?t:i,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(n[e]=t[e].bind(i))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(n,i){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){n.apply(e,t)},i)}},c.fn.throttle=function(n,i){var r,o;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(o),o=setTimeout(function(){Date.now()-r>=i&&(n.apply(e,t),r=Date.now())},i-(Date.now()-r))):(n.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.reject.apply(n,i).promise()},c.fn.resolve=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.resolve.apply(n,i).promise()},c.fn.rejectWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.resolveWith(e,r).promise()},c.fn.all=function(t){var n=l.Deferred(),i=[];if(u.array(t)&&0<t.length){function r(e,t){s||(i[e]=0===t.length?void 0:1===t.length?t[0]:t,--o||n.resolve(i))}for(var o=t.length,s=!1,a=0,e=t.length;a<e&&"break"!==function(){if(s)return"break";var e=a;u.promise(t[e])?t[e].then(function(){r(e,c.fn.arg2arr(arguments))},function(){s||(s=!0,n.reject.apply(n,c.fn.arg2arr(arguments)))}):r(e,[t[e]])}();a++);}else n.resolve(i);return n.promise()},c.fn.allSettled=function(t){var i=l.Deferred(),r=[];if(u.array(t)&&0<t.length){function n(e,t,n){r[e]={status:t},0<n.length&&(r[e]["rejected"===t?"reason":"value"]=1===n.length?n[0]:n),--o||i.resolve(r)}for(var o=t.length,s=0,e=t.length;s<e;s++)!function(){var e=s;u.promise(t[e])?t[e].then(function(){n(e,"fulfilled",c.fn.arg2arr(arguments))},function(){n(e,"rejected",c.fn.arg2arr(arguments))}):n(e,"fulfilled",[t[e]])}()}else i.resolve(r);return i.promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(e,o){var r;"1.0.0"===e.version&&(e.url={},r=document.createElement("a"),e.url.parts=function(e){r.href=e;var e=r.port||(-1!==["http:","https:"].indexOf(r.protocol)?"https:"===r.protocol?"443":"80":""),t=r.hostname+(e?":"+e:""),n=r.origin||r.protocol+"//"+t,i="/"===r.pathname.slice(0,1)?r.pathname:"/"+r.pathname;return{hash:r.hash,host:t,hostname:r.hostname,href:r.href,origin:n,pathname:i,port:e,protocol:r.protocol,search:r.search}},e.url.full=function(e){return!o.string(e)||o.empty(e)?null:(r.href=e,r.href)},e.url.param=function(e,t,n){return o.string(e)&&o.string(t)&&!o.empty(t)?o.undef(n)?(r=((i=new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)")).exec(e)||["",""])[1].replace(/\+/g,"%20"),o.string(r)&&!o.empty(r)?decodeURIComponent(r):null):(o.empty(n)?(i=new RegExp("^([^#]*?)(([^#]*)&)?"+t+"(=[^&#]*)?(&|#|$)"),r=e.replace(i,"$1$3$5").replace(/^([^#]*)((\?)&|\?(#|$))/,"$1$3$4")):(i=new RegExp("([?&])"+t+"[^&]*"),t=t+"="+encodeURIComponent(n),(r=e.replace(i,"$1"+t))!==e||i.test(r)||(r+=(-1!==r.indexOf("?")?"&":"?")+t)),r):e;var i,r})}(FooGallery.utils,FooGallery.utils.is),function(a,l,c){"1.0.0"===a.version&&(a.str={},a.str.trim=function(e){return l.string(e)?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):null},a.str.camel=function(e){return l.string(e)?e.toUpperCase()===e?e.toLowerCase():e.replace(/^([A-Z])|[-\s_]+(\w)/g,function(e,t,n){return l.string(n)?n.toUpperCase():t.toLowerCase()}):e},a.str.kebab=function(e){return l.string(e)?e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g).filter(Boolean).map(function(e){return e.toLowerCase()}).join("-"):e},a.str.contains=function(e,t,n){return!(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t))&&(t.length<=e.length&&-1!==(n?e.toUpperCase().indexOf(t.toUpperCase()):e.indexOf(t)))},a.str.containsWord=function(e,t,n){if(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t)||e.length<t.length)return!1;for(var i=e.split(/\W/),r=0,o=i.length;r<o;r++)if(n?i[r].toUpperCase()===t.toUpperCase():i[r]===t)return!0;return!1},a.str.endsWith=function(e,t){return!(!l.string(e)||!l.string(t)||t.length>e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,n=0,i=e.length;n<i;n++)t=(t^=e.charCodeAt(n))+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24));return t>>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,n){if(!l.string(e)||!l.string(t))return null;var i=c.arg2arr(arguments);e=i.shift();for(var r=i.shift(),o=0,s=i.length;o<s;o++)t=i[o],l.empty(t)||(a.str.endsWith(r,e)&&(r=r.slice(0,r.length-e.length)),r+=e+(t=a.str.startsWith(t,e)?t.slice(e.length):t));return r},a.str.until=function(e,t){return a.str.contains(e,t)?e.substring(0,e.indexOf(t)):e},a.str.format=function(n,e,t){var i=c.arg2arr(arguments);return n=i.shift(),l.string(n)&&0<i.length&&(1===i.length&&(l.array(i[0])||l.object(i[0]))&&(i=i[0]),a.each(i,function(e,t){n=n.replace(new RegExp("\\{"+t+"\\}","gi"),e+"")})),n})}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(a,l,r,o){"1.0.0"===a.version&&(a.obj={},a.obj.create=function(e){if(!l.object(e))throw TypeError("Argument must be an object");function t(){}return t.prototype=e,new t},a.obj.extend=function(t,e,n){t=l.object(t)?t:{};var i=r.arg2arr(arguments);return i.shift(),a.each(i,function(e){a.obj.merge(t,e)}),t},a.obj.merge=function(e,t){for(var n in e=l.hash(e)?e:{},t=l.hash(t)?t:{})t.hasOwnProperty(n)&&(l.hash(t[n])?(e[n]=l.hash(e[n])?e[n]:{},a.obj.merge(e[n],t[n])):l.array(t[n])?e[n]=t[n].slice():e[n]=t[n]);return e},a.obj.mergeValid=function(t,n,i,e){if(!l.hash(i)||!l.hash(n))return t;var r,o,s;for(r in n=l.hash(n)?n:{},e=l.hash(e)?e:{},n)n.hasOwnProperty(r)&&l.fn(n[r])&&(o=l.array(e[r])?e[r]:l.string(e[r])?[e[r]]:[r],a.each(o,function(e){if(s=a.obj.prop(i,e),!l.undef(s))return n[r](s)?(a.obj.prop(t,r,s),!1):void 0}));return t},a.obj.prop=function(n,e,i){var t,r;if(l.object(n)&&!l.empty(e))return l.undef(i)?(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){if(t===r)i=n[e];else{if(!l.hash(n[e]))return!1;n=n[e]}})):l.undef(n[e])||(i=n[e]),i):void(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){t===r?n[e]=i:n=l.hash(n[e])?n[e]:n[e]={}})):l.undef(n[e])||(n[e]=i))})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(t,r,s){"1.0.0"===r.version&&(r.ready=function(e){function t(){try{e.call(window,r.$)}catch(e){console.error(e)}}(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)},r.find=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e)){for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o;r++)if(t.call(n,e[i[r]],i[r],e))return e[i[r]]},r.each=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e))for(r=0,o=e.length;r<o&&!1!==t.call(n,e[r],r,e);r++);else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o&&!1!==t.call(n,e[i[r]],i[r],e);r++);},r.inArray=function(e,t){return s.array(t)?t.indexOf(e):-1},r.selectify=function(e){if(s.empty(e))return null;if(s.hash(e)){var t,n,i={};for(n in e)e.hasOwnProperty(n)&&(t=r.selectify(e[n]))&&(i[n]=t);return i}return s.string(e)||s.array(e)?(e=s.string(e)?[e]:e).map(function(e){return s.string(e)?"."+e.split(/\s/g).join("."):null}).join(","):null},r.requestFrame=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)}).bind(window),r.cancelFrame=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window),r.nextFrame=function(e,n){return t.Deferred(function(t){s.fn(e)?(n=s.undef(n)?e:n,r.requestFrame(function(){try{t.resolve(e.call(n))}catch(e){t.reject(e)}})):t.reject(new Error("Provided callback is not a function."))}).promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(r,o,s,a){"1.0.0"===r.version&&(r.Class=function(){},r.Class.extend=function(e){e=o.hash(e)?e:{};var t,n=s.create(this.prototype);for(t in e)e.hasOwnProperty(t)&&a.addOrOverride(n,t,e[t]);function i(){if(!o.fn(this.construct))throw new SyntaxError('FooGallery.utils.Class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)}return n.construct=o.fn(n.construct)?n.construct:function(){},(i.prototype=n).constructor=o.fn(n.__ctor__)?n.__ctor__:i,i.extend=r.Class.extend,i.override=r.Class.override,i.getBaseClasses=r.Class.getBaseClasses,i.__baseClass__=this,i},r.Class.override=function(e,t){a.addOrOverride(this.prototype,e,t)},r.Class.__baseClass__=null,r.Class.getBaseClasses=function(){return function e(t,n){return o.array(n)||(n=[]),o.fn(t)&&null!==t.__baseClass__?(n.unshift(t.__baseClass__),e(t.__baseClass__,n)):n}(this,[])})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.fn),function(e,a,l,r){e.ClassRegistry=e.Class.extend({construct:function(e){this.opt=r.extend({allowBase:!0,beforeCreate:null},e),this.registered={}},register:function(e,t,n,i){var r;return!(!a.string(e)||a.empty(e)||!a.fn(t))&&(i=a.number(i)?i:0,r=this.registered[e],this.registered[e]={name:e,ctor:t,config:a.hash(n)?n:{},priority:a.undef(r)?i:r.priority},!0)},each:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s&&!1!==e.call(n,r[o],o);o++);},find:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s;o++)if(e.call(n,r[o],o))return r[o];return null},create:function(e,t,n){var i=this,r=l.arg2arr(arguments);if(e=r.shift(),a.string(e)&&i.registered.hasOwnProperty(e)){var o=i.registered[e],s=!0;if((s=o.priority<0&&!i.opt.allowBase?!1:s)&&a.fn(o.ctor))return t=r.shift(),t=i.mergeConfigurations(o.name,t),r.unshift.apply(r,[o.name,t]),l.apply(o.ctor,i.onBeforeCreate(o,r))}return null},onBeforeCreate:function(e,t){return null!==this.opt.beforeCreate&&a.fn(this.opt.beforeCreate)?this.opt.beforeCreate.call(this,e,t):t},mergeConfigurations:function(e,t){var n,i;return a.string(e)&&this.registered.hasOwnProperty(e)?(t=a.hash(t)?t:{},n=this.getBaseClasses(e),i=[{}],n.push(this.registered[e]),n.forEach(function(e){i.push(e.config)}),i.push(t),r.extend.apply(r,i)):{}},getBaseClass:function(){return this.find(function(e){return e.priority<0},!0)},getBaseClasses:function(e){var t=this,e=t.registered[e],n=[];return a.undef(e)||e.ctor.getBaseClasses().forEach(function(e){e=t.fromType(e);a.hash(e)&&n.push(e)}),n},fromType:function(t){if(a.fn(t))return this.find(function(e){return e.ctor===t})}})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,s,n){"1.0.0"===o.version&&(o.Event=o.Class.extend({construct:function(e){if(s.empty(e))throw new SyntaxError("FooGallery.utils.Event objects must be supplied a `type`.");e=o.Event.parse(e);this.type=e.type,this.namespace=e.namespace,this.defaultPrevented=!1,this.target=null},preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented}}),o.Event.parse=function(e){e=s.string(e)&&!s.empty(e)?e:null;var t=n.contains(e,".");return{namespaced:t,type:t?n.startsWith(e,".")?null:n.until(e,"."):e,namespace:t?n.from(e,"."):null}},o.EventClass=o.Class.extend({construct:function(){this.events={}},destroy:function(){this.events={}},on:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){s.fn(n[t])&&t.split(" ").forEach(function(e){r.addListener(e,n[t],i)})})):s.string(n)&&s.fn(t)&&n.split(" ").forEach(function(e){r.addListener(e,t,i)}),r},addListener:function(e,t,n){if(!s.string(e)||/\s/.test(e)||!s.fn(t))return!1;var i=this,r=o.Event.parse(e);return n=s.undef(n)?i:n,s.array(i.events[r.type])||(i.events[r.type]=[]),!i.events[r.type].some(function(e){return e.namespace===r.namespace&&e.fn===t&&e.thisArg===n})&&(i.events[r.type].push({namespace:r.namespace,fn:t,thisArg:n}),!0)},off:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){t.split(" ").forEach(function(e){r.removeListener(e,n[t],i)})})):s.string(n)&&n.split(" ").forEach(function(e){r.removeListener(e,t,i)}),r},removeListener:function(e,t,n){if(!s.string(e)||/\s/.test(e))return!1;var i=this,r=o.Event.parse(e),e=[];return n=s.undef(n)?i:n,s.empty(r.type)?s.empty(r.namespace)||e.push.apply(e,Object.keys(i.events)):e.push(r.type),e.forEach(function(e){s.array(i.events[e])&&(i.events[e]=i.events[e].filter(function(e){return null!=t?!(e.namespace===r.namespace&&e.fn===t&&e.thisArg===n):null!=r.namespace&&e.namespace!==r.namespace}),0===i.events[e].length&&delete i.events[e])}),!0},trigger:function(e,t){t=s.array(t)?t:[];var n=this,i=[];return e instanceof o.Event?(i.push(e),n.emit(e,t)):s.string(e)&&e.split(" ").forEach(function(e){e=new o.Event(e);i.push(e),n.emit(e,t)}),s.empty(i)?null:1===i.length?i[0]:i},emit:function(t,n){var e;t instanceof FooGallery.utils.Event&&(e=this,n=s.array(n)?n:[],null===t.target&&(t.target=e),s.array(e.events[t.type])&&e.events[t.type].forEach(function(e){null!=t.namespace&&e.namespace!==t.namespace||e.fn.apply(e.thisArg,[t].concat(n))}),s.array(e.events.__all__)&&e.events.__all__.forEach(function(e){e.fn.apply(e.thisArg,[t].concat(n))}))}}))}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str),function(e,i,t){"1.0.0"===e.version&&(e.Timer=e.EventClass.extend({construct:function(e){var t=this;t._super(),t.interval=i.number(e)?e:1e3,t.isRunning=!1,t.isPaused=!1,t.canResume=!1,t.canRestart=!1,t.__timeout=null,t.__decrement=!1,t.__time=0,t.__remaining=0,t.__current=0,t.__finish=0,t.__restart=[]},__reset:function(){var e=this;clearTimeout(e.__timeout),e.__timeout=null,e.__decrement=!1,e.__time=0,e.__remaining=0,e.__current=0,e.__finish=0,e.isRunning=!1,e.isPaused=!1,e.canResume=!1},__eventArgs:function(e){return[this.__current,this.__time,this.__decrement].concat(t.arg2arr(arguments))},__tick:function(){var e=this;e.trigger("tick",e.__eventArgs()),e.__current===e.__finish?(e.trigger("complete",e.__eventArgs()),e.__reset()):(e.__decrement?e.__current--:e.__current++,e.__remaining--,e.canResume=0<e.__remaining,e.__timeout=setTimeout(function(){e.__tick()},e.interval))},start:function(e,t){var n=this;n.isRunning||(t=!!i.boolean(t)&&t,n.__restart=[e,t],n.__decrement=t,n.__time=e,n.__remaining=e,n.__current=t?e:0,n.__finish=t?0:e,n.canRestart=!0,n.isRunning=!0,n.isPaused=!1,n.trigger("start",n.__eventArgs()),n.__tick())},countdown:function(e){this.start(e,!0)},countup:function(e){this.start(e,!1)},restart:function(){var e=this;e.stop(),e.canRestart&&e.start.apply(e,e.__restart)},stop:function(){var e=this;(e.isRunning||e.isPaused)&&(e.__reset(),e.trigger("stop",e.__eventArgs()))},pause:function(){var e=this;return null!=e.__timeout&&(clearTimeout(e.__timeout),e.__timeout=null),e.isRunning&&(e.isRunning=!1,e.isPaused=!0,e.canResume=0<e.__remaining,e.trigger("pause",e.__eventArgs())),e.__remaining},resume:function(){var e=this;e.canResume&&(e.isRunning=!0,e.isPaused=!1,e.trigger("resume",e.__eventArgs()),e.__tick())},reset:function(){this.__reset(),this.trigger("reset",this.__eventArgs())}}))}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,e,t){"1.0.0"===e.version&&(e.FullscreenAPI=e.EventClass.extend({construct:function(){this._super(),this.apis={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},this.api=this.getAPI(),this.supported=null!=this.api,this.__listen()},destroy:function(){return this.__stopListening(),this._super()},getAPI:function(){for(var e in this.apis)if(this.apis.hasOwnProperty(e)&&this.apis[e].enabled in document)return this.apis[e];return null},element:function(){return this.supported?document[this.api.element]:null},request:function(e){return this.supported&&e[this.api.request]?e[this.api.request]()||o.Deferred(this.__resolver(this.api.request)).promise():t.rejected},exit:function(){return this.supported&&this.element()?document[this.api.exit]()||o.Deferred(this.__resolver(this.api.exit)).promise():t.rejected},toggle:function(e){return this.element()?this.exit():this.request(e)},__listen:function(){var e=this;e.supported&&o(document).on(e.api.events.change+".utils",function(){e.trigger("change")}).on(e.api.events.error+".utils",function(){e.trigger("error")})},__stopListening:function(){this.supported&&o(document).off(this.api.events.change+".utils").off(this.api.events.error+".utils")},__resolver:function(i){var r=this;return function(e){function t(){e.resolve(),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}function n(){e.reject(new TypeError),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}i===r.api.exit&&r.element()?setTimeout(function(){e.reject(new TypeError)},1):o(document).on(r.api.events.change,t).on(r.api.events.error,n)}}}))}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.fn),function(l,c,u,a){"1.0.0"===c.version&&(c.transition={},c.transition.dataName="__foo-transition__",c.transition.disableClassName=null,c.transition.timeout=3e3,c.transition.disable=function(e,t){var n,i,r,e=u.jq(e)?e:l(e);0<e.length&&u.fn(t)&&(n=e.get(0),r=null,(i=u.string(c.transition.disableClassName))?e.addClass(c.transition.disableClassName):(r={value:n.style.getPropertyValue("transition"),priority:n.style.getPropertyPriority("transition")},n.style.setProperty("transition","none","important")),t.call(t,e),e.prop("offsetWidth"),i?e.removeClass(c.transition.disableClassName):(n.style.removeProperty("transition"),u.string(r.value)&&0<r.value.length&&n.style.setProperty("transition",r.value,r.priority)))},c.transition.stop=function(e){var t=l.Deferred(),n=u.jq(e)?e:l(e);return 0<n.length?(e=n.data(c.transition.dataName),u.promise(e)?e.always(function(){c.requestFrame(function(){t.resolve(n)})}).reject(new Error("Transition cancelled.")):t.resolve(n)):t.reject(new Error("Unable to stop transition. Make sure the element exists.")),t.promise()},c.transition.createListener=function(e,t,n){var i=e,r=t,o=n,s=u.string(n);return function(e){var t=e.originalEvent instanceof TransitionEvent?e.originalEvent:e,n=!1;(n=t.target===i?!s||t.propertyName===o:n)&&r.apply(r,a.arg2arr(arguments))}},c.transition.start=function(e,n,i,r){var o,s=l.Deferred(),a=u.jq(e)?e:l(e);return 0<a.length&&u.fn(n)?(o=a.get(0),c.transition.stop(a).always(function(){var t=c.transition.createListener(o,function(){s.resolve(a)},i);a.data(c.transition.dataName,s).on("transitionend.foo-utils",t).prop("offsetWidth"),c.requestFrame(function(){var e=setTimeout(function(){s.reject(new Error("Transition safety timeout triggered."))},u.number(r)?r:c.transition.timeout);s.always(function(){clearTimeout(e),a.removeData(c.transition.dataName).off("transitionend.foo-utils",t)}),n.call(n,a)})})):s.reject(new Error("Unable to perform transition. Make sure the element exists and a trigger function is supplied.")),s.promise()},c.transition.modify=function(e,t,n,i){e=u.jq(e)?e:l(e);return 0<e.length&&u.fn(t)?n?(c.transition.disable(e,t),a.resolve()):c.transition.start(e,t,i):a.reject(new Error("Unable to perform modification. Make sure the element exists and a modify function is supplied."))})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(o,s,e,a,i,t){s.DATA_TEMPLATE="__FooGallery__",s.DATA_ITEM="__FooGalleryItem__",s.get=function(e){return o(e).data(s.DATA_TEMPLATE)},s.init=function(t,n){if(0<(n=a.jq(n)?n:o(n)).length){var e=n.data(s.DATA_TEMPLATE);if(e instanceof s.Template)return e.destroy(!0).then(function(){var e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected})}e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected},o.fn.foogallery=function(i,r){return r=a.fn(r)?r:o.noop,this.each(function(e,t){if(a.string(i)){var n=o.data(t,s.DATA_TEMPLATE);if(n instanceof s.Template)switch(i){case"layout":return void n.layout();case"destroy":return void n.destroy()}}else s.init(i,t).then(r)})},s.isCached=function(e){var t=new Image,e=(t.src=e,t.complete);return t.src="",t=null,e},s.supportedExifProperties=["camera","aperture","created_timestamp","shutter_speed","focal_length","iso","orientation"],a.exif=function(t){var e;return!!a.object(t)&&(0<(e=Object.keys(t)).length&&e.some(function(e){return-1!==s.supportedExifProperties.indexOf(e)&&!a.empty(t[e])}))},t.trimTo=function(e,t,n){return a.string(e)&&a.number(t)&&0<t&&e.length>t?e.substr(0,t)+(a.string(n)?n:"&hellip;"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0].blockSize):(t=e.contentBoxSize.inlineSize,e.contentBoxSize.blockSize):(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},s.supportsWebP=!1;var n=new Image;n.onload=function(){s.supportsWebP=0<n.width&&0<n.height},n.onerror=function(){s.supportsWebP=!1},n.src="data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",s.supportsPicture=!!window.HTMLPictureElement,e.DOMEventListeners=e.Class.extend({construct:function(){this.eventTargets=new Map},add:function(e,t,n,i){e.addEventListener(t,n,i);let r=this.eventTargets.get(e);return r||(r=new Map,this.eventTargets.set(e,r)),!r.get(t)&&(r.set(t,{listener:n,options:i}),!0)},remove:function(e,t){let n=this.eventTargets.get(e);var i;!n||(i=n.get(t))&&(e.removeEventListener(t,i.listener,i.options),n.delete(t),0===n.size&&this.eventTargets.delete(e))},clear:function(){this.eventTargets.forEach(function(e,n){e.forEach(function(e,t){n.removeEventListener(t,e.listener,e.options)})}),this.eventTargets.clear()}}),e.Timeouts=e.Class.extend({construct:function(){this.instances=new Map},has:function(e){return this.instances.has(e)},get:function(e){return this.instances.get(e)},set:function(e,t,n){const i=this;i.delete(e);n={id:setTimeout(function(){i.instances.delete(e),t.call(i)},n),delay:n,fn:t};return this.instances.set(e,n),i},delete:function(e){var t;return!!this.instances.has(e)&&(t=this.instances.get(e),clearTimeout(t.id),this.instances.delete(e))},clear:function(){this.instances.forEach(function(e){clearTimeout(e.id)}),this.instances.clear()}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(o,e,t,a,l){e.Icons=t.Class.extend({construct:function(){this.className="fg-icon",this.registered={default:{close:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.957 3.457l-1.414-1.414-4.543 4.543-4.543-4.543-1.414 1.414 4.543 4.543-4.543 4.543 1.414 1.414 4.543-4.543 4.543 4.543 1.414-1.414-4.543-4.543z"></path></svg>',"arrow-left":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M10.5 16l1.5-1.5-6.5-6.5 6.5-6.5-1.5-1.5-8 8 8 8z"></path></svg>',"arrow-right":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M5.5 0l-1.5 1.5 6.5 6.5-6.5 6.5 1.5 1.5 8-8-8-8z"></path></svg>',maximize:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 2v4h-2v-5c0-0.552 0.448-1 1-1h14c0.552 0 1 0.448 1 1v14c0 0.552-0.448 1-1 1h-14c-0.552 0-1-0.448-1-1v-9h9c0.552 0 1 0.448 1 1v7h4v-12h-12z"/></svg>',expand:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 5h-2v-4c0-0.552 0.448-1 1-1h4v2h-3v3z"></path><path d="M16 5h-2v-3h-3v-2h4c0.552 0 1 0.448 1 1v4z"></path><path d="M15 16h-4v-2h3v-3h2v4c0 0.552-0.448 1-1 1z"></path><path d="M5 16h-4c-0.552 0-1-0.448-1-1v-4h2v3h3v2z"></path></svg>',shrink:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 0h2v4c0 0.552-0.448 1-1 1h-4v-2h3v-3z"></path><path d="M11 0h2v3h3v2h-4c-0.552 0-1-0.448-1-1v-4z"></path><path d="M12 11h4v2h-3v3h-2v-4c0-0.552 0.448-1 1-1z"></path><path d="M0 11h4c0.552 0 1 0.448 1 1v4h-2v-3h-3v-2z"></path></svg>',info:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M7 4.75c0-0.412 0.338-0.75 0.75-0.75h0.5c0.412 0 0.75 0.338 0.75 0.75v0.5c0 0.412-0.338 0.75-0.75 0.75h-0.5c-0.412 0-0.75-0.338-0.75-0.75v-0.5z"></path><path d="M10 12h-4v-1h1v-3h-1v-1h3v4h1z"></path><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path></svg>',comment:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 4h10v1h-10zM3 6h8v1h-8zM3 8h4v1h-4zM14.5 1h-13c-0.825 0-1.5 0.675-1.5 1.5v8c0 0.825 0.675 1.5 1.5 1.5h2.5v4l4.8-4h5.7c0.825 0 1.5-0.675 1.5-1.5v-8c0-0.825-0.675-1.5-1.5-1.5zM14 10h-5.924l-3.076 2.73v-2.73h-3v-7h12v7z"></path></svg>',thumbs:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 3v10h-2v-11c0-0.552 0.448-1 1-1h12c0.552 0 1 0.448 1 1v12c0 0.552-0.448 1-1 1h-12c-0.552 0-1-0.448-1-1v-1h4v-2h-2v-2h2v-2h-2v-2h2v-2h2v10h6v-10h-10z"></path></svg>',cart:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.238 9c0.55 0 1.124-0.433 1.275-0.962l1.451-5.077c0.151-0.529-0.175-0.962-0.725-0.962h-10.238c0-1.105-0.895-2-2-2h-3v2h3v8.5c0 0.828 0.672 1.5 1.5 1.5h9.5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-9v-1h8.238zM5 4h9.044l-0.857 3h-8.187v-3z"></path><path d="M6 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path><path d="M15 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path></svg>',"circle-close":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path><path d="M10.5 4l-2.5 2.5-2.5-2.5-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 2.5-2.5 2.5 2.5 1.5-1.5-2.5-2.5 2.5-2.5z"></path></svg>',"auto-progress":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path class="[ICON_CLASS]-idle" d="M11.39 8c2.152-1.365 3.61-3.988 3.61-7 0-0.339-0.019-0.672-0.054-1h-13.891c-0.036 0.328-0.054 0.661-0.054 1 0 3.012 1.457 5.635 3.609 7-2.152 1.365-3.609 3.988-3.609 7 0 0.339 0.019 0.672 0.054 1h13.891c0.036-0.328 0.054-0.661 0.054-1 0-3.012-1.457-5.635-3.609-7zM2.5 15c0-2.921 1.253-5.397 3.5-6.214v-1.572c-2.247-0.817-3.5-3.294-3.5-6.214v0h11c0 2.921-1.253 5.397-3.5 6.214v1.572c2.247 0.817 3.5 3.294 3.5 6.214h-11zM9.462 10.462c-1.12-0.635-1.181-1.459-1.182-1.959v-1.004c0-0.5 0.059-1.327 1.184-1.963 0.602-0.349 1.122-0.88 1.516-1.537h-6.4c0.395 0.657 0.916 1.188 1.518 1.538 1.12 0.635 1.181 1.459 1.182 1.959v1.004c0 0.5-0.059 1.327-1.184 1.963-1.135 0.659-1.98 1.964-2.236 3.537h7.839c-0.256-1.574-1.102-2.879-2.238-3.538z"/><circle class="[ICON_CLASS]-circle" r="4" cx="8" cy="8"/><path class="[ICON_CLASS]-play" d="M3 2l10 6-10 6z"/><path class="[ICON_CLASS]-pause" d="M2 2h5v12h-5zM9 2h5v12h-5z"/></svg>',search:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M16 13.5l-4.695-4.695c0.444-0.837 0.695-1.792 0.695-2.805 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.013 0 1.968-0.252 2.805-0.695l4.695 4.695 2.5-2.5zM2 6c0-2.209 1.791-4 4-4s4 1.791 4 4-1.791 4-4 4-4-1.791-4-4z"></path></svg>',"exif-aperture":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 0,3.5876443 0,8 c 0,4.412356 3.5876443,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871916 -3.128084,7 -7,7 C 4.1280844,15 1,11.871916 1,8 1,4.1280844 4.1280844,1 8,1 Z M 7.53125,2.0214844 A 6,6 0 0 0 3.1835938,4.4335938 H 8.9257812 Z M 8.6132812,2.03125 C 9.5587451,3.6702105 10.504247,5.3091484 11.451172,6.9472656 L 12.863281,4.5 A 6,6 0 0 0 8.6132812,2.03125 Z M 2.5957031,5.4101562 A 6,6 0 0 0 2,8 6,6 0 0 0 2.5273438,10.439453 L 5.4296875,5.4101562 Z m 10.8261719,0.033203 -2.855469,4.9433598 h 2.935547 A 6,6 0 0 0 14,8 6,6 0 0 0 13.421875,5.4433592 Z M 4.5722656,8.8945312 3.0996094,11.449219 a 6,6 0 0 0 4.40625,2.527343 z m 2.5820313,2.4707028 1.4960937,2.591797 a 6,6 0 0 0 4.3144534,-2.591797 z"></path></svg>',"exif-camera":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 8.0000002,5 a 4,4 0 0 0 -4,4 4,4 0 0 0 4,4 A 4,4 0 0 0 12,9 4,4 0 0 0 8.0000002,5 Z m 0.019531,1.015625 a 3,2.9814477 0 0 1 2.9804688,3 l -1,-0.00586 a 2,2 0 0 0 0,-0.00976 2,2 0 0 0 -1.9863279,-2 z M 5.125,1 C 4.5,1 4,1.5 4,2.125 V 3.0000004 L 1.125,3 C 0.5,2.9999999 0,3.5 0,4.125 v 9.75 C 0,14.5 0.5,15 1.125,15 h 13.75 C 15.5,15 16,14.5 16,13.875 V 4.125 C 16,3.5 15.5,3 14.875,3 H 12 V 2.125 C 12,1.5 11.5,1 10.875,1 Z M 5.25,2.0000004 h 5.5 c 0.125,0 0.25,0.1249996 0.25,0.25 v 1.75 h 3.75 c 0.125,0 0.25,0.1249996 0.25,0.25 V 13.75 C 15,13.875 14.875,14 14.75,14 H 1.25 C 1.125,14 1,13.875 1,13.75 V 4.25 C 1,4.125 1.125,4 1.25,4 l 3.75,4e-7 v -1.75 c 0,-0.1250004 0.125,-0.25 0.25,-0.25 z"></path></svg>',"exif-created-timestamp":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 3,1 V 2 H 1 V 15 H 16 V 2 H 14 V 1 H 13 V 2 H 4 V 1 Z M 2,4 H 15 V 14 H 2 Z M 6,5 V 7 H 8 V 5 Z m 3,0 v 2 h 2 V 5 Z m 3,0 v 2 h 2 V 5 Z M 3,8 v 2 H 5 V 8 Z m 3,0 v 2 H 8 V 8 Z m 3,0 v 2 h 2 V 8 Z m 3,0 v 2 h 2 V 8 Z m -9,3 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z"></path></svg>',"exif-shutter-speed":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 -2.9415707e-8,3.5876443 0,8 c 2.3532563e-7,4.412356 3.5876445,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871915 -3.128085,7 -7,7 -3.8719154,0 -6.9999998,-3.128085 -7,-7 -3e-8,-3.8719156 3.1280844,-7 7,-7 z M 11.646484,3.6464844 8.6445312,6.6484375 A 1.5,1.5 0 0 0 8,6.5 1.5,1.5 0 0 0 6.5,8 1.5,1.5 0 0 0 8,9.5 1.5,1.5 0 0 0 9.5,8 1.5,1.5 0 0 0 9.3515625,7.3554688 L 12.353516,4.3535156 Z M 2,7.5 v 1 h 2 v -1 z M 7.5,12 v 2 h 1 V 12 Z M 12,7.5 v 1 h 2 v -1 z M 7.5,2 v 2 h 1 V 2 Z"></path></svg>',"exif-focal-length":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 1,4.125 -1,0.25 v 7.25 l 1,0.25 z M 5,1 2,4 v 8 l 3,3 h 6.875 C 12.500003,15 13,14.5 13,13.875 V 2.125 C 13,1.4999986 12.5,1 11.875,1 9.576807,0.99914375 7.1414067,0.96597644 5,1 Z M 5.5,2 H 6 V 14 H 5.5 L 3,11.5 v -7 z M 7,2 h 4.75 C 11.875,2 12,2.1249997 12,2.25 v 11.5 c 0,0.125 -0.125,0.250622 -0.25,0.25 H 7 Z m 7,0 c 1,2.2 1.5,4.35 1.5,6 0,1.65 -0.5,3.8 -1.5,6"></path></svg>',"exif-iso":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 7.5,0 V 1.6015625 C 6.0969201,1.7146076 4.8392502,2.256185 3.828125,3.1210938 L 2.6035156,1.8964844 1.8964844,2.6035156 3.1210938,3.828125 C 2.256185,4.8392502 1.7146076,6.0969201 1.6015625,7.5 H 0 v 1 h 1.6015625 c 0.1130451,1.4030799 0.6546225,2.66075 1.5195313,3.671875 l -1.2246094,1.224609 0.7070312,0.707032 1.2246094,-1.22461 C 4.8392502,13.743815 6.0969201,14.285392 7.5,14.398438 V 16 h 1 v -1.601562 c 1.4030799,-0.113046 2.66075,-0.654623 3.671875,-1.519532 l 1.224609,1.22461 0.707032,-0.707032 -1.22461,-1.224609 C 13.743815,11.16075 14.285392,9.9030799 14.398438,8.5 H 16 v -1 H 14.398438 C 14.285392,6.0969201 13.743815,4.8392502 12.878906,3.828125 L 14.103516,2.6035156 13.396484,1.8964844 12.171875,3.1210938 C 11.16075,2.256185 9.9030799,1.7146076 8.5,1.6015625 V 0 Z M 8,2.5 c 3.043488,0 5.5,2.4565116 5.5,5.5 0,3.043488 -2.456512,5.5 -5.5,5.5 C 4.9565116,13.5 2.5,11.043488 2.5,8 2.5,4.9565116 4.9565116,2.5 8,2.5 Z"></path></svg>',"exif-orientation":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 1.25,0 C 0.625,0 0,0.625 0,1.25 V 5 H 1 V 3 h 8 v 2 h 1 V 1.25 C 10,0.625 9.375,0 8.75,0 Z m 0,1 h 7.5 C 8.875,1 9,1.125 9,1.25 V 2 H 1 V 1.25 C 1,1.125 1.125,1 1.25,1 Z m 0,5 C 0.625,6 0,6.625 0,7.25 v 7.5 C 0,15.375 0.625,16 1.25,16 h 13.5 C 15.375,16 16,15.375 16,14.75 V 7.25 C 16,6.625 15.375,6 14.75,6 Z m 0,1 H 2 v 3 H 1 V 7.25 C 1,7.125 1.125,7 1.25,7 Z M 3,7 h 10 v 8 H 3 Z m 11,0 h 0.75 C 14.875,7 15,7.125 15,7.25 v 7.5 C 15,14.875 14.875,15 14.75,15 H 14 Z M 1,12 h 1 v 3 H 1.25 C 1.125,15 1,14.875 1,14.75 Z"></path></svg>'}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var n=this,i="default",r=l.extend({},n.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,n.registered[i=t]):a.hash(t)&&(i="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null),r=[!1,e,i].map(function(e){return!1===e?n.className:n.className+"-"+e}).join(" ");return o(t).addClass(r)},element:function(e,t){const n=this;let i="default",r=l.extend({},n.registered.default);a.string(t)&&"default"!==t?(i=t,r=l.extend(r,n.registered[t])):a.hash(t)&&(i="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null;if(null!==t){const o=document.createRange().createContextualFragment(t),s=o.querySelector("svg");if(s)return["","-"+e,"-"+i].forEach(function(e){s.classList.add(n.className+e)}),s}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,n,i,o,s){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;n.Swipe=i.Class.extend({construct:function(e,t){var n=this,i=".fgswipe";n.$el=r(e),n.opt=s.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),n.active=!1,n.startPoint=null,n.endPoint=null,n.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+i,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+i,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+i,leave:(!u||c?"mouseleave":null)+i}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),o.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),o.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var n=t.x-e.x,t=t.y-e.y;return n*=n,t*=t,Math.sqrt(n+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5<e||e<=22.5?"N":22.5<e&&e<=67.5?"NE":67.5<e&&e<=112.5?"E":112.5<e&&e<=157.5?"SE":157.5<e&&e<=202.5?"S":202.5<e&&e<=247.5?"SW":247.5<e&&e<=292.5?"W":292.5<e&&e<=337.5?"NW":"NONE"},getPoint:function(e){var t;return u&&!o.empty(t=e.originalEvent.touches||e.touches)?{x:t[0].pageX,y:t[0].pageY}:o.number(e.pageX)&&o.number(e.pageY)?{x:e.pageX,y:e.pageY}:null},getOffset:function(e){var t=this.$el.offset();return{left:e.x-t.left,top:e.y-t.top}},onStart:function(e){var t=e.data.self,e=t.getPoint(e);o.empty(e)||(t.active=!0,t.startPoint=t.endPoint=e)},onMove:function(e){var t=e.data.self,n=t.getPoint(e);t.active&&!o.empty(n)&&(t.endPoint=n,t.opt.allowPageScroll?o.hash(t.opt.allowPageScroll)&&(n=t.getDirection(t.startPoint,t.endPoint),t.opt.allowPageScroll.x||-1===i.inArray(n,["NE","E","SE","NW","W","SW"])||e.preventDefault(),t.opt.allowPageScroll.y||-1===i.inArray(n,["NW","N","NE","SW","S","SE"])||e.preventDefault()):e.preventDefault())},onEnd:function(e){var t,e=e.data.self;e.active&&(e.active=!1,t={startPoint:e.startPoint,endPoint:e.endPoint,startOffset:e.getOffset(e.startPoint),endOffset:e.getOffset(e.endPoint),angle:e.getAngle(e.startPoint,e.endPoint),distance:e.getDistance(e.startPoint,e.endPoint),direction:e.getDirection(e.startPoint,e.endPoint)},0<e.opt.threshold&&t.distance<e.opt.threshold||(e.opt.swipe.apply(this,[t,e.opt.data]),e.startPoint=null,e.endPoint=null))}}),r.fn.fgswipe=function(t){return this.each(function(){var e=r(this).data(a);if(e instanceof n.Swipe){if(o.string(t)&&o.fn(e[t]))return void e[t]();e.destroy()}o.hash(t)&&(e=new n.Swipe(this,t)).init()})}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,e,t,o,s){e.Factory=t.Class.extend({construct:function(){this.registered={}},contains:function(e){return!o.undef(this.registered[e])},make:function(e,t,n){var i,r=s.arg2arr(arguments);return e=r.shift(),i=this.registered[e],o.hash(i)&&o.fn(i.klass)?s.apply(i.klass,r):null},names:function(e){e=!!o.boolean(e)&&e;var t,n=[];if(e){var i=[];for(t in this.registered)this.registered.hasOwnProperty(t)&&i.push(this.registered[t]);i.sort(function(e,t){return t.priority-e.priority}),r.each(i,function(e,t){n.push(t.name)})}else for(t in this.registered)this.registered.hasOwnProperty(t)&&n.push(t);return n},register:function(e,t,n){if(!o.string(e)||o.empty(e)||!o.fn(t))return!1;n=o.number(n)?n:0;var i=this.registered[e];return this.registered[e]={name:e,klass:t,priority:o.undef(i)?n:i.priority},!0},load:function(){var e,n=this,i=[],t=[];for(e in n.registered)n.registered.hasOwnProperty(e)&&t.push(n.registered[e]);return t.sort(function(e,t){return t.priority-e.priority}),r.each(t,function(e,t){i.push(n.make(t.name))}),i}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(l,s,c,u,a){s.TemplateFactory=s.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o){t=this._super(e,t,o);return t&&((o=this.registered)[e].opt=u.hash(n)?n:{},o[e].cls=u.hash(i)?i:{},o[e].il8n=u.hash(r)?r:{}),t},make:function(e,t){t=u.jq(t)?t:l(t),e=a.extend({},e,t.data("foogallery"));var n=this.type(e,t);return this.contains(n)?(e=this.options(n,e),this._super(n,e,t)):null},type:function(e,t){t=u.jq(t)?t:l(t);var n=u.hash(e)&&u.hash(e)&&u.string(e.type)&&this.contains(e.type)?e.type:null;if(null===n&&0<t.length)for(var i=this.registered,r=this.names(!0),o=0,s=r.length;o<s;o++)if(i.hasOwnProperty(r[o])&&"core"!==r[o]){var a=i[r[o]].cls;if(u.string(a.container)){a=c.selectify(a.container);if(t.is(a)){n=r[o];break}}}return n},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,a.extend(r[e].opt,t),a.extend(r[e].cls,n),a.extend(r[e].il8n,i))},options:function(e,t){t=a.extend({type:e},t);var n=this.registered,i=n.core.opt,r=n.core.cls,o=n.core.il8n;return u.hash(t.cls)||(t.cls={}),u.hash(t.il8n)||(t.il8n={}),u.undef(s.filtering)||(t=s.filtering.merge(t)),u.undef(s.paging)||(t=s.paging.merge(t)),"core"!==e&&this.contains(e)?((t=a.extend({},i,n[e].opt,t)).cls=a.extend({},r,n[e].cls,t.cls),t.il8n=a.extend({},o,n[e].il8n,t.il8n)):((t=a.extend({},i,t)).cls=a.extend({},r,t.cls),t.il8n=a.extend({},o,t.il8n)),t}}),s.template=new s.TemplateFactory}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(i,r,o,s,a){var l=0;r.Template=o.EventClass.extend({construct:function(e,t){var n=this;n._super(),n.namespace=".foogallery-"+ ++l,n.$el=s.jq(t)?t:i(t),n.el=n.$el.get(0)||null,n.$scrollParent=null,n.opt=e,n.template=e.template,n.id=n.$el.prop("id")||e.id,n.cls=e.cls,n.il8n=e.il8n,n.sel=o.selectify(n.cls),n.items=r.components.make("items",n),n.pages=s.undef(r.paging)?null:r.paging.make(e.paging.type,n),n.filter=s.undef(r.filtering)?null:r.filtering.make(e.filtering.type,n),n.state=r.components.make("state",n),n._initialize=null,n._layoutTimeout=null,n._layoutWidths=[],n.lastWidth=0,n.initializing=!1,n.initialized=!1,n.destroying=!1,n.destroyed=!1,n._undo={classes:"",style:"",create:!1,children:!1},n.robserver=new ResizeObserver(a.throttle(function(e){n.destroying||n.destroyed||1!==e.length||e[0].target!==n.el||(e=o.getResizeObserverSize(e[0]),n.layout(e.width))},50))},initialize:function(t){var n=this;return s.promise(n._initialize)?n._initialize:n._initialize=i.Deferred(function(e){n.preInit(t)?n.init().then(function(){n.postInit()?(n.ready(),e.resolve(n)):e.reject("post-init failed")}).fail(e.reject):e.reject("pre-init failed")}).fail(function(e){return console.log("initialize failed",n,e),n.destroy()}).promise()},preInit:function(e){var t,n=this;if(n.destroying)return!1;if(e=s.jq(e)?e:i(e),n.initializing=!0,0===e.length&&0===n.$el.parent().length)return!1;0===n.$el.length&&(n.$el=n.create(),n.el=n.$el.get(0),n._undo.create=!0),0<e.length&&n.$el.appendTo(e),s.empty(n.opt.scrollParent)||0===(t=i(n.opt.scrollParent)).length?n.$scrollParent=i(document):n.$scrollParent=t.is("html")?i(document):t,n.$el.data(r.DATA_TEMPLATE,n),s.empty(n.opt.on)||n.on(n.opt.on),n._undo.classes=n.$el.attr("class"),n._undo.style=n.$el.attr("style"),n.$el.is(n.sel.container)||n.$el.addClass(n.cls.container);e=o.selectify(n.opt.classes);return null==e||n.$el.is(e)||n.$el.addClass(n.opt.classes),0===n.$el.children().not(n.sel.item.elem).length&&(n.$el.append(n.createChildren()),n._undo.children=!0),n.opt.protected&&(n.el.oncontextmenu=function(e){return e.preventDefault(),!1}),!n.trigger("pre-init").isDefaultPrevented()},init:function(){return this.trigger("init").isDefaultPrevented()?a.reject("init default prevented"):this.items.fetch()},postInit:function(){var e=this;return!e.destroying&&(!e.trigger("post-init").isDefaultPrevented()&&(e.state.init(),e.pages&&e.pages.init(),i(window).on("popstate"+e.namespace,{self:e},e.onWindowPopState),e.robserver.observe(e.el),!0))},ready:function(){return!this.destroying&&(this.initializing=!1,this.initialized=!0,this.trigger("ready"),!0)},create:function(){return i("<div/>",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return i()},destroy:function(t){var n=this,e=n._super.bind(n);return n.destroyed?a.resolved:(n.destroying=!0,i.Deferred(function(e){n.initializing&&s.promise(n._initialize)?n._initialize.always(function(){n.destroying=!1,n.doDestroy(t),e.resolve()}):(n.destroying=!1,n.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),i(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),s.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),s.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),s.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null!==t._initialize&&(0===(e=!s.number(e)?t.el.getBoundingClientRect().width:e)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e])))},_checkWidth:function(e){var t,n=this;return(t=-1!==n._layoutWidths.indexOf(e))||(n._layoutWidths.unshift(e),n._layoutWidths.splice(2,n._layoutWidths.length-2),null!=n._layoutTimeout&&clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){n._layoutWidths.splice(0,n._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=s.empty(t)?"":t;var e=e instanceof RegExp?e:s.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,n=this.$el.prop("className")||"",n=null!=e?n.match(e):null;return null!=n&&2<=n.length?n[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;s.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,o,n,s,a,l){o.State=o.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),n=a.escapeRegExp(t.getMasked()),i=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+i+".+?"),masked:new RegExp("^#"+n+"\\"+i+".+?"),values:new RegExp("(\\w+)"+r+"([^"+i+"]+)","g")}},destroy:function(e){e||this.clear(),this.opt=this.regex={},this._super()},init:function(){this.set(this.initial())},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==n.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,o=r.tmpl,s={};return r.exists()&&(r.enabled?(s.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var n,i=t.split(r.opt.pair);if(2===i.length)switch(i[0]){case r.opt.itemKey:null!==(n=o.items.fromHash(i[1]))&&(s.item=n);break;case r.opt.pageKey:o.pages&&null!==(n=o.pages.fromHash(i[1]))&&(s.page=n);break;case r.opt.filterKey:o.filter&&null!==(n=o.filter.fromHash(i[1]))&&(s.filter=n)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),s},hashify:function(e){var t,n,i=this,r=i.tmpl;return s.hash(e)?(t=[],null!==(n=r.items.toHash(e.item))&&t.push(i.opt.itemKey+i.opt.pair+n),r.filter&&null!==(n=r.filter.toHash(e.filter))&&t.push(i.opt.filterKey+i.opt.pair+n),r.pages&&null!==(n=r.pages.toHash(e.page))&&t.push(i.opt.pageKey+i.opt.pair+n),0<t.length&&t.unshift("#"+i.getMasked()),t.join(i.opt.values)):""},replace:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.replaceState(n?null:e,"",n?location.pathname+location.search:t))},push:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.pushState(n?null:e,"",n?location.pathname+location.search:t))},update:function(e,t){var n=this;n.enabled&&n.apiEnabled&&(t=n.isPushOrReplace(t)?t:n.pushOrReplace,n[t](e))},clear:function(){this.exists()&&this.replace({})},initial:function(){var e=this.parse();return s.empty(e)?this.get():l.extend({filter:[],page:1,item:null},e)},get:function(e){var t,n=this.tmpl,i={};return e instanceof o.Item&&(i.item=e),n.filter&&null!==(t=n.filter.getState())&&(i.filter=t),n.pages&&null!==(t=n.pages.getState())&&(i.page=t),l.extend({filter:[],page:1,item:null},i)},set:function(e){var t,n,i,r=this.tmpl;s.hash(e)&&(t=l.extend({filter:[],page:1,item:null},e),r.items.reset(),r.trigger("before-state",[t]).isDefaultPrevented()||(r.filter&&r.filter.setState(t),r.pages?r.pages.setState(t):(n=r.items.available(),r.items.isAll(n)||(i=r.items.not(n),r.items.detach(i)),r.items.create(n,!0)),t.item instanceof o.Item&&(this.opt.scrollTo&&t.item.scrollTo(),s.empty(e.item)||(e.item=null,this.replace(e))),this.current=t,r.trigger("after-state",[t])))}}),o.template.configure("core",{state:{enabled:!1,scrollTo:!0,pushOrReplace:"replace",mask:"foogallery-gallery-{id}",values:"/",pair:":",array:"+",arraySeparator:",",itemKey:"i",filterKey:"f",pageKey:"p"}}),o.components.register("state",o.State)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str,FooGallery.utils.obj),function(s,o,n,a,i,l){o.Items=o.Component.extend({construct:function(e){var t=this,e=(t.ALLOW_CREATE=!0,t.ALLOW_APPEND=!0,t.LAYOUT_AFTER_LOAD=!0,t._super(e),t._typeRegex=/(?:^|\s)?fg-type-(.*?)(?:$|\s)/,t._fetched=null,t._all=[],t._available=[],t._unavailable=[],t._observed=new Map,t.tmpl.cls.item.caption);t.tmpl.sel.item.caption.all=n.selectify([e.elem,e.inner,e.title,e.description]),t._wait=[],t._layoutTimeout=null,t.iobserver=new IntersectionObserver(function(e){t.tmpl.destroying||t.tmpl.destroyed||(t.LAYOUT_AFTER_LOAD&&clearTimeout(t._layoutTimeout),e.forEach(function(e){!e.isIntersecting||(e=t._observed.get(e.target))instanceof o.Item&&t._wait.push(e.load())}),t.LAYOUT_AFTER_LOAD&&(t._layoutTimeout=setTimeout(function(){0<t._wait.length&&i.allSettled(t._wait.splice(0)).then(function(){t.tmpl.layout()})},100)))})},fromHash:function(t){return this.find(this._all,function(e){return e.id===t})},toHash:function(e){return e instanceof o.Item?e.id:null},destroy:function(){var e=this,t=e.all();e.iobserver.disconnect(),0<t.length&&(e.tmpl.trigger("destroy-items",[t]),0<(t=s.map(t,function(e){return e.destroy()?e:null})).length&&e.tmpl.trigger("destroyed-items",[t])),e._fetched=null,e._all=[],e._available=[],e._unavailable=[],e._observed.clear(),e._super()},fetch:function(e){var t=this;if(!e&&a.promise(t._fetched))return t._fetched;var e=t.tmpl.id+"_items",n=t.tmpl.sel,i=t.tmpl.opt.items,r=s.Deferred(),o=t.make(t.tmpl.$el.find(n.item.elem));return a.empty(i)?(a.array(window[e])&&o.push.apply(o,t.make(window[e])),r.resolve(o)):a.array(i)?(o.push.apply(o,t.make(i)),r.resolve(o)):a.string(i)?s.get(i).then(function(e){o.push.apply(o,t.make(e)),r.resolve(o)},function(e,t,n){console.log("FooGallery: GET items error.",i,e,t,n),r.resolve(o)}):r.resolve(o),r.then(function(e){t.setAll(e)}),t._fetched=r.promise()},toJSON:function(e){return(e?this.all():this.available()).map(function(e){return e.toJSON()})},all:function(){return this._all.slice()},count:function(e){return(e?this.all():this.available()).length},available:function(e){return a.fn(e)?this._available.filter(e,this):this._available.slice()},unavailable:function(e){return a.fn(e)?this._unavailable.filter(e,this):this._unavailable.slice()},setAll:function(e){this._all=a.array(e)?e:[],this._all.forEach(function(e,t){e.index=t,a.empty(e.id)&&(e.id=t+1+"")}),this._available=this.all(),this._unavailable=[]},setAvailable:function(e){var t=this;t._available=a.array(e)?e:[],t._all.length!==t._available.length?t._unavailable=t._all.filter(function(e){return-1===t._available.indexOf(e)}):t._unavailable=[]},reset:function(){this.setAvailable(this.all())},find:function(e,t){if(t=a.fn(t)?t:function(){return!0},a.array(e))for(var n=0,i=e.length;n<i;n++)if(!0===t.call(this,e[n]))return e[n];return null},not:function(t){var e=this.all();return a.array(t)?e.filter(function(e){return-1===t.indexOf(e)}):e},isAll:function(e){return!!a.array(e)&&this._all.length===e.length},first:function(e){return this.find(this._available,e)},last:function(e){return this.find(this._available.slice().reverse(),e)},next:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},prev:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice().reverse(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},get:function(t,e){e=e?this._all:this._available;return a.number(t)?0<=t&&t<this._all.length?e[t]:null:this.find(e,function(e){return e.el===t})},indexOf:function(e,t){return(t?this._all:this._available).indexOf(e)},creatable:function(e){return this.ALLOW_CREATE&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&!e.isCreated?e:null}):[]},appendable:function(e){return this.ALLOW_APPEND&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&!e.isAttached?e:null}):[]},detachable:function(e){return a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&e.isAttached?e:null}):[]},jquerify:function(e){return s(s.map(e,function(e){return e.$el.get()}))},make:function(e){var i=this,t=[];if(a.jq(e)||a.array(e)){var r=[],e=s.makeArray(e);if(0===e.length)return t;0<(t=!i.tmpl.trigger("make-items",[e]).isDefaultPrevented()?s.map(e,function(e){var t=i.type(e),n=l.extend(a.hash(e)?e:{},{type:t}),t=o.components.make(t,i.tmpl,n);return a.element(e)?t.parse(e)?(r.push(t),i.ALLOW_APPEND||t.detach(),t):null:t}):t).length&&i.tmpl.trigger("made-items",[t]),0<r.length&&i.tmpl.trigger("parsed-items",[r])}return t},type:function(e){var t;return a.hash(e)?t=e.type:!a.element(e)||null!==(e=e.className.match(this._typeRegex))&&2===e.length&&(t=e[1]),a.string(t)&&o.components.contains(t)?t:"image"},create:function(e,t){var n=[],i=this.creatable(e);return 0<i.length&&0<(n=!this.tmpl.trigger("create-items",[i]).isDefaultPrevented()?s.map(i,function(e){return e.create()?e:null}):n).length&&this.tmpl.trigger("created-items",[n]),a.boolean(t)&&t?this.append(e):n},append:function(e){var t=[],e=this.appendable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("append-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.append()?e:null}):t).length&&this.tmpl.trigger("appended-items",[t]),t},detach:function(e){var t=[],e=this.detachable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("detach-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.detach()?e:null}):t).length&&this.tmpl.trigger("detached-items",[t]),t},observe:function(e){!(this.iobserver&&e.isCreated&&e.isAttached)||e.isLoading&&e.isLoaded||(this.iobserver.observe(e.el),this._observed.set(e.el,e))},unobserve:function(e){this.iobserver&&(this.iobserver.unobserve(e.el),this._observed.delete(e.el))}}),o.components.register("items",o.Items)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(y,b,_,w,o,x){b.Item=b.Component.extend({construct:function(e,t){var n=this;n._super(e),n.cls=e.cls.item,n.il8n=e.il8n.item,n.sel=e.sel.item,n.opt=o.extend({},e.opt.item,t),n.isAttached=!1,n.isCreated=!1,n.isDestroyed=!1,n.isLoading=!1,n.isLoaded=!1,n.isError=!1,n.isParsed=!1,n.isPicture=!1,n.$el=null,n.el=null,n.$inner=null,n.$anchor=null,n.$overlay=null,n.$wrap=null,n.$image=null,n.$caption=null,n.$loader=null,n.index=-1,n.type=n.opt.type,n.id=n.opt.id,n.productId=n.opt.productId,n.href=n.opt.href,n.placeholder=n.opt.placeholder,n.src=n.opt.src,n.srcset=n.opt.srcset,n.sources=n.opt.sources,n.width=n.opt.width,n.height=n.opt.height,n.title=n.opt.title,n.alt=n.opt.alt,n.caption=n.opt.caption,n.description=n.opt.description,n.attr=n.opt.attr,n.tags=n.opt.tags,n.maxCaptionLength=n.opt.maxCaptionLength,n.maxDescriptionLength=n.opt.maxDescriptionLength,n.showCaptionTitle=n.opt.showCaptionTitle,n.showCaptionDescription=n.opt.showCaptionDescription,n.noLightbox=n.opt.noLightbox,n.panelHide=n.opt.panelHide,n.exif=n.opt.exif,n.hasExif=w.exif(n.exif),n.ribbon=n.opt.ribbon,n.hasRibbon=w.hash(n.ribbon)&&w.string(n.ribbon.text)&&w.string(n.ribbon.type),n.buttons=n.opt.buttons,n._load=null,n._undo={classes:"",style:"",placeholder:!1}},destroy:function(){var e=this;return e.tmpl.trigger("destroy-item",[e]).isDefaultPrevented()||(e.isDestroyed=e.doDestroyItem()),e.isDestroyed&&(e.tmpl.trigger("destroyed-item",[e]),e._super()),e.isDestroyed},doDestroyItem:function(){var e=this;return e.isParsed?(e.$anchor.add(e.$caption).off("click.foogallery"),e.append(),e.tmpl.items.unobserve(e),w.empty(e._undo.classes)?e.$el.removeAttr("class"):e.$el.attr("class",e._undo.classes),w.empty(e._undo.style)?e.$el.removeAttr("style"):e.$el.attr("style",e._undo.style),e._undo.placeholder&&e.$image.prop("src")===e.placeholder&&e.$image.removeAttr("src")):e.isCreated&&(e.detach(),e.$el.remove()),!0},parse:function(e){var t=this,e=y(e);return!t.tmpl.trigger("parse-item",[t,e]).isDefaultPrevented()&&(t.isCreated=e.is(t.sel.elem))&&(t.isParsed=t.doParseItem(e)),t.isParsed&&(t.isLoaded||t.tmpl.items.observe(t),t.tmpl.trigger("parsed-item",[t])),t.isParsed},doParseItem:function(e){var n=this,t=n.cls,i=n.sel,r=e.get(0);if(n._undo.classes=e.attr("class")||"",n._undo.style=e.attr("style")||"",n.$el=e.data(b.DATA_ITEM,n),n.el=r,n.$inner=y(r.querySelector(i.inner)),n.$anchor=y(r.querySelector(i.anchor)).on("click.foogallery",{self:n},n.onAnchorClick),n.$image=y(r.querySelector(i.image)),n.$caption=y(r.querySelector(i.caption.elem)).on("click.foogallery",{self:n},n.onCaptionClick),n.$overlay=y(r.querySelector(i.overlay)),n.$wrap=y(r.querySelector(i.wrap)),n.$loader=y(r.querySelector(i.loader)),!(n.$el.length&&n.$inner.length&&n.$anchor.length&&n.$image.length))return console.error("FooGallery Error: Invalid HTML markup. Check the item markup for additional elements or malformed HTML in the title or description.",n),n.isError=!0,n.tmpl.trigger("error-item",[n]),0!==n.$el.length&&n.$el.remove(),!1;n.isAttached=null!==r.parentNode,n.isLoading=n.$el.hasClass(t.loading),n.isLoaded=n.$el.hasClass(t.loaded),n.isError=n.$el.hasClass(t.error);var e=n.$anchor.data(),i=(n.id=e.id||n.id,n.productId=e.productId||n.productId,n.tags=e.tags||n.tags,n.href=e.href||n.$anchor.attr("href")||n.href,r=n.$image.is("picture")?(n.isPicture=!0,n.sources=n.$image.find("source").map(function(e,t){return{srcset:t.getAttribute(n.tmpl.opt.srcset),type:t.getAttribute("type"),media:t.getAttribute("media"),sizes:t.getAttribute("sizes")}}).get(),n.$image.find("img")):n.$image,n.src=r.attr(n.tmpl.opt.src)||n.src,n.srcset=r.attr(n.tmpl.opt.srcset)||n.srcset,n.width=parseInt(r.attr("width"))||n.width,n.height=parseInt(r.attr("height"))||n.height,n.title=r.attr("title")||n.title,n.alt=r.attr("alt")||n.alt,n.caption=e.title||e.captionTitle||n.caption,n.description=e.description||e.captionDesc||n.description,n.noLightbox=n.$anchor.hasClass(t.noLightbox),n.panelHide=n.$anchor.hasClass(t.panelHide),w.exif(e.exif)&&(n.exif=o.extend(n.exif,e.exif),n.hasExif=!0),0<n.maxCaptionLength&&((e=x.trimTo(n.caption,n.maxCaptionLength))!==n.caption&&n.$caption.find(i.caption.title).html(e)),!n.maxDescriptionLength||(e=x.trimTo(n.description,n.maxDescriptionLength))!==n.description&&n.$caption.find(i.caption.description).html(e),r.get(0)),e=(w.string(i.src)&&0!==i.src.length||(w.string(n.placeholder)&&0!==n.placeholder.length||(n.placeholder=n.createPlaceholder(n.width,n.height)),0<n.placeholder.length&&(i.src=n.placeholder,n._undo.placeholder=!0)),n.getTypeClass());return n.$el.hasClass(e)||n.$el.addClass(e),n.hasExif&&!n.$el.hasClass(t.exif)&&n.$el.addClass(t.exif),!n.isCreated||!n.isAttached||n.isLoading||n.isLoaded||n.isError||n.$el.hasClass(t.idle)||n.$el.addClass(t.idle),n.doShortPixel(),!0},create:function(){var e=this;return!e.isCreated&&w.string(e.href)&&w.string(e.src)&&w.number(e.width)&&w.number(e.height)&&(e.tmpl.trigger("create-item",[e]).isDefaultPrevented()||(e.isCreated=e.doCreateItem()),e.isCreated&&e.tmpl.trigger("created-item",[e])),e.isCreated},_setAttributes:function(t,n){Object.keys(n).forEach(function(e){w.empty(n[e])||t.setAttribute(e,w.string(n[e])?n[e]:JSON.stringify(n[e]))})},doShortPixel:function(){var e,t=this;function n(e,t,n){return"/"===t||"/"===n?"/":t}t.tmpl.opt.shortpixel&&!b.supportsWebP&&(t.href=t.href.replace(e=/([\/,+])to_webp([\/,+])/i,n),t.src=t.src.replace(e,n),t.srcset=t.srcset.replace(e,n))},doCreateItem:function(){var i,u,r=this,e=r.cls,t=r.attr,n=r.hasExif?e.exif:"",o=(r.isLoaded=!r.tmpl.opt.lazy,r.isPicture=0<r.sources.length,r.doShortPixel(),document.createElement("div")),n=(r._setAttributes(o,t.elem),o.className=[e.elem,r.getTypeClass(),n,r.isLoaded?e.loaded:e.idle].join(" "),document.createElement("figure")),s=(r._setAttributes(n,t.inner),n.className=e.inner,[e.anchor]),a=(r.noLightbox&&s.push(e.noLightbox),r.panelHide&&s.push(e.panelHide),document.createElement("a")),s=(r._setAttributes(a,t.anchor),r._setAttributes(a,{class:s.join(" "),href:r.href,"data-id":r.id,"data-type":r.type,"data-title":r.caption,"data-description":r.description,"data-tags":r.tags,"data-exif":r.exif,"data-product-id":r.productId}),w.string(r.placeholder)&&0!==r.placeholder.length||(r.placeholder=r.createPlaceholder(r.width,r.height)),document.createElement("img")),l=(r._setAttributes(s,t.image),{class:e.image,src:r.placeholder,width:r.width+"",height:r.height+"",title:r.title,alt:r.alt}),l=(r.isLoaded?(l.src=r.src,l.srcset=r.srcset):(l[r.tmpl.opt.src]=r.src,l[r.tmpl.opt.srcset]=r.srcset),r._setAttributes(s,l),r.isPicture&&(i=document.createElement("picture"),r._setAttributes(i,t.picture),r.sources.forEach(function(e){var t=document.createElement("source"),n={media:e.media,sizes:e.sizes,type:e.type};r.isLoaded?n.srcset=e.srcset:n[r.tmpl.opt.srcset]=e.srcset,r._setAttributes(t,n),i.appendChild(t)}),i.appendChild(s)),r.hasRibbon&&((u=document.createElement("div")).className=r.ribbon.type,(l=document.createElement("span")).innerHTML=r.ribbon.text,u.appendChild(l)),document.createElement("span")),h=(l.className=e.overlay,document.createElement("span")),p=(h.className=e.wrap,document.createElement("div")),d=(p.className=e.loader,document.createElement("figcaption")),f=(r._setAttributes(d,t.caption.elem),d.className=e.caption.elem,document.createElement("div")),c=(r._setAttributes(f,t.caption.inner),f.className=e.caption.inner,null),g=r.showCaptionTitle&&w.string(r.caption)&&0<r.caption.length,c=(g&&(c=document.createElement("div"),r._setAttributes(c,t.caption.title),c.className=e.caption.title,c.innerHTML=0<r.maxCaptionLength?x.trimTo(r.caption,r.maxCaptionLength):r.caption,f.appendChild(c)),null),m=r.showCaptionDescription&&w.string(r.description)&&0<r.description.length,v=(m&&(c=document.createElement("div"),r._setAttributes(c,t.caption.description),c.className=e.caption.description,c.innerHTML=0<r.maxDescriptionLength?x.trimTo(r.description,r.maxDescriptionLength):r.description,f.appendChild(c)),null),t=w.array(r.buttons)&&0<r.buttons.length;return t&&((v=document.createElement("div")).className=e.caption.buttons,_.each(r.buttons,function(e){var t;w.hash(e)&&w.string(e.text)&&((t=document.createElement("a")).innerHTML=e.text,w.string(e.url)&&0<e.url.length&&(t.href=e.url),w.string(e.rel)&&0<e.rel.length&&(t.rel=e.rel),w.string(e.target)&&0<e.target.length&&(t.target=e.target),w.string(e.classes)&&0<e.classes.length&&(t.className=e.classes),w.hash(e.attr)&&r._setAttributes(t,e.attr),v.appendChild(t))}),f.appendChild(v)),d.appendChild(f),r.isPicture?h.appendChild(i):h.appendChild(s),a.appendChild(l),a.appendChild(h),n.appendChild(a),(g||m||t)&&n.appendChild(d),r.hasRibbon&&o.appendChild(u),o.appendChild(n),o.appendChild(p),r.$el=y(o).data(b.DATA_ITEM,r),r.el=o,r.$inner=y(n),r.$anchor=y(a).on("click.foogallery",{self:r},r.onAnchorClick),r.$overlay=y(l),r.$wrap=y(h),r.isPicture?r.$image=y(i):r.$image=y(s),r.$caption=y(d).on("click.foogallery",{self:r},r.onCaptionClick),r.$loader=y(p),!0},append:function(){var e=this;return e.isCreated&&!e.isAttached&&(e.tmpl.trigger("append-item",[e]).isDefaultPrevented()||(e.tmpl.$el.append(e.$el.removeClass(e.cls.hidden)),e.isAttached=!0),e.isAttached&&(e.isLoaded||e.tmpl.items.observe(e),e.tmpl.trigger("appended-item",[e]))),e.isAttached},detach:function(){var e=this;return e.isCreated&&e.isAttached&&(e.tmpl.items.unobserve(e),e.tmpl.trigger("detach-item",[e]).isDefaultPrevented()||(e.$el.detach().removeClass(e.cls.hidden),e.isAttached=!1),e.isAttached||e.tmpl.trigger("detached-item",[e])),!e.isAttached},load:function(){var n=this;return w.promise(n._load)?n._load:n._load=y.Deferred(function(t){return n.isLoaded?t.resolve(n):n.isCreated&&n.isAttached?n.tmpl.trigger("load-item",[n]).isDefaultPrevented()?t.reject("default prevented"):(n.isLoading=!0,n.tmpl.items.unobserve(n),n.$el.removeClass(n.cls.idle).removeClass(n.cls.hidden).removeClass(n.cls.loaded).removeClass(n.cls.error).addClass(n.cls.loading),void n.loadIMG().then(function(){n.isLoading=!1,n.isLoaded=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.loaded),n.tmpl.trigger("loaded-item",[n]),t.resolve(n)},function(e){n.isLoading=!1,n.isError=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.error),n.tmpl.trigger("error-item",[n]),t.reject(e)})):t.reject("not created or attached")}).promise()},loadIMG:function(){var o=this;return new y.Deferred(function(e){var t=(o.isPicture?o.$image.find("img"):o.$image).get(0);if(!t)return e.reject("Unable to find img element.");var n=t.src,i=t.srcset,r=(t.onload=function(){t.onload=t.onerror=null,t.style.removeProperty("width"),t.style.removeProperty("height"),e.resolve(t)},t.onerror=function(){t.onload=t.onerror=null,w.empty(n)?t.removeAttribute("src"):t.src=n,w.empty(i)?t.removeAttribute("srcset"):t.srcset=i,e.reject(t)},o.isPicture&&o.$image.find("source").each(function(e,t){var n=t.getAttribute(o.tmpl.opt.srcset);w.empty(n)||(t.srcset=n)}),t.getBoundingClientRect());t.style.width=r.width,t.style.height=r.height,t.src=o.src,w.empty(o.srcset)||(t.srcset=o.srcset),t.complete&&t.onload()}).promise()},createPlaceholder:function(e,t){return w.number(e)&&w.number(t)?"data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22"+e+"%22%20height=%22"+t+"%22%20viewBox=%220%200%20"+e+"%20"+t+"%22%3E%3C/svg%3E":""},getTypeClass:function(){return this.cls.types[this.type]||""},scrollTo:function(e){var t;return this.isAttached&&((t=this.$el.get(0)).scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView("top"===e)),this},updateState:function(){this.tmpl.state.update(this.tmpl.state.get(this))},toJSON:function(){return{type:this.type,id:this.id,productId:this.productId,href:this.href,src:this.src,srcset:this.srcset,width:this.width,height:this.height,alt:this.alt,title:this.title,caption:this.caption,description:this.description,tags:this.tags.slice(),maxCaptionLength:this.maxCaptionLength,maxDescriptionLength:this.maxDescriptionLength,showCaptionTitle:this.showCaptionTitle,showCaptionDescription:this.showCaptionDescription,noLightbox:this.noLightbox,panelHide:this.panelHide,attr:o.extend({},this.attr)}},onAnchorClick:function(e){var t=e.data.self;t.tmpl.trigger("anchor-click-item",[t]).isDefaultPrevented()?e.preventDefault():t.updateState()},onCaptionClick:function(e){var t=e.data.self;!t.tmpl.trigger("caption-click-item",[t]).isDefaultPrevented()&&0<t.$anchor.length&&!y(e.target).is("a[href],:input")&&t.$anchor.get(0).click()}}),b.template.configure("core",{item:{type:"item",id:"",href:"",placeholder:"",src:"",srcset:"",sources:[],width:0,height:0,title:"",alt:"",caption:"",description:"",tags:[],maxCaptionLength:0,maxDescriptionLength:0,showCaptionTitle:!0,showCaptionDescription:!0,noLightbox:!1,panelHide:!1,buttons:[],ribbon:{type:null,text:null},exif:{aperture:null,camera:null,created_timestamp:null,shutter_speed:null,focal_length:null,iso:null,orientation:null},attr:{elem:{},inner:{},anchor:{},image:{},picture:{},caption:{elem:{},inner:{},title:{},description:{}}}}},{item:{elem:"fg-item",inner:"fg-item-inner",exif:"fg-item-exif",anchor:"fg-thumb",overlay:"fg-image-overlay",wrap:"fg-image-wrap",image:"fg-image",loader:"fg-loader",idle:"fg-idle",loading:"fg-loading",loaded:"fg-loaded",error:"fg-error",hidden:"fg-hidden",noLightbox:"fg-no-lightbox",panelHide:"fg-panel-hide",types:{item:"fg-type-unknown"},caption:{elem:"fg-caption",inner:"fg-caption-inner",title:"fg-caption-title",description:"fg-caption-desc",buttons:"fg-caption-buttons",button:"fg-caption-button"}}},{item:{exif:{aperture:"Aperture",camera:"Camera",created_timestamp:"Date",shutter_speed:"Exposure",focal_length:"Focal Length",iso:"ISO",orientation:"Orientation"}}}),b.components.register("item",b.Item)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj),FooGallery.utils.str),function(e){e.Image=e.Item.extend({}),e.template.configure("core",null,{item:{types:{image:"fg-type-image"}}}),e.components.register("image",e.Image)}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(e,c,u){e.PagingFactory=e.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o,s){t=this._super(e,t,s);return t&&((s=this.registered)[e].ctrl=c.fn(n)?n:null,s[e].opt=c.hash(i)?i:{},s[e].cls=c.hash(r)?r:{},s[e].il8n=c.hash(o)?o:{}),t},type:function(e){var t;return c.hash(e)&&c.hash(t=e.paging)&&c.string(t.type)&&this.contains(t.type)?t.type:null},merge:function(e){e=u.extend({},e);var t=this.type(e),n=this.registered,i=n.default.opt,r=n.default.cls,o=n.default.il8n,s=c.hash(e.paging)?e.paging:{},a=c.hash(e.cls)&&c.hash(e.cls.paging)?u.extend({},e.cls.paging):{},l=c.hash(e.il8n)&&c.hash(e.il8n.paging)?u.extend({},e.il8n.paging):{};return c.hash(e.cls)||(e.cls={}),c.hash(e.il8n)||(e.il8n={}),"default"!==t&&this.contains(t)?(e.paging=u.extend({},i,n[t].opt,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:n[t].cls},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:n[t].il8n},{paging:l})):(e.paging=u.extend({},i,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:l})),e},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,u.extend(r[e].opt,t),u.extend(r[e].cls,n),u.extend(r[e].il8n,i))},hasCtrl:function(e){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)},makeCtrl:function(e,t,n,i){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)?new e.ctrl(t,n,i):null}}),e.paging=new e.PagingFactory}(FooGallery,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(t,o,i,l){o.Paging=o.Component.extend({construct:function(e){var t=this;t._super(e),t.opt=t.tmpl.opt.paging,t.cls=t.tmpl.cls.paging,t.il8n=t.tmpl.il8n.paging,t.sel=t.tmpl.sel.paging,t.pushOrReplace=t.opt.pushOrReplace,t.type=t.opt.type,t.theme=t.opt.theme,t.size=t.opt.size,t.position=t.opt.position,t.scrollToTop=t.opt.scrollToTop,t.current=0,t.total=0,t.ctrls=[],t._pages=[]},init:function(){},fromHash:function(e){e=parseInt(e);return isNaN(e)?null:e},toHash:function(e){return l.number(e)&&0<e?e.toString():null},getState:function(){return this.isValid(this.current)?this.current:null},setState:function(e){this.rebuild();var t=!1;e.item&&!this.contains(e.page,e.item)&&(e.page=this.find(e.item),e.page=0!==e.page?e.page:1,t=!0),this.set(e.page,t,!1,!1)},destroy:function(){var e=this;e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e._super()},build:function(){var e=this,t=e.tmpl.items.available();e.total=0<e.size&&0<t.length?Math.ceil(t.length/e.size):1;for(var n,i,r=0;r<e.total;r++)e._pages.push(t.splice(0,e.size));1<e.total&&o.paging.hasCtrl(e.type)&&("both"!==(n=e.position)&&"top"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"top")).create()&&(i.append(),e.ctrls.push(i)),"both"!==n&&"bottom"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"bottom")).create()&&(i.append(),e.ctrls.push(i)))},rebuild:function(){var e=this;e.current=0,e.total=0,e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e.build()},all:function(){return this._pages.slice()},available:function(){return this.get(this.current)},controls:function(n){this.isValid(n)&&t.each(this.ctrls,function(e,t){t.update(n)})},isValid:function(e){return l.number(e)&&0<e&&e<=this.total},number:function(e){return this.isValid(e)?e:0===this.current?1:this.current},create:function(e,t){var n=this,i=(e=n.number(e))-1,r=n._pages[i],t=t?n.tmpl.items.all():n._pages.reduce(function(e,t,n){return n===i?e:e.concat(t)},n.tmpl.items.unavailable());n.current=e,n.tmpl.items.detach(t),n.tmpl.items.create(r,!0)},get:function(e){return this.isValid(e)?(e=this.number(e),this._pages[e-1]):[]},set:function(e,t,n,i){var r=this;if(r.isValid(e)){r.controls(e);var o,s,a=r.number(e);if(a!==r.current)return s=r.current,!r.tmpl.trigger("before-page-change",[r.current,a,e=function(){var e;n=!l.boolean(n)||n,i=!!l.boolean(i)&&i,n&&1===r.current&&!r.tmpl.state.exists()&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.create(a,i),n&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.tmpl.trigger("page-change",[r.current,s,i]),r.scrollToTop&&l.boolean(t)&&t&&(0<(e=r.get(r.current)).length&&e[0].scrollTo("top")),r.tmpl.trigger("after-page-change",[r.current,s,i])},i]).isDefaultPrevented()&&(e(),!0)}return!1},find:function(e){for(var t=0,n=this._pages.length;t<n;t++)if(-1!==i.inArray(e,this._pages[t]))return t+1;return 0},contains:function(e,t){e=this.get(e);return-1!==i.inArray(t,e)},first:function(){this.goto(1)},last:function(){this.goto(this._pages.length)},prev:function(){this.goto(this.current-1)},next:function(){this.goto(this.current+1)},goto:function(e){this.set(e,!0)}}),o.PagingControl=o.Component.extend({construct:function(e,t,n){var i=this;i._super(e),i.pages=t,i.position=n,i.$container=null,i._containerExisted=!1,i._placeholderClasses=[]},create:function(){var n=this;return n.$container=t("#"+n.tmpl.id+"_paging-"+n.position),0<n.$container.length?(n._containerExisted=!0,n.$container.removeClass(function(e,t){return n._placeholderClasses=t.match(/(^|\s)fg-ph-\S+/g)||[],n._placeholderClasses.join(" ")}).addClass([n.pages.cls.container,n.pages.theme].join(" "))):n.$container=t("<nav/>",{class:[n.pages.cls.container,n.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),o.paging.register("default",o.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,n){this._super(e,t,n),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,n=e.pages.cls,i=e.pages.il8n,r=[],o=l("<ul/>",{class:n.list}),s=0,a=e.pages.total;s<a;s++)r.push(t=e.createItem(s+1,i.page)),o.append(t);return e.$list=o,e.$items=l(l.map(r,function(e){return e.get()})),e.$container.append(o),!0}return!1},destroy:function(){var e=this,t=e.pages.sel;e.$list.find(t.link).off("click.foogallery",e.onLinkClick),e.$list=l(),e.$items=l(),e._super()},update:function(e){this.setSelected(e-1)},setSelected:function(e){var t=this,n=t.pages.cls,r=t.pages.il8n,o=t.pages.sel;t.$items.filter(o.selected).removeClass(n.selected).each(function(e,t){var t=l(t),n=t.data("label"),t=t.find(o.reader);a.string(n)&&0!==t.length&&t.html(n)}),t.$items.eq(e).addClass(n.selected).each(function(e,t){var t=l(t),n=t.find(o.reader),i=n.html();a.string(i)&&0!==n.length&&(t.data("label",i),n.html(r.current))})},createItem:function(e,t,n,i,r){n=a.string(n)?n:e,t=a.string(t)?t:"";var o=this.pages.opt,s=this.pages.cls,n=l("<a/>",{class:s.link,href:"#page-"+e}).html(n).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||n.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,o.limit+"")),r=a.string(r)?r:t,a.empty(r)||n.prepend(l("<span/>",{class:s.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,o.limit+"")})),l("<li/>",{class:s.item}).append(n));return i=a.string(i)?i:"",a.empty(i)||e.addClass(i),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,n=t.pages.sel;l(this).closest(n.item).is(n.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(e){e.DefaultTemplate=e.Template.extend({}),e.template.register("default",e.DefaultTemplate,null,{container:"foogallery fg-default"})}((FooGallery.$,FooGallery),FooGallery.utils),function(e){e.MasonryTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.masonry=null,n.on({"pre-init":n.onPreInit,destroyed:n.onDestroyed,"appended-items":n.onAppendedItems,"detach-item":n.onDetachItem,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){var e=this,t=e.sel,n=e.$el.hasClass("fg-fixed");e.template.isFitWidth=n,e.template.percentPosition=!n,e.template.transitionDuration=0,e.template.itemSelector=t.item.elem,n||(e.template.gutter=t.gutterWidth,e.template.columnWidth=t.columnWidth),e.masonry=new Masonry(e.el,e.template)},onDestroyed:function(){this.masonry instanceof Masonry&&this.masonry.destroy()},onLayoutRequired:function(){this.masonry.layout()},onPageChange:function(e,t,n,i){i||this.masonry.layout()},onAppendedItems:function(e,t){t=t.map(function(e){return e.el}),t=this.masonry.addItems(t);this.masonry.layoutItems(t,!0)},onDetachItem:function(e,t){e.isDefaultPrevented()||(e.preventDefault(),this.masonry.remove(t.el),t.$el.removeClass(this.cls.hidden),t.isAttached=!1)}}),e.template.register("masonry",e.MasonryTemplate,{template:{}},{container:"foogallery fg-masonry",columnWidth:"fg-column-width",gutterWidth:"fg-gutter-width"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(i,r,e,o){r.Justified=e.Class.extend({construct:function(e,t){var n=this;n.tmpl=e,n.$el=e.$el,n.options=i.extend(!0,{},r.Justified.defaults,t),n._items=[],n.maxRowHeight=0,n.borderSize=0,n.align=-1!==["left","center","right"].indexOf(n.options.align)?n.options.align:"center"},init:function(){var e=this;e.maxRowHeight=e.getMaxRowHeight(e.options.maxRowHeight,e.options.rowHeight),e.borderSize=e.getBorderSize()},destroy:function(){this.$el.removeAttr("style")},getBorderSize:function(){switch(this.tmpl.getCSSClass("border","")){case"fg-border-thin":return 4;case"fg-border-medium":return 10;case"fg-border-thick":return 16;default:return 0}},getMaxRowHeight:function(e,t){var n;return o.string(e)?(n=parseInt(e),isNaN(n)?t:n<=0?1/0:-1!==e.indexOf("%")?t*(n/100):n):o.number(e)?e<=0?1/0:e:t},layout:function(e){var n,i=this;0<(e=!o.number(e)?i.$el.width():e)&&(0!==(n=i.createRows(e)).height&&0<n.rows.length&&(i.$el.height(n.height),n.rows.forEach(function(e,t){i.render(e,t===n.rows.length-1)})))},render:function(t,e){var n=this,i=!e&&"justify"!==n.options.lastRow;t.items.forEach(function(e){e.elem&&(t.visible?(e.elem.style.setProperty("position","absolute"),e.elem.style.setProperty("width",e.width+"px"),e.elem.style.setProperty("height",e.height+"px"),e.elem.style.setProperty("top",e.top+"px"),e.elem.style.setProperty("left",e.left+"px"),e.elem.style.setProperty("margin","0"),e.elem.style.removeProperty("display"),0<n.maxRowHeight&&i?e.elem.style.setProperty("max-height",n.maxRowHeight+2*n.borderSize+"px"):e.elem.style.removeProperty("max-height"),e.elem.classList.contains("fg-positioned")||e.elem.classList.add("fg-positioned")):e.elem.style.setProperty("display","none"))})},justify:function(n,i,e,t){var r=this,o=r.options.margins,s=o*(n.items.length-1),e=e-s,a=n.width-s,l=e/a,c=(n.width=a*l,n.height=n.height*l,n.height>t+2*r.borderSize&&(a=(t+2*r.borderSize)/n.height,n.width=n.width*a,n.height=n.height*a),n.top=i,n.left=0,"left"!==r.align&&n.width<e&&("right"===r.align?n.left=e-n.width:n.left=(e-n.width)/2),n.width+=s,n.left);return n.items.forEach(function(e,t){0<t&&(c+=o),e.left=c,e.top=i;t=n.height/e.height;e.width=e.width*t,e.height=e.height*t,c+=e.width}),n.height},createRows:function(o){var s=this,a=s.options.margins,i=s.tmpl.getAvailable(),l=[],r=-1;function p(){return{index:++r,visible:!0,width:0,height:s.options.rowHeight+2*s.borderSize,top:0,left:0,items:[]}}var c=p(),u=0,h=0;if(i.forEach(function(e){r=c.height,t=e.width,(n=e.height)!==r&&(n*=i=r/n,t*=i),i=s.maxRowHeight/r;var t,n,i,r={__item:e,elem:e.el,width:t,height:n,maxWidth:t*i,maxHeight:n*i,top:0,left:0};c.width+r.width>o&&0<c.items.length&&(0<l.length&&(u+=a),e=s.justify(c,u,o,s.maxRowHeight),h<e&&(h=e),u+=e,l.push(c),c=p()),0<c.items.length&&(c.width+=a),c.width+=r.width,c.items.push(r)}),0<c.items.length){var e=u+a;switch(s.options.lastRow){case"smart":var t,d,n=s.justify(c,e,o,s.maxRowHeight);0!==h&&h<n&&(t=h/n,d=c.width*t/o,(t<.9||d<.9)&&(n=s.justify(c,e,o,h-2*s.borderSize)));break;case"justify":n=s.justify(c,e,o,99999);break;case"hide":n=s.justify(c,e,o,s.maxRowHeight),c.width<o&&(c.visible=!1)}c.visible&&(u+=n+a),l.push(c)}return{height:u,rows:l}}}),r.Justified.defaults={rowHeight:150,maxRowHeight:"200%",margins:0,align:"center",lastRow:"smart"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(e){e.JustifiedTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.justified=null,n.on({"pre-init":n.onPreInit,init:n.onInit,destroyed:n.onDestroyed,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){this.justified=new e.Justified(this,this.template)},onInit:function(){this.justified.init()},onDestroyed:function(){this.justified instanceof e.Justified&&this.justified.destroy()},onLayoutRequired:function(){this.justified.layout(this.lastWidth)},onPageChange:function(e,t,n,i){i||this.justified.layout(this.lastWidth)}}),e.template.register("justified",e.JustifiedTemplate,null,{container:"foogallery fg-justified"})}((FooGallery.$,FooGallery)),function(e){e.PortfolioTemplate=e.Template.extend({}),e.template.register("simple_portfolio",e.PortfolioTemplate,{},{container:"foogallery fg-simple_portfolio"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn)),function(i,e,r){e.ImageViewerTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t),n.$inner=i(),n.$current=i(),n.$total=i(),n.$prev=i(),n.$next=i(),n.on({"pre-init":n.onPreInit,init:n.onInit,destroy:n.onDestroy,"append-item":n.onAppendItem,"after-page-change":n.onAfterPageChange,"after-filter-change":n.onAfterFilterChange},n)},createChildren:function(){var e=this;return i("<div/>",{class:e.cls.inner}).append(i("<div/>",{class:e.cls.innerContainer}),i("<div/>",{class:e.cls.controls}).append(i("<div/>",{class:e.cls.prev}).append(i("<span/>",{text:e.il8n.prev})),i("<label/>",{class:e.cls.count,text:e.il8n.count}).prepend(i("<span/>",{class:e.cls.countCurrent,text:"0"})).append(i("<span/>",{class:e.cls.countTotal,text:"0"})),i("<div/>",{class:e.cls.next}).append(i("<span/>",{text:e.il8n.next}))))},destroyChildren:function(){this.$el.find(this.sel.inner).remove()},onPreInit:function(e){var t=this;t.$inner=t.$el.find(t.sel.innerContainer),t.$current=t.$el.find(t.sel.countCurrent),t.$total=t.$el.find(t.sel.countTotal),t.$prev=t.$el.find(t.sel.prev),t.$next=t.$el.find(t.sel.next)},onInit:function(e){var t=this;t.template.attachFooBox&&t.$el.on("foobox.previous",{self:t},t.onFooBoxPrev).on("foobox.next",{self:t},t.onFooBoxNext),t.$prev.on("click",{self:t},t.onPrevClick),t.$next.on("click",{self:t},t.onNextClick)},onDestroy:function(e){var t=this;t.template.attachFooBox&&t.$el.off({"foobox.previous":t.onFooBoxPrev,"foobox.next":t.onFooBoxNext}),t.$prev.off("click",t.onPrevClick),t.$next.off("click",t.onNextClick)},onAppendItem:function(e,t){e.preventDefault(),this.$inner.append(t.$el),t.isAttached=!0},onAfterPageChange:function(e,t,n,i){i||this.update()},onAfterFilterChange:function(e){this.update()},update:function(){this.pages&&(this.$current.text(this.pages.current),this.$total.text(this.pages.total))},prev:function(){this.pages&&(this.template.loop&&1===this.pages.current?this.pages.last():this.pages.prev(),this.update())},next:function(){this.pages&&(this.template.loop&&this.pages.current===this.pages.total?this.pages.first():this.pages.next(),this.update())},onFooBoxPrev:function(e){e.data.self.prev()},onFooBoxNext:function(e){e.data.self.next()},onPrevClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.prev()},onNextClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.next()}}),e.template.register("image-viewer",e.ImageViewerTemplate,{template:{attachFooBox:!1,loop:!1}},{container:"foogallery fg-image-viewer",inner:"fiv-inner",innerContainer:"fiv-inner-container",controls:"fiv-ctrls",prev:"fiv-prev",next:"fiv-next",count:"fiv-count",countCurrent:"fiv-count-current",countTotal:"fiv-count-total"},{prev:"Prev",next:"Next",count:"of"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.obj)),function(e,n){e.ThumbnailTemplate=e.Template.extend({construct:function(e,t){this._super(n.extend({},e,{filtering:{type:"none"},paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t)}}),e.template.register("thumbnail",e.ThumbnailTemplate,null,{container:"foogallery fg-thumbnail"})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(i,o,e,l,r,s){o.StackAlbum=e.Class.extend({construct:function(e,t){var n=this;n.$el=l.jq(e)?e:i(e),n.el=n.$el.get(0),n.opt=r.extend({},o.StackAlbum.defaults,t,n.$el.data("foogallery")),n.$back=n.$el.find(".fg-header-back"),n.$active=n.$el.find(".fg-header-active"),n.$piles=n.$el.find(".fg-piles"),n.piles=n.$piles.find(".fg-pile").map(function(e,t){return new o.StackAlbum.Pile(n,t,{index:e})}).get(),n.ignoreResize=!1,n.robserver=new ResizeObserver(function(){!n.ignoreResize&&n.$el.is(":visible")&&n.layout(!0)})},init:function(){var e=this;e.piles.forEach(function(e){e.init()}),e.$back.on("click.foogallery",{self:e},e.onBackClick),e.robserver.observe(e.el)},destroy:function(){this.robserver.disconnect(),this.$back.off(".foogallery"),this.piles.forEach(function(e){e.destroy()})},getLayoutInfo:function(){var e=this,t=e.opt.gutter+2*e.opt.border;return{maxWidth:e.$el.width(),space:t,halfSpace:t/2,itemWidth:e.opt.itemWidth,itemHeight:e.opt.itemHeight,itemOuterWidth:e.opt.itemWidth+2*e.opt.border,itemOuterHeight:e.opt.itemHeight+2*e.opt.border,blockWidth:e.opt.itemWidth+t,blockHeight:e.opt.itemHeight+t,border:e.opt.border,doubleBorder:2*e.opt.border,gutter:e.opt.gutter,halfGutter:e.opt.gutter/2}},layout:function(e){var t,n=this;e&&(n.$el.addClass("fg-disable-transitions"),n.$el.prop("offsetWidth")),n.hasActive?(t=n.activePile.layout(),n.activePile.setPosition(0,0,t.width,t.height)):t=n.layoutPiles(),n.$piles.css({width:t.width+"px",height:t.height+"px"}),e&&n.$el.removeClass("fg-disable-transitions")},layoutPiles:function(i){var r=this.getLayoutInfo(),o=0,s=1,a=0;return i=l.fn(i)?i:function(){},this.piles.forEach(function(e){var t=o,n=((o+=r.blockWidth)>r.maxWidth&&(t=0,o=r.blockWidth,s++),r.blockHeight*(s-1));i(e,n,t,r.blockWidth,r.blockHeight),e.setPosition(n,t,r.blockWidth,r.blockHeight),a<o&&(a=o)}),{width:a,height:r.blockHeight*s}},setActive:function(t){var n,i=this,e=i.activePile,r=e instanceof o.StackAlbum.Pile;t=t instanceof o.StackAlbum.Pile?t:null,i.activePile=t,i.hasActive=null!==t,r&&e.collapse(),i.ignoreResize=!0,i.hasActive?(i.piles.forEach(function(e){e!==t&&e.hide(i.activePile)}),n=i.activePile.expand(),i.$active.text(t.title),i.$el.addClass("fg-has-active")):(n=i.layoutPiles(function(e){e.show()}),i.$el.removeClass("fg-has-active")),s.start(i.$piles,function(e){e.css({width:n.width+"px",height:n.height+"px"})},null,350).then(function(){i.ignoreResize=!1})},onBackClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.setActive(null)}}),o.StackAlbum.defaults={gutter:50,itemWidth:150,itemHeight:150,border:10,angleStep:1,randomAngle:!1}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.transition),function(r,o,e,s,a){o.StackAlbum.Pile=e.Class.extend({construct:function(e,t,n){var i=this;i.album=e,i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Pile.defaults,n,i.$el.data()),i.title=i.opt.title,i.items=i.$el.find(".fg-pile-item").map(function(e,t){return new o.StackAlbum.Item(i,t,{index:e})}).get(),i.$cover=r("<div/>",{class:"fg-pile-cover"}).append(r("<div/>",{class:"fg-pile-cover-content"}).append(r("<span/>",{class:"fg-pile-cover-title",text:i.opt.title}),r("<span/>",{class:"fg-pile-cover-count",text:i.items.length}))),i.top=0,i.left=0,i.isExpanded=!1},init:function(){var n=this,i=n.album.opt,r=n.getAngles(i.angleStep),o=i.randomAngle?n.randomAngle(r):i.angleStep;n.$cover.on("click.foogallery",{self:n},n.onCoverClick),n.items.forEach(function(e,t){e.init(),3<t||(0===t?(e.$el.addClass("fg-has-cover").append(n.$cover),e.load()):(t%2==0?e.setAngle(-o):e.setAngle(o),i.randomAngle?o=n.randomAngle(r):o+=i.angleStep))})},destroy:function(){this.$cover.remove(),this.items.forEach(function(e,t){0===t&&e.$el.removeClass("fg-has-cover"),e.destroy()})},getAngles:function(e){for(var t=[],n=1;n<=3;n++)t.push(n*e);return t},randomAngle:function(e){var t=e.length,t=Math.floor(Math.random()*+t+0),e=e.splice(t,1);return 1===e.length?e[0]:0},setPosition:function(e,t,n,i){this.top=e,this.left=t,s.number(n)&&s.number(i)?this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"}):this.$el.css({top:e+"px",left:t+"px"})},layout:function(){var i=this.album.getLayoutInfo(),r=0,o=1,s=!1,a=0;return this.items.forEach(function(e){(r+=i.halfGutter)>i.maxWidth&&(r=i.halfGutter,o++,s=!0);var t=r,n=(r+=i.itemOuterWidth+i.halfGutter,!s&&r>i.maxWidth&&(t=i.halfGutter,r=i.blockWidth,o++),i.blockHeight*(o-1)+i.halfGutter);s=!1,e.setPosition(n,t,i.itemOuterWidth,i.itemOuterHeight),e.isLoaded||e.load(),a<r&&(a=r)}),{width:a,height:i.blockHeight*o}},expand:function(){var e;return this.$el.removeClass("fg-collapsed").addClass("fg-expanded"),e=this.layout(),this.setPosition(0,0,e.width,e.height),this.isExpanded=!0,e},collapse:function(){var e=this,t=e.album.getLayoutInfo(),n=(e.$el.removeClass("fg-expanded").addClass("fg-collapsed"),e.items.forEach(function(e){e.setPosition(t.halfGutter,t.halfGutter,t.itemOuterWidth,t.itemOuterHeight)}),{width:t.blockWidth,height:t.blockHeight});return e.setPosition(0,0,n.width,n.height),e.isExpanded=!1,n},show:function(){this.$el.removeClass("fg-hidden fg-expanded fg-collapsed")},hide:function(e){e instanceof o.StackAlbum.Pile&&this.setPosition(e.top,e.left),this.$el.addClass("fg-hidden")},onCoverClick:function(e){e.preventDefault(),e.stopPropagation();e=e.data.self;e.album.setActive(e)}}),o.StackAlbum.Pile.defaults={index:-1,title:null}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,o,e,s,a){o.StackAlbum.Item=e.Class.extend({construct:function(e,t,n){var i=this;i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Item.defaults,n,i.$el.data()),i.$thumb=i.$el.find(".fg-pile-item-thumb"),i.$image=i.$el.find(".fg-pile-item-image"),i.isLoaded=!1,i.isLoading=!1,i._loading=null},init:function(){},destroy:function(){},setAngle:function(e){this.$el.css({transform:"rotate("+e+"deg)"})},setPosition:function(e,t,n,i){this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"})},load:function(){var t=this;return s.promise(t._loading)?t._loading:t._loading=r.Deferred(function(e){t.$el.addClass("fg-loading"),t.isLoading=!0,t.$image.on({"load.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.resolve()},"error.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.reject()}}),t.$image.prop("src",t.$image.attr(t.opt.src)).prop("srcset",t.$image.attr(t.opt.srcset))}).promise()}}),o.StackAlbum.Item.defaults={index:-1,src:"data-src-fg",srcset:"data-srcset-fg"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(i,r,e){i.fn.foogalleryStackAlbum=function(e){return this.each(function(e,t){var t=i(t),n=t.data("__FooGalleryAlbum__");n instanceof r.StackAlbum&&n.destroy(),(n=new r.StackAlbum(t)).init(),t.data("__FooGalleryAlbum__",n)})},r.loadStackAlbums=r.reloadStackAlbums=function(){i(function(){i(".foogallery-stack-album:not(.fg-ready)").foogalleryStackAlbum()}),e.ready(function(){i(".foogallery-stack-album.fg-ready").foogalleryStackAlbum()})},r.loadStackAlbums()}(FooGallery.$,FooGallery,FooGallery.utils),function(u,e,o,d){o.Progress=o.EventClass.extend({construct:function(e){var t=this;t._super(),t.percent=0,t.tickRate=d.number(e)?e:100,t.isPaused=!1,t.isActive=!1,t._intervalId=null,t._total=0,t._target=null,t.onTick=t.onTick.bind(t)},destroy:function(){this._reset(),this._super()},_reset:function(){var e=this;null!==e._intervalId&&clearInterval(e._intervalId),e.percent=0,e._total=0,e._intervalId=null,e._target=null,e.isActive=!1,e.isPaused=!1},stop:function(){this.isActive&&(this._reset(),this.trigger("stop"))},start:function(e){var t=this;t.stop(),!t.isActive&&d.number(e)&&0<e&&(t._total=1e3*e,t._target=Date.now()+t._total,t._intervalId=setInterval(t.onTick,t.tickRate),t.isActive=!0,t.trigger("start"))},pause:function(){var e=this;e.isActive&&!e.isPaused&&e.percent<100&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isPaused=!0,e.trigger("pause"))},resume:function(){var e,t=this;t.isActive&&t.isPaused?(e=t._total-t._total*t.percent/100,t._target=Date.now()+e,t._intervalId=setInterval(t.onTick,t.tickRate),t.isPaused=!1,t.trigger("resume")):0<t._total&&t.start(t._total/1e3)},onTick:function(){var e=this,t=e._total-Math.max(e._target-Date.now(),0);e.percent=Math.min(t/e._total*100,100),e.trigger("tick",[e.percent]),100<=e.percent&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isActive=!1,e.trigger("complete"))}}),u.Carousel=o.Class.extend({construct:function(e,t,n,i){var r=this;r.tmpl=e,r.el=e.el,r.opt=t,r.cls=n,r.sel=i,r.elem={inner:null,center:null,bottom:null,prev:null,next:null,progress:null},r.activeItem=null,r._itemWidth=0,r._leftExclude=[r.sel.activeItem,r.sel.nextItem].join(","),r._rightExclude=[r.sel.activeItem,r.sel.prevItem].join(","),r._centerListeners=new o.DOMEventListeners,r._listeners=new o.DOMEventListeners,r._progress=new o.Progress,r._canHover=window.matchMedia("(hover: hover)").matches,r.cache=new Map,r.timeouts=new o.Timeouts,r.interacted=!1,r._firstLayout=!0},getScreenX:function(e,t,n){return n/(n+t)*e},getVectorX:function(e,t,n){return(n+t)/n*e},getSequentialZFromScale:function(e,t,n){return n*(t*(e+1))},scaleToZ:function(e,t,n){return e*(1-t/(n+t))},pause:function(){this._progress.pause()},resume:function(){this._progress.resume()},start:function(){"disable"===this.opt.autoplay.interaction&&this.interacted||this._progress.start(this.opt.autoplay.time)},stop:function(){this._progress.stop()},init:function(){var e=this;e.elem={inner:e.el.querySelector(e.sel.inner),center:e.el.querySelector(e.sel.center),bottom:e.el.querySelector(e.sel.bottom),prev:e.el.querySelector(e.sel.prev),next:e.el.querySelector(e.sel.next),progress:e.el.querySelector(e.sel.progress)},150!==e.opt.perspective&&e.el.style.setProperty("--fg-carousel-perspective",e.opt.perspective+"px")},postInit:function(){var e=this;e.activeItem=e.tmpl.items.first(),e.initNavigation(),e.initPagination(),e.initSwipe(),e.initAutoplay()},initNavigation:function(){const t=this;t._listeners.add(t.elem.prev,"click",function(e){e.preventDefault(),t.interacted=!0,t.previous()}),"button"!==t.elem.prev.type&&(t.elem.prev.type="button"),t.elem.prev.appendChild(e.element("arrow-left")),t._listeners.add(t.elem.next,"click",function(e){e.preventDefault(),t.interacted=!0,t.next()}),"button"!==t.elem.next.type&&(t.elem.next.type="button"),t.elem.next.appendChild(e.element("arrow-right"))},initPagination:function(){const n=this;var e=n.tmpl.items.count();for(let t=0;t<e;t++){const i=document.createElement("button");i.type="button",i.classList.add(n.cls.bullet),0===t&&i.classList.add(n.cls.activeBullet),n._listeners.add(i,"click",function(e){e.preventDefault(),n.interacted=!0,n.goto(n.tmpl.items.get(t))}),n.elem.bottom.appendChild(i)}},initSwipe:function(){const t=this;let n=0,i;t._listeners.add(t.elem.inner,"touchstart",function(e){t.interacted=!0,n=e.changedTouches[0].screenX},{passive:!0}),t._listeners.add(t.elem.inner,"touchend",function(e){i=e.changedTouches[0].screenX,i<n?t.next():t.previous(),n=0},{passive:!0})},initAutoplay:function(){const n=this,t=n.opt.autoplay;if(!(t.time<=0)&&n.elem.progress instanceof HTMLElement){const i=n.elem.progress.style;function e(e,t){o.cancelFrame(null),o.requestFrame(function(){i.setProperty("width",e+"%"),t?i.setProperty("transition-duration","0s"):i.setProperty("transition-duration",n._progress.tickRate+"ms")})}n._progress.on({"start stop":function(){e(0,!0)},"pause resume":function(){e(n._progress.percent,!0)},tick:function(){e(n._progress.percent,!1)},complete:function(){n.next(function(){n._progress.start(t.time)})}}),"pause"===t.interaction&&(n._canHover?(n._listeners.add(n.el,"mouseenter",function(e){n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"mouseleave",function(e){n._progress.resume()},{passive:!0})):(n._listeners.add(n.el,"touchstart",function(e){n.timeouts.delete("autoplay"),n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"touchend",function(e){n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*t.time)},{passive:!0}))),n._progress.start(t.time)}},getFirst:function(){return this.tmpl.items.first()},getNext:function(e){return this.tmpl.items.next(e instanceof u.Item?e:this.activeItem,null,!0)},getPrev:function(e){return this.tmpl.items.prev(e instanceof u.Item?e:this.activeItem,null,!0)},goto:function(e,t){const n=this;if(e instanceof u.Item){const i=n.opt.autoplay,r=!n._canHover&&n.timeouts.has("autoplay"),o=(n.timeouts.delete("autoplay"),n.timeouts.delete("navigation"),n._progress.isPaused);n._progress.isActive&&n._progress.stop(),n.activeItem=e,n.layout(),n.timeouts.set("navigation",function(){0<i.time&&("pause"===i.interaction||"disable"===i.interaction&&!n.interacted)&&(n._progress.start(i.time),o&&n._progress.pause(),r&&n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*i.time)),d.fn(t)&&t.call(n)},n.opt.speed)}},next:function(e){this.goto(this.getNext(),e)},previous:function(e){this.goto(this.getPrev(),e)},destroy:function(){var e=this;e.cache.clear(),e.timeouts.clear(),e._listeners.clear(),e._centerListeners.clear(),150!==e.opt.perspective&&e.el.style.removeProperty("--fg-carousel-perspective")},layout:function(e){const t=this;if(null===t.activeItem&&(t.activeItem=t.tmpl.items.first()),!d.number(e)&&t.cache.has("width")&&(e=t.cache.get("width")),d.number(e)){const n=t.getLayout(e);null!==t._layoutFrame&&o.cancelFrame(t._layoutFrame),t._layoutFrame=o.requestFrame(function(){t._layoutFrame=null,t.renderActive(n)&&(t.renderSide("left",t.sel.prevItem,t._leftExclude,t.cls.prevItem,n),t.renderSide("right",t.sel.nextItem,t._rightExclude,t.cls.nextItem,n),t._firstLayout=!1)})}},getLayout:function(e){var t=this;if(t.cache.has("layout")&&t.cache.get("width")===e)return t.cache.get("layout");var n=t.elem.center.getBoundingClientRect().width,i=t.elem.inner.getBoundingClientRect().width/2+n/2,n=t.calculate(n,i);return t.cache.set("width",e),t.cache.set("layout",n),n},round:function(e,t){t=Math.pow(10,t||0);return Math.round(e*t)/t},getShowPerSide:function(){var e=this.tmpl.items.count();let t=this.opt.maxItems;return("auto"===t||t<=0)&&(t=e%2==0?e-1:e),t%2==0&&--t,t<1&&(t=1),t>e&&(t=e%2==0?e-1:e),(t-1)/2},calculate:function(t,n,i,r){var o=this;d.number(i)||(i=o.opt.gutter.max);const s={zIndex:(r=!d.number(r)?o.getShowPerSide():r)+10,gutter:i,perSide:r,side:[]};let a=t,h=s.zIndex-1;for(let e=0;e<r;e++,h--){var l=o.getSequentialZFromScale(e,o.opt.scale,o.opt.perspective),c=o.scaleToZ(t,l,o.opt.perspective),p=(t-c)/2,u=(a-=p,"%"===o.opt.gutter.unit?t*Math.abs(i/100):Math.abs(i)),u="%"===o.opt.gutter.unit?o.scaleToZ(u,l,o.opt.perspective):u;if(0<i?a+=u:a-=u,a+c+p>n)return i-1<o.opt.gutter.min?o.calculate(t,n,o.opt.gutter.max,r-1):o.calculate(t,n,i-1,r);u=o.getVectorX(a,l,o.opt.perspective);a+=c+p,s.side.push({x:u,z:l,zIndex:h})}return s},cleanup:function(e,t,n){const i=this,r=d.string(n);Array.from(i.el.querySelectorAll(e)).forEach(function(e){e.classList.remove(t),i.opt.centerOnClick&&i._centerListeners.remove(e,"click"),r&&e.matches(n)||(e.style.removeProperty("transition-duration"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"))})},renderActive:function(e){const n=this;if(!(n.activeItem instanceof u.Item))return!1;const t=n.activeItem.el,i=(n.cleanup(n.sel.activeItem,n.cls.activeItem),t.classList.add(n.cls.activeItem),t.style.setProperty("transition-duration",n.opt.speed+"ms"),t.style.setProperty("z-index",e.zIndex),t.style.removeProperty("transform"),n.tmpl.items.indexOf(n.activeItem));return Array.from(n.el.querySelectorAll(n.sel.bullet)).forEach(function(e,t){e.classList.remove(n.cls.activeBullet),t===i&&e.classList.add(n.cls.activeBullet)}),!0},renderSide:function(n,e,i,r,o){const s=this;if(-1!==["left","right"].indexOf(n)){s.cleanup(e,r,i);let t=s.activeItem;for(let e=0;e<o.side.length;e++){var a=o.side[e];const c="left"===n?s.getPrev(t):s.getNext(t);if(!(c instanceof u.Item))break;var l="translate3d("+("left"===n?"-":"")+a.x+"px, 0,-"+a.z+"px)";c.el.classList.add(r),c.isLoaded||(c.el.style.setProperty("transition-duration","0ms"),c.el.style.setProperty("transform","translate3d(0,0,-"+s.opt.perspective+"px)"),c.el.offsetHeight),c.el.style.setProperty("transition-duration",(s._firstLayout?0:s.opt.speed)+"ms"),c.el.style.setProperty("transform",l),c.el.style.setProperty("z-index",a.zIndex),s.opt.centerOnClick&&s._centerListeners.add(c.el,"click",function(e){e.preventDefault(),e.stopPropagation(),s.interacted=!0,s.goto(c)},!0),t=c}}}})}((FooGallery.$,FooGallery),FooGallery.icons,FooGallery.utils,FooGallery.utils.is),function(i,r){i.CarouselTemplate=i.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{type:"none"}}),t),n.items.LAYOUT_AFTER_LOAD=!1,n.carousel=null,n.on({"pre-init":n.onPreInit,init:n.onInit,"post-init":n.onPostInit,destroyed:n.onDestroyed,"append-item":n.onAppendItem,"after-filter-change":n.onAfterFilterChange,layout:n.onLayout},n),n.lightbox instanceof i.Panel&&n.lightbox.on({open:n.onLightboxOpen,closed:n.onLightboxClosed,next:n.onLightboxNext,prev:n.onLightboxPrev},n)},onPreInit:function(){var e=this;e.carousel=new i.Carousel(e,e.template,e.cls.carousel,e.sel.carousel)},onInit:function(){this.carousel.init()},onPostInit:function(){this.carousel.postInit()},onDestroyed:function(){this.carousel instanceof i.Carousel&&this.carousel.destroy()},onAppendItem:function(e,t){e.preventDefault(),this.carousel.elem.inner.appendChild(t.el),t.isAttached=!0},onAfterFilterChange:function(){this.carousel.cache.delete("layout"),this.carousel.interacted=!0,this.carousel.goto(this.carousel.getFirst())},onLayout:function(){this.carousel.layout(this.lastWidth)},onLightboxOpen:function(){this.carousel.interacted=!0,this.carousel.stop()},onLightboxClosed:function(){this.carousel.start()},onLightboxNext:function(){this.carousel.next()},onLightboxPrev:function(){this.carousel.previous()}}),i.template.register("carousel",i.CarouselTemplate,{template:{maxItems:0,perspective:150,scale:.12,speed:300,centerOnClick:!0,gutter:{min:-40,max:-20,unit:"%"},autoplay:{time:0,interaction:"pause"}}},{container:"foogallery fg-carousel",carousel:{inner:"fg-carousel-inner",center:"fg-carousel-center",bottom:"fg-carousel-bottom",prev:"fg-carousel-prev",next:"fg-carousel-next",bullet:"fg-carousel-bullet",activeBullet:"fg-bullet-active",activeItem:"fg-item-active",prevItem:"fg-item-prev",nextItem:"fg-item-next",progress:"fg-carousel-progress"}})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(s,a,e,t,i){a.triggerPostLoad=function(e,t,n,i){var r,o=e.target;if(o instanceof a.Template&&o.initialized&&("after-page-change"===e.type&&!i||"after-filter-change"===e.type))try{if(0<o.$el.parents(".fbx-item").length)return;o.$el.hasClass("fbx-instance")&&window.FOOBOX&&s.fn.foobox?(r=s.extend({},window.FOOBOX.o,o.opt.protected?{images:{noRightClick:!0}}:{}),o.$el.foobox(r)):s("body").trigger("post-load")}catch(e){console.error(e)}},a.autoDefaults={on:{"after-page-change after-filter-change":a.triggerPostLoad}},a.autoEnabled=!0,a.auto=function(e){a.autoDefaults=t.merge(a.autoDefaults,e)},a.globalsMerged=!1,a.mergeGlobals=function(){if(!0!==a.globalsMerged&&window.FooGallery_il8n&&i.object(window.FooGallery_il8n)){var e,t=window.FooGallery_il8n;for(e in t)if(t.hasOwnProperty(e)&&a[e]instanceof a.Factory&&i.object(t[e]))for(var n in t[e])t[e].hasOwnProperty(n)&&a[e].configure(n,null,null,t[e][n]);a.globalsMerged=!0}},a.load=a.reload=function(){s(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(a.autoDefaults)}),e.ready(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"].fg-ready').foogallery(a.autoDefaults)})},a.load()}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.obj,FooGallery.utils.is);
1
  /*
2
  * FooGallery - The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
3
+ * @version 2.0.32
4
  * @link
5
  * @copyright Steven Usher & Brad Vincent 2015
6
  * @license Released under the GPLv3 license.
7
  */
8
+ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){"use strict";var h,t;function l(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||r(),this.isIntersecting=!!e.intersectionRect;var e=this.boundingClientRect,e=e.width*e.height,t=this.intersectionRect,t=t.width*t.height;this.intersectionRatio=e?Number((t/e).toFixed(4)):this.isIntersecting?1:0}function e(e,t){var n,i,r,t=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(t.root&&1!=t.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,r=null,function(){r=r||setTimeout(function(){n(),r=null},i)}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(t.rootMargin),this.thresholds=this._initThresholds(t.threshold),this.root=t.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function n(e,t,n,i){"function"==typeof e.addEventListener?e.addEventListener(t,n,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function p(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?t.width&&t.height?t:{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}:r()}function r(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function o(e,t){for(var n=t;n;){if(n==e)return!0;n=d(n)}return!1}function d(e){e=e.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}"object"==typeof window&&("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}}):(h=window.document,t=[],e.prototype.THROTTLE_TIMEOUT=100,e.prototype.POLL_INTERVAL=null,e.prototype.USE_MUTATION_OBSERVER=!0,e.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},e.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},e.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},e.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},e.prototype._initThresholds=function(e){e=e||[0];return(e=!Array.isArray(e)?[e]:e).sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},e.prototype._parseRootMargin=function(e){e=(e||"0px").split(/\s+/).map(function(e){e=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},e.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(window,"resize",this._checkForIntersections,!0),n(h,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(h,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},e.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(h,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},e.prototype._checkForIntersections=function(){var s=this._rootIsInDom(),a=s?this._getRootRect():r();this._observationTargets.forEach(function(e){var t=e.element,n=p(t),i=this._rootContainsTarget(t),r=e.entry,o=s&&i&&this._computeTargetAndRootIntersection(t,a),e=e.entry=new l({time:window.performance&&performance.now&&performance.now(),target:t,boundingClientRect:n,rootBounds:a,intersectionRect:o});r?s&&i?this._hasCrossedThreshold(r,e)&&this._queuedEntries.push(e):r&&r.isIntersecting&&this._queuedEntries.push(e):this._queuedEntries.push(e)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},e.prototype._computeTargetAndRootIntersection=function(e,u){if("none"!=window.getComputedStyle(e).display){for(var t,n,i,r,o=p(e),s=d(e),a=!1;!a;){var l=null,c=1==s.nodeType?window.getComputedStyle(s):{};if("none"==c.display)return;if(s==this.root||s==h?(a=!0,l=u):s!=h.body&&s!=h.documentElement&&"visible"!=c.overflow&&(l=p(s)),l&&(c=l,l=o,r=i=n=t=void 0,t=Math.max(c.top,l.top),n=Math.min(c.bottom,l.bottom),i=Math.max(c.left,l.left),c=Math.min(c.right,l.right),r=n-t,!(o=0<=(l=c-i)&&0<=r&&{top:t,bottom:n,left:i,right:c,width:l,height:r})))break;s=d(s)}return o}},e.prototype._getRootRect=function(){var e,t;return t=this.root?p(this.root):(t=h.documentElement,e=h.body,{top:0,left:0,right:t.clientWidth||e.clientWidth,width:t.clientWidth||e.clientWidth,bottom:t.clientHeight||e.clientHeight,height:t.clientHeight||e.clientHeight}),this._expandRectByRootMargin(t)},e.prototype._expandRectByRootMargin=function(n){var e=this._rootMarginValues.map(function(e,t){return"px"==e.unit?e.value:e.value*(t%2?n.width:n.height)/100}),e={top:n.top-e[0],right:n.right+e[1],bottom:n.bottom+e[2],left:n.left-e[3]};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},e.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!=o<i)return!0}},e.prototype._rootIsInDom=function(){return!this.root||o(h,this.root)},e.prototype._rootContainsTarget=function(e){return o(this.root||h,e)},e.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},e.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=e,window.IntersectionObserverEntry=l))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";var a="undefined"!=typeof Map?Map:(Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){e=i(this.__entries__,e),e=this.__entries__[e];return e&&e[1]},e.prototype.set=function(e,t){var n=i(this.__entries__,e);~n?this.__entries__[n][1]=t:this.__entries__.push([e,t])},e.prototype.delete=function(e){var t=this.__entries__,e=i(t,e);~e&&t.splice(e,1)},e.prototype.has=function(e){return!!~i(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},e);function i(e,n){var i=-1;return e.some(function(e,t){return e[0]===n&&(i=t,!0)}),i}function e(){this.__entries__=[]}var n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,t="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(t):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},p=2;var d=["top","right","bottom","left","width","height","size","weight"],f="undefined"!=typeof MutationObserver,g=(r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,e=t.indexOf(e);~e&&t.splice(e,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),0<e.length},r.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),f?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var e=e.propertyName,t=void 0===e?"":e;d.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r);function r(){function e(){o&&(o=!1,i()),s&&n()}function t(){l(e)}function n(){var e=Date.now();if(o){if(e-a<p)return;s=!0}else s=!(o=!0),setTimeout(t,r);a=e}var i,r,o,s,a;this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(i=this.refresh.bind(this),s=o=!(r=20),a=0,n)}var m=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||t},v=h(0,0,0,0);function u(e){return parseFloat(e)||0}function y(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(e,t){return e+u(n["border-"+t+"-width"])},0)}function b(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return v;var i=c(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=e["padding-"+r];t[r]=u(o)}return t}(i),o=r.left+r.right,s=r.top+r.bottom,a=u(i.width),l=u(i.height);return"border-box"===i.boxSizing&&(Math.round(a+o)!==t&&(a-=y(i,"left","right")+o),Math.round(l+s)!==n&&(l-=y(i,"top","bottom")+s)),e!==c(e).document.documentElement&&(i=Math.round(a+o)-t,e=Math.round(l+s)-n,1!==Math.abs(i)&&(a-=i),1!==Math.abs(e)&&(l-=e)),h(r.left,r.top,a,l)}var _="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function w(e){return n?_(e)?h(0,0,(t=(t=e).getBBox()).width,t.height):b(e):v;var t}function h(e,t,n,i){return{x:e,y:t,width:n,height:i}}o.prototype.isActive=function(){var e=w(this.target);return(this.contentRect_=e).width!==this.broadcastWidth||e.height!==this.broadcastHeight},o.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var x=o;function o(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=h(0,0,0,0),this.target=e}var C=function(e,t){n=(t=t).x,i=t.y,o=t.width,t=t.height,r="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(r.prototype),m(r,{x:n,y:i,width:o,height:t,top:i,right:n+o,bottom:t+i,left:n});var n,i,r,o=r;m(this,{target:e,contentRect:o})},E=(s.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},s.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},s.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},s.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},s.prototype.broadcastActive=function(){var e,t;this.hasActive()&&(e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new C(e.target,e.broadcastRect())}),this.callback_.call(e,t,e),this.clearActive())},s.prototype.clearActive=function(){this.activeObservations_.splice(0)},s.prototype.hasActive=function(){return 0<this.activeObservations_.length},s);function s(e,t,n){if(this.activeObservations_=[],this.observations_=new a,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}var $=new("undefined"!=typeof WeakMap?WeakMap:a),F=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=g.getInstance(),t=new E(t,n,this);$.set(this,t)};return["observe","unobserve","disconnect"].forEach(function(t){F.prototype[t]=function(){var e;return(e=$.get(this))[t].apply(e,arguments)}}),void 0!==t.ResizeObserver?t.ResizeObserver:F}),function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){return}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,n){"1.0.0"===n.version&&(n.is={},n.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},n.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},n.is.empty=function(e){if(n.is.undef(e)||null===e)return!0;if(n.is.number(e)&&0===e)return!0;if(n.is.boolean(e)&&!1===e)return!0;if(n.is.string(e)&&0===e.length)return!0;if(n.is.array(e)&&0===e.length)return!0;if(n.is.jq(e)&&0===e.length)return!0;if(n.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},n.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},n.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},n.is.hash=function(e){return n.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},n.is.jq=function(e){return!n.is.undef(t)&&e instanceof t},n.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},n.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!n.is.undef(e)&&null!==e},n.is.promise=function(e){return n.is.object(e)&&n.is.fn(e.then)&&n.is.fn(e.promise)},n.is.size=function(e){return!!(n.is.string(e)&&!n.is.empty(e)||n.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},n.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},n.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,n){var i,r,o,s;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(n)&&(i=e[t],r=u.fn(i)&&c.fn.CONTAINS_SUPER.test(a.call(n)),e[t]=r?(o=i,s=n,function(){var e=this._super,t=(this._super=o,s.apply(this,arguments));return this._super=e,t}):n)},c.fn.expose=function(t,n,e,i){u.object(t)&&u.object(n)&&u.array(e)&&(i=u.undef(i)?t:i,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(n[e]=t[e].bind(i))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(n,i){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){n.apply(e,t)},i)}},c.fn.throttle=function(n,i){var r,o;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(o),o=setTimeout(function(){Date.now()-r>=i&&(n.apply(e,t),r=Date.now())},i-(Date.now()-r))):(n.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.reject.apply(n,i).promise()},c.fn.resolve=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.resolve.apply(n,i).promise()},c.fn.rejectWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.resolveWith(e,r).promise()},c.fn.all=function(t){var n=l.Deferred(),i=[];if(u.array(t)&&0<t.length){function r(e,t){s||(i[e]=0===t.length?void 0:1===t.length?t[0]:t,--o||n.resolve(i))}for(var o=t.length,s=!1,a=0,e=t.length;a<e&&"break"!==function(){if(s)return"break";var e=a;u.promise(t[e])?t[e].then(function(){r(e,c.fn.arg2arr(arguments))},function(){s||(s=!0,n.reject.apply(n,c.fn.arg2arr(arguments)))}):r(e,[t[e]])}();a++);}else n.resolve(i);return n.promise()},c.fn.allSettled=function(t){var i=l.Deferred(),r=[];if(u.array(t)&&0<t.length){function n(e,t,n){r[e]={status:t},0<n.length&&(r[e]["rejected"===t?"reason":"value"]=1===n.length?n[0]:n),--o||i.resolve(r)}for(var o=t.length,s=0,e=t.length;s<e;s++)!function(){var e=s;u.promise(t[e])?t[e].then(function(){n(e,"fulfilled",c.fn.arg2arr(arguments))},function(){n(e,"rejected",c.fn.arg2arr(arguments))}):n(e,"fulfilled",[t[e]])}()}else i.resolve(r);return i.promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(e,o){var r;"1.0.0"===e.version&&(e.url={},r=document.createElement("a"),e.url.parts=function(e){r.href=e;var e=r.port||(-1!==["http:","https:"].indexOf(r.protocol)?"https:"===r.protocol?"443":"80":""),t=r.hostname+(e?":"+e:""),n=r.origin||r.protocol+"//"+t,i="/"===r.pathname.slice(0,1)?r.pathname:"/"+r.pathname;return{hash:r.hash,host:t,hostname:r.hostname,href:r.href,origin:n,pathname:i,port:e,protocol:r.protocol,search:r.search}},e.url.full=function(e){return!o.string(e)||o.empty(e)?null:(r.href=e,r.href)},e.url.param=function(e,t,n){return o.string(e)&&o.string(t)&&!o.empty(t)?o.undef(n)?(r=((i=new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)")).exec(e)||["",""])[1].replace(/\+/g,"%20"),o.string(r)&&!o.empty(r)?decodeURIComponent(r):null):(o.empty(n)?(i=new RegExp("^([^#]*?)(([^#]*)&)?"+t+"(=[^&#]*)?(&|#|$)"),r=e.replace(i,"$1$3$5").replace(/^([^#]*)((\?)&|\?(#|$))/,"$1$3$4")):(i=new RegExp("([?&])"+t+"[^&]*"),t=t+"="+encodeURIComponent(n),(r=e.replace(i,"$1"+t))!==e||i.test(r)||(r+=(-1!==r.indexOf("?")?"&":"?")+t)),r):e;var i,r})}(FooGallery.utils,FooGallery.utils.is),function(a,l,c){"1.0.0"===a.version&&(a.str={},a.str.trim=function(e){return l.string(e)?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):null},a.str.camel=function(e){return l.string(e)?e.toUpperCase()===e?e.toLowerCase():e.replace(/^([A-Z])|[-\s_]+(\w)/g,function(e,t,n){return l.string(n)?n.toUpperCase():t.toLowerCase()}):e},a.str.kebab=function(e){return l.string(e)?e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g).filter(Boolean).map(function(e){return e.toLowerCase()}).join("-"):e},a.str.contains=function(e,t,n){return!(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t))&&(t.length<=e.length&&-1!==(n?e.toUpperCase().indexOf(t.toUpperCase()):e.indexOf(t)))},a.str.containsWord=function(e,t,n){if(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t)||e.length<t.length)return!1;for(var i=e.split(/\W/),r=0,o=i.length;r<o;r++)if(n?i[r].toUpperCase()===t.toUpperCase():i[r]===t)return!0;return!1},a.str.endsWith=function(e,t){return!(!l.string(e)||!l.string(t)||t.length>e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,n=0,i=e.length;n<i;n++)t=(t^=e.charCodeAt(n))+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24));return t>>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,n){if(!l.string(e)||!l.string(t))return null;var i=c.arg2arr(arguments);e=i.shift();for(var r=i.shift(),o=0,s=i.length;o<s;o++)t=i[o],l.empty(t)||(a.str.endsWith(r,e)&&(r=r.slice(0,r.length-e.length)),r+=e+(t=a.str.startsWith(t,e)?t.slice(e.length):t));return r},a.str.until=function(e,t){return a.str.contains(e,t)?e.substring(0,e.indexOf(t)):e},a.str.format=function(n,e,t){var i=c.arg2arr(arguments);return n=i.shift(),l.string(n)&&0<i.length&&(1===i.length&&(l.array(i[0])||l.object(i[0]))&&(i=i[0]),a.each(i,function(e,t){n=n.replace(new RegExp("\\{"+t+"\\}","gi"),e+"")})),n})}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(a,l,r,o){"1.0.0"===a.version&&(a.obj={},a.obj.create=function(e){if(!l.object(e))throw TypeError("Argument must be an object");function t(){}return t.prototype=e,new t},a.obj.extend=function(t,e,n){t=l.object(t)?t:{};var i=r.arg2arr(arguments);return i.shift(),a.each(i,function(e){a.obj.merge(t,e)}),t},a.obj.merge=function(e,t){for(var n in e=l.hash(e)?e:{},t=l.hash(t)?t:{})t.hasOwnProperty(n)&&(l.hash(t[n])?(e[n]=l.hash(e[n])?e[n]:{},a.obj.merge(e[n],t[n])):l.array(t[n])?e[n]=t[n].slice():e[n]=t[n]);return e},a.obj.mergeValid=function(t,n,i,e){if(!l.hash(i)||!l.hash(n))return t;var r,o,s;for(r in n=l.hash(n)?n:{},e=l.hash(e)?e:{},n)n.hasOwnProperty(r)&&l.fn(n[r])&&(o=l.array(e[r])?e[r]:l.string(e[r])?[e[r]]:[r],a.each(o,function(e){if(s=a.obj.prop(i,e),!l.undef(s))return n[r](s)?(a.obj.prop(t,r,s),!1):void 0}));return t},a.obj.prop=function(n,e,i){var t,r;if(l.object(n)&&!l.empty(e))return l.undef(i)?(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){if(t===r)i=n[e];else{if(!l.hash(n[e]))return!1;n=n[e]}})):l.undef(n[e])||(i=n[e]),i):void(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){t===r?n[e]=i:n=l.hash(n[e])?n[e]:n[e]={}})):l.undef(n[e])||(n[e]=i))})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(t,r,s){"1.0.0"===r.version&&(r.ready=function(e){function t(){try{e.call(window,r.$)}catch(e){console.error(e)}}(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)},r.find=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e)){for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o;r++)if(t.call(n,e[i[r]],i[r],e))return e[i[r]]},r.each=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e))for(r=0,o=e.length;r<o&&!1!==t.call(n,e[r],r,e);r++);else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o&&!1!==t.call(n,e[i[r]],i[r],e);r++);},r.inArray=function(e,t){return s.array(t)?t.indexOf(e):-1},r.selectify=function(e){if(s.empty(e))return null;if(s.hash(e)){var t,n,i={};for(n in e)e.hasOwnProperty(n)&&(t=r.selectify(e[n]))&&(i[n]=t);return i}return s.string(e)||s.array(e)?(e=s.string(e)?[e]:e).map(function(e){return s.string(e)?"."+e.split(/\s/g).join("."):null}).join(","):null},r.requestFrame=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)}).bind(window),r.cancelFrame=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window),r.nextFrame=function(e,n){return t.Deferred(function(t){s.fn(e)?(n=s.undef(n)?e:n,r.requestFrame(function(){try{t.resolve(e.call(n))}catch(e){t.reject(e)}})):t.reject(new Error("Provided callback is not a function."))}).promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(r,o,s,a){"1.0.0"===r.version&&(r.Class=function(){},r.Class.extend=function(e){e=o.hash(e)?e:{};var t,n=s.create(this.prototype);for(t in e)e.hasOwnProperty(t)&&a.addOrOverride(n,t,e[t]);function i(){if(!o.fn(this.construct))throw new SyntaxError('FooGallery.utils.Class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)}return n.construct=o.fn(n.construct)?n.construct:function(){},(i.prototype=n).constructor=o.fn(n.__ctor__)?n.__ctor__:i,i.extend=r.Class.extend,i.override=r.Class.override,i.getBaseClasses=r.Class.getBaseClasses,i.__baseClass__=this,i},r.Class.override=function(e,t){a.addOrOverride(this.prototype,e,t)},r.Class.__baseClass__=null,r.Class.getBaseClasses=function(){return function e(t,n){return o.array(n)||(n=[]),o.fn(t)&&null!==t.__baseClass__?(n.unshift(t.__baseClass__),e(t.__baseClass__,n)):n}(this,[])})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.fn),function(e,a,l,r){e.ClassRegistry=e.Class.extend({construct:function(e){this.opt=r.extend({allowBase:!0,beforeCreate:null},e),this.registered={}},register:function(e,t,n,i){var r;return!(!a.string(e)||a.empty(e)||!a.fn(t))&&(i=a.number(i)?i:0,r=this.registered[e],this.registered[e]={name:e,ctor:t,config:a.hash(n)?n:{},priority:a.undef(r)?i:r.priority},!0)},each:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s&&!1!==e.call(n,r[o],o);o++);},find:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s;o++)if(e.call(n,r[o],o))return r[o];return null},create:function(e,t,n){var i=this,r=l.arg2arr(arguments);if(e=r.shift(),a.string(e)&&i.registered.hasOwnProperty(e)){var o=i.registered[e],s=!0;if((s=o.priority<0&&!i.opt.allowBase?!1:s)&&a.fn(o.ctor))return t=r.shift(),t=i.mergeConfigurations(o.name,t),r.unshift.apply(r,[o.name,t]),l.apply(o.ctor,i.onBeforeCreate(o,r))}return null},onBeforeCreate:function(e,t){return null!==this.opt.beforeCreate&&a.fn(this.opt.beforeCreate)?this.opt.beforeCreate.call(this,e,t):t},mergeConfigurations:function(e,t){var n,i;return a.string(e)&&this.registered.hasOwnProperty(e)?(t=a.hash(t)?t:{},n=this.getBaseClasses(e),i=[{}],n.push(this.registered[e]),n.forEach(function(e){i.push(e.config)}),i.push(t),r.extend.apply(r,i)):{}},getBaseClass:function(){return this.find(function(e){return e.priority<0},!0)},getBaseClasses:function(e){var t=this,e=t.registered[e],n=[];return a.undef(e)||e.ctor.getBaseClasses().forEach(function(e){e=t.fromType(e);a.hash(e)&&n.push(e)}),n},fromType:function(t){if(a.fn(t))return this.find(function(e){return e.ctor===t})}})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,s,n){"1.0.0"===o.version&&(o.Event=o.Class.extend({construct:function(e){if(s.empty(e))throw new SyntaxError("FooGallery.utils.Event objects must be supplied a `type`.");e=o.Event.parse(e);this.type=e.type,this.namespace=e.namespace,this.defaultPrevented=!1,this.target=null},preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented}}),o.Event.parse=function(e){e=s.string(e)&&!s.empty(e)?e:null;var t=n.contains(e,".");return{namespaced:t,type:t?n.startsWith(e,".")?null:n.until(e,"."):e,namespace:t?n.from(e,"."):null}},o.EventClass=o.Class.extend({construct:function(){this.events={}},destroy:function(){this.events={}},on:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){s.fn(n[t])&&t.split(" ").forEach(function(e){r.addListener(e,n[t],i)})})):s.string(n)&&s.fn(t)&&n.split(" ").forEach(function(e){r.addListener(e,t,i)}),r},addListener:function(e,t,n){if(!s.string(e)||/\s/.test(e)||!s.fn(t))return!1;var i=this,r=o.Event.parse(e);return n=s.undef(n)?i:n,s.array(i.events[r.type])||(i.events[r.type]=[]),!i.events[r.type].some(function(e){return e.namespace===r.namespace&&e.fn===t&&e.thisArg===n})&&(i.events[r.type].push({namespace:r.namespace,fn:t,thisArg:n}),!0)},off:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){t.split(" ").forEach(function(e){r.removeListener(e,n[t],i)})})):s.string(n)&&n.split(" ").forEach(function(e){r.removeListener(e,t,i)}),r},removeListener:function(e,t,n){if(!s.string(e)||/\s/.test(e))return!1;var i=this,r=o.Event.parse(e),e=[];return n=s.undef(n)?i:n,s.empty(r.type)?s.empty(r.namespace)||e.push.apply(e,Object.keys(i.events)):e.push(r.type),e.forEach(function(e){s.array(i.events[e])&&(i.events[e]=i.events[e].filter(function(e){return null!=t?!(e.namespace===r.namespace&&e.fn===t&&e.thisArg===n):null!=r.namespace&&e.namespace!==r.namespace}),0===i.events[e].length&&delete i.events[e])}),!0},trigger:function(e,t){t=s.array(t)?t:[];var n=this,i=[];return e instanceof o.Event?(i.push(e),n.emit(e,t)):s.string(e)&&e.split(" ").forEach(function(e){e=new o.Event(e);i.push(e),n.emit(e,t)}),s.empty(i)?null:1===i.length?i[0]:i},emit:function(t,n){var e;t instanceof FooGallery.utils.Event&&(e=this,n=s.array(n)?n:[],null===t.target&&(t.target=e),s.array(e.events[t.type])&&e.events[t.type].forEach(function(e){null!=t.namespace&&e.namespace!==t.namespace||e.fn.apply(e.thisArg,[t].concat(n))}),s.array(e.events.__all__)&&e.events.__all__.forEach(function(e){e.fn.apply(e.thisArg,[t].concat(n))}))}}))}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str),function(e,i,t){"1.0.0"===e.version&&(e.Timer=e.EventClass.extend({construct:function(e){var t=this;t._super(),t.interval=i.number(e)?e:1e3,t.isRunning=!1,t.isPaused=!1,t.canResume=!1,t.canRestart=!1,t.__timeout=null,t.__decrement=!1,t.__time=0,t.__remaining=0,t.__current=0,t.__finish=0,t.__restart=[]},__reset:function(){var e=this;clearTimeout(e.__timeout),e.__timeout=null,e.__decrement=!1,e.__time=0,e.__remaining=0,e.__current=0,e.__finish=0,e.isRunning=!1,e.isPaused=!1,e.canResume=!1},__eventArgs:function(e){return[this.__current,this.__time,this.__decrement].concat(t.arg2arr(arguments))},__tick:function(){var e=this;e.trigger("tick",e.__eventArgs()),e.__current===e.__finish?(e.trigger("complete",e.__eventArgs()),e.__reset()):(e.__decrement?e.__current--:e.__current++,e.__remaining--,e.canResume=0<e.__remaining,e.__timeout=setTimeout(function(){e.__tick()},e.interval))},start:function(e,t){var n=this;n.isRunning||(t=!!i.boolean(t)&&t,n.__restart=[e,t],n.__decrement=t,n.__time=e,n.__remaining=e,n.__current=t?e:0,n.__finish=t?0:e,n.canRestart=!0,n.isRunning=!0,n.isPaused=!1,n.trigger("start",n.__eventArgs()),n.__tick())},countdown:function(e){this.start(e,!0)},countup:function(e){this.start(e,!1)},restart:function(){var e=this;e.stop(),e.canRestart&&e.start.apply(e,e.__restart)},stop:function(){var e=this;(e.isRunning||e.isPaused)&&(e.__reset(),e.trigger("stop",e.__eventArgs()))},pause:function(){var e=this;return null!=e.__timeout&&(clearTimeout(e.__timeout),e.__timeout=null),e.isRunning&&(e.isRunning=!1,e.isPaused=!0,e.canResume=0<e.__remaining,e.trigger("pause",e.__eventArgs())),e.__remaining},resume:function(){var e=this;e.canResume&&(e.isRunning=!0,e.isPaused=!1,e.trigger("resume",e.__eventArgs()),e.__tick())},reset:function(){this.__reset(),this.trigger("reset",this.__eventArgs())}}))}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,e,t){"1.0.0"===e.version&&(e.FullscreenAPI=e.EventClass.extend({construct:function(){this._super(),this.apis={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},this.api=this.getAPI(),this.supported=null!=this.api,this.__listen()},destroy:function(){return this.__stopListening(),this._super()},getAPI:function(){for(var e in this.apis)if(this.apis.hasOwnProperty(e)&&this.apis[e].enabled in document)return this.apis[e];return null},element:function(){return this.supported?document[this.api.element]:null},request:function(e){return this.supported&&e[this.api.request]?e[this.api.request]()||o.Deferred(this.__resolver(this.api.request)).promise():t.rejected},exit:function(){return this.supported&&this.element()?document[this.api.exit]()||o.Deferred(this.__resolver(this.api.exit)).promise():t.rejected},toggle:function(e){return this.element()?this.exit():this.request(e)},__listen:function(){var e=this;e.supported&&o(document).on(e.api.events.change+".utils",function(){e.trigger("change")}).on(e.api.events.error+".utils",function(){e.trigger("error")})},__stopListening:function(){this.supported&&o(document).off(this.api.events.change+".utils").off(this.api.events.error+".utils")},__resolver:function(i){var r=this;return function(e){function t(){e.resolve(),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}function n(){e.reject(new TypeError),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}i===r.api.exit&&r.element()?setTimeout(function(){e.reject(new TypeError)},1):o(document).on(r.api.events.change,t).on(r.api.events.error,n)}}}))}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.fn),function(l,c,u,a){"1.0.0"===c.version&&(c.transition={},c.transition.dataName="__foo-transition__",c.transition.disableClassName=null,c.transition.timeout=3e3,c.transition.disable=function(e,t){var n,i,r,e=u.jq(e)?e:l(e);0<e.length&&u.fn(t)&&(n=e.get(0),r=null,(i=u.string(c.transition.disableClassName))?e.addClass(c.transition.disableClassName):(r={value:n.style.getPropertyValue("transition"),priority:n.style.getPropertyPriority("transition")},n.style.setProperty("transition","none","important")),t.call(t,e),e.prop("offsetWidth"),i?e.removeClass(c.transition.disableClassName):(n.style.removeProperty("transition"),u.string(r.value)&&0<r.value.length&&n.style.setProperty("transition",r.value,r.priority)))},c.transition.stop=function(e){var t=l.Deferred(),n=u.jq(e)?e:l(e);return 0<n.length?(e=n.data(c.transition.dataName),u.promise(e)?e.always(function(){c.requestFrame(function(){t.resolve(n)})}).reject(new Error("Transition cancelled.")):t.resolve(n)):t.reject(new Error("Unable to stop transition. Make sure the element exists.")),t.promise()},c.transition.createListener=function(e,t,n){var i=e,r=t,o=n,s=u.string(n);return function(e){var t=e.originalEvent instanceof TransitionEvent?e.originalEvent:e,n=!1;(n=t.target===i?!s||t.propertyName===o:n)&&r.apply(r,a.arg2arr(arguments))}},c.transition.start=function(e,n,i,r){var o,s=l.Deferred(),a=u.jq(e)?e:l(e);return 0<a.length&&u.fn(n)?(o=a.get(0),c.transition.stop(a).always(function(){var t=c.transition.createListener(o,function(){s.resolve(a)},i);a.data(c.transition.dataName,s).on("transitionend.foo-utils",t).prop("offsetWidth"),c.requestFrame(function(){var e=setTimeout(function(){s.reject(new Error("Transition safety timeout triggered."))},u.number(r)?r:c.transition.timeout);s.always(function(){clearTimeout(e),a.removeData(c.transition.dataName).off("transitionend.foo-utils",t)}),n.call(n,a)})})):s.reject(new Error("Unable to perform transition. Make sure the element exists and a trigger function is supplied.")),s.promise()},c.transition.modify=function(e,t,n,i){e=u.jq(e)?e:l(e);return 0<e.length&&u.fn(t)?n?(c.transition.disable(e,t),a.resolve()):c.transition.start(e,t,i):a.reject(new Error("Unable to perform modification. Make sure the element exists and a modify function is supplied."))})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(o,s,e,a,i,t){s.DATA_TEMPLATE="__FooGallery__",s.DATA_ITEM="__FooGalleryItem__",s.get=function(e){return o(e).data(s.DATA_TEMPLATE)},s.init=function(t,n){if(0<(n=a.jq(n)?n:o(n)).length){var e=n.data(s.DATA_TEMPLATE);if(e instanceof s.Template)return e.destroy(!0).then(function(){var e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected})}e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected},o.fn.foogallery=function(i,r){return r=a.fn(r)?r:o.noop,this.each(function(e,t){if(a.string(i)){var n=o.data(t,s.DATA_TEMPLATE);if(n instanceof s.Template)switch(i){case"layout":return void n.layout();case"destroy":return void n.destroy()}}else s.init(i,t).then(r)})},s.isCached=function(e){var t=new Image,e=(t.src=e,t.complete);return t.src="",t=null,e},s.supportedExifProperties=["camera","aperture","created_timestamp","shutter_speed","focal_length","iso","orientation"],a.exif=function(t){var e;return!!a.object(t)&&(0<(e=Object.keys(t)).length&&e.some(function(e){return-1!==s.supportedExifProperties.indexOf(e)&&!a.empty(t[e])}))},t.trimTo=function(e,t,n){return a.string(e)&&a.number(t)&&0<t&&e.length>t?e.substr(0,t)+(a.string(n)?n:"&hellip;"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0].blockSize):(t=e.contentBoxSize.inlineSize,e.contentBoxSize.blockSize):(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},s.supportsWebP=!1;var n=new Image;n.onload=function(){s.supportsWebP=0<n.width&&0<n.height},n.onerror=function(){s.supportsWebP=!1},n.src="data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",s.supportsPicture=!!window.HTMLPictureElement,e.DOMEventListeners=e.Class.extend({construct:function(){this.eventTargets=new Map},add:function(e,t,n,i){e.addEventListener(t,n,i);let r=this.eventTargets.get(e);return r||(r=new Map,this.eventTargets.set(e,r)),!r.get(t)&&(r.set(t,{listener:n,options:i}),!0)},remove:function(e,t){let n=this.eventTargets.get(e);var i;!n||(i=n.get(t))&&(e.removeEventListener(t,i.listener,i.options),n.delete(t),0===n.size&&this.eventTargets.delete(e))},clear:function(){this.eventTargets.forEach(function(e,n){e.forEach(function(e,t){n.removeEventListener(t,e.listener,e.options)})}),this.eventTargets.clear()}}),e.Timeouts=e.Class.extend({construct:function(){this.instances=new Map},has:function(e){return this.instances.has(e)},get:function(e){return this.instances.get(e)},set:function(e,t,n){const i=this;i.delete(e);n={id:setTimeout(function(){i.instances.delete(e),t.call(i)},n),delay:n,fn:t};return this.instances.set(e,n),i},delete:function(e){var t;return!!this.instances.has(e)&&(t=this.instances.get(e),clearTimeout(t.id),this.instances.delete(e))},clear:function(){this.instances.forEach(function(e){clearTimeout(e.id)}),this.instances.clear()}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(o,e,t,a,l){e.Icons=t.Class.extend({construct:function(){this.className="fg-icon",this.registered={default:{close:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.957 3.457l-1.414-1.414-4.543 4.543-4.543-4.543-1.414 1.414 4.543 4.543-4.543 4.543 1.414 1.414 4.543-4.543 4.543 4.543 1.414-1.414-4.543-4.543z"></path></svg>',"arrow-left":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M10.5 16l1.5-1.5-6.5-6.5 6.5-6.5-1.5-1.5-8 8 8 8z"></path></svg>',"arrow-right":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M5.5 0l-1.5 1.5 6.5 6.5-6.5 6.5 1.5 1.5 8-8-8-8z"></path></svg>',maximize:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 2v4h-2v-5c0-0.552 0.448-1 1-1h14c0.552 0 1 0.448 1 1v14c0 0.552-0.448 1-1 1h-14c-0.552 0-1-0.448-1-1v-9h9c0.552 0 1 0.448 1 1v7h4v-12h-12z"/></svg>',expand:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 5h-2v-4c0-0.552 0.448-1 1-1h4v2h-3v3z"></path><path d="M16 5h-2v-3h-3v-2h4c0.552 0 1 0.448 1 1v4z"></path><path d="M15 16h-4v-2h3v-3h2v4c0 0.552-0.448 1-1 1z"></path><path d="M5 16h-4c-0.552 0-1-0.448-1-1v-4h2v3h3v2z"></path></svg>',shrink:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 0h2v4c0 0.552-0.448 1-1 1h-4v-2h3v-3z"></path><path d="M11 0h2v3h3v2h-4c-0.552 0-1-0.448-1-1v-4z"></path><path d="M12 11h4v2h-3v3h-2v-4c0-0.552 0.448-1 1-1z"></path><path d="M0 11h4c0.552 0 1 0.448 1 1v4h-2v-3h-3v-2z"></path></svg>',info:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M7 4.75c0-0.412 0.338-0.75 0.75-0.75h0.5c0.412 0 0.75 0.338 0.75 0.75v0.5c0 0.412-0.338 0.75-0.75 0.75h-0.5c-0.412 0-0.75-0.338-0.75-0.75v-0.5z"></path><path d="M10 12h-4v-1h1v-3h-1v-1h3v4h1z"></path><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path></svg>',comment:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 4h10v1h-10zM3 6h8v1h-8zM3 8h4v1h-4zM14.5 1h-13c-0.825 0-1.5 0.675-1.5 1.5v8c0 0.825 0.675 1.5 1.5 1.5h2.5v4l4.8-4h5.7c0.825 0 1.5-0.675 1.5-1.5v-8c0-0.825-0.675-1.5-1.5-1.5zM14 10h-5.924l-3.076 2.73v-2.73h-3v-7h12v7z"></path></svg>',thumbs:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 3v10h-2v-11c0-0.552 0.448-1 1-1h12c0.552 0 1 0.448 1 1v12c0 0.552-0.448 1-1 1h-12c-0.552 0-1-0.448-1-1v-1h4v-2h-2v-2h2v-2h-2v-2h2v-2h2v10h6v-10h-10z"></path></svg>',cart:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.238 9c0.55 0 1.124-0.433 1.275-0.962l1.451-5.077c0.151-0.529-0.175-0.962-0.725-0.962h-10.238c0-1.105-0.895-2-2-2h-3v2h3v8.5c0 0.828 0.672 1.5 1.5 1.5h9.5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-9v-1h8.238zM5 4h9.044l-0.857 3h-8.187v-3z"></path><path d="M6 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path><path d="M15 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path></svg>',"circle-close":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path><path d="M10.5 4l-2.5 2.5-2.5-2.5-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 2.5-2.5 2.5 2.5 1.5-1.5-2.5-2.5 2.5-2.5z"></path></svg>',"auto-progress":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path class="[ICON_CLASS]-idle" d="M11.39 8c2.152-1.365 3.61-3.988 3.61-7 0-0.339-0.019-0.672-0.054-1h-13.891c-0.036 0.328-0.054 0.661-0.054 1 0 3.012 1.457 5.635 3.609 7-2.152 1.365-3.609 3.988-3.609 7 0 0.339 0.019 0.672 0.054 1h13.891c0.036-0.328 0.054-0.661 0.054-1 0-3.012-1.457-5.635-3.609-7zM2.5 15c0-2.921 1.253-5.397 3.5-6.214v-1.572c-2.247-0.817-3.5-3.294-3.5-6.214v0h11c0 2.921-1.253 5.397-3.5 6.214v1.572c2.247 0.817 3.5 3.294 3.5 6.214h-11zM9.462 10.462c-1.12-0.635-1.181-1.459-1.182-1.959v-1.004c0-0.5 0.059-1.327 1.184-1.963 0.602-0.349 1.122-0.88 1.516-1.537h-6.4c0.395 0.657 0.916 1.188 1.518 1.538 1.12 0.635 1.181 1.459 1.182 1.959v1.004c0 0.5-0.059 1.327-1.184 1.963-1.135 0.659-1.98 1.964-2.236 3.537h7.839c-0.256-1.574-1.102-2.879-2.238-3.538z"/><circle class="[ICON_CLASS]-circle" r="4" cx="8" cy="8"/><path class="[ICON_CLASS]-play" d="M3 2l10 6-10 6z"/><path class="[ICON_CLASS]-pause" d="M2 2h5v12h-5zM9 2h5v12h-5z"/></svg>',search:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M16 13.5l-4.695-4.695c0.444-0.837 0.695-1.792 0.695-2.805 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.013 0 1.968-0.252 2.805-0.695l4.695 4.695 2.5-2.5zM2 6c0-2.209 1.791-4 4-4s4 1.791 4 4-1.791 4-4 4-4-1.791-4-4z"></path></svg>',"exif-aperture":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 0,3.5876443 0,8 c 0,4.412356 3.5876443,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871916 -3.128084,7 -7,7 C 4.1280844,15 1,11.871916 1,8 1,4.1280844 4.1280844,1 8,1 Z M 7.53125,2.0214844 A 6,6 0 0 0 3.1835938,4.4335938 H 8.9257812 Z M 8.6132812,2.03125 C 9.5587451,3.6702105 10.504247,5.3091484 11.451172,6.9472656 L 12.863281,4.5 A 6,6 0 0 0 8.6132812,2.03125 Z M 2.5957031,5.4101562 A 6,6 0 0 0 2,8 6,6 0 0 0 2.5273438,10.439453 L 5.4296875,5.4101562 Z m 10.8261719,0.033203 -2.855469,4.9433598 h 2.935547 A 6,6 0 0 0 14,8 6,6 0 0 0 13.421875,5.4433592 Z M 4.5722656,8.8945312 3.0996094,11.449219 a 6,6 0 0 0 4.40625,2.527343 z m 2.5820313,2.4707028 1.4960937,2.591797 a 6,6 0 0 0 4.3144534,-2.591797 z"></path></svg>',"exif-camera":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 8.0000002,5 a 4,4 0 0 0 -4,4 4,4 0 0 0 4,4 A 4,4 0 0 0 12,9 4,4 0 0 0 8.0000002,5 Z m 0.019531,1.015625 a 3,2.9814477 0 0 1 2.9804688,3 l -1,-0.00586 a 2,2 0 0 0 0,-0.00976 2,2 0 0 0 -1.9863279,-2 z M 5.125,1 C 4.5,1 4,1.5 4,2.125 V 3.0000004 L 1.125,3 C 0.5,2.9999999 0,3.5 0,4.125 v 9.75 C 0,14.5 0.5,15 1.125,15 h 13.75 C 15.5,15 16,14.5 16,13.875 V 4.125 C 16,3.5 15.5,3 14.875,3 H 12 V 2.125 C 12,1.5 11.5,1 10.875,1 Z M 5.25,2.0000004 h 5.5 c 0.125,0 0.25,0.1249996 0.25,0.25 v 1.75 h 3.75 c 0.125,0 0.25,0.1249996 0.25,0.25 V 13.75 C 15,13.875 14.875,14 14.75,14 H 1.25 C 1.125,14 1,13.875 1,13.75 V 4.25 C 1,4.125 1.125,4 1.25,4 l 3.75,4e-7 v -1.75 c 0,-0.1250004 0.125,-0.25 0.25,-0.25 z"></path></svg>',"exif-created-timestamp":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 3,1 V 2 H 1 V 15 H 16 V 2 H 14 V 1 H 13 V 2 H 4 V 1 Z M 2,4 H 15 V 14 H 2 Z M 6,5 V 7 H 8 V 5 Z m 3,0 v 2 h 2 V 5 Z m 3,0 v 2 h 2 V 5 Z M 3,8 v 2 H 5 V 8 Z m 3,0 v 2 H 8 V 8 Z m 3,0 v 2 h 2 V 8 Z m 3,0 v 2 h 2 V 8 Z m -9,3 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z"></path></svg>',"exif-shutter-speed":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 -2.9415707e-8,3.5876443 0,8 c 2.3532563e-7,4.412356 3.5876445,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871915 -3.128085,7 -7,7 -3.8719154,0 -6.9999998,-3.128085 -7,-7 -3e-8,-3.8719156 3.1280844,-7 7,-7 z M 11.646484,3.6464844 8.6445312,6.6484375 A 1.5,1.5 0 0 0 8,6.5 1.5,1.5 0 0 0 6.5,8 1.5,1.5 0 0 0 8,9.5 1.5,1.5 0 0 0 9.5,8 1.5,1.5 0 0 0 9.3515625,7.3554688 L 12.353516,4.3535156 Z M 2,7.5 v 1 h 2 v -1 z M 7.5,12 v 2 h 1 V 12 Z M 12,7.5 v 1 h 2 v -1 z M 7.5,2 v 2 h 1 V 2 Z"></path></svg>',"exif-focal-length":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 1,4.125 -1,0.25 v 7.25 l 1,0.25 z M 5,1 2,4 v 8 l 3,3 h 6.875 C 12.500003,15 13,14.5 13,13.875 V 2.125 C 13,1.4999986 12.5,1 11.875,1 9.576807,0.99914375 7.1414067,0.96597644 5,1 Z M 5.5,2 H 6 V 14 H 5.5 L 3,11.5 v -7 z M 7,2 h 4.75 C 11.875,2 12,2.1249997 12,2.25 v 11.5 c 0,0.125 -0.125,0.250622 -0.25,0.25 H 7 Z m 7,0 c 1,2.2 1.5,4.35 1.5,6 0,1.65 -0.5,3.8 -1.5,6"></path></svg>',"exif-iso":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 7.5,0 V 1.6015625 C 6.0969201,1.7146076 4.8392502,2.256185 3.828125,3.1210938 L 2.6035156,1.8964844 1.8964844,2.6035156 3.1210938,3.828125 C 2.256185,4.8392502 1.7146076,6.0969201 1.6015625,7.5 H 0 v 1 h 1.6015625 c 0.1130451,1.4030799 0.6546225,2.66075 1.5195313,3.671875 l -1.2246094,1.224609 0.7070312,0.707032 1.2246094,-1.22461 C 4.8392502,13.743815 6.0969201,14.285392 7.5,14.398438 V 16 h 1 v -1.601562 c 1.4030799,-0.113046 2.66075,-0.654623 3.671875,-1.519532 l 1.224609,1.22461 0.707032,-0.707032 -1.22461,-1.224609 C 13.743815,11.16075 14.285392,9.9030799 14.398438,8.5 H 16 v -1 H 14.398438 C 14.285392,6.0969201 13.743815,4.8392502 12.878906,3.828125 L 14.103516,2.6035156 13.396484,1.8964844 12.171875,3.1210938 C 11.16075,2.256185 9.9030799,1.7146076 8.5,1.6015625 V 0 Z M 8,2.5 c 3.043488,0 5.5,2.4565116 5.5,5.5 0,3.043488 -2.456512,5.5 -5.5,5.5 C 4.9565116,13.5 2.5,11.043488 2.5,8 2.5,4.9565116 4.9565116,2.5 8,2.5 Z"></path></svg>',"exif-orientation":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 1.25,0 C 0.625,0 0,0.625 0,1.25 V 5 H 1 V 3 h 8 v 2 h 1 V 1.25 C 10,0.625 9.375,0 8.75,0 Z m 0,1 h 7.5 C 8.875,1 9,1.125 9,1.25 V 2 H 1 V 1.25 C 1,1.125 1.125,1 1.25,1 Z m 0,5 C 0.625,6 0,6.625 0,7.25 v 7.5 C 0,15.375 0.625,16 1.25,16 h 13.5 C 15.375,16 16,15.375 16,14.75 V 7.25 C 16,6.625 15.375,6 14.75,6 Z m 0,1 H 2 v 3 H 1 V 7.25 C 1,7.125 1.125,7 1.25,7 Z M 3,7 h 10 v 8 H 3 Z m 11,0 h 0.75 C 14.875,7 15,7.125 15,7.25 v 7.5 C 15,14.875 14.875,15 14.75,15 H 14 Z M 1,12 h 1 v 3 H 1.25 C 1.125,15 1,14.875 1,14.75 Z"></path></svg>'}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var n=this,i="default",r=l.extend({},n.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,n.registered[i=t]):a.hash(t)&&(i="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null),r=[!1,e,i].map(function(e){return!1===e?n.className:n.className+"-"+e}).join(" ");return o(t).addClass(r)},element:function(e,t){const n=this;let i="default",r=l.extend({},n.registered.default);a.string(t)&&"default"!==t?(i=t,r=l.extend(r,n.registered[t])):a.hash(t)&&(i="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null;if(null!==t){const o=document.createRange().createContextualFragment(t),s=o.querySelector("svg");if(s)return["","-"+e,"-"+i].forEach(function(e){s.classList.add(n.className+e)}),s}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,n,i,o,s){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;n.Swipe=i.Class.extend({construct:function(e,t){var n=this,i=".fgswipe";n.$el=r(e),n.opt=s.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),n.active=!1,n.startPoint=null,n.endPoint=null,n.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+i,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+i,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+i,leave:(!u||c?"mouseleave":null)+i}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),o.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),o.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var n=t.x-e.x,t=t.y-e.y;return n*=n,t*=t,Math.sqrt(n+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5<e||e<=22.5?"N":22.5<e&&e<=67.5?"NE":67.5<e&&e<=112.5?"E":112.5<e&&e<=157.5?"SE":157.5<e&&e<=202.5?"S":202.5<e&&e<=247.5?"SW":247.5<e&&e<=292.5?"W":292.5<e&&e<=337.5?"NW":"NONE"},getPoint:function(e){var t;return u&&!o.empty(t=e.originalEvent.touches||e.touches)?{x:t[0].pageX,y:t[0].pageY}:o.number(e.pageX)&&o.number(e.pageY)?{x:e.pageX,y:e.pageY}:null},getOffset:function(e){var t=this.$el.offset();return{left:e.x-t.left,top:e.y-t.top}},onStart:function(e){var t=e.data.self,e=t.getPoint(e);o.empty(e)||(t.active=!0,t.startPoint=t.endPoint=e)},onMove:function(e){var t=e.data.self,n=t.getPoint(e);t.active&&!o.empty(n)&&(t.endPoint=n,t.opt.allowPageScroll?o.hash(t.opt.allowPageScroll)&&(n=t.getDirection(t.startPoint,t.endPoint),t.opt.allowPageScroll.x||-1===i.inArray(n,["NE","E","SE","NW","W","SW"])||e.preventDefault(),t.opt.allowPageScroll.y||-1===i.inArray(n,["NW","N","NE","SW","S","SE"])||e.preventDefault()):e.preventDefault())},onEnd:function(e){var t,e=e.data.self;e.active&&(e.active=!1,t={startPoint:e.startPoint,endPoint:e.endPoint,startOffset:e.getOffset(e.startPoint),endOffset:e.getOffset(e.endPoint),angle:e.getAngle(e.startPoint,e.endPoint),distance:e.getDistance(e.startPoint,e.endPoint),direction:e.getDirection(e.startPoint,e.endPoint)},0<e.opt.threshold&&t.distance<e.opt.threshold||(e.opt.swipe.apply(this,[t,e.opt.data]),e.startPoint=null,e.endPoint=null))}}),r.fn.fgswipe=function(t){return this.each(function(){var e=r(this).data(a);if(e instanceof n.Swipe){if(o.string(t)&&o.fn(e[t]))return void e[t]();e.destroy()}o.hash(t)&&(e=new n.Swipe(this,t)).init()})}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,e,t,o,s){e.Factory=t.Class.extend({construct:function(){this.registered={}},contains:function(e){return!o.undef(this.registered[e])},make:function(e,t,n){var i,r=s.arg2arr(arguments);return e=r.shift(),i=this.registered[e],o.hash(i)&&o.fn(i.klass)?s.apply(i.klass,r):null},names:function(e){e=!!o.boolean(e)&&e;var t,n=[];if(e){var i=[];for(t in this.registered)this.registered.hasOwnProperty(t)&&i.push(this.registered[t]);i.sort(function(e,t){return t.priority-e.priority}),r.each(i,function(e,t){n.push(t.name)})}else for(t in this.registered)this.registered.hasOwnProperty(t)&&n.push(t);return n},register:function(e,t,n){if(!o.string(e)||o.empty(e)||!o.fn(t))return!1;n=o.number(n)?n:0;var i=this.registered[e];return this.registered[e]={name:e,klass:t,priority:o.undef(i)?n:i.priority},!0},load:function(){var e,n=this,i=[],t=[];for(e in n.registered)n.registered.hasOwnProperty(e)&&t.push(n.registered[e]);return t.sort(function(e,t){return t.priority-e.priority}),r.each(t,function(e,t){i.push(n.make(t.name))}),i}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(l,s,c,u,a){s.TemplateFactory=s.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o){t=this._super(e,t,o);return t&&((o=this.registered)[e].opt=u.hash(n)?n:{},o[e].cls=u.hash(i)?i:{},o[e].il8n=u.hash(r)?r:{}),t},make:function(e,t){t=u.jq(t)?t:l(t),e=a.extend({},e,t.data("foogallery"));var n=this.type(e,t);return this.contains(n)?(e=this.options(n,e),this._super(n,e,t)):null},type:function(e,t){t=u.jq(t)?t:l(t);var n=u.hash(e)&&u.hash(e)&&u.string(e.type)&&this.contains(e.type)?e.type:null;if(null===n&&0<t.length)for(var i=this.registered,r=this.names(!0),o=0,s=r.length;o<s;o++)if(i.hasOwnProperty(r[o])&&"core"!==r[o]){var a=i[r[o]].cls;if(u.string(a.container)){a=c.selectify(a.container);if(t.is(a)){n=r[o];break}}}return n},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,a.extend(r[e].opt,t),a.extend(r[e].cls,n),a.extend(r[e].il8n,i))},options:function(e,t){t=a.extend({type:e},t);var n=this.registered,i=n.core.opt,r=n.core.cls,o=n.core.il8n;return u.hash(t.cls)||(t.cls={}),u.hash(t.il8n)||(t.il8n={}),u.undef(s.filtering)||(t=s.filtering.merge(t)),u.undef(s.paging)||(t=s.paging.merge(t)),"core"!==e&&this.contains(e)?((t=a.extend({},i,n[e].opt,t)).cls=a.extend({},r,n[e].cls,t.cls),t.il8n=a.extend({},o,n[e].il8n,t.il8n)):((t=a.extend({},i,t)).cls=a.extend({},r,t.cls),t.il8n=a.extend({},o,t.il8n)),t}}),s.template=new s.TemplateFactory}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(i,r,o,s,a){var l=0;r.Template=o.EventClass.extend({construct:function(e,t){var n=this;n._super(),n.namespace=".foogallery-"+ ++l,n.$el=s.jq(t)?t:i(t),n.el=n.$el.get(0)||null,n.$scrollParent=null,n.opt=e,n.template=e.template,n.id=n.$el.prop("id")||e.id,n.cls=e.cls,n.il8n=e.il8n,n.sel=o.selectify(n.cls),n.items=r.components.make("items",n),n.pages=s.undef(r.paging)?null:r.paging.make(e.paging.type,n),n.filter=s.undef(r.filtering)?null:r.filtering.make(e.filtering.type,n),n.state=r.components.make("state",n),n._initialize=null,n._layoutTimeout=null,n._layoutWidths=[],n.lastWidth=0,n.initializing=!1,n.initialized=!1,n.destroying=!1,n.destroyed=!1,n._undo={classes:"",style:"",create:!1,children:!1},n.robserver=new ResizeObserver(a.throttle(function(e){n.destroying||n.destroyed||1!==e.length||e[0].target!==n.el||(e=o.getResizeObserverSize(e[0]),n.layout(e.width))},50))},initialize:function(t){var n=this;return s.promise(n._initialize)?n._initialize:n._initialize=i.Deferred(function(e){n.preInit(t)?n.init().then(function(){n.postInit()?(n.ready(),e.resolve(n)):e.reject("post-init failed")}).fail(e.reject):e.reject("pre-init failed")}).fail(function(e){return console.log("initialize failed",n,e),n.destroy()}).promise()},preInit:function(e){var t,n=this;if(n.destroying)return!1;if(e=s.jq(e)?e:i(e),n.initializing=!0,0===e.length&&0===n.$el.parent().length)return!1;0===n.$el.length&&(n.$el=n.create(),n.el=n.$el.get(0),n._undo.create=!0),0<e.length&&n.$el.appendTo(e),s.empty(n.opt.scrollParent)||0===(t=i(n.opt.scrollParent)).length?n.$scrollParent=i(document):n.$scrollParent=t.is("html")?i(document):t,n.$el.data(r.DATA_TEMPLATE,n),s.empty(n.opt.on)||n.on(n.opt.on),n._undo.classes=n.$el.attr("class"),n._undo.style=n.$el.attr("style"),n.$el.is(n.sel.container)||n.$el.addClass(n.cls.container);e=o.selectify(n.opt.classes);return null==e||n.$el.is(e)||n.$el.addClass(n.opt.classes),0===n.$el.children().not(n.sel.item.elem).length&&(n.$el.append(n.createChildren()),n._undo.children=!0),n.opt.protected&&(n.el.oncontextmenu=function(e){return e.preventDefault(),!1}),!n.trigger("pre-init").isDefaultPrevented()},init:function(){return this.trigger("init").isDefaultPrevented()?a.reject("init default prevented"):this.items.fetch()},postInit:function(){var e=this;return!e.destroying&&(!e.trigger("post-init").isDefaultPrevented()&&(e.state.init(),e.pages&&e.pages.init(),i(window).on("popstate"+e.namespace,{self:e},e.onWindowPopState),e.robserver.observe(e.el),!0))},ready:function(){return!this.destroying&&(this.initializing=!1,this.initialized=!0,this.trigger("ready"),!0)},create:function(){return i("<div/>",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return i()},destroy:function(t){var n=this,e=n._super.bind(n);return n.destroyed?a.resolved:(n.destroying=!0,i.Deferred(function(e){n.initializing&&s.promise(n._initialize)?n._initialize.always(function(){n.destroying=!1,n.doDestroy(t),e.resolve()}):(n.destroying=!1,n.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),i(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),s.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),s.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),s.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null!==t._initialize&&(0===(e=!s.number(e)?t.el.getBoundingClientRect().width:e)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e])))},_checkWidth:function(e){var t,n=this;return(t=-1!==n._layoutWidths.indexOf(e))||(n._layoutWidths.unshift(e),n._layoutWidths.splice(2,n._layoutWidths.length-2),null!=n._layoutTimeout&&clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){n._layoutWidths.splice(0,n._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=s.empty(t)?"":t;var e=e instanceof RegExp?e:s.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,n=this.$el.prop("className")||"",n=null!=e?n.match(e):null;return null!=n&&2<=n.length?n[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;s.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,o,n,s,a,l){o.State=o.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),n=a.escapeRegExp(t.getMasked()),i=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+i+".+?"),masked:new RegExp("^#"+n+"\\"+i+".+?"),values:new RegExp("(\\w+)"+r+"([^"+i+"]+)","g")}},destroy:function(e){e||this.clear(),this.opt=this.regex={},this._super()},init:function(){this.set(this.initial())},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==n.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,o=r.tmpl,s={};return r.exists()&&(r.enabled?(s.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var n,i=t.split(r.opt.pair);if(2===i.length)switch(i[0]){case r.opt.itemKey:null!==(n=o.items.fromHash(i[1]))&&(s.item=n);break;case r.opt.pageKey:o.pages&&null!==(n=o.pages.fromHash(i[1]))&&(s.page=n);break;case r.opt.filterKey:o.filter&&null!==(n=o.filter.fromHash(i[1]))&&(s.filter=n)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),s},hashify:function(e){var t,n,i=this,r=i.tmpl;return s.hash(e)?(t=[],null!==(n=r.items.toHash(e.item))&&t.push(i.opt.itemKey+i.opt.pair+n),r.filter&&null!==(n=r.filter.toHash(e.filter))&&t.push(i.opt.filterKey+i.opt.pair+n),r.pages&&null!==(n=r.pages.toHash(e.page))&&t.push(i.opt.pageKey+i.opt.pair+n),0<t.length&&t.unshift("#"+i.getMasked()),t.join(i.opt.values)):""},replace:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.replaceState(n?null:e,"",n?location.pathname+location.search:t))},push:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.pushState(n?null:e,"",n?location.pathname+location.search:t))},update:function(e,t){var n=this;n.enabled&&n.apiEnabled&&(t=n.isPushOrReplace(t)?t:n.pushOrReplace,n[t](e))},clear:function(){this.exists()&&this.replace({})},initial:function(){var e=this.parse();return s.empty(e)?this.get():l.extend({filter:[],page:1,item:null},e)},get:function(e){var t,n=this.tmpl,i={};return e instanceof o.Item&&(i.item=e),n.filter&&null!==(t=n.filter.getState())&&(i.filter=t),n.pages&&null!==(t=n.pages.getState())&&(i.page=t),l.extend({filter:[],page:1,item:null},i)},set:function(e){var t,n,i,r=this.tmpl;s.hash(e)&&(t=l.extend({filter:[],page:1,item:null},e),r.items.reset(),r.trigger("before-state",[t]).isDefaultPrevented()||(r.filter&&r.filter.setState(t),r.pages?r.pages.setState(t):(n=r.items.available(),r.items.isAll(n)||(i=r.items.not(n),r.items.detach(i)),r.items.create(n,!0)),t.item instanceof o.Item&&(this.opt.scrollTo&&t.item.scrollTo(),s.empty(e.item)||(e.item=null,this.replace(e))),this.current=t,r.trigger("after-state",[t])))}}),o.template.configure("core",{state:{enabled:!1,scrollTo:!0,pushOrReplace:"replace",mask:"foogallery-gallery-{id}",values:"/",pair:":",array:"+",arraySeparator:",",itemKey:"i",filterKey:"f",pageKey:"p"}}),o.components.register("state",o.State)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str,FooGallery.utils.obj),function(s,o,n,a,i,l){o.Items=o.Component.extend({construct:function(e){var t=this,e=(t.ALLOW_CREATE=!0,t.ALLOW_APPEND=!0,t.LAYOUT_AFTER_LOAD=!0,t._super(e),t._typeRegex=/(?:^|\s)?fg-type-(.*?)(?:$|\s)/,t._fetched=null,t._all=[],t._available=[],t._unavailable=[],t._observed=new Map,t.tmpl.cls.item.caption);t.tmpl.sel.item.caption.all=n.selectify([e.elem,e.inner,e.title,e.description]),t._wait=[],t._layoutTimeout=null,t.iobserver=new IntersectionObserver(function(e){t.tmpl.destroying||t.tmpl.destroyed||(t.LAYOUT_AFTER_LOAD&&clearTimeout(t._layoutTimeout),e.forEach(function(e){!e.isIntersecting||(e=t._observed.get(e.target))instanceof o.Item&&t._wait.push(e.load())}),t.LAYOUT_AFTER_LOAD&&(t._layoutTimeout=setTimeout(function(){0<t._wait.length&&i.allSettled(t._wait.splice(0)).then(function(){t.tmpl.layout()})},100)))})},fromHash:function(t){return this.find(this._all,function(e){return e.id===t})},toHash:function(e){return e instanceof o.Item?e.id:null},destroy:function(){var e=this,t=e.all();e.iobserver.disconnect(),0<t.length&&(e.tmpl.trigger("destroy-items",[t]),0<(t=s.map(t,function(e){return e.destroy()?e:null})).length&&e.tmpl.trigger("destroyed-items",[t])),e._fetched=null,e._all=[],e._available=[],e._unavailable=[],e._observed.clear(),e._super()},fetch:function(e){var t=this;if(!e&&a.promise(t._fetched))return t._fetched;var e=t.tmpl.id+"_items",n=t.tmpl.sel,i=t.tmpl.opt.items,r=s.Deferred(),o=t.make(t.tmpl.$el.find(n.item.elem));return a.empty(i)?(a.array(window[e])&&o.push.apply(o,t.make(window[e])),r.resolve(o)):a.array(i)?(o.push.apply(o,t.make(i)),r.resolve(o)):a.string(i)?s.get(i).then(function(e){o.push.apply(o,t.make(e)),r.resolve(o)},function(e,t,n){console.log("FooGallery: GET items error.",i,e,t,n),r.resolve(o)}):r.resolve(o),r.then(function(e){t.setAll(e)}),t._fetched=r.promise()},toJSON:function(e){return(e?this.all():this.available()).map(function(e){return e.toJSON()})},all:function(){return this._all.slice()},count:function(e){return(e?this.all():this.available()).length},available:function(e){return a.fn(e)?this._available.filter(e,this):this._available.slice()},unavailable:function(e){return a.fn(e)?this._unavailable.filter(e,this):this._unavailable.slice()},setAll:function(e){this._all=a.array(e)?e:[],this._all.forEach(function(e,t){e.index=t,a.empty(e.id)&&(e.id=t+1+"")}),this._available=this.all(),this._unavailable=[]},setAvailable:function(e){var t=this;t._available=a.array(e)?e:[],t._all.length!==t._available.length?t._unavailable=t._all.filter(function(e){return-1===t._available.indexOf(e)}):t._unavailable=[]},reset:function(){this.setAvailable(this.all())},find:function(e,t){if(t=a.fn(t)?t:function(){return!0},a.array(e))for(var n=0,i=e.length;n<i;n++)if(!0===t.call(this,e[n]))return e[n];return null},not:function(t){var e=this.all();return a.array(t)?e.filter(function(e){return-1===t.indexOf(e)}):e},isAll:function(e){return!!a.array(e)&&this._all.length===e.length},first:function(e){return this.find(this._available,e)},last:function(e){return this.find(this._available.slice().reverse(),e)},next:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},prev:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice().reverse(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},get:function(t,e){e=e?this._all:this._available;return a.number(t)?0<=t&&t<this._all.length?e[t]:null:this.find(e,function(e){return e.el===t})},indexOf:function(e,t){return(t?this._all:this._available).indexOf(e)},creatable:function(e){return this.ALLOW_CREATE&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&!e.isCreated?e:null}):[]},appendable:function(e){return this.ALLOW_APPEND&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&!e.isAttached?e:null}):[]},detachable:function(e){return a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&e.isAttached?e:null}):[]},jquerify:function(e){return s(s.map(e,function(e){return e.$el.get()}))},make:function(e){var i=this,t=[];if(a.jq(e)||a.array(e)){var r=[],e=s.makeArray(e);if(0===e.length)return t;0<(t=!i.tmpl.trigger("make-items",[e]).isDefaultPrevented()?s.map(e,function(e){var t=i.type(e),n=l.extend(a.hash(e)?e:{},{type:t}),t=o.components.make(t,i.tmpl,n);return a.element(e)?t.parse(e)?(r.push(t),i.ALLOW_APPEND||t.detach(),t):null:t}):t).length&&i.tmpl.trigger("made-items",[t]),0<r.length&&i.tmpl.trigger("parsed-items",[r])}return t},type:function(e){var t;return a.hash(e)?t=e.type:!a.element(e)||null!==(e=e.className.match(this._typeRegex))&&2===e.length&&(t=e[1]),a.string(t)&&o.components.contains(t)?t:"image"},create:function(e,t){var n=[],i=this.creatable(e);return 0<i.length&&0<(n=!this.tmpl.trigger("create-items",[i]).isDefaultPrevented()?s.map(i,function(e){return e.create()?e:null}):n).length&&this.tmpl.trigger("created-items",[n]),a.boolean(t)&&t?this.append(e):n},append:function(e){var t=[],e=this.appendable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("append-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.append()?e:null}):t).length&&this.tmpl.trigger("appended-items",[t]),t},detach:function(e){var t=[],e=this.detachable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("detach-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.detach()?e:null}):t).length&&this.tmpl.trigger("detached-items",[t]),t},observe:function(e){!(this.iobserver&&e.isCreated&&e.isAttached)||e.isLoading&&e.isLoaded||(this.iobserver.observe(e.el),this._observed.set(e.el,e))},unobserve:function(e){this.iobserver&&(this.iobserver.unobserve(e.el),this._observed.delete(e.el))}}),o.components.register("items",o.Items)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(y,b,_,w,o,x){b.Item=b.Component.extend({construct:function(e,t){var n=this;n._super(e),n.cls=e.cls.item,n.il8n=e.il8n.item,n.sel=e.sel.item,n.opt=o.extend({},e.opt.item,t),n.isAttached=!1,n.isCreated=!1,n.isDestroyed=!1,n.isLoading=!1,n.isLoaded=!1,n.isError=!1,n.isParsed=!1,n.isPicture=!1,n.$el=null,n.el=null,n.$inner=null,n.$anchor=null,n.$overlay=null,n.$wrap=null,n.$image=null,n.$caption=null,n.$loader=null,n.index=-1,n.type=n.opt.type,n.id=n.opt.id,n.productId=n.opt.productId,n.href=n.opt.href,n.placeholder=n.opt.placeholder,n.src=n.opt.src,n.srcset=n.opt.srcset,n.sources=n.opt.sources,n.width=n.opt.width,n.height=n.opt.height,n.title=n.opt.title,n.alt=n.opt.alt,n.caption=n.opt.caption,n.description=n.opt.description,n.attr=n.opt.attr,n.tags=n.opt.tags,n.maxCaptionLength=n.opt.maxCaptionLength,n.maxDescriptionLength=n.opt.maxDescriptionLength,n.showCaptionTitle=n.opt.showCaptionTitle,n.showCaptionDescription=n.opt.showCaptionDescription,n.noLightbox=n.opt.noLightbox,n.panelHide=n.opt.panelHide,n.exif=n.opt.exif,n.hasExif=w.exif(n.exif),n.ribbon=n.opt.ribbon,n.hasRibbon=w.hash(n.ribbon)&&w.string(n.ribbon.text)&&w.string(n.ribbon.type),n.buttons=n.opt.buttons,n._load=null,n._undo={classes:"",style:"",placeholder:!1}},destroy:function(){var e=this;return e.tmpl.trigger("destroy-item",[e]).isDefaultPrevented()||(e.isDestroyed=e.doDestroyItem()),e.isDestroyed&&(e.tmpl.trigger("destroyed-item",[e]),e._super()),e.isDestroyed},doDestroyItem:function(){var e=this;return e.isParsed?(e.$anchor.add(e.$caption).off("click.foogallery"),e.append(),e.tmpl.items.unobserve(e),w.empty(e._undo.classes)?e.$el.removeAttr("class"):e.$el.attr("class",e._undo.classes),w.empty(e._undo.style)?e.$el.removeAttr("style"):e.$el.attr("style",e._undo.style),e._undo.placeholder&&e.$image.prop("src")===e.placeholder&&e.$image.removeAttr("src")):e.isCreated&&(e.detach(),e.$el.remove()),!0},parse:function(e){var t=this,e=y(e);return!t.tmpl.trigger("parse-item",[t,e]).isDefaultPrevented()&&(t.isCreated=e.is(t.sel.elem))&&(t.isParsed=t.doParseItem(e)),t.isParsed&&(t.isLoaded||t.tmpl.items.observe(t),t.tmpl.trigger("parsed-item",[t])),t.isParsed},doParseItem:function(e){var n=this,t=n.cls,i=n.sel,r=e.get(0);if(n._undo.classes=e.attr("class")||"",n._undo.style=e.attr("style")||"",n.$el=e.data(b.DATA_ITEM,n),n.el=r,n.$inner=y(r.querySelector(i.inner)),n.$anchor=y(r.querySelector(i.anchor)).on("click.foogallery",{self:n},n.onAnchorClick),n.$image=y(r.querySelector(i.image)),n.$caption=y(r.querySelector(i.caption.elem)).on("click.foogallery",{self:n},n.onCaptionClick),n.$overlay=y(r.querySelector(i.overlay)),n.$wrap=y(r.querySelector(i.wrap)),n.$loader=y(r.querySelector(i.loader)),!(n.$el.length&&n.$inner.length&&n.$anchor.length&&n.$image.length))return console.error("FooGallery Error: Invalid HTML markup. Check the item markup for additional elements or malformed HTML in the title or description.",n),n.isError=!0,n.tmpl.trigger("error-item",[n]),0!==n.$el.length&&n.$el.remove(),!1;n.isAttached=null!==r.parentNode,n.isLoading=n.$el.hasClass(t.loading),n.isLoaded=n.$el.hasClass(t.loaded),n.isError=n.$el.hasClass(t.error);var e=n.$anchor.data(),i=(n.id=e.id||n.id,n.productId=e.productId||n.productId,n.tags=e.tags||n.tags,n.href=e.href||n.$anchor.attr("href")||n.href,r=n.$image.is("picture")?(n.isPicture=!0,n.sources=n.$image.find("source").map(function(e,t){return{srcset:t.getAttribute(n.tmpl.opt.srcset),type:t.getAttribute("type"),media:t.getAttribute("media"),sizes:t.getAttribute("sizes")}}).get(),n.$image.find("img")):n.$image,n.src=r.attr(n.tmpl.opt.src)||n.src,n.srcset=r.attr(n.tmpl.opt.srcset)||n.srcset,n.width=parseInt(r.attr("width"))||n.width,n.height=parseInt(r.attr("height"))||n.height,n.title=r.attr("title")||n.title,n.alt=r.attr("alt")||n.alt,n.caption=e.title||e.captionTitle||n.caption,n.description=e.description||e.captionDesc||n.description,n.noLightbox=n.$anchor.hasClass(t.noLightbox),n.panelHide=n.$anchor.hasClass(t.panelHide),w.exif(e.exif)&&(n.exif=o.extend(n.exif,e.exif),n.hasExif=!0),0<n.maxCaptionLength&&((e=x.trimTo(n.caption,n.maxCaptionLength))!==n.caption&&n.$caption.find(i.caption.title).html(e)),!n.maxDescriptionLength||(e=x.trimTo(n.description,n.maxDescriptionLength))!==n.description&&n.$caption.find(i.caption.description).html(e),r.get(0)),e=(w.string(i.src)&&0!==i.src.length||(w.string(n.placeholder)&&0!==n.placeholder.length||(n.placeholder=n.createPlaceholder(n.width,n.height)),0<n.placeholder.length&&(i.src=n.placeholder,n._undo.placeholder=!0)),n.getTypeClass());return n.$el.hasClass(e)||n.$el.addClass(e),n.hasExif&&!n.$el.hasClass(t.exif)&&n.$el.addClass(t.exif),!n.isCreated||!n.isAttached||n.isLoading||n.isLoaded||n.isError||n.$el.hasClass(t.idle)||n.$el.addClass(t.idle),n.doShortPixel(),!0},create:function(){var e=this;return!e.isCreated&&w.string(e.href)&&w.string(e.src)&&w.number(e.width)&&w.number(e.height)&&(e.tmpl.trigger("create-item",[e]).isDefaultPrevented()||(e.isCreated=e.doCreateItem()),e.isCreated&&e.tmpl.trigger("created-item",[e])),e.isCreated},_setAttributes:function(t,n){Object.keys(n).forEach(function(e){w.empty(n[e])||t.setAttribute(e,w.string(n[e])?n[e]:JSON.stringify(n[e]))})},doShortPixel:function(){var e,t=this;function n(e,t,n){return"/"===t||"/"===n?"/":t}t.tmpl.opt.shortpixel&&!b.supportsWebP&&(t.href=t.href.replace(e=/([\/,+])to_webp([\/,+])/i,n),t.src=t.src.replace(e,n),t.srcset=t.srcset.replace(e,n))},doCreateItem:function(){var i,u,r=this,e=r.cls,t=r.attr,n=r.hasExif?e.exif:"",o=(r.isLoaded=!r.tmpl.opt.lazy,r.isPicture=0<r.sources.length,r.doShortPixel(),document.createElement("div")),n=(r._setAttributes(o,t.elem),o.className=[e.elem,r.getTypeClass(),n,r.isLoaded?e.loaded:e.idle].join(" "),document.createElement("figure")),s=(r._setAttributes(n,t.inner),n.className=e.inner,[e.anchor]),a=(r.noLightbox&&s.push(e.noLightbox),r.panelHide&&s.push(e.panelHide),document.createElement("a")),s=(r._setAttributes(a,t.anchor),r._setAttributes(a,{class:s.join(" "),href:r.href,"data-id":r.id,"data-type":r.type,"data-title":r.caption,"data-description":r.description,"data-tags":r.tags,"data-exif":r.exif,"data-product-id":r.productId}),w.string(r.placeholder)&&0!==r.placeholder.length||(r.placeholder=r.createPlaceholder(r.width,r.height)),document.createElement("img")),l=(r._setAttributes(s,t.image),{class:e.image,src:r.placeholder,width:r.width+"",height:r.height+"",title:r.title,alt:r.alt}),l=(r.isLoaded?(l.src=r.src,l.srcset=r.srcset):(l[r.tmpl.opt.src]=r.src,l[r.tmpl.opt.srcset]=r.srcset),r._setAttributes(s,l),r.isPicture&&(i=document.createElement("picture"),r._setAttributes(i,t.picture),r.sources.forEach(function(e){var t=document.createElement("source"),n={media:e.media,sizes:e.sizes,type:e.type};r.isLoaded?n.srcset=e.srcset:n[r.tmpl.opt.srcset]=e.srcset,r._setAttributes(t,n),i.appendChild(t)}),i.appendChild(s)),r.hasRibbon&&((u=document.createElement("div")).className=r.ribbon.type,(l=document.createElement("span")).innerHTML=r.ribbon.text,u.appendChild(l)),document.createElement("span")),h=(l.className=e.overlay,document.createElement("span")),p=(h.className=e.wrap,document.createElement("div")),d=(p.className=e.loader,document.createElement("figcaption")),f=(r._setAttributes(d,t.caption.elem),d.className=e.caption.elem,document.createElement("div")),c=(r._setAttributes(f,t.caption.inner),f.className=e.caption.inner,null),g=r.showCaptionTitle&&w.string(r.caption)&&0<r.caption.length,c=(g&&(c=document.createElement("div"),r._setAttributes(c,t.caption.title),c.className=e.caption.title,c.innerHTML=0<r.maxCaptionLength?x.trimTo(r.caption,r.maxCaptionLength):r.caption,f.appendChild(c)),null),m=r.showCaptionDescription&&w.string(r.description)&&0<r.description.length,v=(m&&(c=document.createElement("div"),r._setAttributes(c,t.caption.description),c.className=e.caption.description,c.innerHTML=0<r.maxDescriptionLength?x.trimTo(r.description,r.maxDescriptionLength):r.description,f.appendChild(c)),null),t=w.array(r.buttons)&&0<r.buttons.length;return t&&((v=document.createElement("div")).className=e.caption.buttons,_.each(r.buttons,function(e){var t;w.hash(e)&&w.string(e.text)&&((t=document.createElement("a")).innerHTML=e.text,w.string(e.url)&&0<e.url.length&&(t.href=e.url),w.string(e.rel)&&0<e.rel.length&&(t.rel=e.rel),w.string(e.target)&&0<e.target.length&&(t.target=e.target),w.string(e.classes)&&0<e.classes.length&&(t.className=e.classes),w.hash(e.attr)&&r._setAttributes(t,e.attr),v.appendChild(t))}),f.appendChild(v)),d.appendChild(f),r.isPicture?h.appendChild(i):h.appendChild(s),a.appendChild(l),a.appendChild(h),n.appendChild(a),(g||m||t)&&n.appendChild(d),r.hasRibbon&&o.appendChild(u),o.appendChild(n),o.appendChild(p),r.$el=y(o).data(b.DATA_ITEM,r),r.el=o,r.$inner=y(n),r.$anchor=y(a).on("click.foogallery",{self:r},r.onAnchorClick),r.$overlay=y(l),r.$wrap=y(h),r.isPicture?r.$image=y(i):r.$image=y(s),r.$caption=y(d).on("click.foogallery",{self:r},r.onCaptionClick),r.$loader=y(p),!0},append:function(){var e=this;return e.isCreated&&!e.isAttached&&(e.tmpl.trigger("append-item",[e]).isDefaultPrevented()||(e.tmpl.$el.append(e.$el.removeClass(e.cls.hidden)),e.isAttached=!0),e.isAttached&&(e.isLoaded||e.tmpl.items.observe(e),e.tmpl.trigger("appended-item",[e]))),e.isAttached},detach:function(){var e=this;return e.isCreated&&e.isAttached&&(e.tmpl.items.unobserve(e),e.tmpl.trigger("detach-item",[e]).isDefaultPrevented()||(e.$el.detach().removeClass(e.cls.hidden),e.isAttached=!1),e.isAttached||e.tmpl.trigger("detached-item",[e])),!e.isAttached},load:function(){var n=this;return w.promise(n._load)?n._load:n._load=y.Deferred(function(t){return n.isLoaded?t.resolve(n):n.isCreated&&n.isAttached?n.tmpl.trigger("load-item",[n]).isDefaultPrevented()?t.reject("default prevented"):(n.isLoading=!0,n.tmpl.items.unobserve(n),n.$el.removeClass(n.cls.idle).removeClass(n.cls.hidden).removeClass(n.cls.loaded).removeClass(n.cls.error).addClass(n.cls.loading),void n.loadIMG().then(function(){n.isLoading=!1,n.isLoaded=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.loaded),n.tmpl.trigger("loaded-item",[n]),t.resolve(n)},function(e){n.isLoading=!1,n.isError=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.error),n.tmpl.trigger("error-item",[n]),t.reject(e)})):t.reject("not created or attached")}).promise()},loadIMG:function(){var o=this;return new y.Deferred(function(e){var t=(o.isPicture?o.$image.find("img"):o.$image).get(0);if(!t)return e.reject("Unable to find img element.");var n=t.src,i=t.srcset,r=(t.onload=function(){t.onload=t.onerror=null,t.style.removeProperty("width"),t.style.removeProperty("height"),e.resolve(t)},t.onerror=function(){t.onload=t.onerror=null,w.empty(n)?t.removeAttribute("src"):t.src=n,w.empty(i)?t.removeAttribute("srcset"):t.srcset=i,e.reject(t)},o.isPicture&&o.$image.find("source").each(function(e,t){var n=t.getAttribute(o.tmpl.opt.srcset);w.empty(n)||(t.srcset=n)}),t.getBoundingClientRect());t.style.width=r.width,t.style.height=r.height,t.src=o.src,w.empty(o.srcset)||(t.srcset=o.srcset),t.complete&&t.onload()}).promise()},createPlaceholder:function(e,t){return w.number(e)&&w.number(t)?"data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22"+e+"%22%20height=%22"+t+"%22%20viewBox=%220%200%20"+e+"%20"+t+"%22%3E%3C/svg%3E":""},getTypeClass:function(){return this.cls.types[this.type]||""},scrollTo:function(e){var t;return this.isAttached&&((t=this.$el.get(0)).scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView("top"===e)),this},updateState:function(){this.tmpl.state.update(this.tmpl.state.get(this))},toJSON:function(){return{type:this.type,id:this.id,productId:this.productId,href:this.href,src:this.src,srcset:this.srcset,width:this.width,height:this.height,alt:this.alt,title:this.title,caption:this.caption,description:this.description,tags:this.tags.slice(),maxCaptionLength:this.maxCaptionLength,maxDescriptionLength:this.maxDescriptionLength,showCaptionTitle:this.showCaptionTitle,showCaptionDescription:this.showCaptionDescription,noLightbox:this.noLightbox,panelHide:this.panelHide,attr:o.extend({},this.attr)}},onAnchorClick:function(e){var t=e.data.self;t.tmpl.trigger("anchor-click-item",[t]).isDefaultPrevented()?e.preventDefault():t.updateState()},onCaptionClick:function(e){var t=e.data.self;!t.tmpl.trigger("caption-click-item",[t]).isDefaultPrevented()&&0<t.$anchor.length&&!y(e.target).is("a[href],:input")&&t.$anchor.get(0).click()}}),b.template.configure("core",{item:{type:"item",id:"",href:"",placeholder:"",src:"",srcset:"",sources:[],width:0,height:0,title:"",alt:"",caption:"",description:"",tags:[],maxCaptionLength:0,maxDescriptionLength:0,showCaptionTitle:!0,showCaptionDescription:!0,noLightbox:!1,panelHide:!1,buttons:[],ribbon:{type:null,text:null},exif:{aperture:null,camera:null,created_timestamp:null,shutter_speed:null,focal_length:null,iso:null,orientation:null},attr:{elem:{},inner:{},anchor:{},image:{},picture:{},caption:{elem:{},inner:{},title:{},description:{}}}}},{item:{elem:"fg-item",inner:"fg-item-inner",exif:"fg-item-exif",anchor:"fg-thumb",overlay:"fg-image-overlay",wrap:"fg-image-wrap",image:"fg-image",loader:"fg-loader",idle:"fg-idle",loading:"fg-loading",loaded:"fg-loaded",error:"fg-error",hidden:"fg-hidden",noLightbox:"fg-no-lightbox",panelHide:"fg-panel-hide",types:{item:"fg-type-unknown"},caption:{elem:"fg-caption",inner:"fg-caption-inner",title:"fg-caption-title",description:"fg-caption-desc",buttons:"fg-caption-buttons",button:"fg-caption-button"}}},{item:{exif:{aperture:"Aperture",camera:"Camera",created_timestamp:"Date",shutter_speed:"Exposure",focal_length:"Focal Length",iso:"ISO",orientation:"Orientation"}}}),b.components.register("item",b.Item)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj),FooGallery.utils.str),function(e){e.Image=e.Item.extend({}),e.template.configure("core",null,{item:{types:{image:"fg-type-image"}}}),e.components.register("image",e.Image)}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(e,c,u){e.PagingFactory=e.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o,s){t=this._super(e,t,s);return t&&((s=this.registered)[e].ctrl=c.fn(n)?n:null,s[e].opt=c.hash(i)?i:{},s[e].cls=c.hash(r)?r:{},s[e].il8n=c.hash(o)?o:{}),t},type:function(e){var t;return c.hash(e)&&c.hash(t=e.paging)&&c.string(t.type)&&this.contains(t.type)?t.type:null},merge:function(e){e=u.extend({},e);var t=this.type(e),n=this.registered,i=n.default.opt,r=n.default.cls,o=n.default.il8n,s=c.hash(e.paging)?e.paging:{},a=c.hash(e.cls)&&c.hash(e.cls.paging)?u.extend({},e.cls.paging):{},l=c.hash(e.il8n)&&c.hash(e.il8n.paging)?u.extend({},e.il8n.paging):{};return c.hash(e.cls)||(e.cls={}),c.hash(e.il8n)||(e.il8n={}),"default"!==t&&this.contains(t)?(e.paging=u.extend({},i,n[t].opt,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:n[t].cls},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:n[t].il8n},{paging:l})):(e.paging=u.extend({},i,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:l})),e},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,u.extend(r[e].opt,t),u.extend(r[e].cls,n),u.extend(r[e].il8n,i))},hasCtrl:function(e){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)},makeCtrl:function(e,t,n,i){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)?new e.ctrl(t,n,i):null}}),e.paging=new e.PagingFactory}(FooGallery,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(t,o,i,l){o.Paging=o.Component.extend({construct:function(e){var t=this;t._super(e),t.opt=t.tmpl.opt.paging,t.cls=t.tmpl.cls.paging,t.il8n=t.tmpl.il8n.paging,t.sel=t.tmpl.sel.paging,t.pushOrReplace=t.opt.pushOrReplace,t.type=t.opt.type,t.theme=t.opt.theme,t.size=t.opt.size,t.position=t.opt.position,t.scrollToTop=t.opt.scrollToTop,t.current=0,t.total=0,t.ctrls=[],t._pages=[]},init:function(){},fromHash:function(e){e=parseInt(e);return isNaN(e)?null:e},toHash:function(e){return l.number(e)&&0<e?e.toString():null},getState:function(){return this.isValid(this.current)?this.current:null},setState:function(e){this.rebuild();var t=!1;e.item&&!this.contains(e.page,e.item)&&(e.page=this.find(e.item),e.page=0!==e.page?e.page:1,t=!0),this.set(e.page,t,!1,!1)},destroy:function(){var e=this;e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e._super()},build:function(){var e=this,t=e.tmpl.items.available();e.total=0<e.size&&0<t.length?Math.ceil(t.length/e.size):1;for(var n,i,r=0;r<e.total;r++)e._pages.push(t.splice(0,e.size));1<e.total&&o.paging.hasCtrl(e.type)&&("both"!==(n=e.position)&&"top"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"top")).create()&&(i.append(),e.ctrls.push(i)),"both"!==n&&"bottom"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"bottom")).create()&&(i.append(),e.ctrls.push(i)))},rebuild:function(){var e=this;e.current=0,e.total=0,e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e.build()},all:function(){return this._pages.slice()},available:function(){return this.get(this.current)},controls:function(n){this.isValid(n)&&t.each(this.ctrls,function(e,t){t.update(n)})},isValid:function(e){return l.number(e)&&0<e&&e<=this.total},number:function(e){return this.isValid(e)?e:0===this.current?1:this.current},create:function(e,t){var n=this,i=(e=n.number(e))-1,r=n._pages[i],t=t?n.tmpl.items.all():n._pages.reduce(function(e,t,n){return n===i?e:e.concat(t)},n.tmpl.items.unavailable());n.current=e,n.tmpl.items.detach(t),n.tmpl.items.create(r,!0)},get:function(e){return this.isValid(e)?(e=this.number(e),this._pages[e-1]):[]},set:function(e,t,n,i){var r=this;if(r.isValid(e)){r.controls(e);var o,s,a=r.number(e);if(a!==r.current)return s=r.current,!r.tmpl.trigger("before-page-change",[r.current,a,e=function(){var e;n=!l.boolean(n)||n,i=!!l.boolean(i)&&i,n&&1===r.current&&!r.tmpl.state.exists()&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.create(a,i),n&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.tmpl.trigger("page-change",[r.current,s,i]),r.scrollToTop&&l.boolean(t)&&t&&(0<(e=r.get(r.current)).length&&e[0].scrollTo("top")),r.tmpl.trigger("after-page-change",[r.current,s,i])},i]).isDefaultPrevented()&&(e(),!0)}return!1},find:function(e){for(var t=0,n=this._pages.length;t<n;t++)if(-1!==i.inArray(e,this._pages[t]))return t+1;return 0},contains:function(e,t){e=this.get(e);return-1!==i.inArray(t,e)},first:function(){this.goto(1)},last:function(){this.goto(this._pages.length)},prev:function(){this.goto(this.current-1)},next:function(){this.goto(this.current+1)},goto:function(e){this.set(e,!0)}}),o.PagingControl=o.Component.extend({construct:function(e,t,n){var i=this;i._super(e),i.pages=t,i.position=n,i.$container=null,i._containerExisted=!1,i._placeholderClasses=[]},create:function(){var n=this;return n.$container=t("#"+n.tmpl.id+"_paging-"+n.position),0<n.$container.length?(n._containerExisted=!0,n.$container.removeClass(function(e,t){return n._placeholderClasses=t.match(/(^|\s)fg-ph-\S+/g)||[],n._placeholderClasses.join(" ")}).addClass([n.pages.cls.container,n.pages.theme].join(" "))):n.$container=t("<nav/>",{class:[n.pages.cls.container,n.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),o.paging.register("default",o.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,n){this._super(e,t,n),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,n=e.pages.cls,i=e.pages.il8n,r=[],o=l("<ul/>",{class:n.list}),s=0,a=e.pages.total;s<a;s++)r.push(t=e.createItem(s+1,i.page)),o.append(t);return e.$list=o,e.$items=l(l.map(r,function(e){return e.get()})),e.$container.append(o),!0}return!1},destroy:function(){var e=this,t=e.pages.sel;e.$list.find(t.link).off("click.foogallery",e.onLinkClick),e.$list=l(),e.$items=l(),e._super()},update:function(e){this.setSelected(e-1)},setSelected:function(e){var t=this,n=t.pages.cls,r=t.pages.il8n,o=t.pages.sel;t.$items.filter(o.selected).removeClass(n.selected).each(function(e,t){var t=l(t),n=t.data("label"),t=t.find(o.reader);a.string(n)&&0!==t.length&&t.html(n)}),t.$items.eq(e).addClass(n.selected).each(function(e,t){var t=l(t),n=t.find(o.reader),i=n.html();a.string(i)&&0!==n.length&&(t.data("label",i),n.html(r.current))})},createItem:function(e,t,n,i,r){n=a.string(n)?n:e,t=a.string(t)?t:"";var o=this.pages.opt,s=this.pages.cls,n=l("<a/>",{class:s.link,href:"#page-"+e}).html(n).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||n.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,o.limit+"")),r=a.string(r)?r:t,a.empty(r)||n.prepend(l("<span/>",{class:s.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,o.limit+"")})),l("<li/>",{class:s.item}).append(n));return i=a.string(i)?i:"",a.empty(i)||e.addClass(i),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,n=t.pages.sel;l(this).closest(n.item).is(n.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(e){e.DefaultTemplate=e.Template.extend({}),e.template.register("default",e.DefaultTemplate,null,{container:"foogallery fg-default"})}((FooGallery.$,FooGallery),FooGallery.utils),function(e){e.MasonryTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.masonry=null,n.on({"pre-init":n.onPreInit,destroyed:n.onDestroyed,"appended-items":n.onAppendedItems,"detach-item":n.onDetachItem,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){var e=this,t=e.sel,n=e.$el.hasClass("fg-fixed");e.template.isFitWidth=n,e.template.percentPosition=!n,e.template.transitionDuration=0,e.template.itemSelector=t.item.elem,n||(e.template.gutter=t.gutterWidth,e.template.columnWidth=t.columnWidth),e.masonry=new Masonry(e.el,e.template)},onDestroyed:function(){this.masonry instanceof Masonry&&this.masonry.destroy()},onLayoutRequired:function(){this.masonry.layout()},onPageChange:function(e,t,n,i){i||this.masonry.layout()},onAppendedItems:function(e,t){t=t.map(function(e){return e.el}),t=this.masonry.addItems(t);this.masonry.layoutItems(t,!0)},onDetachItem:function(e,t){e.isDefaultPrevented()||(e.preventDefault(),this.masonry.remove(t.el),t.$el.removeClass(this.cls.hidden),t.isAttached=!1)}}),e.template.register("masonry",e.MasonryTemplate,{template:{}},{container:"foogallery fg-masonry",columnWidth:"fg-column-width",gutterWidth:"fg-gutter-width"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(i,r,e,o){r.Justified=e.Class.extend({construct:function(e,t){var n=this;n.tmpl=e,n.$el=e.$el,n.options=i.extend(!0,{},r.Justified.defaults,t),n._items=[],n.maxRowHeight=0,n.borderSize=0,n.align=-1!==["left","center","right"].indexOf(n.options.align)?n.options.align:"center"},init:function(){var e=this;e.maxRowHeight=e.getMaxRowHeight(e.options.maxRowHeight,e.options.rowHeight),e.borderSize=e.getBorderSize()},destroy:function(){this.$el.removeAttr("style")},getBorderSize:function(){switch(this.tmpl.getCSSClass("border","")){case"fg-border-thin":return 4;case"fg-border-medium":return 10;case"fg-border-thick":return 16;default:return 0}},getMaxRowHeight:function(e,t){var n;return o.string(e)?(n=parseInt(e),isNaN(n)?t:n<=0?1/0:-1!==e.indexOf("%")?t*(n/100):n):o.number(e)?e<=0?1/0:e:t},layout:function(e){var n,i=this;0<(e=!o.number(e)?i.$el.width():e)&&(0!==(n=i.createRows(e)).height&&0<n.rows.length&&(i.$el.height(n.height),n.rows.forEach(function(e,t){i.render(e,t===n.rows.length-1)})))},render:function(t,e){var n=this,i=!e&&"justify"!==n.options.lastRow;t.items.forEach(function(e){e.elem&&(t.visible?(e.elem.style.setProperty("position","absolute"),e.elem.style.setProperty("width",e.width+"px"),e.elem.style.setProperty("height",e.height+"px"),e.elem.style.setProperty("top",e.top+"px"),e.elem.style.setProperty("left",e.left+"px"),e.elem.style.setProperty("margin","0"),e.elem.style.removeProperty("display"),0<n.maxRowHeight&&i?e.elem.style.setProperty("max-height",n.maxRowHeight+2*n.borderSize+"px"):e.elem.style.removeProperty("max-height"),e.elem.classList.contains("fg-positioned")||e.elem.classList.add("fg-positioned")):e.elem.style.setProperty("display","none"))})},justify:function(n,i,e,t){var r=this,o=r.options.margins,s=o*(n.items.length-1),e=e-s,a=n.width-s,l=e/a,c=(n.width=a*l,n.height=n.height*l,n.height>t+2*r.borderSize&&(a=(t+2*r.borderSize)/n.height,n.width=n.width*a,n.height=n.height*a),n.top=i,n.left=0,"left"!==r.align&&n.width<e&&("right"===r.align?n.left=e-n.width:n.left=(e-n.width)/2),n.width+=s,n.left);return n.items.forEach(function(e,t){0<t&&(c+=o),e.left=c,e.top=i;t=n.height/e.height;e.width=e.width*t,e.height=e.height*t,c+=e.width}),n.height},createRows:function(o){var s=this,a=s.options.margins,i=s.tmpl.getAvailable(),l=[],r=-1;function p(){return{index:++r,visible:!0,width:0,height:s.options.rowHeight+2*s.borderSize,top:0,left:0,items:[]}}var c=p(),u=0,h=0;if(i.forEach(function(e){r=c.height,t=e.width,(n=e.height)!==r&&(n*=i=r/n,t*=i),i=s.maxRowHeight/r;var t,n,i,r={__item:e,elem:e.el,width:t,height:n,maxWidth:t*i,maxHeight:n*i,top:0,left:0};c.width+r.width>o&&0<c.items.length&&(0<l.length&&(u+=a),e=s.justify(c,u,o,s.maxRowHeight),h<e&&(h=e),u+=e,l.push(c),c=p()),0<c.items.length&&(c.width+=a),c.width+=r.width,c.items.push(r)}),0<c.items.length){var e=u+a;switch(s.options.lastRow){case"smart":var t,d,n=s.justify(c,e,o,s.maxRowHeight);0!==h&&h<n&&(t=h/n,d=c.width*t/o,(t<.9||d<.9)&&(n=s.justify(c,e,o,h-2*s.borderSize)));break;case"justify":n=s.justify(c,e,o,99999);break;case"hide":n=s.justify(c,e,o,s.maxRowHeight),c.width<o&&(c.visible=!1)}c.visible&&(u+=n+a),l.push(c)}return{height:u,rows:l}}}),r.Justified.defaults={rowHeight:150,maxRowHeight:"200%",margins:0,align:"center",lastRow:"smart"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(e){e.JustifiedTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.justified=null,n.on({"pre-init":n.onPreInit,init:n.onInit,destroyed:n.onDestroyed,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){this.justified=new e.Justified(this,this.template)},onInit:function(){this.justified.init()},onDestroyed:function(){this.justified instanceof e.Justified&&this.justified.destroy()},onLayoutRequired:function(){this.justified.layout(this.lastWidth)},onPageChange:function(e,t,n,i){i||this.justified.layout(this.lastWidth)}}),e.template.register("justified",e.JustifiedTemplate,null,{container:"foogallery fg-justified"})}((FooGallery.$,FooGallery)),function(e){e.PortfolioTemplate=e.Template.extend({}),e.template.register("simple_portfolio",e.PortfolioTemplate,{},{container:"foogallery fg-simple_portfolio"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn)),function(i,e,r){e.ImageViewerTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t),n.$inner=i(),n.$current=i(),n.$total=i(),n.$prev=i(),n.$next=i(),n.on({"pre-init":n.onPreInit,init:n.onInit,destroy:n.onDestroy,"append-item":n.onAppendItem,"after-page-change":n.onAfterPageChange,"after-filter-change":n.onAfterFilterChange},n)},createChildren:function(){var e=this;return i("<div/>",{class:e.cls.inner}).append(i("<div/>",{class:e.cls.innerContainer}),i("<div/>",{class:e.cls.controls}).append(i("<div/>",{class:e.cls.prev}).append(i("<span/>",{text:e.il8n.prev})),i("<label/>",{class:e.cls.count,text:e.il8n.count}).prepend(i("<span/>",{class:e.cls.countCurrent,text:"0"})).append(i("<span/>",{class:e.cls.countTotal,text:"0"})),i("<div/>",{class:e.cls.next}).append(i("<span/>",{text:e.il8n.next}))))},destroyChildren:function(){this.$el.find(this.sel.inner).remove()},onPreInit:function(e){var t=this;t.$inner=t.$el.find(t.sel.innerContainer),t.$current=t.$el.find(t.sel.countCurrent),t.$total=t.$el.find(t.sel.countTotal),t.$prev=t.$el.find(t.sel.prev),t.$next=t.$el.find(t.sel.next)},onInit:function(e){var t=this;t.template.attachFooBox&&t.$el.on("foobox.previous",{self:t},t.onFooBoxPrev).on("foobox.next",{self:t},t.onFooBoxNext),t.$prev.on("click",{self:t},t.onPrevClick),t.$next.on("click",{self:t},t.onNextClick)},onDestroy:function(e){var t=this;t.template.attachFooBox&&t.$el.off({"foobox.previous":t.onFooBoxPrev,"foobox.next":t.onFooBoxNext}),t.$prev.off("click",t.onPrevClick),t.$next.off("click",t.onNextClick)},onAppendItem:function(e,t){e.preventDefault(),this.$inner.append(t.$el),t.isAttached=!0},onAfterPageChange:function(e,t,n,i){i||this.update()},onAfterFilterChange:function(e){this.update()},update:function(){this.pages&&(this.$current.text(this.pages.current),this.$total.text(this.pages.total))},prev:function(){this.pages&&(this.template.loop&&1===this.pages.current?this.pages.last():this.pages.prev(),this.update())},next:function(){this.pages&&(this.template.loop&&this.pages.current===this.pages.total?this.pages.first():this.pages.next(),this.update())},onFooBoxPrev:function(e){e.data.self.prev()},onFooBoxNext:function(e){e.data.self.next()},onPrevClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.prev()},onNextClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.next()}}),e.template.register("image-viewer",e.ImageViewerTemplate,{template:{attachFooBox:!1,loop:!1}},{container:"foogallery fg-image-viewer",inner:"fiv-inner",innerContainer:"fiv-inner-container",controls:"fiv-ctrls",prev:"fiv-prev",next:"fiv-next",count:"fiv-count",countCurrent:"fiv-count-current",countTotal:"fiv-count-total"},{prev:"Prev",next:"Next",count:"of"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.obj)),function(e,n){e.ThumbnailTemplate=e.Template.extend({construct:function(e,t){this._super(n.extend({},e,{filtering:{type:"none"},paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t)}}),e.template.register("thumbnail",e.ThumbnailTemplate,null,{container:"foogallery fg-thumbnail"})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(i,o,e,l,r,s){o.StackAlbum=e.Class.extend({construct:function(e,t){var n=this;n.$el=l.jq(e)?e:i(e),n.el=n.$el.get(0),n.opt=r.extend({},o.StackAlbum.defaults,t,n.$el.data("foogallery")),n.$back=n.$el.find(".fg-header-back"),n.$active=n.$el.find(".fg-header-active"),n.$piles=n.$el.find(".fg-piles"),n.piles=n.$piles.find(".fg-pile").map(function(e,t){return new o.StackAlbum.Pile(n,t,{index:e})}).get(),n.ignoreResize=!1,n.robserver=new ResizeObserver(function(){!n.ignoreResize&&n.$el.is(":visible")&&n.layout(!0)})},init:function(){var e=this;e.piles.forEach(function(e){e.init()}),e.$back.on("click.foogallery",{self:e},e.onBackClick),e.robserver.observe(e.el)},destroy:function(){this.robserver.disconnect(),this.$back.off(".foogallery"),this.piles.forEach(function(e){e.destroy()})},getLayoutInfo:function(){var e=this,t=e.opt.gutter+2*e.opt.border;return{maxWidth:e.$el.width(),space:t,halfSpace:t/2,itemWidth:e.opt.itemWidth,itemHeight:e.opt.itemHeight,itemOuterWidth:e.opt.itemWidth+2*e.opt.border,itemOuterHeight:e.opt.itemHeight+2*e.opt.border,blockWidth:e.opt.itemWidth+t,blockHeight:e.opt.itemHeight+t,border:e.opt.border,doubleBorder:2*e.opt.border,gutter:e.opt.gutter,halfGutter:e.opt.gutter/2}},layout:function(e){var t,n=this;e&&(n.$el.addClass("fg-disable-transitions"),n.$el.prop("offsetWidth")),n.hasActive?(t=n.activePile.layout(),n.activePile.setPosition(0,0,t.width,t.height)):t=n.layoutPiles(),n.$piles.css({width:t.width+"px",height:t.height+"px"}),e&&n.$el.removeClass("fg-disable-transitions")},layoutPiles:function(i){var r=this.getLayoutInfo(),o=0,s=1,a=0;return i=l.fn(i)?i:function(){},this.piles.forEach(function(e){var t=o,n=((o+=r.blockWidth)>r.maxWidth&&(t=0,o=r.blockWidth,s++),r.blockHeight*(s-1));i(e,n,t,r.blockWidth,r.blockHeight),e.setPosition(n,t,r.blockWidth,r.blockHeight),a<o&&(a=o)}),{width:a,height:r.blockHeight*s}},setActive:function(t){var n,i=this,e=i.activePile,r=e instanceof o.StackAlbum.Pile;t=t instanceof o.StackAlbum.Pile?t:null,i.activePile=t,i.hasActive=null!==t,r&&e.collapse(),i.ignoreResize=!0,i.hasActive?(i.piles.forEach(function(e){e!==t&&e.hide(i.activePile)}),n=i.activePile.expand(),i.$active.text(t.title),i.$el.addClass("fg-has-active")):(n=i.layoutPiles(function(e){e.show()}),i.$el.removeClass("fg-has-active")),s.start(i.$piles,function(e){e.css({width:n.width+"px",height:n.height+"px"})},null,350).then(function(){i.ignoreResize=!1})},onBackClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.setActive(null)}}),o.StackAlbum.defaults={gutter:50,itemWidth:150,itemHeight:150,border:10,angleStep:1,randomAngle:!1}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.transition),function(r,o,e,s,a){o.StackAlbum.Pile=e.Class.extend({construct:function(e,t,n){var i=this;i.album=e,i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Pile.defaults,n,i.$el.data()),i.title=i.opt.title,i.items=i.$el.find(".fg-pile-item").map(function(e,t){return new o.StackAlbum.Item(i,t,{index:e})}).get(),i.$cover=r("<div/>",{class:"fg-pile-cover"}).append(r("<div/>",{class:"fg-pile-cover-content"}).append(r("<span/>",{class:"fg-pile-cover-title",text:i.opt.title}),r("<span/>",{class:"fg-pile-cover-count",text:i.items.length}))),i.top=0,i.left=0,i.isExpanded=!1},init:function(){var n=this,i=n.album.opt,r=n.getAngles(i.angleStep),o=i.randomAngle?n.randomAngle(r):i.angleStep;n.$cover.on("click.foogallery",{self:n},n.onCoverClick),n.items.forEach(function(e,t){e.init(),3<t||(0===t?(e.$el.addClass("fg-has-cover").append(n.$cover),e.load()):(t%2==0?e.setAngle(-o):e.setAngle(o),i.randomAngle?o=n.randomAngle(r):o+=i.angleStep))})},destroy:function(){this.$cover.remove(),this.items.forEach(function(e,t){0===t&&e.$el.removeClass("fg-has-cover"),e.destroy()})},getAngles:function(e){for(var t=[],n=1;n<=3;n++)t.push(n*e);return t},randomAngle:function(e){var t=e.length,t=Math.floor(Math.random()*+t+0),e=e.splice(t,1);return 1===e.length?e[0]:0},setPosition:function(e,t,n,i){this.top=e,this.left=t,s.number(n)&&s.number(i)?this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"}):this.$el.css({top:e+"px",left:t+"px"})},layout:function(){var i=this.album.getLayoutInfo(),r=0,o=1,s=!1,a=0;return this.items.forEach(function(e){(r+=i.halfGutter)>i.maxWidth&&(r=i.halfGutter,o++,s=!0);var t=r,n=(r+=i.itemOuterWidth+i.halfGutter,!s&&r>i.maxWidth&&(t=i.halfGutter,r=i.blockWidth,o++),i.blockHeight*(o-1)+i.halfGutter);s=!1,e.setPosition(n,t,i.itemOuterWidth,i.itemOuterHeight),e.isLoaded||e.load(),a<r&&(a=r)}),{width:a,height:i.blockHeight*o}},expand:function(){var e;return this.$el.removeClass("fg-collapsed").addClass("fg-expanded"),e=this.layout(),this.setPosition(0,0,e.width,e.height),this.isExpanded=!0,e},collapse:function(){var e=this,t=e.album.getLayoutInfo(),n=(e.$el.removeClass("fg-expanded").addClass("fg-collapsed"),e.items.forEach(function(e){e.setPosition(t.halfGutter,t.halfGutter,t.itemOuterWidth,t.itemOuterHeight)}),{width:t.blockWidth,height:t.blockHeight});return e.setPosition(0,0,n.width,n.height),e.isExpanded=!1,n},show:function(){this.$el.removeClass("fg-hidden fg-expanded fg-collapsed")},hide:function(e){e instanceof o.StackAlbum.Pile&&this.setPosition(e.top,e.left),this.$el.addClass("fg-hidden")},onCoverClick:function(e){e.preventDefault(),e.stopPropagation();e=e.data.self;e.album.setActive(e)}}),o.StackAlbum.Pile.defaults={index:-1,title:null}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,o,e,s,a){o.StackAlbum.Item=e.Class.extend({construct:function(e,t,n){var i=this;i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Item.defaults,n,i.$el.data()),i.$thumb=i.$el.find(".fg-pile-item-thumb"),i.$image=i.$el.find(".fg-pile-item-image"),i.isLoaded=!1,i.isLoading=!1,i._loading=null},init:function(){},destroy:function(){},setAngle:function(e){this.$el.css({transform:"rotate("+e+"deg)"})},setPosition:function(e,t,n,i){this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"})},load:function(){var t=this;return s.promise(t._loading)?t._loading:t._loading=r.Deferred(function(e){t.$el.addClass("fg-loading"),t.isLoading=!0,t.$image.on({"load.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.resolve()},"error.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.reject()}}),t.$image.prop("src",t.$image.attr(t.opt.src)).prop("srcset",t.$image.attr(t.opt.srcset))}).promise()}}),o.StackAlbum.Item.defaults={index:-1,src:"data-src-fg",srcset:"data-srcset-fg"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(i,r,e){i.fn.foogalleryStackAlbum=function(e){return this.each(function(e,t){var t=i(t),n=t.data("__FooGalleryAlbum__");n instanceof r.StackAlbum&&n.destroy(),(n=new r.StackAlbum(t)).init(),t.data("__FooGalleryAlbum__",n)})},r.loadStackAlbums=r.reloadStackAlbums=function(){i(function(){i(".foogallery-stack-album:not(.fg-ready)").foogalleryStackAlbum()}),e.ready(function(){i(".foogallery-stack-album.fg-ready").foogalleryStackAlbum()})},r.loadStackAlbums()}(FooGallery.$,FooGallery,FooGallery.utils),function(u,e,o,d){o.Progress=o.EventClass.extend({construct:function(e){var t=this;t._super(),t.percent=0,t.tickRate=d.number(e)?e:100,t.isPaused=!1,t.isActive=!1,t._intervalId=null,t._total=0,t._target=null,t.onTick=t.onTick.bind(t)},destroy:function(){this._reset(),this._super()},_reset:function(){var e=this;null!==e._intervalId&&clearInterval(e._intervalId),e.percent=0,e._total=0,e._intervalId=null,e._target=null,e.isActive=!1,e.isPaused=!1},stop:function(){this.isActive&&(this._reset(),this.trigger("stop"))},start:function(e){var t=this;t.stop(),!t.isActive&&d.number(e)&&0<e&&(t._total=1e3*e,t._target=Date.now()+t._total,t._intervalId=setInterval(t.onTick,t.tickRate),t.isActive=!0,t.trigger("start"))},pause:function(){var e=this;e.isActive&&!e.isPaused&&e.percent<100&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isPaused=!0,e.trigger("pause"))},resume:function(){var e,t=this;t.isActive&&t.isPaused?(e=t._total-t._total*t.percent/100,t._target=Date.now()+e,t._intervalId=setInterval(t.onTick,t.tickRate),t.isPaused=!1,t.trigger("resume")):0<t._total&&t.start(t._total/1e3)},onTick:function(){var e=this,t=e._total-Math.max(e._target-Date.now(),0);e.percent=Math.min(t/e._total*100,100),e.trigger("tick",[e.percent]),100<=e.percent&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isActive=!1,e.trigger("complete"))}}),u.Carousel=o.Class.extend({construct:function(e,t,n,i){var r=this;r.tmpl=e,r.el=e.el,r.opt=t,r.cls=n,r.sel=i,r.elem={inner:null,center:null,bottom:null,prev:null,next:null,progress:null},r.activeItem=null,r._itemWidth=0,r._leftExclude=[r.sel.activeItem,r.sel.nextItem].join(","),r._rightExclude=[r.sel.activeItem,r.sel.prevItem].join(","),r._centerListeners=new o.DOMEventListeners,r._listeners=new o.DOMEventListeners,r._progress=new o.Progress,r._canHover=window.matchMedia("(hover: hover)").matches,r.cache=new Map,r.timeouts=new o.Timeouts,r.interacted=!1,r.isRTL=!1,r._firstLayout=!0},getScreenX:function(e,t,n){return n/(n+t)*e},getVectorX:function(e,t,n){return(n+t)/n*e},getSequentialZFromScale:function(e,t,n){return n*(t*(e+1))},scaleToZ:function(e,t,n){return e*(1-t/(n+t))},pause:function(){this._progress.pause()},resume:function(){this._progress.resume()},start:function(){"disable"===this.opt.autoplay.interaction&&this.interacted||this._progress.start(this.opt.autoplay.time)},stop:function(){this._progress.stop()},init:function(){var e=this;e.isRTL="rtl"===window.getComputedStyle(e.el).direction,e.elem={inner:e.el.querySelector(e.sel.inner),center:e.el.querySelector(e.sel.center),bottom:e.el.querySelector(e.sel.bottom),prev:e.el.querySelector(e.sel.prev),next:e.el.querySelector(e.sel.next),progress:e.el.querySelector(e.sel.progress)},150!==e.opt.perspective&&e.el.style.setProperty("--fg-carousel-perspective",e.opt.perspective+"px")},postInit:function(){var e=this;e.activeItem=e.tmpl.items.first(),e.initNavigation(),e.initPagination(),e.initSwipe(),e.initAutoplay()},initNavigation:function(){const t=this;t._listeners.add(t.elem.prev,"click",function(e){e.preventDefault(),t.interacted=!0,t.previous()}),"button"!==t.elem.prev.type&&(t.elem.prev.type="button"),t.elem.prev.appendChild(e.element("arrow-left")),t._listeners.add(t.elem.next,"click",function(e){e.preventDefault(),t.interacted=!0,t.next()}),"button"!==t.elem.next.type&&(t.elem.next.type="button"),t.elem.next.appendChild(e.element("arrow-right"))},initPagination:function(){const n=this;var e=n.tmpl.items.count();for(let t=0;t<e;t++){const i=document.createElement("button");i.type="button",i.classList.add(n.cls.bullet),0===t&&i.classList.add(n.cls.activeBullet),n._listeners.add(i,"click",function(e){e.preventDefault(),n.interacted=!0,n.goto(n.tmpl.items.get(t))}),n.elem.bottom.appendChild(i)}},initSwipe:function(){const t=this;let n=0,i;t._listeners.add(t.elem.inner,"touchstart",function(e){t.interacted=!0,n=e.changedTouches[0].screenX},{passive:!0}),t._listeners.add(t.elem.inner,"touchend",function(e){i=e.changedTouches[0].screenX,i<n?t.next():t.previous(),n=0},{passive:!0})},initAutoplay:function(){const n=this,t=n.opt.autoplay;if(!(t.time<=0)&&n.elem.progress instanceof HTMLElement){const i=n.elem.progress.style;function e(e,t){o.cancelFrame(null),o.requestFrame(function(){i.setProperty("width",e+"%"),t?i.setProperty("transition-duration","0s"):i.setProperty("transition-duration",n._progress.tickRate+"ms")})}n._progress.on({"start stop":function(){e(0,!0)},"pause resume":function(){e(n._progress.percent,!0)},tick:function(){e(n._progress.percent,!1)},complete:function(){n.next(function(){n._progress.start(t.time)})}}),"pause"===t.interaction&&(n._canHover?(n._listeners.add(n.el,"mouseenter",function(e){n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"mouseleave",function(e){n._progress.resume()},{passive:!0})):(n._listeners.add(n.el,"touchstart",function(e){n.timeouts.delete("autoplay"),n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"touchend",function(e){n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*t.time)},{passive:!0}))),n._progress.start(t.time)}},getFirst:function(){return this.tmpl.items.first()},getNext:function(e){return this.tmpl.items.next(e instanceof u.Item?e:this.activeItem,null,!0)},getPrev:function(e){return this.tmpl.items.prev(e instanceof u.Item?e:this.activeItem,null,!0)},goto:function(e,t){const n=this;if(e instanceof u.Item){const i=n.opt.autoplay,r=!n._canHover&&n.timeouts.has("autoplay"),o=(n.timeouts.delete("autoplay"),n.timeouts.delete("navigation"),n._progress.isPaused);n._progress.isActive&&n._progress.stop(),n.activeItem=e,n.layout(),n.timeouts.set("navigation",function(){0<i.time&&("pause"===i.interaction||"disable"===i.interaction&&!n.interacted)&&(n._progress.start(i.time),o&&n._progress.pause(),r&&n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*i.time)),d.fn(t)&&t.call(n)},n.opt.speed)}},next:function(e){this.goto(this.getNext(),e)},previous:function(e){this.goto(this.getPrev(),e)},destroy:function(){var e=this;e.cache.clear(),e.timeouts.clear(),e._listeners.clear(),e._centerListeners.clear(),150!==e.opt.perspective&&e.el.style.removeProperty("--fg-carousel-perspective")},layout:function(e){const t=this;if(null===t.activeItem&&(t.activeItem=t.tmpl.items.first()),!d.number(e)&&t.cache.has("width")&&(e=t.cache.get("width")),d.number(e)){const n=t.getLayout(e);null!==t._layoutFrame&&o.cancelFrame(t._layoutFrame),t._layoutFrame=o.requestFrame(function(){t._layoutFrame=null,t.renderActive(n)&&(t.renderSide("left",t.sel.prevItem,t._leftExclude,t.cls.prevItem,n),t.renderSide("right",t.sel.nextItem,t._rightExclude,t.cls.nextItem,n),t._firstLayout=!1)})}},getLayout:function(e){var t=this;if(t.cache.has("layout")&&t.cache.get("width")===e)return t.cache.get("layout");var n=t.elem.center.getBoundingClientRect().width,i=t.elem.inner.getBoundingClientRect().width/2+n/2,n=t.calculate(n,i);return t.cache.set("width",e),t.cache.set("layout",n),n},round:function(e,t){t=Math.pow(10,t||0);return Math.round(e*t)/t},getShowPerSide:function(){var e=this.tmpl.items.count();let t=this.opt.maxItems;return("auto"===t||t<=0)&&(t=e%2==0?e-1:e),t%2==0&&--t,t<1&&(t=1),t>e&&(t=e%2==0?e-1:e),(t-1)/2},calculate:function(t,n,i,r){var o=this;d.number(i)||(i=o.opt.gutter.max);const s={zIndex:(r=!d.number(r)?o.getShowPerSide():r)+10,gutter:i,perSide:r,side:[]};let a=t,h=s.zIndex-1;for(let e=0;e<r;e++,h--){var l=o.getSequentialZFromScale(e,o.opt.scale,o.opt.perspective),c=o.scaleToZ(t,l,o.opt.perspective),p=(t-c)/2,u=(a-=p,"%"===o.opt.gutter.unit?t*Math.abs(i/100):Math.abs(i)),u="%"===o.opt.gutter.unit?o.scaleToZ(u,l,o.opt.perspective):u;if(0<i?a+=u:a-=u,a+c+p>n)return i-1<o.opt.gutter.min?o.calculate(t,n,o.opt.gutter.max,r-1):o.calculate(t,n,i-1,r);u=o.getVectorX(a,l,o.opt.perspective);a+=c+p,s.side.push({x:u,z:l,zIndex:h})}return s},cleanup:function(e,t,n){const i=this,r=d.string(n);Array.from(i.el.querySelectorAll(e)).forEach(function(e){e.classList.remove(t),i.opt.centerOnClick&&i._centerListeners.remove(e,"click"),r&&e.matches(n)||(e.style.removeProperty("transition-duration"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"))})},renderActive:function(e){const n=this;if(!(n.activeItem instanceof u.Item))return!1;const t=n.activeItem.el,i=(n.cleanup(n.sel.activeItem,n.cls.activeItem),t.classList.add(n.cls.activeItem),t.style.setProperty("transition-duration",n.opt.speed+"ms"),t.style.setProperty("z-index",e.zIndex),t.style.removeProperty("transform"),n.tmpl.items.indexOf(n.activeItem));return Array.from(n.el.querySelectorAll(n.sel.bullet)).forEach(function(e,t){e.classList.remove(n.cls.activeBullet),t===i&&e.classList.add(n.cls.activeBullet)}),!0},renderSide:function(n,e,i,r,o){const s=this;if(-1!==["left","right"].indexOf(n)){s.cleanup(e,r,i);let t=s.activeItem;for(let e=0;e<o.side.length;e++){var a=o.side[e];const c="left"===n?s.getPrev(t):s.getNext(t);if(!(c instanceof u.Item))break;var l="translate3d("+("left"===n&&!s.isRTL||"right"===n&&s.isRTL?"-":"")+a.x+"px, 0,-"+a.z+"px)";c.el.classList.add(r),c.isLoaded||(c.el.style.setProperty("transition-duration","0ms"),c.el.style.setProperty("transform","translate3d(0,0,-"+s.opt.perspective+"px)"),c.el.offsetHeight),c.el.style.setProperty("transition-duration",(s._firstLayout?0:s.opt.speed)+"ms"),c.el.style.setProperty("transform",l),c.el.style.setProperty("z-index",a.zIndex),s.opt.centerOnClick&&s._centerListeners.add(c.el,"click",function(e){e.preventDefault(),e.stopPropagation(),s.interacted=!0,s.goto(c)},!0),t=c}}}})}((FooGallery.$,FooGallery),FooGallery.icons,FooGallery.utils,FooGallery.utils.is),function(i,r){i.CarouselTemplate=i.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{type:"none"}}),t),n.items.LAYOUT_AFTER_LOAD=!1,n.carousel=null,n.on({"pre-init":n.onPreInit,init:n.onInit,"post-init":n.onPostInit,destroyed:n.onDestroyed,"append-item":n.onAppendItem,"after-filter-change":n.onAfterFilterChange,layout:n.onLayout},n),i.Panel&&n.lightbox instanceof i.Panel&&n.lightbox.on({open:n.onLightboxOpen,closed:n.onLightboxClosed,next:n.onLightboxNext,prev:n.onLightboxPrev},n)},onPreInit:function(){var e=this;e.carousel=new i.Carousel(e,e.template,e.cls.carousel,e.sel.carousel)},onInit:function(){this.carousel.init()},onPostInit:function(){this.carousel.postInit()},onDestroyed:function(){this.carousel instanceof i.Carousel&&this.carousel.destroy()},onAppendItem:function(e,t){e.preventDefault(),this.carousel.elem.inner.appendChild(t.el),t.isAttached=!0},onAfterFilterChange:function(){this.carousel.cache.delete("layout"),this.carousel.interacted=!0,this.carousel.goto(this.carousel.getFirst())},onLayout:function(){this.carousel.layout(this.lastWidth)},onLightboxOpen:function(){this.carousel.interacted=!0,this.carousel.stop()},onLightboxClosed:function(){this.carousel.start()},onLightboxNext:function(){this.carousel.next()},onLightboxPrev:function(){this.carousel.previous()}}),i.template.register("carousel",i.CarouselTemplate,{template:{maxItems:0,perspective:150,scale:.12,speed:300,centerOnClick:!0,gutter:{min:-40,max:-20,unit:"%"},autoplay:{time:0,interaction:"pause"}}},{container:"foogallery fg-carousel",carousel:{inner:"fg-carousel-inner",center:"fg-carousel-center",bottom:"fg-carousel-bottom",prev:"fg-carousel-prev",next:"fg-carousel-next",bullet:"fg-carousel-bullet",activeBullet:"fg-bullet-active",activeItem:"fg-item-active",prevItem:"fg-item-prev",nextItem:"fg-item-next",progress:"fg-carousel-progress"}})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(s,a,e,t,i){a.triggerPostLoad=function(e,t,n,i){var r,o=e.target;if(o instanceof a.Template&&o.initialized&&("after-page-change"===e.type&&!i||"after-filter-change"===e.type))try{if(0<o.$el.parents(".fbx-item").length)return;o.$el.hasClass("fbx-instance")&&window.FOOBOX&&s.fn.foobox?(r=s.extend({},window.FOOBOX.o,o.opt.protected?{images:{noRightClick:!0}}:{}),o.$el.foobox(r)):s("body").trigger("post-load")}catch(e){console.error(e)}},a.autoDefaults={on:{"after-page-change after-filter-change":a.triggerPostLoad}},a.autoEnabled=!0,a.auto=function(e){a.autoDefaults=t.merge(a.autoDefaults,e)},a.globalsMerged=!1,a.mergeGlobals=function(){if(!0!==a.globalsMerged&&window.FooGallery_il8n&&i.object(window.FooGallery_il8n)){var e,t=window.FooGallery_il8n;for(e in t)if(t.hasOwnProperty(e)&&a[e]instanceof a.Factory&&i.object(t[e]))for(var n in t[e])t[e].hasOwnProperty(n)&&a[e].configure(n,null,null,t[e][n]);a.globalsMerged=!0}},a.load=a.reload=function(){s(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(a.autoDefaults)}),e.ready(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"].fg-ready').foogallery(a.autoDefaults)})},a.load()}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.obj,FooGallery.utils.is);
foogallery.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
- Version: 2.2.6
7
  Author: FooPlugins
8
  Plugin URI: https://fooplugins.com/foogallery-wordpress-gallery-plugin/
9
  Author URI: https://fooplugins.com
@@ -25,7 +25,7 @@ if ( function_exists( 'foogallery_fs' ) ) {
25
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
26
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
27
  define( 'FOOGALLERY_FILE', __FILE__ );
28
- define( 'FOOGALLERY_VERSION', '2.2.6' );
29
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
30
  require_once FOOGALLERY_PATH . 'includes/constants.php';
31
  // Create a helper function for easy SDK access.
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
+ Version: 2.2.7
7
  Author: FooPlugins
8
  Plugin URI: https://fooplugins.com/foogallery-wordpress-gallery-plugin/
9
  Author URI: https://fooplugins.com
25
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
26
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
27
  define( 'FOOGALLERY_FILE', __FILE__ );
28
+ define( 'FOOGALLERY_VERSION', '2.2.7' );
29
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
30
  require_once FOOGALLERY_PATH . 'includes/constants.php';
31
  // Create a helper function for easy SDK access.
freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
1
- label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id="license_not_whitelabeled"].success,.fs-notice[data-id="license_whitelabeled"].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id="license_not_whitelabeled"].success label.fs-plugin-title,.fs-notice[data-id="license_whitelabeled"].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id="license_not_whitelabeled"].success,.fs-notice[data-id="license_whitelabeled"].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id="license_not_whitelabeled"].success label.fs-plugin-title,.fs-notice[data-id="license_whitelabeled"].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
freemius/assets/css/admin/add-ons.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
- #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
+ #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
freemius/assets/css/admin/affiliation.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
1
+ @charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
freemius/assets/css/admin/checkout.css CHANGED
@@ -1 +1 @@
1
- @media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
1
+ @media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
freemius/assets/css/admin/debug.css CHANGED
@@ -1 +1 @@
1
- .fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
1
+ .fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
freemius/assets/css/admin/dialog-boxes.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
- .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
+ .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
freemius/assets/css/admin/gdpr-optin-notice.css CHANGED
@@ -1 +1 @@
1
- .fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
1
+ .fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
freemius/assets/css/admin/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/css/admin/plugins.css CHANGED
@@ -1 +1 @@
1
- label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
freemius/assets/css/customizer.css CHANGED
@@ -1 +1 @@
1
- #fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
1
+ #fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
freemius/assets/css/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/img/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/js/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/js/nojquery.ba-postmessage.js CHANGED
@@ -1,140 +1,140 @@
1
- /*!
2
- * jQuery postMessage - v0.5 - 9/11/2009
3
- * http://benalman.com/projects/jquery-postmessage-plugin/
4
- *
5
- * Copyright (c) 2009 "Cowboy" Ben Alman
6
- * Dual licensed under the MIT and GPL licenses.
7
- * http://benalman.com/about/license/
8
- *
9
- * Non-jQuery fork by Jeff Lee
10
- *
11
- * This fork consists of the following changes:
12
- * 1. Basic code cleanup and restructuring, for legibility.
13
- * 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
14
- * in terms of both function names and object scope. Scope is specified by
15
- * the the "this" context of NoJQueryPostMessageMixin();
16
- * 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
17
- * at least three different GitHub users requesting the removal of this
18
- * "Opera sniff" on the original project's Issues page, so I figured this
19
- * would be a relatively safe change.
20
- * 4. `postMessage` no longer uses `$.param` to serialize messages that are not
21
- * strings. I actually prefer this structure anyway. `receiveMessage` does
22
- * not implement a corresponding deserialization step, and as such it seems
23
- * cleaner and more symmetric to leave both data serialization and
24
- * deserialization to the client.
25
- * 5. The use of `$.isFunction` is replaced by a functionally-identical check.
26
- * 6. The `$:nomunge` YUI option is no longer necessary.
27
- */
28
-
29
- function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
30
-
31
- var setMessageCallback, unsetMessageCallback, currentMsgCallback,
32
- intervalId, lastHash, cacheBust = 1;
33
-
34
- if (window.postMessage) {
35
-
36
- if (window.addEventListener) {
37
- setMessageCallback = function(callback) {
38
- window.addEventListener('message', callback, false);
39
- }
40
-
41
- unsetMessageCallback = function(callback) {
42
- window.removeEventListener('message', callback, false);
43
- }
44
- } else {
45
- setMessageCallback = function(callback) {
46
- window.attachEvent('onmessage', callback);
47
- }
48
-
49
- unsetMessageCallback = function(callback) {
50
- window.detachEvent('onmessage', callback);
51
- }
52
- }
53
-
54
- this[postBinding] = function(message, targetUrl, target) {
55
- if (!targetUrl) {
56
- return;
57
- }
58
-
59
- // The browser supports window.postMessage, so call it with a targetOrigin
60
- // set appropriately, based on the targetUrl parameter.
61
- target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
62
- }
63
-
64
- // Since the browser supports window.postMessage, the callback will be
65
- // bound to the actual event associated with window.postMessage.
66
- this[receiveBinding] = function(callback, sourceOrigin, delay) {
67
- // Unbind an existing callback if it exists.
68
- if (currentMsgCallback) {
69
- unsetMessageCallback(currentMsgCallback);
70
- currentMsgCallback = null;
71
- }
72
-
73
- if (!callback) {
74
- return false;
75
- }
76
-
77
- // Bind the callback. A reference to the callback is stored for ease of
78
- // unbinding.
79
- currentMsgCallback = setMessageCallback(function(e) {
80
- switch(Object.prototype.toString.call(sourceOrigin)) {
81
- case '[object String]':
82
- if (sourceOrigin !== e.origin) {
83
- return false;
84
- }
85
- break;
86
- case '[object Function]':
87
- if (sourceOrigin(e.origin)) {
88
- return false;
89
- }
90
- break;
91
- }
92
-
93
- callback(e);
94
- });
95
- };
96
-
97
- } else {
98
-
99
- this[postBinding] = function(message, targetUrl, target) {
100
- if (!targetUrl) {
101
- return;
102
- }
103
-
104
- // The browser does not support window.postMessage, so set the location
105
- // of the target to targetUrl#message. A bit ugly, but it works! A cache
106
- // bust parameter is added to ensure that repeat messages trigger the
107
- // callback.
108
- target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
109
- }
110
-
111
- // Since the browser sucks, a polling loop will be started, and the
112
- // callback will be called whenever the location.hash changes.
113
- this[receiveBinding] = function(callback, sourceOrigin, delay) {
114
- if (intervalId) {
115
- clearInterval(intervalId);
116
- intervalId = null;
117
- }
118
-
119
- if (callback) {
120
- delay = typeof sourceOrigin === 'number'
121
- ? sourceOrigin
122
- : typeof delay === 'number'
123
- ? delay
124
- : 100;
125
-
126
- intervalId = setInterval(function(){
127
- var hash = document.location.hash,
128
- re = /^#?\d+&/;
129
- if ( hash !== lastHash && re.test( hash ) ) {
130
- lastHash = hash;
131
- callback({ data: hash.replace( re, '' ) });
132
- }
133
- }, delay );
134
- }
135
- };
136
-
137
- }
138
-
139
- return this;
140
  }
1
+ /*!
2
+ * jQuery postMessage - v0.5 - 9/11/2009
3
+ * http://benalman.com/projects/jquery-postmessage-plugin/
4
+ *
5
+ * Copyright (c) 2009 "Cowboy" Ben Alman
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://benalman.com/about/license/
8
+ *
9
+ * Non-jQuery fork by Jeff Lee
10
+ *
11
+ * This fork consists of the following changes:
12
+ * 1. Basic code cleanup and restructuring, for legibility.
13
+ * 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
14
+ * in terms of both function names and object scope. Scope is specified by
15
+ * the the "this" context of NoJQueryPostMessageMixin();
16
+ * 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
17
+ * at least three different GitHub users requesting the removal of this
18
+ * "Opera sniff" on the original project's Issues page, so I figured this
19
+ * would be a relatively safe change.
20
+ * 4. `postMessage` no longer uses `$.param` to serialize messages that are not
21
+ * strings. I actually prefer this structure anyway. `receiveMessage` does
22
+ * not implement a corresponding deserialization step, and as such it seems
23
+ * cleaner and more symmetric to leave both data serialization and
24
+ * deserialization to the client.
25
+ * 5. The use of `$.isFunction` is replaced by a functionally-identical check.
26
+ * 6. The `$:nomunge` YUI option is no longer necessary.
27
+ */
28
+
29
+ function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
30
+
31
+ var setMessageCallback, unsetMessageCallback, currentMsgCallback,
32
+ intervalId, lastHash, cacheBust = 1;
33
+
34
+ if (window.postMessage) {
35
+
36
+ if (window.addEventListener) {
37
+ setMessageCallback = function(callback) {
38
+ window.addEventListener('message', callback, false);
39
+ }
40
+
41
+ unsetMessageCallback = function(callback) {
42
+ window.removeEventListener('message', callback, false);
43
+ }
44
+ } else {
45
+ setMessageCallback = function(callback) {
46
+ window.attachEvent('onmessage', callback);
47
+ }
48
+
49
+ unsetMessageCallback = function(callback) {
50
+ window.detachEvent('onmessage', callback);
51
+ }
52
+ }
53
+
54
+ this[postBinding] = function(message, targetUrl, target) {
55
+ if (!targetUrl) {
56
+ return;
57
+ }
58
+
59
+ // The browser supports window.postMessage, so call it with a targetOrigin
60
+ // set appropriately, based on the targetUrl parameter.
61
+ target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
62
+ }
63
+
64
+ // Since the browser supports window.postMessage, the callback will be
65
+ // bound to the actual event associated with window.postMessage.
66
+ this[receiveBinding] = function(callback, sourceOrigin, delay) {
67
+ // Unbind an existing callback if it exists.
68
+ if (currentMsgCallback) {
69
+ unsetMessageCallback(currentMsgCallback);
70
+ currentMsgCallback = null;
71
+ }
72
+
73
+ if (!callback) {
74
+ return false;
75
+ }
76
+
77
+ // Bind the callback. A reference to the callback is stored for ease of
78
+ // unbinding.
79
+ currentMsgCallback = setMessageCallback(function(e) {
80
+ switch(Object.prototype.toString.call(sourceOrigin)) {
81
+ case '[object String]':
82
+ if (sourceOrigin !== e.origin) {
83
+ return false;
84
+ }
85
+ break;
86
+ case '[object Function]':
87
+ if (sourceOrigin(e.origin)) {
88
+ return false;
89
+ }
90
+ break;
91
+ }
92
+
93
+ callback(e);
94
+ });
95
+ };
96
+
97
+ } else {
98
+
99
+ this[postBinding] = function(message, targetUrl, target) {
100
+ if (!targetUrl) {
101
+ return;
102
+ }
103
+
104
+ // The browser does not support window.postMessage, so set the location
105
+ // of the target to targetUrl#message. A bit ugly, but it works! A cache
106
+ // bust parameter is added to ensure that repeat messages trigger the
107
+ // callback.
108
+ target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
109
+ }
110
+
111
+ // Since the browser sucks, a polling loop will be started, and the
112
+ // callback will be called whenever the location.hash changes.
113
+ this[receiveBinding] = function(callback, sourceOrigin, delay) {
114
+ if (intervalId) {
115
+ clearInterval(intervalId);
116
+ intervalId = null;
117
+ }
118
+
119
+ if (callback) {
120
+ delay = typeof sourceOrigin === 'number'
121
+ ? sourceOrigin
122
+ : typeof delay === 'number'
123
+ ? delay
124
+ : 100;
125
+
126
+ intervalId = setInterval(function(){
127
+ var hash = document.location.hash,
128
+ re = /^#?\d+&/;
129
+ if ( hash !== lastHash && re.test( hash ) ) {
130
+ lastHash = hash;
131
+ callback({ data: hash.replace( re, '' ) });
132
+ }
133
+ }, delay );
134
+ }
135
+ };
136
+
137
+ }
138
+
139
+ return this;
140
  }
freemius/assets/js/nojquery.ba-postmessage.min.js CHANGED
@@ -1,12 +1,12 @@
1
- /*
2
- * nojquery-postmessage by Jeff Lee
3
- * a non-jQuery fork of:
4
- *
5
- * jQuery postMessage - v0.5 - 9/11/2009
6
- * http://benalman.com/projects/jquery-postmessage-plugin/
7
- *
8
- * Copyright (c) 2009 "Cowboy" Ben Alman
9
- * Dual licensed under the MIT and GPL licenses.
10
- * http://benalman.com/about/license/
11
- */
12
  function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
1
+ /*
2
+ * nojquery-postmessage by Jeff Lee
3
+ * a non-jQuery fork of:
4
+ *
5
+ * jQuery postMessage - v0.5 - 9/11/2009
6
+ * http://benalman.com/projects/jquery-postmessage-plugin/
7
+ *
8
+ * Copyright (c) 2009 "Cowboy" Ben Alman
9
+ * Dual licensed under the MIT and GPL licenses.
10
+ * http://benalman.com/about/license/
11
+ */
12
  function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
freemius/assets/js/postmessage.js CHANGED
@@ -1,135 +1,135 @@
1
- (function ($, undef) {
2
- var global = this;
3
-
4
- // Namespace.
5
- global.FS = global.FS || {};
6
-
7
- global.FS.PostMessage = function ()
8
- {
9
- var
10
- _is_child = false,
11
- _postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
12
- _callbacks = {},
13
- _base_url,
14
- _parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
15
- _parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
16
- _init = function () {
17
- _postman.receiveMessage(function (e) {
18
- var data = JSON.parse(e.data);
19
-
20
- if (_callbacks[data.type]) {
21
- for (var i = 0; i < _callbacks[data.type].length; i++) {
22
- // Execute type callbacks.
23
- _callbacks[data.type][i](data.data);
24
- }
25
- }
26
- }, _base_url);
27
- },
28
- _hasParent = ('' !== _parent_url),
29
- $window = $(window),
30
- $html = $('html');
31
-
32
- return {
33
- init : function (url, iframes)
34
- {
35
- _base_url = url;
36
- _init();
37
-
38
- // Automatically receive forward messages.
39
- FS.PostMessage.receiveOnce('forward', function (data){
40
- window.location = data.url;
41
- });
42
-
43
- iframes = iframes || [];
44
-
45
- if (iframes.length > 0) {
46
- $window.on('scroll', function () {
47
- for (var i = 0; i < iframes.length; i++) {
48
- FS.PostMessage.postScroll(iframes[i]);
49
- }
50
- });
51
- }
52
- },
53
- init_child : function ()
54
- {
55
- this.init(_parent_subdomain);
56
-
57
- _is_child = true;
58
-
59
- // Post height of a child right after window is loaded.
60
- $(window).bind('load', function () {
61
- FS.PostMessage.postHeight();
62
-
63
- // Post message that window was loaded.
64
- FS.PostMessage.post('loaded');
65
- });
66
- },
67
- hasParent : function ()
68
- {
69
- return _hasParent;
70
- },
71
- postHeight : function (diff, wrapper) {
72
- diff = diff || 0;
73
- wrapper = wrapper || '#wrap_section';
74
- this.post('height', {
75
- height: diff + $(wrapper).outerHeight(true)
76
- });
77
- },
78
- postScroll : function (iframe) {
79
- this.post('scroll', {
80
- top: $window.scrollTop(),
81
- height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
82
- }, iframe);
83
- },
84
- post : function (type, data, iframe)
85
- {
86
- console.debug('PostMessage.post', type);
87
-
88
- if (iframe)
89
- {
90
- // Post to iframe.
91
- _postman.postMessage(JSON.stringify({
92
- type: type,
93
- data: data
94
- }), iframe.src, iframe.contentWindow);
95
- }
96
- else {
97
- // Post to parent.
98
- _postman.postMessage(JSON.stringify({
99
- type: type,
100
- data: data
101
- }), _parent_url, window.parent);
102
- }
103
- },
104
- receive: function (type, callback)
105
- {
106
- console.debug('PostMessage.receive', type);
107
-
108
- if (undef === _callbacks[type])
109
- _callbacks[type] = [];
110
-
111
- _callbacks[type].push(callback);
112
- },
113
- receiveOnce: function (type, callback)
114
- {
115
- if (this.is_set(type))
116
- return;
117
-
118
- this.receive(type, callback);
119
- },
120
- // Check if any callbacks assigned to a specified message type.
121
- is_set: function (type)
122
- {
123
- return (undef != _callbacks[type]);
124
- },
125
- parent_url: function ()
126
- {
127
- return _parent_url;
128
- },
129
- parent_subdomain: function ()
130
- {
131
- return _parent_subdomain;
132
- }
133
- };
134
- }();
135
  })(jQuery);
1
+ (function ($, undef) {
2
+ var global = this;
3
+
4
+ // Namespace.
5
+ global.FS = global.FS || {};
6
+
7
+ global.FS.PostMessage = function ()
8
+ {
9
+ var
10
+ _is_child = false,
11
+ _postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
12
+ _callbacks = {},
13
+ _base_url,
14
+ _parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
15
+ _parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
16
+ _init = function () {
17
+ _postman.receiveMessage(function (e) {
18
+ var data = JSON.parse(e.data);
19
+
20
+ if (_callbacks[data.type]) {
21
+ for (var i = 0; i < _callbacks[data.type].length; i++) {
22
+ // Execute type callbacks.
23
+ _callbacks[data.type][i](data.data);
24
+ }
25
+ }
26
+ }, _base_url);
27
+ },
28
+ _hasParent = ('' !== _parent_url),
29
+ $window = $(window),
30
+ $html = $('html');
31
+
32
+ return {
33
+ init : function (url, iframes)
34
+ {
35
+ _base_url = url;
36
+ _init();
37
+
38
+ // Automatically receive forward messages.
39
+ FS.PostMessage.receiveOnce('forward', function (data){
40
+ window.location = data.url;
41
+ });
42
+
43
+ iframes = iframes || [];
44
+
45
+ if (iframes.length > 0) {
46
+ $window.on('scroll', function () {
47
+ for (var i = 0; i < iframes.length; i++) {
48
+ FS.PostMessage.postScroll(iframes[i]);
49
+ }
50
+ });
51
+ }
52
+ },
53
+ init_child : function ()
54
+ {
55
+ this.init(_parent_subdomain);
56
+
57
+ _is_child = true;
58
+
59
+ // Post height of a child right after window is loaded.
60
+ $(window).bind('load', function () {
61
+ FS.PostMessage.postHeight();
62
+
63
+ // Post message that window was loaded.
64
+ FS.PostMessage.post('loaded');
65
+ });
66
+ },
67
+ hasParent : function ()
68
+ {
69
+ return _hasParent;
70
+ },
71
+ postHeight : function (diff, wrapper) {
72
+ diff = diff || 0;
73
+ wrapper = wrapper || '#wrap_section';
74
+ this.post('height', {
75
+ height: diff + $(wrapper).outerHeight(true)
76
+ });
77
+ },
78
+ postScroll : function (iframe) {
79
+ this.post('scroll', {
80
+ top: $window.scrollTop(),
81
+ height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
82
+ }, iframe);
83
+ },
84
+ post : function (type, data, iframe)
85
+ {
86
+ console.debug('PostMessage.post', type);
87
+
88
+ if (iframe)
89
+ {
90
+ // Post to iframe.
91
+ _postman.postMessage(JSON.stringify({
92
+ type: type,
93
+ data: data
94
+ }), iframe.src, iframe.contentWindow);
95
+ }
96
+ else {
97
+ // Post to parent.
98
+ _postman.postMessage(JSON.stringify({
99
+ type: type,
100
+ data: data
101
+ }), _parent_url, window.parent);
102
+ }
103
+ },
104
+ receive: function (type, callback)
105
+ {
106
+ console.debug('PostMessage.receive', type);
107
+
108
+ if (undef === _callbacks[type])
109
+ _callbacks[type] = [];
110
+
111
+ _callbacks[type].push(callback);
112
+ },
113
+ receiveOnce: function (type, callback)
114
+ {
115
+ if (this.is_set(type))
116
+ return;
117
+
118
+ this.receive(type, callback);
119
+ },
120
+ // Check if any callbacks assigned to a specified message type.
121
+ is_set: function (type)
122
+ {
123
+ return (undef != _callbacks[type]);
124
+ },
125
+ parent_url: function ()
126
+ {
127
+ return _parent_url;
128
+ },
129
+ parent_subdomain: function ()
130
+ {
131
+ return _parent_subdomain;
132
+ }
133
+ };
134
+ }();
135
  })(jQuery);
freemius/includes/class-freemius-abstract.php CHANGED
@@ -1,597 +1,597 @@
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
  }
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
  }
freemius/includes/class-fs-admin-notices.php CHANGED
@@ -1,321 +1,321 @@
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 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * WP Admin notices manager both for site level and network level.
15
- *
16
- * Class FS_Admin_Notices
17
- */
18
- class FS_Admin_Notices {
19
- /**
20
- * @since 1.2.2
21
- *
22
- * @var string
23
- */
24
- protected $_module_unique_affix;
25
- /**
26
- * @var string
27
- */
28
- protected $_id;
29
- /**
30
- * @var string
31
- */
32
- protected $_title;
33
- /**
34
- * @var FS_Admin_Notice_Manager
35
- */
36
- protected $_notices;
37
- /**
38
- * @var FS_Admin_Notice_Manager
39
- */
40
- protected $_network_notices;
41
- /**
42
- * @var int The ID of the blog that is associated with the current site level options.
43
- */
44
- private $_blog_id = 0;
45
- /**
46
- * @var bool
47
- */
48
- private $_is_multisite;
49
- /**
50
- * @var FS_Admin_Notices[]
51
- */
52
- private static $_instances = array();
53
-
54
- /**
55
- * @param string $id
56
- * @param string $title
57
- * @param string $module_unique_affix
58
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
59
- * blog admin pages.
60
- *
61
- * @return FS_Admin_Notices
62
- */
63
- static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
64
- if ( ! isset( self::$_instances[ $id ] ) ) {
65
- self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
66
- }
67
-
68
- return self::$_instances[ $id ];
69
- }
70
-
71
- /**
72
- * @param string $id
73
- * @param string $title
74
- * @param string $module_unique_affix
75
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
76
- * blog admin pages.
77
- */
78
- protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
79
- $this->_id = $id;
80
- $this->_title = $title;
81
- $this->_module_unique_affix = $module_unique_affix;
82
- $this->_is_multisite = is_multisite();
83
-
84
- if ( $this->_is_multisite ) {
85
- $this->_blog_id = get_current_blog_id();
86
-
87
- $this->_network_notices = FS_Admin_Notice_Manager::instance(
88
- $id,
89
- $title,
90
- $module_unique_affix,
91
- $is_network_and_blog_admins,
92
- true
93
- );
94
- }
95
-
96
- $this->_notices = FS_Admin_Notice_Manager::instance(
97
- $id,
98
- $title,
99
- $module_unique_affix,
100
- false,
101
- $this->_blog_id
102
- );
103
- }
104
-
105
- /**
106
- * Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
107
- *
108
- * @author Vova Feldman (@svovaf)
109
- * @since 1.0.4
110
- *
111
- * @param string $message
112
- * @param string $title
113
- * @param string $type
114
- * @param bool $is_sticky
115
- * @param string $id Message ID
116
- * @param bool $store_if_sticky
117
- * @param int|null $network_level_or_blog_id
118
- *
119
- * @uses add_action()
120
- */
121
- function add(
122
- $message,
123
- $title = '',
124
- $type = 'success',
125
- $is_sticky = false,
126
- $id = '',
127
- $store_if_sticky = true,
128
- $network_level_or_blog_id = null
129
- ) {
130
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
131
- $notices = $this->_network_notices;
132
- } else {
133
- $notices = $this->get_site_notices( $network_level_or_blog_id );
134
- }
135
-
136
- $notices->add(
137
- $message,
138
- $title,
139
- $type,
140
- $is_sticky,
141
- $id,
142
- $store_if_sticky
143
- );
144
- }
145
-
146
- /**
147
- * @author Vova Feldman (@svovaf)
148
- * @since 1.0.7
149
- *
150
- * @param string|string[] $ids
151
- * @param int|null $network_level_or_blog_id
152
- */
153
- function remove_sticky( $ids, $network_level_or_blog_id = null ) {
154
- if ( ! is_array( $ids ) ) {
155
- $ids = array( $ids );
156
- }
157
-
158
- if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
159
- $notices = $this->_network_notices;
160
- } else {
161
- $notices = $this->get_site_notices( $network_level_or_blog_id );
162
- }
163
-
164
- return $notices->remove_sticky( $ids );
165
- }
166
-
167
- /**
168
- * Check if sticky message exists by id.
169
- *
170
- * @author Vova Feldman (@svovaf)
171
- * @since 1.0.9
172
- *
173
- * @param string $id
174
- * @param int|null $network_level_or_blog_id
175
- *
176
- * @return bool
177
- */
178
- function has_sticky( $id, $network_level_or_blog_id = null ) {
179
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
180
- $notices = $this->_network_notices;
181
- } else {
182
- $notices = $this->get_site_notices( $network_level_or_blog_id );
183
- }
184
-
185
- return $notices->has_sticky( $id );
186
- }
187
-
188
- /**
189
- * Adds sticky admin notification.
190
- *
191
- * @author Vova Feldman (@svovaf)
192
- * @since 1.0.7
193
- *
194
- * @param string $message
195
- * @param string $id Message ID
196
- * @param string $title
197
- * @param string $type
198
- * @param int|null $network_level_or_blog_id
199
- * @param number|null $wp_user_id
200
- * @param string|null $plugin_title
201
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
202
- * blog admin pages.
203
- */
204
- function add_sticky(
205
- $message,
206
- $id,
207
- $title = '',
208
- $type = 'success',
209
- $network_level_or_blog_id = null,
210
- $wp_user_id = null,
211
- $plugin_title = null,
212
- $is_network_and_blog_admins = false
213
- ) {
214
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
215
- $notices = $this->_network_notices;
216
- } else {
217
- $notices = $this->get_site_notices( $network_level_or_blog_id );
218
- }
219
-
220
- $notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
221
- }
222
-
223
- /**
224
- * Clear all sticky messages.
225
- *
226
- * @author Vova Feldman (@svovaf)
227
- * @since 2.0.0
228
- *
229
- * @param int|null $network_level_or_blog_id
230
- */
231
- function clear_all_sticky( $network_level_or_blog_id = null ) {
232
- if ( ! $this->_is_multisite ||
233
- false === $network_level_or_blog_id ||
234
- 0 == $network_level_or_blog_id ||
235
- is_null( $network_level_or_blog_id )
236
- ) {
237
- $notices = $this->get_site_notices( $network_level_or_blog_id );
238
- $notices->clear_all_sticky();
239
- }
240
-
241
- if ( $this->_is_multisite &&
242
- ( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
243
- ) {
244
- $this->_network_notices->clear_all_sticky();
245
- }
246
- }
247
-
248
- /**
249
- * Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
250
- *
251
- * @author Vova Feldman (@svovaf)
252
- * @since 1.0.4
253
- *
254
- * @param string $message
255
- * @param string $title
256
- * @param string $type
257
- * @param bool $is_sticky
258
- * @param string $id Message ID
259
- */
260
- function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
261
- $this->add( $message, $title, $type, $is_sticky, true, $id );
262
- }
263
-
264
- #--------------------------------------------------------------------------------
265
- #region Helper Methods
266
- #--------------------------------------------------------------------------------
267
-
268
- /**
269
- * @author Vova Feldman (@svovaf)
270
- * @since 2.0.0
271
- *
272
- * @param int $blog_id
273
- *
274
- * @return FS_Admin_Notice_Manager
275
- */
276
- private function get_site_notices( $blog_id = 0 ) {
277
- if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
278
- return $this->_notices;
279
- }
280
-
281
- return FS_Admin_Notice_Manager::instance(
282
- $this->_id,
283
- $this->_title,
284
- $this->_module_unique_affix,
285
- false,
286
- $blog_id
287
- );
288
- }
289
-
290
- /**
291
- * Check if the network notices should be used.
292
- *
293
- * @author Vova Feldman (@svovaf)
294
- * @since 2.0.0
295
- *
296
- * @param string $id
297
- * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
298
- *
299
- * @return bool
300
- */
301
- private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
302
- if ( ! $this->_is_multisite ) {
303
- // Not a multisite environment.
304
- return false;
305
- }
306
-
307
- if ( is_numeric( $network_level_or_blog_id ) ) {
308
- // Explicitly asked to use a specified blog storage.
309
- return false;
310
- }
311
-
312
- if ( is_bool( $network_level_or_blog_id ) ) {
313
- // Explicitly specified whether should use the network or blog level storage.
314
- return $network_level_or_blog_id;
315
- }
316
-
317
- return fs_is_network_admin();
318
- }
319
-
320
- #endregion
321
  }
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 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * WP Admin notices manager both for site level and network level.
15
+ *
16
+ * Class FS_Admin_Notices
17
+ */
18
+ class FS_Admin_Notices {
19
+ /**
20
+ * @since 1.2.2
21
+ *
22
+ * @var string
23
+ */
24
+ protected $_module_unique_affix;
25
+ /**
26
+ * @var string
27
+ */
28
+ protected $_id;
29
+ /**
30
+ * @var string
31
+ */
32
+ protected $_title;
33
+ /**
34
+ * @var FS_Admin_Notice_Manager
35
+ */
36
+ protected $_notices;
37
+ /**
38
+ * @var FS_Admin_Notice_Manager
39
+ */
40
+ protected $_network_notices;
41
+ /**
42
+ * @var int The ID of the blog that is associated with the current site level options.
43
+ */
44
+ private $_blog_id = 0;
45
+ /**
46
+ * @var bool
47
+ */
48
+ private $_is_multisite;
49
+ /**
50
+ * @var FS_Admin_Notices[]
51
+ */
52
+ private static $_instances = array();
53
+
54
+ /**
55
+ * @param string $id
56
+ * @param string $title
57
+ * @param string $module_unique_affix
58
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
59
+ * blog admin pages.
60
+ *
61
+ * @return FS_Admin_Notices
62
+ */
63
+ static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
64
+ if ( ! isset( self::$_instances[ $id ] ) ) {
65
+ self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
66
+ }
67
+
68
+ return self::$_instances[ $id ];
69
+ }
70
+
71
+ /**
72
+ * @param string $id
73
+ * @param string $title
74
+ * @param string $module_unique_affix
75
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
76
+ * blog admin pages.
77
+ */
78
+ protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
79
+ $this->_id = $id;
80
+ $this->_title = $title;
81
+ $this->_module_unique_affix = $module_unique_affix;
82
+ $this->_is_multisite = is_multisite();
83
+
84
+ if ( $this->_is_multisite ) {
85
+ $this->_blog_id = get_current_blog_id();
86
+
87
+ $this->_network_notices = FS_Admin_Notice_Manager::instance(
88
+ $id,
89
+ $title,
90
+ $module_unique_affix,
91
+ $is_network_and_blog_admins,
92
+ true
93
+ );
94
+ }
95
+
96
+ $this->_notices = FS_Admin_Notice_Manager::instance(
97
+ $id,
98
+ $title,
99
+ $module_unique_affix,
100
+ false,
101
+ $this->_blog_id
102
+ );
103
+ }
104
+
105
+ /**
106
+ * Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
107
+ *
108
+ * @author Vova Feldman (@svovaf)
109
+ * @since 1.0.4
110
+ *
111
+ * @param string $message
112
+ * @param string $title
113
+ * @param string $type
114
+ * @param bool $is_sticky
115
+ * @param string $id Message ID
116
+ * @param bool $store_if_sticky
117
+ * @param int|null $network_level_or_blog_id
118
+ *
119
+ * @uses add_action()
120
+ */
121
+ function add(
122
+ $message,
123
+ $title = '',
124
+ $type = 'success',
125
+ $is_sticky = false,
126
+ $id = '',
127
+ $store_if_sticky = true,
128
+ $network_level_or_blog_id = null
129
+ ) {
130
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
131
+ $notices = $this->_network_notices;
132
+ } else {
133
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
134
+ }
135
+
136
+ $notices->add(
137
+ $message,
138
+ $title,
139
+ $type,
140
+ $is_sticky,
141
+ $id,
142
+ $store_if_sticky
143
+ );
144
+ }
145
+
146
+ /**
147
+ * @author Vova Feldman (@svovaf)
148
+ * @since 1.0.7
149
+ *
150
+ * @param string|string[] $ids
151
+ * @param int|null $network_level_or_blog_id
152
+ */
153
+ function remove_sticky( $ids, $network_level_or_blog_id = null ) {
154
+ if ( ! is_array( $ids ) ) {
155
+ $ids = array( $ids );
156
+ }
157
+
158
+ if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
159
+ $notices = $this->_network_notices;
160
+ } else {
161
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
162
+ }
163
+
164
+ return $notices->remove_sticky( $ids );
165
+ }
166
+
167
+ /**
168
+ * Check if sticky message exists by id.
169
+ *
170
+ * @author Vova Feldman (@svovaf)
171
+ * @since 1.0.9
172
+ *
173
+ * @param string $id
174
+ * @param int|null $network_level_or_blog_id
175
+ *
176
+ * @return bool
177
+ */
178
+ function has_sticky( $id, $network_level_or_blog_id = null ) {
179
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
180
+ $notices = $this->_network_notices;
181
+ } else {
182
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
183
+ }
184
+
185
+ return $notices->has_sticky( $id );
186
+ }
187
+
188
+ /**
189
+ * Adds sticky admin notification.
190
+ *
191
+ * @author Vova Feldman (@svovaf)
192
+ * @since 1.0.7
193
+ *
194
+ * @param string $message
195
+ * @param string $id Message ID
196
+ * @param string $title
197
+ * @param string $type
198
+ * @param int|null $network_level_or_blog_id
199
+ * @param number|null $wp_user_id
200
+ * @param string|null $plugin_title
201
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
202
+ * blog admin pages.
203
+ */
204
+ function add_sticky(
205
+ $message,
206
+ $id,
207
+ $title = '',
208
+ $type = 'success',
209
+ $network_level_or_blog_id = null,
210
+ $wp_user_id = null,
211
+ $plugin_title = null,
212
+ $is_network_and_blog_admins = false
213
+ ) {
214
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
215
+ $notices = $this->_network_notices;
216
+ } else {
217
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
218
+ }
219
+
220
+ $notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
221
+ }
222
+
223
+ /**
224
+ * Clear all sticky messages.
225
+ *
226
+ * @author Vova Feldman (@svovaf)
227
+ * @since 2.0.0
228
+ *
229
+ * @param int|null $network_level_or_blog_id
230
+ */
231
+ function clear_all_sticky( $network_level_or_blog_id = null ) {
232
+ if ( ! $this->_is_multisite ||
233
+ false === $network_level_or_blog_id ||
234
+ 0 == $network_level_or_blog_id ||
235
+ is_null( $network_level_or_blog_id )
236
+ ) {
237
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
238
+ $notices->clear_all_sticky();
239
+ }
240
+
241
+ if ( $this->_is_multisite &&
242
+ ( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
243
+ ) {
244
+ $this->_network_notices->clear_all_sticky();
245
+ }
246
+ }
247
+
248
+ /**
249
+ * Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
250
+ *
251
+ * @author Vova Feldman (@svovaf)
252
+ * @since 1.0.4
253
+ *
254
+ * @param string $message
255
+ * @param string $title
256
+ * @param string $type
257
+ * @param bool $is_sticky
258
+ * @param string $id Message ID
259
+ */
260
+ function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
261
+ $this->add( $message, $title, $type, $is_sticky, true, $id );
262
+ }
263
+
264
+ #--------------------------------------------------------------------------------
265
+ #region Helper Methods
266
+ #--------------------------------------------------------------------------------
267
+
268
+ /**
269
+ * @author Vova Feldman (@svovaf)
270
+ * @since 2.0.0
271
+ *
272
+ * @param int $blog_id
273
+ *
274
+ * @return FS_Admin_Notice_Manager
275
+ */
276
+ private function get_site_notices( $blog_id = 0 ) {
277
+ if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
278
+ return $this->_notices;
279
+ }
280
+
281
+ return FS_Admin_Notice_Manager::instance(
282
+ $this->_id,
283
+ $this->_title,
284
+ $this->_module_unique_affix,
285
+ false,
286
+ $blog_id
287
+ );
288
+ }
289
+
290
+ /**
291
+ * Check if the network notices should be used.
292
+ *
293
+ * @author Vova Feldman (@svovaf)
294
+ * @since 2.0.0
295
+ *
296
+ * @param string $id
297
+ * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
298
+ *
299
+ * @return bool
300
+ */
301
+ private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
302
+ if ( ! $this->_is_multisite ) {
303
+ // Not a multisite environment.
304
+ return false;
305
+ }
306
+
307
+ if ( is_numeric( $network_level_or_blog_id ) ) {
308
+ // Explicitly asked to use a specified blog storage.
309
+ return false;
310
+ }
311
+
312
+ if ( is_bool( $network_level_or_blog_id ) ) {
313
+ // Explicitly specified whether should use the network or blog level storage.
314
+ return $network_level_or_blog_id;
315
+ }
316
+
317
+ return fs_is_network_admin();
318
+ }
319
+
320
+ #endregion
321
  }
freemius/includes/class-fs-security.php CHANGED
@@ -1,85 +1,85 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
14
-
15
- /**
16
- * Class FS_Security
17
- */
18
- class FS_Security {
19
- /**
20
- * @var FS_Security
21
- * @since 1.0.3
22
- */
23
- private static $_instance;
24
- /**
25
- * @var FS_Logger
26
- * @since 1.0.3
27
- */
28
- private static $_logger;
29
-
30
- /**
31
- * @return \FS_Security
32
- */
33
- public static function instance() {
34
- if ( ! isset( self::$_instance ) ) {
35
- self::$_instance = new FS_Security();
36
- self::$_logger = FS_Logger::get_logger(
37
- WP_FS__SLUG,
38
- WP_FS__DEBUG_SDK,
39
- WP_FS__ECHO_DEBUG_SDK
40
- );
41
- }
42
-
43
- return self::$_instance;
44
- }
45
-
46
- private function __construct() {
47
- }
48
-
49
- /**
50
- * @param \FS_Scope_Entity $entity
51
- * @param int $timestamp
52
- * @param string $action
53
- *
54
- * @return string
55
- */
56
- function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
57
- return md5(
58
- $timestamp .
59
- $entity->id .
60
- $entity->secret_key .
61
- $entity->public_key .
62
- $action
63
- );
64
- }
65
-
66
- /**
67
- * @param \FS_Scope_Entity $entity
68
- * @param int|bool $timestamp
69
- * @param string $action
70
- *
71
- * @return array
72
- */
73
- function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
74
- if ( false === $timestamp ) {
75
- $timestamp = time();
76
- }
77
-
78
- return array(
79
- 's_ctx_type' => $entity->get_type(),
80
- 's_ctx_id' => $entity->id,
81
- 's_ctx_ts' => $timestamp,
82
- 's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
83
- );
84
- }
85
- }
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
14
+
15
+ /**
16
+ * Class FS_Security
17
+ */
18
+ class FS_Security {
19
+ /**
20
+ * @var FS_Security
21
+ * @since 1.0.3
22
+ */
23
+ private static $_instance;
24
+ /**
25
+ * @var FS_Logger
26
+ * @since 1.0.3
27
+ */
28
+ private static $_logger;
29
+
30
+ /**
31
+ * @return \FS_Security
32
+ */
33
+ public static function instance() {
34
+ if ( ! isset( self::$_instance ) ) {
35
+ self::$_instance = new FS_Security();
36
+ self::$_logger = FS_Logger::get_logger(
37
+ WP_FS__SLUG,
38
+ WP_FS__DEBUG_SDK,
39
+ WP_FS__ECHO_DEBUG_SDK
40
+ );
41
+ }
42
+
43
+ return self::$_instance;
44
+ }
45
+
46
+ private function __construct() {
47
+ }
48
+
49
+ /**
50
+ * @param \FS_Scope_Entity $entity
51
+ * @param int $timestamp
52
+ * @param string $action
53
+ *
54
+ * @return string
55
+ */
56
+ function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
57
+ return md5(
58
+ $timestamp .
59
+ $entity->id .
60
+ $entity->secret_key .
61
+ $entity->public_key .
62
+ $action
63
+ );
64
+ }
65
+
66
+ /**
67
+ * @param \FS_Scope_Entity $entity
68
+ * @param int|bool $timestamp
69
+ * @param string $action
70
+ *
71
+ * @return array
72
+ */
73
+ function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
74
+ if ( false === $timestamp ) {
75
+ $timestamp = time();
76
+ }
77
+
78
+ return array(
79
+ 's_ctx_type' => $entity->get_type(),
80
+ 's_ctx_id' => $entity->id,
81
+ 's_ctx_ts' => $timestamp,
82
+ 's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
83
+ );
84
+ }
85
+ }
freemius/includes/class-fs-user-lock.php CHANGED
@@ -1,126 +1,126 @@
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 2.1.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_User_Lock
15
- */
16
- class FS_User_Lock {
17
- /**
18
- * @var int
19
- */
20
- private $_wp_user_id;
21
- /**
22
- * @var int
23
- */
24
- private $_thread_id;
25
-
26
- #--------------------------------------------------------------------------------
27
- #region Singleton
28
- #--------------------------------------------------------------------------------
29
-
30
- /**
31
- * @var FS_User_Lock
32
- */
33
- private static $_instance;
34
-
35
- /**
36
- * @author Vova Feldman (@svovaf)
37
- * @since 2.1.0
38
- *
39
- * @return FS_User_Lock
40
- */
41
- static function instance() {
42
- if ( ! isset( self::$_instance ) ) {
43
- self::$_instance = new self();
44
- }
45
-
46
- return self::$_instance;
47
- }
48
-
49
- #endregion
50
-
51
- private function __construct() {
52
- $this->_wp_user_id = Freemius::get_current_wp_user_id();
53
- $this->_thread_id = mt_rand( 0, 32000 );
54
- }
55
-
56
-
57
- /**
58
- * Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
59
- *
60
- * @author Vova Feldman (@svovaf)
61
- * @since 2.1.0
62
- *
63
- * @param int $expiration
64
- *
65
- * @return bool TRUE if successfully acquired lock.
66
- */
67
- function try_lock( $expiration = 0 ) {
68
- if ( $this->is_locked() ) {
69
- // Already locked.
70
- return false;
71
- }
72
-
73
- set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
74
-
75
- if ( $this->has_lock() ) {
76
- set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
77
-
78
- return true;
79
- }
80
-
81
- return false;
82
- }
83
-
84
- /**
85
- * Acquire lock regardless if it's already acquired by another locker or not.
86
- *
87
- * @author Vova Feldman (@svovaf)
88
- * @since 2.1.0
89
- *
90
- * @param int $expiration
91
- */
92
- function lock( $expiration = 0 ) {
93
- set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
94
- }
95
-
96
- /**
97
- * Checks if lock is currently acquired.
98
- *
99
- * @author Vova Feldman (@svovaf)
100
- * @since 2.1.0
101
- *
102
- * @return bool
103
- */
104
- function is_locked() {
105
- return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
106
- }
107
-
108
- /**
109
- * Unlock the lock.
110
- *
111
- * @author Vova Feldman (@svovaf)
112
- * @since 2.1.0
113
- */
114
- function unlock() {
115
- delete_site_transient( "locked_{$this->_wp_user_id}" );
116
- }
117
-
118
- /**
119
- * Checks if lock is currently acquired by the current locker.
120
- *
121
- * @return bool
122
- */
123
- private function has_lock() {
124
- return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
125
- }
126
  }
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 2.1.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_User_Lock
15
+ */
16
+ class FS_User_Lock {
17
+ /**
18
+ * @var int
19
+ */
20
+ private $_wp_user_id;
21
+ /**
22
+ * @var int
23
+ */
24
+ private $_thread_id;
25
+
26
+ #--------------------------------------------------------------------------------
27
+ #region Singleton
28
+ #--------------------------------------------------------------------------------
29
+
30
+ /**
31
+ * @var FS_User_Lock
32
+ */
33
+ private static $_instance;
34
+
35
+ /**
36
+ * @author Vova Feldman (@svovaf)
37
+ * @since 2.1.0
38
+ *
39
+ * @return FS_User_Lock
40
+ */
41
+ static function instance() {
42
+ if ( ! isset( self::$_instance ) ) {
43
+ self::$_instance = new self();
44
+ }
45
+
46
+ return self::$_instance;
47
+ }
48
+
49
+ #endregion
50
+
51
+ private function __construct() {
52
+ $this->_wp_user_id = Freemius::get_current_wp_user_id();
53
+ $this->_thread_id = mt_rand( 0, 32000 );
54
+ }
55
+
56
+
57
+ /**
58
+ * Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
59
+ *
60
+ * @author Vova Feldman (@svovaf)
61
+ * @since 2.1.0
62
+ *
63
+ * @param int $expiration
64
+ *
65
+ * @return bool TRUE if successfully acquired lock.
66
+ */
67
+ function try_lock( $expiration = 0 ) {
68
+ if ( $this->is_locked() ) {
69
+ // Already locked.
70
+ return false;
71
+ }
72
+
73
+ set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
74
+
75
+ if ( $this->has_lock() ) {
76
+ set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
77
+
78
+ return true;
79
+ }
80
+
81
+ return false;
82
+ }
83
+
84
+ /**
85
+ * Acquire lock regardless if it's already acquired by another locker or not.
86
+ *
87
+ * @author Vova Feldman (@svovaf)
88
+ * @since 2.1.0
89
+ *
90
+ * @param int $expiration
91
+ */
92
+ function lock( $expiration = 0 ) {
93
+ set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
94
+ }
95
+
96
+ /**
97
+ * Checks if lock is currently acquired.
98
+ *
99
+ * @author Vova Feldman (@svovaf)
100
+ * @since 2.1.0
101
+ *
102
+ * @return bool
103
+ */
104
+ function is_locked() {
105
+ return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
106
+ }
107
+
108
+ /**
109
+ * Unlock the lock.
110
+ *
111
+ * @author Vova Feldman (@svovaf)
112
+ * @since 2.1.0
113
+ */
114
+ function unlock() {
115
+ delete_site_transient( "locked_{$this->_wp_user_id}" );
116
+ }
117
+
118
+ /**
119
+ * Checks if lock is currently acquired by the current locker.
120
+ *
121
+ * @return bool
122
+ */
123
+ private function has_lock() {
124
+ return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
125
+ }
126
  }
freemius/includes/customizer/class-fs-customizer-support-section.php CHANGED
@@ -1,102 +1,102 @@
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.2.2.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class Zerif_Customizer_Theme_Info_Main
15
- *
16
- * @since 1.0.0
17
- * @access public
18
- */
19
- class FS_Customizer_Support_Section extends WP_Customize_Section {
20
-
21
- function __construct( $manager, $id, $args = array() ) {
22
- $manager->register_section_type( 'FS_Customizer_Support_Section' );
23
-
24
- parent::__construct( $manager, $id, $args );
25
- }
26
-
27
- /**
28
- * The type of customize section being rendered.
29
- *
30
- * @since 1.0.0
31
- * @access public
32
- * @var string
33
- */
34
- public $type = 'freemius-support-section';
35
-
36
- /**
37
- * @var Freemius
38
- */
39
- public $fs = null;
40
-
41
- /**
42
- * Add custom parameters to pass to the JS via JSON.
43
- *
44
- * @since 1.0.0
45
- */
46
- public function json() {
47
- $json = parent::json();
48
-
49
- $is_contact_visible = $this->fs->is_page_visible( 'contact' );
50
- $is_support_visible = $this->fs->is_page_visible( 'support' );
51
-
52
- $json['theme_title'] = $this->fs->get_plugin_name();
53
-
54
- if ( $is_contact_visible && $is_support_visible ) {
55
- $json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
56
- }
57
-
58
- if ( $is_contact_visible ) {
59
- $json['contact'] = array(
60
- 'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
61
- 'url' => $this->fs->contact_url(),
62
- );
63
- }
64
-
65
- if ( $is_support_visible ) {
66
- $json['support'] = array(
67
- 'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
68
- 'url' => $this->fs->get_support_forum_url()
69
- );
70
- }
71
-
72
- return $json;
73
- }
74
-
75
- /**
76
- * Outputs the Underscore.js template.
77
- *
78
- * @since 1.0.0
79
- */
80
- protected function render_template() {
81
- ?>
82
- <li id="fs_customizer_support"
83
- class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
84
- <h3 class="accordion-section-title">
85
- <span>{{ data.theme_title }}</span>
86
- <# if ( data.contact && data.support ) { #>
87
- <div class="button-group">
88
- <# } #>
89
- <# if ( data.contact ) { #>
90
- <a class="button" href="{{ data.contact.url }}" target="_blank" rel="noopener noreferrer">{{ data.contact.label }} </a>
91
- <# } #>
92
- <# if ( data.support ) { #>
93
- <a class="button" href="{{ data.support.url }}" target="_blank" rel="noopener noreferrer">{{ data.support.label }} </a>
94
- <# } #>
95
- <# if ( data.contact && data.support ) { #>
96
- </div>
97
- <# } #>
98
- </h3>
99
- </li>
100
- <?php
101
- }
102
  }
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.2.2.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class Zerif_Customizer_Theme_Info_Main
15
+ *
16
+ * @since 1.0.0
17
+ * @access public
18
+ */
19
+ class FS_Customizer_Support_Section extends WP_Customize_Section {
20
+
21
+ function __construct( $manager, $id, $args = array() ) {
22
+ $manager->register_section_type( 'FS_Customizer_Support_Section' );
23
+
24
+ parent::__construct( $manager, $id, $args );
25
+ }
26
+
27
+ /**
28
+ * The type of customize section being rendered.
29
+ *
30
+ * @since 1.0.0
31
+ * @access public
32
+ * @var string
33
+ */
34
+ public $type = 'freemius-support-section';
35
+
36
+ /**
37
+ * @var Freemius
38
+ */
39
+ public $fs = null;
40
+
41
+ /**
42
+ * Add custom parameters to pass to the JS via JSON.
43
+ *
44
+ * @since 1.0.0
45
+ */
46
+ public function json() {
47
+ $json = parent::json();
48
+
49
+ $is_contact_visible = $this->fs->is_page_visible( 'contact' );
50
+ $is_support_visible = $this->fs->is_page_visible( 'support' );
51
+
52
+ $json['theme_title'] = $this->fs->get_plugin_name();
53
+
54
+ if ( $is_contact_visible && $is_support_visible ) {
55
+ $json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
56
+ }
57
+
58
+ if ( $is_contact_visible ) {
59
+ $json['contact'] = array(
60
+ 'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
61
+ 'url' => $this->fs->contact_url(),
62
+ );
63
+ }
64
+
65
+ if ( $is_support_visible ) {
66
+ $json['support'] = array(
67
+ 'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
68
+ 'url' => $this->fs->get_support_forum_url()
69
+ );
70
+ }
71
+
72
+ return $json;
73
+ }
74
+
75
+ /**
76
+ * Outputs the Underscore.js template.
77
+ *
78
+ * @since 1.0.0
79
+ */
80
+ protected function render_template() {
81
+ ?>
82
+ <li id="fs_customizer_support"
83
+ class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
84
+ <h3 class="accordion-section-title">
85
+ <span>{{ data.theme_title }}</span>
86
+ <# if ( data.contact && data.support ) { #>
87
+ <div class="button-group">
88
+ <# } #>
89
+ <# if ( data.contact ) { #>
90
+ <a class="button" href="{{ data.contact.url }}" target="_blank" rel="noopener noreferrer">{{ data.contact.label }} </a>
91
+ <# } #>
92
+ <# if ( data.support ) { #>
93
+ <a class="button" href="{{ data.support.url }}" target="_blank" rel="noopener noreferrer">{{ data.support.label }} </a>
94
+ <# } #>
95
+ <# if ( data.contact && data.support ) { #>
96
+ </div>
97
+ <# } #>
98
+ </h3>
99
+ </li>
100
+ <?php
101
+ }
102
  }
freemius/includes/customizer/class-fs-customizer-upsell-control.php CHANGED
@@ -1,161 +1,161 @@
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.2.2.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Customizer_Upsell_Control
15
- */
16
- class FS_Customizer_Upsell_Control extends WP_Customize_Control {
17
-
18
- /**
19
- * Control type
20
- *
21
- * @var string control type
22
- */
23
- public $type = 'freemius-upsell-control';
24
-
25
- /**
26
- * @var Freemius
27
- */
28
- public $fs = null;
29
-
30
- /**
31
- * @param WP_Customize_Manager $manager the customize manager class.
32
- * @param string $id id.
33
- * @param array $args customizer manager parameters.
34
- */
35
- public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
36
- $manager->register_control_type( 'FS_Customizer_Upsell_Control' );
37
-
38
- parent::__construct( $manager, $id, $args );
39
- }
40
-
41
- /**
42
- * Enqueue resources for the control.
43
- */
44
- public function enqueue() {
45
- fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
46
- }
47
-
48
- /**
49
- * Json conversion
50
- */
51
- public function to_json() {
52
- $pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . '&nbsp;&nbsp;' . ( is_rtl() ? '&#x2190;' : '&#x27a4;' );
53
-
54
- parent::to_json();
55
-
56
- $this->json['button_text'] = $pricing_cta;
57
- $this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
58
- $this->fs->get_trial_url() :
59
- $this->fs->get_upgrade_url();
60
-
61
- $api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
62
- $this->fs->get_api_bundle_scope() :
63
- $this->fs->get_api_plugin_scope();
64
-
65
- // Load features.
66
- $pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
67
-
68
- if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
69
- // Add support features.
70
- if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
71
- $support_features = array(
72
- 'kb' => 'Help Center',
73
- 'forum' => 'Support Forum',
74
- 'email' => 'Priority Email Support',
75
- 'phone' => 'Phone Support',
76
- 'skype' => 'Skype Support',
77
- 'is_success_manager' => 'Personal Success Manager',
78
- );
79
-
80
- for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
81
- if ( 'free' == $pricing->plans[$i]->name ) {
82
- continue;
83
- }
84
-
85
- if ( ! isset( $pricing->plans[ $i ]->features ) ||
86
- ! is_array( $pricing->plans[ $i ]->features ) ) {
87
- $pricing->plans[$i]->features = array();
88
- }
89
-
90
- foreach ( $support_features as $key => $label ) {
91
- $key = ( 'is_success_manager' !== $key ) ?
92
- "support_{$key}" :
93
- $key;
94
-
95
- if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
96
-
97
- $support_feature = new stdClass();
98
- $support_feature->title = $label;
99
-
100
- $pricing->plans[ $i ]->features[] = $support_feature;
101
- }
102
- }
103
- }
104
- }
105
- }
106
-
107
- $this->json['plans'] = $pricing->plans;
108
-
109
- $this->json['strings'] = array(
110
- 'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
111
- );
112
- }
113
-
114
- /**
115
- * Control content
116
- */
117
- public function content_template() {
118
- ?>
119
- <div id="fs_customizer_upsell">
120
- <# if ( data.plans ) { #>
121
- <ul class="fs-customizer-plans">
122
- <# for (i in data.plans) { #>
123
- <# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
124
- <li class="fs-customizer-plan">
125
- <div class="fs-accordion-section-open">
126
- <h2 class="fs-accordion-section-title menu-item">
127
- <span>{{ data.plans[i].title }}</span>
128
- <button type="button" class="button-link item-edit" aria-expanded="true">
129
- <span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
130
- <span class="toggle-indicator" aria-hidden="true"></span>
131
- </button>
132
- </h2>
133
- <div class="fs-accordion-section-content">
134
- <# if ( data.plans[i].description ) { #>
135
- <h3>{{ data.plans[i].description }}</h3>
136
- <# } #>
137
- <# if ( data.plans[i].features ) { #>
138
- <ul>
139
- <# for ( j in data.plans[i].features ) { #>
140
- <li><div class="fs-feature">
141
- <span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
142
- <# if ( data.plans[i].features[j].description ) { #>
143
- <span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
144
- <# } #>
145
- </div></li>
146
- <# } #>
147
- </ul>
148
- <# } #>
149
- <# if ( 'free' != data.plans[i].name ) { #>
150
- <a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
151
- <# } #>
152
- </div>
153
- </div>
154
- </li>
155
- <# } #>
156
- <# } #>
157
- </ul>
158
- <# } #>
159
- </div>
160
- <?php }
161
  }
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.2.2.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Customizer_Upsell_Control
15
+ */
16
+ class FS_Customizer_Upsell_Control extends WP_Customize_Control {
17
+
18
+ /**
19
+ * Control type
20
+ *
21
+ * @var string control type
22
+ */
23
+ public $type = 'freemius-upsell-control';
24
+
25
+ /**
26
+ * @var Freemius
27
+ */
28
+ public $fs = null;
29
+
30
+ /**
31
+ * @param WP_Customize_Manager $manager the customize manager class.
32
+ * @param string $id id.
33
+ * @param array $args customizer manager parameters.
34
+ */
35
+ public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
36
+ $manager->register_control_type( 'FS_Customizer_Upsell_Control' );
37
+
38
+ parent::__construct( $manager, $id, $args );
39
+ }
40
+
41
+ /**
42
+ * Enqueue resources for the control.
43
+ */
44
+ public function enqueue() {
45
+ fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
46
+ }
47
+
48
+ /**
49
+ * Json conversion
50
+ */
51
+ public function to_json() {
52
+ $pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . '&nbsp;&nbsp;' . ( is_rtl() ? '&#x2190;' : '&#x27a4;' );
53
+
54
+ parent::to_json();
55
+
56
+ $this->json['button_text'] = $pricing_cta;
57
+ $this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
58
+ $this->fs->get_trial_url() :
59
+ $this->fs->get_upgrade_url();
60
+
61
+ $api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
62
+ $this->fs->get_api_bundle_scope() :
63
+ $this->fs->get_api_plugin_scope();
64
+
65
+ // Load features.
66
+ $pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
67
+
68
+ if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
69
+ // Add support features.
70
+ if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
71
+ $support_features = array(
72
+ 'kb' => 'Help Center',
73
+ 'forum' => 'Support Forum',
74
+ 'email' => 'Priority Email Support',
75
+ 'phone' => 'Phone Support',
76
+ 'skype' => 'Skype Support',
77
+ 'is_success_manager' => 'Personal Success Manager',
78
+ );
79
+
80
+ for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
81
+ if ( 'free' == $pricing->plans[$i]->name ) {
82
+ continue;
83
+ }
84
+
85
+ if ( ! isset( $pricing->plans[ $i ]->features ) ||
86
+ ! is_array( $pricing->plans[ $i ]->features ) ) {
87
+ $pricing->plans[$i]->features = array();
88
+ }
89
+
90
+ foreach ( $support_features as $key => $label ) {
91
+ $key = ( 'is_success_manager' !== $key ) ?
92
+ "support_{$key}" :
93
+ $key;
94
+
95
+ if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
96
+
97
+ $support_feature = new stdClass();
98
+ $support_feature->title = $label;
99
+
100
+ $pricing->plans[ $i ]->features[] = $support_feature;
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+
107
+ $this->json['plans'] = $pricing->plans;
108
+
109
+ $this->json['strings'] = array(
110
+ 'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
111
+ );
112
+ }
113
+
114
+ /**
115
+ * Control content
116
+ */
117
+ public function content_template() {
118
+ ?>
119
+ <div id="fs_customizer_upsell">
120
+ <# if ( data.plans ) { #>
121
+ <ul class="fs-customizer-plans">
122
+ <# for (i in data.plans) { #>
123
+ <# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
124
+ <li class="fs-customizer-plan">
125
+ <div class="fs-accordion-section-open">
126
+ <h2 class="fs-accordion-section-title menu-item">
127
+ <span>{{ data.plans[i].title }}</span>
128
+ <button type="button" class="button-link item-edit" aria-expanded="true">
129
+ <span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
130
+ <span class="toggle-indicator" aria-hidden="true"></span>
131
+ </button>
132
+ </h2>
133
+ <div class="fs-accordion-section-content">
134
+ <# if ( data.plans[i].description ) { #>
135
+ <h3>{{ data.plans[i].description }}</h3>
136
+ <# } #>
137
+ <# if ( data.plans[i].features ) { #>
138
+ <ul>
139
+ <# for ( j in data.plans[i].features ) { #>
140
+ <li><div class="fs-feature">
141
+ <span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
142
+ <# if ( data.plans[i].features[j].description ) { #>
143
+ <span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
144
+ <# } #>
145
+ </div></li>
146
+ <# } #>
147
+ </ul>
148
+ <# } #>
149
+ <# if ( 'free' != data.plans[i].name ) { #>
150
+ <a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
151
+ <# } #>
152
+ </div>
153
+ </div>
154
+ </li>
155
+ <# } #>
156
+ <# } #>
157
+ </ul>
158
+ <# } #>
159
+ </div>
160
+ <?php }
161
  }
freemius/includes/customizer/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/debug/class-fs-debug-bar-panel.php CHANGED
@@ -1,64 +1,64 @@
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.1.7.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
15
- *
16
- * @author Vova Feldman (@svovaf)
17
- * @since 1.1.7.3
18
- *
19
- * Class Freemius_Debug_Bar_Panel
20
- */
21
- class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
22
- function init() {
23
- $this->title( 'Freemius' );
24
- }
25
-
26
- static function requests_count() {
27
- if ( class_exists( 'Freemius_Api_WordPress' ) ) {
28
- $logger = Freemius_Api_WordPress::GetLogger();
29
- } else {
30
- $logger = array();
31
- }
32
-
33
- return number_format( count( $logger ) );
34
- }
35
-
36
- static function total_time() {
37
- if ( class_exists( 'Freemius_Api_WordPress' ) ) {
38
- $logger = Freemius_Api_WordPress::GetLogger();
39
- } else {
40
- $logger = array();
41
- }
42
-
43
- $total_time = .0;
44
- foreach ( $logger as $l ) {
45
- $total_time += $l['total'];
46
- }
47
-
48
- return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
49
- }
50
-
51
- function render() {
52
- ?>
53
- <div id='debug-bar-php'>
54
- <?php fs_require_template( '/debug/api-calls.php' ) ?>
55
- <br>
56
- <?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
57
- <br>
58
- <?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
59
- <br>
60
- <?php fs_require_template( '/debug/logger.php' ) ?>
61
- </div>
62
- <?php
63
- }
64
- }
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.1.7.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
15
+ *
16
+ * @author Vova Feldman (@svovaf)
17
+ * @since 1.1.7.3
18
+ *
19
+ * Class Freemius_Debug_Bar_Panel
20
+ */
21
+ class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
22
+ function init() {
23
+ $this->title( 'Freemius' );
24
+ }
25
+
26
+ static function requests_count() {
27
+ if ( class_exists( 'Freemius_Api_WordPress' ) ) {
28
+ $logger = Freemius_Api_WordPress::GetLogger();
29
+ } else {
30
+ $logger = array();
31
+ }
32
+
33
+ return number_format( count( $logger ) );
34
+ }
35
+
36
+ static function total_time() {
37
+ if ( class_exists( 'Freemius_Api_WordPress' ) ) {
38
+ $logger = Freemius_Api_WordPress::GetLogger();
39
+ } else {
40
+ $logger = array();
41
+ }
42
+
43
+ $total_time = .0;
44
+ foreach ( $logger as $l ) {
45
+ $total_time += $l['total'];
46
+ }
47
+
48
+ return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
49
+ }
50
+
51
+ function render() {
52
+ ?>
53
+ <div id='debug-bar-php'>
54
+ <?php fs_require_template( '/debug/api-calls.php' ) ?>
55
+ <br>
56
+ <?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
57
+ <br>
58
+ <?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
59
+ <br>
60
+ <?php fs_require_template( '/debug/logger.php' ) ?>
61
+ </div>
62
+ <?php
63
+ }
64
+ }
freemius/includes/debug/debug-bar-start.php CHANGED
@@ -1,52 +1,52 @@
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.1.7.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- if ( ! WP_FS__DEBUG_SDK ) {
14
- return;
15
- }
16
-
17
- /**
18
- * Initialize Freemius custom debug panels.
19
- *
20
- * @param array $panels Debug bar panels objects
21
- *
22
- * @return array Debug bar panels with your custom panels
23
- */
24
- function fs_custom_panels_init( $panels ) {
25
- if ( class_exists( 'Debug_Bar_Panel' ) ) {
26
- if ( FS_API__LOGGER_ON ) {
27
- require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
28
- $panels[] = new Freemius_Debug_Bar_Panel();
29
- }
30
- }
31
-
32
- return $panels;
33
- }
34
-
35
- function fs_custom_status_init( $statuses ) {
36
- if ( class_exists( 'Debug_Bar_Panel' ) ) {
37
- if ( FS_API__LOGGER_ON ) {
38
- require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
39
- $statuses[] = array(
40
- 'fs_api_requests',
41
- fs_text_inline( 'Freemius API' ),
42
- Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
43
- ' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
44
- );
45
- }
46
- }
47
-
48
- return $statuses;
49
- }
50
-
51
- add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
52
  add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
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.1.7.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ if ( ! WP_FS__DEBUG_SDK ) {
14
+ return;
15
+ }
16
+
17
+ /**
18
+ * Initialize Freemius custom debug panels.
19
+ *
20
+ * @param array $panels Debug bar panels objects
21
+ *
22
+ * @return array Debug bar panels with your custom panels
23
+ */
24
+ function fs_custom_panels_init( $panels ) {
25
+ if ( class_exists( 'Debug_Bar_Panel' ) ) {
26
+ if ( FS_API__LOGGER_ON ) {
27
+ require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
28
+ $panels[] = new Freemius_Debug_Bar_Panel();
29
+ }
30
+ }
31
+
32
+ return $panels;
33
+ }
34
+
35
+ function fs_custom_status_init( $statuses ) {
36
+ if ( class_exists( 'Debug_Bar_Panel' ) ) {
37
+ if ( FS_API__LOGGER_ON ) {
38
+ require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
39
+ $statuses[] = array(
40
+ 'fs_api_requests',
41
+ fs_text_inline( 'Freemius API' ),
42
+ Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
43
+ ' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
44
+ );
45
+ }
46
+ }
47
+
48
+ return $statuses;
49
+ }
50
+
51
+ add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
52
  add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
freemius/includes/debug/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/entities/class-fs-affiliate-terms.php CHANGED
@@ -1,128 +1,128 @@
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.2.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_AffiliateTerms extends FS_Scope_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var bool
19
- */
20
- public $is_active;
21
- /**
22
- * @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
23
- */
24
- public $type;
25
- /**
26
- * @var string Enum: `payout` or `credit`. Defaults to `payout`.
27
- */
28
- public $reward_type;
29
- /**
30
- * If `first`, the referral will be attributed to the first visited source containing the affiliation link that
31
- * was clicked.
32
- *
33
- * @var string Enum: `first` or `last`. Defaults to `first`.
34
- */
35
- public $referral_attribution;
36
- /**
37
- * @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
38
- */
39
- public $cookie_days;
40
- /**
41
- * @var int
42
- */
43
- public $commission;
44
- /**
45
- * @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
46
- */
47
- public $commission_type;
48
- /**
49
- * @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
50
- * greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
51
- * the initial upgrade/purchase.
52
- */
53
- public $commission_renewals_days;
54
- /**
55
- * @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
56
- */
57
- public $install_commission;
58
- /**
59
- * @var string Required default target link, e.g.: pricing page.
60
- */
61
- public $default_url;
62
- /**
63
- * @var string One of the following: 'all', 'new_customer', 'new_user'.
64
- * If 'all' - reward for any user type.
65
- * If 'new_customer' - reward only for new customers.
66
- * If 'new_user' - reward only for new users.
67
- */
68
- public $reward_customer_type;
69
- /**
70
- * @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
71
- * paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
72
- * customer payments for `future_payments_days` days after the initial payment.
73
- */
74
- public $future_payments_days;
75
- /**
76
- * @var bool If `true`, allow referrals from social sites.
77
- */
78
- public $is_social_allowed;
79
- /**
80
- * @var bool If `true`, allow conversions without HTTP referrer header at all.
81
- */
82
- public $is_app_allowed;
83
- /**
84
- * @var bool If `true`, allow referrals from any site.
85
- */
86
- public $is_any_site_allowed;
87
-
88
- #endregion Properties
89
-
90
- /**
91
- * @author Leo Fajardo (@leorw)
92
- *
93
- * @return string
94
- */
95
- function get_formatted_commission()
96
- {
97
- return ( 'dollar' === $this->commission_type ) ?
98
- ( '$' . $this->commission ) :
99
- ( $this->commission . '%' );
100
- }
101
-
102
- /**
103
- * @author Leo Fajardo (@leorw)
104
- *
105
- * @return bool
106
- */
107
- function has_lifetime_commission() {
108
- return ( 0 !== $this->future_payments_days );
109
- }
110
-
111
- /**
112
- * @author Leo Fajardo (@leorw)
113
- *
114
- * @return bool
115
- */
116
- function is_session_cookie() {
117
- return ( 0 == $this->cookie_days );
118
- }
119
-
120
- /**
121
- * @author Leo Fajardo (@leorw)
122
- *
123
- * @return bool
124
- */
125
- function has_renewals_commission() {
126
- return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
127
- }
128
  }
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.2.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_AffiliateTerms extends FS_Scope_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var bool
19
+ */
20
+ public $is_active;
21
+ /**
22
+ * @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
23
+ */
24
+ public $type;
25
+ /**
26
+ * @var string Enum: `payout` or `credit`. Defaults to `payout`.
27
+ */
28
+ public $reward_type;
29
+ /**
30
+ * If `first`, the referral will be attributed to the first visited source containing the affiliation link that
31
+ * was clicked.
32
+ *
33
+ * @var string Enum: `first` or `last`. Defaults to `first`.
34
+ */
35
+ public $referral_attribution;
36
+ /**
37
+ * @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
38
+ */
39
+ public $cookie_days;
40
+ /**
41
+ * @var int
42
+ */
43
+ public $commission;
44
+ /**
45
+ * @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
46
+ */
47
+ public $commission_type;
48
+ /**
49
+ * @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
50
+ * greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
51
+ * the initial upgrade/purchase.
52
+ */
53
+ public $commission_renewals_days;
54
+ /**
55
+ * @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
56
+ */
57
+ public $install_commission;
58
+ /**
59
+ * @var string Required default target link, e.g.: pricing page.
60
+ */
61
+ public $default_url;
62
+ /**
63
+ * @var string One of the following: 'all', 'new_customer', 'new_user'.
64
+ * If 'all' - reward for any user type.
65
+ * If 'new_customer' - reward only for new customers.
66
+ * If 'new_user' - reward only for new users.
67
+ */
68
+ public $reward_customer_type;
69
+ /**
70
+ * @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
71
+ * paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
72
+ * customer payments for `future_payments_days` days after the initial payment.
73
+ */
74
+ public $future_payments_days;
75
+ /**
76
+ * @var bool If `true`, allow referrals from social sites.
77
+ */
78
+ public $is_social_allowed;
79
+ /**
80
+ * @var bool If `true`, allow conversions without HTTP referrer header at all.
81
+ */
82
+ public $is_app_allowed;
83
+ /**
84
+ * @var bool If `true`, allow referrals from any site.
85
+ */
86
+ public $is_any_site_allowed;
87
+
88
+ #endregion Properties
89
+
90
+ /**
91
+ * @author Leo Fajardo (@leorw)
92
+ *
93
+ * @return string
94
+ */
95
+ function get_formatted_commission()
96
+ {
97
+ return ( 'dollar' === $this->commission_type ) ?
98
+ ( '$' . $this->commission ) :
99
+ ( $this->commission . '%' );
100
+ }
101
+
102
+ /**
103
+ * @author Leo Fajardo (@leorw)
104
+ *
105
+ * @return bool
106
+ */
107
+ function has_lifetime_commission() {
108
+ return ( 0 !== $this->future_payments_days );
109
+ }
110
+
111
+ /**
112
+ * @author Leo Fajardo (@leorw)
113
+ *
114
+ * @return bool
115
+ */
116
+ function is_session_cookie() {
117
+ return ( 0 == $this->cookie_days );
118
+ }
119
+
120
+ /**
121
+ * @author Leo Fajardo (@leorw)
122
+ *
123
+ * @return bool
124
+ */
125
+ function has_renewals_commission() {
126
+ return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
127
+ }
128
  }
freemius/includes/entities/class-fs-affiliate.php CHANGED
@@ -1,84 +1,84 @@
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.2.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Affiliate extends FS_Scope_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var string
19
- */
20
- public $paypal_email;
21
- /**
22
- * @var number
23
- */
24
- public $custom_affiliate_terms_id;
25
- /**
26
- * @var boolean
27
- */
28
- public $is_using_custom_terms;
29
- /**
30
- * @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
31
- */
32
- public $status;
33
- /**
34
- * @var string
35
- */
36
- public $domain;
37
-
38
- #endregion Properties
39
-
40
- /**
41
- * @author Leo Fajardo
42
- *
43
- * @return bool
44
- */
45
- function is_active() {
46
- return ( 'active' === $this->status );
47
- }
48
-
49
- /**
50
- * @author Leo Fajardo
51
- *
52
- * @return bool
53
- */
54
- function is_pending() {
55
- return ( 'pending' === $this->status );
56
- }
57
-
58
- /**
59
- * @author Leo Fajardo
60
- *
61
- * @return bool
62
- */
63
- function is_suspended() {
64
- return ( 'suspended' === $this->status );
65
- }
66
-
67
- /**
68
- * @author Leo Fajardo
69
- *
70
- * @return bool
71
- */
72
- function is_rejected() {
73
- return ( 'rejected' === $this->status );
74
- }
75
-
76
- /**
77
- * @author Leo Fajardo
78
- *
79
- * @return bool
80
- */
81
- function is_blocked() {
82
- return ( 'blocked' === $this->status );
83
- }
84
  }
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.2.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Affiliate extends FS_Scope_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ public $paypal_email;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $custom_affiliate_terms_id;
25
+ /**
26
+ * @var boolean
27
+ */
28
+ public $is_using_custom_terms;
29
+ /**
30
+ * @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
31
+ */
32
+ public $status;
33
+ /**
34
+ * @var string
35
+ */
36
+ public $domain;
37
+
38
+ #endregion Properties
39
+
40
+ /**
41
+ * @author Leo Fajardo
42
+ *
43
+ * @return bool
44
+ */
45
+ function is_active() {
46
+ return ( 'active' === $this->status );
47
+ }
48
+
49
+ /**
50
+ * @author Leo Fajardo
51
+ *
52
+ * @return bool
53
+ */
54
+ function is_pending() {
55
+ return ( 'pending' === $this->status );
56
+ }
57
+
58
+ /**
59
+ * @author Leo Fajardo
60
+ *
61
+ * @return bool
62
+ */
63
+ function is_suspended() {
64
+ return ( 'suspended' === $this->status );
65
+ }
66
+
67
+ /**
68
+ * @author Leo Fajardo
69
+ *
70
+ * @return bool
71
+ */
72
+ function is_rejected() {
73
+ return ( 'rejected' === $this->status );
74
+ }
75
+
76
+ /**
77
+ * @author Leo Fajardo
78
+ *
79
+ * @return bool
80
+ */
81
+ function is_blocked() {
82
+ return ( 'blocked' === $this->status );
83
+ }
84
  }
freemius/includes/entities/class-fs-billing.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
- /**
3
- * @package Freemius for EDD Add-On
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Billing extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var int
19
- */
20
- public $entity_id;
21
- /**
22
- * @var string (Enum) Linked entity type. One of: developer, plugin, user, install
23
- */
24
- public $entity_type;
25
- /**
26
- * @var string
27
- */
28
- public $business_name;
29
- /**
30
- * @var string
31
- */
32
- public $first;
33
- /**
34
- * @var string
35
- */
36
- public $last;
37
- /**
38
- * @var string
39
- */
40
- public $email;
41
- /**
42
- * @var string
43
- */
44
- public $phone;
45
- /**
46
- * @var string
47
- */
48
- public $website;
49
- /**
50
- * @var string Tax or VAT ID.
51
- */
52
- public $tax_id;
53
- /**
54
- * @var string
55
- */
56
- public $address_street;
57
- /**
58
- * @var string
59
- */
60
- public $address_apt;
61
- /**
62
- * @var string
63
- */
64
- public $address_city;
65
- /**
66
- * @var string
67
- */
68
- public $address_country;
69
- /**
70
- * @var string Two chars country code.
71
- */
72
- public $address_country_code;
73
- /**
74
- * @var string
75
- */
76
- public $address_state;
77
- /**
78
- * @var number Numeric ZIP code (cab be with leading zeros).
79
- */
80
- public $address_zip;
81
-
82
- #endregion Properties
83
-
84
-
85
- /**
86
- * @param object|bool $event
87
- */
88
- function __construct( $event = false ) {
89
- parent::__construct( $event );
90
- }
91
-
92
- static function get_type() {
93
- return 'billing';
94
- }
95
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius for EDD Add-On
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Billing extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var int
19
+ */
20
+ public $entity_id;
21
+ /**
22
+ * @var string (Enum) Linked entity type. One of: developer, plugin, user, install
23
+ */
24
+ public $entity_type;
25
+ /**
26
+ * @var string
27
+ */
28
+ public $business_name;
29
+ /**
30
+ * @var string
31
+ */
32
+ public $first;
33
+ /**
34
+ * @var string
35
+ */
36
+ public $last;
37
+ /**
38
+ * @var string
39
+ */
40
+ public $email;
41
+ /**
42
+ * @var string
43
+ */
44
+ public $phone;
45
+ /**
46
+ * @var string
47
+ */
48
+ public $website;
49
+ /**
50
+ * @var string Tax or VAT ID.
51
+ */
52
+ public $tax_id;
53
+ /**
54
+ * @var string
55
+ */
56
+ public $address_street;
57
+ /**
58
+ * @var string
59
+ */
60
+ public $address_apt;
61
+ /**
62
+ * @var string
63
+ */
64
+ public $address_city;
65
+ /**
66
+ * @var string
67
+ */
68
+ public $address_country;
69
+ /**
70
+ * @var string Two chars country code.
71
+ */
72
+ public $address_country_code;
73
+ /**
74
+ * @var string
75
+ */
76
+ public $address_state;
77
+ /**
78
+ * @var number Numeric ZIP code (cab be with leading zeros).
79
+ */
80
+ public $address_zip;
81
+
82
+ #endregion Properties
83
+
84
+
85
+ /**
86
+ * @param object|bool $event
87
+ */
88
+ function __construct( $event = false ) {
89
+ parent::__construct( $event );
90
+ }
91
+
92
+ static function get_type() {
93
+ return 'billing';
94
+ }
95
  }
freemius/includes/entities/class-fs-entity.php CHANGED
@@ -1,159 +1,159 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Get object's public variables.
15
- *
16
- * @author Vova Feldman (@svovaf)
17
- * @since 1.0.0
18
- *
19
- * @param object $object
20
- *
21
- * @return array
22
- */
23
- function fs_get_object_public_vars( $object ) {
24
- return get_object_vars( $object );
25
- }
26
-
27
- class FS_Entity {
28
- /**
29
- * @var number
30
- */
31
- public $id;
32
- /**
33
- * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
34
- */
35
- public $updated;
36
- /**
37
- * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
38
- */
39
- public $created;
40
-
41
- /**
42
- * @param bool|object $entity
43
- */
44
- function __construct( $entity = false ) {
45
- if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
46
- return;
47
- }
48
-
49
- $props = fs_get_object_public_vars( $this );
50
-
51
- foreach ( $props as $key => $def_value ) {
52
- $this->{$key} = isset( $entity->{$key} ) ?
53
- $entity->{$key} :
54
- $def_value;
55
- }
56
- }
57
-
58
- static function get_type() {
59
- return 'type';
60
- }
61
-
62
- /**
63
- * @author Vova Feldman (@svovaf)
64
- * @since 1.0.6
65
- *
66
- * @param FS_Entity $entity1
67
- * @param FS_Entity $entity2
68
- *
69
- * @return bool
70
- */
71
- static function equals( $entity1, $entity2 ) {
72
- if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
73
- return true;
74
- } else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
75
- return ( $entity1->id == $entity2->id );
76
- } else if ( is_object( $entity1 ) ) {
77
- return is_null( $entity1->id );
78
- } else {
79
- return is_null( $entity2->id );
80
- }
81
- }
82
-
83
- private $_is_updated = false;
84
-
85
- /**
86
- * Update object property.
87
- *
88
- * @author Vova Feldman (@svovaf)
89
- * @since 1.0.9
90
- *
91
- * @param string|array[string]mixed $key
92
- * @param string|bool $val
93
- *
94
- * @return bool
95
- */
96
- function update( $key, $val = false ) {
97
- if ( ! is_array( $key ) ) {
98
- $key = array( $key => $val );
99
- }
100
-
101
- $is_updated = false;
102
-
103
- foreach ( $key as $k => $v ) {
104
- if ( $this->{$k} === $v ) {
105
- continue;
106
- }
107
-
108
- if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
109
- ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
110
- $this->{$k} == $v
111
- ) {
112
- continue;
113
- }
114
-
115
- // Update value.
116
- $this->{$k} = $v;
117
-
118
- $is_updated = true;
119
- }
120
-
121
- $this->_is_updated = $is_updated;
122
-
123
- return $is_updated;
124
- }
125
-
126
- /**
127
- * Checks if entity was updated.
128
- *
129
- * @author Vova Feldman (@svovaf)
130
- * @since 1.0.9
131
- *
132
- * @return bool
133
- */
134
- function is_updated() {
135
- return $this->_is_updated;
136
- }
137
-
138
- /**
139
- * @param $id
140
- *
141
- * @author Vova Feldman (@svovaf)
142
- * @since 1.1.2
143
- *
144
- * @return bool
145
- */
146
- static function is_valid_id($id){
147
- return is_numeric($id);
148
- }
149
-
150
- /**
151
- * @author Leo Fajardo (@leorw)
152
- * @since 2.3.1
153
- *
154
- * @return string
155
- */
156
- public static function get_class_name() {
157
- return get_called_class();
158
- }
159
  }
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Get object's public variables.
15
+ *
16
+ * @author Vova Feldman (@svovaf)
17
+ * @since 1.0.0
18
+ *
19
+ * @param object $object
20
+ *
21
+ * @return array
22
+ */
23
+ function fs_get_object_public_vars( $object ) {
24
+ return get_object_vars( $object );
25
+ }
26
+
27
+ class FS_Entity {
28
+ /**
29
+ * @var number
30
+ */
31
+ public $id;
32
+ /**
33
+ * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
34
+ */
35
+ public $updated;
36
+ /**
37
+ * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
38
+ */
39
+ public $created;
40
+
41
+ /**
42
+ * @param bool|object $entity
43
+ */
44
+ function __construct( $entity = false ) {
45
+ if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
46
+ return;
47
+ }
48
+
49
+ $props = fs_get_object_public_vars( $this );
50
+
51
+ foreach ( $props as $key => $def_value ) {
52
+ $this->{$key} = isset( $entity->{$key} ) ?
53
+ $entity->{$key} :
54
+ $def_value;
55
+ }
56
+ }
57
+
58
+ static function get_type() {
59
+ return 'type';
60
+ }
61
+
62
+ /**
63
+ * @author Vova Feldman (@svovaf)
64
+ * @since 1.0.6
65
+ *
66
+ * @param FS_Entity $entity1
67
+ * @param FS_Entity $entity2
68
+ *
69
+ * @return bool
70
+ */
71
+ static function equals( $entity1, $entity2 ) {
72
+ if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
73
+ return true;
74
+ } else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
75
+ return ( $entity1->id == $entity2->id );
76
+ } else if ( is_object( $entity1 ) ) {
77
+ return is_null( $entity1->id );
78
+ } else {
79
+ return is_null( $entity2->id );
80
+ }
81
+ }
82
+
83
+ private $_is_updated = false;
84
+
85
+ /**
86
+ * Update object property.
87
+ *
88
+ * @author Vova Feldman (@svovaf)
89
+ * @since 1.0.9
90
+ *
91
+ * @param string|array[string]mixed $key
92
+ * @param string|bool $val
93
+ *
94
+ * @return bool
95
+ */
96
+ function update( $key, $val = false ) {
97
+ if ( ! is_array( $key ) ) {
98
+ $key = array( $key => $val );
99
+ }
100
+
101
+ $is_updated = false;
102
+
103
+ foreach ( $key as $k => $v ) {
104
+ if ( $this->{$k} === $v ) {
105
+ continue;
106
+ }
107
+
108
+ if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
109
+ ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
110
+ $this->{$k} == $v
111
+ ) {
112
+ continue;
113
+ }
114
+
115
+ // Update value.
116
+ $this->{$k} = $v;
117
+
118
+ $is_updated = true;
119
+ }
120
+
121
+ $this->_is_updated = $is_updated;
122
+
123
+ return $is_updated;
124
+ }
125
+
126
+ /**
127
+ * Checks if entity was updated.
128
+ *
129
+ * @author Vova Feldman (@svovaf)
130
+ * @since 1.0.9
131
+ *
132
+ * @return bool
133
+ */
134
+ function is_updated() {
135
+ return $this->_is_updated;
136
+ }
137
+
138
+ /**
139
+ * @param $id
140
+ *
141
+ * @author Vova Feldman (@svovaf)
142
+ * @since 1.1.2
143
+ *
144
+ * @return bool
145
+ */
146
+ static function is_valid_id($id){
147
+ return is_numeric($id);
148
+ }
149
+
150
+ /**
151
+ * @author Leo Fajardo (@leorw)
152
+ * @since 2.3.1
153
+ *
154
+ * @return string
155
+ */
156
+ public static function get_class_name() {
157
+ return get_called_class();
158
+ }
159
  }
freemius/includes/entities/class-fs-payment.php CHANGED
@@ -1,168 +1,168 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Payment extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $plugin_id;
21
- /**
22
- * @var number
23
- */
24
- public $user_id;
25
- /**
26
- * @var number
27
- */
28
- public $install_id;
29
- /**
30
- * @var number
31
- */
32
- public $subscription_id;
33
- /**
34
- * @var number
35
- */
36
- public $plan_id;
37
- /**
38
- * @var number
39
- */
40
- public $license_id;
41
- /**
42
- * @var float
43
- */
44
- public $gross;
45
- /**
46
- * @author Leo Fajardo (@leorw)
47
- * @since 2.3.0
48
- *
49
- * @var string One of the following: `usd`, `gbp`, `eur`.
50
- */
51
- public $currency;
52
- /**
53
- * @var number
54
- */
55
- public $bound_payment_id;
56
- /**
57
- * @var string
58
- */
59
- public $external_id;
60
- /**
61
- * @var string
62
- */
63
- public $gateway;
64
- /**
65
- * @var string ISO 3166-1 alpha-2 - two-letter country code.
66
- *
67
- * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
68
- */
69
- public $country_code;
70
- /**
71
- * @var string
72
- */
73
- public $vat_id;
74
- /**
75
- * @var float Actual Tax / VAT in $$$
76
- */
77
- public $vat;
78
- /**
79
- * @var int Payment source.
80
- */
81
- public $source = 0;
82
-
83
- #endregion Properties
84
-
85
- const CURRENCY_USD = 'usd';
86
- const CURRENCY_GBP = 'gbp';
87
- const CURRENCY_EUR = 'eur';
88
-
89
- /**
90
- * @param object|bool $payment
91
- */
92
- function __construct( $payment = false ) {
93
- parent::__construct( $payment );
94
- }
95
-
96
- static function get_type() {
97
- return 'payment';
98
- }
99
-
100
- /**
101
- * @author Vova Feldman (@svovaf)
102
- * @since 1.0.0
103
- *
104
- * @return bool
105
- */
106
- function is_refund() {
107
- return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
108
- }
109
-
110
- /**
111
- * Checks if the payment was migrated from another platform.
112
- *
113
- * @author Vova Feldman (@svovaf)
114
- * @since 2.0.2
115
- *
116
- * @return bool
117
- */
118
- function is_migrated() {
119
- return ( 0 != $this->source );
120
- }
121
-
122
- /**
123
- * Returns the gross in this format:
124
- * `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
125
- *
126
- * Examples: £9.99 GBP, -£9.99 GBP.
127
- *
128
- * @author Leo Fajardo (@leorw)
129
- * @since 2.3.0
130
- *
131
- * @return string
132
- */
133
- function formatted_gross()
134
- {
135
- return (
136
- ( $this->gross < 0 ? '-' : '' ) .
137
- $this->get_symbol() .
138
- number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139
- strtoupper( $this->currency )
140
- );
141
- }
142
-
143
- /**
144
- * A map between supported currencies with their symbols.
145
- *
146
- * @var array<string,string>
147
- */
148
- static $CURRENCY_2_SYMBOL;
149
-
150
- /**
151
- * @author Leo Fajardo (@leorw)
152
- * @since 2.3.0
153
- *
154
- * @return string
155
- */
156
- private function get_symbol() {
157
- if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
158
- // Lazy load.
159
- self::$CURRENCY_2_SYMBOL = array(
160
- self::CURRENCY_USD => '$',
161
- self::CURRENCY_GBP => '&pound;',
162
- self::CURRENCY_EUR => '&euro;',
163
- );
164
- }
165
-
166
- return self::$CURRENCY_2_SYMBOL[ $this->currency ];
167
- }
168
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Payment extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $plugin_id;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $user_id;
25
+ /**
26
+ * @var number
27
+ */
28
+ public $install_id;
29
+ /**
30
+ * @var number
31
+ */
32
+ public $subscription_id;
33
+ /**
34
+ * @var number
35
+ */
36
+ public $plan_id;
37
+ /**
38
+ * @var number
39
+ */
40
+ public $license_id;
41
+ /**
42
+ * @var float
43
+ */
44
+ public $gross;
45
+ /**
46
+ * @author Leo Fajardo (@leorw)
47
+ * @since 2.3.0
48
+ *
49
+ * @var string One of the following: `usd`, `gbp`, `eur`.
50
+ */
51
+ public $currency;
52
+ /**
53
+ * @var number
54
+ */
55
+ public $bound_payment_id;
56
+ /**
57
+ * @var string
58
+ */
59
+ public $external_id;
60
+ /**
61
+ * @var string
62
+ */
63
+ public $gateway;
64
+ /**
65
+ * @var string ISO 3166-1 alpha-2 - two-letter country code.
66
+ *
67
+ * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
68
+ */
69
+ public $country_code;
70
+ /**
71
+ * @var string
72
+ */
73
+ public $vat_id;
74
+ /**
75
+ * @var float Actual Tax / VAT in $$$
76
+ */
77
+ public $vat;
78
+ /**
79
+ * @var int Payment source.
80
+ */
81
+ public $source = 0;
82
+
83
+ #endregion Properties
84
+
85
+ const CURRENCY_USD = 'usd';
86
+ const CURRENCY_GBP = 'gbp';
87
+ const CURRENCY_EUR = 'eur';
88
+
89
+ /**
90
+ * @param object|bool $payment
91
+ */
92
+ function __construct( $payment = false ) {
93
+ parent::__construct( $payment );
94
+ }
95
+
96
+ static function get_type() {
97
+ return 'payment';
98
+ }
99
+
100
+ /**
101
+ * @author Vova Feldman (@svovaf)
102
+ * @since 1.0.0
103
+ *
104
+ * @return bool
105
+ */
106
+ function is_refund() {
107
+ return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
108
+ }
109
+
110
+ /**
111
+ * Checks if the payment was migrated from another platform.
112
+ *
113
+ * @author Vova Feldman (@svovaf)
114
+ * @since 2.0.2
115
+ *
116
+ * @return bool
117
+ */
118
+ function is_migrated() {
119
+ return ( 0 != $this->source );
120
+ }
121
+
122
+ /**
123
+ * Returns the gross in this format:
124
+ * `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
125
+ *
126
+ * Examples: £9.99 GBP, -£9.99 GBP.
127
+ *
128
+ * @author Leo Fajardo (@leorw)
129
+ * @since 2.3.0
130
+ *
131
+ * @return string
132
+ */
133
+ function formatted_gross()
134
+ {
135
+ return (
136
+ ( $this->gross < 0 ? '-' : '' ) .
137
+ $this->get_symbol() .
138
+ number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139
+ strtoupper( $this->currency )
140
+ );
141
+ }
142
+
143
+ /**
144
+ * A map between supported currencies with their symbols.
145
+ *
146
+ * @var array<string,string>
147
+ */
148
+ static $CURRENCY_2_SYMBOL;
149
+
150
+ /**
151
+ * @author Leo Fajardo (@leorw)
152
+ * @since 2.3.0
153
+ *
154
+ * @return string
155
+ */
156
+ private function get_symbol() {
157
+ if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
158
+ // Lazy load.
159
+ self::$CURRENCY_2_SYMBOL = array(
160
+ self::CURRENCY_USD => '$',
161
+ self::CURRENCY_GBP => '&pound;',
162
+ self::CURRENCY_EUR => '&euro;',
163
+ );
164
+ }
165
+
166
+ return self::$CURRENCY_2_SYMBOL[ $this->currency ];
167
+ }
168
  }
freemius/includes/entities/class-fs-plugin-info.php CHANGED
@@ -1,34 +1,34 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin_Info extends FS_Entity {
14
- public $plugin_id;
15
- public $description;
16
- public $short_description;
17
- public $banner_url;
18
- public $card_banner_url;
19
- public $selling_point_0;
20
- public $selling_point_1;
21
- public $selling_point_2;
22
- public $screenshots;
23
-
24
- /**
25
- * @param stdClass|bool $plugin_info
26
- */
27
- function __construct( $plugin_info = false ) {
28
- parent::__construct( $plugin_info );
29
- }
30
-
31
- static function get_type() {
32
- return 'plugin';
33
- }
34
  }
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin_Info extends FS_Entity {
14
+ public $plugin_id;
15
+ public $description;
16
+ public $short_description;
17
+ public $banner_url;
18
+ public $card_banner_url;
19
+ public $selling_point_0;
20
+ public $selling_point_1;
21
+ public $selling_point_2;
22
+ public $screenshots;
23
+
24
+ /**
25
+ * @param stdClass|bool $plugin_info
26
+ */
27
+ function __construct( $plugin_info = false ) {
28
+ parent::__construct( $plugin_info );
29
+ }
30
+
31
+ static function get_type() {
32
+ return 'plugin';
33
+ }
34
  }
freemius/includes/entities/class-fs-plugin-license.php CHANGED
@@ -1,330 +1,330 @@
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.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Plugin_License
15
- */
16
- class FS_Plugin_License extends FS_Entity {
17
-
18
- #region Properties
19
-
20
- /**
21
- * @var number
22
- */
23
- public $plugin_id;
24
- /**
25
- * @var number
26
- */
27
- public $user_id;
28
- /**
29
- * @var number
30
- */
31
- public $plan_id;
32
- /**
33
- * @author Leo Fajardo (@leorw)
34
- * @since 2.3.0
35
- *
36
- * @var string
37
- */
38
- public $parent_plan_name;
39
- /**
40
- * @author Leo Fajardo (@leorw)
41
- * @since 2.3.0
42
- *
43
- * @var string
44
- */
45
- public $parent_plan_title;
46
- /**
47
- * @author Leo Fajardo (@leorw)
48
- * @since 2.3.0
49
- *
50
- * @var number
51
- */
52
- public $parent_license_id;
53
- /**
54
- * @author Leo Fajardo (@leorw)
55
- * @since 2.4.0
56
- *
57
- * @var array
58
- */
59
- public $products;
60
- /**
61
- * @var number
62
- */
63
- public $pricing_id;
64
- /**
65
- * @var int|null
66
- */
67
- public $quota;
68
- /**
69
- * @var int
70
- */
71
- public $activated;
72
- /**
73
- * @var int
74
- */
75
- public $activated_local;
76
- /**
77
- * @var string
78
- */
79
- public $expiration;
80
- /**
81
- * @var string
82
- */
83
- public $secret_key;
84
- /**
85
- * @var bool
86
- */
87
- public $is_whitelabeled;
88
- /**
89
- * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
90
- * license.
91
- */
92
- public $is_free_localhost;
93
- /**
94
- * @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
95
- * block updates and support.
96
- */
97
- public $is_block_features;
98
- /**
99
- * @var bool
100
- */
101
- public $is_cancelled;
102
-
103
- #endregion Properties
104
-
105
- /**
106
- * @param stdClass|bool $license
107
- */
108
- function __construct( $license = false ) {
109
- parent::__construct( $license );
110
- }
111
-
112
- /**
113
- * Get entity type.
114
- *
115
- * @return string
116
- */
117
- static function get_type() {
118
- return 'license';
119
- }
120
-
121
- /**
122
- * Check how many site activations left.
123
- *
124
- * @author Vova Feldman (@svovaf)
125
- * @since 1.0.5
126
- *
127
- * @return int
128
- */
129
- function left() {
130
- if ( ! $this->is_features_enabled() ) {
131
- return 0;
132
- }
133
-
134
- if ( $this->is_unlimited() ) {
135
- return 999;
136
- }
137
-
138
- return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
139
- }
140
-
141
- /**
142
- * Check if single site license.
143
- *
144
- * @author Vova Feldman (@svovaf)
145
- * @since 1.1.8.1
146
- *
147
- * @return bool
148
- */
149
- function is_single_site() {
150
- return ( is_numeric( $this->quota ) && 1 == $this->quota );
151
- }
152
-
153
- /**
154
- * @author Vova Feldman (@svovaf)
155
- * @since 1.0.5
156
- *
157
- * @return bool
158
- */
159
- function is_expired() {
160
- return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
161
- }
162
-
163
- /**
164
- * Check if license is not expired.
165
- *
166
- * @author Vova Feldman (@svovaf)
167
- * @since 1.2.1
168
- *
169
- * @return bool
170
- */
171
- function is_valid() {
172
- return ! $this->is_expired();
173
- }
174
-
175
- /**
176
- * @author Vova Feldman (@svovaf)
177
- * @since 1.0.6
178
- *
179
- * @return bool
180
- */
181
- function is_lifetime() {
182
- return is_null( $this->expiration );
183
- }
184
-
185
- /**
186
- * @author Vova Feldman (@svovaf)
187
- * @since 1.2.0
188
- *
189
- * @return bool
190
- */
191
- function is_unlimited() {
192
- return is_null( $this->quota );
193
- }
194
-
195
- /**
196
- * Check if license is fully utilized.
197
- *
198
- * @author Vova Feldman (@svovaf)
199
- * @since 1.0.6
200
- *
201
- * @param bool|null $is_localhost
202
- *
203
- * @return bool
204
- */
205
- function is_utilized( $is_localhost = null ) {
206
- if ( is_null( $is_localhost ) ) {
207
- $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
208
- }
209
-
210
- if ( $this->is_unlimited() ) {
211
- return false;
212
- }
213
-
214
- return ! ( $this->is_free_localhost && $is_localhost ) &&
215
- ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
216
- }
217
-
218
- /**
219
- * Check if license can be activated.
220
- *
221
- * @author Vova Feldman (@svovaf)
222
- * @since 2.0.0
223
- *
224
- * @param bool|null $is_localhost
225
- *
226
- * @return bool
227
- */
228
- function can_activate( $is_localhost = null ) {
229
- return ! $this->is_utilized( $is_localhost ) && $this->is_features_enabled();
230
- }
231
-
232
- /**
233
- * Check if license can be activated on a given number of production and localhost sites.
234
- *
235
- * @author Vova Feldman (@svovaf)
236
- * @since 2.0.0
237
- *
238
- * @param int $production_count
239
- * @param int $localhost_count
240
- *
241
- * @return bool
242
- */
243
- function can_activate_bulk( $production_count, $localhost_count ) {
244
- if ( $this->is_unlimited() ) {
245
- return true;
246
- }
247
-
248
- /**
249
- * For simplicity, the logic will work as following: when given X sites to activate the license on, if it's
250
- * possible to activate on ALL of them, do the activation. If it's not possible to activate on ALL of them,
251
- * do NOT activate on any of them.
252
- */
253
- return ( $this->quota >= $this->activated + $production_count + ( $this->is_free_localhost ? 0 : $this->activated_local + $localhost_count ) );
254
- }
255
-
256
- /**
257
- * @author Vova Feldman (@svovaf)
258
- * @since 1.2.1
259
- *
260
- * @return bool
261
- */
262
- function is_active() {
263
- return ( ! $this->is_cancelled );
264
- }
265
-
266
- /**
267
- * Check if license's plan features are enabled.
268
- *
269
- * - Either if plan not expired
270
- * - If expired, based on the configuration to block features or not.
271
- *
272
- * @author Vova Feldman (@svovaf)
273
- * @since 1.0.6
274
- *
275
- * @return bool
276
- */
277
- function is_features_enabled() {
278
- return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
279
- }
280
-
281
- /**
282
- * Subscription considered to be new without any payments
283
- * if the license expires in less than 24 hours
284
- * from the license creation.
285
- *
286
- * @author Vova Feldman (@svovaf)
287
- * @since 1.0.9
288
- *
289
- * @return bool
290
- */
291
- function is_first_payment_pending() {
292
- return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
293
- }
294
-
295
- /**
296
- * @return int
297
- */
298
- function total_activations() {
299
- return ( $this->activated + $this->activated_local );
300
- }
301
-
302
- /**
303
- * @author Vova Feldman (@svovaf)
304
- * @since 2.3.1
305
- *
306
- * @return string
307
- */
308
- function get_html_escaped_masked_secret_key() {
309
- return self::mask_secret_key_for_html( $this->secret_key );
310
- }
311
-
312
- /**
313
- * @author Vova Feldman (@svovaf)
314
- * @since 2.3.1
315
- *
316
- * @param string $secret_key
317
- *
318
- * @return string
319
- */
320
- static function mask_secret_key_for_html( $secret_key ) {
321
- return (
322
- // Initial 6 chars - sk_ABC
323
- htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
324
- // Masking
325
- str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '&bull;' ) .
326
- // Last 3 chars.
327
- htmlspecialchars( substr( $secret_key, - 3 ) )
328
- );
329
- }
330
- }
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.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Plugin_License
15
+ */
16
+ class FS_Plugin_License extends FS_Entity {
17
+
18
+ #region Properties
19
+
20
+ /**
21
+ * @var number
22
+ */
23
+ public $plugin_id;
24
+ /**
25
+ * @var number
26
+ */
27
+ public $user_id;
28
+ /**
29
+ * @var number
30
+ */
31
+ public $plan_id;
32
+ /**
33
+ * @author Leo Fajardo (@leorw)
34
+ * @since 2.3.0
35
+ *
36
+ * @var string
37
+ */
38
+ public $parent_plan_name;
39
+ /**
40
+ * @author Leo Fajardo (@leorw)
41
+ * @since 2.3.0
42
+ *
43
+ * @var string
44
+ */
45
+ public $parent_plan_title;
46
+ /**
47
+ * @author Leo Fajardo (@leorw)
48
+ * @since 2.3.0
49
+ *
50
+ * @var number
51
+ */
52
+ public $parent_license_id;
53
+ /**
54
+ * @author Leo Fajardo (@leorw)
55
+ * @since 2.4.0
56
+ *
57
+ * @var array
58
+ */
59
+ public $products;
60
+ /**
61
+ * @var number
62
+ */
63
+ public $pricing_id;
64
+ /**
65
+ * @var int|null
66
+ */
67
+ public $quota;
68
+ /**
69
+ * @var int
70
+ */
71
+ public $activated;
72
+ /**
73
+ * @var int
74
+ */
75
+ public $activated_local;
76
+ /**
77
+ * @var string
78
+ */
79
+ public $expiration;
80
+ /**
81
+ * @var string
82
+ */
83
+ public $secret_key;
84
+ /**
85
+ * @var bool
86
+ */
87
+ public $is_whitelabeled;
88
+ /**
89
+ * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
90
+ * license.
91
+ */
92
+ public $is_free_localhost;
93
+ /**
94
+ * @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
95
+ * block updates and support.
96
+ */
97
+ public $is_block_features;
98
+ /**
99
+ * @var bool
100
+ */
101
+ public $is_cancelled;
102
+
103
+ #endregion Properties
104
+
105
+ /**
106
+ * @param stdClass|bool $license
107
+ */
108
+ function __construct( $license = false ) {
109
+ parent::__construct( $license );
110
+ }
111
+
112
+ /**
113
+ * Get entity type.
114
+ *
115
+ * @return string
116
+ */
117
+ static function get_type() {
118
+ return 'license';
119
+ }
120
+
121
+ /**
122
+ * Check how many site activations left.
123
+ *
124
+ * @author Vova Feldman (@svovaf)
125
+ * @since 1.0.5
126
+ *
127
+ * @return int
128
+ */
129
+ function left() {
130
+ if ( ! $this->is_features_enabled() ) {
131
+ return 0;
132
+ }
133
+
134
+ if ( $this->is_unlimited() ) {
135
+ return 999;
136
+ }
137
+
138
+ return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
139
+ }
140
+
141
+ /**
142
+ * Check if single site license.
143
+ *
144
+ * @author Vova Feldman (@svovaf)
145
+ * @since 1.1.8.1
146
+ *
147
+ * @return bool
148
+ */
149
+ function is_single_site() {
150
+ return ( is_numeric( $this->quota ) && 1 == $this->quota );
151
+ }
152
+
153
+ /**
154
+ * @author Vova Feldman (@svovaf)
155
+ * @since 1.0.5
156
+ *
157
+ * @return bool
158
+ */
159
+ function is_expired() {
160
+ return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
161
+ }
162
+
163
+ /**
164
+ * Check if license is not expired.
165
+ *
166
+ * @author Vova Feldman (@svovaf)
167
+ * @since 1.2.1
168
+ *
169
+ * @return bool
170
+ */
171
+ function is_valid() {
172
+ return ! $this->is_expired();
173
+ }
174
+
175
+ /**
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 1.0.6
178
+ *
179
+ * @return bool
180
+ */
181
+ function is_lifetime() {
182
+ return is_null( $this->expiration );
183
+ }
184
+
185
+ /**
186
+ * @author Vova Feldman (@svovaf)
187
+ * @since 1.2.0
188
+ *
189
+ * @return bool
190
+ */
191
+ function is_unlimited() {
192
+ return is_null( $this->quota );
193
+ }
194
+
195
+ /**
196
+ * Check if license is fully utilized.
197
+ *
198
+ * @author Vova Feldman (@svovaf)
199
+ * @since 1.0.6
200
+ *
201
+ * @param bool|null $is_localhost
202
+ *
203
+ * @return bool
204
+ */
205
+ function is_utilized( $is_localhost = null ) {
206
+ if ( is_null( $is_localhost ) ) {
207
+ $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
208
+ }
209
+
210
+ if ( $this->is_unlimited() ) {
211
+ return false;
212
+ }
213
+
214
+ return ! ( $this->is_free_localhost && $is_localhost ) &&
215
+ ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
216
+ }
217
+
218
+ /**
219
+ * Check if license can be activated.
220
+ *
221
+ * @author Vova Feldman (@svovaf)
222
+ * @since 2.0.0
223
+ *
224
+ * @param bool|null $is_localhost
225
+ *
226
+ * @return bool
227
+ */
228
+ function can_activate( $is_localhost = null ) {
229
+ return ! $this->is_utilized( $is_localhost ) && $this->is_features_enabled();
230
+ }
231
+
232
+ /**
233
+ * Check if license can be activated on a given number of production and localhost sites.
234
+ *
235
+ * @author Vova Feldman (@svovaf)
236
+ * @since 2.0.0
237
+ *
238
+ * @param int $production_count
239
+ * @param int $localhost_count
240
+ *
241
+ * @return bool
242
+ */
243
+ function can_activate_bulk( $production_count, $localhost_count ) {
244
+ if ( $this->is_unlimited() ) {
245
+ return true;
246
+ }
247
+
248
+ /**
249
+ * For simplicity, the logic will work as following: when given X sites to activate the license on, if it's
250
+ * possible to activate on ALL of them, do the activation. If it's not possible to activate on ALL of them,
251
+ * do NOT activate on any of them.
252
+ */
253
+ return ( $this->quota >= $this->activated + $production_count + ( $this->is_free_localhost ? 0 : $this->activated_local + $localhost_count ) );
254
+ }
255
+
256
+ /**
257
+ * @author Vova Feldman (@svovaf)
258
+ * @since 1.2.1
259
+ *
260
+ * @return bool
261
+ */
262
+ function is_active() {
263
+ return ( ! $this->is_cancelled );
264
+ }
265
+
266
+ /**
267
+ * Check if license's plan features are enabled.
268
+ *
269
+ * - Either if plan not expired
270
+ * - If expired, based on the configuration to block features or not.
271
+ *
272
+ * @author Vova Feldman (@svovaf)
273
+ * @since 1.0.6
274
+ *
275
+ * @return bool
276
+ */
277
+ function is_features_enabled() {
278
+ return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
279
+ }
280
+
281
+ /**
282
+ * Subscription considered to be new without any payments
283
+ * if the license expires in less than 24 hours
284
+ * from the license creation.
285
+ *
286
+ * @author Vova Feldman (@svovaf)
287
+ * @since 1.0.9
288
+ *
289
+ * @return bool
290
+ */
291
+ function is_first_payment_pending() {
292
+ return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
293
+ }
294
+
295
+ /**
296
+ * @return int
297
+ */
298
+ function total_activations() {
299
+ return ( $this->activated + $this->activated_local );
300
+ }
301
+
302
+ /**
303
+ * @author Vova Feldman (@svovaf)
304
+ * @since 2.3.1
305
+ *
306
+ * @return string
307
+ */
308
+ function get_html_escaped_masked_secret_key() {
309
+ return self::mask_secret_key_for_html( $this->secret_key );
310
+ }
311
+
312
+ /**
313
+ * @author Vova Feldman (@svovaf)
314
+ * @since 2.3.1
315
+ *
316
+ * @param string $secret_key
317
+ *
318
+ * @return string
319
+ */
320
+ static function mask_secret_key_for_html( $secret_key ) {
321
+ return (
322
+ // Initial 6 chars - sk_ABC
323
+ htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
324
+ // Masking
325
+ str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '&bull;' ) .
326
+ // Last 3 chars.
327
+ htmlspecialchars( substr( $secret_key, - 3 ) )
328
+ );
329
+ }
330
+ }
freemius/includes/entities/class-fs-plugin-plan.php CHANGED
@@ -1,145 +1,145 @@
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.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Plugin_Plan
15
- *
16
- * @property FS_Pricing[] $pricing
17
- */
18
- class FS_Plugin_Plan extends FS_Entity {
19
-
20
- #region Properties
21
-
22
- /**
23
- * @var number
24
- */
25
- public $plugin_id;
26
- /**
27
- * @var string
28
- */
29
- public $name;
30
- /**
31
- * @var string
32
- */
33
- public $title;
34
- /**
35
- * @var string
36
- */
37
- public $description;
38
- /**
39
- * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
40
- */
41
- public $is_free_localhost;
42
- /**
43
- * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
44
- * support.
45
- */
46
- public $is_block_features;
47
- /**
48
- * @var int
49
- */
50
- public $license_type;
51
- /**
52
- * @var bool
53
- */
54
- public $is_https_support;
55
- /**
56
- * @var int Trial days.
57
- */
58
- public $trial_period;
59
- /**
60
- * @var string If true, require payment for trial.
61
- */
62
- public $is_require_subscription;
63
- /**
64
- * @var string Knowledge Base URL.
65
- */
66
- public $support_kb;
67
- /**
68
- * @var string Support Forum URL.
69
- */
70
- public $support_forum;
71
- /**
72
- * @var string Support email address.
73
- */
74
- public $support_email;
75
- /**
76
- * @var string Support phone.
77
- */
78
- public $support_phone;
79
- /**
80
- * @var string Support skype username.
81
- */
82
- public $support_skype;
83
- /**
84
- * @var bool Is personal success manager supported with the plan.
85
- */
86
- public $is_success_manager;
87
- /**
88
- * @var bool Is featured plan.
89
- */
90
- public $is_featured;
91
-
92
- #endregion Properties
93
-
94
- /**
95
- * @param object|bool $plan
96
- */
97
- function __construct( $plan = false ) {
98
- parent::__construct( $plan );
99
-
100
- if ( is_object( $plan ) ) {
101
- $this->name = strtolower( $plan->name );
102
- }
103
- }
104
-
105
- static function get_type() {
106
- return 'plan';
107
- }
108
-
109
- /**
110
- * @author Vova Feldman (@svovaf)
111
- * @since 1.0.9
112
- *
113
- * @return bool
114
- */
115
- function is_free() {
116
- return ( 'free' === $this->name );
117
- }
118
-
119
- /**
120
- * Checks if this plan supports "Technical Support".
121
- *
122
- * @author Leo Fajardo (leorw)
123
- * @since 1.2.0
124
- *
125
- * @return bool
126
- */
127
- function has_technical_support() {
128
- return ( ! empty( $this->support_email ) ||
129
- ! empty( $this->support_skype ) ||
130
- ! empty( $this->support_phone ) ||
131
- ! empty( $this->is_success_manager )
132
- );
133
- }
134
-
135
- /**
136
- * @author Vova Feldman (@svovaf)
137
- * @since 1.0.9
138
- *
139
- * @return bool
140
- */
141
- function has_trial() {
142
- return ! $this->is_free() &&
143
- is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
144
- }
145
  }
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.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Plugin_Plan
15
+ *
16
+ * @property FS_Pricing[] $pricing
17
+ */
18
+ class FS_Plugin_Plan extends FS_Entity {
19
+
20
+ #region Properties
21
+
22
+ /**
23
+ * @var number
24
+ */
25
+ public $plugin_id;
26
+ /**
27
+ * @var string
28
+ */
29
+ public $name;
30
+ /**
31
+ * @var string
32
+ */
33
+ public $title;
34
+ /**
35
+ * @var string
36
+ */
37
+ public $description;
38
+ /**
39
+ * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
40
+ */
41
+ public $is_free_localhost;
42
+ /**
43
+ * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
44
+ * support.
45
+ */
46
+ public $is_block_features;
47
+ /**
48
+ * @var int
49
+ */
50
+ public $license_type;
51
+ /**
52
+ * @var bool
53
+ */
54
+ public $is_https_support;
55
+ /**
56
+ * @var int Trial days.
57
+ */
58
+ public $trial_period;
59
+ /**
60
+ * @var string If true, require payment for trial.
61
+ */
62
+ public $is_require_subscription;
63
+ /**
64
+ * @var string Knowledge Base URL.
65
+ */
66
+ public $support_kb;
67
+ /**
68
+ * @var string Support Forum URL.
69
+ */
70
+ public $support_forum;
71
+ /**
72
+ * @var string Support email address.
73
+ */
74
+ public $support_email;
75
+ /**
76
+ * @var string Support phone.
77
+ */
78
+ public $support_phone;
79
+ /**
80
+ * @var string Support skype username.
81
+ */
82
+ public $support_skype;
83
+ /**
84
+ * @var bool Is personal success manager supported with the plan.
85
+ */
86
+ public $is_success_manager;
87
+ /**
88
+ * @var bool Is featured plan.
89
+ */
90
+ public $is_featured;
91
+
92
+ #endregion Properties
93
+
94
+ /**
95
+ * @param object|bool $plan
96
+ */
97
+ function __construct( $plan = false ) {
98
+ parent::__construct( $plan );
99
+
100
+ if ( is_object( $plan ) ) {
101
+ $this->name = strtolower( $plan->name );
102
+ }
103
+ }
104
+
105
+ static function get_type() {
106
+ return 'plan';
107
+ }
108
+
109
+ /**
110
+ * @author Vova Feldman (@svovaf)
111
+ * @since 1.0.9
112
+ *
113
+ * @return bool
114
+ */
115
+ function is_free() {
116
+ return ( 'free' === $this->name );
117
+ }
118
+
119
+ /**
120
+ * Checks if this plan supports "Technical Support".
121
+ *
122
+ * @author Leo Fajardo (leorw)
123
+ * @since 1.2.0
124
+ *
125
+ * @return bool
126
+ */
127
+ function has_technical_support() {
128
+ return ( ! empty( $this->support_email ) ||
129
+ ! empty( $this->support_skype ) ||
130
+ ! empty( $this->support_phone ) ||
131
+ ! empty( $this->is_success_manager )
132
+ );
133
+ }
134
+
135
+ /**
136
+ * @author Vova Feldman (@svovaf)
137
+ * @since 1.0.9
138
+ *
139
+ * @return bool
140
+ */
141
+ function has_trial() {
142
+ return ! $this->is_free() &&
143
+ is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
144
+ }
145
  }
freemius/includes/entities/class-fs-plugin-tag.php CHANGED
@@ -1,60 +1,60 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2018, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin_Tag extends FS_Entity {
14
- /**
15
- * @var string
16
- */
17
- public $version;
18
- /**
19
- * @var string
20
- */
21
- public $url;
22
- /**
23
- * @var string
24
- */
25
- public $requires_platform_version;
26
- /**
27
- * @var string
28
- */
29
- public $tested_up_to_version;
30
- /**
31
- * @var bool
32
- */
33
- public $has_free;
34
- /**
35
- * @var bool
36
- */
37
- public $has_premium;
38
- /**
39
- * @var string One of the following: `pending`, `beta`, `unreleased`.
40
- */
41
- public $release_mode;
42
-
43
- function __construct( $tag = false ) {
44
- parent::__construct( $tag );
45
- }
46
-
47
- static function get_type() {
48
- return 'tag';
49
- }
50
-
51
- /**
52
- * @author Leo Fajardo (@leorw)
53
- * @since 2.3.0
54
- *
55
- * @return bool
56
- */
57
- function is_beta() {
58
- return ( 'beta' === $this->release_mode );
59
- }
60
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2018, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin_Tag extends FS_Entity {
14
+ /**
15
+ * @var string
16
+ */
17
+ public $version;
18
+ /**
19
+ * @var string
20
+ */
21
+ public $url;
22
+ /**
23
+ * @var string
24
+ */
25
+ public $requires_platform_version;
26
+ /**
27
+ * @var string
28
+ */
29
+ public $tested_up_to_version;
30
+ /**
31
+ * @var bool
32
+ */
33
+ public $has_free;
34
+ /**
35
+ * @var bool
36
+ */
37
+ public $has_premium;
38
+ /**
39
+ * @var string One of the following: `pending`, `beta`, `unreleased`.
40
+ */
41
+ public $release_mode;
42
+
43
+ function __construct( $tag = false ) {
44
+ parent::__construct( $tag );
45
+ }
46
+
47
+ static function get_type() {
48
+ return 'tag';
49
+ }
50
+
51
+ /**
52
+ * @author Leo Fajardo (@leorw)
53
+ * @since 2.3.0
54
+ *
55
+ * @return bool
56
+ */
57
+ function is_beta() {
58
+ return ( 'beta' === $this->release_mode );
59
+ }
60
  }
freemius/includes/entities/class-fs-plugin.php CHANGED
@@ -1,159 +1,159 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin extends FS_Scope_Entity {
14
- /**
15
- * @since 1.0.6
16
- * @var null|number
17
- */
18
- public $parent_plugin_id;
19
- /**
20
- * @var string
21
- */
22
- public $title;
23
- /**
24
- * @var string
25
- */
26
- public $slug;
27
- /**
28
- * @author Leo Fajardo (@leorw)
29
- * @since 2.2.1
30
- *
31
- * @var string
32
- */
33
- public $premium_slug;
34
- /**
35
- * @since 1.2.2
36
- *
37
- * @var string 'plugin' or 'theme'
38
- */
39
- public $type;
40
- /**
41
- * @author Leo Fajardo (@leorw)
42
- *
43
- * @since 1.2.3
44
- *
45
- * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
46
- */
47
- public $affiliate_moderation;
48
- /**
49
- * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
- */
51
- public $is_wp_org_compliant = true;
52
- /**
53
- * @author Leo Fajardo (@leorw)
54
- * @since 2.2.5
55
- *
56
- * @var int
57
- */
58
- public $premium_releases_count;
59
-
60
- #region Install Specific Properties
61
-
62
- /**
63
- * @var string
64
- */
65
- public $file;
66
- /**
67
- * @var string
68
- */
69
- public $version;
70
- /**
71
- * @var bool
72
- */
73
- public $auto_update;
74
- /**
75
- * @var FS_Plugin_Info
76
- */
77
- public $info;
78
- /**
79
- * @since 1.0.9
80
- *
81
- * @var bool
82
- */
83
- public $is_premium;
84
- /**
85
- * @author Leo Fajardo (@leorw)
86
- * @since 2.2.1
87
- *
88
- * @var string
89
- */
90
- public $premium_suffix;
91
- /**
92
- * @since 1.0.9
93
- *
94
- * @var bool
95
- */
96
- public $is_live;
97
- /**
98
- * @since 2.2.3
99
- * @var null|number
100
- */
101
- public $bundle_id;
102
- /**
103
- * @since 2.3.1
104
- * @var null|string
105
- */
106
- public $bundle_public_key;
107
-
108
- const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
109
-
110
- #endregion Install Specific Properties
111
-
112
- /**
113
- * @param stdClass|bool $plugin
114
- */
115
- function __construct( $plugin = false ) {
116
- parent::__construct( $plugin );
117
-
118
- $this->is_premium = false;
119
- $this->is_live = true;
120
-
121
- if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
122
- $this->premium_slug = "{$this->slug}-premium";
123
- }
124
-
125
- if ( empty( $this->premium_suffix ) ) {
126
- $this->premium_suffix = '(Premium)';
127
- }
128
-
129
- if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
130
- $this->info = new FS_Plugin_Info( $plugin->info );
131
- }
132
- }
133
-
134
- /**
135
- * Check if plugin is an add-on (has parent).
136
- *
137
- * @author Vova Feldman (@svovaf)
138
- * @since 1.0.6
139
- *
140
- * @return bool
141
- */
142
- function is_addon() {
143
- return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
144
- }
145
-
146
- /**
147
- * @author Leo Fajardo (@leorw)
148
- * @since 1.2.3
149
- *
150
- * @return bool
151
- */
152
- function has_affiliate_program() {
153
- return ( ! empty( $this->affiliate_moderation ) );
154
- }
155
-
156
- static function get_type() {
157
- return 'plugin';
158
- }
159
  }
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin extends FS_Scope_Entity {
14
+ /**
15
+ * @since 1.0.6
16
+ * @var null|number
17
+ */
18
+ public $parent_plugin_id;
19
+ /**
20
+ * @var string
21
+ */
22
+ public $title;
23
+ /**
24
+ * @var string
25
+ */
26
+ public $slug;
27
+ /**
28
+ * @author Leo Fajardo (@leorw)
29
+ * @since 2.2.1
30
+ *
31
+ * @var string
32
+ */
33
+ public $premium_slug;
34
+ /**
35
+ * @since 1.2.2
36
+ *
37
+ * @var string 'plugin' or 'theme'
38
+ */
39
+ public $type;
40
+ /**
41
+ * @author Leo Fajardo (@leorw)
42
+ *
43
+ * @since 1.2.3
44
+ *
45
+ * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
46
+ */
47
+ public $affiliate_moderation;
48
+ /**
49
+ * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
+ */
51
+ public $is_wp_org_compliant = true;
52
+ /**
53
+ * @author Leo Fajardo (@leorw)
54
+ * @since 2.2.5
55
+ *
56
+ * @var int
57
+ */
58
+ public $premium_releases_count;
59
+
60
+ #region Install Specific Properties
61
+
62
+ /**
63
+ * @var string
64
+ */
65
+ public $file;
66
+ /**
67
+ * @var string
68
+ */
69
+ public $version;
70
+ /**
71
+ * @var bool
72
+ */
73
+ public $auto_update;
74
+ /**
75
+ * @var FS_Plugin_Info
76
+ */
77
+ public $info;
78
+ /**
79
+ * @since 1.0.9
80
+ *
81
+ * @var bool
82
+ */
83
+ public $is_premium;
84
+ /**
85
+ * @author Leo Fajardo (@leorw)
86
+ * @since 2.2.1
87
+ *
88
+ * @var string
89
+ */
90
+ public $premium_suffix;
91
+ /**
92
+ * @since 1.0.9
93
+ *
94
+ * @var bool
95
+ */
96
+ public $is_live;
97
+ /**
98
+ * @since 2.2.3
99
+ * @var null|number
100
+ */
101
+ public $bundle_id;
102
+ /**
103
+ * @since 2.3.1
104
+ * @var null|string
105
+ */
106
+ public $bundle_public_key;
107
+
108
+ const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
109
+
110
+ #endregion Install Specific Properties
111
+
112
+ /**
113
+ * @param stdClass|bool $plugin
114
+ */
115
+ function __construct( $plugin = false ) {
116
+ parent::__construct( $plugin );
117
+
118
+ $this->is_premium = false;
119
+ $this->is_live = true;
120
+
121
+ if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
122
+ $this->premium_slug = "{$this->slug}-premium";
123
+ }
124
+
125
+ if ( empty( $this->premium_suffix ) ) {
126
+ $this->premium_suffix = '(Premium)';
127
+ }
128
+
129
+ if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
130
+ $this->info = new FS_Plugin_Info( $plugin->info );
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Check if plugin is an add-on (has parent).
136
+ *
137
+ * @author Vova Feldman (@svovaf)
138
+ * @since 1.0.6
139
+ *
140
+ * @return bool
141
+ */
142
+ function is_addon() {
143
+ return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
144
+ }
145
+
146
+ /**
147
+ * @author Leo Fajardo (@leorw)
148
+ * @since 1.2.3
149
+ *
150
+ * @return bool
151
+ */
152
+ function has_affiliate_program() {
153
+ return ( ! empty( $this->affiliate_moderation ) );
154
+ }
155
+
156
+ static function get_type() {
157
+ return 'plugin';
158
+ }
159
  }
freemius/includes/entities/class-fs-pricing.php CHANGED
@@ -1,157 +1,157 @@
1
- <?php
2
- /**
3
- * @package Freemius for EDD Add-On
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.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Pricing extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $plan_id;
21
- /**
22
- * @var int
23
- */
24
- public $licenses;
25
- /**
26
- * @var null|float
27
- */
28
- public $monthly_price;
29
- /**
30
- * @var null|float
31
- */
32
- public $annual_price;
33
- /**
34
- * @var null|float
35
- */
36
- public $lifetime_price;
37
- /**
38
- * @author Leo Fajardo (@leorw)
39
- * @since 2.3.1
40
- *
41
- * @var string One of the following: `usd`, `gbp`, `eur`.
42
- */
43
- public $currency;
44
-
45
- #endregion Properties
46
-
47
- /**
48
- * @param object|bool $pricing
49
- */
50
- function __construct( $pricing = false ) {
51
- parent::__construct( $pricing );
52
- }
53
-
54
- static function get_type() {
55
- return 'pricing';
56
- }
57
-
58
- /**
59
- * @author Vova Feldman (@svovaf)
60
- * @since 1.1.8
61
- *
62
- * @return bool
63
- */
64
- function has_monthly() {
65
- return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
66
- }
67
-
68
- /**
69
- * @author Vova Feldman (@svovaf)
70
- * @since 1.1.8
71
- *
72
- * @return bool
73
- */
74
- function has_annual() {
75
- return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
76
- }
77
-
78
- /**
79
- * @author Vova Feldman (@svovaf)
80
- * @since 1.1.8
81
- *
82
- * @return bool
83
- */
84
- function has_lifetime() {
85
- return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
86
- }
87
-
88
- /**
89
- * Check if unlimited licenses pricing.
90
- *
91
- * @author Vova Feldman (@svovaf)
92
- * @since 1.1.8
93
- *
94
- * @return bool
95
- */
96
- function is_unlimited() {
97
- return is_null( $this->licenses );
98
- }
99
-
100
-
101
- /**
102
- * Check if pricing has more than one billing cycle.
103
- *
104
- * @author Vova Feldman (@svovaf)
105
- * @since 1.1.8
106
- *
107
- * @return bool
108
- */
109
- function is_multi_cycle() {
110
- $cycles = 0;
111
- if ( $this->has_monthly() ) {
112
- $cycles ++;
113
- }
114
- if ( $this->has_annual() ) {
115
- $cycles ++;
116
- }
117
- if ( $this->has_lifetime() ) {
118
- $cycles ++;
119
- }
120
-
121
- return $cycles > 1;
122
- }
123
-
124
- /**
125
- * Get annual over monthly discount.
126
- *
127
- * @author Vova Feldman (@svovaf)
128
- * @since 1.1.8
129
- *
130
- * @return int
131
- */
132
- function annual_discount_percentage() {
133
- return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
134
- }
135
-
136
- /**
137
- * Get annual over monthly savings.
138
- *
139
- * @author Vova Feldman (@svovaf)
140
- * @since 1.1.8
141
- *
142
- * @return float
143
- */
144
- function annual_savings() {
145
- return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
146
- }
147
-
148
- /**
149
- * @author Leo Fajardo (@leorw)
150
- * @since 2.3.1
151
- *
152
- * @return bool
153
- */
154
- function is_usd() {
155
- return ( 'usd' === $this->currency );
156
- }
157
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius for EDD Add-On
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.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Pricing extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $plan_id;
21
+ /**
22
+ * @var int
23
+ */
24
+ public $licenses;
25
+ /**
26
+ * @var null|float
27
+ */
28
+ public $monthly_price;
29
+ /**
30
+ * @var null|float
31
+ */
32
+ public $annual_price;
33
+ /**
34
+ * @var null|float
35
+ */
36
+ public $lifetime_price;
37
+ /**
38
+ * @author Leo Fajardo (@leorw)
39
+ * @since 2.3.1
40
+ *
41
+ * @var string One of the following: `usd`, `gbp`, `eur`.
42
+ */
43
+ public $currency;
44
+
45
+ #endregion Properties
46
+
47
+ /**
48
+ * @param object|bool $pricing
49
+ */
50
+ function __construct( $pricing = false ) {
51
+ parent::__construct( $pricing );
52
+ }
53
+
54
+ static function get_type() {
55
+ return 'pricing';
56
+ }
57
+
58
+ /**
59
+ * @author Vova Feldman (@svovaf)
60
+ * @since 1.1.8
61
+ *
62
+ * @return bool
63
+ */
64
+ function has_monthly() {
65
+ return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
66
+ }
67
+
68
+ /**
69
+ * @author Vova Feldman (@svovaf)
70
+ * @since 1.1.8
71
+ *
72
+ * @return bool
73
+ */
74
+ function has_annual() {
75
+ return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
76
+ }
77
+
78
+ /**
79
+ * @author Vova Feldman (@svovaf)
80
+ * @since 1.1.8
81
+ *
82
+ * @return bool
83
+ */
84
+ function has_lifetime() {
85
+ return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
86
+ }
87
+
88
+ /**
89
+ * Check if unlimited licenses pricing.
90
+ *
91
+ * @author Vova Feldman (@svovaf)
92
+ * @since 1.1.8
93
+ *
94
+ * @return bool
95
+ */
96
+ function is_unlimited() {
97
+ return is_null( $this->licenses );
98
+ }
99
+
100
+
101
+ /**
102
+ * Check if pricing has more than one billing cycle.
103
+ *
104
+ * @author Vova Feldman (@svovaf)
105
+ * @since 1.1.8
106
+ *
107
+ * @return bool
108
+ */
109
+ function is_multi_cycle() {
110
+ $cycles = 0;
111
+ if ( $this->has_monthly() ) {
112
+ $cycles ++;
113
+ }
114
+ if ( $this->has_annual() ) {
115
+ $cycles ++;
116
+ }
117
+ if ( $this->has_lifetime() ) {
118
+ $cycles ++;
119
+ }
120
+
121
+ return $cycles > 1;
122
+ }
123
+
124
+ /**
125
+ * Get annual over monthly discount.
126
+ *
127
+ * @author Vova Feldman (@svovaf)
128
+ * @since 1.1.8
129
+ *
130
+ * @return int
131
+ */
132
+ function annual_discount_percentage() {
133
+ return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
134
+ }
135
+
136
+ /**
137
+ * Get annual over monthly savings.
138
+ *
139
+ * @author Vova Feldman (@svovaf)
140
+ * @since 1.1.8
141
+ *
142
+ * @return float
143
+ */
144
+ function annual_savings() {
145
+ return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
146
+ }
147
+
148
+ /**
149
+ * @author Leo Fajardo (@leorw)
150
+ * @since 2.3.1
151
+ *
152
+ * @return bool
153
+ */
154
+ function is_usd() {
155
+ return ( 'usd' === $this->currency );
156
+ }
157
  }
freemius/includes/entities/class-fs-scope-entity.php CHANGED
@@ -1,29 +1,29 @@
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
- class FS_Scope_Entity extends FS_Entity {
14
- /**
15
- * @var string
16
- */
17
- public $public_key;
18
- /**
19
- * @var string
20
- */
21
- public $secret_key;
22
-
23
- /**
24
- * @param bool|stdClass $scope_entity
25
- */
26
- function __construct( $scope_entity = false ) {
27
- parent::__construct( $scope_entity );
28
- }
29
  }
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
+ class FS_Scope_Entity extends FS_Entity {
14
+ /**
15
+ * @var string
16
+ */
17
+ public $public_key;
18
+ /**
19
+ * @var string
20
+ */
21
+ public $secret_key;
22
+
23
+ /**
24
+ * @param bool|stdClass $scope_entity
25
+ */
26
+ function __construct( $scope_entity = false ) {
27
+ parent::__construct( $scope_entity );
28
+ }
29
  }
freemius/includes/entities/class-fs-subscription.php CHANGED
@@ -1,147 +1,147 @@
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.9
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Subscription extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $user_id;
21
- /**
22
- * @var number
23
- */
24
- public $install_id;
25
- /**
26
- * @var number
27
- */
28
- public $plan_id;
29
- /**
30
- * @var number
31
- */
32
- public $license_id;
33
- /**
34
- * @var float
35
- */
36
- public $total_gross;
37
- /**
38
- * @var float
39
- */
40
- public $amount_per_cycle;
41
- /**
42
- * @var int # of months
43
- */
44
- public $billing_cycle;
45
- /**
46
- * @var float
47
- */
48
- public $outstanding_balance;
49
- /**
50
- * @var int
51
- */
52
- public $failed_payments;
53
- /**
54
- * @var string
55
- */
56
- public $gateway;
57
- /**
58
- * @var string
59
- */
60
- public $external_id;
61
- /**
62
- * @var string|null
63
- */
64
- public $trial_ends;
65
- /**
66
- * @var string|null Datetime of the next payment, or null if cancelled.
67
- */
68
- public $next_payment;
69
- /**
70
- * @since 2.3.1
71
- *
72
- * @var string|null Datetime of the cancellation.
73
- */
74
- public $canceled_at;
75
- /**
76
- * @var string|null
77
- */
78
- public $vat_id;
79
- /**
80
- * @var string Two characters country code
81
- */
82
- public $country_code;
83
-
84
- #endregion Properties
85
-
86
- /**
87
- * @param object|bool $subscription
88
- */
89
- function __construct( $subscription = false ) {
90
- parent::__construct( $subscription );
91
- }
92
-
93
- static function get_type() {
94
- return 'subscription';
95
- }
96
-
97
- /**
98
- * Check if subscription is active.
99
- *
100
- * @author Vova Feldman (@svovaf)
101
- * @since 1.0.9
102
- *
103
- * @return bool
104
- */
105
- function is_active() {
106
- if ( $this->is_canceled() ) {
107
- return false;
108
- }
109
-
110
- return (
111
- ! empty( $this->next_payment ) &&
112
- strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
113
- );
114
- }
115
-
116
- /**
117
- * @author Vova Feldman (@svovaf)
118
- * @since 2.3.1
119
- *
120
- * @return bool
121
- */
122
- function is_canceled() {
123
- return ! is_null( $this->canceled_at );
124
- }
125
-
126
- /**
127
- * Subscription considered to be new without any payments
128
- * if the next payment should be made within less than 24 hours
129
- * from the subscription creation.
130
- *
131
- * @author Vova Feldman (@svovaf)
132
- * @since 1.0.9
133
- *
134
- * @return bool
135
- */
136
- function is_first_payment_pending() {
137
- return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
138
- }
139
-
140
- /**
141
- * @author Vova Feldman (@svovaf)
142
- * @since 1.1.7
143
- */
144
- function has_trial() {
145
- return ! is_null( $this->trial_ends );
146
- }
147
  }
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.9
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Subscription extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $user_id;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $install_id;
25
+ /**
26
+ * @var number
27
+ */
28
+ public $plan_id;
29
+ /**
30
+ * @var number
31
+ */
32
+ public $license_id;
33
+ /**
34
+ * @var float
35
+ */
36
+ public $total_gross;
37
+ /**
38
+ * @var float
39
+ */
40
+ public $amount_per_cycle;
41
+ /**
42
+ * @var int # of months
43
+ */
44
+ public $billing_cycle;
45
+ /**
46
+ * @var float
47
+ */
48
+ public $outstanding_balance;
49
+ /**
50
+ * @var int
51
+ */
52
+ public $failed_payments;
53
+ /**
54
+ * @var string
55
+ */
56
+ public $gateway;
57
+ /**
58
+ * @var string
59
+ */
60
+ public $external_id;
61
+ /**
62
+ * @var string|null
63
+ */
64
+ public $trial_ends;
65
+ /**
66
+ * @var string|null Datetime of the next payment, or null if cancelled.
67
+ */
68
+ public $next_payment;
69
+ /**
70
+ * @since 2.3.1
71
+ *
72
+ * @var string|null Datetime of the cancellation.
73
+ */
74
+ public $canceled_at;
75
+ /**
76
+ * @var string|null
77
+ */
78
+ public $vat_id;
79
+ /**
80
+ * @var string Two characters country code
81
+ */
82
+ public $country_code;
83
+
84
+ #endregion Properties
85
+
86
+ /**
87
+ * @param object|bool $subscription
88
+ */
89
+ function __construct( $subscription = false ) {
90
+ parent::__construct( $subscription );
91
+ }
92
+
93
+ static function get_type() {
94
+ return 'subscription';
95
+ }
96
+
97
+ /**
98
+ * Check if subscription is active.
99
+ *
100
+ * @author Vova Feldman (@svovaf)
101
+ * @since 1.0.9
102
+ *
103
+ * @return bool
104
+ */
105
+ function is_active() {
106
+ if ( $this->is_canceled() ) {
107
+ return false;
108
+ }
109
+
110
+ return (
111
+ ! empty( $this->next_payment ) &&
112
+ strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
113
+ );
114
+ }
115
+
116
+ /**
117
+ * @author Vova Feldman (@svovaf)
118
+ * @since 2.3.1
119
+ *
120
+ * @return bool
121
+ */
122
+ function is_canceled() {
123
+ return ! is_null( $this->canceled_at );
124
+ }
125
+
126
+ /**
127
+ * Subscription considered to be new without any payments
128
+ * if the next payment should be made within less than 24 hours
129
+ * from the subscription creation.
130
+ *
131
+ * @author Vova Feldman (@svovaf)
132
+ * @since 1.0.9
133
+ *
134
+ * @return bool
135
+ */
136
+ function is_first_payment_pending() {
137
+ return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
138
+ }
139
+
140
+ /**
141
+ * @author Vova Feldman (@svovaf)
142
+ * @since 1.1.7
143
+ */
144
+ function has_trial() {
145
+ return ! is_null( $this->trial_ends );
146
+ }
147
  }
freemius/includes/entities/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/l10n.php CHANGED
@@ -1,48 +1,48 @@
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.2.1.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Retrieve the translation of $text.
15
- *
16
- * @since 1.2.1.6
17
- *
18
- * @param string $text
19
- *
20
- * @return string
21
- */
22
- function _fs_text( $text ) {
23
- // Avoid misleading Theme Check warning.
24
- $fn = 'translate';
25
- return $fn( $text, 'freemius' );
26
- }
27
-
28
- /**
29
- * Retrieve translated string with gettext context.
30
- *
31
- * Quite a few times, there will be collisions with similar translatable text
32
- * found in more than two places, but with different translated context.
33
- *
34
- * By including the context in the pot file, translators can translate the two
35
- * strings differently.
36
- *
37
- * @since 1.2.1.6
38
- *
39
- * @param string $text
40
- * @param string $context
41
- *
42
- * @return string
43
- */
44
- function _fs_x( $text, $context ) {
45
- // Avoid misleading Theme Check warning.
46
- $fn = 'translate_with_gettext_context';
47
- return $fn( $text, $context, 'freemius' );
48
- }
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.2.1.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Retrieve the translation of $text.
15
+ *
16
+ * @since 1.2.1.6
17
+ *
18
+ * @param string $text
19
+ *
20
+ * @return string
21
+ */
22
+ function _fs_text( $text ) {
23
+ // Avoid misleading Theme Check warning.
24
+ $fn = 'translate';
25
+ return $fn( $text, 'freemius' );
26
+ }
27
+
28
+ /**
29
+ * Retrieve translated string with gettext context.
30
+ *
31
+ * Quite a few times, there will be collisions with similar translatable text
32
+ * found in more than two places, but with different translated context.
33
+ *
34
+ * By including the context in the pot file, translators can translate the two
35
+ * strings differently.
36
+ *
37
+ * @since 1.2.1.6
38
+ *
39
+ * @param string $text
40
+ * @param string $context
41
+ *
42
+ * @return string
43
+ */
44
+ function _fs_x( $text, $context ) {
45
+ // Avoid misleading Theme Check warning.
46
+ $fn = 'translate_with_gettext_context';
47
+ return $fn( $text, $context, 'freemius' );
48
+ }
freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
@@ -1,1006 +1,1006 @@
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.1.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Admin_Menu_Manager {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @since 1.2.2
19
- *
20
- * @var string
21
- */
22
- protected $_module_unique_affix;
23
-
24
- /**
25
- * @since 1.2.2
26
- *
27
- * @var number
28
- */
29
- protected $_module_id;
30
-
31
- /**
32
- * @since 1.2.2
33
- *
34
- * @var string
35
- */
36
- protected $_module_type;
37
-
38
- /**
39
- * @since 1.0.6
40
- *
41
- * @var string
42
- */
43
- private $_menu_slug;
44
- /**
45
- * @since 1.1.3
46
- *
47
- * @var string
48
- */
49
- private $_parent_slug;
50
- /**
51
- * @since 1.1.3
52
- *
53
- * @var string
54
- */
55
- private $_parent_type;
56
- /**
57
- * @since 1.1.3
58
- *
59
- * @var string
60
- */
61
- private $_type;
62
- /**
63
- * @since 1.1.3
64
- *
65
- * @var bool
66
- */
67
- private $_is_top_level;
68
- /**
69
- * @since 1.1.3
70
- *
71
- * @var bool
72
- */
73
- private $_is_override_exact;
74
- /**
75
- * @since 1.1.3
76
- *
77
- * @var array<string,bool>
78
- */
79
- private $_default_submenu_items;
80
- /**
81
- * @since 1.1.3
82
- *
83
- * @var string
84
- */
85
- private $_first_time_path;
86
- /**
87
- * @since 1.2.2
88
- *
89
- * @var bool
90
- */
91
- private $_menu_exists;
92
- /**
93
- * @since 2.0.0
94
- *
95
- * @var bool
96
- */
97
- private $_network_menu_exists;
98
-
99
- #endregion Properties
100
-
101
- /**
102
- * @var FS_Logger
103
- */
104
- protected $_logger;
105
-
106
- #region Singleton
107
-
108
- /**
109
- * @var FS_Admin_Menu_Manager[]
110
- */
111
- private static $_instances = array();
112
-
113
- /**
114
- * @param number $module_id
115
- * @param string $module_type
116
- * @param string $module_unique_affix
117
- *
118
- * @return FS_Admin_Menu_Manager
119
- */
120
- static function instance( $module_id, $module_type, $module_unique_affix ) {
121
- $key = 'm_' . $module_id;
122
-
123
- if ( ! isset( self::$_instances[ $key ] ) ) {
124
- self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
125
- }
126
-
127
- return self::$_instances[ $key ];
128
- }
129
-
130
- protected function __construct( $module_id, $module_type, $module_unique_affix ) {
131
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
132
-
133
- $this->_module_id = $module_id;
134
- $this->_module_type = $module_type;
135
- $this->_module_unique_affix = $module_unique_affix;
136
- }
137
-
138
- #endregion Singleton
139
-
140
- #region Helpers
141
-
142
- private function get_option( &$options, $key, $default = false ) {
143
- return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
144
- }
145
-
146
- private function get_bool_option( &$options, $key, $default = false ) {
147
- return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
148
- }
149
-
150
- #endregion Helpers
151
-
152
- /**
153
- * @param array $menu
154
- * @param bool $is_addon
155
- */
156
- function init( $menu, $is_addon = false ) {
157
- $this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
158
- $this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
159
-
160
- $this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
161
-
162
- $this->_default_submenu_items = array();
163
- // @deprecated
164
- $this->_type = 'page';
165
- $this->_is_top_level = true;
166
- $this->_is_override_exact = false;
167
- $this->_parent_slug = false;
168
- // @deprecated
169
- $this->_parent_type = 'page';
170
-
171
- if ( isset( $menu ) ) {
172
- if ( ! $is_addon ) {
173
- $this->_default_submenu_items = array(
174
- 'contact' => $this->get_bool_option( $menu, 'contact', true ),
175
- 'support' => $this->get_bool_option( $menu, 'support', true ),
176
- 'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
177
- 'account' => $this->get_bool_option( $menu, 'account', true ),
178
- 'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
179
- 'addons' => $this->get_bool_option( $menu, 'addons', true ),
180
- );
181
-
182
- // @deprecated
183
- $this->_type = $this->get_option( $menu, 'type', 'page' );
184
- }
185
-
186
- $this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
187
-
188
- if ( isset( $menu['parent'] ) ) {
189
- $this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
190
- // @deprecated
191
- $this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
192
-
193
- // If parent's slug is different, then it's NOT a top level menu item.
194
- $this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
195
- } else {
196
- /**
197
- * If no parent then top level if:
198
- * - Has custom admin menu ('page')
199
- * - CPT menu type ('cpt')
200
- */
201
- // $this->_is_top_level = in_array( $this->_type, array(
202
- // 'cpt',
203
- // 'page'
204
- // ) );
205
- }
206
-
207
- $first_path = $this->get_option( $menu, 'first-path', false );
208
-
209
- if ( ! empty( $first_path ) && is_string( $first_path ) ) {
210
- $this->_first_time_path = $first_path;
211
- }
212
- }
213
- }
214
-
215
- /**
216
- * Check if top level menu.
217
- *
218
- * @author Vova Feldman (@svovaf)
219
- * @since 1.1.3
220
- *
221
- * @return bool False if submenu item.
222
- */
223
- function is_top_level() {
224
- return $this->_is_top_level;
225
- }
226
-
227
- /**
228
- * Check if the page should be override on exact URL match.
229
- *
230
- * @author Vova Feldman (@svovaf)
231
- * @since 1.1.3
232
- *
233
- * @return bool False if submenu item.
234
- */
235
- function is_override_exact() {
236
- return $this->_is_override_exact;
237
- }
238
-
239
-
240
- /**
241
- * Get the path of the page the user should be forwarded to after first activation.
242
- *
243
- * @author Vova Feldman (@svovaf)
244
- * @since 1.1.3
245
- *
246
- * @param bool $is_network Since 2.4.5
247
- *
248
- * @return string
249
- */
250
- function get_first_time_path( $is_network = false ) {
251
- if ( empty ( $this->_first_time_path ) ) {
252
- return $this->_first_time_path;
253
- }
254
-
255
- if ( $is_network ) {
256
- return network_admin_url( $this->_first_time_path );
257
- } else {
258
- return admin_url( $this->_first_time_path );
259
- }
260
- }
261
-
262
- /**
263
- * Check if plugin's menu item is part of a custom top level menu.
264
- *
265
- * @author Vova Feldman (@svovaf)
266
- * @since 1.1.3
267
- *
268
- * @return bool
269
- */
270
- function has_custom_parent() {
271
- return ! $this->_is_top_level && is_string( $this->_parent_slug );
272
- }
273
-
274
- /**
275
- * @author Leo Fajardo (@leorw)
276
- * @since 1.2.2
277
- *
278
- * @return bool
279
- */
280
- function has_menu() {
281
- return $this->_menu_exists;
282
- }
283
-
284
- /**
285
- * @author Vova Feldman (@svovaf)
286
- * @since 2.0.0
287
- *
288
- * @return bool
289
- */
290
- function has_network_menu() {
291
- return $this->_network_menu_exists;
292
- }
293
-
294
- /**
295
- * @author Leo Fajardo (@leorw)
296
- *
297
- * @param string $menu_slug
298
- *
299
- * @since 2.1.3
300
- */
301
- function set_slug_and_network_menu_exists_flag($menu_slug ) {
302
- $this->_menu_slug = $menu_slug;
303
- $this->_network_menu_exists = false;
304
- }
305
-
306
- /**
307
- * @author Vova Feldman (@svovaf)
308
- * @since 1.1.3
309
- *
310
- * @param string $id
311
- * @param bool $default
312
- * @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
313
- *
314
- * @return bool
315
- */
316
- function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
317
- if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
318
- return false;
319
- }
320
-
321
- return fs_apply_filter(
322
- $this->_module_unique_affix,
323
- 'is_submenu_visible',
324
- $this->get_bool_option( $this->_default_submenu_items, $id, $default ),
325
- $id
326
- );
327
- }
328
-
329
- /**
330
- * Calculates admin settings menu slug.
331
- * If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
332
- *
333
- * @author Vova Feldman (@svovaf)
334
- * @since 1.1.3
335
- *
336
- * @param string $page
337
- *
338
- * @return string
339
- */
340
- function get_slug( $page = '' ) {
341
- return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
342
- $this->_menu_slug :
343
- $this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
344
- }
345
-
346
- /**
347
- * @author Vova Feldman (@svovaf)
348
- * @since 1.1.3
349
- *
350
- * @return string
351
- */
352
- function get_parent_slug() {
353
- return $this->_parent_slug;
354
- }
355
-
356
- /**
357
- * @author Vova Feldman (@svovaf)
358
- * @since 1.1.3
359
- *
360
- * @return string
361
- */
362
- function get_type() {
363
- return $this->_type;
364
- }
365
-
366
- /**
367
- * @author Vova Feldman (@svovaf)
368
- * @since 1.1.3
369
- *
370
- * @return bool
371
- */
372
- function is_cpt() {
373
- return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
374
- // Back compatibility.
375
- 'cpt' === $this->_type
376
- );
377
- }
378
-
379
- /**
380
- * @author Vova Feldman (@svovaf)
381
- * @since 1.1.3
382
- *
383
- * @return string
384
- */
385
- function get_parent_type() {
386
- return $this->_parent_type;
387
- }
388
-
389
- /**
390
- * @author Vova Feldman (@svovaf)
391
- * @since 1.1.3
392
- *
393
- * @return string
394
- */
395
- function get_raw_slug() {
396
- return $this->_menu_slug;
397
- }
398
-
399
- /**
400
- * Get plugin's original menu slug.
401
- *
402
- * @author Vova Feldman (@svovaf)
403
- * @since 1.1.3
404
- *
405
- * @return string
406
- */
407
- function get_original_menu_slug() {
408
- if ( 'cpt' === $this->_type ) {
409
- return add_query_arg( array(
410
- 'post_type' => $this->_menu_slug
411
- ), 'edit.php' );
412
- }
413
-
414
- if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
415
- return $this->_menu_slug;
416
- } else {
417
- return $this->_module_unique_affix;
418
- }
419
- }
420
-
421
- /**
422
- * @author Vova Feldman (@svovaf)
423
- * @since 1.1.3
424
- *
425
- * @return string
426
- */
427
- function get_top_level_menu_slug() {
428
- return $this->has_custom_parent() ?
429
- $this->get_parent_slug() :
430
- $this->get_raw_slug();
431
- }
432
-
433
- /**
434
- * Is user on plugin's admin activation page.
435
- *
436
- * @author Vova Feldman (@svovaf)
437
- * @since 1.0.8
438
- *
439
- * @param bool $show_opt_in_on_themes_page Since 2.3.1
440
- *
441
- * @return bool
442
- *
443
- * @deprecated Please use is_activation_page() instead.
444
- */
445
- function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
446
- return $this->is_activation_page( $show_opt_in_on_themes_page );
447
- }
448
-
449
- /**
450
- * Is user on product's admin activation page.
451
- *
452
- * @author Vova Feldman (@svovaf)
453
- * @since 2.3.1
454
- *
455
- * @param bool $show_opt_in_on_themes_page Since 2.3.1
456
- *
457
- * @return bool
458
- */
459
- function is_activation_page( $show_opt_in_on_themes_page = false ) {
460
- if ( $show_opt_in_on_themes_page ) {
461
- /**
462
- * In activation only when show_optin query string param is given.
463
- *
464
- * @since 1.2.2
465
- */
466
- return (
467
- ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
468
- Freemius::is_themes_page() &&
469
- fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
470
- );
471
- }
472
-
473
- if ( $this->_menu_exists &&
474
- ( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
475
- ) {
476
- /**
477
- * Module has a settings menu and the context page is the main settings page, so assume it's in
478
- * activation (doesn't really check if already opted-in/skipped or not).
479
- *
480
- * @since 1.2.2
481
- */
482
- return true;
483
- }
484
-
485
- return false;
486
- }
487
-
488
- #region Submenu Override
489
-
490
- /**
491
- * Override submenu's action.
492
- *
493
- * @author Vova Feldman (@svovaf)
494
- * @since 1.1.0
495
- *
496
- * @param string $parent_slug
497
- * @param string $menu_slug
498
- * @param callable $function
499
- *
500
- * @return false|string If submenu exist, will return the hook name.
501
- */
502
- function override_submenu_action( $parent_slug, $menu_slug, $function ) {
503
- global $submenu;
504
-
505
- $menu_slug = plugin_basename( $menu_slug );
506
- $parent_slug = plugin_basename( $parent_slug );
507
-
508
- if ( ! isset( $submenu[ $parent_slug ] ) ) {
509
- // Parent menu not exist.
510
- return false;
511
- }
512
-
513
- $found_submenu_item = false;
514
- foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
515
- if ( $menu_slug === $submenu_item[2] ) {
516
- $found_submenu_item = $submenu_item;
517
- break;
518
- }
519
- }
520
-
521
- if ( false === $found_submenu_item ) {
522
- // Submenu item not found.
523
- return false;
524
- }
525
-
526
- // Remove current function.
527
- $hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
528
- remove_all_actions( $hookname );
529
-
530
- // Attach new action.
531
- add_action( $hookname, $function );
532
-
533
- return $hookname;
534
- }
535
-
536
- #endregion Submenu Override
537
-
538
- #region Top level menu Override
539
-
540
- /**
541
- * Find plugin's admin dashboard main menu item.
542
- *
543
- * @author Vova Feldman (@svovaf)
544
- * @since 1.0.2
545
- *
546
- * @return string[]|false
547
- */
548
- private function find_top_level_menu() {
549
- global $menu;
550
-
551
- $position = - 1;
552
- $found_menu = false;
553
-
554
- $menu_slug = $this->get_raw_slug();
555
-
556
- $hook_name = get_plugin_page_hookname( $menu_slug, '' );
557
- foreach ( $menu as $pos => $m ) {
558
- if ( $menu_slug === $m[2] ) {
559
- $position = $pos;
560
- $found_menu = $m;
561
- break;
562
- }
563
- }
564
-
565
- if ( false === $found_menu ) {
566
- return false;
567
- }
568
-
569
- return array(
570
- 'menu' => $found_menu,
571
- 'position' => $position,
572
- 'hook_name' => $hook_name
573
- );
574
- }
575
-
576
- /**
577
- * Find plugin's admin dashboard main submenu item.
578
- *
579
- * @author Vova Feldman (@svovaf)
580
- * @since 1.2.1.6
581
- *
582
- * @return array|false
583
- */
584
- private function find_main_submenu() {
585
- global $submenu;
586
-
587
- $top_level_menu_slug = $this->get_top_level_menu_slug();
588
-
589
- if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
590
- return false;
591
- }
592
-
593
- $submenu_slug = $this->get_raw_slug();
594
-
595
- $position = - 1;
596
- $found_submenu = false;
597
-
598
- $hook_name = get_plugin_page_hookname( $submenu_slug, '' );
599
-
600
- foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
601
- if ( $submenu_slug === $sub[2] ) {
602
- $position = $pos;
603
- $found_submenu = $sub;
604
- }
605
- }
606
-
607
- if ( false === $found_submenu ) {
608
- return false;
609
- }
610
-
611
- return array(
612
- 'menu' => $found_submenu,
613
- 'parent_slug' => $top_level_menu_slug,
614
- 'position' => $position,
615
- 'hook_name' => $hook_name
616
- );
617
- }
618
-
619
- /**
620
- * Remove all sub-menu items.
621
- *
622
- * @author Vova Feldman (@svovaf)
623
- * @since 1.0.7
624
- *
625
- * @return bool If submenu with plugin's menu slug was found.
626
- */
627
- private function remove_all_submenu_items() {
628
- global $submenu;
629
-
630
- $menu_slug = $this->get_raw_slug();
631
-
632
- if ( ! isset( $submenu[ $menu_slug ] ) ) {
633
- return false;
634
- }
635
-
636
- /**
637
- * This method is NOT executed for WordPress.org themes.
638
- * Since we maintain only one version of the SDK we added this small
639
- * hack to avoid the error from Theme Check since it's a false-positive.
640
- *
641
- * @author Vova Feldman (@svovaf)
642
- * @since 1.2.2.7
643
- */
644
- $submenu_ref = &$submenu;
645
- $submenu_ref[ $menu_slug ] = array();
646
-
647
- return true;
648
- }
649
-
650
- /**
651
- *
652
- * @author Vova Feldman (@svovaf)
653
- * @since 1.0.9
654
- *
655
- * @param bool $remove_top_level_menu
656
- *
657
- * @return false|array[string]mixed
658
- */
659
- function remove_menu_item( $remove_top_level_menu = false ) {
660
- $this->_logger->entrance();
661
-
662
- // Find main menu item.
663
- $top_level_menu = $this->find_top_level_menu();
664
-
665
- if ( false === $top_level_menu ) {
666
- return false;
667
- }
668
-
669
- // Remove it with its actions.
670
- remove_all_actions( $top_level_menu['hook_name'] );
671
-
672
- // Remove all submenu items.
673
- $this->remove_all_submenu_items();
674
-
675
- if ( $remove_top_level_menu ) {
676
- global $menu;
677
- unset( $menu[ $top_level_menu['position'] ] );
678
- }
679
-
680
- return $top_level_menu;
681
- }
682
-
683
- /**
684
- * Get module's main admin setting page URL.
685
- *
686
- * @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
687
- *
688
- * @author Vova Feldman (@svovaf)
689
- * @since 1.2.2.7
690
- *
691
- * @return string
692
- */
693
- function main_menu_url() {
694
- $this->_logger->entrance();
695
-
696
- if ( $this->_is_top_level ) {
697
- $menu = $this->find_top_level_menu();
698
- } else {
699
- $menu = $this->find_main_submenu();
700
- }
701
-
702
- $parent_slug = isset( $menu['parent_slug'] ) ?
703
- $menu['parent_slug'] :
704
- 'admin.php';
705
-
706
- return admin_url(
707
- $parent_slug .
708
- ( false === strpos( $parent_slug, '?' ) ? '?' : '&' ) .
709
- 'page=' .
710
- $menu['menu'][2]
711
- );
712
- }
713
-
714
- /**
715
- * @author Vova Feldman (@svovaf)
716
- * @since 1.1.4
717
- *
718
- * @param callable $function
719
- *
720
- * @return false|array[string]mixed
721
- */
722
- function override_menu_item( $function ) {
723
- $found_menu = $this->remove_menu_item();
724
-
725
- if ( false === $found_menu ) {
726
- return false;
727
- }
728
-
729
- if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
730
- $menu_slug = plugin_basename( $this->get_slug() );
731
-
732
- $hookname = get_plugin_page_hookname( $menu_slug, '' );
733
-
734
- // Override menu action.
735
- add_action( $hookname, $function );
736
- } else {
737
- global $menu;
738
-
739
- // Remove original CPT menu.
740
- unset( $menu[ $found_menu['position'] ] );
741
-
742
- // Create new top-level menu action.
743
- $hookname = self::add_page(
744
- $found_menu['menu'][3],
745
- $found_menu['menu'][0],
746
- 'manage_options',
747
- $this->get_slug(),
748
- $function,
749
- $found_menu['menu'][6],
750
- $found_menu['position']
751
- );
752
- }
753
-
754
- return $hookname;
755
- }
756
-
757
- /**
758
- * Adds a counter to the module's top level menu item.
759
- *
760
- * @author Vova Feldman (@svovaf)
761
- * @since 1.2.1.5
762
- *
763
- * @param int $counter
764
- * @param string $class
765
- */
766
- function add_counter_to_menu_item( $counter = 1, $class = '' ) {
767
- global $menu, $submenu;
768
-
769
- $mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
770
-
771
- /**
772
- * This method is NOT executed for WordPress.org themes.
773
- * Since we maintain only one version of the SDK we added this small
774
- * hack to avoid the error from Theme Check since it's a false-positive.
775
- *
776
- * @author Vova Feldman (@svovaf)
777
- * @since 1.2.2.7
778
- */
779
- $menu_ref = &$menu;
780
- $submenu_ref = &$submenu;
781
-
782
- if ( $this->_is_top_level ) {
783
- // Find main menu item.
784
- $found_menu = $this->find_top_level_menu();
785
-
786
- if ( false !== $found_menu ) {
787
- // Override menu label.
788
- $menu_ref[ $found_menu['position'] ][0] = sprintf(
789
- $mask,
790
- $found_menu['menu'][0],
791
- $class,
792
- $counter
793
- );
794
- }
795
- } else {
796
- $found_submenu = $this->find_main_submenu();
797
-
798
- if ( false !== $found_submenu ) {
799
- // Override menu label.
800
- $submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
801
- $mask,
802
- $found_submenu['menu'][0],
803
- $class,
804
- $counter
805
- );
806
- }
807
- }
808
- }
809
-
810
- #endregion Top level menu Override
811
-
812
- /**
813
- * Add a top-level menu page.
814
- *
815
- * Note for WordPress.org Theme/Plugin reviewer:
816
- *
817
- * This is a replication of `add_menu_page()` to avoid Theme Check warning.
818
- *
819
- * Why?
820
- * ====
821
- * Freemius is an SDK for plugin and theme developers. Since the core
822
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
823
- * we only develop and maintain one code base.
824
- *
825
- * This method will not run for wp.org themes (only plugins) since theme
826
- * admin settings/options are now only allowed in the customizer.
827
- *
828
- * If you have any questions or need clarifications, please don't hesitate
829
- * pinging me on slack, my username is @svovaf.
830
- *
831
- * @author Vova Feldman (@svovaf)
832
- * @since 1.2.2
833
- *
834
- * @param string $page_title The text to be displayed in the title tags of the page when the menu is
835
- * selected.
836
- * @param string $menu_title The text to be used for the menu.
837
- * @param string $capability The capability required for this menu to be displayed to the user.
838
- * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
839
- * @param callable|string $function The function to be called to output the content for this page.
840
- * @param string $icon_url The URL to the icon to be used for this menu.
841
- * * Pass a base64-encoded SVG using a data URI, which will be colored to
842
- * match the color scheme. This should begin with
843
- * 'data:image/svg+xml;base64,'.
844
- * * Pass the name of a Dashicons helper class to use a font icon,
845
- * e.g. 'dashicons-chart-pie'.
846
- * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
847
- * via CSS.
848
- * @param int $position The position in the menu order this one should appear.
849
- *
850
- * @return string The resulting page's hook_suffix.
851
- */
852
- static function add_page(
853
- $page_title,
854
- $menu_title,
855
- $capability,
856
- $menu_slug,
857
- $function = '',
858
- $icon_url = '',
859
- $position = null
860
- ) {
861
- $fn = 'add_menu' . '_page';
862
-
863
- return $fn(
864
- $page_title,
865
- $menu_title,
866
- $capability,
867
- $menu_slug,
868
- $function,
869
- $icon_url,
870
- $position
871
- );
872
- }
873
-
874
- /**
875
- * Add page and update menu instance settings.
876
- *
877
- * @author Vova Feldman (@svovaf)
878
- * @since 2.0.0
879
- *
880
- * @param string $page_title
881
- * @param string $menu_title
882
- * @param string $capability
883
- * @param string $menu_slug
884
- * @param callable|string $function
885
- * @param string $icon_url
886
- * @param int|null $position
887
- *
888
- * @return string
889
- */
890
- function add_page_and_update(
891
- $page_title,
892
- $menu_title,
893
- $capability,
894
- $menu_slug,
895
- $function = '',
896
- $icon_url = '',
897
- $position = null
898
- ) {
899
- $this->_menu_slug = $menu_slug;
900
- $this->_is_top_level = true;
901
- $this->_menu_exists = true;
902
- $this->_network_menu_exists = true;
903
-
904
- return self::add_page(
905
- $page_title,
906
- $menu_title,
907
- $capability,
908
- $menu_slug,
909
- $function,
910
- $icon_url,
911
- $position
912
- );
913
- }
914
-
915
- /**
916
- * Add a submenu page.
917
- *
918
- * Note for WordPress.org Theme/Plugin reviewer:
919
- *
920
- * This is a replication of `add_submenu_page()` to avoid Theme Check warning.
921
- *
922
- * Why?
923
- * ====
924
- * Freemius is an SDK for plugin and theme developers. Since the core
925
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
926
- * we only develop and maintain one code base.
927
- *
928
- * This method will not run for wp.org themes (only plugins) since theme
929
- * admin settings/options are now only allowed in the customizer.
930
- *
931
- * If you have any questions or need clarifications, please don't hesitate
932
- * pinging me on slack, my username is @svovaf.
933
- *
934
- * @author Vova Feldman (@svovaf)
935
- * @since 1.2.2
936
- *
937
- * @param string $parent_slug The slug name for the parent menu (or the file name of a standard
938
- * WordPress admin page).
939
- * @param string $page_title The text to be displayed in the title tags of the page when the menu is
940
- * selected.
941
- * @param string $menu_title The text to be used for the menu.
942
- * @param string $capability The capability required for this menu to be displayed to the user.
943
- * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
944
- * @param callable|string $function The function to be called to output the content for this page.
945
- *
946
- * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
947
- * required.
948
- */
949
- static function add_subpage(
950
- $parent_slug,
951
- $page_title,
952
- $menu_title,
953
- $capability,
954
- $menu_slug,
955
- $function = ''
956
- ) {
957
- $fn = 'add_submenu' . '_page';
958
-
959
- return $fn( $parent_slug,
960
- $page_title,
961
- $menu_title,
962
- $capability,
963
- $menu_slug,
964
- $function
965
- );
966
- }
967
-
968
- /**
969
- * Add sub page and update menu instance settings.
970
- *
971
- * @author Vova Feldman (@svovaf)
972
- * @since 2.0.0
973
- *
974
- * @param string $parent_slug
975
- * @param string $page_title
976
- * @param string $menu_title
977
- * @param string $capability
978
- * @param string $menu_slug
979
- * @param callable|string $function
980
- *
981
- * @return string
982
- */
983
- function add_subpage_and_update(
984
- $parent_slug,
985
- $page_title,
986
- $menu_title,
987
- $capability,
988
- $menu_slug,
989
- $function = ''
990
- ) {
991
- $this->_menu_slug = $menu_slug;
992
- $this->_parent_slug = $parent_slug;
993
- $this->_is_top_level = false;
994
- $this->_menu_exists = true;
995
- $this->_network_menu_exists = true;
996
-
997
- return self::add_subpage(
998
- $parent_slug,
999
- $page_title,
1000
- $menu_title,
1001
- $capability,
1002
- $menu_slug,
1003
- $function
1004
- );
1005
- }
1006
  }
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.1.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Admin_Menu_Manager {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @since 1.2.2
19
+ *
20
+ * @var string
21
+ */
22
+ protected $_module_unique_affix;
23
+
24
+ /**
25
+ * @since 1.2.2
26
+ *
27
+ * @var number
28
+ */
29
+ protected $_module_id;
30
+
31
+ /**
32
+ * @since 1.2.2
33
+ *
34
+ * @var string
35
+ */
36
+ protected $_module_type;
37
+
38
+ /**
39
+ * @since 1.0.6
40
+ *
41
+ * @var string
42
+ */
43
+ private $_menu_slug;
44
+ /**
45
+ * @since 1.1.3
46
+ *
47
+ * @var string
48
+ */
49
+ private $_parent_slug;
50
+ /**
51
+ * @since 1.1.3
52
+ *
53
+ * @var string
54
+ */
55
+ private $_parent_type;
56
+ /**
57
+ * @since 1.1.3
58
+ *
59
+ * @var string
60
+ */
61
+ private $_type;
62
+ /**
63
+ * @since 1.1.3
64
+ *
65
+ * @var bool
66
+ */
67
+ private $_is_top_level;
68
+ /**
69
+ * @since 1.1.3
70
+ *
71
+ * @var bool
72
+ */
73
+ private $_is_override_exact;
74
+ /**
75
+ * @since 1.1.3
76
+ *
77
+ * @var array<string,bool>
78
+ */
79
+ private $_default_submenu_items;
80
+ /**
81
+ * @since 1.1.3
82
+ *
83
+ * @var string
84
+ */
85
+ private $_first_time_path;
86
+ /**
87
+ * @since 1.2.2
88
+ *
89
+ * @var bool
90
+ */
91
+ private $_menu_exists;
92
+ /**
93
+ * @since 2.0.0
94
+ *
95
+ * @var bool
96
+ */
97
+ private $_network_menu_exists;
98
+
99
+ #endregion Properties
100
+
101
+ /**
102
+ * @var FS_Logger
103
+ */
104
+ protected $_logger;
105
+
106
+ #region Singleton
107
+
108
+ /**
109
+ * @var FS_Admin_Menu_Manager[]
110
+ */
111
+ private static $_instances = array();
112
+
113
+ /**
114
+ * @param number $module_id
115
+ * @param string $module_type
116
+ * @param string $module_unique_affix
117
+ *
118
+ * @return FS_Admin_Menu_Manager
119
+ */
120
+ static function instance( $module_id, $module_type, $module_unique_affix ) {
121
+ $key = 'm_' . $module_id;
122
+
123
+ if ( ! isset( self::$_instances[ $key ] ) ) {
124
+ self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
125
+ }
126
+
127
+ return self::$_instances[ $key ];
128
+ }
129
+
130
+ protected function __construct( $module_id, $module_type, $module_unique_affix ) {
131
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
132
+
133
+ $this->_module_id = $module_id;
134
+ $this->_module_type = $module_type;
135
+ $this->_module_unique_affix = $module_unique_affix;
136
+ }
137
+
138
+ #endregion Singleton
139
+
140
+ #region Helpers
141
+
142
+ private function get_option( &$options, $key, $default = false ) {
143
+ return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
144
+ }
145
+
146
+ private function get_bool_option( &$options, $key, $default = false ) {
147
+ return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
148
+ }
149
+
150
+ #endregion Helpers
151
+
152
+ /**
153
+ * @param array $menu
154
+ * @param bool $is_addon
155
+ */
156
+ function init( $menu, $is_addon = false ) {
157
+ $this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
158
+ $this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
159
+
160
+ $this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
161
+
162
+ $this->_default_submenu_items = array();
163
+ // @deprecated
164
+ $this->_type = 'page';
165
+ $this->_is_top_level = true;
166
+ $this->_is_override_exact = false;
167
+ $this->_parent_slug = false;
168
+ // @deprecated
169
+ $this->_parent_type = 'page';
170
+
171
+ if ( isset( $menu ) ) {
172
+ if ( ! $is_addon ) {
173
+ $this->_default_submenu_items = array(
174
+ 'contact' => $this->get_bool_option( $menu, 'contact', true ),
175
+ 'support' => $this->get_bool_option( $menu, 'support', true ),
176
+ 'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
177
+ 'account' => $this->get_bool_option( $menu, 'account', true ),
178
+ 'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
179
+ 'addons' => $this->get_bool_option( $menu, 'addons', true ),
180
+ );
181
+
182
+ // @deprecated
183
+ $this->_type = $this->get_option( $menu, 'type', 'page' );
184
+ }
185
+
186
+ $this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
187
+
188
+ if ( isset( $menu['parent'] ) ) {
189
+ $this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
190
+ // @deprecated
191
+ $this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
192
+
193
+ // If parent's slug is different, then it's NOT a top level menu item.
194
+ $this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
195
+ } else {
196
+ /**
197
+ * If no parent then top level if:
198
+ * - Has custom admin menu ('page')
199
+ * - CPT menu type ('cpt')
200
+ */
201
+ // $this->_is_top_level = in_array( $this->_type, array(
202
+ // 'cpt',
203
+ // 'page'
204
+ // ) );
205
+ }
206
+
207
+ $first_path = $this->get_option( $menu, 'first-path', false );
208
+
209
+ if ( ! empty( $first_path ) && is_string( $first_path ) ) {
210
+ $this->_first_time_path = $first_path;
211
+ }
212
+ }
213
+ }
214
+
215
+ /**
216
+ * Check if top level menu.
217
+ *
218
+ * @author Vova Feldman (@svovaf)
219
+ * @since 1.1.3
220
+ *
221
+ * @return bool False if submenu item.
222
+ */
223
+ function is_top_level() {
224
+ return $this->_is_top_level;
225
+ }
226
+
227
+ /**
228
+ * Check if the page should be override on exact URL match.
229
+ *
230
+ * @author Vova Feldman (@svovaf)
231
+ * @since 1.1.3
232
+ *
233
+ * @return bool False if submenu item.
234
+ */
235
+ function is_override_exact() {
236
+ return $this->_is_override_exact;
237
+ }
238
+
239
+
240
+ /**
241
+ * Get the path of the page the user should be forwarded to after first activation.
242
+ *
243
+ * @author Vova Feldman (@svovaf)
244
+ * @since 1.1.3
245
+ *
246
+ * @param bool $is_network Since 2.4.5
247
+ *
248
+ * @return string
249
+ */
250
+ function get_first_time_path( $is_network = false ) {
251
+ if ( empty ( $this->_first_time_path ) ) {
252
+ return $this->_first_time_path;
253
+ }
254
+
255
+ if ( $is_network ) {
256
+ return network_admin_url( $this->_first_time_path );
257
+ } else {
258
+ return admin_url( $this->_first_time_path );
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Check if plugin's menu item is part of a custom top level menu.
264
+ *
265
+ * @author Vova Feldman (@svovaf)
266
+ * @since 1.1.3
267
+ *
268
+ * @return bool
269
+ */
270
+ function has_custom_parent() {
271
+ return ! $this->_is_top_level && is_string( $this->_parent_slug );
272
+ }
273
+
274
+ /**
275
+ * @author Leo Fajardo (@leorw)
276
+ * @since 1.2.2
277
+ *
278
+ * @return bool
279
+ */
280
+ function has_menu() {
281
+ return $this->_menu_exists;
282
+ }
283
+
284
+ /**
285
+ * @author Vova Feldman (@svovaf)
286
+ * @since 2.0.0
287
+ *
288
+ * @return bool
289
+ */
290
+ function has_network_menu() {
291
+ return $this->_network_menu_exists;
292
+ }
293
+
294
+ /**
295
+ * @author Leo Fajardo (@leorw)
296
+ *
297
+ * @param string $menu_slug
298
+ *
299
+ * @since 2.1.3
300
+ */
301
+ function set_slug_and_network_menu_exists_flag($menu_slug ) {
302
+ $this->_menu_slug = $menu_slug;
303
+ $this->_network_menu_exists = false;
304
+ }
305
+
306
+ /**
307
+ * @author Vova Feldman (@svovaf)
308
+ * @since 1.1.3
309
+ *
310
+ * @param string $id
311
+ * @param bool $default
312
+ * @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
313
+ *
314
+ * @return bool
315
+ */
316
+ function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
317
+ if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
318
+ return false;
319
+ }
320
+
321
+ return fs_apply_filter(
322
+ $this->_module_unique_affix,
323
+ 'is_submenu_visible',
324
+ $this->get_bool_option( $this->_default_submenu_items, $id, $default ),
325
+ $id
326
+ );
327
+ }
328
+
329
+ /**
330
+ * Calculates admin settings menu slug.
331
+ * If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
332
+ *
333
+ * @author Vova Feldman (@svovaf)
334
+ * @since 1.1.3
335
+ *
336
+ * @param string $page
337
+ *
338
+ * @return string
339
+ */
340
+ function get_slug( $page = '' ) {
341
+ return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
342
+ $this->_menu_slug :
343
+ $this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
344
+ }
345
+
346
+ /**
347
+ * @author Vova Feldman (@svovaf)
348
+ * @since 1.1.3
349
+ *
350
+ * @return string
351
+ */
352
+ function get_parent_slug() {
353
+ return $this->_parent_slug;
354
+ }
355
+
356
+ /**
357
+ * @author Vova Feldman (@svovaf)
358
+ * @since 1.1.3
359
+ *
360
+ * @return string
361
+ */
362
+ function get_type() {
363
+ return $this->_type;
364
+ }
365
+
366
+ /**
367
+ * @author Vova Feldman (@svovaf)
368
+ * @since 1.1.3
369
+ *
370
+ * @return bool
371
+ */
372
+ function is_cpt() {
373
+ return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
374
+ // Back compatibility.
375
+ 'cpt' === $this->_type
376
+ );
377
+ }
378
+
379
+ /**
380
+ * @author Vova Feldman (@svovaf)
381
+ * @since 1.1.3
382
+ *
383
+ * @return string
384
+ */
385
+ function get_parent_type() {
386
+ return $this->_parent_type;
387
+ }
388
+
389
+ /**
390
+ * @author Vova Feldman (@svovaf)
391
+ * @since 1.1.3
392
+ *
393
+ * @return string
394
+ */
395
+ function get_raw_slug() {
396
+ return $this->_menu_slug;
397
+ }
398
+
399
+ /**
400
+ * Get plugin's original menu slug.
401
+ *
402
+ * @author Vova Feldman (@svovaf)
403
+ * @since 1.1.3
404
+ *
405
+ * @return string
406
+ */
407
+ function get_original_menu_slug() {
408
+ if ( 'cpt' === $this->_type ) {
409
+ return add_query_arg( array(
410
+ 'post_type' => $this->_menu_slug
411
+ ), 'edit.php' );
412
+ }
413
+
414
+ if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
415
+ return $this->_menu_slug;
416
+ } else {
417
+ return $this->_module_unique_affix;
418
+ }
419
+ }
420
+
421
+ /**
422
+ * @author Vova Feldman (@svovaf)
423
+ * @since 1.1.3
424
+ *
425
+ * @return string
426
+ */
427
+ function get_top_level_menu_slug() {
428
+ return $this->has_custom_parent() ?
429
+ $this->get_parent_slug() :
430
+ $this->get_raw_slug();
431
+ }
432
+
433
+ /**
434
+ * Is user on plugin's admin activation page.
435
+ *
436
+ * @author Vova Feldman (@svovaf)
437
+ * @since 1.0.8
438
+ *
439
+ * @param bool $show_opt_in_on_themes_page Since 2.3.1
440
+ *
441
+ * @return bool
442
+ *
443
+ * @deprecated Please use is_activation_page() instead.
444
+ */
445
+ function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
446
+ return $this->is_activation_page( $show_opt_in_on_themes_page );
447
+ }
448
+
449
+ /**
450
+ * Is user on product's admin activation page.
451
+ *
452
+ * @author Vova Feldman (@svovaf)
453
+ * @since 2.3.1
454
+ *
455
+ * @param bool $show_opt_in_on_themes_page Since 2.3.1
456
+ *
457
+ * @return bool
458
+ */
459
+ function is_activation_page( $show_opt_in_on_themes_page = false ) {
460
+ if ( $show_opt_in_on_themes_page ) {
461
+ /**
462
+ * In activation only when show_optin query string param is given.
463
+ *
464
+ * @since 1.2.2
465
+ */
466
+ return (
467
+ ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
468
+ Freemius::is_themes_page() &&
469
+ fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
470
+ );
471
+ }
472
+
473
+ if ( $this->_menu_exists &&
474
+ ( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
475
+ ) {
476
+ /**
477
+ * Module has a settings menu and the context page is the main settings page, so assume it's in
478
+ * activation (doesn't really check if already opted-in/skipped or not).
479
+ *
480
+ * @since 1.2.2
481
+ */
482
+ return true;
483
+ }
484
+
485
+ return false;
486
+ }
487
+
488
+ #region Submenu Override
489
+
490
+ /**
491
+ * Override submenu's action.
492
+ *
493
+ * @author Vova Feldman (@svovaf)
494
+ * @since 1.1.0
495
+ *
496
+ * @param string $parent_slug
497
+ * @param string $menu_slug
498
+ * @param callable $function
499
+ *
500
+ * @return false|string If submenu exist, will return the hook name.
501
+ */
502
+ function override_submenu_action( $parent_slug, $menu_slug, $function ) {
503
+ global $submenu;
504
+
505
+ $menu_slug = plugin_basename( $menu_slug );
506
+ $parent_slug = plugin_basename( $parent_slug );
507
+
508
+ if ( ! isset( $submenu[ $parent_slug ] ) ) {
509
+ // Parent menu not exist.
510
+ return false;
511
+ }
512
+
513
+ $found_submenu_item = false;
514
+ foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
515
+ if ( $menu_slug === $submenu_item[2] ) {
516
+ $found_submenu_item = $submenu_item;
517
+ break;
518
+ }
519
+ }
520
+
521
+ if ( false === $found_submenu_item ) {
522
+ // Submenu item not found.
523
+ return false;
524
+ }
525
+
526
+ // Remove current function.
527
+ $hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
528
+ remove_all_actions( $hookname );
529
+
530
+ // Attach new action.
531
+ add_action( $hookname, $function );
532
+
533
+ return $hookname;
534
+ }
535
+
536
+ #endregion Submenu Override
537
+
538
+ #region Top level menu Override
539
+
540
+ /**
541
+ * Find plugin's admin dashboard main menu item.
542
+ *
543
+ * @author Vova Feldman (@svovaf)
544
+ * @since 1.0.2
545
+ *
546
+ * @return string[]|false
547
+ */
548
+ private function find_top_level_menu() {
549
+ global $menu;
550
+
551
+ $position = - 1;
552
+ $found_menu = false;
553
+
554
+ $menu_slug = $this->get_raw_slug();
555
+
556
+ $hook_name = get_plugin_page_hookname( $menu_slug, '' );
557
+ foreach ( $menu as $pos => $m ) {
558
+ if ( $menu_slug === $m[2] ) {
559
+ $position = $pos;
560
+ $found_menu = $m;
561
+ break;
562
+ }
563
+ }
564
+
565
+ if ( false === $found_menu ) {
566
+ return false;
567
+ }
568
+
569
+ return array(
570
+ 'menu' => $found_menu,
571
+ 'position' => $position,
572
+ 'hook_name' => $hook_name
573
+ );
574
+ }
575
+
576
+ /**
577
+ * Find plugin's admin dashboard main submenu item.
578
+ *
579
+ * @author Vova Feldman (@svovaf)
580
+ * @since 1.2.1.6
581
+ *
582
+ * @return array|false
583
+ */
584
+ private function find_main_submenu() {
585
+ global $submenu;
586
+
587
+ $top_level_menu_slug = $this->get_top_level_menu_slug();
588
+
589
+ if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
590
+ return false;
591
+ }
592
+
593
+ $submenu_slug = $this->get_raw_slug();
594
+
595
+ $position = - 1;
596
+ $found_submenu = false;
597
+
598
+ $hook_name = get_plugin_page_hookname( $submenu_slug, '' );
599
+
600
+ foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
601
+ if ( $submenu_slug === $sub[2] ) {
602
+ $position = $pos;
603
+ $found_submenu = $sub;
604
+ }
605
+ }
606
+
607
+ if ( false === $found_submenu ) {
608
+ return false;
609
+ }
610
+
611
+ return array(
612
+ 'menu' => $found_submenu,
613
+ 'parent_slug' => $top_level_menu_slug,
614
+ 'position' => $position,
615
+ 'hook_name' => $hook_name
616
+ );
617
+ }
618
+
619
+ /**
620
+ * Remove all sub-menu items.
621
+ *
622
+ * @author Vova Feldman (@svovaf)
623
+ * @since 1.0.7
624
+ *
625
+ * @return bool If submenu with plugin's menu slug was found.
626
+ */
627
+ private function remove_all_submenu_items() {
628
+ global $submenu;
629
+
630
+ $menu_slug = $this->get_raw_slug();
631
+
632
+ if ( ! isset( $submenu[ $menu_slug ] ) ) {
633
+ return false;
634
+ }
635
+
636
+ /**
637
+ * This method is NOT executed for WordPress.org themes.
638
+ * Since we maintain only one version of the SDK we added this small
639
+ * hack to avoid the error from Theme Check since it's a false-positive.
640
+ *
641
+ * @author Vova Feldman (@svovaf)
642
+ * @since 1.2.2.7
643
+ */
644
+ $submenu_ref = &$submenu;
645
+ $submenu_ref[ $menu_slug ] = array();
646
+
647
+ return true;
648
+ }
649
+
650
+ /**
651
+ *
652
+ * @author Vova Feldman (@svovaf)
653
+ * @since 1.0.9
654
+ *
655
+ * @param bool $remove_top_level_menu
656
+ *
657
+ * @return false|array[string]mixed
658
+ */
659
+ function remove_menu_item( $remove_top_level_menu = false ) {
660
+ $this->_logger->entrance();
661
+
662
+ // Find main menu item.
663
+ $top_level_menu = $this->find_top_level_menu();
664
+
665
+ if ( false === $top_level_menu ) {
666
+ return false;
667
+ }
668
+
669
+ // Remove it with its actions.
670
+ remove_all_actions( $top_level_menu['hook_name'] );
671
+
672
+ // Remove all submenu items.
673
+ $this->remove_all_submenu_items();
674
+
675
+ if ( $remove_top_level_menu ) {
676
+ global $menu;
677
+ unset( $menu[ $top_level_menu['position'] ] );
678
+ }
679
+
680
+ return $top_level_menu;
681
+ }
682
+
683
+ /**
684
+ * Get module's main admin setting page URL.
685
+ *
686
+ * @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
687
+ *
688
+ * @author Vova Feldman (@svovaf)
689
+ * @since 1.2.2.7
690
+ *
691
+ * @return string
692
+ */
693
+ function main_menu_url() {
694
+ $this->_logger->entrance();
695
+
696
+ if ( $this->_is_top_level ) {
697
+ $menu = $this->find_top_level_menu();
698
+ } else {
699
+ $menu = $this->find_main_submenu();
700
+ }
701
+
702
+ $parent_slug = isset( $menu['parent_slug'] ) ?
703
+ $menu['parent_slug'] :
704
+ 'admin.php';
705
+
706
+ return admin_url(
707
+ $parent_slug .
708
+ ( false === strpos( $parent_slug, '?' ) ? '?' : '&' ) .
709
+ 'page=' .
710
+ $menu['menu'][2]
711
+ );
712
+ }
713
+
714
+ /**
715
+ * @author Vova Feldman (@svovaf)
716
+ * @since 1.1.4
717
+ *
718
+ * @param callable $function
719
+ *
720
+ * @return false|array[string]mixed
721
+ */
722
+ function override_menu_item( $function ) {
723
+ $found_menu = $this->remove_menu_item();
724
+
725
+ if ( false === $found_menu ) {
726
+ return false;
727
+ }
728
+
729
+ if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
730
+ $menu_slug = plugin_basename( $this->get_slug() );
731
+
732
+ $hookname = get_plugin_page_hookname( $menu_slug, '' );
733
+
734
+ // Override menu action.
735
+ add_action( $hookname, $function );
736
+ } else {
737
+ global $menu;
738
+
739
+ // Remove original CPT menu.
740
+ unset( $menu[ $found_menu['position'] ] );
741
+
742
+ // Create new top-level menu action.
743
+ $hookname = self::add_page(
744
+ $found_menu['menu'][3],
745
+ $found_menu['menu'][0],
746
+ 'manage_options',
747
+ $this->get_slug(),
748
+ $function,
749
+ $found_menu['menu'][6],
750
+ $found_menu['position']
751
+ );
752
+ }
753
+
754
+ return $hookname;
755
+ }
756
+
757
+ /**
758
+ * Adds a counter to the module's top level menu item.
759
+ *
760
+ * @author Vova Feldman (@svovaf)
761
+ * @since 1.2.1.5
762
+ *
763
+ * @param int $counter
764
+ * @param string $class
765
+ */
766
+ function add_counter_to_menu_item( $counter = 1, $class = '' ) {
767
+ global $menu, $submenu;
768
+
769
+ $mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
770
+
771
+ /**
772
+ * This method is NOT executed for WordPress.org themes.
773
+ * Since we maintain only one version of the SDK we added this small
774
+ * hack to avoid the error from Theme Check since it's a false-positive.
775
+ *
776
+ * @author Vova Feldman (@svovaf)
777
+ * @since 1.2.2.7
778
+ */
779
+ $menu_ref = &$menu;
780
+ $submenu_ref = &$submenu;
781
+
782
+ if ( $this->_is_top_level ) {
783
+ // Find main menu item.
784
+ $found_menu = $this->find_top_level_menu();
785
+
786
+ if ( false !== $found_menu ) {
787
+ // Override menu label.
788
+ $menu_ref[ $found_menu['position'] ][0] = sprintf(
789
+ $mask,
790
+ $found_menu['menu'][0],
791
+ $class,
792
+ $counter
793
+ );
794
+ }
795
+ } else {
796
+ $found_submenu = $this->find_main_submenu();
797
+
798
+ if ( false !== $found_submenu ) {
799
+ // Override menu label.
800
+ $submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
801
+ $mask,
802
+ $found_submenu['menu'][0],
803
+ $class,
804
+ $counter
805
+ );
806
+ }
807
+ }
808
+ }
809
+
810
+ #endregion Top level menu Override
811
+
812
+ /**
813
+ * Add a top-level menu page.
814
+ *
815
+ * Note for WordPress.org Theme/Plugin reviewer:
816
+ *
817
+ * This is a replication of `add_menu_page()` to avoid Theme Check warning.
818
+ *
819
+ * Why?
820
+ * ====
821
+ * Freemius is an SDK for plugin and theme developers. Since the core
822
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
823
+ * we only develop and maintain one code base.
824
+ *
825
+ * This method will not run for wp.org themes (only plugins) since theme
826
+ * admin settings/options are now only allowed in the customizer.
827
+ *
828
+ * If you have any questions or need clarifications, please don't hesitate
829
+ * pinging me on slack, my username is @svovaf.
830
+ *
831
+ * @author Vova Feldman (@svovaf)
832
+ * @since 1.2.2
833
+ *
834
+ * @param string $page_title The text to be displayed in the title tags of the page when the menu is
835
+ * selected.
836
+ * @param string $menu_title The text to be used for the menu.
837
+ * @param string $capability The capability required for this menu to be displayed to the user.
838
+ * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
839
+ * @param callable|string $function The function to be called to output the content for this page.
840
+ * @param string $icon_url The URL to the icon to be used for this menu.
841
+ * * Pass a base64-encoded SVG using a data URI, which will be colored to
842
+ * match the color scheme. This should begin with
843
+ * 'data:image/svg+xml;base64,'.
844
+ * * Pass the name of a Dashicons helper class to use a font icon,
845
+ * e.g. 'dashicons-chart-pie'.
846
+ * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
847
+ * via CSS.
848
+ * @param int $position The position in the menu order this one should appear.
849
+ *
850
+ * @return string The resulting page's hook_suffix.
851
+ */
852
+ static function add_page(
853
+ $page_title,
854
+ $menu_title,
855
+ $capability,
856
+ $menu_slug,
857
+ $function = '',
858
+ $icon_url = '',
859
+ $position = null
860
+ ) {
861
+ $fn = 'add_menu' . '_page';
862
+
863
+ return $fn(
864
+ $page_title,
865
+ $menu_title,
866
+ $capability,
867
+ $menu_slug,
868
+ $function,
869
+ $icon_url,
870
+ $position
871
+ );
872
+ }
873
+
874
+ /**
875
+ * Add page and update menu instance settings.
876
+ *
877
+ * @author Vova Feldman (@svovaf)
878
+ * @since 2.0.0
879
+ *
880
+ * @param string $page_title
881
+ * @param string $menu_title
882
+ * @param string $capability
883
+ * @param string $menu_slug
884
+ * @param callable|string $function
885
+ * @param string $icon_url
886
+ * @param int|null $position
887
+ *
888
+ * @return string
889
+ */
890
+ function add_page_and_update(
891
+ $page_title,
892
+ $menu_title,
893
+ $capability,
894
+ $menu_slug,
895
+ $function = '',
896
+ $icon_url = '',
897
+ $position = null
898
+ ) {
899
+ $this->_menu_slug = $menu_slug;
900
+ $this->_is_top_level = true;
901
+ $this->_menu_exists = true;
902
+ $this->_network_menu_exists = true;
903
+
904
+ return self::add_page(
905
+ $page_title,
906
+ $menu_title,
907
+ $capability,
908
+ $menu_slug,
909
+ $function,
910
+ $icon_url,
911
+ $position
912
+ );
913
+ }
914
+
915
+ /**
916
+ * Add a submenu page.
917
+ *
918
+ * Note for WordPress.org Theme/Plugin reviewer:
919
+ *
920
+ * This is a replication of `add_submenu_page()` to avoid Theme Check warning.
921
+ *
922
+ * Why?
923
+ * ====
924
+ * Freemius is an SDK for plugin and theme developers. Since the core
925
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
926
+ * we only develop and maintain one code base.
927
+ *
928
+ * This method will not run for wp.org themes (only plugins) since theme
929
+ * admin settings/options are now only allowed in the customizer.
930
+ *
931
+ * If you have any questions or need clarifications, please don't hesitate
932
+ * pinging me on slack, my username is @svovaf.
933
+ *
934
+ * @author Vova Feldman (@svovaf)
935
+ * @since 1.2.2
936
+ *
937
+ * @param string $parent_slug The slug name for the parent menu (or the file name of a standard
938
+ * WordPress admin page).
939
+ * @param string $page_title The text to be displayed in the title tags of the page when the menu is
940
+ * selected.
941
+ * @param string $menu_title The text to be used for the menu.
942
+ * @param string $capability The capability required for this menu to be displayed to the user.
943
+ * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
944
+ * @param callable|string $function The function to be called to output the content for this page.
945
+ *
946
+ * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
947
+ * required.
948
+ */
949
+ static function add_subpage(
950
+ $parent_slug,
951
+ $page_title,
952
+ $menu_title,
953
+ $capability,
954
+ $menu_slug,
955
+ $function = ''
956
+ ) {
957
+ $fn = 'add_submenu' . '_page';
958
+
959
+ return $fn( $parent_slug,
960
+ $page_title,
961
+ $menu_title,
962
+ $capability,
963
+ $menu_slug,
964
+ $function
965
+ );
966
+ }
967
+
968
+ /**
969
+ * Add sub page and update menu instance settings.
970
+ *
971
+ * @author Vova Feldman (@svovaf)
972
+ * @since 2.0.0
973
+ *
974
+ * @param string $parent_slug
975
+ * @param string $page_title
976
+ * @param string $menu_title
977
+ * @param string $capability
978
+ * @param string $menu_slug
979
+ * @param callable|string $function
980
+ *
981
+ * @return string
982
+ */
983
+ function add_subpage_and_update(
984
+ $parent_slug,
985
+ $page_title,
986
+ $menu_title,
987
+ $capability,
988
+ $menu_slug,
989
+ $function = ''
990
+ ) {
991
+ $this->_menu_slug = $menu_slug;
992
+ $this->_parent_slug = $parent_slug;
993
+ $this->_is_top_level = false;
994
+ $this->_menu_exists = true;
995
+ $this->_network_menu_exists = true;
996
+
997
+ return self::add_subpage(
998
+ $parent_slug,
999
+ $page_title,
1000
+ $menu_title,
1001
+ $capability,
1002
+ $menu_slug,
1003
+ $function
1004
+ );
1005
+ }
1006
  }
freemius/includes/managers/class-fs-cache-manager.php CHANGED
@@ -1,326 +1,326 @@
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.1.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Cache_Manager {
14
- /**
15
- * @var FS_Option_Manager
16
- */
17
- private $_options;
18
- /**
19
- * @var FS_Logger
20
- */
21
- private $_logger;
22
-
23
- /**
24
- * @var FS_Cache_Manager[]
25
- */
26
- private static $_MANAGERS = array();
27
-
28
- /**
29
- * @author Vova Feldman (@svovaf)
30
- * @since 1.1.3
31
- *
32
- * @param string $id
33
- */
34
- private function __construct( $id ) {
35
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
36
-
37
- $this->_logger->entrance();
38
- $this->_logger->log( 'id = ' . $id );
39
-
40
- $this->_options = FS_Option_Manager::get_manager( $id, true, true, false );
41
- }
42
-
43
- /**
44
- * @author Vova Feldman (@svovaf)
45
- * @since 1.1.6
46
- *
47
- * @param $id
48
- *
49
- * @return FS_Cache_Manager
50
- */
51
- static function get_manager( $id ) {
52
- $id = strtolower( $id );
53
-
54
- if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
55
- self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
56
- }
57
-
58
- return self::$_MANAGERS[ $id ];
59
- }
60
-
61
- /**
62
- * @author Vova Feldman (@svovaf)
63
- * @since 1.1.6
64
- *
65
- * @return bool
66
- */
67
- function is_empty() {
68
- $this->_logger->entrance();
69
-
70
- return $this->_options->is_empty();
71
- }
72
-
73
- /**
74
- * @author Vova Feldman (@svovaf)
75
- * @since 1.1.6
76
- */
77
- function clear() {
78
- $this->_logger->entrance();
79
-
80
- $this->_options->clear( true );
81
- }
82
-
83
- /**
84
- * Delete cache manager from DB.
85
- *
86
- * @author Vova Feldman (@svovaf)
87
- * @since 1.0.9
88
- */
89
- function delete() {
90
- $this->_options->delete();
91
- }
92
-
93
- /**
94
- * Check if there's a cached item.
95
- *
96
- * @author Vova Feldman (@svovaf)
97
- * @since 1.1.6
98
- *
99
- * @param string $key
100
- *
101
- * @return bool
102
- */
103
- function has( $key ) {
104
- $cache_entry = $this->_options->get_option( $key, false );
105
-
106
- return ( is_object( $cache_entry ) &&
107
- isset( $cache_entry->timestamp ) &&
108
- is_numeric( $cache_entry->timestamp )
109
- );
110
- }
111
-
112
- /**
113
- * Check if there's a valid cached item.
114
- *
115
- * @author Vova Feldman (@svovaf)
116
- * @since 1.1.6
117
- *
118
- * @param string $key
119
- * @param null|int $expiration Since 1.2.2.7
120
- *
121
- * @return bool
122
- */
123
- function has_valid( $key, $expiration = null ) {
124
- $cache_entry = $this->_options->get_option( $key, false );
125
-
126
- $is_valid = ( is_object( $cache_entry ) &&
127
- isset( $cache_entry->timestamp ) &&
128
- is_numeric( $cache_entry->timestamp ) &&
129
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
130
- );
131
-
132
- if ( $is_valid &&
133
- is_numeric( $expiration ) &&
134
- isset( $cache_entry->created ) &&
135
- is_numeric( $cache_entry->created ) &&
136
- $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
137
- ) {
138
- /**
139
- * Even if the cache is still valid, since we are checking for validity
140
- * with an explicit expiration period, if the period has past, return
141
- * `false` as if the cache is invalid.
142
- *
143
- * @since 1.2.2.7
144
- */
145
- $is_valid = false;
146
- }
147
-
148
- return $is_valid;
149
- }
150
-
151
- /**
152
- * @author Vova Feldman (@svovaf)
153
- * @since 1.1.6
154
- *
155
- * @param string $key
156
- * @param mixed $default
157
- *
158
- * @return mixed
159
- */
160
- function get( $key, $default = null ) {
161
- $this->_logger->entrance( 'key = ' . $key );
162
-
163
- $cache_entry = $this->_options->get_option( $key, false );
164
-
165
- if ( is_object( $cache_entry ) &&
166
- isset( $cache_entry->timestamp ) &&
167
- is_numeric( $cache_entry->timestamp )
168
- ) {
169
- return $cache_entry->result;
170
- }
171
-
172
- return is_object( $default ) ? clone $default : $default;
173
- }
174
-
175
- /**
176
- * @author Vova Feldman (@svovaf)
177
- * @since 1.1.6
178
- *
179
- * @param string $key
180
- * @param mixed $default
181
- *
182
- * @return mixed
183
- */
184
- function get_valid( $key, $default = null ) {
185
- $this->_logger->entrance( 'key = ' . $key );
186
-
187
- $cache_entry = $this->_options->get_option( $key, false );
188
-
189
- if ( is_object( $cache_entry ) &&
190
- isset( $cache_entry->timestamp ) &&
191
- is_numeric( $cache_entry->timestamp ) &&
192
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
193
- ) {
194
- return $cache_entry->result;
195
- }
196
-
197
- return is_object( $default ) ? clone $default : $default;
198
- }
199
-
200
- /**
201
- * @author Vova Feldman (@svovaf)
202
- * @since 1.1.6
203
- *
204
- * @param string $key
205
- * @param mixed $value
206
- * @param int $expiration
207
- * @param int $created Since 2.0.0 Cache creation date.
208
- */
209
- function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
210
- $this->_logger->entrance( 'key = ' . $key );
211
-
212
- $cache_entry = new stdClass();
213
-
214
- $cache_entry->result = $value;
215
- $cache_entry->created = $created;
216
- $cache_entry->timestamp = $created + $expiration;
217
- $this->_options->set_option( $key, $cache_entry, true );
218
- }
219
-
220
- /**
221
- * Get cached record expiration, or false if not cached or expired.
222
- *
223
- * @author Vova Feldman (@svovaf)
224
- * @since 1.1.7.3
225
- *
226
- * @param string $key
227
- *
228
- * @return bool|int
229
- */
230
- function get_record_expiration( $key ) {
231
- $this->_logger->entrance( 'key = ' . $key );
232
-
233
- $cache_entry = $this->_options->get_option( $key, false );
234
-
235
- if ( is_object( $cache_entry ) &&
236
- isset( $cache_entry->timestamp ) &&
237
- is_numeric( $cache_entry->timestamp ) &&
238
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
239
- ) {
240
- return $cache_entry->timestamp;
241
- }
242
-
243
- return false;
244
- }
245
-
246
- /**
247
- * Purge cached item.
248
- *
249
- * @author Vova Feldman (@svovaf)
250
- * @since 1.1.6
251
- *
252
- * @param string $key
253
- */
254
- function purge( $key ) {
255
- $this->_logger->entrance( 'key = ' . $key );
256
-
257
- $this->_options->unset_option( $key, true );
258
- }
259
-
260
- /**
261
- * Extend cached item caching period.
262
- *
263
- * @author Vova Feldman (@svovaf)
264
- * @since 2.0.0
265
- *
266
- * @param string $key
267
- * @param int $expiration
268
- *
269
- * @return bool
270
- */
271
- function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
272
- $this->_logger->entrance( 'key = ' . $key );
273
-
274
- $cache_entry = $this->_options->get_option( $key, false );
275
-
276
- if ( ! is_object( $cache_entry ) ||
277
- ! isset( $cache_entry->timestamp ) ||
278
- ! is_numeric( $cache_entry->timestamp )
279
- ) {
280
- return false;
281
- }
282
-
283
- $this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
284
-
285
- return true;
286
- }
287
-
288
- /**
289
- * Set cached item as expired.
290
- *
291
- * @author Vova Feldman (@svovaf)
292
- * @since 1.2.2.7
293
- *
294
- * @param string $key
295
- */
296
- function expire( $key ) {
297
- $this->_logger->entrance( 'key = ' . $key );
298
-
299
- $cache_entry = $this->_options->get_option( $key, false );
300
-
301
- if ( is_object( $cache_entry ) &&
302
- isset( $cache_entry->timestamp ) &&
303
- is_numeric( $cache_entry->timestamp )
304
- ) {
305
- // Set to expired.
306
- $cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
307
- $this->_options->set_option( $key, $cache_entry, true );
308
- }
309
- }
310
-
311
- #--------------------------------------------------------------------------------
312
- #region Migration
313
- #--------------------------------------------------------------------------------
314
-
315
- /**
316
- * Migrate options from site level.
317
- *
318
- * @author Vova Feldman (@svovaf)
319
- * @since 2.0.0
320
- */
321
- function migrate_to_network() {
322
- $this->_options->migrate_to_network();
323
- }
324
-
325
- #endregion
326
  }
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.1.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Cache_Manager {
14
+ /**
15
+ * @var FS_Option_Manager
16
+ */
17
+ private $_options;
18
+ /**
19
+ * @var FS_Logger
20
+ */
21
+ private $_logger;
22
+
23
+ /**
24
+ * @var FS_Cache_Manager[]
25
+ */
26
+ private static $_MANAGERS = array();
27
+
28
+ /**
29
+ * @author Vova Feldman (@svovaf)
30
+ * @since 1.1.3
31
+ *
32
+ * @param string $id
33
+ */
34
+ private function __construct( $id ) {
35
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
36
+
37
+ $this->_logger->entrance();
38
+ $this->_logger->log( 'id = ' . $id );
39
+
40
+ $this->_options = FS_Option_Manager::get_manager( $id, true, true, false );
41
+ }
42
+
43
+ /**
44
+ * @author Vova Feldman (@svovaf)
45
+ * @since 1.1.6
46
+ *
47
+ * @param $id
48
+ *
49
+ * @return FS_Cache_Manager
50
+ */
51
+ static function get_manager( $id ) {
52
+ $id = strtolower( $id );
53
+
54
+ if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
55
+ self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
56
+ }
57
+
58
+ return self::$_MANAGERS[ $id ];
59
+ }
60
+
61
+ /**
62
+ * @author Vova Feldman (@svovaf)
63
+ * @since 1.1.6
64
+ *
65
+ * @return bool
66
+ */
67
+ function is_empty() {
68
+ $this->_logger->entrance();
69
+
70
+ return $this->_options->is_empty();
71
+ }
72
+
73
+ /**
74
+ * @author Vova Feldman (@svovaf)
75
+ * @since 1.1.6
76
+ */
77
+ function clear() {
78
+ $this->_logger->entrance();
79
+
80
+ $this->_options->clear( true );
81
+ }
82
+
83
+ /**
84
+ * Delete cache manager from DB.
85
+ *
86
+ * @author Vova Feldman (@svovaf)
87
+ * @since 1.0.9
88
+ */
89
+ function delete() {
90
+ $this->_options->delete();
91
+ }
92
+
93
+ /**
94
+ * Check if there's a cached item.
95
+ *
96
+ * @author Vova Feldman (@svovaf)
97
+ * @since 1.1.6
98
+ *
99
+ * @param string $key
100
+ *
101
+ * @return bool
102
+ */
103
+ function has( $key ) {
104
+ $cache_entry = $this->_options->get_option( $key, false );
105
+
106
+ return ( is_object( $cache_entry ) &&
107
+ isset( $cache_entry->timestamp ) &&
108
+ is_numeric( $cache_entry->timestamp )
109
+ );
110
+ }
111
+
112
+ /**
113
+ * Check if there's a valid cached item.
114
+ *
115
+ * @author Vova Feldman (@svovaf)
116
+ * @since 1.1.6
117
+ *
118
+ * @param string $key
119
+ * @param null|int $expiration Since 1.2.2.7
120
+ *
121
+ * @return bool
122
+ */
123
+ function has_valid( $key, $expiration = null ) {
124
+ $cache_entry = $this->_options->get_option( $key, false );
125
+
126
+ $is_valid = ( is_object( $cache_entry ) &&
127
+ isset( $cache_entry->timestamp ) &&
128
+ is_numeric( $cache_entry->timestamp ) &&
129
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
130
+ );
131
+
132
+ if ( $is_valid &&
133
+ is_numeric( $expiration ) &&
134
+ isset( $cache_entry->created ) &&
135
+ is_numeric( $cache_entry->created ) &&
136
+ $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
137
+ ) {
138
+ /**
139
+ * Even if the cache is still valid, since we are checking for validity
140
+ * with an explicit expiration period, if the period has past, return
141
+ * `false` as if the cache is invalid.
142
+ *
143
+ * @since 1.2.2.7
144
+ */
145
+ $is_valid = false;
146
+ }
147
+
148
+ return $is_valid;
149
+ }
150
+
151
+ /**
152
+ * @author Vova Feldman (@svovaf)
153
+ * @since 1.1.6
154
+ *
155
+ * @param string $key
156
+ * @param mixed $default
157
+ *
158
+ * @return mixed
159
+ */
160
+ function get( $key, $default = null ) {
161
+ $this->_logger->entrance( 'key = ' . $key );
162
+
163
+ $cache_entry = $this->_options->get_option( $key, false );
164
+
165
+ if ( is_object( $cache_entry ) &&
166
+ isset( $cache_entry->timestamp ) &&
167
+ is_numeric( $cache_entry->timestamp )
168
+ ) {
169
+ return $cache_entry->result;
170
+ }
171
+
172
+ return is_object( $default ) ? clone $default : $default;
173
+ }
174
+
175
+ /**
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 1.1.6
178
+ *
179
+ * @param string $key
180
+ * @param mixed $default
181
+ *
182
+ * @return mixed
183
+ */
184
+ function get_valid( $key, $default = null ) {
185
+ $this->_logger->entrance( 'key = ' . $key );
186
+
187
+ $cache_entry = $this->_options->get_option( $key, false );
188
+
189
+ if ( is_object( $cache_entry ) &&
190
+ isset( $cache_entry->timestamp ) &&
191
+ is_numeric( $cache_entry->timestamp ) &&
192
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
193
+ ) {
194
+ return $cache_entry->result;
195
+ }
196
+
197
+ return is_object( $default ) ? clone $default : $default;
198
+ }
199
+
200
+ /**
201
+ * @author Vova Feldman (@svovaf)
202
+ * @since 1.1.6
203
+ *
204
+ * @param string $key
205
+ * @param mixed $value
206
+ * @param int $expiration
207
+ * @param int $created Since 2.0.0 Cache creation date.
208
+ */
209
+ function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
210
+ $this->_logger->entrance( 'key = ' . $key );
211
+
212
+ $cache_entry = new stdClass();
213
+
214
+ $cache_entry->result = $value;
215
+ $cache_entry->created = $created;
216
+ $cache_entry->timestamp = $created + $expiration;
217
+ $this->_options->set_option( $key, $cache_entry, true );
218
+ }
219
+
220
+ /**
221
+ * Get cached record expiration, or false if not cached or expired.
222
+ *
223
+ * @author Vova Feldman (@svovaf)
224
+ * @since 1.1.7.3
225
+ *
226
+ * @param string $key
227
+ *
228
+ * @return bool|int
229
+ */
230
+ function get_record_expiration( $key ) {
231
+ $this->_logger->entrance( 'key = ' . $key );
232
+
233
+ $cache_entry = $this->_options->get_option( $key, false );
234
+
235
+ if ( is_object( $cache_entry ) &&
236
+ isset( $cache_entry->timestamp ) &&
237
+ is_numeric( $cache_entry->timestamp ) &&
238
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
239
+ ) {
240
+ return $cache_entry->timestamp;
241
+ }
242
+
243
+ return false;
244
+ }
245
+
246
+ /**
247
+ * Purge cached item.
248
+ *
249
+ * @author Vova Feldman (@svovaf)
250
+ * @since 1.1.6
251
+ *
252
+ * @param string $key
253
+ */
254
+ function purge( $key ) {
255
+ $this->_logger->entrance( 'key = ' . $key );
256
+
257
+ $this->_options->unset_option( $key, true );
258
+ }
259
+
260
+ /**
261
+ * Extend cached item caching period.
262
+ *
263
+ * @author Vova Feldman (@svovaf)
264
+ * @since 2.0.0
265
+ *
266
+ * @param string $key
267
+ * @param int $expiration
268
+ *
269
+ * @return bool
270
+ */
271
+ function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
272
+ $this->_logger->entrance( 'key = ' . $key );
273
+
274
+ $cache_entry = $this->_options->get_option( $key, false );
275
+
276
+ if ( ! is_object( $cache_entry ) ||
277
+ ! isset( $cache_entry->timestamp ) ||
278
+ ! is_numeric( $cache_entry->timestamp )
279
+ ) {
280
+ return false;
281
+ }
282
+
283
+ $this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
284
+
285
+ return true;
286
+ }
287
+
288
+ /**
289
+ * Set cached item as expired.
290
+ *
291
+ * @author Vova Feldman (@svovaf)
292
+ * @since 1.2.2.7
293
+ *
294
+ * @param string $key
295
+ */
296
+ function expire( $key ) {
297
+ $this->_logger->entrance( 'key = ' . $key );
298
+
299
+ $cache_entry = $this->_options->get_option( $key, false );
300
+
301
+ if ( is_object( $cache_entry ) &&
302
+ isset( $cache_entry->timestamp ) &&
303
+ is_numeric( $cache_entry->timestamp )
304
+ ) {
305
+ // Set to expired.
306
+ $cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
307
+ $this->_options->set_option( $key, $cache_entry, true );
308
+ }
309
+ }
310
+
311
+ #--------------------------------------------------------------------------------
312
+ #region Migration
313
+ #--------------------------------------------------------------------------------
314
+
315
+ /**
316
+ * Migrate options from site level.
317
+ *
318
+ * @author Vova Feldman (@svovaf)
319
+ * @since 2.0.0
320
+ */
321
+ function migrate_to_network() {
322
+ $this->_options->migrate_to_network();
323
+ }
324
+
325
+ #endregion
326
  }
freemius/includes/managers/class-fs-gdpr-manager.php CHANGED
@@ -1,202 +1,202 @@
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 2.1.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_GDPR_Manager {
14
- /**
15
- * @var FS_Option_Manager
16
- */
17
- private $_storage;
18
- /**
19
- * @var array {
20
- * @type bool $required Are GDPR rules apply on the current context admin.
21
- * @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
22
- * @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
23
- * }
24
- */
25
- private $_data;
26
- /**
27
- * @var int
28
- */
29
- private $_wp_user_id;
30
- /**
31
- * @var string
32
- */
33
- private $_option_name;
34
- /**
35
- * @var FS_Admin_Notices
36
- */
37
- private $_notices;
38
-
39
- #--------------------------------------------------------------------------------
40
- #region Singleton
41
- #--------------------------------------------------------------------------------
42
-
43
- /**
44
- * @var FS_GDPR_Manager
45
- */
46
- private static $_instance;
47
-
48
- /**
49
- * @return FS_GDPR_Manager
50
- */
51
- public static function instance() {
52
- if ( ! isset( self::$_instance ) ) {
53
- self::$_instance = new self();
54
- }
55
-
56
- return self::$_instance;
57
- }
58
-
59
- #endregion
60
-
61
- private function __construct() {
62
- $this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
63
- $this->_wp_user_id = Freemius::get_current_wp_user_id();
64
- $this->_option_name = "u{$this->_wp_user_id}";
65
- $this->_data = $this->_storage->get_option( $this->_option_name, array() );
66
- $this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
67
-
68
- if ( ! is_array( $this->_data ) ) {
69
- $this->_data = array();
70
- }
71
- }
72
-
73
- /**
74
- * Update a GDPR option for the current admin and store it.
75
- *
76
- * @author Vova Feldman (@svovaf)
77
- * @since 2.1.0
78
- *
79
- * @param string $name
80
- * @param mixed $value
81
- */
82
- private function update_option( $name, $value ) {
83
- $this->_data[ $name ] = $value;
84
-
85
- $this->_storage->set_option( $this->_option_name, $this->_data, true );
86
- }
87
-
88
- /**
89
- * @author Leo Fajardo (@leorw)
90
- * @since 2.1.0
91
- *
92
- * @return bool|null
93
- */
94
- public function is_required() {
95
- return isset( $this->_data['required'] ) ?
96
- $this->_data['required'] :
97
- null;
98
- }
99
-
100
- /**
101
- * @author Leo Fajardo (@leorw)
102
- * @since 2.1.0
103
- *
104
- * @param bool $is_required
105
- */
106
- public function store_is_required( $is_required ) {
107
- $this->update_option( 'required', $is_required );
108
- }
109
-
110
- /**
111
- * Checks if the GDPR opt-in sticky notice is currently shown.
112
- *
113
- * @author Vova Feldman (@svovaf)
114
- * @since 2.1.0
115
- *
116
- * @return bool
117
- */
118
- public function is_opt_in_notice_shown() {
119
- return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
120
- }
121
-
122
- /**
123
- * Remove the GDPR opt-in sticky notice.
124
- *
125
- * @author Vova Feldman (@svovaf)
126
- * @since 2.1.0
127
- */
128
- public function remove_opt_in_notice() {
129
- $this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
130
-
131
- $this->disable_opt_in_notice();
132
- }
133
-
134
- /**
135
- * Prevents the opt-in message from being added/shown.
136
- *
137
- * @author Leo Fajardo (@leorw)
138
- * @since 2.1.0
139
- */
140
- public function disable_opt_in_notice() {
141
- $this->update_option( 'show_opt_in_notice', false );
142
- }
143
-
144
- /**
145
- * Checks if a GDPR opt-in message needs to be shown to the current admin.
146
- *
147
- * @author Vova Feldman (@svovaf)
148
- * @since 2.1.0
149
- *
150
- * @return bool
151
- */
152
- public function should_show_opt_in_notice() {
153
- return (
154
- ! isset( $this->_data['show_opt_in_notice'] ) ||
155
- true === $this->_data['show_opt_in_notice']
156
- );
157
- }
158
-
159
- /**
160
- * Get the last time the GDPR opt-in notice was shown.
161
- *
162
- * @author Vova Feldman (@svovaf)
163
- * @since 2.1.0
164
- *
165
- * @return false|int
166
- */
167
- public function last_time_notice_was_shown() {
168
- return isset( $this->_data['notice_shown_at'] ) ?
169
- $this->_data['notice_shown_at'] :
170
- false;
171
- }
172
-
173
- /**
174
- * Update the timestamp of the last time the GDPR opt-in message was shown to now.
175
- *
176
- * @author Vova Feldman (@svovaf)
177
- * @since 2.1.0
178
- */
179
- public function notice_was_just_shown() {
180
- $this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
181
- }
182
-
183
- /**
184
- * @param string $message
185
- * @param string|null $plugin_title
186
- *
187
- * @author Vova Feldman (@svovaf)
188
- * @since 2.1.0
189
- */
190
- public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
191
- $this->_notices->add_sticky(
192
- $message,
193
- "gdpr_optin_actions_{$this->_wp_user_id}",
194
- '',
195
- 'promotion',
196
- true,
197
- $this->_wp_user_id,
198
- $plugin_title,
199
- true
200
- );
201
- }
202
  }
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 2.1.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_GDPR_Manager {
14
+ /**
15
+ * @var FS_Option_Manager
16
+ */
17
+ private $_storage;
18
+ /**
19
+ * @var array {
20
+ * @type bool $required Are GDPR rules apply on the current context admin.
21
+ * @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
22
+ * @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
23
+ * }
24
+ */
25
+ private $_data;
26
+ /**
27
+ * @var int
28
+ */
29
+ private $_wp_user_id;
30
+ /**
31
+ * @var string
32
+ */
33
+ private $_option_name;
34
+ /**
35
+ * @var FS_Admin_Notices
36
+ */
37
+ private $_notices;
38
+
39
+ #--------------------------------------------------------------------------------
40
+ #region Singleton
41
+ #--------------------------------------------------------------------------------
42
+
43
+ /**
44
+ * @var FS_GDPR_Manager
45
+ */
46
+ private static $_instance;
47
+
48
+ /**
49
+ * @return FS_GDPR_Manager
50
+ */
51
+ public static function instance() {
52
+ if ( ! isset( self::$_instance ) ) {
53
+ self::$_instance = new self();
54
+ }
55
+
56
+ return self::$_instance;
57
+ }
58
+
59
+ #endregion
60
+
61
+ private function __construct() {
62
+ $this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
63
+ $this->_wp_user_id = Freemius::get_current_wp_user_id();
64
+ $this->_option_name = "u{$this->_wp_user_id}";
65
+ $this->_data = $this->_storage->get_option( $this->_option_name, array() );
66
+ $this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
67
+
68
+ if ( ! is_array( $this->_data ) ) {
69
+ $this->_data = array();
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Update a GDPR option for the current admin and store it.
75
+ *
76
+ * @author Vova Feldman (@svovaf)
77
+ * @since 2.1.0
78
+ *
79
+ * @param string $name
80
+ * @param mixed $value
81
+ */
82
+ private function update_option( $name, $value ) {
83
+ $this->_data[ $name ] = $value;
84
+
85
+ $this->_storage->set_option( $this->_option_name, $this->_data, true );
86
+ }
87
+
88
+ /**
89
+ * @author Leo Fajardo (@leorw)
90
+ * @since 2.1.0
91
+ *
92
+ * @return bool|null
93
+ */
94
+ public function is_required() {
95
+ return isset( $this->_data['required'] ) ?
96
+ $this->_data['required'] :
97
+ null;
98
+ }
99
+
100
+ /**
101
+ * @author Leo Fajardo (@leorw)
102
+ * @since 2.1.0
103
+ *
104
+ * @param bool $is_required
105
+ */
106
+ public function store_is_required( $is_required ) {
107
+ $this->update_option( 'required', $is_required );
108
+ }
109
+
110
+ /**
111
+ * Checks if the GDPR opt-in sticky notice is currently shown.
112
+ *
113
+ * @author Vova Feldman (@svovaf)
114
+ * @since 2.1.0
115
+ *
116
+ * @return bool
117
+ */
118
+ public function is_opt_in_notice_shown() {
119
+ return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
120
+ }
121
+
122
+ /**
123
+ * Remove the GDPR opt-in sticky notice.
124
+ *
125
+ * @author Vova Feldman (@svovaf)
126
+ * @since 2.1.0
127
+ */
128
+ public function remove_opt_in_notice() {
129
+ $this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
130
+
131
+ $this->disable_opt_in_notice();
132
+ }
133
+
134
+ /**
135
+ * Prevents the opt-in message from being added/shown.
136
+ *
137
+ * @author Leo Fajardo (@leorw)
138
+ * @since 2.1.0
139
+ */
140
+ public function disable_opt_in_notice() {
141
+ $this->update_option( 'show_opt_in_notice', false );
142
+ }
143
+
144
+ /**
145
+ * Checks if a GDPR opt-in message needs to be shown to the current admin.
146
+ *
147
+ * @author Vova Feldman (@svovaf)
148
+ * @since 2.1.0
149
+ *
150
+ * @return bool
151
+ */
152
+ public function should_show_opt_in_notice() {
153
+ return (
154
+ ! isset( $this->_data['show_opt_in_notice'] ) ||
155
+ true === $this->_data['show_opt_in_notice']
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Get the last time the GDPR opt-in notice was shown.
161
+ *
162
+ * @author Vova Feldman (@svovaf)
163
+ * @since 2.1.0
164
+ *
165
+ * @return false|int
166
+ */
167
+ public function last_time_notice_was_shown() {
168
+ return isset( $this->_data['notice_shown_at'] ) ?
169
+ $this->_data['notice_shown_at'] :
170
+ false;
171
+ }
172
+
173
+ /**
174
+ * Update the timestamp of the last time the GDPR opt-in message was shown to now.
175
+ *
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 2.1.0
178
+ */
179
+ public function notice_was_just_shown() {
180
+ $this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
181
+ }
182
+
183
+ /**
184
+ * @param string $message
185
+ * @param string|null $plugin_title
186
+ *
187
+ * @author Vova Feldman (@svovaf)
188
+ * @since 2.1.0
189
+ */
190
+ public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
191
+ $this->_notices->add_sticky(
192
+ $message,
193
+ "gdpr_optin_actions_{$this->_wp_user_id}",
194
+ '',
195
+ 'promotion',
196
+ true,
197
+ $this->_wp_user_id,
198
+ $plugin_title,
199
+ true
200
+ );
201
+ }
202
  }
freemius/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -1,392 +1,392 @@
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
- * Class FS_Key_Value_Storage
15
- *
16
- * @property int $install_timestamp
17
- * @property int $activation_timestamp
18
- * @property int $sync_timestamp
19
- * @property object $sync_cron
20
- * @property int $install_sync_timestamp
21
- * @property array $connectivity_test
22
- * @property array $is_on
23
- * @property object $trial_plan
24
- * @property bool $has_trial_plan
25
- * @property bool $trial_promotion_shown
26
- * @property string $sdk_version
27
- * @property string $sdk_last_version
28
- * @property bool $sdk_upgrade_mode
29
- * @property bool $sdk_downgrade_mode
30
- * @property bool $plugin_upgrade_mode
31
- * @property bool $plugin_downgrade_mode
32
- * @property string $plugin_version
33
- * @property string $plugin_last_version
34
- * @property bool $is_plugin_new_install
35
- * @property bool $was_plugin_loaded
36
- * @property object $plugin_main_file
37
- * @property bool $prev_is_premium
38
- * @property array $is_anonymous
39
- * @property bool $is_pending_activation
40
- * @property bool $sticky_optin_added
41
- * @property object $uninstall_reason
42
- * @property object $subscription
43
- */
44
- class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
45
- /**
46
- * @var string
47
- */
48
- protected $_id;
49
-
50
- /**
51
- * @since 1.2.2
52
- *
53
- * @var string
54
- */
55
- protected $_secondary_id;
56
-
57
- /**
58
- * @since 2.0.0
59
- * @var int The ID of the blog that is associated with the current site level options.
60
- */
61
- private $_blog_id = 0;
62
-
63
- /**
64
- * @since 2.0.0
65
- * @var bool
66
- */
67
- private $_is_multisite_storage;
68
-
69
- /**
70
- * @var array
71
- */
72
- protected $_data;
73
-
74
- /**
75
- * @var FS_Key_Value_Storage[]
76
- */
77
- private static $_instances = array();
78
-
79
- /**
80
- * @var FS_Logger
81
- */
82
- protected $_logger;
83
-
84
- /**
85
- * @param string $id
86
- * @param string $secondary_id
87
- * @param bool $network_level_or_blog_id
88
- *
89
- * @return FS_Key_Value_Storage
90
- */
91
- static function instance( $id, $secondary_id, $network_level_or_blog_id = false ) {
92
- $key = $id . ':' . $secondary_id;
93
-
94
- if ( is_multisite() ) {
95
- if ( true === $network_level_or_blog_id ) {
96
- $key .= ':ms';
97
- } else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
98
- $key .= ":{$network_level_or_blog_id}";
99
- } else {
100
- $network_level_or_blog_id = get_current_blog_id();
101
-
102
- $key .= ":{$network_level_or_blog_id}";
103
- }
104
- }
105
-
106
- if ( ! isset( self::$_instances[ $key ] ) ) {
107
- self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id, $network_level_or_blog_id );
108
- }
109
-
110
- return self::$_instances[ $key ];
111
- }
112
-
113
- protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) {
114
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
115
-
116
- $this->_id = $id;
117
- $this->_secondary_id = $secondary_id;
118
-
119
- if ( is_multisite() ) {
120
- $this->_is_multisite_storage = ( true === $network_level_or_blog_id );
121
-
122
- if ( is_numeric( $network_level_or_blog_id ) ) {
123
- $this->_blog_id = $network_level_or_blog_id;
124
- }
125
- } else {
126
- $this->_is_multisite_storage = false;
127
- }
128
-
129
- $this->load();
130
- }
131
-
132
- protected function get_option_manager() {
133
- return FS_Option_Manager::get_manager(
134
- WP_FS__ACCOUNTS_OPTION_NAME,
135
- true,
136
- $this->_is_multisite_storage ?
137
- true :
138
- ( $this->_blog_id > 0 ? $this->_blog_id : false )
139
- );
140
- }
141
-
142
- protected function get_all_data() {
143
- return $this->get_option_manager()->get_option( $this->_id, array() );
144
- }
145
-
146
- /**
147
- * Load plugin data from local DB.
148
- *
149
- * @author Vova Feldman (@svovaf)
150
- * @since 1.0.7
151
- */
152
- function load() {
153
- $all_plugins_data = $this->get_all_data();
154
- $this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
155
- $all_plugins_data[ $this->_secondary_id ] :
156
- array();
157
- }
158
-
159
- /**
160
- * @author Vova Feldman (@svovaf)
161
- * @since 1.0.7
162
- *
163
- * @param string $key
164
- * @param mixed $value
165
- * @param bool $flush
166
- */
167
- function store( $key, $value, $flush = true ) {
168
- if ( $this->_logger->is_on() ) {
169
- $this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
170
- }
171
-
172
- if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
173
- // No need to store data if the value wasn't changed.
174
- return;
175
- }
176
-
177
- $all_data = $this->get_all_data();
178
-
179
- $this->_data[ $key ] = $value;
180
-
181
- $all_data[ $this->_secondary_id ] = $this->_data;
182
-
183
- $options_manager = $this->get_option_manager();
184
- $options_manager->set_option( $this->_id, $all_data, $flush );
185
- }
186
-
187
- /**
188
- * @author Vova Feldman (@svovaf)
189
- * @since 2.0.0
190
- */
191
- function save() {
192
- $this->get_option_manager()->store();
193
- }
194
-
195
- /**
196
- * @author Vova Feldman (@svovaf)
197
- * @since 1.0.7
198
- *
199
- * @param bool $store
200
- * @param string[] $exceptions Set of keys to keep and not clear.
201
- */
202
- function clear_all( $store = true, $exceptions = array() ) {
203
- $new_data = array();
204
- foreach ( $exceptions as $key ) {
205
- if ( isset( $this->_data[ $key ] ) ) {
206
- $new_data[ $key ] = $this->_data[ $key ];
207
- }
208
- }
209
-
210
- $this->_data = $new_data;
211
-
212
- if ( $store ) {
213
- $all_data = $this->get_all_data();
214
- $all_data[ $this->_secondary_id ] = $this->_data;
215
- $options_manager = $this->get_option_manager();
216
- $options_manager->set_option( $this->_id, $all_data, true );
217
- }
218
- }
219
-
220
- /**
221
- * Delete key-value storage.
222
- *
223
- * @author Vova Feldman (@svovaf)
224
- * @since 1.0.9
225
- */
226
- function delete() {
227
- $this->_data = array();
228
-
229
- $all_data = $this->get_all_data();
230
- unset( $all_data[ $this->_secondary_id ] );
231
- $options_manager = $this->get_option_manager();
232
- $options_manager->set_option( $this->_id, $all_data, true );
233
- }
234
-
235
- /**
236
- * @author Vova Feldman (@svovaf)
237
- * @since 1.0.7
238
- *
239
- * @param string $key
240
- * @param bool $store
241
- */
242
- function remove( $key, $store = true ) {
243
- if ( ! array_key_exists( $key, $this->_data ) ) {
244
- return;
245
- }
246
-
247
- unset( $this->_data[ $key ] );
248
-
249
- if ( $store ) {
250
- $all_data = $this->get_all_data();
251
- $all_data[ $this->_secondary_id ] = $this->_data;
252
- $options_manager = $this->get_option_manager();
253
- $options_manager->set_option( $this->_id, $all_data, true );
254
- }
255
- }
256
-
257
- /**
258
- * @author Vova Feldman (@svovaf)
259
- * @since 1.0.7
260
- *
261
- * @param string $key
262
- * @param mixed $default
263
- *
264
- * @return bool|\FS_Plugin
265
- */
266
- function get( $key, $default = false ) {
267
- return array_key_exists( $key, $this->_data ) ?
268
- $this->_data[ $key ] :
269
- $default;
270
- }
271
-
272
- /**
273
- * @author Vova Feldman (@svovaf)
274
- * @since 2.0.0
275
- *
276
- * @return string
277
- */
278
- function get_secondary_id() {
279
- return $this->_secondary_id;
280
- }
281
-
282
-
283
- /* ArrayAccess + Magic Access (better for refactoring)
284
- -----------------------------------------------------------------------------------*/
285
- function __set( $k, $v ) {
286
- $this->store( $k, $v );
287
- }
288
-
289
- function __isset( $k ) {
290
- return array_key_exists( $k, $this->_data );
291
- }
292
-
293
- function __unset( $k ) {
294
- $this->remove( $k );
295
- }
296
-
297
- function __get( $k ) {
298
- return $this->get( $k, null );
299
- }
300
-
301
- function offsetSet( $k, $v ) {
302
- if ( is_null( $k ) ) {
303
- throw new Exception( 'Can\'t append value to request params.' );
304
- } else {
305
- $this->{$k} = $v;
306
- }
307
- }
308
-
309
- function offsetExists( $k ) {
310
- return array_key_exists( $k, $this->_data );
311
- }
312
-
313
- function offsetUnset( $k ) {
314
- unset( $this->$k );
315
- }
316
-
317
- function offsetGet( $k ) {
318
- return $this->get( $k, null );
319
- }
320
-
321
- /**
322
- * (PHP 5 &gt;= 5.0.0)<br/>
323
- * Return the current element
324
- *
325
- * @link http://php.net/manual/en/iterator.current.php
326
- * @return mixed Can return any type.
327
- */
328
- public function current() {
329
- return current( $this->_data );
330
- }
331
-
332
- /**
333
- * (PHP 5 &gt;= 5.0.0)<br/>
334
- * Move forward to next element
335
- *
336
- * @link http://php.net/manual/en/iterator.next.php
337
- * @return void Any returned value is ignored.
338
- */
339
- public function next() {
340
- next( $this->_data );
341
- }
342
-
343
- /**
344
- * (PHP 5 &gt;= 5.0.0)<br/>
345
- * Return the key of the current element
346
- *
347
- * @link http://php.net/manual/en/iterator.key.php
348
- * @return mixed scalar on success, or null on failure.
349
- */
350
- public function key() {
351
- return key( $this->_data );
352
- }
353
-
354
- /**
355
- * (PHP 5 &gt;= 5.0.0)<br/>
356
- * Checks if current position is valid
357
- *
358
- * @link http://php.net/manual/en/iterator.valid.php
359
- * @return boolean The return value will be casted to boolean and then evaluated.
360
- * Returns true on success or false on failure.
361
- */
362
- public function valid() {
363
- $key = key( $this->_data );
364
-
365
- return ( $key !== null && $key !== false );
366
- }
367
-
368
- /**
369
- * (PHP 5 &gt;= 5.0.0)<br/>
370
- * Rewind the Iterator to the first element
371
- *
372
- * @link http://php.net/manual/en/iterator.rewind.php
373
- * @return void Any returned value is ignored.
374
- */
375
- public function rewind() {
376
- reset( $this->_data );
377
- }
378
-
379
- /**
380
- * (PHP 5 &gt;= 5.1.0)<br/>
381
- * Count elements of an object
382
- *
383
- * @link http://php.net/manual/en/countable.count.php
384
- * @return int The custom count as an integer.
385
- * </p>
386
- * <p>
387
- * The return value is cast to an integer.
388
- */
389
- public function count() {
390
- return count( $this->_data );
391
- }
392
  }
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
+ * Class FS_Key_Value_Storage
15
+ *
16
+ * @property int $install_timestamp
17
+ * @property int $activation_timestamp
18
+ * @property int $sync_timestamp
19
+ * @property object $sync_cron
20
+ * @property int $install_sync_timestamp
21
+ * @property array $connectivity_test
22
+ * @property array $is_on
23
+ * @property object $trial_plan
24
+ * @property bool $has_trial_plan
25
+ * @property bool $trial_promotion_shown
26
+ * @property string $sdk_version
27
+ * @property string $sdk_last_version
28
+ * @property bool $sdk_upgrade_mode
29
+ * @property bool $sdk_downgrade_mode
30
+ * @property bool $plugin_upgrade_mode
31
+ * @property bool $plugin_downgrade_mode
32
+ * @property string $plugin_version
33
+ * @property string $plugin_last_version
34
+ * @property bool $is_plugin_new_install
35
+ * @property bool $was_plugin_loaded
36
+ * @property object $plugin_main_file
37
+ * @property bool $prev_is_premium
38
+ * @property array $is_anonymous
39
+ * @property bool $is_pending_activation
40
+ * @property bool $sticky_optin_added
41
+ * @property object $uninstall_reason
42
+ * @property object $subscription
43
+ */
44
+ class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
45
+ /**
46
+ * @var string
47
+ */
48
+ protected $_id;
49
+
50
+ /**
51
+ * @since 1.2.2
52
+ *
53
+ * @var string
54
+ */
55
+ protected $_secondary_id;
56
+
57
+ /**
58
+ * @since 2.0.0
59
+ * @var int The ID of the blog that is associated with the current site level options.
60
+ */
61
+ private $_blog_id = 0;
62
+
63
+ /**
64
+ * @since 2.0.0
65
+ * @var bool
66
+ */
67
+ private $_is_multisite_storage;
68
+
69
+ /**
70
+ * @var array
71
+ */
72
+ protected $_data;
73
+
74
+ /**
75
+ * @var FS_Key_Value_Storage[]
76
+ */
77
+ private static $_instances = array();
78
+
79
+ /**
80
+ * @var FS_Logger
81
+ */
82
+ protected $_logger;
83
+
84
+ /**
85
+ * @param string $id
86
+ * @param string $secondary_id
87
+ * @param bool $network_level_or_blog_id
88
+ *
89
+ * @return FS_Key_Value_Storage
90
+ */
91
+ static function instance( $id, $secondary_id, $network_level_or_blog_id = false ) {
92
+ $key = $id . ':' . $secondary_id;
93
+
94
+ if ( is_multisite() ) {
95
+ if ( true === $network_level_or_blog_id ) {
96
+ $key .= ':ms';
97
+ } else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
98
+ $key .= ":{$network_level_or_blog_id}";
99
+ } else {
100
+ $network_level_or_blog_id = get_current_blog_id();
101
+
102
+ $key .= ":{$network_level_or_blog_id}";
103
+ }
104
+ }
105
+
106
+ if ( ! isset( self::$_instances[ $key ] ) ) {
107
+ self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id, $network_level_or_blog_id );
108
+ }
109
+
110
+ return self::$_instances[ $key ];
111
+ }
112
+
113
+ protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) {
114
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
115
+
116
+ $this->_id = $id;
117
+ $this->_secondary_id = $secondary_id;
118
+
119
+ if ( is_multisite() ) {
120
+ $this->_is_multisite_storage = ( true === $network_level_or_blog_id );
121
+
122
+ if ( is_numeric( $network_level_or_blog_id ) ) {
123
+ $this->_blog_id = $network_level_or_blog_id;
124
+ }
125
+ } else {
126
+ $this->_is_multisite_storage = false;
127
+ }
128
+
129
+ $this->load();
130
+ }
131
+
132
+ protected function get_option_manager() {
133
+ return FS_Option_Manager::get_manager(
134
+ WP_FS__ACCOUNTS_OPTION_NAME,
135
+ true,
136
+ $this->_is_multisite_storage ?
137
+ true :
138
+ ( $this->_blog_id > 0 ? $this->_blog_id : false )
139
+ );
140
+ }
141
+
142
+ protected function get_all_data() {
143
+ return $this->get_option_manager()->get_option( $this->_id, array() );
144
+ }
145
+
146
+ /**
147
+ * Load plugin data from local DB.
148
+ *
149
+ * @author Vova Feldman (@svovaf)
150
+ * @since 1.0.7
151
+ */
152
+ function load() {
153
+ $all_plugins_data = $this->get_all_data();
154
+ $this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
155
+ $all_plugins_data[ $this->_secondary_id ] :
156
+ array();
157
+ }
158
+
159
+ /**
160
+ * @author Vova Feldman (@svovaf)
161
+ * @since 1.0.7
162
+ *
163
+ * @param string $key
164
+ * @param mixed $value
165
+ * @param bool $flush
166
+ */
167
+ function store( $key, $value, $flush = true ) {
168
+ if ( $this->_logger->is_on() ) {
169
+ $this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
170
+ }
171
+
172
+ if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
173
+ // No need to store data if the value wasn't changed.
174
+ return;
175
+ }
176
+
177
+ $all_data = $this->get_all_data();
178
+
179
+ $this->_data[ $key ] = $value;
180
+
181
+ $all_data[ $this->_secondary_id ] = $this->_data;
182
+
183
+ $options_manager = $this->get_option_manager();
184
+ $options_manager->set_option( $this->_id, $all_data, $flush );
185
+ }
186
+
187
+ /**
188
+ * @author Vova Feldman (@svovaf)
189
+ * @since 2.0.0
190
+ */
191
+ function save() {
192
+ $this->get_option_manager()->store();
193
+ }
194
+
195
+ /**
196
+ * @author Vova Feldman (@svovaf)
197
+ * @since 1.0.7
198
+ *
199
+ * @param bool $store
200
+ * @param string[] $exceptions Set of keys to keep and not clear.
201
+ */
202
+ function clear_all( $store = true, $exceptions = array() ) {
203
+ $new_data = array();
204
+ foreach ( $exceptions as $key ) {
205
+ if ( isset( $this->_data[ $key ] ) ) {
206
+ $new_data[ $key ] = $this->_data[ $key ];
207
+ }
208
+ }
209
+
210
+ $this->_data = $new_data;
211
+
212
+ if ( $store ) {
213
+ $all_data = $this->get_all_data();
214
+ $all_data[ $this->_secondary_id ] = $this->_data;
215
+ $options_manager = $this->get_option_manager();
216
+ $options_manager->set_option( $this->_id, $all_data, true );
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Delete key-value storage.
222
+ *
223
+ * @author Vova Feldman (@svovaf)
224
+ * @since 1.0.9
225
+ */
226
+ function delete() {
227
+ $this->_data = array();
228
+
229
+ $all_data = $this->get_all_data();
230
+ unset( $all_data[ $this->_secondary_id ] );
231
+ $options_manager = $this->get_option_manager();
232
+ $options_manager->set_option( $this->_id, $all_data, true );
233
+ }
234
+
235
+ /**
236
+ * @author Vova Feldman (@svovaf)
237
+ * @since 1.0.7
238
+ *
239
+ * @param string $key
240
+ * @param bool $store
241
+ */
242
+ function remove( $key, $store = true ) {
243
+ if ( ! array_key_exists( $key, $this->_data ) ) {
244
+ return;
245
+ }
246
+
247
+ unset( $this->_data[ $key ] );
248
+
249
+ if ( $store ) {
250
+ $all_data = $this->get_all_data();
251
+ $all_data[ $this->_secondary_id ] = $this->_data;
252
+ $options_manager = $this->get_option_manager();
253
+ $options_manager->set_option( $this->_id, $all_data, true );
254
+ }
255
+ }
256
+
257
+ /**
258
+ * @author Vova Feldman (@svovaf)
259
+ * @since 1.0.7
260
+ *
261
+ * @param string $key
262
+ * @param mixed $default
263
+ *
264
+ * @return bool|\FS_Plugin
265
+ */
266
+ function get( $key, $default = false ) {
267
+ return array_key_exists( $key, $this->_data ) ?
268
+ $this->_data[ $key ] :
269
+ $default;
270
+ }
271
+
272
+ /**
273
+ * @author Vova Feldman (@svovaf)
274
+ * @since 2.0.0
275
+ *
276
+ * @return string
277
+ */
278
+ function get_secondary_id() {
279
+ return $this->_secondary_id;
280
+ }
281
+
282
+
283
+ /* ArrayAccess + Magic Access (better for refactoring)
284
+ -----------------------------------------------------------------------------------*/
285
+ function __set( $k, $v ) {
286
+ $this->store( $k, $v );
287
+ }
288
+
289
+ function __isset( $k ) {
290
+ return array_key_exists( $k, $this->_data );
291
+ }
292
+
293
+ function __unset( $k ) {
294
+ $this->remove( $k );
295
+ }
296
+
297
+ function __get( $k ) {
298
+ return $this->get( $k, null );
299
+ }
300
+
301
+ function offsetSet( $k, $v ) {
302
+ if ( is_null( $k ) ) {
303
+ throw new Exception( 'Can\'t append value to request params.' );
304
+ } else {
305
+ $this->{$k} = $v;
306
+ }
307
+ }
308
+
309
+ function offsetExists( $k ) {
310
+ return array_key_exists( $k, $this->_data );
311
+ }
312
+
313
+ function offsetUnset( $k ) {
314
+ unset( $this->$k );
315
+ }
316
+
317
+ function offsetGet( $k ) {
318
+ return $this->get( $k, null );
319
+ }
320
+
321
+ /**
322
+ * (PHP 5 &gt;= 5.0.0)<br/>
323
+ * Return the current element
324
+ *
325
+ * @link http://php.net/manual/en/iterator.current.php
326
+ * @return mixed Can return any type.
327
+ */
328
+ public function current() {
329
+ return current( $this->_data );
330
+ }
331
+
332
+ /**
333
+ * (PHP 5 &gt;= 5.0.0)<br/>
334
+ * Move forward to next element
335
+ *
336
+ * @link http://php.net/manual/en/iterator.next.php
337
+ * @return void Any returned value is ignored.
338
+ */
339
+ public function next() {
340
+ next( $this->_data );
341
+ }
342
+
343
+ /**
344
+ * (PHP 5 &gt;= 5.0.0)<br/>
345
+ * Return the key of the current element
346
+ *
347
+ * @link http://php.net/manual/en/iterator.key.php
348
+ * @return mixed scalar on success, or null on failure.
349
+ */
350
+ public function key() {
351
+ return key( $this->_data );
352
+ }
353
+
354
+ /**
355
+ * (PHP 5 &gt;= 5.0.0)<br/>
356
+ * Checks if current position is valid
357
+ *
358
+ * @link http://php.net/manual/en/iterator.valid.php
359
+ * @return boolean The return value will be casted to boolean and then evaluated.
360
+ * Returns true on success or false on failure.
361
+ */
362
+ public function valid() {
363
+ $key = key( $this->_data );
364
+
365
+ return ( $key !== null && $key !== false );
366
+ }
367
+
368
+ /**
369
+ * (PHP 5 &gt;= 5.0.0)<br/>
370
+ * Rewind the Iterator to the first element
371
+ *
372
+ * @link http://php.net/manual/en/iterator.rewind.php
373
+ * @return void Any returned value is ignored.
374
+ */
375
+ public function rewind() {
376
+ reset( $this->_data );
377
+ }
378
+
379
+ /**
380
+ * (PHP 5 &gt;= 5.1.0)<br/>
381
+ * Count elements of an object
382
+ *
383
+ * @link http://php.net/manual/en/countable.count.php
384
+ * @return int The custom count as an integer.
385
+ * </p>
386
+ * <p>
387
+ * The return value is cast to an integer.
388
+ */
389
+ public function count() {
390
+ return count( $this->_data );
391
+ }
392
  }
freemius/includes/managers/class-fs-license-manager.php CHANGED
@@ -1,104 +1,104 @@
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.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_License_Manager /*extends FS_Abstract_Manager*/
14
- {
15
- //
16
- //
17
- // /**
18
- // * @var FS_License_Manager[]
19
- // */
20
- // private static $_instances = array();
21
- //
22
- // static function instance( Freemius $fs ) {
23
- // $slug = strtolower( $fs->get_slug() );
24
- //
25
- // if ( ! isset( self::$_instances[ $slug ] ) ) {
26
- // self::$_instances[ $slug ] = new FS_License_Manager( $slug, $fs );
27
- // }
28
- //
29
- // return self::$_instances[ $slug ];
30
- // }
31
- //
32
- //// private function __construct($slug) {
33
- //// parent::__construct($slug);
34
- //// }
35
- //
36
- // function entry_id() {
37
- // return 'licenses';
38
- // }
39
- //
40
- // function sync( $id ) {
41
- //
42
- // }
43
- //
44
- // /**
45
- // * @author Vova Feldman (@svovaf)
46
- // * @since 1.0.5
47
- // * @uses FS_Api
48
- // *
49
- // * @param number|bool $plugin_id
50
- // *
51
- // * @return FS_Plugin_License[]|stdClass Licenses or API error.
52
- // */
53
- // function api_get_user_plugin_licenses( $plugin_id = false ) {
54
- // $api = $this->_fs->get_api_user_scope();
55
- //
56
- // if ( ! is_numeric( $plugin_id ) ) {
57
- // $plugin_id = $this->_fs->get_id();
58
- // }
59
- //
60
- // $result = $api->call( "/plugins/{$plugin_id}/licenses.json" );
61
- //
62
- // if ( ! isset( $result->error ) ) {
63
- // for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
64
- // $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
65
- // }
66
- //
67
- // $result = $result->licenses;
68
- // }
69
- //
70
- // return $result;
71
- // }
72
- //
73
- // function api_get_many() {
74
- //
75
- // }
76
- //
77
- // function api_activate( $id ) {
78
- //
79
- // }
80
- //
81
- // function api_deactivate( $id ) {
82
- //
83
- // }
84
-
85
- /**
86
- * @param FS_Plugin_License[] $licenses
87
- *
88
- * @return bool
89
- */
90
- static function has_premium_license( $licenses ) {
91
- if ( is_array( $licenses ) ) {
92
- foreach ( $licenses as $license ) {
93
- /**
94
- * @var FS_Plugin_License $license
95
- */
96
- if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
97
- return true;
98
- }
99
- }
100
- }
101
-
102
- return false;
103
- }
104
  }
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.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_License_Manager /*extends FS_Abstract_Manager*/
14
+ {
15
+ //
16
+ //
17
+ // /**
18
+ // * @var FS_License_Manager[]
19
+ // */
20
+ // private static $_instances = array();
21
+ //
22
+ // static function instance( Freemius $fs ) {
23
+ // $slug = strtolower( $fs->get_slug() );
24
+ //
25
+ // if ( ! isset( self::$_instances[ $slug ] ) ) {
26
+ // self::$_instances[ $slug ] = new FS_License_Manager( $slug, $fs );
27
+ // }
28
+ //
29
+ // return self::$_instances[ $slug ];
30
+ // }
31
+ //
32
+ //// private function __construct($slug) {
33
+ //// parent::__construct($slug);
34
+ //// }
35
+ //
36
+ // function entry_id() {
37
+ // return 'licenses';
38
+ // }
39
+ //
40
+ // function sync( $id ) {
41
+ //
42
+ // }
43
+ //
44
+ // /**
45
+ // * @author Vova Feldman (@svovaf)
46
+ // * @since 1.0.5
47
+ // * @uses FS_Api
48
+ // *
49
+ // * @param number|bool $plugin_id
50
+ // *
51
+ // * @return FS_Plugin_License[]|stdClass Licenses or API error.
52
+ // */
53
+ // function api_get_user_plugin_licenses( $plugin_id = false ) {
54
+ // $api = $this->_fs->get_api_user_scope();
55
+ //
56
+ // if ( ! is_numeric( $plugin_id ) ) {
57
+ // $plugin_id = $this->_fs->get_id();
58
+ // }
59
+ //
60
+ // $result = $api->call( "/plugins/{$plugin_id}/licenses.json" );
61
+ //
62
+ // if ( ! isset( $result->error ) ) {
63
+ // for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
64
+ // $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
65
+ // }
66
+ //
67
+ // $result = $result->licenses;
68
+ // }
69
+ //
70
+ // return $result;
71
+ // }
72
+ //
73
+ // function api_get_many() {
74
+ //
75
+ // }
76
+ //
77
+ // function api_activate( $id ) {
78
+ //
79
+ // }
80
+ //
81
+ // function api_deactivate( $id ) {
82
+ //
83
+ // }
84
+
85
+ /**
86
+ * @param FS_Plugin_License[] $licenses
87
+ *
88
+ * @return bool
89
+ */
90
+ static function has_premium_license( $licenses ) {
91
+ if ( is_array( $licenses ) ) {
92
+ foreach ( $licenses as $license ) {
93
+ /**
94
+ * @var FS_Plugin_License $license
95
+ */
96
+ if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
97
+ return true;
98
+ }
99
+ }
100
+ }
101
+
102
+ return false;
103
+ }
104
  }
freemius/includes/managers/class-fs-option-manager.php CHANGED
@@ -1,521 +1,521 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * 3-layer lazy options manager.
15
- * layer 3: Memory
16
- * layer 2: Cache (if there's any caching plugin and if WP_FS__DEBUG_SDK is FALSE)
17
- * layer 1: Database (options table). All options stored as one option record in the DB to reduce number of DB
18
- * queries.
19
- *
20
- * If load() is not explicitly called, starts as empty manager. Same thing about saving the data - you have to
21
- * explicitly call store().
22
- *
23
- * Class Freemius_Option_Manager
24
- */
25
- class FS_Option_Manager {
26
- /**
27
- * @var string
28
- */
29
- private $_id;
30
- /**
31
- * @var array|object
32
- */
33
- private $_options;
34
- /**
35
- * @var FS_Logger
36
- */
37
- private $_logger;
38
-
39
- /**
40
- * @since 2.0.0
41
- * @var int The ID of the blog that is associated with the current site level options.
42
- */
43
- private $_blog_id = 0;
44
-
45
- /**
46
- * @since 2.0.0
47
- * @var bool
48
- */
49
- private $_is_network_storage;
50
-
51
- /**
52
- * @var bool|null
53
- */
54
- private $_autoload;
55
-
56
- /**
57
- * @var array[string]FS_Option_Manager {
58
- * @key string
59
- * @value FS_Option_Manager
60
- * }
61
- */
62
- private static $_MANAGERS = array();
63
-
64
- /**
65
- * @author Vova Feldman (@svovaf)
66
- * @since 1.0.3
67
- *
68
- * @param string $id
69
- * @param bool $load
70
- * @param bool|int $network_level_or_blog_id Since 2.0.0
71
- * @param bool|null $autoload
72
- */
73
- private function __construct(
74
- $id,
75
- $load = false,
76
- $network_level_or_blog_id = false,
77
- $autoload = null
78
- ) {
79
- $id = strtolower( $id );
80
-
81
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
82
-
83
- $this->_logger->entrance();
84
- $this->_logger->log( 'id = ' . $id );
85
-
86
- $this->_id = $id;
87
-
88
- $this->_autoload = $autoload;
89
-
90
- if ( is_multisite() ) {
91
- $this->_is_network_storage = ( true === $network_level_or_blog_id );
92
-
93
- if ( is_numeric( $network_level_or_blog_id ) ) {
94
- $this->_blog_id = $network_level_or_blog_id;
95
- }
96
- } else {
97
- $this->_is_network_storage = false;
98
- }
99
-
100
- if ( $load ) {
101
- $this->load();
102
- }
103
- }
104
-
105
- /**
106
- * @author Vova Feldman (@svovaf)
107
- * @since 1.0.3
108
- *
109
- * @param string $id
110
- * @param bool $load
111
- * @param bool|int $network_level_or_blog_id Since 2.0.0
112
- * @param bool|null $autoload
113
- *
114
- * @return \FS_Option_Manager
115
- */
116
- static function get_manager(
117
- $id,
118
- $load = false,
119
- $network_level_or_blog_id = false,
120
- $autoload = null
121
- ) {
122
- $key = strtolower( $id );
123
-
124
- if ( is_multisite() ) {
125
- if ( true === $network_level_or_blog_id ) {
126
- $key .= ':ms';
127
- } else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
128
- $key .= ":{$network_level_or_blog_id}";
129
- } else {
130
- $network_level_or_blog_id = get_current_blog_id();
131
-
132
- $key .= ":{$network_level_or_blog_id}";
133
- }
134
- }
135
-
136
- if ( ! isset( self::$_MANAGERS[ $key ] ) ) {
137
- self::$_MANAGERS[ $key ] = new FS_Option_Manager(
138
- $id,
139
- $load,
140
- $network_level_or_blog_id,
141
- $autoload
142
- );
143
- } // If load required but not yet loaded, load.
144
- else if ( $load && ! self::$_MANAGERS[ $key ]->is_loaded() ) {
145
- self::$_MANAGERS[ $key ]->load();
146
- }
147
-
148
- return self::$_MANAGERS[ $key ];
149
- }
150
-
151
- /**
152
- * @author Vova Feldman (@svovaf)
153
- * @since 1.0.3
154
- *
155
- * @param bool $flush
156
- */
157
- function load( $flush = false ) {
158
- $this->_logger->entrance();
159
-
160
- $option_name = $this->get_option_manager_name();
161
-
162
- if ( $flush || ! isset( $this->_options ) ) {
163
- if ( isset( $this->_options ) ) {
164
- // Clear prev options.
165
- $this->clear();
166
- }
167
-
168
- $cache_group = $this->get_cache_group();
169
-
170
- if ( WP_FS__DEBUG_SDK ) {
171
-
172
- // Don't use cache layer in DEBUG mode.
173
- $load_options = empty( $this->_options );
174
-
175
- } else {
176
-
177
- $this->_options = wp_cache_get(
178
- $option_name,
179
- $cache_group
180
- );
181
-
182
- $load_options = ( false === $this->_options );
183
- }
184
-
185
- $cached = true;
186
-
187
- if ( $load_options ) {
188
- if ( $this->_is_network_storage ) {
189
- $this->_options = get_site_option( $option_name );
190
- } else if ( $this->_blog_id > 0 ) {
191
- $this->_options = get_blog_option( $this->_blog_id, $option_name );
192
- } else {
193
- $this->_options = get_option( $option_name );
194
- }
195
-
196
- if ( is_string( $this->_options ) ) {
197
- $this->_options = json_decode( $this->_options );
198
- }
199
-
200
- // $this->_logger->info('get_option = ' . var_export($this->_options, true));
201
-
202
- if ( false === $this->_options ) {
203
- $this->clear();
204
- }
205
-
206
- $cached = false;
207
- }
208
-
209
- if ( ! WP_FS__DEBUG_SDK && ! $cached ) {
210
- // Set non encoded cache.
211
- wp_cache_set( $option_name, $this->_options, $cache_group );
212
- }
213
- }
214
- }
215
-
216
- /**
217
- * @author Vova Feldman (@svovaf)
218
- * @since 1.0.3
219
- *
220
- * @return bool
221
- */
222
- function is_loaded() {
223
- return isset( $this->_options );
224
- }
225
-
226
- /**
227
- * @author Vova Feldman (@svovaf)
228
- * @since 1.0.3
229
- *
230
- * @return bool
231
- */
232
- function is_empty() {
233
- return ( $this->is_loaded() && false === $this->_options );
234
- }
235
-
236
- /**
237
- * @author Vova Feldman (@svovaf)
238
- * @since 1.0.6
239
- *
240
- * @param bool $flush
241
- */
242
- function clear( $flush = false ) {
243
- $this->_logger->entrance();
244
-
245
- $this->_options = array();
246
-
247
- if ( $flush ) {
248
- $this->store();
249
- }
250
- }
251
-
252
- /**
253
- * Delete options manager from DB.
254
- *
255
- * @author Vova Feldman (@svovaf)
256
- * @since 1.0.9
257
- */
258
- function delete() {
259
- $option_name = $this->get_option_manager_name();
260
-
261
- if ( $this->_is_network_storage ) {
262
- delete_site_option( $option_name );
263
- } else if ( $this->_blog_id > 0 ) {
264
- delete_blog_option( $this->_blog_id, $option_name );
265
- } else {
266
- delete_option( $option_name );
267
- }
268
- }
269
-
270
- /**
271
- * @author Vova Feldman (@svovaf)
272
- * @since 1.0.6
273
- *
274
- * @param string $option
275
- *
276
- * @return bool
277
- */
278
- function has_option( $option ) {
279
- return array_key_exists( $option, $this->_options );
280
- }
281
-
282
- /**
283
- * @author Vova Feldman (@svovaf)
284
- * @since 1.0.3
285
- *
286
- * @param string $option
287
- * @param mixed $default
288
- *
289
- * @return mixed
290
- */
291
- function get_option( $option, $default = null ) {
292
- $this->_logger->entrance( 'option = ' . $option );
293
-
294
- if ( ! $this->is_loaded() ) {
295
- $this->load();
296
- }
297
-
298
- if ( is_array( $this->_options ) ) {
299
- $value = isset( $this->_options[ $option ] ) ?
300
- $this->_options[ $option ] :
301
- $default;
302
- } else if ( is_object( $this->_options ) ) {
303
- $value = isset( $this->_options->{$option} ) ?
304
- $this->_options->{$option} :
305
- $default;
306
- } else {
307
- $value = $default;
308
- }
309
-
310
- /**
311
- * If it's an object, return a clone of the object, otherwise,
312
- * external changes of the object will actually change the value
313
- * of the object in the options manager which may lead to an unexpected
314
- * behaviour and data integrity when a store() call is triggered.
315
- *
316
- * Example:
317
- * $object1 = $options->get_option( 'object1' );
318
- * $object1->x = 123;
319
- *
320
- * $object2 = $options->get_option( 'object2' );
321
- * $object2->y = 'dummy';
322
- *
323
- * $options->set_option( 'object2', $object2, true );
324
- *
325
- * If we don't return a clone of option 'object1', setting 'object2'
326
- * will also store the updated value of 'object1' which is quite not
327
- * an expected behaviour.
328
- *
329
- * @author Vova Feldman
330
- */
331
- return is_object( $value ) ? clone $value : $value;
332
- }
333
-
334
- /**
335
- * @author Vova Feldman (@svovaf)
336
- * @since 1.0.3
337
- *
338
- * @param string $option
339
- * @param mixed $value
340
- * @param bool $flush
341
- */
342
- function set_option( $option, $value, $flush = false ) {
343
- $this->_logger->entrance( 'option = ' . $option );
344
-
345
- if ( ! $this->is_loaded() ) {
346
- $this->clear();
347
- }
348
-
349
- /**
350
- * If it's an object, store a clone of the object, otherwise,
351
- * external changes of the object will actually change the value
352
- * of the object in the options manager which may lead to an unexpected
353
- * behaviour and data integrity when a store() call is triggered.
354
- *
355
- * Example:
356
- * $object1 = new stdClass();
357
- * $object1->x = 123;
358
- *
359
- * $options->set_option( 'object1', $object1 );
360
- *
361
- * $object1->x = 456;
362
- *
363
- * $options->set_option( 'object2', $object2, true );
364
- *
365
- * If we don't set the option as a clone of option 'object1', setting 'object2'
366
- * will also store the updated value of 'object1' ($object1->x = 456 instead of
367
- * $object1->x = 123) which is quite not an expected behaviour.
368
- *
369
- * @author Vova Feldman
370
- */
371
- $copy = is_object( $value ) ? clone $value : $value;
372
-
373
- if ( is_array( $this->_options ) ) {
374
- $this->_options[ $option ] = $copy;
375
- } else if ( is_object( $this->_options ) ) {
376
- $this->_options->{$option} = $copy;
377
- }
378
-
379
- if ( $flush ) {
380
- $this->store();
381
- }
382
- }
383
-
384
- /**
385
- * Unset option.
386
- *
387
- * @author Vova Feldman (@svovaf)
388
- * @since 1.0.3
389
- *
390
- * @param string $option
391
- * @param bool $flush
392
- */
393
- function unset_option( $option, $flush = false ) {
394
- $this->_logger->entrance( 'option = ' . $option );
395
-
396
- if ( is_array( $this->_options ) ) {
397
- if ( ! isset( $this->_options[ $option ] ) ) {
398
- return;
399
- }
400
-
401
- unset( $this->_options[ $option ] );
402
-
403
- } else if ( is_object( $this->_options ) ) {
404
- if ( ! isset( $this->_options->{$option} ) ) {
405
- return;
406
- }
407
-
408
- unset( $this->_options->{$option} );
409
- }
410
-
411
- if ( $flush ) {
412
- $this->store();
413
- }
414
- }
415
-
416
- /**
417
- * Dump options to database.
418
- *
419
- * @author Vova Feldman (@svovaf)
420
- * @since 1.0.3
421
- */
422
- function store() {
423
- $this->_logger->entrance();
424
-
425
- $option_name = $this->get_option_manager_name();
426
-
427
- if ( $this->_logger->is_on() ) {
428
- $this->_logger->info( $option_name . ' = ' . var_export( $this->_options, true ) );
429
- }
430
-
431
- // Update DB.
432
- if ( $this->_is_network_storage ) {
433
- update_site_option( $option_name, $this->_options );
434
- } else if ( $this->_blog_id > 0 ) {
435
- update_blog_option( $this->_blog_id, $option_name, $this->_options );
436
- } else {
437
- update_option( $option_name, $this->_options, $this->_autoload );
438
- }
439
-
440
- if ( ! WP_FS__DEBUG_SDK ) {
441
- wp_cache_set( $option_name, $this->_options, $this->get_cache_group() );
442
- }
443
- }
444
-
445
- /**
446
- * Get options keys.
447
- *
448
- * @author Vova Feldman (@svovaf)
449
- * @since 1.0.3
450
- *
451
- * @return string[]
452
- */
453
- function get_options_keys() {
454
- if ( is_array( $this->_options ) ) {
455
- return array_keys( $this->_options );
456
- } else if ( is_object( $this->_options ) ) {
457
- return array_keys( get_object_vars( $this->_options ) );
458
- }
459
-
460
- return array();
461
- }
462
-
463
- #--------------------------------------------------------------------------------
464
- #region Migration
465
- #--------------------------------------------------------------------------------
466
-
467
- /**
468
- * Migrate options from site level.
469
- *
470
- * @author Vova Feldman (@svovaf)
471
- * @since 2.0.0
472
- */
473
- function migrate_to_network() {
474
- $site_options = FS_Option_Manager::get_manager($this->_id, true, false);
475
-
476
- $options = is_object( $site_options->_options ) ?
477
- get_object_vars( $site_options->_options ) :
478
- $site_options->_options;
479
-
480
- if ( ! empty( $options ) ) {
481
- foreach ( $options as $key => $val ) {
482
- $this->set_option( $key, $val, false );
483
- }
484
-
485
- $this->store();
486
- }
487
- }
488
-
489
- #endregion
490
-
491
- #--------------------------------------------------------------------------------
492
- #region Helper Methods
493
- #--------------------------------------------------------------------------------
494
-
495
- /**
496
- * @return string
497
- */
498
- private function get_option_manager_name() {
499
- return $this->_id;
500
- }
501
-
502
- /**
503
- * @author Vova Feldman (@svovaf)
504
- * @since 2.0.0
505
- *
506
- * @return string
507
- */
508
- private function get_cache_group() {
509
- $group = WP_FS__SLUG;
510
-
511
- if ( $this->_is_network_storage ) {
512
- $group .= '_ms';
513
- } else if ( $this->_blog_id > 0 ) {
514
- $group .= "_s{$this->_blog_id}";
515
- }
516
-
517
- return $group;
518
- }
519
-
520
- #endregion
521
- }
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * 3-layer lazy options manager.
15
+ * layer 3: Memory
16
+ * layer 2: Cache (if there's any caching plugin and if WP_FS__DEBUG_SDK is FALSE)
17
+ * layer 1: Database (options table). All options stored as one option record in the DB to reduce number of DB
18
+ * queries.
19
+ *
20
+ * If load() is not explicitly called, starts as empty manager. Same thing about saving the data - you have to
21
+ * explicitly call store().
22
+ *
23
+ * Class Freemius_Option_Manager
24
+ */
25
+ class FS_Option_Manager {
26
+ /**
27
+ * @var string
28
+ */
29
+ private $_id;
30
+ /**
31
+ * @var array|object
32
+ */
33
+ private $_options;
34
+ /**
35
+ * @var FS_Logger
36
+ */
37
+ private $_logger;
38
+
39
+ /**
40
+ * @since 2.0.0
41
+ * @var int The ID of the blog that is associated with the current site level options.
42
+ */
43
+ private $_blog_id = 0;
44
+
45
+ /**
46
+ * @since 2.0.0
47
+ * @var bool
48
+ */
49
+ private $_is_network_storage;
50
+
51
+ /**
52
+ * @var bool|null
53
+ */
54
+ private $_autoload;
55
+
56
+ /**
57
+ * @var array[string]FS_Option_Manager {
58
+ * @key string
59
+ * @value FS_Option_Manager
60
+ * }
61
+ */
62
+ private static $_MANAGERS = array();
63
+
64
+ /**
65
+ * @author Vova Feldman (@svovaf)
66
+ * @since 1.0.3
67
+ *
68
+ * @param string $id
69
+ * @param bool $load
70
+ * @param bool|int $network_level_or_blog_id Since 2.0.0
71
+ * @param bool|null $autoload
72
+ */
73
+ private function __construct(
74
+ $id,
75
+ $load = false,
76
+ $network_level_or_blog_id = false,
77
+ $autoload = null
78
+ ) {
79
+ $id = strtolower( $id );
80
+
81
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
82
+
83
+ $this->_logger->entrance();
84
+ $this->_logger->log( 'id = ' . $id );
85
+
86
+ $this->_id = $id;
87
+
88
+ $this->_autoload = $autoload;
89
+
90
+ if ( is_multisite() ) {
91
+ $this->_is_network_storage = ( true === $network_level_or_blog_id );
92
+
93
+ if ( is_numeric( $network_level_or_blog_id ) ) {
94
+ $this->_blog_id = $network_level_or_blog_id;
95
+ }
96
+ } else {
97
+ $this->_is_network_storage = false;
98
+ }
99
+
100
+ if ( $load ) {
101
+ $this->load();
102
+ }
103
+ }
104
+
105
+ /**
106
+ * @author Vova Feldman (@svovaf)
107
+ * @since 1.0.3
108
+ *
109
+ * @param string $id
110
+ * @param bool $load
111
+ * @param bool|int $network_level_or_blog_id Since 2.0.0
112
+ * @param bool|null $autoload
113
+ *
114
+ * @return \FS_Option_Manager
115
+ */
116
+ static function get_manager(
117
+ $id,
118
+ $load = false,
119
+ $network_level_or_blog_id = false,
120
+ $autoload = null
121
+ ) {
122
+ $key = strtolower( $id );
123
+
124
+ if ( is_multisite() ) {
125
+ if ( true === $network_level_or_blog_id ) {
126
+ $key .= ':ms';
127
+ } else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
128
+ $key .= ":{$network_level_or_blog_id}";
129
+ } else {
130
+ $network_level_or_blog_id = get_current_blog_id();
131
+
132
+ $key .= ":{$network_level_or_blog_id}";
133
+ }
134
+ }
135
+
136
+ if ( ! isset( self::$_MANAGERS[ $key ] ) ) {
137
+ self::$_MANAGERS[ $key ] = new FS_Option_Manager(
138
+ $id,
139
+ $load,
140
+ $network_level_or_blog_id,
141
+ $autoload
142
+ );
143
+ } // If load required but not yet loaded, load.
144
+ else if ( $load && ! self::$_MANAGERS[ $key ]->is_loaded() ) {
145
+ self::$_MANAGERS[ $key ]->load();
146
+ }
147
+
148
+ return self::$_MANAGERS[ $key ];
149
+ }
150
+
151
+ /**
152
+ * @author Vova Feldman (@svovaf)
153
+ * @since 1.0.3
154
+ *
155
+ * @param bool $flush
156
+ */
157
+ function load( $flush = false ) {
158
+ $this->_logger->entrance();
159
+
160
+ $option_name = $this->get_option_manager_name();
161
+
162
+ if ( $flush || ! isset( $this->_options ) ) {
163
+ if ( isset( $this->_options ) ) {
164
+ // Clear prev options.
165
+ $this->clear();
166
+ }
167
+
168
+ $cache_group = $this->get_cache_group();
169
+
170
+ if ( WP_FS__DEBUG_SDK ) {
171
+
172
+ // Don't use cache layer in DEBUG mode.
173
+ $load_options = empty( $this->_options );
174
+
175
+ } else {
176
+
177
+ $this->_options = wp_cache_get(
178
+ $option_name,
179
+ $cache_group
180
+ );
181
+
182
+ $load_options = ( false === $this->_options );
183
+ }
184
+
185
+ $cached = true;
186
+
187
+ if ( $load_options ) {
188
+ if ( $this->_is_network_storage ) {
189
+ $this->_options = get_site_option( $option_name );
190
+ } else if ( $this->_blog_id > 0 ) {
191
+ $this->_options = get_blog_option( $this->_blog_id, $option_name );
192
+ } else {
193
+ $this->_options = get_option( $option_name );
194
+ }
195
+
196
+ if ( is_string( $this->_options ) ) {
197
+ $this->_options = json_decode( $this->_options );
198
+ }
199
+
200
+ // $this->_logger->info('get_option = ' . var_export($this->_options, true));
201
+
202
+ if ( false === $this->_options ) {
203
+ $this->clear();
204
+ }
205
+
206
+ $cached = false;
207
+ }
208
+
209
+ if ( ! WP_FS__DEBUG_SDK && ! $cached ) {
210
+ // Set non encoded cache.
211
+ wp_cache_set( $option_name, $this->_options, $cache_group );
212
+ }
213
+ }
214
+ }
215
+
216
+ /**
217
+ * @author Vova Feldman (@svovaf)
218
+ * @since 1.0.3
219
+ *
220
+ * @return bool
221
+ */
222
+ function is_loaded() {
223
+ return isset( $this->_options );
224
+ }
225
+
226
+ /**
227
+ * @author Vova Feldman (@svovaf)
228
+ * @since 1.0.3
229
+ *
230
+ * @return bool
231
+ */
232
+ function is_empty() {
233
+ return ( $this->is_loaded() && false === $this->_options );
234
+ }
235
+
236
+ /**
237
+ * @author Vova Feldman (@svovaf)
238
+ * @since 1.0.6
239
+ *
240
+ * @param bool $flush
241
+ */
242
+ function clear( $flush = false ) {
243
+ $this->_logger->entrance();
244
+
245
+ $this->_options = array();
246
+
247
+ if ( $flush ) {
248
+ $this->store();
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Delete options manager from DB.
254
+ *
255
+ * @author Vova Feldman (@svovaf)
256
+ * @since 1.0.9
257
+ */
258
+ function delete() {
259
+ $option_name = $this->get_option_manager_name();
260
+
261
+ if ( $this->_is_network_storage ) {
262
+ delete_site_option( $option_name );
263
+ } else if ( $this->_blog_id > 0 ) {
264
+ delete_blog_option( $this->_blog_id, $option_name );
265
+ } else {
266
+ delete_option( $option_name );
267
+ }
268
+ }
269
+
270
+ /**
271
+ * @author Vova Feldman (@svovaf)
272
+ * @since 1.0.6
273
+ *
274
+ * @param string $option
275
+ *
276
+ * @return bool
277
+ */
278
+ function has_option( $option ) {
279
+ return array_key_exists( $option, $this->_options );
280
+ }
281
+
282
+ /**
283
+ * @author Vova Feldman (@svovaf)
284
+ * @since 1.0.3
285
+ *
286
+ * @param string $option
287
+ * @param mixed $default
288
+ *
289
+ * @return mixed
290
+ */
291
+ function get_option( $option, $default = null ) {
292
+ $this->_logger->entrance( 'option = ' . $option );
293
+
294
+ if ( ! $this->is_loaded() ) {
295
+ $this->load();
296
+ }
297
+
298
+ if ( is_array( $this->_options ) ) {
299
+ $value = isset( $this->_options[ $option ] ) ?
300
+ $this->_options[ $option ] :
301
+ $default;
302
+ } else if ( is_object( $this->_options ) ) {
303
+ $value = isset( $this->_options->{$option} ) ?
304
+ $this->_options->{$option} :
305
+ $default;
306
+ } else {
307
+ $value = $default;
308
+ }
309
+
310
+ /**
311
+ * If it's an object, return a clone of the object, otherwise,
312
+ * external changes of the object will actually change the value
313
+ * of the object in the options manager which may lead to an unexpected
314
+ * behaviour and data integrity when a store() call is triggered.
315
+ *
316
+ * Example:
317
+ * $object1 = $options->get_option( 'object1' );
318
+ * $object1->x = 123;
319
+ *
320
+ * $object2 = $options->get_option( 'object2' );
321
+ * $object2->y = 'dummy';
322
+ *
323
+ * $options->set_option( 'object2', $object2, true );
324
+ *
325
+ * If we don't return a clone of option 'object1', setting 'object2'
326
+ * will also store the updated value of 'object1' which is quite not
327
+ * an expected behaviour.
328
+ *
329
+ * @author Vova Feldman
330
+ */
331
+ return is_object( $value ) ? clone $value : $value;
332
+ }
333
+
334
+ /**
335
+ * @author Vova Feldman (@svovaf)
336
+ * @since 1.0.3
337
+ *
338
+ * @param string $option
339
+ * @param mixed $value
340
+ * @param bool $flush
341
+ */
342
+ function set_option( $option, $value, $flush = false ) {
343
+ $this->_logger->entrance( 'option = ' . $option );
344
+
345
+ if ( ! $this->is_loaded() ) {
346
+ $this->clear();
347
+ }
348
+
349
+ /**
350
+ * If it's an object, store a clone of the object, otherwise,
351
+ * external changes of the object will actually change the value
352
+ * of the object in the options manager which may lead to an unexpected
353
+ * behaviour and data integrity when a store() call is triggered.
354
+ *
355
+ * Example:
356
+ * $object1 = new stdClass();
357
+ * $object1->x = 123;
358
+ *
359
+ * $options->set_option( 'object1', $object1 );
360
+ *
361
+ * $object1->x = 456;
362
+ *
363
+ * $options->set_option( 'object2', $object2, true );
364
+ *
365
+ * If we don't set the option as a clone of option 'object1', setting 'object2'
366
+ * will also store the updated value of 'object1' ($object1->x = 456 instead of
367
+ * $object1->x = 123) which is quite not an expected behaviour.
368
+ *
369
+ * @author Vova Feldman
370
+ */
371
+ $copy = is_object( $value ) ? clone $value : $value;
372
+
373
+ if ( is_array( $this->_options ) ) {
374
+ $this->_options[ $option ] = $copy;
375
+ } else if ( is_object( $this->_options ) ) {
376
+ $this->_options->{$option} = $copy;
377
+ }
378
+
379
+ if ( $flush ) {
380
+ $this->store();
381
+ }
382
+ }
383
+
384
+ /**
385
+ * Unset option.
386
+ *
387
+ * @author Vova Feldman (@svovaf)
388
+ * @since 1.0.3
389
+ *
390
+ * @param string $option
391
+ * @param bool $flush
392
+ */
393
+ function unset_option( $option, $flush = false ) {
394
+ $this->_logger->entrance( 'option = ' . $option );
395
+
396
+ if ( is_array( $this->_options ) ) {
397
+ if ( ! isset( $this->_options[ $option ] ) ) {
398
+ return;
399
+ }
400
+
401
+ unset( $this->_options[ $option ] );
402
+
403
+ } else if ( is_object( $this->_options ) ) {
404
+ if ( ! isset( $this->_options->{$option} ) ) {
405
+ return;
406
+ }
407
+
408
+ unset( $this->_options->{$option} );
409
+ }
410
+
411
+ if ( $flush ) {
412
+ $this->store();
413
+ }
414
+ }
415
+
416
+ /**
417
+ * Dump options to database.
418
+ *
419
+ * @author Vova Feldman (@svovaf)
420
+ * @since 1.0.3
421
+ */
422
+ function store() {
423
+ $this->_logger->entrance();
424
+
425
+ $option_name = $this->get_option_manager_name();
426
+
427
+ if ( $this->_logger->is_on() ) {
428
+ $this->_logger->info( $option_name . ' = ' . var_export( $this->_options, true ) );
429
+ }
430
+
431
+ // Update DB.
432
+ if ( $this->_is_network_storage ) {
433
+ update_site_option( $option_name, $this->_options );
434
+ } else if ( $this->_blog_id > 0 ) {
435
+ update_blog_option( $this->_blog_id, $option_name, $this->_options );
436
+ } else {
437
+ update_option( $option_name, $this->_options, $this->_autoload );
438
+ }
439
+
440
+ if ( ! WP_FS__DEBUG_SDK ) {
441
+ wp_cache_set( $option_name, $this->_options, $this->get_cache_group() );
442
+ }
443
+ }
444
+
445
+ /**
446
+ * Get options keys.
447
+ *
448
+ * @author Vova Feldman (@svovaf)
449
+ * @since 1.0.3
450
+ *
451
+ * @return string[]
452
+ */
453
+ function get_options_keys() {
454
+ if ( is_array( $this->_options ) ) {
455
+ return array_keys( $this->_options );
456
+ } else if ( is_object( $this->_options ) ) {
457
+ return array_keys( get_object_vars( $this->_options ) );
458
+ }
459
+
460
+ return array();
461
+ }
462
+
463
+ #--------------------------------------------------------------------------------
464
+ #region Migration
465
+ #--------------------------------------------------------------------------------
466
+
467
+ /**
468
+ * Migrate options from site level.
469
+ *
470
+ * @author Vova Feldman (@svovaf)
471
+ * @since 2.0.0
472
+ */
473
+ function migrate_to_network() {
474
+ $site_options = FS_Option_Manager::get_manager($this->_id, true, false);
475
+
476
+ $options = is_object( $site_options->_options ) ?
477
+ get_object_vars( $site_options->_options ) :
478
+ $site_options->_options;
479
+
480
+ if ( ! empty( $options ) ) {
481
+ foreach ( $options as $key => $val ) {
482
+ $this->set_option( $key, $val, false );
483
+ }
484
+
485
+ $this->store();
486
+ }
487
+ }
488
+
489
+ #endregion
490
+
491
+ #--------------------------------------------------------------------------------
492
+ #region Helper Methods
493
+ #--------------------------------------------------------------------------------
494
+
495
+ /**
496
+ * @return string
497
+ */
498
+ private function get_option_manager_name() {
499
+ return $this->_id;
500
+ }
501
+
502
+ /**
503
+ * @author Vova Feldman (@svovaf)
504
+ * @since 2.0.0
505
+ *
506
+ * @return string
507
+ */
508
+ private function get_cache_group() {
509
+ $group = WP_FS__SLUG;
510
+
511
+ if ( $this->_is_network_storage ) {
512
+ $group .= '_ms';
513
+ } else if ( $this->_blog_id > 0 ) {
514
+ $group .= "_s{$this->_blog_id}";
515
+ }
516
+
517
+ return $group;
518
+ }
519
+
520
+ #endregion
521
+ }
freemius/includes/managers/class-fs-plan-manager.php CHANGED
@@ -1,162 +1,162 @@
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.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plan_Manager {
14
- /**
15
- * @var FS_Plan_Manager
16
- */
17
- private static $_instance;
18
-
19
- /**
20
- * @return FS_Plan_Manager
21
- */
22
- static function instance() {
23
- if ( ! isset( self::$_instance ) ) {
24
- self::$_instance = new FS_Plan_Manager();
25
- }
26
-
27
- return self::$_instance;
28
- }
29
-
30
- private function __construct() {
31
- }
32
-
33
- /**
34
- * @param FS_Plugin_License[] $licenses
35
- *
36
- * @return bool
37
- */
38
- function has_premium_license( $licenses ) {
39
- if ( is_array( $licenses ) ) {
40
- /**
41
- * @var FS_Plugin_License[] $licenses
42
- */
43
- foreach ( $licenses as $license ) {
44
- if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
45
- return true;
46
- }
47
- }
48
- }
49
-
50
- return false;
51
- }
52
-
53
- /**
54
- * Check if plugin has any paid plans.
55
- *
56
- * @author Vova Feldman (@svovaf)
57
- * @since 1.0.7
58
- *
59
- * @param FS_Plugin_Plan[] $plans
60
- *
61
- * @return bool
62
- */
63
- function has_paid_plan( $plans ) {
64
- if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
65
- return false;
66
- }
67
-
68
- /**
69
- * @var FS_Plugin_Plan[] $plans
70
- */
71
- for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
72
- if ( ! $plans[ $i ]->is_free() ) {
73
- return true;
74
- }
75
- }
76
-
77
- return false;
78
- }
79
-
80
- /**
81
- * Check if plugin has any free plan, or is it premium only.
82
- *
83
- * Note: If no plans configured, assume plugin is free.
84
- *
85
- * @author Vova Feldman (@svovaf)
86
- * @since 1.0.7
87
- *
88
- * @param FS_Plugin_Plan[] $plans
89
- *
90
- * @return bool
91
- */
92
- function has_free_plan( $plans ) {
93
- if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
94
- return true;
95
- }
96
-
97
- /**
98
- * @var FS_Plugin_Plan[] $plans
99
- */
100
- for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
101
- if ( $plans[ $i ]->is_free() ) {
102
- return true;
103
- }
104
- }
105
-
106
- return false;
107
- }
108
-
109
- /**
110
- * Find all plans that have trial.
111
- *
112
- * @author Vova Feldman (@svovaf)
113
- * @since 1.0.9
114
- *
115
- * @param FS_Plugin_Plan[] $plans
116
- *
117
- * @return FS_Plugin_Plan[]
118
- */
119
- function get_trial_plans( $plans ) {
120
- $trial_plans = array();
121
-
122
- if ( is_array( $plans ) && 0 < count( $plans ) ) {
123
- /**
124
- * @var FS_Plugin_Plan[] $plans
125
- */
126
- for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
127
- if ( $plans[ $i ]->has_trial() ) {
128
- $trial_plans[] = $plans[ $i ];
129
- }
130
- }
131
- }
132
-
133
- return $trial_plans;
134
- }
135
-
136
- /**
137
- * Check if plugin has any trial plan.
138
- *
139
- * @author Vova Feldman (@svovaf)
140
- * @since 1.0.9
141
- *
142
- * @param FS_Plugin_Plan[] $plans
143
- *
144
- * @return bool
145
- */
146
- function has_trial_plan( $plans ) {
147
- if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
148
- return true;
149
- }
150
-
151
- /**
152
- * @var FS_Plugin_Plan[] $plans
153
- */
154
- for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
155
- if ( $plans[ $i ]->has_trial() ) {
156
- return true;
157
- }
158
- }
159
-
160
- return false;
161
- }
162
  }
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.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plan_Manager {
14
+ /**
15
+ * @var FS_Plan_Manager
16
+ */
17
+ private static $_instance;
18
+
19
+ /**
20
+ * @return FS_Plan_Manager
21
+ */
22
+ static function instance() {
23
+ if ( ! isset( self::$_instance ) ) {
24
+ self::$_instance = new FS_Plan_Manager();
25
+ }
26
+
27
+ return self::$_instance;
28
+ }
29
+
30
+ private function __construct() {
31
+ }
32
+
33
+ /**
34
+ * @param FS_Plugin_License[] $licenses
35
+ *
36
+ * @return bool
37
+ */
38
+ function has_premium_license( $licenses ) {
39
+ if ( is_array( $licenses ) ) {
40
+ /**
41
+ * @var FS_Plugin_License[] $licenses
42
+ */
43
+ foreach ( $licenses as $license ) {
44
+ if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
45
+ return true;
46
+ }
47
+ }
48
+ }
49
+
50
+ return false;
51
+ }
52
+
53
+ /**
54
+ * Check if plugin has any paid plans.
55
+ *
56
+ * @author Vova Feldman (@svovaf)
57
+ * @since 1.0.7
58
+ *
59
+ * @param FS_Plugin_Plan[] $plans
60
+ *
61
+ * @return bool
62
+ */
63
+ function has_paid_plan( $plans ) {
64
+ if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
65
+ return false;
66
+ }
67
+
68
+ /**
69
+ * @var FS_Plugin_Plan[] $plans
70
+ */
71
+ for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
72
+ if ( ! $plans[ $i ]->is_free() ) {
73
+ return true;
74
+ }
75
+ }
76
+
77
+ return false;
78
+ }
79
+
80
+ /**
81
+ * Check if plugin has any free plan, or is it premium only.
82
+ *
83
+ * Note: If no plans configured, assume plugin is free.
84
+ *
85
+ * @author Vova Feldman (@svovaf)
86
+ * @since 1.0.7
87
+ *
88
+ * @param FS_Plugin_Plan[] $plans
89
+ *
90
+ * @return bool
91
+ */
92
+ function has_free_plan( $plans ) {
93
+ if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
94
+ return true;
95
+ }
96
+
97
+ /**
98
+ * @var FS_Plugin_Plan[] $plans
99
+ */
100
+ for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
101
+ if ( $plans[ $i ]->is_free() ) {
102
+ return true;
103
+ }
104
+ }
105
+
106
+ return false;
107
+ }
108
+
109
+ /**
110
+ * Find all plans that have trial.
111
+ *
112
+ * @author Vova Feldman (@svovaf)
113
+ * @since 1.0.9
114
+ *
115
+ * @param FS_Plugin_Plan[] $plans
116
+ *
117
+ * @return FS_Plugin_Plan[]
118
+ */
119
+ function get_trial_plans( $plans ) {
120
+ $trial_plans = array();
121
+
122
+ if ( is_array( $plans ) && 0 < count( $plans ) ) {
123
+ /**
124
+ * @var FS_Plugin_Plan[] $plans
125
+ */
126
+ for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
127
+ if ( $plans[ $i ]->has_trial() ) {
128
+ $trial_plans[] = $plans[ $i ];
129
+ }
130
+ }
131
+ }
132
+
133
+ return $trial_plans;
134
+ }
135
+
136
+ /**
137
+ * Check if plugin has any trial plan.
138
+ *
139
+ * @author Vova Feldman (@svovaf)
140
+ * @since 1.0.9
141
+ *
142
+ * @param FS_Plugin_Plan[] $plans
143
+ *
144
+ * @return bool
145
+ */
146
+ function has_trial_plan( $plans ) {
147
+ if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
148
+ return true;
149
+ }
150
+
151
+ /**
152
+ * @var FS_Plugin_Plan[] $plans
153
+ */
154
+ for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
155
+ if ( $plans[ $i ]->has_trial() ) {
156
+ return true;
157
+ }
158
+ }
159
+
160
+ return false;
161
+ }
162
  }
freemius/includes/managers/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/sdk/Exceptions/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/sdk/LICENSE.txt CHANGED
@@ -1,340 +1,340 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- {description}
294
- Copyright (C) {year} {fullname}
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- {signature of Ty Coon}, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
340
-
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ {description}
294
+ Copyright (C) {year} {fullname}
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
340
+
freemius/includes/sdk/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/supplements/fs-essential-functions-1.1.7.1.php CHANGED
@@ -1,43 +1,43 @@
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.1.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Find the plugin main file path based on any given file inside the plugin's folder.
15
- *
16
- * @author Vova Feldman (@svovaf)
17
- * @since 1.1.7.1
18
- *
19
- * @param string $file Absolute path to a file inside a plugin's folder.
20
- *
21
- * @return string
22
- */
23
- function fs_find_direct_caller_plugin_file( $file ) {
24
- /**
25
- * All the code below will be executed once on activation.
26
- * If the user changes the main plugin's file name, the file_exists()
27
- * will catch it.
28
- */
29
- $all_plugins = fs_get_plugins( true );
30
-
31
- $file_real_path = fs_normalize_path( realpath( $file ) );
32
-
33
- // Get active plugin's main files real full names (might be symlinks).
34
- foreach ( $all_plugins as $relative_path => $data ) {
35
- if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) . '/' ) ) ) {
36
- if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
37
- return $relative_path;
38
- }
39
- }
40
- }
41
-
42
- return null;
43
- }
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.1.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Find the plugin main file path based on any given file inside the plugin's folder.
15
+ *
16
+ * @author Vova Feldman (@svovaf)
17
+ * @since 1.1.7.1
18
+ *
19
+ * @param string $file Absolute path to a file inside a plugin's folder.
20
+ *
21
+ * @return string
22
+ */
23
+ function fs_find_direct_caller_plugin_file( $file ) {
24
+ /**
25
+ * All the code below will be executed once on activation.
26
+ * If the user changes the main plugin's file name, the file_exists()
27
+ * will catch it.
28
+ */
29
+ $all_plugins = fs_get_plugins( true );
30
+
31
+ $file_real_path = fs_normalize_path( realpath( $file ) );
32
+
33
+ // Get active plugin's main files real full names (might be symlinks).
34
+ foreach ( $all_plugins as $relative_path => $data ) {
35
+ if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) . '/' ) ) ) {
36
+ if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
37
+ return $relative_path;
38
+ }
39
+ }
40
+ }
41
+
42
+ return null;
43
+ }
freemius/includes/supplements/fs-essential-functions-2.2.1.php CHANGED
@@ -1,45 +1,45 @@
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 2.2.1
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- if ( ! function_exists( 'fs_get_plugins' ) ) {
14
- /**
15
- * @author Leo Fajardo (@leorw)
16
- * @since 2.2.1
17
- *
18
- * @param bool $delete_cache
19
- *
20
- * @return array
21
- */
22
- function fs_get_plugins( $delete_cache = false ) {
23
- $cached_plugins = wp_cache_get( 'plugins', 'plugins' );
24
- if ( ! is_array( $cached_plugins ) ) {
25
- $cached_plugins = array();
26
- }
27
-
28
- $plugin_folder = '';
29
- if ( isset( $cached_plugins[ $plugin_folder ] ) ) {
30
- $plugins = $cached_plugins[ $plugin_folder ];
31
- } else {
32
- if ( ! function_exists( 'get_plugins' ) ) {
33
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
34
- }
35
-
36
- $plugins = get_plugins();
37
-
38
- if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
39
- wp_cache_delete( 'plugins', 'plugins' );
40
- }
41
- }
42
-
43
- return $plugins;
44
- }
45
  }
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 2.2.1
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ if ( ! function_exists( 'fs_get_plugins' ) ) {
14
+ /**
15
+ * @author Leo Fajardo (@leorw)
16
+ * @since 2.2.1
17
+ *
18
+ * @param bool $delete_cache
19
+ *
20
+ * @return array
21
+ */
22
+ function fs_get_plugins( $delete_cache = false ) {
23
+ $cached_plugins = wp_cache_get( 'plugins', 'plugins' );
24
+ if ( ! is_array( $cached_plugins ) ) {
25
+ $cached_plugins = array();
26
+ }
27
+
28
+ $plugin_folder = '';
29
+ if ( isset( $cached_plugins[ $plugin_folder ] ) ) {
30
+ $plugins = $cached_plugins[ $plugin_folder ];
31
+ } else {
32
+ if ( ! function_exists( 'get_plugins' ) ) {
33
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
34
+ }
35
+
36
+ $plugins = get_plugins();
37
+
38
+ if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
39
+ wp_cache_delete( 'plugins', 'plugins' );
40
+ }
41
+ }
42
+
43
+ return $plugins;
44
+ }
45
  }
freemius/includes/supplements/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/languages/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/templates/account/billing.php CHANGED
@@ -1,423 +1,423 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- */
17
- $fs = freemius( $VARS['id'] );
18
-
19
- $slug = $fs->get_slug();
20
-
21
- $edit_text = fs_text_x_inline( 'Edit', 'verb', 'edit', $slug );
22
- $update_text = fs_text_x_inline( 'Update', 'verb', 'update', $slug );
23
-
24
- $billing = $fs->_fetch_billing();
25
- $has_billing = ( $billing instanceof FS_Billing );
26
- if ( ! $has_billing ) {
27
- $billing = new FS_Billing();
28
- }
29
- ?>
30
- <!-- Billing -->
31
- <div class="postbox">
32
- <div id="fs_billing">
33
- <h3><span class="dashicons dashicons-portfolio"></span> <?php fs_esc_html_echo_inline( 'Billing', 'billing', $slug ) ?></h3>
34
- <table id="fs_billing_address"<?php if ( $has_billing ) {
35
- echo ' class="fs-read-mode"';
36
- } ?>>
37
- <tr>
38
- <td><label><span><?php fs_esc_html_echo_inline( 'Business name', 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo $billing->business_name ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Business name', 'business-name', $slug ) ?>"></label></td>
39
- <td><label><span><?php fs_esc_html_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo $billing->tax_id ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>"></label></td>
40
- </tr>
41
- <tr>
42
- <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo $billing->address_street ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>"></label></td>
43
- <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo $billing->address_apt ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>"></label></td>
44
- </tr>
45
- <tr>
46
- <td><label><span><?php fs_esc_html_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Town', 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo $billing->address_city ?>" placeholder="<?php fs_esc_attr_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_attr_echo_inline( 'Town', 'town', $slug ) ?>"></label></td>
47
- <td><label><span><?php fs_esc_html_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo $billing->address_zip ?>" placeholder="<?php fs_esc_attr_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>"></label></td>
48
- </tr>
49
- <tr>
50
- <?php $countries = array(
51
- 'AF' => 'Afghanistan',
52
- 'AX' => 'Aland Islands',
53
- 'AL' => 'Albania',
54
- 'DZ' => 'Algeria',
55
- 'AS' => 'American Samoa',
56
- 'AD' => 'Andorra',
57
- 'AO' => 'Angola',
58
- 'AI' => 'Anguilla',
59
- 'AQ' => 'Antarctica',
60
- 'AG' => 'Antigua and Barbuda',
61
- 'AR' => 'Argentina',
62
- 'AM' => 'Armenia',
63
- 'AW' => 'Aruba',
64
- 'AU' => 'Australia',
65
- 'AT' => 'Austria',
66
- 'AZ' => 'Azerbaijan',
67
- 'BS' => 'Bahamas',
68
- 'BH' => 'Bahrain',
69
- 'BD' => 'Bangladesh',
70
- 'BB' => 'Barbados',
71
- 'BY' => 'Belarus',
72
- 'BE' => 'Belgium',
73
- 'BZ' => 'Belize',
74
- 'BJ' => 'Benin',
75
- 'BM' => 'Bermuda',
76
- 'BT' => 'Bhutan',
77
- 'BO' => 'Bolivia',
78
- 'BQ' => 'Bonaire, Saint Eustatius and Saba',
79
- 'BA' => 'Bosnia and Herzegovina',
80
- 'BW' => 'Botswana',
81
- 'BV' => 'Bouvet Island',
82
- 'BR' => 'Brazil',
83
- 'IO' => 'British Indian Ocean Territory',
84
- 'VG' => 'British Virgin Islands',
85
- 'BN' => 'Brunei',
86
- 'BG' => 'Bulgaria',
87
- 'BF' => 'Burkina Faso',
88
- 'BI' => 'Burundi',
89
- 'KH' => 'Cambodia',
90
- 'CM' => 'Cameroon',
91
- 'CA' => 'Canada',
92
- 'CV' => 'Cape Verde',
93
- 'KY' => 'Cayman Islands',
94
- 'CF' => 'Central African Republic',
95
- 'TD' => 'Chad',
96
- 'CL' => 'Chile',
97
- 'CN' => 'China',
98
- 'CX' => 'Christmas Island',
99
- 'CC' => 'Cocos Islands',
100
- 'CO' => 'Colombia',
101
- 'KM' => 'Comoros',
102
- 'CK' => 'Cook Islands',
103
- 'CR' => 'Costa Rica',
104
- 'HR' => 'Croatia',
105
- 'CU' => 'Cuba',
106
- 'CW' => 'Curacao',
107
- 'CY' => 'Cyprus',
108
- 'CZ' => 'Czech Republic',
109
- 'CD' => 'Democratic Republic of the Congo',
110
- 'DK' => 'Denmark',
111
- 'DJ' => 'Djibouti',
112
- 'DM' => 'Dominica',
113
- 'DO' => 'Dominican Republic',
114
- 'TL' => 'East Timor',
115
- 'EC' => 'Ecuador',
116
- 'EG' => 'Egypt',
117
- 'SV' => 'El Salvador',
118
- 'GQ' => 'Equatorial Guinea',
119
- 'ER' => 'Eritrea',
120
- 'EE' => 'Estonia',
121
- 'ET' => 'Ethiopia',
122
- 'FK' => 'Falkland Islands',
123
- 'FO' => 'Faroe Islands',
124
- 'FJ' => 'Fiji',
125
- 'FI' => 'Finland',
126
- 'FR' => 'France',
127
- 'GF' => 'French Guiana',
128
- 'PF' => 'French Polynesia',
129
- 'TF' => 'French Southern Territories',
130
- 'GA' => 'Gabon',
131
- 'GM' => 'Gambia',
132
- 'GE' => 'Georgia',
133
- 'DE' => 'Germany',
134
- 'GH' => 'Ghana',
135
- 'GI' => 'Gibraltar',
136
- 'GR' => 'Greece',
137
- 'GL' => 'Greenland',
138
- 'GD' => 'Grenada',
139
- 'GP' => 'Guadeloupe',
140
- 'GU' => 'Guam',
141
- 'GT' => 'Guatemala',
142
- 'GG' => 'Guernsey',
143
- 'GN' => 'Guinea',
144
- 'GW' => 'Guinea-Bissau',
145
- 'GY' => 'Guyana',
146
- 'HT' => 'Haiti',
147
- 'HM' => 'Heard Island and McDonald Islands',
148
- 'HN' => 'Honduras',
149
- 'HK' => 'Hong Kong',
150
- 'HU' => 'Hungary',
151
- 'IS' => 'Iceland',
152
- 'IN' => 'India',
153
- 'ID' => 'Indonesia',
154
- 'IR' => 'Iran',
155
- 'IQ' => 'Iraq',
156
- 'IE' => 'Ireland',
157
- 'IM' => 'Isle of Man',
158
- 'IL' => 'Israel',
159
- 'IT' => 'Italy',
160
- 'CI' => 'Ivory Coast',
161
- 'JM' => 'Jamaica',
162
- 'JP' => 'Japan',
163
- 'JE' => 'Jersey',
164
- 'JO' => 'Jordan',
165
- 'KZ' => 'Kazakhstan',
166
- 'KE' => 'Kenya',
167
- 'KI' => 'Kiribati',
168
- 'XK' => 'Kosovo',
169
- 'KW' => 'Kuwait',
170
- 'KG' => 'Kyrgyzstan',
171
- 'LA' => 'Laos',
172
- 'LV' => 'Latvia',
173
- 'LB' => 'Lebanon',
174
- 'LS' => 'Lesotho',
175
- 'LR' => 'Liberia',
176
- 'LY' => 'Libya',
177
- 'LI' => 'Liechtenstein',
178
- 'LT' => 'Lithuania',
179
- 'LU' => 'Luxembourg',
180
- 'MO' => 'Macao',
181
- 'MK' => 'Macedonia',
182
- 'MG' => 'Madagascar',
183
- 'MW' => 'Malawi',
184
- 'MY' => 'Malaysia',
185
- 'MV' => 'Maldives',
186
- 'ML' => 'Mali',
187
- 'MT' => 'Malta',
188
- 'MH' => 'Marshall Islands',
189
- 'MQ' => 'Martinique',
190
- 'MR' => 'Mauritania',
191
- 'MU' => 'Mauritius',
192
- 'YT' => 'Mayotte',
193
- 'MX' => 'Mexico',
194
- 'FM' => 'Micronesia',
195
- 'MD' => 'Moldova',
196
- 'MC' => 'Monaco',
197
- 'MN' => 'Mongolia',
198
- 'ME' => 'Montenegro',
199
- 'MS' => 'Montserrat',
200
- 'MA' => 'Morocco',
201
- 'MZ' => 'Mozambique',
202
- 'MM' => 'Myanmar',
203
- 'NA' => 'Namibia',
204
- 'NR' => 'Nauru',
205
- 'NP' => 'Nepal',
206
- 'NL' => 'Netherlands',
207
- 'NC' => 'New Caledonia',
208
- 'NZ' => 'New Zealand',
209
- 'NI' => 'Nicaragua',
210
- 'NE' => 'Niger',
211
- 'NG' => 'Nigeria',
212
- 'NU' => 'Niue',
213
- 'NF' => 'Norfolk Island',
214
- 'KP' => 'North Korea',
215
- 'MP' => 'Northern Mariana Islands',
216
- 'NO' => 'Norway',
217
- 'OM' => 'Oman',
218
- 'PK' => 'Pakistan',
219
- 'PW' => 'Palau',
220
- 'PS' => 'Palestinian Territory',
221
- 'PA' => 'Panama',
222
- 'PG' => 'Papua New Guinea',
223
- 'PY' => 'Paraguay',
224
- 'PE' => 'Peru',
225
- 'PH' => 'Philippines',
226
- 'PN' => 'Pitcairn',
227
- 'PL' => 'Poland',
228
- 'PT' => 'Portugal',
229
- 'PR' => 'Puerto Rico',
230
- 'QA' => 'Qatar',
231
- 'CG' => 'Republic of the Congo',
232
- 'RE' => 'Reunion',
233
- 'RO' => 'Romania',
234
- 'RU' => 'Russia',
235
- 'RW' => 'Rwanda',
236
- 'BL' => 'Saint Barthelemy',
237
- 'SH' => 'Saint Helena',
238
- 'KN' => 'Saint Kitts and Nevis',
239
- 'LC' => 'Saint Lucia',
240
- 'MF' => 'Saint Martin',
241
- 'PM' => 'Saint Pierre and Miquelon',
242
- 'VC' => 'Saint Vincent and the Grenadines',
243
- 'WS' => 'Samoa',
244
- 'SM' => 'San Marino',
245
- 'ST' => 'Sao Tome and Principe',
246
- 'SA' => 'Saudi Arabia',
247
- 'SN' => 'Senegal',
248
- 'RS' => 'Serbia',
249
- 'SC' => 'Seychelles',
250
- 'SL' => 'Sierra Leone',
251
- 'SG' => 'Singapore',
252
- 'SX' => 'Sint Maarten',
253
- 'SK' => 'Slovakia',
254
- 'SI' => 'Slovenia',
255
- 'SB' => 'Solomon Islands',
256
- 'SO' => 'Somalia',
257
- 'ZA' => 'South Africa',
258
- 'GS' => 'South Georgia and the South Sandwich Islands',
259
- 'KR' => 'South Korea',
260
- 'SS' => 'South Sudan',
261
- 'ES' => 'Spain',
262
- 'LK' => 'Sri Lanka',
263
- 'SD' => 'Sudan',
264
- 'SR' => 'Suriname',
265
- 'SJ' => 'Svalbard and Jan Mayen',
266
- 'SZ' => 'Swaziland',
267
- 'SE' => 'Sweden',
268
- 'CH' => 'Switzerland',
269
- 'SY' => 'Syria',
270
- 'TW' => 'Taiwan',
271
- 'TJ' => 'Tajikistan',
272
- 'TZ' => 'Tanzania',
273
- 'TH' => 'Thailand',
274
- 'TG' => 'Togo',
275
- 'TK' => 'Tokelau',
276
- 'TO' => 'Tonga',
277
- 'TT' => 'Trinidad and Tobago',
278
- 'TN' => 'Tunisia',
279
- 'TR' => 'Turkey',
280
- 'TM' => 'Turkmenistan',
281
- 'TC' => 'Turks and Caicos Islands',
282
- 'TV' => 'Tuvalu',
283
- 'VI' => 'U.S. Virgin Islands',
284
- 'UG' => 'Uganda',
285
- 'UA' => 'Ukraine',
286
- 'AE' => 'United Arab Emirates',
287
- 'GB' => 'United Kingdom',
288
- 'US' => 'United States',
289
- 'UM' => 'United States Minor Outlying Islands',
290
- 'UY' => 'Uruguay',
291
- 'UZ' => 'Uzbekistan',
292
- 'VU' => 'Vanuatu',
293
- 'VA' => 'Vatican',
294
- 'VE' => 'Venezuela',
295
- 'VN' => 'Vietnam',
296
- 'WF' => 'Wallis and Futuna',
297
- 'EH' => 'Western Sahara',
298
- 'YE' => 'Yemen',
299
- 'ZM' => 'Zambia',
300
- 'ZW' => 'Zimbabwe',
301
- ) ?>
302
- <td><label><span><?php fs_esc_html_echo_inline( 'Country', 'country', $slug ) ?>:</span> <select id="address_country_code">
303
- <?php if ( empty( $billing->address_country_code ) ) : ?>
304
- <option value="" selected><?php fs_esc_html_echo_inline( 'Select Country', 'select-country', $slug ) ?></option>
305
- <?php endif ?>
306
- <?php foreach ( $countries as $code => $country ) : ?>
307
- <option
308
- value="<?php echo $code ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo $country ?></option>
309
- <?php endforeach ?>
310
- </select></label></td>
311
- <td><label><span><?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>:</span>
312
- <input id="address_state" value="<?php echo $billing->address_state ?>" placeholder="<?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>"></label></td>
313
- </tr>
314
- <tr>
315
- <td colspan="2">
316
- <button
317
- class="button"><?php echo esc_html( $has_billing ?
318
- $edit_text :
319
- $update_text
320
- ) ?></button>
321
- </td>
322
- </tr>
323
- </table>
324
- </div>
325
- </div>
326
- <!--/ Billing -->
327
- <script type="text/javascript">
328
- (function($){
329
- var $billingAddress = $('#fs_billing_address'),
330
- $billingInputs = $billingAddress.find('input, select');
331
-
332
- var setPrevValues = function () {
333
- $billingInputs.each(function () {
334
- $(this).attr('data-val', $(this).val());
335
- });
336
- };
337
-
338
- setPrevValues();
339
-
340
- var hasBillingChanged = function () {
341
- for (var i = 0, len = $billingInputs.length; i < len; i++){
342
- var $this = $($billingInputs[i]);
343
- if ($this.attr('data-val') !== $this.val()) {
344
- return true;
345
- }
346
- }
347
-
348
- return false;
349
- };
350
-
351
- var isEditAllFieldsMode = false;
352
-
353
- $billingAddress.find('.button').click(function(){
354
- $billingAddress.toggleClass('fs-read-mode');
355
-
356
- var isEditMode = !$billingAddress.hasClass('fs-read-mode');
357
-
358
- $(this)
359
- .html(isEditMode ? '<?php echo esc_js( $update_text ) ?>' : '<?php echo esc_js( $edit_text ) ?>')
360
- .toggleClass('button-primary');
361
-
362
- if (isEditMode) {
363
- $('#business_name').focus().select();
364
- isEditAllFieldsMode = true;
365
- } else {
366
- isEditAllFieldsMode = false;
367
-
368
- if (!hasBillingChanged())
369
- return;
370
-
371
- var billing = {};
372
-
373
- $billingInputs.each(function(){
374
- if ($(this).attr('data-val') !== $(this).val()) {
375
- billing[$(this).attr('id')] = $(this).val();
376
- }
377
- });
378
-
379
- $.ajax({
380
- url : ajaxurl,
381
- method : 'POST',
382
- data : {
383
- action : '<?php echo $fs->get_ajax_action( 'update_billing' ) ?>',
384
- security : '<?php echo $fs->get_ajax_security( 'update_billing' ) ?>',
385
- module_id: '<?php echo $fs->get_id() ?>',
386
- billing : billing
387
- },
388
- success: function (resultObj) {
389
- if (resultObj.success) {
390
- setPrevValues();
391
- } else {
392
- alert(resultObj.error);
393
- }
394
- }
395
- });
396
- }
397
- });
398
-
399
- $billingInputs
400
- // Get into edit mode upon selection.
401
- .focus(function () {
402
- var isEditMode = !$billingAddress.hasClass('fs-read-mode');
403
-
404
- if (isEditMode) {
405
- return;
406
- }
407
-
408
- $billingAddress.toggleClass('fs-read-mode');
409
- $billingAddress.find('.button')
410
- .html('<?php echo esc_js( $update_text ) ?>')
411
- .toggleClass('button-primary');
412
- })
413
- // If blured after editing only one field without changes, exit edit mode.
414
- .blur(function () {
415
- if (!isEditAllFieldsMode && !hasBillingChanged()) {
416
- $billingAddress.toggleClass('fs-read-mode');
417
- $billingAddress.find('.button')
418
- .html('<?php echo esc_js( $edit_text ) ?>')
419
- .toggleClass('button-primary');
420
- }
421
- });
422
- })(jQuery);
423
  </script>
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ */
17
+ $fs = freemius( $VARS['id'] );
18
+
19
+ $slug = $fs->get_slug();
20
+
21
+ $edit_text = fs_text_x_inline( 'Edit', 'verb', 'edit', $slug );
22
+ $update_text = fs_text_x_inline( 'Update', 'verb', 'update', $slug );
23
+
24
+ $billing = $fs->_fetch_billing();
25
+ $has_billing = ( $billing instanceof FS_Billing );
26
+ if ( ! $has_billing ) {
27
+ $billing = new FS_Billing();
28
+ }
29
+ ?>
30
+ <!-- Billing -->
31
+ <div class="postbox">
32
+ <div id="fs_billing">
33
+ <h3><span class="dashicons dashicons-portfolio"></span> <?php fs_esc_html_echo_inline( 'Billing', 'billing', $slug ) ?></h3>
34
+ <table id="fs_billing_address"<?php if ( $has_billing ) {
35
+ echo ' class="fs-read-mode"';
36
+ } ?>>
37
+ <tr>
38
+ <td><label><span><?php fs_esc_html_echo_inline( 'Business name', 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo $billing->business_name ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Business name', 'business-name', $slug ) ?>"></label></td>
39
+ <td><label><span><?php fs_esc_html_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo $billing->tax_id ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>"></label></td>
40
+ </tr>
41
+ <tr>
42
+ <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo $billing->address_street ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>"></label></td>
43
+ <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo $billing->address_apt ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>"></label></td>
44
+ </tr>
45
+ <tr>
46
+ <td><label><span><?php fs_esc_html_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Town', 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo $billing->address_city ?>" placeholder="<?php fs_esc_attr_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_attr_echo_inline( 'Town', 'town', $slug ) ?>"></label></td>
47
+ <td><label><span><?php fs_esc_html_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo $billing->address_zip ?>" placeholder="<?php fs_esc_attr_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>"></label></td>
48
+ </tr>
49
+ <tr>
50
+ <?php $countries = array(
51
+ 'AF' => 'Afghanistan',
52
+ 'AX' => 'Aland Islands',
53
+ 'AL' => 'Albania',
54
+ 'DZ' => 'Algeria',
55
+ 'AS' => 'American Samoa',
56
+ 'AD' => 'Andorra',
57
+ 'AO' => 'Angola',
58
+ 'AI' => 'Anguilla',
59
+ 'AQ' => 'Antarctica',
60
+ 'AG' => 'Antigua and Barbuda',
61
+ 'AR' => 'Argentina',
62
+ 'AM' => 'Armenia',
63
+ 'AW' => 'Aruba',
64
+ 'AU' => 'Australia',
65
+ 'AT' => 'Austria',
66
+ 'AZ' => 'Azerbaijan',
67
+ 'BS' => 'Bahamas',
68
+ 'BH' => 'Bahrain',
69
+ 'BD' => 'Bangladesh',
70
+ 'BB' => 'Barbados',
71
+ 'BY' => 'Belarus',
72
+ 'BE' => 'Belgium',
73
+ 'BZ' => 'Belize',
74
+ 'BJ' => 'Benin',
75
+ 'BM' => 'Bermuda',
76
+ 'BT' => 'Bhutan',
77
+ 'BO' => 'Bolivia',
78
+ 'BQ' => 'Bonaire, Saint Eustatius and Saba',
79
+ 'BA' => 'Bosnia and Herzegovina',
80
+ 'BW' => 'Botswana',
81
+ 'BV' => 'Bouvet Island',
82
+ 'BR' => 'Brazil',
83
+ 'IO' => 'British Indian Ocean Territory',
84
+ 'VG' => 'British Virgin Islands',
85
+ 'BN' => 'Brunei',
86
+ 'BG' => 'Bulgaria',
87
+ 'BF' => 'Burkina Faso',
88
+ 'BI' => 'Burundi',
89
+ 'KH' => 'Cambodia',
90
+ 'CM' => 'Cameroon',
91
+ 'CA' => 'Canada',
92
+ 'CV' => 'Cape Verde',
93
+ 'KY' => 'Cayman Islands',
94
+ 'CF' => 'Central African Republic',
95
+ 'TD' => 'Chad',
96
+ 'CL' => 'Chile',
97
+ 'CN' => 'China',
98
+ 'CX' => 'Christmas Island',
99
+ 'CC' => 'Cocos Islands',
100
+ 'CO' => 'Colombia',
101
+ 'KM' => 'Comoros',
102
+ 'CK' => 'Cook Islands',
103
+ 'CR' => 'Costa Rica',
104
+ 'HR' => 'Croatia',
105
+ 'CU' => 'Cuba',
106
+ 'CW' => 'Curacao',
107
+ 'CY' => 'Cyprus',
108
+ 'CZ' => 'Czech Republic',
109
+ 'CD' => 'Democratic Republic of the Congo',
110
+ 'DK' => 'Denmark',
111
+ 'DJ' => 'Djibouti',
112
+ 'DM' => 'Dominica',
113
+ 'DO' => 'Dominican Republic',
114
+ 'TL' => 'East Timor',
115
+ 'EC' => 'Ecuador',
116
+ 'EG' => 'Egypt',
117
+ 'SV' => 'El Salvador',
118
+ 'GQ' => 'Equatorial Guinea',
119
+ 'ER' => 'Eritrea',
120
+ 'EE' => 'Estonia',
121
+ 'ET' => 'Ethiopia',
122
+ 'FK' => 'Falkland Islands',
123
+ 'FO' => 'Faroe Islands',
124
+ 'FJ' => 'Fiji',
125
+ 'FI' => 'Finland',
126
+ 'FR' => 'France',
127
+ 'GF' => 'French Guiana',
128
+ 'PF' => 'French Polynesia',
129
+ 'TF' => 'French Southern Territories',
130
+ 'GA' => 'Gabon',
131
+ 'GM' => 'Gambia',
132
+ 'GE' => 'Georgia',
133
+ 'DE' => 'Germany',
134
+ 'GH' => 'Ghana',
135
+ 'GI' => 'Gibraltar',
136
+ 'GR' => 'Greece',
137
+ 'GL' => 'Greenland',
138
+ 'GD' => 'Grenada',
139
+ 'GP' => 'Guadeloupe',
140
+ 'GU' => 'Guam',
141
+ 'GT' => 'Guatemala',
142
+ 'GG' => 'Guernsey',
143
+ 'GN' => 'Guinea',
144
+ 'GW' => 'Guinea-Bissau',
145
+ 'GY' => 'Guyana',
146
+ 'HT' => 'Haiti',
147
+ 'HM' => 'Heard Island and McDonald Islands',
148
+ 'HN' => 'Honduras',
149
+ 'HK' => 'Hong Kong',
150
+ 'HU' => 'Hungary',
151
+ 'IS' => 'Iceland',
152
+ 'IN' => 'India',
153
+ 'ID' => 'Indonesia',
154
+ 'IR' => 'Iran',
155
+ 'IQ' => 'Iraq',
156
+ 'IE' => 'Ireland',
157
+ 'IM' => 'Isle of Man',
158
+ 'IL' => 'Israel',
159
+ 'IT' => 'Italy',
160
+ 'CI' => 'Ivory Coast',
161
+ 'JM' => 'Jamaica',
162
+ 'JP' => 'Japan',
163
+ 'JE' => 'Jersey',
164
+ 'JO' => 'Jordan',
165
+ 'KZ' => 'Kazakhstan',
166
+ 'KE' => 'Kenya',
167
+ 'KI' => 'Kiribati',
168
+ 'XK' => 'Kosovo',
169
+ 'KW' => 'Kuwait',
170
+ 'KG' => 'Kyrgyzstan',
171
+ 'LA' => 'Laos',
172
+ 'LV' => 'Latvia',
173
+ 'LB' => 'Lebanon',
174
+ 'LS' => 'Lesotho',
175
+ 'LR' => 'Liberia',
176
+ 'LY' => 'Libya',
177
+ 'LI' => 'Liechtenstein',
178
+ 'LT' => 'Lithuania',
179
+ 'LU' => 'Luxembourg',
180
+ 'MO' => 'Macao',
181
+ 'MK' => 'Macedonia',
182
+ 'MG' => 'Madagascar',
183
+ 'MW' => 'Malawi',
184
+ 'MY' => 'Malaysia',
185
+ 'MV' => 'Maldives',
186
+ 'ML' => 'Mali',
187
+ 'MT' => 'Malta',
188
+ 'MH' => 'Marshall Islands',
189
+ 'MQ' => 'Martinique',
190
+ 'MR' => 'Mauritania',
191
+ 'MU' => 'Mauritius',
192
+ 'YT' => 'Mayotte',
193
+ 'MX' => 'Mexico',
194
+ 'FM' => 'Micronesia',
195
+ 'MD' => 'Moldova',
196
+ 'MC' => 'Monaco',
197
+ 'MN' => 'Mongolia',
198
+ 'ME' => 'Montenegro',
199
+ 'MS' => 'Montserrat',
200
+ 'MA' => 'Morocco',
201
+ 'MZ' => 'Mozambique',
202
+ 'MM' => 'Myanmar',
203
+ 'NA' => 'Namibia',
204
+ 'NR' => 'Nauru',
205
+ 'NP' => 'Nepal',
206
+ 'NL' => 'Netherlands',
207
+ 'NC' => 'New Caledonia',
208
+ 'NZ' => 'New Zealand',
209
+ 'NI' => 'Nicaragua',
210
+ 'NE' => 'Niger',
211
+ 'NG' => 'Nigeria',
212
+ 'NU' => 'Niue',
213
+ 'NF' => 'Norfolk Island',
214
+ 'KP' => 'North Korea',
215
+ 'MP' => 'Northern Mariana Islands',
216
+ 'NO' => 'Norway',
217
+ 'OM' => 'Oman',
218
+ 'PK' => 'Pakistan',
219
+ 'PW' => 'Palau',
220
+ 'PS' => 'Palestinian Territory',
221
+ 'PA' => 'Panama',
222
+ 'PG' => 'Papua New Guinea',
223
+ 'PY' => 'Paraguay',
224
+ 'PE' => 'Peru',
225
+ 'PH' => 'Philippines',
226
+ 'PN' => 'Pitcairn',
227
+ 'PL' => 'Poland',
228
+ 'PT' => 'Portugal',
229
+ 'PR' => 'Puerto Rico',
230
+ 'QA' => 'Qatar',
231
+ 'CG' => 'Republic of the Congo',
232
+ 'RE' => 'Reunion',
233
+ 'RO' => 'Romania',
234
+ 'RU' => 'Russia',
235
+ 'RW' => 'Rwanda',
236
+ 'BL' => 'Saint Barthelemy',
237
+ 'SH' => 'Saint Helena',
238
+ 'KN' => 'Saint Kitts and Nevis',
239
+ 'LC' => 'Saint Lucia',
240
+ 'MF' => 'Saint Martin',
241
+ 'PM' => 'Saint Pierre and Miquelon',
242
+ 'VC' => 'Saint Vincent and the Grenadines',
243
+ 'WS' => 'Samoa',
244
+ 'SM' => 'San Marino',
245
+ 'ST' => 'Sao Tome and Principe',
246
+ 'SA' => 'Saudi Arabia',
247
+ 'SN' => 'Senegal',
248
+ 'RS' => 'Serbia',
249
+ 'SC' => 'Seychelles',
250
+ 'SL' => 'Sierra Leone',
251
+ 'SG' => 'Singapore',
252
+ 'SX' => 'Sint Maarten',
253
+ 'SK' => 'Slovakia',
254
+ 'SI' => 'Slovenia',
255
+ 'SB' => 'Solomon Islands',
256
+ 'SO' => 'Somalia',
257
+ 'ZA' => 'South Africa',
258
+ 'GS' => 'South Georgia and the South Sandwich Islands',
259
+ 'KR' => 'South Korea',
260
+ 'SS' => 'South Sudan',
261
+ 'ES' => 'Spain',
262
+ 'LK' => 'Sri Lanka',
263
+ 'SD' => 'Sudan',
264
+ 'SR' => 'Suriname',
265
+ 'SJ' => 'Svalbard and Jan Mayen',
266
+ 'SZ' => 'Swaziland',
267
+ 'SE' => 'Sweden',
268
+ 'CH' => 'Switzerland',
269
+ 'SY' => 'Syria',
270
+ 'TW' => 'Taiwan',
271
+ 'TJ' => 'Tajikistan',
272
+ 'TZ' => 'Tanzania',
273
+ 'TH' => 'Thailand',
274
+ 'TG' => 'Togo',
275
+ 'TK' => 'Tokelau',
276
+ 'TO' => 'Tonga',
277
+ 'TT' => 'Trinidad and Tobago',
278
+ 'TN' => 'Tunisia',
279
+ 'TR' => 'Turkey',
280
+ 'TM' => 'Turkmenistan',
281
+ 'TC' => 'Turks and Caicos Islands',
282
+ 'TV' => 'Tuvalu',
283
+ 'VI' => 'U.S. Virgin Islands',
284
+ 'UG' => 'Uganda',
285
+ 'UA' => 'Ukraine',
286
+ 'AE' => 'United Arab Emirates',
287
+ 'GB' => 'United Kingdom',
288
+ 'US' => 'United States',
289
+ 'UM' => 'United States Minor Outlying Islands',
290
+ 'UY' => 'Uruguay',
291
+ 'UZ' => 'Uzbekistan',
292
+ 'VU' => 'Vanuatu',
293
+ 'VA' => 'Vatican',
294
+ 'VE' => 'Venezuela',
295
+ 'VN' => 'Vietnam',
296
+ 'WF' => 'Wallis and Futuna',
297
+ 'EH' => 'Western Sahara',
298
+ 'YE' => 'Yemen',
299
+ 'ZM' => 'Zambia',
300
+ 'ZW' => 'Zimbabwe',
301
+ ) ?>
302
+ <td><label><span><?php fs_esc_html_echo_inline( 'Country', 'country', $slug ) ?>:</span> <select id="address_country_code">
303
+ <?php if ( empty( $billing->address_country_code ) ) : ?>
304
+ <option value="" selected><?php fs_esc_html_echo_inline( 'Select Country', 'select-country', $slug ) ?></option>
305
+ <?php endif ?>
306
+ <?php foreach ( $countries as $code => $country ) : ?>
307
+ <option
308
+ value="<?php echo $code ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo $country ?></option>
309
+ <?php endforeach ?>
310
+ </select></label></td>
311
+ <td><label><span><?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>:</span>
312
+ <input id="address_state" value="<?php echo $billing->address_state ?>" placeholder="<?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>"></label></td>
313
+ </tr>
314
+ <tr>
315
+ <td colspan="2">
316
+ <button
317
+ class="button"><?php echo esc_html( $has_billing ?
318
+ $edit_text :
319
+ $update_text
320
+ ) ?></button>
321
+ </td>
322
+ </tr>
323
+ </table>
324
+ </div>
325
+ </div>
326
+ <!--/ Billing -->
327
+ <script type="text/javascript">
328
+ (function($){
329
+ var $billingAddress = $('#fs_billing_address'),
330
+ $billingInputs = $billingAddress.find('input, select');
331
+
332
+ var setPrevValues = function () {
333
+ $billingInputs.each(function () {
334
+ $(this).attr('data-val', $(this).val());
335
+ });
336
+ };
337
+
338
+ setPrevValues();
339
+
340
+ var hasBillingChanged = function () {
341
+ for (var i = 0, len = $billingInputs.length; i < len; i++){
342
+ var $this = $($billingInputs[i]);
343
+ if ($this.attr('data-val') !== $this.val()) {
344
+ return true;
345
+ }
346
+ }
347
+
348
+ return false;
349
+ };
350
+
351
+ var isEditAllFieldsMode = false;
352
+
353
+ $billingAddress.find('.button').click(function(){
354
+ $billingAddress.toggleClass('fs-read-mode');
355
+
356
+ var isEditMode = !$billingAddress.hasClass('fs-read-mode');
357
+
358
+ $(this)
359
+ .html(isEditMode ? '<?php echo esc_js( $update_text ) ?>' : '<?php echo esc_js( $edit_text ) ?>')
360
+ .toggleClass('button-primary');
361
+
362
+ if (isEditMode) {
363
+ $('#business_name').focus().select();
364
+ isEditAllFieldsMode = true;
365
+ } else {
366
+ isEditAllFieldsMode = false;
367
+
368
+ if (!hasBillingChanged())
369
+ return;
370
+
371
+ var billing = {};
372
+
373
+ $billingInputs.each(function(){
374
+ if ($(this).attr('data-val') !== $(this).val()) {
375
+ billing[$(this).attr('id')] = $(this).val();
376
+ }
377
+ });
378
+
379
+ $.ajax({
380
+ url : ajaxurl,
381
+ method : 'POST',
382
+ data : {
383
+ action : '<?php echo $fs->get_ajax_action( 'update_billing' ) ?>',
384
+ security : '<?php echo $fs->get_ajax_security( 'update_billing' ) ?>',
385
+ module_id: '<?php echo $fs->get_id() ?>',
386
+ billing : billing
387
+ },
388
+ success: function (resultObj) {
389
+ if (resultObj.success) {
390
+ setPrevValues();
391
+ } else {
392
+ alert(resultObj.error);
393
+ }
394
+ }
395
+ });
396
+ }
397
+ });
398
+
399
+ $billingInputs
400
+ // Get into edit mode upon selection.
401
+ .focus(function () {
402
+ var isEditMode = !$billingAddress.hasClass('fs-read-mode');
403
+
404
+ if (isEditMode) {
405
+ return;
406
+ }
407
+
408
+ $billingAddress.toggleClass('fs-read-mode');
409
+ $billingAddress.find('.button')
410
+ .html('<?php echo esc_js( $update_text ) ?>')
411
+ .toggleClass('button-primary');
412
+ })
413
+ // If blured after editing only one field without changes, exit edit mode.
414
+ .blur(function () {
415
+ if (!isEditAllFieldsMode && !hasBillingChanged()) {
416
+ $billingAddress.toggleClass('fs-read-mode');
417
+ $billingAddress.find('.button')
418
+ .html('<?php echo esc_js( $edit_text ) ?>')
419
+ .toggleClass('button-primary');
420
+ }
421
+ });
422
+ })(jQuery);
423
  </script>
freemius/templates/account/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/templates/account/partials/activate-license-button.php CHANGED
@@ -1,54 +1,54 @@
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 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- * @var FS_Plugin_License $available_license
17
- * @var string $slug
18
- */
19
- $fs = $VARS['freemius'];
20
- $available_license = $VARS['license'];
21
- $premium_plan = $VARS['plan'];
22
- $slug = $VARS['slug'];
23
-
24
- $blog_id = ! empty( $VARS['blog_id'] ) && is_numeric( $VARS['blog_id'] ) ?
25
- $VARS['blog_id'] :
26
- '';
27
- $install_id = ! empty( $VARS['install_id'] ) && FS_Site::is_valid_id( $VARS['install_id'] ) ?
28
- $VARS['install_id'] :
29
- '';
30
-
31
- $activate_plan_text = fs_text_inline( 'Activate %s Plan', 'activate-x-plan', $slug );
32
-
33
- $action = 'activate_license';
34
- ?>
35
- <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
36
- <input type="hidden" name="fs_action" value="<?php echo $action ?>">
37
- <?php wp_nonce_field( trim("{$action}:{$blog_id}:{$install_id}", ':') ) ?>
38
- <input type="hidden" name="install_id" value="<?php echo $install_id ?>">
39
- <input type="hidden" name="blog_id" value="<?php echo $blog_id ?>">
40
- <input type="hidden" name="license_id" value="<?php echo $available_license->id ?>">
41
- <input type="submit" class="fs-activate-license button<?php echo ! empty( $VARS['class'] ) ? ' ' . $VARS['class'] : '' ?>"
42
- value="<?php echo esc_attr( sprintf(
43
- $activate_plan_text . '%s',
44
- $premium_plan->title,
45
- ( $VARS['is_localhost'] && $available_license->is_free_localhost ) ?
46
- ' [' . fs_text_inline( 'Localhost', 'localhost', $slug ) . ']' :
47
- ( $available_license->is_single_site() ?
48
- '' :
49
- ' [' . ( 1 < $available_license->left() ?
50
- sprintf( fs_text_x_inline( '%s left', 'as 5 licenses left', 'x-left', $slug ), $available_license->left() ) :
51
- strtolower( fs_text_inline( 'Last license', 'last-license', $slug ) ) ) . ']'
52
- )
53
- ) ) ?> ">
54
  </form>
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 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ * @var FS_Plugin_License $available_license
17
+ * @var string $slug
18
+ */
19
+ $fs = $VARS['freemius'];
20
+ $available_license = $VARS['license'];
21
+ $premium_plan = $VARS['plan'];
22
+ $slug = $VARS['slug'];
23
+
24
+ $blog_id = ! empty( $VARS['blog_id'] ) && is_numeric( $VARS['blog_id'] ) ?
25
+ $VARS['blog_id'] :
26
+ '';
27
+ $install_id = ! empty( $VARS['install_id'] ) && FS_Site::is_valid_id( $VARS['install_id'] ) ?
28
+ $VARS['install_id'] :
29
+ '';
30
+
31
+ $activate_plan_text = fs_text_inline( 'Activate %s Plan', 'activate-x-plan', $slug );
32
+
33
+ $action = 'activate_license';
34
+ ?>
35
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
36
+ <input type="hidden" name="fs_action" value="<?php echo $action ?>">
37
+ <?php wp_nonce_field( trim("{$action}:{$blog_id}:{$install_id}", ':') ) ?>
38
+ <input type="hidden" name="install_id" value="<?php echo $install_id ?>">
39
+ <input type="hidden" name="blog_id" value="<?php echo $blog_id ?>">
40
+ <input type="hidden" name="license_id" value="<?php echo $available_license->id ?>">
41
+ <input type="submit" class="fs-activate-license button<?php echo ! empty( $VARS['class'] ) ? ' ' . $VARS['class'] : '' ?>"
42
+ value="<?php echo esc_attr( sprintf(
43
+ $activate_plan_text . '%s',
44
+ $premium_plan->title,
45
+ ( $VARS['is_localhost'] && $available_license->is_free_localhost ) ?
46
+ ' [' . fs_text_inline( 'Localhost', 'localhost', $slug ) . ']' :
47
+ ( $available_license->is_single_site() ?
48
+ '' :
49
+ ' [' . ( 1 < $available_license->left() ?
50
+ sprintf( fs_text_x_inline( '%s left', 'as 5 licenses left', 'x-left', $slug ), $available_license->left() ) :
51
+ strtolower( fs_text_inline( 'Last license', 'last-license', $slug ) ) ) . ']'
52
+ )
53
+ ) ) ?> ">
54
  </form>
freemius/templates/account/partials/deactivate-license-button.php CHANGED
@@ -1,36 +1,36 @@
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 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- * @var string $slug
17
- */
18
- $slug = $VARS['slug'];
19
- $fs = $VARS['freemius'];
20
-
21
- $blog_id = ! empty( $VARS['blog_id'] ) && is_numeric( $VARS['blog_id'] ) ?
22
- $VARS['blog_id'] :
23
- '';
24
- $install_id = ! empty( $VARS['install_id'] ) && FS_Site::is_valid_id( $VARS['install_id'] ) ?
25
- $VARS['install_id'] :
26
- '';
27
-
28
- $action = 'deactivate_license';
29
- ?>
30
- <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
31
- <input type="hidden" name="fs_action" value="<?php echo $action ?>">
32
- <?php wp_nonce_field( trim("{$action}:{$blog_id}:{$install_id}", ':') ) ?>
33
- <input type="hidden" name="install_id" value="<?php echo $install_id ?>">
34
- <input type="hidden" name="blog_id" value="<?php echo $blog_id ?>">
35
- <button type="button" class="fs-deactivate-license button<?php echo ! empty( $VARS['class'] ) ? ' ' . $VARS['class'] : '' ?>"><?php fs_echo_inline( 'Deactivate License', 'deactivate-license', $slug ) ?></button>
36
  </form>
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 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ * @var string $slug
17
+ */
18
+ $slug = $VARS['slug'];
19
+ $fs = $VARS['freemius'];
20
+
21
+ $blog_id = ! empty( $VARS['blog_id'] ) && is_numeric( $VARS['blog_id'] ) ?
22
+ $VARS['blog_id'] :
23
+ '';
24
+ $install_id = ! empty( $VARS['install_id'] ) && FS_Site::is_valid_id( $VARS['install_id'] ) ?
25
+ $VARS['install_id'] :
26
+ '';
27
+
28
+ $action = 'deactivate_license';
29
+ ?>
30
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
31
+ <input type="hidden" name="fs_action" value="<?php echo $action ?>">
32
+ <?php wp_nonce_field( trim("{$action}:{$blog_id}:{$install_id}", ':') ) ?>
33
+ <input type="hidden" name="install_id" value="<?php echo $install_id ?>">
34
+ <input type="hidden" name="blog_id" value="<?php echo $blog_id ?>">
35
+ <button type="button" class="fs-deactivate-license button<?php echo ! empty( $VARS['class'] ) ? ' ' . $VARS['class'] : '' ?>"><?php fs_echo_inline( 'Deactivate License', 'deactivate-license', $slug ) ?></button>
36
  </form>
freemius/templates/account/partials/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/templates/account/payments.php CHANGED
@@ -1,59 +1,59 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- */
17
- $fs = freemius( $VARS['id'] );
18
-
19
- $slug = $fs->get_slug();
20
-
21
- $payments = $fs->_fetch_payments();
22
-
23
- $show_payments = ( is_array( $payments ) && 0 < count( $payments ) );
24
-
25
- if ( $show_payments ) :
26
- ?>
27
- <div class="postbox">
28
- <div id="fs_payments">
29
- <h3><span class="dashicons dashicons-paperclip"></span> <?php fs_esc_html_echo_inline( 'Payments', 'payments', $slug ) ?></h3>
30
-
31
- <div class="inside">
32
- <table class="widefat">
33
- <thead>
34
- <tr>
35
- <th><?php fs_esc_html_echo_inline( 'ID', 'id', $slug ) ?></th>
36
- <th><?php fs_esc_html_echo_inline( 'Date', 'date', $slug ) ?></th>
37
- <th><?php fs_esc_html_echo_inline( 'Amount', 'amount', $slug ) ?></th>
38
- <th><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></th>
39
- </tr>
40
- </thead>
41
- <tbody>
42
- <?php $odd = true ?>
43
- <?php foreach ( $payments as $payment ) : ?>
44
- <tr<?php echo $odd ? ' class="alternate"' : '' ?>>
45
- <td><?php echo $payment->id ?></td>
46
- <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
47
- <td><?php echo $payment->formatted_gross() ?></td>
48
- <td><?php if (! $payment->is_migrated() ) : ?><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>"
49
- class="button button-small"
50
- target="_blank" rel="noopener"><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></a><?php endif ?></td>
51
- </tr>
52
- <?php $odd = ! $odd; endforeach ?>
53
- </tbody>
54
- </table>
55
- </div>
56
- </div>
57
- </div>
58
- <?php
59
  endif;
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ */
17
+ $fs = freemius( $VARS['id'] );
18
+
19
+ $slug = $fs->get_slug();
20
+
21
+ $payments = $fs->_fetch_payments();
22
+
23
+ $show_payments = ( is_array( $payments ) && 0 < count( $payments ) );
24
+
25
+ if ( $show_payments ) :
26
+ ?>
27
+ <div class="postbox">
28
+ <div id="fs_payments">
29
+ <h3><span class="dashicons dashicons-paperclip"></span> <?php fs_esc_html_echo_inline( 'Payments', 'payments', $slug ) ?></h3>
30
+
31
+ <div class="inside">
32
+ <table class="widefat">
33
+ <thead>
34
+ <tr>
35
+ <th><?php fs_esc_html_echo_inline( 'ID', 'id', $slug ) ?></th>
36
+ <th><?php fs_esc_html_echo_inline( 'Date', 'date', $slug ) ?></th>
37
+ <th><?php fs_esc_html_echo_inline( 'Amount', 'amount', $slug ) ?></th>
38
+ <th><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <?php $odd = true ?>
43
+ <?php foreach ( $payments as $payment ) : ?>
44
+ <tr<?php echo $odd ? ' class="alternate"' : '' ?>>
45
+ <td><?php echo $payment->id ?></td>
46
+ <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
47
+ <td><?php echo $payment->formatted_gross() ?></td>
48
+ <td><?php if (! $payment->is_migrated() ) : ?><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>"
49
+ class="button button-small"
50
+ target="_blank" rel="noopener"><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></a><?php endif ?></td>
51
+ </tr>
52
+ <?php $odd = ! $odd; endforeach ?>
53
+ </tbody>
54
+ </table>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ <?php
59
  endif;
freemius/templates/add-trial-to-pricing.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Add "&trial=true" to pricing menu item href when running in trial
4
- * promotion context.
5
- *
6
- * @package Freemius
7
- * @copyright Copyright (c) 2016, Freemius, Inc.
8
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
9
- * @since 1.2.1.5
10
- */
11
-
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- /**
17
- * @var Freemius $fs
18
- */
19
- $fs = freemius( $VARS['id'] );
20
- ?>
21
- <script type="text/javascript">
22
- (function ($) {
23
- $(document).ready(function () {
24
- var $pricingMenu = $('.fs-submenu-item.<?php echo $fs->get_unique_affix() ?>.pricing'),
25
- $pricingMenuLink = $pricingMenu.parents('a');
26
-
27
- // Add trial querystring param.
28
- $pricingMenuLink.attr('href', $pricingMenuLink.attr('href') + '&trial=true');
29
- });
30
- })(jQuery);
31
  </script>
1
+ <?php
2
+ /**
3
+ * Add "&trial=true" to pricing menu item href when running in trial
4
+ * promotion context.
5
+ *
6
+ * @package Freemius
7
+ * @copyright Copyright (c) 2016, Freemius, Inc.
8
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
9
+ * @since 1.2.1.5
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ /**
17
+ * @var Freemius $fs
18
+ */
19
+ $fs = freemius( $VARS['id'] );
20
+ ?>
21
+ <script type="text/javascript">
22
+ (function ($) {
23
+ $(document).ready(function () {
24
+ var $pricingMenu = $('.fs-submenu-item.<?php echo $fs->get_unique_affix() ?>.pricing'),
25
+ $pricingMenuLink = $pricingMenu.parents('a');
26
+
27
+ // Add trial querystring param.
28
+ $pricingMenuLink.attr('href', $pricingMenuLink.attr('href') + '&trial=true');
29
+ });
30
+ })(jQuery);
31
  </script>
freemius/templates/admin-notice.php CHANGED
@@ -1,76 +1,76 @@
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
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- $dismiss_text = fs_text_x_inline( 'Dismiss', 'as close a window', 'dismiss' );
14
-
15
- $slug = '';
16
- $type = '';
17
-
18
- if ( ! empty( $VARS['manager_id'] ) ) {
19
- /**
20
- * @var array $VARS
21
- */
22
- $slug = $VARS['manager_id'];
23
-
24
- $type = WP_FS__MODULE_TYPE_PLUGIN;
25
-
26
- if ( false !== strpos( $slug, ':' ) ) {
27
- $parts = explode( ':', $slug );
28
-
29
- $slug = $parts[0];
30
-
31
- $parts_count = count( $parts );
32
-
33
- if ( 1 < $parts_count && WP_FS__MODULE_TYPE_THEME == $parts[1] ) {
34
- $type = $parts[1];
35
- }
36
- }
37
- }
38
- ?>
39
- <div<?php if ( ! empty( $VARS['id'] ) ) : ?> data-id="<?php echo $VARS['id'] ?>"<?php endif ?><?php if ( ! empty( $VARS['manager_id'] ) ) : ?> data-manager-id="<?php echo $VARS['manager_id'] ?>"<?php endif ?><?php if ( ! empty( $slug ) ) : ?> data-slug="<?php echo $slug ?>"<?php endif ?><?php if ( ! empty( $type ) ) : ?> data-type="<?php echo $type ?>"<?php endif ?>
40
- class="<?php
41
- switch ( $VARS['type'] ) {
42
- case 'error':
43
- echo 'error form-invalid';
44
- break;
45
- case 'promotion':
46
- echo 'updated promotion';
47
- break;
48
- case 'update':
49
- // echo 'update-nag update';
50
- // break;
51
- case 'success':
52
- default:
53
- echo 'updated success';
54
- break;
55
- }
56
- ?> fs-notice<?php if ( ! empty( $VARS['sticky'] ) ) {
57
- echo ' fs-sticky';
58
- } ?><?php if ( ! empty( $VARS['plugin'] ) ) {
59
- echo ' fs-has-title';
60
- } ?><?php if ( ! empty( $slug ) ) {
61
- echo " fs-slug-{$slug}";
62
- } ?><?php if ( ! empty( $type ) ) {
63
- echo " fs-type-{$type}";
64
- } ?>"><?php if ( ! empty( $VARS['plugin'] ) ) : ?>
65
- <label class="fs-plugin-title"><?php echo $VARS['plugin'] ?></label>
66
- <?php endif ?>
67
- <?php if ( ! empty( $VARS['sticky'] ) ) : ?>
68
- <div class="fs-close"><i class="dashicons dashicons-no"
69
- title="<?php echo esc_attr( $dismiss_text ) ?>"></i> <span><?php echo esc_html( $dismiss_text ) ?></span>
70
- </div>
71
- <?php endif ?>
72
- <div class="fs-notice-body">
73
- <?php if ( ! empty( $VARS['title'] ) ) : ?><b><?php echo $VARS['title'] ?></b> <?php endif ?>
74
- <?php echo $VARS['message'] ?>
75
- </div>
76
- </div>
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
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ $dismiss_text = fs_text_x_inline( 'Dismiss', 'as close a window', 'dismiss' );
14
+
15
+ $slug = '';
16
+ $type = '';
17
+
18
+ if ( ! empty( $VARS['manager_id'] ) ) {
19
+ /**
20
+ * @var array $VARS
21
+ */
22
+ $slug = $VARS['manager_id'];
23
+
24
+ $type = WP_FS__MODULE_TYPE_PLUGIN;
25
+
26
+ if ( false !== strpos( $slug, ':' ) ) {
27
+ $parts = explode( ':', $slug );
28
+
29
+ $slug = $parts[0];
30
+
31
+ $parts_count = count( $parts );
32
+
33
+ if ( 1 < $parts_count && WP_FS__MODULE_TYPE_THEME == $parts[1] ) {
34
+ $type = $parts[1];
35
+ }
36
+ }
37
+ }
38
+ ?>
39
+ <div<?php if ( ! empty( $VARS['id'] ) ) : ?> data-id="<?php echo $VARS['id'] ?>"<?php endif ?><?php if ( ! empty( $VARS['manager_id'] ) ) : ?> data-manager-id="<?php echo $VARS['manager_id'] ?>"<?php endif ?><?php if ( ! empty( $slug ) ) : ?> data-slug="<?php echo $slug ?>"<?php endif ?><?php if ( ! empty( $type ) ) : ?> data-type="<?php echo $type ?>"<?php endif ?>
40
+ class="<?php
41
+ switch ( $VARS['type'] ) {
42
+ case 'error':
43
+ echo 'error form-invalid';
44
+ break;
45
+ case 'promotion':
46
+ echo 'updated promotion';
47
+ break;
48
+ case 'update':
49
+ // echo 'update-nag update';
50
+ // break;
51
+ case 'success':
52
+ default:
53
+ echo 'updated success';
54
+ break;
55
+ }
56
+ ?> fs-notice<?php if ( ! empty( $VARS['sticky'] ) ) {
57
+ echo ' fs-sticky';
58
+ } ?><?php if ( ! empty( $VARS['plugin'] ) ) {
59
+ echo ' fs-has-title';
60
+ } ?><?php if ( ! empty( $slug ) ) {
61
+ echo " fs-slug-{$slug}";
62
+ } ?><?php if ( ! empty( $type ) ) {
63
+ echo " fs-type-{$type}";
64
+ } ?>"><?php if ( ! empty( $VARS['plugin'] ) ) : ?>
65
+ <label class="fs-plugin-title"><?php echo $VARS['plugin'] ?></label>
66
+ <?php endif ?>
67
+ <?php if ( ! empty( $VARS['sticky'] ) ) : ?>
68
+ <div class="fs-close"><i class="dashicons dashicons-no"
69
+ title="<?php echo esc_attr( $dismiss_text ) ?>"></i> <span><?php echo esc_html( $dismiss_text ) ?></span>
70
+ </div>
71
+ <?php endif ?>
72
+ <div class="fs-notice-body">
73
+ <?php if ( ! empty( $VARS['title'] ) ) : ?><b><?php echo $VARS['title'] ?></b> <?php endif ?>
74
+ <?php echo $VARS['message'] ?>
75
+ </div>
76
+ </div>
freemius/templates/auto-installation.php CHANGED
@@ -1,249 +1,249 @@
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.2.1.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- */
17
- $slug = $VARS['slug'];
18
- $plugin_id = $VARS['target_module_id'];
19
-
20
- $fs = freemius( $VARS['id'] );
21
-
22
- $action = $fs->is_tracking_allowed() ?
23
- 'stop_tracking' :
24
- 'allow_tracking';
25
-
26
- $title = $fs->get_plugin_title();
27
-
28
- if ( $plugin_id != $fs->get_id() ) {
29
- $addon = $fs->get_addon( $plugin_id );
30
-
31
- if ( is_object( $addon ) ) {
32
- $title = $addon->title . ' ' . fs_text_inline( 'Add-On', 'addon', $slug );
33
- }
34
- }
35
-
36
- $plugin_title = sprintf(
37
- '<strong>%s</strong>',
38
- esc_html( $title )
39
- );
40
-
41
- $sec_countdown = 30;
42
- $countdown_html = sprintf(
43
- esc_js(
44
- /* translators: %s: Number of seconds */
45
- fs_text_inline( '%s sec', 'x-sec', $slug )
46
- ),
47
- sprintf( '<span class="fs-countdown">%s</span>', $sec_countdown )
48
- );
49
-
50
- fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
51
- fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
52
-
53
- $params = array();
54
- $loader_html = fs_get_template( 'ajax-loader.php', $params );
55
-
56
- // Pass unique auto installation URL if WP_Filesystem is needed.
57
- $install_url = $fs->_get_sync_license_url(
58
- $plugin_id,
59
- true,
60
- array( 'auto_install' => 'true' )
61
- );
62
-
63
-
64
- ob_start();
65
-
66
- $method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
67
-
68
- $credentials = request_filesystem_credentials(
69
- esc_url_raw( $install_url ),
70
- $method,
71
- false,
72
- WP_PLUGIN_DIR,
73
- array()
74
- );
75
-
76
- $credentials_form = ob_get_clean();
77
-
78
- $require_credentials = ! empty( $credentials_form );
79
- ?>
80
- <div class="fs-modal fs-modal-auto-install">
81
- <div class="fs-modal-dialog">
82
- <div class="fs-modal-header">
83
- <h4><?php echo esc_js( fs_text_inline( 'Automatic Installation', 'auto-installation', $slug ) ) ?></h4>
84
- </div>
85
- <div class="fs-modal-body">
86
- <div class="fs-notice-error" style="display: none"><p></p></div>
87
- <?php if ( $require_credentials ) : ?>
88
- <div id="request-filesystem-credentials-dialog">
89
- <?php echo $credentials_form ?>
90
- </div>
91
- <?php else : ?>
92
- <p class="fs-installation-notice"><?php echo sprintf(
93
- fs_esc_html_inline( 'An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now.', 'installing-in-n', $slug ),
94
- $plugin_title,
95
- sprintf(
96
- '<a href="%s" target="_blank" rel="noopener">%s</a>',
97
- 'https://freemius.com',
98
- 'freemius.com'
99
- ),
100
- $countdown_html
101
- ) ?></p>
102
- <?php endif ?>
103
- <p class="fs-installing"
104
- style="display: none"><?php echo sprintf( fs_esc_html_inline( 'The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page.', 'installing-module-x', $slug ), $plugin_title ) ?></p>
105
- </div>
106
- <div class="fs-modal-footer">
107
- <?php echo $loader_html ?>
108
- <button
109
- class="button button-secondary button-cancel"><?php fs_esc_html_echo_inline( 'Cancel Installation', 'cancel-installation', $slug ) ?><?php if ( ! $require_credentials ) : ?> (<?php echo $countdown_html ?>)<?php endif ?></button>
110
- <button
111
- class="button button-primary"><?php fs_esc_html_echo_inline( 'Install Now', 'install-now', $slug ) ?></button>
112
- </div>
113
- </div>
114
- </div>'
115
-
116
- <script type="text/javascript">
117
- (function ($) {
118
- $(document).ready(function () {
119
- var $modal = $('.fs-modal-auto-install'),
120
- $body = $('body'),
121
- $countdown = $modal.find('.fs-countdown'),
122
- requireCredentials = <?php echo json_encode( $require_credentials ) ?>,
123
- $credentialsForm = $('#request-filesystem-credentials-dialog'),
124
- $errorNotice = $modal.find('.fs-notice-error'),
125
- installing = false;
126
-
127
- $modal.appendTo($body);
128
-
129
- var startAutoInstall = function () {
130
- if (installing)
131
- return;
132
-
133
- installing = true;
134
-
135
- // Start auto-install.
136
- $modal.addClass('fs-warn');
137
- if (requireCredentials) {
138
- $credentialsForm.hide();
139
- } else {
140
- $modal.find('.fs-installation-notice').hide();
141
- }
142
-
143
- $errorNotice.hide();
144
- $modal.find('.fs-installing').show();
145
- $modal.find('button').hide();
146
- $modal.find('.fs-ajax-loader').show();
147
-
148
- var data = {
149
- action : '<?php echo $fs->get_ajax_action( 'install_premium_version' ) ?>',
150
- security : '<?php echo $fs->get_ajax_security( 'install_premium_version' ) ?>',
151
- slug : '<?php echo $slug ?>',
152
- module_id : '<?php echo $fs->get_id() ?>',
153
- target_module_id: '<?php echo $plugin_id ?>'
154
- };
155
-
156
- if (requireCredentials) {
157
- // Add filesystem credentials.
158
- data.hostname = $('#hostname').val();
159
- data.username = $('#username').val();
160
- data.password = $('#password').val();
161
- data.connection_type = $('input[name="connection_type"]:checked').val();
162
- data.public_key = $('#public_key').val();
163
- data.private_key = $('#private_key').val();
164
- }
165
-
166
- $.ajax({
167
- url : ajaxurl,
168
- method : 'POST',
169
- data : data,
170
- success: function (resultObj) {
171
- var reloadAccount = false;
172
-
173
- if (resultObj.success) {
174
- // Reload account page to show new data.
175
- reloadAccount = true;
176
- } else {
177
- switch (resultObj.error.code) {
178
- case 'invalid_module_id':
179
- case 'premium_installed':
180
- reloadAccount = true;
181
- break;
182
- case 'invalid_license':
183
- case 'premium_version_missing':
184
- case 'unable_to_connect_to_filesystem':
185
- default:
186
- $modal.removeClass('fs-warn');
187
- $modal.find('.fs-installing').hide();
188
- $modal.find('.fs-ajax-loader').hide();
189
- $modal.find('.button-cancel').html(<?php fs_json_encode_echo_inline( 'Cancel Installation', 'cancel-installation', $slug ) ?>);
190
- $modal.find('button').show();
191
-
192
- $errorNotice.find('p').text(resultObj.error.message);
193
- $errorNotice.addClass('notice notice-alt notice-error').show();
194
- if (requireCredentials) {
195
- $credentialsForm.show();
196
- }
197
- break;
198
- }
199
- }
200
-
201
- if (reloadAccount) {
202
- window.location = '<?php echo $fs->get_account_url() ?>';
203
- }
204
-
205
- installing = false;
206
- }
207
- });
208
- };
209
-
210
- var clearCountdown = function () {
211
- clearInterval(countdownInterval);
212
- countdownInterval = null;
213
- };
214
-
215
- var cancelAutoInstall = function () {
216
- $modal.fadeOut(function () {
217
- $modal.remove();
218
- $body.removeClass('has-fs-modal');
219
- });
220
- };
221
-
222
- var countdown = <?php echo $sec_countdown ?>,
223
- countdownInterval = requireCredentials ? null : setInterval(function () {
224
- $countdown.html(--countdown);
225
- if (0 == countdown) {
226
- clearCountdown();
227
- startAutoInstall();
228
- }
229
- }, 1000);
230
-
231
- $modal.addClass('active');
232
- $body.addClass('has-fs-modal');
233
-
234
- $modal.find('.button-primary').click(function () {
235
- clearCountdown();
236
- startAutoInstall();
237
- });
238
-
239
- $modal.find('.button-cancel').click(function () {
240
- clearCountdown();
241
- cancelAutoInstall();
242
- });
243
-
244
- if (requireCredentials) {
245
-
246
- }
247
- });
248
- })(jQuery);
249
- </script>
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.2.1.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ */
17
+ $slug = $VARS['slug'];
18
+ $plugin_id = $VARS['target_module_id'];
19
+
20
+ $fs = freemius( $VARS['id'] );
21
+
22
+ $action = $fs->is_tracking_allowed() ?
23
+ 'stop_tracking' :
24
+ 'allow_tracking';
25
+
26
+ $title = $fs->get_plugin_title();
27
+
28
+ if ( $plugin_id != $fs->get_id() ) {
29
+ $addon = $fs->get_addon( $plugin_id );
30
+
31
+ if ( is_object( $addon ) ) {
32
+ $title = $addon->title . ' ' . fs_text_inline( 'Add-On', 'addon', $slug );
33
+ }
34
+ }
35
+
36
+ $plugin_title = sprintf(
37
+ '<strong>%s</strong>',
38
+ esc_html( $title )
39
+ );
40
+
41
+ $sec_countdown = 30;
42
+ $countdown_html = sprintf(
43
+ esc_js(
44
+ /* translators: %s: Number of seconds */
45
+ fs_text_inline( '%s sec', 'x-sec', $slug )
46
+ ),
47
+ sprintf( '<span class="fs-countdown">%s</span>', $sec_countdown )
48
+ );
49
+
50
+ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
51
+ fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
52
+
53
+ $params = array();
54
+ $loader_html = fs_get_template( 'ajax-loader.php', $params );
55
+
56
+ // Pass unique auto installation URL if WP_Filesystem is needed.
57
+ $install_url = $fs->_get_sync_license_url(
58
+ $plugin_id,
59
+ true,
60
+ array( 'auto_install' => 'true' )
61
+ );
62
+
63
+
64
+ ob_start();
65
+
66
+ $method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
67
+
68
+ $credentials = request_filesystem_credentials(
69
+ esc_url_raw( $install_url ),
70
+ $method,
71
+ false,
72
+ WP_PLUGIN_DIR,
73
+ array()
74
+ );
75
+
76
+ $credentials_form = ob_get_clean();
77
+
78
+ $require_credentials = ! empty( $credentials_form );
79
+ ?>
80
+ <div class="fs-modal fs-modal-auto-install">
81
+ <div class="fs-modal-dialog">
82
+ <div class="fs-modal-header">
83
+ <h4><?php echo esc_js( fs_text_inline( 'Automatic Installation', 'auto-installation', $slug ) ) ?></h4>
84
+ </div>
85
+ <div class="fs-modal-body">
86
+ <div class="fs-notice-error" style="display: none"><p></p></div>
87
+ <?php if ( $require_credentials ) : ?>
88
+ <div id="request-filesystem-credentials-dialog">
89
+ <?php echo $credentials_form ?>
90
+ </div>
91
+ <?php else : ?>
92
+ <p class="fs-installation-notice"><?php echo sprintf(
93
+ fs_esc_html_inline( 'An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now.', 'installing-in-n', $slug ),
94
+ $plugin_title,
95
+ sprintf(
96
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
97
+ 'https://freemius.com',
98
+ 'freemius.com'
99
+ ),
100
+ $countdown_html
101
+ ) ?></p>
102
+ <?php endif ?>
103
+ <p class="fs-installing"
104
+ style="display: none"><?php echo sprintf( fs_esc_html_inline( 'The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page.', 'installing-module-x', $slug ), $plugin_title ) ?></p>
105
+ </div>
106
+ <div class="fs-modal-footer">
107
+ <?php echo $loader_html ?>
108
+ <button
109
+ class="button button-secondary button-cancel"><?php fs_esc_html_echo_inline( 'Cancel Installation', 'cancel-installation', $slug ) ?><?php if ( ! $require_credentials ) : ?> (<?php echo $countdown_html ?>)<?php endif ?></button>
110
+ <button
111
+ class="button button-primary"><?php fs_esc_html_echo_inline( 'Install Now', 'install-now', $slug ) ?></button>
112
+ </div>
113
+ </div>
114
+ </div>'
115
+
116
+ <script type="text/javascript">
117
+ (function ($) {
118
+ $(document).ready(function () {
119
+ var $modal = $('.fs-modal-auto-install'),
120
+ $body = $('body'),
121
+ $countdown = $modal.find('.fs-countdown'),
122
+ requireCredentials = <?php echo json_encode( $require_credentials ) ?>,
123
+ $credentialsForm = $('#request-filesystem-credentials-dialog'),
124
+ $errorNotice = $modal.find('.fs-notice-error'),
125
+ installing = false;
126
+
127
+ $modal.appendTo($body);
128
+
129
+ var startAutoInstall = function () {
130
+ if (installing)
131
+ return;
132
+
133
+ installing = true;
134
+
135
+ // Start auto-install.
136
+ $modal.addClass('fs-warn');
137
+ if (requireCredentials) {
138
+ $credentialsForm.hide();
139
+ } else {
140
+ $modal.find('.fs-installation-notice').hide();
141
+ }
142
+
143
+ $errorNotice.hide();
144
+ $modal.find('.fs-installing').show();
145
+ $modal.find('button').hide();
146
+ $modal.find('.fs-ajax-loader').show();
147
+
148
+ var data = {
149
+ action : '<?php echo $fs->get_ajax_action( 'install_premium_version' ) ?>',
150
+ security : '<?php echo $fs->get_ajax_security( 'install_premium_version' ) ?>',
151
+ slug : '<?php echo $slug ?>',
152
+ module_id : '<?php echo $fs->get_id() ?>',
153
+ target_module_id: '<?php echo $plugin_id ?>'
154
+ };
155
+
156
+ if (requireCredentials) {
157
+ // Add filesystem credentials.
158
+ data.hostname = $('#hostname').val();
159
+ data.username = $('#username').val();
160
+ data.password = $('#password').val();
161
+ data.connection_type = $('input[name="connection_type"]:checked').val();
162
+ data.public_key = $('#public_key').val();
163
+ data.private_key = $('#private_key').val();
164
+ }
165
+
166
+ $.ajax({
167
+ url : ajaxurl,
168
+ method : 'POST',
169
+ data : data,
170
+ success: function (resultObj) {
171
+ var reloadAccount = false;
172
+
173
+ if (resultObj.success) {
174
+ // Reload account page to show new data.
175
+ reloadAccount = true;
176
+ } else {
177
+ switch (resultObj.error.code) {
178
+ case 'invalid_module_id':
179
+ case 'premium_installed':
180
+ reloadAccount = true;
181
+ break;
182
+ case 'invalid_license':
183
+ case 'premium_version_missing':
184
+ case 'unable_to_connect_to_filesystem':
185
+ default:
186
+ $modal.removeClass('fs-warn');
187
+ $modal.find('.fs-installing').hide();
188
+ $modal.find('.fs-ajax-loader').hide();
189
+ $modal.find('.button-cancel').html(<?php fs_json_encode_echo_inline( 'Cancel Installation', 'cancel-installation', $slug ) ?>);
190
+ $modal.find('button').show();
191
+
192
+ $errorNotice.find('p').text(resultObj.error.message);
193
+ $errorNotice.addClass('notice notice-alt notice-error').show();
194
+ if (requireCredentials) {
195
+ $credentialsForm.show();
196
+ }
197
+ break;
198
+ }
199
+ }
200
+
201
+ if (reloadAccount) {
202
+ window.location = '<?php echo $fs->get_account_url() ?>';
203
+ }
204
+
205
+ installing = false;
206
+ }
207
+ });
208
+ };
209
+
210
+ var clearCountdown = function () {
211
+ clearInterval(countdownInterval);
212
+ countdownInterval = null;
213
+ };
214
+
215
+ var cancelAutoInstall = function () {
216
+ $modal.fadeOut(function () {
217
+ $modal.remove();
218
+ $body.removeClass('has-fs-modal');
219
+ });
220
+ };
221
+
222
+ var countdown = <?php echo $sec_countdown ?>,
223
+ countdownInterval = requireCredentials ? null : setInterval(function () {
224
+ $countdown.html(--countdown);
225
+ if (0 == countdown) {
226
+ clearCountdown();
227
+ startAutoInstall();
228
+ }
229
+ }, 1000);
230
+
231
+ $modal.addClass('active');
232
+ $body.addClass('has-fs-modal');
233
+
234
+ $modal.find('.button-primary').click(function () {
235
+ clearCountdown();
236
+ startAutoInstall();
237
+ });
238
+
239
+ $modal.find('.button-cancel').click(function () {
240
+ clearCountdown();
241
+ cancelAutoInstall();
242
+ });
243
+
244
+ if (requireCredentials) {
245
+
246
+ }
247
+ });
248
+ })(jQuery);
249
+ </script>
freemius/templates/checkout.php CHANGED
@@ -1,337 +1,337 @@
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
-
9
- /**
10
- * Note for WordPress.org Theme/Plugin reviewer:
11
- * Freemius is an SDK for plugin and theme developers. Since the core
12
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
- * we only develop and maintain one code base.
14
- *
15
- * This code (and page) will not run for wp.org themes (only plugins).
16
- *
17
- * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
- * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
- *
20
- * UPDATE:
21
- * After ongoing conversations with the WordPress.org TRT we received
22
- * an official approval for including i-frames in the theme's WP Admin setting's
23
- * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
- * were never against the guidelines, but we wanted to get the team's blessings
25
- * before we move forward. For the record, I got the final approval from
26
- * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
- * Europe 2017 (June 16th, 2017).
28
- *
29
- * If you have any questions or need clarifications, please don't hesitate
30
- * pinging me on slack, my username is @svovaf.
31
- *
32
- * @author Vova Feldman (@svovaf)
33
- * @since 1.2.2
34
- */
35
-
36
- if ( ! defined( 'ABSPATH' ) ) {
37
- exit;
38
- }
39
-
40
- wp_enqueue_script( 'jquery' );
41
- wp_enqueue_script( 'json2' );
42
- fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
- fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
- fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
45
-
46
- fs_enqueue_local_style( 'fs_checkout', '/admin/checkout.css' );
47
-
48
- /**
49
- * @var array $VARS
50
- * @var Freemius $fs
51
- */
52
- $fs = freemius( $VARS['id'] );
53
- $slug = $fs->get_slug();
54
-
55
- $timestamp = time();
56
-
57
- $context_params = array(
58
- 'plugin_id' => $fs->get_id(),
59
- 'public_key' => $fs->get_public_key(),
60
- 'plugin_version' => $fs->get_plugin_version(),
61
- 'mode' => 'dashboard',
62
- 'trial' => fs_request_get_bool( 'trial' ),
63
- );
64
-
65
- $plan_id = fs_request_get( 'plan_id' );
66
- if ( FS_Plugin_Plan::is_valid_id( $plan_id ) ) {
67
- $context_params['plan_id'] = $plan_id;
68
- }
69
-
70
- $licenses = fs_request_get( 'licenses' );
71
- if ( $licenses === strval( intval( $licenses ) ) && $licenses > 0 ) {
72
- $context_params['licenses'] = $licenses;
73
- }
74
-
75
- $plugin_id = fs_request_get( 'plugin_id' );
76
- if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
77
- $plugin_id = $fs->get_id();
78
- }
79
-
80
- if ( $plugin_id == $fs->get_id() ) {
81
- $is_premium = $fs->is_premium();
82
-
83
- $bundle_id = $fs->get_bundle_id();
84
- if ( ! is_null( $bundle_id ) ) {
85
- $context_params['bundle_id'] = $bundle_id;
86
- }
87
- } else {
88
- // Identify the module code version of the checkout context module.
89
- if ( $fs->is_addon_activated( $plugin_id ) ) {
90
- $fs_addon = Freemius::get_instance_by_id( $plugin_id );
91
- $is_premium = $fs_addon->is_premium();
92
- } else {
93
- // If add-on isn't activated assume the premium version isn't installed.
94
- $is_premium = false;
95
- }
96
- }
97
-
98
- // Get site context secure params.
99
- if ( $fs->is_registered() ) {
100
- $site = $fs->get_site();
101
-
102
- if ( $plugin_id != $fs->get_id() ) {
103
- if ( $fs->is_addon_activated( $plugin_id ) ) {
104
- $fs_addon = Freemius::get_instance_by_id( $plugin_id );
105
- $addon_site = $fs_addon->get_site();
106
- if ( is_object( $addon_site ) ) {
107
- $site = $addon_site;
108
- }
109
- }
110
- }
111
-
112
- $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
113
- $site,
114
- $timestamp,
115
- 'checkout'
116
- ) );
117
- } else {
118
- $current_user = Freemius::_get_current_wp_user();
119
-
120
- // Add site and user info to the request, this information
121
- // is NOT being stored unless the user complete the purchase
122
- // and agrees to the TOS.
123
- $context_params = array_merge( $context_params, array(
124
- 'user_firstname' => $current_user->user_firstname,
125
- 'user_lastname' => $current_user->user_lastname,
126
- 'user_email' => $current_user->user_email,
127
- 'home_url' => home_url(),
128
- ) );
129
-
130
- $fs_user = Freemius::_get_user_by_email( $current_user->user_email );
131
-
132
- if ( is_object( $fs_user ) && $fs_user->is_verified() ) {
133
- $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
134
- $fs_user,
135
- $timestamp,
136
- 'checkout'
137
- ) );
138
- }
139
- }
140
-
141
- if ( $fs->is_payments_sandbox() ) {
142
- // Append plugin secure token for sandbox mode authentication.
143
- $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
144
- $fs->get_plugin(),
145
- $timestamp,
146
- 'checkout'
147
- );
148
-
149
- /**
150
- * @since 1.1.7.3 Add security timestamp for sandbox even for anonymous user.
151
- */
152
- if ( empty( $context_params['s_ctx_ts'] ) ) {
153
- $context_params['s_ctx_ts'] = $timestamp;
154
- }
155
- }
156
-
157
- $return_url = $fs->_get_sync_license_url( $plugin_id );
158
-
159
- $can_user_install = (
160
- ( $fs->is_plugin() && current_user_can( 'install_plugins' ) ) ||
161
- ( $fs->is_theme() && current_user_can( 'install_themes' ) )
162
- );
163
-
164
- $query_params = array_merge( $context_params, $_GET, array(
165
- // Current plugin version.
166
- 'plugin_version' => $fs->get_plugin_version(),
167
- 'sdk_version' => WP_FS__SDK_VERSION,
168
- 'is_premium' => $is_premium ? 'true' : 'false',
169
- 'can_install' => $can_user_install ? 'true' : 'false',
170
- 'return_url' => $return_url,
171
- ) );
172
-
173
- $xdebug_session = fs_request_get( 'XDEBUG_SESSION' );
174
- if ( false !== $xdebug_session ) {
175
- $query_params['XDEBUG_SESSION'] = $xdebug_session;
176
- }
177
-
178
- $view_params = array(
179
- 'id' => $VARS['id'],
180
- 'page' => strtolower( $fs->get_text_inline( 'Checkout', 'checkout' ) ) . ' ' . $fs->get_text_inline( 'PCI compliant', 'pci-compliant' ),
181
- );
182
- fs_require_once_template('secure-https-header.php', $view_params);
183
- ?>
184
- <div id="fs_checkout" class="wrap fs-section fs-full-size-wrapper">
185
- <div id="fs_frame"></div>
186
- <script type="text/javascript">
187
- // http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
188
- jQuery(function ($) {
189
- $.extend({
190
- form: function (url, data, method) {
191
- if (method == null) method = 'POST';
192
- if (data == null) data = {};
193
-
194
- var form = $('<form>').attr({
195
- method: method,
196
- action: url
197
- }).css({
198
- display: 'none'
199
- });
200
-
201
- var addData = function (name, data) {
202
- if ($.isArray(data)) {
203
- for (var i = 0; i < data.length; i++) {
204
- var value = data[i];
205
- addData(name + '[]', value);
206
- }
207
- } else if (typeof data === 'object') {
208
- for (var key in data) {
209
- if (data.hasOwnProperty(key)) {
210
- addData(name + '[' + key + ']', data[key]);
211
- }
212
- }
213
- } else if (data != null) {
214
- form.append($('<input>').attr({
215
- type : 'hidden',
216
- name : String(name),
217
- value: String(data)
218
- }));
219
- }
220
- };
221
-
222
- for (var key in data) {
223
- if (data.hasOwnProperty(key)) {
224
- addData(key, data[key]);
225
- }
226
- }
227
-
228
- return form.appendTo('body');
229
- }
230
- });
231
- });
232
-
233
- (function ($) {
234
- $(function () {
235
-
236
- var
237
- // Keep track of the i-frame height.
238
- frame_height = 800,
239
- base_url = '<?php echo FS_CHECKOUT__ADDRESS ?>',
240
- // Pass the parent page URL into the i-frame in a meaningful way (this URL could be
241
- // passed via query string or hard coded into the child page, it depends on your needs).
242
- src = base_url + '/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
243
- // Append the i-frame into the DOM.
244
- frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
245
- .appendTo('#fs_frame');
246
-
247
- FS.PostMessage.init(base_url, [frame[0]]);
248
- FS.PostMessage.receiveOnce('height', function (data) {
249
- var h = data.height;
250
- if (!isNaN(h) && h > 0 && h != frame_height) {
251
- frame_height = h;
252
- frame.height(frame_height + 'px');
253
-
254
- FS.PostMessage.postScroll(frame[0]);
255
- }
256
- });
257
-
258
- FS.PostMessage.receiveOnce('install', function (data) {
259
- var requestData = {
260
- user_id : data.user.id,
261
- user_secret_key : data.user.secret_key,
262
- user_public_key : data.user.public_key,
263
- install_id : data.install.id,
264
- install_secret_key: data.install.secret_key,
265
- install_public_key: data.install.public_key
266
- };
267
-
268
- if (true === data.auto_install)
269
- requestData.auto_install = true;
270
-
271
- // Post data to activation URL.
272
- $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
273
- 'fs_action' => $fs->get_unique_affix() . '_activate_new',
274
- 'plugin_id' => $plugin_id
275
- ) ), $fs->get_unique_affix() . '_activate_new' ) ?>', requestData).submit();
276
- });
277
-
278
- FS.PostMessage.receiveOnce('pending_activation', function (data) {
279
- var requestData = {
280
- user_email: data.user_email
281
- };
282
-
283
- if (true === data.auto_install)
284
- requestData.auto_install = true;
285
-
286
- $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
287
- 'fs_action' => $fs->get_unique_affix() . '_activate_new',
288
- 'plugin_id' => $plugin_id,
289
- 'pending_activation' => true,
290
- ) ), $fs->get_unique_affix() . '_activate_new' ) ?>', requestData).submit();
291
- });
292
-
293
- FS.PostMessage.receiveOnce('get_context', function () {
294
- console.debug('receiveOnce', 'get_context');
295
-
296
- // If the user didn't connect his account with Freemius,
297
- // once he accepts the Terms of Service and Privacy Policy,
298
- // and then click the purchase button, the context information
299
- // of the user will be shared with Freemius in order to complete the
300
- // purchase workflow and activate the license for the right user.
301
- <?php $install_data = array_merge( $fs->get_opt_in_params(),
302
- array(
303
- 'activation_url' => fs_nonce_url( $fs->_get_admin_page_url( '',
304
- array(
305
- 'fs_action' => $fs->get_unique_affix() . '_activate_new',
306
- 'plugin_id' => $plugin_id,
307
-
308
- ) ),
309
- $fs->get_unique_affix() . '_activate_new' )
310
- ) ) ?>
311
- FS.PostMessage.post('context', <?php echo json_encode( $install_data ) ?>, frame[0]);
312
- });
313
-
314
- FS.PostMessage.receiveOnce('purchaseCompleted', <?php echo $fs->apply_filters('checkout/purchaseCompleted', 'function (data) {
315
- console.log("checkout", "purchaseCompleted");
316
- }') ?>);
317
-
318
- FS.PostMessage.receiveOnce('get_dimensions', function (data) {
319
- console.debug('receiveOnce', 'get_dimensions');
320
-
321
- FS.PostMessage.post('dimensions', {
322
- height : $(document.body).height(),
323
- scrollTop: $(document).scrollTop()
324
- }, frame[0]);
325
- });
326
-
327
- var updateHeight = function () {
328
- frame.css('min-height', $(document.body).height() + 'px');
329
- };
330
-
331
- $(document).ready(updateHeight);
332
-
333
- $(window).resize(updateHeight);
334
- });
335
- })(jQuery);
336
- </script>
337
  </div>
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
+
9
+ /**
10
+ * Note for WordPress.org Theme/Plugin reviewer:
11
+ * Freemius is an SDK for plugin and theme developers. Since the core
12
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
+ * we only develop and maintain one code base.
14
+ *
15
+ * This code (and page) will not run for wp.org themes (only plugins).
16
+ *
17
+ * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
+ * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
+ *
20
+ * UPDATE:
21
+ * After ongoing conversations with the WordPress.org TRT we received
22
+ * an official approval for including i-frames in the theme's WP Admin setting's
23
+ * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
+ * were never against the guidelines, but we wanted to get the team's blessings
25
+ * before we move forward. For the record, I got the final approval from
26
+ * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
+ * Europe 2017 (June 16th, 2017).
28
+ *
29
+ * If you have any questions or need clarifications, please don't hesitate
30
+ * pinging me on slack, my username is @svovaf.
31
+ *
32
+ * @author Vova Feldman (@svovaf)
33
+ * @since 1.2.2
34
+ */
35
+
36
+ if ( ! defined( 'ABSPATH' ) ) {
37
+ exit;
38
+ }
39
+
40
+ wp_enqueue_script( 'jquery' );
41
+ wp_enqueue_script( 'json2' );
42
+ fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
+ fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
+ fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
45
+
46
+ fs_enqueue_local_style( 'fs_checkout', '/admin/checkout.css' );
47
+
48
+ /**
49
+ * @var array $VARS
50
+ * @var Freemius $fs
51
+ */
52
+ $fs = freemius( $VARS['id'] );
53
+ $slug = $fs->get_slug();
54
+
55
+ $timestamp = time();
56
+
57
+ $context_params = array(
58
+ 'plugin_id' => $fs->get_id(),
59
+ 'public_key' => $fs->get_public_key(),
60
+ 'plugin_version' => $fs->get_plugin_version(),
61
+ 'mode' => 'dashboard',
62
+ 'trial' => fs_request_get_bool( 'trial' ),
63
+ );
64
+
65
+ $plan_id = fs_request_get( 'plan_id' );
66
+ if ( FS_Plugin_Plan::is_valid_id( $plan_id ) ) {
67
+ $context_params['plan_id'] = $plan_id;
68
+ }
69
+
70
+ $licenses = fs_request_get( 'licenses' );
71
+ if ( $licenses === strval( intval( $licenses ) ) && $licenses > 0 ) {
72
+ $context_params['licenses'] = $licenses;
73
+ }
74
+
75
+ $plugin_id = fs_request_get( 'plugin_id' );
76
+ if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
77
+ $plugin_id = $fs->get_id();
78
+ }
79
+
80
+ if ( $plugin_id == $fs->get_id() ) {
81
+ $is_premium = $fs->is_premium();
82
+
83
+ $bundle_id = $fs->get_bundle_id();
84
+ if ( ! is_null( $bundle_id ) ) {
85
+ $context_params['bundle_id'] = $bundle_id;
86
+ }
87
+ } else {
88
+ // Identify the module code version of the checkout context module.
89
+ if ( $fs->is_addon_activated( $plugin_id ) ) {
90
+ $fs_addon = Freemius::get_instance_by_id( $plugin_id );
91
+ $is_premium = $fs_addon->is_premium();
92
+ } else {
93
+ // If add-on isn't activated assume the premium version isn't installed.
94
+ $is_premium = false;
95
+ }
96
+ }
97
+
98
+ // Get site context secure params.
99
+ if ( $fs->is_registered() ) {
100
+ $site = $fs->get_site();
101
+
102
+ if ( $plugin_id != $fs->get_id() ) {
103
+ if ( $fs->is_addon_activated( $plugin_id ) ) {
104
+ $fs_addon = Freemius::get_instance_by_id( $plugin_id );
105
+ $addon_site = $fs_addon->get_site();
106
+ if ( is_object( $addon_site ) ) {
107
+ $site = $addon_site;
108
+ }
109
+ }
110
+ }
111
+
112
+ $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
113
+ $site,
114
+ $timestamp,
115
+ 'checkout'
116
+ ) );
117
+ } else {
118
+ $current_user = Freemius::_get_current_wp_user();
119
+
120
+ // Add site and user info to the request, this information
121
+ // is NOT being stored unless the user complete the purchase
122
+ // and agrees to the TOS.
123
+ $context_params = array_merge( $context_params, array(
124
+ 'user_firstname' => $current_user->user_firstname,
125
+ 'user_lastname' => $current_user->user_lastname,
126
+ 'user_email' => $current_user->user_email,
127
+ 'home_url' => home_url(),
128
+ ) );
129
+
130
+ $fs_user = Freemius::_get_user_by_email( $current_user->user_email );
131
+
132
+ if ( is_object( $fs_user ) && $fs_user->is_verified() ) {
133
+ $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
134
+ $fs_user,
135
+ $timestamp,
136
+ 'checkout'
137
+ ) );
138
+ }
139
+ }
140
+
141
+ if ( $fs->is_payments_sandbox() ) {
142
+ // Append plugin secure token for sandbox mode authentication.
143
+ $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
144
+ $fs->get_plugin(),
145
+ $timestamp,
146
+ 'checkout'
147
+ );
148
+
149
+ /**
150
+ * @since 1.1.7.3 Add security timestamp for sandbox even for anonymous user.
151
+ */
152
+ if ( empty( $context_params['s_ctx_ts'] ) ) {
153
+ $context_params['s_ctx_ts'] = $timestamp;
154
+ }
155
+ }
156
+
157
+ $return_url = $fs->_get_sync_license_url( $plugin_id );
158
+
159
+ $can_user_install = (
160
+ ( $fs->is_plugin() && current_user_can( 'install_plugins' ) ) ||
161
+ ( $fs->is_theme() && current_user_can( 'install_themes' ) )
162
+ );
163
+
164
+ $query_params = array_merge( $context_params, $_GET, array(
165
+ // Current plugin version.
166
+ 'plugin_version' => $fs->get_plugin_version(),
167
+ 'sdk_version' => WP_FS__SDK_VERSION,
168
+ 'is_premium' => $is_premium ? 'true' : 'false',
169
+ 'can_install' => $can_user_install ? 'true' : 'false',
170
+ 'return_url' => $return_url,
171
+ ) );
172
+
173
+ $xdebug_session = fs_request_get( 'XDEBUG_SESSION' );
174
+ if ( false !== $xdebug_session ) {
175
+ $query_params['XDEBUG_SESSION'] = $xdebug_session;
176
+ }
177
+
178
+ $view_params = array(
179
+ 'id' => $VARS['id'],
180
+ 'page' => strtolower( $fs->get_text_inline( 'Checkout', 'checkout' ) ) . ' ' . $fs->get_text_inline( 'PCI compliant', 'pci-compliant' ),
181
+ );
182
+ fs_require_once_template('secure-https-header.php', $view_params);
183
+ ?>
184
+ <div id="fs_checkout" class="wrap fs-section fs-full-size-wrapper">
185
+ <div id="fs_frame"></div>
186
+ <script type="text/javascript">
187
+ // http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
188
+ jQuery(function ($) {
189
+ $.extend({
190
+ form: function (url, data, method) {
191
+ if (method == null) method = 'POST';
192
+ if (data == null) data = {};
193
+
194
+ var form = $('<form>').attr({
195
+ method: method,
196
+ action: url
197
+ }).css({
198
+ display: 'none'
199
+ });
200
+
201
+ var addData = function (name, data) {
202
+ if ($.isArray(data)) {
203
+ for (var i = 0; i < data.length; i++) {
204
+ var value = data[i];
205
+ addData(name + '[]', value);
206
+ }
207
+ } else if (typeof data === 'object') {
208
+ for (var key in data) {
209
+ if (data.hasOwnProperty(key)) {
210
+ addData(name + '[' + key + ']', data[key]);
211
+ }
212
+ }
213
+ } else if (data != null) {
214
+ form.append($('<input>').attr({
215
+ type : 'hidden',
216
+ name : String(name),
217
+ value: String(data)
218
+ }));
219
+ }
220
+ };
221
+
222
+ for (var key in data) {
223
+ if (data.hasOwnProperty(key)) {
224
+ addData(key, data[key]);
225
+ }
226
+ }
227
+
228
+ return form.appendTo('body');
229
+ }
230
+ });
231
+ });
232
+
233
+ (function ($) {
234
+ $(function () {
235
+
236
+ var
237
+ // Keep track of the i-frame height.
238
+ frame_height = 800,
239
+ base_url = '<?php echo FS_CHECKOUT__ADDRESS ?>',
240
+ // Pass the parent page URL into the i-frame in a meaningful way (this URL could be
241
+ // passed via query string or hard coded into the child page, it depends on your needs).
242
+ src = base_url + '/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
243
+ // Append the i-frame into the DOM.
244
+ frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
245
+ .appendTo('#fs_frame');
246
+
247
+ FS.PostMessage.init(base_url, [frame[0]]);
248
+ FS.PostMessage.receiveOnce('height', function (data) {
249
+ var h = data.height;
250
+ if (!isNaN(h) && h > 0 && h != frame_height) {
251
+ frame_height = h;
252
+ frame.height(frame_height + 'px');
253
+
254
+ FS.PostMessage.postScroll(frame[0]);
255
+ }
256
+ });
257
+
258
+ FS.PostMessage.receiveOnce('install', function (data) {
259
+ var requestData = {
260
+ user_id : data.user.id,
261
+ user_secret_key : data.user.secret_key,
262
+ user_public_key : data.user.public_key,
263
+ install_id : data.install.id,
264
+ install_secret_key: data.install.secret_key,
265
+ install_public_key: data.install.public_key
266
+ };
267
+
268
+ if (true === data.auto_install)
269
+ requestData.auto_install = true;
270
+
271
+ // Post data to activation URL.
272
+ $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
273
+ 'fs_action' => $fs->get_unique_affix() . '_activate_new',
274
+ 'plugin_id' => $plugin_id
275
+ ) ), $fs->get_unique_affix() . '_activate_new' ) ?>', requestData).submit();
276
+ });
277
+
278
+ FS.PostMessage.receiveOnce('pending_activation', function (data) {
279
+ var requestData = {
280
+ user_email: data.user_email
281
+ };
282
+
283
+ if (true === data.auto_install)
284
+ requestData.auto_install = true;
285
+
286
+ $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
287
+ 'fs_action' => $fs->get_unique_affix() . '_activate_new',
288
+ 'plugin_id' => $plugin_id,
289
+ 'pending_activation' => true,
290
+ ) ), $fs->get_unique_affix() . '_activate_new' ) ?>', requestData).submit();
291
+ });
292
+
293
+ FS.PostMessage.receiveOnce('get_context', function () {
294
+ console.debug('receiveOnce', 'get_context');
295
+
296
+ // If the user didn't connect his account with Freemius,
297
+ // once he accepts the Terms of Service and Privacy Policy,
298
+ // and then click the purchase button, the context information
299
+ // of the user will be shared with Freemius in order to complete the
300
+ // purchase workflow and activate the license for the right user.
301
+ <?php $install_data = array_merge( $fs->get_opt_in_params(),
302
+ array(
303
+ 'activation_url' => fs_nonce_url( $fs->_get_admin_page_url( '',
304
+ array(
305
+ 'fs_action' => $fs->get_unique_affix() . '_activate_new',
306
+ 'plugin_id' => $plugin_id,
307
+
308
+ ) ),
309
+ $fs->get_unique_affix() . '_activate_new' )
310
+ ) ) ?>
311
+ FS.PostMessage.post('context', <?php echo json_encode( $install_data ) ?>, frame[0]);
312
+ });
313
+
314
+ FS.PostMessage.receiveOnce('purchaseCompleted', <?php echo $fs->apply_filters('checkout/purchaseCompleted', 'function (data) {
315
+ console.log("checkout", "purchaseCompleted");
316
+ }') ?>);
317
+
318
+ FS.PostMessage.receiveOnce('get_dimensions', function (data) {
319
+ console.debug('receiveOnce', 'get_dimensions');
320
+
321
+ FS.PostMessage.post('dimensions', {
322
+ height : $(document.body).height(),
323
+ scrollTop: $(document).scrollTop()
324
+ }, frame[0]);
325
+ });
326
+
327
+ var updateHeight = function () {
328
+ frame.css('min-height', $(document.body).height() + 'px');
329
+ };
330
+
331
+ $(document).ready(updateHeight);
332
+
333
+ $(window).resize(updateHeight);
334
+ });
335
+ })(jQuery);
336
+ </script>
337
  </div>
freemius/templates/contact.php CHANGED
@@ -1,128 +1,128 @@
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
-
9
- /**
10
- * Note for WordPress.org Theme/Plugin reviewer:
11
- * Freemius is an SDK for plugin and theme developers. Since the core
12
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
- * we only develop and maintain one code base.
14
- *
15
- * This code (and page) will not run for wp.org themes (only plugins).
16
- *
17
- * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
- * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
- *
20
- * UPDATE:
21
- * After ongoing conversations with the WordPress.org TRT we received
22
- * an official approval for including i-frames in the theme's WP Admin setting's
23
- * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
- * were never against the guidelines, but we wanted to get the team's blessings
25
- * before we move forward. For the record, I got the final approval from
26
- * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
- * Europe 2017 (June 16th, 2017).
28
- *
29
- * If you have any questions or need clarifications, please don't hesitate
30
- * pinging me on slack, my username is @svovaf.
31
- *
32
- * @author Vova Feldman (@svovaf)
33
- * @since 1.2.2
34
- */
35
-
36
- if ( ! defined( 'ABSPATH' ) ) {
37
- exit;
38
- }
39
-
40
- wp_enqueue_script( 'jquery' );
41
- wp_enqueue_script( 'json2' );
42
- fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
- fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
- fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
45
-
46
- /**
47
- * @var array $VARS
48
- * @var Freemius $fs
49
- */
50
- $fs = freemius( $VARS['id'] );
51
- $slug = $fs->get_slug();
52
-
53
- $context_params = array(
54
- 'plugin_id' => $fs->get_id(),
55
- 'plugin_public_key' => $fs->get_public_key(),
56
- 'plugin_version' => $fs->get_plugin_version(),
57
- );
58
-
59
-
60
- // Get site context secure params.
61
- if ( $fs->is_registered() ) {
62
- $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
63
- $fs->get_site(),
64
- time(),
65
- 'contact'
66
- ) );
67
- }
68
-
69
- $query_params = array_merge( $_GET, array_merge( $context_params, array(
70
- 'plugin_version' => $fs->get_plugin_version(),
71
- 'wp_login_url' => wp_login_url(),
72
- 'site_url' => get_site_url(),
73
- // 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
74
- ) ) );
75
-
76
- $view_params = array(
77
- 'id' => $VARS['id'],
78
- 'page' => strtolower( $fs->get_text_inline( 'Contact', 'contact' ) ),
79
- );
80
- fs_require_once_template('secure-https-header.php', $view_params);
81
-
82
- $has_tabs = $fs->_add_tabs_before_content();
83
-
84
- if ( $has_tabs ) {
85
- $query_params['tabs'] = 'true';
86
- }
87
- ?>
88
- <div id="fs_contact" class="wrap fs-section fs-full-size-wrapper">
89
- <div id="fs_frame"></div>
90
- <script type="text/javascript">
91
- (function ($) {
92
- $(function () {
93
-
94
- var
95
- // Keep track of the i-frame height.
96
- frame_height = 800,
97
- base_url = '<?php echo WP_FS__ADDRESS ?>',
98
- src = base_url + '/contact/?<?php echo http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href),
99
-
100
- // Append the i-frame into the DOM.
101
- frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
102
- .appendTo('#fs_frame');
103
-
104
- FS.PostMessage.init(base_url);
105
- FS.PostMessage.receive('height', function (data) {
106
- var h = data.height;
107
- if (!isNaN(h) && h > 0 && h != frame_height) {
108
- frame_height = h;
109
- $('#fs_frame i' + 'frame').height(frame_height + 'px');
110
- }
111
- });
112
- });
113
- })(jQuery);
114
- </script>
115
- </div>
116
- <?php
117
- if ( $has_tabs ) {
118
- $fs->_add_tabs_after_content();
119
- }
120
-
121
- $params = array(
122
- 'page' => 'contact',
123
- 'module_id' => $fs->get_id(),
124
- 'module_type' => $fs->get_module_type(),
125
- 'module_slug' => $slug,
126
- 'module_version' => $fs->get_plugin_version(),
127
- );
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
+
9
+ /**
10
+ * Note for WordPress.org Theme/Plugin reviewer:
11
+ * Freemius is an SDK for plugin and theme developers. Since the core
12
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
+ * we only develop and maintain one code base.
14
+ *
15
+ * This code (and page) will not run for wp.org themes (only plugins).
16
+ *
17
+ * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
+ * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
+ *
20
+ * UPDATE:
21
+ * After ongoing conversations with the WordPress.org TRT we received
22
+ * an official approval for including i-frames in the theme's WP Admin setting's
23
+ * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
+ * were never against the guidelines, but we wanted to get the team's blessings
25
+ * before we move forward. For the record, I got the final approval from
26
+ * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
+ * Europe 2017 (June 16th, 2017).
28
+ *
29
+ * If you have any questions or need clarifications, please don't hesitate
30
+ * pinging me on slack, my username is @svovaf.
31
+ *
32
+ * @author Vova Feldman (@svovaf)
33
+ * @since 1.2.2
34
+ */
35
+
36
+ if ( ! defined( 'ABSPATH' ) ) {
37
+ exit;
38
+ }
39
+
40
+ wp_enqueue_script( 'jquery' );
41
+ wp_enqueue_script( 'json2' );
42
+ fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
+ fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
+ fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
45
+
46
+ /**
47
+ * @var array $VARS
48
+ * @var Freemius $fs
49
+ */
50
+ $fs = freemius( $VARS['id'] );
51
+ $slug = $fs->get_slug();
52
+
53
+ $context_params = array(
54
+ 'plugin_id' => $fs->get_id(),
55
+ 'plugin_public_key' => $fs->get_public_key(),
56
+ 'plugin_version' => $fs->get_plugin_version(),
57
+ );
58
+
59
+
60
+ // Get site context secure params.
61
+ if ( $fs->is_registered() ) {
62
+ $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
63
+ $fs->get_site(),
64
+ time(),
65
+ 'contact'
66
+ ) );
67
+ }
68
+
69
+ $query_params = array_merge( $_GET, array_merge( $context_params, array(
70
+ 'plugin_version' => $fs->get_plugin_version(),
71
+ 'wp_login_url' => wp_login_url(),
72
+ 'site_url' => get_site_url(),
73
+ // 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
74
+ ) ) );
75
+
76
+ $view_params = array(
77
+ 'id' => $VARS['id'],
78
+ 'page' => strtolower( $fs->get_text_inline( 'Contact', 'contact' ) ),
79
+ );
80
+ fs_require_once_template('secure-https-header.php', $view_params);
81
+
82
+ $has_tabs = $fs->_add_tabs_before_content();
83
+
84
+ if ( $has_tabs ) {
85
+ $query_params['tabs'] = 'true';
86
+ }
87
+ ?>
88
+ <div id="fs_contact" class="wrap fs-section fs-full-size-wrapper">
89
+ <div id="fs_frame"></div>
90
+ <script type="text/javascript">
91
+ (function ($) {
92
+ $(function () {
93
+
94
+ var
95
+ // Keep track of the i-frame height.
96
+ frame_height = 800,
97
+ base_url = '<?php echo WP_FS__ADDRESS ?>',
98
+ src = base_url + '/contact/?<?php echo http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href),
99
+
100
+ // Append the i-frame into the DOM.
101
+ frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
102
+ .appendTo('#fs_frame');
103
+
104
+ FS.PostMessage.init(base_url);
105
+ FS.PostMessage.receive('height', function (data) {
106
+ var h = data.height;
107
+ if (!isNaN(h) && h > 0 && h != frame_height) {
108
+ frame_height = h;
109
+ $('#fs_frame i' + 'frame').height(frame_height + 'px');
110
+ }
111
+ });
112
+ });
113
+