Ajax Search for WooCommerce - Version 1.16.0

Version Description

Download this release

Release Info

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

Code changes from version 1.15.0 to 1.16.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.15.0
8
  * Author: FiboSearch Team
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: 6.0
14
  *
15
  */
16
  // Exit if accessed directly
@@ -127,7 +127,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
127
  /**
128
  * Check requirements
129
  *
130
- * @return void
131
  */
132
  private function checkRequirements()
133
  {
@@ -166,7 +166,6 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
166
  </p>
167
  </div>
168
  <?php
169
- return;
170
  }
171
 
172
  /**
@@ -284,27 +283,31 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
284
  wp_localize_script( 'dgwt-wcas-admin-js', 'dgwt_wcas', $localize );
285
  // Enqueue CSS
286
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
287
- wp_enqueue_style( 'wp-color-picker' );
288
- wp_enqueue_script( 'dgwt-wcas-admin-js' );
289
- wp_enqueue_script( 'wp-color-picker' );
290
- wp_enqueue_script(
291
- 'dgwt-wcas-admin-popper-js',
292
- DGWT_WCAS_URL . 'assets/js/popper.min.js',
293
- array( 'jquery' ),
294
- DGWT_WCAS_VERSION
295
- );
296
- wp_enqueue_script(
297
- 'dgwt-wcas-admin-tooltip-js',
298
- DGWT_WCAS_URL . 'assets/js/tooltip.min.js',
299
- array( 'jquery' ),
300
- DGWT_WCAS_VERSION
301
- );
302
- wp_enqueue_style(
303
- 'dgwt-wcas-style',
304
- apply_filters( 'dgwt/wcas/scripts/css_style_url', DGWT_WCAS_URL . 'assets/css/style' . $min . '.css' ),
305
- array(),
306
- DGWT_WCAS_VERSION
307
- );
 
 
 
 
308
  }
309
 
310
  if ( \DgoraWcas\Helpers::isCheckoutPage() ) {
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.16.0
8
  * Author: FiboSearch Team
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: 6.1
14
  *
15
  */
16
  // Exit if accessed directly
127
  /**
128
  * Check requirements
129
  *
130
+ * @return bool
131
  */
132
  private function checkRequirements()
133
  {
166
  </p>
167
  </div>
168
  <?php
 
169
  }
170
 
171
  /**
283
  wp_localize_script( 'dgwt-wcas-admin-js', 'dgwt_wcas', $localize );
284
  // Enqueue CSS
285
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
286
+
287
+ if ( !dgoraAsfwFs()->is_activation_mode() ) {
288
+ wp_enqueue_style( 'wp-color-picker' );
289
+ wp_enqueue_script( 'dgwt-wcas-admin-js' );
290
+ wp_enqueue_script( 'wp-color-picker' );
291
+ wp_enqueue_script(
292
+ 'dgwt-wcas-admin-popper-js',
293
+ DGWT_WCAS_URL . 'assets/js/popper.min.js',
294
+ array( 'jquery' ),
295
+ DGWT_WCAS_VERSION
296
+ );
297
+ wp_enqueue_script(
298
+ 'dgwt-wcas-admin-tooltip-js',
299
+ DGWT_WCAS_URL . 'assets/js/tooltip.min.js',
300
+ array( 'jquery' ),
301
+ DGWT_WCAS_VERSION
302
+ );
303
+ wp_enqueue_style(
304
+ 'dgwt-wcas-style',
305
+ apply_filters( 'dgwt/wcas/scripts/css_style_url', DGWT_WCAS_URL . 'assets/css/style' . $min . '.css' ),
306
+ array(),
307
+ DGWT_WCAS_VERSION
308
+ );
309
+ }
310
+
311
  }
312
 
313
  if ( \DgoraWcas\Helpers::isCheckoutPage() ) {
assets/js/admin.js CHANGED
@@ -1471,7 +1471,7 @@
1471
 
1472
  const count = dgwt_wcas['troubleshooting']['tests']['issues']['critical'] + dgwt_wcas['troubleshooting']['tests']['issues']['recommended'];
1473
  if (count > 0) {
1474
- $(_this.counterClass).text(count);
1475
  $(_this.settingsTab).addClass('enabled');
1476
  }
1477
 
@@ -1576,7 +1576,7 @@
1576
  count = dgwt_wcas.troubleshooting.tests.issues['critical'] + dgwt_wcas.troubleshooting.tests.issues['recommended'];
1577
 
1578
  if (count > 0) {
1579
- $(_this.counterClass).text(count);
1580
  $(_this.settingsTab).addClass('enabled');
1581
  }
1582
 
1471
 
1472
  const count = dgwt_wcas['troubleshooting']['tests']['issues']['critical'] + dgwt_wcas['troubleshooting']['tests']['issues']['recommended'];
1473
  if (count > 0) {
1474
+ $(_this.counterClass).text(count).addClass('active');
1475
  $(_this.settingsTab).addClass('enabled');
1476
  }
1477
 
1576
  count = dgwt_wcas.troubleshooting.tests.issues['critical'] + dgwt_wcas.troubleshooting.tests.issues['recommended'];
1577
 
1578
  if (count > 0) {
1579
+ $(_this.counterClass).text(count).addClass('active');
1580
  $(_this.settingsTab).addClass('enabled');
1581
  }
1582
 
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var s={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=t('[name="'+s+'"]').closest("."+this.groupSel),a=t('[name="'+s+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),t("."+i).length>0&&t("."+i).fadeIn()},hideAll:function(t){t.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var s=this;t("."+s.inputSel).on("change",function(){s.reloadChoices(t(this).attr("name"))})},init:function(){var s=this,e=t("."+s.inputSel+":checked");e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=s.is(":checked"),a=this.getGroupSelector(s);t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&t("."+a).each(function(){t(this).hasClass("js-dgwt-wcas-adv-settings")&&t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||t(this).fadeIn()})},getGroupSelector(s){var e=s.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return t.each(i,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=s)}),a},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.reloadChoices(t(this))})},refresh:function(){var s=this,e=t("."+s.inputSel);e.length>0&&e.each(function(){var e=t(this).is(":checked"),a=s.getGroupSelector(t(this));e?t("."+a).fadeIn():t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(t){t.is(":checked")?t.closest("label").next().fadeIn():t.closest("label").next().hide()},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.toogleSibling(t(this))})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.toogleSibling(t(this))}))}},i={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 s=this.$select.find("option:selected").val(),e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),t("input[id*='bg_search_icon_color']").closest("tr").show(),s){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),t("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(t){t.closest("tr").hide()},showOption:function(t){t.closest("tr").show()},registerListeners:function(){var t=this;t.$select.on("change",function(){t.setConditions()}),t.$overlayMobileEl.on("change",function(){t.setConditions()})},init:function(){var s=this,e=t(s.layoutSelect);e.length>0&&(s.$select=e,s.$overlayMobileEl=t(s.overlayMobile),s.$mobileBreakpointEl=t(s.mobileBreakpoint),s.$searchIconColorEl=t(s.searchIconColor),s.registerListeners(),setTimeout(function(){s.setConditions()},400))}},o={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",getWrapper:function(){return t("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var s=this;t(document).on("click","."+s.actionTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),t("."+s.indexerTabErrorClass).removeClass("active"),t("."+s.indexerTabProgressClass).addClass("active");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(t(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),t(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled"),t(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),t(document).on("click","."+s.actionStopTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var s=this;setTimeout(function(){t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(e){void 0!==e&&e.success&&(s.getWrapper().html(e.data.html),e.data.loop?s.heartbeat():(t("."+s.indexerTabProgressClass).removeClass("active"),"error"===e.data.status&&t("."+s.indexerTabErrorClass).addClass("active")),!e.data.loop&&e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(t){return 0===t.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==t("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var s;t(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=t(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),t(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),s=!1):(a.addClass("show"),a.removeClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),t(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),s=!0),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:s}})})},init:function(){this.registerListeners(),t("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var s=this;t(".dgwt-wcas-selectize").length>0&&t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:t(".dgwt-wcas-selectize").data("security")},success:function(t){void 0!==t&&void 0!==t.data&&s.initSelectize(t.data)}})},initSelectize:function(s){var e=t(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=t(this),a=e.data("options"),i=s;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(t,s){if((s+1)%2==0){var e={value:t,label:o};i.push(e),o=""}o=t})}t(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(t){return{value:t.key,label:t.label}},load:function(s,a){if(!s.length)return a();t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(t){a(t.data)}})}})})}},r={init:function(){var s=t(".js-dgwt-wcas-tooltip");s.length>0&&s.each(function(){var s=t(this)[0],e=t(this).data("tooltip-html-el"),a=t(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(s,{title:t("."+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 s=this;t(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",s.saveChoice(e)})},setStartingState:function(){var s=t("."+this.advClass);s.length>0&&(t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(s.show(),e.refresh()):s.hide())},saveChoice:function(s){t(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:s}}).done(function(s){t(".dgwt-wcas-adv-settings-saving").remove()});var e=t(".js-dgwt-wcas-adv-settings-toggle");"show"===s&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===s&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(s)},toggleAdvancedOpt:function(s){var a=this,o=t("."+a.advClass);o.length>0&&(o.addClass(a.highlightClass),o.addClass(a.transClass),"show"===s&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(a.highlightClass),setTimeout(function(){o.removeClass(a.transClass),e.refresh(),i.setConditions()},500)},500)}),"hide"===s&&setTimeout(function(){o.removeClass(a.transClass),o.fadeOut(500,function(){o.removeClass(a.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=t(".js-dgwt-wcas-preview"),this.searchWrapp=t(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=t(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=t(".js-dgwt-wcas-details-wrapp"),this.searchInput=t(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(t){return!!(t.length>0&&t.is(":checked"))},isColor:function(t){return"string"==typeof t&&7===t.length&&"#"===t.charAt(0)},camelCase:function(t){for(var s=t.split("_"),e="",a=0;a<s.length;a++)e+=s[a].charAt(0).toUpperCase()+s[a].slice(1);return e},disableSubmit:function(){var s,e;t(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==s&&(clearTimeout(s),e&&e.remove()),t("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=t(".dgwt-wcas-click-alert")).css({left:i,top:o}),t(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),s=setTimeout(function(){e.fadeOut(500,function(){t(this).remove(),t(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var s=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";t(document).on("focus",a,function(){t(e).addClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),s.detailsWrapp.addClass("dgwt-wcas-hide"),s.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),t(document).on("blur",a,function(){t(e).removeClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),s.detailsWrapp.removeClass("dgwt-wcas-hide"),s.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var s=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_categories_images","show_matching_tags","show_matching_brands","show_brands_images","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id='dgwt_wcas_settings\\["+e[a]+"\\]']",o="input[id^='dgwt_wcas_settings'][data-option-trigger='"+e[a]+"']",n=t(i),r=t(o);methodToCall="onChange"+s.camelCase(e[a]),"function"==typeof s[methodToCall]&&n.length>0?(s[methodToCall](n,n.val()),t(document).on("change",i,function(){methodToCall=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):"function"==typeof s[methodToCall]&&r.length>0?(s[methodToCall](r,r.val()),t(document).on("change",o,function(){methodToCall=t(this).data("option-trigger"),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):s[methodToCall]("","")}},onColorHandler:function(){for(var s=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=t(i),n="onColor"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("change",i,function(e){n=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+s.camelCase(n),s[n](t(this),this.value)})}},onColorChangeHandler:function(t,s){var e=t.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](t,s)},onTypeHandler:function(){for(var s=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=t(i),n="onType"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("input",i,function(e){n=t(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+s.camelCase(n),s[n](t(e.target),this.value)})}},onChangeMaxFormWidth:function(s,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(t("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(s,e){var a=t(".js-dgwt-wcas-search-submit");if(this.isChecked(s)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=t("input[id*='bg_submit_color']"),o=t("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(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(s,e){var a=t(".js-dgwt-wcas-si"),i=t(".js-dgwt-wcas-content-wrapp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){t(this).closest(".dgwt-wcas-suggestion-product").append(t(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(s,e){var a=t(".js-dgwt-wcas-sku");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(s,e){var a=t(".js-dgwt-wcas-sd");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(s,e){var a=t(".js-dgwt-wcas-sp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-cat"),i=t(".dgwt-wcas-suggestion-cat");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowCategoriesImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-cat");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-tag"),i=t(".dgwt-wcas-suggestion-tag");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-brand"),i=t(".dgwt-wcas-suggestion-brand");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowBrandsImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-brand");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-post"),i=t(".dgwt-wcas-suggestion-post");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-page"),i=t(".dgwt-wcas-suggestion-page");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(s,e){var a=t(".dgwt-wcas-st--direct-headline"),i=t(".dgwt-wcas-suggestion-headline");this.isChecked(s)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),t(".dgwt-wcas-suggestion-headline").show(),this.isChecked(t("input[data-option-trigger='show_matching_categories']"))||t(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(t("input[data-option-trigger='show_matching_tags']"))||t(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(t("input[data-option-trigger='show_matching_brands']"))||t(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(t("input[id*='show_matching_posts']"))||t(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(t("input[id*='show_matching_pages']"))||t(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(s,e){setTimeout(function(){var a=0,i=7,o=t(".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=t(".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&&s.val(d)},10)},onChangeShowDetailsBox:function(s,e){var a=this;a.isChecked(s)?(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(t(".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 s=getComputedStyle(a.searchWrapp[0]).width;(s=Math.round(parseFloat(s.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(s/2)),a.detailsWrapp.css("width",Math.round(s/2))):(a.suggestionWrapp.css("width",Math.floor(s/2)),a.detailsWrapp.css("width",Math.ceil(s/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"),t(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(t,s){},onColorBgInputColor:function(t,s){this.isColor(s)?this.searchInput.css("background-color",s):this.searchInput.css("background-color","")},onColorTextInputColor:function(s,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>",t("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=t("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(t,s){this.isColor(s)?this.searchInput.css("border-color",s):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(s,e){if(this.isChecked(t("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>",t("head").append(a)}else{var i=t(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(s,e){this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)?(t(".js-dgwt-wcas-search-submit").css("color",e),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),t(".js-dgwt-wcas-search-submit").css("color",""),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(s,e){this.isColor(e)?setTimeout(function(){t(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):t(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(s,e){var a=t(".js-dgwt-wcas-search-submit-l"),i=t(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(t,s){0==s.length&&(s=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",s)},onTypeSearchNoResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.no_results),t(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.show_more),t(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var s=this;t(document).on("click","#dgwt_wcas_autocomplete-tab",function(){s.onChangeShowDetailsBox(t("input[id*='show_details_box']"))})}};var d={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",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var s=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(t(s.counterClass).text(e),t(s.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.results_async,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&t.each(dgwt_wcas.troubleshooting.tests.direct,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&s.maybeRunNextAsyncTest(),t(document).on("click",'input[name="'+s.resetButtonName+'"]',function(e){t('input[name="'+s.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.fixOutofstockButtonName+'"]',function(e){t('input[name="'+s.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_fix_outofstock",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.switchAlternativeEndpoint+'"]',function(e){var a=1===parseInt(t(this).data("switch"))?"enable":"disable";t('input[name="'+s.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var i={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:a};return t.post(ajaxurl,i,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.dismissElementorTemplateButtonName+'"]',function(e){t('input[name="'+s.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return t.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(s,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=t(this.issuesListClass+"-"+s.status);"good"!==s.status&&(t(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[s.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(t(this.counterClass).text(a),t(this.settingsTab).addClass("enabled")),t(o).append(i(s)))},maybeRunNextAsyncTest:function(){var s=this;dgwt_wcas.troubleshooting.tests.async.length>0&&t.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,t(s.progressBar).show(),t.post(ajaxurl,e,function(t){t.success&&s.appendIssue(t.data,!0),s.maybeRunNextAsyncTest()}),!1)}),s.recalculateProgression()},recalculateProgression:function(){var s=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;t.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);t(s.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){t(s.progressBar).slideUp()},2e3)}},l={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var s=t(this.moveOptionClass);s.length>0&&t.each(s,function(s,e){var a=t("#"+t(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(t(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&t(e).addClass("dgwt-wcas-premium-only"),t(e).clone().appendTo(a.closest("td fieldset"))),t(e).closest("tr").remove()})}},g=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(t){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var t=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){t.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(s){var e=void 0===dgwt_wcas_filters_rules_selected_options[s]?[]:dgwt_wcas_filters_rules_selected_options[s];return function({nonce:s,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(t){return{value:t.key,label:t.label}},load:function(e,i){t.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:s},error:function(){i()},success:function(t){i(t.data)}})}}}({nonce:this.nonce,type:s,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const s=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);t.each(s,function(t,e){s[t].key=Math.random()}),this.rules=s}catch(t){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(t){this.rules[t].values=[],this.updateInput()},deleteRule(t){this.rules=this.rules.filter(function(s,e){return e!==t}),this.updateInput()},updateInput(){const t=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(t.map(function(t){return t.key,delete t.key,t}))}}})}};t(document).ready(function(){var h,u;(h=t(".js-dgwt-wcas-settings-margin-nob")).length>0&&h.each(function(){var s=t(this).find("td .dgwt-wcas-fieldset");if(s.length>0){var e=t(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=t(this).attr("class").split(/\s+/),i="";t.each(a,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=s)});var o=s.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),t(this).remove()}}}),s.init(),e.init(),i.init(),(u=t(".js-dgwt-wcas-sgs-autocolspan")).length>0&&u.find("td").attr("colspan",2),o.init(),n.init(),r.init(),c.init(),d.init(),l.init(),a.init(),g(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
1
+ !function(t){var s={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=t('[name="'+s+'"]').closest("."+this.groupSel),a=t('[name="'+s+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),t("."+i).length>0&&t("."+i).fadeIn()},hideAll:function(t){t.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var s=this;t("."+s.inputSel).on("change",function(){s.reloadChoices(t(this).attr("name"))})},init:function(){var s=this,e=t("."+s.inputSel+":checked");e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=s.is(":checked"),a=this.getGroupSelector(s);t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&t("."+a).each(function(){t(this).hasClass("js-dgwt-wcas-adv-settings")&&t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||t(this).fadeIn()})},getGroupSelector(s){var e=s.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return t.each(i,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=s)}),a},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.reloadChoices(t(this))})},refresh:function(){var s=this,e=t("."+s.inputSel);e.length>0&&e.each(function(){var e=t(this).is(":checked"),a=s.getGroupSelector(t(this));e?t("."+a).fadeIn():t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(t){t.is(":checked")?t.closest("label").next().fadeIn():t.closest("label").next().hide()},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.toogleSibling(t(this))})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.toogleSibling(t(this))}))}},i={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 s=this.$select.find("option:selected").val(),e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),t("input[id*='bg_search_icon_color']").closest("tr").show(),s){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),t("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(t){t.closest("tr").hide()},showOption:function(t){t.closest("tr").show()},registerListeners:function(){var t=this;t.$select.on("change",function(){t.setConditions()}),t.$overlayMobileEl.on("change",function(){t.setConditions()})},init:function(){var s=this,e=t(s.layoutSelect);e.length>0&&(s.$select=e,s.$overlayMobileEl=t(s.overlayMobile),s.$mobileBreakpointEl=t(s.mobileBreakpoint),s.$searchIconColorEl=t(s.searchIconColor),s.registerListeners(),setTimeout(function(){s.setConditions()},400))}},o={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",getWrapper:function(){return t("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var s=this;t(document).on("click","."+s.actionTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),t("."+s.indexerTabErrorClass).removeClass("active"),t("."+s.indexerTabProgressClass).addClass("active");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(t(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),t(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled"),t(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),t(document).on("click","."+s.actionStopTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var s=this;setTimeout(function(){t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(e){void 0!==e&&e.success&&(s.getWrapper().html(e.data.html),e.data.loop?s.heartbeat():(t("."+s.indexerTabProgressClass).removeClass("active"),"error"===e.data.status&&t("."+s.indexerTabErrorClass).addClass("active")),!e.data.loop&&e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(t){return 0===t.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==t("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var s;t(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=t(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),t(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),s=!1):(a.addClass("show"),a.removeClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),t(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),s=!0),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:s}})})},init:function(){this.registerListeners(),t("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var s=this;t(".dgwt-wcas-selectize").length>0&&t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:t(".dgwt-wcas-selectize").data("security")},success:function(t){void 0!==t&&void 0!==t.data&&s.initSelectize(t.data)}})},initSelectize:function(s){var e=t(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=t(this),a=e.data("options"),i=s;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(t,s){if((s+1)%2==0){var e={value:t,label:o};i.push(e),o=""}o=t})}t(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(t){return{value:t.key,label:t.label}},load:function(s,a){if(!s.length)return a();t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(t){a(t.data)}})}})})}},r={init:function(){var s=t(".js-dgwt-wcas-tooltip");s.length>0&&s.each(function(){var s=t(this)[0],e=t(this).data("tooltip-html-el"),a=t(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(s,{title:t("."+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 s=this;t(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",s.saveChoice(e)})},setStartingState:function(){var s=t("."+this.advClass);s.length>0&&(t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(s.show(),e.refresh()):s.hide())},saveChoice:function(s){t(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:s}}).done(function(s){t(".dgwt-wcas-adv-settings-saving").remove()});var e=t(".js-dgwt-wcas-adv-settings-toggle");"show"===s&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===s&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(s)},toggleAdvancedOpt:function(s){var a=this,o=t("."+a.advClass);o.length>0&&(o.addClass(a.highlightClass),o.addClass(a.transClass),"show"===s&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(a.highlightClass),setTimeout(function(){o.removeClass(a.transClass),e.refresh(),i.setConditions()},500)},500)}),"hide"===s&&setTimeout(function(){o.removeClass(a.transClass),o.fadeOut(500,function(){o.removeClass(a.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=t(".js-dgwt-wcas-preview"),this.searchWrapp=t(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=t(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=t(".js-dgwt-wcas-details-wrapp"),this.searchInput=t(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(t){return!!(t.length>0&&t.is(":checked"))},isColor:function(t){return"string"==typeof t&&7===t.length&&"#"===t.charAt(0)},camelCase:function(t){for(var s=t.split("_"),e="",a=0;a<s.length;a++)e+=s[a].charAt(0).toUpperCase()+s[a].slice(1);return e},disableSubmit:function(){var s,e;t(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==s&&(clearTimeout(s),e&&e.remove()),t("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=t(".dgwt-wcas-click-alert")).css({left:i,top:o}),t(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),s=setTimeout(function(){e.fadeOut(500,function(){t(this).remove(),t(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var s=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";t(document).on("focus",a,function(){t(e).addClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),s.detailsWrapp.addClass("dgwt-wcas-hide"),s.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),t(document).on("blur",a,function(){t(e).removeClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),s.detailsWrapp.removeClass("dgwt-wcas-hide"),s.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var s=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_categories_images","show_matching_tags","show_matching_brands","show_brands_images","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id='dgwt_wcas_settings\\["+e[a]+"\\]']",o="input[id^='dgwt_wcas_settings'][data-option-trigger='"+e[a]+"']",n=t(i),r=t(o);methodToCall="onChange"+s.camelCase(e[a]),"function"==typeof s[methodToCall]&&n.length>0?(s[methodToCall](n,n.val()),t(document).on("change",i,function(){methodToCall=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):"function"==typeof s[methodToCall]&&r.length>0?(s[methodToCall](r,r.val()),t(document).on("change",o,function(){methodToCall=t(this).data("option-trigger"),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):s[methodToCall]("","")}},onColorHandler:function(){for(var s=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=t(i),n="onColor"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("change",i,function(e){n=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+s.camelCase(n),s[n](t(this),this.value)})}},onColorChangeHandler:function(t,s){var e=t.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](t,s)},onTypeHandler:function(){for(var s=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=t(i),n="onType"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("input",i,function(e){n=t(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+s.camelCase(n),s[n](t(e.target),this.value)})}},onChangeMaxFormWidth:function(s,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(t("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(s,e){var a=t(".js-dgwt-wcas-search-submit");if(this.isChecked(s)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=t("input[id*='bg_submit_color']"),o=t("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(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(s,e){var a=t(".js-dgwt-wcas-si"),i=t(".js-dgwt-wcas-content-wrapp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){t(this).closest(".dgwt-wcas-suggestion-product").append(t(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(s,e){var a=t(".js-dgwt-wcas-sku");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(s,e){var a=t(".js-dgwt-wcas-sd");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(s,e){var a=t(".js-dgwt-wcas-sp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-cat"),i=t(".dgwt-wcas-suggestion-cat");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowCategoriesImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-cat");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-tag"),i=t(".dgwt-wcas-suggestion-tag");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-brand"),i=t(".dgwt-wcas-suggestion-brand");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowBrandsImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-brand");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-post"),i=t(".dgwt-wcas-suggestion-post");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-page"),i=t(".dgwt-wcas-suggestion-page");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(s,e){var a=t(".dgwt-wcas-st--direct-headline"),i=t(".dgwt-wcas-suggestion-headline");this.isChecked(s)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),t(".dgwt-wcas-suggestion-headline").show(),this.isChecked(t("input[data-option-trigger='show_matching_categories']"))||t(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(t("input[data-option-trigger='show_matching_tags']"))||t(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(t("input[data-option-trigger='show_matching_brands']"))||t(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(t("input[id*='show_matching_posts']"))||t(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(t("input[id*='show_matching_pages']"))||t(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(s,e){setTimeout(function(){var a=0,i=7,o=t(".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=t(".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&&s.val(d)},10)},onChangeShowDetailsBox:function(s,e){var a=this;a.isChecked(s)?(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(t(".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 s=getComputedStyle(a.searchWrapp[0]).width;(s=Math.round(parseFloat(s.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(s/2)),a.detailsWrapp.css("width",Math.round(s/2))):(a.suggestionWrapp.css("width",Math.floor(s/2)),a.detailsWrapp.css("width",Math.ceil(s/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"),t(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(t,s){},onColorBgInputColor:function(t,s){this.isColor(s)?this.searchInput.css("background-color",s):this.searchInput.css("background-color","")},onColorTextInputColor:function(s,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>",t("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=t("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(t,s){this.isColor(s)?this.searchInput.css("border-color",s):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(s,e){if(this.isChecked(t("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>",t("head").append(a)}else{var i=t(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(s,e){this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)?(t(".js-dgwt-wcas-search-submit").css("color",e),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),t(".js-dgwt-wcas-search-submit").css("color",""),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(s,e){this.isColor(e)?setTimeout(function(){t(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):t(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(s,e){var a=t(".js-dgwt-wcas-search-submit-l"),i=t(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(t,s){0==s.length&&(s=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",s)},onTypeSearchNoResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.no_results),t(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.show_more),t(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var s=this;t(document).on("click","#dgwt_wcas_autocomplete-tab",function(){s.onChangeShowDetailsBox(t("input[id*='show_details_box']"))})}};var d={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",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var s=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(t(s.counterClass).text(e).addClass("active"),t(s.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.results_async,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&t.each(dgwt_wcas.troubleshooting.tests.direct,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&s.maybeRunNextAsyncTest(),t(document).on("click",'input[name="'+s.resetButtonName+'"]',function(e){t('input[name="'+s.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.fixOutofstockButtonName+'"]',function(e){t('input[name="'+s.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_fix_outofstock",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.switchAlternativeEndpoint+'"]',function(e){var a=1===parseInt(t(this).data("switch"))?"enable":"disable";t('input[name="'+s.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var i={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:a};return t.post(ajaxurl,i,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.dismissElementorTemplateButtonName+'"]',function(e){t('input[name="'+s.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return t.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(s,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=t(this.issuesListClass+"-"+s.status);"good"!==s.status&&(t(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[s.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(t(this.counterClass).text(a).addClass("active"),t(this.settingsTab).addClass("enabled")),t(o).append(i(s)))},maybeRunNextAsyncTest:function(){var s=this;dgwt_wcas.troubleshooting.tests.async.length>0&&t.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,t(s.progressBar).show(),t.post(ajaxurl,e,function(t){t.success&&s.appendIssue(t.data,!0),s.maybeRunNextAsyncTest()}),!1)}),s.recalculateProgression()},recalculateProgression:function(){var s=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;t.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);t(s.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){t(s.progressBar).slideUp()},2e3)}},l={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var s=t(this.moveOptionClass);s.length>0&&t.each(s,function(s,e){var a=t("#"+t(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(t(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&t(e).addClass("dgwt-wcas-premium-only"),t(e).clone().appendTo(a.closest("td fieldset"))),t(e).closest("tr").remove()})}},g=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(t){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var t=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){t.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(s){var e=void 0===dgwt_wcas_filters_rules_selected_options[s]?[]:dgwt_wcas_filters_rules_selected_options[s];return function({nonce:s,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(t){return{value:t.key,label:t.label}},load:function(e,i){t.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:s},error:function(){i()},success:function(t){i(t.data)}})}}}({nonce:this.nonce,type:s,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const s=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);t.each(s,function(t,e){s[t].key=Math.random()}),this.rules=s}catch(t){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(t){this.rules[t].values=[],this.updateInput()},deleteRule(t){this.rules=this.rules.filter(function(s,e){return e!==t}),this.updateInput()},updateInput(){const t=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(t.map(function(t){return t.key,delete t.key,t}))}}})}};t(document).ready(function(){var h,u;(h=t(".js-dgwt-wcas-settings-margin-nob")).length>0&&h.each(function(){var s=t(this).find("td .dgwt-wcas-fieldset");if(s.length>0){var e=t(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=t(this).attr("class").split(/\s+/),i="";t.each(a,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=s)});var o=s.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),t(this).remove()}}}),s.init(),e.init(),i.init(),(u=t(".js-dgwt-wcas-sgs-autocolspan")).length>0&&u.find("td").attr("colspan",2),o.init(),n.init(),r.init(),c.init(),d.init(),l.init(),a.init(),g(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
assets/js/search.js CHANGED
@@ -6,7 +6,7 @@
6
  * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
7
  *
8
  * Modified by Damian Góra: http://damiangora.com
9
- * Minify: https://javascript-minifier.com/
10
  */
