Speed Booster Pack - Version 4.3.4

Version Description

Release Date: 13 November 2021

  • Improved: Added an onboarding modal to the settings page for first-time users.
  • Fixed: Fixed some bugs in the advanced-cache.php generation process.
  • Fixed: Lots of improvements/fixes to the cache warmup process.
Download this release

Release Info

Developer optimocha
Plugin Icon 128x128 Speed Booster Pack
Version 4.3.4
Comparing to
See all releases

Code changes from version 4.3.3.1 to 4.3.4

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: speed, pagespeed, optimization, core web vitals, cache
5
  Requires at least: 4.6
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 4.3.3.1
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -104,6 +104,14 @@ All the time! We're always looking for new ways to get this plugin to a better s
104
 
105
  == Changelog ==
106
 
 
 
 
 
 
 
 
 
107
  = 4.3.3.1 =
108
 
109
  *Release Date: 16 October 2021*
5
  Requires at least: 4.6
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 4.3.4
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
104
 
105
  == Changelog ==
106
 
107
+ = 4.3.4 =
108
+
109
+ *Release Date: 13 November 2021*
110
+
111
+ * **Improved**: Added an onboarding modal to the settings page for first-time users.
112
+ * **Fixed**: Fixed some bugs in the advanced-cache.php generation process.
113
+ * **Fixed**: Lots of improvements/fixes to the cache warmup process.
114
+
115
  = 4.3.3.1 =
116
 
117
  *Release Date: 16 October 2021*
