YITH WooCommerce Ajax Product Filter - Version 4.17.0

Version Description

  • Released on 13 December 2022 =

  • New: support for WooCommerce 7.2

  • Update: plugin FW

  • Fix: sass deprecated

  • Dev: added yith_wcan_toggle_element trigger

  • Dev: added yith_wcan_before_toggle_element trigger

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 4.17.0
Comparing to
See all releases

Code changes from version 4.16.0 to 4.17.0

assets/css/admin.css CHANGED
@@ -120,7 +120,7 @@
120
  }
121
  #yith_wcan_panel_filter-preset .yith-plugin-fw-list-table-container table.wp-list-table tbody tr td.shortcode .copy-on-click:after {
122
  color: #9d9d9d;
123
- content: "";
124
  font-family: "yith-icon";
125
  font-size: 14px;
126
  position: absolute;
120
  }
121
  #yith_wcan_panel_filter-preset .yith-plugin-fw-list-table-container table.wp-list-table tbody tr td.shortcode .copy-on-click:after {
122
  color: #9d9d9d;
123
+ content: "\f101";
124
  font-family: "yith-icon";
125
  font-size: 14px;
126
  position: absolute;
assets/css/shortcodes.css CHANGED
@@ -115,11 +115,11 @@
115
  border: 2px solid transparent;
116
  border-radius: var(--yith-wcan-color_swatches_border_radius, 4px);
117
  display: inline-block;
118
- height: calc(var( --yith-wcan-color_swatches_size, 45px ) + 4px);
119
  margin-bottom: 5px;
120
  overflow: hidden;
121
  vertical-align: middle;
122
- width: calc(var( --yith-wcan-color_swatches_size, 45px ) + 4px);
123
  }
124
  .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.color .term-color .color-swatch {
125
  display: block;
115
  border: 2px solid transparent;
116
  border-radius: var(--yith-wcan-color_swatches_border_radius, 4px);
117
  display: inline-block;
118
+ height: calc(var(--yith-wcan-color_swatches_size, 45px) + 4px);
119
  margin-bottom: 5px;
120
  overflow: hidden;
121
  vertical-align: middle;
122
+ width: calc(var(--yith-wcan-color_swatches_size, 45px) + 4px);
123
  }
