Blocksy Companion - Version 1.7.38

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.7.38
Comparing to
See all releases

Code changes from version 1.7.37 to 1.7.38

Files changed (41) hide show
  1. blocksy-companion.php +1 -1
  2. framework/cache-reset-manager.php +7 -0
  3. framework/extensions/cookies-consent/static/bundle/main.css +1 -1
  4. framework/extensions/mailchimp/admin-static/bundle/sync.js +1 -1
  5. framework/extensions/mailchimp/admin-static/js/sync.js +10 -7
  6. framework/extensions/mailchimp/extension.php +1 -1
  7. framework/extensions/mailchimp/static/bundle/main.css +1 -1
  8. framework/extensions/widgets/static/bundle/main.css +1 -1
  9. framework/extensions/woocommerce-extra/config.php +0 -7
  10. framework/extensions/woocommerce-extra/customizer.php +0 -45
  11. framework/extensions/woocommerce-extra/extension.php +0 -100
  12. framework/extensions/woocommerce-extra/floating-cart.php +0 -92
  13. framework/extensions/woocommerce-extra/global.php +0 -70
  14. framework/extensions/woocommerce-extra/helpers.php +0 -281
  15. framework/extensions/woocommerce-extra/readme.php +0 -37
  16. framework/extensions/woocommerce-extra/static/bundle/main.css +0 -8
  17. framework/extensions/woocommerce-extra/static/bundle/main.js +0 -1
  18. framework/extensions/woocommerce-extra/static/bundle/sync.js +0 -1
  19. framework/extensions/woocommerce-extra/static/js/floating-cart.js +0 -94
  20. framework/extensions/woocommerce-extra/static/js/helpers.js +0 -15
  21. framework/extensions/woocommerce-extra/static/js/main.js +0 -217
  22. framework/extensions/woocommerce-extra/static/js/sync.js +0 -19
  23. framework/extensions/woocommerce-extra/static/js/variables.js +0 -28
  24. framework/extensions/woocommerce-extra/static/sass/floating-bar/main.scss +0 -156
  25. framework/extensions/woocommerce-extra/static/sass/main.scss +0 -3
  26. framework/extensions/woocommerce-extra/static/sass/quick-view/main.scss +0 -8
  27. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-button.scss +0 -44
  28. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-card.scss +0 -39
  29. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-gallery.scss +0 -32
  30. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-loader.scss +0 -10
  31. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-modal.scss +0 -23
  32. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-summary.scss +0 -63
  33. framework/features/demo-install/wp-importer.php +3 -2
  34. freemius/includes/class-fs-logger.php +1 -1
  35. readme.txt +9 -1
  36. static/bundle/dashboard.css +1 -1
  37. static/bundle/main.js +1 -1
  38. static/bundle/options.css +1 -1
  39. static/bundle/options.js +1 -1
  40. static/js/frontend/sticky.js +7 -8
  41. static/js/options/ConditionsManager.js +5 -0
blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.7.37
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.7.38
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/cache-reset-manager.php CHANGED
@@ -4,6 +4,13 @@ namespace Blocksy;
4
 
5
  class CacheResetManager {
6
  public function __construct() {
 
 
 
 
 
 
 
7
  add_action(
8
  'upgrader_process_complete',
9
  [$this, 'handle_update'],
4
 
5
  class CacheResetManager {
6
  public function __construct() {
7
+ add_action(
8
+ 'blocksy:cache-manager:purge-all',
9
+ function () {
10
+ $this->run_cache_purge();
11
+ }
12
+ );
13
+
14
  add_action(
15
  'upgrader_process_complete',
16
  [$this, 'handle_update'],
framework/extensions/cookies-consent/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/mailchimp/admin-static/bundle/sync.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t);var u,p=function(){var e=document.createElement("div");return e.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(t||(t=p()),t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]'))){var r=t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},should_insert:!0},e);var t=document.querySelector(e.parent_selector);if(o(document.querySelectorAll("".concat(e.parent_selector," ").concat(e.selector))).map((function(e){return e.parentNode.removeChild(e)})),e.should_insert){var n=m(e.fragment_id);if(n){for(;n.firstElementChild;)if(e.beforeInsert(n.firstElementChild),"append"===e.strategy&&t.appendChild(n.firstElementChild),"firstChild"===e.strategy&&t.insertBefore(n.firstElementChild,t.firstElementChild),e.strategy.indexOf("maybeBefore")>-1){var i=e.strategy.split(":"),c=r(i,2),a=(c[0],c[1]);t.querySelector(a)?t.insertBefore(n.firstElementChild,t.querySelector(a)):t.appendChild(n.firstElementChild)}e.whenInserted()}}},f=function(e,t){if(t.classList.remove("ct-hidden-sm","ct-hidden-md","ct-hidden-lg"),wp.customize(e)){var n=wp.customize(e)()||{mobile:!1,tablet:!0,desktop:!0};n.mobile||t.classList.add("ct-hidden-sm"),n.tablet||t.classList.add("ct-hidden-md"),n.desktop||t.classList.add("ct-hidden-lg")}},b=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},h=function(e,t){var n=t.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(e["".concat(n,"_selector_prefix")]?"".concat(e["".concat(n,"_selector_prefix")]," "):"").concat(e.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(r=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(r=b(t)),"box-shadow"===(e.type||"")&&(r=h(t,e)),y(e,"".concat(r).concat(e.unit||"").concat(e.important?" !important":""),n)},g=function(e,t){var n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),v(e,t.desktop,"desktop"),v(e,t.tablet,"tablet"),v(e,t.mobile,"mobile")):v(e,t)};u={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return u[e.id]&&(Array.isArray(u[e.id])?u[e.id]:[u[e.id]]).map((function(t){return g(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},watch:[]},e);var t=function(){var t=wp.customize(e.id)();d(l(l({},e),{},{should_insert:"yes"===t}))};wp.customize(e.id,(function(e){return e.bind((function(e){return t()}))})),e.watch.map((function(e){return wp.customize(e,(function(e){return e.bind((function(){return t()}))}))}))}({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".content-area article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?e.querySelector('[name="FNAME"]').remove():e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")())),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h4").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t);var u,p=function(){var e=document.createElement("div");return e.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(t||(t=p()),t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]'))){var r=t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},should_insert:!0},e);var t=document.querySelector(e.parent_selector);if(o(document.querySelectorAll("".concat(e.parent_selector," ").concat(e.selector))).map((function(e){return e.parentNode.removeChild(e)})),e.should_insert){var n=m(e.fragment_id);if(n){for(;n.firstElementChild;)if(e.beforeInsert(n.firstElementChild),"append"===e.strategy&&t.appendChild(n.firstElementChild),"firstChild"===e.strategy&&t.insertBefore(n.firstElementChild,t.firstElementChild),e.strategy.indexOf("maybeBefore")>-1){var i=e.strategy.split(":"),c=r(i,2),a=(c[0],c[1]);t.querySelector(a)?t.insertBefore(n.firstElementChild,t.querySelector(a)):t.appendChild(n.firstElementChild)}e.whenInserted()}}},f=function(e,t){if(t.classList.remove("ct-hidden-sm","ct-hidden-md","ct-hidden-lg"),wp.customize(e)){var n=wp.customize(e)()||{mobile:!1,tablet:!0,desktop:!0};n.mobile||t.classList.add("ct-hidden-sm"),n.tablet||t.classList.add("ct-hidden-md"),n.desktop||t.classList.add("ct-hidden-lg")}},b=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},h=function(e,t){var n=t.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(e["".concat(n,"_selector_prefix")]?"".concat(e["".concat(n,"_selector_prefix")]," "):"").concat(e.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(r=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(r=b(t)),"box-shadow"===(e.type||"")&&(r=h(t,e)),y(e,"".concat(r).concat(e.unit||"").concat(e.important?" !important":""),n)},g=function(e,t){var n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),v(e,t.desktop,"desktop"),v(e,t.tablet,"tablet"),v(e,t.mobile,"mobile")):v(e,t)};u={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return u[e.id]&&(Array.isArray(u[e.id])?u[e.id]:[u[e.id]]).map((function(t){return g(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},watch:[]},e);var t=function(){var t=wp.customize(e.id)();d(l(l({},e),{},{should_insert:"yes"===t}))};wp.customize(e.id,(function(e){return e.bind((function(e){return t()}))})),e.watch.map((function(e){return wp.customize(e,(function(e){return e.bind((function(){return t()}))}))}))}({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".site-main article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?(e.querySelector("[data-fields]").dataset.fields=1,e.querySelector('[name="FNAME"]').remove()):(e.querySelector("[data-fields]").dataset.fields=2,e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")()))),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h3").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
framework/extensions/mailchimp/admin-static/js/sync.js CHANGED
@@ -1,12 +1,12 @@
1
  import {
2
  checkAndReplace,
3
- responsiveClassesFor
4
  } from '../../../cookies-consent/static/js/sync/helpers'
5
 
6
  import './variables'
7
 
8
- wp.customize('mailchimp_subscribe_visibility', val =>
9
- val.bind(to => {
10
  const block = document.querySelector('.ct-mailchimp-block')
11
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
12
  })
@@ -20,7 +20,7 @@ if (
20
  id: 'mailchimp_single_post_enabled',
21
  strategy: 'append',
22
 
23
- parent_selector: '.content-area article',
24
  selector: '.ct-mailchimp-block',
25
  fragment_id: 'blocksy-mailchimp-subscribe',
26
 
@@ -30,7 +30,7 @@ if (
30
  'mailchimp_title',
31
  'mailchimp_text',
32
  'mailchimp_name_label',
33
- 'mailchimp_mail_label'
34
  ],
35
 
36
  whenInserted: () => {
@@ -45,8 +45,11 @@ if (
45
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
46
 
47
  if (wp.customize('has_mailchimp_name')() !== 'yes') {
 
48
  block.querySelector('[name="FNAME"]').remove()
49
  } else {
 
 
50
  block
51
  .querySelector('[name="FNAME"]')
52
  .setAttribute(
@@ -66,13 +69,13 @@ if (
66
  'mailchimp_button_text'
67
  )()
68
 
69
- block.querySelector('h4').innerHTML = wp.customize(
70
  'mailchimp_title'
71
  )()
72
 
73
  block.querySelector(
74
  '.ct-mailchimp-description'
75
  ).innerHTML = wp.customize('mailchimp_text')()
76
- }
77
  })
78
  }
1
  import {
2
  checkAndReplace,
3
+ responsiveClassesFor,
4
  } from '../../../cookies-consent/static/js/sync/helpers'
5
 
6
  import './variables'
7
 
8
+ wp.customize('mailchimp_subscribe_visibility', (val) =>
9
+ val.bind((to) => {
10
  const block = document.querySelector('.ct-mailchimp-block')
11
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
12
  })
20
  id: 'mailchimp_single_post_enabled',
21
  strategy: 'append',
22
 
23
+ parent_selector: '.site-main article',
24
  selector: '.ct-mailchimp-block',
25
  fragment_id: 'blocksy-mailchimp-subscribe',
26
 
30
  'mailchimp_title',
31
  'mailchimp_text',
32
  'mailchimp_name_label',
33
+ 'mailchimp_mail_label',
34
  ],
35
 
36
  whenInserted: () => {
45
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
46
 
47
  if (wp.customize('has_mailchimp_name')() !== 'yes') {
48
+ block.querySelector('[data-fields]').dataset.fields = 1
49
  block.querySelector('[name="FNAME"]').remove()
50
  } else {
51
+ block.querySelector('[data-fields]').dataset.fields = 2
52
+
53
  block
54
  .querySelector('[name="FNAME"]')
55
  .setAttribute(
69
  'mailchimp_button_text'
70
  )()
71
 
72
+ block.querySelector('h3').innerHTML = wp.customize(
73
  'mailchimp_title'
74
  )()
75
 
76
  block.querySelector(
77
  '.ct-mailchimp-description'
78
  ).innerHTML = wp.customize('mailchimp_text')()
79
+ },
80
  })
81
  }
framework/extensions/mailchimp/extension.php CHANGED
@@ -121,7 +121,7 @@ class BlocksyExtensionMailchimp {
121
  }, 5);