admin/class-speed-booster-pack-admin.php CHANGED
@@ -89,7 +89,14 @@ class Speed_Booster_Pack_Admin {
89
  * @since 4.0.0
90
  */
91
  public function enqueue_styles() {
92
- wp_enqueue_style( $this->plugin_name, SBP_URL . 'admin/css/speed-booster-pack-admin.css', array(), $this->version );
 
 
 
 
 
 
 
93
  }
94
 
95
  /**
@@ -98,7 +105,42 @@ class Speed_Booster_Pack_Admin {
98
  * @since 4.0.0
99
  */
100
  public function enqueue_scripts() {
101
- wp_enqueue_script( $this->plugin_name, SBP_URL . 'admin/js/speed-booster-pack-admin.js', array( 'jquery' ), $this->version );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  wp_localize_script( $this->plugin_name,
103
  'sbp_ajax_vars',
104
  [
@@ -1070,7 +1112,7 @@ class Speed_Booster_Pack_Admin {
1070
  'type' => 'switcher',
1071
  'desc' => __( 'Defers loading of images, videos and iframes to page onload.', 'speed-booster-pack' ),
1072
  'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
1073
- 'class' => $should_disable_lazyload ? ' inactive-section' : null,
1074
  'sanitize' => 'sbp_sanitize_boolean',
1075
  ],
1076
  [
89
  * @since 4.0.0
90
  */
91
  public function enqueue_styles() {
92
+ wp_enqueue_style( $this->plugin_name, SBP_URL . 'admin/css/speed-booster-pack-admin.css', [], $this->version );
93
+ if (
94
+ get_user_meta( get_current_user_id(), 'sbp_intro', true ) != true &&
95
+ ( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
96
+ current_user_can( 'manage_options' )
97
+ ) {
98
+ wp_enqueue_style( 'sbp_intro_css', SBP_URL . 'admin/css/intro.min.css', [], '4.2.2' );
99
+ }
100
  }
101
 
102
  /**
105
  * @since 4.0.0
106
  */
107
  public function enqueue_scripts() {
108
+ if (
109
+ get_user_meta( get_current_user_id(), 'sbp_intro', true ) != true &&
110
+ ( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
111
+ current_user_can( 'manage_options' )
112
+ ) {
113
+ wp_enqueue_script( 'sbp_intro_js', SBP_URL . 'admin/js/intro.min.js', [ 'jquery' ], '4.2.2' );
114
+ wp_enqueue_script( 'sbp_init_intro', SBP_URL . 'admin/js/init-intro.js', [ 'jquery' ], '4.2.2' );
115
+ wp_localize_script( 'sbp_intro_js',
116
+ 'sbp_intro_translations',
117
+ [
118
+ /* translators: onboarding modal, first step */
119
+ 'welcome' => __( 'Welcome to Speed Booster Pack! We\'d like to give you a quick tour - feel free to close this box and look around the options yourself, or click Next to see our short intro.', 'speed-booster-pack' ),
120
+ /* translators: onboarding modal, second step */
121
+ 'caching' => __( 'This is our caching tab. Here, you can set caching for your pages to immediately speed up your website.', 'speed-booster-pack' ),
122
+ /* translators: onboarding modal, third step */
123
+ 'caching2' => __( 'Most tabs have an module toggle like this. Turning on or off the module toggle enables or disables the whole module.', 'speed-booster-pack' ),
124
+ /* translators: onboarding modal, fourth step */
125
+ 'general' => __( 'The "General" tab includes various tweaks to clean up and speed up things. You can also disable Speed Booster Pack features for certain user roles (e.g. subscribers or customers) if you need to.', 'speed-booster-pack' ),
126
+ /* translators: onboarding modal, fifth step */
127
+ 'cdn' => __( 'The CDN & Proxy tab has three main settings: You can set a CDN domain to serve all your assets from, you can connect to your Cloudflare account to change your Cloudflare settings, and you can connect to your Sucuri account so you can clear your Sucuri cache automatically.', 'speed-booster-pack' ),
128
+ /* translators: onboarding modal, sixth step */
129
+ 'css' => __( 'The Optimize CSS tab has some delicate settings which, if configured properly, can drastically improve your website performance. Be sure to follow the directions properly - especially the Critical CSS settings!', 'speed-booster-pack' ),
130
+ /* translators: onboarding modal, seventh step */
131
+ 'assets' => __( 'The Assets tab can improve your website performance using font optimization, lazy loading, asset preloading and JavaScript optimization. It\'s tempting to enable them all, but make sure you test each change thoroughly or else you can break your website! Think of these tools like powerful weapons which you can hurt yourself with.', 'speed-booster-pack' ),
132
+ /* translators: onboarding modal, last step */
133
+ 'end' => __( 'That\'s it! Actually, that\'s not it - make sure you check the other tabs to see if you have more room to improve your website speed. Don\'t be afraid to experiment; even if you break something, resetting settings or simply deactivating Speed Booster Pack will undo everything.', 'speed-booster-pack' ),
134
+ /* translators: onboarding modal, "Next" label */
135
+ 'nextLabel' => __( 'Next', 'speed-booster-pack' ),
136
+ /* translators: onboarding modal, "Prev" label */
137
+ 'prevLabel' => __( 'Prev', 'speed-booster-pack' ),
138
+ /* translators: onboarding modal, "Done" label */
139
+ 'doneLabel' => __( 'Done', 'speed-booster-pack' ),
140
+ ] );
141
+ }
142
+
143
+ wp_enqueue_script( $this->plugin_name, SBP_URL . 'admin/js/speed-booster-pack-admin.js', [ 'jquery' ], $this->version );
144
  wp_localize_script( $this->plugin_name,
145
  'sbp_ajax_vars',
146
  [
1112
  'type' => 'switcher',
1113
  'desc' => __( 'Defers loading of images, videos and iframes to page onload.', 'speed-booster-pack' ),
1114
  'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
1115
+ 'class' => 'lazyload-media ' . ($should_disable_lazyload ? ' inactive-section' : null),
1116
  'sanitize' => 'sbp_sanitize_boolean',
1117
  ],
1118
  [
admin/css/intro.min.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ @-webkit-keyframes introjspulse{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}25%{-webkit-transform:scale(0);transform:scale(0);opacity:.1}50%{-webkit-transform:scale(.1);transform:scale(.1);opacity:.3}75%{-webkit-transform:scale(.5);transform:scale(.5);opacity:.5}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}@keyframes introjspulse{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}25%{-webkit-transform:scale(0);transform:scale(0);opacity:.1}50%{-webkit-transform:scale(.1);transform:scale(.1);opacity:.3}75%{-webkit-transform:scale(.5);transform:scale(.5);opacity:.5}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.introjs-overlay{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;z-index:999999;opacity:0;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-showElement{z-index:9999999!important}tr.introjs-showElement>td{z-index:9999999!important;position:relative}tr.introjs-showElement>th{z-index:9999999!important;position:relative}.introjs-disableInteraction{z-index:99999999!important;position:absolute;background-color:#fff;opacity:0}.introjs-relativePosition{position:relative}.introjs-helperLayer{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;z-index:9999998;border-radius:4px;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperLayer *{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-helperLayer :before{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-helperLayer :after{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-tooltipReferenceLayer{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif;-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;visibility:hidden;z-index:100000000;background-color:transparent;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-tooltipReferenceLayer *{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif}.introjs-helperNumberLayer{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif;color:#9e9e9e;text-align:center;padding-top:10px;padding-bottom:10px}.introjs-arrow{border:5px solid transparent;content:"";position:absolute}.introjs-arrow.top{top:-10px;left:10px;border-bottom-color:#fff}.introjs-arrow.top-right{top:-10px;right:10px;border-bottom-color:#fff}.introjs-arrow.top-middle{top:-10px;left:50%;margin-left:-5px;border-bottom-color:#fff}.introjs-arrow.right{right:-10px;top:10px;border-left-color:#fff}.introjs-arrow.right-bottom{bottom:10px;right:-10px;border-left-color:#fff}.introjs-arrow.bottom{bottom:-10px;left:10px;border-top-color:#fff}.introjs-arrow.bottom-right{bottom:-10px;right:10px;border-top-color:#fff}.introjs-arrow.bottom-middle{bottom:-10px;left:50%;margin-left:-5px;border-top-color:#fff}.introjs-arrow.left{left:-10px;top:10px;border-right-color:#fff}.introjs-arrow.left-bottom{left:-10px;bottom:10px;border-right-color:#fff}.introjs-tooltip{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;visibility:visible;background-color:#fff;min-width:250px;max-width:300px;border-radius:5px;-webkit-box-shadow:0 3px 30px rgba(33,33,33,.3);box-shadow:0 3px 30px rgba(33,33,33,.3);-webkit-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltiptext{padding:20px}.introjs-tooltip-title{font-size:18px;margin:0;padding:0;font-weight:700;float:left;line-height:32px}.introjs-tooltip-header{padding-left:20px;padding-right:20px;padding-top:10px}.introjs-tooltip-header:after{content:".";visibility:hidden;display:block;height:0;clear:both}.introjs-tooltipbuttons{border-top:1px solid #e0e0e0;padding:10px;text-align:right;white-space:nowrap}.introjs-tooltipbuttons:after{content:"";visibility:hidden;display:block;height:0;clear:both}.introjs-button{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;overflow:visible;display:inline-block;padding:.5rem 1rem;border:1px solid #bdbdbd;text-decoration:none;text-shadow:1px 1px 0 #fff;font-size:14px;color:#424242;white-space:nowrap;cursor:pointer;outline:0;background-color:#f4f4f4;border-radius:.2em;zoom:1}.introjs-button:hover{outline:0;text-decoration:none;border-color:#9e9e9e;background-color:#e0e0e0;color:#212121}.introjs-button:focus{outline:0;text-decoration:none;background-color:#eee;-webkit-box-shadow:0 0 0 .2rem rgba(158,158,158,.5);box-shadow:0 0 0 .2rem rgba(158,158,158,.5);border:1px solid #616161;color:#212121}.introjs-button:active{outline:0;text-decoration:none;background-color:#e0e0e0;border-color:#9e9e9e;color:#212121}.introjs-button::-moz-focus-inner{padding:0;border:0}.introjs-skipbutton{-webkit-box-sizing:content-box;box-sizing:content-box;color:#616161;float:right;font-size:20px;cursor:pointer;font-weight:700;line-height:1;text-align:center;padding:7px 10px}.introjs-skipbutton:focus,.introjs-skipbutton:hover{color:#212121;outline:0;text-decoration:none}.introjs-prevbutton{float:left}.introjs-nextbutton{float:right}.introjs-disabled{color:#9e9e9e;border-color:#bdbdbd;-webkit-box-shadow:none;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-disabled:focus,.introjs-disabled:hover{color:#9e9e9e;border-color:#bdbdbd;-webkit-box-shadow:none;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-hidden{display:none}.introjs-bullets{text-align:center;padding-top:10px;padding-bottom:10px}.introjs-bullets ul{-webkit-box-sizing:content-box;box-sizing:content-box;clear:both;margin:0 auto 0;padding:0;display:inline-block}.introjs-bullets ul li{-webkit-box-sizing:content-box;box-sizing:content-box;list-style:none;float:left;margin:0 2px}.introjs-bullets ul li a{-webkit-transition:width .1s ease-in;-o-transition:width .1s ease-in;transition:width .1s ease-in;-webkit-box-sizing:content-box;box-sizing:content-box;display:block;width:6px;height:6px;background:#ccc;border-radius:10px;text-decoration:none;cursor:pointer}.introjs-bullets ul li a:focus,.introjs-bullets ul li a:hover{width:15px;background:#999;text-decoration:none;outline:0}.introjs-bullets ul li a.active{width:15px;background:#999}.introjs-progress{-webkit-box-sizing:content-box;box-sizing:content-box;overflow:hidden;height:10px;margin:10px;border-radius:4px;background-color:#e0e0e0}.introjs-progressbar{-webkit-box-sizing:content-box;box-sizing:content-box;float:left;width:0%;height:100%;font-size:10px;line-height:10px;text-align:center;background-color:#08c}.introjsFloatingElement{position:absolute;height:0;width:0;left:50%;top:50%}.introjs-fixedTooltip{position:fixed}.introjs-hint{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;background:0 0;width:20px;height:15px;cursor:pointer}.introjs-hint:focus{border:0;outline:0}.introjs-hint:hover>.introjs-hint-pulse{border:5px solid rgba(60,60,60,.57)}.introjs-hidehint{display:none}.introjs-fixedhint{position:fixed}.introjs-hint-pulse{-webkit-box-sizing:content-box;box-sizing:content-box;width:10px;height:10px;border:5px solid rgba(60,60,60,.27);border-radius:30px;background-color:rgba(136,136,136,.24);z-index:10;position:absolute;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.introjs-hint-no-anim .introjs-hint-dot{-webkit-animation:none;animation:none}.introjs-hint-dot{-webkit-box-sizing:content-box;box-sizing:content-box;border:10px solid rgba(146,146,146,.36);background:0 0;border-radius:60px;height:50px;width:50px;-webkit-animation:introjspulse 3s ease-out;animation:introjspulse 3s ease-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;position:absolute;top:-25px;left:-25px;z-index:1;opacity:0}
2
+ /*# sourceMappingURL=introjs.min.css.map */
admin/js/init-intro.js ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function() {
2
+ var $ = jQuery;
3
+ $(document).ready(function() {
4
+ if (introJs != undefined) {
5
+ introJs().setOptions({
6
+ exitOnOverlayClick: false,
7
+ showProgress: true,
8
+ showBullets: false,
9
+ nextLabel: sbp_intro_translations.nextLabel,
10
+ prevLabel: sbp_intro_translations.prevLabel,
11
+ doneLabel: sbp_intro_translations.doneLabel,
12
+ steps: [{
13
+ intro: sbp_intro_translations.welcome
14
+ }, {
15
+ element: document.querySelector('[data-tab-id="caching"]'),
16
+ intro: sbp_intro_translations.caching,
17
+ position: 'right'
18
+ }, {
19
+ element: document.querySelector('.module-caching'),
20
+ intro: sbp_intro_translations.caching2,
21
+ position: 'bottom'
22
+ }, {
23
+ element: document.querySelector('[data-tab-id="general"]'),
24
+ intro: sbp_intro_translations.general,
25
+ position: 'right'
26
+ }, {
27
+ element: document.querySelector('[data-tab-id="cdn-proxy"]'),
28
+ intro: sbp_intro_translations.cdn,
29
+ position: 'right'
30
+ }, {
31
+ element: document.querySelector('[data-tab-id="optimize-css"]'),
32
+ intro: sbp_intro_translations.css,
33
+ position: 'right'
34
+ }, {
35
+ element: document.querySelector('[data-tab-id="assets"]'),
36
+ intro: sbp_intro_translations.assets,
37
+ position: 'right'
38
+ }, {
39
+ intro: sbp_intro_translations.end
40
+ }]
41
+ }).start().onbeforechange(function(targetElement) {
42
+
43
+ if ($(targetElement).is('[data-tab-id="caching"]') || $(targetElement).is('.module-caching')) {
44
+ window.location.hash = '#tab=caching';
45
+ }
46
+
47
+ if ($(targetElement).is('[data-tab-id="general"]')) {
48
+ window.location.hash = '#tab=general';
49
+ }
50
+
51
+ if ($(targetElement).is('[data-tab-id="cdn-proxy"]')) {
52
+ window.location.hash = '#tab=cdn-proxy';
53
+ }
54
+
55
+ if ($(targetElement).is('[data-tab-id="optimize-css"]')) {
56
+ window.location.hash = '#tab=optimize-css';
57
+ }
58
+
59
+ if ($(targetElement).is('[data-tab-id="assets"]')) {
60
+ window.location.hash = '#tab=assets';
61
+ }
62
+
63
+ }).onexit(function() {
64
+ $.ajax({
65
+ url: ajaxurl,
66
+ data: {'action': 'sbp_dismiss_intro'}
67
+ });
68
+ });
69
+ }
70
+ })
71
+ })
admin/js/intro.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Intro.js v4.2.2
3
+ * https://introjs.com
4
+ *
5
+ * Copyright (C) 2012-2021 Afshin Mehrabani (@afshinmeh).
6
+ * https://raw.githubusercontent.com/usablica/intro.js/master/license.md
7
+ *
8
+ * Date: Fri, 27 Aug 2021 12:07:05 GMT
9
+ */
10
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).introJs=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=function(){var t={};return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"introjs-stamp";return t[n]=t[n]||0,void 0===e[n]&&(e[n]=t[n]++),e[n]}}();function n(t,e,n){if(t)for(var i=0,o=t.length;i<o;i++)e(t[i],i);"function"==typeof n&&n()}var i=new function(){var t="introjs_event";this._id=function(t,n,i,o){return n+e(i)+(o?"_".concat(e(o)):"")},this.on=function(e,n,i,o,r){var l=this._id.apply(this,arguments),a=function(t){return i.call(o||e,t||window.event)};"addEventListener"in e?e.addEventListener(n,a,r):"attachEvent"in e&&e.attachEvent("on".concat(n),a),e[t]=e[t]||{},e[t][l]=a},this.off=function(e,n,i,o,r){var l=this._id.apply(this,arguments),a=e[t]&&e[t][l];a&&("removeEventListener"in e?e.removeEventListener(n,a,r):"detachEvent"in e&&e.detachEvent("on".concat(n),a),e[t][l]=null)}},o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var l,a,s=function(t){return t&&t.Math==Math&&t},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof o&&o)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},h=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d={f:p&&!f.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:f},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v={}.toString,m=function(t){return v.call(t).slice(8,-1)},b="".split,y=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?b.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},_=function(t){return y(w(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t){return"function"==typeof t?t:void 0},C=function(t,e){return arguments.length<2?j(c[t]):c[t]&&c[t][e]},S=C("navigator","userAgent")||"",E=c.process,A=c.Deno,k=E&&E.versions||A&&A.version,T=k&&k.v8;T?a=(l=T.split("."))[0]<4?1:l[0]+l[1]:S&&(!(l=S.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=S.match(/Chrome\/(\d+)/))&&(a=l[1]);var N=a&&+a,I=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&N&&N<41})),O=I&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,P=O?function(t){return"symbol"==typeof t}:function(t){var e=C("Symbol");return"function"==typeof e&&Object(t)instanceof e},L=function(t,e){try{Object.defineProperty(c,t,{value:e,configurable:!0,writable:!0})}catch(n){c[t]=e}return e},q="__core-js_shared__",R=c[q]||L(q,{}),M=r((function(t){(t.exports=function(t,e){return R[t]||(R[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),B=function(t){return Object(w(t))},H={}.hasOwnProperty,$=Object.hasOwn||function(t,e){return H.call(B(t),e)},D=0,F=Math.random(),z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+F).toString(36)},W=M("wks"),V=c.Symbol,U=O?V:V&&V.withoutSetter||z,G=function(t){return $(W,t)&&(I||"string"==typeof W[t])||(I&&$(V,t)?W[t]=V[t]:W[t]=U("Symbol."+t)),W[t]},Y=G("toPrimitive"),K=function(t,e){if(!x(t)||P(t))return t;var n,i=t[Y];if(void 0!==i){if(void 0===e&&(e="default"),n=i.call(t,e),!x(n)||P(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,i;if("string"===e&&"function"==typeof(n=t.toString)&&!x(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!x(i=n.call(t)))return i;if("string"!==e&&"function"==typeof(n=t.toString)&&!x(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}(t,e)},X=function(t){var e=K(t,"string");return P(e)?e:String(e)},J=c.document,Q=x(J)&&x(J.createElement),Z=function(t){return Q?J.createElement(t):{}},tt=!h&&!u((function(){return 7!=Object.defineProperty(Z("div"),"a",{get:function(){return 7}}).a})),et=Object.getOwnPropertyDescriptor,nt={f:h?et:function(t,e){if(t=_(t),e=X(e),tt)try{return et(t,e)}catch(t){}if($(t,e))return g(!d.f.call(t,e),t[e])}},it=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},ot=Object.defineProperty,rt={f:h?ot:function(t,e,n){if(it(t),e=X(e),it(n),tt)try{return ot(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},lt=h?function(t,e,n){return rt.f(t,e,g(1,n))}:function(t,e,n){return t[e]=n,t},at=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(t){return at.call(t)});var st,ct,ut,ht=R.inspectSource,ft=c.WeakMap,pt="function"==typeof ft&&/native code/.test(ht(ft)),dt=M("keys"),gt=function(t){return dt[t]||(dt[t]=z(t))},vt={},mt="Object already initialized",bt=c.WeakMap;if(pt||R.state){var yt=R.state||(R.state=new bt),wt=yt.get,_t=yt.has,xt=yt.set;st=function(t,e){if(_t.call(yt,t))throw new TypeError(mt);return e.facade=t,xt.call(yt,t,e),e},ct=function(t){return wt.call(yt,t)||{}},ut=function(t){return _t.call(yt,t)}}else{var jt=gt("state");vt[jt]=!0,st=function(t,e){if($(t,jt))throw new TypeError(mt);return e.facade=t,lt(t,jt,e),e},ct=function(t){return $(t,jt)?t[jt]:{}},ut=function(t){return $(t,jt)}}var Ct,St={set:st,get:ct,has:ut,enforce:function(t){return ut(t)?ct(t):st(t,{})},getterFor:function(t){return function(e){var n;if(!x(e)||(n=ct(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Et=r((function(t){var e=St.get,n=St.enforce,i=String(String).split("String");(t.exports=function(t,e,o,r){var l,a=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;"function"==typeof o&&("string"!=typeof e||$(o,"name")||lt(o,"name",e),(l=n(o)).source||(l.source=i.join("string"==typeof e?e:""))),t!==c?(a?!u&&t[e]&&(s=!0):delete t[e],s?t[e]=o:lt(t,e,o)):s?t[e]=o:L(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||ht(this)}))})),At=Math.ceil,kt=Math.floor,Tt=function(t){return isNaN(t=+t)?0:(t>0?kt:At)(t)},Nt=Math.min,It=function(t){return t>0?Nt(Tt(t),9007199254740991):0},Ot=Math.max,Pt=Math.min,Lt=function(t,e){var n=Tt(t);return n<0?Ot(n+e,0):Pt(n,e)},qt=function(t){return function(e,n,i){var o,r=_(e),l=It(r.length),a=Lt(i,l);if(t&&n!=n){for(;l>a;)if((o=r[a++])!=o)return!0}else for(;l>a;a++)if((t||a in r)&&r[a]===n)return t||a||0;return!t&&-1}},Rt={includes:qt(!0),indexOf:qt(!1)},Mt=Rt.indexOf,Bt=function(t,e){var n,i=_(t),o=0,r=[];for(n in i)!$(vt,n)&&$(i,n)&&r.push(n);for(;e.length>o;)$(i,n=e[o++])&&(~Mt(r,n)||r.push(n));return r},Ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$t=Ht.concat("length","prototype"),Dt={f:Object.getOwnPropertyNames||function(t){return Bt(t,$t)}},Ft={f:Object.getOwnPropertySymbols},zt=C("Reflect","ownKeys")||function(t){var e=Dt.f(it(t)),n=Ft.f;return n?e.concat(n(t)):e},Wt=function(t,e){for(var n=zt(e),i=rt.f,o=nt.f,r=0;r<n.length;r++){var l=n[r];$(t,l)||i(t,l,o(e,l))}},Vt=/#|\.prototype\./,Ut=function(t,e){var n=Yt[Gt(t)];return n==Xt||n!=Kt&&("function"==typeof e?u(e):!!e)},Gt=Ut.normalize=function(t){return String(t).replace(Vt,".").toLowerCase()},Yt=Ut.data={},Kt=Ut.NATIVE="N",Xt=Ut.POLYFILL="P",Jt=Ut,Qt=nt.f,Zt=function(t,e){var n,i,o,r,l,a=t.target,s=t.global,u=t.stat;if(n=s?c:u?c[a]||L(a,{}):(c[a]||{}).prototype)for(i in e){if(r=e[i],o=t.noTargetGet?(l=Qt(n,i))&&l.value:n[i],!Jt(s?i:a+(u?".":"#")+i,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;Wt(r,o)}(t.sham||o&&o.sham)&&lt(r,"sham",!0),Et(n,i,r,t)}},te=function(t){if(P(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},ee=function(){var t=it(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},ne=function(t,e){return RegExp(t,e)},ie={UNSUPPORTED_Y:u((function(){var t=ne("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:u((function(){var t=ne("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},oe=Object.keys||function(t){return Bt(t,Ht)},re=h?Object.defineProperties:function(t,e){it(t);for(var n,i=oe(e),o=i.length,r=0;o>r;)rt.f(t,n=i[r++],e[n]);return t},le=C("document","documentElement"),ae=gt("IE_PROTO"),se=function(){},ce=function(t){return"<script>"+t+"</"+"script>"},ue=function(t){t.write(ce("")),t.close();var e=t.parentWindow.Object;return t=null,e},he=function(){try{Ct=new ActiveXObject("htmlfile")}catch(t){}he=document.domain&&Ct?ue(Ct):function(){var t,e=Z("iframe");if(e.style)return e.style.display="none",le.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ce("document.F=Object")),t.close(),t.F}()||ue(Ct);for(var t=Ht.length;t--;)delete he.prototype[Ht[t]];return he()};vt[ae]=!0;var fe,pe,de=Object.create||function(t,e){var n;return null!==t?(se.prototype=it(t),n=new se,se.prototype=null,n[ae]=t):n=he(),void 0===e?n:re(n,e)},ge=u((function(){var t=RegExp(".","string".charAt(0));return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),ve=u((function(){var t=RegExp("(?<a>b)","string".charAt(5));return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),me=St.get,be=RegExp.prototype.exec,ye=M("native-string-replace",String.prototype.replace),we=be,_e=(fe=/a/,pe=/b*/g,be.call(fe,"a"),be.call(pe,"a"),0!==fe.lastIndex||0!==pe.lastIndex),xe=ie.UNSUPPORTED_Y||ie.BROKEN_CARET,je=void 0!==/()??/.exec("")[1];(_e||je||xe||ge||ve)&&(we=function(t){var e,n,i,o,r,l,a,s=this,c=me(s),u=te(t),h=c.raw;if(h)return h.lastIndex=s.lastIndex,e=we.call(h,u),s.lastIndex=h.lastIndex,e;var f=c.groups,p=xe&&s.sticky,d=ee.call(s),g=s.source,v=0,m=u;if(p&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),m=u.slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==u.charAt(s.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",d)),je&&(n=new RegExp("^"+g+"$(?!\\s)",d)),_e&&(i=s.lastIndex),o=be.call(p?n:s,m),p?o?(o.input=o.input.slice(v),o[0]=o[0].slice(v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:_e&&o&&(s.lastIndex=s.global?o.index+o[0].length:i),je&&o&&o.length>1&&ye.call(o[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(o[r]=void 0)})),o&&f)for(o.groups=l=de(null),r=0;r<f.length;r++)l[(a=f[r])[0]]=o[a[1]];return o});var Ce=we;Zt({target:"RegExp",proto:!0,forced:/./.exec!==Ce},{exec:Ce});var Se=G("species"),Ee=RegExp.prototype,Ae=function(t,e,n,i){var o=G(t),r=!u((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),l=r&&!u((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Se]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!r||!l||n){var a=/./[o],s=e(o,""[t],(function(t,e,n,i,o){var l=e.exec;return l===Ce||l===Ee.exec?r&&!o?{done:!0,value:a.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}));Et(String.prototype,t,s[0]),Et(Ee,o,s[1])}i&&lt(Ee[o],"sham",!0)},ke=function(t){return function(e,n){var i,o,r=te(w(e)),l=Tt(n),a=r.length;return l<0||l>=a?t?"":void 0:(i=r.charCodeAt(l))<55296||i>56319||l+1===a||(o=r.charCodeAt(l+1))<56320||o>57343?t?r.charAt(l):i:t?r.slice(l,l+2):o-56320+(i-55296<<10)+65536}},Te={codeAt:ke(!1),charAt:ke(!0)}.charAt,Ne=function(t,e,n){return e+(n?Te(t,e).length:1)},Ie=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==m(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ce.call(t,e)};Ae("match",(function(t,e,n){return[function(e){var n=w(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](te(n))},function(t){var i=it(this),o=te(t),r=n(e,i,o);if(r.done)return r.value;if(!i.global)return Ie(i,o);var l=i.unicode;i.lastIndex=0;for(var a,s=[],c=0;null!==(a=Ie(i,o));){var u=te(a[0]);s[c]=u,""===u&&(i.lastIndex=Ne(o,It(i.lastIndex),l)),c++}return 0===c?null:s}]}));var Oe=Array.isArray||function(t){return"Array"==m(t)},Pe=function(t,e,n){var i=X(e);i in t?rt.f(t,i,g(0,n)):t[i]=n},Le=G("species"),qe=function(t,e){return new(function(t){var e;return Oe(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Oe(e.prototype)?x(e)&&null===(e=e[Le])&&(e=void 0):e=void 0),void 0===e?Array:e}(t))(0===e?0:e)},Re=G("species"),Me=function(t){return N>=51||!u((function(){var e=[];return(e.constructor={})[Re]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Be=G("isConcatSpreadable"),He=9007199254740991,$e="Maximum allowed index exceeded",De=N>=51||!u((function(){var t=[];return t[Be]=!1,t.concat()[0]!==t})),Fe=Me("concat"),ze=function(t){if(!x(t))return!1;var e=t[Be];return void 0!==e?!!e:Oe(t)};Zt({target:"Array",proto:!0,forced:!De||!Fe},{concat:function(t){var e,n,i,o,r,l=B(this),a=qe(l,0),s=0;for(e=-1,i=arguments.length;e<i;e++)if(ze(r=-1===e?l:arguments[e])){if(s+(o=It(r.length))>He)throw TypeError($e);for(n=0;n<o;n++,s++)n in r&&Pe(a,s,r[n])}else{if(s>=He)throw TypeError($e);Pe(a,s++,r)}return a.length=s,a}});var We={};We[G("toStringTag")]="z";var Ve="[object z]"===String(We),Ue=G("toStringTag"),Ge="Arguments"==m(function(){return arguments}()),Ye=Ve?m:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ue))?n:Ge?m(e):"Object"==(i=m(e))&&"function"==typeof e.callee?"Arguments":i},Ke=Ve?{}.toString:function(){return"[object "+Ye(this)+"]"};Ve||Et(Object.prototype,"toString",Ke,{unsafe:!0});var Xe="toString",Je=RegExp.prototype,Qe=Je.toString,Ze=u((function(){return"/a/b"!=Qe.call({source:"a",flags:"b"})})),tn=Qe.name!=Xe;(Ze||tn)&&Et(RegExp.prototype,Xe,(function(){var t=it(this),e=te(t.source),n=t.flags;return"/"+e+"/"+te(void 0===n&&t instanceof RegExp&&!("flags"in Je)?ee.call(t):n)}),{unsafe:!0});var en=G("match"),nn=function(t){var e;return x(t)&&(void 0!==(e=t[en])?!!e:"RegExp"==m(t))},on=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},rn=G("species"),ln=ie.UNSUPPORTED_Y,an=[].push,sn=Math.min,cn=4294967295;function un(t,e){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";i.match(e)||t.setAttribute("class","".concat(i," ").concat(e))}else{if(void 0!==t.classList)n(e.split(" "),(function(e){t.classList.add(e)}));else t.className.match(e)||(t.className+=" ".concat(e))}}function hn(t,e){var n="";return t.currentStyle?n=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),n&&n.toLowerCase?n.toLowerCase():n}function fn(t){var e=t.element;if(this._options.scrollToElement){var n=function(t){var e=window.getComputedStyle(t),n="absolute"===e.position,i=/(auto|scroll)/;if("fixed"===e.position)return document.body;for(var o=t;o=o.parentElement;)if(e=window.getComputedStyle(o),(!n||"static"!==e.position)&&i.test(e.overflow+e.overflowY+e.overflowX))return o;return document.body}(e);n!==document.body&&(n.scrollTop=e.offsetTop-n.offsetTop)}}function pn(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function dn(t,e,n){var i,o=e.element;if("off"!==t&&(this._options.scrollToElement&&(i="tooltip"===t?n.getBoundingClientRect():o.getBoundingClientRect(),!function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}(o)))){var r=pn().height;i.bottom-(i.bottom-i.top)<0||o.clientHeight>r?window.scrollBy(0,i.top-(r/2-i.height/2)-this._options.scrollPadding):window.scrollBy(0,i.top-(r/2-i.height/2)+this._options.scrollPadding)}}function gn(t){t.setAttribute("role","button"),t.tabIndex=0}Ae("split",(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=te(w(this)),o=void 0===n?cn:n>>>0;if(0===o)return[];if(void 0===t)return[i];if(!nn(t))return e.call(i,t,o);for(var r,l,a,s=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),u=0,h=new RegExp(t.source,c+"g");(r=Ce.call(h,i))&&!((l=h.lastIndex)>u&&(s.push(i.slice(u,r.index)),r.length>1&&r.index<i.length&&an.apply(s,r.slice(1)),a=r[0].length,u=l,s.length>=o));)h.lastIndex===r.index&&h.lastIndex++;return u===i.length?!a&&h.test("")||s.push(""):s.push(i.slice(u)),s.length>o?s.slice(0,o):s}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=w(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,o,n):i.call(te(o),e,n)},function(t,o){var r=it(this),l=te(t),a=n(i,r,l,o,i!==e);if(a.done)return a.value;var s=function(t,e){var n,i=it(t).constructor;return void 0===i||null==(n=it(i)[rn])?e:on(n)}(r,RegExp),c=r.unicode,u=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(ln?"g":"y"),h=new s(ln?"^(?:"+r.source+")":r,u),f=void 0===o?cn:o>>>0;if(0===f)return[];if(0===l.length)return null===Ie(h,l)?[l]:[];for(var p=0,d=0,g=[];d<l.length;){h.lastIndex=ln?0:d;var v,m=Ie(h,ln?l.slice(d):l);if(null===m||(v=sn(It(h.lastIndex+(ln?d:0)),l.length))===p)d=Ne(l,d,c);else{if(g.push(l.slice(p,d)),g.length===f)return g;for(var b=1;b<=m.length-1;b++)if(g.push(m[b]),g.length===f)return g;d=p=v}}return g.push(l.slice(p)),g}]}),!!u((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),ln);var vn=Object.assign,mn=Object.defineProperty,bn=!vn||u((function(){if(h&&1!==vn({b:1},vn(mn({},"a",{enumerable:!0,get:function(){mn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=vn({},t)[n]||oe(vn({},e)).join("")!=i}))?function(t,e){for(var n=B(t),i=arguments.length,o=1,r=Ft.f,l=d.f;i>o;)for(var a,s=y(arguments[o++]),c=r?oe(s).concat(r(s)):oe(s),u=c.length,f=0;u>f;)a=c[f++],h&&!l.call(s,a)||(n[a]=s[a]);return n}:vn;function yn(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===hn(t,"position")||yn(e))}function wn(t,e){var n=document.body,i=document.documentElement,o=window.pageYOffset||i.scrollTop||n.scrollTop,r=window.pageXOffset||i.scrollLeft||n.scrollLeft;e=e||n;var l=t.getBoundingClientRect(),a=e.getBoundingClientRect(),s=hn(e,"position"),c={width:l.width,height:l.height};return"body"!==e.tagName.toLowerCase()&&"relative"===s||"sticky"===s?Object.assign(c,{top:l.top-a.top,left:l.left-a.left}):yn(t)?Object.assign(c,{top:l.top,left:l.left}):Object.assign(c,{top:l.top+o,left:l.left+r})}Zt({target:"Object",stat:!0,forced:Object.assign!==bn},{assign:bn});var _n=Math.floor,xn="".replace,jn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cn=/\$([$&'`]|\d{1,2})/g,Sn=function(t,e,n,i,o,r){var l=n+t.length,a=i.length,s=Cn;return void 0!==o&&(o=B(o),s=jn),xn.call(r,s,(function(r,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":c=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return r;if(u>a){var h=_n(u/10);return 0===h?r:h<=a?void 0===i[h-1]?s.charAt(1):i[h-1]+s.charAt(1):r}c=i[u-1]}return void 0===c?"":c}))},En=G("replace"),An=Math.max,kn=Math.min,Tn="$0"==="a".replace(/./,"$0"),Nn=!!/./[En]&&""===/./[En]("a","$0");function In(t,e){if(t instanceof SVGElement){var n=t.getAttribute("class")||"";t.setAttribute("class",n.replace(e,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}function On(t,e){var n="";if(t.style.cssText&&(n+=t.style.cssText),"string"==typeof e)n+=e;else for(var i in e)n+="".concat(i,":").concat(e[i],";");t.style.cssText=n}function Pn(t){if(t){if(!this._introItems[this._currentStep])return;var e=this._introItems[this._currentStep],n=wn(e.element,this._targetElement),i=this._options.helperElementPadding;yn(e.element)?un(t,"introjs-fixedTooltip"):In(t,"introjs-fixedTooltip"),"floating"===e.position&&(i=0),On(t,{width:"".concat(n.width+i,"px"),height:"".concat(n.height+i,"px"),top:"".concat(n.top-i/2,"px"),left:"".concat(n.left-i/2,"px")})}}Ae("replace",(function(t,e,n){var i=Nn?"$":"$0";return[function(t,n){var i=w(this),o=null==t?void 0:t[En];return void 0!==o?o.call(t,i,n):e.call(te(i),t,n)},function(t,o){var r=it(this),l=te(t);if("string"==typeof o&&-1===o.indexOf(i)&&-1===o.indexOf("$<")){var a=n(e,r,l,o);if(a.done)return a.value}var s="function"==typeof o;s||(o=te(o));var c=r.global;if(c){var u=r.unicode;r.lastIndex=0}for(var h=[];;){var f=Ie(r,l);if(null===f)break;if(h.push(f),!c)break;""===te(f[0])&&(r.lastIndex=Ne(l,It(r.lastIndex),u))}for(var p,d="",g=0,v=0;v<h.length;v++){f=h[v];for(var m=te(f[0]),b=An(kn(Tt(f.index),l.length),0),y=[],w=1;w<f.length;w++)y.push(void 0===(p=f[w])?p:String(p));var _=f.groups;if(s){var x=[m].concat(y,b,l);void 0!==_&&x.push(_);var j=te(o.apply(void 0,x))}else j=Sn(m,l,b,y,_,o);b>=g&&(d+=l.slice(g,b)+j,g=b+m.length)}return d+l.slice(g)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Tn||Nn);var Ln=G("unscopables"),qn=Array.prototype;null==qn[Ln]&&rt.f(qn,Ln,{configurable:!0,value:de(null)});var Rn,Mn=Rt.includes;Zt({target:"Array",proto:!0},{includes:function(t){return Mn(this,t,arguments.length>1?arguments[1]:void 0)}}),Rn="includes",qn[Ln][Rn]=!0;var Bn=Me("slice"),Hn=G("species"),$n=[].slice,Dn=Math.max;Zt({target:"Array",proto:!0,forced:!Bn},{slice:function(t,e){var n,i,o,r=_(this),l=It(r.length),a=Lt(t,l),s=Lt(void 0===e?l:e,l);if(Oe(r)&&("function"!=typeof(n=r.constructor)||n!==Array&&!Oe(n.prototype)?x(n)&&null===(n=n[Hn])&&(n=void 0):n=void 0,n===Array||void 0===n))return $n.call(r,a,s);for(i=new(void 0===n?Array:n)(Dn(s-a,0)),o=0;a<s;a++,o++)a in r&&Pe(i,o,r[a]);return i.length=o,i}});var Fn=function(t){if(nn(t))throw TypeError("The method doesn't accept regular expressions");return t},zn=G("match");Zt({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[zn]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~te(w(this)).indexOf(te(Fn(t)),arguments.length>1?arguments[1]:void 0)}});var Wn=function(t,e){var n=[][t];return!!n&&u((function(){n.call(null,e||function(){throw 1},1)}))},Vn=[].join,Un=y!=Object,Gn=Wn("join",",");Zt({target:"Array",proto:!0,forced:Un||!Gn},{join:function(t){return Vn.call(_(this),void 0===t?",":t)}});var Yn=[].push,Kn=function(t){var e=1==t,n=2==t,i=3==t,o=4==t,r=6==t,l=7==t,a=5==t||r;return function(s,c,u,h){for(var f,p,d=B(s),g=y(d),v=function(t,e,n){if(on(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}(c,u,3),m=It(g.length),b=0,w=h||qe,_=e?w(s,m):n||l?w(s,0):void 0;m>b;b++)if((a||b in g)&&(p=v(f=g[b],b,d),t))if(e)_[b]=p;else if(p)switch(t){case 3:return!0;case 5:return f;case 6:return b;case 2:Yn.call(_,f)}else switch(t){case 4:return!1;case 7:Yn.call(_,f)}return r?-1:i||o?o:_}},Xn={forEach:Kn(0),map:Kn(1),filter:Kn(2),some:Kn(3),every:Kn(4),find:Kn(5),findIndex:Kn(6),filterReject:Kn(7)}.filter;function Jn(t,e,n,i,o){return t.left+e+n.width>i.width?(o.style.left="".concat(i.width-n.width-t.left,"px"),!1):(o.style.left="".concat(e,"px"),!0)}function Qn(t,e,n,i){return t.left+t.width-e-n.width<0?(i.style.left="".concat(-t.left,"px"),!1):(i.style.right="".concat(e,"px"),!0)}Zt({target:"Array",proto:!0,forced:!Me("filter")},{filter:function(t){return Xn(this,t,arguments.length>1?arguments[1]:void 0)}});var Zn=Me("splice"),ti=Math.max,ei=Math.min,ni=9007199254740991,ii="Maximum allowed length exceeded";function oi(t,e){t.includes(e)&&t.splice(t.indexOf(e),1)}function ri(t,e,n){var i=this._options.positionPrecedence.slice(),o=pn(),r=wn(e).height+10,l=wn(e).width+20,a=t.getBoundingClientRect(),s="floating";a.bottom+r>o.height&&oi(i,"bottom"),a.top-r<0&&oi(i,"top"),a.right+l>o.width&&oi(i,"right"),a.left-l<0&&oi(i,"left");var c,u,h=-1!==(u=(c=n||"").indexOf("-"))?c.substr(u):"";return n&&(n=n.split("-")[0]),i.length&&(s=i.includes(n)?n:i[0]),["top","bottom"].includes(s)&&(s+=function(t,e,n,i){var o=n.width,r=e/2,l=Math.min(o,window.screen.width),a=["-left-aligned","-middle-aligned","-right-aligned"];return l-t<e&&oi(a,"-left-aligned"),(t<r||l-t<r)&&oi(a,"-middle-aligned"),t<e&&oi(a,"-right-aligned"),a.length?a.includes(i)?i:a[0]:"-middle-aligned"}(a.left,l,o,h)),s}function li(t,e,n,i){var o,r,l,a,s,c="";if(i=i||!1,e.style.top=null,e.style.right=null,e.style.bottom=null,e.style.left=null,e.style.marginLeft=null,e.style.marginTop=null,n.style.display="inherit",this._introItems[this._currentStep])switch(c="string"==typeof(o=this._introItems[this._currentStep]).tooltipClass?o.tooltipClass:this._options.tooltipClass,e.className=["introjs-tooltip",c].filter(Boolean).join(" "),e.setAttribute("role","dialog"),"floating"!==(s=this._introItems[this._currentStep].position)&&this._options.autoPosition&&(s=ri.call(this,t,e,s)),l=wn(t),r=wn(e),a=pn(),un(e,"introjs-".concat(s)),s){case"top-right-aligned":n.className="introjs-arrow bottom-right";var u=0;Qn(l,u,r,e),e.style.bottom="".concat(l.height+20,"px");break;case"top-middle-aligned":n.className="introjs-arrow bottom-middle";var h=l.width/2-r.width/2;i&&(h+=5),Qn(l,h,r,e)&&(e.style.right=null,Jn(l,h,r,a,e)),e.style.bottom="".concat(l.height+20,"px");break;case"top-left-aligned":case"top":n.className="introjs-arrow bottom",Jn(l,i?0:15,r,a,e),e.style.bottom="".concat(l.height+20,"px");break;case"right":e.style.left="".concat(l.width+20,"px"),l.top+r.height>a.height?(n.className="introjs-arrow left-bottom",e.style.top="-".concat(r.height-l.height-20,"px")):n.className="introjs-arrow left";break;case"left":i||!0!==this._options.showStepNumbers||(e.style.top="15px"),l.top+r.height>a.height?(e.style.top="-".concat(r.height-l.height-20,"px"),n.className="introjs-arrow right-bottom"):n.className="introjs-arrow right",e.style.right="".concat(l.width+20,"px");break;case"floating":n.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-".concat(r.width/2,"px"),e.style.marginTop="-".concat(r.height/2,"px");break;case"bottom-right-aligned":n.className="introjs-arrow top-right",Qn(l,u=0,r,e),e.style.top="".concat(l.height+20,"px");break;case"bottom-middle-aligned":n.className="introjs-arrow top-middle",h=l.width/2-r.width/2,i&&(h+=5),Qn(l,h,r,e)&&(e.style.right=null,Jn(l,h,r,a,e)),e.style.top="".concat(l.height+20,"px");break;default:n.className="introjs-arrow top",Jn(l,0,r,a,e),e.style.top="".concat(l.height+20,"px")}}function ai(){n(document.querySelectorAll(".introjs-showElement"),(function(t){In(t,/introjs-[a-zA-Z]+/g)}))}function si(t,e){var n=document.createElement(t);e=e||{};var i=/^(?:role|data-|aria-)/;for(var o in e){var r=e[o];"style"===o?On(n,r):o.match(i)?n.setAttribute(o,r):n[o]=r}return n}function ci(t,e,n){if(n){var i=e.style.opacity||"1";On(e,{opacity:"0"}),window.setTimeout((function(){On(e,{opacity:i})}),10)}t.appendChild(e)}function ui(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}function hi(){var t=document.querySelector(".introjs-disableInteraction");null===t&&(t=si("div",{className:"introjs-disableInteraction"}),this._targetElement.appendChild(t)),Pn.call(this,t)}function fi(t){var e=this,i=si("div",{className:"introjs-bullets"});!1===this._options.showBullets&&(i.style.display="none");var o=si("ul");o.setAttribute("role","tablist");var r=function(){e.goToStep(this.getAttribute("data-stepnumber"))};return n(this._introItems,(function(e,n){var i=e.step,l=si("li"),a=si("a");l.setAttribute("role","presentation"),a.setAttribute("role","tab"),a.onclick=r,n===t.step-1&&(a.className="active"),gn(a),a.innerHTML="&nbsp;",a.setAttribute("data-stepnumber",i),l.appendChild(a),o.appendChild(l)})),i.appendChild(o),i}function pi(t,e){if(this._options.showBullets){var n=document.querySelector(".introjs-bullets");n.parentNode.replaceChild(fi.call(this,e),n)}}function di(t,e){this._options.showBullets&&(t.querySelector(".introjs-bullets li > a.active").className="",t.querySelector('.introjs-bullets li > a[data-stepnumber="'.concat(e.step,'"]')).className="active")}function gi(){var t=si("div");t.className="introjs-progress",!1===this._options.showProgress&&(t.style.display="none");var e=si("div",{className:"introjs-progressbar"});return this._options.progressBarAdditionalClass&&(e.className+=" "+this._options.progressBarAdditionalClass),e.setAttribute("role","progress"),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuemax",100),e.setAttribute("aria-valuenow",ui.call(this)),e.style.cssText="width:".concat(ui.call(this),"%;"),t.appendChild(e),t}function vi(t){t.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:".concat(ui.call(this),"%;"),t.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",ui.call(this))}function mi(t){var e=this;void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var n,i,o,r=this,l=document.querySelector(".introjs-helperLayer"),a=document.querySelector(".introjs-tooltipReferenceLayer"),s="introjs-helperLayer";if("string"==typeof t.highlightClass&&(s+=" ".concat(t.highlightClass)),"string"==typeof this._options.highlightClass&&(s+=" ".concat(this._options.highlightClass)),null!==l&&null!==a){var c=a.querySelector(".introjs-helperNumberLayer"),u=a.querySelector(".introjs-tooltiptext"),h=a.querySelector(".introjs-tooltip-title"),f=a.querySelector(".introjs-arrow"),p=a.querySelector(".introjs-tooltip");o=a.querySelector(".introjs-skipbutton"),i=a.querySelector(".introjs-prevbutton"),n=a.querySelector(".introjs-nextbutton"),l.className=s,p.style.opacity=0,p.style.display="none",fn.call(r,t),Pn.call(r,l),Pn.call(r,a),ai(),r._lastShowElementTimer&&window.clearTimeout(r._lastShowElementTimer),r._lastShowElementTimer=window.setTimeout((function(){null!==c&&(c.innerHTML="".concat(t.step," of ").concat(e._introItems.length)),u.innerHTML=t.intro,h.innerHTML=t.title,p.style.display="block",li.call(r,t.element,p,f),di.call(r,a,t),vi.call(r,a),p.style.opacity=1,(null!=n&&/introjs-donebutton/gi.test(n.className)||null!=n)&&n.focus(),dn.call(r,t.scrollTo,t,u)}),350)}else{var d=si("div",{className:s}),g=si("div",{className:"introjs-tooltipReferenceLayer"}),v=si("div",{className:"introjs-arrow"}),m=si("div",{className:"introjs-tooltip"}),b=si("div",{className:"introjs-tooltiptext"}),y=si("div",{className:"introjs-tooltip-header"}),w=si("h1",{className:"introjs-tooltip-title"}),_=si("div");On(d,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(r._options.overlayOpacity.toString(),") 0 0 0 5000px")}),fn.call(r,t),Pn.call(r,d),Pn.call(r,g),ci(this._targetElement,d,!0),ci(this._targetElement,g),b.innerHTML=t.intro,w.innerHTML=t.title,_.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(_.style.display="none"),y.appendChild(w),m.appendChild(y),m.appendChild(b),m.appendChild(fi.call(this,t)),m.appendChild(gi.call(this));var x=si("div");!0===this._options.showStepNumbers&&(x.className="introjs-helperNumberLayer",x.innerHTML="".concat(t.step," of ").concat(this._introItems.length),m.appendChild(x)),m.appendChild(v),g.appendChild(m),(n=si("a")).onclick=function(){r._introItems.length-1!==r._currentStep?wi.call(r):/introjs-donebutton/gi.test(n.className)&&("function"==typeof r._introCompleteCallback&&r._introCompleteCallback.call(r),oo.call(r,r._targetElement))},gn(n),n.innerHTML=this._options.nextLabel,(i=si("a")).onclick=function(){0!==r._currentStep&&_i.call(r)},gn(i),i.innerHTML=this._options.prevLabel,gn(o=si("a",{className:"introjs-skipbutton"})),o.innerHTML=this._options.skipLabel,o.onclick=function(){r._introItems.length-1===r._currentStep&&"function"==typeof r._introCompleteCallback&&r._introCompleteCallback.call(r),"function"==typeof r._introSkipCallback&&r._introSkipCallback.call(r),oo.call(r,r._targetElement)},y.appendChild(o),this._introItems.length>1&&_.appendChild(i),_.appendChild(n),m.appendChild(_),li.call(r,t.element,m,v),dn.call(this,t.scrollTo,t,m)}var j=r._targetElement.querySelector(".introjs-disableInteraction");j&&j.parentNode.removeChild(j),t.disableInteraction&&hi.call(r),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className="".concat(this._options.buttonClass," introjs-nextbutton"),n.innerHTML=this._options.nextLabel),!0===this._options.hidePrev?(null!=i&&(i.className="".concat(this._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=n&&un(n,"introjs-fullbutton")):null!=i&&(i.className="".concat(this._options.buttonClass," introjs-prevbutton introjs-disabled"))):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=i&&(i.className="".concat(this._options.buttonClass," introjs-prevbutton")),!0===this._options.hideNext?(null!=n&&(n.className="".concat(this._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=i&&un(i,"introjs-fullbutton")):null!=n&&(!0===this._options.nextToDone?(n.innerHTML=this._options.doneLabel,un(n,"".concat(this._options.buttonClass," introjs-nextbutton introjs-donebutton"))):n.className="".concat(this._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=i&&(i.className="".concat(this._options.buttonClass," introjs-prevbutton")),null!=n&&(n.className="".concat(this._options.buttonClass," introjs-nextbutton"),n.innerHTML=this._options.nextLabel)),null!=i&&i.setAttribute("role","button"),null!=n&&n.setAttribute("role","button"),null!=o&&o.setAttribute("role","button"),null!=n&&n.focus(),function(t){var e=t.element;un(e,"introjs-showElement");var n=hn(e,"position");"absolute"!==n&&"relative"!==n&&"sticky"!==n&&"fixed"!==n&&un(e,"introjs-relativePosition")}(t),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function bi(t){this._currentStep=t-2,void 0!==this._introItems&&wi.call(this)}function yi(t){this._currentStepNumber=t,void 0!==this._introItems&&wi.call(this)}function wi(){var t=this;this._direction="forward",void 0!==this._currentStepNumber&&n(this._introItems,(function(e,n){e.step===t._currentStepNumber&&(t._currentStep=n-1,t._currentStepNumber=void 0)})),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var e=this._introItems[this._currentStep],i=!0;return void 0!==this._introBeforeChangeCallback&&(i=this._introBeforeChangeCallback.call(this,e&&e.element)),!1===i?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void oo.call(this,this._targetElement)):void mi.call(this,e)}function _i(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var t=this._introItems[this._currentStep],e=!0;if(void 0!==this._introBeforeChangeCallback&&(e=this._introBeforeChangeCallback.call(this,t&&t.element)),!1===e)return++this._currentStep,!1;mi.call(this,t)}function xi(){return this._currentStep}function ji(t){var e=void 0===t.code?t.which:t.code;if(null===e&&(e=null===t.charCode?t.keyCode:t.charCode),"Escape"!==e&&27!==e||!0!==this._options.exitOnEsc){if("ArrowLeft"===e||37===e)_i.call(this);else if("ArrowRight"===e||39===e)wi.call(this);else if("Enter"===e||"NumpadEnter"===e||13===e){var n=t.target||t.srcElement;n&&n.className.match("introjs-prevbutton")?_i.call(this):n&&n.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),oo.call(this,this._targetElement)):n&&n.getAttribute("data-stepnumber")?n.click():wi.call(this),t.preventDefault?t.preventDefault():t.returnValue=!1}}else oo.call(this,this._targetElement)}function Ci(e){if(null===e||"object"!==t(e)||void 0!==e.nodeType)return e;var n={};for(var i in e)void 0!==window.jQuery&&e[i]instanceof window.jQuery?n[i]=e[i]:n[i]=Ci(e[i]);return n}function Si(t){var e=document.querySelector(".introjs-hints");return e?e.querySelectorAll(t):[]}function Ei(t){var e=Si('.introjs-hint[data-step="'.concat(t,'"]'))[0];qi.call(this),e&&un(e,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,t)}function Ai(){var t=this;n(Si(".introjs-hint"),(function(e){Ei.call(t,e.getAttribute("data-step"))}))}function ki(){var t=this,e=Si(".introjs-hint");e&&e.length?n(e,(function(e){Ti.call(t,e.getAttribute("data-step"))})):Ri.call(this,this._targetElement)}function Ti(t){var e=Si('.introjs-hint[data-step="'.concat(t,'"]'))[0];e&&In(e,/introjs-hidehint/g)}function Ni(){var t=this;n(Si(".introjs-hint"),(function(e){Ii.call(t,e.getAttribute("data-step"))}))}function Ii(t){var e=Si('.introjs-hint[data-step="'.concat(t,'"]'))[0];e&&e.parentNode.removeChild(e)}function Oi(){var t=this,e=this,i=document.querySelector(".introjs-hints");null===i&&(i=si("div",{className:"introjs-hints"}));n(this._introItems,(function(n,o){if(!document.querySelector('.introjs-hint[data-step="'.concat(o,'"]'))){var r=si("a",{className:"introjs-hint"});gn(r),r.onclick=function(t){return function(n){var i=n||window.event;i.stopPropagation&&i.stopPropagation(),null!==i.cancelBubble&&(i.cancelBubble=!0),Li.call(e,t)}}(o),n.hintAnimation||un(r,"introjs-hint-no-anim"),yn(n.element)&&un(r,"introjs-fixedhint");var l=si("div",{className:"introjs-hint-dot"}),a=si("div",{className:"introjs-hint-pulse"});r.appendChild(l),r.appendChild(a),r.setAttribute("data-step",o),n.targetElement=n.element,n.element=r,Pi.call(t,n.hintPosition,r,n.targetElement),i.appendChild(r)}})),document.body.appendChild(i),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}function Pi(t,e,n){var i=e.style,o=wn.call(this,n),r=20,l=20;switch(t){default:case"top-left":i.left="".concat(o.left,"px"),i.top="".concat(o.top,"px");break;case"top-right":i.left="".concat(o.left+o.width-r,"px"),i.top="".concat(o.top,"px");break;case"bottom-left":i.left="".concat(o.left,"px"),i.top="".concat(o.top+o.height-l,"px");break;case"bottom-right":i.left="".concat(o.left+o.width-r,"px"),i.top="".concat(o.top+o.height-l,"px");break;case"middle-left":i.left="".concat(o.left,"px"),i.top="".concat(o.top+(o.height-l)/2,"px");break;case"middle-right":i.left="".concat(o.left+o.width-r,"px"),i.top="".concat(o.top+(o.height-l)/2,"px");break;case"middle-middle":i.left="".concat(o.left+(o.width-r)/2,"px"),i.top="".concat(o.top+(o.height-l)/2,"px");break;case"bottom-middle":i.left="".concat(o.left+(o.width-r)/2,"px"),i.top="".concat(o.top+o.height-l,"px");break;case"top-middle":i.left="".concat(o.left+(o.width-r)/2,"px"),i.top="".concat(o.top,"px")}}function Li(t){var e=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),n=this._introItems[t];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,e,n,t);var i=qi.call(this);if(parseInt(i,10)!==t){var o=si("div",{className:"introjs-tooltip"}),r=si("div"),l=si("div"),a=si("div");o.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},r.className="introjs-tooltiptext";var s=si("p");s.innerHTML=n.hint;var c=si("a");c.className=this._options.buttonClass,c.setAttribute("role","button"),c.innerHTML=this._options.hintButtonLabel,c.onclick=Ei.bind(this,t),r.appendChild(s),r.appendChild(c),l.className="introjs-arrow",o.appendChild(l),o.appendChild(r),this._currentStep=e.getAttribute("data-step"),a.className="introjs-tooltipReferenceLayer introjs-hintReference",a.setAttribute("data-step",e.getAttribute("data-step")),Pn.call(this,a),a.appendChild(o),document.body.appendChild(a),li.call(this,e,o,l,!0)}}function qi(){var t=document.querySelector(".introjs-hintReference");if(t){var e=t.getAttribute("data-step");return t.parentNode.removeChild(t),e}}function Ri(t){var e=this;if(this._introItems=[],this._options.hints)n(this._options.hints,(function(t){var n=Ci(t);"string"==typeof n.element&&(n.element=document.querySelector(n.element)),n.hintPosition=n.hintPosition||e._options.hintPosition,n.hintAnimation=n.hintAnimation||e._options.hintAnimation,null!==n.element&&e._introItems.push(n)}));else{var o=t.querySelectorAll("*[data-hint]");if(!o||!o.length)return!1;n(o,(function(t){var n=t.getAttribute("data-hintanimation");n=n?"true"===n:e._options.hintAnimation,e._introItems.push({element:t,hint:t.getAttribute("data-hint"),hintPosition:t.getAttribute("data-hintposition")||e._options.hintPosition,hintAnimation:n,tooltipClass:t.getAttribute("data-tooltipclass"),position:t.getAttribute("data-position")||e._options.tooltipPosition})}))}Oi.call(this),i.on(document,"click",qi,this,!1),i.on(window,"resize",Mi,this,!0)}function Mi(){var t=this;n(this._introItems,(function(e){var n=e.targetElement,i=e.hintPosition,o=e.element;void 0!==n&&Pi.call(t,i,o,n)}))}Zt({target:"Array",proto:!0,forced:!Zn},{splice:function(t,e){var n,i,o,r,l,a,s=B(this),c=It(s.length),u=Lt(t,c),h=arguments.length;if(0===h?n=i=0:1===h?(n=0,i=c-u):(n=h-2,i=ei(ti(Tt(e),0),c-u)),c+n-i>ni)throw TypeError(ii);for(o=qe(s,i),r=0;r<i;r++)(l=u+r)in s&&Pe(o,r,s[l]);if(o.length=i,n<i){for(r=u;r<c-i;r++)a=r+n,(l=r+i)in s?s[a]=s[l]:delete s[a];for(r=c;r>c-i+n;r--)delete s[r-1]}else if(n>i)for(r=c-i;r>u;r--)a=r+n-1,(l=r+i-1)in s?s[a]=s[l]:delete s[a];for(r=0;r<n;r++)s[r+u]=arguments[r+2];return s.length=c-i+n,o}});var Bi=Math.floor,Hi=function(t,e){var n=t.length,i=Bi(n/2);return n<8?$i(t,e):Di(Hi(t.slice(0,i),e),Hi(t.slice(i),e),e)},$i=function(t,e){for(var n,i,o=t.length,r=1;r<o;){for(i=r,n=t[r];i&&e(t[i-1],n)>0;)t[i]=t[--i];i!==r++&&(t[i]=n)}return t},Di=function(t,e,n){for(var i=t.length,o=e.length,r=0,l=0,a=[];r<i||l<o;)r<i&&l<o?a.push(n(t[r],e[l])<=0?t[r++]:e[l++]):a.push(r<i?t[r++]:e[l++]);return a},Fi=Hi,zi=S.match(/firefox\/(\d+)/i),Wi=!!zi&&+zi[1],Vi=/MSIE|Trident/.test(S),Ui=S.match(/AppleWebKit\/(\d+)\./),Gi=!!Ui&&+Ui[1],Yi=[],Ki=Yi.sort,Xi=u((function(){Yi.sort(void 0)})),Ji=u((function(){Yi.sort(null)})),Qi=Wn("sort"),Zi=!u((function(){if(N)return N<70;if(!(Wi&&Wi>3)){if(Vi)return!0;if(Gi)return Gi<603;var t,e,n,i,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Yi.push({k:e+i,v:n})}for(Yi.sort((function(t,e){return e.v-t.v})),i=0;i<Yi.length;i++)e=Yi[i].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));function to(t){var e=this,i=t.querySelectorAll("*[data-intro]"),o=[];if(this._options.steps)n(this._options.steps,(function(t){var n=Ci(t);if(n.step=o.length+1,n.title=n.title||"","string"==typeof n.element&&(n.element=document.querySelector(n.element)),void 0===n.element||null===n.element){var i=document.querySelector(".introjsFloatingElement");null===i&&(i=si("div",{className:"introjsFloatingElement"}),document.body.appendChild(i)),n.element=i,n.position="floating"}n.position=n.position||e._options.tooltipPosition,n.scrollTo=n.scrollTo||e._options.scrollTo,void 0===n.disableInteraction&&(n.disableInteraction=e._options.disableInteraction),null!==n.element&&o.push(n)}));else{var r;if(i.length<1)return[];n(i,(function(t){if((!e._options.group||t.getAttribute("data-intro-group")===e._options.group)&&"none"!==t.style.display){var n=parseInt(t.getAttribute("data-step"),10);r=t.hasAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):e._options.disableInteraction,n>0&&(o[n-1]={element:t,title:t.getAttribute("data-title")||"",intro:t.getAttribute("data-intro"),step:parseInt(t.getAttribute("data-step"),10),tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||e._options.scrollTo,disableInteraction:r})}}));var l=0;n(i,(function(t){if((!e._options.group||t.getAttribute("data-intro-group")===e._options.group)&&null===t.getAttribute("data-step")){for(;void 0!==o[l];)l++;r=t.hasAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):e._options.disableInteraction,o[l]={element:t,title:t.getAttribute("data-title")||"",intro:t.getAttribute("data-intro"),step:l+1,tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||e._options.scrollTo,disableInteraction:r}}}))}for(var a=[],s=0;s<o.length;s++)o[s]&&a.push(o[s]);return(o=a).sort((function(t,e){return t.step-e.step})),o}function eo(t){var e=document.querySelector(".introjs-tooltipReferenceLayer"),n=document.querySelector(".introjs-helperLayer"),i=document.querySelector(".introjs-disableInteraction");if(Pn.call(this,n),Pn.call(this,e),Pn.call(this,i),t&&(this._introItems=to.call(this,this._targetElement),pi.call(this,e,this._introItems[this._currentStep]),vi.call(this,e)),void 0!==this._currentStep&&null!==this._currentStep){var o=document.querySelector(".introjs-arrow"),r=document.querySelector(".introjs-tooltip");li.call(this,this._introItems[this._currentStep].element,r,o)}return Mi.call(this),this}function no(){eo.call(this)}function io(t,e){if(t&&t.parentElement){var n=t.parentElement;e?(On(t,{opacity:"0"}),window.setTimeout((function(){try{n.removeChild(t)}catch(t){}}),500)):n.removeChild(t)}}function oo(t,e){var o=!0;if(void 0!==this._introBeforeExitCallback&&(o=this._introBeforeExitCallback.call(this)),e||!1!==o){var r=t.querySelectorAll(".introjs-overlay");r&&r.length&&n(r,(function(t){return io(t)})),io(t.querySelector(".introjs-helperLayer"),!0),io(t.querySelector(".introjs-tooltipReferenceLayer")),io(t.querySelector(".introjs-disableInteraction")),io(document.querySelector(".introjsFloatingElement")),ai(),i.off(window,"keydown",ji,this,!0),i.off(window,"resize",no,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function ro(t){var e=this,n=si("div",{className:"introjs-overlay"});return On(n,{top:0,bottom:0,left:0,right:0,position:"fixed"}),t.appendChild(n),!0===this._options.exitOnOverlayClick&&(On(n,{cursor:"pointer"}),n.onclick=function(){oo.call(e,t)}),!0}function lo(t){var e=to.call(this,t);return 0===e.length||(this._introItems=e,ro.call(this,t)&&(wi.call(this),this._options.keyboardNavigation&&i.on(window,"keydown",ji,this,!0),i.on(window,"resize",no,this,!0))),!1}Zt({target:"Array",proto:!0,forced:Xi||!Ji||!Qi||!Zi},{sort:function(t){void 0!==t&&on(t);var e=B(this);if(Zi)return void 0===t?Ki.call(e):Ki.call(e,t);var n,i,o=[],r=It(e.length);for(i=0;i<r;i++)i in e&&o.push(e[i]);for(n=(o=Fi(o,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:te(e)>te(n)?1:-1}}(t))).length,i=0;i<n;)e[i]=o[i++];for(;i<r;)delete e[i++];return e}});function ao(t){this._targetElement=t,this._introItems=[],this._options={nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}var so=function n(i){var o;if("object"===t(i))o=new ao(i);else if("string"==typeof i){var r=document.querySelector(i);if(!r)throw new Error("There is no element with given selector.");o=new ao(r)}else o=new ao(document.body);return n.instances[e(o,"introjs-instance")]=o,o};return so.version="4.2.2",so.instances={},so.fn=ao.prototype={clone:function(){return new ao(this)},setOption:function(t,e){return this._options[t]=e,this},setOptions:function(t){return this._options=function(t,e){var n,i={};for(n in t)i[n]=t[n];for(n in e)i[n]=e[n];return i}(this._options,t),this},start:function(){return lo.call(this,this._targetElement),this},goToStep:function(t){return bi.call(this,t),this},addStep:function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},addSteps:function(t){if(t.length){for(var e=0;e<t.length;e++)this.addStep(t[e]);return this}},goToStepNumber:function(t){return yi.call(this,t),this},nextStep:function(){return wi.call(this),this},previousStep:function(){return _i.call(this),this},currentStep:function(){return xi.call(this)},exit:function(t){return oo.call(this,this._targetElement,t),this},refresh:function(t){return eo.call(this,t),this},onbeforechange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},onchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},onafterchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},oncomplete:function(t){if("function"!=typeof t)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},onhintsadded:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},onhintclick:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},onhintclose:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},onexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},onskip:function(t){if("function"!=typeof t)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},onbeforeexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},addHints:function(){return Ri.call(this,this._targetElement),this},hideHint:function(t){return Ei.call(this,t),this},hideHints:function(){return Ai.call(this),this},showHint:function(t){return Ti.call(this,t),this},showHints:function(){return ki.call(this),this},removeHints:function(){return Ni.call(this),this},removeHint:function(t){return Ii().call(this,t),this},showHintDialog:function(t){return Li.call(this,t),this}},so}));
includes/classes/class-sbp-advanced-cache-generator.php CHANGED
@@ -14,22 +14,22 @@ class SBP_Advanced_Cache_Generator {
14
  '\'__SEPARATE_MOBILE_CACHING__\';' => [
15
  'option_name' => 'caching_separate_mobile',
16
  'method_name' => 'separate_mobile_caching',
17
- 'default_value' => "''",
18
  ],
19
- '\'{{__CACHING_QUERY_STRING_INCLUDES__}}\'' => [
20
  'option_name' => 'caching_include_query_strings',
21
  'method_name' => 'caching_query_string_includes',
22
- 'default_value' => "''",
23
  ],
24
  '\'{{__CACHING_EXPIRY__}}\'' => [
25
  'option_name' => 'caching_expiry',
26
  'method_name' => 'caching_expiry',
27
- 'default_value' => '1',
28
  ],
29
- '\'{{__CACHING_EXCLUDE_URLS__}}\'' => [
30
  'option_name' => 'caching_exclude_urls',
31
  'method_name' => 'caching_exclude_urls',
32
- 'default_value' => "''",
33
  ],
34
  '\'{{__CACHING_EXCLUDE_COOKIES__}}\'' => [
35
  'option_name' => 'caching_exclude_cookies',
@@ -63,7 +63,7 @@ class SBP_Advanced_Cache_Generator {
63
 
64
  $replace_content = $props['default_value'];
65
 
66
- if ( $option_value !== false ) {
67
  $replace_content = call_user_func( $method_name );
68
  }
69
 
@@ -80,27 +80,27 @@ class SBP_Advanced_Cache_Generator {
80
  }
81
 
82
  private static function caching_query_string_includes() {
83
- return '\'' . addslashes( self::$options['caching_include_query_strings'] ) . '\'';
84
  }
85
 
86
  private static function caching_exclude_urls() {
87
- return '\'' . addslashes( self::$options['caching_exclude_urls'] ) . '\'';
88
  }
89
 
90
  private static function caching_exclude_cookies() {
91
- $arrayString = '';
92
  $excluded_cookies = self::$options['caching_exclude_cookies'];
93
  if ( $excluded_cookies ) {
94
  $cookies = SBP_Utils::explode_lines( $excluded_cookies );
95
  foreach ( $cookies as $cookie ) {
96
  if ( $cookie ) {
97
  $cookie = addslashes( $cookie );
98
- $arrayString .= "'$cookie', ";
99
  }
100
  }
101
  }
102
 
103
- return $arrayString;
104
  }
105
 
106
  private static function caching_expiry() {
14
  '\'__SEPARATE_MOBILE_CACHING__\';' => [
15
  'option_name' => 'caching_separate_mobile',
16
  'method_name' => 'separate_mobile_caching',
17
+ 'default_value' => "",
18
  ],
19
+ '{{__CACHING_QUERY_STRING_INCLUDES__}}' => [
20
  'option_name' => 'caching_include_query_strings',
21
  'method_name' => 'caching_query_string_includes',
22
+ 'default_value' => "",
23
  ],
24
  '\'{{__CACHING_EXPIRY__}}\'' => [
25
  'option_name' => 'caching_expiry',
26
  'method_name' => 'caching_expiry',
27
+ 'default_value' => '10',
28
  ],
29
+ '{{__CACHING_EXCLUDE_URLS__}}' => [
30
  'option_name' => 'caching_exclude_urls',
31
  'method_name' => 'caching_exclude_urls',
32
+ 'default_value' => "",
33
  ],
34
  '\'{{__CACHING_EXCLUDE_COOKIES__}}\'' => [
35
  'option_name' => 'caching_exclude_cookies',
63
 
64
  $replace_content = $props['default_value'];
65
 
66
+ if ( $option_value != false ) {
67
  $replace_content = call_user_func( $method_name );
68
  }
69
 
80
  }
81
 
82
  private static function caching_query_string_includes() {
83
+ return addslashes( self::$options['caching_include_query_strings'] );
84
  }
85
 
86
  private static function caching_exclude_urls() {
87
+ return addslashes( self::$options['caching_exclude_urls'] );
88
  }
89
 
90
  private static function caching_exclude_cookies() {
91
+ $array_string = '';
92
  $excluded_cookies = self::$options['caching_exclude_cookies'];
93
  if ( $excluded_cookies ) {
94
  $cookies = SBP_Utils::explode_lines( $excluded_cookies );
95
  foreach ( $cookies as $cookie ) {
96
  if ( $cookie ) {
97
  $cookie = addslashes( $cookie );
98
+ $array_string .= "'$cookie', ";
99
  }
100
  }
101
  }
102
 
103
+ return $array_string;
104
  }
105
 
106
  private static function caching_expiry() {
includes/classes/class-sbp-cache-warmup.php CHANGED
@@ -47,46 +47,88 @@ class SBP_Cache_Warmup extends SBP_Abstract_Module {
47
  $home_url = get_home_url();
48
 
49
  $remote_get_args = [
50
- 'timeout' => 10,
51
  'user-agent' => 'Speed Booster Pack/Cache Warmup',
52
- 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), // WPCS: prefix ok.
53
  ];
54
 
55
  $response = wp_remote_get( $home_url, $remote_get_args );
56
  if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
57
- $transient = get_transient( 'sbp_warmup_errors' );
58
- $errors = is_array( $transient ) ? $transient : [];
59
- $errors['errors'][] = __( 'Error occured while processing home page url', 'speed-booster' );
60
-
61
  return false;
62
  } else {
63
- $urls = [];
64
- $body = wp_remote_retrieve_body( $response );
65
- $dom = new HtmlDocument();
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  $dom->load( $body, true, false );
 
67
  foreach ( $dom->find( 'a' ) as $anchor_tag ) {
68
  $href = $anchor_tag->href;
 
 
 
 
 
 
 
69
  if ( substr( $href, 0, 1 ) == '#' ) {
70
  continue;
71
  }
 
72
  $remote_url_host = wp_parse_url( $href, PHP_URL_HOST );
73
  $home_url_host = wp_parse_url( $home_url, PHP_URL_HOST );
 
74
  // Check if relative url or includes home url
75
- if ( substr( $href, 0, 1 ) !== '/' && $remote_url_host !== $home_url_host ) {
 
 
 
 
 
 
 
 
 
76
  continue;
77
  }
78
 
 
 
 
 
79
  if ( ! in_array( $href, $urls ) ) {
80
  $urls[] = $href;
81
- $this->warmup_process->push_to_queue( [ 'url' => $href ] );
82
- if ( sbp_get_option( 'caching_separate_mobile' ) ) {
83
- $this->warmup_process->push_to_queue( [
84
- 'url' => $href,
85
- 'options' => [ 'user-agent' => 'Mobile' ],
86
- ] );
87
- }
88
  }
89
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  $this->warmup_process->save()->dispatch();
91
  }
92
 
47
  $home_url = get_home_url();
48
 
49
  $remote_get_args = [
50
+ 'timeout' => 5,
51
  'user-agent' => 'Speed Booster Pack/Cache Warmup',
52
+ 'sslverify' => false,
53
  ];
54
 
55
  $response = wp_remote_get( $home_url, $remote_get_args );
56
  if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
 
 
 
 
57
  return false;
58
  } else {
59
+ $urls = [];
60
+ $exclude_urls = SBP_Utils::explode_lines( sbp_get_option( 'caching_exclude_urls' ) );
61
+
62
+ // Add WooCommerce pages to excluded urls
63
+ if ( function_exists( 'wc_get_checkout_url' ) ) {
64
+ $checkout_url = wc_get_checkout_url();
65
+ $exclude_urls[] = rtrim( parse_url( $checkout_url, PHP_URL_HOST ) . parse_url( $checkout_url, PHP_URL_PATH ), '/' );
66
+ }
67
+
68
+ if ( function_exists( 'wc_get_cart_url' ) ) {
69
+ $cart_url = wc_get_cart_url();
70
+ $exclude_urls[] = rtrim( parse_url( $cart_url, PHP_URL_HOST ) . parse_url( $cart_url, PHP_URL_PATH ), '/' );
71
+ }
72
+
73
+ $body = wp_remote_retrieve_body( $response );
74
+ $dom = new HtmlDocument();
75
  $dom->load( $body, true, false );
76
+
77
  foreach ( $dom->find( 'a' ) as $anchor_tag ) {
78
  $href = $anchor_tag->href;
79
+
80
+ // Excluded URL's
81
+ $current_url = rtrim( parse_url( $href, PHP_URL_HOST ) . parse_url( $href, PHP_URL_PATH ), '/' );
82
+ if ( count( $exclude_urls ) > 0 && in_array( $current_url, $exclude_urls ) ) {
83
+ continue;
84
+ }
85
+
86
  if ( substr( $href, 0, 1 ) == '#' ) {
87
  continue;
88
  }
89
+
90
  $remote_url_host = wp_parse_url( $href, PHP_URL_HOST );
91
  $home_url_host = wp_parse_url( $home_url, PHP_URL_HOST );
92
+
93
  // Check if relative url or includes home url
94
+ if (
95
+ ! (
96
+ ( strpos( $href, 'http://' ) === 0 && strlen( $href ) > 7 ) ||
97
+ ( strpos( $href, 'https://' ) === 0 && strlen( $href ) > 8 ) ||
98
+ substr( $href, 0, 2 ) != '//'
99
+ ) ||
100
+ ( strpos( $href, '/' ) !== 0 && $remote_url_host != $home_url_host ) ||
101
+ ! trim( $href ) ||
102
+ rtrim( $href, '/' ) == $home_url
103
+ ) {
104
  continue;
105
  }
106
 
107
+ if ( substr( $href, 0, 1 ) == '/' ) {
108
+ $href = rtrim( $home_url, '/' ) . $href;
109
+ }
110
+
111
  if ( ! in_array( $href, $urls ) ) {
112
  $urls[] = $href;
 
 
 
 
 
 
 
113
  }
114
  }
115
+
116
+ $urls = apply_filters( 'sbp_cache_warmup_urls', $urls );
117
+
118
+ foreach ( $urls as $url ) {
119
+ $this->warmup_process->push_to_queue( [
120
+ 'url' => $url,
121
+ 'options' => [ 'user-agent' => 'Speed Booster Pack/Cache Warmup' ],
122
+ ] );
123
+
124
+ if ( sbp_get_option( 'caching_separate_mobile' ) ) {
125
+ $this->warmup_process->push_to_queue( [
126
+ 'url' => $url,
127
+ 'options' => [ 'user-agent' => 'Mobile' ],
128
+ ] );
129
+ }
130
+ }
131
+
132
  $this->warmup_process->save()->dispatch();
133
  }
134
 
includes/classes/class-sbp-lazy-loader.php CHANGED
@@ -33,7 +33,7 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
33
  }
34
 
35
  function add_lazy_load_script() {
36
- wp_enqueue_script( 'sbp-lazy-load', SBP_URL . 'public/js/lazyload.js', false, '17.3.0', true );
37
  $lazy_loader_script = 'window.lazyLoadOptions = {
38
  elements_selector: "[loading=lazy]"
39
  };
33
  }
34
 
35
  function add_lazy_load_script() {
36
+ wp_enqueue_script( 'sbp-lazy-load', SBP_URL . 'public/js/lazyload.js', false, '17.5.0', true );
37
  $lazy_loader_script = 'window.lazyLoadOptions = {
38
  elements_selector: "[loading=lazy]"
39
  };
includes/classes/class-sbp-newsletter.php CHANGED
@@ -15,18 +15,20 @@ class SBP_Newsletter {
15
  }
16
 
17
  function my_admin_enqueue_scripts() {
18
- // Check timestamp
19
- $display_time = get_user_meta( get_current_user_id(), 'sbp_newsletter_display_time', true );
20
- if ( ! $display_time ) {
21
- $display_time = strtotime('+1 day');
22
- update_user_meta( get_current_user_id(), 'sbp_newsletter_display_time', $display_time );
23
- }
 
 
24
 
25
- if ( time() > $display_time && current_user_can( 'manage_options' ) && ! get_user_meta( get_current_user_id(), 'sbp_hide_newsletter_pointer', true ) ) {
26
- wp_enqueue_style( 'wp-pointer' );
27
- wp_enqueue_script( 'wp-pointer' );
28
- add_action( 'admin_print_footer_scripts', [ $this, 'my_admin_print_footer_scripts' ] );
29
- }
30
  }
31
 
32
  function my_admin_print_footer_scripts() {
15
  }
16
 
17
  function my_admin_enqueue_scripts() {
18
+ // Check timestamp
19
+ if ( current_user_can( 'manage_options' ) ) {
20
+ $display_time = get_user_meta( get_current_user_id(), 'sbp_newsletter_display_time', true );
21
+ if ( ! $display_time ) {
22
+ $display_time = strtotime( '+1 day' );
23
+ update_user_meta( get_current_user_id(), 'sbp_newsletter_display_time', $display_time );
24
+ }
25
+ }
26
 
27
+ if ( time() > $display_time && current_user_can( 'manage_options' ) && ! get_user_meta( get_current_user_id(), 'sbp_hide_newsletter_pointer', true ) ) {
28
+ wp_enqueue_style( 'wp-pointer' );
29
+ wp_enqueue_script( 'wp-pointer' );
30
+ add_action( 'admin_print_footer_scripts', [ $this, 'my_admin_print_footer_scripts' ] );
31
+ }
32
  }
33
 
34
  function my_admin_print_footer_scripts() {
includes/classes/class-sbp-notice-manager.php CHANGED
@@ -16,13 +16,22 @@ class SBP_Notice_Manager {
16
  add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
17
  }
18
 
19
- public function dismiss_notice() {
20
- if ( isset( $_GET['action'] ) && $_GET['action'] == 'sbp_dismiss_notice' && current_user_can( 'manage_options' ) ) { // Dismiss notice for ever
21
- $id = $_GET['notice_id'];
22
- $dismissed_notices = self::get_dismissed_notices();
 
 
 
 
 
 
 
23
  $dismissed_notices[] = $id;
24
  update_user_meta( get_current_user_id(), 'sbp_dismissed_notices', $dismissed_notices );
25
- wp_die();
 
 
26
  }
27
  }
28
 
@@ -80,6 +89,7 @@ class SBP_Notice_Manager {
80
 
81
  public static function should_display( $id ) {
82
  $dismissed_notices = self::get_dismissed_notices();
 
83
  return ! in_array( $id, $dismissed_notices );
84
  }
85
 
16
  add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
17
  }
18
 
19
+ public static function dismiss_notice( $id = null ) {
20
+ $is_ajax = false;
21
+ if ( $id == null ) {
22
+ $is_ajax = true;
23
+ if ( isset( $_GET['action'] ) && $_GET['action'] == 'sbp_dismiss_notice' ) {
24
+ $id = $_GET['notice_id'];
25
+ }
26
+ }
27
+
28
+ if ( $id && current_user_can( 'manage_options' ) ) { // Dismiss notice for ever
29
+ $dismissed_notices = self::get_dismissed_notices();
30
  $dismissed_notices[] = $id;
31
  update_user_meta( get_current_user_id(), 'sbp_dismissed_notices', $dismissed_notices );
32
+ if ( $is_ajax ) {
33
+ wp_die();
34
+ }
35
  }
36
  }
37
 
89
 
90
  public static function should_display( $id ) {
91
  $dismissed_notices = self::get_dismissed_notices();
92
+
93
  return ! in_array( $id, $dismissed_notices );
94
  }
95
 
includes/classes/class-sbp-warmup-process.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'WPINC' ) ) {
8
  }
9
 
10
  class SBP_Warmup_Process extends \WP_Background_Process {
11
- protected $action = 'warmup';
12
  private $begun = false;
13
 
14
  protected function task( $item ) {
@@ -19,10 +19,9 @@ class SBP_Warmup_Process extends \WP_Background_Process {
19
 
20
  $options = isset( $item['options'] ) ? $item['options'] : [];
21
  $args = array_merge( [
22
- 'blocking' => false,
23
- 'compress' => true,
24
- 'httpversion' => '1.1',
25
- 'limit_response_size' => 100,
26
  ],
27
  $options );
28
 
@@ -37,7 +36,6 @@ class SBP_Warmup_Process extends \WP_Background_Process {
37
 
38
  protected function complete() {
39
  delete_transient( 'sbp_warmup_started' );
40
- set_transient( 'sbp_warmup_completed', 1 );
41
  parent::complete();
42
  }
43
  }
8
  }
9
 
10
  class SBP_Warmup_Process extends \WP_Background_Process {
11
+ protected $action = 'sbp_cache_warmup';
12
  private $begun = false;
13
 
14
  protected function task( $item ) {
19
 
20
  $options = isset( $item['options'] ) ? $item['options'] : [];
21
  $args = array_merge( [
22
+ 'blocking' => false,
23
+ 'httpversion' => '1.1',
24
+ 'timeout' => 0.01,
 
25
  ],
26
  $options );
27
 
36
 
37
  protected function complete() {
38
  delete_transient( 'sbp_warmup_started' );
 
39
  parent::complete();
40
  }
41
  }
includes/classes/class-sbp-wp-admin.php CHANGED
@@ -16,7 +16,10 @@ class SBP_WP_Admin {
16
  $this->initialize_announce4wp();
17
 
18
  add_action( 'admin_init', [ $this, 'timed_notifications' ] );
 
19
  add_action( 'admin_head', [ $this, 'check_required_file_permissions' ] );
 
 
20
  }
21
 
22
  add_filter( 'plugin_row_meta', [ $this, 'plugin_meta_links' ], 10, 2 );
@@ -142,10 +145,10 @@ class SBP_WP_Admin {
142
 
143
  // Set Cloudflare Notice
144
  $cf_transient_value = get_transient( 'sbp_notice_cloudflare' );
145
- if ($cf_transient_value == 1) {
146
  $notice_message = __( 'Cloudflare cache cleared.', 'speed-booster-pack' );
147
  $notice_type = 'success';
148
- } else if ($cf_transient_value == 2) {
149
  $notice_message = __( 'Error occured while clearing Cloudflare cache. Possible reason: Credentials invalid.', 'speed-booster-pack' );
150
  $notice_type = 'error';
151
  } else {
@@ -196,39 +199,10 @@ class SBP_WP_Admin {
196
 
197
  // Warmup Started Notice
198
  SBP_Notice_Manager::display_notice( 'sbp_warmup_started',
199
- '<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' . __( 'Cache warmup started.', 'speed-booster-pack' ) . '</p>',
200
  'info',
201
  true,
202
  'recurrent' );
203
-
204
- // Warmup Completed Notice
205
- SBP_Notice_Manager::display_notice( 'sbp_warmup_completed',
206
- '<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' . __( 'Cache warmup completed.', 'speed-booster-pack' ) . '</p>',
207
- 'success',
208
- true,
209
- 'recurrent' );
210
-
211
- // WP-Config File Error
212
- if ( get_transient( 'sbp_warmup_errors' ) ) {
213
- $list = '';
214
- $errors = get_transient( 'sbp_warmup_errors' );
215
- if ( is_array( $errors ) ) {
216
- foreach ( $errors as $error ) {
217
- $extras = [];
218
- if ( isset( $error['options']['user-agent'] ) && $error['options']['user-agent'] === 'Mobile' ) {
219
- $extras[] = '(Mobile)';
220
- }
221
- $list .= '<li><a href="' . $error['url'] . '" target="_blank">' . $error['url'] . ' ' . implode( ' ',
222
- $extras ) . '</a></li>';
223
- }
224
- SBP_Notice_Manager::display_notice( 'sbp_warmup_errors',
225
- '<p><strong>' . SBP_PLUGIN_NAME . '</strong> ' . __( 'Cache warmup completed but following pages may not be cached. Please check this pages are available. (Hover over this notice to see all errors)',
226
- 'speed-booster-pack' ) . '</p><ul class="warmup-cache-error-list">' . $list . '</ul>',
227
- 'error',
228
- true,
229
- 'recurrent' );
230
- }
231
- }
232
  }
233
 
234
  public function timed_notifications() {
@@ -296,15 +270,15 @@ class SBP_WP_Admin {
296
  $wp_config_path = dirname( ABSPATH ) . '/wp-config.php';
297
  }
298
 
299
- $upload_dir = wp_upload_dir()['basedir'];
300
  $advanced_cache_path = WP_CONTENT_DIR . '/advanced-cache.php';
301
 
302
  $check_list = [
303
- 'WordPress root directory' => ABSPATH,
304
- 'wp-content directory' => WP_CONTENT_DIR,
305
- 'WordPress uploads directory' => $upload_dir,
306
- 'SBP uploads directory' => SBP_UPLOADS_DIR,
307
- 'wp-config.php file' => $wp_config_path,
308
  'wp-content/advanced-cache.php file' => $advanced_cache_path,
309
  ];
310
 
@@ -314,12 +288,12 @@ class SBP_WP_Admin {
314
  foreach ( $check_list as $key => $item ) {
315
  if ( $wp_filesystem->exists( $item ) ) {
316
  if ( ! sbp_check_file_permissions( $item ) ) {
317
- $permission_errors[$key] = $item;
318
  }
319
  }
320
  }
321
 
322
- if ( count($permission_errors) ) {
323
  $notice_content = '<p>';
324
  $notice_content .= __( sprintf( '%s needs write permissions for the following files/directories to work properly:', SBP_PLUGIN_NAME ), 'speed-booster' );
325
  $notice_content .= '<ul>';
@@ -330,7 +304,19 @@ class SBP_WP_Admin {
330
  $notice_content .= '<a href="https://www.wpbeginner.com/beginners-guide/how-to-fix-file-and-folder-permissions-error-in-wordpress/" target="_blank">' . __( 'Here\'s a tutorial on how to change file/directory permissions.', 'speed-booster' ) . '</a>';
331
  $notice_content .= '</p>';
332
 
333
- SBP_Notice_Manager::display_notice('permission_errors', $notice_content, 'warning', false, 'recurrent', 'toplevel_page_sbp-settings');
 
 
 
 
 
 
 
 
334
  }
335
  }
 
 
 
 
336
  }
16
  $this->initialize_announce4wp();
17
 
18
  add_action( 'admin_init', [ $this, 'timed_notifications' ] );
19
+ add_action( 'admin_init', [ $this, 'welcome_notice' ] );
20
  add_action( 'admin_head', [ $this, 'check_required_file_permissions' ] );
21
+
22
+ add_action( 'wp_ajax_sbp_dismiss_intro', [ $this, 'dismiss_intro' ] );
23
  }
24
 
25
  add_filter( 'plugin_row_meta', [ $this, 'plugin_meta_links' ], 10, 2 );
145
 
146
  // Set Cloudflare Notice
147
  $cf_transient_value = get_transient( 'sbp_notice_cloudflare' );
148
+ if ( $cf_transient_value == 1 ) {
149
  $notice_message = __( 'Cloudflare cache cleared.', 'speed-booster-pack' );
150
  $notice_type = 'success';
151
+ } elseif ( $cf_transient_value == 2 ) {
152
  $notice_message = __( 'Error occured while clearing Cloudflare cache. Possible reason: Credentials invalid.', 'speed-booster-pack' );
153
  $notice_type = 'error';
154
  } else {
199
 
200
  // Warmup Started Notice
201
  SBP_Notice_Manager::display_notice( 'sbp_warmup_started',
202
+ '<p>' . sprintf( __( '%s will now send requests to your homepage and all the pages that are linked to in the homepage (including links in navigation menus) so they\'ll all be cached.', 'speed-booster-pack' ), SBP_PLUGIN_NAME ) . '</p>',
203
  'info',
204
  true,
205
  'recurrent' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  }
207
 
208
  public function timed_notifications() {
270
  $wp_config_path = dirname( ABSPATH ) . '/wp-config.php';
271
  }
272
 
273
+ $upload_dir = wp_upload_dir()['basedir'];
274
  $advanced_cache_path = WP_CONTENT_DIR . '/advanced-cache.php';
275
 
276
  $check_list = [
277
+ 'WordPress root directory' => ABSPATH,
278
+ 'wp-content directory' => WP_CONTENT_DIR,
279
+ 'WordPress uploads directory' => $upload_dir,
280
+ 'SBP uploads directory' => SBP_UPLOADS_DIR,
281
+ 'wp-config.php file' => $wp_config_path,
282
  'wp-content/advanced-cache.php file' => $advanced_cache_path,
283
  ];
284
 
288
  foreach ( $check_list as $key => $item ) {
289
  if ( $wp_filesystem->exists( $item ) ) {
290
  if ( ! sbp_check_file_permissions( $item ) ) {
291
+ $permission_errors[ $key ] = $item;
292
  }
293
  }
294
  }
295
 
296
+ if ( count( $permission_errors ) ) {
297
  $notice_content = '<p>';
298
  $notice_content .= __( sprintf( '%s needs write permissions for the following files/directories to work properly:', SBP_PLUGIN_NAME ), 'speed-booster' );
299
  $notice_content .= '<ul>';
304
  $notice_content .= '<a href="https://www.wpbeginner.com/beginners-guide/how-to-fix-file-and-folder-permissions-error-in-wordpress/" target="_blank">' . __( 'Here\'s a tutorial on how to change file/directory permissions.', 'speed-booster' ) . '</a>';
305
  $notice_content .= '</p>';
306
 
307
+ SBP_Notice_Manager::display_notice( 'permission_errors', $notice_content, 'warning', false, 'recurrent', 'toplevel_page_sbp-settings' );
308
+ }
309
+ }
310
+
311
+ public function welcome_notice() {
312
+ SBP_Notice_Manager::display_notice( 'welcome_notice', sprintf( '<p>' . __( 'Thank you for installing %1$s! You can now visit the %2$ssettings page%3$s to start speeding up your website.', 'speed-booster-pack' ) . '</p>', SBP_PLUGIN_NAME, '<a href="' . admin_url( 'admin.php?page=sbp-settings&dismiss_welcome_notice=true' ) . '">', '</a>' ), 'success', true, 'one_time', 'plugins' );
313
+
314
+ if ( isset( $_GET['dismiss_welcome_notice'] ) && $_GET['dismiss_welcome_notice'] == true ) {
315
+ SBP_Notice_Manager::dismiss_notice( 'welcome_notice' );
316
  }
317
  }
318
+
319
+ public function dismiss_intro() {
320
+ update_user_meta( get_current_user_id(), 'sbp_intro', true );
321
+ }
322
  }
speed-booster-pack.php CHANGED
@@ -6,7 +6,7 @@
6
  * Plugin Name: Speed Booster Pack
7
  * Plugin URI: https://speedboosterpack.com
8
  * Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
9
- * Version: 4.3.3.1
10
  * Author: Optimocha
11
  * Author URI: https://optimocha.com
12
  * License: GPLv3 or later
@@ -32,7 +32,7 @@ define( 'SBP_PLUGIN_NAME', 'Speed Booster Pack' );
32
  /**
33
  * Current plugin version.
34
  */
35
- define( 'SBP_VERSION', '4.3.3.1' );
36
 
37
  /**
38
  * Plugin website URL.
6
  * Plugin Name: Speed Booster Pack
7
  * Plugin URI: https://speedboosterpack.com
8
  * Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
9
+ * Version: 4.3.4
10
  * Author: Optimocha
11
  * Author URI: https://optimocha.com
12
  * License: GPLv3 or later
32
  /**
33
  * Current plugin version.
34
  */
35
+ define( 'SBP_VERSION', '4.3.4' );
36
 
37
  /**
38
  * Plugin website URL.
uninstall.php CHANGED
@@ -100,6 +100,8 @@ delete_option( 'sbp_migrator_version' );
100
  delete_transient( 'sbp_notice_cache' );
101
  delete_transient( 'sbp_cloudflare_status' );
102
  delete_transient( 'sbp_upgraded_notice' );
 
 
103
 
104
  // Delete user metas
105
  $users = get_users( 'role=administrator' );
@@ -111,6 +113,7 @@ foreach ( $users as $user ) {
111
  delete_user_meta( $user->ID, 'sbp_hide_newsletter_pointer' );
112
  delete_user_meta( $user->ID, 'sbp_newsletter_display_time' );
113
  delete_user_meta( $user->ID, 'sbp_dismissed_messages' );
 
114
  }
115
 
116
  // Z_TODO: let's make a tool called "Cleanup SBP metadata" in a future version
100
  delete_transient( 'sbp_notice_cache' );
101
  delete_transient( 'sbp_cloudflare_status' );
102
  delete_transient( 'sbp_upgraded_notice' );
103
+ delete_transient( 'sbp_warmup_errors' );
104
+ delete_transient( 'sbp_warmup_completed' );
105
 
106
  // Delete user metas
107
  $users = get_users( 'role=administrator' );
113
  delete_user_meta( $user->ID, 'sbp_hide_newsletter_pointer' );
114
  delete_user_meta( $user->ID, 'sbp_newsletter_display_time' );
115
  delete_user_meta( $user->ID, 'sbp_dismissed_messages' );
116
+ delete_user_meta( $user->ID, 'sbp_intro' );
117
  }
118
 
119
  // Z_TODO: let's make a tool called "Cleanup SBP metadata" in a future version
vendor/codestar-framework/assets/images/wp-logo.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z"/></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z"/></g></g></svg>
vendor/codestar-framework/assets/images/wp-plugin-logo.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></g></svg>