1 line
6.1 KiB
JavaScript
1 line
6.1 KiB
JavaScript
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=309)}({137:function(e,n,t){"use strict";t.d(n,"a",(function(){return c})),t.d(n,"c",(function(){return i})),t.d(n,"b",(function(){return u}));var r,o=window.CustomEvent||null,c=function(e,n){var t=n.bubbles,r=void 0!==t&&t,c=n.cancelable,i=void 0!==c&&c,u=n.element,a=n.detail,d=void 0===a?{}:a;if(o){u||(u=document.body);var f=new o(e,{bubbles:r,cancelable:i,detail:d});u.dispatchEvent(f)}},i=function(){r&&clearTimeout(r),r=setTimeout((function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},u=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(n,{bubbles:t,cancelable:r})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},2:function(e,n){e.exports=window.wc.wcSettings},27:function(e,n){e.exports=window.regeneratorRuntime},309:function(e,n,t){e.exports=t(324)},324:function(e,n,t){"use strict";t.r(n);var r=t(39),o=t.n(r),c=t(4),i=t.n(c),u=t(27),a=t.n(u),d=t(2),f=function(e){var n=e.handle,t=e.src,r=e.version;if(0===document.querySelectorAll("#".concat(n,"-js, #").concat(n,"-js-prefetch")).length){var o=document.createElement("link");o.href=r?"".concat(t,"?ver=").concat(r):t,o.rel="preload",o.as="script",o.id="".concat(n,"-js-prefetch"),document.head.appendChild(o)}},s=t(49),l=function(e){return document.querySelectorAll("script#".concat(e)).length>0},b=function(e){if(Object(s.c)(e.id)&&!l(e.id)){var n=document.createElement("script");for(var t in e)if(e.hasOwnProperty(t)){var r=t;if("onload"!==r&&"onerror"!==r){var o=e[r];Object(s.c)(o)&&(n[r]=o)}}"function"==typeof e.onload&&(n.onload=e.onload),"function"==typeof e.onerror&&(n.onerror=e.onerror),document.body.appendChild(n)}},p=function(e){var n=e.handle,t=e.src,r=e.version,o=e.after,c=e.before,i=e.translations;return new Promise((function(e,u){l("".concat(n,"-js"))&&e(),i&&b({id:"".concat(n,"-js-translations"),innerHTML:i}),c&&b({id:"".concat(n,"-js-before"),innerHTML:c}),b({id:"".concat(n,"-js"),onerror:u,onload:function(){o&&b({id:"".concat(n,"-js-after"),innerHTML:o}),e()},src:r?"".concat(t,"?ver=").concat(r):t})}))},v=t(137);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){i()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}window.onload=function(){var e=document.querySelectorAll(".wc-block-mini-cart"),n=!1;if(0!==e.length){var t=Object(d.getSetting)("mini_cart_block_frontend_dependencies",{});for(var r in t){var c=t[r];f(m({handle:r},c))}var i=Object(v.b)("adding_to_cart","wc-blocks_adding_to_cart"),u=Object(v.b)("added_to_cart","wc-blocks_added_to_cart"),s=function(){var e=o()(a.a.mark((function e(){var r,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=2;break}return e.abrupt("return");case 2:n=!0,document.body.removeEventListener("wc-blocks_adding_to_cart",s),i(),e.t0=a.a.keys(t);case 6:if((e.t1=e.t0()).done){e.next=13;break}return r=e.t1.value,o=t[r],e.next=11,p(m({handle:r},o));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();document.body.addEventListener("wc-blocks_adding_to_cart",s),e.forEach((function(e,t){if(e instanceof HTMLElement){var r=e.querySelector(".wc-block-mini-cart__button"),o=e.querySelector(".wc-block-components-drawer__screen-overlay");if(r&&o){var c=function(){n||s(),document.body.removeEventListener("wc-blocks_added_to_cart",i),e.dataset.isPlaceholderOpen="true",o.classList.add("wc-block-components-drawer__screen-overlay--with-slide-in"),o.classList.remove("wc-block-components-drawer__screen-overlay--is-hidden"),u()},i=function(){e.dataset.isDataOutdated="true",c()};r.addEventListener("mouseover",s),r.addEventListener("focus",s),r.addEventListener("click",c),0===t&&document.body.addEventListener("wc-blocks_added_to_cart",i)}}}))}}},39:function(e,n){function t(e,n,t,r,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void t(e)}u.done?n(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,c){var i=e.apply(n,r);function u(e){t(i,o,c,u,a,"next",e)}function a(e){t(i,o,c,u,a,"throw",e)}u(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},4:function(e,n){e.exports=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},e.exports.default=e.exports,e.exports.__esModule=!0},49:function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"c",(function(){return o})),t.d(n,"b",(function(){return c})),t.d(n,"d",(function(){return i}));var r=function(e){return"number"==typeof e},o=function(e){return"string"==typeof e},c=function(e){return!function(e){return null===e}(e)&&e instanceof Object&&e.constructor===Object};function i(e,n){return c(e)&&n in e}}}); |