124
  .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.color .term-color .color-swatch {
125
  display: block;
assets/js/shortcodes/modules/yith-wcan-preset.js CHANGED
@@ -346,7 +346,7 @@ export default class YITH_WCAN_Preset {
346
 
347
  self.sliderTimeout = setTimeout( () => {
348
  self.maybeFilter( $filter );
349
- }, 200 );
350
  };
351
 
352
  $filter.find( '.price-slider-ui' ).ionRangeSlider( {
@@ -370,7 +370,13 @@ export default class YITH_WCAN_Preset {
370
  $minInput
371
  .add( $maxInput )
372
  .off( 'change' )
373
- .on( 'keyup', () => {
 
 
 
 
 
 
374
  if ( ! $minInput.val() || ! $maxInput.val() ) {
375
  return;
376
  }
@@ -444,9 +450,9 @@ export default class YITH_WCAN_Preset {
444
  ev.stopPropagation();
445
  ev.preventDefault();
446
 
447
- $target.slideToggle( 400, () => {
448
- $container.toggleClass( 'opened' ).toggleClass( 'closed' );
449
- } );
450
  } );
451
  }
452
 
@@ -1432,6 +1438,72 @@ export default class YITH_WCAN_Preset {
1432
  return true;
1433
  }
1434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1435
  // open filters as a modal, when in mobile layout
1436
  openModal() {
1437
  if ( ! this.isMobile ) {
346
 
347
  self.sliderTimeout = setTimeout( () => {
348
  self.maybeFilter( $filter );
349
+ }, 300 );
350
  };
351
 
352
  $filter.find( '.price-slider-ui' ).ionRangeSlider( {
370
  $minInput
371
  .add( $maxInput )
372
  .off( 'change' )
373
+ .on( 'change', handleSliderChange )
374
+ .on( 'keyup', ( ev ) => {
375
+ if ( ! ev.key.match( /[0-9,.]/ ) ) {
376
+ ev.preventDefault();
377
+ return false;
378
+ }
379
+
380
  if ( ! $minInput.val() || ! $maxInput.val() ) {
381
  return;
382
  }
450
  ev.stopPropagation();
451
  ev.preventDefault();
452
 
453
+ this.toggle( $target, $container );
454
+
455
+ $target.trigger( 'yith_wcan_after_toggle_element', [ $container ] );
456
  } );
457
  }
458
 
1438
  return true;
1439
  }
1440
 
1441
+ // open toggle
1442
+ toggle( $target, $container, status ) {
1443
+ if ( 'undefined' === typeof status ) {
1444
+ status = $container.hasClass( 'closed' );
1445
+ }
1446
+
1447
+ const method = status ? 'slideDown' : 'slideUp',
1448
+ classToAdd = status ? 'opened' : 'closed',
1449
+ classToRemove = status ? 'closed' : 'opened';
1450
+
1451
+ $target[ method ]( 400, () => {
1452
+ $container.addClass( classToAdd ).removeClass( classToRemove );
1453
+
1454
+ $target.trigger( 'yith_wcan_toggle_element', [
1455
+ $container,
1456
+ status,
1457
+ ] );
1458
+ } );
1459
+ }
1460
+
1461
+ // open filter if title is collapsable
1462
+ openFilter( $filter ) {
1463
+ const $title = $filter.find( '.collapsable' );
1464
+
1465
+ if ( ! $title.length ) {
1466
+ return;
1467
+ }
1468
+
1469
+ this.toggle( $filter.find( '.filter-content' ), $title, true );
1470
+ }
1471
+
1472
+ // open all filters in a preset
1473
+ openAllFilters( $filter ) {
1474
+ const self = this,
1475
+ $filters = this.getFilters();
1476
+
1477
+ $filters.each( function () {
1478
+ self.openFilter( $( this ) );
1479
+ } );
1480
+ }
1481
+
1482
+ // close filter if title is collapsable
1483
+ closeFilter( $filter ) {
1484
+ const $title = $filter.find( '.collapsable' );
1485
+
1486
+ if ( ! $title.length ) {
1487
+ return;
1488
+ }
1489
+
1490
+ this.toggle( $filter.find( '.filter-content' ), $title, false );
1491
+ }
1492
+
1493
+ // close all filters in a preset; if a specific filter is pased as parameter, system will keep it open
1494
+ closeAllFilters( $filter ) {
1495
+ const self = this,
1496
+ $filters = this.getFilters();
1497
+
1498
+ $filters.each( function () {
1499
+ self.closeFilter( $( this ) );
1500
+ } );
1501
+
1502
+ if ( 'undefined' !== typeof $filter ) {
1503
+ this.openFilter( $filter );
1504
+ }
1505
+ }
1506
+
1507
  // open filters as a modal, when in mobile layout
1508
  openModal() {
1509
  if ( ! this.isMobile ) {
assets/js/yith-wcan-shortcodes.js CHANGED
@@ -1370,7 +1370,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1370
 
1371
  self.sliderTimeout = setTimeout(function () {
1372
  self.maybeFilter($filter);
1373
- }, 200);
1374
  };
1375
 
1376
  $filter.find('.price-slider-ui').ionRangeSlider({
@@ -1392,7 +1392,12 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1392
  },
1393
  onFinish: handleSliderChange
1394
  });
1395
- $minInput.add($maxInput).off('change').on('keyup', function () {
 
 
 
 
 
1396
  if (!$minInput.val() || !$maxInput.val()) {
1397
  return;
1398
  }
@@ -1456,6 +1461,8 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1456
  }, {
1457
  key: "_initToggle",
1458
  value: function _initToggle($toggle, $container, $target) {
 
 
1459
  if ($container.hasClass('closed')) {
1460
  $target.hide();
1461
  }
@@ -1463,9 +1470,10 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1463
  $toggle.off('click').on('click', function (ev) {
1464
  ev.stopPropagation();
1465
  ev.preventDefault();
1466
- $target.slideToggle(400, function () {
1467
- $container.toggleClass('opened').toggleClass('closed');
1468
- });
 
1469
  });
1470
  } // init custom input
1471
 
@@ -1561,7 +1569,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1561
  }, {
1562
  key: "_addApplyFiltersModalButton",
1563
  value: function _addApplyFiltersModalButton() {
1564
- var _this4 = this;
1565
 
1566
  var $filterButton = $('<button/>', {
1567
  "class": 'apply-filters main-modal-button',
@@ -1569,9 +1577,9 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1569
  'data-dismiss': 'modal'
1570
  });
1571
  $filterButton.appendTo(this.$preset).on('click', function () {
1572
- _this4.filter();
1573
 
1574
- _this4.closeModal();
1575
  });
1576
  this.modalElements.applyFiltersButton = $filterButton;
1577
  } // hide main filter button for the modal
@@ -1621,20 +1629,20 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1621
  }, {
1622
  key: "_openAllCollapsables",
1623
  value: function _openAllCollapsables() {
1624
- var _this5 = this;
1625
 
1626
  this.$filters.not('.no-title').not(function (i, v) {
1627
- return _this5.isFilterActive($(v));
1628
  }).find('.filter-content').show().end().find('.filter-title').removeClass('closed').addClass('opened');
1629
  } // close all collpasable before showing modal
1630
 
1631
  }, {
1632
  key: "_closeAllCollapsables",
1633
  value: function _closeAllCollapsables() {
1634
- var _this6 = this;
1635
 
1636
  this.$filters.not('.no-title').not(function (i, v) {
1637
- return _this6.isFilterActive($(v));
1638
  }).find('.filter-content').hide().end().find('.filter-title').addClass('closed').removeClass('opened');
1639
  } // update status change flag, if filters have changed
1640
 
@@ -1672,11 +1680,11 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1672
  value: function filter() {
1673
  var _window,
1674
  _filter$doFilter,
1675
- _this7 = this;
1676
 
1677
  var filter = (_window = window) === null || _window === void 0 ? void 0 : _window.product_filter;
1678
  filter === null || filter === void 0 ? void 0 : (_filter$doFilter = filter.doFilter(this.getFiltersProperties(), this.target, this.preset)) === null || _filter$doFilter === void 0 ? void 0 : _filter$doFilter.done(function () {
1679
- var newPreset = $(_this7.preset);
1680
 
1681
  if (newPreset.length && yith_wcan_shortcodes.scroll_top) {
1682
  // by default, scroll till top of first preset in the page.
@@ -1686,7 +1694,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1686
  // when we have a specific target, use that for the offset.
1687
  var $scrollTarget = $(yith_wcan_shortcodes.scroll_target);
1688
  targetOffset = $scrollTarget.length ? $scrollTarget.offset().top : targetOffset;
1689
- } else if (_this7.isMobile) {
1690
  // otherwise, if we're on mobile, scroll to the top of the page
1691
  // (preset could be in an unexpected location).
1692
  targetOffset = 100;
@@ -1698,8 +1706,8 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
1698
  } // register new filters, clear status flag
1699
 
1700
 
1701
- _this7.originalFilters = _this7.getFiltersProperties();
1702
- _this7.dirty = false;
1703
  });
1704
 
1705
  if (this.isMobile) {
@@ -2030,7 +2038,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2030
  }, {
2031
  key: "maybeShowClearFilter",
2032
  value: function maybeShowClearFilter($filter) {
2033
- var _this8 = this;
2034
 
2035
  if (!this.isFilterActive($filter) || !yith_wcan_shortcodes.show_clear_filter) {
2036
  return;
@@ -2046,12 +2054,12 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2046
  }).prependTo($filter.find('.filter-content')).on('click', function (ev) {
2047
  ev.preventDefault();
2048
 
2049
- _this8.deactivateFilter($filter, false, yith_wcan_shortcodes.instant_filters);
2050
 
2051
- _this8.maybeHideClearFilter($filter);
2052
 
2053
  if (yith_wcan_shortcodes.instant_filters) {
2054
- _this8.closeModal();
2055
  }
2056
  });
2057
  } // show clearAll anchor, when on mobile layout
@@ -2059,7 +2067,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2059
  }, {
2060
  key: "maybeShowClearAllFilters",
2061
  value: function maybeShowClearAllFilters() {
2062
- var _this9 = this;
2063
 
2064
  if (!this.isAnyFilterActive() || !this.isMobile) {
2065
  return;
@@ -2075,12 +2083,12 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2075
  }).prependTo(this.$preset.find('.filters-container')).on('click', function (ev) {
2076
  ev.preventDefault();
2077
 
2078
- _this9.deactivateAllFilters(yith_wcan_shortcodes.instant_filters);
2079
 
2080
- _this9.maybeHideClearAllFilters();
2081
 
2082
  if (yith_wcan_shortcodes.instant_filters) {
2083
- _this9.closeModal();
2084
  }
2085
  });
2086
  } // hide clear selection anchor
@@ -2308,12 +2316,76 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2308
  self.deactivateFilter($filter, properties, doFilter);
2309
  });
2310
  return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2311
  } // open filters as a modal, when in mobile layout
2312
 
2313
  }, {
2314
  key: "openModal",
2315
  value: function openModal() {
2316
- var _this10 = this;
2317
 
2318
  if (!this.isMobile) {
2319
  return;
@@ -2328,14 +2400,14 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2328
  $('body').css('overflow', 'hidden').addClass('yith-wcan-preset-modal-open');
2329
  this.$preset.show();
2330
  setTimeout(function () {
2331
- _this10.$preset.addClass('open');
2332
  }, 100);
2333
  } // close filters modal, when in mobile layout
2334
 
2335
  }, {
2336
  key: "closeModal",
2337
  value: function closeModal() {
2338
- var _this11 = this;
2339
 
2340
  if (!this.isMobile) {
2341
  return;
@@ -2343,7 +2415,7 @@ var YITH_WCAN_Preset = /*#__PURE__*/function () {
2343
 
2344
  this.$preset.removeClass('open');
2345
  setTimeout(function () {
2346
- _this11.$preset.hide();
2347
 
2348
  $('body').css('overflow', 'auto').removeClass('yith-wcan-preset-modal-open');
2349
  }, 300);
1370
 
1371
  self.sliderTimeout = setTimeout(function () {
1372
  self.maybeFilter($filter);
1373
+ }, 300);
1374
  };
1375
 
1376
  $filter.find('.price-slider-ui').ionRangeSlider({
1392
  },
1393
  onFinish: handleSliderChange
1394
  });
1395
+ $minInput.add($maxInput).off('change').on('change', handleSliderChange).on('keyup', function (ev) {
1396
+ if (!ev.key.match(/[0-9,.]/)) {
1397
+ ev.preventDefault();
1398
+ return false;
1399
+ }
1400
+
1401
  if (!$minInput.val() || !$maxInput.val()) {
1402
  return;
1403
  }
1461
  }, {
1462
  key: "_initToggle",
1463
  value: function _initToggle($toggle, $container, $target) {
1464
+ var _this4 = this;
1465
+
1466
  if ($container.hasClass('closed')) {
1467
  $target.hide();
1468
  }
1470
  $toggle.off('click').on('click', function (ev) {
1471
  ev.stopPropagation();
1472
  ev.preventDefault();
1473
+
1474
+ _this4.toggle($target, $container);
1475
+
1476
+ $target.trigger('yith_wcan_after_toggle_element', [$container]);
1477
  });
1478
  } // init custom input
1479
 
1569
  }, {
1570
  key: "_addApplyFiltersModalButton",
1571
  value: function _addApplyFiltersModalButton() {
1572
+ var _this5 = this;
1573
 
1574
  var $filterButton = $('<button/>', {
1575
  "class": 'apply-filters main-modal-button',
1577
  'data-dismiss': 'modal'
1578
  });
1579
  $filterButton.appendTo(this.$preset).on('click', function () {
1580
+ _this5.filter();
1581
 
1582
+ _this5.closeModal();
1583
  });
1584
  this.modalElements.applyFiltersButton = $filterButton;
1585
  } // hide main filter button for the modal
1629
  }, {
1630
  key: "_openAllCollapsables",
1631
  value: function _openAllCollapsables() {
1632
+ var _this6 = this;
1633
 
1634
  this.$filters.not('.no-title').not(function (i, v) {
1635
+ return _this6.isFilterActive($(v));
1636
  }).find('.filter-content').show().end().find('.filter-title').removeClass('closed').addClass('opened');
1637
  } // close all collpasable before showing modal
1638
 
1639
  }, {
1640
  key: "_closeAllCollapsables",
1641
  value: function _closeAllCollapsables() {
1642
+ var _this7 = this;
1643
 
1644
  this.$filters.not('.no-title').not(function (i, v) {
1645
+ return _this7.isFilterActive($(v));
1646
  }).find('.filter-content').hide().end().find('.filter-title').addClass('closed').removeClass('opened');
1647
  } // update status change flag, if filters have changed
1648
 
1680
  value: function filter() {
1681
  var _window,
1682
  _filter$doFilter,
1683
+ _this8 = this;
1684
 
1685
  var filter = (_window = window) === null || _window === void 0 ? void 0 : _window.product_filter;
1686
  filter === null || filter === void 0 ? void 0 : (_filter$doFilter = filter.doFilter(this.getFiltersProperties(), this.target, this.preset)) === null || _filter$doFilter === void 0 ? void 0 : _filter$doFilter.done(function () {
1687
+ var newPreset = $(_this8.preset);
1688
 
1689
  if (newPreset.length && yith_wcan_shortcodes.scroll_top) {
1690
  // by default, scroll till top of first preset in the page.
1694
  // when we have a specific target, use that for the offset.
1695
  var $scrollTarget = $(yith_wcan_shortcodes.scroll_target);
1696
  targetOffset = $scrollTarget.length ? $scrollTarget.offset().top : targetOffset;
1697
+ } else if (_this8.isMobile) {
1698
  // otherwise, if we're on mobile, scroll to the top of the page
1699
  // (preset could be in an unexpected location).
1700
  targetOffset = 100;
1706
  } // register new filters, clear status flag
1707
 
1708
 
1709
+ _this8.originalFilters = _this8.getFiltersProperties();
1710
+ _this8.dirty = false;
1711
  });
1712
 
1713
  if (this.isMobile) {
2038
  }, {
2039
  key: "maybeShowClearFilter",
2040
  value: function maybeShowClearFilter($filter) {
2041
+ var _this9 = this;
2042
 
2043
  if (!this.isFilterActive($filter) || !yith_wcan_shortcodes.show_clear_filter) {
2044
  return;
2054
  }).prependTo($filter.find('.filter-content')).on('click', function (ev) {
2055
  ev.preventDefault();
2056
 
2057
+ _this9.deactivateFilter($filter, false, yith_wcan_shortcodes.instant_filters);
2058
 
2059
+ _this9.maybeHideClearFilter($filter);
2060
 
2061
  if (yith_wcan_shortcodes.instant_filters) {
2062
+ _this9.closeModal();
2063
  }
2064
  });
2065
  } // show clearAll anchor, when on mobile layout
2067
  }, {
2068
  key: "maybeShowClearAllFilters",
2069
  value: function maybeShowClearAllFilters() {
2070
+ var _this10 = this;
2071
 
2072
  if (!this.isAnyFilterActive() || !this.isMobile) {
2073
  return;
2083
  }).prependTo(this.$preset.find('.filters-container')).on('click', function (ev) {
2084
  ev.preventDefault();
2085
 
2086
+ _this10.deactivateAllFilters(yith_wcan_shortcodes.instant_filters);
2087
 
2088
+ _this10.maybeHideClearAllFilters();
2089
 
2090
  if (yith_wcan_shortcodes.instant_filters) {
2091
+ _this10.closeModal();
2092
  }
2093
  });
2094
  } // hide clear selection anchor
2316
  self.deactivateFilter($filter, properties, doFilter);
2317
  });
2318
  return true;
2319
+ } // open toggle
2320
+
2321
+ }, {
2322
+ key: "toggle",
2323
+ value: function toggle($target, $container, status) {
2324
+ if ('undefined' === typeof status) {
2325
+ status = $container.hasClass('closed');
2326
+ }
2327
+
2328
+ var method = status ? 'slideDown' : 'slideUp',
2329
+ classToAdd = status ? 'opened' : 'closed',
2330
+ classToRemove = status ? 'closed' : 'opened';
2331
+ $target[method](400, function () {
2332
+ $container.addClass(classToAdd).removeClass(classToRemove);
2333
+ $target.trigger('yith_wcan_toggle_element', [$container, status]);
2334
+ });
2335
+ } // open filter if title is collapsable
2336
+
2337
+ }, {
2338
+ key: "openFilter",
2339
+ value: function openFilter($filter) {
2340
+ var $title = $filter.find('.collapsable');
2341
+
2342
+ if (!$title.length) {
2343
+ return;
2344
+ }
2345
+
2346
+ this.toggle($filter.find('.filter-content'), $title, true);
2347
+ } // open all filters in a preset
2348
+
2349
+ }, {
2350
+ key: "openAllFilters",
2351
+ value: function openAllFilters($filter) {
2352
+ var self = this,
2353
+ $filters = this.getFilters();
2354
+ $filters.each(function () {
2355
+ self.openFilter($(this));
2356
+ });
2357
+ } // close filter if title is collapsable
2358
+
2359
+ }, {
2360
+ key: "closeFilter",
2361
+ value: function closeFilter($filter) {
2362
+ var $title = $filter.find('.collapsable');
2363
+
2364
+ if (!$title.length) {
2365
+ return;
2366
+ }
2367
+
2368
+ this.toggle($filter.find('.filter-content'), $title, false);
2369
+ } // close all filters in a preset; if a specific filter is pased as parameter, system will keep it open
2370
+
2371
+ }, {
2372
+ key: "closeAllFilters",
2373
+ value: function closeAllFilters($filter) {
2374
+ var self = this,
2375
+ $filters = this.getFilters();
2376
+ $filters.each(function () {
2377
+ self.closeFilter($(this));
2378
+ });
2379
+
2380
+ if ('undefined' !== typeof $filter) {
2381
+ this.openFilter($filter);
2382
+ }
2383
  } // open filters as a modal, when in mobile layout
2384
 
2385
  }, {
2386
  key: "openModal",
2387
  value: function openModal() {
2388
+ var _this11 = this;
2389
 
2390
  if (!this.isMobile) {
2391
  return;
2400
  $('body').css('overflow', 'hidden').addClass('yith-wcan-preset-modal-open');
2401
  this.$preset.show();
2402
  setTimeout(function () {
2403
+ _this11.$preset.addClass('open');
2404
  }, 100);
2405
  } // close filters modal, when in mobile layout
2406
 
2407
  }, {
2408
  key: "closeModal",
2409
  value: function closeModal() {
2410
+ var _this12 = this;
2411
 
2412
  if (!this.isMobile) {
2413
  return;
2415
 
2416
  this.$preset.removeClass('open');
2417
  setTimeout(function () {
2418
+ _this12.$preset.hide();
2419
 
2420
  $('body').css('overflow', 'auto').removeClass('yith-wcan-preset-modal-open');
2421
  }, 300);
assets/js/yith-wcan-shortcodes.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/config.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-filter.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-reset-button.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-dropdown.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-preset.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/index.js"],"names":["$","jQuery","$body","YITH_WCAN_Filter","location","search","initPopState","initialized","yith_wcan_shortcodes","reload_on_back","pushUrlToHistory","window","document","title","on","history","state","_yithWcan","reload","filters","target","preset","targetUrl","$target","customFilters","triggerHandler","block","buildUrl","ajax_filters","doingAjax","_doAjax","done","response","searchAlternativeUrl","_beforeFilter","refreshFragments","pageTitle","originalSearch","unblock","_afterFilter","trigger","closest","submit","filtered","Object","keys","length","queryParam","query_param","params","url","base_url","origin","pathname","self","haveFilters","session_param","replace","RegExp","searchParams","split","reduce","a","v","items","isFilterParam","i","_cleanParam","defaultUrl","matches","indexOf","match","current","change_browser_url","navigator","userAgent","method","responseDom","createElement","$response","innerHTML","$preset","$destination","find","replaceWith","first","content","param","process_sanitize","skip_sanitize","encodeURIComponent","xhr","abort","headers","$el","background","loader","message","overlayCSS","opacity","supportedParams","customParams","concat","supported_taxonomies","map","YITH_WCAN_Reset_Button","el","$reset","ev","preventDefault","each","data","deactivateAllFilters","closeModal","addClass","YITH_WCAN_Dropdown","opts","$originalSelect","is","defaultPerPage","defaultOrder","defaultAll","defaults","showSearch","paginate","perPage","order","getElements","labels","emptyLabel","empty_option","searchPlaceholder","search_placeholder","noItemsFound","no_items","showMore","show_more","options","_hideSelect","_initTemplate","_initActions","hide","$mainSpan","$labelSpan","html","getLabel","$dropdownSpan","$matchingItemsList","append","_initSearchTemplate","_initShowMoreTemplate","after","$_main","$_label","$_dropdown","$_items","$dropdwonSpan","$container","$search","name","type","placeholder","attr","prependTo","$_search","$showMore","text","loadNextPage","bind","$_showMore","stopPropagation","toggleDropdown","_populateItems","$li","value","isActive","hasClass","isValueSelected","toggleClass","_changeItemStatus","siblings","removeClass","input","parent","prop","change","selfOriginated","_selectItem","_deselectItem","updateLabel","globalThis","yith_wcan_dropdown_init","_closeAllDropdowns","_afterDropdownOpen","dropdowns","filter","select","closeDropdown","_closeOtherDropdowns","val","limit","matchingElements","$options","getOptions","promise","Promise","resolve","t","label","regex","show","test","push","then","retrievedElements","_formatItems","indexes","hasMore","sort","b","mod","slice","active","option","getOptionByValue","$item","$anchor","template","count","href","rel","$checkbox","$label","prepend","page","parseInt","getMatchingElements","resultSet","matchingItems","_emptyItems","_hideLoadMore","currentPage","unshift","_generateItem","_showLoadMore","status","$option","hasSelectedValues","getSelectedLabels","join","getSelectedOptions","found","getSelectedValues","toString","values","YITH_WCAN_Preset","_regiterStatus","_initFilterButton","_initResponsive","_initFilters","getFilters","$filter","_initFilter","maybeShowClearAllFilters","$filterButtons","modal_on_mobile","media","matchMedia","mobile_media_query","isMobile","_afterLayoutChange","resize","handleChange","$currentFilter","multiple","$items","not","children","activeFilters","maybeFilter","maybeToggleClearAllFilters","maybeToggleClearFilter","delegateTarget","call","$input","_initTooltip","_initPriceSlider","_initDropdown","_initCollapsable","maybeShowClearFilter","_initCustomInput","$dropdown","$current","position","th","tooltip","wrapperWidth","outerWidth","left","width","container","css","toFixed","fadeIn","fadeOut","remove","selectWoo","_initDropdownObject","terms_per_page","$minInput","$maxInput","min","parseFloat","max","currentMin","currentMax","step","handleSliderChange","sliderTimeout","clearTimeout","setTimeout","ionRangeSlider","skin","from","to","min_interval","values_separator","prettify","formatPrice","onChange","onFinish","add","off","_initTitleCollapsable","_initHierarchyCollapsable","$title","_initToggle","parents","show_current_children","$t","$toggle","appendTo","slideToggle","containerClass","wrap","originalFilters","getFiltersProperties","_addCloseModalButton","_addApplyFiltersModalButton","_switchToCollapsables","removeAttr","_removeCloseModalButton","_removeApplyFiltersModalButton","_switchBackCollapsables","$closeButton","close","modalElements","closeButton","$filterButton","show_results","applyFiltersButton","removeData","$filters","isFilterActive","end","currentFilters","currentStr","JSON","stringify","originalStr","dirty","$initiator","maybeRegisterStatusChange","instant_filters","product_filter","doFilter","newPreset","scroll_top","targetOffset","offset","top","scroll_target","$scrollTarget","animate","scrollTop","getActiveFilters","filterType","filteredActive","Math","abs","properties","filteredProperties","$active","activeTerms","taxonomy","isAttr","relation","get","pop","glue","rating_filter","price_ranges","min_price","max_price","onsale_filter","instock_filter","featured_filter","orderby","filterProperties","getFilterProperties","mergeProperties","hasProp","includes","maybeHideClearFilter","isAnyFilterActive","maybeHideClearAllFilters","show_clear_filter","clear_selection","role","deactivateFilter","clear_all_selections","$activeItems","click","formattedRange","$priceSlider","getFiltersByProperties","toggles_open_on_modal","_openAllCollapsables","_closeAllCollapsables","price","accounting","formatMoney","symbol","currency_format","decimal","thousand","precision","format","set1","set2","hasOwnProperty","newValue","index","arr","queryTypeParam"],"mappings":";;;;;AAAa;AAEb;;AAEA,IAAMA,CAAC,GAAGC,MAAV,C,CAAkB;;AAClB,IAAMC,KAAK,GAAGF,CAAC,CAAE,MAAF,CAAf;;;ACLa;AAEb;;;;;;;;;;;;AAEA;;IAEqBG,gB;AACpB;AAGA;AAGA;AAGA;AAGA;AAGA;AACA,8BAAc;AAAA;;AAAA,iCAfR,IAeQ;;AAAA,uCAZF,KAYE;;AAAA,4CATGC,QAAQ,CAACC,MASZ;;AAAA,yCANA,KAMA;;AAAA,sCAHH,KAGG;;AACb,SAAKC,YAAL;AACA,SAAKC,WAAL,GAAmB,IAAnB;AACA,G,CAED;;;;;WACA,wBAAe;AACd,UAAK,CAAEC,oBAAoB,CAACC,cAA5B,EAA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AI,CAAC/H,OAAL,CACtB,SADsB,EAEtB,aAFsB,CAAvB;AAKA6X,sBAAI,CAAEM,cAAF,CAAJ,GAAyB,KAAzB;AACAL,sBAAI,CAAEK,cAAF,CAAJ,GAAyB,KAAzB;AACA;AACD;;AA3CH;;AA8CA,iBAAOL,IAAI,CAAE/P,IAAF,CAAX;AACA;AACD;;AAEDxL,cAAA,CAAUsb,IAAV,EAAgBC,IAAhB;AAEA,aAAOD,IAAP;AACA;;;;;;;;AC9gDW;AAEb;;AAEA;AACA;AACA;AAEArb,MAAM,CAAE,UAAWD,CAAX,EAAe;AACtBA,GAAC,CAAEY,QAAF,CAAD,CACEE,EADF,CAEE,yEAFF,EAGE,YAAY;AACXd,KAAC,CAAE,oBAAF,CAAD,CACEoR,GADF,CACO,WADP,EAEEtK,IAFF,CAEQ,YAAY;AAClB,UAAIiJ,gBAAJ,CAAsB/P,CAAC,CAAE,IAAF,CAAvB;AACA,KAJF;AAMAA,KAAC,CAAE,0BAAF,CAAD,CACEoR,GADF,CACO,WADP,EAEEtK,IAFF,CAEQ,YAAY;AAClB,UAAIL,sBAAJ,CAA4BzG,CAAC,CAAE,IAAF,CAA7B;AACA,KAJF;AAKA,GAfH,EAiBEwC,OAjBF,CAiBW,2BAjBX;AAmBAsJ,YAAU,CAACwL,cAAX,GAA4B,IAAInX,gBAAJ,EAA5B;AACA,CArBK,CAAN,C","file":"yith-wcan-shortcodes.js","sourcesContent":["'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nconst $ = jQuery; // we can do this as WebPack will compact all together inside a closure.\nconst $body = $( 'body' );\n\nexport { $, $body };\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $, $body } from '../config.js';\n\nexport default class YITH_WCAN_Filter {\n\t// currently executing xhr\n\txhr = null;\n\n\t// flag set during ajax call handling\n\tdoingAjax = false;\n\n\t// register original url search param\n\toriginalSearch = location.search;\n\n\t// flag set once init has executed\n\tinitialized = false;\n\n\t// flag set when page has at least one active filter.\n\tfiltered = false;\n\n\t// init object\n\tconstructor() {\n\t\tthis.initPopState();\n\t\tthis.initialized = true;\n\t}\n\n\t// init page reload when popstate event alter filters\n\tinitPopState() {\n\t\tif ( ! yith_wcan_shortcodes.reload_on_back ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pushUrlToHistory( window.location, document.title, null, true );\n\n\t\t$( window ).on( 'popstate', function () {\n\t\t\tif ( ! window.history.state?._yithWcan ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twindow.location.reload( true );\n\t\t} );\n\t}\n\n\t// execute call to filter products in current view\n\tdoFilter( filters, target, preset ) {\n\t\tlet targetUrl,\n\t\t\t$target = target ? $( target ) : $( 'body' ),\n\t\t\tcustomFilters;\n\n\t\t// filter properties\n\t\tcustomFilters = $( document ).triggerHandler(\n\t\t\t'yith_wcan_filters_parameters',\n\t\t\t[ filters ]\n\t\t);\n\n\t\tif ( !! customFilters ) {\n\t\t\tfilters = customFilters;\n\t\t}\n\n\t\t// block elements before filtering\n\t\t$target && this.block( $target );\n\n\t\t// calculate target url\n\t\ttargetUrl = this.buildUrl( filters );\n\n\t\t// if no ajax, simply change page url\n\t\tif ( ! yith_wcan_shortcodes.ajax_filters ) {\n\t\t\tthis.pushUrlToHistory( targetUrl, document.title, filters );\n\n\t\t\twindow.location = targetUrl;\n\t\t\treturn;\n\t\t}\n\n\t\t// start doing ajax\n\t\tthis.doingAjax = true;\n\n\t\treturn this._doAjax( targetUrl ).done( ( response ) => {\n\t\t\ttargetUrl = this.searchAlternativeUrl( response, targetUrl );\n\n\t\t\tthis._beforeFilter( response, filters );\n\n\t\t\tthis.refreshFragments( target, preset, response );\n\t\t\tthis.pushUrlToHistory( targetUrl, response.pageTitle, filters );\n\t\t\tthis.originalSearch = location.search;\n\n\t\t\t$target && this.unblock( $target );\n\n\t\t\tthis._afterFilter( response, filters );\n\n\t\t\tthis.doingAjax = false;\n\t\t} );\n\t}\n\n\t// actions performed before filter\n\t_beforeFilter( response, filters ) {\n\t\t$( document ).trigger( 'yith-wcan-ajax-loading', [\n\t\t\tresponse,\n\t\t\tfilters,\n\t\t] );\n\t}\n\n\t// actions performed after filter\n\t_afterFilter( response, filters ) {\n\t\t$( '.woocommerce-ordering' ).on(\n\t\t\t'change',\n\t\t\t'select.orderby',\n\t\t\tfunction () {\n\t\t\t\t$( this ).closest( 'form' ).submit();\n\t\t\t}\n\t\t);\n\n\t\tthis.filtered = filters && !! Object.keys( filters ).length;\n\t\tthis.filtered\n\t\t\t? $body.addClass( 'filtered' )\n\t\t\t: $body.removeClass( 'filtered' );\n\n\t\t$( window ).trigger( 'scroll' );\n\n\t\t$( document )\n\t\t\t.trigger( 'yith-wcan-ajax-filtered', [ response, filters ] )\n\t\t\t.trigger( 'yith_wcwl_reload_fragments' );\n\t}\n\n\t// build url to show\n\tbuildUrl( filters ) {\n\t\tlet queryParam = yith_wcan_shortcodes.query_param,\n\t\t\tparams = {},\n\t\t\tlocation = window.location,\n\t\t\turl = !! yith_wcan_shortcodes.base_url\n\t\t\t\t? yith_wcan_shortcodes.base_url\n\t\t\t\t: location?.origin + location?.pathname,\n\t\t\tsearch = '',\n\t\t\tself = this;\n\n\t\tconst haveFilters =\n\t\t\ttypeof filters === 'object' && Object.keys( filters ).length;\n\n\t\t// remove filter session from current url, if any\n\t\tif ( !! yith_wcan_shortcodes.session_param ) {\n\t\t\turl = url.replace(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t'/' + yith_wcan_shortcodes.session_param + '/[^/]*/'\n\t\t\t\t),\n\t\t\t\t''\n\t\t\t);\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams[ queryParam ] = 1;\n\t\t}\n\n\t\tif ( !! this.originalSearch ) {\n\t\t\tconst searchParams = this.originalSearch\n\t\t\t\t.replace( '?', '' )\n\t\t\t\t.split( '&' )\n\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\tconst items = v.split( '=' );\n\n\t\t\t\t\tif ( items.length === 2 ) {\n\t\t\t\t\t\tif ( this.isFilterParam( items[ 0 ] ) ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta[ items[ 0 ] ] = items[ 1 ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t}, {} );\n\n\t\t\tparams = $.extend( params, searchParams );\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams = $.extend( params, filters );\n\t\t}\n\n\t\tsearch = Object.keys( params )\n\t\t\t.reduce( function ( a, i ) {\n\t\t\t\tconst v = params[ i ];\n\n\t\t\t\tif ( ! v || ! i ) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\n\t\t\t\ta += self._cleanParam( i ) + '=' + self._cleanParam( v ) + '&';\n\n\t\t\t\treturn a;\n\t\t\t}, '?' )\n\t\t\t.replace( /&$/g, '' )\n\t\t\t.replace( /%2B/g, '+' )\n\t\t\t.replace( /%2C/g, ',' );\n\n\t\tif ( search.length > 1 ) {\n\t\t\turl += search;\n\t\t}\n\n\t\treturn url;\n\t}\n\n\t// retrieves alternative sharing url in response body\n\tsearchAlternativeUrl( response, defaultUrl = '' ) {\n\t\tlet url = defaultUrl,\n\t\t\tmatches;\n\n\t\tif ( -1 === response.indexOf( 'yith_wcan:sharing_url' ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\tmatches = response.match(\n\t\t\t/<meta name=\"yith_wcan:sharing_url\" content=\"([^\"]*)\">/\n\t\t);\n\t\turl = matches && 1 in matches ? matches[ 1 ] : url;\n\n\t\treturn url;\n\t}\n\n\t// push url to browser history\n\tpushUrlToHistory( url, title, filters, current ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes.change_browser_url ||\n\t\t\tnavigator.userAgent.match( /msie/i )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet method = 'pushState';\n\n\t\tif ( !! current ) {\n\t\t\tmethod = 'replaceState';\n\t\t}\n\n\t\twindow.history[ method ](\n\t\t\t{\n\t\t\t\t_yithWcan: true,\n\t\t\t\tpageTitle: title,\n\t\t\t\tfilters,\n\t\t\t},\n\t\t\t'',\n\t\t\turl\n\t\t);\n\t}\n\n\t// replaces elements in the page with refreshed ones\n\trefreshFragments( target, preset, response ) {\n\t\tconst responseDom = document.createElement( 'html' ),\n\t\t\t$response = $( responseDom );\n\n\t\tresponseDom.innerHTML = response;\n\n\t\tif ( target ) {\n\t\t\tlet $preset = $( preset ),\n\t\t\t\t$target = $( target ),\n\t\t\t\t$destination;\n\n\t\t\tif ( $preset.length ) {\n\t\t\t\t$destination = $response.find( preset );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$preset.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $target.length ) {\n\t\t\t\t$destination = $response.find( target );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$target.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst content = $( yith_wcan_shortcodes.content );\n\n\t\t\tif ( content.length ) {\n\t\t\t\tcontent.replaceWith(\n\t\t\t\t\t$response.find( yith_wcan_shortcodes.content )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$( 'body' ).replaceWith( $response.find( 'body' ) );\n\t\t\t}\n\t\t}\n\n\t\t$( document ).trigger( 'yith_wcan_init_shortcodes' );\n\t}\n\n\t// clean url parameters\n\t_cleanParam( param ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes?.process_sanitize ||\n\t\t\tyith_wcan_shortcodes?.skip_sanitize\n\t\t) {\n\t\t\treturn param;\n\t\t}\n\n\t\treturn encodeURIComponent( param );\n\t}\n\n\t// executes Ajax calls\n\t_doAjax( url, params ) {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tparams = $.extend(\n\t\t\t{\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'X-YITH-WCAN': 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\tparams\n\t\t);\n\n\t\tthis.xhr = $.ajax( params );\n\n\t\treturn this.xhr;\n\t}\n\n\t// block dom elements\n\tblock( $el ) {\n\t\tif ( typeof $.fn.block === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet background = '#fff center center no-repeat';\n\n\t\tif ( yith_wcan_shortcodes?.loader ) {\n\t\t\tbackground = `url('${ yith_wcan_shortcodes.loader }') ${ background }`;\n\t\t}\n\n\t\t$el.block( {\n\t\t\tmessage: null,\n\t\t\toverlayCSS: {\n\t\t\t\tbackground,\n\t\t\t\topacity: 0.7,\n\t\t\t},\n\t\t} );\n\t}\n\n\t// unblock dom elements\n\tunblock( $el ) {\n\t\tif ( typeof $.fn.unblock === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$el.unblock();\n\t}\n\n\t// checks if param is one used by layared nav to filter products.\n\tisFilterParam( param ) {\n\t\tlet supportedParams = [\n\t\t\t\t'rating_filter',\n\t\t\t\t'min_price',\n\t\t\t\t'max_price',\n\t\t\t\t'price_ranges',\n\t\t\t\t'onsale_filter',\n\t\t\t\t'instock_filter',\n\t\t\t\t'featured_filter',\n\t\t\t\t'orderby',\n\t\t\t\t'product-page',\n\t\t\t\tyith_wcan_shortcodes.query_param,\n\t\t\t],\n\t\t\tcustomParams;\n\n\t\t// filter properties\n\t\tcustomParams = $( document ).triggerHandler(\n\t\t\t'yith_wcan_supported_filters_parameters',\n\t\t\t[ supportedParams ]\n\t\t);\n\n\t\tif ( !! customParams ) {\n\t\t\tsupportedParams = customParams;\n\t\t}\n\n\t\tsupportedParams = supportedParams.concat(\n\t\t\tyith_wcan_shortcodes.supported_taxonomies.map( ( i ) =>\n\t\t\t\ti.replace( 'pa_', 'filter_' )\n\t\t\t)\n\t\t);\n\n\t\tif ( -1 !== supportedParams.indexOf( param ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'filter_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'query_type_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Reset_Button {\n\t// current button\n\t$reset = null;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// current button\n\t\tthis.$reset = el;\n\n\t\tthis.$reset.on( 'click', function ( ev ) {\n\t\t\tev.preventDefault();\n\n\t\t\t$( '.yith-wcan-filters' ).each( function () {\n\t\t\t\tconst preset = $( this ).data( 'preset' );\n\n\t\t\t\tpreset.deactivateAllFilters( true );\n\t\t\t\tpreset.closeModal();\n\t\t\t} );\n\t\t} );\n\n\t\tthis.$reset.data( 'reset', this ).addClass( 'enhanced' );\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Dropdown {\n\t// current button\n\t$originalSelect = null;\n\n\t// main element\n\t$_main = null;\n\n\t// label element\n\t$_label = null;\n\n\t// dropdown\n\t$_dropdown = null;\n\n\t// search input\n\t$_search = null;\n\n\t// show more link\n\t$_showMore = null;\n\n\t// items list\n\t$_items = null;\n\n\t// current page\n\tcurrentPage = 1;\n\n\t// options\n\toptions = {};\n\n\t// init object\n\tconstructor( el, opts ) {\n\t\tthis.$originalSelect = el;\n\n\t\tif ( ! this.$originalSelect.is( 'select' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst defaultPerPage = this.$originalSelect.data( 'per_page' ),\n\t\t\tdefaultOrder = this.$originalSelect.data( 'order' ),\n\t\t\tdefaultAll = this.$originalSelect.data( 'all-label' ),\n\t\t\tdefaults = {\n\t\t\t\tshowSearch: this.$originalSelect.data( 'show_search' ),\n\t\t\t\tpaginate: this.$originalSelect.data( 'paginate' ),\n\t\t\t\tperPage: defaultPerPage ? defaultPerPage : 10,\n\t\t\t\torder: defaultOrder ? defaultOrder : 'ASC',\n\t\t\t\tgetElements: null,\n\t\t\t\tlabels: {\n\t\t\t\t\temptyLabel: defaultAll\n\t\t\t\t\t\t? defaultAll\n\t\t\t\t\t\t: yith_wcan_shortcodes.labels?.empty_option,\n\t\t\t\t\tsearchPlaceholder:\n\t\t\t\t\t\tyith_wcan_shortcodes.labels?.search_placeholder,\n\t\t\t\t\tnoItemsFound: yith_wcan_shortcodes.labels?.no_items,\n\t\t\t\t\tshowMore: yith_wcan_shortcodes.labels?.show_more,\n\t\t\t\t},\n\t\t\t};\n\n\t\tthis.options = $.extend( defaults, opts );\n\n\t\tthis._hideSelect();\n\t\tthis._initTemplate();\n\t\tthis._initActions();\n\n\t\tthis.$originalSelect.data( 'dropdown', this ).addClass( 'enhanced' );\n\t}\n\n\t// hide select\n\t_hideSelect() {\n\t\tthis.$originalSelect.hide();\n\t}\n\n\t// create dropdown\n\t_initTemplate() {\n\t\tconst $mainSpan = $( '<div/>', {\n\t\t\t\tclass: 'yith-wcan-dropdown closed',\n\t\t\t} ),\n\t\t\t$labelSpan = $( '<div/>', {\n\t\t\t\tclass: 'dropdown-label',\n\t\t\t\thtml: this.getLabel(),\n\t\t\t} ),\n\t\t\t$dropdownSpan = $( '<div>', {\n\t\t\t\tclass: 'dropdown-wrapper',\n\t\t\t} ),\n\t\t\t$matchingItemsList = $( '<ul/>', {\n\t\t\t\tclass: 'matching-items filter-items',\n\t\t\t} );\n\n\t\t$dropdownSpan.append( $matchingItemsList );\n\t\t$mainSpan.append( $labelSpan ).append( $dropdownSpan );\n\n\t\tif ( this.options.showSearch ) {\n\t\t\tthis._initSearchTemplate( $dropdownSpan );\n\t\t}\n\n\t\tif ( this.options.paginate ) {\n\t\t\tthis._initShowMoreTemplate( $dropdownSpan );\n\t\t}\n\n\t\tthis.$originalSelect.after( $mainSpan );\n\t\tthis.$_main = $mainSpan;\n\t\tthis.$_label = $labelSpan;\n\t\tthis.$_dropdown = $dropdownSpan;\n\t\tthis.$_items = $matchingItemsList;\n\t}\n\n\t// create search field\n\t_initSearchTemplate( $dropdwonSpan ) {\n\t\tconst $container = $( '<div/>', {\n\t\t\t\tclass: 'search-field-container',\n\t\t\t} ),\n\t\t\t$search = $( '<input/>', {\n\t\t\t\tname: 's',\n\t\t\t\tclass: 'search-field',\n\t\t\t\ttype: 'search',\n\t\t\t\tplaceholder: this.options.labels.searchPlaceholder,\n\t\t\t} ).attr( 'autocomplete', 'off' );\n\n\t\t$container.append( $search ).prependTo( $dropdwonSpan );\n\t\tthis.$_search = $search;\n\t}\n\n\t// create showMore field\n\t_initShowMoreTemplate( $dropdwonSpan ) {\n\t\tconst $showMore = $( '<a/>', {\n\t\t\tclass: 'show-more',\n\t\t\ttext: this.options.labels.showMore?.replace(\n\t\t\t\t'%d',\n\t\t\t\tthis.options.perPage\n\t\t\t),\n\t\t} );\n\n\t\t$showMore.on( 'click', this.loadNextPage.bind( this ) ).hide();\n\n\t\t$dropdwonSpan.append( $showMore );\n\t\tthis.$_showMore = $showMore;\n\t}\n\n\t// init actions performed over dropdown elements\n\t_initActions() {\n\t\tconst self = this;\n\n\t\t// main open event\n\t\tthis.$_main?.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tself.toggleDropdown();\n\t\t} );\n\t\tthis.$_dropdown.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t} );\n\n\t\t// search event\n\t\tthis.$_search?.on( 'keyup search', () => {\n\t\t\tself._populateItems();\n\t\t} );\n\n\t\t// select event\n\t\tthis.$_items.on( 'change', ':input', function () {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'li:not(.checkbox) a', function ( ev ) {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tif ( isActive ) {\n\t\t\t\t$li.siblings().removeClass( 'active' );\n\t\t\t}\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'label > a', function ( ev ) {\n\t\t\tconst input = $( this ).parent().find( ':input' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\tinput.is( '[type=\"radio\"]' ) ||\n\t\t\t\tinput.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\tinput.prop( 'checked', ! input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\tinput.change();\n\t\t} );\n\n\t\t// select change\n\t\tthis.$originalSelect.on( 'change', ( ev, selfOriginated ) => {\n\t\t\tif ( selfOriginated ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.$_items.find( 'li' ).each( function () {\n\t\t\t\tconst value = $( this ).data( 'value' );\n\n\t\t\t\tif ( self.isValueSelected( value ) ) {\n\t\t\t\t\tself._selectItem( value );\n\t\t\t\t} else {\n\t\t\t\t\tself._deselectItem( value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tself.updateLabel();\n\t\t} );\n\n\t\t// close dropdown on external click; do this handler only once for any dropdown in the page\n\t\tif ( ! globalThis?.yith_wcan_dropdown_init ) {\n\t\t\t$( document ).on( 'click', this._closeAllDropdowns );\n\t\t\tglobalThis.yith_wcan_dropdown_init = true;\n\t\t}\n\t}\n\n\t// open dropdown\n\topenDropdown() {\n\t\tthis.$_main?.addClass( 'open' ).removeClass( 'closed' );\n\t\tthis._afterDropdownOpen();\n\t}\n\n\t// close dropdown\n\tcloseDropdown() {\n\t\tthis.$_main?.removeClass( 'open' ).addClass( 'closed' );\n\t}\n\n\t// close all dropdowns\n\t_closeAllDropdowns() {\n\t\tconst dropdowns = $( document )\n\t\t\t.find( 'select.enhanced' )\n\t\t\t.filter( function ( i, select ) {\n\t\t\t\tconst $el = $( select );\n\n\t\t\t\treturn !! $el.data( 'dropdown' );\n\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// close other dropdowns\n\t_closeOtherDropdowns() {\n\t\tconst self = this,\n\t\t\tdropdowns = $( document )\n\t\t\t\t.find( 'select.enhanced' )\n\t\t\t\t.filter( function ( i, select ) {\n\t\t\t\t\tconst $el = $( select );\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! $el.data( 'dropdown' ) &&\n\t\t\t\t\t\t! $el.is( self.$originalSelect )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// toggle dropdown\n\ttoggleDropdown() {\n\t\tthis.$_main?.toggleClass( 'open' ).toggleClass( 'closed' );\n\n\t\tif ( this.$_main?.hasClass( 'open' ) ) {\n\t\t\tthis._afterDropdownOpen();\n\t\t}\n\t}\n\n\t// perform operations after dropdown is open\n\t_afterDropdownOpen() {\n\t\tthis._closeOtherDropdowns();\n\n\t\tif ( this.$_search?.length ) {\n\t\t\tthis.$_search.val( '' );\n\t\t}\n\n\t\tthis._populateItems();\n\t}\n\n\t// get elements\n\tgetMatchingElements( search, limit ) {\n\t\tlet matchingElements = [],\n\t\t\t$options = this.getOptions(),\n\t\t\tpromise;\n\n\t\tpromise = new Promise( ( resolve ) => {\n\t\t\t// first of all, search across select option\n\t\t\t$options.each( function () {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\tvalue = t.val(),\n\t\t\t\t\tlabel = t.html(),\n\t\t\t\t\tregex = new RegExp( '.*' + search + '.*', 'i' ),\n\t\t\t\t\tshow =\n\t\t\t\t\t\t! search || regex.test( value ) || regex.test( label );\n\n\t\t\t\tif ( show ) {\n\t\t\t\t\tmatchingElements.push( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// then retrieve additional items\n\t\t\tif ( this.options.getElements ) {\n\t\t\t\t// we're expecting key => value pairs\n\t\t\t\tthis.options\n\t\t\t\t\t.getElements( search )\n\t\t\t\t\t.then( ( retrievedElements ) => {\n\t\t\t\t\t\tif ( retrievedElements ) {\n\t\t\t\t\t\t\t// reformat retrieved array\n\t\t\t\t\t\t\tretrievedElements = retrievedElements.reduce(\n\t\t\t\t\t\t\t\t( a, v, i ) => {\n\t\t\t\t\t\t\t\t\ta.push( { label: i, value: v } );\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// merge found results with options\n\t\t\t\t\t\t\tmatchingElements = $.extend(\n\t\t\t\t\t\t\t\tmatchingElements,\n\t\t\t\t\t\t\t\tretrievedElements\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t}\n\t\t} );\n\n\t\treturn promise;\n\t}\n\n\t// format items as key/value pairs for further processing\n\t_formatItems( items, limit ) {\n\t\tlet indexes = [],\n\t\t\thasMore = false;\n\n\t\t// remove duplicates and sort array of results\n\t\titems\n\t\t\t.filter( ( v ) => {\n\t\t\t\tif ( -1 === indexes.indexOf( v.value ) ) {\n\t\t\t\t\tindexes.push( v.value );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t\t.sort( ( a, b ) => {\n\t\t\t\tconst order = this.options.order,\n\t\t\t\t\tmod = order === 'ASC' ? 1 : -1;\n\n\t\t\t\tif ( a.value < b.value ) {\n\t\t\t\t\treturn -1 * mod;\n\t\t\t\t} else if ( a.value > b.value ) {\n\t\t\t\t\treturn mod;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t} );\n\n\t\t// paginate when needed\n\t\tif ( limit ) {\n\t\t\thasMore = limit < Object.keys( items ).length;\n\t\t\titems = items.slice( 0, limit );\n\t\t}\n\n\t\treturn {\n\t\t\titems,\n\t\t\thasMore,\n\t\t};\n\t}\n\n\t// generate item to append to items list\n\t_generateItem( value, label ) {\n\t\tlet active = this.isValueSelected( value ),\n\t\t\toption = this.getOptionByValue( value ),\n\t\t\t$item = $( '<li/>', {\n\t\t\t\t'data-value': value,\n\t\t\t\tclass: option.length ? option.attr( 'class' ) : '',\n\t\t\t} ),\n\t\t\t$anchor;\n\n\t\tif ( option.length ) {\n\t\t\tconst template = option.data( 'template' ),\n\t\t\t\tcount = option.data( 'count' );\n\n\t\t\tlabel = template ? template : label;\n\n\t\t\tif ( !! count ) {\n\t\t\t\tlabel += count;\n\t\t\t}\n\t\t}\n\n\t\t$anchor = $( '<a/>', {\n\t\t\thref: option.length ? option.data( 'filter_url' ) : '#',\n\t\t\thtml: label,\n\t\t\trel: 'nofollow',\n\t\t\t'data-title': option.length ? option.data( 'title' ) : '',\n\t\t} );\n\n\t\tif ( this.$originalSelect.prop( 'multiple' ) ) {\n\t\t\tconst $checkbox = $( '<input/>', {\n\t\t\t\t\ttype: 'checkbox',\n\t\t\t\t\tvalue,\n\t\t\t\t} ),\n\t\t\t\t$label = $( '<label>' );\n\n\t\t\t$checkbox.prop( 'checked', active );\n\t\t\t$label.prepend( $checkbox ).append( $anchor );\n\t\t\t$item.append( $label ).addClass( 'checkbox' );\n\t\t} else {\n\t\t\t$item.append( $anchor );\n\t\t}\n\n\t\tactive ? $item.addClass( 'active' ) : $item.removeClass( 'active' );\n\n\t\treturn $item;\n\t}\n\n\t// populate items list\n\t_populateItems( page ) {\n\t\tlet search = this.$_search?.length ? this.$_search.val() : '',\n\t\t\tperPage = this.options.paginate ? this.options.perPage : 0,\n\t\t\tlimit;\n\n\t\tpage = page ? parseInt( page ) : 1;\n\t\tlimit = page * perPage;\n\n\t\tthis.getMatchingElements( search, limit ).then( ( resultSet ) => {\n\t\t\tlet matchingItems = resultSet.items,\n\t\t\t\titems = [],\n\t\t\t\thasMore = false;\n\n\t\t\t// remove all previous items\n\t\t\tthis._emptyItems();\n\t\t\tthis._hideLoadMore();\n\n\t\t\tif ( ! matchingItems.length ) {\n\t\t\t\titems.push(\n\t\t\t\t\t$( '<li/>', { text: this.options.labels.noItemsFound } )\n\t\t\t\t);\n\n\t\t\t\tthis.currentPage = 1;\n\t\t\t} else {\n\t\t\t\tfor ( const v of matchingItems ) {\n\t\t\t\t\tif ( v.value === '' ) {\n\t\t\t\t\t\titems.unshift( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems.push( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.currentPage = page;\n\t\t\t\thasMore = resultSet.hasMore;\n\t\t\t}\n\n\t\t\tthis.$_items.append( items );\n\n\t\t\tthis.$originalSelect.trigger( 'yith_wcan_dropdown_updated' );\n\n\t\t\tif ( hasMore ) {\n\t\t\t\tthis._showLoadMore();\n\t\t\t}\n\t\t} );\n\t}\n\n\t// load next page of items\n\tloadNextPage() {\n\t\tconst page = this.currentPage + 1;\n\n\t\tthis._populateItems( page );\n\t}\n\n\t// set an item as active\n\t_selectItem( value ) {\n\t\treturn this._changeItemStatus( value, true );\n\t}\n\n\t// disable an item\n\t_deselectItem( value ) {\n\t\treturn this._changeItemStatus( value, false );\n\t}\n\n\t// change item status\n\t_changeItemStatus( value, status ) {\n\t\tconst $option = this.$originalSelect.find(\n\t\t\t`option[value=\"${ value }\"]`\n\t\t);\n\n\t\tif ( $option.length ) {\n\t\t\t$option.prop( 'selected', status );\n\n\t\t\tthis.closeDropdown();\n\t\t\tthis.updateLabel();\n\n\t\t\tthis.$originalSelect.trigger( 'change', [ true ] );\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// empty items list\n\t_emptyItems() {\n\t\tthis.$_items.html( '' );\n\t}\n\n\t// show \"Load more\" link\n\t_showLoadMore() {\n\t\tthis.$_showMore.show();\n\t}\n\n\t// hide \"Load more\" link\n\t_hideLoadMore() {\n\t\tthis.$_showMore.hide();\n\t}\n\n\t// returns select label\n\tgetLabel() {\n\t\treturn this.hasSelectedValues()\n\t\t\t? this.getSelectedLabels().join( ', ' )\n\t\t\t: this.options.labels.emptyLabel;\n\t}\n\n\t// update label to match new selection\n\tupdateLabel() {\n\t\tconst label = this.getLabel();\n\n\t\tthis.$_label?.html( label );\n\t}\n\n\t// returns select options\n\tgetOptions() {\n\t\treturn this.$originalSelect.find( 'option' );\n\t}\n\n\t// checks whether select has selected values\n\thasSelectedValues() {\n\t\treturn this.getSelectedOptions().length;\n\t}\n\n\t// checks whether a value is selected\n\tisValueSelected( value ) {\n\t\tconst found = this.getSelectedValues().indexOf( value.toString() );\n\n\t\treturn -1 !== found;\n\t}\n\n\t// retrieve selected options\n\tgetSelectedOptions() {\n\t\treturn this.$originalSelect.find( 'option' ).filter( ':selected' );\n\t}\n\n\t// retrieves an option node by value\n\tgetOptionByValue( value ) {\n\t\treturn this.$originalSelect.find( `option[value=\"${ value }\"]` );\n\t}\n\n\t// retrieve labels for selected options\n\tgetSelectedLabels() {\n\t\tconst labels = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tlet $option = $( this ),\n\t\t\t\ttemplate = $option.data( 'template' );\n\n\t\t\ttemplate = template\n\t\t\t\t? template\n\t\t\t\t: $option.html().replace( /\\([0-9]*\\)/, '' );\n\n\t\t\tlabels.push( template );\n\t\t} );\n\n\t\treturn labels;\n\t}\n\n\t// retrieve values for selected options\n\tgetSelectedValues() {\n\t\tconst values = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tvalues.push( $( this ).val() );\n\t\t} );\n\n\t\treturn values;\n\t}\n\n\tdestroy() {\n\t\t// TBD\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\nimport YITH_WCAN_Dropdown from './yith-wcan-dropdown';\n\nexport default class YITH_WCAN_Preset {\n\t// main preset node\n\tpreset = false;\n\t$preset = false;\n\n\t// target of the filter, if any\n\ttarget = false;\n\t$target = false;\n\n\t// filters node\n\t$filters = false;\n\n\t// filter button\n\t$filterButtons = false;\n\n\t// nodes created just for modal layout\n\tmodalElements = {};\n\n\t// retains current status of filters\n\tactiveFilters = false;\n\n\t// mobile flag\n\tisMobile = false;\n\n\t// slider timeout\n\tsliderTimeout = false;\n\n\t// registers when status has changed\n\toriginalFilters = null;\n\tdirty = false;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// main preset node\n\t\tthis.preset = '#' + el.attr( 'id' );\n\t\tthis.$preset = el;\n\n\t\t// target of the filter, if any\n\t\tthis.target = this.$preset.data( 'target' );\n\t\tthis.$target = this.target ? $( this.target ) : false;\n\n\t\tthis._regiterStatus();\n\t\tthis._initFilterButton();\n\t\tthis._initResponsive();\n\t\tthis._initFilters();\n\t\tthis._initActions();\n\n\t\tthis.$preset\n\t\t\t.data( 'preset', this )\n\t\t\t.addClass( 'enhanced' )\n\t\t\t.trigger( 'yith_wcan_preset_initialized', [ this ] );\n\t}\n\n\t// init filters\n\t_initFilters() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself._initFilter( $filter );\n\t\t} );\n\n\t\tthis.maybeShowClearAllFilters();\n\t}\n\n\t// init filter button\n\t_initFilterButton() {\n\t\tthis.$filterButtons = this.$preset.find( '.apply-filters' );\n\n\t\tif ( ! this.$filterButtons.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// manage filter button\n\t\tthis.$filterButtons\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tthis.filter();\n\t\t\t} )\n\t\t\t.hide();\n\t}\n\n\t// init generic actions\n\t_initActions() {\n\t\tthis.$preset.find( 'form' ).on( 'submit', ( ev ) => {\n\t\t\tev.preventDefault();\n\t\t} );\n\t}\n\n\t// init responsive\n\t_initResponsive() {\n\t\tif ( ! yith_wcan_shortcodes.modal_on_mobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst media = window.matchMedia(\n\t\t\t`(max-width: ${ yith_wcan_shortcodes.mobile_media_query }px)`\n\t\t);\n\n\t\t$( window )\n\t\t\t.on( 'resize', () => {\n\t\t\t\tconst isMobile = !! media.matches;\n\n\t\t\t\tif ( isMobile !== this.isMobile ) {\n\t\t\t\t\tthis.isMobile = isMobile;\n\t\t\t\t\tthis._afterLayoutChange();\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.resize();\n\t}\n\n\t// init filter\n\t_initFilter( $filter ) {\n\t\tconst self = this,\n\t\t\thandleChange = function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$currentFilter = t.closest( '.yith-wcan-filter' ),\n\t\t\t\t\tmultiple = $currentFilter.length\n\t\t\t\t\t\t? 'yes' === $currentFilter.data( 'multiple' )\n\t\t\t\t\t\t: false,\n\t\t\t\t\t$item = t.closest( '.filter-item' ),\n\t\t\t\t\t$items = $item.length\n\t\t\t\t\t\t? $currentFilter.find( '.filter-item' ).not( $item )\n\t\t\t\t\t\t: [];\n\n\t\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tev.preventDefault();\n\n\t\t\t\t$items.length &&\n\t\t\t\t\t! multiple &&\n\t\t\t\t\t$items\n\t\t\t\t\t\t.removeClass( 'active' )\n\t\t\t\t\t\t.children( 'label' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.parent( '.checked' )\n\t\t\t\t\t\t.removeClass( 'checked' );\n\t\t\t\t$item.length && $item.toggleClass( 'active' );\n\n\t\t\t\t// reset active filters.\n\t\t\t\tself.activeFilters = false;\n\n\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\tself.maybeToggleClearAllFilters();\n\t\t\t\tself.maybeToggleClearFilter( $currentFilter );\n\t\t\t};\n\n\t\t// handle filter activation/deactivation by click on label (no input involved)\n\t\t$filter\n\t\t\t.find( '.filter-item' )\n\t\t\t.not( '.checkbox' )\n\t\t\t.not( '.radio' )\n\t\t\t.on( 'click', 'a', function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\t\tif ( ! $( ev?.delegateTarget ).is( $item ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\thandleChange.call( this, ev );\n\t\t\t} );\n\n\t\t// handle filter activation/deactivation from input change\n\t\t$filter.find( ':input' ).on( 'change', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\tt.prop( 'checked', false );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\thandleChange.call( this, ev );\n\t\t} );\n\n\t\t// handle filter activation/deactivation by click on label (there is an input whose state can be switched)\n\t\t$filter.find( 'label > a' ).on( 'click', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst $input = t.parent().find( ':input' );\n\n\t\t\tif (\n\t\t\t\t$input.is( '[type=\"radio\"]' ) ||\n\t\t\t\t$input.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\t$input.prop( 'checked', ! $input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\t$input.change();\n\t\t} );\n\n\t\t// init tooltip\n\t\tthis._initTooltip( $filter );\n\n\t\t// init price slider\n\t\tthis._initPriceSlider( $filter );\n\n\t\t// init dropdown\n\t\tthis._initDropdown( $filter );\n\n\t\t// init collapsable\n\t\tthis._initCollapsable( $filter );\n\n\t\t// init clear anchors\n\t\tthis.maybeShowClearFilter( $filter );\n\n\t\t// init custom inputs\n\t\tif ( this.$preset?.hasClass( 'custom-style' ) ) {\n\t\t\tthis._initCustomInput( $filter );\n\t\t\t$filter.on( 'yith_wcan_dropdown_updated', function () {\n\t\t\t\tconst $dropdown = $( this ),\n\t\t\t\t\t$current = $dropdown.closest( '.yith-wcan-filter' );\n\n\t\t\t\tself._initCustomInput( $current );\n\t\t\t} );\n\t\t}\n\t}\n\n\t// init tooltip\n\t_initTooltip( $filter, position ) {\n\t\t$filter.find( '[data-title]' ).each( function () {\n\t\t\tconst t = $( this );\n\n\t\t\tif ( t.hasClass( 'tooltip-added' ) || ! t.data( 'title' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tt.on( 'mouseenter', function () {\n\t\t\t\tlet th = $( this ),\n\t\t\t\t\ttooltip = null,\n\t\t\t\t\twrapperWidth = th.outerWidth(),\n\t\t\t\t\tleft = 0,\n\t\t\t\t\twidth = 0;\n\n\t\t\t\tif (\n\t\t\t\t\t! position ||\n\t\t\t\t\t( 'top' !== position && 'right' !== position )\n\t\t\t\t) {\n\t\t\t\t\tconst container = th.closest( '.filter-item' );\n\n\t\t\t\t\tposition =\n\t\t\t\t\t\tcontainer.hasClass( 'color' ) ||\n\t\t\t\t\t\tcontainer.hasClass( 'label' )\n\t\t\t\t\t\t\t? 'top'\n\t\t\t\t\t\t\t: 'right';\n\t\t\t\t}\n\n\t\t\t\ttooltip = $( '<span>', {\n\t\t\t\t\tclass: 'yith-wcan-tooltip',\n\t\t\t\t\thtml: th.data( 'title' ),\n\t\t\t\t} );\n\n\t\t\t\tth.append( tooltip );\n\n\t\t\t\twidth = tooltip.outerWidth() + 6;\n\t\t\t\ttooltip.outerWidth( width );\n\n\t\t\t\tif ( 'top' === position ) {\n\t\t\t\t\tleft = ( wrapperWidth - width ) / 2;\n\t\t\t\t} else {\n\t\t\t\t\tleft = wrapperWidth + 15;\n\t\t\t\t}\n\n\t\t\t\ttooltip.css( { left: left.toFixed( 0 ) + 'px' } ).fadeIn( 200 );\n\n\t\t\t\tth.addClass( 'with-tooltip' );\n\t\t\t} ).on( 'mouseleave', function () {\n\t\t\t\tconst th = $( this );\n\n\t\t\t\tth.find( '.yith-wcan-tooltip' ).fadeOut( 200, function () {\n\t\t\t\t\tth.removeClass( 'with-tooltip' )\n\t\t\t\t\t\t.find( '.yith-wcan-tooltip' )\n\t\t\t\t\t\t.remove();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tt.addClass( 'tooltip-added' );\n\t\t} );\n\t}\n\n\t// init dropdown\n\t_initDropdown( $filter ) {\n\t\tconst $dropdown = $filter.find( 'select.filter-dropdown' );\n\n\t\tif ( ! $dropdown.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t$dropdown.hasClass( 'select2-hidden-accessible' ) &&\n\t\t\t'undefined' !== typeof $.fn.selectWoo\n\t\t) {\n\t\t\t$dropdown.selectWoo( 'destroy' );\n\t\t}\n\n\t\tthis._initDropdownObject( $dropdown, {\n\t\t\tpaginate: true,\n\t\t\tperPage: yith_wcan_shortcodes.terms_per_page,\n\t\t} );\n\t}\n\n\t// init dropdown object\n\t_initDropdownObject( $dropdown, opts ) {\n\t\treturn new YITH_WCAN_Dropdown( $dropdown, opts );\n\t}\n\n\t// init price slider\n\t_initPriceSlider( $filter ) {\n\t\tif ( ! $filter.hasClass( 'filter-price-slider' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this,\n\t\t\t$container = $filter.find( '.price-slider' ),\n\t\t\t$minInput = $container.find( '.price-slider-min' ),\n\t\t\t$maxInput = $container.find( '.price-slider-max' ),\n\t\t\tmin = parseFloat( $container.data( 'min' ) ),\n\t\t\tmax = parseFloat( $container.data( 'max' ) ),\n\t\t\tcurrentMin = parseFloat( $minInput.val() ),\n\t\t\tcurrentMax = parseFloat( $maxInput.val() ),\n\t\t\tstep = parseFloat( $container.data( 'step' ) ),\n\t\t\thandleSliderChange = function () {\n\t\t\t\tif ( self.sliderTimeout ) {\n\t\t\t\t\tclearTimeout( self.sliderTimeout );\n\t\t\t\t}\n\n\t\t\t\tself.sliderTimeout = setTimeout( () => {\n\t\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\t}, 200 );\n\t\t\t};\n\n\t\t$filter.find( '.price-slider-ui' ).ionRangeSlider( {\n\t\t\tskin: 'round',\n\t\t\ttype: 'double',\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\tfrom: currentMin,\n\t\t\tto: currentMax,\n\t\t\tmin_interval: step,\n\t\t\tvalues_separator: ' - ',\n\t\t\tprettify: ( v ) => this.formatPrice( v ),\n\t\t\tonChange: ( data ) => {\n\t\t\t\t$minInput.val( data.from );\n\t\t\t\t$maxInput.val( data.to );\n\t\t\t},\n\t\t\tonFinish: handleSliderChange,\n\t\t} );\n\n\t\t$minInput\n\t\t\t.add( $maxInput )\n\t\t\t.off( 'change' )\n\t\t\t.on( 'keyup', () => {\n\t\t\t\tif ( ! $minInput.val() || ! $maxInput.val() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\thandleSliderChange();\n\t\t\t} );\n\t}\n\n\t// init collapsable\n\t_initCollapsable( $filter ) {\n\t\tthis._initTitleCollapsable( $filter );\n\t\tthis._initHierarchyCollapsable( $filter );\n\t}\n\n\t// init toggle on click of the title\n\t_initTitleCollapsable( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._initToggle( $title, $title, $filter.find( '.filter-content' ) );\n\t}\n\n\t// init toggle on click of the parent li\n\t_initHierarchyCollapsable( $filter ) {\n\t\tconst $items = $filter.find( '.hierarchy-collapsable' );\n\n\t\tif ( ! $items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// set parents of currently active term as open\n\t\tconst self = this,\n\t\t\tactive = $filter.find( '.active' );\n\n\t\tif ( active.length ) {\n\t\t\tactive\n\t\t\t\t.parents( '.hierarchy-collapsable' )\n\t\t\t\t.removeClass( 'closed' )\n\t\t\t\t.addClass( 'opened' );\n\n\t\t\tif (\n\t\t\t\tactive.hasClass( 'hierarchy-collapsable' ) &&\n\t\t\t\tyith_wcan_shortcodes.show_current_children\n\t\t\t) {\n\t\t\t\tactive.removeClass( 'closed' ).addClass( 'opened' );\n\t\t\t}\n\t\t}\n\n\t\t$items.each( function () {\n\t\t\tconst $t = $( this ),\n\t\t\t\t$toggle = $( '<span/>', {\n\t\t\t\t\tclass: 'toggle-handle',\n\t\t\t\t} );\n\n\t\t\t$toggle.appendTo( $t );\n\n\t\t\tself._initToggle( $toggle, $t, $t.children( 'ul.filter-items' ) );\n\t\t} );\n\t}\n\n\t// init toggle to generic toggle/target pair\n\t_initToggle( $toggle, $container, $target ) {\n\t\tif ( $container.hasClass( 'closed' ) ) {\n\t\t\t$target.hide();\n\t\t}\n\n\t\t$toggle.off( 'click' ).on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tev.preventDefault();\n\n\t\t\t$target.slideToggle( 400, () => {\n\t\t\t\t$container.toggleClass( 'opened' ).toggleClass( 'closed' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// init custom input\n\t_initCustomInput( $filter ) {\n\t\t$filter.find( ':input' ).each( function () {\n\t\t\tlet input = $( this ),\n\t\t\t\ttype = input.attr( 'type' ),\n\t\t\t\tcontainerClass = `${ type }button`,\n\t\t\t\tcontainer;\n\n\t\t\tif ( 'checkbox' !== type && 'radio' !== type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.closest( `.${ containerClass }` ).length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.is( ':checked' ) ) {\n\t\t\t\tcontainerClass += ' checked';\n\t\t\t}\n\n\t\t\tcontainer = $( '<span/>', {\n\t\t\t\tclass: containerClass,\n\t\t\t} );\n\n\t\t\tinput.wrap( container ).on( 'change', function () {\n\t\t\t\tconst t = $( this );\n\n\t\t\t\tt.prop( 'checked' )\n\t\t\t\t\t? t.parent().addClass( 'checked' )\n\t\t\t\t\t: t.parent().removeClass( 'checked' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// register initial status\n\t_regiterStatus() {\n\t\tthis.originalFilters = this.getFiltersProperties();\n\t}\n\n\t// trigger handling after layout change\n\t_afterLayoutChange() {\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset\n\t\t\t\t.addClass( 'filters-modal' )\n\t\t\t\t.attr( 'role', 'dialog' )\n\t\t\t\t.attr( 'tabindex', '-1' )\n\t\t\t\t.hide();\n\n\t\t\tthis._addCloseModalButton();\n\t\t\tthis._addApplyFiltersModalButton();\n\t\t\tthis._switchToCollapsables();\n\n\t\t\tthis.$filterButtons?.hide();\n\t\t} else {\n\t\t\tthis.$preset\n\t\t\t\t.removeClass( 'filters-modal' )\n\t\t\t\t.removeClass( 'open' )\n\t\t\t\t.removeAttr( 'role' )\n\t\t\t\t.removeAttr( 'tabindex' )\n\t\t\t\t.show();\n\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\n\t\t\tthis._removeCloseModalButton();\n\t\t\tthis._removeApplyFiltersModalButton();\n\t\t\tthis._switchBackCollapsables();\n\n\t\t\tthis.$filterButtons?.show();\n\t\t}\n\t}\n\n\t// add modal close button\n\t_addCloseModalButton() {\n\t\tconst $closeButton = $( '<a/>', {\n\t\t\tclass: 'close-button',\n\t\t\thtml: '&times;',\n\t\t\t'data-dismiss': 'modal',\n\t\t\t'aria-label': yith_wcan_shortcodes.labels.close,\n\t\t} );\n\n\t\t$closeButton\n\t\t\t.prependTo( this.$preset )\n\t\t\t.on( 'click', this.closeModal.bind( this ) );\n\t\tthis.modalElements.closeButton = $closeButton;\n\t}\n\n\t// remove modal close button\n\t_removeCloseModalButton() {\n\t\tthis.modalElements?.closeButton?.remove();\n\t}\n\n\t// show main filter button for the modal\n\t_addApplyFiltersModalButton() {\n\t\tconst $filterButton = $( '<button/>', {\n\t\t\tclass: 'apply-filters main-modal-button',\n\t\t\thtml: yith_wcan_shortcodes.labels.show_results,\n\t\t\t'data-dismiss': 'modal',\n\t\t} );\n\n\t\t$filterButton.appendTo( this.$preset ).on( 'click', () => {\n\t\t\tthis.filter();\n\t\t\tthis.closeModal();\n\t\t} );\n\t\tthis.modalElements.applyFiltersButton = $filterButton;\n\t}\n\n\t// hide main filter button for the modal\n\t_removeApplyFiltersModalButton() {\n\t\tthis.modalElements?.applyFiltersButton?.remove();\n\t}\n\n\t// convert all filters to collapsable\n\t_switchToCollapsables() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif ( ! $title.length || $title.hasClass( 'collapsable' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title.addClass( 'collapsable' ).data( 'disable-collapse', true );\n\n\t\t\tself._initTitleCollapsable( $filter );\n\t\t} );\n\t}\n\n\t// switch back filters to their previous collapsable state\n\t_switchBackCollapsables() {\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif (\n\t\t\t\t! $title.length ||\n\t\t\t\t! $title.hasClass( 'collapsable' ) ||\n\t\t\t\t! $title.data( 'disable-collapse' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title\n\t\t\t\t.removeClass( 'collapsable' )\n\t\t\t\t.removeData( 'disable-collapse', true )\n\t\t\t\t.off( 'click' );\n\n\t\t\t$filter.find( '.filter-content' ).show();\n\t\t} );\n\t}\n\n\t// close all collpasable before showing modal\n\t_openAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.show()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.removeClass( 'closed' )\n\t\t\t.addClass( 'opened' );\n\t}\n\n\t// close all collpasable before showing modal\n\t_closeAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.hide()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.addClass( 'closed' )\n\t\t\t.removeClass( 'opened' );\n\t}\n\n\t// update status change flag, if filters have changed\n\tmaybeRegisterStatusChange() {\n\t\tconst currentFilters = this.getFiltersProperties(),\n\t\t\tcurrentStr = JSON.stringify( currentFilters ),\n\t\t\toriginalStr = JSON.stringify( this.originalFilters );\n\n\t\tthis.dirty = currentStr !== originalStr;\n\t}\n\n\t// apply filters when possible\n\tmaybeFilter( $initiator ) {\n\t\t// register status change\n\t\tthis.maybeRegisterStatusChange();\n\n\t\t// filter, or show filter button.\n\t\tif ( yith_wcan_shortcodes.instant_filters && ! this.isMobile ) {\n\t\t\tthis.filter();\n\t\t} else if (\n\t\t\t! yith_wcan_shortcodes.instant_filters &&\n\t\t\t! this.isMobile\n\t\t) {\n\t\t\tthis.dirty\n\t\t\t\t? this.$filterButtons?.show()\n\t\t\t\t: this.$filterButtons?.hide();\n\t\t} else if ( this.isMobile && this.dirty ) {\n\t\t\tthis.$preset.addClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.show();\n\t\t}\n\t}\n\n\t// main filtering method\n\tfilter() {\n\t\tconst filter = window?.product_filter;\n\n\t\tfilter\n\t\t\t?.doFilter( this.getFiltersProperties(), this.target, this.preset )\n\t\t\t?.done( () => {\n\t\t\t\tlet newPreset = $( this.preset );\n\n\t\t\t\tif ( newPreset.length && yith_wcan_shortcodes.scroll_top ) {\n\t\t\t\t\t// by default, scroll till top of first preset in the page.\n\t\t\t\t\tlet targetOffset = newPreset.offset().top;\n\n\t\t\t\t\tif ( !! yith_wcan_shortcodes.scroll_target ) {\n\t\t\t\t\t\t// when we have a specific target, use that for the offset.\n\t\t\t\t\t\tconst $scrollTarget = $(\n\t\t\t\t\t\t\tyith_wcan_shortcodes.scroll_target\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttargetOffset = $scrollTarget.length\n\t\t\t\t\t\t\t? $scrollTarget.offset().top\n\t\t\t\t\t\t\t: targetOffset;\n\t\t\t\t\t} else if ( this.isMobile ) {\n\t\t\t\t\t\t// otherwise, if we're on mobile, scroll to the top of the page\n\t\t\t\t\t\t// (preset could be in an unexpected location).\n\t\t\t\t\t\ttargetOffset = 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( 'body, html' ).animate( {\n\t\t\t\t\t\tscrollTop: targetOffset - 100,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// register new filters, clear status flag\n\t\t\t\tthis.originalFilters = this.getFiltersProperties();\n\t\t\t\tthis.dirty = false;\n\t\t\t} );\n\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset.removeClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.hide();\n\t\t\tthis.closeModal();\n\t\t}\n\t}\n\n\t// get all filter nodes\n\tgetFilters() {\n\t\tif ( false === this.$filters ) {\n\t\t\tthis.$filters = this.$preset.find( '.yith-wcan-filter' );\n\t\t}\n\n\t\treturn this.$filters;\n\t}\n\n\t// retrieves all filters that we want to apply\n\tgetActiveFilters() {\n\t\tif ( false === this.activeFilters ) {\n\t\t\tthis.activeFilters = this.getFiltersProperties();\n\t\t}\n\n\t\treturn this.activeFilters;\n\t}\n\n\t// check whether there is any filter active\n\tisAnyFilterActive() {\n\t\treturn !! Object.keys( this.getActiveFilters() ).length;\n\t}\n\n\t// checks whether current filter is active\n\tisFilterActive( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tactive,\n\t\t\tfilteredActive;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tactive = 'object' === typeof val ? !! val?.length : !! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tactive = $filter\n\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t.filter( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst step = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'step' )\n\t\t\t\t\t),\n\t\t\t\t\tmin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'min' )\n\t\t\t\t\t),\n\t\t\t\t\tmax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'max' )\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t\t);\n\n\t\t\t\tactive =\n\t\t\t\t\tMath.abs( currentMin - min ) >= step ||\n\t\t\t\t\tMath.abs( currentMax - max ) >= step;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tactive =\n\t\t\t\t\t'menu_order' !== $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredActive = $filter.triggerHandler( 'yith_wcan_is_filter_active', [\n\t\t\tactive,\n\t\t\tthis,\n\t\t] );\n\t\tactive =\n\t\t\ttypeof filteredActive !== 'undefined' ? filteredActive : active;\n\n\t\treturn active;\n\t}\n\n\t// count the number of active items per filter\n\tcountActiveItems( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tcount;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tcount = 'object' === typeof val ? val?.length : +!! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tcount = $filter\n\t\t\t\t\t.find( '.filter-items' )\n\t\t\t\t\t.find( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tif ( this.isFilterActive( $filter ) ) {\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\tdefault:\n\t\t\t\tcount = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t// retrieves filter properties for the filter\n\tgetFilterProperties( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tmultiple = 'yes' === $filter.data( 'multiple' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' ),\n\t\t\tproperties = {},\n\t\t\tfilteredProperties,\n\t\t\t$active;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tlet activeTerms = [],\n\t\t\t\t\ttaxonomy = $filter.data( 'taxonomy' ),\n\t\t\t\t\tisAttr = 0 === taxonomy.indexOf( 'filter' ),\n\t\t\t\t\trelation = $filter.data( 'relation' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tactiveTerms = $dropdown.val();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveTerms.push( $dropdown.val() );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tactiveTerms = $active.get().reduce( function ( a, v ) {\n\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t: v.data( 'term-slug' );\n\n\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\treturn a;\n\t\t\t\t\t}, activeTerms );\n\t\t\t\t}\n\n\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.pop();\n\t\t\t\t} else {\n\t\t\t\t\tconst glue = ! isAttr && 'and' === relation ? '+' : ',';\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.join( glue );\n\t\t\t\t}\n\n\t\t\t\tif ( isAttr ) {\n\t\t\t\t\tproperties[ taxonomy.replace( 'filter_', 'query_type_' ) ] =\n\t\t\t\t\t\trelation;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tproperties.rating_filter = $dropdown.val();\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\t\t$active = $active.first();\n\t\t\t\t\t\tproperties.rating_filter = $active.is( 'label' )\n\t\t\t\t\t\t\t? $active.find( ':input' ).val()\n\t\t\t\t\t\t\t: $active.data( 'rating' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.rating_filter = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( function ( a, v ) {\n\t\t\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t\t\t: v.data( 'rating' );\n\n\t\t\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, [] )\n\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $dropdown.val().join( ',' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 0 ];\n\t\t\t\t\t\tproperties.max_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\t\t\t\tlet min = $( v ).data( 'range-min' ),\n\t\t\t\t\t\t\t\t\tmax = $( v ).data( 'range-max' );\n\n\t\t\t\t\t\t\t\ta += ( max ? `${ min }-${ max }` : min ) + ',';\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, '' )\n\t\t\t\t\t\t\t.replace( /^(.*),$/, '$1' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-min' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-max' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t);\n\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( $filter.find( '.filter-on-sale' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.onsale_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-in-stock' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.instock_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-featured' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.featured_filter = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tproperties.orderby = $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredProperties = $filter.triggerHandler(\n\t\t\t'yith_wcan_filter_properties',\n\t\t\t[ properties, self ]\n\t\t);\n\t\tproperties =\n\t\t\ttypeof filteredProperties !== 'undefined'\n\t\t\t\t? filteredProperties\n\t\t\t\t: properties;\n\n\t\treturn properties;\n\t}\n\n\t// retrieves properties for all filters of the preset\n\tgetFiltersProperties() {\n\t\tlet properties = {};\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tconst filterProperties = self.getFilterProperties( $filter );\n\n\t\t\t\tproperties = self.mergeProperties(\n\t\t\t\t\tproperties,\n\t\t\t\t\tfilterProperties,\n\t\t\t\t\t$filter\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn properties;\n\t}\n\n\t// retrieve filters matching any of the properties passed\n\tgetFiltersByProperties( properties ) {\n\t\tconst self = this;\n\n\t\treturn this.getFilters().filter( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tlet filterProperties = self.getFilterProperties( $filter ),\n\t\t\t\t\thasProp = false;\n\n\t\t\t\tfor ( const prop in properties ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t[ 'min_price', 'max_price', 'price_ranges' ].includes(\n\t\t\t\t\t\t\tprop\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t( filterProperties.min_price ||\n\t\t\t\t\t\t\tfilterProperties.price_ranges )\n\t\t\t\t\t) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ( filterProperties[ prop ] ) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn hasProp;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t// show clear selection anchor\n\tmaybeToggleClearFilter( $filter ) {\n\t\tif ( ! this.isFilterActive( $filter ) ) {\n\t\t\tthis.maybeHideClearFilter( $filter );\n\t\t} else {\n\t\t\tthis.maybeShowClearFilter( $filter );\n\t\t}\n\t}\n\n\t// show clear all selections anchor\n\tmaybeToggleClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() ) {\n\t\t\tthis.maybeHideClearAllFilters();\n\t\t} else {\n\t\t\tthis.maybeShowClearAllFilters();\n\t\t}\n\t}\n\n\t// show clear selection anchor\n\tmaybeShowClearFilter( $filter ) {\n\t\tif (\n\t\t\t! this.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\t$filter.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_selection,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( $filter.find( '.filter-content' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateFilter(\n\t\t\t\t\t$filter,\n\t\t\t\t\tfalse,\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearFilter( $filter );\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeShowClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() || ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\tthis.$preset.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_all_selections,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( this.$preset.find( '.filters-container' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateAllFilters(\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearAllFilters();\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// hide clear selection anchor\n\tmaybeHideClearFilter( $filter ) {\n\t\tif (\n\t\t\tthis.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\t$filter.find( '.clear-selection' ).remove();\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeHideClearAllFilters() {\n\t\tif ( this.isAnyFilterActive() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\tthis.$preset\n\t\t\t.find( '.filters-container' )\n\t\t\t.children( '.clear-selection' )\n\t\t\t.remove();\n\t}\n\n\t// deactivate filter\n\tdeactivateFilter( $filter, properties, doFilter ) {\n\t\tconst filterType = $filter.data( 'filter-type' ),\n\t\t\t$items = $filter.find( '.filter-item' ),\n\t\t\t$activeItems = $items.filter( '.active' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' );\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tconst taxonomy = $filter.data( 'taxonomy' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$option.val().toString() ===\n\t\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'term-slug' );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tvalue.toString() ===\n\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif ( $option.val() === properties.rating_filter ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'rating' );\n\n\t\t\t\t\t\tif ( value === properties.rating_filter ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this ),\n\t\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t\t? `-${ properties.max_price }`\n\t\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\t\tif ( $option.val() === formattedRange ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tformattedRange,\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'min_price' ) +\n\t\t\t\t\t\t\t ( $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t? '-' + $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\tif ( properties.min_price ) {\n\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t? '-' + properties.max_price\n\t\t\t\t\t\t\t\t\t: '' );\n\t\t\t\t\t\t} else if ( properties.price_ranges ) {\n\t\t\t\t\t\t\tformattedRange = properties.price_ranges;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( value === formattedRange ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst $priceSlider = $filter.find( '.price-slider' );\n\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-min' )\n\t\t\t\t\t.val( $priceSlider.data( 'min' ) );\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-max' )\n\t\t\t\t\t.val( $priceSlider.data( 'max' ) )\n\t\t\t\t\t.change();\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\t$filter.find( 'select' ).val( 'menu_order' );\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\n\t\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\tif ( properties?.instock_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.onsale_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.featured_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\t}\n\n\t// deactivate all filters\n\tdeactivateAllFilters( doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter );\n\t\t} );\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t// deactivate filters that matches a specific set of properties\n\tdeactivateFilterByProperties( properties, doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFiltersByProperties( properties );\n\n\t\tif ( ! $filters.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter, properties, doFilter );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t// open filters as a modal, when in mobile layout\n\topenModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( yith_wcan_shortcodes.toggles_open_on_modal ) {\n\t\t\tthis._openAllCollapsables();\n\t\t} else {\n\t\t\tthis._closeAllCollapsables();\n\t\t}\n\n\t\t$( 'body' )\n\t\t\t.css( 'overflow', 'hidden' )\n\t\t\t.addClass( 'yith-wcan-preset-modal-open' );\n\n\t\tthis.$preset.show();\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.addClass( 'open' );\n\t\t}, 100 );\n\t}\n\n\t// close filters modal, when in mobile layout\n\tcloseModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.$preset.removeClass( 'open' );\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.hide();\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\t\t}, 300 );\n\t}\n\n\t// utility that formats the price according to store configuration.\n\tformatPrice( price ) {\n\t\tif ( 'undefined' !== typeof accounting ) {\n\t\t\tprice = accounting.formatMoney( price, {\n\t\t\t\tsymbol: yith_wcan_shortcodes.currency_format?.symbol,\n\t\t\t\tdecimal: yith_wcan_shortcodes.currency_format?.decimal,\n\t\t\t\tthousand: yith_wcan_shortcodes.currency_format?.thousand,\n\t\t\t\tprecision: 0,\n\t\t\t\tformat: yith_wcan_shortcodes.currency_format?.format,\n\t\t\t} );\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t// utility that merges together sets of filter properties\n\tmergeProperties( set1, set2, $filter ) {\n\t\t// search for common properties\n\t\tfor ( const prop in set2 ) {\n\t\t\tif ( ! set2.hasOwnProperty( prop ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !! set1[ prop ] ) {\n\t\t\t\tswitch ( prop ) {\n\t\t\t\t\tcase 'rating_filter':\n\t\t\t\t\tcase 'min_price':\n\t\t\t\t\tcase 'max_price':\n\t\t\t\t\tcase 'onsale_filter':\n\t\t\t\t\tcase 'instock_filter':\n\t\t\t\t\tcase 'orderby':\n\t\t\t\t\t\t// just override default value\n\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( 0 === prop.indexOf( 'query_type_' ) ) {\n\t\t\t\t\t\t\t// query_type param\n\t\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// we're dealing with taxonomy\n\t\t\t\t\t\t\tconst isAttr = 0 === prop.indexOf( 'filter_' ),\n\t\t\t\t\t\t\t\tglue = isAttr ? ',' : '+';\n\n\t\t\t\t\t\t\tlet newValue =\n\t\t\t\t\t\t\t\tset1[ prop ].replace( ',', glue ) +\n\t\t\t\t\t\t\t\tglue +\n\t\t\t\t\t\t\t\tset2[ prop ].replace( ',', glue );\n\n\t\t\t\t\t\t\tnewValue = newValue\n\t\t\t\t\t\t\t\t.split( glue )\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t( value, index, arr ) =>\n\t\t\t\t\t\t\t\t\t\tarr.indexOf( value ) === index\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( glue );\n\n\t\t\t\t\t\t\tset1[ prop ] = newValue;\n\n\t\t\t\t\t\t\tif ( isAttr ) {\n\t\t\t\t\t\t\t\tconst queryTypeParam = prop.replace(\n\t\t\t\t\t\t\t\t\t'filter_',\n\t\t\t\t\t\t\t\t\t'query_type_'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tset1[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t\tset2[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete set2[ prop ];\n\t\t\t}\n\t\t}\n\n\t\t$.extend( set1, set2 );\n\n\t\treturn set1;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport YITH_WCAN_Filter from './modules/yith-wcan-filter';\nimport YITH_WCAN_Reset_Button from './modules/yith-wcan-reset-button';\nimport YITH_WCAN_Preset from './modules/yith-wcan-preset';\n\njQuery( function ( $ ) {\n\t$( document )\n\t\t.on(\n\t\t\t'yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode',\n\t\t\tfunction () {\n\t\t\t\t$( '.yith-wcan-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Preset( $( this ) );\n\t\t\t\t\t} );\n\n\t\t\t\t$( '.yith-wcan-reset-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Reset_Button( $( this ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t)\n\t\t.trigger( 'yith_wcan_init_shortcodes' );\n\n\tglobalThis.product_filter = new YITH_WCAN_Filter();\n} );\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/config.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-filter.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-reset-button.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-dropdown.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-preset.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/index.js"],"names":["$","jQuery","$body","YITH_WCAN_Filter","location","search","initPopState","initialized","yith_wcan_shortcodes","reload_on_back","pushUrlToHistory","window","document","title","on","history","state","_yithWcan","reload","filters","target","preset","targetUrl","$target","customFilters","triggerHandler","block","buildUrl","ajax_filters","doingAjax","_doAjax","done","response","searchAlternativeUrl","_beforeFilter","refreshFragments","pageTitle","originalSearch","unblock","_afterFilter","trigger","closest","submit","filtered","Object","keys","length","queryParam","query_param","params","url","base_url","origin","pathname","self","haveFilters","session_param","replace","RegExp","searchParams","split","reduce","a","v","items","isFilterParam","i","_cleanParam","defaultUrl","matches","indexOf","match","current","change_browser_url","navigator","userAgent","method","responseDom","createElement","$response","innerHTML","$preset","$destination","find","replaceWith","first","content","param","process_sanitize","skip_sanitize","encodeURIComponent","xhr","abort","headers","$el","background","loader","message","overlayCSS","opacity","supportedParams","customParams","concat","supported_taxonomies","map","YITH_WCAN_Reset_Button","el","$reset","ev","preventDefault","each","data","deactivateAllFilters","closeModal","addClass","YITH_WCAN_Dropdown","opts","$originalSelect","is","defaultPerPage","defaultOrder","defaultAll","defaults","showSearch","paginate","perPage","order","getElements","labels","emptyLabel","empty_option","searchPlaceholder","search_placeholder","noItemsFound","no_items","showMore","show_more","options","_hideSelect","_initTemplate","_initActions","hide","$mainSpan","$labelSpan","html","getLabel","$dropdownSpan","$matchingItemsList","append","_initSearchTemplate","_initShowMoreTemplate","after","$_main","$_label","$_dropdown","$_items","$dropdwonSpan","$container","$search","name","type","placeholder","attr","prependTo","$_search","$showMore","text","loadNextPage","bind","$_showMore","stopPropagation","toggleDropdown","_populateItems","$li","value","isActive","hasClass","isValueSelected","toggleClass","_changeItemStatus","siblings","removeClass","input","parent","prop","change","selfOriginated","_selectItem","_deselectItem","updateLabel","globalThis","yith_wcan_dropdown_init","_closeAllDropdowns","_afterDropdownOpen","dropdowns","filter","select","closeDropdown","_closeOtherDropdowns","val","limit","matchingElements","$options","getOptions","promise","Promise","resolve","t","label","regex","show","test","push","then","retrievedElements","_formatItems","indexes","hasMore","sort","b","mod","slice","active","option","getOptionByValue","$item","$anchor","template","count","href","rel","$checkbox","$label","prepend","page","parseInt","getMatchingElements","resultSet","matchingItems","_emptyItems","_hideLoadMore","currentPage","unshift","_generateItem","_showLoadMore","status","$option","hasSelectedValues","getSelectedLabels","join","getSelectedOptions","found","getSelectedValues","toString","values","YITH_WCAN_Preset","_regiterStatus","_initFilterButton","_initResponsive","_initFilters","getFilters","$filter","_initFilter","maybeShowClearAllFilters","$filterButtons","modal_on_mobile","media","matchMedia","mobile_media_query","isMobile","_afterLayoutChange","resize","handleChange","$currentFilter","multiple","$items","not","children","activeFilters","maybeFilter","maybeToggleClearAllFilters","maybeToggleClearFilter","delegateTarget","call","$input","_initTooltip","_initPriceSlider","_initDropdown","_initCollapsable","maybeShowClearFilter","_initCustomInput","$dropdown","$current","position","th","tooltip","wrapperWidth","outerWidth","left","width","container","css","toFixed","fadeIn","fadeOut","remove","selectWoo","_initDropdownObject","terms_per_page","$minInput","$maxInput","min","parseFloat","max","currentMin","currentMax","step","handleSliderChange","sliderTimeout","clearTimeout","setTimeout","ionRangeSlider","skin","from","to","min_interval","values_separator","prettify","formatPrice","onChange","onFinish","add","off","key","_initTitleCollapsable","_initHierarchyCollapsable","$title","_initToggle","parents","show_current_children","$t","$toggle","appendTo","toggle","containerClass","wrap","originalFilters","getFiltersProperties","_addCloseModalButton","_addApplyFiltersModalButton","_switchToCollapsables","removeAttr","_removeCloseModalButton","_removeApplyFiltersModalButton","_switchBackCollapsables","$closeButton","close","modalElements","closeButton","$filterButton","show_results","applyFiltersButton","removeData","$filters","isFilterActive","end","currentFilters","currentStr","JSON","stringify","originalStr","dirty","$initiator","maybeRegisterStatusChange","instant_filters","product_filter","doFilter","newPreset","scroll_top","targetOffset","offset","top","scroll_target","$scrollTarget","animate","scrollTop","getActiveFilters","filterType","filteredActive","Math","abs","properties","filteredProperties","$active","activeTerms","taxonomy","isAttr","relation","get","pop","glue","rating_filter","price_ranges","min_price","max_price","onsale_filter","instock_filter","featured_filter","orderby","filterProperties","getFilterProperties","mergeProperties","hasProp","includes","maybeHideClearFilter","isAnyFilterActive","maybeHideClearAllFilters","show_clear_filter","clear_selection","role","deactivateFilter","clear_all_selections","$activeItems","click","formattedRange","$priceSlider","getFiltersByProperties","classToAdd","classToRemove","openFilter","closeFilter","toggles_open_on_modal","_openAllCollapsables","_closeAllCollapsables","price","accounting","formatMoney","symbol","currency_format","decimal","thousand","precision","format","set1","set2","hasOwnProperty","newValue","index","arr","queryTypeParam"],"mappings":";;;;;AAAa;AAEb;;AAEA,IAAMA,CAAC,GAAGC,MAAV,C,CAAkB;;AAClB,IAAMC,KAAK,GAAGF,CAAC,CAAE,MAAF,CAAf;;;ACLa;AAEb;;;;;;;;;;;;AAEA;;IAEqBG,gB;AACpB;AAGA;AAGA;AAGA;AAGA;AAGA;AACA,8BAAc;AAAA;;AAAA,iCAfR,IAeQ;;AAAA,uCAZF,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ACA;AAEA1b,MAAM,CAAE,UAAWD,CAAX,EAAe;AACtBA,GAAC,CAAEY,QAAF,CAAD,CACEE,EADF,CAEE,yEAFF,EAGE,YAAY;AACXd,KAAC,CAAE,oBAAF,CAAD,CACEoR,GADF,CACO,WADP,EAEEtK,IAFF,CAEQ,YAAY;AAClB,UAAIiJ,gBAAJ,CAAsB/P,CAAC,CAAE,IAAF,CAAvB;AACA,KAJF;AAMAA,KAAC,CAAE,0BAAF,CAAD,CACEoR,GADF,CACO,WADP,EAEEtK,IAFF,CAEQ,YAAY;AAClB,UAAIL,sBAAJ,CAA4BzG,CAAC,CAAE,IAAF,CAA7B;AACA,KAJF;AAKA,GAfH,EAiBEwC,OAjBF,CAiBW,2BAjBX;AAmBAsJ,YAAU,CAACyL,cAAX,GAA4B,IAAIpX,gBAAJ,EAA5B;AACA,CArBK,CAAN,C","file":"yith-wcan-shortcodes.js","sourcesContent":["'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nconst $ = jQuery; // we can do this as WebPack will compact all together inside a closure.\nconst $body = $( 'body' );\n\nexport { $, $body };\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $, $body } from '../config.js';\n\nexport default class YITH_WCAN_Filter {\n\t// currently executing xhr\n\txhr = null;\n\n\t// flag set during ajax call handling\n\tdoingAjax = false;\n\n\t// register original url search param\n\toriginalSearch = location.search;\n\n\t// flag set once init has executed\n\tinitialized = false;\n\n\t// flag set when page has at least one active filter.\n\tfiltered = false;\n\n\t// init object\n\tconstructor() {\n\t\tthis.initPopState();\n\t\tthis.initialized = true;\n\t}\n\n\t// init page reload when popstate event alter filters\n\tinitPopState() {\n\t\tif ( ! yith_wcan_shortcodes.reload_on_back ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pushUrlToHistory( window.location, document.title, null, true );\n\n\t\t$( window ).on( 'popstate', function () {\n\t\t\tif ( ! window.history.state?._yithWcan ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twindow.location.reload( true );\n\t\t} );\n\t}\n\n\t// execute call to filter products in current view\n\tdoFilter( filters, target, preset ) {\n\t\tlet targetUrl,\n\t\t\t$target = target ? $( target ) : $( 'body' ),\n\t\t\tcustomFilters;\n\n\t\t// filter properties\n\t\tcustomFilters = $( document ).triggerHandler(\n\t\t\t'yith_wcan_filters_parameters',\n\t\t\t[ filters ]\n\t\t);\n\n\t\tif ( !! customFilters ) {\n\t\t\tfilters = customFilters;\n\t\t}\n\n\t\t// block elements before filtering\n\t\t$target && this.block( $target );\n\n\t\t// calculate target url\n\t\ttargetUrl = this.buildUrl( filters );\n\n\t\t// if no ajax, simply change page url\n\t\tif ( ! yith_wcan_shortcodes.ajax_filters ) {\n\t\t\tthis.pushUrlToHistory( targetUrl, document.title, filters );\n\n\t\t\twindow.location = targetUrl;\n\t\t\treturn;\n\t\t}\n\n\t\t// start doing ajax\n\t\tthis.doingAjax = true;\n\n\t\treturn this._doAjax( targetUrl ).done( ( response ) => {\n\t\t\ttargetUrl = this.searchAlternativeUrl( response, targetUrl );\n\n\t\t\tthis._beforeFilter( response, filters );\n\n\t\t\tthis.refreshFragments( target, preset, response );\n\t\t\tthis.pushUrlToHistory( targetUrl, response.pageTitle, filters );\n\t\t\tthis.originalSearch = location.search;\n\n\t\t\t$target && this.unblock( $target );\n\n\t\t\tthis._afterFilter( response, filters );\n\n\t\t\tthis.doingAjax = false;\n\t\t} );\n\t}\n\n\t// actions performed before filter\n\t_beforeFilter( response, filters ) {\n\t\t$( document ).trigger( 'yith-wcan-ajax-loading', [\n\t\t\tresponse,\n\t\t\tfilters,\n\t\t] );\n\t}\n\n\t// actions performed after filter\n\t_afterFilter( response, filters ) {\n\t\t$( '.woocommerce-ordering' ).on(\n\t\t\t'change',\n\t\t\t'select.orderby',\n\t\t\tfunction () {\n\t\t\t\t$( this ).closest( 'form' ).submit();\n\t\t\t}\n\t\t);\n\n\t\tthis.filtered = filters && !! Object.keys( filters ).length;\n\t\tthis.filtered\n\t\t\t? $body.addClass( 'filtered' )\n\t\t\t: $body.removeClass( 'filtered' );\n\n\t\t$( window ).trigger( 'scroll' );\n\n\t\t$( document )\n\t\t\t.trigger( 'yith-wcan-ajax-filtered', [ response, filters ] )\n\t\t\t.trigger( 'yith_wcwl_reload_fragments' );\n\t}\n\n\t// build url to show\n\tbuildUrl( filters ) {\n\t\tlet queryParam = yith_wcan_shortcodes.query_param,\n\t\t\tparams = {},\n\t\t\tlocation = window.location,\n\t\t\turl = !! yith_wcan_shortcodes.base_url\n\t\t\t\t? yith_wcan_shortcodes.base_url\n\t\t\t\t: location?.origin + location?.pathname,\n\t\t\tsearch = '',\n\t\t\tself = this;\n\n\t\tconst haveFilters =\n\t\t\ttypeof filters === 'object' && Object.keys( filters ).length;\n\n\t\t// remove filter session from current url, if any\n\t\tif ( !! yith_wcan_shortcodes.session_param ) {\n\t\t\turl = url.replace(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t'/' + yith_wcan_shortcodes.session_param + '/[^/]*/'\n\t\t\t\t),\n\t\t\t\t''\n\t\t\t);\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams[ queryParam ] = 1;\n\t\t}\n\n\t\tif ( !! this.originalSearch ) {\n\t\t\tconst searchParams = this.originalSearch\n\t\t\t\t.replace( '?', '' )\n\t\t\t\t.split( '&' )\n\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\tconst items = v.split( '=' );\n\n\t\t\t\t\tif ( items.length === 2 ) {\n\t\t\t\t\t\tif ( this.isFilterParam( items[ 0 ] ) ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta[ items[ 0 ] ] = items[ 1 ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t}, {} );\n\n\t\t\tparams = $.extend( params, searchParams );\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams = $.extend( params, filters );\n\t\t}\n\n\t\tsearch = Object.keys( params )\n\t\t\t.reduce( function ( a, i ) {\n\t\t\t\tconst v = params[ i ];\n\n\t\t\t\tif ( ! v || ! i ) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\n\t\t\t\ta += self._cleanParam( i ) + '=' + self._cleanParam( v ) + '&';\n\n\t\t\t\treturn a;\n\t\t\t}, '?' )\n\t\t\t.replace( /&$/g, '' )\n\t\t\t.replace( /%2B/g, '+' )\n\t\t\t.replace( /%2C/g, ',' );\n\n\t\tif ( search.length > 1 ) {\n\t\t\turl += search;\n\t\t}\n\n\t\treturn url;\n\t}\n\n\t// retrieves alternative sharing url in response body\n\tsearchAlternativeUrl( response, defaultUrl = '' ) {\n\t\tlet url = defaultUrl,\n\t\t\tmatches;\n\n\t\tif ( -1 === response.indexOf( 'yith_wcan:sharing_url' ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\tmatches = response.match(\n\t\t\t/<meta name=\"yith_wcan:sharing_url\" content=\"([^\"]*)\">/\n\t\t);\n\t\turl = matches && 1 in matches ? matches[ 1 ] : url;\n\n\t\treturn url;\n\t}\n\n\t// push url to browser history\n\tpushUrlToHistory( url, title, filters, current ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes.change_browser_url ||\n\t\t\tnavigator.userAgent.match( /msie/i )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet method = 'pushState';\n\n\t\tif ( !! current ) {\n\t\t\tmethod = 'replaceState';\n\t\t}\n\n\t\twindow.history[ method ](\n\t\t\t{\n\t\t\t\t_yithWcan: true,\n\t\t\t\tpageTitle: title,\n\t\t\t\tfilters,\n\t\t\t},\n\t\t\t'',\n\t\t\turl\n\t\t);\n\t}\n\n\t// replaces elements in the page with refreshed ones\n\trefreshFragments( target, preset, response ) {\n\t\tconst responseDom = document.createElement( 'html' ),\n\t\t\t$response = $( responseDom );\n\n\t\tresponseDom.innerHTML = response;\n\n\t\tif ( target ) {\n\t\t\tlet $preset = $( preset ),\n\t\t\t\t$target = $( target ),\n\t\t\t\t$destination;\n\n\t\t\tif ( $preset.length ) {\n\t\t\t\t$destination = $response.find( preset );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$preset.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $target.length ) {\n\t\t\t\t$destination = $response.find( target );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$target.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst content = $( yith_wcan_shortcodes.content );\n\n\t\t\tif ( content.length ) {\n\t\t\t\tcontent.replaceWith(\n\t\t\t\t\t$response.find( yith_wcan_shortcodes.content )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$( 'body' ).replaceWith( $response.find( 'body' ) );\n\t\t\t}\n\t\t}\n\n\t\t$( document ).trigger( 'yith_wcan_init_shortcodes' );\n\t}\n\n\t// clean url parameters\n\t_cleanParam( param ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes?.process_sanitize ||\n\t\t\tyith_wcan_shortcodes?.skip_sanitize\n\t\t) {\n\t\t\treturn param;\n\t\t}\n\n\t\treturn encodeURIComponent( param );\n\t}\n\n\t// executes Ajax calls\n\t_doAjax( url, params ) {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tparams = $.extend(\n\t\t\t{\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'X-YITH-WCAN': 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\tparams\n\t\t);\n\n\t\tthis.xhr = $.ajax( params );\n\n\t\treturn this.xhr;\n\t}\n\n\t// block dom elements\n\tblock( $el ) {\n\t\tif ( typeof $.fn.block === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet background = '#fff center center no-repeat';\n\n\t\tif ( yith_wcan_shortcodes?.loader ) {\n\t\t\tbackground = `url('${ yith_wcan_shortcodes.loader }') ${ background }`;\n\t\t}\n\n\t\t$el.block( {\n\t\t\tmessage: null,\n\t\t\toverlayCSS: {\n\t\t\t\tbackground,\n\t\t\t\topacity: 0.7,\n\t\t\t},\n\t\t} );\n\t}\n\n\t// unblock dom elements\n\tunblock( $el ) {\n\t\tif ( typeof $.fn.unblock === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$el.unblock();\n\t}\n\n\t// checks if param is one used by layared nav to filter products.\n\tisFilterParam( param ) {\n\t\tlet supportedParams = [\n\t\t\t\t'rating_filter',\n\t\t\t\t'min_price',\n\t\t\t\t'max_price',\n\t\t\t\t'price_ranges',\n\t\t\t\t'onsale_filter',\n\t\t\t\t'instock_filter',\n\t\t\t\t'featured_filter',\n\t\t\t\t'orderby',\n\t\t\t\t'product-page',\n\t\t\t\tyith_wcan_shortcodes.query_param,\n\t\t\t],\n\t\t\tcustomParams;\n\n\t\t// filter properties\n\t\tcustomParams = $( document ).triggerHandler(\n\t\t\t'yith_wcan_supported_filters_parameters',\n\t\t\t[ supportedParams ]\n\t\t);\n\n\t\tif ( !! customParams ) {\n\t\t\tsupportedParams = customParams;\n\t\t}\n\n\t\tsupportedParams = supportedParams.concat(\n\t\t\tyith_wcan_shortcodes.supported_taxonomies.map( ( i ) =>\n\t\t\t\ti.replace( 'pa_', 'filter_' )\n\t\t\t)\n\t\t);\n\n\t\tif ( -1 !== supportedParams.indexOf( param ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'filter_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'query_type_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Reset_Button {\n\t// current button\n\t$reset = null;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// current button\n\t\tthis.$reset = el;\n\n\t\tthis.$reset.on( 'click', function ( ev ) {\n\t\t\tev.preventDefault();\n\n\t\t\t$( '.yith-wcan-filters' ).each( function () {\n\t\t\t\tconst preset = $( this ).data( 'preset' );\n\n\t\t\t\tpreset.deactivateAllFilters( true );\n\t\t\t\tpreset.closeModal();\n\t\t\t} );\n\t\t} );\n\n\t\tthis.$reset.data( 'reset', this ).addClass( 'enhanced' );\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Dropdown {\n\t// current button\n\t$originalSelect = null;\n\n\t// main element\n\t$_main = null;\n\n\t// label element\n\t$_label = null;\n\n\t// dropdown\n\t$_dropdown = null;\n\n\t// search input\n\t$_search = null;\n\n\t// show more link\n\t$_showMore = null;\n\n\t// items list\n\t$_items = null;\n\n\t// current page\n\tcurrentPage = 1;\n\n\t// options\n\toptions = {};\n\n\t// init object\n\tconstructor( el, opts ) {\n\t\tthis.$originalSelect = el;\n\n\t\tif ( ! this.$originalSelect.is( 'select' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst defaultPerPage = this.$originalSelect.data( 'per_page' ),\n\t\t\tdefaultOrder = this.$originalSelect.data( 'order' ),\n\t\t\tdefaultAll = this.$originalSelect.data( 'all-label' ),\n\t\t\tdefaults = {\n\t\t\t\tshowSearch: this.$originalSelect.data( 'show_search' ),\n\t\t\t\tpaginate: this.$originalSelect.data( 'paginate' ),\n\t\t\t\tperPage: defaultPerPage ? defaultPerPage : 10,\n\t\t\t\torder: defaultOrder ? defaultOrder : 'ASC',\n\t\t\t\tgetElements: null,\n\t\t\t\tlabels: {\n\t\t\t\t\temptyLabel: defaultAll\n\t\t\t\t\t\t? defaultAll\n\t\t\t\t\t\t: yith_wcan_shortcodes.labels?.empty_option,\n\t\t\t\t\tsearchPlaceholder:\n\t\t\t\t\t\tyith_wcan_shortcodes.labels?.search_placeholder,\n\t\t\t\t\tnoItemsFound: yith_wcan_shortcodes.labels?.no_items,\n\t\t\t\t\tshowMore: yith_wcan_shortcodes.labels?.show_more,\n\t\t\t\t},\n\t\t\t};\n\n\t\tthis.options = $.extend( defaults, opts );\n\n\t\tthis._hideSelect();\n\t\tthis._initTemplate();\n\t\tthis._initActions();\n\n\t\tthis.$originalSelect.data( 'dropdown', this ).addClass( 'enhanced' );\n\t}\n\n\t// hide select\n\t_hideSelect() {\n\t\tthis.$originalSelect.hide();\n\t}\n\n\t// create dropdown\n\t_initTemplate() {\n\t\tconst $mainSpan = $( '<div/>', {\n\t\t\t\tclass: 'yith-wcan-dropdown closed',\n\t\t\t} ),\n\t\t\t$labelSpan = $( '<div/>', {\n\t\t\t\tclass: 'dropdown-label',\n\t\t\t\thtml: this.getLabel(),\n\t\t\t} ),\n\t\t\t$dropdownSpan = $( '<div>', {\n\t\t\t\tclass: 'dropdown-wrapper',\n\t\t\t} ),\n\t\t\t$matchingItemsList = $( '<ul/>', {\n\t\t\t\tclass: 'matching-items filter-items',\n\t\t\t} );\n\n\t\t$dropdownSpan.append( $matchingItemsList );\n\t\t$mainSpan.append( $labelSpan ).append( $dropdownSpan );\n\n\t\tif ( this.options.showSearch ) {\n\t\t\tthis._initSearchTemplate( $dropdownSpan );\n\t\t}\n\n\t\tif ( this.options.paginate ) {\n\t\t\tthis._initShowMoreTemplate( $dropdownSpan );\n\t\t}\n\n\t\tthis.$originalSelect.after( $mainSpan );\n\t\tthis.$_main = $mainSpan;\n\t\tthis.$_label = $labelSpan;\n\t\tthis.$_dropdown = $dropdownSpan;\n\t\tthis.$_items = $matchingItemsList;\n\t}\n\n\t// create search field\n\t_initSearchTemplate( $dropdwonSpan ) {\n\t\tconst $container = $( '<div/>', {\n\t\t\t\tclass: 'search-field-container',\n\t\t\t} ),\n\t\t\t$search = $( '<input/>', {\n\t\t\t\tname: 's',\n\t\t\t\tclass: 'search-field',\n\t\t\t\ttype: 'search',\n\t\t\t\tplaceholder: this.options.labels.searchPlaceholder,\n\t\t\t} ).attr( 'autocomplete', 'off' );\n\n\t\t$container.append( $search ).prependTo( $dropdwonSpan );\n\t\tthis.$_search = $search;\n\t}\n\n\t// create showMore field\n\t_initShowMoreTemplate( $dropdwonSpan ) {\n\t\tconst $showMore = $( '<a/>', {\n\t\t\tclass: 'show-more',\n\t\t\ttext: this.options.labels.showMore?.replace(\n\t\t\t\t'%d',\n\t\t\t\tthis.options.perPage\n\t\t\t),\n\t\t} );\n\n\t\t$showMore.on( 'click', this.loadNextPage.bind( this ) ).hide();\n\n\t\t$dropdwonSpan.append( $showMore );\n\t\tthis.$_showMore = $showMore;\n\t}\n\n\t// init actions performed over dropdown elements\n\t_initActions() {\n\t\tconst self = this;\n\n\t\t// main open event\n\t\tthis.$_main?.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tself.toggleDropdown();\n\t\t} );\n\t\tthis.$_dropdown.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t} );\n\n\t\t// search event\n\t\tthis.$_search?.on( 'keyup search', () => {\n\t\t\tself._populateItems();\n\t\t} );\n\n\t\t// select event\n\t\tthis.$_items.on( 'change', ':input', function () {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'li:not(.checkbox) a', function ( ev ) {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tif ( isActive ) {\n\t\t\t\t$li.siblings().removeClass( 'active' );\n\t\t\t}\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'label > a', function ( ev ) {\n\t\t\tconst input = $( this ).parent().find( ':input' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\tinput.is( '[type=\"radio\"]' ) ||\n\t\t\t\tinput.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\tinput.prop( 'checked', ! input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\tinput.change();\n\t\t} );\n\n\t\t// select change\n\t\tthis.$originalSelect.on( 'change', ( ev, selfOriginated ) => {\n\t\t\tif ( selfOriginated ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.$_items.find( 'li' ).each( function () {\n\t\t\t\tconst value = $( this ).data( 'value' );\n\n\t\t\t\tif ( self.isValueSelected( value ) ) {\n\t\t\t\t\tself._selectItem( value );\n\t\t\t\t} else {\n\t\t\t\t\tself._deselectItem( value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tself.updateLabel();\n\t\t} );\n\n\t\t// close dropdown on external click; do this handler only once for any dropdown in the page\n\t\tif ( ! globalThis?.yith_wcan_dropdown_init ) {\n\t\t\t$( document ).on( 'click', this._closeAllDropdowns );\n\t\t\tglobalThis.yith_wcan_dropdown_init = true;\n\t\t}\n\t}\n\n\t// open dropdown\n\topenDropdown() {\n\t\tthis.$_main?.addClass( 'open' ).removeClass( 'closed' );\n\t\tthis._afterDropdownOpen();\n\t}\n\n\t// close dropdown\n\tcloseDropdown() {\n\t\tthis.$_main?.removeClass( 'open' ).addClass( 'closed' );\n\t}\n\n\t// close all dropdowns\n\t_closeAllDropdowns() {\n\t\tconst dropdowns = $( document )\n\t\t\t.find( 'select.enhanced' )\n\t\t\t.filter( function ( i, select ) {\n\t\t\t\tconst $el = $( select );\n\n\t\t\t\treturn !! $el.data( 'dropdown' );\n\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// close other dropdowns\n\t_closeOtherDropdowns() {\n\t\tconst self = this,\n\t\t\tdropdowns = $( document )\n\t\t\t\t.find( 'select.enhanced' )\n\t\t\t\t.filter( function ( i, select ) {\n\t\t\t\t\tconst $el = $( select );\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! $el.data( 'dropdown' ) &&\n\t\t\t\t\t\t! $el.is( self.$originalSelect )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// toggle dropdown\n\ttoggleDropdown() {\n\t\tthis.$_main?.toggleClass( 'open' ).toggleClass( 'closed' );\n\n\t\tif ( this.$_main?.hasClass( 'open' ) ) {\n\t\t\tthis._afterDropdownOpen();\n\t\t}\n\t}\n\n\t// perform operations after dropdown is open\n\t_afterDropdownOpen() {\n\t\tthis._closeOtherDropdowns();\n\n\t\tif ( this.$_search?.length ) {\n\t\t\tthis.$_search.val( '' );\n\t\t}\n\n\t\tthis._populateItems();\n\t}\n\n\t// get elements\n\tgetMatchingElements( search, limit ) {\n\t\tlet matchingElements = [],\n\t\t\t$options = this.getOptions(),\n\t\t\tpromise;\n\n\t\tpromise = new Promise( ( resolve ) => {\n\t\t\t// first of all, search across select option\n\t\t\t$options.each( function () {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\tvalue = t.val(),\n\t\t\t\t\tlabel = t.html(),\n\t\t\t\t\tregex = new RegExp( '.*' + search + '.*', 'i' ),\n\t\t\t\t\tshow =\n\t\t\t\t\t\t! search || regex.test( value ) || regex.test( label );\n\n\t\t\t\tif ( show ) {\n\t\t\t\t\tmatchingElements.push( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// then retrieve additional items\n\t\t\tif ( this.options.getElements ) {\n\t\t\t\t// we're expecting key => value pairs\n\t\t\t\tthis.options\n\t\t\t\t\t.getElements( search )\n\t\t\t\t\t.then( ( retrievedElements ) => {\n\t\t\t\t\t\tif ( retrievedElements ) {\n\t\t\t\t\t\t\t// reformat retrieved array\n\t\t\t\t\t\t\tretrievedElements = retrievedElements.reduce(\n\t\t\t\t\t\t\t\t( a, v, i ) => {\n\t\t\t\t\t\t\t\t\ta.push( { label: i, value: v } );\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// merge found results with options\n\t\t\t\t\t\t\tmatchingElements = $.extend(\n\t\t\t\t\t\t\t\tmatchingElements,\n\t\t\t\t\t\t\t\tretrievedElements\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t}\n\t\t} );\n\n\t\treturn promise;\n\t}\n\n\t// format items as key/value pairs for further processing\n\t_formatItems( items, limit ) {\n\t\tlet indexes = [],\n\t\t\thasMore = false;\n\n\t\t// remove duplicates and sort array of results\n\t\titems\n\t\t\t.filter( ( v ) => {\n\t\t\t\tif ( -1 === indexes.indexOf( v.value ) ) {\n\t\t\t\t\tindexes.push( v.value );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t\t.sort( ( a, b ) => {\n\t\t\t\tconst order = this.options.order,\n\t\t\t\t\tmod = order === 'ASC' ? 1 : -1;\n\n\t\t\t\tif ( a.value < b.value ) {\n\t\t\t\t\treturn -1 * mod;\n\t\t\t\t} else if ( a.value > b.value ) {\n\t\t\t\t\treturn mod;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t} );\n\n\t\t// paginate when needed\n\t\tif ( limit ) {\n\t\t\thasMore = limit < Object.keys( items ).length;\n\t\t\titems = items.slice( 0, limit );\n\t\t}\n\n\t\treturn {\n\t\t\titems,\n\t\t\thasMore,\n\t\t};\n\t}\n\n\t// generate item to append to items list\n\t_generateItem( value, label ) {\n\t\tlet active = this.isValueSelected( value ),\n\t\t\toption = this.getOptionByValue( value ),\n\t\t\t$item = $( '<li/>', {\n\t\t\t\t'data-value': value,\n\t\t\t\tclass: option.length ? option.attr( 'class' ) : '',\n\t\t\t} ),\n\t\t\t$anchor;\n\n\t\tif ( option.length ) {\n\t\t\tconst template = option.data( 'template' ),\n\t\t\t\tcount = option.data( 'count' );\n\n\t\t\tlabel = template ? template : label;\n\n\t\t\tif ( !! count ) {\n\t\t\t\tlabel += count;\n\t\t\t}\n\t\t}\n\n\t\t$anchor = $( '<a/>', {\n\t\t\thref: option.length ? option.data( 'filter_url' ) : '#',\n\t\t\thtml: label,\n\t\t\trel: 'nofollow',\n\t\t\t'data-title': option.length ? option.data( 'title' ) : '',\n\t\t} );\n\n\t\tif ( this.$originalSelect.prop( 'multiple' ) ) {\n\t\t\tconst $checkbox = $( '<input/>', {\n\t\t\t\t\ttype: 'checkbox',\n\t\t\t\t\tvalue,\n\t\t\t\t} ),\n\t\t\t\t$label = $( '<label>' );\n\n\t\t\t$checkbox.prop( 'checked', active );\n\t\t\t$label.prepend( $checkbox ).append( $anchor );\n\t\t\t$item.append( $label ).addClass( 'checkbox' );\n\t\t} else {\n\t\t\t$item.append( $anchor );\n\t\t}\n\n\t\tactive ? $item.addClass( 'active' ) : $item.removeClass( 'active' );\n\n\t\treturn $item;\n\t}\n\n\t// populate items list\n\t_populateItems( page ) {\n\t\tlet search = this.$_search?.length ? this.$_search.val() : '',\n\t\t\tperPage = this.options.paginate ? this.options.perPage : 0,\n\t\t\tlimit;\n\n\t\tpage = page ? parseInt( page ) : 1;\n\t\tlimit = page * perPage;\n\n\t\tthis.getMatchingElements( search, limit ).then( ( resultSet ) => {\n\t\t\tlet matchingItems = resultSet.items,\n\t\t\t\titems = [],\n\t\t\t\thasMore = false;\n\n\t\t\t// remove all previous items\n\t\t\tthis._emptyItems();\n\t\t\tthis._hideLoadMore();\n\n\t\t\tif ( ! matchingItems.length ) {\n\t\t\t\titems.push(\n\t\t\t\t\t$( '<li/>', { text: this.options.labels.noItemsFound } )\n\t\t\t\t);\n\n\t\t\t\tthis.currentPage = 1;\n\t\t\t} else {\n\t\t\t\tfor ( const v of matchingItems ) {\n\t\t\t\t\tif ( v.value === '' ) {\n\t\t\t\t\t\titems.unshift( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems.push( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.currentPage = page;\n\t\t\t\thasMore = resultSet.hasMore;\n\t\t\t}\n\n\t\t\tthis.$_items.append( items );\n\n\t\t\tthis.$originalSelect.trigger( 'yith_wcan_dropdown_updated' );\n\n\t\t\tif ( hasMore ) {\n\t\t\t\tthis._showLoadMore();\n\t\t\t}\n\t\t} );\n\t}\n\n\t// load next page of items\n\tloadNextPage() {\n\t\tconst page = this.currentPage + 1;\n\n\t\tthis._populateItems( page );\n\t}\n\n\t// set an item as active\n\t_selectItem( value ) {\n\t\treturn this._changeItemStatus( value, true );\n\t}\n\n\t// disable an item\n\t_deselectItem( value ) {\n\t\treturn this._changeItemStatus( value, false );\n\t}\n\n\t// change item status\n\t_changeItemStatus( value, status ) {\n\t\tconst $option = this.$originalSelect.find(\n\t\t\t`option[value=\"${ value }\"]`\n\t\t);\n\n\t\tif ( $option.length ) {\n\t\t\t$option.prop( 'selected', status );\n\n\t\t\tthis.closeDropdown();\n\t\t\tthis.updateLabel();\n\n\t\t\tthis.$originalSelect.trigger( 'change', [ true ] );\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// empty items list\n\t_emptyItems() {\n\t\tthis.$_items.html( '' );\n\t}\n\n\t// show \"Load more\" link\n\t_showLoadMore() {\n\t\tthis.$_showMore.show();\n\t}\n\n\t// hide \"Load more\" link\n\t_hideLoadMore() {\n\t\tthis.$_showMore.hide();\n\t}\n\n\t// returns select label\n\tgetLabel() {\n\t\treturn this.hasSelectedValues()\n\t\t\t? this.getSelectedLabels().join( ', ' )\n\t\t\t: this.options.labels.emptyLabel;\n\t}\n\n\t// update label to match new selection\n\tupdateLabel() {\n\t\tconst label = this.getLabel();\n\n\t\tthis.$_label?.html( label );\n\t}\n\n\t// returns select options\n\tgetOptions() {\n\t\treturn this.$originalSelect.find( 'option' );\n\t}\n\n\t// checks whether select has selected values\n\thasSelectedValues() {\n\t\treturn this.getSelectedOptions().length;\n\t}\n\n\t// checks whether a value is selected\n\tisValueSelected( value ) {\n\t\tconst found = this.getSelectedValues().indexOf( value.toString() );\n\n\t\treturn -1 !== found;\n\t}\n\n\t// retrieve selected options\n\tgetSelectedOptions() {\n\t\treturn this.$originalSelect.find( 'option' ).filter( ':selected' );\n\t}\n\n\t// retrieves an option node by value\n\tgetOptionByValue( value ) {\n\t\treturn this.$originalSelect.find( `option[value=\"${ value }\"]` );\n\t}\n\n\t// retrieve labels for selected options\n\tgetSelectedLabels() {\n\t\tconst labels = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tlet $option = $( this ),\n\t\t\t\ttemplate = $option.data( 'template' );\n\n\t\t\ttemplate = template\n\t\t\t\t? template\n\t\t\t\t: $option.html().replace( /\\([0-9]*\\)/, '' );\n\n\t\t\tlabels.push( template );\n\t\t} );\n\n\t\treturn labels;\n\t}\n\n\t// retrieve values for selected options\n\tgetSelectedValues() {\n\t\tconst values = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tvalues.push( $( this ).val() );\n\t\t} );\n\n\t\treturn values;\n\t}\n\n\tdestroy() {\n\t\t// TBD\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\nimport YITH_WCAN_Dropdown from './yith-wcan-dropdown';\n\nexport default class YITH_WCAN_Preset {\n\t// main preset node\n\tpreset = false;\n\t$preset = false;\n\n\t// target of the filter, if any\n\ttarget = false;\n\t$target = false;\n\n\t// filters node\n\t$filters = false;\n\n\t// filter button\n\t$filterButtons = false;\n\n\t// nodes created just for modal layout\n\tmodalElements = {};\n\n\t// retains current status of filters\n\tactiveFilters = false;\n\n\t// mobile flag\n\tisMobile = false;\n\n\t// slider timeout\n\tsliderTimeout = false;\n\n\t// registers when status has changed\n\toriginalFilters = null;\n\tdirty = false;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// main preset node\n\t\tthis.preset = '#' + el.attr( 'id' );\n\t\tthis.$preset = el;\n\n\t\t// target of the filter, if any\n\t\tthis.target = this.$preset.data( 'target' );\n\t\tthis.$target = this.target ? $( this.target ) : false;\n\n\t\tthis._regiterStatus();\n\t\tthis._initFilterButton();\n\t\tthis._initResponsive();\n\t\tthis._initFilters();\n\t\tthis._initActions();\n\n\t\tthis.$preset\n\t\t\t.data( 'preset', this )\n\t\t\t.addClass( 'enhanced' )\n\t\t\t.trigger( 'yith_wcan_preset_initialized', [ this ] );\n\t}\n\n\t// init filters\n\t_initFilters() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself._initFilter( $filter );\n\t\t} );\n\n\t\tthis.maybeShowClearAllFilters();\n\t}\n\n\t// init filter button\n\t_initFilterButton() {\n\t\tthis.$filterButtons = this.$preset.find( '.apply-filters' );\n\n\t\tif ( ! this.$filterButtons.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// manage filter button\n\t\tthis.$filterButtons\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tthis.filter();\n\t\t\t} )\n\t\t\t.hide();\n\t}\n\n\t// init generic actions\n\t_initActions() {\n\t\tthis.$preset.find( 'form' ).on( 'submit', ( ev ) => {\n\t\t\tev.preventDefault();\n\t\t} );\n\t}\n\n\t// init responsive\n\t_initResponsive() {\n\t\tif ( ! yith_wcan_shortcodes.modal_on_mobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst media = window.matchMedia(\n\t\t\t`(max-width: ${ yith_wcan_shortcodes.mobile_media_query }px)`\n\t\t);\n\n\t\t$( window )\n\t\t\t.on( 'resize', () => {\n\t\t\t\tconst isMobile = !! media.matches;\n\n\t\t\t\tif ( isMobile !== this.isMobile ) {\n\t\t\t\t\tthis.isMobile = isMobile;\n\t\t\t\t\tthis._afterLayoutChange();\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.resize();\n\t}\n\n\t// init filter\n\t_initFilter( $filter ) {\n\t\tconst self = this,\n\t\t\thandleChange = function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$currentFilter = t.closest( '.yith-wcan-filter' ),\n\t\t\t\t\tmultiple = $currentFilter.length\n\t\t\t\t\t\t? 'yes' === $currentFilter.data( 'multiple' )\n\t\t\t\t\t\t: false,\n\t\t\t\t\t$item = t.closest( '.filter-item' ),\n\t\t\t\t\t$items = $item.length\n\t\t\t\t\t\t? $currentFilter.find( '.filter-item' ).not( $item )\n\t\t\t\t\t\t: [];\n\n\t\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tev.preventDefault();\n\n\t\t\t\t$items.length &&\n\t\t\t\t\t! multiple &&\n\t\t\t\t\t$items\n\t\t\t\t\t\t.removeClass( 'active' )\n\t\t\t\t\t\t.children( 'label' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.parent( '.checked' )\n\t\t\t\t\t\t.removeClass( 'checked' );\n\t\t\t\t$item.length && $item.toggleClass( 'active' );\n\n\t\t\t\t// reset active filters.\n\t\t\t\tself.activeFilters = false;\n\n\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\tself.maybeToggleClearAllFilters();\n\t\t\t\tself.maybeToggleClearFilter( $currentFilter );\n\t\t\t};\n\n\t\t// handle filter activation/deactivation by click on label (no input involved)\n\t\t$filter\n\t\t\t.find( '.filter-item' )\n\t\t\t.not( '.checkbox' )\n\t\t\t.not( '.radio' )\n\t\t\t.on( 'click', 'a', function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\t\tif ( ! $( ev?.delegateTarget ).is( $item ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\thandleChange.call( this, ev );\n\t\t\t} );\n\n\t\t// handle filter activation/deactivation from input change\n\t\t$filter.find( ':input' ).on( 'change', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\tt.prop( 'checked', false );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\thandleChange.call( this, ev );\n\t\t} );\n\n\t\t// handle filter activation/deactivation by click on label (there is an input whose state can be switched)\n\t\t$filter.find( 'label > a' ).on( 'click', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst $input = t.parent().find( ':input' );\n\n\t\t\tif (\n\t\t\t\t$input.is( '[type=\"radio\"]' ) ||\n\t\t\t\t$input.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\t$input.prop( 'checked', ! $input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\t$input.change();\n\t\t} );\n\n\t\t// init tooltip\n\t\tthis._initTooltip( $filter );\n\n\t\t// init price slider\n\t\tthis._initPriceSlider( $filter );\n\n\t\t// init dropdown\n\t\tthis._initDropdown( $filter );\n\n\t\t// init collapsable\n\t\tthis._initCollapsable( $filter );\n\n\t\t// init clear anchors\n\t\tthis.maybeShowClearFilter( $filter );\n\n\t\t// init custom inputs\n\t\tif ( this.$preset?.hasClass( 'custom-style' ) ) {\n\t\t\tthis._initCustomInput( $filter );\n\t\t\t$filter.on( 'yith_wcan_dropdown_updated', function () {\n\t\t\t\tconst $dropdown = $( this ),\n\t\t\t\t\t$current = $dropdown.closest( '.yith-wcan-filter' );\n\n\t\t\t\tself._initCustomInput( $current );\n\t\t\t} );\n\t\t}\n\t}\n\n\t// init tooltip\n\t_initTooltip( $filter, position ) {\n\t\t$filter.find( '[data-title]' ).each( function () {\n\t\t\tconst t = $( this );\n\n\t\t\tif ( t.hasClass( 'tooltip-added' ) || ! t.data( 'title' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tt.on( 'mouseenter', function () {\n\t\t\t\tlet th = $( this ),\n\t\t\t\t\ttooltip = null,\n\t\t\t\t\twrapperWidth = th.outerWidth(),\n\t\t\t\t\tleft = 0,\n\t\t\t\t\twidth = 0;\n\n\t\t\t\tif (\n\t\t\t\t\t! position ||\n\t\t\t\t\t( 'top' !== position && 'right' !== position )\n\t\t\t\t) {\n\t\t\t\t\tconst container = th.closest( '.filter-item' );\n\n\t\t\t\t\tposition =\n\t\t\t\t\t\tcontainer.hasClass( 'color' ) ||\n\t\t\t\t\t\tcontainer.hasClass( 'label' )\n\t\t\t\t\t\t\t? 'top'\n\t\t\t\t\t\t\t: 'right';\n\t\t\t\t}\n\n\t\t\t\ttooltip = $( '<span>', {\n\t\t\t\t\tclass: 'yith-wcan-tooltip',\n\t\t\t\t\thtml: th.data( 'title' ),\n\t\t\t\t} );\n\n\t\t\t\tth.append( tooltip );\n\n\t\t\t\twidth = tooltip.outerWidth() + 6;\n\t\t\t\ttooltip.outerWidth( width );\n\n\t\t\t\tif ( 'top' === position ) {\n\t\t\t\t\tleft = ( wrapperWidth - width ) / 2;\n\t\t\t\t} else {\n\t\t\t\t\tleft = wrapperWidth + 15;\n\t\t\t\t}\n\n\t\t\t\ttooltip.css( { left: left.toFixed( 0 ) + 'px' } ).fadeIn( 200 );\n\n\t\t\t\tth.addClass( 'with-tooltip' );\n\t\t\t} ).on( 'mouseleave', function () {\n\t\t\t\tconst th = $( this );\n\n\t\t\t\tth.find( '.yith-wcan-tooltip' ).fadeOut( 200, function () {\n\t\t\t\t\tth.removeClass( 'with-tooltip' )\n\t\t\t\t\t\t.find( '.yith-wcan-tooltip' )\n\t\t\t\t\t\t.remove();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tt.addClass( 'tooltip-added' );\n\t\t} );\n\t}\n\n\t// init dropdown\n\t_initDropdown( $filter ) {\n\t\tconst $dropdown = $filter.find( 'select.filter-dropdown' );\n\n\t\tif ( ! $dropdown.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t$dropdown.hasClass( 'select2-hidden-accessible' ) &&\n\t\t\t'undefined' !== typeof $.fn.selectWoo\n\t\t) {\n\t\t\t$dropdown.selectWoo( 'destroy' );\n\t\t}\n\n\t\tthis._initDropdownObject( $dropdown, {\n\t\t\tpaginate: true,\n\t\t\tperPage: yith_wcan_shortcodes.terms_per_page,\n\t\t} );\n\t}\n\n\t// init dropdown object\n\t_initDropdownObject( $dropdown, opts ) {\n\t\treturn new YITH_WCAN_Dropdown( $dropdown, opts );\n\t}\n\n\t// init price slider\n\t_initPriceSlider( $filter ) {\n\t\tif ( ! $filter.hasClass( 'filter-price-slider' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this,\n\t\t\t$container = $filter.find( '.price-slider' ),\n\t\t\t$minInput = $container.find( '.price-slider-min' ),\n\t\t\t$maxInput = $container.find( '.price-slider-max' ),\n\t\t\tmin = parseFloat( $container.data( 'min' ) ),\n\t\t\tmax = parseFloat( $container.data( 'max' ) ),\n\t\t\tcurrentMin = parseFloat( $minInput.val() ),\n\t\t\tcurrentMax = parseFloat( $maxInput.val() ),\n\t\t\tstep = parseFloat( $container.data( 'step' ) ),\n\t\t\thandleSliderChange = function () {\n\t\t\t\tif ( self.sliderTimeout ) {\n\t\t\t\t\tclearTimeout( self.sliderTimeout );\n\t\t\t\t}\n\n\t\t\t\tself.sliderTimeout = setTimeout( () => {\n\t\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\t}, 300 );\n\t\t\t};\n\n\t\t$filter.find( '.price-slider-ui' ).ionRangeSlider( {\n\t\t\tskin: 'round',\n\t\t\ttype: 'double',\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\tfrom: currentMin,\n\t\t\tto: currentMax,\n\t\t\tmin_interval: step,\n\t\t\tvalues_separator: ' - ',\n\t\t\tprettify: ( v ) => this.formatPrice( v ),\n\t\t\tonChange: ( data ) => {\n\t\t\t\t$minInput.val( data.from );\n\t\t\t\t$maxInput.val( data.to );\n\t\t\t},\n\t\t\tonFinish: handleSliderChange,\n\t\t} );\n\n\t\t$minInput\n\t\t\t.add( $maxInput )\n\t\t\t.off( 'change' )\n\t\t\t.on( 'change', handleSliderChange )\n\t\t\t.on( 'keyup', ( ev ) => {\n\t\t\t\tif ( ! ev.key.match( /[0-9,.]/ ) ) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( ! $minInput.val() || ! $maxInput.val() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\thandleSliderChange();\n\t\t\t} );\n\t}\n\n\t// init collapsable\n\t_initCollapsable( $filter ) {\n\t\tthis._initTitleCollapsable( $filter );\n\t\tthis._initHierarchyCollapsable( $filter );\n\t}\n\n\t// init toggle on click of the title\n\t_initTitleCollapsable( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._initToggle( $title, $title, $filter.find( '.filter-content' ) );\n\t}\n\n\t// init toggle on click of the parent li\n\t_initHierarchyCollapsable( $filter ) {\n\t\tconst $items = $filter.find( '.hierarchy-collapsable' );\n\n\t\tif ( ! $items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// set parents of currently active term as open\n\t\tconst self = this,\n\t\t\tactive = $filter.find( '.active' );\n\n\t\tif ( active.length ) {\n\t\t\tactive\n\t\t\t\t.parents( '.hierarchy-collapsable' )\n\t\t\t\t.removeClass( 'closed' )\n\t\t\t\t.addClass( 'opened' );\n\n\t\t\tif (\n\t\t\t\tactive.hasClass( 'hierarchy-collapsable' ) &&\n\t\t\t\tyith_wcan_shortcodes.show_current_children\n\t\t\t) {\n\t\t\t\tactive.removeClass( 'closed' ).addClass( 'opened' );\n\t\t\t}\n\t\t}\n\n\t\t$items.each( function () {\n\t\t\tconst $t = $( this ),\n\t\t\t\t$toggle = $( '<span/>', {\n\t\t\t\t\tclass: 'toggle-handle',\n\t\t\t\t} );\n\n\t\t\t$toggle.appendTo( $t );\n\n\t\t\tself._initToggle( $toggle, $t, $t.children( 'ul.filter-items' ) );\n\t\t} );\n\t}\n\n\t// init toggle to generic toggle/target pair\n\t_initToggle( $toggle, $container, $target ) {\n\t\tif ( $container.hasClass( 'closed' ) ) {\n\t\t\t$target.hide();\n\t\t}\n\n\t\t$toggle.off( 'click' ).on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tev.preventDefault();\n\n\t\t\tthis.toggle( $target, $container );\n\n\t\t\t$target.trigger( 'yith_wcan_after_toggle_element', [ $container ] );\n\t\t} );\n\t}\n\n\t// init custom input\n\t_initCustomInput( $filter ) {\n\t\t$filter.find( ':input' ).each( function () {\n\t\t\tlet input = $( this ),\n\t\t\t\ttype = input.attr( 'type' ),\n\t\t\t\tcontainerClass = `${ type }button`,\n\t\t\t\tcontainer;\n\n\t\t\tif ( 'checkbox' !== type && 'radio' !== type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.closest( `.${ containerClass }` ).length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.is( ':checked' ) ) {\n\t\t\t\tcontainerClass += ' checked';\n\t\t\t}\n\n\t\t\tcontainer = $( '<span/>', {\n\t\t\t\tclass: containerClass,\n\t\t\t} );\n\n\t\t\tinput.wrap( container ).on( 'change', function () {\n\t\t\t\tconst t = $( this );\n\n\t\t\t\tt.prop( 'checked' )\n\t\t\t\t\t? t.parent().addClass( 'checked' )\n\t\t\t\t\t: t.parent().removeClass( 'checked' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// register initial status\n\t_regiterStatus() {\n\t\tthis.originalFilters = this.getFiltersProperties();\n\t}\n\n\t// trigger handling after layout change\n\t_afterLayoutChange() {\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset\n\t\t\t\t.addClass( 'filters-modal' )\n\t\t\t\t.attr( 'role', 'dialog' )\n\t\t\t\t.attr( 'tabindex', '-1' )\n\t\t\t\t.hide();\n\n\t\t\tthis._addCloseModalButton();\n\t\t\tthis._addApplyFiltersModalButton();\n\t\t\tthis._switchToCollapsables();\n\n\t\t\tthis.$filterButtons?.hide();\n\t\t} else {\n\t\t\tthis.$preset\n\t\t\t\t.removeClass( 'filters-modal' )\n\t\t\t\t.removeClass( 'open' )\n\t\t\t\t.removeAttr( 'role' )\n\t\t\t\t.removeAttr( 'tabindex' )\n\t\t\t\t.show();\n\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\n\t\t\tthis._removeCloseModalButton();\n\t\t\tthis._removeApplyFiltersModalButton();\n\t\t\tthis._switchBackCollapsables();\n\n\t\t\tthis.$filterButtons?.show();\n\t\t}\n\t}\n\n\t// add modal close button\n\t_addCloseModalButton() {\n\t\tconst $closeButton = $( '<a/>', {\n\t\t\tclass: 'close-button',\n\t\t\thtml: '&times;',\n\t\t\t'data-dismiss': 'modal',\n\t\t\t'aria-label': yith_wcan_shortcodes.labels.close,\n\t\t} );\n\n\t\t$closeButton\n\t\t\t.prependTo( this.$preset )\n\t\t\t.on( 'click', this.closeModal.bind( this ) );\n\t\tthis.modalElements.closeButton = $closeButton;\n\t}\n\n\t// remove modal close button\n\t_removeCloseModalButton() {\n\t\tthis.modalElements?.closeButton?.remove();\n\t}\n\n\t// show main filter button for the modal\n\t_addApplyFiltersModalButton() {\n\t\tconst $filterButton = $( '<button/>', {\n\t\t\tclass: 'apply-filters main-modal-button',\n\t\t\thtml: yith_wcan_shortcodes.labels.show_results,\n\t\t\t'data-dismiss': 'modal',\n\t\t} );\n\n\t\t$filterButton.appendTo( this.$preset ).on( 'click', () => {\n\t\t\tthis.filter();\n\t\t\tthis.closeModal();\n\t\t} );\n\t\tthis.modalElements.applyFiltersButton = $filterButton;\n\t}\n\n\t// hide main filter button for the modal\n\t_removeApplyFiltersModalButton() {\n\t\tthis.modalElements?.applyFiltersButton?.remove();\n\t}\n\n\t// convert all filters to collapsable\n\t_switchToCollapsables() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif ( ! $title.length || $title.hasClass( 'collapsable' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title.addClass( 'collapsable' ).data( 'disable-collapse', true );\n\n\t\t\tself._initTitleCollapsable( $filter );\n\t\t} );\n\t}\n\n\t// switch back filters to their previous collapsable state\n\t_switchBackCollapsables() {\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif (\n\t\t\t\t! $title.length ||\n\t\t\t\t! $title.hasClass( 'collapsable' ) ||\n\t\t\t\t! $title.data( 'disable-collapse' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title\n\t\t\t\t.removeClass( 'collapsable' )\n\t\t\t\t.removeData( 'disable-collapse', true )\n\t\t\t\t.off( 'click' );\n\n\t\t\t$filter.find( '.filter-content' ).show();\n\t\t} );\n\t}\n\n\t// close all collpasable before showing modal\n\t_openAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.show()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.removeClass( 'closed' )\n\t\t\t.addClass( 'opened' );\n\t}\n\n\t// close all collpasable before showing modal\n\t_closeAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.hide()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.addClass( 'closed' )\n\t\t\t.removeClass( 'opened' );\n\t}\n\n\t// update status change flag, if filters have changed\n\tmaybeRegisterStatusChange() {\n\t\tconst currentFilters = this.getFiltersProperties(),\n\t\t\tcurrentStr = JSON.stringify( currentFilters ),\n\t\t\toriginalStr = JSON.stringify( this.originalFilters );\n\n\t\tthis.dirty = currentStr !== originalStr;\n\t}\n\n\t// apply filters when possible\n\tmaybeFilter( $initiator ) {\n\t\t// register status change\n\t\tthis.maybeRegisterStatusChange();\n\n\t\t// filter, or show filter button.\n\t\tif ( yith_wcan_shortcodes.instant_filters && ! this.isMobile ) {\n\t\t\tthis.filter();\n\t\t} else if (\n\t\t\t! yith_wcan_shortcodes.instant_filters &&\n\t\t\t! this.isMobile\n\t\t) {\n\t\t\tthis.dirty\n\t\t\t\t? this.$filterButtons?.show()\n\t\t\t\t: this.$filterButtons?.hide();\n\t\t} else if ( this.isMobile && this.dirty ) {\n\t\t\tthis.$preset.addClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.show();\n\t\t}\n\t}\n\n\t// main filtering method\n\tfilter() {\n\t\tconst filter = window?.product_filter;\n\n\t\tfilter\n\t\t\t?.doFilter( this.getFiltersProperties(), this.target, this.preset )\n\t\t\t?.done( () => {\n\t\t\t\tlet newPreset = $( this.preset );\n\n\t\t\t\tif ( newPreset.length && yith_wcan_shortcodes.scroll_top ) {\n\t\t\t\t\t// by default, scroll till top of first preset in the page.\n\t\t\t\t\tlet targetOffset = newPreset.offset().top;\n\n\t\t\t\t\tif ( !! yith_wcan_shortcodes.scroll_target ) {\n\t\t\t\t\t\t// when we have a specific target, use that for the offset.\n\t\t\t\t\t\tconst $scrollTarget = $(\n\t\t\t\t\t\t\tyith_wcan_shortcodes.scroll_target\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttargetOffset = $scrollTarget.length\n\t\t\t\t\t\t\t? $scrollTarget.offset().top\n\t\t\t\t\t\t\t: targetOffset;\n\t\t\t\t\t} else if ( this.isMobile ) {\n\t\t\t\t\t\t// otherwise, if we're on mobile, scroll to the top of the page\n\t\t\t\t\t\t// (preset could be in an unexpected location).\n\t\t\t\t\t\ttargetOffset = 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( 'body, html' ).animate( {\n\t\t\t\t\t\tscrollTop: targetOffset - 100,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// register new filters, clear status flag\n\t\t\t\tthis.originalFilters = this.getFiltersProperties();\n\t\t\t\tthis.dirty = false;\n\t\t\t} );\n\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset.removeClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.hide();\n\t\t\tthis.closeModal();\n\t\t}\n\t}\n\n\t// get all filter nodes\n\tgetFilters() {\n\t\tif ( false === this.$filters ) {\n\t\t\tthis.$filters = this.$preset.find( '.yith-wcan-filter' );\n\t\t}\n\n\t\treturn this.$filters;\n\t}\n\n\t// retrieves all filters that we want to apply\n\tgetActiveFilters() {\n\t\tif ( false === this.activeFilters ) {\n\t\t\tthis.activeFilters = this.getFiltersProperties();\n\t\t}\n\n\t\treturn this.activeFilters;\n\t}\n\n\t// check whether there is any filter active\n\tisAnyFilterActive() {\n\t\treturn !! Object.keys( this.getActiveFilters() ).length;\n\t}\n\n\t// checks whether current filter is active\n\tisFilterActive( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tactive,\n\t\t\tfilteredActive;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tactive = 'object' === typeof val ? !! val?.length : !! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tactive = $filter\n\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t.filter( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst step = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'step' )\n\t\t\t\t\t),\n\t\t\t\t\tmin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'min' )\n\t\t\t\t\t),\n\t\t\t\t\tmax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'max' )\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t\t);\n\n\t\t\t\tactive =\n\t\t\t\t\tMath.abs( currentMin - min ) >= step ||\n\t\t\t\t\tMath.abs( currentMax - max ) >= step;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tactive =\n\t\t\t\t\t'menu_order' !== $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredActive = $filter.triggerHandler( 'yith_wcan_is_filter_active', [\n\t\t\tactive,\n\t\t\tthis,\n\t\t] );\n\t\tactive =\n\t\t\ttypeof filteredActive !== 'undefined' ? filteredActive : active;\n\n\t\treturn active;\n\t}\n\n\t// count the number of active items per filter\n\tcountActiveItems( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tcount;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tcount = 'object' === typeof val ? val?.length : +!! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tcount = $filter\n\t\t\t\t\t.find( '.filter-items' )\n\t\t\t\t\t.find( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tif ( this.isFilterActive( $filter ) ) {\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\tdefault:\n\t\t\t\tcount = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t// retrieves filter properties for the filter\n\tgetFilterProperties( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tmultiple = 'yes' === $filter.data( 'multiple' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' ),\n\t\t\tproperties = {},\n\t\t\tfilteredProperties,\n\t\t\t$active;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tlet activeTerms = [],\n\t\t\t\t\ttaxonomy = $filter.data( 'taxonomy' ),\n\t\t\t\t\tisAttr = 0 === taxonomy.indexOf( 'filter' ),\n\t\t\t\t\trelation = $filter.data( 'relation' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tactiveTerms = $dropdown.val();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveTerms.push( $dropdown.val() );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tactiveTerms = $active.get().reduce( function ( a, v ) {\n\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t: v.data( 'term-slug' );\n\n\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\treturn a;\n\t\t\t\t\t}, activeTerms );\n\t\t\t\t}\n\n\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.pop();\n\t\t\t\t} else {\n\t\t\t\t\tconst glue = ! isAttr && 'and' === relation ? '+' : ',';\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.join( glue );\n\t\t\t\t}\n\n\t\t\t\tif ( isAttr ) {\n\t\t\t\t\tproperties[ taxonomy.replace( 'filter_', 'query_type_' ) ] =\n\t\t\t\t\t\trelation;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tproperties.rating_filter = $dropdown.val();\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\t\t$active = $active.first();\n\t\t\t\t\t\tproperties.rating_filter = $active.is( 'label' )\n\t\t\t\t\t\t\t? $active.find( ':input' ).val()\n\t\t\t\t\t\t\t: $active.data( 'rating' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.rating_filter = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( function ( a, v ) {\n\t\t\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t\t\t: v.data( 'rating' );\n\n\t\t\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, [] )\n\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $dropdown.val().join( ',' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 0 ];\n\t\t\t\t\t\tproperties.max_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\t\t\t\tlet min = $( v ).data( 'range-min' ),\n\t\t\t\t\t\t\t\t\tmax = $( v ).data( 'range-max' );\n\n\t\t\t\t\t\t\t\ta += ( max ? `${ min }-${ max }` : min ) + ',';\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, '' )\n\t\t\t\t\t\t\t.replace( /^(.*),$/, '$1' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-min' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-max' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t);\n\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( $filter.find( '.filter-on-sale' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.onsale_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-in-stock' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.instock_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-featured' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.featured_filter = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tproperties.orderby = $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredProperties = $filter.triggerHandler(\n\t\t\t'yith_wcan_filter_properties',\n\t\t\t[ properties, self ]\n\t\t);\n\t\tproperties =\n\t\t\ttypeof filteredProperties !== 'undefined'\n\t\t\t\t? filteredProperties\n\t\t\t\t: properties;\n\n\t\treturn properties;\n\t}\n\n\t// retrieves properties for all filters of the preset\n\tgetFiltersProperties() {\n\t\tlet properties = {};\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tconst filterProperties = self.getFilterProperties( $filter );\n\n\t\t\t\tproperties = self.mergeProperties(\n\t\t\t\t\tproperties,\n\t\t\t\t\tfilterProperties,\n\t\t\t\t\t$filter\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn properties;\n\t}\n\n\t// retrieve filters matching any of the properties passed\n\tgetFiltersByProperties( properties ) {\n\t\tconst self = this;\n\n\t\treturn this.getFilters().filter( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tlet filterProperties = self.getFilterProperties( $filter ),\n\t\t\t\t\thasProp = false;\n\n\t\t\t\tfor ( const prop in properties ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t[ 'min_price', 'max_price', 'price_ranges' ].includes(\n\t\t\t\t\t\t\tprop\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t( filterProperties.min_price ||\n\t\t\t\t\t\t\tfilterProperties.price_ranges )\n\t\t\t\t\t) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ( filterProperties[ prop ] ) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn hasProp;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t// show clear selection anchor\n\tmaybeToggleClearFilter( $filter ) {\n\t\tif ( ! this.isFilterActive( $filter ) ) {\n\t\t\tthis.maybeHideClearFilter( $filter );\n\t\t} else {\n\t\t\tthis.maybeShowClearFilter( $filter );\n\t\t}\n\t}\n\n\t// show clear all selections anchor\n\tmaybeToggleClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() ) {\n\t\t\tthis.maybeHideClearAllFilters();\n\t\t} else {\n\t\t\tthis.maybeShowClearAllFilters();\n\t\t}\n\t}\n\n\t// show clear selection anchor\n\tmaybeShowClearFilter( $filter ) {\n\t\tif (\n\t\t\t! this.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\t$filter.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_selection,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( $filter.find( '.filter-content' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateFilter(\n\t\t\t\t\t$filter,\n\t\t\t\t\tfalse,\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearFilter( $filter );\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeShowClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() || ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\tthis.$preset.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_all_selections,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( this.$preset.find( '.filters-container' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateAllFilters(\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearAllFilters();\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// hide clear selection anchor\n\tmaybeHideClearFilter( $filter ) {\n\t\tif (\n\t\t\tthis.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\t$filter.find( '.clear-selection' ).remove();\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeHideClearAllFilters() {\n\t\tif ( this.isAnyFilterActive() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\tthis.$preset\n\t\t\t.find( '.filters-container' )\n\t\t\t.children( '.clear-selection' )\n\t\t\t.remove();\n\t}\n\n\t// deactivate filter\n\tdeactivateFilter( $filter, properties, doFilter ) {\n\t\tconst filterType = $filter.data( 'filter-type' ),\n\t\t\t$items = $filter.find( '.filter-item' ),\n\t\t\t$activeItems = $items.filter( '.active' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' );\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tconst taxonomy = $filter.data( 'taxonomy' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$option.val().toString() ===\n\t\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'term-slug' );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tvalue.toString() ===\n\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif ( $option.val() === properties.rating_filter ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'rating' );\n\n\t\t\t\t\t\tif ( value === properties.rating_filter ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this ),\n\t\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t\t? `-${ properties.max_price }`\n\t\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\t\tif ( $option.val() === formattedRange ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tformattedRange,\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'min_price' ) +\n\t\t\t\t\t\t\t ( $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t? '-' + $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\tif ( properties.min_price ) {\n\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t? '-' + properties.max_price\n\t\t\t\t\t\t\t\t\t: '' );\n\t\t\t\t\t\t} else if ( properties.price_ranges ) {\n\t\t\t\t\t\t\tformattedRange = properties.price_ranges;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( value === formattedRange ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst $priceSlider = $filter.find( '.price-slider' );\n\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-min' )\n\t\t\t\t\t.val( $priceSlider.data( 'min' ) );\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-max' )\n\t\t\t\t\t.val( $priceSlider.data( 'max' ) )\n\t\t\t\t\t.change();\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\t$filter.find( 'select' ).val( 'menu_order' );\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\n\t\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\tif ( properties?.instock_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.onsale_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.featured_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\t}\n\n\t// deactivate all filters\n\tdeactivateAllFilters( doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter );\n\t\t} );\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t// deactivate filters that matches a specific set of properties\n\tdeactivateFilterByProperties( properties, doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFiltersByProperties( properties );\n\n\t\tif ( ! $filters.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter, properties, doFilter );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t// open toggle\n\ttoggle( $target, $container, status ) {\n\t\tif ( 'undefined' === typeof status ) {\n\t\t\tstatus = $container.hasClass( 'closed' );\n\t\t}\n\n\t\tconst method = status ? 'slideDown' : 'slideUp',\n\t\t\tclassToAdd = status ? 'opened' : 'closed',\n\t\t\tclassToRemove = status ? 'closed' : 'opened';\n\n\t\t$target[ method ]( 400, () => {\n\t\t\t$container.addClass( classToAdd ).removeClass( classToRemove );\n\n\t\t\t$target.trigger( 'yith_wcan_toggle_element', [\n\t\t\t\t$container,\n\t\t\t\tstatus,\n\t\t\t] );\n\t\t} );\n\t}\n\n\t// open filter if title is collapsable\n\topenFilter( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.toggle( $filter.find( '.filter-content' ), $title, true );\n\t}\n\n\t// open all filters in a preset\n\topenAllFilters( $filter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tself.openFilter( $( this ) );\n\t\t} );\n\t}\n\n\t// close filter if title is collapsable\n\tcloseFilter( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.toggle( $filter.find( '.filter-content' ), $title, false );\n\t}\n\n\t// close all filters in a preset; if a specific filter is pased as parameter, system will keep it open\n\tcloseAllFilters( $filter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tself.closeFilter( $( this ) );\n\t\t} );\n\n\t\tif ( 'undefined' !== typeof $filter ) {\n\t\t\tthis.openFilter( $filter );\n\t\t}\n\t}\n\n\t// open filters as a modal, when in mobile layout\n\topenModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( yith_wcan_shortcodes.toggles_open_on_modal ) {\n\t\t\tthis._openAllCollapsables();\n\t\t} else {\n\t\t\tthis._closeAllCollapsables();\n\t\t}\n\n\t\t$( 'body' )\n\t\t\t.css( 'overflow', 'hidden' )\n\t\t\t.addClass( 'yith-wcan-preset-modal-open' );\n\n\t\tthis.$preset.show();\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.addClass( 'open' );\n\t\t}, 100 );\n\t}\n\n\t// close filters modal, when in mobile layout\n\tcloseModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.$preset.removeClass( 'open' );\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.hide();\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\t\t}, 300 );\n\t}\n\n\t// utility that formats the price according to store configuration.\n\tformatPrice( price ) {\n\t\tif ( 'undefined' !== typeof accounting ) {\n\t\t\tprice = accounting.formatMoney( price, {\n\t\t\t\tsymbol: yith_wcan_shortcodes.currency_format?.symbol,\n\t\t\t\tdecimal: yith_wcan_shortcodes.currency_format?.decimal,\n\t\t\t\tthousand: yith_wcan_shortcodes.currency_format?.thousand,\n\t\t\t\tprecision: 0,\n\t\t\t\tformat: yith_wcan_shortcodes.currency_format?.format,\n\t\t\t} );\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t// utility that merges together sets of filter properties\n\tmergeProperties( set1, set2, $filter ) {\n\t\t// search for common properties\n\t\tfor ( const prop in set2 ) {\n\t\t\tif ( ! set2.hasOwnProperty( prop ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !! set1[ prop ] ) {\n\t\t\t\tswitch ( prop ) {\n\t\t\t\t\tcase 'rating_filter':\n\t\t\t\t\tcase 'min_price':\n\t\t\t\t\tcase 'max_price':\n\t\t\t\t\tcase 'onsale_filter':\n\t\t\t\t\tcase 'instock_filter':\n\t\t\t\t\tcase 'orderby':\n\t\t\t\t\t\t// just override default value\n\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( 0 === prop.indexOf( 'query_type_' ) ) {\n\t\t\t\t\t\t\t// query_type param\n\t\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// we're dealing with taxonomy\n\t\t\t\t\t\t\tconst isAttr = 0 === prop.indexOf( 'filter_' ),\n\t\t\t\t\t\t\t\tglue = isAttr ? ',' : '+';\n\n\t\t\t\t\t\t\tlet newValue =\n\t\t\t\t\t\t\t\tset1[ prop ].replace( ',', glue ) +\n\t\t\t\t\t\t\t\tglue +\n\t\t\t\t\t\t\t\tset2[ prop ].replace( ',', glue );\n\n\t\t\t\t\t\t\tnewValue = newValue\n\t\t\t\t\t\t\t\t.split( glue )\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t( value, index, arr ) =>\n\t\t\t\t\t\t\t\t\t\tarr.indexOf( value ) === index\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( glue );\n\n\t\t\t\t\t\t\tset1[ prop ] = newValue;\n\n\t\t\t\t\t\t\tif ( isAttr ) {\n\t\t\t\t\t\t\t\tconst queryTypeParam = prop.replace(\n\t\t\t\t\t\t\t\t\t'filter_',\n\t\t\t\t\t\t\t\t\t'query_type_'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tset1[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t\tset2[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete set2[ prop ];\n\t\t\t}\n\t\t}\n\n\t\t$.extend( set1, set2 );\n\n\t\treturn set1;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport YITH_WCAN_Filter from './modules/yith-wcan-filter';\nimport YITH_WCAN_Reset_Button from './modules/yith-wcan-reset-button';\nimport YITH_WCAN_Preset from './modules/yith-wcan-preset';\n\njQuery( function ( $ ) {\n\t$( document )\n\t\t.on(\n\t\t\t'yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode',\n\t\t\tfunction () {\n\t\t\t\t$( '.yith-wcan-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Preset( $( this ) );\n\t\t\t\t\t} );\n\n\t\t\t\t$( '.yith-wcan-reset-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Reset_Button( $( this ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t)\n\t\t.trigger( 'yith_wcan_init_shortcodes' );\n\n\tglobalThis.product_filter = new YITH_WCAN_Filter();\n} );\n"],"sourceRoot":""}
assets/js/yith-wcan-shortcodes.min.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e=jQuery,t=e("body");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(){function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),n(this,"xhr",null),n(this,"doingAjax",!1),n(this,"originalSearch",location.search),n(this,"initialized",!1),n(this,"filtered",!1),this.initPopState(),this.initialized=!0}var r,s,o;return r=l,(s=[{key:"initPopState",value:function(){yith_wcan_shortcodes.reload_on_back&&(this.pushUrlToHistory(window.location,document.title,null,!0),e(window).on("popstate",(function(){var e;null!==(e=window.history.state)&&void 0!==e&&e._yithWcan&&window.location.reload(!0)})))}},{key:"doFilter",value:function(t,i,a){var n,l,r=this,s=e(i||"body");return(l=e(document).triggerHandler("yith_wcan_filters_parameters",[t]))&&(t=l),s&&this.block(s),n=this.buildUrl(t),yith_wcan_shortcodes.ajax_filters?(this.doingAjax=!0,this._doAjax(n).done((function(e){n=r.searchAlternativeUrl(e,n),r._beforeFilter(e,t),r.refreshFragments(i,a,e),r.pushUrlToHistory(n,e.pageTitle,t),r.originalSearch=location.search,s&&r.unblock(s),r._afterFilter(e,t),r.doingAjax=!1}))):(this.pushUrlToHistory(n,document.title,t),void(window.location=n))}},{key:"_beforeFilter",value:function(t,i){e(document).trigger("yith-wcan-ajax-loading",[t,i])}},{key:"_afterFilter",value:function(i,a){e(".woocommerce-ordering").on("change","select.orderby",(function(){e(this).closest("form").submit()})),this.filtered=a&&!!Object.keys(a).length,this.filtered?t.addClass("filtered"):t.removeClass("filtered"),e(window).trigger("scroll"),e(document).trigger("yith-wcan-ajax-filtered",[i,a]).trigger("yith_wcwl_reload_fragments")}},{key:"buildUrl",value:function(t){var a,n=this,l=yith_wcan_shortcodes.query_param,r={},s=window.location,o=yith_wcan_shortcodes.base_url?yith_wcan_shortcodes.base_url:(null==s?void 0:s.origin)+(null==s?void 0:s.pathname),c=this,h="object"===i(t)&&Object.keys(t).length;if(yith_wcan_shortcodes.session_param&&(o=o.replace(new RegExp("/"+yith_wcan_shortcodes.session_param+"/[^/]*/"),"")),h&&(r[l]=1),this.originalSearch){var d=this.originalSearch.replace("?","").split("&").reduce((function(e,t){var i=t.split("=");if(2===i.length){if(n.isFilterParam(i[0]))return e;e[i[0]]=i[1]}return e}),{});r=e.extend(r,d)}return h&&(r=e.extend(r,t)),(a=Object.keys(r).reduce((function(e,t){var i=r[t];return i&&t?e+=c._cleanParam(t)+"="+c._cleanParam(i)+"&":e}),"?").replace(/&$/g,"").replace(/%2B/g,"+").replace(/%2C/g,",")).length>1&&(o+=a),o}},{key:"searchAlternativeUrl",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=i;return-1===e.indexOf("yith_wcan:sharing_url")?a:a=(t=e.match(/<meta name="yith_wcan:sharing_url" content="([^"]*)">/))&&1 in t?t[1]:a}},{key:"pushUrlToHistory",value:function(e,t,i,a){if(yith_wcan_shortcodes.change_browser_url&&!navigator.userAgent.match(/msie/i)){var n="pushState";a&&(n="replaceState"),window.history[n]({_yithWcan:!0,pageTitle:t,filters:i},"",e)}}},{key:"refreshFragments",value:function(t,i,a){var n=document.createElement("html"),l=e(n);if(n.innerHTML=a,t){var r,s=e(i),o=e(t);s.length&&(r=l.find(i)).length&&s.replaceWith(r.first()),o.length&&(r=l.find(t)).length&&o.replaceWith(r.first())}else{var c=e(yith_wcan_shortcodes.content);c.length?c.replaceWith(l.find(yith_wcan_shortcodes.content)):e("body").replaceWith(l.find("body"))}e(document).trigger("yith_wcan_init_shortcodes")}},{key:"_cleanParam",value:function(e){var t,i;return null===(t=yith_wcan_shortcodes)||void 0===t||!t.process_sanitize||null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.skip_sanitize?e:encodeURIComponent(e)}},{key:"_doAjax",value:function(t,i){return this.xhr&&this.xhr.abort(),i=e.extend({url:t,headers:{"X-YITH-WCAN":1}},i),this.xhr=e.ajax(i),this.xhr}},{key:"block",value:function(t){var i;if(void 0!==e.fn.block){var a="#fff center center no-repeat";null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.loader&&(a="url('".concat(yith_wcan_shortcodes.loader,"') ").concat(a)),t.block({message:null,overlayCSS:{background:a,opacity:.7}})}}},{key:"unblock",value:function(t){void 0!==e.fn.unblock&&t.unblock()}},{key:"isFilterParam",value:function(t){var i,a=["rating_filter","min_price","max_price","price_ranges","onsale_filter","instock_filter","featured_filter","orderby","product-page",yith_wcan_shortcodes.query_param];return(i=e(document).triggerHandler("yith_wcan_supported_filters_parameters",[a]))&&(a=i),-1!==(a=a.concat(yith_wcan_shortcodes.supported_taxonomies.map((function(e){return e.replace("pa_","filter_")})))).indexOf(t)||-1!==t.indexOf("filter_")||-1!==t.indexOf("query_type_")}}])&&a(r.prototype,s),o&&a(r,o),l}();var r=function t(i){var a,n,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l=null,(n="$reset")in(a=this)?Object.defineProperty(a,n,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[n]=l,this.$reset=i,this.$reset.on("click",(function(t){t.preventDefault(),e(".yith-wcan-filters").each((function(){var t=e(this).data("preset");t.deactivateAllFilters(!0),t.closeModal()}))})),this.$reset.data("reset",this).addClass("enhanced")};function s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,l=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var d=function(){function t(i,a){var n,l,r,s;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"$originalSelect",null),h(this,"$_main",null),h(this,"$_label",null),h(this,"$_dropdown",null),h(this,"$_search",null),h(this,"$_showMore",null),h(this,"$_items",null),h(this,"currentPage",1),h(this,"options",{}),this.$originalSelect=i,this.$originalSelect.is("select")){var o=this.$originalSelect.data("per_page"),c=this.$originalSelect.data("order"),d=this.$originalSelect.data("all-label"),u={showSearch:this.$originalSelect.data("show_search"),paginate:this.$originalSelect.data("paginate"),perPage:o||10,order:c||"ASC",getElements:null,labels:{emptyLabel:d||(null===(n=yith_wcan_shortcodes.labels)||void 0===n?void 0:n.empty_option),searchPlaceholder:null===(l=yith_wcan_shortcodes.labels)||void 0===l?void 0:l.search_placeholder,noItemsFound:null===(r=yith_wcan_shortcodes.labels)||void 0===r?void 0:r.no_items,showMore:null===(s=yith_wcan_shortcodes.labels)||void 0===s?void 0:s.show_more}};this.options=e.extend(u,a),this._hideSelect(),this._initTemplate(),this._initActions(),this.$originalSelect.data("dropdown",this).addClass("enhanced")}}var i,a,n;return i=t,(a=[{key:"_hideSelect",value:function(){this.$originalSelect.hide()}},{key:"_initTemplate",value:function(){var t=e("<div/>",{class:"yith-wcan-dropdown closed"}),i=e("<div/>",{class:"dropdown-label",html:this.getLabel()}),a=e("<div>",{class:"dropdown-wrapper"}),n=e("<ul/>",{class:"matching-items filter-items"});a.append(n),t.append(i).append(a),this.options.showSearch&&this._initSearchTemplate(a),this.options.paginate&&this._initShowMoreTemplate(a),this.$originalSelect.after(t),this.$_main=t,this.$_label=i,this.$_dropdown=a,this.$_items=n}},{key:"_initSearchTemplate",value:function(t){var i=e("<div/>",{class:"search-field-container"}),a=e("<input/>",{name:"s",class:"search-field",type:"search",placeholder:this.options.labels.searchPlaceholder}).attr("autocomplete","off");i.append(a).prependTo(t),this.$_search=a}},{key:"_initShowMoreTemplate",value:function(t){var i,a=e("<a/>",{class:"show-more",text:null===(i=this.options.labels.showMore)||void 0===i?void 0:i.replace("%d",this.options.perPage)});a.on("click",this.loadNextPage.bind(this)).hide(),t.append(a),this.$_showMore=a}},{key:"_initActions",value:function(){var t,i,a=this;null===(t=this.$_main)||void 0===t||t.on("click",(function(e){e.stopPropagation(),a.toggleDropdown()})),this.$_dropdown.on("click",(function(e){e.stopPropagation()})),null===(i=this.$_search)||void 0===i||i.on("keyup search",(function(){a._populateItems()})),this.$_items.on("change",":input",(function(){var t,i=e(this).closest("li"),n=i.data("value");if(i.hasClass("disabled")&&!a.isValueSelected(n))return!1;i.toggleClass("active"),t=i.hasClass("active"),a._changeItemStatus(n,t)})),this.$_items.on("click","li:not(.checkbox) a",(function(t){var i,n=e(this).closest("li"),l=n.data("value");if(t.preventDefault(),n.hasClass("disabled")&&!a.isValueSelected(l))return!1;n.toggleClass("active"),(i=n.hasClass("active"))&&n.siblings().removeClass("active"),a._changeItemStatus(l,i)})),this.$_items.on("click","label > a",(function(t){var i=e(this).parent().find(":input");t.preventDefault(),(i.is('[type="radio"]')||i.is('[type="checkbox"]'))&&i.prop("checked",!i.prop("checked")),i.change()})),this.$originalSelect.on("change",(function(t,i){i||(a.$_items.find("li").each((function(){var t=e(this).data("value");a.isValueSelected(t)?a._selectItem(t):a._deselectItem(t)})),a.updateLabel())})),null!==globalThis&&void 0!==globalThis&&globalThis.yith_wcan_dropdown_init||(e(document).on("click",this._closeAllDropdowns),globalThis.yith_wcan_dropdown_init=!0)}},{key:"openDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.addClass("open").removeClass("closed"),this._afterDropdownOpen()}},{key:"closeDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.removeClass("open").addClass("closed")}},{key:"_closeAllDropdowns",value:function(){e(document).find("select.enhanced").filter((function(t,i){return!!e(i).data("dropdown")})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"_closeOtherDropdowns",value:function(){var t=this;e(document).find("select.enhanced").filter((function(i,a){var n=e(a);return!!n.data("dropdown")&&!n.is(t.$originalSelect)})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"toggleDropdown",value:function(){var e,t;null===(e=this.$_main)||void 0===e||e.toggleClass("open").toggleClass("closed"),null!==(t=this.$_main)&&void 0!==t&&t.hasClass("open")&&this._afterDropdownOpen()}},{key:"_afterDropdownOpen",value:function(){var e;this._closeOtherDropdowns(),null!==(e=this.$_search)&&void 0!==e&&e.length&&this.$_search.val(""),this._populateItems()}},{key:"getMatchingElements",value:function(t,i){var a=this,n=[],l=this.getOptions();return new Promise((function(r){l.each((function(){var i=e(this),a=i.val(),l=i.html(),r=new RegExp(".*"+t+".*","i");(!t||r.test(a)||r.test(l))&&n.push({value:a,label:l})})),a.options.getElements?a.options.getElements(t).then((function(t){t&&(t=t.reduce((function(e,t,i){return e.push({label:i,value:t}),e}),[]),n=e.extend(n,t)),r(a._formatItems(n,i))})):r(a._formatItems(n,i))}))}},{key:"_formatItems",value:function(e,t){var i=this,a=[],n=!1;return e.filter((function(e){return-1===a.indexOf(e.value)&&(a.push(e.value),!0)})).sort((function(e,t){var a="ASC"===i.options.order?1:-1;return e.value<t.value?-1*a:e.value>t.value?a:0})),t&&(n=t<Object.keys(e).length,e=e.slice(0,t)),{items:e,hasMore:n}}},{key:"_generateItem",value:function(t,i){var a,n=this.isValueSelected(t),l=this.getOptionByValue(t),r=e("<li/>",{"data-value":t,class:l.length?l.attr("class"):""});if(l.length){var s=l.data("template"),o=l.data("count");i=s||i,o&&(i+=o)}if(a=e("<a/>",{href:l.length?l.data("filter_url"):"#",html:i,rel:"nofollow","data-title":l.length?l.data("title"):""}),this.$originalSelect.prop("multiple")){var c=e("<input/>",{type:"checkbox",value:t}),h=e("<label>");c.prop("checked",n),h.prepend(c).append(a),r.append(h).addClass("checkbox")}else r.append(a);return n?r.addClass("active"):r.removeClass("active"),r}},{key:"_populateItems",value:function(t){var i,a,n=this,l=null!==(i=this.$_search)&&void 0!==i&&i.length?this.$_search.val():"",r=this.options.paginate?this.options.perPage:0;a=(t=t?parseInt(t):1)*r,this.getMatchingElements(l,a).then((function(i){var a=i.items,l=[],r=!1;if(n._emptyItems(),n._hideLoadMore(),a.length){var o,c=s(a);try{for(c.s();!(o=c.n()).done;){var h=o.value;""===h.value?l.unshift(n._generateItem(h.value,h.label)):l.push(n._generateItem(h.value,h.label))}}catch(e){c.e(e)}finally{c.f()}n.currentPage=t,r=i.hasMore}else l.push(e("<li/>",{text:n.options.labels.noItemsFound})),n.currentPage=1;n.$_items.append(l),n.$originalSelect.trigger("yith_wcan_dropdown_updated"),r&&n._showLoadMore()}))}},{key:"loadNextPage",value:function(){var e=this.currentPage+1;this._populateItems(e)}},{key:"_selectItem",value:function(e){return this._changeItemStatus(e,!0)}},{key:"_deselectItem",value:function(e){return this._changeItemStatus(e,!1)}},{key:"_changeItemStatus",value:function(e,t){var i=this.$originalSelect.find('option[value="'.concat(e,'"]'));return!!i.length&&(i.prop("selected",t),this.closeDropdown(),this.updateLabel(),this.$originalSelect.trigger("change",[!0]),!0)}},{key:"_emptyItems",value:function(){this.$_items.html("")}},{key:"_showLoadMore",value:function(){this.$_showMore.show()}},{key:"_hideLoadMore",value:function(){this.$_showMore.hide()}},{key:"getLabel",value:function(){return this.hasSelectedValues()?this.getSelectedLabels().join(", "):this.options.labels.emptyLabel}},{key:"updateLabel",value:function(){var e,t=this.getLabel();null===(e=this.$_label)||void 0===e||e.html(t)}},{key:"getOptions",value:function(){return this.$originalSelect.find("option")}},{key:"hasSelectedValues",value:function(){return this.getSelectedOptions().length}},{key:"isValueSelected",value:function(e){return-1!==this.getSelectedValues().indexOf(e.toString())}},{key:"getSelectedOptions",value:function(){return this.$originalSelect.find("option").filter(":selected")}},{key:"getOptionByValue",value:function(e){return this.$originalSelect.find('option[value="'.concat(e,'"]'))}},{key:"getSelectedLabels",value:function(){var t=[];return this.getSelectedOptions().each((function(){var i=e(this),a=i.data("template");a=a||i.html().replace(/\([0-9]*\)/,""),t.push(a)})),t}},{key:"getSelectedValues",value:function(){var t=[];return this.getSelectedOptions().each((function(){t.push(e(this).val())})),t}},{key:"destroy",value:function(){}}])&&c(i.prototype,a),n&&c(i,n),t}();function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function p(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var v=function(){function t(i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"preset",!1),p(this,"$preset",!1),p(this,"target",!1),p(this,"$target",!1),p(this,"$filters",!1),p(this,"$filterButtons",!1),p(this,"modalElements",{}),p(this,"activeFilters",!1),p(this,"isMobile",!1),p(this,"sliderTimeout",!1),p(this,"originalFilters",null),p(this,"dirty",!1),this.preset="#"+i.attr("id"),this.$preset=i,this.target=this.$preset.data("target"),this.$target=!!this.target&&e(this.target),this._regiterStatus(),this._initFilterButton(),this._initResponsive(),this._initFilters(),this._initActions(),this.$preset.data("preset",this).addClass("enhanced").trigger("yith_wcan_preset_initialized",[this])}var i,a,n;return i=t,(a=[{key:"_initFilters",value:function(){var t=this;this.getFilters().each((function(){var i=e(this);t._initFilter(i)})),this.maybeShowClearAllFilters()}},{key:"_initFilterButton",value:function(){var e=this;this.$filterButtons=this.$preset.find(".apply-filters"),this.$filterButtons.length&&this.$filterButtons.on("click",(function(t){t.preventDefault(),e.filter()})).hide()}},{key:"_initActions",value:function(){this.$preset.find("form").on("submit",(function(e){e.preventDefault()}))}},{key:"_initResponsive",value:function(){var t=this;if(yith_wcan_shortcodes.modal_on_mobile){var i=window.matchMedia("(max-width: ".concat(yith_wcan_shortcodes.mobile_media_query,"px)"));e(window).on("resize",(function(){var e=!!i.matches;e!==t.isMobile&&(t.isMobile=e,t._afterLayoutChange())})).resize()}}},{key:"_initFilter",value:function(t){var i,a=this,n=function(i){var n=e(this),l=n.closest(".yith-wcan-filter"),r=!!l.length&&"yes"===l.data("multiple"),s=n.closest(".filter-item"),o=s.length?l.find(".filter-item").not(s):[];if(s.is(".disabled")&&!s.is(".active"))return i.preventDefault(),!1;i.preventDefault(),o.length&&!r&&o.removeClass("active").children("label").find(":input").prop("checked",!1).parent(".checked").removeClass("checked"),s.length&&s.toggleClass("active"),a.activeFilters=!1,a.maybeFilter(t),a.maybeToggleClearAllFilters(),a.maybeToggleClearFilter(l)};t.find(".filter-item").not(".checkbox").not(".radio").on("click","a",(function(t){var i=e(this).closest(".filter-item");if(!e(null==t?void 0:t.delegateTarget).is(i))return!1;n.call(this,t)})),t.find(":input").on("change",(function(t){var i=e(this),a=i.closest(".filter-item");if(a.is(".disabled")&&!a.is(".active"))return i.prop("checked",!1),!1;n.call(this,t)})),t.find("label > a").on("click",(function(t){var i=e(this),a=i.closest(".filter-item");if(t.preventDefault(),a.is(".disabled")&&!a.is(".active"))return!1;var n=i.parent().find(":input");(n.is('[type="radio"]')||n.is('[type="checkbox"]'))&&n.prop("checked",!n.prop("checked")),n.change()})),this._initTooltip(t),this._initPriceSlider(t),this._initDropdown(t),this._initCollapsable(t),this.maybeShowClearFilter(t),null!==(i=this.$preset)&&void 0!==i&&i.hasClass("custom-style")&&(this._initCustomInput(t),t.on("yith_wcan_dropdown_updated",(function(){var t=e(this).closest(".yith-wcan-filter");a._initCustomInput(t)})))}},{key:"_initTooltip",value:function(t,i){t.find("[data-title]").each((function(){var t=e(this);!t.hasClass("tooltip-added")&&t.data("title")&&(t.on("mouseenter",(function(){var t,a=e(this),n=null,l=a.outerWidth(),r=0;if(!i||"top"!==i&&"right"!==i){var s=a.closest(".filter-item");i=s.hasClass("color")||s.hasClass("label")?"top":"right"}n=e("<span>",{class:"yith-wcan-tooltip",html:a.data("title")}),a.append(n),t=n.outerWidth()+6,n.outerWidth(t),r="top"===i?(l-t)/2:l+15,n.css({left:r.toFixed(0)+"px"}).fadeIn(200),a.addClass("with-tooltip")})).on("mouseleave",(function(){var t=e(this);t.find(".yith-wcan-tooltip").fadeOut(200,(function(){t.removeClass("with-tooltip").find(".yith-wcan-tooltip").remove()}))})),t.addClass("tooltip-added"))}))}},{key:"_initDropdown",value:function(t){var i=t.find("select.filter-dropdown");i.length&&(i.hasClass("select2-hidden-accessible")&&void 0!==e.fn.selectWoo&&i.selectWoo("destroy"),this._initDropdownObject(i,{paginate:!0,perPage:yith_wcan_shortcodes.terms_per_page}))}},{key:"_initDropdownObject",value:function(e,t){return new d(e,t)}},{key:"_initPriceSlider",value:function(e){var t=this;if(e.hasClass("filter-price-slider")){var i=this,a=e.find(".price-slider"),n=a.find(".price-slider-min"),l=a.find(".price-slider-max"),r=parseFloat(a.data("min")),s=parseFloat(a.data("max")),o=parseFloat(n.val()),c=parseFloat(l.val()),h=parseFloat(a.data("step")),d=function(){i.sliderTimeout&&clearTimeout(i.sliderTimeout),i.sliderTimeout=setTimeout((function(){i.maybeFilter(e)}),200)};e.find(".price-slider-ui").ionRangeSlider({skin:"round",type:"double",min:r,max:s,step:h,from:o,to:c,min_interval:h,values_separator:" - ",prettify:function(e){return t.formatPrice(e)},onChange:function(e){n.val(e.from),l.val(e.to)},onFinish:d}),n.add(l).off("change").on("keyup",(function(){n.val()&&l.val()&&d()}))}}},{key:"_initCollapsable",value:function(e){this._initTitleCollapsable(e),this._initHierarchyCollapsable(e)}},{key:"_initTitleCollapsable",value:function(e){var t=e.find(".collapsable");t.length&&this._initToggle(t,t,e.find(".filter-content"))}},{key:"_initHierarchyCollapsable",value:function(t){var i=t.find(".hierarchy-collapsable");if(i.length){var a=this,n=t.find(".active");n.length&&(n.parents(".hierarchy-collapsable").removeClass("closed").addClass("opened"),n.hasClass("hierarchy-collapsable")&&yith_wcan_shortcodes.show_current_children&&n.removeClass("closed").addClass("opened")),i.each((function(){var t=e(this),i=e("<span/>",{class:"toggle-handle"});i.appendTo(t),a._initToggle(i,t,t.children("ul.filter-items"))}))}}},{key:"_initToggle",value:function(e,t,i){t.hasClass("closed")&&i.hide(),e.off("click").on("click",(function(e){e.stopPropagation(),e.preventDefault(),i.slideToggle(400,(function(){t.toggleClass("opened").toggleClass("closed")}))}))}},{key:"_initCustomInput",value:function(t){t.find(":input").each((function(){var t,i=e(this),a=i.attr("type"),n="".concat(a,"button");"checkbox"!==a&&"radio"!==a||i.closest(".".concat(n)).length||(i.is(":checked")&&(n+=" checked"),t=e("<span/>",{class:n}),i.wrap(t).on("change",(function(){var t=e(this);t.prop("checked")?t.parent().addClass("checked"):t.parent().removeClass("checked")})))}))}},{key:"_regiterStatus",value:function(){this.originalFilters=this.getFiltersProperties()}},{key:"_afterLayoutChange",value:function(){var t,i;this.isMobile?(this.$preset.addClass("filters-modal").attr("role","dialog").attr("tabindex","-1").hide(),this._addCloseModalButton(),this._addApplyFiltersModalButton(),this._switchToCollapsables(),null===(t=this.$filterButtons)||void 0===t||t.hide()):(this.$preset.removeClass("filters-modal").removeClass("open").removeAttr("role").removeAttr("tabindex").show(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open"),this._removeCloseModalButton(),this._removeApplyFiltersModalButton(),this._switchBackCollapsables(),null===(i=this.$filterButtons)||void 0===i||i.show())}},{key:"_addCloseModalButton",value:function(){var t=e("<a/>",{class:"close-button",html:"&times;","data-dismiss":"modal","aria-label":yith_wcan_shortcodes.labels.close});t.prependTo(this.$preset).on("click",this.closeModal.bind(this)),this.modalElements.closeButton=t}},{key:"_removeCloseModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.closeButton)||void 0===t||t.remove()}},{key:"_addApplyFiltersModalButton",value:function(){var t=this,i=e("<button/>",{class:"apply-filters main-modal-button",html:yith_wcan_shortcodes.labels.show_results,"data-dismiss":"modal"});i.appendTo(this.$preset).on("click",(function(){t.filter(),t.closeModal()})),this.modalElements.applyFiltersButton=i}},{key:"_removeApplyFiltersModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.applyFiltersButton)||void 0===t||t.remove()}},{key:"_switchToCollapsables",value:function(){var t=this;this.getFilters().each((function(){var i=e(this),a=i.find(".filter-title");a.length&&!a.hasClass("collapsable")&&(a.addClass("collapsable").data("disable-collapse",!0),t._initTitleCollapsable(i))}))}},{key:"_switchBackCollapsables",value:function(){this.getFilters().each((function(){var t=e(this),i=t.find(".filter-title");i.length&&i.hasClass("collapsable")&&i.data("disable-collapse")&&(i.removeClass("collapsable").removeData("disable-collapse",!0).off("click"),t.find(".filter-content").show())}))}},{key:"_openAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").show().end().find(".filter-title").removeClass("closed").addClass("opened")}},{key:"_closeAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").hide().end().find(".filter-title").addClass("closed").removeClass("opened")}},{key:"maybeRegisterStatusChange",value:function(){var e=this.getFiltersProperties(),t=JSON.stringify(e),i=JSON.stringify(this.originalFilters);this.dirty=t!==i}},{key:"maybeFilter",value:function(e){if(this.maybeRegisterStatusChange(),yith_wcan_shortcodes.instant_filters&&!this.isMobile)this.filter();else if(yith_wcan_shortcodes.instant_filters||this.isMobile){if(this.isMobile&&this.dirty){var t;this.$preset.addClass("with-filter-button"),null===(t=this.modalElements.applyFiltersButton)||void 0===t||t.show()}}else{var i,a;this.dirty?null===(i=this.$filterButtons)||void 0===i||i.show():null===(a=this.$filterButtons)||void 0===a||a.hide()}}},{key:"filter",value:function(){var t,i,a,n=this,l=null===(t=window)||void 0===t?void 0:t.product_filter;null==l||null===(i=l.doFilter(this.getFiltersProperties(),this.target,this.preset))||void 0===i||i.done((function(){var t=e(n.preset);if(t.length&&yith_wcan_shortcodes.scroll_top){var i=t.offset().top;if(yith_wcan_shortcodes.scroll_target){var a=e(yith_wcan_shortcodes.scroll_target);i=a.length?a.offset().top:i}else n.isMobile&&(i=100);e("body, html").animate({scrollTop:i-100})}n.originalFilters=n.getFiltersProperties(),n.dirty=!1})),this.isMobile&&(this.$preset.removeClass("with-filter-button"),null===(a=this.modalElements.applyFiltersButton)||void 0===a||a.hide(),this.closeModal())}},{key:"getFilters",value:function(){return!1===this.$filters&&(this.$filters=this.$preset.find(".yith-wcan-filter")),this.$filters}},{key:"getActiveFilters",value:function(){return!1===this.activeFilters&&(this.activeFilters=this.getFiltersProperties()),this.activeFilters}},{key:"isAnyFilterActive",value:function(){return!!Object.keys(this.getActiveFilters()).length}},{key:"isFilterActive",value:function(e){var t,i;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var a=e.find(".filter-dropdown");if(a.length){var n=a.val();t="object"===u(n)?!(null==n||!n.length):!!n;break}case"stock_sale":t=e.find(".filter-item").filter(".active").length;break;case"price_slider":var l=parseFloat(e.find(".price-slider").data("step")),r=parseFloat(e.find(".price-slider").data("min")),s=parseFloat(e.find(".price-slider").data("max")),o=parseFloat(e.find(".price-slider-min").val()),c=parseFloat(e.find(".price-slider-max").val());t=Math.abs(o-r)>=l||Math.abs(c-s)>=l;break;case"orderby":t="menu_order"!==e.find(".filter-order-by").val();break;default:t=!1}return t=void 0!==(i=e.triggerHandler("yith_wcan_is_filter_active",[t,this]))?i:t}},{key:"countActiveItems",value:function(e){var t;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var i=e.find(".filter-dropdown");if(i.length){var a=i.val();t="object"===u(a)?null==a?void 0:a.length:+!!a;break}case"stock_sale":t=e.find(".filter-items").find(".active").length;break;case"orderby":this.isFilterActive(e)&&(t=1);break;case"price_slider":default:t=0}return t}},{key:"getFilterProperties",value:function(t){var i,a,n=t.data("filter-type"),l="yes"===t.data("multiple"),r=t.find(".filter-dropdown"),s={};switch(n){case"tax":var o=[],c=t.data("taxonomy"),h=0===c.indexOf("filter"),d=t.data("relation");if(r.length?l?o=r.val():o.push(r.val()):o=(a=t.find(".filter-item").filter(".active").children("a, label")).get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("term-slug"))?(t.push(a),t):t}),o),l){var u=h||"and"!==d?",":"+";s[c]=o.join(u)}else s[c]=o.pop();h&&(s[c.replace("filter_","query_type_")]=d);break;case"review":r.length?s.rating_filter=r.val():(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.rating_filter=a.get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("rating"))?(t.push(a),t):t}),[]).join(","):(a=a.first(),s.rating_filter=a.is("label")?a.find(":input").val():a.data("rating")));break;case"price_range":r.length?l?s.price_ranges=r.val().join(","):(s.min_price=r.val().split("-")[0],s.max_price=r.val().split("-")[1]):(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.price_ranges=a.get().reduce((function(t,i){var a=e(i).data("range-min"),n=e(i).data("range-max");return t+=(n?"".concat(a,"-").concat(n):a)+","}),"").replace(/^(.*),$/,"$1"):(s.min_price=parseFloat(a.first().data("range-min")),s.max_price=parseFloat(a.first().data("range-max"))));break;case"price_slider":s.min_price=parseFloat(t.find(".price-slider-min").val()),s.max_price=parseFloat(t.find(".price-slider-max").val());break;case"stock_sale":t.find(".filter-on-sale").is(".active")&&(s.onsale_filter=1),t.find(".filter-in-stock").is(".active")&&(s.instock_filter=1),t.find(".filter-featured").is(".active")&&(s.featured_filter=1);break;case"orderby":s.orderby=t.find(".filter-order-by").val()}return s=void 0!==(i=t.triggerHandler("yith_wcan_filter_properties",[s,self]))?i:s}},{key:"getFiltersProperties",value:function(){var t={},i=this;return this.getFilters().each((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a);t=i.mergeProperties(t,n,a)}})),t}},{key:"getFiltersByProperties",value:function(t){var i=this;return this.getFilters().filter((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a),l=!1;for(var r in t){if(["min_price","max_price","price_ranges"].includes(r)&&(n.min_price||n.price_ranges)){l=!0;break}if(n[r]){l=!0;break}}return l}return!1}))}},{key:"maybeToggleClearFilter",value:function(e){this.isFilterActive(e)?this.maybeShowClearFilter(e):this.maybeHideClearFilter(e)}},{key:"maybeToggleClearAllFilters",value:function(){this.isAnyFilterActive()?this.maybeShowClearAllFilters():this.maybeHideClearAllFilters()}},{key:"maybeShowClearFilter",value:function(t){var i=this;this.isFilterActive(t)&&yith_wcan_shortcodes.show_clear_filter&&(t.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_selection,role:"button"}).prependTo(t.find(".filter-content")).on("click",(function(e){e.preventDefault(),i.deactivateFilter(t,!1,yith_wcan_shortcodes.instant_filters),i.maybeHideClearFilter(t),yith_wcan_shortcodes.instant_filters&&i.closeModal()})))}},{key:"maybeShowClearAllFilters",value:function(){var t=this;this.isAnyFilterActive()&&this.isMobile&&(this.$preset.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_all_selections,role:"button"}).prependTo(this.$preset.find(".filters-container")).on("click",(function(e){e.preventDefault(),t.deactivateAllFilters(yith_wcan_shortcodes.instant_filters),t.maybeHideClearAllFilters(),yith_wcan_shortcodes.instant_filters&&t.closeModal()})))}},{key:"maybeHideClearFilter",value:function(e){!this.isFilterActive(e)&&yith_wcan_shortcodes.show_clear_filter&&e.find(".clear-selection").remove()}},{key:"maybeHideClearAllFilters",value:function(){this.isAnyFilterActive()||this.$preset.find(".filters-container").children(".clear-selection").remove()}},{key:"deactivateFilter",value:function(t,i,a){var n=t.data("filter-type"),l=t.find(".filter-item"),r=l.filter(".active"),s=t.find(".filter-dropdown");switch(n){case"tax":var o=t.data("taxonomy");s.length?(i?s.find("option").each((function(){var t=e(this);t.val().toString()===i[o].toString()&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("term-slug")).toString()===i[o].toString()&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"review":s.length?(i?s.find("option").each((function(){var t=e(this);t.val()===i.rating_filter&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("rating"))===i.rating_filter&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_range":s.length?(i?s.find("option").each((function(){var t=e(this),a=i.min_price+(i.max_price?"-".concat(i.max_price):"");t.val()===a&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t,a,n=e(this),l=n.children("label"),r=n.children("a");a=l.length?l.find(":input").val():r.data("min_price")+(r.data("max_price")?"-"+r.data("max_price"):""),i.min_price?t=i.min_price+(i.max_price?"-"+i.max_price:""):i.price_ranges&&(t=i.price_ranges),a===t&&(n.children("label").children("a").click(),n.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_slider":var c=t.find(".price-slider");t.find(".price-slider-min").val(c.data("min")),t.find(".price-slider-max").val(c.data("max")).change();break;case"orderby":t.find("select").val("menu_order");break;case"stock_sale":i?(null!=i&&i.instock_filter&&t.find(".filter-in-stock").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.onsale_filter&&t.find(".filter-on-sale").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.featured_filter&&t.find(".filter-featured").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active")):(t.find(".filter-in-stock").find(":input").prop("checked",!1).change(),t.find(".filter-on-sale").find(":input").prop("checked",!1).change(),t.find(".filter-featured").find(":input").prop("checked",!1).change(),l.removeClass("active"));break;default:l.removeClass("active")}this.activeFilters=!1,a&&this.filter()}},{key:"deactivateAllFilters",value:function(t){var i=this;return this.getFilters().each((function(){var t=e(this);i.deactivateFilter(t)})),this.activeFilters=!1,t&&this.filter(),!0}},{key:"deactivateFilterByProperties",value:function(t,i){var a=this,n=this.getFiltersByProperties(t);return!!n.length&&(n.each((function(){var n=e(this);a.deactivateFilter(n,t,i)})),!0)}},{key:"openModal",value:function(){var t=this;this.isMobile&&(yith_wcan_shortcodes.toggles_open_on_modal?this._openAllCollapsables():this._closeAllCollapsables(),e("body").css("overflow","hidden").addClass("yith-wcan-preset-modal-open"),this.$preset.show(),setTimeout((function(){t.$preset.addClass("open")}),100))}},{key:"closeModal",value:function(){var t=this;this.isMobile&&(this.$preset.removeClass("open"),setTimeout((function(){t.$preset.hide(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open")}),300))}},{key:"formatPrice",value:function(e){var t,i,a,n;return"undefined"!=typeof accounting&&(e=accounting.formatMoney(e,{symbol:null===(t=yith_wcan_shortcodes.currency_format)||void 0===t?void 0:t.symbol,decimal:null===(i=yith_wcan_shortcodes.currency_format)||void 0===i?void 0:i.decimal,thousand:null===(a=yith_wcan_shortcodes.currency_format)||void 0===a?void 0:a.thousand,precision:0,format:null===(n=yith_wcan_shortcodes.currency_format)||void 0===n?void 0:n.format})),e}},{key:"mergeProperties",value:function(t,i,a){for(var n in i)if(i.hasOwnProperty(n)&&t[n]){switch(n){case"rating_filter":case"min_price":case"max_price":case"onsale_filter":case"instock_filter":case"orderby":t[n]=i[n];break;default:if(0===n.indexOf("query_type_"))t[n]=i[n];else{var l=0===n.indexOf("filter_"),r=l?",":"+",s=t[n].replace(",",r)+r+i[n].replace(",",r);if(s=s.split(r).filter((function(e,t,i){return i.indexOf(e)===t})).join(r),t[n]=s,l){var o=n.replace("filter_","query_type_");t[o]="and",i[o]="and"}}}delete i[n]}return e.extend(t,i),t}}])&&f(i.prototype,a),n&&f(i,n),t}();jQuery((function(e){e(document).on("yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode",(function(){e(".yith-wcan-filters").not(".enhanced").each((function(){new v(e(this))})),e(".yith-wcan-reset-filters").not(".enhanced").each((function(){new r(e(this))}))})).trigger("yith_wcan_init_shortcodes"),globalThis.product_filter=new l}))})();
1
+ (()=>{"use strict";var e=jQuery,t=e("body");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(){function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),n(this,"xhr",null),n(this,"doingAjax",!1),n(this,"originalSearch",location.search),n(this,"initialized",!1),n(this,"filtered",!1),this.initPopState(),this.initialized=!0}var r,s,o;return r=l,(s=[{key:"initPopState",value:function(){yith_wcan_shortcodes.reload_on_back&&(this.pushUrlToHistory(window.location,document.title,null,!0),e(window).on("popstate",(function(){var e;null!==(e=window.history.state)&&void 0!==e&&e._yithWcan&&window.location.reload(!0)})))}},{key:"doFilter",value:function(t,i,a){var n,l,r=this,s=e(i||"body");return(l=e(document).triggerHandler("yith_wcan_filters_parameters",[t]))&&(t=l),s&&this.block(s),n=this.buildUrl(t),yith_wcan_shortcodes.ajax_filters?(this.doingAjax=!0,this._doAjax(n).done((function(e){n=r.searchAlternativeUrl(e,n),r._beforeFilter(e,t),r.refreshFragments(i,a,e),r.pushUrlToHistory(n,e.pageTitle,t),r.originalSearch=location.search,s&&r.unblock(s),r._afterFilter(e,t),r.doingAjax=!1}))):(this.pushUrlToHistory(n,document.title,t),void(window.location=n))}},{key:"_beforeFilter",value:function(t,i){e(document).trigger("yith-wcan-ajax-loading",[t,i])}},{key:"_afterFilter",value:function(i,a){e(".woocommerce-ordering").on("change","select.orderby",(function(){e(this).closest("form").submit()})),this.filtered=a&&!!Object.keys(a).length,this.filtered?t.addClass("filtered"):t.removeClass("filtered"),e(window).trigger("scroll"),e(document).trigger("yith-wcan-ajax-filtered",[i,a]).trigger("yith_wcwl_reload_fragments")}},{key:"buildUrl",value:function(t){var a,n=this,l=yith_wcan_shortcodes.query_param,r={},s=window.location,o=yith_wcan_shortcodes.base_url?yith_wcan_shortcodes.base_url:(null==s?void 0:s.origin)+(null==s?void 0:s.pathname),c=this,h="object"===i(t)&&Object.keys(t).length;if(yith_wcan_shortcodes.session_param&&(o=o.replace(new RegExp("/"+yith_wcan_shortcodes.session_param+"/[^/]*/"),"")),h&&(r[l]=1),this.originalSearch){var d=this.originalSearch.replace("?","").split("&").reduce((function(e,t){var i=t.split("=");if(2===i.length){if(n.isFilterParam(i[0]))return e;e[i[0]]=i[1]}return e}),{});r=e.extend(r,d)}return h&&(r=e.extend(r,t)),(a=Object.keys(r).reduce((function(e,t){var i=r[t];return i&&t?e+=c._cleanParam(t)+"="+c._cleanParam(i)+"&":e}),"?").replace(/&$/g,"").replace(/%2B/g,"+").replace(/%2C/g,",")).length>1&&(o+=a),o}},{key:"searchAlternativeUrl",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=i;return-1===e.indexOf("yith_wcan:sharing_url")?a:a=(t=e.match(/<meta name="yith_wcan:sharing_url" content="([^"]*)">/))&&1 in t?t[1]:a}},{key:"pushUrlToHistory",value:function(e,t,i,a){if(yith_wcan_shortcodes.change_browser_url&&!navigator.userAgent.match(/msie/i)){var n="pushState";a&&(n="replaceState"),window.history[n]({_yithWcan:!0,pageTitle:t,filters:i},"",e)}}},{key:"refreshFragments",value:function(t,i,a){var n=document.createElement("html"),l=e(n);if(n.innerHTML=a,t){var r,s=e(i),o=e(t);s.length&&(r=l.find(i)).length&&s.replaceWith(r.first()),o.length&&(r=l.find(t)).length&&o.replaceWith(r.first())}else{var c=e(yith_wcan_shortcodes.content);c.length?c.replaceWith(l.find(yith_wcan_shortcodes.content)):e("body").replaceWith(l.find("body"))}e(document).trigger("yith_wcan_init_shortcodes")}},{key:"_cleanParam",value:function(e){var t,i;return null===(t=yith_wcan_shortcodes)||void 0===t||!t.process_sanitize||null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.skip_sanitize?e:encodeURIComponent(e)}},{key:"_doAjax",value:function(t,i){return this.xhr&&this.xhr.abort(),i=e.extend({url:t,headers:{"X-YITH-WCAN":1}},i),this.xhr=e.ajax(i),this.xhr}},{key:"block",value:function(t){var i;if(void 0!==e.fn.block){var a="#fff center center no-repeat";null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.loader&&(a="url('".concat(yith_wcan_shortcodes.loader,"') ").concat(a)),t.block({message:null,overlayCSS:{background:a,opacity:.7}})}}},{key:"unblock",value:function(t){void 0!==e.fn.unblock&&t.unblock()}},{key:"isFilterParam",value:function(t){var i,a=["rating_filter","min_price","max_price","price_ranges","onsale_filter","instock_filter","featured_filter","orderby","product-page",yith_wcan_shortcodes.query_param];return(i=e(document).triggerHandler("yith_wcan_supported_filters_parameters",[a]))&&(a=i),-1!==(a=a.concat(yith_wcan_shortcodes.supported_taxonomies.map((function(e){return e.replace("pa_","filter_")})))).indexOf(t)||-1!==t.indexOf("filter_")||-1!==t.indexOf("query_type_")}}])&&a(r.prototype,s),o&&a(r,o),l}();var r=function t(i){var a,n,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l=null,(n="$reset")in(a=this)?Object.defineProperty(a,n,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[n]=l,this.$reset=i,this.$reset.on("click",(function(t){t.preventDefault(),e(".yith-wcan-filters").each((function(){var t=e(this).data("preset");t.deactivateAllFilters(!0),t.closeModal()}))})),this.$reset.data("reset",this).addClass("enhanced")};function s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,l=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var d=function(){function t(i,a){var n,l,r,s;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"$originalSelect",null),h(this,"$_main",null),h(this,"$_label",null),h(this,"$_dropdown",null),h(this,"$_search",null),h(this,"$_showMore",null),h(this,"$_items",null),h(this,"currentPage",1),h(this,"options",{}),this.$originalSelect=i,this.$originalSelect.is("select")){var o=this.$originalSelect.data("per_page"),c=this.$originalSelect.data("order"),d=this.$originalSelect.data("all-label"),u={showSearch:this.$originalSelect.data("show_search"),paginate:this.$originalSelect.data("paginate"),perPage:o||10,order:c||"ASC",getElements:null,labels:{emptyLabel:d||(null===(n=yith_wcan_shortcodes.labels)||void 0===n?void 0:n.empty_option),searchPlaceholder:null===(l=yith_wcan_shortcodes.labels)||void 0===l?void 0:l.search_placeholder,noItemsFound:null===(r=yith_wcan_shortcodes.labels)||void 0===r?void 0:r.no_items,showMore:null===(s=yith_wcan_shortcodes.labels)||void 0===s?void 0:s.show_more}};this.options=e.extend(u,a),this._hideSelect(),this._initTemplate(),this._initActions(),this.$originalSelect.data("dropdown",this).addClass("enhanced")}}var i,a,n;return i=t,(a=[{key:"_hideSelect",value:function(){this.$originalSelect.hide()}},{key:"_initTemplate",value:function(){var t=e("<div/>",{class:"yith-wcan-dropdown closed"}),i=e("<div/>",{class:"dropdown-label",html:this.getLabel()}),a=e("<div>",{class:"dropdown-wrapper"}),n=e("<ul/>",{class:"matching-items filter-items"});a.append(n),t.append(i).append(a),this.options.showSearch&&this._initSearchTemplate(a),this.options.paginate&&this._initShowMoreTemplate(a),this.$originalSelect.after(t),this.$_main=t,this.$_label=i,this.$_dropdown=a,this.$_items=n}},{key:"_initSearchTemplate",value:function(t){var i=e("<div/>",{class:"search-field-container"}),a=e("<input/>",{name:"s",class:"search-field",type:"search",placeholder:this.options.labels.searchPlaceholder}).attr("autocomplete","off");i.append(a).prependTo(t),this.$_search=a}},{key:"_initShowMoreTemplate",value:function(t){var i,a=e("<a/>",{class:"show-more",text:null===(i=this.options.labels.showMore)||void 0===i?void 0:i.replace("%d",this.options.perPage)});a.on("click",this.loadNextPage.bind(this)).hide(),t.append(a),this.$_showMore=a}},{key:"_initActions",value:function(){var t,i,a=this;null===(t=this.$_main)||void 0===t||t.on("click",(function(e){e.stopPropagation(),a.toggleDropdown()})),this.$_dropdown.on("click",(function(e){e.stopPropagation()})),null===(i=this.$_search)||void 0===i||i.on("keyup search",(function(){a._populateItems()})),this.$_items.on("change",":input",(function(){var t,i=e(this).closest("li"),n=i.data("value");if(i.hasClass("disabled")&&!a.isValueSelected(n))return!1;i.toggleClass("active"),t=i.hasClass("active"),a._changeItemStatus(n,t)})),this.$_items.on("click","li:not(.checkbox) a",(function(t){var i,n=e(this).closest("li"),l=n.data("value");if(t.preventDefault(),n.hasClass("disabled")&&!a.isValueSelected(l))return!1;n.toggleClass("active"),(i=n.hasClass("active"))&&n.siblings().removeClass("active"),a._changeItemStatus(l,i)})),this.$_items.on("click","label > a",(function(t){var i=e(this).parent().find(":input");t.preventDefault(),(i.is('[type="radio"]')||i.is('[type="checkbox"]'))&&i.prop("checked",!i.prop("checked")),i.change()})),this.$originalSelect.on("change",(function(t,i){i||(a.$_items.find("li").each((function(){var t=e(this).data("value");a.isValueSelected(t)?a._selectItem(t):a._deselectItem(t)})),a.updateLabel())})),null!==globalThis&&void 0!==globalThis&&globalThis.yith_wcan_dropdown_init||(e(document).on("click",this._closeAllDropdowns),globalThis.yith_wcan_dropdown_init=!0)}},{key:"openDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.addClass("open").removeClass("closed"),this._afterDropdownOpen()}},{key:"closeDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.removeClass("open").addClass("closed")}},{key:"_closeAllDropdowns",value:function(){e(document).find("select.enhanced").filter((function(t,i){return!!e(i).data("dropdown")})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"_closeOtherDropdowns",value:function(){var t=this;e(document).find("select.enhanced").filter((function(i,a){var n=e(a);return!!n.data("dropdown")&&!n.is(t.$originalSelect)})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"toggleDropdown",value:function(){var e,t;null===(e=this.$_main)||void 0===e||e.toggleClass("open").toggleClass("closed"),null!==(t=this.$_main)&&void 0!==t&&t.hasClass("open")&&this._afterDropdownOpen()}},{key:"_afterDropdownOpen",value:function(){var e;this._closeOtherDropdowns(),null!==(e=this.$_search)&&void 0!==e&&e.length&&this.$_search.val(""),this._populateItems()}},{key:"getMatchingElements",value:function(t,i){var a=this,n=[],l=this.getOptions();return new Promise((function(r){l.each((function(){var i=e(this),a=i.val(),l=i.html(),r=new RegExp(".*"+t+".*","i");(!t||r.test(a)||r.test(l))&&n.push({value:a,label:l})})),a.options.getElements?a.options.getElements(t).then((function(t){t&&(t=t.reduce((function(e,t,i){return e.push({label:i,value:t}),e}),[]),n=e.extend(n,t)),r(a._formatItems(n,i))})):r(a._formatItems(n,i))}))}},{key:"_formatItems",value:function(e,t){var i=this,a=[],n=!1;return e.filter((function(e){return-1===a.indexOf(e.value)&&(a.push(e.value),!0)})).sort((function(e,t){var a="ASC"===i.options.order?1:-1;return e.value<t.value?-1*a:e.value>t.value?a:0})),t&&(n=t<Object.keys(e).length,e=e.slice(0,t)),{items:e,hasMore:n}}},{key:"_generateItem",value:function(t,i){var a,n=this.isValueSelected(t),l=this.getOptionByValue(t),r=e("<li/>",{"data-value":t,class:l.length?l.attr("class"):""});if(l.length){var s=l.data("template"),o=l.data("count");i=s||i,o&&(i+=o)}if(a=e("<a/>",{href:l.length?l.data("filter_url"):"#",html:i,rel:"nofollow","data-title":l.length?l.data("title"):""}),this.$originalSelect.prop("multiple")){var c=e("<input/>",{type:"checkbox",value:t}),h=e("<label>");c.prop("checked",n),h.prepend(c).append(a),r.append(h).addClass("checkbox")}else r.append(a);return n?r.addClass("active"):r.removeClass("active"),r}},{key:"_populateItems",value:function(t){var i,a,n=this,l=null!==(i=this.$_search)&&void 0!==i&&i.length?this.$_search.val():"",r=this.options.paginate?this.options.perPage:0;a=(t=t?parseInt(t):1)*r,this.getMatchingElements(l,a).then((function(i){var a=i.items,l=[],r=!1;if(n._emptyItems(),n._hideLoadMore(),a.length){var o,c=s(a);try{for(c.s();!(o=c.n()).done;){var h=o.value;""===h.value?l.unshift(n._generateItem(h.value,h.label)):l.push(n._generateItem(h.value,h.label))}}catch(e){c.e(e)}finally{c.f()}n.currentPage=t,r=i.hasMore}else l.push(e("<li/>",{text:n.options.labels.noItemsFound})),n.currentPage=1;n.$_items.append(l),n.$originalSelect.trigger("yith_wcan_dropdown_updated"),r&&n._showLoadMore()}))}},{key:"loadNextPage",value:function(){var e=this.currentPage+1;this._populateItems(e)}},{key:"_selectItem",value:function(e){return this._changeItemStatus(e,!0)}},{key:"_deselectItem",value:function(e){return this._changeItemStatus(e,!1)}},{key:"_changeItemStatus",value:function(e,t){var i=this.$originalSelect.find('option[value="'.concat(e,'"]'));return!!i.length&&(i.prop("selected",t),this.closeDropdown(),this.updateLabel(),this.$originalSelect.trigger("change",[!0]),!0)}},{key:"_emptyItems",value:function(){this.$_items.html("")}},{key:"_showLoadMore",value:function(){this.$_showMore.show()}},{key:"_hideLoadMore",value:function(){this.$_showMore.hide()}},{key:"getLabel",value:function(){return this.hasSelectedValues()?this.getSelectedLabels().join(", "):this.options.labels.emptyLabel}},{key:"updateLabel",value:function(){var e,t=this.getLabel();null===(e=this.$_label)||void 0===e||e.html(t)}},{key:"getOptions",value:function(){return this.$originalSelect.find("option")}},{key:"hasSelectedValues",value:function(){return this.getSelectedOptions().length}},{key:"isValueSelected",value:function(e){return-1!==this.getSelectedValues().indexOf(e.toString())}},{key:"getSelectedOptions",value:function(){return this.$originalSelect.find("option").filter(":selected")}},{key:"getOptionByValue",value:function(e){return this.$originalSelect.find('option[value="'.concat(e,'"]'))}},{key:"getSelectedLabels",value:function(){var t=[];return this.getSelectedOptions().each((function(){var i=e(this),a=i.data("template");a=a||i.html().replace(/\([0-9]*\)/,""),t.push(a)})),t}},{key:"getSelectedValues",value:function(){var t=[];return this.getSelectedOptions().each((function(){t.push(e(this).val())})),t}},{key:"destroy",value:function(){}}])&&c(i.prototype,a),n&&c(i,n),t}();function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function p(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var v=function(){function t(i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"preset",!1),p(this,"$preset",!1),p(this,"target",!1),p(this,"$target",!1),p(this,"$filters",!1),p(this,"$filterButtons",!1),p(this,"modalElements",{}),p(this,"activeFilters",!1),p(this,"isMobile",!1),p(this,"sliderTimeout",!1),p(this,"originalFilters",null),p(this,"dirty",!1),this.preset="#"+i.attr("id"),this.$preset=i,this.target=this.$preset.data("target"),this.$target=!!this.target&&e(this.target),this._regiterStatus(),this._initFilterButton(),this._initResponsive(),this._initFilters(),this._initActions(),this.$preset.data("preset",this).addClass("enhanced").trigger("yith_wcan_preset_initialized",[this])}var i,a,n;return i=t,(a=[{key:"_initFilters",value:function(){var t=this;this.getFilters().each((function(){var i=e(this);t._initFilter(i)})),this.maybeShowClearAllFilters()}},{key:"_initFilterButton",value:function(){var e=this;this.$filterButtons=this.$preset.find(".apply-filters"),this.$filterButtons.length&&this.$filterButtons.on("click",(function(t){t.preventDefault(),e.filter()})).hide()}},{key:"_initActions",value:function(){this.$preset.find("form").on("submit",(function(e){e.preventDefault()}))}},{key:"_initResponsive",value:function(){var t=this;if(yith_wcan_shortcodes.modal_on_mobile){var i=window.matchMedia("(max-width: ".concat(yith_wcan_shortcodes.mobile_media_query,"px)"));e(window).on("resize",(function(){var e=!!i.matches;e!==t.isMobile&&(t.isMobile=e,t._afterLayoutChange())})).resize()}}},{key:"_initFilter",value:function(t){var i,a=this,n=function(i){var n=e(this),l=n.closest(".yith-wcan-filter"),r=!!l.length&&"yes"===l.data("multiple"),s=n.closest(".filter-item"),o=s.length?l.find(".filter-item").not(s):[];if(s.is(".disabled")&&!s.is(".active"))return i.preventDefault(),!1;i.preventDefault(),o.length&&!r&&o.removeClass("active").children("label").find(":input").prop("checked",!1).parent(".checked").removeClass("checked"),s.length&&s.toggleClass("active"),a.activeFilters=!1,a.maybeFilter(t),a.maybeToggleClearAllFilters(),a.maybeToggleClearFilter(l)};t.find(".filter-item").not(".checkbox").not(".radio").on("click","a",(function(t){var i=e(this).closest(".filter-item");if(!e(null==t?void 0:t.delegateTarget).is(i))return!1;n.call(this,t)})),t.find(":input").on("change",(function(t){var i=e(this),a=i.closest(".filter-item");if(a.is(".disabled")&&!a.is(".active"))return i.prop("checked",!1),!1;n.call(this,t)})),t.find("label > a").on("click",(function(t){var i=e(this),a=i.closest(".filter-item");if(t.preventDefault(),a.is(".disabled")&&!a.is(".active"))return!1;var n=i.parent().find(":input");(n.is('[type="radio"]')||n.is('[type="checkbox"]'))&&n.prop("checked",!n.prop("checked")),n.change()})),this._initTooltip(t),this._initPriceSlider(t),this._initDropdown(t),this._initCollapsable(t),this.maybeShowClearFilter(t),null!==(i=this.$preset)&&void 0!==i&&i.hasClass("custom-style")&&(this._initCustomInput(t),t.on("yith_wcan_dropdown_updated",(function(){var t=e(this).closest(".yith-wcan-filter");a._initCustomInput(t)})))}},{key:"_initTooltip",value:function(t,i){t.find("[data-title]").each((function(){var t=e(this);!t.hasClass("tooltip-added")&&t.data("title")&&(t.on("mouseenter",(function(){var t,a=e(this),n=null,l=a.outerWidth(),r=0;if(!i||"top"!==i&&"right"!==i){var s=a.closest(".filter-item");i=s.hasClass("color")||s.hasClass("label")?"top":"right"}n=e("<span>",{class:"yith-wcan-tooltip",html:a.data("title")}),a.append(n),t=n.outerWidth()+6,n.outerWidth(t),r="top"===i?(l-t)/2:l+15,n.css({left:r.toFixed(0)+"px"}).fadeIn(200),a.addClass("with-tooltip")})).on("mouseleave",(function(){var t=e(this);t.find(".yith-wcan-tooltip").fadeOut(200,(function(){t.removeClass("with-tooltip").find(".yith-wcan-tooltip").remove()}))})),t.addClass("tooltip-added"))}))}},{key:"_initDropdown",value:function(t){var i=t.find("select.filter-dropdown");i.length&&(i.hasClass("select2-hidden-accessible")&&void 0!==e.fn.selectWoo&&i.selectWoo("destroy"),this._initDropdownObject(i,{paginate:!0,perPage:yith_wcan_shortcodes.terms_per_page}))}},{key:"_initDropdownObject",value:function(e,t){return new d(e,t)}},{key:"_initPriceSlider",value:function(e){var t=this;if(e.hasClass("filter-price-slider")){var i=this,a=e.find(".price-slider"),n=a.find(".price-slider-min"),l=a.find(".price-slider-max"),r=parseFloat(a.data("min")),s=parseFloat(a.data("max")),o=parseFloat(n.val()),c=parseFloat(l.val()),h=parseFloat(a.data("step")),d=function(){i.sliderTimeout&&clearTimeout(i.sliderTimeout),i.sliderTimeout=setTimeout((function(){i.maybeFilter(e)}),300)};e.find(".price-slider-ui").ionRangeSlider({skin:"round",type:"double",min:r,max:s,step:h,from:o,to:c,min_interval:h,values_separator:" - ",prettify:function(e){return t.formatPrice(e)},onChange:function(e){n.val(e.from),l.val(e.to)},onFinish:d}),n.add(l).off("change").on("change",d).on("keyup",(function(e){if(!e.key.match(/[0-9,.]/))return e.preventDefault(),!1;n.val()&&l.val()&&d()}))}}},{key:"_initCollapsable",value:function(e){this._initTitleCollapsable(e),this._initHierarchyCollapsable(e)}},{key:"_initTitleCollapsable",value:function(e){var t=e.find(".collapsable");t.length&&this._initToggle(t,t,e.find(".filter-content"))}},{key:"_initHierarchyCollapsable",value:function(t){var i=t.find(".hierarchy-collapsable");if(i.length){var a=this,n=t.find(".active");n.length&&(n.parents(".hierarchy-collapsable").removeClass("closed").addClass("opened"),n.hasClass("hierarchy-collapsable")&&yith_wcan_shortcodes.show_current_children&&n.removeClass("closed").addClass("opened")),i.each((function(){var t=e(this),i=e("<span/>",{class:"toggle-handle"});i.appendTo(t),a._initToggle(i,t,t.children("ul.filter-items"))}))}}},{key:"_initToggle",value:function(e,t,i){var a=this;t.hasClass("closed")&&i.hide(),e.off("click").on("click",(function(e){e.stopPropagation(),e.preventDefault(),a.toggle(i,t),i.trigger("yith_wcan_after_toggle_element",[t])}))}},{key:"_initCustomInput",value:function(t){t.find(":input").each((function(){var t,i=e(this),a=i.attr("type"),n="".concat(a,"button");"checkbox"!==a&&"radio"!==a||i.closest(".".concat(n)).length||(i.is(":checked")&&(n+=" checked"),t=e("<span/>",{class:n}),i.wrap(t).on("change",(function(){var t=e(this);t.prop("checked")?t.parent().addClass("checked"):t.parent().removeClass("checked")})))}))}},{key:"_regiterStatus",value:function(){this.originalFilters=this.getFiltersProperties()}},{key:"_afterLayoutChange",value:function(){var t,i;this.isMobile?(this.$preset.addClass("filters-modal").attr("role","dialog").attr("tabindex","-1").hide(),this._addCloseModalButton(),this._addApplyFiltersModalButton(),this._switchToCollapsables(),null===(t=this.$filterButtons)||void 0===t||t.hide()):(this.$preset.removeClass("filters-modal").removeClass("open").removeAttr("role").removeAttr("tabindex").show(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open"),this._removeCloseModalButton(),this._removeApplyFiltersModalButton(),this._switchBackCollapsables(),null===(i=this.$filterButtons)||void 0===i||i.show())}},{key:"_addCloseModalButton",value:function(){var t=e("<a/>",{class:"close-button",html:"&times;","data-dismiss":"modal","aria-label":yith_wcan_shortcodes.labels.close});t.prependTo(this.$preset).on("click",this.closeModal.bind(this)),this.modalElements.closeButton=t}},{key:"_removeCloseModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.closeButton)||void 0===t||t.remove()}},{key:"_addApplyFiltersModalButton",value:function(){var t=this,i=e("<button/>",{class:"apply-filters main-modal-button",html:yith_wcan_shortcodes.labels.show_results,"data-dismiss":"modal"});i.appendTo(this.$preset).on("click",(function(){t.filter(),t.closeModal()})),this.modalElements.applyFiltersButton=i}},{key:"_removeApplyFiltersModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.applyFiltersButton)||void 0===t||t.remove()}},{key:"_switchToCollapsables",value:function(){var t=this;this.getFilters().each((function(){var i=e(this),a=i.find(".filter-title");a.length&&!a.hasClass("collapsable")&&(a.addClass("collapsable").data("disable-collapse",!0),t._initTitleCollapsable(i))}))}},{key:"_switchBackCollapsables",value:function(){this.getFilters().each((function(){var t=e(this),i=t.find(".filter-title");i.length&&i.hasClass("collapsable")&&i.data("disable-collapse")&&(i.removeClass("collapsable").removeData("disable-collapse",!0).off("click"),t.find(".filter-content").show())}))}},{key:"_openAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").show().end().find(".filter-title").removeClass("closed").addClass("opened")}},{key:"_closeAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").hide().end().find(".filter-title").addClass("closed").removeClass("opened")}},{key:"maybeRegisterStatusChange",value:function(){var e=this.getFiltersProperties(),t=JSON.stringify(e),i=JSON.stringify(this.originalFilters);this.dirty=t!==i}},{key:"maybeFilter",value:function(e){if(this.maybeRegisterStatusChange(),yith_wcan_shortcodes.instant_filters&&!this.isMobile)this.filter();else if(yith_wcan_shortcodes.instant_filters||this.isMobile){if(this.isMobile&&this.dirty){var t;this.$preset.addClass("with-filter-button"),null===(t=this.modalElements.applyFiltersButton)||void 0===t||t.show()}}else{var i,a;this.dirty?null===(i=this.$filterButtons)||void 0===i||i.show():null===(a=this.$filterButtons)||void 0===a||a.hide()}}},{key:"filter",value:function(){var t,i,a,n=this,l=null===(t=window)||void 0===t?void 0:t.product_filter;null==l||null===(i=l.doFilter(this.getFiltersProperties(),this.target,this.preset))||void 0===i||i.done((function(){var t=e(n.preset);if(t.length&&yith_wcan_shortcodes.scroll_top){var i=t.offset().top;if(yith_wcan_shortcodes.scroll_target){var a=e(yith_wcan_shortcodes.scroll_target);i=a.length?a.offset().top:i}else n.isMobile&&(i=100);e("body, html").animate({scrollTop:i-100})}n.originalFilters=n.getFiltersProperties(),n.dirty=!1})),this.isMobile&&(this.$preset.removeClass("with-filter-button"),null===(a=this.modalElements.applyFiltersButton)||void 0===a||a.hide(),this.closeModal())}},{key:"getFilters",value:function(){return!1===this.$filters&&(this.$filters=this.$preset.find(".yith-wcan-filter")),this.$filters}},{key:"getActiveFilters",value:function(){return!1===this.activeFilters&&(this.activeFilters=this.getFiltersProperties()),this.activeFilters}},{key:"isAnyFilterActive",value:function(){return!!Object.keys(this.getActiveFilters()).length}},{key:"isFilterActive",value:function(e){var t,i;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var a=e.find(".filter-dropdown");if(a.length){var n=a.val();t="object"===u(n)?!(null==n||!n.length):!!n;break}case"stock_sale":t=e.find(".filter-item").filter(".active").length;break;case"price_slider":var l=parseFloat(e.find(".price-slider").data("step")),r=parseFloat(e.find(".price-slider").data("min")),s=parseFloat(e.find(".price-slider").data("max")),o=parseFloat(e.find(".price-slider-min").val()),c=parseFloat(e.find(".price-slider-max").val());t=Math.abs(o-r)>=l||Math.abs(c-s)>=l;break;case"orderby":t="menu_order"!==e.find(".filter-order-by").val();break;default:t=!1}return t=void 0!==(i=e.triggerHandler("yith_wcan_is_filter_active",[t,this]))?i:t}},{key:"countActiveItems",value:function(e){var t;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var i=e.find(".filter-dropdown");if(i.length){var a=i.val();t="object"===u(a)?null==a?void 0:a.length:+!!a;break}case"stock_sale":t=e.find(".filter-items").find(".active").length;break;case"orderby":this.isFilterActive(e)&&(t=1);break;case"price_slider":default:t=0}return t}},{key:"getFilterProperties",value:function(t){var i,a,n=t.data("filter-type"),l="yes"===t.data("multiple"),r=t.find(".filter-dropdown"),s={};switch(n){case"tax":var o=[],c=t.data("taxonomy"),h=0===c.indexOf("filter"),d=t.data("relation");if(r.length?l?o=r.val():o.push(r.val()):o=(a=t.find(".filter-item").filter(".active").children("a, label")).get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("term-slug"))?(t.push(a),t):t}),o),l){var u=h||"and"!==d?",":"+";s[c]=o.join(u)}else s[c]=o.pop();h&&(s[c.replace("filter_","query_type_")]=d);break;case"review":r.length?s.rating_filter=r.val():(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.rating_filter=a.get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("rating"))?(t.push(a),t):t}),[]).join(","):(a=a.first(),s.rating_filter=a.is("label")?a.find(":input").val():a.data("rating")));break;case"price_range":r.length?l?s.price_ranges=r.val().join(","):(s.min_price=r.val().split("-")[0],s.max_price=r.val().split("-")[1]):(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.price_ranges=a.get().reduce((function(t,i){var a=e(i).data("range-min"),n=e(i).data("range-max");return t+=(n?"".concat(a,"-").concat(n):a)+","}),"").replace(/^(.*),$/,"$1"):(s.min_price=parseFloat(a.first().data("range-min")),s.max_price=parseFloat(a.first().data("range-max"))));break;case"price_slider":s.min_price=parseFloat(t.find(".price-slider-min").val()),s.max_price=parseFloat(t.find(".price-slider-max").val());break;case"stock_sale":t.find(".filter-on-sale").is(".active")&&(s.onsale_filter=1),t.find(".filter-in-stock").is(".active")&&(s.instock_filter=1),t.find(".filter-featured").is(".active")&&(s.featured_filter=1);break;case"orderby":s.orderby=t.find(".filter-order-by").val()}return s=void 0!==(i=t.triggerHandler("yith_wcan_filter_properties",[s,self]))?i:s}},{key:"getFiltersProperties",value:function(){var t={},i=this;return this.getFilters().each((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a);t=i.mergeProperties(t,n,a)}})),t}},{key:"getFiltersByProperties",value:function(t){var i=this;return this.getFilters().filter((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a),l=!1;for(var r in t){if(["min_price","max_price","price_ranges"].includes(r)&&(n.min_price||n.price_ranges)){l=!0;break}if(n[r]){l=!0;break}}return l}return!1}))}},{key:"maybeToggleClearFilter",value:function(e){this.isFilterActive(e)?this.maybeShowClearFilter(e):this.maybeHideClearFilter(e)}},{key:"maybeToggleClearAllFilters",value:function(){this.isAnyFilterActive()?this.maybeShowClearAllFilters():this.maybeHideClearAllFilters()}},{key:"maybeShowClearFilter",value:function(t){var i=this;this.isFilterActive(t)&&yith_wcan_shortcodes.show_clear_filter&&(t.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_selection,role:"button"}).prependTo(t.find(".filter-content")).on("click",(function(e){e.preventDefault(),i.deactivateFilter(t,!1,yith_wcan_shortcodes.instant_filters),i.maybeHideClearFilter(t),yith_wcan_shortcodes.instant_filters&&i.closeModal()})))}},{key:"maybeShowClearAllFilters",value:function(){var t=this;this.isAnyFilterActive()&&this.isMobile&&(this.$preset.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_all_selections,role:"button"}).prependTo(this.$preset.find(".filters-container")).on("click",(function(e){e.preventDefault(),t.deactivateAllFilters(yith_wcan_shortcodes.instant_filters),t.maybeHideClearAllFilters(),yith_wcan_shortcodes.instant_filters&&t.closeModal()})))}},{key:"maybeHideClearFilter",value:function(e){!this.isFilterActive(e)&&yith_wcan_shortcodes.show_clear_filter&&e.find(".clear-selection").remove()}},{key:"maybeHideClearAllFilters",value:function(){this.isAnyFilterActive()||this.$preset.find(".filters-container").children(".clear-selection").remove()}},{key:"deactivateFilter",value:function(t,i,a){var n=t.data("filter-type"),l=t.find(".filter-item"),r=l.filter(".active"),s=t.find(".filter-dropdown");switch(n){case"tax":var o=t.data("taxonomy");s.length?(i?s.find("option").each((function(){var t=e(this);t.val().toString()===i[o].toString()&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("term-slug")).toString()===i[o].toString()&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"review":s.length?(i?s.find("option").each((function(){var t=e(this);t.val()===i.rating_filter&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("rating"))===i.rating_filter&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_range":s.length?(i?s.find("option").each((function(){var t=e(this),a=i.min_price+(i.max_price?"-".concat(i.max_price):"");t.val()===a&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t,a,n=e(this),l=n.children("label"),r=n.children("a");a=l.length?l.find(":input").val():r.data("min_price")+(r.data("max_price")?"-"+r.data("max_price"):""),i.min_price?t=i.min_price+(i.max_price?"-"+i.max_price:""):i.price_ranges&&(t=i.price_ranges),a===t&&(n.children("label").children("a").click(),n.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_slider":var c=t.find(".price-slider");t.find(".price-slider-min").val(c.data("min")),t.find(".price-slider-max").val(c.data("max")).change();break;case"orderby":t.find("select").val("menu_order");break;case"stock_sale":i?(null!=i&&i.instock_filter&&t.find(".filter-in-stock").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.onsale_filter&&t.find(".filter-on-sale").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.featured_filter&&t.find(".filter-featured").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active")):(t.find(".filter-in-stock").find(":input").prop("checked",!1).change(),t.find(".filter-on-sale").find(":input").prop("checked",!1).change(),t.find(".filter-featured").find(":input").prop("checked",!1).change(),l.removeClass("active"));break;default:l.removeClass("active")}this.activeFilters=!1,a&&this.filter()}},{key:"deactivateAllFilters",value:function(t){var i=this;return this.getFilters().each((function(){var t=e(this);i.deactivateFilter(t)})),this.activeFilters=!1,t&&this.filter(),!0}},{key:"deactivateFilterByProperties",value:function(t,i){var a=this,n=this.getFiltersByProperties(t);return!!n.length&&(n.each((function(){var n=e(this);a.deactivateFilter(n,t,i)})),!0)}},{key:"toggle",value:function(e,t,i){void 0===i&&(i=t.hasClass("closed"));var a=i?"opened":"closed",n=i?"closed":"opened";e[i?"slideDown":"slideUp"](400,(function(){t.addClass(a).removeClass(n),e.trigger("yith_wcan_toggle_element",[t,i])}))}},{key:"openFilter",value:function(e){var t=e.find(".collapsable");t.length&&this.toggle(e.find(".filter-content"),t,!0)}},{key:"openAllFilters",value:function(t){var i=this;this.getFilters().each((function(){i.openFilter(e(this))}))}},{key:"closeFilter",value:function(e){var t=e.find(".collapsable");t.length&&this.toggle(e.find(".filter-content"),t,!1)}},{key:"closeAllFilters",value:function(t){var i=this;this.getFilters().each((function(){i.closeFilter(e(this))})),void 0!==t&&this.openFilter(t)}},{key:"openModal",value:function(){var t=this;this.isMobile&&(yith_wcan_shortcodes.toggles_open_on_modal?this._openAllCollapsables():this._closeAllCollapsables(),e("body").css("overflow","hidden").addClass("yith-wcan-preset-modal-open"),this.$preset.show(),setTimeout((function(){t.$preset.addClass("open")}),100))}},{key:"closeModal",value:function(){var t=this;this.isMobile&&(this.$preset.removeClass("open"),setTimeout((function(){t.$preset.hide(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open")}),300))}},{key:"formatPrice",value:function(e){var t,i,a,n;return"undefined"!=typeof accounting&&(e=accounting.formatMoney(e,{symbol:null===(t=yith_wcan_shortcodes.currency_format)||void 0===t?void 0:t.symbol,decimal:null===(i=yith_wcan_shortcodes.currency_format)||void 0===i?void 0:i.decimal,thousand:null===(a=yith_wcan_shortcodes.currency_format)||void 0===a?void 0:a.thousand,precision:0,format:null===(n=yith_wcan_shortcodes.currency_format)||void 0===n?void 0:n.format})),e}},{key:"mergeProperties",value:function(t,i,a){for(var n in i)if(i.hasOwnProperty(n)&&t[n]){switch(n){case"rating_filter":case"min_price":case"max_price":case"onsale_filter":case"instock_filter":case"orderby":t[n]=i[n];break;default:if(0===n.indexOf("query_type_"))t[n]=i[n];else{var l=0===n.indexOf("filter_"),r=l?",":"+",s=t[n].replace(",",r)+r+i[n].replace(",",r);if(s=s.split(r).filter((function(e,t,i){return i.indexOf(e)===t})).join(r),t[n]=s,l){var o=n.replace("filter_","query_type_");t[o]="and",i[o]="and"}}}delete i[n]}return e.extend(t,i),t}}])&&f(i.prototype,a),n&&f(i,n),t}();jQuery((function(e){e(document).on("yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode",(function(){e(".yith-wcan-filters").not(".enhanced").each((function(){new v(e(this))})),e(".yith-wcan-reset-filters").not(".enhanced").each((function(){new r(e(this))}))})).trigger("yith_wcan_init_shortcodes"),globalThis.product_filter=new l}))})();
assets/scss/shortcodes.scss CHANGED
@@ -140,7 +140,7 @@ $z-index: 1001; // value is this high since modal must be on top of Proteo's sti
140
  display: inline-block;
141
  margin: 0 5px 10px;
142
  vertical-align: top;
143
- width: calc(#{100 / $columns_number}% - 10px);
144
  }
145
 
146
  @mixin columns {
@@ -562,7 +562,7 @@ $z-index: 1001; // value is this high since modal must be on top of Proteo's sti
562
  border-left: 5px solid transparent;
563
  border-right: 5px solid transparent;
564
  border-top: 5px solid $accent-color;
565
- left: calc(50% - 2px);
566
  top: 100%;
567
  }
568
  }
140
  display: inline-block;
141
  margin: 0 5px 10px;
142
  vertical-align: top;
143
+ width: calc(#{calc(100 / $columns_number)}% - 10px);
144
  }
145
 
146
  @mixin columns {
562
  border-left: 5px solid transparent;
563
  border-right: 5px solid transparent;
564
  border-top: 5px solid $accent-color;
565
+ left: calc(50% - 5px);
566
  top: 100%;
567
  }
568
  }
init.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
  * Description: <code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products and improve the user experience of your shop. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
- * Version: 4.16.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
10
  * Domain Path: /languages/
11
  *
12
- * WC requires at least: 6.9
13
- * WC tested up to: 7.1
14
  *
15
  * @author YITH
16
  * @package YITH\AjaxProductFilter
@@ -45,7 +45,7 @@ if ( ! defined( 'ABSPATH' ) ) {
45
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
46
  ! defined( 'YITH_WCAN_INC' ) && define( 'YITH_WCAN_INC', YITH_WCAN_DIR . 'includes/' );
47
  ! defined( 'YITH_WCAN_ASSETS' ) && define( 'YITH_WCAN_ASSETS', YITH_WCAN_URL . 'assets/' );
48
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '4.16.0' );
49
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
50
  ! defined( 'YITH_WCAN_SLUG' ) && define( 'YITH_WCAN_SLUG', 'yith-woocommerce-ajax-navigation' );
51
  ! defined( 'YITH_WCAN_INIT' ) && define( 'YITH_WCAN_INIT', plugin_basename( __FILE__ ) );
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
  * Description: <code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products and improve the user experience of your shop. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
+ * Version: 4.17.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
10
  * Domain Path: /languages/
11
  *
12
+ * WC requires at least: 7.0
13
+ * WC tested up to: 7.2
14
  *
15
  * @author YITH
16
  * @package YITH\AjaxProductFilter
45
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
46
  ! defined( 'YITH_WCAN_INC' ) && define( 'YITH_WCAN_INC', YITH_WCAN_DIR . 'includes/' );
47
  ! defined( 'YITH_WCAN_ASSETS' ) && define( 'YITH_WCAN_ASSETS', YITH_WCAN_URL . 'assets/' );
48
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '4.17.0' );
49
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
50
  ! defined( 'YITH_WCAN_SLUG' ) && define( 'YITH_WCAN_SLUG', 'yith-woocommerce-ajax-navigation' );
51
  ! defined( 'YITH_WCAN_INIT' ) && define( 'YITH_WCAN_INIT', plugin_basename( __FILE__ ) );
languages/yith-woocommerce-ajax-navigation-de_DE.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-de_DE_formal.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-el.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-es_ES.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-fr_FR.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-it_IT.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-nl_NL.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-tr_TR.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Navigation\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-11-15 10:41:58+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
5
  "Project-Id-Version: YITH WooCommerce Ajax Navigation\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-12-13 10:52:36+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
plugin-fw/assets/css/welcome-modal.css DELETED
@@ -1,72 +0,0 @@
1
- /**
2
- * Welcome Modal.
3
- */
4
- .yith-plugin-fw-welcome-modal .yith-plugin-fw__modal__content {
5
- padding-bottom: 0;
6
- }
7
-
8
- .yith-plugin-fw-welcome-modal .yith-plugin-fw__modal__footer {
9
- background: transparent;
10
- text-align: center;
11
- }
12
-
13
- .yith-plugin-fw-welcome {
14
- line-height: 1.5em;
15
- }
16
-
17
- .yith-plugin-fw-welcome a {
18
- color: var(--yith-link);
19
- }
20
-
21
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__head {
22
- text-align: center;
23
- }
24
-
25
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__icon {
26
- width: 60px;
27
- }
28
-
29
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__title {
30
- color: #03689f;
31
- font-size: 18px;
32
- line-height: 2em;
33
- }
34
-
35
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__description {
36
- margin: 15px 0 25px;
37
- }
38
-
39
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__title__plugin-name {
40
- font-weight: 700;
41
- }
42
-
43
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__list-head {
44
- display: flex;
45
- align-items: center;
46
- }
47
-
48
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__list-head__title {
49
- font-size: 1.2em;
50
- font-weight: 700;
51
- flex: 1;
52
- }
53
-
54
- .yith-plugin-fw-welcome .yith-plugin-fw-welcome__list-head__changelog {
55
- font-size: .85em;
56
- text-decoration: none;
57
- font-weight: 500;
58
- }
59
-
60
- .yith-plugin-fw-welcome.yith-plugin-fw-welcome--update .yith-plugin-fw-welcome__list-head {
61
- margin-top: 30px;
62
- }
63
-
64
- .yith-plugin-fw-welcome__close {
65
- color: var(--yith-link);
66
- cursor: pointer;
67
- font-size: .9em;
68
- display: inline-block;
69
- padding: 5px 10px;
70
- text-decoration: none;
71
- font-weight: 500;
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/assets/css/yith-icon.css CHANGED
@@ -6,10 +6,10 @@
6
  /* stylelint-disable function-url-quotes, declaration-colon-newline-after */
7
  @font-face {
8
  font-family: yith-icon;
9
- src: url("../fonts/yith-icon.eot?3c67f638ae05de262cf047afbdfecfb1");
10
- src: url("../fonts/yith-icon.eot?3c67f638ae05de262cf047afbdfecfb1#iefix") format("embedded-opentype"),
11
- url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAACcsAAsAAAAARSAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQAAAAFY4xkshY21hcAAAAXwAAAIiAAAF6M2rEU5nbHlmAAADoAAAHvQAADWMtjZQA2hlYWQAACKUAAAAMAAAADYes3AcaGhlYQAAIsQAAAAeAAAAJAQ1AkVobXR4AAAi5AAAADAAAAE8m+b/52xvY2EAACMUAAAAoAAAAKDOIdsKbWF4cAAAI7QAA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WutI8yKmXrDTyIXF/dMA9CQ6WcuN1SFVi2S5ED/kPaxBaCZNbGH1ltmr8ReBBXYkRt87AyLu+oVtOaHnTr0mcT1ZZMqofDcFdkpNfGzCifRWUEU7mkwVgbV3/WL5iIquh0/gJ5RisiAAA=") format("woff"),
12
- url("../fonts/yith-icon.ttf?3c67f638ae05de262cf047afbdfecfb1") format("truetype");
13
  font-weight: 400;
14
  font-style: normal;
15
  }
@@ -139,6 +139,10 @@
139
  content: "\e91f";
140
  }
141
 
 
 
 
 
142
  .yith-icon-check-alt:before {
143
  content: "\f114";
144
  }
6
  /* stylelint-disable function-url-quotes, declaration-colon-newline-after */
7
  @font-face {
8
  font-family: yith-icon;
9
+ src: url("../fonts/yith-icon.eot?6c9fac5a69711520a55f03f0159e3932");
10
+ src: url("../fonts/yith-icon.eot?6c9fac5a69711520a55f03f0159e3932#iefix") format("embedded-opentype"),
11
+ url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAACgEAAsAAAAARnAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQAAAAFY4xksiY21hcAAAAXwAAAInAAAF9v9BwjlnbHlmAAADpAAAH7wAADa8WxqYn2hlYWQAACNgAAAAMAAAADYgbllqaGhlYQAAI5AAAAAeAAAAJAQ1AkZobXR4AAAjsAAAADAAAAFAneb/52xvY2EAACPgAAAAogAAAKLvYeFUbWF4cAAAJIQAAAAfAAAAIAFuAVZuYW1lAAAkpAAAATAAAAIiyMcJZnBvc3QAACXUAAACLQAAA96XfaIgeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/Mk4gYGVgYNBjDGNgYHBHUp/ZZBkaGFgYGJgZWbACgLSXFMYHF4yfDRgAnH1mNgYeIE0I4gDAJHOCGZ4nO3UZ3IaURCF0Y+MEEI5oYhAOTpnyzmHKpWX5SV6Ae6fvQL5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+65fUoMBZloxIRMdV31RkLVtumrQf0mm2mEI22oW7JJyeRSmQ27JelSUq8sdKV9olEpW2/gQeTO1Q3zIDRUyombLVWBZTsUOeD/pU1sIUhm7StEVpvmiwQexJUYUXt4WBkXe1SraU0PunXps4lqSybVw2G4IzLSq2NmlM+iMoKpXNJgrI2rPzsvmIiq6HT+At2JLgAAAAA=") format("woff"),
12
+ url("../fonts/yith-icon.ttf?6c9fac5a69711520a55f03f0159e3932") format("truetype");
13
  font-weight: 400;
14
  font-style: normal;
15
  }
139
  content: "\e91f";
140
  }
141
 
142
+ .yith-icon-charts:before {
143
+ content: "\f130";
144
+ }
145
+
146
  .yith-icon-check-alt:before {
147
  content: "\f114";
148
  }
plugin-fw/assets/fonts/yith-icon.eot CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.ttf CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.woff2 CHANGED
Binary file
plugin-fw/assets/js/welcome-modal.js DELETED
@@ -1,27 +0,0 @@
1
- /* global jQuery, yith, wp */
2
- jQuery( function ( $ ) {
3
- "use strict";
4
-
5
- var template = wp.template( 'yith-plugin-fw-welcome-modal' ),
6
- content = $( template( {} ) ),
7
- footer = content.find( '.yith-plugin-fw-welcome__footer' );
8
-
9
- yith.ui.modal(
10
- {
11
- content : content,
12
- footer : footer,
13
- classes : {
14
- wrap: 'yith-plugin-fw-welcome-modal'
15
- },
16
- width : '600px',
17
- closeWhenClickingOnOverlay: false,
18
- onClose : function () {
19
- var location = footer.find( '.yith-plugin-fw-welcome__close' ).attr( 'href' );
20
- if ( location ) {
21
- window.location.href = location;
22
- }
23
- }
24
- }
25
- );
26
-
27
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/assets/js/welcome-modal.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(function(e){"use strict";var o=e(wp.template("yith-plugin-fw-welcome-modal")({})),i=o.find(".yith-plugin-fw-welcome__footer");yith.ui.modal({content:o,footer:i,classes:{wrap:"yith-plugin-fw-welcome-modal"},width:"600px",closeWhenClickingOnOverlay:!1,onClose:function(){var e=i.find(".yith-plugin-fw-welcome__close").attr("href");e&&(window.location.href=e)}})});
 
plugin-fw/assets/js/yith-enhanced-select.js CHANGED
@@ -1,198 +1,227 @@
1
- /* global yith_framework_enhanced_select_params */
2
 
3
  jQuery( function ( $ ) {
4
- "use strict";
5
-
6
- $( document.body )
7
- .on( 'yith-framework-enhanced-select-init', function () {
8
- // Post Search
9
- $( '.yith-post-search' ).filter( ':not(.enhanced)' ).each( function () {
10
- var default_data = {
11
- action : 'yith_plugin_fw_json_search_posts',
12
- security : yith_framework_enhanced_select_params.search_posts_nonce,
13
- post_type: 'post'
14
- },
15
- current_data = $.extend( default_data, $( this ).data() ),
16
- select2_args = {
17
- allowClear : $( this ).data( 'allow_clear' ) ? true : false,
18
- placeholder : $( this ).data( 'placeholder' ),
19
- minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
20
- escapeMarkup : function ( m ) {
21
- return m;
22
- },
23
- ajax : {
24
- url : ajaxurl,
25
- dataType : 'json',
26
- quietMillis : 250,
27
- data : function ( params ) {
28
- var default_data_to_return = {
29
- term: params.term
30
- };
31
-
32
- return $.extend( default_data_to_return, current_data );
33
- },
34
- processResults: function ( data ) {
35
- var terms = [];
36
- if ( data ) {
37
- $.each( data, function ( id, text ) {
38
- terms.push( { id: id, text: text } );
39
- } );
40
- }
41
- return {
42
- results: terms
43
- };
44
- },
45
- cache : true
46
- }
47
- };
48
-
49
- $( this ).select2( select2_args ).addClass( 'enhanced' );
50
-
51
- if ( $( this ).data( 'sortable' ) ) {
52
- var $select = $( this );
53
- var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
54
-
55
- $list.sortable( {
56
- placeholder : 'ui-state-highlight select2-selection__choice',
57
- forcePlaceholderSize: true,
58
- items : 'li:not(.select2-search__field)',
59
- tolerance : 'pointer',
60
- stop : function () {
61
- $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
62
- var id = $( this ).data( 'data' ).id;
63
- var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
64
- $select.prepend( option );
65
- } );
66
- }
67
- } );
68
- }
69
- } );
70
-
71
- // Customer Search
72
- $( '.yith-customer-search' ).filter( ':not(.enhanced)' ).each( function () {
73
- var default_data = {
74
- action : 'woocommerce_json_search_customers',
75
- security : yith_framework_enhanced_select_params.search_customers_nonce,
76
- },
77
- current_data = $.extend( default_data, $( this ).data() ),
78
- select2_args = {
79
- allowClear : $( this ).data( 'allow_clear' ) ? true : false,
80
- placeholder : $( this ).data( 'placeholder' ),
81
- minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
82
- escapeMarkup : function ( m ) {
83
- return m;
84
- },
85
- ajax : {
86
- url : ajaxurl,
87
- dataType : 'json',
88
- quietMillis : 250,
89
- data : function ( params ) {
90
- var default_data_to_return = {
91
- term: params.term
92
- };
93
-
94
- return $.extend( default_data_to_return, current_data );
95
- },
96
- processResults: function ( data ) {
97
- var terms = [];
98
- if ( data ) {
99
- $.each( data, function ( id, text ) {
100
- terms.push( { id: id, text: text } );
101
- } );
102
- }
103
- return {
104
- results: terms
105
- };
106
- },
107
- cache : true
108
- }
109
- };
110
-
111
- $( this ).select2( select2_args ).addClass( 'enhanced' );
112
-
113
- if ( $( this ).data( 'sortable' ) ) {
114
- var $select = $( this );
115
- var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
116
-
117
- $list.sortable( {
118
- placeholder : 'ui-state-highlight select2-selection__choice',
119
- forcePlaceholderSize: true,
120
- items : 'li:not(.select2-search__field)',
121
- tolerance : 'pointer',
122
- stop : function () {
123
- $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
124
- var id = $( this ).data( 'data' ).id;
125
- var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
126
- $select.prepend( option );
127
- } );
128
- }
129
- } );
130
- }
131
- } );
132
-
133
- // TERM SEARCH
134
- $( '.yith-term-search' ).filter( ':not(.enhanced)' ).each( function () {
135
- var default_data = {
136
- action : 'yith_plugin_fw_json_search_terms',
137
- security: yith_framework_enhanced_select_params.search_terms_nonce,
138
- taxonomy: 'category'
139
- },
140
- current_data = $.extend( default_data, $( this ).data() ),
141
- select2_args = {
142
- allowClear : $( this ).data( 'allow_clear' ) ? true : false,
143
- placeholder : $( this ).data( 'placeholder' ),
144
- minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
145
- escapeMarkup : function ( m ) {
146
- return m;
147
- },
148
- ajax : {
149
- url : ajaxurl,
150
- dataType : 'json',
151
- quietMillis : 250,
152
- data : function ( params ) {
153
- var default_data_to_return = {
154
- term: params.term
155
- };
156
-
157
- return $.extend( default_data_to_return, current_data );
158
- },
159
- processResults: function ( data ) {
160
- var terms = [];
161
- if ( data ) {
162
- $.each( data, function ( id, text ) {
163
- terms.push( { id: id, text: text } );
164
- } );
165
- }
166
- return {
167
- results: terms
168
- };
169
- },
170
- cache : true
171
- }
172
- };
173
-
174
- $( this ).select2( select2_args ).addClass( 'enhanced' );
175
-
176
- if ( $( this ).data( 'sortable' ) ) {
177
- var $select = $( this );
178
- var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
179
-
180
- $list.sortable( {
181
- placeholder : 'ui-state-highlight select2-selection__choice',
182
- forcePlaceholderSize: true,
183
- items : 'li:not(.select2-search__field)',
184
- tolerance : 'pointer',
185
- stop : function () {
186
- $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
187
- var id = $( this ).data( 'data' ).id;
188
- var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
189
- $select.prepend( option );
190
- } );
191
- }
192
- } );
193
- }
194
- } );
195
-
196
- } ).trigger( 'yith-framework-enhanced-select-init' );
197
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  } );
1
+ /* global yith_framework_enhanced_select_params, ajaxurl */
2
 
3
  jQuery( function ( $ ) {
4
+ "use strict";
5
+
6
+ var getEnhancedSelectLanguage = function () {
7
+ return {
8
+ inputTooShort: function ( args ) {
9
+ var remainingChars = args.minimum - args.input.length;
10
+
11
+ if ( 1 === remainingChars ) {
12
+ return yith_framework_enhanced_select_params.i18n.input_too_short_1;
13
+ }
14
+
15
+ return yith_framework_enhanced_select_params.i18n.input_too_short_n.replace( '%s', remainingChars );
16
+ },
17
+ errorLoading : function () {
18
+ return yith_framework_enhanced_select_params.i18n.searching;
19
+ },
20
+ loadingMore : function () {
21
+ return yith_framework_enhanced_select_params.i18n.load_more;
22
+ },
23
+ noResults : function () {
24
+ return yith_framework_enhanced_select_params.i18n.no_matches;
25
+ },
26
+ searching : function () {
27
+ return yith_framework_enhanced_select_params.i18n.searching;
28
+ }
29
+ };
30
+ };
31
+
32
+ $( document.body )
33
+ .on( 'yith-framework-enhanced-select-init', function () {
34
+ // Post Search
35
+ $( '.yith-post-search' ).filter( ':not(.enhanced)' ).each( function () {
36
+ var default_data = {
37
+ action : 'yith_plugin_fw_json_search_posts',
38
+ security : yith_framework_enhanced_select_params.search_posts_nonce,
39
+ post_type: 'post'
40
+ },
41
+ current_data = $.extend( default_data, $( this ).data() ),
42
+ select2_args = {
43
+ allowClear : $( this ).data( 'allow_clear' ) ? true : false,
44
+ placeholder : $( this ).data( 'placeholder' ),
45
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
46
+ language : getEnhancedSelectLanguage(),
47
+ escapeMarkup : function ( m ) {
48
+ return m;
49
+ },
50
+ ajax : {
51
+ url : ajaxurl,
52
+ dataType : 'json',
53
+ quietMillis : 250,
54
+ data : function ( params ) {
55
+ var default_data_to_return = {
56
+ term: params.term
57
+ };
58
+
59
+ return $.extend( default_data_to_return, current_data );
60
+ },
61
+ processResults: function ( data ) {
62
+ var terms = [];
63
+ if ( data ) {
64
+ $.each( data, function ( id, text ) {
65
+ terms.push( { id: id, text: text } );
66
+ } );
67
+ }
68
+ return {
69
+ results: terms
70
+ };
71
+ },
72
+ cache : true
73
+ }
74
+ };
75
+
76
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
77
+
78
+ if ( $( this ).data( 'sortable' ) ) {
79
+ var $select = $( this );
80
+ var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
81
+
82
+ $list.sortable( {
83
+ placeholder : 'ui-state-highlight select2-selection__choice',
84
+ forcePlaceholderSize: true,
85
+ items : 'li:not(.select2-search__field)',
86
+ tolerance : 'pointer',
87
+ stop : function () {
88
+ $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
89
+ var id = $( this ).data( 'data' ).id;
90
+ var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
91
+ $select.prepend( option );
92
+ } );
93
+ }
94
+ } );
95
+ }
96
+ } );
97
+
98
+ // Customer Search
99
+ $( '.yith-customer-search' ).filter( ':not(.enhanced)' ).each( function () {
100
+ var default_data = {
101
+ action : 'woocommerce_json_search_customers',
102
+ security: yith_framework_enhanced_select_params.search_customers_nonce
103
+ },
104
+ current_data = $.extend( default_data, $( this ).data() ),
105
+ select2_args = {
106
+ allowClear : $( this ).data( 'allow_clear' ) ? true : false,
107
+ placeholder : $( this ).data( 'placeholder' ),
108
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
109
+ language : getEnhancedSelectLanguage(),
110
+ escapeMarkup : function ( m ) {
111
+ return m;
112
+ },
113
+ ajax : {
114
+ url : ajaxurl,
115
+ dataType : 'json',
116
+ quietMillis : 250,
117
+ data : function ( params ) {
118
+ var default_data_to_return = {
119
+ term: params.term
120
+ };
121
+
122
+ return $.extend( default_data_to_return, current_data );
123
+ },
124
+ processResults: function ( data ) {
125
+ var terms = [];
126
+ if ( data ) {
127
+ $.each( data, function ( id, text ) {
128
+ terms.push( { id: id, text: text } );
129
+ } );
130
+ }
131
+ return {
132
+ results: terms
133
+ };
134
+ },
135
+ cache : true
136
+ }
137
+ };
138
+
139
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
140
+
141
+ if ( $( this ).data( 'sortable' ) ) {
142
+ var $select = $( this );
143
+ var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
144
+
145
+ $list.sortable( {
146
+ placeholder : 'ui-state-highlight select2-selection__choice',
147
+ forcePlaceholderSize: true,
148
+ items : 'li:not(.select2-search__field)',
149
+ tolerance : 'pointer',
150
+ stop : function () {
151
+ $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
152
+ var id = $( this ).data( 'data' ).id;
153
+ var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
154
+ $select.prepend( option );
155
+ } );
156
+ }
157
+ } );
158
+ }
159
+ } );
160
+
161
+ // TERM SEARCH
162
+ $( '.yith-term-search' ).filter( ':not(.enhanced)' ).each( function () {
163
+ var default_data = {
164
+ action : 'yith_plugin_fw_json_search_terms',
165
+ security: yith_framework_enhanced_select_params.search_terms_nonce,
166
+ taxonomy: 'category'
167
+ },
168
+ current_data = $.extend( default_data, $( this ).data() ),
169
+ select2_args = {
170
+ allowClear : $( this ).data( 'allow_clear' ) ? true : false,
171
+ placeholder : $( this ).data( 'placeholder' ),
172
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
173
+ language : getEnhancedSelectLanguage(),
174
+ escapeMarkup : function ( m ) {
175
+ return m;
176
+ },
177
+ ajax : {
178
+ url : ajaxurl,
179
+ dataType : 'json',
180
+ quietMillis : 250,
181
+ data : function ( params ) {
182
+ var default_data_to_return = {
183
+ term: params.term
184
+ };
185
+
186
+ return $.extend( default_data_to_return, current_data );
187
+ },
188
+ processResults: function ( data ) {
189
+ var terms = [];
190
+ if ( data ) {
191
+ $.each( data, function ( id, text ) {
192
+ terms.push( { id: id, text: text } );
193
+ } );
194
+ }
195
+ return {
196
+ results: terms
197
+ };
198
+ },
199
+ cache : true
200
+ }
201
+ };
202
+
203
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
204
+
205
+ if ( $( this ).data( 'sortable' ) ) {
206
+ var $select = $( this );
207
+ var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
208
+
209
+ $list.sortable( {
210
+ placeholder : 'ui-state-highlight select2-selection__choice',
211
+ forcePlaceholderSize: true,
212
+ items : 'li:not(.select2-search__field)',
213
+ tolerance : 'pointer',
214
+ stop : function () {
215
+ $( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function () {
216
+ var id = $( this ).data( 'data' ).id;
217
+ var option = $select.find( 'option[value="' + id + '"]' )[ 0 ];
218
+ $select.prepend( option );
219
+ } );
220
+ }
221
+ } );
222
+ }
223
+ } );
224
+
225
+ } ).trigger( 'yith-framework-enhanced-select-init' );
226
+
227
  } );
plugin-fw/includes/class-yit-assets.php CHANGED
@@ -116,6 +116,13 @@ if ( ! class_exists( 'YIT_Assets' ) ) {
116
  'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
117
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
118
  'search_pages_nonce' => wp_create_nonce( 'search-pages' ),
 
 
 
 
 
 
 
119
  )
120
  );
121
 
116
  'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
117
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
118
  'search_pages_nonce' => wp_create_nonce( 'search-pages' ),
119
+ 'i18n' => array(
120
+ 'no_matches' => _x( 'No matches found', 'Enhanced select', 'yith-plugin-fw' ),
121
+ 'input_too_short_1' => _x( 'Please enter 1 or more characters', 'Enhanced select', 'yith-plugin-fw' ),
122
+ // translators: %s is the number of characters.
123
+ 'input_too_short_n' => _x( 'Please enter %s or more characters', 'Enhanced select', 'yith-plugin-fw' ),
124
+ 'searching' => _x( 'Searching&hellip;', 'Enhanced select', 'yith-plugin-fw' ),
125
+ ),
126
  )
