Ajax Search for WooCommerce - Version 1.10.0

Version Description

Download this release

Release Info

Developer damian-gora
Plugin Icon 128x128 Ajax Search for WooCommerce
Version 1.10.0
Comparing to
See all releases

Code changes from version 1.9.0 to 1.10.0

ajax-search-for-woocommerce.php CHANGED
@@ -4,13 +4,13 @@
4
  * Plugin Name: FiboSearch - AJAX Search for WooCommerce
5
  * Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
6
  * Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
7
- * Version: 1.9.0
8
  * Author: Damian Góra
9
  * Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
11
  * Domain Path: /languages
12
  * WC requires at least: 3.3
13
- * WC tested up to: 5.1
14
  *
15
  */
16
  // Exit if accessed directly
@@ -154,7 +154,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
154
  <div class="notice notice-error dgwt-wcas-notice">
155
  <p>
156
  <?php
157
- printf( __( '%: You need PHP version at least 7.0 to run this plugin. You are currently using PHP version ', 'ajax-search-for-woocommerce' ), '<b>' . DGWT_WCAS_FULL_NAME . '</b>' );
158
  echo PHP_VERSION . '.' ;
159
  ?>
160
  </p>
@@ -202,7 +202,6 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
202
  $this->define( 'DGWT_WCAS_RESULT_DETAILS_ACTION', 'dgwt_wcas_result_details' );
203
  $this->define( 'DGWT_WCAS_GET_PRICES_ACTION', 'dgwt_wcas_get_prices' );
204
  $this->define( 'DGWT_WCAS_WC_AJAX_ENDPOINT', true );
205
- $this->define( 'DGWT_WCAS_DEBUG', false );
206
  }
207
 
208
  /**
@@ -251,6 +250,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
251
  */
252
  public function adminScripts()