122
 
123
  add_action(
124
- 'customize_controls_enqueue_scripts',
125
  function () {
126
  if (! function_exists('get_plugin_data')) {
127
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
121
  }, 5);
122
 
123
  add_action(
124
+ 'customize_preview_init',
125
  function () {
126
  if (! function_exists('get_plugin_data')) {
127
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
framework/extensions/mailchimp/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/woocommerce-extra/config.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- $config = [
4
- 'name' => __('WooCommerce Extra', 'blc'),
5
- 'description' => __('WooCommerce extra functionality.', 'blc')
6
- ];
7
-
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/customizer.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- $options = [
4
- 'woocommerce_quickview_enabled' => [
5
- 'label' => __( 'Quick View', 'blc' ),
6
- 'type' => 'ct-switch',
7
- 'switch' => true,
8
- 'value' => 'yes',
9
- 'setting' => [ 'transport' => 'postMessage' ],
10
- 'sync' => blc_call_fn([
11
- 'fn' => 'blocksy_sync_whole_page',
12
- 'default' => []
13
- ], [
14
- 'loader_selector' => '#primary.content-area .ct-open-quick-view'
15
- ]),
16
- ],
17
-
18
- 'woocommerce_quick_view_trigger' => [
19
- 'label' => __( 'Trigger Modal On', 'blocksy' ),
20
- 'type' => 'ct-select',
21
- 'value' => 'button',
22
- 'view' => 'text',
23
- 'design' => 'inline',
24
- 'setting' => [ 'transport' => 'postMessage' ],
25
- 'choices' => blocksy_ordered_keys(
26
- [
27
- 'button' => __( 'Button click', 'blocksy' ),
28
- 'image' => __( 'Image click', 'blocksy' ),
29
- 'card' => __( 'Card click', 'blocksy' ),
30
- ]
31
- ),
32
-
33
- 'sync' => blc_call_fn([
34
- 'fn' => 'blocksy_sync_whole_page',
35
- 'default' => []
36
- ], [
37
- 'loader_selector' => '#primary.content-area .ct-open-quick-view'
38
- ]),
39
- ],
40
-
41
- blocksy_rand_md5() => [
42
- 'type' => 'ct-divider',
43
- ],
44
- ];
45
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/extension.php DELETED
@@ -1,100 +0,0 @@
1
- <?php
2
-
3
- require_once dirname( __FILE__ ) . '/helpers.php';
4
-
5
- class BlocksyExtensionWoocommerceExtra {
6
- public function __construct() {
7
- add_action('blocksy:global-dynamic-css:enqueue', function ($args) {
8
-
9
- blocksy_theme_get_dynamic_styles(array_merge([
10
- 'path' => dirname( __FILE__ ) . '/global.php',
11
- 'chunk' => 'woocommerce'
12
- ], $args));
13
-
14
- }, 10, 3);
15
-
16
- add_filter('blocksy-async-scripts-handles', function ($d) {
17
- $d[] = 'blocksy-ext-woocommerce-extra-scripts';
18
- return $d;
19
- });
20
-
21
- add_action('wp_enqueue_scripts', function () {
22
- if (! function_exists('get_plugin_data')){
23
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
- }
25
-
26
- $data = get_plugin_data(BLOCKSY__FILE__);
27
-
28
- if (is_admin()) return;
29
-
30
- wp_enqueue_style(
31
- 'blocksy-ext-woocommerce-extra-styles',
32
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/main.css',
33
- ['ct-main-styles'],
34
- $data['Version']
35
- );
36
-
37
- wp_enqueue_script(
38
- 'blocksy-ext-woocommerce-extra-scripts',
39
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/main.js',
40
- [
41
- 'wc-single-product',
42
- 'wc-add-to-cart-variation',
43
- 'flexslider',
44
- 'ct-scripts',
45
- // 'photoswipe-ui-default',
46
- // 'photoswipe-default-skin',
47
- // 'wc-single-product',
48
- // 'wc-product-gallery-lightbox'
49
- ],
50
- $data['Version'],
51
- true
52
- );
53
- });
54
-
55
- add_action(
56
- 'customize_preview_init',
57
- function () {
58
- if (! function_exists('get_plugin_data')){
59
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
60
- }
61
-
62
- $data = get_plugin_data(BLOCKSY__FILE__);
63
-
64
- wp_enqueue_script(
65
- 'blocksy-woocommerce-extra-customizer-sync',
66
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/sync.js',
67
- [ 'customize-preview', 'ct-scripts', 'ct-events' ],
68
- $data['Version'],
69
- true
70
- );
71
- }
72
- );
73
-
74
- add_filter(
75
- 'blocksy_woo_card_options_elements',
76
- function ($opts) {
77
- $opts[] = blc_call_fn(
78
- ['fn' => 'blocksy_get_options'],
79
- dirname( __FILE__ ) . '/customizer.php',
80
- [], false
81
- );
82
-
83
- return $opts;
84
- }
85
- );
86
-
87
- add_filter(
88
- 'blocksy_single_product_elements_end_customizer_options',
89
- function ($opts) {
90
- $opts['has_floating_bar'] = blc_call_fn(
91
- ['fn' => 'blocksy_get_options'],
92
- dirname( __FILE__ ) . '/floating-cart.php',
93
- [], false
94
- );
95
-
96
- return $opts;
97
- }
98
- );
99
- }
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/floating-cart.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- $options = [
4
- 'label' => __( 'Floating Cart', 'blocksy' ),
5
- 'type' => 'ct-panel',
6
- 'switch' => true,
7
- 'value' => 'yes',
8
- 'setting' => [ 'transport' => 'postMessage' ],
9
- 'inner-options' => [
10
-
11
- 'floatingBarFontColor' => [
12
- 'label' => __( 'Font Color', 'blocksy' ),
13
- 'type' => 'ct-color-picker',
14
- 'design' => 'inline',
15
- 'setting' => [ 'transport' => 'postMessage' ],
16
- 'value' => [
17
- 'default' => [
18
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
19
- ],
20
- ],
21
-
22
- 'pickers' => [
23
- [
24
- 'title' => __( 'Initial', 'blocksy' ),
25
- 'id' => 'default',
26
- 'inherit' => 'var(--color)'
27
- ],
28
- ],
29
- ],
30
-
31
- 'floatingBarBackground' => [
32
- 'label' => __( 'Background Color', 'blocksy' ),
33
- 'type' => 'ct-color-picker',
34
- 'design' => 'inline',
35
- 'setting' => [ 'transport' => 'postMessage' ],
36
- 'value' => [
37
- 'default' => [
38
- 'color' => '#ffffff',
39
- ],
40
- ],
41
-
42
- 'pickers' => [
43
- [
44
- 'title' => __( 'Initial', 'blocksy' ),
45
- 'id' => 'default',
46
- ],
47
- ],
48
- ],
49
-
50
- 'floatingBarShadow' => [
51
- 'label' => __( 'Shadow', 'blocksy' ),
52
- 'type' => 'ct-box-shadow',
53
- 'responsive' => true,
54
- 'divider' => 'top',
55
- 'value' => blc_call_fn(['fn' => 'blocksy_box_shadow_value'], [
56
- 'enable' => true,
57
- 'h_offset' => 0,
58
- 'v_offset' => 10,
59
- 'blur' => 20,
60
- 'spread' => 0,
61
- 'inset' => false,
62
- 'color' => [
63
- 'color' => 'rgba(44,62,80,0.15)',
64
- ],
65
- ]),
66
- 'setting' => [ 'transport' => 'postMessage' ],
67
- ],
68
-
69
- 'floatingBarVisibility' => [
70
- 'label' => __('Visibility', 'blocksy'),
71
- 'type' => 'ct-visibility',
72
- 'design' => 'block',
73
- 'divider' => 'top',
74
- 'setting' => ['transport' => 'postMessage'],
75
- 'allow_empty' => true,
76
-
77
- 'value' => [
78
- 'desktop' => true,
79
- 'tablet' => true,
80
- 'mobile' => false,
81
- ],
82
-
83
- 'choices' => blocksy_ordered_keys([
84
- 'desktop' => __( 'Desktop', 'blocksy' ),
85
- 'tablet' => __( 'Tablet', 'blocksy' ),
86
- 'mobile' => __( 'Mobile', 'blocksy' ),
87
- ]),
88
- ],
89
-
90
- ],
91
- ];
92
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/global.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- if (! function_exists('is_woocommerce')) {
4
- return;
5
- }
6
-
7
- // Floating bar
8
- blc_call_fn(['fn' => 'blocksy_output_colors'], [
9
- 'value' => get_theme_mod('floatingBarFontColor'),
10
- 'default' => [
11
- 'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
12
- ],
13
- 'css' => $css,
14
- 'variables' => [
15
- 'default' => [
16
- 'selector' => '.ct-floating-bar',
17
- 'variable' => 'color'
18
- ],
19
- ],
20
- ]);
21
-
22
- blc_call_fn(['fn' => 'blocksy_output_colors'], [
23
- 'value' => get_theme_mod('floatingBarBackground'),
24
- 'default' => [
25
- 'default' => [ 'color' => '#ffffff' ],
26
- ],
27
- 'css' => $css,
28
- 'variables' => [
29
- 'default' => [
30
- 'selector' => '.ct-floating-bar',
31
- 'variable' => 'backgroundColor'
32
- ],
33
- ],
34
- ]);
35
-
36
- blc_call_fn(['fn' => 'blocksy_output_box_shadow'], [
37
- 'css' => $css,
38
- 'tablet_css' => $tablet_css,
39
- 'mobile_css' => $mobile_css,
40
- 'selector' => '.ct-floating-bar',
41
- 'value' => get_theme_mod(
42
- 'floatingBarShadow',
43
- blc_call_fn(['fn' => 'blocksy_box_shadow_value'], [
44
- 'enable' => true,
45
- 'h_offset' => 0,
46
- 'v_offset' => 10,
47
- 'blur' => 20,
48
- 'spread' => 0,
49
- 'inset' => false,
50
- 'color' => [
51
- 'color' => 'rgba(44,62,80,0.15)',
52
- ],
53
- ])
54
- ),
55
- 'responsive' => true
56
- ]);
57
-
58
- blc_call_fn(['fn' => 'blocksy_output_responsive_switch'], [
59
- 'css' => $css,
60
- 'tablet_css' => $tablet_css,
61
- 'mobile_css' => $mobile_css,
62
- 'selector' => '.ct-floating-bar',
63
- 'on' => 'flex',
64
- 'off' => 'none',
65
- 'value' => get_theme_mod('floatingBarVisibility', [
66
- 'desktop' => true,
67
- 'tablet' => true,
68
- 'mobile' => false,
69
- ])
70
- ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/helpers.php DELETED
@@ -1,281 +0,0 @@
1
- <?php
2
-
3
- add_action('wp_ajax_blocsky_get_woo_quick_view', 'blocksy_get_woocommerce_quickview');
4
- add_action('wp_ajax_nopriv_blocsky_get_woo_quick_view', 'blocksy_get_woocommerce_quickview');
5
-
6
- function blocksy_get_woocommerce_quickview() {
7
- global $product;
8
- global $post;
9
-
10
- global $blocksy_is_quick_view;
11
-
12
- $blocksy_is_quick_view = true;
13
-
14
- $product = wc_get_product(sanitize_text_field( $_GET['product_id'] ));
15
-
16
- $GLOBALS['product'] = $product;
17
-
18
- $id = $product->get_id();
19
-
20
- $post = get_post($id);
21
-
22
- if (! $product) {
23
- wp_send_json_error();
24
- }
25
-
26
- $is_in_stock = true;
27
-
28
- if (! $product->managing_stock() && ! $product->is_in_stock()) {
29
- $is_in_stock = false;
30
- }
31
-
32
- $content = ob_start();
33
-
34
- remove_filter(
35
- 'woocommerce_post_class',
36
- 'blocksy_woo_single_post_class',
37
- 999,
38
- 2
39
- );
40
-
41
- ?>
42
-
43
- <div id="quick-view-<?php echo esc_attr($id) ?>" data-behaviour="modal" class="ct-panel quick-view-modal">
44
- <div class="content-container" data-align="middle">
45
- <div <?php wc_product_class('ct-container ct-quick-view-card single-product', $product->get_id()) ?>>
46
-
47
- <div class="close-button">
48
- <span class="ct-trigger closed"><span></span></span>
49
- </div>
50
-
51
- <section>
52
- <?php woocommerce_show_product_sale_flash() ?>
53
- <?php woocommerce_show_product_images() ?>
54
-
55
- <div class="entry-summary">
56
- <?php
57
- woocommerce_template_single_title();
58
- woocommerce_template_single_price();
59
- woocommerce_template_single_excerpt();
60
- woocommerce_template_single_add_to_cart();
61
- ?>
62
-
63
- <a href="<?php echo get_permalink($product->get_id()) ?>" class="ct-button ct-quick-more">
64
- <?php echo __('Go to product page', 'blc') ?>
65
- </a>
66
- </div>
67
- </section>
68
- </div>
69
- </div>
70
- </div>
71
-
72
- <?php
73
-
74
- wp_send_json_success([
75
- 'quickview' => ob_get_clean()
76
- ]);
77
- }
78
-
79
- function blocksy_quick_view_attr() {
80
- if (get_theme_mod('woocommerce_quickview_enabled', 'yes') !== 'yes') {
81
- return [];
82
- }
83
-
84
- if (get_theme_mod('woocommerce_quick_view_trigger', 'button') === 'button') {
85
- return [];
86
- }
87
-
88
- return [
89
- 'data-quick-view' => get_theme_mod('woocommerce_quick_view_trigger', 'button')
90
- ];
91
- }
92
-
93
- function blocksy_output_quick_view_link() {
94
- global $product;
95
-
96
- $id = $product->get_id();
97
-
98
- if (
99
- get_theme_mod('woocommerce_quickview_enabled', 'yes') === 'yes'
100
- &&
101
- get_theme_mod('woocommerce_quick_view_trigger', 'button') === 'button'
102
- ) {
103
- return '<a href="#quick-view-' . $id . '" class="ct-open-quick-view" aria-label="' . __('Quick view', 'blocksy') . '"><span hidden>' . __('Quick view', 'blocksy') . '</span><svg width="16" height="16" viewBox="0 0 40 40"><path d="M39.6,18.6C34.9,11.5,29.2,5,20,5C10.8,5,5.1,11.5,0.4,18.6c-0.6,0.8-0.6,1.9,0,2.8C5.1,28.5,10.8,35,20,35s14.9-6.5,19.6-13.6C40.1,20.5,40.1,19.5,39.6,18.6z M20,30.7c-5.7,0-10.1-3-15.5-10.7C9.9,12.3,14.3,9.3,20,9.3s10.1,3,15.5,10.7C30.1,27.7,25.7,30.7,20,30.7zM25,20c0,2.8-2.2,5-5,5s-5-2.2-5-5s2.2-5,5-5C22.8,15,25,17.2,25,20z"/></svg></a>';
104
- }
105
-
106
- return '';
107
- }
108
-
109
- function blc_output_woo_floating_cart_cache() {
110
- if (! is_customize_preview()) return;
111
-
112
- blocksy_add_customizer_preview_cache(
113
- blocksy_html_tag(
114
- 'div',
115
- [ 'data-id' => 'blocksy-woo-floating-cart' ],
116
- blocksy_woo_floating_cart(true)
117
- )
118
- );
119
- }
120
-
121
- function blocksy_woo_product_check_required_addons(
122
- $product_id, $check_for_required = true
123
- ) {
124
- if (! class_exists('WC_Product_Addons_Helper')) {
125
- return false;
126
- }
127
-
128
- // No parent add-ons, but yes to global.
129
- $addons = WC_Product_Addons_Helper::get_product_addons(
130
- $product_id,
131
- false,
132
- false,
133
- true
134
- );
135
-
136
- if ($addons && !empty($addons)) {
137
- foreach ($addons as $addon) {
138
- if (isset($addon['required']) && '1' == $addon['required']) {
139
- return true;
140
- }
141
- }
142
- }
143
-
144
- return false;
145
- }
146
-
147
- function blocksy_woo_product_addons_change_text($text, $product = null) {
148
- if (null === $product) {
149
- global $product;
150
- }
151
-
152
- if (! is_a($product, 'WC_Product')) {
153
- return $text;
154
- }
155
-
156
- return __('Select options', 'blc');
157
- }
158
-
159
- function blocksy_woo_floating_cart($forced = false) {
160
- if (! function_exists('is_woocommerce')) {
161
- return '';
162
- }
163
-
164
- global $product;
165
-
166
- if (! is_product()) {
167
- return '';
168
- }
169
-
170
- if (! $forced) {
171
- blc_output_woo_floating_cart_cache();
172
- }
173
-
174
- if (get_theme_mod('has_floating_bar', 'yes') !== 'yes') {
175
- if (! $forced) {
176
- return '';
177
- }
178
- }
179
-
180
- $image_output = blc_call_fn(['fn' => 'blocksy_image'], [
181
- 'attachment_id' => $product->get_image_id(),
182
- 'size' => 'woocommerce_gallery_thumbnail',
183
- 'ratio' => '1/1',
184
- 'lazyload' => false,
185
- 'tag_name' => 'div',
186
- ]);
187
-
188
- ob_start();
189
-
190
- ?>
191
- <div class="ct-floating-bar">
192
- <div class="ct-container">
193
- <section class="floating-bar-content">
194
- <?php echo $image_output ?>
195
- <div>
196
- <?php the_title( '<h6 class="product_title entry-title">', '</h6>' ); ?>
197
- <?php woocommerce_template_single_price(); ?>
198
- </div>
199
- </section>
200
-
201
- <section class="floating-bar-actions">
202
- <?php
203
- woocommerce_template_single_price();
204
-
205
- if (blocksy_woo_product_check_required_addons($product->get_id())) {
206
- add_filter('woocommerce_product_add_to_cart_text', 'blocksy_woo_product_addons_change_text', 15);
207
- woocommerce_template_loop_add_to_cart();
208
- remove_filter('woocommerce_product_add_to_cart_text', 'blocksy_woo_product_addons_change_text', 15);
209
- } else {
210
- if ($product->is_type('simple')) {
211
- global $wp_filter;
212
-
213
- if (isset($wp_filter['woocommerce_before_add_to_cart_quantity'])) {
214
- $old_before = $wp_filter['woocommerce_before_add_to_cart_quantity'];
215
- }
216
-
217
- if (isset($wp_filter['woocommerce_after_add_to_cart_quantity'])) {
218
- $old = $wp_filter['woocommerce_after_add_to_cart_quantity'];
219
- }
220
-
221
- if (isset($wp_filter['woocommerce_before_add_to_cart_button'])) {
222
- $old_button = $wp_filter['woocommerce_before_add_to_cart_button'];
223
- }
224
- if (isset($wp_filter['woocommerce_before_add_to_cart_form'])) {
225
- $old_before_form = $wp_filter['woocommerce_before_add_to_cart_form'];
226
- }
227
-
228
- if (isset($wp_filter['woocommerce_after_add_to_cart_form'])) {
229
- $old_after_form = $wp_filter['woocommerce_after_add_to_cart_form'];
230
- }
231
-
232
- if (isset($wp_filter['woocommerce_after_add_to_cart_button'])) {
233
- $old_after_button = $wp_filter['woocommerce_after_add_to_cart_button'];
234
- }
235
-
236
- unset($wp_filter['woocommerce_before_add_to_cart_quantity']);
237
- unset($wp_filter['woocommerce_after_add_to_cart_quantity']);
238
- unset($wp_filter['woocommerce_before_add_to_cart_button']);
239
- unset($wp_filter['woocommerce_before_add_to_cart_form']);
240
- unset($wp_filter['woocommerce_after_add_to_cart_form']);
241
- unset($wp_filter['woocommerce_after_add_to_cart_button']);
242
-
243
- woocommerce_simple_add_to_cart();
244
-
245
- if (isset($old_before)) {
246
- $wp_filter['woocommerce_before_add_to_cart_quantity'] = $old_before;
247
- }
248
-
249
- if (isset($old)) {
250
- $wp_filter['woocommerce_after_add_to_cart_quantity'] = $old;
251
- }
252
-
253
- if (isset($old_button)) {
254
- $wp_filter['woocommerce_before_add_to_cart_button'] = $old_button;
255
- }
256
-
257
- if (isset($old_after_form)) {
258
- $wp_filter['woocommerce_after_add_to_cart_form'] = $old_after_form;
259
- }
260
-
261
- if (isset($old_before_form)) {
262
- $wp_filter['woocommerce_before_add_to_cart_form'] = $old_before_form;
263
- }
264
-
265
- if (isset($old_after_button)) {
266
- $wp_filter['woocommerce_after_add_to_cart_button'] = $old_after_button;
267
- }
268
- } else {
269
- woocommerce_template_loop_add_to_cart();
270
- }
271
- }
272
- ?>
273
- </section>
274
- </div>
275
- </div>
276
- <?php
277
-
278
- return ob_get_clean();
279
- }
280
-
281
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/readme.php DELETED
@@ -1,37 +0,0 @@
1
- <h2><?php echo __('Instructions', 'blc'); ?></h2>
2
-
3
- <p>
4
- <?php echo __('After installing and activating the WooCommerce Extra extension you will have these features:', 'blc') ?>
5
- </p>
6
-
7
- <ol class="ct-modal-list">
8
- <li>
9
- <h4><?php echo __('Product Quick View', 'blc') ?></h4>
10
- <i>
11
- <?php
12
- echo sprintf(
13
- __('Navigate to %s and enable or disable it.', 'blc'),
14
- sprintf(
15
- '<code>%s</code>',
16
- __('Customizer ➝ WooCommerce ➝ Product Archives ➝ Card Options ➝ Quick View', 'blc')
17
- )
18
- );
19
- ?>
20
- </i>
21
- </li>
22
-
23
- <li>
24
- <h4><?php echo __('Floating Cart', 'blc') ?></h4>
25
- <i>
26
- <?php
27
- echo sprintf(
28
- __('Navigate to %s and enable or disable it.', 'blc'),
29
- sprintf(
30
- '<code>%s</code>',
31
- __('Customizer ➝ WooCommerce ➝ Single Product ➝ Floating Cart', 'blc')
32
- )
33
- );
34
- ?>
35
- </i>
36
- </li>
37
- </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/bundle/main.css DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * - v1.7.37
3
- *
4
- * Copyright (c) 2020
5
- * Licensed GPLv2+
6
- */
7
-
8
- [id*="quick-view"] [data-loader]{--loaderColor: #fff;--loaderSize: 60px;opacity:1;visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.ct-open-quick-view{--trigger-size: 36px;--linkInitialColor: var(--color);--linkHoverColor: #fff;position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--trigger-size);height:var(--trigger-size);opacity:0;transition:color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),opacity 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-open-quick-view:focus{opacity:1}.ct-open-quick-view:after{position:absolute;content:'';width:100%;height:100%;border-radius:100%;background:#fff;transition:transform 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),background 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-open-quick-view:hover:after{background:var(--paletteColor1);transform:scale3d(1.1, 1.1, 1)}.ct-open-quick-view svg{position:relative;z-index:1;fill:currentColor}.ct-quick-view-card>section{position:relative;border-radius:7px;background:#fff;-webkit-mask-image:-webkit-radial-gradient(white, black)}@media (max-width: 689.98px){.ct-quick-view-card>section{overflow-y:auto;max-height:inherit}}.ct-quick-view-card .onsale{--badgeTop: 25px;--badgeLeft: 25px}.ct-quick-view-card .close-button{--top: 25px;--right: 25px;--triggerWidth: 14px;--closeButtonSize: 34px;--closeButtonRadius: 100%;--closeButtonColor: var(--color);--closeButtonBackground: #F2F2F2}.ct-quick-view-card .close-button:hover:before{transform:scale(1.15)}[id*="quick-view"]{--backgroundColor: rgba(18, 21, 25, 0.8)}[id*="quick-view"] .content-container{overflow:initial}[id*="quick-view"] .ct-container{--container-max-width: 1000px;min-height:200px;position:relative;border-radius:7px;box-shadow:0px 50px 100px 0px rgba(18,21,25,0.5)}@media (max-width: 689.98px){[id*="quick-view"] .ct-container{max-height:85vh}}@media (min-width: 690px){[id*="quick-view"] .ct-container{max-height:700px}}.ct-quick-view-card .ct-product-view{margin-bottom:0}.ct-quick-view-card .ct-product-view .ct-image-container{pointer-events:none}@media (max-width: 689.98px){.ct-quick-view-card .ct-product-view .ct-ratio{padding-bottom:100% !important}}@media (min-width: 690px){.ct-quick-view-card .ct-product-view{width:50%}}.ct-quick-view-card .flexy-pills[data-type="circle"]{position:absolute;z-index:2;left:0;right:0;bottom:20px;--flexyInitialPill: rgba(255, 255, 255, 0.6);--flexyActivePill: #fff}.ct-quick-view-card{position:relative}@media (max-width: 689.98px){.ct-quick-view-card .entry-summary{padding:6vw 6vw 0 6vw}.ct-quick-view-card .entry-summary:after{padding-bottom:6vw}}@media (min-width: 690px){.ct-quick-view-card .entry-summary{position:absolute;top:0;left:50%;right:0;z-index:1;height:100%;overflow-y:auto;padding:40px 40px 0 40px}.ct-quick-view-card .entry-summary:after{padding-bottom:40px}}.ct-quick-view-card .entry-summary:after{content:'';display:block}.ct-quick-view-card .entry-summary .product_title{padding-right:40px}.ct-quick-view-card .entry-summary form.cart{border-top-style:dashed;border-bottom:1px dashed rgba(224,229,235,0.8)}@media (max-width: 689.98px){.ct-quick-view-card .entry-summary form.cart{margin-bottom:30px;padding-bottom:30px}}@media (min-width: 690px){.ct-quick-view-card .entry-summary form.cart{margin-bottom:40px;padding-bottom:40px}}.ct-quick-view-card .ct-quick-more{--buttonMinHeight: 55px;--buttonTextInitialColor: var(--color);--buttonTextHoverColor: var(--color);--buttonInitialColor: rgba(224,229,235,0.6);--buttonHoverColor: rgba(224,229,235,1);width:100%}.ct-floating-bar{position:fixed;z-index:5;top:calc(var(--admin-bar, 0px) + var(--frame-size, 0px) + var(--headerStickyHeight, 0px));left:var(--frame-size, 0px);right:var(--frame-size, 0px);display:var(--visibility, flex);align-items:center;height:75px;color:var(--color);background:var(--backgroundColor);box-shadow:var(--box-shadow);opacity:0;visibility:hidden;transform:translateY(-75px);transition:opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease}.ct-floating-bar.ct-active{opacity:1;visibility:visible;transform:translateY(0)}.ct-floating-bar>div{display:grid;grid-template-columns:auto auto}.ct-floating-bar section{display:flex;align-items:center}.ct-floating-bar section p{--contentSpacing: 0}.ct-floating-bar section:last-child{justify-content:flex-end}.ct-floating-bar .ct-image-container{border-radius:3px}@media (max-width: 689.98px){.ct-floating-bar .ct-image-container{max-width:40px;margin-right:10px}}@media (min-width: 690px){.ct-floating-bar .ct-image-container{max-width:50px;margin-right:15px}}.ct-floating-bar .product_title{--fontWeight: 600;--headingColor: var(--color);margin-bottom:0}@media (max-width: 689.98px){.ct-floating-bar .product_title{--fontSize: 15px;--fontWeight: 500}}@media (max-width: 689.98px){.ct-floating-bar .price{font-size:12px}}@media (min-width: 690px){.ct-floating-bar .price{margin-right:15px}}.ct-floating-bar .stock{font-size:13px;font-weight:500;text-transform:uppercase;margin-right:15px}.ct-floating-bar .stock:before{content:'/';margin-right:10px}.ct-floating-bar form.cart{display:flex}.ct-floating-bar .quantity{--quantityHeight: 40px;width:80px;margin-right:10px}.ct-floating-bar .quantity input[type="number"]{--formFontSize: 13px}.ct-floating-bar .button,.ct-floating-bar .added_to_cart,.ct-floating-bar .single_add_to_cart_button{--buttonMinHeight: 40px;--padding: 0 15px}.ct-floating-bar .single_add_to_cart_button.added{display:none}@media (min-width: 690px){.floating-bar-content .price{display:none}}@media (max-width: 689.98px){.floating-bar-actions .price,.floating-bar-actions .quantity{display:none}.floating-bar-actions .added_to_cart,.floating-bar-actions .single_add_to_cart_button{--padding: 0 5px;--buttonShadow: none;--buttonTransform: none;min-width:40px;font-size:0 !important}.floating-bar-actions .added_to_cart:after,.floating-bar-actions .single_add_to_cart_button:after{font-family:'woo';font-size:15px;margin:0 !important}.floating-bar-actions .added_to_cart:after{content:'\e906'}.floating-bar-actions .single_add_to_cart_button:not(.loading):after{content:'\e909'}}
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/bundle/main.js DELETED
@@ -1 +0,0 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e){t.exports=ctEvents},function(t,e){t.exports=window.jQuery},function(t,e){t.exports=window.ctFrontend},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r);function i(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=function(){var t=document.querySelector(".ct-floating-bar");if(t){var e=!1,n=function(){var t=document.querySelector(".ct-floating-bar");if(document.querySelector(".single-product .single_add_to_cart_button")){var e=document.querySelector(".single-product .single_add_to_cart_button").getBoundingClientRect();t&&(window.scrollY>window.scrollY+e.top+e.height?t.classList.add("ct-active"):t.classList.remove("ct-active"))}};n(),window.addEventListener("scroll",(function(){e||(e=!0,requestAnimationFrame((function(){n(),e=!1})))}));var r=t.querySelector(".button:not(.single_add_to_cart_button):not(.product_type_external)");r&&r.addEventListener("click",(function(t){t.preventDefault();var e=window.scrollY,n=null;requestAnimationFrame((function t(r){n||(n=r);var o=r-n;if(document.querySelector(".single-product .single_add_to_cart_button")){var i,c,a,u=document.querySelector(".single-product .single_add_to_cart_button").getBoundingClientRect(),l=Math.max((i=o,c=e,a=-e,(i/=700/2)<1?a/2*i*i+c:-a/2*(--i*(i-2)-1)+c),window.scrollY+u.top);scrollTo(0,l),o<700&&requestAnimationFrame(t)}}))}))}},u=n(0),l=n.n(u),s=n(2);function d(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var m={};l.a.on("blocksy:woo:floating-cart:init",(function(){a()}));var y,p=function(t){var e=t.e,n=t.el;if(!e.target.matches(".add_to_cart_button")&&!e.target.matches(".added_to_cart")){e.preventDefault();var r=Array.from(n.classList).find((function(t){return 0===t.indexOf("post-")})).split("-")[1],c="#quick-view-".concat(r);if(document.querySelector(c))l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{clickOutside:!0}});else{var a,u='\n\t\t<div id="quick-view-'.concat(r,'" data-behaviour="modal" class="ct-panel quick-view-modal">\n\t\t\t<span data-loader="circles">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</span>\n\t\t</div>\n '),f=document.createElement("div");f.innerHTML=u,document.body.appendChild(f.firstElementChild),setTimeout((function(){l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{skipScrollLock:!0,scrollContainer:s.getCurrentScreen&&"mobile"===Object(s.getCurrentScreen)()?document.querySelector(c).firstElementChild.lastElementChild.lastElementChild:null,clickOutside:!0,focus:!1}})}),100),(a="".concat(ct_localizations.ajax_url,"?action=blocsky_get_woo_quick_view&product_id=").concat(r),m[a]?new Promise((function(t){t(m[a]),m[a]=m[a].clone()})):new Promise((function(t){return fetch(a).then((function(e){t(e),m[a]=e.clone()}))}))).then((function(t){200===t.status&&t.json().then((function(t){var n=t.success,r=t.data;if(n){var a=document.createElement("div");a.innerHTML=r.quickview,function(t){i(t.querySelectorAll(".ct-image-container.ct-lazy")).map((function(t){t.querySelector("img")&&(t.querySelector("img").setAttribute("src",t.querySelector("img").dataset.ctLazy),t.querySelector("img").dataset.ctLazySet&&t.querySelector("img").setAttribute("srcset",t.querySelector("img").dataset.ctLazySet)),t.classList.remove("ct-lazy"),t.classList.add("ct-lazy-loaded")}))}(a),document.querySelector(c)&&(document.querySelector(c).innerHTML=a.firstElementChild.innerHTML);d(document.querySelectorAll("".concat(c," .variations_form"))).map((function(t){return o()(t).wc_variation_form()})),l.a.trigger("ct:custom-select:init"),l.a.trigger("ct:custom-select-allow:init"),l.a.trigger("ct:add-to-cart:update"),setTimeout((function(){o.a&&o.a.wcpaInit&&o.a.wcpaInit()}),50),setTimeout((function(){l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{scrollContainer:s.getCurrentScreen&&"mobile"===Object(s.getCurrentScreen)()?document.querySelector(c).firstElementChild.lastElementChild.lastElementChild:null,clickOutside:!0,focus:!1,forceOpen:!0}}),setTimeout((function(){return l.a.trigger("ct:flexy:update")}))}),100)}}))}))}}},v=function(){a(),d(document.querySelectorAll('.ct-open-quick-view, [data-quick-view="image"] .ct-image-container')).map((function(t){t.hasQuickViewInit||(t.hasQuickViewInit=!0,t.addEventListener("click",(function(e){p({e:e,el:t.closest(".product")})})))})),d(document.querySelectorAll('[data-quick-view="card"] > *')).map((function(t){t.hasQuickViewInit||(t.hasQuickViewInit=!0,t.addEventListener("click",(function(e){p({e:e,el:t})})))}))};y=function(){v(),l.a.on("ct:quick-view:update",(function(){return v()})),l.a.on("ct:infinite-scroll:load",(function(){return v()})),l.a.on("blocksy:frontend:init",(function(){return v()})),l.a.on("ct:modal:closed",(function(t){if(t.closest(".quick-view-modal")){if(t.querySelector(".flexy-container")){var e=t.querySelector(".flexy-container").parentNode;e.flexy&&e.flexy.destroy&&e.flexy.destroy()}setTimeout((function(){t.remove()}))}}))},/comp|inter|loaded/.test(document.readyState)?y():document.addEventListener("DOMContentLoaded",y,!1)}]);
 