127
  );
128
 
plugin-fw/templates/components/list-items.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
- /**
3
- * Template for displaying the list-items component
4
- *
5
- * @var array $component The component.
6
- * @package YITH\PluginFramework\Templates\Components
7
- */
8
-
9
- defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
-
11
- list ( $component_id, $class, $the_title, $attributes, $data, $items, $variant ) = yith_plugin_fw_extract( $component, 'id', 'class', 'title', 'attributes', 'data', 'items', 'variant' );
12
-
13
- $variant = sanitize_key( $variant ?? 'list' );
14
- $classes = array(
15
- 'yith-plugin-fw__list-items',
16
- "yith-plugin-fw__list-items--{$variant}",
17
- $class,
18
- );
19
- $classes = implode( ' ', $classes );
20
- $current_locale = substr( get_user_locale(), 0, 2 );
21
- $loop = 1;
22
- ?>
23
- <ul
24
- id="<?php echo esc_attr( $component_id ); ?>"
25
- class="<?php echo esc_attr( $classes ); ?>"
26
- <?php echo yith_plugin_fw_html_attributes_to_string( $attributes ); ?>
27
- <?php echo yith_plugin_fw_html_data_to_string( $data ); ?>
28
- >
29
-
30
- <?php foreach ( $items as $item ) : ?>
31
- <?php
32
- $item_url = $item['url'] ?? '';
33
- $item_title = $item['title'] ?? '';
34
- $item_description = $item['description'] ?? '';
35
- $item_cta = $item['cta'] ?? '';
36
- $item_classes = array( 'yith-plugin-fw__list-item' );
37
-
38
- if ( is_array( $item_url ) ) {
39
- $item_url = $item_url[ $current_locale ] ?? $item_url['en'] ?? current( $item_url );
40
- }
41
-
42
- if ( ! $item_url ) {
43
- $item_classes[] = 'yith-plugin-fw__list-item--no-link';
44
- }
45
-
46
- $item_classes = implode( ' ', $item_classes );
47
- ?>
48
- <li class="<?php echo esc_attr( $item_classes ); ?>">
49
- <a
50
- class="yith-plugin-fw__list-item__wrap"
51
- target="_blank"
52
- <?php if ( $item_url ) : ?>
53
- href="<?php echo esc_url( $item_url ); ?>"
54
- <?php endif; ?>
55
- >
56
- <?php if ( 'steps' === $variant ) : ?>
57
- <div class="yith-plugin-fw__list-item__step">
58
- <?php echo esc_html( $loop ); ?>
59
- </div>
60
- <?php endif; ?>
61
- <div class="yith-plugin-fw__list-item__content">
62
- <div class="yith-plugin-fw__list-item__title">
63
- <?php echo wp_kses_post( $item_title ); ?>
64
- </div>
65
- <div class="yith-plugin-fw__list-item__description">
66
- <?php echo wp_kses_post( $item_description ); ?>
67
- </div>
68
- <?php if ( $item_cta ) : ?>
69
- <div class="yith-plugin-fw__list-item__cta">
70
- <?php echo esc_html( $item_cta ); ?>
71
- </div>
72
- <?php endif; ?>
73
- </div>
74
-
75
- <?php if ( $item_url && ! $item_cta ) : ?>
76
- <i class="yith-plugin-fw__list-item__arrow yith-icon yith-icon-arrow-right-alt"></i>
77
- <?php endif; ?>
78
- </a>
79
- </li>
80
-
81
- <?php $loop ++; ?>
82
- <?php endforeach; ?>
83
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/templates/panel/welcome-modals/update.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
- /**
3
- * "Update" modal view.
4
- *
5
- * @var array $plugin The plugin info.
6
- * @var array $modal The modal info.
7
- * @var string $close_url The URL for closing the modal.
8
- *
9
- * @package YITH\PluginFramework
10
- */
11
-
12
- defined( 'ABSPATH' ) || exit;
13
-
14
- $classes = array(
15
- 'yith-plugin-fw-welcome',
16
- 'yith-plugin-fw-welcome--update',
17
- );
18
- $classes = implode( ' ', $classes );
19
-
20
- $description = $modal['description'] ?? '';
21
- $items = $modal['items'] ?? array();
22
-
23
- ?>
24
- <div class="<?php echo esc_attr( $classes ); ?>">
25
- <div class="yith-plugin-fw-welcome__head">
26
- <?php if ( $plugin['icon'] ) : ?>
27
- <img class="yith-plugin-fw-welcome__icon" src="<?php echo esc_url( $plugin['icon'] ); ?>"/>
28
- <?php endif; ?>
29
- <div class="yith-plugin-fw-welcome__title">
30
- <div class="yith-plugin-fw-welcome__title__plugin-name"><?php echo esc_html( $plugin['name'] ); ?></div>
31
- <div>
32
- <?php
33
- // translators: %s is the plugin version.
34
- echo esc_html( sprintf( __( 'is successfully updated to version %s.', 'yith-plugin-fw' ), $plugin['version'] ) );
35
- ?>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <div class="yith-plugin-fw-welcome__list-head">
41
- <div class="yith-plugin-fw-welcome__list-head__title">
42
- <?php
43
- // translators: %s is the plugin version.
44
- echo esc_html( sprintf( __( 'What\'s new in version %s', 'yith-plugin-fw' ), $modal['since'] ?? $plugin['version'] ) );
45
- ?>
46
- </div>
47
- <?php if ( isset( $modal['changelog_url'] ) ) : ?>
48
- <a class="yith-plugin-fw-welcome__list-head__changelog" target="_blank" href="<?php echo esc_url( $modal['changelog_url'] ); ?>">
49
- <?php esc_html_e( 'Check the changelog >', 'yith-plugin-fw' ); ?>
50
- </a>
51
- <?php endif; ?>
52
- </div>
53
- <?php
54
- yith_plugin_fw_get_component(
55
- array(
56
- 'type' => 'list-items',
57
- 'variant' => 'list',
58
- 'items' => $items,
59
- )
60
- );
61
- ?>
62
-
63
- <div class="yith-plugin-fw-welcome__footer">
64
- <a class="yith-plugin-fw-welcome__close" href="<?php echo esc_url( $close_url ); ?>"><?php esc_html_e( 'Got it, close this window', 'yith-plugin-fw' ); ?></a>
65
- </div>
66
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/templates/panel/welcome-modals/welcome.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- /**
3
- * "Welcome" modal view.
4
- *
5
- * @var array $plugin The plugin info.
6
- * @var array $modal The modal info.
7
- * @var string $close_url The URL for closing the modal.
8
- *
9
- * @package YITH\PluginFramework
10
- */
11
-
12
- defined( 'ABSPATH' ) || exit;
13
-
14
- $classes = array(
15
- 'yith-plugin-fw-welcome',
16
- 'yith-plugin-fw-welcome--welcome',
17
- );
18
- $classes = implode( ' ', $classes );
19
-
20
- $description = $modal['description'] ?? '';
21
- $items = $modal['items'] ?? array();
22
- ?>
23
- <div class="<?php echo esc_attr( $classes ); ?>">
24
- <div class="yith-plugin-fw-welcome__head">
25
- <?php if ( $plugin['icon'] ) : ?>
26
- <img class="yith-plugin-fw-welcome__icon" src="<?php echo esc_url( $plugin['icon'] ); ?>"/>
27
- <?php endif; ?>
28
-
29
- <div class="yith-plugin-fw-welcome__title">
30
- <div><?php esc_html_e( 'Thank you for using our plugin', 'yith-plugin-fw' ); ?></div>
31
- <div class="yith-plugin-fw-welcome__title__plugin-name"><?php echo esc_html( $plugin['name'] ); ?></div>
32
- </div>
33
-
34
- <?php if ( $description ) : ?>
35
- <div class="yith-plugin-fw-welcome__description">
36
- <?php echo wp_kses_post( $description ); ?>
37
- </div>
38
- <?php endif; ?>
39
- </div>
40
-
41
- <div class="yith-plugin-fw-welcome__list-head">
42
- <div class="yith-plugin-fw-welcome__list-head__title">
43
- <?php
44
- // translators: %s is the number of steps.
45
- echo esc_html( sprintf( __( 'Start with these %s steps:', 'yith-plugin-fw' ), count( $items ) ) );
46
- ?>
47
- </div>
48
- </div>
49
- <?php
50
- yith_plugin_fw_get_component(
51
- array(
52
- 'type' => 'list-items',
53
- 'variant' => 'steps',
54
- 'items' => $items,
55
- )
56
- );
57
- ?>
58
-
59
- <div class="yith-plugin-fw-welcome__footer">
60
- <a class="yith-plugin-fw-welcome__close" href="<?php echo esc_url( $close_url ); ?>"><?php esc_html_e( 'Got it, close this window', 'yith-plugin-fw' ); ?></a>
61
- </div>
62
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 5.9
6
  Tested up to: 6.1
7
- Stable tag: 4.16.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -152,6 +152,14 @@ If none of the previous listed actions helps you solve the problem, then, submit
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
 
 
 
155
  = 4.16.0 - Released on 14 November 2022 =
156
 
157
  * New: support for WooCommerce 7.1
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 5.9
6
  Tested up to: 6.1
7
+ Stable tag: 4.17.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 4.17.0 - Released on 13 December 2022 =
156
+
157
+ * New: support for WooCommerce 7.2
158
+ * Update: plugin FW
159
+ * Fix: sass deprecated
160
+ * Dev: added yith_wcan_toggle_element trigger
161
+ * Dev: added yith_wcan_before_toggle_element trigger
162
+
163
  = 4.16.0 - Released on 14 November 2022 =
164
 
165
  * New: support for WooCommerce 7.1