253
  {
 
254
  // Register CSS
255
  wp_register_style(
256
  'dgwt-wcas-admin-style',
@@ -259,7 +259,6 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
259
  DGWT_WCAS_VERSION
260
  );
261
  // Register JS
262
- $min = ( !DGWT_WCAS_DEBUG ? '.min' : '' );
263
  wp_register_script(
264
  'dgwt-wcas-admin-js',
265
  DGWT_WCAS_URL . 'assets/js/admin' . $min . '.js',
@@ -270,6 +269,11 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
270
  if ( \DgoraWcas\Helpers::isSettingsPage() ) {
271
  $localize = array(
272
  'labels' => \DgoraWcas\Helpers::getLabels(),
 
 
 
 
 
273
  );
274
  $localize = apply_filters( 'dgwt/wcas/scripts/admin/localize', $localize );
275
  wp_localize_script( 'dgwt-wcas-admin-js', 'dgwt_wcas', $localize );
@@ -290,7 +294,6 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
290
  array( 'jquery' ),
291
  DGWT_WCAS_VERSION
292
  );
293
- $min = ( !DGWT_WCAS_DEBUG ? '.min' : '' );
294
  wp_enqueue_style(
295
  'dgwt-wcas-style',
296
  apply_filters( 'dgwt/wcas/scripts/css_style_url', DGWT_WCAS_URL . 'assets/css/style' . $min . '.css' ),
4
  * Plugin Name: FiboSearch - AJAX Search for WooCommerce
5
  * Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
6
  * Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
7
+ * Version: 1.10.0
8
  * Author: Damian Góra
9
  * Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
11
  * Domain Path: /languages
12
  * WC requires at least: 3.3
13
+ * WC tested up to: 5.2
14
  *
15
  */
16
  // Exit if accessed directly
154
  <div class="notice notice-error dgwt-wcas-notice">
155
  <p>
156
  <?php
157
+ printf( __( '%s: You need PHP version at least 7.0 to run this plugin. You are currently using PHP version ', 'ajax-search-for-woocommerce' ), '<b>' . DGWT_WCAS_NAME . '</b>' );
158
  echo PHP_VERSION . '.' ;
159
  ?>
160
  </p>
202
  $this->define( 'DGWT_WCAS_RESULT_DETAILS_ACTION', 'dgwt_wcas_result_details' );
203
  $this->define( 'DGWT_WCAS_GET_PRICES_ACTION', 'dgwt_wcas_get_prices' );
204
  $this->define( 'DGWT_WCAS_WC_AJAX_ENDPOINT', true );
 
205
  }
206
 
207
  /**
250
  */
251
  public function adminScripts()
252
  {
253
+ $min = ( SCRIPT_DEBUG ? '' : '.min' );
254
  // Register CSS
255
  wp_register_style(
256
  'dgwt-wcas-admin-style',
259
  DGWT_WCAS_VERSION
260
  );
261
  // Register JS
 
262
  wp_register_script(
263
  'dgwt-wcas-admin-js',
264
  DGWT_WCAS_URL . 'assets/js/admin' . $min . '.js',
269
  if ( \DgoraWcas\Helpers::isSettingsPage() ) {
270
  $localize = array(
271
  'labels' => \DgoraWcas\Helpers::getLabels(),
272
+ 'nonces' => array(
273
+ 'build_index' => wp_create_nonce( 'dgwt_wcas_build_index' ),
274
+ 'stop_build_index' => wp_create_nonce( 'dgwt_wcas_stop_build_index' ),
275
+ 'build_index_heartbeat' => wp_create_nonce( 'dgwt_wcas_build_index_heartbeat' ),
276
+ ),
277
  );
278
  $localize = apply_filters( 'dgwt/wcas/scripts/admin/localize', $localize );
279
  wp_localize_script( 'dgwt-wcas-admin-js', 'dgwt_wcas', $localize );
294
  array( 'jquery' ),
295
  DGWT_WCAS_VERSION
296
  );
 
297
  wp_enqueue_style(
298
  'dgwt-wcas-style',
299
  apply_filters( 'dgwt/wcas/scripts/css_style_url', DGWT_WCAS_URL . 'assets/css/style' . $min . '.css' ),
assets/css/admin-style.css CHANGED
@@ -1057,6 +1057,14 @@ input[type=checkbox].dgwt-wcas-check:checked ~ .dgwt-wcas-switch {
1057
  text-decoration: none;
1058
  }
1059
 
 
 
 
 
 
 
 
 
1060
  .wcas-ajax-build-index-wait {
1061
  opacity: 0.5;
1062
  pointer-events: none;
@@ -1491,7 +1499,8 @@ td.dgwt-wcas-indexing-details-row a {
1491
  display: none;
1492
  }
1493
 
1494
- #dgwt_wcas_troubleshooting-tab.enabled {
 
1495
  display: flex;
1496
  align-items: center;
1497
  }
@@ -1500,7 +1509,7 @@ td.dgwt-wcas-indexing-details-row a {
1500
  display: none;
1501
  }
1502
 
1503
- .dgwt-wcas-troubleshooting-count {
1504
  display: inline-block;
1505
  vertical-align: top;
1506
  box-sizing: border-box;
1057
  text-decoration: none;
1058
  }
1059
 
1060
+ .dgwt-wcas-indexing-header__troubleshooting .dgwt-wcas-indexing-header__log {
1061
+ background: #f5dede;
1062
+ padding: 10px;
1063
+ border: 1px solid #f0c0c1;
1064
+ margin-bottom: 20px;
1065
+ font-family: monospace;
1066
+ }
1067
+
1068
  .wcas-ajax-build-index-wait {
1069
  opacity: 0.5;
1070
  pointer-events: none;
1499
  display: none;
1500
  }
1501
 
1502
+ #dgwt_wcas_troubleshooting-tab.enabled,
1503
+ #dgwt_wcas_performance-tab {
1504
  display: flex;
1505
  align-items: center;
1506
  }
1509
  display: none;
1510
  }
1511
 
1512
+ .dgwt-wcas-tab-mark {
1513
  display: inline-block;
1514
  vertical-align: top;
1515
  box-sizing: border-box;
assets/js/admin.js CHANGED
@@ -252,10 +252,11 @@
252
  $.ajax({
253
  url: ajaxurl,
254
  type: 'post',
255
- data: {
256
- action: 'dgwt_wcas_build_index',
257
- emergency: emergency
258
- },
 
259
  success: function (response) {
260
  if (typeof response != 'undefined' && response.success) {
261
  _this.getWrapper().html(response.data.html);
@@ -284,6 +285,7 @@
284
  type: 'post',
285
  data: {
286
  action: 'dgwt_wcas_stop_build_index',
 
287
  },
288
  success: function (response) {
289
  if (typeof response != 'undefined' && response.success) {
@@ -307,6 +309,7 @@
307
  type: 'post',
308
  data: {
309
  action: 'dgwt_wcas_build_index_heartbeat',
 
310
  },
311
  success: function (response) {
312
  if (typeof response != 'undefined' && response.success) {
252
  $.ajax({
253
  url: ajaxurl,
254
  type: 'post',
255
+ data: {
256
+ action: 'dgwt_wcas_build_index',
257
+ emergency: emergency,
258
+ _wpnonce: dgwt_wcas.nonces.build_index,
259
+ },
260
  success: function (response) {
261
  if (typeof response != 'undefined' && response.success) {
262
  _this.getWrapper().html(response.data.html);
285
  type: 'post',
286
  data: {
287
  action: 'dgwt_wcas_stop_build_index',
288
+ _wpnonce: dgwt_wcas.nonces.stop_build_index,
289
  },
290
  success: function (response) {
291
  if (typeof response != 'undefined' && response.success) {
309
  type: 'post',
310
  data: {
311
  action: 'dgwt_wcas_build_index_heartbeat',
312
+ _wpnonce: dgwt_wcas.nonces.build_index_heartbeat,
313
  },
314
  success: function (response) {
315
  if (typeof response != 'undefined' && response.success) {
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",mobileBreakpoint:"input[id*='mobile_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$select:null,$overlayMobileEl:null,$mobileBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var t=this.$select.find("option:selected").val(),e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),s("input[id*='bg_search_icon_color']").closest("tr").show(),t){case"icon":e&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":e&&(this.showOption(this.$mobileBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:e&&(this.showOption(this.$overlayMobileEl),s("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(s){s.closest("tr").hide()},showOption:function(s){s.closest("tr").show()},registerListeners:function(){var s=this;s.$select.on("change",function(){s.setConditions()}),s.$overlayMobileEl.on("change",function(){s.setConditions()})},init:function(){var t=this,e=s(t.layoutSelect);e.length>0&&(t.$select=e,t.$overlayMobileEl=s(t.overlayMobile),t.$mobileBreakpointEl=s(t.mobileBreakpoint),t.$searchIconColorEl=s(t.searchIconColor),t.registerListeners(),setTimeout(function(){t.setConditions()},400))}},i={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),s.data.loop&&t.heartbeat())}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},o={init:function(){var t=this;s(".dgwt-wcas-selectize").length>0&&s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:s(".dgwt-wcas-selectize").data("security")},success:function(s){void 0!==s&&void 0!==s.data&&t.initSelectize(s.data)}})},initSelectize:function(t){var e=s(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=s(this),a=e.data("options"),i=t;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(s,t){if((t+1)%2==0){var e={value:s,label:o};i.push(e),o=""}o=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(s){return{value:s.key,label:s.label}},load:function(t,a){if(!t.length)return a();s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(s){a(s.data)}})}})})}},n={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el"),a=s(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:a,trigger:"hover",html:!0})}})}},r={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var i=this,o=s("."+i.advClass);o.length>0&&(o.addClass(i.highlightClass),o.addClass(i.transClass),"show"===t&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(i.highlightClass),setTimeout(function(){o.removeClass(i.transClass),e.refresh(),a.setConditions()},500)},500)}),"hide"===t&&setTimeout(function(){o.removeClass(i.transClass),o.fadeOut(500,function(){o.removeClass(i.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_matching_tags","show_matching_brands","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,e){e.length>0&&"0"!=e?(this.searchWrapp.css("max-width",e+"px"),this.suggestionWrapp.css("max-width",e+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var r=[];for(a=0;a<n.length;a++){var c=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");c.length>0&&r.push(c)}var d=r.length;if(r.length>0)for(var l=i-r.length,g=r.length-1;l>0;){var h=r[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),r[g].after(h),d++,--g<0&&(g=r.length-1),l--}d>i&&t.val(d)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){if(s(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected"),a.searchWrapp.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(s,t){},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-ico-magnifier path {fill:"+e+"}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)){var a='<style class="dgwt-wcas-preview-submit-style">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+e+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+e+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+e+"!important;}",a+="</style>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){0==t.length&&(t=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.no_results),s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.show_more),s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}};var c={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",init:function(){var t=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(s(t.counterClass).text(e),s(t.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.results_async,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&s.each(dgwt_wcas.troubleshooting.tests.direct,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&t.maybeRunNextAsyncTest(),s(document).on("click",'input[name="'+t.resetButtonName+'"]',function(e){s('input[name="'+t.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return s.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(t,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=s(this.issuesListClass+"-"+t.status);"good"!==t.status&&(s(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[t.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(s(this.counterClass).text(a),s(this.settingsTab).addClass("enabled")),s(o).append(i(t)))},maybeRunNextAsyncTest:function(){var t=this;dgwt_wcas.troubleshooting.tests.async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.async,function(){var e={action:"dgwt_wcas_troubleshooting_test",test:this.test,_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,s(t.progressBar).show(),s.post(ajaxurl,e,function(s){s.success&&t.appendIssue(s.data,!0),t.maybeRunNextAsyncTest()}),!1)}),t.recalculateProgression()},recalculateProgression:function(){var t=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;s.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);s(t.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){s(t.progressBar).slideUp()},2e3)}},d=function(){if("undefined"!=typeof Vue){Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize:Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(s){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var s=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){s.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(t){var e=void 0===dgwt_wcas_filters_rules_selected_options[t]?[]:dgwt_wcas_filters_rules_selected_options[t];return function({nonce:t,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(s){return{value:s.key,label:s.label}},load:function(e,i){s.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:t},error:function(){i()},success:function(s){i(s.data)}})}}}({nonce:this.nonce,type:t,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const t=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);s.each(t,function(s,e){t[s].key=Math.random()}),this.rules=t}catch(s){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(s){this.rules[s].values=[],this.updateInput()},deleteRule(s){this.rules=this.rules.filter(function(t,e){return e!==s}),this.updateInput()},updateInput(){const s=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(s.map(function(s){return s.key,delete s.key,s}))}}})}};s(document).ready(function(){var l,g;(l=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&l.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),a.init(),(g=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&g.find("td").attr("colspan",2),i.init(),o.init(),n.init(),r.init(),c.init(),d(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
1
+ !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",mobileBreakpoint:"input[id*='mobile_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$select:null,$overlayMobileEl:null,$mobileBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var t=this.$select.find("option:selected").val(),e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),s("input[id*='bg_search_icon_color']").closest("tr").show(),t){case"icon":e&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":e&&(this.showOption(this.$mobileBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:e&&(this.showOption(this.$overlayMobileEl),s("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(s){s.closest("tr").hide()},showOption:function(s){s.closest("tr").show()},registerListeners:function(){var s=this;s.$select.on("change",function(){s.setConditions()}),s.$overlayMobileEl.on("change",function(){s.setConditions()})},init:function(){var t=this,e=s(t.layoutSelect);e.length>0&&(t.$select=e,t.$overlayMobileEl=s(t.overlayMobile),t.$mobileBreakpointEl=s(t.mobileBreakpoint),t.$searchIconColorEl=s(t.searchIconColor),t.registerListeners(),setTimeout(function(){t.setConditions()},400))}},i={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),s.data.loop&&t.heartbeat())}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},o={init:function(){var t=this;s(".dgwt-wcas-selectize").length>0&&s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:s(".dgwt-wcas-selectize").data("security")},success:function(s){void 0!==s&&void 0!==s.data&&t.initSelectize(s.data)}})},initSelectize:function(t){var e=s(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=s(this),a=e.data("options"),i=t;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(s,t){if((t+1)%2==0){var e={value:s,label:o};i.push(e),o=""}o=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(s){return{value:s.key,label:s.label}},load:function(t,a){if(!t.length)return a();s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(s){a(s.data)}})}})})}},n={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el"),a=s(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:a,trigger:"hover",html:!0})}})}},c={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var i=this,o=s("."+i.advClass);o.length>0&&(o.addClass(i.highlightClass),o.addClass(i.transClass),"show"===t&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(i.highlightClass),setTimeout(function(){o.removeClass(i.transClass),e.refresh(),a.setConditions()},500)},500)}),"hide"===t&&setTimeout(function(){o.removeClass(i.transClass),o.fadeOut(500,function(){o.removeClass(i.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_matching_tags","show_matching_brands","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,e){e.length>0&&"0"!=e?(this.searchWrapp.css("max-width",e+"px"),this.suggestionWrapp.css("max-width",e+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var c=[];for(a=0;a<n.length;a++){var r=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");r.length>0&&c.push(r)}var d=c.length;if(c.length>0)for(var l=i-c.length,g=c.length-1;l>0;){var h=c[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),c[g].after(h),d++,--g<0&&(g=c.length-1),l--}d>i&&t.val(d)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){if(s(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected"),a.searchWrapp.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(s,t){},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-ico-magnifier path {fill:"+e+"}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)){var a='<style class="dgwt-wcas-preview-submit-style">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+e+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+e+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+e+"!important;}",a+="</style>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){0==t.length&&(t=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.no_results),s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.show_more),s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}};var r={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",init:function(){var t=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(s(t.counterClass).text(e),s(t.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.results_async,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&s.each(dgwt_wcas.troubleshooting.tests.direct,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&t.maybeRunNextAsyncTest(),s(document).on("click",'input[name="'+t.resetButtonName+'"]',function(e){s('input[name="'+t.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return s.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(t,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=s(this.issuesListClass+"-"+t.status);"good"!==t.status&&(s(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[t.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(s(this.counterClass).text(a),s(this.settingsTab).addClass("enabled")),s(o).append(i(t)))},maybeRunNextAsyncTest:function(){var t=this;dgwt_wcas.troubleshooting.tests.async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.async,function(){var e={action:"dgwt_wcas_troubleshooting_test",test:this.test,_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,s(t.progressBar).show(),s.post(ajaxurl,e,function(s){s.success&&t.appendIssue(s.data,!0),t.maybeRunNextAsyncTest()}),!1)}),t.recalculateProgression()},recalculateProgression:function(){var t=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;s.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);s(t.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){s(t.progressBar).slideUp()},2e3)}},d=function(){if("undefined"!=typeof Vue){Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize:Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(s){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var s=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){s.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(t){var e=void 0===dgwt_wcas_filters_rules_selected_options[t]?[]:dgwt_wcas_filters_rules_selected_options[t];return function({nonce:t,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(s){return{value:s.key,label:s.label}},load:function(e,i){s.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:t},error:function(){i()},success:function(s){i(s.data)}})}}}({nonce:this.nonce,type:t,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const t=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);s.each(t,function(s,e){t[s].key=Math.random()}),this.rules=t}catch(s){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(s){this.rules[s].values=[],this.updateInput()},deleteRule(s){this.rules=this.rules.filter(function(t,e){return e!==s}),this.updateInput()},updateInput(){const s=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(s.map(function(s){return s.key,delete s.key,s}))}}})}};s(document).ready(function(){var l,g;(l=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&l.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),a.init(),(g=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&g.find("td").attr("colspan",2),i.init(),o.init(),n.init(),c.init(),r.init(),d(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
assets/js/search.js CHANGED
@@ -258,7 +258,9 @@
258
  debounceWaitMs: 400,
259
  sendGAEvents: true,
260
  enableGASiteSearchModule: false,
261
- showProductVendor: false
 
 
262
  }
263
 
264
  function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
@@ -417,6 +419,11 @@
417
  // Extra tasks on submit
418
  that.el.closest('.' + that.options.formClass).on('submit.autocomplete', function (e) {
419
 
 
 
 
 
 
420
  // If variation suggestion exist, click it instead submit search results page
421
  if (that.suggestions.length > 0) {
422
 
@@ -506,7 +513,12 @@
506
  if(!alreadyClicked) {
507
  var that = utils.getActiveInstance();
508
  that.actionTriggerSource = 'click';
 
509
  alreadyClicked = true;
 
 
 
 
510
  that.select($(this).data('index'));
511
  }
512
  });
@@ -2259,6 +2271,11 @@
2259
  },
2260
  select: function (i) {
2261
  var that = this;
 
 
 
 
 
2262
  that.hide();
2263
  that.onSelect(i);
2264
  },
@@ -2479,6 +2496,7 @@
2479
  var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
2480
  if ($clonedForm.length > 0) {
2481
  $closeBtn.removeClass('dgwt-wcas-close');
 
2482
  }
2483
 
2484
  that.hide();
@@ -2659,7 +2677,9 @@
2659
  convertHtml: dgwt_wcas.convert_html,
2660
  enableGASiteSearchModule: dgwt_wcas.enable_ga_site_search_module,
2661
  appendTo: typeof dgwt_wcas.suggestions_wrapper != 'undefined' ? dgwt_wcas.suggestions_wrapper : 'body',
2662
- showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false
 
 
2663
  };
2664
 
2665
  $('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
258
  debounceWaitMs: 400,
259
  sendGAEvents: true,
260
  enableGASiteSearchModule: false,
261
+ showProductVendor: false,
262
+ disableHits: false,
263
+ disableSubmit: false,
264
  }
265
 
266
  function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
419
  // Extra tasks on submit
420
  that.el.closest('.' + that.options.formClass).on('submit.autocomplete', function (e) {
421
 
422
+ if (that.options.disableSubmit) {
423
+ e.preventDefault();
424
+ return false;
425
+ }
426
+
427
  // If variation suggestion exist, click it instead submit search results page
428
  if (that.suggestions.length > 0) {
429
 
513
  if(!alreadyClicked) {
514
  var that = utils.getActiveInstance();
515
  that.actionTriggerSource = 'click';
516
+
517
  alreadyClicked = true;
518
+ setTimeout(function(){
519
+ alreadyClicked = false;
520
+ }, 500);
521
+
522
  that.select($(this).data('index'));
523
  }
524
  });
2271
  },
2272
  select: function (i) {
2273
  var that = this;
2274
+
2275
+ if(that.options.disableHits){
2276
+ return;
2277
+ }
2278
+
2279
  that.hide();
2280
  that.onSelect(i);
2281
  },
2496
  var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
2497
  if ($clonedForm.length > 0) {
2498
  $closeBtn.removeClass('dgwt-wcas-close');
2499
+ $closeBtn.html('');
2500
  }
2501
 
2502
  that.hide();
2677
  convertHtml: dgwt_wcas.convert_html,
2678
  enableGASiteSearchModule: dgwt_wcas.enable_ga_site_search_module,
2679
  appendTo: typeof dgwt_wcas.suggestions_wrapper != 'undefined' ? dgwt_wcas.suggestions_wrapper : 'body',
2680
+ showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false,
2681
+ disableHits: typeof dgwt_wcas.disable_hits != 'undefined' && dgwt_wcas.disable_hits ? true : false,
2682
+ disableSubmit: typeof dgwt_wcas.disable_submit != 'undefined' && dgwt_wcas.disable_submit ? true : false
2683
  };
2684
 
2685
  $('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
assets/js/search.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1;if(o)for(o=o.sort(function(t,e){return e.length-t.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>1){var n=o[i].replace(/[\^\@]/g,"");if(n.length>0){var r="("+e.escapeRegExChars(n.trim())+")";t=t.replace(new RegExp(r,"gi"),"^^$1@@"),a=!0}}a&&(t=(t=t.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else r="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(r,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void t();s.id=o,i=setTimeout(function(){o===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var o;o=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(o)},i)},getActiveInstance:function(){var e,s=t(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=t(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return e=s.data("autocomplete"),!1}),e}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.latestActivateSource="",this.actionTriggerSource="",this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i,o){if(!s)return t;i&&(t=e.highlight(t,s));if(!o.convertHtml)return t;return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br))&gt;/g,"<$1>")},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1},d.prototype={initialize:function(){var s=this;s.element.setAttribute("autocomplete","off"),s.createContainers(),s.registerEventsSearchBar(),s.registerEventsSuggestions(),s.registerEventsDetailsPanel(),s.registerIconHandler(),s.registerEventsFixedMenu(),s.fixPositionCapture=function(){s.adjustContainerWidth(),s.visible&&s.fixPosition()},t(window).on("resize.autocomplete",function(){var t=e.getActiveInstance();void 0!==t&&t.fixPositionCapture()}),s.initMobileMode(),s.hideAfterClickOutsideListener(),s.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),s.detailsContainer&&s.detailsContainer.length>0&&s.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(e){var s=this.options;0==t("."+s.containerClass).length?(this.suggestionsContainer=t(d.utils.createNode(s.containerClass)),this.suggestionsContainer.appendTo(s.appendTo||"body"),this.suggestionsContainer.addClass("woocommerce"),!0===s.showImage&&this.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===s.showPrice&&this.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===s.showDescription&&this.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===s.showSKU&&this.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===s.showHeadings&&this.suggestionsContainer.addClass("dgwt-wcas-has-headings"),"auto"!==s.width&&this.suggestionsContainer.width(s.width)):this.suggestionsContainer=t("."+this.options.containerClass),this.canShowDetailsBox()&&(0==t("."+s.containerDetailsClass).length?(this.detailsContainer=t(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=t("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;t(document).on("click.autocomplete","."+s.options.closeTrigger,function(){var s=e.getActiveInstance();s.hide(),s.clear(!1),s.hideCloseButton(),t(this).closest("."+s.options.searchFormClass).find("."+s.options.searchInputClass).val("").focus()}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(e){s.suggestions.length>0&&t.each(s.suggestions,function(t,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(t),e.preventDefault(),!1})}),"complete"===document.readyState?s.positionPreloader():t(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(t){s.onKeyPress(t)}),s.el.on("keyup.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("input.autocomplete",function(t){s.onKeyUp(t)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){t(document).on("mouseenter.autocomplete",s,function(){var s=e.getActiveInstance();if(void 0!==s){var i=t(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&e.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;t(document).on("click.autocomplete",s,function(){if(!i){var s=e.getActiveInstance();s.actionTriggerSource="click",i=!0,s.select(t(this).data("index"))}}),t(document).on("mousedown.autocomplete",s,function(e){"number"==typeof e.which&&1===e.which&&t(e.target)[0].click()}),t(document).on("click.autocomplete","."+this.options.containerClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(t(document).on("click.autocomplete","."+this.options.containerDetailsClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)}),t(document).on("change",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}))},registerIconHandler:function(){var s=this,i=s.getFormWrapper(),o=i.find("."+s.options.formClass);i.on("click",".js-dgwt-wcas-search-icon-handler",function(t){var e=i.find("."+s.options.searchInputClass);if(i.hasClass("dgwt-wcas-layout-icon-open"))s.hide(),o.hide(!0),i.removeClass("dgwt-wcas-layout-icon-open");else{var a=i.find(".dgwt-wcas-search-icon-arrow");o.hide(),a.hide(),i.addClass("dgwt-wcas-layout-icon-open"),s.positionIconSearchMode(i),o.fadeIn(200,function(){a.show(),s.positionPreloader(i),e.focus()})}}),0==t(".js-dgwt-wcas-initialized").length&&t(".js-dgwt-wcas-search-icon-handler").length>0&&t(document).click(function(i){if(t(".dgwt-wcas-layout-icon-open").length){var o=t(i.target);if(!(o.closest("."+s.options.searchFormClass).length>0||o.closest("."+s.options.containerClass).length>0||o.closest("."+s.options.containerDetailsClass).length>0)){var a=e.getActiveInstance();if(void 0!==a){var n=a.getFormWrapper().find("."+s.options.formClass);n.hide(),a.hide(!0),n.css({left:"0"})}s.hideIconModeSearch()}}}),t(window).on("resize.autocomplete",function(){s.applyFlexibleMode()}),"complete"==document.readyState?s.applyFlexibleMode():t(window).on("load",function(){s.applyFlexibleMode()})},registerEventsFixedMenu:function(){var e=this;t(window).on("scroll",function(){if(e.suggestions.length>0&&e.elementOrParentIsFixed(e.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){e.fixHeight(),e.fixPositionCapture()},t)})}else e.fixHeight(),e.fixPositionCapture()})},initMobileMode:function(){var t=this,e=t.getFormWrapper();e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.isMobileMode()&&(e.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),e.find(".js-dgwt-wcas-enable-mobile-form").on("click",function(e){t.enableOverlayMobile()}))},applyFlexibleMode:function(){var e=t(".js-dgwt-wcas-layout-icon-flexible");e.length&&(this.isMobileMode()?(e.addClass("js-dgwt-wcas-layout-icon"),e.addClass("dgwt-wcas-layout-icon")):(e.removeClass("js-dgwt-wcas-layout-icon"),e.removeClass("dgwt-wcas-layout-icon")),e.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){t("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),o=e.getQuery(i);e.isMobileMode()||(e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==o&&(s.onInvalidateSelection||t.noop).call(e.element)},200))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),o=t.extend({},s.options,e);(s.isLocal=Array.isArray(o.lookup),s.isLocal&&(o.lookup=s.verifySuggestionsFormat(o.lookup)),o.orientation=s.validateOrientation(o.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":o.zIndex-1});o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.showCloseButton()},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this.getFormOffset();this.getSuggestionsContainer().css(t),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset(),a=o.left;if(0==i.length)return!1;var n=!0===this.options.isRtl?1:2,r=Math.round(o.left);if(o.left=r+Math.round(s.width()+n),i.css(o),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(s.css("left",r+Math.round(i.width()+n)+"px"),i.css("left",a+"px")));var l=t(window).width(),c=i.width(),d=i.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(o.left=o.left+1);var g=!1,u=!1;l<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),i.css("left",Math.round(parseFloat(s.css("left").replace("px","")))-i.outerWidth()+"px")),(d=i.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},automaticAlignment:function(){var t=this,e=t.getFormWrapper().find(".dgwt-wcas-search-input"),s=t.getSuggestionsContainer(),i=t.getDetailsContainer();if(null==t.autoAligmentprocess){var o=[e.width(),s.height()];t.options.showDetailsPanel&&(o[2]=i.height()),t.autoAligmentprocess=setInterval(function(){var a=[e.width(),s.height()];t.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){t.fixHeight(),t.fixPositionCapture(),o=a;break}t.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&t.fixHeight())},10)}},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=e.outerHeight(),a=this.el.outerHeight(),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-o,g=c+l-(n.top+a+o);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight()}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return t("."+this.options.containerClass)},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case a:if(-1===this.selectedIndex)return void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case l:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e},getSuggestionsLocal:function(e){var s,i=this.options,o=e.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return a(t,e,o)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var o,a,n,r,l=this,c=l.options,d=c.serviceUrl,g=l.getFormWrapper();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),c.params=l.applyCustomParams(c.params),l.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(l.element,c.params)&&(a=c.ignoreParams?null:c.params,t.isFunction(c.lookup)?c.lookup(i,function(t){l.suggestions=t.suggestions,l.suggest(),l.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(l.element,i,t.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+t.param(a||{}),o=l.cachedResponse[n]),o&&Array.isArray(o.suggestions)?(l.suggestions=o.suggestions,l.suggest(),l.selectFirstSuggestion(o.suggestions),c.onSearchComplete.call(l.element,i,o.suggestions)):l.isBadQuery(i)?c.onSearchComplete.call(l.element,i,[]):(l.abortAjax(),r={url:d,data:a,type:c.type,dataType:c.dataType},t.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,e.debounce(function(){var e=s.object,o=s.ajaxSettings;e.currentRequest=t.ajax(o).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions),e.updatePrices()}).fail(function(t,s,o){e.options.onSearchError.call(e.element,i,t,s,o)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=e&&void 0!==e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();var i,o=s.getDetailsContainer(),a=s.prepareSuggestionObjectID(e);if(null!=(i=s.cachedDetails[a]))o.html(i.html),s.fixHeight(),s.fixPositionCapture();else{var n={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};n.items.push(i)}}),o.html(""),s.preloader("show","details","",!0),-1!=t.inArray(a,s.detailsRequestsSent))return;s.detailsRequestsSent.push(a),t.ajax({data:n,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var a=e.items[i].objectID;if(s.cachedDetails[a]={html:e.items[i].html},void 0!==e.items[i].price&&e.items[i].price.length>0&&(s.cachedPrices[a]=e.items[i].price),void 0!==e.items[i].imageSrc&&e.items[i].imageSrc.length>0)(new Image).src=e.items[i].imageSrc}s.preloader("hide","details","",!0);var n=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[n]?o.html(s.cachedDetails[n].html):o.html(""),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(t,e){s.preloader("hide","details","",!0),o.html(t),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(e){var s,i,o=this,a=[];if(o.options.showPrice&&o.options.dynamicPrices&&0!=o.suggestions.length){for(s=0;s<o.suggestions.length;s++)if(void 0!==o.suggestions[s].type&&("product"==o.suggestions[s].type||"product_variation"==o.suggestions[s].type)){var n="product__"+o.suggestions[s].post_id;void 0!==o.cachedPrices[n]?o.updatePrice(s,o.cachedPrices[n]):(o.applyPreloaderForPrice(s),a.push(o.suggestions[s].post_id))}if(!e&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};t.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(t){if(void 0!==t.success&&t.success&&t.data.length>0)for(s=0;s<t.data.length;s++){var e=t.data[s].id,a=t.data[s].price;if(o.suggestions.length>0)for(i=0;i<o.suggestions.length;i++)if(void 0!==o.suggestions[i].type&&("product"==o.suggestions[i].type||"product_variation"==o.suggestions[i].type)&&o.suggestions[i].post_id==e){var n="product__"+e;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(t,e){}})}}},updatePrice:function(e,s){if(void 0!==this.suggestions[e]){this.suggestions[e].price=s;var i=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(t){if("object"==typeof dgwt_wcas.custom_params){var e=dgwt_wcas.custom_params;for(var s in e)t[s]=e[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)t[s]=i[s];return t},applyPreloaderForPrice:function(e){if(void 0!==this.suggestions[e]){var s=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');s.length&&s.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id),void 0!==t.post_type&&(e=t.type+"__"+t.post_id+"__"+t.post_type)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},selectFirstSuggestion:function(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(e){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),s.hide(),s.removeClass(this.classes.suggestionsContainerOrientTop),i.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),t("body").removeClass("dgwt-wcas-is-details"),t("body").removeClass("dgwt-wcas-full-width"),t("body").removeClass("dgwt-wcas-nores"),t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof e&&e&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(e){var s,i=e.find("."+this.options.formClass),o=i.width(),a=t(window).width(),n=e[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),i.css({left:s+"px"})},hideIconModeSearch:function(){var e=t(".dgwt-wcas-layout-icon-open");e.length>0&&e.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),o=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var a=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&o&&a&&e.hide()}else i&&o&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,s=this,i=s.options,o=i.groupBy,a=i.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,l=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(s,l){var c="",g=!1;if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(l,0)),void 0===l.type||"product"!=l.type&&"product_variation"!=l.type){var u,p=r,w="dgwt-wcas-st",f="",m="",v="",C=!0;"product_cat"===l.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.category+"</span>"),void 0!==l.breadcrumbs&&l.breadcrumbs&&(v=l.breadcrumbs+" &gt; "+l.value,m+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+l.breadcrumbs+"</span>")):"product_tag"===l.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.tag+"</span>")):i.isPremium&&l.taxonomy===i.taxonomyBrands?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.brand+"</span>")):i.isPremium&&"vendor"===l.type?(p+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===l.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===l.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===l.type?(p+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",w="dgwt-wcas-st-more",l.value=dgwt_wcas.labels.show_more+" ("+l.total+")",C=!1):i.showHeadings&&"headline"===l.type?(p+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[l.value+"_plu"]&&(l.value=dgwt_wcas.labels[l.value+"_plu"]),C=!1):(p+=" dgwt-wcas-suggestion-nores",l.value=dgwt_wcas.labels.no_results,C=!1,!0===i.showDetailsPanel&&d.html(""),t("body").addClass("dgwt-wcas-nores")),void 0!==l.image_src&&l.image_src&&(u=!0),v=v.length>0?' title="'+v+'"':"",h+='<div class="'+p+'" data-index="'+s+'">',u&&(h+='<span class="dgwt-wcas-si"><img src="'+l.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+v+' class="'+w+'">',"vendor"===l.type?(h+='<span class="dgwt-wcas-st-title">'+f+a(l.value,n,C,i)+m+"</span>",l.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(l.shop_city,n,!0,i)+"</span>"),void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>")):h+=f+a(l.value,n,C,i)+m,h+="</span>",h+=u?"</div>":"",h+="</div>"}else{!0===i.showImage&&void 0!==l.thumb_html&&(g=!0);var b="product_variation"===l.type?" dgwt-wcas-suggestion-product-var":"";if(c+=void 0!==l.post_id?'data-post-id="'+l.post_id+'" ':"",c+=void 0!==l.taxonomy?'data-taxonomy="'+l.taxonomy+'" ':"",c+=void 0!==l.term_id?'data-term-id="'+l.term_id+'" ':"",h+='<div class="'+r+" dgwt-wcas-suggestion-product"+b+'" data-index="'+s+'" '+c+">",g&&(h+='<span class="dgwt-wcas-si">'+l.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+a(l.value,n,!0,i)+"</span>",!0===i.showSKU&&void 0!==l.sku&&l.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(l.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==l.vendor&&l.vendor){var y='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+l.vendor+"</span>";void 0!==l.vendor_url&&l.vendor_url?h+='<a href="'+l.vendor_url+'">'+y+"</a>":h+=y}h+="</span>",!0===i.showPrice&&void 0!==l.price&&(h+='<span class="dgwt-wcas-sp">'+l.price+"</span>"),!0===i.showFeaturedBadge&&!0===l.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===l.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=g?"</div>":"",h+="</div>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),t("body").addClass("dgwt-wcas-open"),s.automaticAlignment(),!0===i.showDetailsPanel&&(t("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),o=this.getFormWrapper(),a=this.getSuggestionsContainer(),n=this.getDetailsContainer(),r=this.getFormOffset();if(o.length){var l=getComputedStyle(o[0]).width;if(l=Math.round(parseFloat(l.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),a.css("width",e+"px")),this.canShowDetailsBox()){if(o.width()>=550)return i.addClass("dgwt-wcas-full-width"),l%2==0?(a.css("width",Math.round(l/2)),n.css("width",Math.round(l/2))):(a.css("width",Math.floor(l/2)),n.css("width",Math.ceil(l/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):a.css("left",l/2+r.left+"px"));i.addClass("dgwt-wcas-details-right")}}},positionPreloader:function(e){var s="object"==typeof e?e.find(".dgwt-wcas-search-submit"):t(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var o=0===i.value.toLowerCase().indexOf(e);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(e,s,i,o){var a,n,r="dgwt-wcas-preloader-wrapp",l=null==i?r:r+" "+i;if("form"===s?n=this.getFormWrapper().find(".dgwt-wcas-preloader"):"details"===s&&(n=this.getDetailsContainer()),1==dgwt_wcas.show_preloader&&0!=n.length)if(!0===o)if("hide"!==e){if("show"===e){var c=this.options.isRtl?"-rtl":"";a='<div class="'+l+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+c+'.png" /></div>',n.html(a)}}else t(r).remove();else"hide"===e?(n.removeClass(i),n.html("")):(n.addClass(i),"string"==typeof dgwt_wcas.preloader_icon&&n.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.hide(),this.onSelect(t)},moveUp:function(){if(-1!==this.selectedIndex){if(this.latestActivateSource="key",0===this.selectedIndex)return this.getSuggestionsContainer().children("."+this.classes.suggestion).first().removeClass(this.classes.selected),this.selectedIndex=-1,this.ignoreValueChange=!1,this.el.val(this.currentValue),void this.findBestHint();this.adjustScroll(this.selectedIndex-1,"up")}},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&(this.latestActivateSource="key",this.adjustScroll(this.selectedIndex+1,"down"))},adjustScroll:function(e,s){if("headline"===this.suggestions[e].type&&(e="down"===s?e+1:e-1),void 0!==this.suggestions[e]){var i=this.activate(e);if(this.getDetails(this.suggestions[e]),"more_products"!==this.suggestions[e].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=t(i).outerHeight();o=i.offsetTop,n=(a=r.scrollTop())+this.options.maxHeight-l,o<a?r.scrollTop(o):o>n&&r.scrollTop(o-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0),this.signalHint(null)}}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type&&("enter"!==this.actionTriggerSource||"key"==this.latestActivateSource||"product_variation"==i.type)?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),t("."+this.options.containerClass).remove(),t("."+this.options.containerDetailsClass).remove()},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),o=e.getSuggestionsContainer(),a="";t("html").addClass("dgwt-wcas-overlay-mobile-on"),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon?a+=dgwt_wcas.back_icon:(a+='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">',a+='<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>',a+="</svg>"),a+="</button>",a+="</div>",a+="</div>",t(e.options.mobileOverlayWrapper).append(a),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),o.appendTo(".js-dgwt-wcas-om-bar"),i.addClass("dgwt-wcas-search-wrapp-mobile"),i.hasClass("dgwt-wcas-has-submit")&&(i.addClass("dgwt-wcas-has-submit-off"),i.removeClass("dgwt-wcas-has-submit")),i.find("."+e.options.searchInputClass).focus(),t(document).on("click",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),o=t(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);o.hasClass("dgwt-wcas-has-submit-off")&&(o.removeClass("dgwt-wcas-has-submit-off"),o.addClass("dgwt-wcas-has-submit")),o.removeClass("dgwt-wcas-search-wrapp-mobile"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(o),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var t=o.find(".dgwt-wcas-close");o.length>0&&t.removeClass("dgwt-wcas-close"),s.hide()},150),s.overlayMobileState="off"},showCloseButton:function(){var t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",e=this.getFormWrapper().find("."+this.options.preloaderClass);e.addClass(this.options.closeTrigger),e.html(t)},hideCloseButton:function(){var t=this.getFormWrapper().find("."+this.options.closeTrigger);t.length&&(t.removeClass(this.options.closeTrigger),t.html(""))},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:e});else if("undefined"!=typeof ga){var s=ga.getAll()[0];s&&s.send({hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}}catch(t){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if("undefined"!=typeof ga){var i=ga.getAll()[0];i&&(i.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),i.send("pageview"))}}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),o=i.data("autocomplete");"string"==typeof e?o&&"function"==typeof o[e]&&o[e](s):(o&&o.dispose&&o.dispose(),o=new d(this,e),i.data("autocomplete",o))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(){var e=t(".dgwt-wcas-search-input"),s=[];e.length>1&&e.each(function(){var e=t(this).attr("id");if(-1==t.inArray(e,s))s.push(e);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,t(this).attr("id",i),t(this).closest("form").find("label").attr("for",i)}})}function s(){var e=t(".dgwt-wcas-search-input");e.length>0&&e.each(function(){"object"!=typeof t(this).data("autocomplete")&&t(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}t(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&t("html").addClass("dgwt-wcas-is-ios");var e=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(e=!1),window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:e,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:!(void 0===dgwt_wcas.dynamic_prices||!dgwt_wcas.dynamic_prices),saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,mobileBreakpoint:s,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:!(void 0===dgwt_wcas.show_product_vendor||!dgwt_wcas.show_product_vendor)},t(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),t(window).on("load",function(){var e=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&t(i).length&&t(i).hasClass("dgwt-wcas-search-input")){var o=t(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}e>10&&clearInterval(s),e++},500)}),t(document).ready(function(){setTimeout(function(){e(),s()},500)}),t(window).on("load",function(){setTimeout(function(){e(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&t.each(elementorFrontend.documentsManager.documents,function(t,e){void 0!==e.getModal&&e.getModal&&e.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
1
+ !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1;if(o)for(o=o.sort(function(t,e){return e.length-t.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>1){var n=o[i].replace(/[\^\@]/g,"");if(n.length>0){var r="("+e.escapeRegExChars(n.trim())+")";t=t.replace(new RegExp(r,"gi"),"^^$1@@"),a=!0}}a&&(t=(t=t.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else r="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(r,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void t();s.id=o,i=setTimeout(function(){o===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var o;o=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(o)},i)},getActiveInstance:function(){var e,s=t(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=t(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return e=s.data("autocomplete"),!1}),e}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.latestActivateSource="",this.actionTriggerSource="",this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i,o){if(!s)return t;i&&(t=e.highlight(t,s));if(!o.convertHtml)return t;return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br))&gt;/g,"<$1>")},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1,disableHits:!1,disableSubmit:!1},d.prototype={initialize:function(){var s=this;s.element.setAttribute("autocomplete","off"),s.createContainers(),s.registerEventsSearchBar(),s.registerEventsSuggestions(),s.registerEventsDetailsPanel(),s.registerIconHandler(),s.registerEventsFixedMenu(),s.fixPositionCapture=function(){s.adjustContainerWidth(),s.visible&&s.fixPosition()},t(window).on("resize.autocomplete",function(){var t=e.getActiveInstance();void 0!==t&&t.fixPositionCapture()}),s.initMobileMode(),s.hideAfterClickOutsideListener(),s.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),s.detailsContainer&&s.detailsContainer.length>0&&s.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(e){var s=this.options;0==t("."+s.containerClass).length?(this.suggestionsContainer=t(d.utils.createNode(s.containerClass)),this.suggestionsContainer.appendTo(s.appendTo||"body"),this.suggestionsContainer.addClass("woocommerce"),!0===s.showImage&&this.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===s.showPrice&&this.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===s.showDescription&&this.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===s.showSKU&&this.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===s.showHeadings&&this.suggestionsContainer.addClass("dgwt-wcas-has-headings"),"auto"!==s.width&&this.suggestionsContainer.width(s.width)):this.suggestionsContainer=t("."+this.options.containerClass),this.canShowDetailsBox()&&(0==t("."+s.containerDetailsClass).length?(this.detailsContainer=t(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=t("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;t(document).on("click.autocomplete","."+s.options.closeTrigger,function(){var s=e.getActiveInstance();s.hide(),s.clear(!1),s.hideCloseButton(),t(this).closest("."+s.options.searchFormClass).find("."+s.options.searchInputClass).val("").focus()}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(e){if(s.options.disableSubmit)return e.preventDefault(),!1;s.suggestions.length>0&&t.each(s.suggestions,function(t,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(t),e.preventDefault(),!1})}),"complete"===document.readyState?s.positionPreloader():t(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(t){s.onKeyPress(t)}),s.el.on("keyup.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("input.autocomplete",function(t){s.onKeyUp(t)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){t(document).on("mouseenter.autocomplete",s,function(){var s=e.getActiveInstance();if(void 0!==s){var i=t(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&e.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;t(document).on("click.autocomplete",s,function(){if(!i){var s=e.getActiveInstance();s.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),s.select(t(this).data("index"))}}),t(document).on("mousedown.autocomplete",s,function(e){"number"==typeof e.which&&1===e.which&&t(e.target)[0].click()}),t(document).on("click.autocomplete","."+this.options.containerClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(t(document).on("click.autocomplete","."+this.options.containerDetailsClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)}),t(document).on("change",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}))},registerIconHandler:function(){var s=this,i=s.getFormWrapper(),o=i.find("."+s.options.formClass);i.on("click",".js-dgwt-wcas-search-icon-handler",function(t){var e=i.find("."+s.options.searchInputClass);if(i.hasClass("dgwt-wcas-layout-icon-open"))s.hide(),o.hide(!0),i.removeClass("dgwt-wcas-layout-icon-open");else{var a=i.find(".dgwt-wcas-search-icon-arrow");o.hide(),a.hide(),i.addClass("dgwt-wcas-layout-icon-open"),s.positionIconSearchMode(i),o.fadeIn(200,function(){a.show(),s.positionPreloader(i),e.focus()})}}),0==t(".js-dgwt-wcas-initialized").length&&t(".js-dgwt-wcas-search-icon-handler").length>0&&t(document).click(function(i){if(t(".dgwt-wcas-layout-icon-open").length){var o=t(i.target);if(!(o.closest("."+s.options.searchFormClass).length>0||o.closest("."+s.options.containerClass).length>0||o.closest("."+s.options.containerDetailsClass).length>0)){var a=e.getActiveInstance();if(void 0!==a){var n=a.getFormWrapper().find("."+s.options.formClass);n.hide(),a.hide(!0),n.css({left:"0"})}s.hideIconModeSearch()}}}),t(window).on("resize.autocomplete",function(){s.applyFlexibleMode()}),"complete"==document.readyState?s.applyFlexibleMode():t(window).on("load",function(){s.applyFlexibleMode()})},registerEventsFixedMenu:function(){var e=this;t(window).on("scroll",function(){if(e.suggestions.length>0&&e.elementOrParentIsFixed(e.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){e.fixHeight(),e.fixPositionCapture()},t)})}else e.fixHeight(),e.fixPositionCapture()})},initMobileMode:function(){var t=this,e=t.getFormWrapper();e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.isMobileMode()&&(e.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),e.find(".js-dgwt-wcas-enable-mobile-form").on("click",function(e){t.enableOverlayMobile()}))},applyFlexibleMode:function(){var e=t(".js-dgwt-wcas-layout-icon-flexible");e.length&&(this.isMobileMode()?(e.addClass("js-dgwt-wcas-layout-icon"),e.addClass("dgwt-wcas-layout-icon")):(e.removeClass("js-dgwt-wcas-layout-icon"),e.removeClass("dgwt-wcas-layout-icon")),e.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){t("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),o=e.getQuery(i);e.isMobileMode()||(e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==o&&(s.onInvalidateSelection||t.noop).call(e.element)},200))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),o=t.extend({},s.options,e);(s.isLocal=Array.isArray(o.lookup),s.isLocal&&(o.lookup=s.verifySuggestionsFormat(o.lookup)),o.orientation=s.validateOrientation(o.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":o.zIndex-1});o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.showCloseButton()},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this.getFormOffset();this.getSuggestionsContainer().css(t),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset(),a=o.left;if(0==i.length)return!1;var n=!0===this.options.isRtl?1:2,r=Math.round(o.left);if(o.left=r+Math.round(s.width()+n),i.css(o),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(s.css("left",r+Math.round(i.width()+n)+"px"),i.css("left",a+"px")));var l=t(window).width(),c=i.width(),d=i.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(o.left=o.left+1);var g=!1,u=!1;l<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),i.css("left",Math.round(parseFloat(s.css("left").replace("px","")))-i.outerWidth()+"px")),(d=i.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},automaticAlignment:function(){var t=this,e=t.getFormWrapper().find(".dgwt-wcas-search-input"),s=t.getSuggestionsContainer(),i=t.getDetailsContainer();if(null==t.autoAligmentprocess){var o=[e.width(),s.height()];t.options.showDetailsPanel&&(o[2]=i.height()),t.autoAligmentprocess=setInterval(function(){var a=[e.width(),s.height()];t.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){t.fixHeight(),t.fixPositionCapture(),o=a;break}t.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&t.fixHeight())},10)}},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=e.outerHeight(),a=this.el.outerHeight(),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-o,g=c+l-(n.top+a+o);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight()}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return t("."+this.options.containerClass)},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case a:if(-1===this.selectedIndex)return void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case l:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e},getSuggestionsLocal:function(e){var s,i=this.options,o=e.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return a(t,e,o)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var o,a,n,r,l=this,c=l.options,d=c.serviceUrl,g=l.getFormWrapper();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),c.params=l.applyCustomParams(c.params),l.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(l.element,c.params)&&(a=c.ignoreParams?null:c.params,t.isFunction(c.lookup)?c.lookup(i,function(t){l.suggestions=t.suggestions,l.suggest(),l.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(l.element,i,t.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+t.param(a||{}),o=l.cachedResponse[n]),o&&Array.isArray(o.suggestions)?(l.suggestions=o.suggestions,l.suggest(),l.selectFirstSuggestion(o.suggestions),c.onSearchComplete.call(l.element,i,o.suggestions)):l.isBadQuery(i)?c.onSearchComplete.call(l.element,i,[]):(l.abortAjax(),r={url:d,data:a,type:c.type,dataType:c.dataType},t.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,e.debounce(function(){var e=s.object,o=s.ajaxSettings;e.currentRequest=t.ajax(o).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions),e.updatePrices()}).fail(function(t,s,o){e.options.onSearchError.call(e.element,i,t,s,o)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=e&&void 0!==e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();var i,o=s.getDetailsContainer(),a=s.prepareSuggestionObjectID(e);if(null!=(i=s.cachedDetails[a]))o.html(i.html),s.fixHeight(),s.fixPositionCapture();else{var n={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};n.items.push(i)}}),o.html(""),s.preloader("show","details","",!0),-1!=t.inArray(a,s.detailsRequestsSent))return;s.detailsRequestsSent.push(a),t.ajax({data:n,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var a=e.items[i].objectID;if(s.cachedDetails[a]={html:e.items[i].html},void 0!==e.items[i].price&&e.items[i].price.length>0&&(s.cachedPrices[a]=e.items[i].price),void 0!==e.items[i].imageSrc&&e.items[i].imageSrc.length>0)(new Image).src=e.items[i].imageSrc}s.preloader("hide","details","",!0);var n=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[n]?o.html(s.cachedDetails[n].html):o.html(""),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(t,e){s.preloader("hide","details","",!0),o.html(t),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(e){var s,i,o=this,a=[];if(o.options.showPrice&&o.options.dynamicPrices&&0!=o.suggestions.length){for(s=0;s<o.suggestions.length;s++)if(void 0!==o.suggestions[s].type&&("product"==o.suggestions[s].type||"product_variation"==o.suggestions[s].type)){var n="product__"+o.suggestions[s].post_id;void 0!==o.cachedPrices[n]?o.updatePrice(s,o.cachedPrices[n]):(o.applyPreloaderForPrice(s),a.push(o.suggestions[s].post_id))}if(!e&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};t.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(t){if(void 0!==t.success&&t.success&&t.data.length>0)for(s=0;s<t.data.length;s++){var e=t.data[s].id,a=t.data[s].price;if(o.suggestions.length>0)for(i=0;i<o.suggestions.length;i++)if(void 0!==o.suggestions[i].type&&("product"==o.suggestions[i].type||"product_variation"==o.suggestions[i].type)&&o.suggestions[i].post_id==e){var n="product__"+e;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(t,e){}})}}},updatePrice:function(e,s){if(void 0!==this.suggestions[e]){this.suggestions[e].price=s;var i=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(t){if("object"==typeof dgwt_wcas.custom_params){var e=dgwt_wcas.custom_params;for(var s in e)t[s]=e[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)t[s]=i[s];return t},applyPreloaderForPrice:function(e){if(void 0!==this.suggestions[e]){var s=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');s.length&&s.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id),void 0!==t.post_type&&(e=t.type+"__"+t.post_id+"__"+t.post_type)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},selectFirstSuggestion:function(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(e){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),s.hide(),s.removeClass(this.classes.suggestionsContainerOrientTop),i.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),t("body").removeClass("dgwt-wcas-is-details"),t("body").removeClass("dgwt-wcas-full-width"),t("body").removeClass("dgwt-wcas-nores"),t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof e&&e&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(e){var s,i=e.find("."+this.options.formClass),o=i.width(),a=t(window).width(),n=e[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),i.css({left:s+"px"})},hideIconModeSearch:function(){var e=t(".dgwt-wcas-layout-icon-open");e.length>0&&e.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),o=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var a=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&o&&a&&e.hide()}else i&&o&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,s=this,i=s.options,o=i.groupBy,a=i.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,l=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(s,l){var c="",g=!1;if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(l,0)),void 0===l.type||"product"!=l.type&&"product_variation"!=l.type){var u,w=r,p="dgwt-wcas-st",f="",m="",v="",C=!0;"product_cat"===l.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.category+"</span>"),void 0!==l.breadcrumbs&&l.breadcrumbs&&(v=l.breadcrumbs+" &gt; "+l.value,m+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+l.breadcrumbs+"</span>")):"product_tag"===l.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.tag+"</span>")):i.isPremium&&l.taxonomy===i.taxonomyBrands?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.brand+"</span>")):i.isPremium&&"vendor"===l.type?(w+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===l.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===l.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===l.type?(w+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",p="dgwt-wcas-st-more",l.value=dgwt_wcas.labels.show_more+" ("+l.total+")",C=!1):i.showHeadings&&"headline"===l.type?(w+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[l.value+"_plu"]&&(l.value=dgwt_wcas.labels[l.value+"_plu"]),C=!1):(w+=" dgwt-wcas-suggestion-nores",l.value=dgwt_wcas.labels.no_results,C=!1,!0===i.showDetailsPanel&&d.html(""),t("body").addClass("dgwt-wcas-nores")),void 0!==l.image_src&&l.image_src&&(u=!0),v=v.length>0?' title="'+v+'"':"",h+='<div class="'+w+'" data-index="'+s+'">',u&&(h+='<span class="dgwt-wcas-si"><img src="'+l.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+v+' class="'+p+'">',"vendor"===l.type?(h+='<span class="dgwt-wcas-st-title">'+f+a(l.value,n,C,i)+m+"</span>",l.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(l.shop_city,n,!0,i)+"</span>"),void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>")):h+=f+a(l.value,n,C,i)+m,h+="</span>",h+=u?"</div>":"",h+="</div>"}else{!0===i.showImage&&void 0!==l.thumb_html&&(g=!0);var b="product_variation"===l.type?" dgwt-wcas-suggestion-product-var":"";if(c+=void 0!==l.post_id?'data-post-id="'+l.post_id+'" ':"",c+=void 0!==l.taxonomy?'data-taxonomy="'+l.taxonomy+'" ':"",c+=void 0!==l.term_id?'data-term-id="'+l.term_id+'" ':"",h+='<div class="'+r+" dgwt-wcas-suggestion-product"+b+'" data-index="'+s+'" '+c+">",g&&(h+='<span class="dgwt-wcas-si">'+l.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+a(l.value,n,!0,i)+"</span>",!0===i.showSKU&&void 0!==l.sku&&l.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(l.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==l.vendor&&l.vendor){var y='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+l.vendor+"</span>";void 0!==l.vendor_url&&l.vendor_url?h+='<a href="'+l.vendor_url+'">'+y+"</a>":h+=y}h+="</span>",!0===i.showPrice&&void 0!==l.price&&(h+='<span class="dgwt-wcas-sp">'+l.price+"</span>"),!0===i.showFeaturedBadge&&!0===l.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===l.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=g?"</div>":"",h+="</div>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),t("body").addClass("dgwt-wcas-open"),s.automaticAlignment(),!0===i.showDetailsPanel&&(t("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),o=this.getFormWrapper(),a=this.getSuggestionsContainer(),n=this.getDetailsContainer(),r=this.getFormOffset();if(o.length){var l=getComputedStyle(o[0]).width;if(l=Math.round(parseFloat(l.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),a.css("width",e+"px")),this.canShowDetailsBox()){if(o.width()>=550)return i.addClass("dgwt-wcas-full-width"),l%2==0?(a.css("width",Math.round(l/2)),n.css("width",Math.round(l/2))):(a.css("width",Math.floor(l/2)),n.css("width",Math.ceil(l/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):a.css("left",l/2+r.left+"px"));i.addClass("dgwt-wcas-details-right")}}},positionPreloader:function(e){var s="object"==typeof e?e.find(".dgwt-wcas-search-submit"):t(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var o=0===i.value.toLowerCase().indexOf(e);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(e,s,i,o){var a,n,r="dgwt-wcas-preloader-wrapp",l=null==i?r:r+" "+i;if("form"===s?n=this.getFormWrapper().find(".dgwt-wcas-preloader"):"details"===s&&(n=this.getDetailsContainer()),1==dgwt_wcas.show_preloader&&0!=n.length)if(!0===o)if("hide"!==e){if("show"===e){var c=this.options.isRtl?"-rtl":"";a='<div class="'+l+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+c+'.png" /></div>',n.html(a)}}else t(r).remove();else"hide"===e?(n.removeClass(i),n.html("")):(n.addClass(i),"string"==typeof dgwt_wcas.preloader_icon&&n.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.options.disableHits||(this.hide(),this.onSelect(t))},moveUp:function(){if(-1!==this.selectedIndex){if(this.latestActivateSource="key",0===this.selectedIndex)return this.getSuggestionsContainer().children("."+this.classes.suggestion).first().removeClass(this.classes.selected),this.selectedIndex=-1,this.ignoreValueChange=!1,this.el.val(this.currentValue),void this.findBestHint();this.adjustScroll(this.selectedIndex-1,"up")}},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&(this.latestActivateSource="key",this.adjustScroll(this.selectedIndex+1,"down"))},adjustScroll:function(e,s){if("headline"===this.suggestions[e].type&&(e="down"===s?e+1:e-1),void 0!==this.suggestions[e]){var i=this.activate(e);if(this.getDetails(this.suggestions[e]),"more_products"!==this.suggestions[e].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=t(i).outerHeight();o=i.offsetTop,n=(a=r.scrollTop())+this.options.maxHeight-l,o<a?r.scrollTop(o):o>n&&r.scrollTop(o-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0),this.signalHint(null)}}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type&&("enter"!==this.actionTriggerSource||"key"==this.latestActivateSource||"product_variation"==i.type)?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),t("."+this.options.containerClass).remove(),t("."+this.options.containerDetailsClass).remove()},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),o=e.getSuggestionsContainer(),a="";t("html").addClass("dgwt-wcas-overlay-mobile-on"),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon?a+=dgwt_wcas.back_icon:(a+='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">',a+='<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>',a+="</svg>"),a+="</button>",a+="</div>",a+="</div>",t(e.options.mobileOverlayWrapper).append(a),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),o.appendTo(".js-dgwt-wcas-om-bar"),i.addClass("dgwt-wcas-search-wrapp-mobile"),i.hasClass("dgwt-wcas-has-submit")&&(i.addClass("dgwt-wcas-has-submit-off"),i.removeClass("dgwt-wcas-has-submit")),i.find("."+e.options.searchInputClass).focus(),t(document).on("click",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),o=t(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);o.hasClass("dgwt-wcas-has-submit-off")&&(o.removeClass("dgwt-wcas-has-submit-off"),o.addClass("dgwt-wcas-has-submit")),o.removeClass("dgwt-wcas-search-wrapp-mobile"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(o),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var t=o.find(".dgwt-wcas-close");o.length>0&&(t.removeClass("dgwt-wcas-close"),t.html("")),s.hide()},150),s.overlayMobileState="off"},showCloseButton:function(){var t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",e=this.getFormWrapper().find("."+this.options.preloaderClass);e.addClass(this.options.closeTrigger),e.html(t)},hideCloseButton:function(){var t=this.getFormWrapper().find("."+this.options.closeTrigger);t.length&&(t.removeClass(this.options.closeTrigger),t.html(""))},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:e});else if("undefined"!=typeof ga){var s=ga.getAll()[0];s&&s.send({hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}}catch(t){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if("undefined"!=typeof ga){var i=ga.getAll()[0];i&&(i.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),i.send("pageview"))}}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),o=i.data("autocomplete");"string"==typeof e?o&&"function"==typeof o[e]&&o[e](s):(o&&o.dispose&&o.dispose(),o=new d(this,e),i.data("autocomplete",o))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(){var e=t(".dgwt-wcas-search-input"),s=[];e.length>1&&e.each(function(){var e=t(this).attr("id");if(-1==t.inArray(e,s))s.push(e);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,t(this).attr("id",i),t(this).closest("form").find("label").attr("for",i)}})}function s(){var e=t(".dgwt-wcas-search-input");e.length>0&&e.each(function(){"object"!=typeof t(this).data("autocomplete")&&t(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}t(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&t("html").addClass("dgwt-wcas-is-ios");var e=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(e=!1),window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:e,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:!(void 0===dgwt_wcas.dynamic_prices||!dgwt_wcas.dynamic_prices),saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,mobileBreakpoint:s,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:!(void 0===dgwt_wcas.show_product_vendor||!dgwt_wcas.show_product_vendor),disableHits:!(void 0===dgwt_wcas.disable_hits||!dgwt_wcas.disable_hits),disableSubmit:!(void 0===dgwt_wcas.disable_submit||!dgwt_wcas.disable_submit)},t(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),t(window).on("load",function(){var e=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&t(i).length&&t(i).hasClass("dgwt-wcas-search-input")){var o=t(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}e>10&&clearInterval(s),e++},500)}),t(document).ready(function(){setTimeout(function(){e(),s()},500)}),t(window).on("load",function(){setTimeout(function(){e(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&t.each(elementorFrontend.documentsManager.documents,function(t,e){void 0!==e.getModal&&e.getModal&&e.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
includes/Abstracts/ThemeIntegration.php CHANGED
@@ -60,7 +60,7 @@ abstract class ThemeIntegration {
60
  $settings[ $key ][55] = array(
61
  'name' => $this->themeSlug . '_replace_search',
62
  'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
63
- 'desc' => sprintf( __( 'Replace all %s search bars with the %.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
64
  'type' => 'checkbox',
65
  'default' => 'off',
66
  );
60
  $settings[ $key ][55] = array(
61
  'name' => $this->themeSlug . '_replace_search',
62
  'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
63
+ 'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
64
  'type' => 'checkbox',
65
  'default' => 'off',
66
  );
includes/Admin/AdminMenu.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace DgoraWcas\Admin;
4
 
5
  // Exit if accessed directly
 
6
  use DgoraWcas\Settings ;
7
  if ( !defined( 'ABSPATH' ) ) {
8
  exit;
@@ -21,10 +22,11 @@ class AdminMenu
21
  */
22
  public function addMenu()
23
  {
 
24
  add_submenu_page(
25
  'woocommerce',
26
  __( 'FiboSearch', 'ajax-search-for-woocommerce' ),
27
- __( 'FiboSearch', 'ajax-search-for-woocommerce' ),
28
  'manage_options',
29
  'dgwt_wcas_settings',
30
  array( $this, 'settingsPage' )
3
  namespace DgoraWcas\Admin;
4
 
5
  // Exit if accessed directly
6
+ use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
7
  use DgoraWcas\Settings ;
8
  if ( !defined( 'ABSPATH' ) ) {
9
  exit;
22
  */
23
  public function addMenu()
24
  {
25
+ $menuSuffix = '';
26
  add_submenu_page(
27
  'woocommerce',
28
  __( 'FiboSearch', 'ajax-search-for-woocommerce' ),
29
+ __( 'FiboSearch', 'ajax-search-for-woocommerce' ) . $menuSuffix,
30
  'manage_options',
31
  'dgwt_wcas_settings',
32
  array( $this, 'settingsPage' )
includes/Admin/Install.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace DgoraWcas\Admin;
4
 
5
  use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
 
6
  // Exit if accessed directly
7
  if ( !defined( 'ABSPATH' ) ) {
8
  exit;
3
  namespace DgoraWcas\Admin;
4
 
5
  use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
6
+ use DgoraWcas\Helpers ;
7
  // Exit if accessed directly
8
  if ( !defined( 'ABSPATH' ) ) {
9
  exit;
includes/Admin/Promo/FeedbackNotice.php CHANGED
@@ -121,9 +121,12 @@ class FeedbackNotice {
121
  /**
122
  * Hide admin notice
123
  *
124
- * @return null
125
  */
126
  public function dismissNotice() {
 
 
 
127
 
128
  update_option( self::HIDE_NOTICE_OPT, true );
129
 
121
  /**
122
  * Hide admin notice
123
  *
124
+ * @return void
125
  */
126
  public function dismissNotice() {
127
+ if ( ! current_user_can( 'administrator' ) ) {
128
+ wp_die( - 1, 403 );
129
+ }
130
 
131
  update_option( self::HIDE_NOTICE_OPT, true );
132
 
includes/Admin/RegenerateImages.php CHANGED
@@ -11,6 +11,7 @@ class RegenerateImages {
11
 
12
  const ALREADY_REGENERATED_OPT_KEY = 'dgwt_wcas_images_regenerated';
13
  const REGENERATE_ACTION = 'dgwt_wcas_regenerate_images';
 
14
  const DISMISS_AJAX_ACTION = 'dgwt_wcas_dismiss_notice_regenerate_images';
15
 
16
  public function __construct() {
@@ -49,6 +50,12 @@ class RegenerateImages {
49
  * @return void
50
  */
51
  public function regenerateImages() {
 
 
 
 
 
 
52
  if ( class_exists( 'WC_Regenerate_Images' ) ) {
53
 
54
  if ( method_exists( 'Jetpack', 'is_module_active' ) && \Jetpack::is_module_active( 'photon' ) ) {
@@ -92,8 +99,8 @@ class RegenerateImages {
92
  <?php
93
  $button = '<a href="#" class="button button-small js-dgwt-wcas-start-regenerate-images">' . __( 'Regenerate WooCommerce images' ) . '</a>';
94
  $pluginLink = '<a target="_blank" href="https://wordpress.org/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a>';
95
- printf( __( '%: it is recommended to generate a special small image size for existing products to ensure a better user experience. This is a one-time action. <br /><br />You can do it by clicking %s or use an external plugin such as %s.',
96
- 'ajax-search-for-woocommerce' ), '<b>' . DGWT_WCAS_FULL_NAME . '</b>', $button, $pluginLink );
97
  ?>
98
  </p>
99
  </div>
@@ -104,12 +111,11 @@ class RegenerateImages {
104
  /**
105
  * Hide admin notice
106
  *
107
- * @return null
108
  */
109
  public function dismissNotice() {
110
-
111
  if ( ! current_user_can( 'administrator' ) ) {
112
- return;
113
  }
114
 
115
  update_option( self::ALREADY_REGENERATED_OPT_KEY, true );
@@ -166,6 +172,7 @@ class RegenerateImages {
166
  url: ajaxurl,
167
  data: {
168
  action: '<?php echo self::REGENERATE_ACTION; ?>',
 
169
  }
170
  }).done(function (data) {
171
 
11
 
12
  const ALREADY_REGENERATED_OPT_KEY = 'dgwt_wcas_images_regenerated';
13
  const REGENERATE_ACTION = 'dgwt_wcas_regenerate_images';
14
+ const REGENERATE_ACTION_NONCE = 'dgwt_wcas_regenerate_images_nonce';
15
  const DISMISS_AJAX_ACTION = 'dgwt_wcas_dismiss_notice_regenerate_images';
16
 
17
  public function __construct() {
50
  * @return void
51
  */
52
  public function regenerateImages() {
53
+ if ( ! current_user_can( 'administrator' ) ) {
54
+ wp_die( - 1, 403 );
55
+ }
56
+
57
+ check_ajax_referer( self::REGENERATE_ACTION_NONCE );
58
+
59
  if ( class_exists( 'WC_Regenerate_Images' ) ) {
60
 
61
  if ( method_exists( 'Jetpack', 'is_module_active' ) && \Jetpack::is_module_active( 'photon' ) ) {
99
  <?php
100
  $button = '<a href="#" class="button button-small js-dgwt-wcas-start-regenerate-images">' . __( 'Regenerate WooCommerce images' ) . '</a>';
101
  $pluginLink = '<a target="_blank" href="https://wordpress.org/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a>';
102
+ printf( __( '%s: it is recommended to generate a special small image size for existing products to ensure a better user experience. This is a one-time action. <br /><br />You can do it by clicking %s or use an external plugin such as %s.',
103
+ 'ajax-search-for-woocommerce' ), '<b>' . DGWT_WCAS_NAME . '</b>', $button, $pluginLink );
104
  ?>
105
  </p>
106
  </div>
111
  /**
112
  * Hide admin notice
113
  *
114
+ * @return void
115
  */
116
  public function dismissNotice() {
 
117
  if ( ! current_user_can( 'administrator' ) ) {
118
+ wp_die( - 1, 403 );
119
  }
120
 
121
  update_option( self::ALREADY_REGENERATED_OPT_KEY, true );
172
  url: ajaxurl,
173
  data: {
174
  action: '<?php echo self::REGENERATE_ACTION; ?>',
175
+ _wpnonce: '<?php echo wp_create_nonce( self::REGENERATE_ACTION_NONCE ); ?>'
176
  }
177
  }).done(function (data) {
178
 
includes/Admin/Troubleshooting.php CHANGED
@@ -60,7 +60,7 @@ class Troubleshooting
60
  {
61
  $sections[35] = array(
62
  'id' => self::SECTION_ID,
63
- 'title' => __( 'Troubleshooting', 'ajax-search-for-woocommerce' ) . '<span class="js-dgwt-wcas-troubleshooting-count dgwt-wcas-troubleshooting-count"></span>',
64
  );
65
  return $sections;
66
  }
@@ -70,8 +70,11 @@ class Troubleshooting
70
  */
71
  public function asyncTest()
72
  {
 
 
 
73
  check_ajax_referer( self::ASYNC_TEST_NONCE );
74
- $test = ( isset( $_POST['test'] ) ? $_POST['test'] : '' );
75
  if ( !$this->isTestExists( $test ) ) {
76
  wp_send_json_error();
77
  }
@@ -90,6 +93,9 @@ class Troubleshooting
90
  */
91
  public function resetAsyncTests()
92
  {
 
 
 
93
  check_ajax_referer( self::RESET_ASYNC_TESTS_NONCE );
94
  delete_transient( self::TRANSIENT_RESULTS_KEY );
95
  wp_send_json_success();
@@ -268,17 +274,16 @@ class Troubleshooting
268
 
269
  if ( $markAsCritical ) {
270
  $result['status'] = 'critical';
 
 
271
  $result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
272
  if ( !dgoraAsfwFs()->is_premium() ) {
273
  $result['description'] = __( 'This issue may affect the search results page and e.g. display all products every time', 'ajax-search-for-woocommerce' );
274
  }
275
  $result['description'] .= '<h3 class="dgwt-wcas-font-thin">' . __( 'Solutions:', 'ajax-search-for-woocommerce' ) . '</h3>';
276
- $result['description'] .= '<h4>' . __( 'Do you have a Basic Auth?', 'ajax-search-for-woocommerce' ) . '</h4>';
277
- $result['description'] .= '<p>' . __( 'If yes, you have to add to your <code>wp-config.php</code> file following constants. Remember to replace <code>your-username</code> and <code>your-password</code> with your values.', 'ajax-search-for-woocommerce' ) . '</p>';
278
- $result['description'] .= '<pre style="margin-top: 10px">define(\'DGWT_WCAS_BA_USERNAME\', \'your-username\');';
279
- $result['description'] .= '</br>define(\'DGWT_WCAS_BA_PASSWORD\', \'your-password\');</pre>';
280
- $result['description'] .= '<h4 style="margin-top: 15px">' . __( 'Is your website publicly available only for whitelisted IPs?', 'ajax-search-for-woocommerce' ) . '</h4>';
281
- $result['description'] .= '<p>' . __( 'If yes, add you server IP to whitelist IPs. That’s all.', 'ajax-search-for-woocommerce' ) . '</p>';
282
  }
283
 
284
  $this->storeResult( $result );
@@ -470,6 +475,27 @@ class Troubleshooting
470
  return $tests;
471
  }
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  /**
474
  * Check requirements
475
  *
@@ -477,7 +503,7 @@ class Troubleshooting
477
  *
478
  * @return bool
479
  */
480
- private function checkRequirements()
481
  {
482
  global $wp_version ;
483
  return version_compare( $wp_version, '5.4.0' ) >= 0;
60
  {
61
  $sections[35] = array(
62
  'id' => self::SECTION_ID,
63
+ 'title' => __( 'Troubleshooting', 'ajax-search-for-woocommerce' ) . '<span class="js-dgwt-wcas-troubleshooting-count dgwt-wcas-tab-mark"></span>',
64
  );
65
  return $sections;
66
  }
70
  */
71
  public function asyncTest()
72
  {
73
+ if ( !current_user_can( 'administrator' ) ) {
74
+ wp_die( -1, 403 );
75
+ }
76
  check_ajax_referer( self::ASYNC_TEST_NONCE );
77
+ $test = ( isset( $_POST['test'] ) ? wc_clean( wp_unslash( $_POST['test'] ) ) : '' );
78
  if ( !$this->isTestExists( $test ) ) {
79
  wp_send_json_error();
80
  }
93
  */
94
  public function resetAsyncTests()
95
  {
96
+ if ( !current_user_can( 'administrator' ) ) {
97
+ wp_die( -1, 403 );
98
+ }
99
  check_ajax_referer( self::RESET_ASYNC_TESTS_NONCE );
100
  delete_transient( self::TRANSIENT_RESULTS_KEY );
101
  wp_send_json_success();
274
 
275
  if ( $markAsCritical ) {
276
  $result['status'] = 'critical';
277
+ $linkToDocs = 'https://fibosearch.com/documentation/troubleshooting/the-indexer-was-stuck/';
278
+ $linkToWpHealth = admin_url( 'site-health.php' );
279
  $result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
280
  if ( !dgoraAsfwFs()->is_premium() ) {
281
  $result['description'] = __( 'This issue may affect the search results page and e.g. display all products every time', 'ajax-search-for-woocommerce' );
282
  }
283
  $result['description'] .= '<h3 class="dgwt-wcas-font-thin">' . __( 'Solutions:', 'ajax-search-for-woocommerce' ) . '</h3>';
284
+ $result['description'] .= '<h4>' . __( "Your server can't send an HTTP request to itself", 'ajax-search-for-woocommerce' ) . '</h4>';
285
+ $result['description'] .= '<p>' . sprintf( __( 'Go to <a href="%s" target="_blank">Tools -> Site Health</a> in your WordPress. You should see issues related to REST API or Loopback request. Expand descriptions of these errors and follow the instructions. Probably you will need to contact your hosting provider to solve it.', 'ajax-search-for-woocommerce' ), $linkToWpHealth ) . '</p>';
286
+ $result['description'] .= '<p>' . __( 'Is your website publicly available only for whitelisted IPs? <b>Add your server IP to the whitelist</b>. That’s all. This is a common mistake when access is blocked by a <code>.htaccess</code> file. Developers add a list of allowed IPs, but they forget to add the IP of the server to allow make HTTP requests to itself.', 'ajax-search-for-woocommerce' ) . '</p>';
 
 
 
287
  }
288
 
289
  $this->storeResult( $result );
475
  return $tests;
476
  }
477
 
478
+ /**
479
+ * Check if WP-Cron has missed events
480
+ *
481
+ * @return bool
482
+ */
483
+ public static function hasWpCronMissedEvents()
484
+ {
485
+ if ( !self::checkRequirements() ) {
486
+ return false;
487
+ }
488
+ if ( !class_exists( 'WP_Site_Health' ) ) {
489
+ require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
490
+ }
491
+ $siteHealth = \WP_Site_Health::get_instance();
492
+ $data = $siteHealth->get_test_scheduled_events();
493
+ if ( $data['status'] === 'critical' || $data['status'] === 'recommended' && $siteHealth->has_missed_cron() ) {
494
+ return true;
495
+ }
496
+ return false;
497
+ }
498
+
499
  /**
500
  * Check requirements
501
  *
503
  *
504
  * @return bool
505
  */
506
+ private static function checkRequirements()
507
  {
508
  global $wp_version ;
509
  return version_compare( $wp_version, '5.4.0' ) >= 0;
includes/Engines/WordPressNative/Search.php CHANGED
@@ -224,13 +224,9 @@ class Search
224
  if ( !$product->isCorrect() ) {
225
  continue;
226
  }
227
- $scoreDebug = '';
228
- if ( defined( 'DGWT_WCAS_DEBUG' ) && DGWT_WCAS_DEBUG ) {
229
- $scoreDebug = ' (score:' . (int) $post->score . ')';
230
- }
231
  $r = array(
232
  'post_id' => $product->getID(),
233
- 'value' => html_entity_decode( wp_strip_all_tags( $product->getName() ) ) . $scoreDebug,
234
  'url' => $product->getPermalink(),
235
  'type' => 'product',
236
  );
224
  if ( !$product->isCorrect() ) {
225
  continue;
226
  }
 
 
 
 
227
  $r = array(
228
  'post_id' => $product->getID(),
229
+ 'value' => html_entity_decode( wp_strip_all_tags( $product->getName() ) ),
230
  'url' => $product->getPermalink(),
231
  'type' => 'product',
232
  );
includes/Helpers.php CHANGED
@@ -435,27 +435,6 @@ class Helpers
435
  return $ids;
436
  }
437
 
438
- /**
439
- * Logging method.
440
- *
441
- * @param string $message Log message.
442
- * @param string $level Optional. Default 'info'. Possible values:
443
- * emergency|alert|critical|error|warning|notice|info|debug.
444
- */
445
- public static function log( $message, $level = 'info', $source = 'main' )
446
- {
447
-
448
- if ( defined( 'DGWT_WCAS_DEBUG' ) && DGWT_WCAS_DEBUG === true ) {
449
- if ( empty(self::$log) ) {
450
- self::$log = wc_get_logger();
451
- }
452
- self::$log->log( $level, $message, array(
453
- 'source' => 'dgwt-wcas-' . $source,
454
- ) );
455
- }
456
-
457
- }
458
-
459
  /**
460
  * Get readable format of memory
461
  *
@@ -698,20 +677,6 @@ class Helpers
698
  return $html;
699
  }
700
 
701
- /**
702
- * Log by WooCommerce logger
703
- *
704
- * @return void
705
- */
706
- public static function WCLog( $level = 'debug', $message = '' )
707
- {
708
- $logger = wc_get_logger();
709
- $context = array(
710
- 'source' => 'ajax-search-for-woocommerce',
711
- );
712
- $logger->log( $level, $message, $context );
713
- }
714
-
715
  /**
716
  * Get searchable custom fields keys
717
  *
435
  return $ids;
436
  }
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  /**
439
  * Get readable format of memory
440
  *
677
  return $html;
678
  }
679
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  /**
681
  * Get searchable custom fields keys
682
  *
includes/Integrations/Plugins/WooProductFilter/WooProductFilter.php CHANGED
@@ -8,7 +8,7 @@ if ( !defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
10
  /**
11
- * Integration with Woo Product Filter
12
  *
13
  * Plugin URL: https://wordpress.org/plugins/woo-product-filter/
14
  * Author: WooBeWoo
@@ -76,10 +76,10 @@ class WooProductFilter
76
  return;
77
  }
78
  if ( !empty($url_query_args['orderby']) ) {
79
- $orderby = $url_query_args['orderby'];
80
  }
81
  if ( !empty($url_query_args['order']) ) {
82
- $order = strtolower( $url_query_args['order'] );
83
  }
84
  if ( $orderby === 'price' ) {
85
  $order = 'asc';
@@ -90,6 +90,9 @@ class WooProductFilter
90
  }
91
 
92
  if ( $post_ids ) {
 
 
 
93
  $query->set( 'post__in', $post_ids );
94
  $query->set( 'orderby', 'post__in' );
95
  }
8
  exit;
9
  }
10
  /**
11
+ * Integration with WooCommerce Product Filter by WooBeWoo
12
  *
13
  * Plugin URL: https://wordpress.org/plugins/woo-product-filter/
14
  * Author: WooBeWoo
76
  return;
77
  }
78
  if ( !empty($url_query_args['orderby']) ) {
79
+ $orderby = wc_clean( wp_unslash( $url_query_args['orderby'] ) );
80
  }
81
  if ( !empty($url_query_args['order']) ) {
82
+ $order = strtolower( wc_clean( wp_unslash( $url_query_args['order'] ) ) );
83
  }
84
  if ( $orderby === 'price' ) {
85
  $order = 'asc';
90
  }
91
 
92
  if ( $post_ids ) {
93
+ if ( version_compare( WPF_VERSION, '1.4.8', '>=' ) ) {
94
+ $query->set( 's', '' );
95
+ }
96
  $query->set( 'post__in', $post_ids );
97
  $query->set( 'orderby', 'post__in' );
98
  }
includes/Integrations/Plugins/XforWooCommerceFilter/XforWooCommerceFilter.php CHANGED
@@ -58,7 +58,7 @@ class XforWooCommerceFilter
58
  if ( !$this->is_prdctfltr_ajax_search() ) {
59
  return;
60
  }
61
- $orderby = ( isset( $_POST['pf_filters'][$_POST['pf_id']]['orderby'] ) ? $_POST['pf_filters'][$_POST['pf_id']]['orderby'] : 'relevance' );
62
  $order = 'desc';
63
  if ( $orderby === 'price' ) {
64
  $order = 'asc';
58
  if ( !$this->is_prdctfltr_ajax_search() ) {
59
  return;
60
  }
61
+ $orderby = ( isset( $_POST['pf_filters'][$_POST['pf_id']]['orderby'] ) ? wc_clean( wp_unslash( $_POST['pf_filters'][$_POST['pf_id']]['orderby'] ) ) : 'relevance' );
62
  $order = 'desc';
63
  if ( $orderby === 'price' ) {
64
  $order = 'asc';
includes/Integrations/Themes/Restoration/Restoration.php CHANGED
@@ -98,7 +98,7 @@ class Restoration {
98
  add_filter( 'wc_get_template', function ( $template, $templateName ) {
99
 
100
  if ( ! empty( $templateName ) && $templateName === 'product-searchform.php' ) {
101
- $template = include DGWT_WCAS_DIR . 'partials/themes/restoration.php';
102
  }
103
 
104
  return $template;
98
  add_filter( 'wc_get_template', function ( $template, $templateName ) {
99
 
100
  if ( ! empty( $templateName ) && $templateName === 'product-searchform.php' ) {
101
+ $template = DGWT_WCAS_DIR . 'partials/themes/restoration.php';
102
  }
103
 
104
  return $template;
includes/Multilingual.php CHANGED
@@ -76,7 +76,7 @@ class Multilingual {
76
  * @return bool
77
  */
78
  public static function isLangCode( $lang ) {
79
- return ! empty( $lang ) && is_string( $lang ) && (bool) preg_match( '/^([a-z]{2,3})$|^([a-z]{2}\-[a-z]{2})$/', $lang );
80
  }
81
 
82
  /**
76
  * @return bool
77
  */
78
  public static function isLangCode( $lang ) {
79
+ return ! empty( $lang ) && is_string( $lang ) && (bool) preg_match( '/^([a-z]{2,3})$|^([a-z]{2}\-[a-z]{4})$/', $lang );
80
  }
81
 
82
  /**
includes/ProductVariation.php CHANGED
@@ -3,6 +3,10 @@
3
  namespace DgoraWcas;
4
 
5
  class ProductVariation extends Product {
 
 
 
 
6
 
7
  public function __construct( $product ) {
8
  if ( ! empty( $product ) && is_object( $product ) && is_a( $product, 'WC_Product_Variation' ) ) {
@@ -23,6 +27,49 @@ class ProductVariation extends Product {
23
  $this->setLanguage();
24
  }
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Prepare attributes for display
28
  * @return array
@@ -57,4 +104,18 @@ class ProductVariation extends Product {
57
  return apply_filters( 'dgwt/wcas/product/variation_attributes', $formattedAttributes );
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  }
3
  namespace DgoraWcas;
4
 
5
  class ProductVariation extends Product {
6
+ /**
7
+ * @var bool|false|\WC_Product_Variation|null
8
+ */
9
+ protected $wcProduct = null;
10
 
11
  public function __construct( $product ) {
12
  if ( ! empty( $product ) && is_object( $product ) && is_a( $product, 'WC_Product_Variation' ) ) {
27
  $this->setLanguage();
28
  }
29
 
30
+ /**
31
+ * Get parent product ID
32
+ *
33
+ * @return int
34
+ */
35
+ public function getParentID() {
36
+ return $this->wcProduct->get_parent_id();
37
+ }
38
+
39
+ /**
40
+ * Get parent product SKU
41
+ *
42
+ * @return string
43
+ */
44
+ public function getParentSKU() {
45
+ $parentData = $this->wcProduct->get_parent_data();
46
+
47
+ return isset( $parentData['sku'] ) ? $parentData['sku'] : '';
48
+ }
49
+
50
+ /**
51
+ * WooCommerce raw product object
52
+ *
53
+ * @return \WC_Product_Variation
54
+ */
55
+ public function getWooObject() {
56
+ return $this->wcProduct;
57
+ }
58
+
59
+ /**
60
+ * Check, if class is initialized correctly
61
+ * @return bool
62
+ */
63
+ public function isValid() {
64
+ $isValid = false;
65
+
66
+ if ( is_a( $this->wcProduct, 'WC_Product_Variation' ) ) {
67
+ $isValid = true;
68
+ }
69
+
70
+ return $isValid;
71
+ }
72
+
73
  /**
74
  * Prepare attributes for display
75
  * @return array
104
  return apply_filters( 'dgwt/wcas/product/variation_attributes', $formattedAttributes );
105
  }
106
 
107
+ /**
108
+ * Set info about product language
109
+ *
110
+ * For variation we use language of parent product
111
+ *
112
+ * @return void
113
+ */
114
+ public function setLanguage() {
115
+ if ( ! $this->isValid() ) {
116
+ return;
117
+ }
118
+
119
+ $this->langCode = Multilingual::getPostLang( $this->getParentID() );
120
+ }
121
  }
includes/Scripts.php CHANGED
@@ -22,7 +22,7 @@ class Scripts
22
  */
23
  public function loadScripts()
24
  {
25
- $min = ( !DGWT_WCAS_DEBUG ? '.min' : '' );
26
  //Register
27
  wp_register_style(
28
  'dgwt-wcas-style',
@@ -78,6 +78,8 @@ class Scripts
78
  'convert_html' => true,
79
  'suggestions_wrapper' => apply_filters( 'dgwt/wcas/scripts/suggestions_wrapper', 'body' ),
80
  'show_product_vendor' => dgoraAsfwFs()->is_premium() && class_exists( 'DgoraWcas\\Integrations\\Marketplace\\Marketplace' ) && DGWT_WCAS()->marketplace->showProductVendor(),
 
 
81
  );
82
  if ( Multilingual::isMultilingual() ) {
83
  $localize['current_lang'] = Multilingual::getCurrentLanguage();
22
  */
23
  public function loadScripts()
24
  {
25
+ $min = ( SCRIPT_DEBUG ? '' : '.min' );
26
  //Register
27
  wp_register_style(
28
  'dgwt-wcas-style',
78
  'convert_html' => true,
79
  'suggestions_wrapper' => apply_filters( 'dgwt/wcas/scripts/suggestions_wrapper', 'body' ),
80
  'show_product_vendor' => dgoraAsfwFs()->is_premium() && class_exists( 'DgoraWcas\\Integrations\\Marketplace\\Marketplace' ) && DGWT_WCAS()->marketplace->showProductVendor(),
81
+ 'disable_hits' => apply_filters( 'dgwt/wcas/scripts/disable_hits', false ),
82
+ 'disable_submit' => apply_filters( 'dgwt/wcas/scripts/disable_submit', false ),
83
  );
84
  if ( Multilingual::isMultilingual() ) {
85
  $localize['current_lang'] = Multilingual::getCurrentLanguage();
includes/Settings.php CHANGED
@@ -110,9 +110,13 @@ class Settings
110
  );
111
 
112
  if ( dgoraAsfwFs()->is_premium() ) {
 
 
 
 
113
  $sections[30] = array(
114
  'id' => 'dgwt_wcas_performance',
115
- 'title' => __( 'Indexer', 'ajax-search-for-woocommerce' ),
116
  );
117
  } else {
118
  $sections[30] = array(
@@ -825,6 +829,9 @@ class Settings
825
  */
826
  public function toggleAdvancedSettings()
827
  {
 
 
 
828
  $show = ( !empty($_GET['adv_settings_value']) && $_GET['adv_settings_value'] === 'show' ? 'on' : 'off' );
829
  update_option( 'dgwt_wcas_settings_show_advanced', $show );
830
  wp_send_json_success();
110
  );
111
 
112
  if ( dgoraAsfwFs()->is_premium() ) {
113
+ $suffix = '';
114
+ if ( Builder::getInfo( 'status' ) === 'error' || Builder::isIndexerWorkingTooLong() ) {
115
+ $suffix = '<span class="dgwt-wcas-tab-mark">!</span>';
116
+ }
117
  $sections[30] = array(
118
  'id' => 'dgwt_wcas_performance',
119
+ 'title' => __( 'Indexer', 'ajax-search-for-woocommerce' ) . $suffix,
120
  );
121
  } else {
122
  $sections[30] = array(
829
  */
830
  public function toggleAdvancedSettings()
831
  {
832
+ if ( !current_user_can( 'administrator' ) ) {
833
+ wp_die( -1, 403 );
834
+ }
835
  $show = ( !empty($_GET['adv_settings_value']) && $_GET['adv_settings_value'] === 'show' ? 'on' : 'off' );
836
  update_option( 'dgwt_wcas_settings_show_advanced', $show );
837
  wp_send_json_success();
languages/ajax-search-for-woocommerce.pot CHANGED
@@ -3,9 +3,9 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-03-11 10:47+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
- "Last-Translator: Damian Góra <wp@damiangora.com>\n"
9
  "Language-Team: \n"
10
  "Language: \n"
11
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
@@ -14,45 +14,52 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
- #: includes/Admin/RegenerateImages.php:95
18
- msgid ""
19
- "%: it is recommended to generate a special small image size for existing "
20
- "products to ensure a better user experience. This is a one-time action. <br "
21
- "/><br />You can do it by clicking %s or use an external plugin such as %s."
22
- msgstr ""
23
-
24
- #: ajax-search-for-woocommerce.php:219
25
- msgid ""
26
- "%: You need PHP version at least 7.0 to run this plugin. You are currently "
27
- "using PHP version "
28
  msgstr ""
29
 
30
- #: ajax-search-for-woocommerce.php:241
31
  #, php-format
32
  msgid "%s is enabled but not effective. It requires %s in order to work."
33
  msgstr ""
34
 
35
  #: includes/Abstracts/ThemeIntegration.php:49
36
- #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:45
37
- #: includes/Integrations/Themes/Enfold/Enfold.php:50
38
  #: includes/Integrations/Themes/Shopical/Shopical.php:43
39
- #: includes/Integrations/Themes/Ekommart/Ekommart.php:43
 
 
 
 
40
  #: includes/Integrations/Themes/Bridge/Bridge.php:43
 
41
  #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:43
42
  #: includes/Integrations/Themes/Avada/Avada.php:46
43
- #: includes/Integrations/Themes/The7/The7.php:46
44
- #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:43
45
  #: includes/Integrations/Themes/Savoy/Savoy.php:43
46
- #: includes/Integrations/Themes/Divi/Divi.php:61
47
- #: includes/Integrations/Themes/BlockShop/BlockShop.php:43
48
- #: includes/Integrations/Themes/Sober/Sober.php:43
49
- #: includes/Integrations/Themes/Restoration/Restoration.php:45
50
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:61
 
 
51
  #, php-format
52
  msgid "%s Theme"
53
  msgstr ""
54
 
55
- #: includes/Settings.php:701 includes/Settings.php:751
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  msgid "-- Disabled"
57
  msgstr ""
58
 
@@ -62,13 +69,20 @@ msgid ""
62
  "products "
63
  msgstr ""
64
 
65
- #: includes/Admin/Troubleshooting.php:615
 
 
 
 
 
 
 
66
  msgid ""
67
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
68
  "it."
69
  msgstr ""
70
 
71
- #: includes/Admin/Troubleshooting.php:995
72
  msgid "A search engine's AJAX call did not return valid results"
73
  msgstr ""
74
 
@@ -80,146 +94,26 @@ msgstr ""
80
  msgid "Add new rule"
81
  msgstr ""
82
 
83
- #: includes/Admin/Troubleshooting.php:1156
84
  msgid "Add the following URL to the white list:"
85
  msgstr ""
86
 
87
- #: includes/Admin/Troubleshooting.php:1106
88
  msgid ""
89
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
90
  "conf</code>"
91
  msgstr ""
92
 
93
- #: includes/Settings.php:345
94
  msgctxt "admin"
95
  msgid "No results label"
96
  msgstr ""
97
 
98
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:175
99
- msgctxt "Admin, logs"
100
- msgid "[Readable index] Building..."
101
- msgstr ""
102
-
103
- #: includes/Engines/TNTSearchMySQL/Indexer/Readable/Indexer.php:243
104
- msgctxt "Admin, logs"
105
- msgid "[Readable index] Cleared"
106
- msgstr ""
107
-
108
- #: includes/Engines/TNTSearchMySQL/Indexer/Readable/AsyncProcess.php:169
109
- msgctxt "Admin, logs"
110
- msgid "[Readable index] Completed"
111
- msgstr ""
112
-
113
- #: includes/Engines/TNTSearchMySQL/Indexer/Readable/AsyncProcess.php:125
114
- #, php-format
115
- msgctxt "Admin, logs"
116
- msgid "[Readable index] Schedule <code>%s</code> was created "
117
- msgstr ""
118
-
119
- #: includes/Engines/TNTSearchMySQL/Indexer/Readable/AsyncProcess.php:141
120
- #, php-format
121
- msgctxt "Admin, logs"
122
- msgid "[Readable index] The queue <code>%s</code> was created"
123
- msgstr ""
124
-
125
- #: includes/Engines/TNTSearchMySQL/Indexer/Readable/AsyncProcess.php:113
126
- #, php-format
127
- msgctxt "Admin, logs"
128
- msgid "[Readable index] The queue <code>%s</code> was deleted "
129
- msgstr ""
130
-
131
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:184
132
- msgctxt "Admin, logs"
133
- msgid "[Searchable index] Building..."
134
- msgstr ""
135
-
136
- #: includes/Engines/TNTSearchMySQL/Indexer/Searchable/Indexer.php:267
137
- msgctxt "Admin, logs"
138
- msgid "[Searchable index] Cleared"
139
- msgstr ""
140
-
141
- #: includes/Engines/TNTSearchMySQL/Indexer/Searchable/AsyncProcess.php:175
142
- msgctxt "Admin, logs"
143
- msgid "[Searchable index] Completed"
144
- msgstr ""
145
-
146
- #: includes/Engines/TNTSearchMySQL/Indexer/Searchable/AsyncProcess.php:132
147
- #, php-format
148
- msgctxt "Admin, logs"
149
- msgid "[Searchable index] Schedule <code>%s</code> was created "
150
- msgstr ""
151
-
152
- #: includes/Engines/TNTSearchMySQL/Indexer/Searchable/AsyncProcess.php:147
153
- #, php-format
154
- msgctxt "Admin, logs"
155
- msgid "[Searchable index] The queue <code>%s</code> was created"
156
- msgstr ""
157
-
158
- #: includes/Engines/TNTSearchMySQL/Indexer/Searchable/AsyncProcess.php:120
159
- #, php-format
160
- msgctxt "Admin, logs"
161
- msgid "[Searchable index] The queue <code>%s</code> was deleted "
162
- msgstr ""
163
-
164
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomy/Request.php:39
165
- #, php-format
166
- msgctxt "Admin, logs"
167
- msgid "[Taxonomy index] Building %s..."
168
- msgstr ""
169
-
170
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomy/Indexer.php:184
171
- msgctxt "Admin, logs"
172
- msgid "[Taxonomy index] Cleared"
173
- msgstr ""
174
-
175
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomy/Request.php:52
176
- #, php-format
177
- msgctxt "Admin, logs"
178
- msgid "[Taxonomy index] Completed: %s, Not indexed: %s"
179
- msgstr ""
180
-
181
- #: includes/Engines/TNTSearchMySQL/Indexer/Variation/Indexer.php:143
182
- msgctxt "Admin, logs"
183
- msgid "[Variations index] Cleared"
184
- msgstr ""
185
-
186
- #: includes/Engines/TNTSearchMySQL/Indexer/Vendor/Request.php:24
187
- msgctxt "Admin, logs"
188
- msgid "[Vendors index] Building..."
189
- msgstr ""
190
-
191
- #: includes/Engines/TNTSearchMySQL/Indexer/Vendor/Indexer.php:140
192
- msgctxt "Admin, logs"
193
- msgid "[Vendors index] Cleared"
194
- msgstr ""
195
-
196
- #: includes/Engines/TNTSearchMySQL/Indexer/Vendor/Request.php:36
197
- #, php-format
198
- msgctxt "Admin, logs"
199
- msgid "[Vendors index] Completed: %s, Not indexed: %s"
200
- msgstr ""
201
-
202
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:141
203
- msgctxt "Admin, logs"
204
- msgid "Indexer already running"
205
- msgstr ""
206
-
207
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:162
208
- msgctxt "Admin, logs"
209
- msgid "Indexer started"
210
- msgstr ""
211
-
212
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:157
213
- #, php-format
214
- msgctxt "Admin, logs"
215
- msgid "Multilingual: Yes, Provider: %s, Default: %s, Langs: %s"
216
- msgstr ""
217
-
218
  #: widget.php:25
219
  msgid "AJAX (live) search form for WooCommerce"
220
  msgstr ""
221
 
222
- #: includes/Settings.php:782
223
  msgid "AJAX Search for WooCommerce rebrands to FiboSearch"
224
  msgstr ""
225
 
@@ -228,30 +122,30 @@ msgid "All product changes will be <strong>re-indexed automatically</strong>"
228
  msgstr ""
229
 
230
  #: includes/Abstracts/ThemeIntegration.php:70
231
- #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:81
232
- #: includes/Integrations/Themes/Enfold/Enfold.php:71
233
- #: includes/Integrations/Themes/Shopical/Shopical.php:64
234
- #: includes/Integrations/Themes/Ekommart/Ekommart.php:64
235
- #: includes/Integrations/Themes/Bridge/Bridge.php:64
236
- #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:64
237
- #: includes/Integrations/Themes/Avada/Avada.php:67
238
- #: includes/Integrations/Themes/The7/The7.php:67
239
  #: includes/Integrations/Themes/TheGem/TheGem.php:100
240
  #: includes/Integrations/Themes/TheGem/TheGem.php:108
241
- #: includes/Integrations/Themes/Impreza/Impreza.php:60
242
- #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:67
243
- #: includes/Integrations/Themes/Savoy/Savoy.php:64
 
244
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:64
245
- #: includes/Integrations/Themes/Divi/Divi.php:82
 
246
  #: includes/Integrations/Themes/Storefront/Storefront.php:65
 
247
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:64
248
- #: includes/Integrations/Themes/Sober/Sober.php:64
249
- #: includes/Integrations/Themes/Restoration/Restoration.php:66
 
 
 
250
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:82
 
 
251
  msgid "Alternative ways to embed a search bar"
252
  msgstr ""
253
 
254
- #: includes/Admin/Troubleshooting.php:689
255
  #, php-format
256
  msgid ""
257
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
@@ -290,7 +184,7 @@ msgstr ""
290
  msgid "Attributes: %s"
291
  msgstr ""
292
 
293
- #: includes/Settings.php:115 partials/admin/search-preview.php:24
294
  msgid "Autocomplete"
295
  msgstr ""
296
 
@@ -299,23 +193,23 @@ msgstr ""
299
  msgid "based on the plugin %s"
300
  msgstr ""
301
 
302
- #: includes/Settings.php:173 includes/Settings.php:323
303
  msgid "Basic"
304
  msgstr ""
305
 
306
- #: includes/Admin/Troubleshooting.php:1242
307
  msgid "Blocked search endpoint test"
308
  msgstr ""
309
 
310
- #: includes/Settings.php:522
311
  msgid "Border color"
312
  msgstr ""
313
 
314
- #: includes/Helpers.php:986
315
  msgid "Brand"
316
  msgstr ""
317
 
318
- #: includes/Helpers.php:993
319
  msgid "Brands"
320
  msgstr ""
321
 
@@ -324,11 +218,11 @@ msgid "Build ID"
324
  msgstr ""
325
 
326
  #: partials/admin/indexer-header-demo.php:15
327
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:506
328
  msgid "Build index"
329
  msgstr ""
330
 
331
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:460
332
  msgid "Canceling..."
333
  msgstr ""
334
 
@@ -345,11 +239,11 @@ msgstr ""
345
  msgid "child theme of <b>%s</b>"
346
  msgstr ""
347
 
348
- #: includes/Settings.php:253
349
  msgid "Colors"
350
  msgstr ""
351
 
352
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:466
353
  msgid "Completed. Works."
354
  msgstr ""
355
 
@@ -357,11 +251,11 @@ msgstr ""
357
  msgid "Contact"
358
  msgstr ""
359
 
360
- #: includes/Helpers.php:1002
361
  msgid "continue reading"
362
  msgstr ""
363
 
364
- #: includes/Admin/Troubleshooting.php:576
365
  #, php-format
366
  msgid ""
367
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
@@ -369,11 +263,11 @@ msgid ""
369
  "support</a>."
370
  msgstr ""
371
 
372
- #: includes/Admin/Troubleshooting.php:575
373
  msgid "Custom location of wp-load.php file"
374
  msgstr ""
375
 
376
- #: includes/Settings.php:661
377
  msgid "daily"
378
  msgstr ""
379
 
@@ -389,19 +283,15 @@ msgstr ""
389
  msgid "Default"
390
  msgstr ""
391
 
392
- #: includes/Admin/Troubleshooting.php:1030
393
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
394
  msgstr ""
395
 
396
- #: includes/Settings.php:434
397
  msgid "Details panel"
398
  msgstr ""
399
 
400
- #: includes/Admin/Troubleshooting.php:327
401
- msgid "Do you have a Basic Auth?"
402
- msgstr ""
403
-
404
- #: includes/Admin/Troubleshooting.php:254
405
  #, php-format
406
  msgid ""
407
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
@@ -409,13 +299,13 @@ msgid ""
409
  "version</a>."
410
  msgstr ""
411
 
412
- #: includes/Admin/Troubleshooting.php:697
413
  msgid ""
414
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
415
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
416
  msgstr ""
417
 
418
- #: includes/Settings.php:648
419
  msgid "Enable Scheduler"
420
  msgstr ""
421
 
@@ -424,31 +314,31 @@ msgstr ""
424
  msgid "End"
425
  msgstr ""
426
 
427
- #: includes/Admin/Troubleshooting.php:688
428
  msgid "Error establishing a database connection"
429
  msgstr ""
430
 
431
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:471
432
  msgid "Errors"
433
  msgstr ""
434
 
435
- #: includes/Settings.php:620 includes/Settings.php:719
436
  msgid "Exclude from search all products that match conditions"
437
  msgstr ""
438
 
439
- #: includes/Settings.php:613 includes/Settings.php:712
440
  msgid "Exclude products"
441
  msgstr ""
442
 
443
- #: includes/Settings.php:586
444
  msgid "Exclude “out of stock” products"
445
  msgstr ""
446
 
447
- #: includes/Admin/Troubleshooting.php:477
448
  msgid "Extensions should looks like the picture below:"
449
  msgstr ""
450
 
451
- #: includes/Admin/AdminMenu.php:28 includes/Admin/AdminMenu.php:29
452
  msgid "FiboSearch"
453
  msgstr ""
454
 
@@ -469,13 +359,13 @@ msgstr ""
469
  msgid "FiboSearch Pro - Upgrade Now"
470
  msgstr ""
471
 
472
- #: includes/Admin/Troubleshooting.php:690
473
  msgid ""
474
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
475
  "connection is required."
476
  msgstr ""
477
 
478
- #: includes/Settings.php:619 includes/Settings.php:718
479
  msgid "Filters"
480
  msgstr ""
481
 
@@ -484,24 +374,19 @@ msgstr ""
484
  msgid "Finalization... Wait a moment. (%s products)"
485
  msgstr ""
486
 
487
- #: includes/Admin/Troubleshooting.php:1155
488
  msgid "Find section <code>Access Control -> whitelist URL</code>"
489
  msgstr ""
490
 
491
- #: partials/admin/indexer-header.php:31
492
- #, php-format
493
- msgid "First try to <a class=\"%s\" href=\"#\">build the index again</a>"
494
- msgstr ""
495
-
496
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:43
497
  msgid "Flatsome Theme"
498
  msgstr ""
499
 
500
- #: includes/Settings.php:592
501
  msgid "Fuzziness"
502
  msgstr ""
503
 
504
- #: includes/Settings.php:696 includes/Settings.php:746
505
  msgid "Fuzzy matching"
506
  msgstr ""
507
 
@@ -509,18 +394,13 @@ msgstr ""
509
  msgid "Fuzzy search"
510
  msgstr ""
511
 
512
- #: partials/admin/indexer-header.php:33
513
  #, php-format
514
  msgid ""
515
- "Go to <a target=\"_blank\" href=\"%s\">WooCommerce -> Status -> Logs (tab)"
516
- "</a>. Open last \"fatal-errors...\". Look for a phrase \"ajax-search-for-"
517
- "woocommerce\". Did you find anything significant?"
518
- msgstr ""
519
-
520
- #: partials/admin/indexer-header.php:32
521
- msgid ""
522
- "Go to <a target=\"_blank\" href=\"%s\">WooCommerce -> Status -> section "
523
- "\"%\"</a>. Is everything green?"
524
  msgstr ""
525
 
526
  #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:67
@@ -530,7 +410,7 @@ msgid ""
530
  "Header -> Search</code> and enable <code>Predictive Search</code>"
531
  msgstr ""
532
 
533
- #: includes/Admin/Troubleshooting.php:1032
534
  #, php-format
535
  msgid ""
536
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
@@ -538,14 +418,14 @@ msgid ""
538
  "exceptions: <code>%s</code>"
539
  msgstr ""
540
 
541
- #: includes/Admin/Troubleshooting.php:519
542
  #, php-format
543
  msgid ""
544
  "Go to <code>Security -> Settings -> <a href=\"%s\" target=\"_blank\">System "
545
  "Tweaks</a></code> and uncheck <code>Disable PHP in Plugins</code> option."
546
  msgstr ""
547
 
548
- #: includes/Admin/Troubleshooting.php:426
549
  #, php-format
550
  msgid ""
551
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -553,7 +433,7 @@ msgid ""
553
  "option <code>%s</code>."
554
  msgstr ""
555
 
556
- #: includes/Admin/Troubleshooting.php:476
557
  #, php-format
558
  msgid ""
559
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -561,23 +441,23 @@ msgid ""
561
  "Searching by Text</code> extension and save changes."
562
  msgstr ""
563
 
564
- #: includes/Admin/Troubleshooting.php:730
565
  #, php-format
566
  msgid ""
567
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
568
  "Performance tab</a> -> disable the Search module</code>"
569
  msgstr ""
570
 
571
- #: includes/Admin/Troubleshooting.php:661
572
  #, php-format
573
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
574
  msgstr ""
575
 
576
- #: includes/Admin/Troubleshooting.php:1154
577
  msgid "Go to the settings"
578
  msgstr ""
579
 
580
- #: includes/Admin/Troubleshooting.php:387
581
  msgid "Great! Our plugin works great with this version of WordPress."
582
  msgstr ""
583
 
@@ -587,15 +467,15 @@ msgid ""
587
  "functioning of our plugin."
588
  msgstr ""
589
 
590
- #: includes/Settings.php:337
591
  msgid "Group results"
592
  msgstr ""
593
 
594
- #: includes/Settings.php:704 includes/Settings.php:754
595
  msgid "Hard"
596
  msgstr ""
597
 
598
- #: includes/Admin/Troubleshooting.php:1105
599
  msgid "Here are few samples NGINX config which helps other users:"
600
  msgstr ""
601
 
@@ -613,19 +493,19 @@ msgid ""
613
  "time now, and I hope you like it!"
614
  msgstr ""
615
 
616
- #: partials/admin/indexer-header.php:45
617
  msgid "Hide details"
618
  msgstr ""
619
 
620
- #: includes/Settings.php:515
621
  msgid "Highlight color"
622
  msgstr ""
623
 
624
- #: includes/Settings.php:158
625
  msgid "How to add search bar in your theme?"
626
  msgstr ""
627
 
628
- #: includes/Settings.php:164
629
  msgid "How to add?"
630
  msgstr ""
631
 
@@ -636,37 +516,39 @@ msgid ""
636
  "admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
637
  msgstr ""
638
 
639
- #: widget.php:41 includes/Settings.php:229 includes/EmbeddingViaMenu.php:189
640
  msgid "Icon on mobile, search bar on desktop"
641
  msgstr ""
642
 
 
 
 
 
 
 
 
643
  #: partials/admin/features.php:14
644
  msgid ""
645
  "If users can’t find the product they’re searching for, they can’t buy it. "
646
  "Help your customers to find the right products even <span>10× faster</span>."
647
  msgstr ""
648
 
649
- #: includes/Admin/Troubleshooting.php:333
650
- msgid "If yes, add you server IP to whitelist IPs. That’s all."
651
- msgstr ""
652
-
653
- #: includes/Admin/Troubleshooting.php:328
654
  msgid ""
655
- "If yes, you have to add to your <code>wp-config.php</code> file following "
656
- "constants. Remember to replace <code>your-username</code> and <code>your-"
657
- "password</code> with your values."
658
  msgstr ""
659
 
660
  #: includes/Integrations/Themes/Impreza/Impreza.php:46
661
  msgid "Impreza Theme"
662
  msgstr ""
663
 
664
- #: includes/Helpers.php:1001
665
  msgctxt "in categories fe. in Books > Crime stories"
666
  msgid "in"
667
  msgstr ""
668
 
669
- #: includes/Settings.php:649
670
  msgid ""
671
  "In most cases, you don't need to use the scheduler because the search index "
672
  "updates when you edit products. If you use import tools or custom code to "
@@ -674,32 +556,32 @@ msgid ""
674
  "helpful."
675
  msgstr ""
676
 
677
- #: includes/Admin/Troubleshooting.php:474
678
  msgid ""
679
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
680
  "Products Filter plugin is active"
681
  msgstr ""
682
 
683
- #: includes/Admin/Troubleshooting.php:1189
684
  msgid ""
685
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
686
  "Filter"
687
  msgstr ""
688
 
689
- #: includes/Admin/Troubleshooting.php:1181
690
  msgid "Incompatible plugins"
691
  msgstr ""
692
 
693
- #: includes/Admin/Troubleshooting.php:424
694
- #: includes/Admin/Troubleshooting.php:1185
695
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
696
  msgstr ""
697
 
698
- #: includes/Settings.php:132
699
  msgid "Increase sales"
700
  msgstr ""
701
 
702
- #: includes/Settings.php:677
703
  msgid "Increases sales conversions"
704
  msgstr ""
705
 
@@ -711,11 +593,11 @@ msgstr ""
711
  msgid "Index build start"
712
  msgstr ""
713
 
714
- #: includes/Admin/Troubleshooting.php:1222
715
  msgid "Index completeness test"
716
  msgstr ""
717
 
718
- #: includes/Settings.php:728 includes/Settings.php:762
719
  msgid "Index status"
720
  msgstr ""
721
 
@@ -724,7 +606,7 @@ msgstr ""
724
  msgid "Indexed <strong>100&#37;</strong>, <strong>%d products</strong>."
725
  msgstr ""
726
 
727
- #: includes/Settings.php:126
728
  msgid "Indexer"
729
  msgstr ""
730
 
@@ -742,45 +624,50 @@ msgstr ""
742
  msgid "Individual tips and support by FiboSearch team"
743
  msgstr ""
744
 
745
- #: includes/Admin/Troubleshooting.php:612
746
  msgid ""
747
  "Install the <a target=\"_blank\" href=\"https://wordpress."
748
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
749
- "verify if WP-Cron works correctly. You should see two actions related to "
750
- "the Indexer:"
751
  msgstr ""
752
 
753
- #: includes/Admin/Troubleshooting.php:390
754
  msgid ""
755
  "Install the latest version of WordPress for our plugin to work as best it "
756
  "can!"
757
  msgstr ""
758
 
759
- #: includes/Settings.php:657
760
  msgid "Interval"
761
  msgstr ""
762
 
763
- #: partials/admin/indexer-header.php:35
764
  #, php-format
765
  msgid ""
766
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
767
- "request</a>."
768
  msgstr ""
769
 
770
- #: includes/Admin/Troubleshooting.php:332
771
- msgid "Is your website publicly available only for whitelisted IPs?"
 
 
 
 
 
772
  msgstr ""
773
 
774
- #: includes/Admin/Troubleshooting.php:590
775
- #: includes/Admin/Troubleshooting.php:1217
776
  msgid "Issue with WP-Cron"
777
  msgstr ""
778
 
779
- #: includes/Admin/Troubleshooting.php:517
780
  msgid "iThemes Security plugin blocks AJAX requests"
781
  msgstr ""
782
 
783
- #: includes/Admin/Troubleshooting.php:1232
784
  msgid "Jetpack search module"
785
  msgstr ""
786
 
@@ -789,15 +676,15 @@ msgstr ""
789
  msgid "Last build %s"
790
  msgstr ""
791
 
792
- #: widget.php:43 includes/Settings.php:224 includes/EmbeddingViaMenu.php:74
793
  msgid "Layout"
794
  msgstr ""
795
 
796
- #: includes/Settings.php:218
797
  msgid "Layout (beta)"
798
  msgstr ""
799
 
800
- #: includes/Settings.php:329
801
  msgid "Limit"
802
  msgstr ""
803
 
@@ -805,7 +692,7 @@ msgstr ""
805
  msgid "Logs"
806
  msgstr ""
807
 
808
- #: includes/Admin/Troubleshooting.php:1195
809
  msgid "Loopback request"
810
  msgstr ""
811
 
@@ -816,23 +703,23 @@ msgid ""
816
  "pharetra imperdiet neque, non varius."
817
  msgstr ""
818
 
819
- #: includes/Integrations/Marketplace/Marketplace.php:158
820
  msgid "Marketplace"
821
  msgstr ""
822
 
823
- #: includes/Integrations/Marketplace/Marketplace.php:168
824
  msgid "Marketplace third-party integration"
825
  msgstr ""
826
 
827
- #: includes/Settings.php:188
828
  msgid "Max form width"
829
  msgstr ""
830
 
831
- #: includes/Settings.php:332
832
  msgid "maximum number of suggestions"
833
  msgstr ""
834
 
835
- #: includes/Admin/Troubleshooting.php:925
836
  msgid ""
837
  "Maybe your server blocks it by Apache module <code>mod_security</code>. "
838
  "Contact your hosting provider and ask what can block the URL you see above."
@@ -842,19 +729,19 @@ msgstr ""
842
  msgid "Menu Screen"
843
  msgstr ""
844
 
845
- #: includes/Settings.php:183
846
  msgid "Min characters to show autocomplete"
847
  msgstr ""
848
 
849
- #: includes/Settings.php:179
850
  msgid "Minimum characters"
851
  msgstr ""
852
 
853
- #: includes/Admin/Troubleshooting.php:764
854
  msgid "Missing plugin: WooCommerce Multilingual"
855
  msgstr ""
856
 
857
- #: includes/Settings.php:244
858
  msgid "Mobile breakpoint"
859
  msgstr ""
860
 
@@ -864,7 +751,7 @@ msgid ""
864
  "algorithms"
865
  msgstr ""
866
 
867
- #: includes/Settings.php:394
868
  msgid "More results label"
869
  msgstr ""
870
 
@@ -872,19 +759,19 @@ msgstr ""
872
  msgid "My Account"
873
  msgstr ""
874
 
875
- #: includes/Settings.php:790
876
  msgid "New plugin name"
877
  msgstr ""
878
 
879
- #: includes/Settings.php:777
880
  msgid "News"
881
  msgstr ""
882
 
883
- #: includes/Admin/Troubleshooting.php:1103
884
  msgid "NGINX configuration may blocks search requests"
885
  msgstr ""
886
 
887
- #: includes/Settings.php:347 includes/Helpers.php:1003
888
  msgid "No results"
889
  msgstr ""
890
 
@@ -896,15 +783,15 @@ msgstr ""
896
  msgid "No thanks"
897
  msgstr ""
898
 
899
- #: includes/Settings.php:400
900
  msgid "Non-products in autocomplete"
901
  msgstr ""
902
 
903
- #: includes/Settings.php:703 includes/Settings.php:753
904
  msgid "Normal"
905
  msgstr ""
906
 
907
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:476
908
  msgid "Not exist"
909
  msgstr ""
910
 
@@ -912,19 +799,19 @@ msgstr ""
912
  msgid "Note: We currently only support the header type: \"Header 10\""
913
  msgstr ""
914
 
915
- #: includes/Admin/Troubleshooting.php:348
916
  msgid "One or more required PHP extensions are missing on your server"
917
  msgstr ""
918
 
919
- #: includes/Settings.php:236
920
  msgid "Overlay on mobile"
921
  msgstr ""
922
 
923
- #: includes/Admin/Troubleshooting.php:1227
924
  msgid "PDO connection test"
925
  msgstr ""
926
 
927
- #: includes/Admin/Troubleshooting.php:1177
928
  msgid "PHP extensions"
929
  msgstr ""
930
 
@@ -932,7 +819,7 @@ msgstr ""
932
  msgid "Posts & pages"
933
  msgstr ""
934
 
935
- #: includes/Settings.php:301
936
  msgid "Preloader"
937
  msgstr ""
938
 
@@ -940,11 +827,11 @@ msgstr ""
940
  msgid "Preview"
941
  msgstr ""
942
 
943
- #: includes/Helpers.php:492 includes/Helpers.php:496
944
  msgid "Pro"
945
  msgstr ""
946
 
947
- #: includes/Settings.php:629
948
  msgid "Pro features"
949
  msgstr ""
950
 
@@ -960,7 +847,7 @@ msgstr ""
960
  msgid "Product tags"
961
  msgstr ""
962
 
963
- #: includes/Settings.php:351 partials/admin/indexer-body.php:58
964
  msgid "Products"
965
  msgstr ""
966
 
@@ -968,7 +855,7 @@ msgstr ""
968
  msgid "Products search"
969
  msgstr ""
970
 
971
- #: includes/Settings.php:531
972
  msgid "Products search scope"
973
  msgstr ""
974
 
@@ -978,61 +865,68 @@ msgid ""
978
  "search bar in your theme"
979
  msgstr ""
980
 
981
- #: includes/Settings.php:245
982
  msgid "px"
983
  msgstr ""
984
 
985
- #: includes/Settings.php:784
986
  msgid "Read more"
987
  msgstr ""
988
 
 
 
 
 
 
 
 
989
  #: partials/admin/indexer-body.php:90
990
  msgid "Readable"
991
  msgstr ""
992
 
993
- #: includes/Admin/Troubleshooting.php:655
994
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:500
995
  msgid "Rebuild index"
996
  msgstr ""
997
 
998
  #: includes/Abstracts/ThemeIntegration.php:62
999
- #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:58
1000
- #: includes/Integrations/Themes/Enfold/Enfold.php:63
1001
  #: includes/Integrations/Themes/Shopical/Shopical.php:56
1002
- #: includes/Integrations/Themes/Ekommart/Ekommart.php:56
1003
- #: includes/Integrations/Themes/Bridge/Bridge.php:56
1004
- #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:56
1005
- #: includes/Integrations/Themes/Avada/Avada.php:59
1006
  #: includes/Integrations/Themes/The7/The7.php:59
1007
- #: includes/Integrations/Themes/TheGem/TheGem.php:92
1008
- #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:59
1009
- #: includes/Integrations/Themes/Savoy/Savoy.php:56
1010
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:56
1011
- #: includes/Integrations/Themes/Divi/Divi.php:74
 
1012
  #: includes/Integrations/Themes/Storefront/Storefront.php:57
 
1013
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:56
1014
- #: includes/Integrations/Themes/Sober/Sober.php:56
1015
- #: includes/Integrations/Themes/Restoration/Restoration.php:58
 
 
1016
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:74
 
 
1017
  msgid "Replace"
1018
  msgstr ""
1019
 
1020
  #: includes/Abstracts/ThemeIntegration.php:42
1021
- #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:38
1022
- #: includes/Integrations/Themes/Enfold/Enfold.php:43
1023
  #: includes/Integrations/Themes/Shopical/Shopical.php:36
1024
- #: includes/Integrations/Themes/Ekommart/Ekommart.php:36
 
 
 
 
1025
  #: includes/Integrations/Themes/Bridge/Bridge.php:36
 
1026
  #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:36
1027
  #: includes/Integrations/Themes/Avada/Avada.php:39
1028
- #: includes/Integrations/Themes/The7/The7.php:39
1029
- #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:36
1030
  #: includes/Integrations/Themes/Savoy/Savoy.php:36
1031
- #: includes/Integrations/Themes/Divi/Divi.php:54
1032
- #: includes/Integrations/Themes/BlockShop/BlockShop.php:36
1033
- #: includes/Integrations/Themes/Sober/Sober.php:36
1034
- #: includes/Integrations/Themes/Restoration/Restoration.php:38
1035
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:54
 
 
1036
  #, php-format
1037
  msgid "Replace %s search bar"
1038
  msgstr ""
@@ -1041,27 +935,23 @@ msgstr ""
1041
  msgid "Replace a search bar in TheGem "
1042
  msgstr ""
1043
 
1044
- #: includes/Abstracts/ThemeIntegration.php:63
1045
- msgid "Replace all %s search bars with the %."
1046
- msgstr ""
1047
-
1048
- #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:59
1049
- #: includes/Integrations/Themes/Enfold/Enfold.php:64
1050
  #: includes/Integrations/Themes/Shopical/Shopical.php:57
1051
- #: includes/Integrations/Themes/Ekommart/Ekommart.php:57
1052
- #: includes/Integrations/Themes/Bridge/Bridge.php:57
1053
- #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:57
1054
- #: includes/Integrations/Themes/Avada/Avada.php:60
1055
  #: includes/Integrations/Themes/The7/The7.php:60
1056
- #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:54
1057
- #: includes/Integrations/Themes/Savoy/Savoy.php:57
1058
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:57
1059
- #: includes/Integrations/Themes/Divi/Divi.php:75
 
1060
  #: includes/Integrations/Themes/Storefront/Storefront.php:58
 
1061
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:57
1062
- #: includes/Integrations/Themes/Sober/Sober.php:57
1063
- #: includes/Integrations/Themes/Restoration/Restoration.php:59
 
 
1064
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:75
 
 
1065
  #, php-format
1066
  msgid "Replace all %s search bars with the %s."
1067
  msgstr ""
@@ -1082,17 +972,17 @@ msgstr ""
1082
  msgid "Replace the TheGem default search"
1083
  msgstr ""
1084
 
1085
- #: includes/Admin/Troubleshooting.php:358
1086
- #: includes/Admin/Troubleshooting.php:361
1087
  #, php-format
1088
  msgid "Required PHP extension: %s"
1089
  msgstr ""
1090
 
1091
- #: includes/Admin/Troubleshooting.php:997
1092
  msgid "Response body"
1093
  msgstr ""
1094
 
1095
- #: includes/Settings.php:678
1096
  msgid ""
1097
  "returns suggestions based on likely relevance, even though a search keyword "
1098
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
@@ -1132,24 +1022,24 @@ msgstr ""
1132
  msgid "Sample tag <strong>name</strong>"
1133
  msgstr ""
1134
 
1135
- #: includes/Settings.php:668
1136
  msgid "Schedule time"
1137
  msgstr ""
1138
 
1139
- #: includes/Settings.php:642
1140
  msgid "Scheduling indexing"
1141
  msgstr ""
1142
 
1143
- #: partials/search-form.php:46 includes/Settings.php:208
1144
  msgid "Search"
1145
  msgstr ""
1146
 
1147
- #: includes/Settings.php:111 includes/EmbeddingViaMenu.php:247
1148
  #: partials/admin/search-preview.php:23
1149
  msgid "Search bar"
1150
  msgstr ""
1151
 
1152
- #: widget.php:39 includes/Settings.php:227 includes/EmbeddingViaMenu.php:187
1153
  msgid "Search bar only"
1154
  msgstr ""
1155
 
@@ -1157,7 +1047,7 @@ msgstr ""
1157
  msgid "Search by variation product SKU"
1158
  msgstr ""
1159
 
1160
- #: includes/Settings.php:119
1161
  msgid "Search config"
1162
  msgstr ""
1163
 
@@ -1165,11 +1055,11 @@ msgstr ""
1165
  msgid "Search for posts and pages"
1166
  msgstr ""
1167
 
1168
- #: includes/Settings.php:214 includes/Helpers.php:1006
1169
  msgid "Search for products..."
1170
  msgstr ""
1171
 
1172
- #: widget.php:40 includes/Settings.php:228 includes/Settings.php:259
1173
  #: includes/EmbeddingViaMenu.php:188
1174
  msgid "Search icon"
1175
  msgstr ""
@@ -1178,7 +1068,7 @@ msgstr ""
1178
  msgid "Search icon color"
1179
  msgstr ""
1180
 
1181
- #: includes/Settings.php:558 partials/admin/features.php:23
1182
  msgid "Search in attributes"
1183
  msgstr ""
1184
 
@@ -1194,56 +1084,56 @@ msgstr ""
1194
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1195
  msgstr ""
1196
 
1197
- #: includes/Settings.php:565 partials/admin/features.php:24
1198
  msgid "Search in categories"
1199
  msgstr ""
1200
 
1201
- #: includes/Settings.php:579 includes/Settings.php:687
1202
  #: partials/admin/features.php:22
1203
  msgid "Search in custom fields"
1204
  msgstr ""
1205
 
1206
- #: includes/Settings.php:537
1207
  msgid "Search in description"
1208
  msgstr ""
1209
 
1210
- #: includes/Settings.php:543
1211
  msgid "Search in short description"
1212
  msgstr ""
1213
 
1214
- #: includes/Settings.php:549
1215
  msgid "Search in SKU"
1216
  msgstr ""
1217
 
1218
- #: includes/Settings.php:572 partials/admin/features.php:25
1219
  msgid "Search in tags"
1220
  msgstr ""
1221
 
1222
- #: includes/Integrations/Marketplace/Marketplace.php:198
1223
  msgid "Search in vendors"
1224
  msgstr ""
1225
 
1226
- #: includes/Settings.php:266
1227
  msgid "Search input background"
1228
  msgstr ""
1229
 
1230
- #: includes/Settings.php:280
1231
  msgid "Search input border"
1232
  msgstr ""
1233
 
1234
- #: includes/Settings.php:212
1235
  msgid "Search input placeholder"
1236
  msgstr ""
1237
 
1238
- #: includes/Settings.php:273
1239
  msgid "Search input text"
1240
  msgstr ""
1241
 
1242
- #: includes/Settings.php:287
1243
  msgid "Search submit background"
1244
  msgstr ""
1245
 
1246
- #: includes/Settings.php:294
1247
  msgid "Search submit text"
1248
  msgstr ""
1249
 
@@ -1251,11 +1141,11 @@ msgstr ""
1251
  msgid "Searchable"
1252
  msgstr ""
1253
 
1254
- #: includes/Settings.php:551
1255
  msgid "searching also in variable products SKU"
1256
  msgstr ""
1257
 
1258
- #: includes/Settings.php:552
1259
  #, php-format
1260
  msgid ""
1261
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
@@ -1266,8 +1156,7 @@ msgstr ""
1266
  msgid "See a comparison of all free and premium features!"
1267
  msgstr ""
1268
 
1269
- #: includes/Settings.php:396 includes/Helpers.php:1004
1270
- #: includes/Helpers.php:1005
1271
  msgid "See all products..."
1272
  msgstr ""
1273
 
@@ -1275,23 +1164,23 @@ msgstr ""
1275
  msgid "Select filter type"
1276
  msgstr ""
1277
 
1278
- #: includes/Settings.php:690
1279
  msgid "select the custom fields you want to add to the search scope"
1280
  msgstr ""
1281
 
1282
- #: includes/Admin/Troubleshooting.php:1319
1283
  msgid "Server environment"
1284
  msgstr ""
1285
 
1286
- #: includes/Admin/Troubleshooting.php:918
1287
- #: includes/Admin/Troubleshooting.php:996
1288
  #, php-format
1289
  msgid ""
1290
  "Server response with message <code>%s</code> and status code <code>%s</code>."
1291
  msgstr ""
1292
 
1293
  #: partials/admin/settings.php:27
1294
- #: includes/Integrations/Marketplace/Marketplace.php:191
1295
  msgid "Settings"
1296
  msgstr ""
1297
 
@@ -1303,56 +1192,56 @@ msgstr ""
1303
  msgid "Show brands"
1304
  msgstr ""
1305
 
1306
- #: includes/Settings.php:406
1307
  msgid "Show categories"
1308
  msgstr ""
1309
 
1310
- #: partials/admin/indexer-header.php:44
1311
  #: partials/admin/indexer-header-demo.php:16
 
1312
  msgid "Show details"
1313
  msgstr ""
1314
 
1315
- #: includes/Settings.php:440
1316
  msgid "Show Details panel"
1317
  msgstr ""
1318
 
1319
- #: includes/Settings.php:427
1320
  msgid "Show pages"
1321
  msgstr ""
1322
 
1323
- #: includes/Settings.php:420
1324
  msgid "Show posts"
1325
  msgstr ""
1326
 
1327
- #: includes/Settings.php:307
1328
  msgid "Show preloader"
1329
  msgstr ""
1330
 
1331
- #: includes/Settings.php:363
1332
  msgid "Show price"
1333
  msgstr ""
1334
 
1335
- #: includes/Settings.php:369
1336
  msgid "Show product description"
1337
  msgstr ""
1338
 
1339
- #: includes/Settings.php:357
1340
  msgid "Show product image"
1341
  msgstr ""
1342
 
1343
- #: includes/Settings.php:376
1344
  msgid "Show SKU"
1345
  msgstr ""
1346
 
1347
- #: includes/Settings.php:197
1348
  msgid "Show submit button"
1349
  msgstr ""
1350
 
1351
- #: includes/Settings.php:413
1352
  msgid "Show tags"
1353
  msgstr ""
1354
 
1355
- #: includes/Integrations/Marketplace/Marketplace.php:205
1356
  msgid "Show vendors next to products"
1357
  msgstr ""
1358
 
@@ -1360,34 +1249,34 @@ msgstr ""
1360
  msgid "Showcase"
1361
  msgstr ""
1362
 
1363
- #: includes/Settings.php:702 includes/Settings.php:752
1364
  msgid "Soft"
1365
  msgstr ""
1366
 
1367
- #: includes/Helpers.php:999
1368
  msgid "Sold by:"
1369
  msgstr ""
1370
 
1371
- #: includes/Admin/Troubleshooting.php:425
1372
- #: includes/Admin/Troubleshooting.php:475
1373
- #: includes/Admin/Troubleshooting.php:518
1374
- #: includes/Admin/Troubleshooting.php:611
1375
- #: includes/Admin/Troubleshooting.php:696
1376
- #: includes/Admin/Troubleshooting.php:1031
1377
- #: includes/Admin/Troubleshooting.php:1077
1378
- #: includes/Admin/Troubleshooting.php:1152
1379
  msgid "Solution"
1380
  msgstr ""
1381
 
1382
- #: includes/Admin/Troubleshooting.php:923
1383
  msgid "Solutions"
1384
  msgstr ""
1385
 
1386
- #: includes/Admin/Troubleshooting.php:325
1387
  msgid "Solutions:"
1388
  msgstr ""
1389
 
1390
- #: includes/Admin/Troubleshooting.php:1104
1391
  #, php-format
1392
  msgid ""
1393
  "Some NGINX configuration may block executing PHP files included directly in "
@@ -1396,7 +1285,7 @@ msgid ""
1396
  "to execute the following file: %s"
1397
  msgstr ""
1398
 
1399
- #: includes/Settings.php:635
1400
  msgid "Speed up search!"
1401
  msgstr ""
1402
 
@@ -1409,7 +1298,7 @@ msgstr ""
1409
  msgid "Start"
1410
  msgstr ""
1411
 
1412
- #: includes/Settings.php:107
1413
  msgid "Starting"
1414
  msgstr ""
1415
 
@@ -1417,7 +1306,7 @@ msgstr ""
1417
  msgid "Status"
1418
  msgstr ""
1419
 
1420
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:497
1421
  msgid "Stop process"
1422
  msgstr ""
1423
 
@@ -1425,32 +1314,32 @@ msgstr ""
1425
  msgid "Storefront Theme"
1426
  msgstr ""
1427
 
1428
- #: includes/Settings.php:205
1429
  msgid "Submit label"
1430
  msgstr ""
1431
 
1432
- #: includes/Admin/Troubleshooting.php:1151
1433
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1434
  msgstr ""
1435
 
1436
- #: includes/Settings.php:494
1437
  msgid "Suggestion background"
1438
  msgstr ""
1439
 
1440
- #: includes/Settings.php:501
1441
  msgid "Suggestion selected"
1442
  msgstr ""
1443
 
1444
- #: includes/Settings.php:488
1445
  msgid "Suggestions colors"
1446
  msgstr ""
1447
 
1448
- #: includes/Settings.php:598 includes/Settings.php:604
1449
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1450
  msgid "Synonyms"
1451
  msgstr ""
1452
 
1453
- #: includes/Settings.php:607
1454
  msgid ""
1455
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1456
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
@@ -1462,15 +1351,15 @@ msgstr ""
1462
  msgid "Taxonomies"
1463
  msgstr ""
1464
 
1465
- #: includes/Settings.php:508
1466
  msgid "Text color"
1467
  msgstr ""
1468
 
1469
- #: includes/Admin/Troubleshooting.php:1076
1470
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1471
  msgstr ""
1472
 
1473
- #: includes/Settings.php:441
1474
  msgid ""
1475
  "The Details panel is an additional container for extended information. The "
1476
  "details are changed dynamically when a user mouse over one of the "
@@ -1484,7 +1373,18 @@ msgid ""
1484
  "mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
1485
  msgstr ""
1486
 
1487
- #: includes/Admin/Troubleshooting.php:729
 
 
 
 
 
 
 
 
 
 
 
1488
  #, php-format
1489
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1490
  msgstr ""
@@ -1500,39 +1400,39 @@ msgstr ""
1500
  msgid "the next index rebuild: %s"
1501
  msgstr ""
1502
 
1503
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:470
1504
  msgid "The search index could not be built."
1505
  msgstr ""
1506
 
1507
  #: partials/admin/indexer-header-demo.php:11
1508
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:475
1509
  msgid "The search index does not exist yet. Build it now."
1510
  msgstr ""
1511
 
1512
- #: includes/Admin/Troubleshooting.php:659
1513
  msgid "The search index structure isn't completely"
1514
  msgstr ""
1515
 
1516
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:465
1517
  msgid "The search index was built successfully."
1518
  msgstr ""
1519
 
1520
- #: includes/Admin/Troubleshooting.php:920
1521
  msgid ""
1522
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1523
  "blocked for some reason. Let visit it directly in your browser:"
1524
  msgstr ""
1525
 
1526
- #: includes/Settings.php:237
1527
  msgid "The search will open in overlay on mobile"
1528
  msgstr ""
1529
 
1530
- #: includes/Admin/Troubleshooting.php:917
1531
  msgid ""
1532
  "The server returns an incorrect response for the search engine's AJAX calls"
1533
  msgstr ""
1534
 
1535
- #: includes/Settings.php:605
1536
  msgid ""
1537
  "The synonyms feature allows your users to find more relevant results. If "
1538
  "your products have alternative names and users often misspell them, consider "
@@ -1547,26 +1447,27 @@ msgstr ""
1547
  msgid "There are four easy ways to display the search bar in your theme"
1548
  msgstr ""
1549
 
1550
- #: includes/Admin/Troubleshooting.php:924
1551
  msgid ""
1552
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1553
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1554
  "some security plugins or you have custom code that may block it."
1555
  msgstr ""
1556
 
1557
- #: includes/Admin/Troubleshooting.php:322
1558
  msgid ""
1559
  "This issue may affect the building of the search index. Indexer may stuck at "
1560
  "0%."
1561
  msgstr ""
1562
 
1563
- #: includes/Admin/Troubleshooting.php:318
1564
  msgid ""
1565
  "This issue may affect the search results page and e.g. display all products "
1566
  "every time"
1567
  msgstr ""
1568
 
1569
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:454
 
1570
  msgid "This process will continue in the background. You can leave this page!"
1571
  msgstr ""
1572
 
@@ -1579,7 +1480,7 @@ msgstr ""
1579
  msgid "Title"
1580
  msgstr ""
1581
 
1582
- #: includes/Settings.php:205
1583
  msgid "To display the magnifier icon leave this field empty."
1584
  msgstr ""
1585
 
@@ -1589,20 +1490,20 @@ msgid ""
1589
  "the Shopkeeper settings."
1590
  msgstr ""
1591
 
1592
- #: includes/Settings.php:191
1593
  msgid "To set 100% width leave blank"
1594
  msgstr ""
1595
 
1596
- #: includes/Admin/Troubleshooting.php:1204
1597
  msgid "TranslatePress"
1598
  msgstr ""
1599
 
1600
- #: partials/admin/indexer-header.php:29 includes/Admin/Troubleshooting.php:47
1601
- #: includes/Admin/Troubleshooting.php:66
1602
  msgid "Troubleshooting"
1603
  msgstr ""
1604
 
1605
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:503
1606
  msgid "Try to build the index again."
1607
  msgstr ""
1608
 
@@ -1626,7 +1527,7 @@ msgstr ""
1626
  msgid "Upgrade Now!"
1627
  msgstr ""
1628
 
1629
- #: includes/Settings.php:314
1630
  msgid "Upload preloader image"
1631
  msgstr ""
1632
 
@@ -1640,23 +1541,27 @@ msgstr ""
1640
  msgid "Using PHP - %s"
1641
  msgstr ""
1642
 
1643
- #: includes/Admin/Troubleshooting.php:1247
1644
  msgid "Valid search results test"
1645
  msgstr ""
1646
 
1647
- #: includes/Helpers.php:989
1648
  msgid "Vendor"
1649
  msgstr ""
1650
 
1651
- #: includes/Helpers.php:996
1652
  msgid "Vendors"
1653
  msgstr ""
1654
 
1655
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:453
1656
  msgid "Wait... Indexing in progress"
1657
  msgstr ""
1658
 
1659
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:459
 
 
 
 
1660
  msgid "Wait... The index build process is canceling"
1661
  msgstr ""
1662
 
@@ -1664,14 +1569,14 @@ msgstr ""
1664
  msgid "Warning!"
1665
  msgstr ""
1666
 
1667
- #: includes/Admin/Troubleshooting.php:1078
1668
  #, php-format
1669
  msgid ""
1670
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
1671
  "file(s) on your server."
1672
  msgstr ""
1673
 
1674
- #: includes/Integrations/Marketplace/Marketplace.php:174
1675
  msgid "We support this plugin."
1676
  msgstr ""
1677
 
@@ -1680,11 +1585,11 @@ msgid ""
1680
  "We support this theme and you can easily replace all default search bars."
1681
  msgstr ""
1682
 
1683
- #: includes/Settings.php:662
1684
  msgid "weekly"
1685
  msgstr ""
1686
 
1687
- #: includes/Admin/Troubleshooting.php:919
1688
  msgid "What's wrong?"
1689
  msgstr ""
1690
 
@@ -1692,69 +1597,69 @@ msgstr ""
1692
  msgid "Widgets Screen"
1693
  msgstr ""
1694
 
1695
- #: includes/Settings.php:134
1696
  msgid "with simple tricks"
1697
  msgstr ""
1698
 
1699
- #: includes/Admin/Troubleshooting.php:1237
1700
  msgid "WooCommerce Multilingual"
1701
  msgstr ""
1702
 
1703
- #: includes/Admin/Troubleshooting.php:769
1704
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1705
  msgstr ""
1706
 
1707
- #: includes/Admin/Troubleshooting.php:1212
1708
  msgid "WordPress loading problem"
1709
  msgstr ""
1710
 
1711
- #: includes/Admin/Troubleshooting.php:378
1712
- #: includes/Admin/Troubleshooting.php:1173
1713
  msgid "WordPress version"
1714
  msgstr ""
1715
 
1716
- #: includes/Admin/Troubleshooting.php:202
1717
  msgid "You are using one or more incompatible plugins"
1718
  msgstr ""
1719
 
1720
- #: includes/Admin/Troubleshooting.php:243
1721
  msgid "You are using TranslatePress with Free version of our plugin"
1722
  msgstr ""
1723
 
1724
- #: includes/Admin/Troubleshooting.php:614
1725
  msgid ""
1726
  "You can run these actions manually via Advanced Cron Manager. Then the "
1727
  "Indexer should run. If the index stuck again, run these actions manually one "
1728
  "more time until the finished index."
1729
  msgstr ""
1730
 
1731
- #: includes/Admin/Troubleshooting.php:1153
1732
  msgid ""
1733
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
1734
  "target=\"_blank\">Sucuri panel</a>."
1735
  msgstr ""
1736
 
1737
- #: includes/Admin/Troubleshooting.php:922
1738
  msgid ""
1739
  "You should see <code>pong</code> word as a response. Probably you see "
1740
  "something else."
1741
  msgstr ""
1742
 
1743
- #: includes/Integrations/Marketplace/Marketplace.php:173
1744
  #, php-format
1745
  msgid "You use %s plugin version %s"
1746
  msgstr ""
1747
 
1748
- #: includes/Admin/Troubleshooting.php:222
1749
- #: includes/Admin/Troubleshooting.php:224
1750
  #, php-format
1751
  msgid ""
1752
  "You use the %s plugin, which may cause errors in the search results returned "
1753
  "by our plugin."
1754
  msgstr ""
1755
 
1756
- #: includes/Admin/Troubleshooting.php:213
1757
- #: includes/Admin/Troubleshooting.php:217
1758
  #, php-format
1759
  msgid "You use the %s plugin. The %s does not support this plugin."
1760
  msgstr ""
@@ -1764,7 +1669,7 @@ msgstr ""
1764
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
1765
  msgstr ""
1766
 
1767
- #: includes/Admin/Troubleshooting.php:770
1768
  #, php-format
1769
  msgid ""
1770
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
@@ -1772,7 +1677,7 @@ msgid ""
1772
  "target=\"_blank\">WooCommerce Multilingual status</a>."
1773
  msgstr ""
1774
 
1775
- #: includes/Admin/Troubleshooting.php:765
1776
  #, php-format
1777
  msgid ""
1778
  "You use the WPML Multilingual CMS plugin and to correctly search for "
@@ -1780,14 +1685,18 @@ msgid ""
1780
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
1781
  msgstr ""
1782
 
1783
- #: includes/Admin/Troubleshooting.php:427
 
 
 
 
1784
  msgid "Your settings should looks like the picture below:"
1785
  msgstr ""
1786
 
1787
- #: includes/Admin/Troubleshooting.php:267
1788
  msgid "Your site can perform loopback requests"
1789
  msgstr ""
1790
 
1791
- #: includes/Admin/Troubleshooting.php:314
1792
  msgid "Your site could not complete a loopback request"
1793
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-04-21 07:34+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
+ "Last-Translator: Damian Góra <support@fibosearch.com>\n"
9
  "Language-Team: \n"
10
  "Language: \n"
11
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
+ #: includes/Engines/TNTSearchMySQL/Indexer/Logger.php:36
18
+ #, php-format
19
+ msgid "%1$s was called with an invalid level \"%2$s\"."
 
 
 
 
 
 
 
 
20
  msgstr ""
21
 
22
+ #: ajax-search-for-woocommerce.php:237
23
  #, php-format
24
  msgid "%s is enabled but not effective. It requires %s in order to work."
25
  msgstr ""
26
 
27
  #: includes/Abstracts/ThemeIntegration.php:49
 
 
28
  #: includes/Integrations/Themes/Shopical/Shopical.php:43
29
+ #: includes/Integrations/Themes/Enfold/Enfold.php:50
30
+ #: includes/Integrations/Themes/Sober/Sober.php:43
31
+ #: includes/Integrations/Themes/The7/The7.php:46
32
+ #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:45
33
+ #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:43
34
  #: includes/Integrations/Themes/Bridge/Bridge.php:43
35
+ #: includes/Integrations/Themes/BlockShop/BlockShop.php:43
36
  #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:43
37
  #: includes/Integrations/Themes/Avada/Avada.php:46
 
 
38
  #: includes/Integrations/Themes/Savoy/Savoy.php:43
39
+ #: includes/Integrations/Themes/Ekommart/Ekommart.php:43
 
 
 
40
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:61
41
+ #: includes/Integrations/Themes/Restoration/Restoration.php:45
42
+ #: includes/Integrations/Themes/Divi/Divi.php:61
43
  #, php-format
44
  msgid "%s Theme"
45
  msgstr ""
46
 
47
+ #: includes/Admin/RegenerateImages.php:102
48
+ #, php-format
49
+ msgid ""
50
+ "%s: it is recommended to generate a special small image size for existing "
51
+ "products to ensure a better user experience. This is a one-time action. <br "
52
+ "/><br />You can do it by clicking %s or use an external plugin such as %s."
53
+ msgstr ""
54
+
55
+ #: ajax-search-for-woocommerce.php:215
56
+ #, php-format
57
+ msgid ""
58
+ "%s: You need PHP version at least 7.0 to run this plugin. You are currently "
59
+ "using PHP version "
60
+ msgstr ""
61
+
62
+ #: includes/Settings.php:711 includes/Settings.php:761
63
  msgid "-- Disabled"
64
  msgstr ""
65
 
69
  "products "
70
  msgstr ""
71
 
72
+ #: partials/admin/indexer-header.php:46
73
+ #, php-format
74
+ msgid ""
75
+ "<b>Your server can't send an HTTP requests to itself</b>. <a "
76
+ "target=\"_blank\" href=\"%s\">Visit our documentation</a> to see solutions."
77
+ msgstr ""
78
+
79
+ #: includes/Admin/Troubleshooting.php:636
80
  msgid ""
81
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
82
  "it."
83
  msgstr ""
84
 
85
+ #: includes/Admin/Troubleshooting.php:1023
86
  msgid "A search engine's AJAX call did not return valid results"
87
  msgstr ""
88
 
94
  msgid "Add new rule"
95
  msgstr ""
96
 
97
+ #: includes/Admin/Troubleshooting.php:1186
98
  msgid "Add the following URL to the white list:"
99
  msgstr ""
100
 
101
+ #: includes/Admin/Troubleshooting.php:1136
102
  msgid ""
103
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
104
  "conf</code>"
105
  msgstr ""
106
 
107
+ #: includes/Settings.php:355
108
  msgctxt "admin"
109
  msgid "No results label"
110
  msgstr ""
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  #: widget.php:25
113
  msgid "AJAX (live) search form for WooCommerce"
114
  msgstr ""
115
 
116
+ #: includes/Settings.php:792
117
  msgid "AJAX Search for WooCommerce rebrands to FiboSearch"
118
  msgstr ""
119
 
122
  msgstr ""
123
 
124
  #: includes/Abstracts/ThemeIntegration.php:70
 
 
 
 
 
 
 
 
125
  #: includes/Integrations/Themes/TheGem/TheGem.php:100
126
  #: includes/Integrations/Themes/TheGem/TheGem.php:108
127
+ #: includes/Integrations/Themes/Shopical/Shopical.php:64
128
+ #: includes/Integrations/Themes/Enfold/Enfold.php:71
129
+ #: includes/Integrations/Themes/Sober/Sober.php:64
130
+ #: includes/Integrations/Themes/The7/The7.php:67
131
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:64
132
+ #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:81
133
+ #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:67
134
  #: includes/Integrations/Themes/Storefront/Storefront.php:65
135
+ #: includes/Integrations/Themes/Bridge/Bridge.php:64
136
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:64
137
+ #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:64
138
+ #: includes/Integrations/Themes/Impreza/Impreza.php:60
139
+ #: includes/Integrations/Themes/Avada/Avada.php:67
140
+ #: includes/Integrations/Themes/Savoy/Savoy.php:64
141
+ #: includes/Integrations/Themes/Ekommart/Ekommart.php:64
142
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:82
143
+ #: includes/Integrations/Themes/Restoration/Restoration.php:66
144
+ #: includes/Integrations/Themes/Divi/Divi.php:82
145
  msgid "Alternative ways to embed a search bar"
146
  msgstr ""
147
 
148
+ #: includes/Admin/Troubleshooting.php:716
149
  #, php-format
150
  msgid ""
151
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
184
  msgid "Attributes: %s"
185
  msgstr ""
186
 
187
+ #: includes/Settings.php:121 partials/admin/search-preview.php:24
188
  msgid "Autocomplete"
189
  msgstr ""
190
 
193
  msgid "based on the plugin %s"
194
  msgstr ""
195
 
196
+ #: includes/Settings.php:183 includes/Settings.php:333
197
  msgid "Basic"
198
  msgstr ""
199
 
200
+ #: includes/Admin/Troubleshooting.php:1272
201
  msgid "Blocked search endpoint test"
202
  msgstr ""
203
 
204
+ #: includes/Settings.php:532
205
  msgid "Border color"
206
  msgstr ""
207
 
208
+ #: includes/Helpers.php:960
209
  msgid "Brand"
210
  msgstr ""
211
 
212
+ #: includes/Helpers.php:967
213
  msgid "Brands"
214
  msgstr ""
215
 
218
  msgstr ""
219
 
220
  #: partials/admin/indexer-header-demo.php:15
221
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:653
222
  msgid "Build index"
223
  msgstr ""
224
 
225
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:606
226
  msgid "Canceling..."
227
  msgstr ""
228
 
239
  msgid "child theme of <b>%s</b>"
240
  msgstr ""
241
 
242
+ #: includes/Settings.php:263
243
  msgid "Colors"
244
  msgstr ""
245
 
246
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:612
247
  msgid "Completed. Works."
248
  msgstr ""
249
 
251
  msgid "Contact"
252
  msgstr ""
253
 
254
+ #: includes/Helpers.php:976
255
  msgid "continue reading"
256
  msgstr ""
257
 
258
+ #: includes/Admin/Troubleshooting.php:596
259
  #, php-format
260
  msgid ""
261
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
263
  "support</a>."
264
  msgstr ""
265
 
266
+ #: includes/Admin/Troubleshooting.php:595
267
  msgid "Custom location of wp-load.php file"
268
  msgstr ""
269
 
270
+ #: includes/Settings.php:671
271
  msgid "daily"
272
  msgstr ""
273
 
283
  msgid "Default"
284
  msgstr ""
285
 
286
+ #: includes/Admin/Troubleshooting.php:1058
287
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
288
  msgstr ""
289
 
290
+ #: includes/Settings.php:444
291
  msgid "Details panel"
292
  msgstr ""
293
 
294
+ #: includes/Admin/Troubleshooting.php:263
 
 
 
 
295
  #, php-format
296
  msgid ""
297
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
299
  "version</a>."
300
  msgstr ""
301
 
302
+ #: includes/Admin/Troubleshooting.php:724
303
  msgid ""
304
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
305
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
306
  msgstr ""
307
 
308
+ #: includes/Settings.php:658
309
  msgid "Enable Scheduler"
310
  msgstr ""
311
 
314
  msgid "End"
315
  msgstr ""
316
 
317
+ #: includes/Admin/Troubleshooting.php:715
318
  msgid "Error establishing a database connection"
319
  msgstr ""
320
 
321
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:617
322
  msgid "Errors"
323
  msgstr ""
324
 
325
+ #: includes/Settings.php:630 includes/Settings.php:729
326
  msgid "Exclude from search all products that match conditions"
327
  msgstr ""
328
 
329
+ #: includes/Settings.php:623 includes/Settings.php:722
330
  msgid "Exclude products"
331
  msgstr ""
332
 
333
+ #: includes/Settings.php:596
334
  msgid "Exclude “out of stock” products"
335
  msgstr ""
336
 
337
+ #: includes/Admin/Troubleshooting.php:497
338
  msgid "Extensions should looks like the picture below:"
339
  msgstr ""
340
 
341
+ #: includes/Admin/AdminMenu.php:58 includes/Admin/AdminMenu.php:59
342
  msgid "FiboSearch"
343
  msgstr ""
344
 
359
  msgid "FiboSearch Pro - Upgrade Now"
360
  msgstr ""
361
 
362
+ #: includes/Admin/Troubleshooting.php:717
363
  msgid ""
364
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
365
  "connection is required."
366
  msgstr ""
367
 
368
+ #: includes/Settings.php:629 includes/Settings.php:728
369
  msgid "Filters"
370
  msgstr ""
371
 
374
  msgid "Finalization... Wait a moment. (%s products)"
375
  msgstr ""
376
 
377
+ #: includes/Admin/Troubleshooting.php:1185
378
  msgid "Find section <code>Access Control -> whitelist URL</code>"
379
  msgstr ""
380
 
 
 
 
 
 
381
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:43
382
  msgid "Flatsome Theme"
383
  msgstr ""
384
 
385
+ #: includes/Settings.php:602
386
  msgid "Fuzziness"
387
  msgstr ""
388
 
389
+ #: includes/Settings.php:706 includes/Settings.php:756
390
  msgid "Fuzzy matching"
391
  msgstr ""
392
 
394
  msgid "Fuzzy search"
395
  msgstr ""
396
 
397
+ #: includes/Admin/Troubleshooting.php:343
398
  #, php-format
399
  msgid ""
400
+ "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
401
+ "WordPress. You should see issues related to REST API or Loopback request. "
402
+ "Expand descriptions of these errors and follow the instructions. Probably "
403
+ "you will need to contact your hosting provider to solve it."
 
 
 
 
 
404
  msgstr ""
405
 
406
  #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:67
410
  "Header -> Search</code> and enable <code>Predictive Search</code>"
411
  msgstr ""
412
 
413
+ #: includes/Admin/Troubleshooting.php:1060
414
  #, php-format
415
  msgid ""
416
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
418
  "exceptions: <code>%s</code>"
419
  msgstr ""
420
 
421
+ #: includes/Admin/Troubleshooting.php:539
422
  #, php-format
423
  msgid ""
424
  "Go to <code>Security -> Settings -> <a href=\"%s\" target=\"_blank\">System "
425
  "Tweaks</a></code> and uncheck <code>Disable PHP in Plugins</code> option."
426
  msgstr ""
427
 
428
+ #: includes/Admin/Troubleshooting.php:446
429
  #, php-format
430
  msgid ""
431
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
433
  "option <code>%s</code>."
434
  msgstr ""
435
 
436
+ #: includes/Admin/Troubleshooting.php:496
437
  #, php-format
438
  msgid ""
439
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
441
  "Searching by Text</code> extension and save changes."
442
  msgstr ""
443
 
444
+ #: includes/Admin/Troubleshooting.php:757
445
  #, php-format
446
  msgid ""
447
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
448
  "Performance tab</a> -> disable the Search module</code>"
449
  msgstr ""
450
 
451
+ #: includes/Admin/Troubleshooting.php:682
452
  #, php-format
453
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
454
  msgstr ""
455
 
456
+ #: includes/Admin/Troubleshooting.php:1184
457
  msgid "Go to the settings"
458
  msgstr ""
459
 
460
+ #: includes/Admin/Troubleshooting.php:407
461
  msgid "Great! Our plugin works great with this version of WordPress."
462
  msgstr ""
463
 
467
  "functioning of our plugin."
468
  msgstr ""
469
 
470
+ #: includes/Settings.php:347
471
  msgid "Group results"
472
  msgstr ""
473
 
474
+ #: includes/Settings.php:714 includes/Settings.php:764
475
  msgid "Hard"
476
  msgstr ""
477
 
478
+ #: includes/Admin/Troubleshooting.php:1135
479
  msgid "Here are few samples NGINX config which helps other users:"
480
  msgstr ""
481
 
493
  "time now, and I hope you like it!"
494
  msgstr ""
495
 
496
+ #: partials/admin/indexer-header.php:63
497
  msgid "Hide details"
498
  msgstr ""
499
 
500
+ #: includes/Settings.php:525
501
  msgid "Highlight color"
502
  msgstr ""
503
 
504
+ #: includes/Settings.php:168
505
  msgid "How to add search bar in your theme?"
506
  msgstr ""
507
 
508
+ #: includes/Settings.php:174
509
  msgid "How to add?"
510
  msgstr ""
511
 
516
  "admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
517
  msgstr ""
518
 
519
+ #: widget.php:41 includes/Settings.php:239 includes/EmbeddingViaMenu.php:189
520
  msgid "Icon on mobile, search bar on desktop"
521
  msgstr ""
522
 
523
+ #: partials/admin/indexer-header.php:49
524
+ msgid ""
525
+ "If the indexer still doesn't work, add a constant <code>"
526
+ "define('DGWT_WCAS_INDEXER_MODE', 'sync');</code> to your <code>wp-config."
527
+ "php</code> file and try to rebuild the search index again"
528
+ msgstr ""
529
+
530
  #: partials/admin/features.php:14
531
  msgid ""
532
  "If users can’t find the product they’re searching for, they can’t buy it. "
533
  "Help your customers to find the right products even <span>10× faster</span>."
534
  msgstr ""
535
 
536
+ #: partials/admin/indexer-header.php:43
 
 
 
 
537
  msgid ""
538
+ "If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
539
+ "the issues mentioned there"
 
540
  msgstr ""
541
 
542
  #: includes/Integrations/Themes/Impreza/Impreza.php:46
543
  msgid "Impreza Theme"
544
  msgstr ""
545
 
546
+ #: includes/Helpers.php:975
547
  msgctxt "in categories fe. in Books > Crime stories"
548
  msgid "in"
549
  msgstr ""
550
 
551
+ #: includes/Settings.php:659
552
  msgid ""
553
  "In most cases, you don't need to use the scheduler because the search index "
554
  "updates when you edit products. If you use import tools or custom code to "
556
  "helpful."
557
  msgstr ""
558
 
559
+ #: includes/Admin/Troubleshooting.php:494
560
  msgid ""
561
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
562
  "Products Filter plugin is active"
563
  msgstr ""
564
 
565
+ #: includes/Admin/Troubleshooting.php:1219
566
  msgid ""
567
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
568
  "Filter"
569
  msgstr ""
570
 
571
+ #: includes/Admin/Troubleshooting.php:1211
572
  msgid "Incompatible plugins"
573
  msgstr ""
574
 
575
+ #: includes/Admin/Troubleshooting.php:444
576
+ #: includes/Admin/Troubleshooting.php:1215
577
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
578
  msgstr ""
579
 
580
+ #: includes/Settings.php:142
581
  msgid "Increase sales"
582
  msgstr ""
583
 
584
+ #: includes/Settings.php:687
585
  msgid "Increases sales conversions"
586
  msgstr ""
587
 
593
  msgid "Index build start"
594
  msgstr ""
595
 
596
+ #: includes/Admin/Troubleshooting.php:1252
597
  msgid "Index completeness test"
598
  msgstr ""
599
 
600
+ #: includes/Settings.php:738 includes/Settings.php:772
601
  msgid "Index status"
602
  msgstr ""
603
 
606
  msgid "Indexed <strong>100&#37;</strong>, <strong>%d products</strong>."
607
  msgstr ""
608
 
609
+ #: includes/Settings.php:136
610
  msgid "Indexer"
611
  msgstr ""
612
 
624
  msgid "Individual tips and support by FiboSearch team"
625
  msgstr ""
626
 
627
+ #: includes/Admin/Troubleshooting.php:633
628
  msgid ""
629
  "Install the <a target=\"_blank\" href=\"https://wordpress."
630
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
631
+ "verify if WP-Cron works correctly. You should see some of the actions "
632
+ "related to the Indexer:"
633
  msgstr ""
634
 
635
+ #: includes/Admin/Troubleshooting.php:410
636
  msgid ""
637
  "Install the latest version of WordPress for our plugin to work as best it "
638
  "can!"
639
  msgstr ""
640
 
641
+ #: includes/Settings.php:667
642
  msgid "Interval"
643
  msgstr ""
644
 
645
+ #: includes/Admin/Troubleshooting.php:352 partials/admin/indexer-header.php:52
646
  #, php-format
647
  msgid ""
648
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
649
+ "request</a>"
650
  msgstr ""
651
 
652
+ #: includes/Admin/Troubleshooting.php:346
653
+ msgid ""
654
+ "Is your website publicly available only for whitelisted IPs? <b>Add your "
655
+ "server IP to the whitelist</b>. That’s all. This is a common mistake when "
656
+ "access is blocked by a <code>.htaccess</code> file. Developers add a list of "
657
+ "allowed IPs, but they forget to add the IP of the server to allow make HTTP "
658
+ "requests to itself."
659
  msgstr ""
660
 
661
+ #: includes/Admin/Troubleshooting.php:610
662
+ #: includes/Admin/Troubleshooting.php:1247
663
  msgid "Issue with WP-Cron"
664
  msgstr ""
665
 
666
+ #: includes/Admin/Troubleshooting.php:537
667
  msgid "iThemes Security plugin blocks AJAX requests"
668
  msgstr ""
669
 
670
+ #: includes/Admin/Troubleshooting.php:1262
671
  msgid "Jetpack search module"
672
  msgstr ""
673
 
676
  msgid "Last build %s"
677
  msgstr ""
678
 
679
+ #: widget.php:43 includes/Settings.php:234 includes/EmbeddingViaMenu.php:74
680
  msgid "Layout"
681
  msgstr ""
682
 
683
+ #: includes/Settings.php:228
684
  msgid "Layout (beta)"
685
  msgstr ""
686
 
687
+ #: includes/Settings.php:339
688
  msgid "Limit"
689
  msgstr ""
690
 
692
  msgid "Logs"
693
  msgstr ""
694
 
695
+ #: includes/Admin/Troubleshooting.php:1225
696
  msgid "Loopback request"
697
  msgstr ""
698
 
703
  "pharetra imperdiet neque, non varius."
704
  msgstr ""
705
 
706
+ #: includes/Integrations/Marketplace/Marketplace.php:160
707
  msgid "Marketplace"
708
  msgstr ""
709
 
710
+ #: includes/Integrations/Marketplace/Marketplace.php:170
711
  msgid "Marketplace third-party integration"
712
  msgstr ""
713
 
714
+ #: includes/Settings.php:198
715
  msgid "Max form width"
716
  msgstr ""
717
 
718
+ #: includes/Settings.php:342
719
  msgid "maximum number of suggestions"
720
  msgstr ""
721
 
722
+ #: includes/Admin/Troubleshooting.php:953
723
  msgid ""
724
  "Maybe your server blocks it by Apache module <code>mod_security</code>. "
725
  "Contact your hosting provider and ask what can block the URL you see above."
729
  msgid "Menu Screen"
730
  msgstr ""
731
 
732
+ #: includes/Settings.php:193
733
  msgid "Min characters to show autocomplete"
734
  msgstr ""
735
 
736
+ #: includes/Settings.php:189
737
  msgid "Minimum characters"
738
  msgstr ""
739
 
740
+ #: includes/Admin/Troubleshooting.php:791
741
  msgid "Missing plugin: WooCommerce Multilingual"
742
  msgstr ""
743
 
744
+ #: includes/Settings.php:254
745
  msgid "Mobile breakpoint"
746
  msgstr ""
747
 
751
  "algorithms"
752
  msgstr ""
753
 
754
+ #: includes/Settings.php:404
755
  msgid "More results label"
756
  msgstr ""
757
 
759
  msgid "My Account"
760
  msgstr ""
761
 
762
+ #: includes/Settings.php:800
763
  msgid "New plugin name"
764
  msgstr ""
765
 
766
+ #: includes/Settings.php:787
767
  msgid "News"
768
  msgstr ""
769
 
770
+ #: includes/Admin/Troubleshooting.php:1132
771
  msgid "NGINX configuration may blocks search requests"
772
  msgstr ""
773
 
774
+ #: includes/Settings.php:357 includes/Helpers.php:977
775
  msgid "No results"
776
  msgstr ""
777
 
783
  msgid "No thanks"
784
  msgstr ""
785
 
786
+ #: includes/Settings.php:410
787
  msgid "Non-products in autocomplete"
788
  msgstr ""
789
 
790
+ #: includes/Settings.php:713 includes/Settings.php:763
791
  msgid "Normal"
792
  msgstr ""
793
 
794
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:623
795
  msgid "Not exist"
796
  msgstr ""
797
 
799
  msgid "Note: We currently only support the header type: \"Header 10\""
800
  msgstr ""
801
 
802
+ #: includes/Admin/Troubleshooting.php:368
803
  msgid "One or more required PHP extensions are missing on your server"
804
  msgstr ""
805
 
806
+ #: includes/Settings.php:246
807
  msgid "Overlay on mobile"
808
  msgstr ""
809
 
810
+ #: includes/Admin/Troubleshooting.php:1257
811
  msgid "PDO connection test"
812
  msgstr ""
813
 
814
+ #: includes/Admin/Troubleshooting.php:1207
815
  msgid "PHP extensions"
816
  msgstr ""
817
 
819
  msgid "Posts & pages"
820
  msgstr ""
821
 
822
+ #: includes/Settings.php:311
823
  msgid "Preloader"
824
  msgstr ""
825
 
827
  msgid "Preview"
828
  msgstr ""
829
 
830
+ #: includes/Helpers.php:475 includes/Helpers.php:479
831
  msgid "Pro"
832
  msgstr ""
833
 
834
+ #: includes/Settings.php:639
835
  msgid "Pro features"
836
  msgstr ""
837
 
847
  msgid "Product tags"
848
  msgstr ""
849
 
850
+ #: includes/Settings.php:361 partials/admin/indexer-body.php:58
851
  msgid "Products"
852
  msgstr ""
853
 
855
  msgid "Products search"
856
  msgstr ""
857
 
858
+ #: includes/Settings.php:541
859
  msgid "Products search scope"
860
  msgstr ""
861
 
865
  "search bar in your theme"
866
  msgstr ""
867
 
868
+ #: includes/Settings.php:255
869
  msgid "px"
870
  msgstr ""
871
 
872
+ #: includes/Settings.php:794
873
  msgid "Read more"
874
  msgstr ""
875
 
876
+ #: includes/Admin/Troubleshooting.php:351
877
+ #, php-format
878
+ msgid ""
879
+ "Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
880
+ "documentation</a>"
881
+ msgstr ""
882
+
883
  #: partials/admin/indexer-body.php:90
884
  msgid "Readable"
885
  msgstr ""
886
 
887
+ #: includes/Admin/Troubleshooting.php:676
888
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:647
889
  msgid "Rebuild index"
890
  msgstr ""
891
 
892
  #: includes/Abstracts/ThemeIntegration.php:62
893
+ #: includes/Integrations/Themes/TheGem/TheGem.php:92
 
894
  #: includes/Integrations/Themes/Shopical/Shopical.php:56
895
+ #: includes/Integrations/Themes/Enfold/Enfold.php:63
896
+ #: includes/Integrations/Themes/Sober/Sober.php:56
 
 
897
  #: includes/Integrations/Themes/The7/The7.php:59
 
 
 
898
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:56
899
+ #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:58
900
+ #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:59
901
  #: includes/Integrations/Themes/Storefront/Storefront.php:57
902
+ #: includes/Integrations/Themes/Bridge/Bridge.php:56
903
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:56
904
+ #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:56
905
+ #: includes/Integrations/Themes/Avada/Avada.php:59
906
+ #: includes/Integrations/Themes/Savoy/Savoy.php:56
907
+ #: includes/Integrations/Themes/Ekommart/Ekommart.php:56
908
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:74
909
+ #: includes/Integrations/Themes/Restoration/Restoration.php:58
910
+ #: includes/Integrations/Themes/Divi/Divi.php:74
911
  msgid "Replace"
912
  msgstr ""
913
 
914
  #: includes/Abstracts/ThemeIntegration.php:42
 
 
915
  #: includes/Integrations/Themes/Shopical/Shopical.php:36
916
+ #: includes/Integrations/Themes/Enfold/Enfold.php:43
917
+ #: includes/Integrations/Themes/Sober/Sober.php:36
918
+ #: includes/Integrations/Themes/The7/The7.php:39
919
+ #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:38
920
+ #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:36
921
  #: includes/Integrations/Themes/Bridge/Bridge.php:36
922
+ #: includes/Integrations/Themes/BlockShop/BlockShop.php:36
923
  #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:36
924
  #: includes/Integrations/Themes/Avada/Avada.php:39
 
 
925
  #: includes/Integrations/Themes/Savoy/Savoy.php:36
926
+ #: includes/Integrations/Themes/Ekommart/Ekommart.php:36
 
 
 
927
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:54
928
+ #: includes/Integrations/Themes/Restoration/Restoration.php:38
929
+ #: includes/Integrations/Themes/Divi/Divi.php:54
930
  #, php-format
931
  msgid "Replace %s search bar"
932
  msgstr ""
935
  msgid "Replace a search bar in TheGem "
936
  msgstr ""
937
 
 
 
 
 
 
 
938
  #: includes/Integrations/Themes/Shopical/Shopical.php:57
939
+ #: includes/Integrations/Themes/Enfold/Enfold.php:64
940
+ #: includes/Integrations/Themes/Sober/Sober.php:57
 
 
941
  #: includes/Integrations/Themes/The7/The7.php:60
 
 
942
  #: includes/Integrations/Themes/Flatsome/Flatsome.php:57
943
+ #: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:59
944
+ #: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:54
945
  #: includes/Integrations/Themes/Storefront/Storefront.php:58
946
+ #: includes/Integrations/Themes/Bridge/Bridge.php:57
947
  #: includes/Integrations/Themes/BlockShop/BlockShop.php:57
948
+ #: includes/Integrations/Themes/ShopIsle/ShopIsle.php:57
949
+ #: includes/Integrations/Themes/Avada/Avada.php:60
950
+ #: includes/Integrations/Themes/Savoy/Savoy.php:57
951
+ #: includes/Integrations/Themes/Ekommart/Ekommart.php:57
952
  #: includes/Integrations/Themes/Woodmart/Woodmart.php:75
953
+ #: includes/Integrations/Themes/Restoration/Restoration.php:59
954
+ #: includes/Integrations/Themes/Divi/Divi.php:75
955
  #, php-format
956
  msgid "Replace all %s search bars with the %s."
957
  msgstr ""
972
  msgid "Replace the TheGem default search"
973
  msgstr ""
974
 
975
+ #: includes/Admin/Troubleshooting.php:378
976
+ #: includes/Admin/Troubleshooting.php:381
977
  #, php-format
978
  msgid "Required PHP extension: %s"
979
  msgstr ""
980
 
981
+ #: includes/Admin/Troubleshooting.php:1025
982
  msgid "Response body"
983
  msgstr ""
984
 
985
+ #: includes/Settings.php:688
986
  msgid ""
987
  "returns suggestions based on likely relevance, even though a search keyword "
988
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
1022
  msgid "Sample tag <strong>name</strong>"
1023
  msgstr ""
1024
 
1025
+ #: includes/Settings.php:678
1026
  msgid "Schedule time"
1027
  msgstr ""
1028
 
1029
+ #: includes/Settings.php:652
1030
  msgid "Scheduling indexing"
1031
  msgstr ""
1032
 
1033
+ #: includes/Settings.php:218 partials/search-form.php:46
1034
  msgid "Search"
1035
  msgstr ""
1036
 
1037
+ #: includes/Settings.php:117 includes/EmbeddingViaMenu.php:247
1038
  #: partials/admin/search-preview.php:23
1039
  msgid "Search bar"
1040
  msgstr ""
1041
 
1042
+ #: widget.php:39 includes/Settings.php:237 includes/EmbeddingViaMenu.php:187
1043
  msgid "Search bar only"
1044
  msgstr ""
1045
 
1047
  msgid "Search by variation product SKU"
1048
  msgstr ""
1049
 
1050
+ #: includes/Settings.php:125
1051
  msgid "Search config"
1052
  msgstr ""
1053
 
1055
  msgid "Search for posts and pages"
1056
  msgstr ""
1057
 
1058
+ #: includes/Settings.php:224 includes/Helpers.php:980
1059
  msgid "Search for products..."
1060
  msgstr ""
1061
 
1062
+ #: widget.php:40 includes/Settings.php:238 includes/Settings.php:269
1063
  #: includes/EmbeddingViaMenu.php:188
1064
  msgid "Search icon"
1065
  msgstr ""
1068
  msgid "Search icon color"
1069
  msgstr ""
1070
 
1071
+ #: includes/Settings.php:568 partials/admin/features.php:23
1072
  msgid "Search in attributes"
1073
  msgstr ""
1074
 
1084
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1085
  msgstr ""
1086
 
1087
+ #: includes/Settings.php:575 partials/admin/features.php:24
1088
  msgid "Search in categories"
1089
  msgstr ""
1090
 
1091
+ #: includes/Settings.php:589 includes/Settings.php:697
1092
  #: partials/admin/features.php:22
1093
  msgid "Search in custom fields"
1094
  msgstr ""
1095
 
1096
+ #: includes/Settings.php:547
1097
  msgid "Search in description"
1098
  msgstr ""
1099
 
1100
+ #: includes/Settings.php:553
1101
  msgid "Search in short description"
1102
  msgstr ""
1103
 
1104
+ #: includes/Settings.php:559
1105
  msgid "Search in SKU"
1106
  msgstr ""
1107
 
1108
+ #: includes/Settings.php:582 partials/admin/features.php:25
1109
  msgid "Search in tags"
1110
  msgstr ""
1111
 
1112
+ #: includes/Integrations/Marketplace/Marketplace.php:200
1113
  msgid "Search in vendors"
1114
  msgstr ""
1115
 
1116
+ #: includes/Settings.php:276
1117
  msgid "Search input background"
1118
  msgstr ""
1119
 
1120
+ #: includes/Settings.php:290
1121
  msgid "Search input border"
1122
  msgstr ""
1123
 
1124
+ #: includes/Settings.php:222
1125
  msgid "Search input placeholder"
1126
  msgstr ""
1127
 
1128
+ #: includes/Settings.php:283
1129
  msgid "Search input text"
1130
  msgstr ""
1131
 
1132
+ #: includes/Settings.php:297
1133
  msgid "Search submit background"
1134
  msgstr ""
1135
 
1136
+ #: includes/Settings.php:304
1137
  msgid "Search submit text"
1138
  msgstr ""
1139
 
1141
  msgid "Searchable"
1142
  msgstr ""
1143
 
1144
+ #: includes/Settings.php:561
1145
  msgid "searching also in variable products SKU"
1146
  msgstr ""
1147
 
1148
+ #: includes/Settings.php:562
1149
  #, php-format
1150
  msgid ""
1151
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
1156
  msgid "See a comparison of all free and premium features!"
1157
  msgstr ""
1158
 
1159
+ #: includes/Settings.php:406 includes/Helpers.php:978 includes/Helpers.php:979
 
1160
  msgid "See all products..."
1161
  msgstr ""
1162
 
1164
  msgid "Select filter type"
1165
  msgstr ""
1166
 
1167
+ #: includes/Settings.php:700
1168
  msgid "select the custom fields you want to add to the search scope"
1169
  msgstr ""
1170
 
1171
+ #: includes/Admin/Troubleshooting.php:1373
1172
  msgid "Server environment"
1173
  msgstr ""
1174
 
1175
+ #: includes/Admin/Troubleshooting.php:946
1176
+ #: includes/Admin/Troubleshooting.php:1024
1177
  #, php-format
1178
  msgid ""
1179
  "Server response with message <code>%s</code> and status code <code>%s</code>."
1180
  msgstr ""
1181
 
1182
  #: partials/admin/settings.php:27
1183
+ #: includes/Integrations/Marketplace/Marketplace.php:193
1184
  msgid "Settings"
1185
  msgstr ""
1186
 
1192
  msgid "Show brands"
1193
  msgstr ""
1194
 
1195
+ #: includes/Settings.php:416
1196
  msgid "Show categories"
1197
  msgstr ""
1198
 
 
1199
  #: partials/admin/indexer-header-demo.php:16
1200
+ #: partials/admin/indexer-header.php:62
1201
  msgid "Show details"
1202
  msgstr ""
1203
 
1204
+ #: includes/Settings.php:450
1205
  msgid "Show Details panel"
1206
  msgstr ""
1207
 
1208
+ #: includes/Settings.php:437
1209
  msgid "Show pages"
1210
  msgstr ""
1211
 
1212
+ #: includes/Settings.php:430
1213
  msgid "Show posts"
1214
  msgstr ""
1215
 
1216
+ #: includes/Settings.php:317
1217
  msgid "Show preloader"
1218
  msgstr ""
1219
 
1220
+ #: includes/Settings.php:373
1221
  msgid "Show price"
1222
  msgstr ""
1223
 
1224
+ #: includes/Settings.php:379
1225
  msgid "Show product description"
1226
  msgstr ""
1227
 
1228
+ #: includes/Settings.php:367
1229
  msgid "Show product image"
1230
  msgstr ""
1231
 
1232
+ #: includes/Settings.php:386
1233
  msgid "Show SKU"
1234
  msgstr ""
1235
 
1236
+ #: includes/Settings.php:207
1237
  msgid "Show submit button"
1238
  msgstr ""
1239
 
1240
+ #: includes/Settings.php:423
1241
  msgid "Show tags"
1242
  msgstr ""
1243
 
1244
+ #: includes/Integrations/Marketplace/Marketplace.php:207
1245
  msgid "Show vendors next to products"
1246
  msgstr ""
1247
 
1249
  msgid "Showcase"
1250
  msgstr ""
1251
 
1252
+ #: includes/Settings.php:712 includes/Settings.php:762
1253
  msgid "Soft"
1254
  msgstr ""
1255
 
1256
+ #: includes/Helpers.php:973
1257
  msgid "Sold by:"
1258
  msgstr ""
1259
 
1260
+ #: includes/Admin/Troubleshooting.php:445
1261
+ #: includes/Admin/Troubleshooting.php:495
1262
+ #: includes/Admin/Troubleshooting.php:538
1263
+ #: includes/Admin/Troubleshooting.php:632
1264
+ #: includes/Admin/Troubleshooting.php:723
1265
+ #: includes/Admin/Troubleshooting.php:1059
1266
+ #: includes/Admin/Troubleshooting.php:1106
1267
+ #: includes/Admin/Troubleshooting.php:1182
1268
  msgid "Solution"
1269
  msgstr ""
1270
 
1271
+ #: includes/Admin/Troubleshooting.php:951
1272
  msgid "Solutions"
1273
  msgstr ""
1274
 
1275
+ #: includes/Admin/Troubleshooting.php:339
1276
  msgid "Solutions:"
1277
  msgstr ""
1278
 
1279
+ #: includes/Admin/Troubleshooting.php:1133
1280
  #, php-format
1281
  msgid ""
1282
  "Some NGINX configuration may block executing PHP files included directly in "
1285
  "to execute the following file: %s"
1286
  msgstr ""
1287
 
1288
+ #: includes/Settings.php:645
1289
  msgid "Speed up search!"
1290
  msgstr ""
1291
 
1298
  msgid "Start"
1299
  msgstr ""
1300
 
1301
+ #: includes/Settings.php:113
1302
  msgid "Starting"
1303
  msgstr ""
1304
 
1306
  msgid "Status"
1307
  msgstr ""
1308
 
1309
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:644
1310
  msgid "Stop process"
1311
  msgstr ""
1312
 
1314
  msgid "Storefront Theme"
1315
  msgstr ""
1316
 
1317
+ #: includes/Settings.php:215
1318
  msgid "Submit label"
1319
  msgstr ""
1320
 
1321
+ #: includes/Admin/Troubleshooting.php:1181
1322
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1323
  msgstr ""
1324
 
1325
+ #: includes/Settings.php:504
1326
  msgid "Suggestion background"
1327
  msgstr ""
1328
 
1329
+ #: includes/Settings.php:511
1330
  msgid "Suggestion selected"
1331
  msgstr ""
1332
 
1333
+ #: includes/Settings.php:498
1334
  msgid "Suggestions colors"
1335
  msgstr ""
1336
 
1337
+ #: includes/Settings.php:608 includes/Settings.php:614
1338
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1339
  msgid "Synonyms"
1340
  msgstr ""
1341
 
1342
+ #: includes/Settings.php:617
1343
  msgid ""
1344
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1345
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
1351
  msgid "Taxonomies"
1352
  msgstr ""
1353
 
1354
+ #: includes/Settings.php:518
1355
  msgid "Text color"
1356
  msgstr ""
1357
 
1358
+ #: includes/Admin/Troubleshooting.php:1105
1359
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1360
  msgstr ""
1361
 
1362
+ #: includes/Settings.php:451
1363
  msgid ""
1364
  "The Details panel is an additional container for extended information. The "
1365
  "details are changed dynamically when a user mouse over one of the "
1373
  "mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
1374
  msgstr ""
1375
 
1376
+ #: partials/admin/indexer-header.php:38
1377
+ msgid "The following error caused the index to be canceled:"
1378
+ msgstr ""
1379
+
1380
+ #: includes/Admin/Troubleshooting.php:334
1381
+ msgid ""
1382
+ "The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
1383
+ "build the index in background. Sometimes the server can block this kind of "
1384
+ "request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
1385
+ msgstr ""
1386
+
1387
+ #: includes/Admin/Troubleshooting.php:756
1388
  #, php-format
1389
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1390
  msgstr ""
1400
  msgid "the next index rebuild: %s"
1401
  msgstr ""
1402
 
1403
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:616
1404
  msgid "The search index could not be built."
1405
  msgstr ""
1406
 
1407
  #: partials/admin/indexer-header-demo.php:11
1408
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:622
1409
  msgid "The search index does not exist yet. Build it now."
1410
  msgstr ""
1411
 
1412
+ #: includes/Admin/Troubleshooting.php:680
1413
  msgid "The search index structure isn't completely"
1414
  msgstr ""
1415
 
1416
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:611
1417
  msgid "The search index was built successfully."
1418
  msgstr ""
1419
 
1420
+ #: includes/Admin/Troubleshooting.php:948
1421
  msgid ""
1422
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1423
  "blocked for some reason. Let visit it directly in your browser:"
1424
  msgstr ""
1425
 
1426
+ #: includes/Settings.php:247
1427
  msgid "The search will open in overlay on mobile"
1428
  msgstr ""
1429
 
1430
+ #: includes/Admin/Troubleshooting.php:945
1431
  msgid ""
1432
  "The server returns an incorrect response for the search engine's AJAX calls"
1433
  msgstr ""
1434
 
1435
+ #: includes/Settings.php:615
1436
  msgid ""
1437
  "The synonyms feature allows your users to find more relevant results. If "
1438
  "your products have alternative names and users often misspell them, consider "
1447
  msgid "There are four easy ways to display the search bar in your theme"
1448
  msgstr ""
1449
 
1450
+ #: includes/Admin/Troubleshooting.php:952
1451
  msgid ""
1452
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1453
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1454
  "some security plugins or you have custom code that may block it."
1455
  msgstr ""
1456
 
1457
+ #: includes/Admin/Troubleshooting.php:333
1458
  msgid ""
1459
  "This issue may affect the building of the search index. Indexer may stuck at "
1460
  "0%."
1461
  msgstr ""
1462
 
1463
+ #: includes/Admin/Troubleshooting.php:329
1464
  msgid ""
1465
  "This issue may affect the search results page and e.g. display all products "
1466
  "every time"
1467
  msgstr ""
1468
 
1469
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:594
1470
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:600
1471
  msgid "This process will continue in the background. You can leave this page!"
1472
  msgstr ""
1473
 
1480
  msgid "Title"
1481
  msgstr ""
1482
 
1483
+ #: includes/Settings.php:215
1484
  msgid "To display the magnifier icon leave this field empty."
1485
  msgstr ""
1486
 
1490
  "the Shopkeeper settings."
1491
  msgstr ""
1492
 
1493
+ #: includes/Settings.php:201
1494
  msgid "To set 100% width leave blank"
1495
  msgstr ""
1496
 
1497
+ #: includes/Admin/Troubleshooting.php:1234
1498
  msgid "TranslatePress"
1499
  msgstr ""
1500
 
1501
+ #: includes/Admin/Troubleshooting.php:47 includes/Admin/Troubleshooting.php:66
1502
+ #: partials/admin/indexer-header.php:35
1503
  msgid "Troubleshooting"
1504
  msgstr ""
1505
 
1506
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:650
1507
  msgid "Try to build the index again."
1508
  msgstr ""
1509
 
1527
  msgid "Upgrade Now!"
1528
  msgstr ""
1529
 
1530
+ #: includes/Settings.php:324
1531
  msgid "Upload preloader image"
1532
  msgstr ""
1533
 
1541
  msgid "Using PHP - %s"
1542
  msgstr ""
1543
 
1544
+ #: includes/Admin/Troubleshooting.php:1277
1545
  msgid "Valid search results test"
1546
  msgstr ""
1547
 
1548
+ #: includes/Helpers.php:963
1549
  msgid "Vendor"
1550
  msgstr ""
1551
 
1552
+ #: includes/Helpers.php:970
1553
  msgid "Vendors"
1554
  msgstr ""
1555
 
1556
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:599
1557
  msgid "Wait... Indexing in progress"
1558
  msgstr ""
1559
 
1560
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:593
1561
+ msgid "Wait... Preparing indexing in progress"
1562
+ msgstr ""
1563
+
1564
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:605
1565
  msgid "Wait... The index build process is canceling"
1566
  msgstr ""
1567
 
1569
  msgid "Warning!"
1570
  msgstr ""
1571
 
1572
+ #: includes/Admin/Troubleshooting.php:1107
1573
  #, php-format
1574
  msgid ""
1575
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
1576
  "file(s) on your server."
1577
  msgstr ""
1578
 
1579
+ #: includes/Integrations/Marketplace/Marketplace.php:176
1580
  msgid "We support this plugin."
1581
  msgstr ""
1582
 
1585
  "We support this theme and you can easily replace all default search bars."
1586
  msgstr ""
1587
 
1588
+ #: includes/Settings.php:672
1589
  msgid "weekly"
1590
  msgstr ""
1591
 
1592
+ #: includes/Admin/Troubleshooting.php:947
1593
  msgid "What's wrong?"
1594
  msgstr ""
1595
 
1597
  msgid "Widgets Screen"
1598
  msgstr ""
1599
 
1600
+ #: includes/Settings.php:144
1601
  msgid "with simple tricks"
1602
  msgstr ""
1603
 
1604
+ #: includes/Admin/Troubleshooting.php:1267
1605
  msgid "WooCommerce Multilingual"
1606
  msgstr ""
1607
 
1608
+ #: includes/Admin/Troubleshooting.php:796
1609
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1610
  msgstr ""
1611
 
1612
+ #: includes/Admin/Troubleshooting.php:1242
1613
  msgid "WordPress loading problem"
1614
  msgstr ""
1615
 
1616
+ #: includes/Admin/Troubleshooting.php:398
1617
+ #: includes/Admin/Troubleshooting.php:1203
1618
  msgid "WordPress version"
1619
  msgstr ""
1620
 
1621
+ #: includes/Admin/Troubleshooting.php:211
1622
  msgid "You are using one or more incompatible plugins"
1623
  msgstr ""
1624
 
1625
+ #: includes/Admin/Troubleshooting.php:252
1626
  msgid "You are using TranslatePress with Free version of our plugin"
1627
  msgstr ""
1628
 
1629
+ #: includes/Admin/Troubleshooting.php:635
1630
  msgid ""
1631
  "You can run these actions manually via Advanced Cron Manager. Then the "
1632
  "Indexer should run. If the index stuck again, run these actions manually one "
1633
  "more time until the finished index."
1634
  msgstr ""
1635
 
1636
+ #: includes/Admin/Troubleshooting.php:1183
1637
  msgid ""
1638
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
1639
  "target=\"_blank\">Sucuri panel</a>."
1640
  msgstr ""
1641
 
1642
+ #: includes/Admin/Troubleshooting.php:950
1643
  msgid ""
1644
  "You should see <code>pong</code> word as a response. Probably you see "
1645
  "something else."
1646
  msgstr ""
1647
 
1648
+ #: includes/Integrations/Marketplace/Marketplace.php:175
1649
  #, php-format
1650
  msgid "You use %s plugin version %s"
1651
  msgstr ""
1652
 
1653
+ #: includes/Admin/Troubleshooting.php:231
1654
+ #: includes/Admin/Troubleshooting.php:233
1655
  #, php-format
1656
  msgid ""
1657
  "You use the %s plugin, which may cause errors in the search results returned "
1658
  "by our plugin."
1659
  msgstr ""
1660
 
1661
+ #: includes/Admin/Troubleshooting.php:222
1662
+ #: includes/Admin/Troubleshooting.php:226
1663
  #, php-format
1664
  msgid "You use the %s plugin. The %s does not support this plugin."
1665
  msgstr ""
1669
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
1670
  msgstr ""
1671
 
1672
+ #: includes/Admin/Troubleshooting.php:797
1673
  #, php-format
1674
  msgid ""
1675
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
1677
  "target=\"_blank\">WooCommerce Multilingual status</a>."
1678
  msgstr ""
1679
 
1680
+ #: includes/Admin/Troubleshooting.php:792
1681
  #, php-format
1682
  msgid ""
1683
  "You use the WPML Multilingual CMS plugin and to correctly search for "
1685
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
1686
  msgstr ""
1687
 
1688
+ #: includes/Admin/Troubleshooting.php:341
1689
+ msgid "Your server can't send an HTTP request to itself"
1690
+ msgstr ""
1691
+
1692
+ #: includes/Admin/Troubleshooting.php:447
1693
  msgid "Your settings should looks like the picture below:"
1694
  msgstr ""
1695
 
1696
+ #: includes/Admin/Troubleshooting.php:276
1697
  msgid "Your site can perform loopback requests"
1698
  msgstr ""
1699
 
1700
+ #: includes/Admin/Troubleshooting.php:325
1701
  msgid "Your site could not complete a loopback request"
1702
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce search, ajax search, search by sku, product search, woocommerc
4
  Requires at least: 5.0
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
- Stable tag: 1.9.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -143,6 +143,18 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  = 1.9.0, March 15, 2021 =
147
  * ADD: Support for WooCommerce Private Store plugin
148
  * CHANGE: Plugin rebranding - Replace the plugin name AJAX Search for WooCommerce with new name FiboSearch
@@ -278,6 +290,8 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
278
  = 1.6.2, February 18, 2020 =
279
  * ADD: Details Panel - new layout for product overview and other UX improvements
280
  * ADD: Automatically regenerates images after first plugin activation
 
 
281
  * FIX: Highlighted no results suggestion
282
  * FIX: Better security
283
 
@@ -288,6 +302,7 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
288
  * ADD: Details panel - show "more products..." link for taxonomy type suggestion
289
  * ADD: Add &lt;form&gt; to quantity elements in a details panel
290
  * ADD: New filters and actions hook
 
291
  * FIX: Issue related to colors in plugin settings
292
  * FIX: Suggestions groups - improved limits
293
  * FIX: Pricing for taxonomy term in a details panel
@@ -298,6 +313,7 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
298
  * FIX: Storefront mobile search - more time for input autofocus
299
  * FIX: Disable quantity for Astra Pro theme - there were broken buttons
300
  * FIX: Minor CSS improvements
 
301
  * CHANGE: Decrease debounce time for better speed effect
302
  * CHANGE: Updated Freemius SDK v2.3.2
303
 
4
  Requires at least: 5.0
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
+ Stable tag: 1.10.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
143
 
144
  == Changelog ==
145
 
146
+ = 1.10.0, April 22, 2021 =
147
+ * ADD: Possibility to disable select event on suggestions (click and hit the Enter key)
148
+ * ADD: Possibility to disable submit a search form via a filter
149
+ * FIX: Not working click event on suggestions after using “back arrow” on a Safari browser
150
+ * FIX: Allow to recognize Chinese lang codes such as zh-hant and zh-hans
151
+ * FIX: Error on PHP 8. Wrong format for printf function
152
+ * FIX: When searching for something and then clicking “back arrow”, the “✕” for closing remained
153
+ * FIX: Wrong path in restoration theme
154
+ * FIX: Better checking of nonces
155
+
156
+
157
+
158
  = 1.9.0, March 15, 2021 =
159
  * ADD: Support for WooCommerce Private Store plugin
160
  * CHANGE: Plugin rebranding - Replace the plugin name AJAX Search for WooCommerce with new name FiboSearch
290
  = 1.6.2, February 18, 2020 =
291
  * ADD: Details Panel - new layout for product overview and other UX improvements
292
  * ADD: Automatically regenerates images after first plugin activation
293
+
294
+
295
  * FIX: Highlighted no results suggestion
296
  * FIX: Better security
297
 
302
  * ADD: Details panel - show "more products..." link for taxonomy type suggestion
303
  * ADD: Add &lt;form&gt; to quantity elements in a details panel
304
  * ADD: New filters and actions hook
305
+
306
  * FIX: Issue related to colors in plugin settings
307
  * FIX: Suggestions groups - improved limits
308
  * FIX: Pricing for taxonomy term in a details panel
313
  * FIX: Storefront mobile search - more time for input autofocus
314
  * FIX: Disable quantity for Astra Pro theme - there were broken buttons
315
  * FIX: Minor CSS improvements
316
+
317
  * CHANGE: Decrease debounce time for better speed effect
318
  * CHANGE: Updated Freemius SDK v2.3.2
319