framework/extensions/woocommerce-extra/static/bundle/sync.js DELETED
@@ -1 +0,0 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){t.exports=ctEvents},function(t,e){window.ctEvents=window.ctEvents||new function(){var t={},e=1,n=!1;function r(t,e){if("string"!=typeof t)return t;for(var n=t.replace(/\s\s+/g," ").trim().split(" "),r=n.length,o=Object.create(null),i=0;i<r;i++)o[n[i]]=e;return o}function o(t,e){for(var n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var c=r[i];n[c]=e(c,t[c])}return n}function i(t,r){function o(){return new Array(e).join("│ ")}n&&(void 0!==r?console.log("[Event] "+o()+t,"─",r):console.log("[Event] "+o()+t))}this.countAll=function(e){return t[e]},this.log=i,this.debug=function(t){return n=Boolean(t),this},this.on=function(e,c){return o(r(e,c),(function(e,r){(t[e]||(t[e]=[])).push(r),n&&i("✚ "+e)})),this},this.one=function(e,c){return o(r(e,c),(function(e,r){var o,c,a;(t[e]||(t[e]=[])).push((o=r,a=2,function(){return--a>0&&(c=o.apply(this,arguments)),a<=1&&(o=null),c})),n&&i("✚ ["+e+"]")})),this},this.off=function(e,c){return o(r(e,c),(function(e,r){t[e]&&(r?t[e].splice(t[e].indexOf(r)>>>0,1):t[e]=[],n&&i("✖ "+e))})),this},this.trigger=function(n,c){return o(r(n),(function(e){i("╭─ "+e,c),a(1);try{"fw:options:init"===e&&fw.options.startListeningToEvents(c.$elements||document.body),(t[e]||[]).map(n),(t.all||[]).map(n)}catch(t){if(console.log("%c [Events] Exception raised.","color: red; font-weight: bold;"),"undefined"==typeof console)throw t;console.error(t)}function n(t){t&&t.call(window,c)}a(-1),i("╰─ "+e,c)})),this;function a(t){void 0!==t&&(e+=t>0?1:-1),e<0&&(e=0)}},this.hasListeners=function(e){return!!t&&(t[e]||[]).length>0}}},function(t,e,n){"use strict";n.r(e);var r,o,i,c,a,l,u,s,f,p=function(t){if([t.top,t.right,t.bottom,t.left].reduce((function(t,e){return!!t&&!("auto"!==e&&e&&e.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var e=["auto"!==t.top&&t.top.toString().match(/\d/g)?t.top:0,"auto"!==t.right&&t.right.toString().match(/\d/g)?t.right:0,"auto"!==t.bottom&&t.bottom.toString().match(/\d/g)?t.bottom:0,"auto"!==t.left&&t.left.toString().match(/\d/g)?t.left:0];return e[0]===e[1]&&e[0]===e[2]&&e[0]===e[3]?e[0]:e[0]===e[2]&&e[1]===e[3]?"".concat(e[0]," ").concat(e[3]):e.join(" ")},d=function(t,e){var n=e.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===t)return"CT_CSS_SKIP_RULE";if("none"===t)return"none";if(!t.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(t.blur)&&0===parseFloat(t.spread)&&0===parseFloat(t.v_offset)&&0===parseFloat(t.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return t.inset&&o.push("inset"),o.push("".concat(t.h_offset,"px")),o.push("".concat(t.v_offset,"px")),0!==parseFloat(t.blur)&&(o.push("".concat(t.blur,"px")),0!==parseFloat(t.spread)&&o.push("".concat(t.spread,"px"))),0===parseFloat(t.blur)&&0!==parseFloat(t.spread)&&(o.push("".concat(t.blur,"px")),o.push("".concat(t.spread,"px"))),o.push(t.color.color),o.join(" ")},b=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(t["".concat(n,"_selector_prefix")]?"".concat(t["".concat(n,"_selector_prefix")]," "):"").concat(t.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(t.variable,":"))>-1?l[0].replace(new RegExp("--".concat(t.variable,":[\\s\\S]*?;"),"gm"),e.indexOf("CT_CSS_SKIP_RULE")>-1||e.indexOf(t.variable)>-1?"":"--".concat(t.variable,": ").concat(e,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(e.indexOf("CT_CSS_SKIP_RULE")>-1||e.indexOf(t.variable)>-1?"":"--".concat(t.variable,": ").concat(e,";"))))},h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(t.type||"").indexOf("color")>-1?e["color"===t.type?"default":t.type.split(":")[1]].color:e;"border"===(t.type||"")&&(r=e&&"none"!==e.style?"".concat(e.width,"px ").concat(e.style," ").concat(e.color.color):"none"),"spacing"===(t.type||"")&&(r=p(e)),"box-shadow"===(t.type||"")&&(r=d(e,t)),b(t,"".concat(r).concat(t.unit||"").concat(t.important?" !important":""),n)},g=function(t,e){var n=e;e=t.extractValue?t.extractValue(e):e,t.whenDone&&t.whenDone(e,n),e=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t&&Object.keys(t).indexOf("desktop")>-1?e?t:t.desktop:e?{desktop:t,tablet:t,mobile:t}:t}(e,!!t.responsive),t.responsive?(t.enabled&&"no"===!wp.customize(t.enabled)()&&(e.mobile="0"+(t.unit?"":"px"),e.tablet="0"+(t.unit?"":"px"),e.desktop="0"+(t.unit?"":"px")),h(t,e.desktop,"desktop"),h(t,e.tablet,"tablet"),h(t,e.mobile,"mobile")):h(t,e)};r={floatingBarFontColor:{selector:".ct-floating-bar",variable:"color",type:"color"},floatingBarBackground:{selector:".ct-floating-bar",variable:"backgroundColor",type:"color"},floatingBarShadow:{selector:".ct-floating-bar",type:"box-shadow",variable:"box-shadow",responsive:!0},floatingBarVisibility:(o={on:"flex",selector:".ct-floating-bar"},i=o.selector,c=o.variable,a=void 0===c?"visibility":c,l=o.on,u=void 0===l?"block":l,s=o.off,f=void 0===s?"none":s,{selector:i,variable:a,responsive:!0,extractValue:function(t){var e=t.mobile,n=t.tablet,r=t.desktop;return{mobile:e?u:f,tablet:n?u:f,desktop:r?u:f}}})},wp.customize.bind("change",(function(t){return r[t.id]&&(Array.isArray(r[t.id])?r[t.id]:[r[t.id]]).map((function(e){return g(e,t())}))}));n(1);var m=n(0),y=n.n(m);function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(t,e)||w(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){E(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var j=function(){var t=document.createElement("div");return t.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,t},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(e||(e=j()),e.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(t,'"]'))){var r=e.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(t,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},P=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=O({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(t){},should_insert:!0},t);var e=document.querySelector(t.parent_selector);if(S(document.querySelectorAll("".concat(t.parent_selector," ").concat(t.selector))).map((function(t){return t.parentNode.removeChild(t)})),t.should_insert){var n=C(t.fragment_id);if(n){for(;n.firstElementChild;)if(t.beforeInsert(n.firstElementChild),"append"===t.strategy&&e.appendChild(n.firstElementChild),"firstChild"===t.strategy&&e.insertBefore(n.firstElementChild,e.firstElementChild),t.strategy.indexOf("maybeBefore")>-1){var r=t.strategy.split(":"),o=v(r,2),i=(o[0],o[1]);e.querySelector(i)?e.insertBefore(n.firstElementChild,e.querySelector(i)):e.appendChild(n.firstElementChild)}t.whenInserted()}}};!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=O({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(t){},watch:[]},t);var e=function(){var e=wp.customize(t.id)();P(O(O({},t),{},{should_insert:"yes"===e}))};wp.customize(t.id,(function(t){return t.bind((function(t){return e()}))})),t.watch.map((function(t){return wp.customize(t,(function(t){return t.bind((function(){return e()}))}))}))}({id:"has_floating_bar",strategy:"append",parent_selector:"body",selector:".ct-floating-bar",fragment_id:"blocksy-woo-floating-cart",whenInserted:function(){return y.a.trigger("blocksy:woo:floating-cart:init")}})}]);
 
framework/extensions/woocommerce-extra/static/js/floating-cart.js DELETED
@@ -1,94 +0,0 @@
1
- export const mountFloatingCart = () => {
2
- var floatingCart = document.querySelector('.ct-floating-bar')
3
-
4
- if (!floatingCart) return
5
-
6
- // browser window scroll (in pixels) after which the "back to top" link is shown
7
- // browser window scroll (in pixels) after which the "back to top" link opacity is reduced
8
- var scrolling = false
9
-
10
- const compute = () => {
11
- var floatingCart = document.querySelector('.ct-floating-bar')
12
-
13
- if (
14
- !document.querySelector(
15
- '.single-product .single_add_to_cart_button'
16
- )
17
- ) {
18
- return
19
- }
20
-
21
- const summary = document
22
- .querySelector('.single-product .single_add_to_cart_button')
23
- .getBoundingClientRect()
24
-
25
- if (!floatingCart) return
26
-
27
- window.scrollY > window.scrollY + summary.top + summary.height
28
- ? floatingCart.classList.add('ct-active')
29
- : floatingCart.classList.remove('ct-active')
30
- }
31
-
32
- compute()
33
-
34
- window.addEventListener('scroll', () => {
35
- if (scrolling) return
36
-
37
- scrolling = true
38
-
39
- requestAnimationFrame(() => {
40
- compute()
41
- scrolling = false
42
- })
43
- })
44
-
45
- const maybeButton = floatingCart.querySelector(
46
- '.button:not(.single_add_to_cart_button):not(.product_type_external)'
47
- )
48
-
49
- if (maybeButton) {
50
- maybeButton.addEventListener('click', event => {
51
- event.preventDefault()
52
-
53
- var start = window.scrollY
54
- var currentTime = null
55
-
56
- const animateScroll = timestamp => {
57
- if (!currentTime) currentTime = timestamp
58
- var progress = timestamp - currentTime
59
-
60
- const easeInOutQuad = (t, b, c, d) => {
61
- t /= d / 2
62
- if (t < 1) return (c / 2) * t * t + b
63
- t--
64
- return (-c / 2) * (t * (t - 2) - 1) + b
65
- }
66
-
67
- if (
68
- !document.querySelector(
69
- '.single-product .single_add_to_cart_button'
70
- )
71
- ) {
72
- return
73
- }
74
-
75
- const summary = document
76
- .querySelector('.single-product .single_add_to_cart_button')
77
- .getBoundingClientRect()
78
-
79
- var val = Math.max(
80
- easeInOutQuad(progress, start, -start, 700),
81
- window.scrollY + summary.top
82
- )
83
-
84
- scrollTo(0, val)
85
-
86
- if (progress < 700) {
87
- requestAnimationFrame(animateScroll)
88
- }
89
- }
90
-
91
- requestAnimationFrame(animateScroll)
92
- })
93
- }
94
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/helpers.js DELETED
@@ -1,15 +0,0 @@
1
- export const handleResponsiveSwitch = ({
2
- selector,
3
- variable = 'visibility',
4
- on = 'block',
5
- off = 'none'
6
- }) => ({
7
- selector,
8
- variable,
9
- responsive: true,
10
- extractValue: ({ mobile, tablet, desktop }) => ({
11
- mobile: mobile ? on : off,
12
- tablet: tablet ? on : off,
13
- desktop: desktop ? on : off
14
- })
15
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/main.js DELETED
@@ -1,217 +0,0 @@
1
- import $ from 'jquery'
2
- import { markImagesAsLoaded } from '../../../cookies-consent/static/js/lazy-load-helpers'
3
- import { onDocumentLoaded } from '../../../cookies-consent/static/js/helpers'
4
- import { mountFloatingCart } from './floating-cart'
5
- import ctEvents from 'ct-events'
6
- import { getCurrentScreen } from 'blocksy-frontend'
7
-
8
- const store = {}
9
-
10
- const cachedFetch = url =>
11
- store[url]
12
- ? new Promise(resolve => {
13
- resolve(store[url])
14
- store[url] = store[url].clone()
15
- })
16
- : new Promise(resolve =>
17
- fetch(url).then(response => {
18
- resolve(response)
19
- store[url] = response.clone()
20
- })
21
- )
22
-
23
- ctEvents.on('blocksy:woo:floating-cart:init', () => {
24
- mountFloatingCart()
25
- })
26
-
27
- const openQuickViewFor = ({ e, el }) => {
28
- if (e.target.matches('.add_to_cart_button')) {
29
- return
30
- }
31
-
32
- if (e.target.matches('.added_to_cart')) {
33
- return
34
- }
35
-
36
- e.preventDefault()
37
-
38
- let productId = Array.from(el.classList)
39
- .find(className => className.indexOf('post-') === 0)
40
- .split('-')[1]
41
-
42
- let href = `#quick-view-${productId}`
43
-
44
- if (document.querySelector(href)) {
45
- ctEvents.trigger('ct:overlay:handle-click', {
46
- e,
47
- href,
48
- options: {
49
- clickOutside: true
50
- }
51
- })
52
- return
53
- }
54
-
55
- const loadingHtml = `
56
- <div id="quick-view-${productId}" data-behaviour="modal" class="ct-panel quick-view-modal">
57
- <span data-loader="circles">
58
- <span></span>
59
- <span></span>
60
- <span></span>
61
- </span>
62
- </div>
63
- `
64
-
65
- const div = document.createElement('div')
66
-
67
- div.innerHTML = loadingHtml
68
-
69
- document.body.appendChild(div.firstElementChild)
70
-
71
- setTimeout(() => {
72
- ctEvents.trigger('ct:overlay:handle-click', {
73
- e,
74
- href,
75
- options: {
76
- skipScrollLock: true,
77
- scrollContainer:
78
- getCurrentScreen && getCurrentScreen() === 'mobile'
79
- ? document.querySelector(href).firstElementChild
80
- .lastElementChild.lastElementChild
81
- : null,
82
- clickOutside: true,
83
- focus: false
84
- }
85
- })
86
- }, 100)
87
-
88
- cachedFetch(
89
- `${ct_localizations.ajax_url}?action=blocsky_get_woo_quick_view&product_id=${productId}`
90
- ).then(r => {
91
- if (r.status === 200) {
92
- r.json().then(({ success, data }) => {
93
- if (!success) return
94
-
95
- const div = document.createElement('div')
96
-
97
- div.innerHTML = data.quickview
98
-
99
- markImagesAsLoaded(div)
100
-
101
- if (document.querySelector(href)) {
102
- document.querySelector(href).innerHTML =
103
- div.firstElementChild.innerHTML
104
- }
105
-
106
- const wc_single_product_params = {
107
- i18n_required_rating_text: 'Please select a rating',
108
- review_rating_required: 'yes',
109
- flexslider: {
110
- rtl: false,
111
- animation: 'slide',
112
- smoothHeight: true,
113
- directionNav: false,
114
- controlNav: 'thumbnails',
115
- slideshow: false,
116
- animationSpeed: 500,
117
- animationLoop: false,
118
- allowOneSlide: false
119
- },
120
- zoom_enabled: '',
121
- zoom_options: [],
122
- photoswipe_enabled: '1',
123
- photoswipe_options: {
124
- shareEl: false,
125
- closeOnScroll: false,
126
- history: false,
127
- hideAnimationDuration: 0,
128
- showAnimationDuration: 0
129
- },
130
- flexslider_enabled: '1'
131
- }
132
- ;[
133
- ...document.querySelectorAll(`${href} .variations_form`)
134
- ].map(el => $(el).wc_variation_form())
135
-
136
- ctEvents.trigger('ct:custom-select:init')
137
- ctEvents.trigger('ct:custom-select-allow:init')
138
-
139
- ctEvents.trigger('ct:add-to-cart:update')
140
-
141
- setTimeout(() => {
142
- if ($) {
143
- $.wcpaInit && $.wcpaInit()
144
- }
145
- }, 50)
146
-
147
- setTimeout(() => {
148
- ctEvents.trigger('ct:overlay:handle-click', {
149
- e,
150
- href,
151
- options: {
152
- scrollContainer:
153
- getCurrentScreen &&
154
- getCurrentScreen() === 'mobile'
155
- ? document.querySelector(href)
156
- .firstElementChild.lastElementChild
157
- .lastElementChild
158
- : null,
159
- clickOutside: true,
160
- focus: false,
161
- forceOpen: true
162
- }
163
- })
164
- setTimeout(() => ctEvents.trigger('ct:flexy:update'))
165
- }, 100)
166
- })
167
- }
168
- })
169
- }
170
-
171
- const mount = () => {
172
- mountFloatingCart()
173
- ;[
174
- ...document.querySelectorAll(
175
- '.ct-open-quick-view, [data-quick-view="image"] .ct-image-container'
176
- )
177
- ].map(el => {
178
- if (el.hasQuickViewInit) return
179
- el.hasQuickViewInit = true
180
-
181
- el.addEventListener('click', e => {
182
- openQuickViewFor({ e, el: el.closest('.product') })
183
- })
184
- })
185
- ;[...document.querySelectorAll('[data-quick-view="card"] > *')].map(el => {
186
- if (el.hasQuickViewInit) return
187
- el.hasQuickViewInit = true
188
-
189
- el.addEventListener('click', e => {
190
- openQuickViewFor({ e, el })
191
- })
192
- })
193
- }
194
-
195
- onDocumentLoaded(() => {
196
- mount()
197
- ctEvents.on('ct:quick-view:update', () => mount())
198
- ctEvents.on('ct:infinite-scroll:load', () => mount())
199
- ctEvents.on('blocksy:frontend:init', () => mount())
200
-
201
- ctEvents.on('ct:modal:closed', modalContainer => {
202
- if (!modalContainer.closest('.quick-view-modal')) {
203
- return
204
- }
205
-
206
- if (modalContainer.querySelector('.flexy-container')) {
207
- const flexyEl = modalContainer.querySelector('.flexy-container')
208
- .parentNode
209
-
210
- flexyEl.flexy && flexyEl.flexy.destroy && flexyEl.flexy.destroy()
211
- }
212
-
213
- setTimeout(() => {
214
- modalContainer.remove()
215
- })
216
- })
217
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/sync.js DELETED
@@ -1,19 +0,0 @@
1
- import './variables'
2
- import '../../../cookies-consent/static/js/ct-events'
3
- import ctEvents from 'ct-events'
4
-
5
- import {
6
- checkAndReplace,
7
- responsiveClassesFor
8
- } from '../../../cookies-consent/static/js/sync/helpers'
9
-
10
- checkAndReplace({
11
- id: 'has_floating_bar',
12
- strategy: 'append',
13
-
14
- parent_selector: 'body',
15
- selector: '.ct-floating-bar',
16
- fragment_id: 'blocksy-woo-floating-cart',
17
-
18
- whenInserted: () => ctEvents.trigger('blocksy:woo:floating-cart:init')
19
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/variables.js DELETED
@@ -1,28 +0,0 @@
1
- import { handleVariablesFor } from 'customizer-sync-helpers'
2
- import { handleResponsiveSwitch } from './helpers'
3
-
4
- handleVariablesFor({
5
- floatingBarFontColor: {
6
- selector: '.ct-floating-bar',
7
- variable: 'color',
8
- type: 'color'
9
- },
10
-
11
- floatingBarBackground: {
12
- selector: '.ct-floating-bar',
13
- variable: 'backgroundColor',
14
- type: 'color'
15
- },
16
-
17
- floatingBarShadow: {
18
- selector: '.ct-floating-bar',
19
- type: 'box-shadow',
20
- variable: 'box-shadow',
21
- responsive: true
22
- },
23
-
24
- floatingBarVisibility: handleResponsiveSwitch({
25
- on: 'flex',
26
- selector: '.ct-floating-bar'
27
- })
28
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/floating-bar/main.scss DELETED
@@ -1,156 +0,0 @@
1
- .ct-floating-bar {
2
- position: fixed;
3
- z-index: 5;
4
- top: calc(var(--admin-bar, 0px) + var(--frame-size, 0px) + var(--headerStickyHeight, 0px));
5
- left: var(--frame-size, 0px);
6
- right: var(--frame-size, 0px);
7
- display: var(--visibility, flex);
8
- align-items: center;
9
- height: 75px;
10
- color: var(--color);
11
- background: var(--backgroundColor);
12
- box-shadow: var(--box-shadow);
13
- opacity: 0;
14
- visibility: hidden;
15
- transform: translateY(-75px);
16
- transition: opacity 0.2s ease,
17
- transform 0.2s ease,
18
- visibility 0.2s ease;
19
-
20
- &.ct-active {
21
- opacity: 1;
22
- visibility: visible;
23
- transform: translateY(0);
24
- }
25
-
26
- > div {
27
- display: grid;
28
- // grid-template-columns: repeat(2, 1fr);
29
- grid-template-columns: auto auto;
30
- }
31
-
32
- section {
33
- display: flex;
34
- align-items: center;
35
-
36
- p {
37
- --contentSpacing: 0;
38
- }
39
-
40
- &:last-child {
41
- justify-content: flex-end;
42
- }
43
- }
44
-
45
- .ct-image-container {
46
- border-radius: 3px;
47
-
48
- @include media-breakpoint-down (sm) {
49
- max-width: 40px;
50
- margin-right: 10px;
51
- }
52
-
53
- @include media-breakpoint-up (md) {
54
- max-width: 50px;
55
- margin-right: 15px;
56
- }
57
- }
58
-
59
- .product_title {
60
- --fontWeight: 600;
61
- --headingColor: var(--color);
62
- margin-bottom: 0;
63
-
64
- @include media-breakpoint-down (sm) {
65
- --fontSize: 15px;
66
- --fontWeight: 500;
67
- }
68
- }
69
-
70
- .price {
71
- @include media-breakpoint-down (sm) {
72
- font-size: 12px;
73
- }
74
-
75
- @include media-breakpoint-up (md) {
76
- margin-right: 15px;
77
- }
78
- }
79
-
80
- .stock {
81
- font-size: 13px;
82
- font-weight: 500;
83
- text-transform: uppercase;
84
- margin-right: 15px;
85
-
86
- &:before {
87
- content: '/';
88
- margin-right: 10px;
89
- }
90
- }
91
-
92
- form.cart {
93
- display: flex;
94
- }
95
-
96
- .quantity {
97
- --quantityHeight: 40px;
98
- width: 80px;
99
- margin-right: 10px;
100
-
101
- input[type="number"] {
102
- --formFontSize: 13px;
103
- }
104
- }
105
-
106
- .button,
107
- .added_to_cart,
108
- .single_add_to_cart_button {
109
- --buttonMinHeight: 40px;
110
- --padding: 0 15px;
111
- }
112
-
113
- .single_add_to_cart_button.added {
114
- display: none;
115
- }
116
- }
117
-
118
-
119
- @include media-breakpoint-up (md) {
120
- .floating-bar-content .price {
121
- display: none;
122
- }
123
- }
124
-
125
- @include media-breakpoint-down (sm) {
126
- .floating-bar-actions {
127
-
128
- .price,
129
- .quantity {
130
- display: none;
131
- }
132
-
133
- .added_to_cart,
134
- .single_add_to_cart_button {
135
- --padding: 0 5px;
136
- --buttonShadow: none;
137
- --buttonTransform: none;
138
- min-width: 40px;
139
- font-size: 0 !important;
140
-
141
- &:after {
142
- font-family: 'woo';
143
- font-size: 15px;
144
- margin: 0 !important;
145
- }
146
- }
147
-
148
- .added_to_cart:after {
149
- content: '\e906';
150
- }
151
-
152
- .single_add_to_cart_button:not(.loading):after {
153
- content: '\e909';
154
- }
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/main.scss DELETED
@@ -1,3 +0,0 @@
1
- @import '../../../../../static/sass/common-frontend';
2
- @import 'quick-view/main';
3
- @import 'floating-bar/main';
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/main.scss DELETED
@@ -1,8 +0,0 @@
1
- @import 'quick-view-loader';
2
- @import 'quick-view-button';
3
-
4
- @import 'quick-view-card';
5
-
6
- @import 'quick-view-modal';
7
- @import 'quick-view-gallery';
8
- @import 'quick-view-summary';
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-button.scss DELETED
@@ -1,44 +0,0 @@
1
- .ct-open-quick-view {
2
- --trigger-size: 36px;
3
- --linkInitialColor: var(--color);
4
- --linkHoverColor: #fff;
5
-
6
- position: absolute;
7
- z-index: 2;
8
- display: flex;
9
- align-items: center;
10
- justify-content: center;
11
- width: var(--trigger-size);
12
- height: var(--trigger-size);
13
- opacity: 0;
14
- transition: color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),
15
- opacity 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
16
-
17
- &:focus {
18
- opacity: 1;
19
- }
20
-
21
- &:after {
22
- position: absolute;
23
- content: '';
24
- width: 100%;
25
- height: 100%;
26
- border-radius: 100%;
27
- background: #fff;
28
- transition: transform 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),
29
- background 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
30
- }
31
-
32
- &:hover {
33
- &:after {
34
- background: var(--paletteColor1);
35
- transform: scale3d(1.1, 1.1, 1);
36
- }
37
- }
38
-
39
- svg {
40
- position: relative;
41
- z-index: 1;
42
- fill: currentColor;
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-card.scss DELETED
@@ -1,39 +0,0 @@
1
- .ct-quick-view-card {
2
-
3
- > section {
4
- position: relative;
5
- border-radius: 7px;
6
- background: #fff;
7
- -webkit-mask-image: -webkit-radial-gradient(white, black);
8
-
9
- @include media-breakpoint-down (sm) {
10
- overflow-y: auto;
11
- max-height: inherit;
12
- }
13
- }
14
-
15
-
16
- // onsale badge
17
- .onsale {
18
- --badgeTop: 25px;
19
- --badgeLeft: 25px;
20
- }
21
-
22
-
23
- // close button
24
- .close-button {
25
- --top: 25px;
26
- --right: 25px;
27
- --triggerWidth: 14px;
28
- --closeButtonSize: 34px;
29
- --closeButtonRadius: 100%;
30
- --closeButtonColor: var(--color);
31
- --closeButtonBackground: #F2F2F2;
32
-
33
- &:hover {
34
- &:before {
35
- transform: scale(1.15);
36
- }
37
- }
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-gallery.scss DELETED
@@ -1,32 +0,0 @@
1
- .ct-quick-view-card {
2
-
3
- .ct-product-view {
4
- margin-bottom: 0;
5
-
6
- .ct-image-container {
7
- pointer-events: none;
8
- }
9
-
10
- @include media-breakpoint-down (sm) {
11
- .ct-ratio {
12
- padding-bottom: 100% !important;
13
- }
14
- }
15
-
16
- @include media-breakpoint-up (md) {
17
- width: 50%;
18
- }
19
- }
20
-
21
- // flexy
22
- .flexy-pills[data-type="circle"] {
23
- position: absolute;
24
- z-index: 2;
25
- left: 0;
26
- right: 0;
27
- bottom: 20px;
28
-
29
- --flexyInitialPill: rgba(255, 255, 255, 0.6);
30
- --flexyActivePill: #fff;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-loader.scss DELETED
@@ -1,10 +0,0 @@
1
- [id*="quick-view"] {
2
- [data-loader] {
3
- --loaderColor: #fff;
4
- --loaderSize: 60px;
5
-
6
- opacity: 1;
7
- visibility: visible;
8
- animation-play-state: running;
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-modal.scss DELETED
@@ -1,23 +0,0 @@
1
- [id*="quick-view"] {
2
- --backgroundColor: rgba(18, 21, 25, 0.8);
3
-
4
- .content-container {
5
- overflow: initial;
6
- }
7
-
8
- .ct-container {
9
- --container-max-width: 1000px;
10
- min-height: 200px;
11
- position: relative;
12
- border-radius: 7px;
13
- box-shadow: 0px 50px 100px 0px rgba(18, 21, 25, 0.5);
14
-
15
- @include media-breakpoint-down (sm) {
16
- max-height: 85vh;
17
- }
18
-
19
- @include media-breakpoint-up (md) {
20
- max-height: 700px;
21
- }
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-summary.scss DELETED
@@ -1,63 +0,0 @@
1
- .ct-quick-view-card {
2
- position: relative;
3
-
4
- .entry-summary {
5
- @include media-breakpoint-down (sm) {
6
- padding: 6vw 6vw 0 6vw;
7
-
8
- &:after {
9
- padding-bottom: 6vw;
10
- }
11
- }
12
-
13
- @include media-breakpoint-up (md) {
14
- position: absolute;
15
- top: 0;
16
- left: 50%;
17
- right: 0;
18
- z-index: 1;
19
- height: 100%;
20
- overflow-y: auto;
21
- padding: 40px 40px 0 40px;
22
-
23
- &:after {
24
- padding-bottom: 40px;
25
- }
26
- }
27
-
28
- &:after {
29
- content: '';
30
- display: block;
31
- }
32
-
33
- .product_title {
34
- padding-right: 40px;
35
- }
36
-
37
- form.cart {
38
- border-top-style: dashed;
39
- border-bottom: 1px dashed rgba(224, 229, 235, 0.8);
40
-
41
- @include media-breakpoint-down (sm) {
42
- margin-bottom: 30px;
43
- padding-bottom: 30px;
44
- }
45
-
46
- @include media-breakpoint-up (md) {
47
- margin-bottom: 40px;
48
- padding-bottom: 40px;
49
- }
50
- }
51
- }
52
-
53
-
54
- .ct-quick-more {
55
- --buttonMinHeight: 55px;
56
- --buttonTextInitialColor: var(--color);
57
- --buttonTextHoverColor: var(--color);
58
- --buttonInitialColor: rgba(224,229,235,0.6);
59
- --buttonHoverColor: rgba(224,229,235,1);
60
-
61
- width: 100%;
62
- }
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/features/demo-install/wp-importer.php CHANGED
@@ -26,9 +26,10 @@ function blc_load_xml_file($url) {
26
  ]));
27
  } else if (function_exists('curl_init')) {
28
  $curl = curl_init($url);
 
29
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
30
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
31
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
32
 
33
  $result = curl_exec($curl);
34
  curl_close($curl);
26
  ]));
27
  } else if (function_exists('curl_init')) {
28
  $curl = curl_init($url);
29
+
30
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
31
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
32
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
33
 
34
  $result = curl_exec($curl);
35
  curl_close($curl);
freemius/includes/class-fs-logger.php CHANGED
@@ -688,4 +688,4 @@ KEY `type` (`type` ASC))" );
688
  }
689
 
690
  #endregion
691
- }
688
  }
689
 
690
  #endregion
691
+ }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 5.5
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.7.37
9
 
10
  == Description ==
11
 
@@ -23,6 +23,14 @@ It runs and adds its enhacements only if the Blocksy theme is installed and acti
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
 
 
 
 
 
 
 
 
26
  1.7.37: 2020-11-20
27
  - Improvement: General improvement
28
 
5
  Tested up to: 5.5
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.7.38
9
 
10
  == Description ==
11
 
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
26
+ 1.7.38: 2020-11-23
27
+ - Improvement: Conditions position improvement
28
+ - Improvement: Caching plugins logic
29
+
30
+ 1.7.38-beta1: 2020-11-20
31
+ - Improvement: Conditions position improvement
32
+ - Improvement: Caching plugins logic
33
+
34
  1.7.37: 2020-11-20
35
  - Improvement: General improvement
36
 
static/bundle/dashboard.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=ctEvents},function(t,e){t.exports=window.ctFrontend},function(t,e,r){"use strict";r.r(e),r.d(e,"onDocumentLoaded",(function(){return g}));var n=r(0),o=r.n(n),a=function(t,e){var r=e.screen,n=void 0===r?"login":r;t.querySelector("ul")&&t.querySelector("ul .ct-".concat(n))&&(t.querySelector("ul .active").classList.remove("active"),t.querySelector("ul .ct-".concat(n)).classList.add("active")),t.querySelector('[class*="-form"].active').classList.remove("active"),t.querySelector(".ct-".concat(n,"-form")).classList.add("active")},i=function(){Array.from(document.querySelectorAll(".ct-header-account > a[href]")).map((function(t){t.hasSearchEventListener||(t.hasSearchEventListener=!0,t.addEventListener("click",(function(e){a(document.querySelector(t.hash),{screen:"login"}),o.a.trigger("ct:overlay:handle-click",{e:e,href:t.hash,options:{isModal:!0}})})),t.hash&&function(t){t&&["login","register","forgot-password"].map((function(e){Array.from(t.querySelectorAll(".ct-".concat(e))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(t,{screen:e})}))}))}))}(document.querySelector(t.hash)))}))},c=r(1);function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l=!1,d=function(t,e,r){return Math.max(t,Math.min(e,r))},y=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},p=function(t){return parseFloat(getComputedStyle(t).getPropertyValue("--height"))},m=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*p(t):p(t)};var h=!1,v=function(){if(document.querySelector("[data-sticky]")){var t=function(){var t=document.querySelector('[data-device="'.concat(Object(c.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=function(t){if(-1===t.dataset.sticky.indexOf("shrink"))return t.parentNode.getBoundingClientRect().height+200;var e=t.parentNode;return 1===e.parentNode.children.length||e.parentNode.children[0].classList.contains("ct-sticky-container")?0:Array.from(e.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(s(t),[0]):[].concat(s(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),0)}(t),r=e>0&&Math.abs(window.scrollY-e)<3||window.scrollY>e,n=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t})),o=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+parseFloat(getComputedStyle(e).getPropertyValue("--height"))}),0);if((n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&(r?(-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(s(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),f(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(o,"px"))):-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-e)>50?(t.dataset.sticky=n.join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(t,"yes")):(t.dataset.sticky=["yes-hide-start"].concat(s(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),f(t,"yes")}),200)}))))),n.indexOf("shrink")>-1){if(r){f(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(o,"px"));var a=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+m(e)}),0);s(t.querySelectorAll('[data-row="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var r=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(r).getPropertyValue("--maxHeight")||50),o=parseFloat(getComputedStyle(r).getPropertyValue("--stickyShrink")||100),a=n*o/100;if(100===o)return;var i=p(t),c=m(t);r.style.setProperty("--logo-shrink-height","".concat(y([e,e+Math.abs(i===c?n-a:i-c)],[100,o],d(e,e+Math.abs(i===c?n-a:i-c),scrollY)),"%"))}})),a!==o&&t.querySelector('[data-row="middle"]')&&[t.querySelector('[data-row="middle"]')].map((function(t){var r=p(t),n=m(t);t.style.setProperty("--shrinkHeight","".concat(y([e,e+Math.abs(r-n)],[r,n],d(e,e+Math.abs(r-n),scrollY)),"px"))}))}else t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(t.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),f(t,"yes");var i=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t}));t.dataset.sticky=(r?["yes"].concat(s(i)):i).join(":")}}};t(),h||(h=!0,window.addEventListener("scroll",(function(){l||(l=!0,requestAnimationFrame((function(){t(),l=!1})))})))}},g=function(t){/comp|inter|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)};g((function(){i(),v()})),o.a.on("blocksy:frontend:init",(function(){i(),v()}))}]);
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t),r.d(t,"onDocumentLoaded",(function(){return g}));var n=r(0),o=r.n(n),a=function(e,t){var r=t.screen,n=void 0===r?"login":r;e.querySelector("ul")&&e.querySelector("ul .ct-".concat(n))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(n)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(n,"-form")).classList.add("active")},i=function(){Array.from(document.querySelectorAll(".ct-header-account > a[href]")).map((function(e){e.hasSearchEventListener||(e.hasSearchEventListener=!0,e.addEventListener("click",(function(t){a(document.querySelector(e.hash),{screen:"login"}),o.a.trigger("ct:overlay:handle-click",{e:t,href:e.hash,options:{isModal:!0}})})),e.hash&&function(e){e&&["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}(document.querySelector(e.hash)))}))},c=r(1);function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=!1,d=function(e,t,r){return Math.max(e,Math.min(t,r))},y=function(e,t,r){return t[0]+(t[1]-t[0])/(e[1]-e[0])*(r-e[0])},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(e.querySelectorAll("[data-row][data-transparent-row]")).map((function(e){e.dataset.transparentRow=t}))},p=function(e){return parseFloat(getComputedStyle(e).getPropertyValue("--height"))},m=function(e){var t=getComputedStyle(e).getPropertyValue("--stickyShrink");return t?parseFloat(t)/100*p(e):p(e)};var h=!1,v=function(){if(document.querySelector("[data-sticky]")){var e=function(){var e=document.querySelector('[data-device="'.concat(Object(c.getCurrentScreen)(),'"] [data-sticky]'));if(e){var t=function(e){if(-1===e.dataset.sticky.indexOf("shrink"))return e.parentNode.getBoundingClientRect().height+200;var t=e.parentNode;return 1===t.parentNode.children.length||t.parentNode.children[0].classList.contains("ct-sticky-container")?0:Array.from(t.parentNode.children).reduce((function(e,t,r){return e.indexOf(0)>-1||!t.dataset.row?[].concat(s(e),[0]):[].concat(s(e),[t.classList.contains("ct-sticky-container")?0:t.getBoundingClientRect().height])}),[]).reduce((function(e,t){return e+t}),0)}(e),r=t>0&&Math.abs(window.scrollY-t)<3||window.scrollY>t,n=e.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e})),o=Array.from(e.querySelectorAll("[data-row]")).reduce((function(e,t){return e+parseFloat(getComputedStyle(t).getPropertyValue("--height"))}),0);if((n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&(r?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(s(n)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(o,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-t)>50?(e.dataset.sticky=n.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),f(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(s(n)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=n.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),f(e,"yes")}),200)}))))),n.indexOf("shrink")>-1){if(r){f(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(o,"px"));var a=Array.from(e.querySelectorAll("[data-row]")).reduce((function(e,t,r){return e+m(t)}),0);s(e.querySelectorAll('[data-row="middle"]')).map((function(e){if(e.querySelector('[data-id="logo"] .site-logo-container')){var r=e.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(r).getPropertyValue("--maxHeight")||50),o=parseFloat(getComputedStyle(r).getPropertyValue("--logoStickyShrink")||1),a=n*o;if(1===o)return;var i=p(e),c=m(e);r.style.setProperty("--logo-shrink-height",y([t,t+Math.abs(i===c?n-a:i-c)],[1,o],d(t,t+Math.abs(i===c?n-a:i-c),scrollY)))}})),a!==o&&e.querySelector('[data-row="middle"]')&&[e.querySelector('[data-row="middle"]')].map((function(e){var r=p(e),n=m(e);e.style.setProperty("--shrinkHeight","".concat(y([t,t+Math.abs(r-n)],[r,n],d(t,t+Math.abs(r-n),scrollY)),"px"))}))}else e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(e){return e.removeAttribute("style")})),f(e,"yes");var i=e.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e}));e.dataset.sticky=(r?["yes"].concat(s(i)):i).join(":")}}};e(),h||(h=!0,window.addEventListener("scroll",(function(){l||(l=!0,requestAnimationFrame((function(){e(),l=!1})))})))}},g=function(e){/comp|inter|loaded/.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",e,!1)};g((function(){i(),v()})),o.a.on("blocksy:frontend:init",(function(){i(),v()}))}]);
static/bundle/options.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
static/bundle/options.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=ctEvents},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(11);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(13);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t,n){var r=n(6),o=n(12);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O=[],v=[],j=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(b(e),b(n.map((function(e){return d(d({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(b(e),[d({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),f=i[0],p=i[1],m=u(Object(r.useState)(v),2),y=m[0],j=m[1],h=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule};return Object(r.useEffect)((function(){Promise.all(["posts","pages","ct_cpt"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat("ct_cpt"===e?"posts":e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100").concat("ct_cpt"===e?"&post_type=ct_cpt":"")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);p(t),O=t})),Promise.all(["categories","tags"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat(e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);j(t),v=t}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":h(e),"ct-cols-2":!h(e)}),key:i},Object(r.createElement)(a.Select,{option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return d({},n===i?d(d({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{option:{placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return d({},n===i?d(d({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{defaultToFirstItem:!1,placeholder:"post_ids"===e.rule?Object(c.__)("Select post","blc"):"page_ids"===e.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:f.filter((function(t){var n=t.type;return"post_ids"===e.rule?"post"===n:"page_ids"===e.rule?"page"===n:"post"!==n&&"page"!==n})).map((function(e){return{key:e.id,value:e.title.rendered}})),search:!0},value:(e.payload||{}).post_id||"",onChange:function(r){n(t.map((function(t,n){return d({},n===i?d(d({},e),{},{payload:d(d({},e.payload),{},{post_id:r})}):t)})))}}),"taxonomy_ids"===e.rule&&Object(r.createElement)(a.Select,{option:{defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:y.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return d({},n===i?d(d({},e),{},{payload:d(d({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=b(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(b(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(b(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t=e.option.display,n=void 0===t?"inline":t,o=e.value,i=e.onChange,l=h(Object(r.useState)(!1),2),u=l[0],s=l[1],f=h(Object(r.useState)(null),2),d=f[0],p=f[1];return"inline"===n?Object(r.createElement)(j,{value:o,onChange:i}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0),p(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:u,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){s(!1),p(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,Object(c.__)("Transparent Header Display Conditions","blc")),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions to display the transparent header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(j,{value:d||o,onChange:function(e){p(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){i(d),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(5),w=n.n(E),S=n(7),x=n(8),P=n.n(x),C=n(9),A=n.n(C),k=n(10),N=n.n(k);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M=A()(),U=function(e){e.forcedEdit;var t,n,o=e.headerId,i=F(Object(r.useState)(!1),2),l=i[0],u=i[1],s=F(Object(r.useState)(null),2),f=s[0],d=s[1],p=Object(r.useContext)(a.PlacementsDragDropContext),b=(p.builderValueCollection,p.builderValueDispatch,Object(r.useRef)()),m=N()(M),y=P()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){T(c,r,o,a,i,"next",e)}function i(e){T(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,v=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){v||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),d(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){d((function(e){return[].concat(D((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},I(e,"design","none"),I(e,"label",!1),e)},value:{conditions:((f||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!f,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(f)}).then((function(e){return e.json()})).then((function(){M(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function V(){return(V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(S.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,f="builder_header_panel_".concat(i),d=ct_customizer_localizations.header_builder_data.header_data.header_options,p={label:s,"inner-options":B(B({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(U,{headerId:i})}}}:{}),d)};return Object(r.createElement)(a.PanelMetaWrapper,V({id:f,key:i,option:p},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:f,getValues:function(){return B({id:i},n.settings||{})},option:p,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(d,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};w.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(G,null)))}})),w.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=ctEvents},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(11);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(13);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t,n){var r=n(6),o=n(12);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O=[],v=[],j=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(b(e),b(n.map((function(e){return f(f({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(b(e),[f({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],p=i[1],y=u(Object(r.useState)(v),2),m=y[0],j=y[1],h=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule};return Object(r.useEffect)((function(){Promise.all(["posts","pages","ct_cpt"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat("ct_cpt"===e?"posts":e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100").concat("ct_cpt"===e?"&post_type=ct_cpt":"")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);p(t),O=t})),Promise.all(["categories","tags"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat(e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(b(e),b(t))}),[]);j(t),v=t}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":h(e),"ct-cols-2":!h(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return f({},n===i?f(f({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return f({},n===i?f(f({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(a.Select,{key:"third",option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:"post_ids"===e.rule?Object(c.__)("Select post","blc"):"page_ids"===e.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:d.filter((function(t){var n=t.type;return"post_ids"===e.rule?"post"===n:"page_ids"===e.rule?"page"===n:"post"!==n&&"page"!==n})).map((function(e){return{key:e.id,value:e.title.rendered}})),search:!0},value:(e.payload||{}).post_id||"",onChange:function(r){n(t.map((function(t,n){return f({},n===i?f(f({},e),{},{payload:f(f({},e.payload),{},{post_id:r})}):t)})))}}),"taxonomy_ids"===e.rule&&Object(r.createElement)(a.Select,{option:{defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:m.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return f({},n===i?f(f({},e),{},{payload:f(f({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=b(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(b(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(b(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t=e.option.display,n=void 0===t?"inline":t,o=e.value,i=e.onChange,l=h(Object(r.useState)(!1),2),u=l[0],s=l[1],d=h(Object(r.useState)(null),2),f=d[0],p=d[1];return"inline"===n?Object(r.createElement)(j,{value:o,onChange:i}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0),p(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:u,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){s(!1),p(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,Object(c.__)("Transparent Header Display Conditions","blc")),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions to display the transparent header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(j,{value:f||o,onChange:function(e){p(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!f,onClick:function(){i(f),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(5),w=n.n(E),S=n(7),x=n(8),P=n.n(x),C=n(9),k=n.n(C),A=n(10),N=n.n(A);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M=k()(),U=function(e){e.forcedEdit;var t,n,o=e.headerId,i=F(Object(r.useState)(!1),2),l=i[0],u=i[1],s=F(Object(r.useState)(null),2),d=s[0],f=s[1],p=Object(r.useContext)(a.PlacementsDragDropContext),b=(p.builderValueCollection,p.builderValueDispatch,Object(r.useRef)()),y=N()(M),m=P()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){T(c,r,o,a,i,"next",e)}function i(e){T(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[y]}),O=m.data,v=m.isLoading;m.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){v||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),f(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){f((function(e){return[].concat(D((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},I(e,"design","none"),I(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){M(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function V(){return(V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(S.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),f=ct_customizer_localizations.header_builder_data.header_data.header_options,p={label:s,"inner-options":z(z({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(U,{headerId:i})}}}:{}),f)};return Object(r.createElement)(a.PanelMetaWrapper,V({id:d,key:i,option:p},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return z({id:i},n.settings||{})},option:p,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(f,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};w.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(G,null)))}})),w.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g}))}]);
static/js/frontend/sticky.js CHANGED
@@ -235,14 +235,13 @@ export const mountStickyHeader = () => {
235
 
236
  const stickyShrink = parseFloat(
237
  getComputedStyle(logo).getPropertyValue(
238
- '--stickyShrink'
239
- ) || 100
240
  )
241
 
242
- const stickyHeight =
243
- (initialHeight * stickyShrink) / 100
244
 
245
- if (stickyShrink === 100) {
246
  return
247
  }
248
 
@@ -251,7 +250,7 @@ export const mountStickyHeader = () => {
251
 
252
  logo.style.setProperty(
253
  '--logo-shrink-height',
254
- `${computeLinearScale(
255
  [
256
  startPosition,
257
  startPosition +
@@ -262,7 +261,7 @@ export const mountStickyHeader = () => {
262
  rowStickyHeight
263
  ),
264
  ],
265
- [100, stickyShrink],
266
  clamp(
267
  startPosition,
268
  startPosition +
@@ -275,7 +274,7 @@ export const mountStickyHeader = () => {
275
 
276
  scrollY
277
  )
278
- )}%`
279
  )
280
  }
281
  })
235
 
236
  const stickyShrink = parseFloat(
237
  getComputedStyle(logo).getPropertyValue(
238
+ '--logoStickyShrink'
239
+ ) || 1
240
  )
241
 
242
+ const stickyHeight = initialHeight * stickyShrink
 
243
 
244
+ if (stickyShrink === 1) {
245
  return
246
  }
247
 
250
 
251
  logo.style.setProperty(
252
  '--logo-shrink-height',
253
+ computeLinearScale(
254
  [
255
  startPosition,
256
  startPosition +
261
  rowStickyHeight
262
  ),
263
  ],
264
+ [1, stickyShrink],
265
  clamp(
266
  startPosition,
267
  startPosition +
274
 
275
  scrollY
276
  )
277
+ )
278
  )
279
  }
280
  })
static/js/options/ConditionsManager.js CHANGED
@@ -85,6 +85,7 @@ const ConditionsManager = ({ value, onChange }) => {
85
  })}
86
  key={index}>
87
  <Select
 
88
  option={{
89
  inputClassName: 'ct-condition-type',
90
  selectInputStart: () => (
@@ -112,7 +113,9 @@ const ConditionsManager = ({ value, onChange }) => {
112
  />
113
 
114
  <Select
 
115
  option={{
 
116
  placeholder: __('Select rule', 'blc'),
117
  choices:
118
  condition.category === 'user'
@@ -145,7 +148,9 @@ const ConditionsManager = ({ value, onChange }) => {
145
  condition.rule === 'custom_post_type_ids' ||
146
  condition.rule === 'page_ids') && (
147
  <Select
 
148
  option={{
 
149
  defaultToFirstItem: false,
150
  placeholder:
151
  condition.rule === 'post_ids'
85
  })}
86
  key={index}>
87
  <Select
88
+ key="first"
89
  option={{
90
  inputClassName: 'ct-condition-type',
91
  selectInputStart: () => (
113
  />
114
 
115
  <Select
116
+ key="second"
117
  option={{
118
+ appendToBody: true,
119
  placeholder: __('Select rule', 'blc'),
120
  choices:
121
  condition.category === 'user'
148
  condition.rule === 'custom_post_type_ids' ||
149
  condition.rule === 'page_ids') && (
150
  <Select
151
+ key="third"
152
  option={{
153
+ appendToBody: true,
154
  defaultToFirstItem: false,
155
  placeholder:
156
  condition.rule === 'post_ids'