11
 
12
  /*jslint browser: true, white: true, single: true, this: true, multivar: true */
@@ -343,7 +343,13 @@
343
  }
344
  });
345
 
346
- that.initMobileMode();
 
 
 
 
 
 
347
 
348
  that.hideAfterClickOutsideListener();
349
 
@@ -428,7 +434,7 @@
428
  // Click close icon
429
  $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
430
  var that = utils.getActiveInstance();
431
- that.close();
432
  });
433
 
434
  // Extra tasks on submit
@@ -642,17 +648,6 @@
642
  || $target.closest('.' + that.options.containerClass).length > 0
643
  || $target.closest('.' + that.options.containerDetailsClass).length > 0
644
  )) {
645
- var activeInstance = utils.getActiveInstance();
646
-
647
- if (typeof activeInstance != 'undefined') {
648
- var $formWrapper = activeInstance.getFormWrapper();
649
- var $form = $formWrapper.find('.' + that.options.formClass);
650
-
651
- $form.hide();
652
- activeInstance.hide(true);
653
- $form.css({'left': '0'});
654
- }
655
-
656
  that.hideIconModeSearch();
657
  }
658
 
@@ -697,12 +692,12 @@
697
 
698
  },
699
  initMobileMode: function () {
700
- var that = this;
701
- var $formWrapper = that.getFormWrapper();
702
 
703
  if (
704
  $formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
705
- && that.isMobileMode()
706
  ) {
707
 
708
  $formWrapper.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>');
@@ -723,6 +718,60 @@
723
 
724
  }
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  },
727
  applyFlexibleMode: function () {
728
  var that = this;
@@ -743,8 +792,14 @@
743
  },
744
  onFocus: function () {
745
  var that = this;
 
746
  $('.' + this.options.searchFormClass).removeClass('dgwt-wcas-active');
747
  that.getFormWrapper().addClass('dgwt-wcas-active');
 
 
 
 
 
748
  that.fixPositionCapture();
749
  if (that.el.val().length >= that.options.minChars) {
750
  that.onValueChange();
@@ -757,6 +812,10 @@
757
  value = that.el.val(),
758
  query = that.getQuery(value);
759
 
 
 
 
 
760
  if(that.isMobileMode()){
761
  return;
762
  }
@@ -829,14 +888,18 @@
829
  this.currentValue = '';
830
  this.suggestions = [];
831
  },
832
- close: function (){
833
- var that = this;
834
 
835
- that.hide();
836
- that.clear(false);
837
- that.hideCloseButton();
838
- that.el.closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass).val('').focus();
839
- },
 
 
 
 
840
  disable: function () {
841
  var that = this;
842
  that.disabled = true;
@@ -2571,7 +2634,7 @@
2571
 
2572
  $formWrapper.removeClass('dgwt-wcas-active');
2573
 
2574
- that.close();
2575
 
2576
  // Remove mobile handler
2577
  if ($mobileHandler.length) {
@@ -2633,6 +2696,7 @@
2633
  var that = this;
2634
 
2635
  if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
 
2636
  return;
2637
  }
2638
 
6
  * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
7
  *
8
  * Modified by Damian Góra: http://damiangora.com
9
+ * Minify: https://www.toptal.com/developers/javascript-minifier/
10
  */
11
 
12
  /*jslint browser: true, white: true, single: true, this: true, multivar: true */
343
  }
344
  });
345
 
346
+ $(window).on('resize.autocomplete', function(){
347
+ that.toggleMobileMode();
348
+ });
349
+
350
+ if(that.isMobileMode()) {
351
+ that.initMobileMode();
352
+ }
353
 
354
  that.hideAfterClickOutsideListener();
355
 
434
  // Click close icon
435
  $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
436
  var that = utils.getActiveInstance();
437
+ that.close(true);
438
  });
439
 
440
  // Extra tasks on submit
648
  || $target.closest('.' + that.options.containerClass).length > 0
649
  || $target.closest('.' + that.options.containerDetailsClass).length > 0
650
  )) {
 
 
 
 
 
 
 
 
 
 
 
651
  that.hideIconModeSearch();
652
  }
653
 
692
 
693
  },
694
  initMobileMode: function () {
695
+ var that = this,
696
+ $formWrapper = that.getFormWrapper();
697
 
698
  if (
699
  $formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
700
+ && !$formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length
701
  ) {
702
 
703
  $formWrapper.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>');
718
 
719
  }
720
 
721
+ },
722
+ destroyMobileMode: function () {
723
+ var that = this,
724
+ $formWrapper = that.getFormWrapper(),
725
+ $suggestionsWrapper = that.getSuggestionsContainer();
726
+
727
+ var $el = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
728
+
729
+ if ($formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
730
+ && $el.length
731
+ ) {
732
+
733
+ that.disableOverlayMobile();
734
+ $el.remove();
735
+
736
+ }
737
+
738
+ },
739
+ toggleMobileMode: function () {
740
+ var that = this,
741
+ $formWrapper = that.getFormWrapper(),
742
+ currentMode = 'desktop';
743
+
744
+ // Determine the current mode
745
+ if ($formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length) {
746
+ currentMode = 'mobile';
747
+ }
748
+
749
+ // Toggled?
750
+ if ((currentMode === 'desktop' && that.isMobileMode())
751
+ || (currentMode === 'mobile' && !that.isMobileMode())
752
+ ) {
753
+
754
+ var $suggestionsWrapper = that.getSuggestionsContainer();
755
+
756
+ that.close(false);
757
+
758
+ if ($suggestionsWrapper.length) {
759
+ $suggestionsWrapper.html('');
760
+ }
761
+
762
+ that.hideIconModeSearch();
763
+
764
+ }
765
+
766
+ // Switch to mobile mode
767
+ if (currentMode === 'desktop' && that.isMobileMode()) {
768
+ that.initMobileMode();
769
+ }
770
+
771
+ // Switch to desktop mode
772
+ if (currentMode === 'mobile' && !that.isMobileMode()) {
773
+ that.destroyMobileMode();
774
+ }
775
  },
776
  applyFlexibleMode: function () {
777
  var that = this;
792
  },
793
  onFocus: function () {
794
  var that = this;
795
+ // Mark as active
796
  $('.' + this.options.searchFormClass).removeClass('dgwt-wcas-active');
797
  that.getFormWrapper().addClass('dgwt-wcas-active');
798
+
799
+ // Mark as focus
800
+ $('body').addClass('dgwt-wcas-focused');
801
+ that.getFormWrapper().addClass('dgwt-wcas-search-focused');
802
+
803
  that.fixPositionCapture();
804
  if (that.el.val().length >= that.options.minChars) {
805
  that.onValueChange();
812
  value = that.el.val(),
813
  query = that.getQuery(value);
814
 
815
+ // Remove focused classes
816
+ $('body').removeClass('dgwt-wcas-focused');
817
+ $('.' + this.options.searchFormClass).removeClass('dgwt-wcas-search-focused');
818
+
819
  if(that.isMobileMode()){
820
  return;
821
  }
888
  this.currentValue = '';
889
  this.suggestions = [];
890
  },
891
+ close: function (focus) {
892
+ var that = this;
893
 
894
+ that.hide();
895
+ that.clear(false);
896
+ that.hideCloseButton();
897
+ var $el = that.el.closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass);
898
+ $el.val('');
899
+ if (focus) {
900
+ $el.focus();
901
+ }
902
+ },
903
  disable: function () {
904
  var that = this;
905
  that.disabled = true;
2634
 
2635
  $formWrapper.removeClass('dgwt-wcas-active');
2636
 
2637
+ that.close(false);
2638
 
2639
  // Remove mobile handler
2640
  if ($mobileHandler.length) {
2696
  var that = this;
2697
 
2698
  if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
2699
+ that.overlayMobileState = 'off';
2700
  return;
2701
  }
2702
 
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,n="";if(o)for(n=o[o.length-1],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 r=o[i].replace(/[\^\@]/g,"");if(r.length>0){if(1===r.trim().length&&o[i]!==n)var l="((\\s|^)"+e.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+e.escapeRegExChars(r.trim())+")":"("+e.escapeRegExChars(r.trim())+")";t=t.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(t=(t=t.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(l,"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},hashCode:function(t){for(var e=0,s=t.length;s>0;)e=(e<<5)-e+t.charCodeAt(--s)|0;return e<0?-1*e: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.isMouseDownOnSearchElements=!1,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(/'/g,"&apos;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br|span))&gt;/g,"<$1>").replace(/&lt;(strong|span)\s+class\s*=\s*&quot;([^&]+)&quot;&gt;/g,'<$1 class="$2">')},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(t){return"string"==typeof t?JSON.parse(t):t},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(){e.getActiveInstance().close()}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(e){if(s.options.disableSubmit)return e.preventDefault(),!1;var i=t(this).find("."+s.options.searchInputClass);if(i.length&&0===i.val().length)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}),s.disableOverlayMobile()}),"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(s){if(i)s.preventDefault();else{var o=e.getActiveInstance();o.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),void 0!==s.ctrlKey&&!1!==s.ctrlKey||(o.select(t(this).data("index")),s.preventDefault())}}),t(document).on("mousedown.autocomplete",s,function(s){var o=this;0===s.button&&setTimeout(function(){i||e.getActiveInstance().select(t(o).data("index"))},250)}),t("."+this.options.containerClass).on("mousedown.autocomplete",function(t){e.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(t(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}),t("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(t){e.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var s=this,i=s.getFormWrapper(),o=i.find("."+s.options.formClass);i.on("click.autocomplete",".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).on("click.autocomplete",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.autocomplete",function(){s.applyFlexibleMode()})},registerEventsFixedMenu:function(){var e=this;t(window).on("scroll.autocomplete",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.autocomplete",function(e){t.options.mobileOverlayDelay>0?setTimeout(function(){t.enableOverlayMobile()},t.options.mobileOverlayDelay):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.options,s=this.el.val(),i=this.getQuery(s);this.isMobileMode()||this.isMouseDownOnSearchElements||(this.hide(),this.selection&&this.currentValue!==i&&(e.onInvalidateSelection||t.noop).call(this.element))},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=[]},close:function(){this.hide(),this.clear(!1),this.hideCloseButton(),this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass).val("").focus()},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(!1),i=e.outerHeight(!1);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(!1),a=this.el.outerHeight(!1),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(!1)}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!this.options.disableSubmit&&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.trim()},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.type||"more_products"!==e.type)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(e);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={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:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=t.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),t.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?JSON.parse(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var o=e.items[i].objectID;s.cachedDetails[o]={html:e.items[i].html},s.detailsPanelAddToScene(o),void 0!==e.items[i].price&&e.items[i].price.length>0&&(s.cachedPrices[o]=e.items[i].price)}s.preloader("hide","details","");var a=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[a]?s.detailsPanelSetScene(a):s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(t,e){s.preloader("hide","details",""),s.detailsPanelClearScene(),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},detailsPanelSetScene:function(t){var s=this.getDetailsContainer(),i=e.hashCode(t),o=s.find('.dgwt-wcas-details-inner[data-object="'+i+'"]');o.length&&(this.preloader("hide","details",""),this.detailsPanelClearScene(),o.addClass("dgwt-wcas-details-inner-active"))},detailsPanelAddToScene:function(t){var s=this.getDetailsContainer(),i=this.cachedDetails[t],o=e.hashCode(t),a="";void 0!==i&&"string"==typeof i.html&&(a=i.html.replace("<div ",'<div data-object="'+o+'" ')),0==s.find('.dgwt-wcas-details-inner[data-object="'+o+'"]').length&&s.append(a)},detailsPanelClearScene:function(){var t=this.getDetailsContainer().find(".dgwt-wcas-details-inner");t.length&&t.removeClass("dgwt-wcas-details-inner-active")},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=-20,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),s=Math.max(s,-1*n),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(l,c){var d="",g=!1,u="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var p,w=r,f="dgwt-wcas-st",m="",v="",b="",y=!0;"product_cat"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(b=c.breadcrumbs+" &gt; "+c.value,v+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"taxonomy"===c.type?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"vendor"===c.type?(w+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(w+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",f="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",y=!1):i.showHeadings&&"headline"===c.type?(w+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),y=!1):(w+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,y=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),t("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(p=!0),b=b.length>0?' title="'+b+'"':"",h+='<a href="'+u+'" class="'+w+'" data-index="'+l+'">',p&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+b+' class="'+f+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+m+a(c.value,n,y,i)+v+"</span>",c.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(c.shop_city,n,!0,i)+"</span>"),void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>")):h+=m+a(c.value,n,y,i)+v,h+="</span>",h+=p?"</div>":"",h+="</a>"}else{!0===i.showImage&&void 0!==c.thumb_html&&(g=!0);var C="product_variation"===c.type?" dgwt-wcas-suggestion-product-var":"";if(d+=void 0!==c.post_id?'data-post-id="'+c.post_id+'" ':"",d+=void 0!==c.taxonomy?'data-taxonomy="'+c.taxonomy+'" ':"",d+=void 0!==c.term_id?'data-term-id="'+c.term_id+'" ':"",h+='<a href="'+u+'" class="'+r+" dgwt-wcas-suggestion-product"+C+'" data-index="'+l+'" '+d+">",g&&(h+='<span class="dgwt-wcas-si">'+c.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(h+=c.title_before),h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",void 0!==c.title_after&&c.title_after&&(h+=c.title_after),!0===i.showSKU&&void 0!==c.sku&&c.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(c.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==c.vendor&&c.vendor){var _='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+c.vendor+"</span>";void 0!==c.vendor_url&&c.vendor_url?h+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+_+"</span>":h+=_}void 0!==c.content_after&&c.content_after&&(h+=c.content_after),h+="</div>";var x=!0===i.showPrice&&void 0!==c.price,S=void 0!==c.meta_before,P=void 0!==c.meta_after,D=x||S||P;h+=D?'<div class="dgwt-wcas-meta">':"",S&&(h+=c.meta_before),x&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),P&&(h+=c.meta_after),h+=D?"</div>":"",h+=g?"</div>":"",h+="</a>"}}),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.isMouseDownOnSearchElements=!1,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(t,e,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===e){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===e&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==e){var r=o.find("."+a);if("hide"!==t){if("show"===t){var l=this.options.isRtl?"-rtl":"";i='<div class="'+n+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+l+'.png" /></div>',this.detailsPanelClearScene(),r.length&&r.remove(),o.prepend(i)}}else r.length&&r.remove()}else"hide"===t?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.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.disableOverlayMobile(),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(!1);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.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),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(){var e=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),e.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){t(this).off(".autocomplete")});e.removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(),o.length&&o.remove(),i.length&&i.html("")},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+="</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.autocomplete",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this;if(t("html").hasClass("dgwt-wcas-overlay-mobile-on")){var 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(e,s){var i=!(!window.hasOwnProperty("GoogleAnalyticsObject")||!window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:e,event_category:s});else if(!1!==i){var o=i.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:e})}}catch(t){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(e)+"&post_type=product&dgwt_wcas=1"});else if(!1!==i){var a=i.getAll()[0];a&&(a.set("page","/?s="+encodeURI(e)+"&post_type=product&dgwt_wcas=1"),a.send("pageview"))}}catch(t){}t(document).trigger("dgwtWcasGAEvent",{term:e,category:s})}},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)})}navigator.userAgent.match(/Trident\/7\./)&&function(t,e){function s(t,e){var s=arguments.length>2?arguments[2]:[];if(!1===a(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(e,s)}function i(t,e,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(t,e,i)}function o(t,e){return t[e]}function a(t){return"function"==typeof t}function n(t){if(null===t||t===e)throw TypeError();return Object(t)}function r(t,s){var i=function(t,e){return n(t)[e]}(t,s);if(null===i||i===e)return e;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in t&&(e instanceof t.Symbol||e.constructor===t.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in t&&"match"in t.Symbol?o(s,t.Symbol.match):e;if(i!==e)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(t){}finally{s.lastIndex=a}return!1}function d(t,e){return l(t)===l(e)&&("number"===l(t)?!(!isNaN(t)||!isNaN(e))||1/t==1/0&&1/e==-1/0||1/t==-1/0&&1/e==1/0||t===e:function(t,e){return t===e}(t,e))}function g(t){if("symbol"===l(t))throw new TypeError("Cannot convert a Symbol value to a number");var e=Number(t);return isNaN(e)?0:1/e==1/0||1/e==-1/0||e===1/0||e===-1/0?e:(e<0?-1:1)*Math.floor(Math.abs(e))}function u(i){var n=arguments.length>1?arguments[1]:e;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof t.Symbol&&"symbol"==typeof t.Symbol.toPrimitive?r(i,t.Symbol.toPrimitive):e;if(d!==e){var g=s(d,i,[c]);if("object"!==l(g))return g;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===c&&(c="number"),function(t,e){if("string"===e)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(t,i[n]);if(a(r)){var c=s(r,t);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(t){switch(l(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(t,String));default:return String(t)}}i(Array.prototype,"includes",function(t){var e=n(this),s=function(t){var e=g(t);return e<=0?0:Math.min(e,Math.pow(2,53)-1)}(o(e,"length"));if(0===s)return!1;var i=g(arguments[1]);if(i>=0)var a=i;else(a=s+i)<0&&(a=0);for(;a<s;){if(d(t,o(e,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(t){var s=arguments.length>1?arguments[1]:e,i=h(function(t){if(null===t||t===e)throw TypeError(Object.prototype.toString.call(t)+" is not coercible to Object.");return t}(this));if(c(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(t),a=g(s),n=i.length,r=Math.min(Math.max(a,0),n);return-1!==String.prototype.indexOf.call(i,o,r)})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),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,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,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)})})})}()});
1
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t.setAttribute("unselectable","on"),t},highlight:function(e,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1,n="";if(o)for(n=o[o.length-1],o=o.sort(function(e,t){return t.length-e.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>=1){var r=o[i].replace(/[\^\@]/g,"");if(r.length>0){if(1===r.trim().length&&o[i]!==n)var l="((\\s|^)"+t.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+t.escapeRegExChars(r.trim())+")":"("+t.escapeRegExChars(r.trim())+")";e=e.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(e=(e=e.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+t.escapeRegExChars(s)+")",e=e.replace(new RegExp(l,"gi"),"<strong>$1</strong>");return e},debounce:function(e,t){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void e();s.id=o,i=setTimeout(function(){o===s.id?(e(),s.id=""):clearTimeout(i)},t)},mouseHoverDebounce:function(t,s,i){var o;o=setTimeout(function(){e(s+":hover").length>0?t():clearTimeout(o)},i)},getActiveInstance:function(){var t,s=e(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=e(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return t=s.data("autocomplete"),!1}),t},hashCode:function(e){for(var t=0,s=e.length;s>0;)t=(t<<5)-t+e.charCodeAt(--s)|0;return t<0?-1*t:t}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=e.noop;function d(t,s){this.element=t,this.el=e(t),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=e.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.isMouseDownOnSearchElements=!1,this.initialize(),this.setOptions(s)}d.utils=t,e.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(e,s,i,o){if(!s)return e;i&&(e=t.highlight(e,s));if(!o.convertHtml)return e;return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br|span))&gt;/g,"<$1>").replace(/&lt;(strong|span)\s+class\s*=\s*&quot;([^&]+)&quot;&gt;/g,'<$1 class="$2">')},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(e,t,s){return-1!==e.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?JSON.parse(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()},e(window).on("resize.autocomplete",function(){var e=t.getActiveInstance();void 0!==e&&e.fixPositionCapture()}),e(window).on("resize.autocomplete",function(){s.toggleMobileMode()}),s.isMobileMode()&&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(t){var s=this.options;0==e("."+s.containerClass).length?(this.suggestionsContainer=e(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=e("."+this.options.containerClass),this.canShowDetailsBox()&&(0==e("."+s.containerDetailsClass).length?(this.detailsContainer=e(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=e("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;e(document).on("click.autocomplete","."+s.options.closeTrigger,function(){t.getActiveInstance().close(!0)}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(t){if(s.options.disableSubmit)return t.preventDefault(),!1;var i=e(this).find("."+s.options.searchInputClass);if(i.length&&0===i.val().length)return t.preventDefault(),!1;s.suggestions.length>0&&e.each(s.suggestions,function(e,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(e),t.preventDefault(),!1}),s.disableOverlayMobile()}),"complete"===document.readyState?s.positionPreloader():e(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(e){s.onKeyPress(e)}),s.el.on("keyup.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("input.autocomplete",function(e){s.onKeyUp(e)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){e(document).on("mouseenter.autocomplete",s,function(){var s=t.getActiveInstance();if(void 0!==s){var i=e(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&t.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;e(document).on("click.autocomplete",s,function(s){if(i)s.preventDefault();else{var o=t.getActiveInstance();o.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),void 0!==s.ctrlKey&&!1!==s.ctrlKey||(o.select(e(this).data("index")),s.preventDefault())}}),e(document).on("mousedown.autocomplete",s,function(s){var o=this;0===s.button&&setTimeout(function(){i||t.getActiveInstance().select(e(o).data("index"))},250)}),e("."+this.options.containerClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(e(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(t){e(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",e(this).val())}),e("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var t=this,s=t.getFormWrapper(),i=s.find("."+t.options.formClass);s.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(e){var o=s.find("."+t.options.searchInputClass);if(s.hasClass("dgwt-wcas-layout-icon-open"))t.hide(),i.hide(!0),s.removeClass("dgwt-wcas-layout-icon-open");else{var a=s.find(".dgwt-wcas-search-icon-arrow");i.hide(),a.hide(),s.addClass("dgwt-wcas-layout-icon-open"),t.positionIconSearchMode(s),i.fadeIn(200,function(){a.show(),t.positionPreloader(s),o.focus()})}}),0==e(".js-dgwt-wcas-initialized").length&&e(".js-dgwt-wcas-search-icon-handler").length>0&&e(document).on("click.autocomplete",function(s){if(e(".dgwt-wcas-layout-icon-open").length){var i=e(s.target);i.closest("."+t.options.searchFormClass).length>0||i.closest("."+t.options.containerClass).length>0||i.closest("."+t.options.containerDetailsClass).length>0||t.hideIconModeSearch()}}),e(window).on("resize.autocomplete",function(){t.applyFlexibleMode()}),"complete"==document.readyState?t.applyFlexibleMode():e(window).on("load.autocomplete",function(){t.applyFlexibleMode()})},registerEventsFixedMenu:function(){var t=this;e(window).on("scroll.autocomplete",function(){if(t.suggestions.length>0&&t.elementOrParentIsFixed(t.getFormWrapper()))if(0===e(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(e){setTimeout(function(){t.fixHeight(),t.fixPositionCapture()},e)})}else t.fixHeight(),t.fixPositionCapture()})},initMobileMode:function(){var e=this,t=e.getFormWrapper();t.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&!t.find(".js-dgwt-wcas-enable-mobile-form").length&&(t.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),t.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(t){e.options.mobileOverlayDelay>0?setTimeout(function(){e.enableOverlayMobile()},e.options.mobileOverlayDelay):e.enableOverlayMobile()}))},destroyMobileMode:function(){var e=this.getFormWrapper(),t=(this.getSuggestionsContainer(),e.find(".js-dgwt-wcas-enable-mobile-form"));e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.length&&(this.disableOverlayMobile(),t.remove())},toggleMobileMode:function(){var e="desktop";if(this.getFormWrapper().find(".js-dgwt-wcas-enable-mobile-form").length&&(e="mobile"),"desktop"===e&&this.isMobileMode()||"mobile"===e&&!this.isMobileMode()){var t=this.getSuggestionsContainer();this.close(!1),t.length&&t.html(""),this.hideIconModeSearch()}"desktop"===e&&this.isMobileMode()&&this.initMobileMode(),"mobile"!==e||this.isMobileMode()||this.destroyMobileMode()},applyFlexibleMode:function(){var t=e(".js-dgwt-wcas-layout-icon-flexible");t.length&&(this.isMobileMode()?(t.addClass("js-dgwt-wcas-layout-icon"),t.addClass("dgwt-wcas-layout-icon")):(t.removeClass("js-dgwt-wcas-layout-icon"),t.removeClass("dgwt-wcas-layout-icon")),t.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){e("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),e("body").addClass("dgwt-wcas-focused"),this.getFormWrapper().addClass("dgwt-wcas-search-focused"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var t=this.options,s=this.el.val(),i=this.getQuery(s);e("body").removeClass("dgwt-wcas-focused"),e("."+this.options.searchFormClass).removeClass("dgwt-wcas-search-focused"),this.isMobileMode()||this.isMouseDownOnSearchElements||(this.hide(),this.selection&&this.currentValue!==i&&(t.onInvalidateSelection||e.noop).call(this.element))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(t){var s=this,i=s.getSuggestionsContainer(),o=e.extend({},s.options,t);(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(e){e&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(e){this.hide(),this.clear(!1),this.hideCloseButton();var t=this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass);t.val(""),e&&t.focus()},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e=this.getFormOffset();this.getSuggestionsContainer().css(e),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var t=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),t.width()>=550)return e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("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=e(window).width(),c=i.width(),d=i.offset();e("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,e("body").removeClass("dgwt-wcas-details-right"),e("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,e("body").removeClass("dgwt-wcas-details-left"),e("body").addClass("dgwt-wcas-details-right")),u&&g?(e("body").removeClass("dgwt-wcas-details-left"),e("body").removeClass("dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-notfit")):e("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var e=this.getSuggestionsContainer(),t=this.getDetailsContainer();e.css("height","auto"),t.css("height","auto");var s=e.outerHeight(!1),i=t.outerHeight(!1);return e.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(e.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&t.css("height",s+"px"),s<i&&e.css("height",i+"px"),!1)},automaticAlignment:function(){var e=this,t=e.getFormWrapper().find(".dgwt-wcas-search-input"),s=e.getSuggestionsContainer(),i=e.getDetailsContainer();if(null==e.autoAligmentprocess){var o=[t.width(),s.height()];e.options.showDetailsPanel&&(o[2]=i.height()),e.autoAligmentprocess=setInterval(function(){var a=[t.width(),s.height()];e.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){e.fixHeight(),e.fixPositionCapture(),o=a;break}e.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&e.fixHeight())},10)}},getFormOffset:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=t.outerHeight(!1),a=this.el.outerHeight(!1),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=e(window).height(),c=e(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=t[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight(!1)}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return e("."+this.options.containerClass)},getDetailsContainer:function(){return e("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var e=this.getSuggestionsContainer();e[0].scrollTop=e[0].scrollHeight},isCursorAtEnd:function(){var e,t=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){if(this.disabled||this.visible||e.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(e.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!this.options.disableSubmit&&void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else this.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case n:case l:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var t=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(t.onInvalidateSelection||e.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,t.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<t.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return e(window).width()<this.options.mobileBreakpoint},getQuery:function(t){var s,i=this.options.delimiter;return i?(s=t.split(i),e.trim(s[s.length-1])):t.trim()},getSuggestionsLocal:function(t){var s,i=this.options,o=t.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:e.grep(i.lookup,function(e){return a(e,t,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,e.isFunction(c.lookup)?c.lookup(i,function(e){l.suggestions=e.suggestions,l.suggest(),l.selectFirstSuggestion(e.suggestions),c.onSearchComplete.call(l.element,i,e.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(e.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+e.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},e.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,t.debounce(function(){var t=s.object,o=s.ajaxSettings;t.currentRequest=e.ajax(o).done(function(e){var s;t.currentRequest=null,void 0!==(s=t.options.transformResult(e,i)).suggestions&&(t.processResponse(s,i,n),t.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?t.gaEvent(i,"Autocomplete Search without results"):t.gaEvent(i,"Autocomplete Search with results")),t.fixPositionCapture(),t.options.onSearchComplete.call(t.element,i,s.suggestions),t.updatePrices()}).fail(function(e,s,o){t.options.onSearchError.call(t.element,i,e,s,o)})},c.debounceWaitMs))))},getDetails:function(t){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=t&&void 0!==t.type&&("string"!=typeof t.type||"more_products"!==t.type)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(t);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={action:dgwt_wcas.action_result_details,items:[]};if(e.each(s.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type){var i={objectID:s.prepareSuggestionObjectID(t),value:null!=t.value?t.value:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=e.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),e.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(e){var t="string"==typeof e?JSON.parse(e):e;if(void 0!==t.items)for(var i=0;i<t.items.length;i++){var o=t.items[i].objectID;s.cachedDetails[o]={html:t.items[i].html},s.detailsPanelAddToScene(o),void 0!==t.items[i].price&&t.items[i].price.length>0&&(s.cachedPrices[o]=t.items[i].price)}s.preloader("hide","details","");var a=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[a]?s.detailsPanelSetScene(a):s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(e,t){s.preloader("hide","details",""),s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight()}})}e(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(t){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(!t&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};e.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(e){if(void 0!==e.success&&e.success&&e.data.length>0)for(s=0;s<e.data.length;s++){var t=e.data[s].id,a=e.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==t){var n="product__"+t;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(e,t){}})}}},updatePrice:function(t,s){if(void 0!==this.suggestions[t]){this.suggestions[t].price=s;var i=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(e){if("object"==typeof dgwt_wcas.custom_params){var t=dgwt_wcas.custom_params;for(var s in t)e[s]=t[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)e[s]=i[s];return e},applyPreloaderForPrice:function(t){if(void 0!==this.suggestions[t]){var s=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .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(e){var t="";return void 0!==e&&void 0!==e.type&&(null!=e.post_id&&(t=e.type+"__"+e.post_id,"product_variation"===e.type&&(t+="__"+e.variation_id),void 0!==e.post_type&&(t=e.type+"__"+e.post_id+"__"+e.post_type)),null!=e.term_id&&null!=e.taxonomy&&(t=e.type+"__"+e.term_id+"__"+e.taxonomy)),t},detailsPanelSetScene:function(e){var s=this.getDetailsContainer(),i=t.hashCode(e),o=s.find('.dgwt-wcas-details-inner[data-object="'+i+'"]');o.length&&(this.preloader("hide","details",""),this.detailsPanelClearScene(),o.addClass("dgwt-wcas-details-inner-active"))},detailsPanelAddToScene:function(e){var s=this.getDetailsContainer(),i=this.cachedDetails[e],o=t.hashCode(e),a="";void 0!==i&&"string"==typeof i.html&&(a=i.html.replace("<div ",'<div data-object="'+o+'" ')),0==s.find('.dgwt-wcas-details-inner[data-object="'+o+'"]').length&&s.append(a)},detailsPanelClearScene:function(){var e=this.getDetailsContainer().find(".dgwt-wcas-details-inner");e.length&&e.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(t){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=t&&t.length>0&&e.each(this.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type&&"no-results"!=t.type)return s=e,!1;void 0!==t.type&&"no-results"!==t.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(t[s]),this.activate(s)))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,s=t.length;s--;)if(0===e.indexOf(t[s]))return!0;return!1},hide:function(t){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();e.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(),e("body").removeClass("dgwt-wcas-open"),e("body").removeClass("dgwt-wcas-block-scroll"),e("body").removeClass("dgwt-wcas-is-details"),e("body").removeClass("dgwt-wcas-full-width"),e("body").removeClass("dgwt-wcas-nores"),e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof t&&t&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(t){var s=-20,i=t.find("."+this.options.formClass),o=i.width(),a=e(window).width(),n=t[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),s=Math.max(s,-1*n),i.css({left:s+"px"})},hideIconModeSearch:function(){var t=e(".dgwt-wcas-layout-icon-open");t.length>0&&t.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var t=this;t.isMobileMode()||e(document).mouseup(function(s){if(t.visible){t.getSuggestionsContainer(),t.getDetailsContainer();var i=!(e(s.target).closest("."+t.options.searchFormClass).length>0||e(s.target).hasClass(t.options.searchFormClass)),o=!(e(s.target).closest("."+t.options.containerClass).length>0||e(s.target).hasClass(t.options.containerClass));if(t.canShowDetailsBox()){var a=!(e(s.target).closest("."+t.options.containerDetailsClass).length>0||e(s.target).hasClass(t.options.containerDetailsClass));i&&o&&a&&t.hide()}else i&&o&&t.hide()}})},suggest:function(){if(this.suggestions.length){var t,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=e(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(e("body").removeClass("dgwt-wcas-nores"),e.each(s.suggestions,function(l,c){var d="",g=!1,u="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=function(e,s){var i=e.data[o];return t===i?"":'<div class="autocomplete-group"><strong>'+(t=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var w,p=r,f="dgwt-wcas-st",m="",v="",b="",y=!0;"product_cat"===c.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(b=c.breadcrumbs+" &gt; "+c.value,v+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"taxonomy"===c.type?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"vendor"===c.type?(p+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===c.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===c.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(p+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",f="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",y=!1):i.showHeadings&&"headline"===c.type?(p+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),y=!1):(p+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,y=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),e("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(w=!0),b=b.length>0?' title="'+b+'"':"",h+='<a href="'+u+'" class="'+p+'" data-index="'+l+'">',w&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+b+' class="'+f+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+m+a(c.value,n,y,i)+v+"</span>",c.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(c.shop_city,n,!0,i)+"</span>"),void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>")):h+=m+a(c.value,n,y,i)+v,h+="</span>",h+=w?"</div>":"",h+="</a>"}else{!0===i.showImage&&void 0!==c.thumb_html&&(g=!0);var C="product_variation"===c.type?" dgwt-wcas-suggestion-product-var":"";if(d+=void 0!==c.post_id?'data-post-id="'+c.post_id+'" ':"",d+=void 0!==c.taxonomy?'data-taxonomy="'+c.taxonomy+'" ':"",d+=void 0!==c.term_id?'data-term-id="'+c.term_id+'" ':"",h+='<a href="'+u+'" class="'+r+" dgwt-wcas-suggestion-product"+C+'" data-index="'+l+'" '+d+">",g&&(h+='<span class="dgwt-wcas-si">'+c.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(h+=c.title_before),h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",void 0!==c.title_after&&c.title_after&&(h+=c.title_after),!0===i.showSKU&&void 0!==c.sku&&c.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(c.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==c.vendor&&c.vendor){var _='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+c.vendor+"</span>";void 0!==c.vendor_url&&c.vendor_url?h+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+_+"</span>":h+=_}void 0!==c.content_after&&c.content_after&&(h+=c.content_after),h+="</div>";var S=!0===i.showPrice&&void 0!==c.price,x=void 0!==c.meta_before,M=void 0!==c.meta_after,P=S||x||M;h+=P?'<div class="dgwt-wcas-meta">':"",x&&(h+=c.meta_before),S&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),M&&(h+=c.meta_after),h+=P?"</div>":"",h+=g?"</div>":"",h+="</a>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),e.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),e("body").addClass("dgwt-wcas-open"),s.isMouseDownOnSearchElements=!1,s.automaticAlignment(),!0===i.showDetailsPanel&&(e("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),e("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var t,s=this.options,i=e("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&&(t=this.el.outerWidth(),a.css("width",t+"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(t){var s="object"==typeof t?t.find(".dgwt-wcas-search-submit"):e(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var t=e(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?t.css("left",6+e(this).outerWidth()+"px"):t.css("right",e(this).outerWidth()+"px")})},findBestHint:function(){var t=this.el.val().toLowerCase(),s=null;t&&(e.each(this.suggestions,function(e,i){var o=0===i.value.toLowerCase().indexOf(t);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(t){var s="";t&&(s=this.currentValue+t.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=t,(this.options.onHint||e.noop)(s))},preloader:function(e,t,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===t){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===t&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==t){var r=o.find("."+a);if("hide"!==e){if("show"===e){var l=this.options.isRtl?"-rtl":"";i='<div class="'+n+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+l+'.png" /></div>',this.detailsPanelClearScene(),r.length&&r.remove(),o.prepend(i)}}else r.length&&r.remove()}else"hide"===e?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,s){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=s),t},processResponse:function(e,t,s){var i=this.options;e.suggestions=this.verifySuggestionsFormat(e.suggestions),i.noCache||(this.cachedResponse[s]=e,i.preventBadQueries&&!e.suggestions.length&&this.badQueries.push(t)),t===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&e.suggestions.reverse(),this.suggestions=e.suggestions,this.suggest())},activate:function(t){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=t,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),e(s).addClass(i),s):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.options.disableHits||(this.disableOverlayMobile(),this.hide(),this.onSelect(e))},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(t,s){if("headline"===this.suggestions[t].type&&(t="down"===s?t+1:t-1),void 0!==this.suggestions[t]){var i=this.activate(t);if(this.getDetails(this.suggestions[t]),"more_products"!==this.suggestions[t].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=e(i).outerHeight(!1);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(t){var s=this.options.onSelect,i=this.suggestions[t];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.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,e.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(e){var t,s,i=this.options.delimiter;return i?1===(s=(t=this.currentValue).split(i)).length?e:t.substr(0,t.length-s[s.length-1].length)+e:e},dispose:function(){var t=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),t.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){e(this).off(".autocomplete")});t.removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(!1),o.length&&o.remove(),i.length&&i.html("")},enableOverlayMobile:function(){var t=this;if("on"!==t.overlayMobileState){t.overlayMobileState="on";var s,i=t.getFormWrapper(),o=t.getSuggestionsContainer(),a="";e("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+="</button>",a+="</div>",a+="</div>",e(t.options.mobileOverlayWrapper).append(a),(s=e(".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("."+t.options.searchInputClass).focus(),e(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(e){t.disableOverlayMobile(s)})}},disableOverlayMobile:function(t){var s=this;if(e("html").hasClass("dgwt-wcas-overlay-mobile-on")){var i=s.getSuggestionsContainer(),o=e(".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"),e("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),e(".js-dgwt-wcas-om-hook").after(o),e(".js-dgwt-wcas-overlay-mobile").remove(),e(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var e=o.find(".dgwt-wcas-close");o.length>0&&(e.removeClass("dgwt-wcas-close"),e.html("")),s.hide()},150),s.overlayMobileState="off"}else s.overlayMobileState="off"},showCloseButton:function(){var e=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",t=this.getFormWrapper().find("."+this.options.preloaderClass);t.addClass(this.options.closeTrigger),t.html(e)},hideCloseButton:function(){var e=this.getFormWrapper().find("."+this.options.closeTrigger);e.length&&(e.removeClass(this.options.closeTrigger),e.html(""))},elementOrParentIsFixed:function(t){var s=t.add(t.parents()),i=!1;return s.each(function(){if("fixed"===e(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,s){var i=!(!window.hasOwnProperty("GoogleAnalyticsObject")||!window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:s});else if(!1!==i){var o=i.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:t})}}catch(e){}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(!1!==i){var a=i.getAll()[0];a&&(a.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),a.send("pageview"))}}catch(e){}e(document).trigger("dgwtWcasGAEvent",{term:t,category:s})}},e.fn.dgwtWcasAutocomplete=function(t,s){return arguments.length?this.each(function(){var i=e(this),o=i.data("autocomplete");"string"==typeof t?o&&"function"==typeof o[t]&&o[t](s):(o&&o.dispose&&o.dispose(),o=new d(this,t),i.data("autocomplete",o))}):this.first().data("autocomplete")},e.fn.autocomplete||(e.fn.autocomplete=e.fn.dgwtWcasAutocomplete),function(){function t(){var t=e(".dgwt-wcas-search-input"),s=[];t.length>1&&t.each(function(){var t=e(this).attr("id");if(-1==e.inArray(t,s))s.push(t);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,e(this).attr("id",i),e(this).closest("form").find("label").attr("for",i)}})}function s(){var t=e(".dgwt-wcas-search-input");t.length>0&&t.each(function(){"object"!=typeof e(this).data("autocomplete")&&e(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}navigator.userAgent.match(/Trident\/7\./)&&function(e,t){function s(e,t){var s=arguments.length>2?arguments[2]:[];if(!1===a(e))throw new TypeError(Object.prototype.toString.call(e)+"is not a function.");return e.apply(t,s)}function i(e,t,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,t,i)}function o(e,t){return e[t]}function a(e){return"function"==typeof e}function n(e){if(null===e||e===t)throw TypeError();return Object(e)}function r(e,s){var i=function(e,t){return n(e)[t]}(e,s);if(null===i||i===t)return t;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(t){switch(typeof t){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===t?"null":"Symbol"in e&&(t instanceof e.Symbol||t.constructor===e.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in e&&"match"in e.Symbol?o(s,e.Symbol.match):t;if(i!==t)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(e){}finally{s.lastIndex=a}return!1}function d(e,t){return l(e)===l(t)&&("number"===l(e)?!(!isNaN(e)||!isNaN(t))||1/e==1/0&&1/t==-1/0||1/e==-1/0&&1/t==1/0||e===t:function(e,t){return e===t}(e,t))}function g(e){if("symbol"===l(e))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(e);return isNaN(t)?0:1/t==1/0||1/t==-1/0||t===1/0||t===-1/0?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function u(i){var n=arguments.length>1?arguments[1]:t;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof e.Symbol&&"symbol"==typeof e.Symbol.toPrimitive?r(i,e.Symbol.toPrimitive):t;if(d!==t){var g=s(d,i,[c]);if("object"!==l(g))return g;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===c&&(c="number"),function(e,t){if("string"===t)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(e,i[n]);if(a(r)){var c=s(r,e);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(e){switch(l(e)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(e,String));default:return String(e)}}i(Array.prototype,"includes",function(e){var t=n(this),s=function(e){var t=g(e);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}(o(t,"length"));if(0===s)return!1;var i=g(arguments[1]);if(i>=0)var a=i;else(a=s+i)<0&&(a=0);for(;a<s;){if(d(e,o(t,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(e){var s=arguments.length>1?arguments[1]:t,i=h(function(e){if(null===e||e===t)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}(this));if(c(e))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(e),a=g(s),n=i.length,r=Math.min(Math.max(a,0),n);return-1!==String.prototype.indexOf.call(i,o,r)})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),e(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&e("html").addClass("dgwt-wcas-is-ios");var t=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(t=!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:t,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,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,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)},e(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),e(window).on("load",function(){var t=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&e(i).length&&e(i).hasClass("dgwt-wcas-search-input")){var o=e(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}t>10&&clearInterval(s),t++},500)}),e(document).ready(function(){setTimeout(function(){t(),s()},500)}),e(window).on("load",function(){setTimeout(function(){t(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&e.each(elementorFrontend.documentsManager.documents,function(e,t){void 0!==t.getModal&&t.getModal&&t.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
fs/lib/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -298,6 +298,7 @@
298
  return $this->get( $k, null );
299
  }
300
 
 
301
  function offsetSet( $k, $v ) {
302
  if ( is_null( $k ) ) {
303
  throw new Exception( 'Can\'t append value to request params.' );
@@ -306,14 +307,17 @@
306
  }
307
  }
308
 
 
309
  function offsetExists( $k ) {
310
  return array_key_exists( $k, $this->_data );
311
  }
312
 
 
313
  function offsetUnset( $k ) {
314
  unset( $this->$k );
315
  }
316
 
 
317
  function offsetGet( $k ) {
318
  return $this->get( $k, null );
319
  }
@@ -325,6 +329,7 @@
325
  * @link http://php.net/manual/en/iterator.current.php
326
  * @return mixed Can return any type.
327
  */
 
328
  public function current() {
329
  return current( $this->_data );
330
  }
@@ -336,6 +341,7 @@
336
  * @link http://php.net/manual/en/iterator.next.php
337
  * @return void Any returned value is ignored.
338
  */
 
339
  public function next() {
340
  next( $this->_data );
341
  }
@@ -347,6 +353,7 @@
347
  * @link http://php.net/manual/en/iterator.key.php
348
  * @return mixed scalar on success, or null on failure.
349
  */
 
350
  public function key() {
351
  return key( $this->_data );
352
  }
@@ -359,6 +366,7 @@
359
  * @return boolean The return value will be casted to boolean and then evaluated.
360
  * Returns true on success or false on failure.
361
  */
 
362
  public function valid() {
363
  $key = key( $this->_data );
364
 
@@ -372,6 +380,7 @@
372
  * @link http://php.net/manual/en/iterator.rewind.php
373
  * @return void Any returned value is ignored.
374
  */
 
375
  public function rewind() {
376
  reset( $this->_data );
377
  }
@@ -386,7 +395,8 @@
386
  * <p>
387
  * The return value is cast to an integer.
388
  */
 
389
  public function count() {
390
  return count( $this->_data );
391
  }
392
- }
298
  return $this->get( $k, null );
299
  }
300
 
301
+ #[ReturnTypeWillChange]
302
  function offsetSet( $k, $v ) {
303
  if ( is_null( $k ) ) {
304
  throw new Exception( 'Can\'t append value to request params.' );
307
  }
308
  }
309
 
310
+ #[ReturnTypeWillChange]
311
  function offsetExists( $k ) {
312
  return array_key_exists( $k, $this->_data );
313
  }
314
 
315
+ #[ReturnTypeWillChange]
316
  function offsetUnset( $k ) {
317
  unset( $this->$k );
318
  }
319
 
320
+ #[ReturnTypeWillChange]
321
  function offsetGet( $k ) {
322
  return $this->get( $k, null );
323
  }
329
  * @link http://php.net/manual/en/iterator.current.php
330
  * @return mixed Can return any type.
331
  */
332
+ #[ReturnTypeWillChange]
333
  public function current() {
334
  return current( $this->_data );
335
  }
341
  * @link http://php.net/manual/en/iterator.next.php
342
  * @return void Any returned value is ignored.
343
  */
344
+ #[ReturnTypeWillChange]
345
  public function next() {
346
  next( $this->_data );
347
  }
353
  * @link http://php.net/manual/en/iterator.key.php
354
  * @return mixed scalar on success, or null on failure.
355
  */
356
+ #[ReturnTypeWillChange]
357
  public function key() {
358
  return key( $this->_data );
359
  }
366
  * @return boolean The return value will be casted to boolean and then evaluated.
367
  * Returns true on success or false on failure.
368
  */
369
+ #[ReturnTypeWillChange]
370
  public function valid() {
371
  $key = key( $this->_data );
372
 
380
  * @link http://php.net/manual/en/iterator.rewind.php
381
  * @return void Any returned value is ignored.
382
  */
383
+ #[ReturnTypeWillChange]
384
  public function rewind() {
385
  reset( $this->_data );
386
  }
395
  * <p>
396
  * The return value is cast to an integer.
397
  */
398
+ #[ReturnTypeWillChange]
399
  public function count() {
400
  return count( $this->_data );
401
  }
402
+ }
includes/Admin/AdminMenu.php CHANGED
@@ -23,6 +23,17 @@ class AdminMenu
23
  public function addMenu()
24
  {
25
  $menuSuffix = '';
 
 
 
 
 
 
 
 
 
 
 
26
  add_submenu_page(
27
  'woocommerce',
28
  __( 'FiboSearch', 'ajax-search-for-woocommerce' ),
@@ -31,14 +42,16 @@ class AdminMenu
31
  'dgwt_wcas_settings',
32
  array( $this, 'settingsPage' )
33
  );
34
- add_submenu_page(
35
- 'dgwt_wcas_settings',
36
- 'FiboSearch Debug',
37
- 'FiboSearch [Hidden]',
38
- 'manage_options',
39
- 'dgwt_wcas_debug',
40
- array( $this, 'debugPage' )
41
- );
 
 
42
  }
43
 
44
  /**
23
  public function addMenu()
24
  {
25
  $menuSuffix = '';
26
+ if ( dgoraAsfwFs()->is_activation_mode() ) {
27
+ add_action( 'admin_print_styles', function () {
28
+ ?>
29
+ <style>
30
+ #adminmenu > .toplevel_page_dgwt_wcas_settings {
31
+ display: none;
32
+ }
33
+ </style>
34
+ <?php
35
+ } );
36
+ }
37
  add_submenu_page(
38
  'woocommerce',
39
  __( 'FiboSearch', 'ajax-search-for-woocommerce' ),
42
  'dgwt_wcas_settings',
43
  array( $this, 'settingsPage' )
44
  );
45
+ if ( !dgoraAsfwFs()->is_activation_mode() ) {
46
+ add_submenu_page(
47
+ 'dgwt_wcas_settings',
48
+ 'FiboSearch Debug',
49
+ 'FiboSearch [Hidden]',
50
+ 'manage_options',
51
+ 'dgwt_wcas_debug',
52
+ array( $this, 'debugPage' )
53
+ );
54
+ }
55
  }
56
 
57
  /**
includes/Admin/SettingsAPI.php CHANGED
@@ -470,7 +470,7 @@ class SettingsAPI
470
  *
471
  * @param array $args settings field args
472
  *
473
- * @return string
474
  */
475
  function callback_html( $args )
476
  {
470
  *
471
  * @param array $args settings field args
472
  *
473
+ * @return void
474
  */
475
  function callback_html( $args )
476
  {
includes/Admin/Troubleshooting.php CHANGED
@@ -14,8 +14,6 @@ class Troubleshooting
14
  {
15
  const SECTION_ID = 'dgwt_wcas_troubleshooting' ;
16
  const TRANSIENT_RESULTS_KEY = 'dgwt_wcas_troubleshooting_async_results' ;
17
- const TRANSIENT_TEST_KEY = 'dgwt_wcas_test_transients' ;
18
- const TRANSIENT_TEST_KEY2 = 'dgwt_wcas_test_transients2' ;
19
  const ASYNC_TEST_NONCE = 'troubleshooting-async-test' ;
20
  const RESET_ASYNC_TESTS_NONCE = 'troubleshooting-reset-async-tests' ;
21
  const FIX_OUTOFSTOCK_NONCE = 'troubleshooting-fix-outofstock' ;
@@ -148,8 +146,6 @@ class Troubleshooting
148
  'results_async' => array(),
149
  ),
150
  );
151
- set_transient( self::TRANSIENT_TEST_KEY, '1', HOUR_IN_SECONDS );
152
- set_transient( self::TRANSIENT_TEST_KEY2, '1', 1 );
153
  $asyncTestsResults = get_transient( self::TRANSIENT_RESULTS_KEY );
154
 
155
  if ( !empty($asyncTestsResults) && is_array( $asyncTestsResults ) ) {
14
  {
15
  const SECTION_ID = 'dgwt_wcas_troubleshooting' ;
16
  const TRANSIENT_RESULTS_KEY = 'dgwt_wcas_troubleshooting_async_results' ;
 
 
17
  const ASYNC_TEST_NONCE = 'troubleshooting-async-test' ;
18
  const RESET_ASYNC_TESTS_NONCE = 'troubleshooting-reset-async-tests' ;
19
  const FIX_OUTOFSTOCK_NONCE = 'troubleshooting-fix-outofstock' ;
146
  'results_async' => array(),
147
  ),
148
  );
 
 
149
  $asyncTestsResults = get_transient( self::TRANSIENT_RESULTS_KEY );
150
 
151
  if ( !empty($asyncTestsResults) && is_array( $asyncTestsResults ) ) {
includes/Engines/WordPressNative/DetailsBox.php CHANGED
@@ -161,7 +161,7 @@ class DetailsBox
161
  );
162
  $file = ( $variationID ? 'product-variation' : 'product' );
163
  ob_start();
164
- include DGWT_WCAS_DIR . 'partials/details-panel/' . $file . '.php';
165
  $details['html'] = ob_get_clean();
166
 
167
  if ( $variationID ) {
@@ -220,14 +220,37 @@ class DetailsBox
220
  $termName
221
  );
222
  echo '<div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-taxonomy dgwt-wcas-details-space">' ;
 
223
  echo '<div class="dgwt-wcas-products-in-cat">' ;
224
  echo ( !empty($title) ? $title : '' ) ;
 
 
225
  while ( $products->have_posts() ) {
226
  $products->the_post();
227
  $product = new Product( get_the_ID() );
 
228
  if ( $product->isValid() ) {
229
- include DGWT_WCAS_DIR . 'partials/details-panel/term-product.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
 
231
  }
232
  echo '</div>' ;
233
 
@@ -236,6 +259,7 @@ class DetailsBox
236
  echo '<a class="dgwt-wcas-details-more-products" href="' . esc_url( $showMoreUrl ) . '">' . Helpers::getLabel( 'show_more_details' ) . ' (' . $totalProducts . ')</a>' ;
237
  }
238
 
 
239
  echo '</div>' ;
240
  }
241
 
161
  );
162
  $file = ( $variationID ? 'product-variation' : 'product' );
163
  ob_start();
164
+ Helpers::loadTemplate( 'details-panel/' . $file . '.php', $vars );
165
  $details['html'] = ob_get_clean();
166
 
167
  if ( $variationID ) {
220
  $termName
221
  );
222
  echo '<div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-taxonomy dgwt-wcas-details-space">' ;
223
+ do_action( 'dgwt/wcas/details_panel/term_products/container_before' );
224
  echo '<div class="dgwt-wcas-products-in-cat">' ;
225
  echo ( !empty($title) ? $title : '' ) ;
226
+ $thumbSize = apply_filters( 'dgwt/wcas/suggestion_details/term_products/thumb_size', 'dgwt-wcas-product-suggestion' );
227
+ $responsiveImages = apply_filters( 'dgwt/wcas/suggestion_details/responsive_images', true );
228
  while ( $products->have_posts() ) {
229
  $products->the_post();
230
  $product = new Product( get_the_ID() );
231
+
232
  if ( $product->isValid() ) {
233
+ $vars = array(
234
+ 'ID' => $product->getID(),
235
+ 'name' => $product->getName(),
236
+ 'link' => $product->getPermalink(),
237
+ 'imageSrc' => $product->getThumbnailSrc( $thumbSize ),
238
+ 'imageSrcset' => ( $responsiveImages ? $product->getThumbnailSrcset( $thumbSize ) : '' ),
239
+ 'imageSizes' => ( $responsiveImages ? $product->getThumbnailSizes( $thumbSize ) : '' ),
240
+ 'reviewCount' => $product->getReviewCount(),
241
+ 'ratingHtml' => $product->getRatingHtml(),
242
+ 'priceHtml' => $product->getPriceHTML(),
243
+ 'wooObject' => $product->getWooObject(),
244
+ );
245
+ $vars = (object) apply_filters(
246
+ 'dgwt/wcas/suggestion_details/term_products/vars',
247
+ $vars,
248
+ $product->getID(),
249
+ $product
250
+ );
251
+ Helpers::loadTemplate( 'details-panel/term-product.php', $vars );
252
  }
253
+
254
  }
255
  echo '</div>' ;
256
 
259
  echo '<a class="dgwt-wcas-details-more-products" href="' . esc_url( $showMoreUrl ) . '">' . Helpers::getLabel( 'show_more_details' ) . ' (' . $totalProducts . ')</a>' ;
260
  }
261
 
262
+ do_action( 'dgwt/wcas/details_panel/term_products/container_after' );
263
  echo '</div>' ;
264
  }
265
 
includes/Helpers.php CHANGED
@@ -128,7 +128,8 @@ class Helpers
128
  viewBox="0 0 51.539 51.361" enable-background="new 0 0 51.539 51.361" xml:space="preserve">
129
  <path fill="<?php
130
  echo $color ;
131
- ?>" d="M51.539,49.356L37.247,35.065c3.273-3.74,5.272-8.623,5.272-13.983c0-11.742-9.518-21.26-21.26-21.26 S0,9.339,0,21.082s9.518,21.26,21.26,21.26c5.361,0,10.244-1.999,13.983-5.272l14.292,14.292L51.539,49.356z M2.835,21.082 c0-10.176,8.249-18.425,18.425-18.425s18.425,8.249,18.425,18.425S31.436,39.507,21.26,39.507S2.835,31.258,2.835,21.082z"/>
 
132
  </svg>
133
  <?php
134
  break;
@@ -140,7 +141,8 @@ class Helpers
140
  ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
141
  <path fill="<?php
142
  echo $color ;
143
- ?>" d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
 
144
  </svg>
145
  <?php
146
  break;
@@ -152,7 +154,7 @@ class Helpers
152
  ?>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
153
  <path fill="<?php
154
  echo $color ;
155
- ?>" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd" />
156
  </svg>
157
  <?php
158
  break;
@@ -164,7 +166,8 @@ class Helpers
164
  ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
165
  <path fill="<?php
166
  echo $color ;
167
- ?>" d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>
 
168
  </svg>
169
  <?php
170
  break;
@@ -173,7 +176,7 @@ class Helpers
173
  ?>
174
  <svg class="dgwt-wcas-loader-circular <?php
175
  echo $class ;
176
- ?>" viewBox="25 25 50 50">
177
  <circle class="dgwt-wcas-loader-circular-path" cx="50" cy="50" r="20" fill="none" stroke="<?php
178
  echo $color ;
179
  ?>" stroke-miterlimit="10"/>
@@ -1112,7 +1115,7 @@ class Helpers
1112
  'labels' => self::getLabels(),
1113
  'ajax_search_endpoint' => self::getEndpointUrl( 'search' ),
1114
  'ajax_details_endpoint' => self::getEndpointUrl( 'details' ),
1115
- 'ajax_prices_endpoint' => self::getEndpointUrl( 'prizes' ),
1116
  'action_search' => DGWT_WCAS_SEARCH_ACTION,
1117
  'action_result_details' => DGWT_WCAS_RESULT_DETAILS_ACTION,
1118
  'action_get_prices' => DGWT_WCAS_GET_PRICES_ACTION,
@@ -1249,7 +1252,7 @@ class Helpers
1249
  $backtrace_limit = 10;
1250
  }
1251
  $result = false;
1252
- $backtrace = debug_backtrace( 0, $backtrace_limit );
1253
  if ( !empty($backtrace) ) {
1254
  foreach ( $backtrace as $item ) {
1255
 
@@ -1263,6 +1266,11 @@ class Helpers
1263
  return $result;
1264
  }
1265
 
 
 
 
 
 
1266
  /**
1267
  * Search products with native engine
1268
  *
@@ -1336,10 +1344,8 @@ class Helpers
1336
 
1337
  if ( defined( 'DGWT_WCAS_BA_USERNAME' ) && defined( 'DGWT_WCAS_BA_PASSWORD' ) ) {
1338
  $authorization = 'Basic ' . base64_encode( wp_unslash( DGWT_WCAS_BA_USERNAME ) . ':' . wp_unslash( DGWT_WCAS_BA_PASSWORD ) );
1339
- } else {
1340
- if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
1341
- $authorization = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
1342
- }
1343
  }
1344
 
1345
  return $authorization;
@@ -1386,5 +1392,37 @@ class Helpers
1386
  {
1387
  return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
1388
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1389
 
1390
  }
128
  viewBox="0 0 51.539 51.361" enable-background="new 0 0 51.539 51.361" xml:space="preserve">
129
  <path fill="<?php
130
  echo $color ;
131
+ ?>"
132
+ d="M51.539,49.356L37.247,35.065c3.273-3.74,5.272-8.623,5.272-13.983c0-11.742-9.518-21.26-21.26-21.26 S0,9.339,0,21.082s9.518,21.26,21.26,21.26c5.361,0,10.244-1.999,13.983-5.272l14.292,14.292L51.539,49.356z M2.835,21.082 c0-10.176,8.249-18.425,18.425-18.425s18.425,8.249,18.425,18.425S31.436,39.507,21.26,39.507S2.835,31.258,2.835,21.082z"/>
133
  </svg>
134
  <?php
135
  break;
141
  ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
142
  <path fill="<?php
143
  echo $color ;
144
+ ?>"
145
+ d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
146
  </svg>
147
  <?php
148
  break;
154
  ?>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
155
  <path fill="<?php
156
  echo $color ;
157
+ ?>" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"/>
158
  </svg>
159
  <?php
160
  break;
166
  ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
167
  <path fill="<?php
168
  echo $color ;
169
+ ?>"
170
+ d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>
171
  </svg>
172
  <?php
173
  break;
176
  ?>
177
  <svg class="dgwt-wcas-loader-circular <?php
178
  echo $class ;
179
+ ?>" viewBox="25 25 50 50">
180
  <circle class="dgwt-wcas-loader-circular-path" cx="50" cy="50" r="20" fill="none" stroke="<?php
181
  echo $color ;
182
  ?>" stroke-miterlimit="10"/>
1115
  'labels' => self::getLabels(),
1116
  'ajax_search_endpoint' => self::getEndpointUrl( 'search' ),
1117
  'ajax_details_endpoint' => self::getEndpointUrl( 'details' ),
1118
+ 'ajax_prices_endpoint' => self::getEndpointUrl( 'prices' ),
1119
  'action_search' => DGWT_WCAS_SEARCH_ACTION,
1120
  'action_result_details' => DGWT_WCAS_RESULT_DETAILS_ACTION,
1121
  'action_get_prices' => DGWT_WCAS_GET_PRICES_ACTION,
1252
  $backtrace_limit = 10;
1253
  }
1254
  $result = false;
1255
+ $backtrace = self::debugBacktrace( 0, $backtrace_limit );
1256
  if ( !empty($backtrace) ) {
1257
  foreach ( $backtrace as $item ) {
1258
 
1266
  return $result;
1267
  }
1268
 
1269
+ private static function debugBacktrace( $options, $limit )
1270
+ {
1271
+ return debug_backtrace( $options, $limit );
1272
+ }
1273
+
1274
  /**
1275
  * Search products with native engine
1276
  *
1344
 
1345
  if ( defined( 'DGWT_WCAS_BA_USERNAME' ) && defined( 'DGWT_WCAS_BA_PASSWORD' ) ) {
1346
  $authorization = 'Basic ' . base64_encode( wp_unslash( DGWT_WCAS_BA_USERNAME ) . ':' . wp_unslash( DGWT_WCAS_BA_PASSWORD ) );
1347
+ } elseif ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
1348
+ $authorization = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
 
 
1349
  }
1350
 
1351
  return $authorization;
1392
  {
1393
  return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
1394
  }
1395
+
1396
+ /**
1397
+ * Get the path to the fibo directory in the theme or child theme
1398
+ *
1399
+ * @param string $path
1400
+ * @param array $vars
1401
+ *
1402
+ * @return void
1403
+ */
1404
+ public static function loadTemplate( $template = '', $vars = array() )
1405
+ {
1406
+ $path = '';
1407
+ // Load default partials from the plugin
1408
+ $file = DGWT_WCAS_DIR . 'partials/' . $template;
1409
+ if ( file_exists( $file ) ) {
1410
+ $path = $file;
1411
+ }
1412
+ // Load a partial if it is localized in the child-theme
1413
+ $file = get_stylesheet_directory() . '/fibosearch/' . $template;
1414
+ if ( file_exists( $file ) ) {
1415
+ $path = $file;
1416
+ }
1417
+ $path = apply_filters(
1418
+ 'dgwt/wcas/template',
1419
+ $path,
1420
+ $template,
1421
+ $vars
1422
+ );
1423
+ if ( file_exists( $path ) ) {
1424
+ include $path;
1425
+ }
1426
+ }
1427
 
1428
  }
includes/Integrations/Brands.php CHANGED
@@ -159,7 +159,7 @@ class Brands {
159
  /**
160
  * Get the name of the plugin vendor
161
  *
162
- * @return static
163
  */
164
  public function getPluginName() {
165
  return ! empty( $this->pluginInfo['Name'] ) ? sanitize_text_field( $this->pluginInfo['Name'] ) : '';
@@ -168,7 +168,7 @@ class Brands {
168
  /**
169
  * Get the name of the plugin vendor
170
  *
171
- * @return static
172
  */
173
  public function getPluginVersion() {
174
  return ! empty( $this->pluginInfo['Version'] ) ? sanitize_text_field( $this->pluginInfo['Version'] ) : '';
159
  /**
160
  * Get the name of the plugin vendor
161
  *
162
+ * @return string
163
  */
164
  public function getPluginName() {
165
  return ! empty( $this->pluginInfo['Name'] ) ? sanitize_text_field( $this->pluginInfo['Name'] ) : '';
168
  /**
169
  * Get the name of the plugin vendor
170
  *
171
+ * @return string
172
  */
173
  public function getPluginVersion() {
174
  return ! empty( $this->pluginInfo['Version'] ) ? sanitize_text_field( $this->pluginInfo['Version'] ) : '';
includes/Integrations/Themes/ThemesCompatibility.php CHANGED
@@ -208,6 +208,11 @@ class ThemesCompatibility {
208
  'slug' => 'uncode',
209
  'name' => 'Uncode',
210
  ),
 
 
 
 
 
211
  );
212
  }
213
 
@@ -247,18 +252,18 @@ class ThemesCompatibility {
247
  }
248
 
249
  /**
250
- * Get current theme onfo
251
  *
252
- * @return object
253
  */
254
  public function getTheme() {
255
  return $this->theme;
256
  }
257
 
258
  /**
259
- * Get current theme onfo
260
  *
261
- * @return object
262
  */
263
  public function getThemeImageSrc() {
264
  $src = '';
208
  'slug' => 'uncode',
209
  'name' => 'Uncode',
210
  ),
211
+ 'xstore' => array(
212
+ 'slug' => 'xstore',
213
+ 'className' => 'Xstore',
214
+ 'name' => 'XStore',
215
+ ),
216
  );
217
  }
218
 
252
  }
253
 
254
  /**
255
+ * Get current theme info
256
  *
257
+ * @return null|object
258
  */
259
  public function getTheme() {
260
  return $this->theme;
261
  }
262
 
263
  /**
264
+ * Get current theme image src
265
  *
266
+ * @return string
267
  */
268
  public function getThemeImageSrc() {
269
  $src = '';
includes/Integrations/Themes/Xstore/Xstore.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\Xstore;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class Xstore extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'xstore';
16
+ $this->themeName = 'XStore';
17
+
18
+ parent::__construct();
19
+ }
20
+ }
includes/Multilingual.php CHANGED
@@ -277,8 +277,20 @@ class Multilingual {
277
  if ( self::isPolylang() ) {
278
  $langs = pll_languages_list( array(
279
  'hide_empty' => false,
280
- 'fields' => 'slug'
281
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
282
  }
283
 
284
 
277
  if ( self::isPolylang() ) {
278
  $langs = pll_languages_list( array(
279
  'hide_empty' => false,
280
+ 'fields' => ''
281
  ) );
282
+
283
+ // Filter not-active languages
284
+ $langs = array_filter( $langs, function ( $lang ) {
285
+ // By default, 'active' prop isn't available; It is set the first time the administrator deactivates the language
286
+ if ( isset( $lang->active ) && ! $lang->active ) {
287
+ return false;
288
+ }
289
+
290
+ return true;
291
+ } );
292
+
293
+ $langs = wp_list_pluck( $langs, 'slug' );
294
  }
295
 
296
 
languages/ajax-search-for-woocommerce.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-11-23 10:48+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"
@@ -14,7 +14,7 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
- #: includes/Admin/Troubleshooting.php:1883
18
  msgid "\"Out of stock\" relationships"
19
  msgstr ""
20
 
@@ -54,18 +54,18 @@ msgid ""
54
  "/><br />You can do it by clicking %s or use an external plugin such as %s."
55
  msgstr ""
56
 
57
- #: ajax-search-for-woocommerce.php:240
58
  #, php-format
59
  msgid ""
60
  "%s: You need PHP version at least 7.0 to run this plugin. You are currently "
61
  "using PHP version "
62
  msgstr ""
63
 
64
- #: includes/Settings.php:735 includes/Settings.php:797
65
  msgid "-- Disabled"
66
  msgstr ""
67
 
68
- #: includes/Admin/Troubleshooting.php:1227
69
  #, php-format
70
  msgid ""
71
  "1. Unblock the default endpoint or get around the restrictions. Learn how to "
@@ -73,7 +73,7 @@ msgid ""
73
  "and fix it as soon as possible."
74
  msgstr ""
75
 
76
- #: includes/Admin/Troubleshooting.php:1228
77
  msgid ""
78
  "2. Once you do that, turn off the safe mode by clicking the following button:"
79
  msgstr ""
@@ -92,24 +92,24 @@ msgid ""
92
  "products "
93
  msgstr ""
94
 
95
- #: includes/Admin/Troubleshooting.php:1234
96
  msgid ""
97
  "<strong>Warning:</strong> We have detected that the search endpoint is being "
98
  "overwritten by the filter and alternative search endpoint will not work "
99
  "properly. Remove filters that override the search engine endpoint."
100
  msgstr ""
101
 
102
- #: includes/Admin/Troubleshooting.php:842
103
  msgid ""
104
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
105
  "it."
106
  msgstr ""
107
 
108
- #: includes/Admin/Troubleshooting.php:1586
109
  msgid "A search engine's AJAX call did not return valid results"
110
  msgstr ""
111
 
112
- #: includes/Admin/Troubleshooting.php:678
113
  #, php-format
114
  msgid ""
115
  "Add <strong>Archive Products</strong> widget to the template <strong>"
@@ -118,7 +118,8 @@ msgid ""
118
  "documentation</a>."
119
  msgstr ""
120
 
121
- #: includes/Admin/Troubleshooting.php:1044
 
122
  #, php-format
123
  msgid "Add a constant <code>%s</code> to your <code>wp-config.php</code> file."
124
  msgstr ""
@@ -148,23 +149,23 @@ msgstr ""
148
  msgid "Add new rule"
149
  msgstr ""
150
 
151
- #: includes/Admin/Troubleshooting.php:731
152
  msgid ""
153
  "Add the following PHP code to your functions.php file in the child theme or "
154
  "use e.g. CodeSnippets plugin."
155
  msgstr ""
156
 
157
- #: includes/Admin/Troubleshooting.php:1753
158
  msgid "Add the following URL to the white list:"
159
  msgstr ""
160
 
161
- #: includes/Admin/Troubleshooting.php:1701
162
  msgid ""
163
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
164
  "conf</code>"
165
  msgstr ""
166
 
167
- #: includes/Settings.php:355
168
  msgctxt "admin"
169
  msgid "No results label"
170
  msgstr ""
@@ -177,12 +178,12 @@ msgstr ""
177
  msgid "All product changes will be <strong>re-indexed automatically</strong>"
178
  msgstr ""
179
 
180
- #: includes/Admin/Troubleshooting.php:1232
181
  #, php-format
182
  msgid "Alternative endpoint: <code>%s</code>"
183
  msgstr ""
184
 
185
- #: includes/Admin/Troubleshooting.php:1868
186
  msgid "Alternative search endpoint"
187
  msgstr ""
188
 
@@ -208,7 +209,7 @@ msgstr ""
208
  msgid "Alternative ways to embed a search bar"
209
  msgstr ""
210
 
211
- #: includes/Admin/Troubleshooting.php:922
212
  #, php-format
213
  msgid ""
214
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
@@ -256,15 +257,15 @@ msgstr ""
256
  msgid "Based on the plugin %s"
257
  msgstr ""
258
 
259
- #: includes/Settings.php:183 includes/Settings.php:333
260
  msgid "Basic"
261
  msgstr ""
262
 
263
- #: includes/Admin/Troubleshooting.php:1873
264
  msgid "Blocked search endpoint test"
265
  msgstr ""
266
 
267
- #: includes/Settings.php:544
268
  msgid "Border color"
269
  msgstr ""
270
 
@@ -281,11 +282,11 @@ msgid "Build ID"
281
  msgstr ""
282
 
283
  #: partials/admin/indexer-header-demo.php:15
284
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:700
285
  msgid "Build index"
286
  msgstr ""
287
 
288
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:649
289
  msgid "Canceling..."
290
  msgstr ""
291
 
@@ -293,13 +294,13 @@ msgstr ""
293
  msgid "Cancellation..."
294
  msgstr ""
295
 
296
- #: includes/Admin/Troubleshooting.php:1129
297
  msgid ""
298
  "Change the above-mentioned language codes to the correct format: <code>"
299
  "xx</code>, <code>xxx</code>, <code>xx-xx</code> or <code>xx-xxxx</code>."
300
  msgstr ""
301
 
302
- #: includes/Admin/Troubleshooting.php:1509
303
  #, php-format
304
  msgid ""
305
  "Check how to solve this issue in <a target=\"_blank\" href=\"%s\">our "
@@ -318,11 +319,11 @@ msgstr ""
318
  msgid "child theme of <b>%s</b>"
319
  msgstr ""
320
 
321
- #: includes/Settings.php:263
322
  msgid "Colors"
323
  msgstr ""
324
 
325
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:659
326
  msgid "Completed. Works."
327
  msgstr ""
328
 
@@ -352,11 +353,11 @@ msgid ""
352
  "variables, try to solve it in an alternative way. Follow steps below:"
353
  msgstr ""
354
 
355
- #: includes/Helpers.php:991
356
  msgid "continue reading"
357
  msgstr ""
358
 
359
- #: includes/Admin/Troubleshooting.php:802
360
  #, php-format
361
  msgid ""
362
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
@@ -364,16 +365,16 @@ msgid ""
364
  "support</a>."
365
  msgstr ""
366
 
367
- #: includes/Admin/Troubleshooting.php:1235
368
  #, php-format
369
  msgid "Current endpoint: <code>%s</code>"
370
  msgstr ""
371
 
372
- #: includes/Admin/Troubleshooting.php:801
373
  msgid "Custom location of wp-load.php file"
374
  msgstr ""
375
 
376
- #: includes/Settings.php:695
377
  msgid "daily"
378
  msgstr ""
379
 
@@ -389,24 +390,24 @@ msgstr ""
389
  msgid "Default"
390
  msgstr ""
391
 
392
- #: includes/Admin/Troubleshooting.php:1231
393
  #, php-format
394
  msgid "Default endpoint: <code>%s</code>"
395
  msgstr ""
396
 
397
- #: includes/Admin/Troubleshooting.php:1621
398
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
399
  msgstr ""
400
 
401
- #: includes/Settings.php:456
402
  msgid "Details panel"
403
  msgstr ""
404
 
405
- #: includes/Admin/Troubleshooting.php:671
406
  msgid "Dismiss"
407
  msgstr ""
408
 
409
- #: includes/Admin/Troubleshooting.php:377
410
  #, php-format
411
  msgid ""
412
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
@@ -414,21 +415,21 @@ msgid ""
414
  "version</a>."
415
  msgstr ""
416
 
417
- #: includes/Admin/Troubleshooting.php:930
418
  msgid ""
419
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
420
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
421
  msgstr ""
422
 
423
- #: includes/Admin/Troubleshooting.php:1790
424
  msgid "Elementor search results template"
425
  msgstr ""
426
 
427
- #: includes/Admin/Troubleshooting.php:1498
428
  msgid "Enable alternative search endpoint"
429
  msgstr ""
430
 
431
- #: includes/Settings.php:682
432
  msgid "Enable Scheduler"
433
  msgstr ""
434
 
@@ -442,42 +443,37 @@ msgstr ""
442
  msgid "Error code %s"
443
  msgstr ""
444
 
445
- #: includes/Admin/Troubleshooting.php:921
446
  msgid "Error establishing a database connection"
447
  msgstr ""
448
 
449
- #: includes/Admin/Troubleshooting.php:1343
450
- #, php-format
451
- msgid "Error type: <strong>%s</strong>"
452
- msgstr ""
453
-
454
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:664
455
  msgid "Errors"
456
  msgstr ""
457
 
458
- #: includes/Settings.php:646 includes/Settings.php:757
459
  msgid "Exclude"
460
  msgstr ""
461
 
462
- #: includes/Settings.php:642 includes/Settings.php:753
463
  msgid ""
464
  "Exclude the product group from the search results or allow search only among "
465
  "the indicated product group"
466
  msgstr ""
467
 
468
- #: includes/Settings.php:608
469
  msgid "Exclude “out of stock” products"
470
  msgstr ""
471
 
472
- #: includes/Settings.php:635 includes/Settings.php:746
473
  msgid "Exclude/include products"
474
  msgstr ""
475
 
476
- #: includes/Admin/Troubleshooting.php:611
477
  msgid "Extensions should looks like the picture below:"
478
  msgstr ""
479
 
480
- #: includes/Admin/AdminMenu.php:58 includes/Admin/AdminMenu.php:59
481
  msgid "FiboSearch"
482
  msgstr ""
483
 
@@ -502,21 +498,21 @@ msgstr ""
502
  msgid "FiboSearch Team"
503
  msgstr ""
504
 
505
- #: includes/Admin/Troubleshooting.php:923
506
  msgid ""
507
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
508
  "connection is required."
509
  msgstr ""
510
 
511
- #: includes/Settings.php:641 includes/Settings.php:752
512
  msgid "Filtering mode"
513
  msgstr ""
514
 
515
- #: includes/Settings.php:653 includes/Settings.php:764
516
  msgid "Filters"
517
  msgstr ""
518
 
519
- #: includes/Settings.php:654 includes/Settings.php:765
520
  msgid ""
521
  "Filters that specify the product group that will be affected by the above "
522
  "mode"
@@ -527,11 +523,11 @@ msgstr ""
527
  msgid "Finalization... Wait a moment. (%s products)"
528
  msgstr ""
529
 
530
- #: includes/Admin/Troubleshooting.php:1752
531
  msgid "Find section <code>Access Control -> whitelist URL</code>"
532
  msgstr ""
533
 
534
- #: includes/Admin/Troubleshooting.php:1293
535
  msgid "Fix “Out of stock“ relationships"
536
  msgstr ""
537
 
@@ -539,11 +535,11 @@ msgstr ""
539
  msgid "Flatsome Theme"
540
  msgstr ""
541
 
542
- #: includes/Settings.php:614
543
  msgid "Fuzziness"
544
  msgstr ""
545
 
546
- #: includes/Settings.php:730 includes/Settings.php:792
547
  msgid "Fuzzy matching"
548
  msgstr ""
549
 
@@ -551,7 +547,7 @@ msgstr ""
551
  msgid "Fuzzy search"
552
  msgstr ""
553
 
554
- #: includes/Admin/Troubleshooting.php:457
555
  #, php-format
556
  msgid ""
557
  "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
@@ -567,7 +563,7 @@ msgid ""
567
  "Header -> Search</code> and enable <code>Predictive Search</code>"
568
  msgstr ""
569
 
570
- #: includes/Admin/Troubleshooting.php:1623
571
  #, php-format
572
  msgid ""
573
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
@@ -575,14 +571,14 @@ msgid ""
575
  "exceptions: <code>%s</code>"
576
  msgstr ""
577
 
578
- #: includes/Admin/Troubleshooting.php:735
579
  #, php-format
580
  msgid ""
581
  "Go to <code>Security -> Settings -> Advanced -> <a href=\"%s\" "
582
  "target=\"_blank\">System Tweaks</a></code>."
583
  msgstr ""
584
 
585
- #: includes/Admin/Troubleshooting.php:560
586
  #, php-format
587
  msgid ""
588
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -590,7 +586,7 @@ msgid ""
590
  "option <code>%s</code>."
591
  msgstr ""
592
 
593
- #: includes/Admin/Troubleshooting.php:610
594
  #, php-format
595
  msgid ""
596
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -598,32 +594,33 @@ msgid ""
598
  "Searching by Text</code> extension and save changes."
599
  msgstr ""
600
 
601
- #: includes/Admin/Troubleshooting.php:963
602
  #, php-format
603
  msgid ""
604
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
605
  "Performance tab</a> -> disable the Search module</code>"
606
  msgstr ""
607
 
608
- #: includes/Admin/Troubleshooting.php:888
609
- #: includes/Admin/Troubleshooting.php:1045
610
- #: includes/Admin/Troubleshooting.php:1130
611
- #: includes/Admin/Troubleshooting.php:1163
 
612
  #, php-format
613
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
614
  msgstr ""
615
 
616
- #: includes/Admin/Troubleshooting.php:1128
617
  msgid ""
618
  "Go to the multilingual plugin settings page and find the section where you "
619
  "can edit the available languages."
620
  msgstr ""
621
 
622
- #: includes/Admin/Troubleshooting.php:1751
623
  msgid "Go to the settings"
624
  msgstr ""
625
 
626
- #: includes/Admin/Troubleshooting.php:521
627
  msgid "Great! Our plugin works great with this version of WordPress."
628
  msgstr ""
629
 
@@ -633,15 +630,15 @@ msgid ""
633
  "functioning of our plugin."
634
  msgstr ""
635
 
636
- #: includes/Settings.php:347
637
  msgid "Group results"
638
  msgstr ""
639
 
640
- #: includes/Settings.php:738 includes/Settings.php:800
641
  msgid "Hard"
642
  msgstr ""
643
 
644
- #: includes/Admin/Troubleshooting.php:1700
645
  msgid "Here are few samples NGINX config which helps other users:"
646
  msgstr ""
647
 
@@ -663,15 +660,15 @@ msgstr ""
663
  msgid "Hide details"
664
  msgstr ""
665
 
666
- #: includes/Settings.php:537
667
  msgid "Highlight color"
668
  msgstr ""
669
 
670
- #: includes/Settings.php:168
671
  msgid "How to add search bar in your theme?"
672
  msgstr ""
673
 
674
- #: includes/Settings.php:174
675
  msgid "How to add?"
676
  msgstr ""
677
 
@@ -682,15 +679,15 @@ msgid ""
682
  "admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
683
  msgstr ""
684
 
685
- #: includes/Admin/Troubleshooting.php:1217
686
  msgid "I've fixed it! Restore the default endpoint"
687
  msgstr ""
688
 
689
- #: widget.php:41 includes/Settings.php:239 includes/EmbeddingViaMenu.php:189
690
  msgid "Icon on mobile, search bar on desktop"
691
  msgstr ""
692
 
693
- #: includes/Admin/Troubleshooting.php:1076
694
  #, php-format
695
  msgid ""
696
  "If the following errors are related to your theme or plugins, try to fix "
@@ -711,27 +708,20 @@ msgid ""
711
  "Help your customers to find the right products even <span>10× faster</span>."
712
  msgstr ""
713
 
714
- #: includes/Admin/Troubleshooting.php:1710
715
  #, php-format
716
  msgid ""
717
  "If you can't solve it on the NGINX level, try alternative 100%% reliable "
718
  "solution described <a target=\"_blank\" href=\"%s\">in this article</a>."
719
  msgstr ""
720
 
721
- #: includes/Admin/Troubleshooting.php:1344
722
- msgid ""
723
- "If you have an object caching plugin, turn it off or check its settings. "
724
- "Ideally, the transients should not be cached in any way and stored directly "
725
- "in the database."
726
- msgstr ""
727
-
728
  #: partials/admin/indexer-header.php:66
729
  msgid ""
730
  "If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
731
  "the issues mentioned there"
732
  msgstr ""
733
 
734
- #: includes/Admin/Troubleshooting.php:680
735
  #, php-format
736
  msgid ""
737
  "If you think the search results page is displaying your products correctly, "
@@ -742,12 +732,12 @@ msgstr ""
742
  msgid "Impreza Theme"
743
  msgstr ""
744
 
745
- #: includes/Helpers.php:990
746
  msgctxt "in categories fe. in Books > Crime stories"
747
  msgid "in"
748
  msgstr ""
749
 
750
- #: includes/Settings.php:683
751
  msgid ""
752
  "In most cases, you don't need to use the scheduler because the search index "
753
  "updates when you edit products. If you use import tools or custom code to "
@@ -755,44 +745,48 @@ msgid ""
755
  "helpful."
756
  msgstr ""
757
 
758
- #: includes/Settings.php:647 includes/Settings.php:758
759
  msgid "Include"
760
  msgstr ""
761
 
762
- #: includes/Admin/Troubleshooting.php:608
763
  msgid ""
764
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
765
  "Products Filter plugin is active"
766
  msgstr ""
767
 
768
- #: includes/Admin/Troubleshooting.php:1786
769
  msgid ""
770
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
771
  "Filter"
772
  msgstr ""
773
 
774
- #: includes/Admin/Troubleshooting.php:1124
775
  msgid "Incompatible multilingual plugin setting"
776
  msgstr ""
777
 
778
- #: includes/Admin/Troubleshooting.php:1778
779
  msgid "Incompatible plugins"
780
  msgstr ""
781
 
782
- #: includes/Admin/Troubleshooting.php:1041
 
 
 
 
783
  msgid "Incompatible WPML Multilingual CMS plugin setting"
784
  msgstr ""
785
 
786
- #: includes/Admin/Troubleshooting.php:558
787
- #: includes/Admin/Troubleshooting.php:1782
788
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
789
  msgstr ""
790
 
791
- #: includes/Settings.php:142
792
  msgid "Increase sales"
793
  msgstr ""
794
 
795
- #: includes/Settings.php:711
796
  msgid "Increases sales conversions"
797
  msgstr ""
798
 
@@ -804,11 +798,11 @@ msgstr ""
804
  msgid "Index build start"
805
  msgstr ""
806
 
807
- #: includes/Admin/Troubleshooting.php:1823
808
  msgid "Index completeness test"
809
  msgstr ""
810
 
811
- #: includes/Settings.php:774 includes/Settings.php:808
812
  msgid "Index status"
813
  msgstr ""
814
 
@@ -817,7 +811,7 @@ msgstr ""
817
  msgid "Indexed <strong>100&#37;</strong>, <strong>%d products</strong>."
818
  msgstr ""
819
 
820
- #: includes/Settings.php:136
821
  msgid "Indexer"
822
  msgstr ""
823
 
@@ -835,11 +829,11 @@ msgstr ""
835
  msgid "Individual tips and support by FiboSearch team"
836
  msgstr ""
837
 
838
- #: includes/Admin/Troubleshooting.php:1863
839
  msgid "InnoDB support"
840
  msgstr ""
841
 
842
- #: includes/Admin/Troubleshooting.php:839
843
  msgid ""
844
  "Install the <a target=\"_blank\" href=\"https://wordpress."
845
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
@@ -847,17 +841,17 @@ msgid ""
847
  "related to the Indexer:"
848
  msgstr ""
849
 
850
- #: includes/Admin/Troubleshooting.php:524
851
  msgid ""
852
  "Install the latest version of WordPress for our plugin to work as best it "
853
  "can!"
854
  msgstr ""
855
 
856
- #: includes/Settings.php:691
857
  msgid "Interval"
858
  msgstr ""
859
 
860
- #: includes/Admin/Troubleshooting.php:1126
861
  #, php-format
862
  msgid "Invalid language code: <code>%s</code>"
863
  msgid_plural "Invalid language codes: <code>%s</code>"
@@ -872,14 +866,14 @@ msgid ""
872
  "request</a>"
873
  msgstr ""
874
 
875
- #: includes/Admin/Troubleshooting.php:466
876
  #, php-format
877
  msgid ""
878
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
879
  "request</a>"
880
  msgstr ""
881
 
882
- #: includes/Admin/Troubleshooting.php:460
883
  msgid ""
884
  "Is your website publicly available only for whitelisted IPs? <b>Add your "
885
  "server IP to the whitelist</b>. That’s all. This is a common mistake when "
@@ -888,17 +882,17 @@ msgid ""
888
  "requests to itself."
889
  msgstr ""
890
 
891
- #: includes/Admin/Troubleshooting.php:816
892
- #: includes/Admin/Troubleshooting.php:1818
893
  msgid "Issue with WP-Cron"
894
  msgstr ""
895
 
896
- #: includes/Admin/Troubleshooting.php:729
897
  msgid ""
898
  "iThemes Security plugin blocks AJAX requests. Take a look at the solution."
899
  msgstr ""
900
 
901
- #: includes/Admin/Troubleshooting.php:1833
902
  msgid "Jetpack search module"
903
  msgstr ""
904
 
@@ -907,12 +901,12 @@ msgstr ""
907
  msgid "Last build %s"
908
  msgstr ""
909
 
910
- #: widget.php:43 includes/Settings.php:228 includes/Settings.php:234
911
  #: includes/EmbeddingViaMenu.php:74
912
  msgid "Layout"
913
  msgstr ""
914
 
915
- #: includes/Settings.php:339
916
  msgid "Limit"
917
  msgstr ""
918
 
@@ -920,7 +914,7 @@ msgstr ""
920
  msgid "Logs"
921
  msgstr ""
922
 
923
- #: includes/Admin/Troubleshooting.php:1796
924
  msgid "Loopback request"
925
  msgstr ""
926
 
@@ -939,15 +933,15 @@ msgstr ""
939
  msgid "Marketplace third-party integration"
940
  msgstr ""
941
 
942
- #: includes/Settings.php:198
943
  msgid "Max form width"
944
  msgstr ""
945
 
946
- #: includes/Settings.php:342
947
  msgid "maximum number of suggestions"
948
  msgstr ""
949
 
950
- #: includes/Admin/Troubleshooting.php:1508
951
  msgid ""
952
  "Maybe your server blocks it by the Apache module <code>mod_security</code>. "
953
  "Contact your hosting provider and ask what can block the URL you see above."
@@ -957,19 +951,19 @@ msgstr ""
957
  msgid "Menu Screen"
958
  msgstr ""
959
 
960
- #: includes/Settings.php:193
961
  msgid "Min characters to show autocomplete"
962
  msgstr ""
963
 
964
- #: includes/Settings.php:189
965
  msgid "Minimum characters"
966
  msgstr ""
967
 
968
- #: includes/Admin/Troubleshooting.php:997
969
  msgid "Missing plugin: WooCommerce Multilingual"
970
  msgstr ""
971
 
972
- #: includes/Settings.php:254
973
  msgid "Mobile breakpoint"
974
  msgstr ""
975
 
@@ -979,11 +973,11 @@ msgid ""
979
  "algorithms"
980
  msgstr ""
981
 
982
- #: includes/Settings.php:404
983
  msgid "More results label"
984
  msgstr ""
985
 
986
- #: includes/Admin/Troubleshooting.php:1853
987
  msgid "Multilingual slugs"
988
  msgstr ""
989
 
@@ -991,11 +985,11 @@ msgstr ""
991
  msgid "My Account"
992
  msgstr ""
993
 
994
- #: includes/Admin/Troubleshooting.php:1697
995
  msgid "NGINX configuration may blocks search requests"
996
  msgstr ""
997
 
998
- #: includes/Settings.php:357 includes/Helpers.php:992
999
  msgid "No results"
1000
  msgstr ""
1001
 
@@ -1007,19 +1001,19 @@ msgstr ""
1007
  msgid "No thanks"
1008
  msgstr ""
1009
 
1010
- #: includes/Admin/Troubleshooting.php:1848
1011
  msgid "Non Critical Indexer Errors"
1012
  msgstr ""
1013
 
1014
- #: includes/Settings.php:410
1015
  msgid "Non-products in autocomplete"
1016
  msgstr ""
1017
 
1018
- #: includes/Settings.php:737 includes/Settings.php:799
1019
  msgid "Normal"
1020
  msgstr ""
1021
 
1022
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:670
1023
  msgid "Not exist"
1024
  msgstr ""
1025
 
@@ -1027,31 +1021,35 @@ msgstr ""
1027
  msgid "Note: We currently only support the header type: \"Header 10\""
1028
  msgstr ""
1029
 
1030
- #: includes/Admin/Troubleshooting.php:1858
1031
  msgid "Old index"
1032
  msgstr ""
1033
 
1034
- #: includes/Admin/Troubleshooting.php:482
1035
  msgid "One or more required PHP extensions are missing on your server"
1036
  msgstr ""
1037
 
1038
- #: includes/Settings.php:246
1039
  msgid "Overlay on mobile"
1040
  msgstr ""
1041
 
1042
- #: includes/Admin/Troubleshooting.php:1828
1043
  msgid "PDO connection test"
1044
  msgstr ""
1045
 
1046
- #: includes/Admin/Troubleshooting.php:1774
1047
  msgid "PHP extensions"
1048
  msgstr ""
1049
 
 
 
 
 
1050
  #: partials/admin/indexer-body.php:63
1051
  msgid "Posts & pages"
1052
  msgstr ""
1053
 
1054
- #: includes/Settings.php:311
1055
  msgid "Preloader"
1056
  msgstr ""
1057
 
@@ -1059,18 +1057,14 @@ msgstr ""
1059
  msgid "Preview"
1060
  msgstr ""
1061
 
1062
- #: includes/Helpers.php:475 includes/Helpers.php:479
1063
  msgid "Pro"
1064
  msgstr ""
1065
 
1066
- #: includes/Settings.php:663
1067
  msgid "Pro features"
1068
  msgstr ""
1069
 
1070
- #: includes/Admin/Troubleshooting.php:1336
1071
- msgid "Problem with WordPress Transients API"
1072
- msgstr ""
1073
-
1074
  #: partials/admin/troubleshooting.php:11
1075
  msgid "Processing asynchronous tests..."
1076
  msgstr ""
@@ -1083,7 +1077,7 @@ msgstr ""
1083
  msgid "Product tags"
1084
  msgstr ""
1085
 
1086
- #: includes/Settings.php:361 partials/admin/indexer-body.php:58
1087
  msgid "Products"
1088
  msgstr ""
1089
 
@@ -1091,7 +1085,7 @@ msgstr ""
1091
  msgid "Products search"
1092
  msgstr ""
1093
 
1094
- #: includes/Settings.php:553
1095
  msgid "Products search scope"
1096
  msgstr ""
1097
 
@@ -1101,11 +1095,11 @@ msgid ""
1101
  "search bar in your theme"
1102
  msgstr ""
1103
 
1104
- #: includes/Settings.php:255
1105
  msgid "px"
1106
  msgstr ""
1107
 
1108
- #: includes/Admin/Troubleshooting.php:465
1109
  #, php-format
1110
  msgid ""
1111
  "Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
@@ -1113,7 +1107,7 @@ msgid ""
1113
  "request to itself”."
1114
  msgstr ""
1115
 
1116
- #: includes/Admin/Troubleshooting.php:738
1117
  #, php-format
1118
  msgid ""
1119
  "Read more about this issue in <a href=\"%s\" target=\"_blank\">our "
@@ -1124,11 +1118,12 @@ msgstr ""
1124
  msgid "Readable"
1125
  msgstr ""
1126
 
1127
- #: includes/Admin/Troubleshooting.php:882
1128
- #: includes/Admin/Troubleshooting.php:1038
1129
- #: includes/Admin/Troubleshooting.php:1121
1130
- #: includes/Admin/Troubleshooting.php:1159
1131
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:694
 
1132
  msgid "Rebuild index"
1133
  msgstr ""
1134
 
@@ -1210,17 +1205,17 @@ msgstr ""
1210
  msgid "Replace the TheGem default search"
1211
  msgstr ""
1212
 
1213
- #: includes/Admin/Troubleshooting.php:492
1214
- #: includes/Admin/Troubleshooting.php:495
1215
  #, php-format
1216
  msgid "Required PHP extension: %s"
1217
  msgstr ""
1218
 
1219
- #: includes/Admin/Troubleshooting.php:1588
1220
  msgid "Response body"
1221
  msgstr ""
1222
 
1223
- #: includes/Settings.php:712
1224
  msgid ""
1225
  "returns suggestions based on likely relevance, even though a search keyword "
1226
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
@@ -1260,15 +1255,15 @@ msgstr ""
1260
  msgid "Sample tag <strong>name</strong>"
1261
  msgstr ""
1262
 
1263
- #: includes/Settings.php:702
1264
  msgid "Schedule time"
1265
  msgstr ""
1266
 
1267
- #: includes/Settings.php:676
1268
  msgid "Scheduling indexing"
1269
  msgstr ""
1270
 
1271
- #: includes/Settings.php:218 partials/search-form.php:47
1272
  msgid "Search"
1273
  msgstr ""
1274
 
@@ -1277,7 +1272,7 @@ msgstr ""
1277
  msgid "Search bar"
1278
  msgstr ""
1279
 
1280
- #: widget.php:39 includes/Settings.php:237 includes/EmbeddingViaMenu.php:187
1281
  msgid "Search bar only"
1282
  msgstr ""
1283
 
@@ -1293,11 +1288,11 @@ msgstr ""
1293
  msgid "Search for posts and pages"
1294
  msgstr ""
1295
 
1296
- #: includes/Settings.php:224 includes/Helpers.php:995
1297
  msgid "Search for products..."
1298
  msgstr ""
1299
 
1300
- #: widget.php:40 includes/Settings.php:238 includes/Settings.php:269
1301
  #: includes/EmbeddingViaMenu.php:188
1302
  msgid "Search icon"
1303
  msgstr ""
@@ -1311,7 +1306,7 @@ msgstr ""
1311
  msgid "Search in %s"
1312
  msgstr ""
1313
 
1314
- #: includes/Settings.php:580 partials/admin/features.php:23
1315
  msgid "Search in attributes"
1316
  msgstr ""
1317
 
@@ -1327,28 +1322,28 @@ msgstr ""
1327
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1328
  msgstr ""
1329
 
1330
- #: includes/Settings.php:587 partials/admin/features.php:24
1331
  msgid "Search in categories"
1332
  msgstr ""
1333
 
1334
- #: includes/Settings.php:601 includes/Settings.php:721
1335
  #: partials/admin/features.php:22
1336
  msgid "Search in custom fields"
1337
  msgstr ""
1338
 
1339
- #: includes/Settings.php:559
1340
  msgid "Search in description"
1341
  msgstr ""
1342
 
1343
- #: includes/Settings.php:565
1344
  msgid "Search in short description"
1345
  msgstr ""
1346
 
1347
- #: includes/Settings.php:571
1348
  msgid "Search in SKU"
1349
  msgstr ""
1350
 
1351
- #: includes/Settings.php:594 partials/admin/features.php:25
1352
  msgid "Search in tags"
1353
  msgstr ""
1354
 
@@ -1356,27 +1351,27 @@ msgstr ""
1356
  msgid "Search in vendors"
1357
  msgstr ""
1358
 
1359
- #: includes/Settings.php:276
1360
  msgid "Search input background"
1361
  msgstr ""
1362
 
1363
- #: includes/Settings.php:290
1364
  msgid "Search input border"
1365
  msgstr ""
1366
 
1367
- #: includes/Settings.php:222
1368
  msgid "Search input placeholder"
1369
  msgstr ""
1370
 
1371
- #: includes/Settings.php:283
1372
  msgid "Search input text"
1373
  msgstr ""
1374
 
1375
- #: includes/Settings.php:297
1376
  msgid "Search submit background"
1377
  msgstr ""
1378
 
1379
- #: includes/Settings.php:304
1380
  msgid "Search submit text"
1381
  msgstr ""
1382
 
@@ -1384,11 +1379,11 @@ msgstr ""
1384
  msgid "Searchable"
1385
  msgstr ""
1386
 
1387
- #: includes/Settings.php:573
1388
  msgid "searching also in variable products SKU"
1389
  msgstr ""
1390
 
1391
- #: includes/Settings.php:574
1392
  #, php-format
1393
  msgid ""
1394
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
@@ -1399,7 +1394,7 @@ msgstr ""
1399
  msgid "See a comparison of all free and premium features!"
1400
  msgstr ""
1401
 
1402
- #: includes/Settings.php:406 includes/Helpers.php:993 includes/Helpers.php:994
1403
  msgid "See all products..."
1404
  msgstr ""
1405
 
@@ -1407,16 +1402,16 @@ msgstr ""
1407
  msgid "Select filter type"
1408
  msgstr ""
1409
 
1410
- #: includes/Settings.php:724
1411
  msgid "select the custom fields you want to add to the search scope"
1412
  msgstr ""
1413
 
1414
- #: includes/Admin/Troubleshooting.php:2017
1415
  msgid "Server environment"
1416
  msgstr ""
1417
 
1418
- #: includes/Admin/Troubleshooting.php:1501
1419
- #: includes/Admin/Troubleshooting.php:1587
1420
  #, php-format
1421
  msgid ""
1422
  "Server response with message <code>%s</code> and status code <code>%s</code>."
@@ -1440,7 +1435,7 @@ msgstr ""
1440
  msgid "Show brands"
1441
  msgstr ""
1442
 
1443
- #: includes/Settings.php:416
1444
  msgid "Show categories"
1445
  msgstr ""
1446
 
@@ -1449,11 +1444,11 @@ msgstr ""
1449
  msgid "Show details"
1450
  msgstr ""
1451
 
1452
- #: includes/Settings.php:462
1453
  msgid "Show Details panel"
1454
  msgstr ""
1455
 
1456
- #: includes/Settings.php:424 includes/Settings.php:428
1457
  #: includes/Integrations/Brands.php:229 includes/Integrations/Brands.php:233
1458
  #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:208
1459
  #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:212
@@ -1462,39 +1457,39 @@ msgstr ""
1462
  msgid "show images"
1463
  msgstr ""
1464
 
1465
- #: includes/Settings.php:449
1466
  msgid "Show pages"
1467
  msgstr ""
1468
 
1469
- #: includes/Settings.php:442
1470
  msgid "Show posts"
1471
  msgstr ""
1472
 
1473
- #: includes/Settings.php:317
1474
  msgid "Show preloader"
1475
  msgstr ""
1476
 
1477
- #: includes/Settings.php:373
1478
  msgid "Show price"
1479
  msgstr ""
1480
 
1481
- #: includes/Settings.php:379
1482
  msgid "Show product description"
1483
  msgstr ""
1484
 
1485
- #: includes/Settings.php:367
1486
  msgid "Show product image"
1487
  msgstr ""
1488
 
1489
- #: includes/Settings.php:386
1490
  msgid "Show SKU"
1491
  msgstr ""
1492
 
1493
- #: includes/Settings.php:207
1494
  msgid "Show submit button"
1495
  msgstr ""
1496
 
1497
- #: includes/Settings.php:434
1498
  msgid "Show tags"
1499
  msgstr ""
1500
 
@@ -1506,36 +1501,37 @@ msgstr ""
1506
  msgid "Showcase"
1507
  msgstr ""
1508
 
1509
- #: includes/Settings.php:736 includes/Settings.php:798
1510
  msgid "Soft"
1511
  msgstr ""
1512
 
1513
- #: includes/Helpers.php:988
1514
  msgid "Sold by:"
1515
  msgstr ""
1516
 
1517
- #: includes/Admin/Troubleshooting.php:559
1518
- #: includes/Admin/Troubleshooting.php:609
1519
- #: includes/Admin/Troubleshooting.php:677
1520
- #: includes/Admin/Troubleshooting.php:838
1521
- #: includes/Admin/Troubleshooting.php:929
1522
- #: includes/Admin/Troubleshooting.php:1043
1523
- #: includes/Admin/Troubleshooting.php:1127
1524
- #: includes/Admin/Troubleshooting.php:1622
1525
- #: includes/Admin/Troubleshooting.php:1669
1526
- #: includes/Admin/Troubleshooting.php:1749
 
1527
  msgid "Solution"
1528
  msgstr ""
1529
 
1530
- #: includes/Admin/Troubleshooting.php:1506
1531
  msgid "Solutions"
1532
  msgstr ""
1533
 
1534
- #: includes/Admin/Troubleshooting.php:453
1535
  msgid "Solutions:"
1536
  msgstr ""
1537
 
1538
- #: includes/Admin/Troubleshooting.php:1698
1539
  #, php-format
1540
  msgid ""
1541
  "Some NGINX configuration may block executing PHP files included directly in "
@@ -1544,7 +1540,7 @@ msgid ""
1544
  "to execute the following file: %s"
1545
  msgstr ""
1546
 
1547
- #: includes/Settings.php:669
1548
  msgid "Speed up search!"
1549
  msgstr ""
1550
 
@@ -1565,13 +1561,13 @@ msgstr ""
1565
  msgid "Status"
1566
  msgstr ""
1567
 
1568
- #: includes/Admin/Troubleshooting.php:730
1569
- #: includes/Admin/Troubleshooting.php:733
1570
  #, php-format
1571
  msgid "Step %d"
1572
  msgstr ""
1573
 
1574
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:691
1575
  msgid "Stop process"
1576
  msgstr ""
1577
 
@@ -1579,32 +1575,32 @@ msgstr ""
1579
  msgid "Storefront Theme"
1580
  msgstr ""
1581
 
1582
- #: includes/Settings.php:215
1583
  msgid "Submit label"
1584
  msgstr ""
1585
 
1586
- #: includes/Admin/Troubleshooting.php:1748
1587
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1588
  msgstr ""
1589
 
1590
- #: includes/Settings.php:516
1591
  msgid "Suggestion background"
1592
  msgstr ""
1593
 
1594
- #: includes/Settings.php:523
1595
  msgid "Suggestion selected"
1596
  msgstr ""
1597
 
1598
- #: includes/Settings.php:510
1599
  msgid "Suggestions colors"
1600
  msgstr ""
1601
 
1602
- #: includes/Settings.php:620 includes/Settings.php:626
1603
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1604
  msgid "Synonyms"
1605
  msgstr ""
1606
 
1607
- #: includes/Settings.php:629
1608
  msgid ""
1609
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1610
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
@@ -1616,22 +1612,22 @@ msgstr ""
1616
  msgid "Taxonomies"
1617
  msgstr ""
1618
 
1619
- #: includes/Settings.php:530
1620
  msgid "Text color"
1621
  msgstr ""
1622
 
1623
- #: includes/Admin/Troubleshooting.php:1668
1624
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1625
  msgstr ""
1626
 
1627
- #: includes/Admin/Troubleshooting.php:1226
1628
  msgid ""
1629
  "The default search endpoint has been blocked and you decided to switch on "
1630
  "the alternative endpoint to make the search working in emergency mode. What "
1631
  "should you do next?"
1632
  msgstr ""
1633
 
1634
- #: includes/Settings.php:463
1635
  msgid ""
1636
  "The Details panel is an additional container for extended information. The "
1637
  "details are changed dynamically when a user mouse over one of the "
@@ -1649,25 +1645,25 @@ msgstr ""
1649
  msgid "The following error caused the index to be canceled:"
1650
  msgstr ""
1651
 
1652
- #: includes/Admin/Troubleshooting.php:1162
1653
  msgid "The index was built by the previous plugin version"
1654
  msgstr ""
1655
 
1656
- #: includes/Admin/Troubleshooting.php:448
1657
  msgid ""
1658
  "The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
1659
  "build the index in background. Sometimes the server can block this kind of "
1660
  "request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
1661
  msgstr ""
1662
 
1663
- #: includes/Admin/Troubleshooting.php:1192
1664
  msgid ""
1665
  "The InnoDB engine within the MySQL server must be enabled for our plugin to "
1666
  "work properly. Contact your hosting provider and ask for enabling InnoDB "
1667
  "engine in your MySQL server."
1668
  msgstr ""
1669
 
1670
- #: includes/Admin/Troubleshooting.php:962
1671
  #, php-format
1672
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1673
  msgstr ""
@@ -1678,7 +1674,7 @@ msgid ""
1678
  "designed advanced AJAX search bar with live search suggestions."
1679
  msgstr ""
1680
 
1681
- #: includes/Admin/Troubleshooting.php:1191
1682
  msgid "The MySQL server has the InnoDB engine turned off"
1683
  msgstr ""
1684
 
@@ -1687,66 +1683,58 @@ msgstr ""
1687
  msgid "the next index rebuild: %s"
1688
  msgstr ""
1689
 
1690
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:663
1691
  msgid "The search index could not be built."
1692
  msgstr ""
1693
 
1694
  #: partials/admin/indexer-header-demo.php:11
1695
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:669
1696
  msgid "The search index does not exist yet. Build it now."
1697
  msgstr ""
1698
 
1699
- #: includes/Admin/Troubleshooting.php:886
1700
  msgid "The search index structure isn't complete"
1701
  msgstr ""
1702
 
1703
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:657
1704
  msgid ""
1705
  "The search index was built successfully, but some non-critical errors "
1706
  "occurred."
1707
  msgstr ""
1708
 
1709
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:655
1710
  msgid "The search index was built successfully."
1711
  msgstr ""
1712
 
1713
- #: includes/Admin/Troubleshooting.php:1075
1714
  msgid ""
1715
  "The search index was built, but some significant errors occurred during this "
1716
  "process. There is a risk that some products may not be available during the "
1717
  "search."
1718
  msgstr ""
1719
 
1720
- #: includes/Admin/Troubleshooting.php:1503
1721
  msgid ""
1722
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1723
  "blocked for some reason. Let visit it directly in your browser:"
1724
  msgstr ""
1725
 
1726
- #: includes/Settings.php:247
1727
  msgid "The search will open in overlay on mobile"
1728
  msgstr ""
1729
 
1730
- #: includes/Admin/Troubleshooting.php:1500
1731
  msgid ""
1732
  "The server returns an incorrect response for the search engine's AJAX calls"
1733
  msgstr ""
1734
 
1735
- #: includes/Settings.php:627
1736
  msgid ""
1737
  "The synonyms feature allows your users to find more relevant results. If "
1738
  "your products have alternative names and users often misspell them, consider "
1739
  "adding synonyms."
1740
  msgstr ""
1741
 
1742
- #: includes/Admin/Troubleshooting.php:1341
1743
- msgid "the transient value was cached and existed too long"
1744
- msgstr ""
1745
-
1746
- #: includes/Admin/Troubleshooting.php:1339
1747
- msgid "the transient value was not returned"
1748
- msgstr ""
1749
-
1750
  #: includes/Integrations/Themes/TheGem/TheGem.php:79
1751
  msgid "TheGem Theme"
1752
  msgstr ""
@@ -1755,38 +1743,38 @@ msgstr ""
1755
  msgid "There are four easy ways to display the search bar in your theme"
1756
  msgstr ""
1757
 
1758
- #: includes/Admin/Troubleshooting.php:1295
1759
  msgid ""
1760
  "There is a problem with the visibility of products with “Out of stock“ status"
1761
  msgstr ""
1762
 
1763
- #: includes/Admin/Troubleshooting.php:675
1764
  msgid ""
1765
  "There is no correct template in Elementor Theme Builder for the WooCommerce "
1766
  "search results page."
1767
  msgstr ""
1768
 
1769
- #: includes/Admin/Troubleshooting.php:1507
1770
  msgid ""
1771
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1772
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1773
  "some security plugins or you have custom code that may block it."
1774
  msgstr ""
1775
 
1776
- #: includes/Admin/Troubleshooting.php:447
1777
  msgid ""
1778
  "This issue may affect the building of the search index. Indexer may stuck at "
1779
  "0%."
1780
  msgstr ""
1781
 
1782
- #: includes/Admin/Troubleshooting.php:443
1783
  msgid ""
1784
  "This issue may affect the search results page and e.g. display all products "
1785
  "every time"
1786
  msgstr ""
1787
 
1788
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:637
1789
  #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:643
 
1790
  msgid "This process will continue in the background. You can leave this page!"
1791
  msgstr ""
1792
 
@@ -1799,7 +1787,7 @@ msgstr ""
1799
  msgid "Title"
1800
  msgstr ""
1801
 
1802
- #: includes/Settings.php:215
1803
  msgid "To display the magnifier icon leave this field empty."
1804
  msgstr ""
1805
 
@@ -1809,42 +1797,38 @@ msgid ""
1809
  "the Shopkeeper settings."
1810
  msgstr ""
1811
 
1812
- #: includes/Settings.php:201
1813
  msgid "To set 100% width leave blank"
1814
  msgstr ""
1815
 
1816
- #: includes/Admin/Troubleshooting.php:1297
1817
  #, php-format
1818
  msgid ""
1819
  "Total “out of stock“ products calculated by <code>wc_get_products()</code> "
1820
  "function: <b>%d</b>"
1821
  msgstr ""
1822
 
1823
- #: includes/Admin/Troubleshooting.php:1298
1824
  #, php-format
1825
  msgid ""
1826
  "Total “out of stock“ products calculated by SQL query on <code>%s</code>: <b>"
1827
  "%d</b>"
1828
  msgstr ""
1829
 
1830
- #: includes/Admin/Troubleshooting.php:1888
1831
- msgid "Transients test"
1832
- msgstr ""
1833
-
1834
- #: includes/Admin/Troubleshooting.php:1805
1835
  msgid "TranslatePress"
1836
  msgstr ""
1837
 
1838
- #: includes/Admin/Troubleshooting.php:66 includes/Admin/Troubleshooting.php:85
1839
  #: partials/admin/indexer-header.php:40
1840
  msgid "Troubleshooting"
1841
  msgstr ""
1842
 
1843
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:697
1844
  msgid "Try to build the index again."
1845
  msgstr ""
1846
 
1847
- #: includes/Admin/Troubleshooting.php:736
1848
  msgid ""
1849
  "Uncheck the option <code>Disable PHP in Plugins</code>. Save settings. Right "
1850
  "after that <b>check this option again</b> and save settings one more time."
@@ -1870,7 +1854,7 @@ msgstr ""
1870
  msgid "Upgrade Now!"
1871
  msgstr ""
1872
 
1873
- #: includes/Settings.php:324
1874
  msgid "Upload preloader image"
1875
  msgstr ""
1876
 
@@ -1884,27 +1868,27 @@ msgstr ""
1884
  msgid "Using PHP - %s"
1885
  msgstr ""
1886
 
1887
- #: includes/Admin/Troubleshooting.php:1878
1888
  msgid "Valid search results test"
1889
  msgstr ""
1890
 
1891
- #: includes/Helpers.php:981
1892
  msgid "Vendor"
1893
  msgstr ""
1894
 
1895
- #: includes/Helpers.php:985
1896
  msgid "Vendors"
1897
  msgstr ""
1898
 
1899
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:642
1900
  msgid "Wait... Indexing in progress"
1901
  msgstr ""
1902
 
1903
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:636
1904
  msgid "Wait... Preparing indexing in progress"
1905
  msgstr ""
1906
 
1907
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:648
1908
  msgid "Wait... The index build process is canceling"
1909
  msgstr ""
1910
 
@@ -1912,7 +1896,7 @@ msgstr ""
1912
  msgid "Warning!"
1913
  msgstr ""
1914
 
1915
- #: includes/Admin/Troubleshooting.php:1670
1916
  #, php-format
1917
  msgid ""
1918
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
@@ -1928,7 +1912,7 @@ msgid ""
1928
  "We support this theme and you can easily replace all default search bars."
1929
  msgstr ""
1930
 
1931
- #: includes/Admin/Troubleshooting.php:1296
1932
  msgid ""
1933
  "We've detected that some products with a status “Out of Stock“ may have "
1934
  "something wrong with relationships in the database. It affects visibility of "
@@ -1936,11 +1920,11 @@ msgid ""
1936
  "from a different WordPress."
1937
  msgstr ""
1938
 
1939
- #: includes/Settings.php:696
1940
  msgid "weekly"
1941
  msgstr ""
1942
 
1943
- #: includes/Admin/Troubleshooting.php:1502
1944
  msgid "What's wrong?"
1945
  msgstr ""
1946
 
@@ -1948,32 +1932,32 @@ msgstr ""
1948
  msgid "Widgets Screen"
1949
  msgstr ""
1950
 
1951
- #: includes/Settings.php:144
1952
  msgid "with simple tricks"
1953
  msgstr ""
1954
 
1955
- #: includes/Admin/Troubleshooting.php:1838
1956
  msgid "WooCommerce Multilingual"
1957
  msgstr ""
1958
 
1959
- #: includes/Admin/Troubleshooting.php:1002
1960
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1961
  msgstr ""
1962
 
1963
- #: includes/Admin/Troubleshooting.php:1813
1964
  msgid "WordPress loading problem"
1965
  msgstr ""
1966
 
1967
- #: includes/Admin/Troubleshooting.php:512
1968
- #: includes/Admin/Troubleshooting.php:1770
1969
  msgid "WordPress version"
1970
  msgstr ""
1971
 
1972
- #: includes/Admin/Troubleshooting.php:1843
1973
  msgid "WPML with disabled translations for products"
1974
  msgstr ""
1975
 
1976
- #: includes/Admin/Troubleshooting.php:676
1977
  #, php-format
1978
  msgid ""
1979
  "You are using Elementor and we noticed that the template used in the search "
@@ -1981,51 +1965,58 @@ msgid ""
1981
  "Products</strong> widget."
1982
  msgstr ""
1983
 
1984
- #: includes/Admin/Troubleshooting.php:325
1985
  msgid "You are using one or more incompatible plugins"
1986
  msgstr ""
1987
 
1988
- #: includes/Admin/Troubleshooting.php:1125
 
 
 
 
 
 
 
1989
  msgid ""
1990
  "You are using the multilingual plugin, but one or more of the language codes "
1991
  "has wrong format. This needs to be corrected or the index will not be able "
1992
  "to build properly."
1993
  msgstr ""
1994
 
1995
- #: includes/Admin/Troubleshooting.php:366
1996
  msgid "You are using TranslatePress with Free version of our plugin"
1997
  msgstr ""
1998
 
1999
- #: includes/Admin/Troubleshooting.php:1042
2000
  msgid ""
2001
  "You are using WPML Multilingual CMS, but you have product translations "
2002
  "disabled, so for the search engine to function properly, you must disable "
2003
  "its multi-language support feature."
2004
  msgstr ""
2005
 
2006
- #: includes/Admin/Troubleshooting.php:1299
2007
  #, php-format
2008
  msgid "You can fix it by clicking on this button: %s"
2009
  msgstr ""
2010
 
2011
- #: includes/Admin/Troubleshooting.php:841
2012
  msgid ""
2013
  "You can run these actions manually via Advanced Cron Manager. Then the "
2014
  "Indexer should run. If the index stuck again, run these actions manually one "
2015
  "more time until the finished index."
2016
  msgstr ""
2017
 
2018
- #: includes/Admin/Troubleshooting.php:1225
2019
  msgid "You have activated the alternative search endpoint"
2020
  msgstr ""
2021
 
2022
- #: includes/Admin/Troubleshooting.php:1750
2023
  msgid ""
2024
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
2025
  "target=\"_blank\">Sucuri panel</a>."
2026
  msgstr ""
2027
 
2028
- #: includes/Admin/Troubleshooting.php:1505
2029
  msgid ""
2030
  "You should see <code>pong</code> word as a response. Probably you see "
2031
  "something else."
@@ -2036,16 +2027,16 @@ msgstr ""
2036
  msgid "You use %s plugin version %s"
2037
  msgstr ""
2038
 
2039
- #: includes/Admin/Troubleshooting.php:345
2040
- #: includes/Admin/Troubleshooting.php:347
2041
  #, php-format
2042
  msgid ""
2043
  "You use the %s plugin, which may cause errors in the search results returned "
2044
  "by our plugin."
2045
  msgstr ""
2046
 
2047
- #: includes/Admin/Troubleshooting.php:336
2048
- #: includes/Admin/Troubleshooting.php:340
2049
  #, php-format
2050
  msgid "You use the %s plugin. The %s does not support this plugin."
2051
  msgstr ""
@@ -2055,7 +2046,7 @@ msgstr ""
2055
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
2056
  msgstr ""
2057
 
2058
- #: includes/Admin/Troubleshooting.php:1003
2059
  #, php-format
2060
  msgid ""
2061
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
@@ -2063,7 +2054,7 @@ msgid ""
2063
  "target=\"_blank\">WooCommerce Multilingual status</a>."
2064
  msgstr ""
2065
 
2066
- #: includes/Admin/Troubleshooting.php:998
2067
  #, php-format
2068
  msgid ""
2069
  "You use the WPML Multilingual CMS plugin and to correctly search for "
@@ -2071,18 +2062,18 @@ msgid ""
2071
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
2072
  msgstr ""
2073
 
2074
- #: includes/Admin/Troubleshooting.php:455
2075
  msgid "Your server can't send an HTTP request to itself"
2076
  msgstr ""
2077
 
2078
- #: includes/Admin/Troubleshooting.php:561
2079
  msgid "Your settings should looks like the picture below:"
2080
  msgstr ""
2081
 
2082
- #: includes/Admin/Troubleshooting.php:390
2083
  msgid "Your site can perform loopback requests"
2084
  msgstr ""
2085
 
2086
- #: includes/Admin/Troubleshooting.php:439
2087
  msgid "Your site could not complete a loopback request"
2088
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2022-01-24 10:47+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"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/"
16
 
17
+ #: includes/Admin/Troubleshooting.php:1874
18
  msgid "\"Out of stock\" relationships"
19
  msgstr ""
20
 
54
  "/><br />You can do it by clicking %s or use an external plugin such as %s."
55
  msgstr ""
56
 
57
+ #: ajax-search-for-woocommerce.php:242
58
  #, php-format
59
  msgid ""
60
  "%s: You need PHP version at least 7.0 to run this plugin. You are currently "
61
  "using PHP version "
62
  msgstr ""
63
 
64
+ #: includes/Settings.php:743 includes/Settings.php:805
65
  msgid "-- Disabled"
66
  msgstr ""
67
 
68
+ #: includes/Admin/Troubleshooting.php:1256
69
  #, php-format
70
  msgid ""
71
  "1. Unblock the default endpoint or get around the restrictions. Learn how to "
73
  "and fix it as soon as possible."
74
  msgstr ""
75
 
76
+ #: includes/Admin/Troubleshooting.php:1257
77
  msgid ""
78
  "2. Once you do that, turn off the safe mode by clicking the following button:"
79
  msgstr ""
92
  "products "
93
  msgstr ""
94
 
95
+ #: includes/Admin/Troubleshooting.php:1263
96
  msgid ""
97
  "<strong>Warning:</strong> We have detected that the search endpoint is being "
98
  "overwritten by the filter and alternative search endpoint will not work "
99
  "properly. Remove filters that override the search engine endpoint."
100
  msgstr ""
101
 
102
+ #: includes/Admin/Troubleshooting.php:837
103
  msgid ""
104
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
105
  "it."
106
  msgstr ""
107
 
108
+ #: includes/Admin/Troubleshooting.php:1572
109
  msgid "A search engine's AJAX call did not return valid results"
110
  msgstr ""
111
 
112
+ #: includes/Admin/Troubleshooting.php:673
113
  #, php-format
114
  msgid ""
115
  "Add <strong>Archive Products</strong> widget to the template <strong>"
118
  "documentation</a>."
119
  msgstr ""
120
 
121
+ #: includes/Admin/Troubleshooting.php:1039
122
+ #: includes/Admin/Troubleshooting.php:1073
123
  #, php-format
124
  msgid "Add a constant <code>%s</code> to your <code>wp-config.php</code> file."
125
  msgstr ""
149
  msgid "Add new rule"
150
  msgstr ""
151
 
152
+ #: includes/Admin/Troubleshooting.php:726
153
  msgid ""
154
  "Add the following PHP code to your functions.php file in the child theme or "
155
  "use e.g. CodeSnippets plugin."
156
  msgstr ""
157
 
158
+ #: includes/Admin/Troubleshooting.php:1739
159
  msgid "Add the following URL to the white list:"
160
  msgstr ""
161
 
162
+ #: includes/Admin/Troubleshooting.php:1687
163
  msgid ""
164
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
165
  "conf</code>"
166
  msgstr ""
167
 
168
+ #: includes/Settings.php:363
169
  msgctxt "admin"
170
  msgid "No results label"
171
  msgstr ""
178
  msgid "All product changes will be <strong>re-indexed automatically</strong>"
179
  msgstr ""
180
 
181
+ #: includes/Admin/Troubleshooting.php:1261
182
  #, php-format
183
  msgid "Alternative endpoint: <code>%s</code>"
184
  msgstr ""
185
 
186
+ #: includes/Admin/Troubleshooting.php:1859
187
  msgid "Alternative search endpoint"
188
  msgstr ""
189
 
209
  msgid "Alternative ways to embed a search bar"
210
  msgstr ""
211
 
212
+ #: includes/Admin/Troubleshooting.php:917
213
  #, php-format
214
  msgid ""
215
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
257
  msgid "Based on the plugin %s"
258
  msgstr ""
259
 
260
+ #: includes/Settings.php:191 includes/Settings.php:341
261
  msgid "Basic"
262
  msgstr ""
263
 
264
+ #: includes/Admin/Troubleshooting.php:1864
265
  msgid "Blocked search endpoint test"
266
  msgstr ""
267
 
268
+ #: includes/Settings.php:552
269
  msgid "Border color"
270
  msgstr ""
271
 
282
  msgstr ""
283
 
284
  #: partials/admin/indexer-header-demo.php:15
285
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:706
286
  msgid "Build index"
287
  msgstr ""
288
 
289
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:655
290
  msgid "Canceling..."
291
  msgstr ""
292
 
294
  msgid "Cancellation..."
295
  msgstr ""
296
 
297
+ #: includes/Admin/Troubleshooting.php:1158
298
  msgid ""
299
  "Change the above-mentioned language codes to the correct format: <code>"
300
  "xx</code>, <code>xxx</code>, <code>xx-xx</code> or <code>xx-xxxx</code>."
301
  msgstr ""
302
 
303
+ #: includes/Admin/Troubleshooting.php:1495
304
  #, php-format
305
  msgid ""
306
  "Check how to solve this issue in <a target=\"_blank\" href=\"%s\">our "
319
  msgid "child theme of <b>%s</b>"
320
  msgstr ""
321
 
322
+ #: includes/Settings.php:271
323
  msgid "Colors"
324
  msgstr ""
325
 
326
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:665
327
  msgid "Completed. Works."
328
  msgstr ""
329
 
353
  "variables, try to solve it in an alternative way. Follow steps below:"
354
  msgstr ""
355
 
356
+ #: includes/Helpers.php:994
357
  msgid "continue reading"
358
  msgstr ""
359
 
360
+ #: includes/Admin/Troubleshooting.php:797
361
  #, php-format
362
  msgid ""
363
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
365
  "support</a>."
366
  msgstr ""
367
 
368
+ #: includes/Admin/Troubleshooting.php:1264
369
  #, php-format
370
  msgid "Current endpoint: <code>%s</code>"
371
  msgstr ""
372
 
373
+ #: includes/Admin/Troubleshooting.php:796
374
  msgid "Custom location of wp-load.php file"
375
  msgstr ""
376
 
377
+ #: includes/Settings.php:703
378
  msgid "daily"
379
  msgstr ""
380
 
390
  msgid "Default"
391
  msgstr ""
392
 
393
+ #: includes/Admin/Troubleshooting.php:1260
394
  #, php-format
395
  msgid "Default endpoint: <code>%s</code>"
396
  msgstr ""
397
 
398
+ #: includes/Admin/Troubleshooting.php:1607
399
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
400
  msgstr ""
401
 
402
+ #: includes/Settings.php:464
403
  msgid "Details panel"
404
  msgstr ""
405
 
406
+ #: includes/Admin/Troubleshooting.php:666
407
  msgid "Dismiss"
408
  msgstr ""
409
 
410
+ #: includes/Admin/Troubleshooting.php:372
411
  #, php-format
412
  msgid ""
413
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
415
  "version</a>."
416
  msgstr ""
417
 
418
+ #: includes/Admin/Troubleshooting.php:925
419
  msgid ""
420
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
421
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
422
  msgstr ""
423
 
424
+ #: includes/Admin/Troubleshooting.php:1776
425
  msgid "Elementor search results template"
426
  msgstr ""
427
 
428
+ #: includes/Admin/Troubleshooting.php:1484
429
  msgid "Enable alternative search endpoint"
430
  msgstr ""
431
 
432
+ #: includes/Settings.php:690
433
  msgid "Enable Scheduler"
434
  msgstr ""
435
 
443
  msgid "Error code %s"
444
  msgstr ""
445
 
446
+ #: includes/Admin/Troubleshooting.php:916
447
  msgid "Error establishing a database connection"
448
  msgstr ""
449
 
450
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:670
 
 
 
 
 
451
  msgid "Errors"
452
  msgstr ""
453
 
454
+ #: includes/Settings.php:654 includes/Settings.php:765
455
  msgid "Exclude"
456
  msgstr ""
457
 
458
+ #: includes/Settings.php:650 includes/Settings.php:761
459
  msgid ""
460
  "Exclude the product group from the search results or allow search only among "
461
  "the indicated product group"
462
  msgstr ""
463
 
464
+ #: includes/Settings.php:616
465
  msgid "Exclude “out of stock” products"
466
  msgstr ""
467
 
468
+ #: includes/Settings.php:643 includes/Settings.php:754
469
  msgid "Exclude/include products"
470
  msgstr ""
471
 
472
+ #: includes/Admin/Troubleshooting.php:606
473
  msgid "Extensions should looks like the picture below:"
474
  msgstr ""
475
 
476
+ #: includes/Admin/AdminMenu.php:70 includes/Admin/AdminMenu.php:71
477
  msgid "FiboSearch"
478
  msgstr ""
479
 
498
  msgid "FiboSearch Team"
499
  msgstr ""
500
 
501
+ #: includes/Admin/Troubleshooting.php:918
502
  msgid ""
503
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
504
  "connection is required."
505
  msgstr ""
506
 
507
+ #: includes/Settings.php:649 includes/Settings.php:760
508
  msgid "Filtering mode"
509
  msgstr ""
510
 
511
+ #: includes/Settings.php:661 includes/Settings.php:772
512
  msgid "Filters"
513
  msgstr ""
514
 
515
+ #: includes/Settings.php:662 includes/Settings.php:773
516
  msgid ""
517
  "Filters that specify the product group that will be affected by the above "
518
  "mode"
523
  msgid "Finalization... Wait a moment. (%s products)"
524
  msgstr ""
525
 
526
+ #: includes/Admin/Troubleshooting.php:1738
527
  msgid "Find section <code>Access Control -> whitelist URL</code>"
528
  msgstr ""
529
 
530
+ #: includes/Admin/Troubleshooting.php:1322
531
  msgid "Fix “Out of stock“ relationships"
532
  msgstr ""
533
 
535
  msgid "Flatsome Theme"
536
  msgstr ""
537
 
538
+ #: includes/Settings.php:622
539
  msgid "Fuzziness"
540
  msgstr ""
541
 
542
+ #: includes/Settings.php:738 includes/Settings.php:800
543
  msgid "Fuzzy matching"
544
  msgstr ""
545
 
547
  msgid "Fuzzy search"
548
  msgstr ""
549
 
550
+ #: includes/Admin/Troubleshooting.php:452
551
  #, php-format
552
  msgid ""
553
  "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
563
  "Header -> Search</code> and enable <code>Predictive Search</code>"
564
  msgstr ""
565
 
566
+ #: includes/Admin/Troubleshooting.php:1609
567
  #, php-format
568
  msgid ""
569
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
571
  "exceptions: <code>%s</code>"
572
  msgstr ""
573
 
574
+ #: includes/Admin/Troubleshooting.php:730
575
  #, php-format
576
  msgid ""
577
  "Go to <code>Security -> Settings -> Advanced -> <a href=\"%s\" "
578
  "target=\"_blank\">System Tweaks</a></code>."
579
  msgstr ""
580
 
581
+ #: includes/Admin/Troubleshooting.php:555
582
  #, php-format
583
  msgid ""
584
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
586
  "option <code>%s</code>."
587
  msgstr ""
588
 
589
+ #: includes/Admin/Troubleshooting.php:605
590
  #, php-format
591
  msgid ""
592
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
594
  "Searching by Text</code> extension and save changes."
595
  msgstr ""
596
 
597
+ #: includes/Admin/Troubleshooting.php:958
598
  #, php-format
599
  msgid ""
600
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
601
  "Performance tab</a> -> disable the Search module</code>"
602
  msgstr ""
603
 
604
+ #: includes/Admin/Troubleshooting.php:883
605
+ #: includes/Admin/Troubleshooting.php:1040
606
+ #: includes/Admin/Troubleshooting.php:1074
607
+ #: includes/Admin/Troubleshooting.php:1159
608
+ #: includes/Admin/Troubleshooting.php:1192
609
  #, php-format
610
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
611
  msgstr ""
612
 
613
+ #: includes/Admin/Troubleshooting.php:1157
614
  msgid ""
615
  "Go to the multilingual plugin settings page and find the section where you "
616
  "can edit the available languages."
617
  msgstr ""
618
 
619
+ #: includes/Admin/Troubleshooting.php:1737
620
  msgid "Go to the settings"
621
  msgstr ""
622
 
623
+ #: includes/Admin/Troubleshooting.php:516
624
  msgid "Great! Our plugin works great with this version of WordPress."
625
  msgstr ""
626
 
630
  "functioning of our plugin."
631
  msgstr ""
632
 
633
+ #: includes/Settings.php:355
634
  msgid "Group results"
635
  msgstr ""
636
 
637
+ #: includes/Settings.php:746 includes/Settings.php:808
638
  msgid "Hard"
639
  msgstr ""
640
 
641
+ #: includes/Admin/Troubleshooting.php:1686
642
  msgid "Here are few samples NGINX config which helps other users:"
643
  msgstr ""
644
 
660
  msgid "Hide details"
661
  msgstr ""
662
 
663
+ #: includes/Settings.php:545
664
  msgid "Highlight color"
665
  msgstr ""
666
 
667
+ #: includes/Settings.php:176
668
  msgid "How to add search bar in your theme?"
669
  msgstr ""
670
 
671
+ #: includes/Settings.php:182
672
  msgid "How to add?"
673
  msgstr ""
674
 
679
  "admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
680
  msgstr ""
681
 
682
+ #: includes/Admin/Troubleshooting.php:1246
683
  msgid "I've fixed it! Restore the default endpoint"
684
  msgstr ""
685
 
686
+ #: widget.php:41 includes/Settings.php:247 includes/EmbeddingViaMenu.php:189
687
  msgid "Icon on mobile, search bar on desktop"
688
  msgstr ""
689
 
690
+ #: includes/Admin/Troubleshooting.php:1105
691
  #, php-format
692
  msgid ""
693
  "If the following errors are related to your theme or plugins, try to fix "
708
  "Help your customers to find the right products even <span>10× faster</span>."
709
  msgstr ""
710
 
711
+ #: includes/Admin/Troubleshooting.php:1696
712
  #, php-format
713
  msgid ""
714
  "If you can't solve it on the NGINX level, try alternative 100%% reliable "
715
  "solution described <a target=\"_blank\" href=\"%s\">in this article</a>."
716
  msgstr ""
717
 
 
 
 
 
 
 
 
718
  #: partials/admin/indexer-header.php:66
719
  msgid ""
720
  "If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
721
  "the issues mentioned there"
722
  msgstr ""
723
 
724
+ #: includes/Admin/Troubleshooting.php:675
725
  #, php-format
726
  msgid ""
727
  "If you think the search results page is displaying your products correctly, "
732
  msgid "Impreza Theme"
733
  msgstr ""
734
 
735
+ #: includes/Helpers.php:993
736
  msgctxt "in categories fe. in Books > Crime stories"
737
  msgid "in"
738
  msgstr ""
739
 
740
+ #: includes/Settings.php:691
741
  msgid ""
742
  "In most cases, you don't need to use the scheduler because the search index "
743
  "updates when you edit products. If you use import tools or custom code to "
745
  "helpful."
746
  msgstr ""
747
 
748
+ #: includes/Settings.php:655 includes/Settings.php:766
749
  msgid "Include"
750
  msgstr ""
751
 
752
+ #: includes/Admin/Troubleshooting.php:603
753
  msgid ""
754
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
755
  "Products Filter plugin is active"
756
  msgstr ""
757
 
758
+ #: includes/Admin/Troubleshooting.php:1772
759
  msgid ""
760
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
761
  "Filter"
762
  msgstr ""
763
 
764
+ #: includes/Admin/Troubleshooting.php:1153
765
  msgid "Incompatible multilingual plugin setting"
766
  msgstr ""
767
 
768
+ #: includes/Admin/Troubleshooting.php:1764
769
  msgid "Incompatible plugins"
770
  msgstr ""
771
 
772
+ #: includes/Admin/Troubleshooting.php:1070
773
+ msgid "Incompatible Polylang plugin setting"
774
+ msgstr ""
775
+
776
+ #: includes/Admin/Troubleshooting.php:1036
777
  msgid "Incompatible WPML Multilingual CMS plugin setting"
778
  msgstr ""
779
 
780
+ #: includes/Admin/Troubleshooting.php:553
781
+ #: includes/Admin/Troubleshooting.php:1768
782
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
783
  msgstr ""
784
 
785
+ #: includes/Settings.php:150
786
  msgid "Increase sales"
787
  msgstr ""
788
 
789
+ #: includes/Settings.php:719
790
  msgid "Increases sales conversions"
791
  msgstr ""
792
 
798
  msgid "Index build start"
799
  msgstr ""
800
 
801
+ #: includes/Admin/Troubleshooting.php:1809
802
  msgid "Index completeness test"
803
  msgstr ""
804
 
805
+ #: includes/Settings.php:782 includes/Settings.php:816
806
  msgid "Index status"
807
  msgstr ""
808
 
811
  msgid "Indexed <strong>100&#37;</strong>, <strong>%d products</strong>."
812
  msgstr ""
813
 
814
+ #: includes/Settings.php:144
815
  msgid "Indexer"
816
  msgstr ""
817
 
829
  msgid "Individual tips and support by FiboSearch team"
830
  msgstr ""
831
 
832
+ #: includes/Admin/Troubleshooting.php:1854
833
  msgid "InnoDB support"
834
  msgstr ""
835
 
836
+ #: includes/Admin/Troubleshooting.php:834
837
  msgid ""
838
  "Install the <a target=\"_blank\" href=\"https://wordpress."
839
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
841
  "related to the Indexer:"
842
  msgstr ""
843
 
844
+ #: includes/Admin/Troubleshooting.php:519
845
  msgid ""
846
  "Install the latest version of WordPress for our plugin to work as best it "
847
  "can!"
848
  msgstr ""
849
 
850
+ #: includes/Settings.php:699
851
  msgid "Interval"
852
  msgstr ""
853
 
854
+ #: includes/Admin/Troubleshooting.php:1155
855
  #, php-format
856
  msgid "Invalid language code: <code>%s</code>"
857
  msgid_plural "Invalid language codes: <code>%s</code>"
866
  "request</a>"
867
  msgstr ""
868
 
869
+ #: includes/Admin/Troubleshooting.php:461
870
  #, php-format
871
  msgid ""
872
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
873
  "request</a>"
874
  msgstr ""
875
 
876
+ #: includes/Admin/Troubleshooting.php:455
877
  msgid ""
878
  "Is your website publicly available only for whitelisted IPs? <b>Add your "
879
  "server IP to the whitelist</b>. That’s all. This is a common mistake when "
882
  "requests to itself."
883
  msgstr ""
884
 
885
+ #: includes/Admin/Troubleshooting.php:811
886
+ #: includes/Admin/Troubleshooting.php:1804
887
  msgid "Issue with WP-Cron"
888
  msgstr ""
889
 
890
+ #: includes/Admin/Troubleshooting.php:724
891
  msgid ""
892
  "iThemes Security plugin blocks AJAX requests. Take a look at the solution."
893
  msgstr ""
894
 
895
+ #: includes/Admin/Troubleshooting.php:1819
896
  msgid "Jetpack search module"
897
  msgstr ""
898
 
901
  msgid "Last build %s"
902
  msgstr ""
903
 
904
+ #: widget.php:43 includes/Settings.php:236 includes/Settings.php:242
905
  #: includes/EmbeddingViaMenu.php:74
906
  msgid "Layout"
907
  msgstr ""
908
 
909
+ #: includes/Settings.php:347
910
  msgid "Limit"
911
  msgstr ""
912
 
914
  msgid "Logs"
915
  msgstr ""
916
 
917
+ #: includes/Admin/Troubleshooting.php:1782
918
  msgid "Loopback request"
919
  msgstr ""
920
 
933
  msgid "Marketplace third-party integration"
934
  msgstr ""
935
 
936
+ #: includes/Settings.php:206
937
  msgid "Max form width"
938
  msgstr ""
939
 
940
+ #: includes/Settings.php:350
941
  msgid "maximum number of suggestions"
942
  msgstr ""
943
 
944
+ #: includes/Admin/Troubleshooting.php:1494
945
  msgid ""
946
  "Maybe your server blocks it by the Apache module <code>mod_security</code>. "
947
  "Contact your hosting provider and ask what can block the URL you see above."
951
  msgid "Menu Screen"
952
  msgstr ""
953
 
954
+ #: includes/Settings.php:201
955
  msgid "Min characters to show autocomplete"
956
  msgstr ""
957
 
958
+ #: includes/Settings.php:197
959
  msgid "Minimum characters"
960
  msgstr ""
961
 
962
+ #: includes/Admin/Troubleshooting.php:992
963
  msgid "Missing plugin: WooCommerce Multilingual"
964
  msgstr ""
965
 
966
+ #: includes/Settings.php:262
967
  msgid "Mobile breakpoint"
968
  msgstr ""
969
 
973
  "algorithms"
974
  msgstr ""
975
 
976
+ #: includes/Settings.php:412
977
  msgid "More results label"
978
  msgstr ""
979
 
980
+ #: includes/Admin/Troubleshooting.php:1844
981
  msgid "Multilingual slugs"
982
  msgstr ""
983
 
985
  msgid "My Account"
986
  msgstr ""
987
 
988
+ #: includes/Admin/Troubleshooting.php:1683
989
  msgid "NGINX configuration may blocks search requests"
990
  msgstr ""
991
 
992
+ #: includes/Settings.php:365 includes/Helpers.php:995
993
  msgid "No results"
994
  msgstr ""
995
 
1001
  msgid "No thanks"
1002
  msgstr ""
1003
 
1004
+ #: includes/Admin/Troubleshooting.php:1839
1005
  msgid "Non Critical Indexer Errors"
1006
  msgstr ""
1007
 
1008
+ #: includes/Settings.php:418
1009
  msgid "Non-products in autocomplete"
1010
  msgstr ""
1011
 
1012
+ #: includes/Settings.php:745 includes/Settings.php:807
1013
  msgid "Normal"
1014
  msgstr ""
1015
 
1016
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:676
1017
  msgid "Not exist"
1018
  msgstr ""
1019
 
1021
  msgid "Note: We currently only support the header type: \"Header 10\""
1022
  msgstr ""
1023
 
1024
+ #: includes/Admin/Troubleshooting.php:1849
1025
  msgid "Old index"
1026
  msgstr ""
1027
 
1028
+ #: includes/Admin/Troubleshooting.php:477
1029
  msgid "One or more required PHP extensions are missing on your server"
1030
  msgstr ""
1031
 
1032
+ #: includes/Settings.php:254
1033
  msgid "Overlay on mobile"
1034
  msgstr ""
1035
 
1036
+ #: includes/Admin/Troubleshooting.php:1814
1037
  msgid "PDO connection test"
1038
  msgstr ""
1039
 
1040
+ #: includes/Admin/Troubleshooting.php:1760
1041
  msgid "PHP extensions"
1042
  msgstr ""
1043
 
1044
+ #: includes/Admin/Troubleshooting.php:1834
1045
+ msgid "Polylang with disabled translations for products"
1046
+ msgstr ""
1047
+
1048
  #: partials/admin/indexer-body.php:63
1049
  msgid "Posts & pages"
1050
  msgstr ""
1051
 
1052
+ #: includes/Settings.php:319
1053
  msgid "Preloader"
1054
  msgstr ""
1055
 
1057
  msgid "Preview"
1058
  msgstr ""
1059
 
1060
+ #: includes/Helpers.php:478 includes/Helpers.php:482
1061
  msgid "Pro"
1062
  msgstr ""
1063
 
1064
+ #: includes/Settings.php:671
1065
  msgid "Pro features"
1066
  msgstr ""
1067
 
 
 
 
 
1068
  #: partials/admin/troubleshooting.php:11
1069
  msgid "Processing asynchronous tests..."
1070
  msgstr ""
1077
  msgid "Product tags"
1078
  msgstr ""
1079
 
1080
+ #: includes/Settings.php:369 partials/admin/indexer-body.php:58
1081
  msgid "Products"
1082
  msgstr ""
1083
 
1085
  msgid "Products search"
1086
  msgstr ""
1087
 
1088
+ #: includes/Settings.php:561
1089
  msgid "Products search scope"
1090
  msgstr ""
1091
 
1095
  "search bar in your theme"
1096
  msgstr ""
1097
 
1098
+ #: includes/Settings.php:263
1099
  msgid "px"
1100
  msgstr ""
1101
 
1102
+ #: includes/Admin/Troubleshooting.php:460
1103
  #, php-format
1104
  msgid ""
1105
  "Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
1107
  "request to itself”."
1108
  msgstr ""
1109
 
1110
+ #: includes/Admin/Troubleshooting.php:733
1111
  #, php-format
1112
  msgid ""
1113
  "Read more about this issue in <a href=\"%s\" target=\"_blank\">our "
1118
  msgid "Readable"
1119
  msgstr ""
1120
 
1121
+ #: includes/Admin/Troubleshooting.php:877
1122
+ #: includes/Admin/Troubleshooting.php:1033
1123
+ #: includes/Admin/Troubleshooting.php:1067
1124
+ #: includes/Admin/Troubleshooting.php:1150
1125
+ #: includes/Admin/Troubleshooting.php:1188
1126
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:700
1127
  msgid "Rebuild index"
1128
  msgstr ""
1129
 
1205
  msgid "Replace the TheGem default search"
1206
  msgstr ""
1207
 
1208
+ #: includes/Admin/Troubleshooting.php:487
1209
+ #: includes/Admin/Troubleshooting.php:490
1210
  #, php-format
1211
  msgid "Required PHP extension: %s"
1212
  msgstr ""
1213
 
1214
+ #: includes/Admin/Troubleshooting.php:1574
1215
  msgid "Response body"
1216
  msgstr ""
1217
 
1218
+ #: includes/Settings.php:720
1219
  msgid ""
1220
  "returns suggestions based on likely relevance, even though a search keyword "
1221
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
1255
  msgid "Sample tag <strong>name</strong>"
1256
  msgstr ""
1257
 
1258
+ #: includes/Settings.php:710
1259
  msgid "Schedule time"
1260
  msgstr ""
1261
 
1262
+ #: includes/Settings.php:684
1263
  msgid "Scheduling indexing"
1264
  msgstr ""
1265
 
1266
+ #: includes/Settings.php:226 partials/search-form.php:47
1267
  msgid "Search"
1268
  msgstr ""
1269
 
1272
  msgid "Search bar"
1273
  msgstr ""
1274
 
1275
+ #: widget.php:39 includes/Settings.php:245 includes/EmbeddingViaMenu.php:187
1276
  msgid "Search bar only"
1277
  msgstr ""
1278
 
1288
  msgid "Search for posts and pages"
1289
  msgstr ""
1290
 
1291
+ #: includes/Settings.php:232 includes/Helpers.php:998
1292
  msgid "Search for products..."
1293
  msgstr ""
1294
 
1295
+ #: widget.php:40 includes/Settings.php:246 includes/Settings.php:277
1296
  #: includes/EmbeddingViaMenu.php:188
1297
  msgid "Search icon"
1298
  msgstr ""
1306
  msgid "Search in %s"
1307
  msgstr ""
1308
 
1309
+ #: includes/Settings.php:588 partials/admin/features.php:23
1310
  msgid "Search in attributes"
1311
  msgstr ""
1312
 
1322
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1323
  msgstr ""
1324
 
1325
+ #: includes/Settings.php:595 partials/admin/features.php:24
1326
  msgid "Search in categories"
1327
  msgstr ""
1328
 
1329
+ #: includes/Settings.php:609 includes/Settings.php:729
1330
  #: partials/admin/features.php:22
1331
  msgid "Search in custom fields"
1332
  msgstr ""
1333
 
1334
+ #: includes/Settings.php:567
1335
  msgid "Search in description"
1336
  msgstr ""
1337
 
1338
+ #: includes/Settings.php:573
1339
  msgid "Search in short description"
1340
  msgstr ""
1341
 
1342
+ #: includes/Settings.php:579
1343
  msgid "Search in SKU"
1344
  msgstr ""
1345
 
1346
+ #: includes/Settings.php:602 partials/admin/features.php:25
1347
  msgid "Search in tags"
1348
  msgstr ""
1349
 
1351
  msgid "Search in vendors"
1352
  msgstr ""
1353
 
1354
+ #: includes/Settings.php:284
1355
  msgid "Search input background"
1356
  msgstr ""
1357
 
1358
+ #: includes/Settings.php:298
1359
  msgid "Search input border"
1360
  msgstr ""
1361
 
1362
+ #: includes/Settings.php:230
1363
  msgid "Search input placeholder"
1364
  msgstr ""
1365
 
1366
+ #: includes/Settings.php:291
1367
  msgid "Search input text"
1368
  msgstr ""
1369
 
1370
+ #: includes/Settings.php:305
1371
  msgid "Search submit background"
1372
  msgstr ""
1373
 
1374
+ #: includes/Settings.php:312
1375
  msgid "Search submit text"
1376
  msgstr ""
1377
 
1379
  msgid "Searchable"
1380
  msgstr ""
1381
 
1382
+ #: includes/Settings.php:581
1383
  msgid "searching also in variable products SKU"
1384
  msgstr ""
1385
 
1386
+ #: includes/Settings.php:582
1387
  #, php-format
1388
  msgid ""
1389
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
1394
  msgid "See a comparison of all free and premium features!"
1395
  msgstr ""
1396
 
1397
+ #: includes/Settings.php:414 includes/Helpers.php:996 includes/Helpers.php:997
1398
  msgid "See all products..."
1399
  msgstr ""
1400
 
1402
  msgid "Select filter type"
1403
  msgstr ""
1404
 
1405
+ #: includes/Settings.php:732
1406
  msgid "select the custom fields you want to add to the search scope"
1407
  msgstr ""
1408
 
1409
+ #: includes/Admin/Troubleshooting.php:2003
1410
  msgid "Server environment"
1411
  msgstr ""
1412
 
1413
+ #: includes/Admin/Troubleshooting.php:1487
1414
+ #: includes/Admin/Troubleshooting.php:1573
1415
  #, php-format
1416
  msgid ""
1417
  "Server response with message <code>%s</code> and status code <code>%s</code>."
1435
  msgid "Show brands"
1436
  msgstr ""
1437
 
1438
+ #: includes/Settings.php:424
1439
  msgid "Show categories"
1440
  msgstr ""
1441
 
1444
  msgid "Show details"
1445
  msgstr ""
1446
 
1447
+ #: includes/Settings.php:470
1448
  msgid "Show Details panel"
1449
  msgstr ""
1450
 
1451
+ #: includes/Settings.php:432 includes/Settings.php:436
1452
  #: includes/Integrations/Brands.php:229 includes/Integrations/Brands.php:233
1453
  #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:208
1454
  #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:212
1457
  msgid "show images"
1458
  msgstr ""
1459
 
1460
+ #: includes/Settings.php:457
1461
  msgid "Show pages"
1462
  msgstr ""
1463
 
1464
+ #: includes/Settings.php:450
1465
  msgid "Show posts"
1466
  msgstr ""
1467
 
1468
+ #: includes/Settings.php:325
1469
  msgid "Show preloader"
1470
  msgstr ""
1471
 
1472
+ #: includes/Settings.php:381
1473
  msgid "Show price"
1474
  msgstr ""
1475
 
1476
+ #: includes/Settings.php:387
1477
  msgid "Show product description"
1478
  msgstr ""
1479
 
1480
+ #: includes/Settings.php:375
1481
  msgid "Show product image"
1482
  msgstr ""
1483
 
1484
+ #: includes/Settings.php:394
1485
  msgid "Show SKU"
1486
  msgstr ""
1487
 
1488
+ #: includes/Settings.php:215
1489
  msgid "Show submit button"
1490
  msgstr ""
1491
 
1492
+ #: includes/Settings.php:442
1493
  msgid "Show tags"
1494
  msgstr ""
1495
 
1501
  msgid "Showcase"
1502
  msgstr ""
1503
 
1504
+ #: includes/Settings.php:744 includes/Settings.php:806
1505
  msgid "Soft"
1506
  msgstr ""
1507
 
1508
+ #: includes/Helpers.php:991
1509
  msgid "Sold by:"
1510
  msgstr ""
1511
 
1512
+ #: includes/Admin/Troubleshooting.php:554
1513
+ #: includes/Admin/Troubleshooting.php:604
1514
+ #: includes/Admin/Troubleshooting.php:672
1515
+ #: includes/Admin/Troubleshooting.php:833
1516
+ #: includes/Admin/Troubleshooting.php:924
1517
+ #: includes/Admin/Troubleshooting.php:1038
1518
+ #: includes/Admin/Troubleshooting.php:1072
1519
+ #: includes/Admin/Troubleshooting.php:1156
1520
+ #: includes/Admin/Troubleshooting.php:1608
1521
+ #: includes/Admin/Troubleshooting.php:1655
1522
+ #: includes/Admin/Troubleshooting.php:1735
1523
  msgid "Solution"
1524
  msgstr ""
1525
 
1526
+ #: includes/Admin/Troubleshooting.php:1492
1527
  msgid "Solutions"
1528
  msgstr ""
1529
 
1530
+ #: includes/Admin/Troubleshooting.php:448
1531
  msgid "Solutions:"
1532
  msgstr ""
1533
 
1534
+ #: includes/Admin/Troubleshooting.php:1684
1535
  #, php-format
1536
  msgid ""
1537
  "Some NGINX configuration may block executing PHP files included directly in "
1540
  "to execute the following file: %s"
1541
  msgstr ""
1542
 
1543
+ #: includes/Settings.php:677
1544
  msgid "Speed up search!"
1545
  msgstr ""
1546
 
1561
  msgid "Status"
1562
  msgstr ""
1563
 
1564
+ #: includes/Admin/Troubleshooting.php:725
1565
+ #: includes/Admin/Troubleshooting.php:728
1566
  #, php-format
1567
  msgid "Step %d"
1568
  msgstr ""
1569
 
1570
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:697
1571
  msgid "Stop process"
1572
  msgstr ""
1573
 
1575
  msgid "Storefront Theme"
1576
  msgstr ""
1577
 
1578
+ #: includes/Settings.php:223
1579
  msgid "Submit label"
1580
  msgstr ""
1581
 
1582
+ #: includes/Admin/Troubleshooting.php:1734
1583
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1584
  msgstr ""
1585
 
1586
+ #: includes/Settings.php:524
1587
  msgid "Suggestion background"
1588
  msgstr ""
1589
 
1590
+ #: includes/Settings.php:531
1591
  msgid "Suggestion selected"
1592
  msgstr ""
1593
 
1594
+ #: includes/Settings.php:518
1595
  msgid "Suggestions colors"
1596
  msgstr ""
1597
 
1598
+ #: includes/Settings.php:628 includes/Settings.php:634
1599
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1600
  msgid "Synonyms"
1601
  msgstr ""
1602
 
1603
+ #: includes/Settings.php:637
1604
  msgid ""
1605
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1606
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
1612
  msgid "Taxonomies"
1613
  msgstr ""
1614
 
1615
+ #: includes/Settings.php:538
1616
  msgid "Text color"
1617
  msgstr ""
1618
 
1619
+ #: includes/Admin/Troubleshooting.php:1654
1620
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1621
  msgstr ""
1622
 
1623
+ #: includes/Admin/Troubleshooting.php:1255
1624
  msgid ""
1625
  "The default search endpoint has been blocked and you decided to switch on "
1626
  "the alternative endpoint to make the search working in emergency mode. What "
1627
  "should you do next?"
1628
  msgstr ""
1629
 
1630
+ #: includes/Settings.php:471
1631
  msgid ""
1632
  "The Details panel is an additional container for extended information. The "
1633
  "details are changed dynamically when a user mouse over one of the "
1645
  msgid "The following error caused the index to be canceled:"
1646
  msgstr ""
1647
 
1648
+ #: includes/Admin/Troubleshooting.php:1191
1649
  msgid "The index was built by the previous plugin version"
1650
  msgstr ""
1651
 
1652
+ #: includes/Admin/Troubleshooting.php:443
1653
  msgid ""
1654
  "The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
1655
  "build the index in background. Sometimes the server can block this kind of "
1656
  "request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
1657
  msgstr ""
1658
 
1659
+ #: includes/Admin/Troubleshooting.php:1221
1660
  msgid ""
1661
  "The InnoDB engine within the MySQL server must be enabled for our plugin to "
1662
  "work properly. Contact your hosting provider and ask for enabling InnoDB "
1663
  "engine in your MySQL server."
1664
  msgstr ""
1665
 
1666
+ #: includes/Admin/Troubleshooting.php:957
1667
  #, php-format
1668
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1669
  msgstr ""
1674
  "designed advanced AJAX search bar with live search suggestions."
1675
  msgstr ""
1676
 
1677
+ #: includes/Admin/Troubleshooting.php:1220
1678
  msgid "The MySQL server has the InnoDB engine turned off"
1679
  msgstr ""
1680
 
1683
  msgid "the next index rebuild: %s"
1684
  msgstr ""
1685
 
1686
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:669
1687
  msgid "The search index could not be built."
1688
  msgstr ""
1689
 
1690
  #: partials/admin/indexer-header-demo.php:11
1691
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:675
1692
  msgid "The search index does not exist yet. Build it now."
1693
  msgstr ""
1694
 
1695
+ #: includes/Admin/Troubleshooting.php:881
1696
  msgid "The search index structure isn't complete"
1697
  msgstr ""
1698
 
1699
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:663
1700
  msgid ""
1701
  "The search index was built successfully, but some non-critical errors "
1702
  "occurred."
1703
  msgstr ""
1704
 
1705
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:661
1706
  msgid "The search index was built successfully."
1707
  msgstr ""
1708
 
1709
+ #: includes/Admin/Troubleshooting.php:1104
1710
  msgid ""
1711
  "The search index was built, but some significant errors occurred during this "
1712
  "process. There is a risk that some products may not be available during the "
1713
  "search."
1714
  msgstr ""
1715
 
1716
+ #: includes/Admin/Troubleshooting.php:1489
1717
  msgid ""
1718
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1719
  "blocked for some reason. Let visit it directly in your browser:"
1720
  msgstr ""
1721
 
1722
+ #: includes/Settings.php:255
1723
  msgid "The search will open in overlay on mobile"
1724
  msgstr ""
1725
 
1726
+ #: includes/Admin/Troubleshooting.php:1486
1727
  msgid ""
1728
  "The server returns an incorrect response for the search engine's AJAX calls"
1729
  msgstr ""
1730
 
1731
+ #: includes/Settings.php:635
1732
  msgid ""
1733
  "The synonyms feature allows your users to find more relevant results. If "
1734
  "your products have alternative names and users often misspell them, consider "
1735
  "adding synonyms."
1736
  msgstr ""
1737
 
 
 
 
 
 
 
 
 
1738
  #: includes/Integrations/Themes/TheGem/TheGem.php:79
1739
  msgid "TheGem Theme"
1740
  msgstr ""
1743
  msgid "There are four easy ways to display the search bar in your theme"
1744
  msgstr ""
1745
 
1746
+ #: includes/Admin/Troubleshooting.php:1324
1747
  msgid ""
1748
  "There is a problem with the visibility of products with “Out of stock“ status"
1749
  msgstr ""
1750
 
1751
+ #: includes/Admin/Troubleshooting.php:670
1752
  msgid ""
1753
  "There is no correct template in Elementor Theme Builder for the WooCommerce "
1754
  "search results page."
1755
  msgstr ""
1756
 
1757
+ #: includes/Admin/Troubleshooting.php:1493
1758
  msgid ""
1759
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1760
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1761
  "some security plugins or you have custom code that may block it."
1762
  msgstr ""
1763
 
1764
+ #: includes/Admin/Troubleshooting.php:442
1765
  msgid ""
1766
  "This issue may affect the building of the search index. Indexer may stuck at "
1767
  "0%."
1768
  msgstr ""
1769
 
1770
+ #: includes/Admin/Troubleshooting.php:438
1771
  msgid ""
1772
  "This issue may affect the search results page and e.g. display all products "
1773
  "every time"
1774
  msgstr ""
1775
 
 
1776
  #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:643
1777
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:649
1778
  msgid "This process will continue in the background. You can leave this page!"
1779
  msgstr ""
1780
 
1787
  msgid "Title"
1788
  msgstr ""
1789
 
1790
+ #: includes/Settings.php:223
1791
  msgid "To display the magnifier icon leave this field empty."
1792
  msgstr ""
1793
 
1797
  "the Shopkeeper settings."
1798
  msgstr ""
1799
 
1800
+ #: includes/Settings.php:209
1801
  msgid "To set 100% width leave blank"
1802
  msgstr ""
1803
 
1804
+ #: includes/Admin/Troubleshooting.php:1326
1805
  #, php-format
1806
  msgid ""
1807
  "Total “out of stock“ products calculated by <code>wc_get_products()</code> "
1808
  "function: <b>%d</b>"
1809
  msgstr ""
1810
 
1811
+ #: includes/Admin/Troubleshooting.php:1327
1812
  #, php-format
1813
  msgid ""
1814
  "Total “out of stock“ products calculated by SQL query on <code>%s</code>: <b>"
1815
  "%d</b>"
1816
  msgstr ""
1817
 
1818
+ #: includes/Admin/Troubleshooting.php:1791
 
 
 
 
1819
  msgid "TranslatePress"
1820
  msgstr ""
1821
 
1822
+ #: includes/Admin/Troubleshooting.php:64 includes/Admin/Troubleshooting.php:83
1823
  #: partials/admin/indexer-header.php:40
1824
  msgid "Troubleshooting"
1825
  msgstr ""
1826
 
1827
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:703
1828
  msgid "Try to build the index again."
1829
  msgstr ""
1830
 
1831
+ #: includes/Admin/Troubleshooting.php:731
1832
  msgid ""
1833
  "Uncheck the option <code>Disable PHP in Plugins</code>. Save settings. Right "
1834
  "after that <b>check this option again</b> and save settings one more time."
1854
  msgid "Upgrade Now!"
1855
  msgstr ""
1856
 
1857
+ #: includes/Settings.php:332
1858
  msgid "Upload preloader image"
1859
  msgstr ""
1860
 
1868
  msgid "Using PHP - %s"
1869
  msgstr ""
1870
 
1871
+ #: includes/Admin/Troubleshooting.php:1869
1872
  msgid "Valid search results test"
1873
  msgstr ""
1874
 
1875
+ #: includes/Helpers.php:984
1876
  msgid "Vendor"
1877
  msgstr ""
1878
 
1879
+ #: includes/Helpers.php:988
1880
  msgid "Vendors"
1881
  msgstr ""
1882
 
1883
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:648
1884
  msgid "Wait... Indexing in progress"
1885
  msgstr ""
1886
 
1887
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:642
1888
  msgid "Wait... Preparing indexing in progress"
1889
  msgstr ""
1890
 
1891
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:654
1892
  msgid "Wait... The index build process is canceling"
1893
  msgstr ""
1894
 
1896
  msgid "Warning!"
1897
  msgstr ""
1898
 
1899
+ #: includes/Admin/Troubleshooting.php:1656
1900
  #, php-format
1901
  msgid ""
1902
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
1912
  "We support this theme and you can easily replace all default search bars."
1913
  msgstr ""
1914
 
1915
+ #: includes/Admin/Troubleshooting.php:1325
1916
  msgid ""
1917
  "We've detected that some products with a status “Out of Stock“ may have "
1918
  "something wrong with relationships in the database. It affects visibility of "
1920
  "from a different WordPress."
1921
  msgstr ""
1922
 
1923
+ #: includes/Settings.php:704
1924
  msgid "weekly"
1925
  msgstr ""
1926
 
1927
+ #: includes/Admin/Troubleshooting.php:1488
1928
  msgid "What's wrong?"
1929
  msgstr ""
1930
 
1932
  msgid "Widgets Screen"
1933
  msgstr ""
1934
 
1935
+ #: includes/Settings.php:152
1936
  msgid "with simple tricks"
1937
  msgstr ""
1938
 
1939
+ #: includes/Admin/Troubleshooting.php:1824
1940
  msgid "WooCommerce Multilingual"
1941
  msgstr ""
1942
 
1943
+ #: includes/Admin/Troubleshooting.php:997
1944
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1945
  msgstr ""
1946
 
1947
+ #: includes/Admin/Troubleshooting.php:1799
1948
  msgid "WordPress loading problem"
1949
  msgstr ""
1950
 
1951
+ #: includes/Admin/Troubleshooting.php:507
1952
+ #: includes/Admin/Troubleshooting.php:1756
1953
  msgid "WordPress version"
1954
  msgstr ""
1955
 
1956
+ #: includes/Admin/Troubleshooting.php:1829
1957
  msgid "WPML with disabled translations for products"
1958
  msgstr ""
1959
 
1960
+ #: includes/Admin/Troubleshooting.php:671
1961
  #, php-format
1962
  msgid ""
1963
  "You are using Elementor and we noticed that the template used in the search "
1965
  "Products</strong> widget."
1966
  msgstr ""
1967
 
1968
+ #: includes/Admin/Troubleshooting.php:320
1969
  msgid "You are using one or more incompatible plugins"
1970
  msgstr ""
1971
 
1972
+ #: includes/Admin/Troubleshooting.php:1071
1973
+ msgid ""
1974
+ "You are using Polylang, but you have product translations disabled, so for "
1975
+ "the search engine to function properly, you must disable its multi-language "
1976
+ "support feature."
1977
+ msgstr ""
1978
+
1979
+ #: includes/Admin/Troubleshooting.php:1154
1980
  msgid ""
1981
  "You are using the multilingual plugin, but one or more of the language codes "
1982
  "has wrong format. This needs to be corrected or the index will not be able "
1983
  "to build properly."
1984
  msgstr ""
1985
 
1986
+ #: includes/Admin/Troubleshooting.php:361
1987
  msgid "You are using TranslatePress with Free version of our plugin"
1988
  msgstr ""
1989
 
1990
+ #: includes/Admin/Troubleshooting.php:1037
1991
  msgid ""
1992
  "You are using WPML Multilingual CMS, but you have product translations "
1993
  "disabled, so for the search engine to function properly, you must disable "
1994
  "its multi-language support feature."
1995
  msgstr ""
1996
 
1997
+ #: includes/Admin/Troubleshooting.php:1328
1998
  #, php-format
1999
  msgid "You can fix it by clicking on this button: %s"
2000
  msgstr ""
2001
 
2002
+ #: includes/Admin/Troubleshooting.php:836
2003
  msgid ""
2004
  "You can run these actions manually via Advanced Cron Manager. Then the "
2005
  "Indexer should run. If the index stuck again, run these actions manually one "
2006
  "more time until the finished index."
2007
  msgstr ""
2008
 
2009
+ #: includes/Admin/Troubleshooting.php:1254
2010
  msgid "You have activated the alternative search endpoint"
2011
  msgstr ""
2012
 
2013
+ #: includes/Admin/Troubleshooting.php:1736
2014
  msgid ""
2015
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
2016
  "target=\"_blank\">Sucuri panel</a>."
2017
  msgstr ""
2018
 
2019
+ #: includes/Admin/Troubleshooting.php:1491
2020
  msgid ""
2021
  "You should see <code>pong</code> word as a response. Probably you see "
2022
  "something else."
2027
  msgid "You use %s plugin version %s"
2028
  msgstr ""
2029
 
2030
+ #: includes/Admin/Troubleshooting.php:340
2031
+ #: includes/Admin/Troubleshooting.php:342
2032
  #, php-format
2033
  msgid ""
2034
  "You use the %s plugin, which may cause errors in the search results returned "
2035
  "by our plugin."
2036
  msgstr ""
2037
 
2038
+ #: includes/Admin/Troubleshooting.php:331
2039
+ #: includes/Admin/Troubleshooting.php:335
2040
  #, php-format
2041
  msgid "You use the %s plugin. The %s does not support this plugin."
2042
  msgstr ""
2046
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
2047
  msgstr ""
2048
 
2049
+ #: includes/Admin/Troubleshooting.php:998
2050
  #, php-format
2051
  msgid ""
2052
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
2054
  "target=\"_blank\">WooCommerce Multilingual status</a>."
2055
  msgstr ""
2056
 
2057
+ #: includes/Admin/Troubleshooting.php:993
2058
  #, php-format
2059
  msgid ""
2060
  "You use the WPML Multilingual CMS plugin and to correctly search for "
2062
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
2063
  msgstr ""
2064
 
2065
+ #: includes/Admin/Troubleshooting.php:450
2066
  msgid "Your server can't send an HTTP request to itself"
2067
  msgstr ""
2068
 
2069
+ #: includes/Admin/Troubleshooting.php:556
2070
  msgid "Your settings should looks like the picture below:"
2071
  msgstr ""
2072
 
2073
+ #: includes/Admin/Troubleshooting.php:385
2074
  msgid "Your site can perform loopback requests"
2075
  msgstr ""
2076
 
2077
+ #: includes/Admin/Troubleshooting.php:434
2078
  msgid "Your site could not complete a loopback request"
2079
  msgstr ""
partials/details-panel/product-variation.php CHANGED
@@ -7,8 +7,12 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
7
 
8
  ?>
9
  <div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-product">
 
 
 
10
  <div class="dgwt-wcas-product-details">
11
 
 
12
  <a href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
13
  <div class="dgwt-wcas-details-main-image">
14
  <img
@@ -19,6 +23,7 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
19
  >
20
  </div>
21
  </a>
 
22
 
23
  <div class="dgwt-wcas-details-space">
24
  <a class="dgwt-wcas-details-product-title" href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
@@ -36,9 +41,11 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
36
 
37
  <?php endif; ?>
38
 
 
39
  <div class="dgwt-wcas-pd-price">
40
  <?php echo $vars->priceHtml; ?>
41
  </div>
 
42
 
43
  <?php if ( ! empty( $vars->attributes ) ): ?>
44
  <div class="dgwt-wcas-details-hr"></div>
@@ -55,6 +62,7 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
55
  echo $vars->stockAvailability;
56
  }; ?>
57
 
 
58
  <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
59
  <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
60
  <?php
@@ -73,8 +81,12 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
73
  ?>
74
  </form>
75
  </div>
 
76
 
77
  </div>
78
 
79
  </div>
 
 
 
80
  </div>
7
 
8
  ?>
9
  <div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-product">
10
+
11
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/container_before', $vars ); ?>
12
+
13
  <div class="dgwt-wcas-product-details">
14
 
15
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/image_before', $vars ); ?>
16
  <a href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
17
  <div class="dgwt-wcas-details-main-image">
18
  <img
23
  >
24
  </div>
25
  </a>
26
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/image_after', $vars ); ?>
27
 
28
  <div class="dgwt-wcas-details-space">
29
  <a class="dgwt-wcas-details-product-title" href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
41
 
42
  <?php endif; ?>
43
 
44
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/price_before', $vars ); ?>
45
  <div class="dgwt-wcas-pd-price">
46
  <?php echo $vars->priceHtml; ?>
47
  </div>
48
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/price_after', $vars ); ?>
49
 
50
  <?php if ( ! empty( $vars->attributes ) ): ?>
51
  <div class="dgwt-wcas-details-hr"></div>
62
  echo $vars->stockAvailability;
63
  }; ?>
64
 
65
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/add_to_cart_before', $vars ); ?>
66
  <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
67
  <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
68
  <?php
81
  ?>
82
  </form>
83
  </div>
84
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/add_to_cart_after', $vars ); ?>
85
 
86
  </div>
87
 
88
  </div>
89
+
90
+ <?php do_action( 'dgwt/wcas/details_panel/product_variation/container_after', $vars ); ?>
91
+
92
  </div>
partials/details-panel/product.php CHANGED
@@ -7,8 +7,12 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
7
 
8
  ?>
9
  <div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-product">
 
 
 
10
  <div class="dgwt-wcas-product-details">
11
 
 
12
  <a href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
13
  <div class="dgwt-wcas-details-main-image">
14
  <img
@@ -19,6 +23,7 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
19
  >
20
  </div>
21
  </a>
 
22
 
23
  <div class="dgwt-wcas-details-space">
24
  <a class="dgwt-wcas-details-product-title" href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
@@ -36,9 +41,11 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
36
 
37
  <?php endif; ?>
38
 
 
39
  <div class="dgwt-wcas-pd-price">
40
  <?php echo $vars->priceHtml; ?>
41
  </div>
 
42
 
43
  <?php if ( ! empty( $vars->desc ) ): ?>
44
  <div class="dgwt-wcas-details-hr"></div>
@@ -53,6 +60,7 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
53
  echo $vars->stockAvailability;
54
  }; ?>
55
 
 
56
  <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
57
  <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
58
  <?php
@@ -71,9 +79,13 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
71
  ?>
72
  </form>
73
  </div>
 
74
 
75
  </div>
76
 
77
  </div>
 
 
 
78
  </div>
79
 
7
 
8
  ?>
9
  <div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-product">
10
+
11
+ <?php do_action( 'dgwt/wcas/details_panel/product/container_before', $vars ); ?>
12
+
13
  <div class="dgwt-wcas-product-details">
14
 
15
+ <?php do_action( 'dgwt/wcas/details_panel/product/image_before', $vars ); ?>
16
  <a href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
17
  <div class="dgwt-wcas-details-main-image">
18
  <img
23
  >
24
  </div>
25
  </a>
26
+ <?php do_action( 'dgwt/wcas/details_panel/product/image_after', $vars ); ?>
27
 
28
  <div class="dgwt-wcas-details-space">
29
  <a class="dgwt-wcas-details-product-title" href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo wp_strip_all_tags($vars->name); ?>">
41
 
42
  <?php endif; ?>
43
 
44
+ <?php do_action( 'dgwt/wcas/details_panel/product/price_before', $vars ); ?>
45
  <div class="dgwt-wcas-pd-price">
46
  <?php echo $vars->priceHtml; ?>
47
  </div>
48
+ <?php do_action( 'dgwt/wcas/details_panel/product/price_after', $vars ); ?>
49
 
50
  <?php if ( ! empty( $vars->desc ) ): ?>
51
  <div class="dgwt-wcas-details-hr"></div>
60
  echo $vars->stockAvailability;
61
  }; ?>
62
 
63
+ <?php do_action( 'dgwt/wcas/details_panel/product/add_to_cart_before', $vars ); ?>
64
  <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
65
  <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
66
  <?php
79
  ?>
80
  </form>
81
  </div>
82
+ <?php do_action( 'dgwt/wcas/details_panel/product/add_to_cart_after', $vars ); ?>
83
 
84
  </div>
85
 
86
  </div>
87
+
88
+ <?php do_action( 'dgwt/wcas/details_panel/product/container_after', $vars ); ?>
89
+
90
  </div>
91
 
partials/details-panel/term-product.php CHANGED
@@ -1,34 +1,41 @@
1
  <?php
2
-
3
  // Exit if accessed directly
4
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
5
  exit;
6
  }
7
 
8
- $rewCount = $product->getReviewCount();
9
- ?>
10
 
11
- <a class="dgwt-wcas-tax-product-details" href="<?php echo esc_url( $product->getPermalink() ); ?>" title="<?php echo esc_attr( $product->getName() ); ?>">
12
 
 
13
  <div class="dgwt-wcas-tpd-image">
14
- <?php echo $product->getThumbnail(); ?>
 
 
 
 
 
15
  </div>
 
16
 
17
  <div class="dgwt-wcas-tpd-rest">
18
 
19
- <span class="dgwt-wcas-tpd-rest-title"><?php echo esc_attr( $product->getName() ); ?></span>
20
-
21
- <?php if ( $rewCount > 0 ): ?>
22
 
 
23
  <div class="dgwt-wcas-pd-rating">
24
- <?php echo $product->getRatingHtml() . ' <span class="dgwt-wcas-pd-review">(' . $rewCount . ')</span>'; ?>
25
  </div>
26
-
27
  <?php endif; ?>
28
 
 
29
  <div class="dgwt-wcas-tpd-price">
30
- <?php echo $product->getPriceHTML(); ?>
31
  </div>
 
32
 
33
  </div>
34
  </a>
 
 
1
  <?php
 
2
  // Exit if accessed directly
3
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
  exit;
5
  }
6
 
7
+ do_action( 'dgwt/wcas/details_panel/term_products/product/container_before', $vars ); ?>
 
8
 
9
+ <a class="dgwt-wcas-tax-product-details" href="<?php echo esc_url( $vars->link ); ?>" title="<?php echo esc_attr( $vars->name ); ?>">
10
 
11
+ <?php do_action( 'dgwt/wcas/details_panel/term_products/product/image_before', $vars ); ?>
12
  <div class="dgwt-wcas-tpd-image">
13
+ <img
14
+ src="<?php echo esc_url( $vars->imageSrc ); ?>"
15
+ <?php echo ( ! empty( $vars->imageSrcset ) && ! empty( $vars->imageSizes ) ) ? 'srcset="' . esc_attr( $vars->imageSrcset ) . '"' : '' ?>
16
+ <?php echo ( ! empty( $vars->imageSrcset ) && ! empty( $vars->imageSizes ) ) ? 'sizes="' . esc_attr( $vars->imageSizes ) . '"' : '' ?>
17
+ alt="<?php echo wp_strip_all_tags( $vars->name ); ?>"
18
+ >
19
  </div>
20
+ <?php do_action( 'dgwt/wcas/details_panel/term_products/product/image_after', $vars ); ?>
21
 
22
  <div class="dgwt-wcas-tpd-rest">
23
 
24
+ <span class="dgwt-wcas-tpd-rest-title"><?php echo esc_attr( $vars->name ); ?></span>
 
 
25
 
26
+ <?php if ( $vars->reviewCount > 0 ): ?>
27
  <div class="dgwt-wcas-pd-rating">
28
+ <?php echo $vars->ratingHtml . ' <span class="dgwt-wcas-pd-review">(' . $vars->reviewCount . ')</span>'; ?>
29
  </div>
 
30
  <?php endif; ?>
31
 
32
+ <?php do_action( 'dgwt/wcas/details_panel/term_products/product/price_before', $vars ); ?>
33
  <div class="dgwt-wcas-tpd-price">
34
+ <?php echo $vars->priceHtml; ?>
35
  </div>
36
+ <?php do_action( 'dgwt/wcas/details_panel/term_products/product/price_before', $vars ); ?>
37
 
38
  </div>
39
  </a>
40
+
41
+ <?php do_action( 'dgwt/wcas/details_panel/term_products/product/container_after', $vars );
partials/themes/astra.php CHANGED
@@ -171,13 +171,3 @@ add_filter( 'wp_head', function () {
171
  </style>
172
  <?php
173
  } );
174
-
175
- add_action( 'admin_head', function () {
176
- ?>
177
- <style>
178
- #dgwt_wcas_basic .submit {
179
- display: none !important;
180
- }
181
- </style>
182
- <?php
183
- } );
171
  </style>
172
  <?php
173
  } );
 
 
 
 
 
 
 
 
 
 
partials/themes/xstore.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
+ exit;
5
+ }
6
+
7
+ add_action( 'wp_head', function () {
8
+ ?>
9
+ <style>
10
+ .et_b_header-search > form {
11
+ display: none;
12
+ }
13
+ </style>
14
+ <?php
15
+ } );
16
+
17
+ add_action( 'wp_footer', function () {
18
+ $search_type_desktop = get_theme_mod( 'search_type_et-desktop', 'input' );
19
+ $top_header_color_desktop = get_theme_mod( 'top_header_color_et-desktop', '#ffffff' );
20
+ $search_type_mobile = get_theme_mod( 'search_type_et-mobile', 'icon' );
21
+ $top_header_color_mobile = get_theme_mod( 'top_header_color_et-mobile', '#ffffff' );
22
+
23
+ if ( $search_type_desktop === 'input' ) {
24
+ echo '<div id="wcas-desktop-search" style="display: none;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
25
+ ?>
26
+ <script>
27
+ var desktopSearch = document.querySelector('.header-wrapper .et_b_header-search > form');
28
+ if (desktopSearch !== null) {
29
+ desktopSearch.replaceWith(document.querySelector('#wcas-desktop-search > div'));
30
+ }
31
+ document.querySelector('#wcas-desktop-search').remove()
32
+ </script>
33
+ <style>
34
+ .header-wrapper .dgwt-wcas-search-wrapp {
35
+ max-width: none;
36
+ }
37
+ </style>
38
+ <?php
39
+ } elseif ( $search_type_desktop === 'icon' ) {
40
+ echo '<div id="wcas-desktop-search" style="display: none;">' . do_shortcode( '[wcas-search-form layout="icon"]' ) . '</div>';
41
+ ?>
42
+ <script>
43
+ var desktopSearch = document.querySelector('.header-wrapper .et_b_header-search > .et_b_search-icon');
44
+ if (desktopSearch !== null) {
45
+ desktopSearch.replaceWith(document.querySelector('#wcas-desktop-search > div'));
46
+ }
47
+ document.querySelector('#wcas-desktop-search').remove();
48
+ </script>
49
+ <style>
50
+ .header-wrapper .et_b_header-search .dgwt-wcas-ico-magnifier-handler {
51
+ max-width: 18px;
52
+ width: 1.5em !important;
53
+ height: 1.5em !important;
54
+ }
55
+
56
+ .header-wrapper .dgwt-wcas-search-icon path {
57
+ fill: <?php echo $top_header_color_desktop; ?>;
58
+ }
59
+
60
+ .header-wrapper .dgwt-wcas-search-icon:hover path {
61
+ fill: <?php echo $top_header_color_desktop; ?>;
62
+ }
63
+ </style>
64
+ <?php
65
+ }
66
+
67
+ if ( $search_type_mobile === 'input' ) {
68
+ echo '<div id="wcas-mobile-search" style="display: none;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
69
+ ?>
70
+ <script>
71
+ var mobileSearch = document.querySelector('.mobile-header-wrapper .et_b_header-search > form');
72
+ if (mobileSearch !== null) {
73
+ mobileSearch.replaceWith(document.querySelector('#wcas-mobile-search > div'));
74
+ }
75
+ document.querySelector('#wcas-mobile-search').remove();
76
+ </script>
77
+ <?php
78
+ } elseif ( $search_type_mobile === 'icon' ) {
79
+ echo '<div id="wcas-mobile-search" style="display: none;">' . do_shortcode( '[wcas-search-form layout="icon"]' ) . '</div>';
80
+ ?>
81
+ <script>
82
+ var mobileSearch = document.querySelector('.mobile-header-wrapper .et_b_header-search > .et_b_search-icon');
83
+ if (mobileSearch !== null) {
84
+ mobileSearch.replaceWith(document.querySelector('#wcas-mobile-search > div'));
85
+ }
86
+ document.querySelector('#wcas-mobile-search').remove();
87
+ </script>
88
+ <style>
89
+ .mobile-header-wrapper .dgwt-wcas-search-wrapp {
90
+ max-width: 30px !important;
91
+ min-width: 30px;
92
+ }
93
+
94
+ .mobile-header-wrapper .et_b_header-search .dgwt-wcas-ico-magnifier-handler {
95
+ max-width: 18px;
96
+ width: 1.5em !important;
97
+ height: 1.5em !important;
98
+ }
99
+
100
+ .mobile-header-wrapper .dgwt-wcas-search-icon path {
101
+ fill: <?php echo $top_header_color_mobile; ?>;
102
+ }
103
+
104
+ .mobile-header-wrapper .dgwt-wcas-search-icon:hover path {
105
+ fill: <?php echo $top_header_color_mobile; ?>;
106
+ }
107
+ </style>
108
+ <?php
109
+ }
110
+ } );
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: damian-gora, matczar
3
  Tags: woocommerce search, ajax search, search by sku, product search, woocommerce
4
  Requires at least: 5.0
5
- Tested up to: 5.8
6
  Requires PHP: 7.0
7
- Stable tag: 1.15.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -142,6 +142,23 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
142
 
143
  == Changelog ==
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  = 1.15.0, December 16, 2021 =
146
  * ADD: Integration with a Uncode theme
147
  * ADD: Integration with Uncode theme - support for dark menu skin
2
  Contributors: damian-gora, matczar
3
  Tags: woocommerce search, ajax search, search by sku, product search, woocommerce
4
  Requires at least: 5.0
5
+ Tested up to: 5.9
6
  Requires PHP: 7.0
7
+ Stable tag: 1.16.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.16.0, February 03, 2022 =
146
+ * ADD: Integration with a XStore theme
147
+ * ADD: Allow customization of the Details Panel with actions and filters
148
+ * ADD: Templating system to override details panel templates via child-theme
149
+ * ADD: Troubleshooting - test if product translations are enabled in the Polylang settings
150
+ * ADD: Add extra CSS classes when search bar is focused
151
+
152
+ * FIX: Compatibility with PHP 8.1
153
+ * FIX: Integration with Astra theme - the “Save Changes” button disappeared after turning on the integration
154
+ * FIX: JavaScript errors on the plugin activation page
155
+ * FIX: Bug with enabling and disabling “overlay on mobile” feature during window resizing and reaching a breakpoint
156
+ * FIX: Missing "Troubleshooting" tab icon with the number of issues
157
+
158
+
159
+
160
+
161
+
162
  = 1.15.0, December 16, 2021 =
163
  * ADD: Integration with a Uncode theme
164
  * ADD: Integration with Uncode theme - support for dark menu skin