try{
try{
try{
try{
try{

/*! For license information please see cart.js.LICENSE.txt */
(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>P});const r=window.jQuery;var n=t.n(r);const o=window.wcPPCP.utils,a=window.wp.apiFetch;var i=t.n(a);const c=window.wp.hooks;function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(){p=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function d(){}function y(){}var v={};c(v,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(_([])));w&&w!==e&&r.call(w,o)&&(v=w);var m=y.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(h).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=y,c(m,"constructor",y),c(y,"constructor",d),d.displayName=c(y,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(P.prototype),c(P.prototype,a,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new P(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(m),c(m,i,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function d(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){d(a,n,o,i,c,"next",t)}function c(t){d(a,n,o,i,c,"throw",t)}i(void 0)}))}}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function w(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}const P=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(k,t);var e,r,a,c,u,s,f,h,d,P,O=(d=k,P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(d);if(P){var r=b(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return w(this,t)});function k(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,k),(t=O.call(this)).data=(0,o.getSetting)("cart"),t.page=(0,o.getSetting)("generalData").page,t.processing=!1,n()(document.body).on("updated_wc_div",t.onCartUpdated.bind(m(t))),n()(document.body).on("updated_cart_totals",t.onCartUpdated.bind(m(t))),n()(document.body).on("updated_checkout",t.onUpdatedCheckout.bind(m(t))),n()(document.body).on("wc_fragments_refreshed wc_fragments_loaded",t.onCartFragmentsChanged.bind(m(t))),t}return e=k,r=[{key:"onCartUpdated",value:(h=y(p().mark((function t(e){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.wcPPCPCartData){t.next=5;break}return t.next=3,this.refreshData(window.wcPPCPCartData);case 3:t.next=7;break;case 5:return t.next=7,this.refreshData(null);case 7:(0,o.setSetting)("queryParams",this.data.queryParams),this.trigger("cartUpdated",this);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"onUpdatedCheckout",value:(f=y(p().mark((function t(e){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refreshData(window.wcPPCPCartData?window.wcPPCPCartData:null);case 2:(0,o.setSetting)("queryParams",this.data.queryParams),this.trigger("updatedCheckout",this);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"onCartFragmentsChanged",value:function(){var t=this;setTimeout((function(){window.wcPPCPMiniCartUpdate&&(t.data=l(l({},t.data),wcPPCPMiniCartUpdate)),t.trigger("fragmentsChanged",t)}),250)}},{key:"getData",value:function(){return(0,o.getSetting)("cart")}},{key:"needsShipping",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.needsShipping}},{key:"isEmpty",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.isEmpty}},{key:"refreshData",value:(s=y(p().mark((function t(){var e,r,n=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.length>0&&void 0!==n[0]?n[0]:null)){t.next=5;break}this.data=l(l({},this.data),e),t.next=21;break;case 5:if(this.processing){t.next=21;break}return t.prev=6,this.processing=!0,t.next=10,i()({method:"POST",url:(0,o.getRestRoute)("cart/refresh"),data:{page:this.page}});case 10:r=t.sent,this.data=l(l({},this.data),r.cart),this.data.queryParams=r.queryParams,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(6),console.log(t.t0);case 18:return t.prev=18,this.processing=!1,t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[6,15,18,21]])}))),function(){return s.apply(this,arguments)})},{key:"addToCart",value:(u=y(p().mark((function t(e){var r=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i()({method:"POST",url:(0,o.getRestRoute)("cart/item"),data:this.applyFilters("addToCartData",e,this)}).then((function(t){return r.sanitizeResponse(t)})).catch((function(t){throw t})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"createOrder",value:(c=y(p().mark((function t(e){var r=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i()({method:"POST",url:(0,o.getRestRoute)("cart/order"),data:e}).then((function(t){return r.sanitizeResponse(t)})));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"doOrderPay",value:(a=y(p().mark((function t(e){var r,n=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,o.getSetting)("order"),t.abrupt("return",i()({method:"POST",url:(0,o.getRestRoute)("order/pay"),data:l({payment_method:e},r)}).then((function(t){return n.sanitizeResponse(t)})));case 2:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"getTotal",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.total}},{key:"sanitizeResponse",value:function(t){return"string"==typeof t?t=t.replace(/<[^>]*>/g,""):Array.isArray(t)&&(t=this.sanitizeResponse(t[0])),t}}],r&&v(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),k}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hooks=(0,c.createHooks)()}var e,r;return e=t,r=[{key:"on",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.hooks.addAction(t,"wcPPCP",e,r)}},{key:"trigger",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=this.hooks).doAction.apply(e,[t].concat(n))}},{key:"addFilter",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.hooks.addFilter(t,"wcPPCP",e,r)}},{key:"applyFilters",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(e=this.hooks).applyFilters.apply(e,[t].concat(n))}}],r&&u(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()));(this.wcPPCP=this.wcPPCP||{}).cart=e})();



}
catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://www.hopchicago.com/wp-content/plugins/pymntpl-paypal-woocommerce/build/js/cart.js\n- Error message: "+ e.message);}

(()=>{"use strict";var e,r={567:e=>{e.exports=window.jQuery},819:e=>{e.exports=window.lodash},455:e=>{e.exports=window.wcPPCP.cart},907:e=>{e.exports=window.wcPPCP.utils},989:e=>{e.exports=window.wp.apiFetch},694:e=>{e.exports=window.wp.hooks}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,t),i.exports}t.m=r,e=[],t.O=(r,o,n,i)=>{if(!o){var a=1/0;for(d=0;d<e.length;d++){for(var[o,n,i]=e[d],p=!0,s=0;s<o.length;s++)(!1&i||a>=i)&&Object.keys(t.O).every((e=>t.O[e](o[s])))?o.splice(s--,1):(p=!1,i<a&&(a=i));if(p){e.splice(d--,1);var l=n();void 0!==l&&(r=l)}}return r}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[o,n,i]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.j=271,(()=>{var e={271:0,129:0,577:0,966:0,419:0,296:0,242:0,205:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,i,[a,p,s]=o,l=0;if(a.some((r=>0!==e[r]))){for(n in p)t.o(p,n)&&(t.m[n]=p[n]);if(s)var d=s(t)}for(r&&r(o);l<a.length;l++)i=a[l],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return t.O(d)},o=self.webpackChunkwcPPCP=self.webpackChunkwcPPCP||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=t.O(void 0,[112],(()=>t(166)));n=t.O(n),(this.wcPPCP=this.wcPPCP||{}).paypalCart=n})();



}
catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://www.hopchicago.com/wp-content/plugins/pymntpl-paypal-woocommerce/build/js/paypal-cart.js\n- Error message: "+ e.message);}

/*! For license information please see frontend-commons.js.LICENSE.txt */
"use strict";(self.webpackChunkwcPPCP=self.webpackChunkwcPPCP||[]).push([[112],{330:(t,e,n)=>{n.d(e,{Z:()=>l});var r=n(567),i=n.n(r),o=n(907),a=n(694);function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var u=/^(2(05|42|96)|419|868)$/.test(n.j)?function(){function t(e,n){var r=n.queryParams;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.queryParams=r,a.defaultHooks.addAction("paypalInstanceCreated","wcPPCP",this.paypalInstanceCreated.bind(this))}var e,n;return e=t,(n=[{key:"paypalInstanceCreated",value:function(t,e){this.paypal!==t&&(this.paypal=t,this.queryParams=e,this.createMessage())}},{key:"isCheckoutFlow",value:function(){var t;return"true"!==(null===(t=this.queryParams)||void 0===t?void 0:t.vault)}},{key:"initialize",value:function(){this.createMessage()}},{key:"createMessage",value:function(){var t=this,e=this.getMessageContainer();if(e)if(this.isCheckoutFlow()&&this.isActive()){this.showContainer(e);var n={amount:this.getTotal(),currency:this.getCurrency(),placement:this.getPlacement(),style:this.getStyleOptions(this.context),onRender:function(){t.onRender(e)}};this.paypal.Messages(n).render(e)}else this.hideMessage(e)}},{key:"showContainer",value:function(t){i()(t).closest(".wc-ppcp-paylater-msg__container").show()}},{key:"hideMessage",value:function(t){i()(t).closest(".wc-ppcp-paylater-msg__container").hide()}},{key:"getMessageContainer",value:function(){}},{key:"getStyleOptions",value:function(t){var e,n;return null===(e=(0,o.getSetting)("payLaterMessage"))||void 0===e||null===(n=e[t])||void 0===n?void 0:n.style}},{key:"getSetting",value:function(t){var e;return null===(e=(0,o.getSetting)("payLaterMessage"))||void 0===e?void 0:e[t]}},{key:"getTotal",value:function(){return 0}},{key:"getPlacement",value:function(){return""}},{key:"getCurrency",value:function(){var t;return null===(t=this.queryParams)||void 0===t?void 0:t.currency}},{key:"isActive",value:function(){return(0,o.getSetting)("payLaterMessage").enabled}},{key:"onRender",value:function(t){var e=function(){var e=t.querySelector('[name^="__zoid__paypal_message"]');e&&(e.style.width="100%",e.style.opacity="1")};e(),setTimeout(e,1e3)}}])&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}():null;const l=/^(2(05|42|96)|419|868)$/.test(n.j)?u:null},501:(t,e,n)=>{n.r(e),n.d(e,{PayLaterMessageCart:()=>b});var r=n(567),i=n.n(r),o=n(330),a=n(455),c=n.n(a),u=n(907);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=k(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function y(){}var g={};c(g,i,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(S([])));b&&b!==e&&n.call(b,i)&&(g=b);var m=y.prototype=d.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,c){var u=p(t[i],t,o);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=y,c(m,"constructor",y),c(y,"constructor",h),h.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},_(w.prototype),c(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new w(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(m),c(m,a,"Generator"),c(m,i,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function p(t,e,n,r,i,o,a){try{var c=t[o](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,i)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=h(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(this,arguments)}function h(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function g(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(l,t);var e,n,r,o,a,c,u=(a=l,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(a);if(c){var n=v(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return g(this,t)});function l(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(r=u.call(this,"cart",n)).paypal=t,r.cart=e,r.initialize(),r}return e=l,n=[{key:"initialize",value:function(){d(v(l.prototype),"initialize",this).call(this),this.cart.on("cartUpdated",this.refreshMessage.bind(this))}},{key:"refreshMessage",value:(r=s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.createMessage();case 1:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);function a(t){p(o,n,i,a,c,"next",t)}function c(t){p(o,n,i,a,c,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"getTotal",value:function(){return this.cart.getTotal()}},{key:"getMessageContainer",value:function(){var t=this.getSetting("cartLocation"),e=document.getElementById("wc-ppcp-paylater-msg-cart");if(e&&this.getSetting("isShortcode"))return e;switch(t){case"shop_table":e=document.getElementById("wc-ppcp-paylater-msg-cart");break;case"above_button":var n;(e=document.getElementById("wc-ppcp-cart-button-container"))&&(null!==(n=i()(e).find("#wc-ppcp-paylater-msg-cart"))&&void 0!==n&&n.length||i()(e).prepend('<div id="wc-ppcp-paylater-msg-cart"></div>'),e=document.getElementById("wc-ppcp-paylater-msg-cart"))}return e}},{key:"getPlacement",value:function(){return"cart"}}],n&&f(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.Z),m=(0,u.getPayPalQueryParams)();(0,u.loadPayPalSdk)(m).then((function(t){new b(t,c(),{queryParams:m})})).catch((function(t){}))},372:(t,e,n)=>{n.r(e),n.d(e,{PayLaterMessageCheckout:()=>g,default:()=>m});var r=n(567),i=n.n(r),o=n(330),a=n(907),c=n(455),u=n.n(c);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=f(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function h(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(r);if(o){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return h(this,t)});function c(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(r=a.call(this,"checkout",n)).paypal=t,r.cart=e,r.initialize(),r}return e=c,(n=[{key:"initialize",value:function(){this.cart.on("updatedCheckout",this.createMessage.bind(this),20),p(y(c.prototype),"initialize",this).call(this)}},{key:"getMessageContainer",value:function(){var t;switch(this.getSetting("checkoutLocation")){case"shop_table":t=document.getElementById("wc-ppcp-paylater-msg-checkout");break;case"above_button":(t=document.querySelector(".wc-ppcp-checkout-container"))?(i()(t).find("#wc-ppcp-paylater-msg-checkout").remove(),i()(t).prepend('<div id="wc-ppcp-paylater-msg-checkout"></div>'),t=document.getElementById("wc-ppcp-paylater-msg-checkout")):setTimeout(this.createMessage.bind(this),500)}return t}},{key:"getPlacement",value:function(){return"payment"}},{key:"getTotal",value:function(){return this.cart.getTotal()}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.Z),v=null,b=(0,a.getSetting)("ppcp_data");b&&b.placeOrderEnabled&&(v=(0,a.getPayPalQueryParams)()),(0,a.loadPayPalSdk)(v).then((function(t){new g(t,u(),{queryParams:(0,a.getPayPalQueryParams)()})}));const m=242==n.j?g:null},857:(t,e,n)=>{n.r(e);var r=n(567),i=n.n(r),o=n(330),a=n(455),c=n.n(a),u=n(907);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=f(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function h(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(r);if(o){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return h(this,t)});function c(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(r=a.call(this,"minicart",n)).paypal=t,r.cart=e,r.initialize(),r}return e=c,(n=[{key:"initialize",value:function(){p(y(c.prototype),"initialize",this).call(this),this.cart.on("fragmentsChanged",this.createMessage.bind(this))}},{key:"getMessageContainer",value:function(){var t=null;switch(i()("#wc-ppcp-minicart-msg").remove(),this.getSetting("miniCartLocation")){case"cart_total":t=document.querySelector(".woocommerce-mini-cart__total"),i()(t).after('<p class="wc-ppcp-minicart-msg__container"><span id="wc-ppcp-minicart-msg"></span></p>');break;case"checkout":t=document.querySelector(".woocommerce-mini-cart__buttons .checkout"),i()(t).after('<span id="wc-ppcp-minicart-msg"></span>')}return t?document.getElementById("wc-ppcp-minicart-msg"):document.querySelector(".woocommerce-mini-cart__total")}},{key:"showContainer",value:function(t){i()(t).show()}},{key:"hideMessage",value:function(t){i()(t).hide()}},{key:"getTotal",value:function(){return this.cart.getTotal()}},{key:"getPlacement",value:function(){return"cart"}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.Z),v=(0,u.getPayPalQueryParams)();(0,u.loadPayPalSdk)(v).then((function(t){new g(t,c(),{queryParams:v})})).catch((function(t){}))},551:(t,e,n)=>{n.r(e),n.d(e,{PayLaterMessageProduct:()=>g,default:()=>b});var r=n(567),i=n.n(r),o=n(330),a=n(719),c=n.n(a),u=n(907);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=f(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function h(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(r);if(o){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return h(this,t)});function c(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(r=a.call(this,"product",n)).paypal=t,r.product=e,r.initialize(),r}return e=c,(n=[{key:"initialize",value:function(){this.product.on("quantityChange",this.onQuantityChange.bind(this)),this.product.on("foundVariation",this.onFoundVariation.bind(this)),this.product.on("resetVariation",this.onResetVariation.bind(this)),p(y(c.prototype),"initialize",this).call(this)}},{key:"onQuantityChange",value:function(t){this.createMessage()}},{key:"onFoundVariation",value:function(t){this.createMessage()}},{key:"onResetVariation",value:function(t){this.createMessage()}},{key:"getMessageContainer",value:function(){return document.getElementById("wc-ppcp-paylater-msg-product")||i()("form.checkout .shop_table").after('<div id="wc-ppcp-paylater-msg-product"></div>'),document.getElementById("wc-ppcp-paylater-msg-product")}},{key:"getTotal",value:function(){return this.product.getTotal()}},{key:"getPlacement",value:function(){return"product"}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.Z),v=(0,u.getPayPalQueryParams)();(0,u.loadPayPalSdk)(v).then((function(t){new g(t,new(c()),{queryParams:v})})).catch((function(t){}));const b=868==n.j?g:null},200:(t,e,n)=>{n.r(e);var r=n(567),i=n.n(r),o=n(907);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}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}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=s(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},l.apply(this,arguments)}function s(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(h,t);var e,n,r,a,s=(r=h,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(r);if(a){var n=d(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return f(this,t)});function h(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(t=s.call(this,"shop",{queryParams:(0,o.getPayPalQueryParams)()})).data=(0,o.getSetting)("payLaterMessage"),t.initialize(),t}return e=h,(n=[{key:"initialize",value:function(){(0,o.loadPayPalSdk)((0,o.getPayPalQueryParams)())}},{key:"getValidProductTypes",value:function(){return this.data.shop.product_types}},{key:"isSupportedProduct",value:function(t){return this.getValidProductTypes().includes(t)}},{key:"createMessage",value:function(){var t,e=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(this.data.shop.products);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.isSupportedProduct(n.product_type)&&(this.currentProduct=n,l(d(h.prototype),"createMessage",this).call(this))}}catch(t){e.e(t)}finally{e.f()}}},{key:"getMessageContainer",value:function(){return document.getElementById("wc-ppcp-paylater-msg-".concat(this.currentProduct.id))||(this.isBelowPrice()?i()(".post-".concat(this.currentProduct.id," .price")).after('<div class="wc-ppcp-paylater-msg-shop-container" id="wc-ppcp-paylater-msg-'.concat(this.currentProduct.id,'"></div>')):i()(".post-".concat(this.currentProduct.id," a.button")).after('<div class="wc-ppcp-paylater-msg-shop-container" id="wc-ppcp-paylater-msg-'.concat(this.currentProduct.id,'"></div>'))),document.getElementById("wc-ppcp-paylater-msg-".concat(this.currentProduct.id))}},{key:"getTotal",value:function(){return this.currentProduct.total}},{key:"getPlacement",value:function(){return"category"}},{key:"isBelowPrice",value:function(){return"below_price"===this.data.shop.msgLocation}},{key:"showContainer",value:function(t){i()(t).show()}},{key:"hideMessage",value:function(t){i()(t).hide()}}])&&u(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(n(330).Z))},201:(t,e,n)=>{n.d(e,{ZC:()=>b,tC:()=>M,Oq:()=>R,K3:()=>tt,o4:()=>Q});var r=n(567),i=n.n(r),o=n(989),a=n.n(o),c=n(694),u=n(907),l=n(819),s=["color","label"];function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(t,e)||y(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 f(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if(t){if("string"==typeof t)return g(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)?g(t,e):void 0}}function g(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 v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var b=function(){function t(e){var n=e.id,r=e.context,i=e.container,o=void 0===i?null:i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n,this.buttons={},this.actions={},this.context=r,this.settings=(0,u.getSetting)("".concat(n,"_data")),this.container=o||"li.payment_method_".concat(n),this.order_field_key="".concat(this.id,"_paypal_order_id"),this.billing_token_key="".concat(this.id,"_billing_token")}var e,n;return e=t,n=[{key:"initialize",value:function(){var t=this;this.loadPayPalScript().then((function(){t.initializeEvents(),t.createButton()}))}},{key:"initializeEvents",value:function(){}},{key:"isActive",value:function(){return null!==this.getData()}},{key:"loadPayPalScript",value:function(){var t=this;return new Promise((function(e,n){(0,u.loadPayPalSdk)(t.getPayPalSDKArgs()).then((function(n){t.paypal=n,e()})).catch((function(e){console.log(e),null!=e&&e.code&&t.submitError((0,u.getErrorMessage)(e)),n()}))}))}},{key:"getPayPalSDKArgs",value:function(){return(0,u.getPayPalQueryParams)()}},{key:"getClientId",value:function(){var t=(0,u.getSetting)("generalData"),e=t.clientId,n=void 0===e?null:e,r=t.environment;return n||"sandbox"!=r||(n="sb"),n}},{key:"getData",value:function(){return i()("".concat(this.container)).find(".wc-ppcp-payment-method-data").data("payment-method-data")||null}},{key:"setData",value:function(t){i()("".concat(this.container)).find(".wc-ppcp-payment-method-data").data("payment-method-data",t)}},{key:"setOption",value:function(t,e){var n=this.getData();n&&(n[t]=e,this.setData(n))}},{key:"setVariable",value:function(t,e){(0,u.getSetting)("".concat(this.id,"_data"))[t]=e}},{key:"getVariable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,u.getSetting)("".concat(this.id,"_data"));return n.hasOwnProperty(t)?n[t]:(e&&this.setVariable(t,e),e)}},{key:"getOption",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getData();return n.hasOwnProperty(t)?n[t]:(e&&this.setOption(t,e),e)}},{key:"createButton",value:function(){var t=this,e=this.getButtonContainer();e&&!i()(e).find(".paypal-buttons").length&&(this.getSortedFunding(this.getFunding()).forEach((function(n){var r=t.paypal.Buttons(t.getButtonOptions(n));if(t.buttons[n]=r,r.isEligible())if(e instanceof NodeList){var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=y(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;r.render(a)}}catch(t){o.e(t)}finally{o.f()}}else r.render(e)})),this.$button=i()(e),c.defaultHooks.doAction("wcPPCPButtonCreated",this))}},{key:"getButton",value:function(){return this.$button}},{key:"destroyButtons",value:function(){var t=this;Object.keys(this.buttons).forEach((function(e){t.buttons[e].close&&t.buttons[e].close()}))}},{key:"disableButtons",value:function(){var t=this;Object.keys(this.actions).forEach((function(e){t.actions[e].disable()}))}},{key:"enableButtons",value:function(){var t=this;Object.keys(this.actions).forEach((function(e){t.actions[e].enable()}))}},{key:"getFunding",value:function(){var t,e,n,r,i,o,a,c=[],u=(null===(t=this.settings)||void 0===t?void 0:t.funding)||[];return null!==(e=this.settings)&&void 0!==e&&null!==(n=e.paypal_sections)&&void 0!==n&&n.includes(this.getPage())&&c.push(paypal.FUNDING.PAYPAL),u.includes("paylater")&&null!==(r=this.settings)&&void 0!==r&&null!==(i=r.paylater_sections)&&void 0!==i&&i.includes(this.getPage())&&this.isCheckoutFlow()&&c.push(paypal.FUNDING.PAYLATER),u.includes("card")&&null!==(o=this.settings)&&void 0!==o&&null!==(a=o.credit_card_sections)&&void 0!==a&&a.includes(this.getPage())&&c.push(paypal.FUNDING.CARD),c}},{key:"isFundingActive",value:function(t){var e,n;return null===(e=this.settings)||void 0===e||null===(n=e.funding)||void 0===n?void 0:n.includes(t)}},{key:"isSectionEnabled",value:function(t,e){var n,r,i="".concat(t,"_sections");return null===(n=this.settings)||void 0===n||null===(r=n[i])||void 0===r?void 0:r.includes(e)}},{key:"getSortedFunding",value:function(t){var e=this.settings.buttons_order||[];return t.sort((function(t,n){return e.indexOf(t)<e.indexOf(n)?-1:1})),t}},{key:"getButtonContainer",value:function(){return null}},{key:"getButtonOptions",value:function(t){var e=this,n={fundingSource:t,style:this.getButtonStyle(t),onInit:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.onInit.apply(e,[t].concat(r)),i()(document.body).triggerHandler("wc_ppcp_on_init",[e,t])},onClick:function(){e.onClick.apply(e,arguments),i()(document.body).triggerHandler("wc_ppcp_on_click",[e,t])},onApprove:function(n,r){e.onApprove(n,r),i()(document.body).triggerHandler("wc_ppcp_on_approve",[e,t])},onCancel:function(n){e.orderId=n.orderID,i()(document.body).triggerHandler("wc_ppcp_on_cancel",[e,t,n])},onError:function(n){e.currentError?(e.submitError(e.currentError),e.currentError=null):e.submitError(n),i()(document.body).triggerHandler("wc_ppcp_on_error",[e,t,n])},onDestroy:function(){i()(document.body).triggerHandler("wc_ppcp_on_destroy",[e,t])}};return this.isCheckoutFlow()?(n.createOrder=function(t,n){return e.createOrder(t,n)},this.needsShipping()&&t!==paypal.FUNDING.VENMO&&(n.onShippingChange=function(){return e.onShippingChange.apply(e,arguments)})):n.createBillingAgreement=function(){return e.createBillingAgreement.apply(e,arguments)},n}},{key:"needsShipping",value:function(){return this.getOption("needsShipping",!1)}},{key:"isCheckoutFlow",value:function(){var t;return"true"!==(null===(t=(0,u.getPayPalQueryParams)())||void 0===t?void 0:t.vault)}},{key:"getTotal",value:function(){return this.getOption("total",0)}},{key:"getButtonStyle",value:function(t){var e,n,r,i,o,a,c,u,l,p=null;switch(t){case paypal.FUNDING.PAYPAL:p=null===(e=this.settings)||void 0===e||null===(n=e.buttons)||void 0===n?void 0:n.paypal;break;case paypal.FUNDING.PAYLATER:p=null===(r=this.settings)||void 0===r||null===(i=r.buttons)||void 0===i?void 0:i.paylater;break;case paypal.FUNDING.CARD:(p=d({},null===(o=this.settings)||void 0===o||null===(a=o.buttons)||void 0===a?void 0:a.card)).tagline?(delete p.tagline,p.layout="vertical"):p.layout="horizontal";break;case paypal.FUNDING.VENMO:var f=null===(c=this.settings)||void 0===c||null===(u=c.buttons)||void 0===u?void 0:u.paypal;f.color,f.label,p=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(f,s)}return null!==(l=p)&&void 0!==l&&l.height&&(p.height=parseInt(p.height)),p}},{key:"onApprove",value:function(t,e){var n=this;if((0,u.setFieldValue)(this.order_field_key,t.orderID,""),t.billingToken)return(0,u.setFieldValue)(this.billing_token_key,t.billingToken,""),this.fetchBillingToken(t.billingToken).then((function(e){n.handleBillingToken(e,t)})).catch((function(t){return n.submitError(null==t?void 0:t.message)}));e.order.get().then((function(e){n.handleOnApproveResponse(t,e)})).catch((function(t){return n.submitError(t)}))}},{key:"handleOnApproveResponse",value:function(t,e){this.populateCheckoutFields(e),this.processCartCheckout()}},{key:"fetchBillingToken",value:function(t){return a()({method:"GET",path:"/wc-ppcp/v1/billing-agreement/token/".concat(t)})}},{key:"handleBillingToken",value:function(t,e){var n,r,i,o;if((0,l.isEmpty)(t.payer_info.billing_address)||this.populateBillingAddressFields((0,u.convertPayPalAddressToCart)(t.payer_info.billing_address)),null!=t&&null!==(n=t.payer_info)&&void 0!==n&&n.first_name&&((0,u.isValid)("billing_first_name")||(0,u.setFieldValue)("first_name",t.payer_info.first_name,"billing")),null!=t&&null!==(r=t.payer_info)&&void 0!==r&&r.last_name&&((0,u.isValid)("billing_last_name")||(0,u.setFieldValue)("last_name",t.payer_info.last_name,"billing")),null!=t&&null!==(i=t.payer_info)&&void 0!==i&&i.email&&((0,u.isValid)("billing_email")||(0,u.setFieldValue)("billing_email",t.payer_info.email)),null!=t&&null!==(o=t.payer_info)&&void 0!==o&&o.phone&&((0,u.isValid)("billing_phone")||(0,u.setFieldValue)("billing_phone",t.payer_info.phone)),this.needsShipping()&&t.shipping_address&&!(0,l.isEmpty)(t.shipping_address)){var a=(0,u.convertPayPalAddressToCart)(t.shipping_address);this.populateNameFields((0,u.extractFullName)(t.shipping_address.recipient_name),"shipping"),this.populateShippingAddressFields(a),(0,u.isValidAddress)(this.getCartFullAddress("billing"),["phone","email"])||((0,u.isValidFieldValue)((0,u.getFieldValue)("billing_first_name"))||(0,u.isValidFieldValue)((0,u.getFieldValue)("billing_last_name"))||this.populateNameFields(t.shipping_address.recipient_name,"billing"),this.populateBillingAddressFields(a))}}},{key:"createOrder",value:function(t,e){return e.order.create(args)}},{key:"createBillingAgreement",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return a()({method:"POST",url:(0,u.getRestPath)("/wc-ppcp/v1/billing-agreement/token"),data:d({payment_method:this.id,context:this.getPage()},r)}).then((function(t){return t})).catch((function(t){n.currentError=t}))}},{key:"onShippingChange",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,u.convertPayPalAddressToCart)((null==t?void 0:t.shipping_address)||{},!0),o=(0,u.extractShippingMethod)((null==t||null===(n=t.selected_shipping_option)||void 0===n?void 0:n.id)||"");return a()({method:"POST",url:(0,u.getRestRoute)("cart/shipping"),data:d({order_id:t.orderID,address:i,shipping_method:o,payment_method:this.id},r)}).then((function(t){return t.code?e.reject():e.resolve()})).catch((function(t){return e.reject()}))}},{key:"submitError",value:function(t){}},{key:"getShippingPrefix",value:function(){return"shipping"}},{key:"getCartAddress",value:function(t){return{address_1:(0,u.getFieldValue)("address_1",t),address_2:(0,u.getFieldValue)("address_2",t),state:(0,u.getFieldValue)("state",t),city:(0,u.getFieldValue)("city",t),postcode:(0,u.getFieldValue)("postcode",t),country:(0,u.getFieldValue)("country",t)}}},{key:"getCartFullAddress",value:function(t){return{first_name:(0,u.getFieldValue)("first_name",t),last_name:(0,u.getFieldValue)("last_name",t),address_1:(0,u.getFieldValue)("address_1",t),address_2:(0,u.getFieldValue)("address_2",t),state:(0,u.getFieldValue)("state",t),city:(0,u.getFieldValue)("city",t),postcode:(0,u.getFieldValue)("postcode",t),country:(0,u.getFieldValue)("country",t)}}},{key:"onInit",value:function(t,e,n){this.actions[t]=n}},{key:"onClick",value:function(t,e){}},{key:"isPage",value:function(t){return this.getPage()===t}},{key:"getPage",value:function(){var t,e=null===(t=(0,u.getSetting)("generalData"))||void 0===t?void 0:t.page;return"cart"==e&&i()(document.body).is(".woocommerce-checkout")&&(e="checkout"),e}},{key:"populateShippingAddressFields",value:function(t){for(var e in t)(0,u.setFieldValue)(e,t[e],"shipping")}},{key:"populateBillingAddressFields",value:function(t){for(var e in t)(0,u.setFieldValue)(e,t[e],"billing")}},{key:"populateNameFields",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(Array.isArray(t)){var i=p(t,2);e=i[0],n=i[1]}else e=t.given_name,n=t.surname;(0,u.setFieldValue)("first_name",e,r),(0,u.setFieldValue)("last_name",n,r)}},{key:"populateCheckoutFields",value:function(t){var e,n,r,i,o,a,c,s;if(!(0,l.isEmpty)(null==t||null===(e=t.payer)||void 0===e?void 0:e.address)){var p=(0,u.convertPayPalAddressToCart)(t.payer.address);this.populateBillingAddressFields(p)}if(null!=t&&null!==(n=t.payer)&&void 0!==n&&n.name&&this.populateNameFields(t.payer.name,"billing"),null!=t&&null!==(r=t.payer)&&void 0!==r&&r.email_address&&(0,u.setFieldValue)("billing_email",t.payer.email_address),null!=t&&null!==(i=t.payer)&&void 0!==i&&null!==(o=i.phone)&&void 0!==o&&null!==(a=o.phone_number)&&void 0!==a&&a.national_number&&((0,u.setFieldValue)("billing_phone",t.payer.phone.phone_number.national_number),(0,u.setFieldValue)("shipping_phone",t.payer.phone.phone_number.national_number)),this.needsShipping()&&null!=t&&null!==(c=t.purchase_units)&&void 0!==c&&null!==(s=c[0])&&void 0!==s&&s.shipping){var f,d,h=(0,u.convertPayPalAddressToCart)(t.purchase_units[0].shipping.address);if(this.populateShippingAddressFields(h),null!==(f=t.purchase_units[0].shipping)&&void 0!==f&&null!==(d=f.name)&&void 0!==d&&d.full_name){var y=(0,u.extractFullName)(t.purchase_units[0].shipping.name.full_name);this.populateNameFields(y,"shipping")}(0,u.isValidAddress)(this.getCartFullAddress("billing"),["phone","email"])||this.populateBillingAddressFields(h)}}},{key:"processCartCheckout",value:function(){var t=this;return this.showProcessing(),a()({method:"POST",url:(0,u.getRestRoute)("cart/checkout"),data:this.getCartCheckoutData()}).then((function(e){if(e.result&&"success"==e.result)window.location=e.redirect;else if(e.messages)return t.submitError(e.messages)})).catch((function(e){e.code&&t.submitError(e.message)}))}},{key:"getCartCheckoutData",value:function(){return d({payment_method:this.id,context:this.getPage()},(0,u.fieldsToJson)())}},{key:"getProcessingSelector",value:function(){return"body"}},{key:"showProcessing",value:function(){var t;null===(t=i()(this.getProcessingSelector()))||void 0===t||t.block({message:this.getProcessingMessage(),overlayCSS:{background:"#fff",opacity:.6}})}},{key:"hideProcessing",value:function(){var t;null===(t=i()(this.getProcessingSelector()))||void 0===t||t.unblock()}},{key:"getProcessingMessage",value:function(){return'<div class="wc-ppcp-loader">\n                        <div></div>\n                        <div></div>\n                        <div></div>\n                      </div>'}},{key:"getFullName",value:function(t){var e=[(0,u.getFieldValue)("first_name",t),(0,u.getFieldValue)("last_name",t)].filter(Boolean);return 0==e.length?null:1==e.length?e[0]:"".concat(e[0]," ").concat(e[1])}}],n&&v(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const m=b;function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function w(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 k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){P(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=S(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},j.apply(this,arguments)}function S(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=F(t)););return t}function C(t,e){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},C(t,e)}function E(t,e){if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function F(t){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F(t)}var R=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=F(r);if(o){var n=F(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return E(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,e)).cart=t,n.shippingAddressChanged=!1,n.initialize(),n}return e=c,n=[{key:"initialize",value:function(){j(F(c.prototype),"initialize",this).call(this),this.setVariable("readyToCheckout",!1),this.actions={},this.cart.on("updatedCheckout",this.updatedCheckout.bind(this)),i()(document.body).on("payment_method_selected",this.paymentMethodSelected.bind(this)),i()(document.body).on("checkout_place_order_".concat(this.id),this.validateCheckoutFields.bind(this)),i()(document.body).on("click",".wc-ppcp-cancel__payment",this.cancelPayment.bind(this)),i()(document.body).on("change",'[name="terms"]',this.handleTermsClick.bind(this)),i()(document.body).on("change",'[type="checkbox"]',this.handleCheckboxChange.bind(this)),window.addEventListener("hashchange",this.handleHashError.bind(this)),this.handleOrderPay()}},{key:"needsShipping",value:function(){return"order_pay"!==(0,u.getPage)()&&this.cart.needsShipping()}},{key:"getFunding",value:function(){var t=j(F(c.prototype),"getFunding",this).call(this);return this.isFundingActive("venmo")&&this.isSectionEnabled("venmo","checkout")&&t.push(paypal.FUNDING.VENMO),t}},{key:"updatedCheckout",value:function(){j(F(c.prototype),"initialize",this).call(this),this.paymentMethodSelected(),(this.isOrderReview()||this.isReadyToCheckout())&&this.displayPaymentReadyMessage()}},{key:"paymentMethodSelected",value:function(){this.isPaymentGatewaySelected()&&!this.isReadyToCheckout()?this.displayPaymentButton():this.hidePaymentButton()}},{key:"handleHashError",value:function(t){var e=t.newURL.match(/ppcp_error=(.*)/);e&&"true"==e[1]&&(this.displayPaymentButton(),history.pushState({},"",window.location.pathname+window.location.search))}},{key:"isOrderReview",value:function(){var t,e,n,r=null===(t=window)||void 0===t||null===(e=t.location)||void 0===e||null===(n=e.search)||void 0===n?void 0:n.match(/_ppcp_order_review=(.*)/);return(null==r?void 0:r.length)>0}},{key:"handleOrderPay",value:function(){if(this.isOrderReview())try{var t,e,n,r,o=(null===(t=window)||void 0===t||null===(e=t.location)||void 0===e||null===(n=e.search)||void 0===n?void 0:n.match(/_ppcp_order_review=(.*)/))[1],a=JSON.parse(atob(decodeURIComponent(o))),c=(a.payment_method,a.paypal_order),s=a.fields;if((0,u.setFieldValue)(this.order_field_key,c,""),!(0,l.isEmpty)(s))for(var p in s)(0,u.setFieldValue)(p,s[p],"");if(this.setVariable("readyToCheckout",!0),this.hidePaymentButton(),this.needsShipping()&&null!==(r=i()('[name="ship_to_different_address"]'))&&void 0!==r&&r.length){var f=!(0,l.isEqual)(this.getCartAddress("billing"),this.getCartAddress("shipping"));i()('[name="ship_to_different_address"]').prop("checked",f).trigger("change")}}catch(t){console.log(t)}}},{key:"createOrder",value:function(t,e){if(this.isPage("checkout")){var n=k(k({},this.convertFormToData()),{},{context:this.getPaymentType()});return this.cart.createOrder(n)}return this.cart.doOrderPay(this.id)}},{key:"createBillingAgreement",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.isPage("checkout")&&(n=k(k({},this.convertFormToData()),{},{context:this.getPaymentType()})),j(F(c.prototype),"createBillingAgreement",this).call(this,t,e,n)}},{key:"createButton",value:function(){j(F(c.prototype),"createButton",this).call(this),this.paymentMethodSelected()}},{key:"displayPaymentButton",value:function(){var t;null===(t=this.getButton())||void 0===t||t.show(),this.hidePlaceOrderButton()}},{key:"hidePaymentButton",value:function(){var t;null===(t=this.getButton())||void 0===t||t.hide(),this.displayPlaceOrderButton()}},{key:"displayPlaceOrderButton",value:function(){var t;null===(t=this.getPlaceOrderButton())||void 0===t||t.removeClass("wc-ppcp-hide-button")}},{key:"hidePlaceOrderButton",value:function(){var t;null===(t=this.getPlaceOrderButton())||void 0===t||t.addClass("wc-ppcp-hide-button")}},{key:"getPlaceOrderButton",value:function(){var t=i()("#place_order");return t.length||(t=i()('[name="woocommerce_checkout_place_order"]')),t.length||(t=i()('form.checkout button[type="submit"]')),t.length||(t=i()('form[id="order_review"] button[type="submit"]')),t}},{key:"getButtonPlacement",value:function(){var t;return(null===(t=this.settings)||void 0===t?void 0:t.buttonPlacement)||"place_order"}},{key:"isPlaceOrderPlacement",value:function(){return"place_order"==this.getButtonPlacement()}},{key:"getButtonContainer",value:function(){switch(this.getButtonPlacement()){case"place_order":i()(".wc-ppcp-checkout-container").length||this.getPlaceOrderButton().after('<div class="wc-ppcp-checkout-container"></div>');break;case"payment_method":i()("div.payment_method_".concat(this.id)),i()(".wc-ppcp-payment-method__container").append('<div class="wc-ppcp-checkout-container"></div>')}return document.querySelector(".wc-ppcp-checkout-container")}},{key:"isPaymentGatewaySelected",value:function(){var t;return(null===(t=i()('[name="payment_method"]:checked'))||void 0===t?void 0:t.val())===this.id}},{key:"submitError",value:function(t){return"validation_errors"===(null==t?void 0:t.code)?(0,u.submitErrorMessage)(t.data.messages,this.getForm(),"checkout"):(0,u.submitErrorMessage)(t,this.getForm(),"checkout")}},{key:"getShippingPrefix",value:function(){var t;return null!==(t=i()('[name="ship_to_different_address"]'))&&void 0!==t&&t.length&&i()('[name="ship_to_different_address"]').is(":checked")?"shipping":"billing"}},{key:"handleOnApproveResponse",value:function(t,e){this.populateCheckoutFields(e),this.processCheckout(t,e)}},{key:"processCheckout",value:function(t,e){var n=this;this.hidePaymentButton(),this.setVariable("readyToCheckout",!0),this.update_required?(i()(document.body).one("updated_checkout",(function(){t.billingToken&&n.needsShipping()?n.displayPaymentReadyMessage():n.submitCheckoutForm(e)})),i()('[name="billing_country"],[name="billing_state"]').trigger("change"),this.shipToDifferentAddressChecked()&&i()('[name="shipping_country"],[name="shipping_state"]').trigger("change"),i()(document.body).trigger("update_checkout",{update_shipping_method:!1})):this.submitCheckoutForm(e)}},{key:"handleBillingToken",value:function(t,e){this.update_required=this.isCheckoutReviewRequired(t),j(F(c.prototype),"handleBillingToken",this).call(this,t),this.maybeShipToDifferentAddress(),this.processCheckout(e)}},{key:"isCheckoutReviewRequired",value:function(t){return!(!this.needsShipping()||this.isPayPalAddressDisabled()||(0,l.isEmpty)(t.shipping_address)||(0,l.isEqual)({city:t.shipping_address.city,state:t.shipping_address.state,postal_code:t.shipping_address.postal_code,country_code:t.shipping_address.country_code},{city:(0,u.getFieldValue)("shipping_city"),state:(0,u.getFieldValue)("shipping_state"),postal_code:(0,u.getFieldValue)("shipping_postcode"),country_code:(0,u.getFieldValue)("shipping_country")}))}},{key:"populateCheckoutFields",value:function(t){var e,n,r,o,a,c,s=this;if(!this.isAddressPopulationDisabled()&&!(0,l.isEmpty)(null==t||null===(e=t.payer)||void 0===e?void 0:e.address)){var p=(0,u.convertPayPalAddressToCart)(t.payer.address);(0,u.isValidAddress)(p,["first_name","last_name"])&&!(0,l.isEqual)(this.getCartAddress("billing"),p)&&this.populateBillingAddressFields(p)}if(null!=t&&null!==(n=t.payer)&&void 0!==n&&n.name&&((0,u.isValid)("billing_first_name")||this.populateNameFields(t.payer.name,"billing")),null!=t&&null!==(r=t.payer)&&void 0!==r&&r.email_address&&!(0,u.isValid)("billing_email")&&(0,u.setFieldValue)("billing_email",t.payer.email_address),null!=t&&null!==(o=t.payer)&&void 0!==o&&null!==(a=o.phone)&&void 0!==a&&null!==(c=a.phone_number)&&void 0!==c&&c.national_number&&((0,u.setFieldValue)("billing_phone",t.payer.phone.phone_number.national_number),this.needsShipping()&&(0,u.setFieldValue)("shipping_phone",t.payer.phone.phone_number.national_number)),!this.isAddressPopulationDisabled()&&this.needsShipping()){var f,d,h;if(!(0,l.isEmpty)(null==t||null===(f=t.purchase_units)||void 0===f||null===(d=f[0])||void 0===d||null===(h=d.shipping)||void 0===h?void 0:h.address)){var y,g,v=(0,u.convertPayPalAddressToCart)(t.purchase_units[0].shipping.address),b="";(0,l.isEqual)(this.cartAddress,v)||(this.update_required=!0,this.cartAddress=v,this.populateShippingAddressFields(v),i()(document.body).one("updated_checkout",(function(){return s.populateShippingAddressFields(v)}))),null!==(y=t.purchase_units[0].shipping)&&void 0!==y&&null!==(g=y.name)&&void 0!==g&&g.full_name&&(b=(0,u.extractFullName)(t.purchase_units[0].shipping.name.full_name),this.populateNameFields(b,"shipping")),(0,u.isValidAddress)(this.getCartFullAddress("billing"),["phone","email"])||(!b||(0,u.isValid)("billing_first_name")||(0,u.isValid)("billing_last_name")||this.populateNameFields(b,"billing"),this.populateBillingAddressFields(v))}this.maybeShipToDifferentAddress()}}},{key:"maybeShipToDifferentAddress",value:function(){var t;if(null!==(t=i()('[name="ship_to_different_address"]'))&&void 0!==t&&t.length){var e=!(0,l.isEqual)(k(k({},this.getCartAddress("billing")),{},{name:this.getFullName("billing")}),k(k({},this.getCartAddress("shipping")),{},{name:this.getFullName("shipping")}));i()('[name="ship_to_different_address"]').prop("checked",e).trigger("change")}}},{key:"getForm",value:function(){return this.isPage("checkout")?i()(this.container).closest("form.checkout"):i()(this.container).closest("form")}},{key:"validateTerms",value:function(){return!i()('[name="terms"]').length||i()('[name="terms"]').is(":checked")}},{key:"validateCheckoutFields",value:function(){return!!this.validateTerms()||(this.submitError({code:"terms"}),!1)}},{key:"handleTermsClick",value:function(){this.isPlaceOrderPlacement()&&i()('[name="terms"]').length&&(i()('[name="terms"]').is(":checked")?this.enableButtons():this.disableButtons())}},{key:"handleCheckboxChange",value:function(){setTimeout(this.handleTermsClick.bind(this),250)}},{key:"onInit",value:function(t,e,n){j(F(c.prototype),"onInit",this).call(this,t,e,n),this.handleTermsClick()}},{key:"onClick",value:function(t,e){this.isPlaceOrderPlacement()&&!this.validateTerms()&&this.submitError({code:"terms"})}},{key:"onShippingChange",value:function(t,e){var n,r;if(null!=t&&null!==(n=t.selected_shipping_option)&&void 0!==n&&n.id){r=(0,u.extractShippingMethod)(t.selected_shipping_option.id);for(var o=0,a=Object.keys(r);o<a.length;o++){var s=a[o],p=r[s],f=i()('[name="shipping_method['.concat(s,']"][value="').concat(p,'"]'));f.length&&f.prop("checked",!0)}}return t.shipping_address&&(this.shippingAddressChanged=!(0,l.isEqual)((0,u.convertPayPalAddressToCart)(t.shipping_address,!0),{city:(0,u.getFieldValue)("shipping_city"),state:(0,u.getFieldValue)("shipping_state"),postcode:(0,u.getFieldValue)("shipping_postcode"),country:(0,u.getFieldValue)("shipping_country")})),this.cart.trigger("checkout_on_shipping_change",t,r,this),j(F(c.prototype),"onShippingChange",this).call(this,t,e,this.convertFormToData())}},{key:"shipToDifferentAddressChecked",value:function(){var t;return!(null===(t=i()('[name="ship_to_different_address"]'))||void 0===t||!t.length)&&i()('[name="ship_to_different_address"]').is(":checked")}},{key:"displayPaymentReadyMessage",value:function(){i()(".wc-ppcp-popup__container").hide(),i()(".wc-ppcp-order-review-message__container").show();var t=i()(".wc-ppcp-order-review__message").text().replace("%s",i()("#place_order").text());i()(".wc-ppcp-order-review__message").text(t)}},{key:"hidePaymentReadyMessage",value:function(){i()(".wc-ppcp-popup__container").show(),i()(".wc-ppcp-order-review-message__container").hide()}},{key:"cancelPayment",value:function(t){t.preventDefault(),this.setVariable("readyToCheckout",!1),this.hidePaymentReadyMessage(),this.displayPaymentButton()}},{key:"getProcessingSelector",value:function(){return this.container}},{key:"getProcessingMessage",value:function(){return null}},{key:"fetchBillingToken",value:function(t){var e=this;return this.showProcessing(),j(F(c.prototype),"fetchBillingToken",this).call(this,t).then((function(t){return e.hideProcessing(),t}))}},{key:"isReadyToCheckout",value:function(){return this.getVariable("readyToCheckout",!1)}},{key:"convertFormToData",value:function(){return i()("form.checkout").serializeArray().reduce((function(t,e){return k(k({},t),{},P({},e.name,e.value))}),{})}},{key:"submitCheckoutForm",value:function(t){this.cart.applyFilters("checkout_submit_form",!0,t,this)&&this.getForm().submit()}},{key:"getPaymentType",value:function(){return"checkout"}},{key:"isPayPalAddressDisabled",value:function(){return this.settings.paypalAddressDisabled}},{key:"isValidationEnabled",value:function(){return this.settings.checkoutValidationEnabled}},{key:"isAddressPopulationDisabled",value:function(){return this.isPayPalAddressDisabled()||!this.shippingAddressChanged}}],n&&O(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(m);function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A(){return A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=x(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},A.apply(this,arguments)}function x(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=I(t)););return t}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}function D(t,e){if(e&&("object"===B(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}var M=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=I(r);if(o){var n=I(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return D(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,e)).cart=t,n.initialize(),n}return e=c,n=[{key:"initialize",value:function(){this.cart.on("cartUpdated",this.onCartUpdated.bind(this)),i()(window).on("resize",this.doCartHtml.bind(this)),A(I(c.prototype),"initialize",this).call(this),this.doCartHtml()}},{key:"onInit",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=A(I(c.prototype),"onInit",this)).call.apply(t,[this].concat(n)),this.cart.trigger("cartButtonOnInit")}},{key:"needsShipping",value:function(){return this.cart.needsShipping()}},{key:"getButtonContainer",value:function(){return document.getElementById("wc-ppcp-cart-button-container")}},{key:"onCartUpdated",value:function(){A(I(c.prototype),"initialize",this).call(this),this.doCartHtml()}},{key:"submitError",value:function(t){this.hideProcessing(),(0,u.submitErrorMessage)(t,"div.woocommerce-notices-wrapper","checkout")}},{key:"handleBillingToken",value:function(t){A(I(c.prototype),"handleBillingToken",this).call(this,t),this.processCartCheckout()}},{key:"createOrder",value:function(t,e){var n=this;return this.cart.createOrder({payment_method:this.id}).catch((function(t){return n.currentError=t,t}))}},{key:"doCartHtml",value:function(){var t=i()(".checkout-button"),e=t.outerWidth();e&&i()(".wc-ppcp-cart-payments__container").length&&i()(".wc-ppcp-cart-payments__container").width(e),"none"!==t.css("float")&&i()(".wc-ppcp-cart-payments__container ").css("float",t.css("float"))}}],n&&T(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(m);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=q(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},z.apply(this,arguments)}function q(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=H(t)););return t}function G(t,e){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},G(t,e)}function U(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function H(t){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},H(t)}var Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&G(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=H(r);if(o){var n=H(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return U(this,t)});function c(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(r=a.call(this,n)).product=t,r.cart=e,r.initialize(),r}return e=c,n=[{key:"initialize",value:function(){this.product.on("foundVariation",this.onFoundVariation.bind(this)),this.product.on("resetVariation",this.onResetVariation.bind(this)),this.setMaxWidth(),z(H(c.prototype),"initialize",this).call(this)}},{key:"onInit",value:function(){for(var t,e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(t=z(H(c.prototype),"onInit",this)).call.apply(t,[this].concat(i)),this.cart.trigger("productButtonOnInit"),this.product.isVariableProduct()&&(this.product.isVariationSelected()&&null!==(e=this.product)&&void 0!==e&&null!==(n=e.variation)&&void 0!==n&&n.is_in_stock?this.enableButtons():this.disableButtons())}},{key:"setOptions",value:function(t){for(var e in t)this.setOption(e,t[e])}},{key:"needsShipping",value:function(){return this.product.needsShipping()}},{key:"getButtonContainer",value:function(){var t=document.querySelectorAll(".wc-ppcp-product-button-container");return t&&t.length>0?t:document.getElementById("wc-ppcp-product-button-container")}},{key:"setMaxWidth",value:function(){var t,e;if("add_to_cart"==(null===(t=this.settings)||void 0===t||null===(e=t.product)||void 0===e?void 0:e.button_width)){this.buttonWidth=i()("form.cart div.quantity").outerWidth(!0)+i()(".single_add_to_cart_button").outerWidth();var n=i()(".single_add_to_cart_button").css("marginLeft");n&&(this.buttonWidth+=parseInt(n.replace("px",""))),i()(this.container).css("max-width",this.buttonWidth+"px")}}},{key:"submitError",value:function(t){this.hideProcessing(),(0,u.submitErrorMessage)(t,"div.woocommerce-notices-wrapper")}},{key:"getFunding",value:function(){var t,e=[],n=(null===(t=this.settings)||void 0===t?void 0:t.funding)||[];return n.includes("paypal")&&e.push(paypal.FUNDING.PAYPAL),n.includes("paylater")&&e.push(paypal.FUNDING.PAYLATER),n.includes("card")&&e.push(paypal.FUNDING.CARD),this.getSortedFunding(e)}},{key:"addToCart",value:function(){var t=this;return this.cart.addToCart({payment_method:this.id,product_id:this.product.getId(),variation_id:this.product.getVariationId(),qty:this.product.getQuantity(),variation:this.product.getVariationData()}).then((function(e){return e.code&&(t.currentError=e),e})).catch((function(e){return t.currentError=e,t.submitError(e)}))}},{key:"createOrder",value:function(t,e){return this.addToCart()}},{key:"createBillingAgreement",value:function(t,e){var n=this;return this.addToCart().then((function(){return z(H(c.prototype),"createBillingAgreement",n).call(n,t,e)}))}},{key:"handleBillingToken",value:function(t){z(H(c.prototype),"handleBillingToken",this).call(this,t),this.processCartCheckout()}},{key:"onFoundVariation",value:function(t,e){t?(this.destroyButtons(),this.createButton()):e.variation.is_in_stock?this.enableButtons():this.disableButtons()}},{key:"onResetVariation",value:function(){this.disableButtons()}},{key:"enableButtons",value:function(){var t;null==this||null===(t=this.$button)||void 0===t||t.removeClass("disabled"),z(H(c.prototype),"enableButtons",this).call(this)}},{key:"disableButtons",value:function(){var t;null==this||null===(t=this.$button)||void 0===t||t.addClass("disabled"),z(H(c.prototype),"disableButtons",this).call(this)}}],n&&L(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(m);function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function Y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W(){return W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Z(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},W.apply(this,arguments)}function Z(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=X(t)););return t}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}function J(t,e){if(e&&("object"===$(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function X(t){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},X(t)}var tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&K(t,e)}(c,t);var e,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=X(r);if(o){var n=X(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return J(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,e)).cart=t,n.retryCount=0,n.initialize(),n}return e=c,(n=[{key:"initialize",value:function(){this.cart.on("fragmentsChanged",this.onFragmentsChanged.bind(this)),i()(document.body).on("wc_ppcp_on_destroy",this.createButton.bind(this)),W(X(c.prototype),"initialize",this).call(this)}},{key:"needsShipping",value:function(){return this.cart.needsShipping()}},{key:"createButton",value:function(){if(!this.getButtonContainer()&&this.retryCount<10)return this.retryCount+=1,setTimeout(this.createButton.bind(this),500);W(X(c.prototype),"createButton",this).call(this)}},{key:"getButtonContainer",value:function(){var t=document.querySelectorAll(".wc-ppcp-minicart-".concat(this.id));return t&&t.length>0?t:(i()(".woocommerce-mini-cart__buttons").append('<a id="wc-ppcp-minicart-'.concat(this.id,'"></a>')),document.getElementById("wc-ppcp-minicart-".concat(this.id)))}},{key:"getPage",value:function(){return"minicart"}},{key:"handleBillingToken",value:function(t){W(X(c.prototype),"handleBillingToken",this).call(this,t),this.processCartCheckout()}},{key:"createOrder",value:function(t,e){return this.cart.createOrder({payment_method:this.id}).then((function(t){return t}))}},{key:"onFragmentsChanged",value:function(){this.cart.isEmpty()||W(X(c.prototype),"initialize",this).call(this)}}])&&Y(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(m)},166:(t,e,n)=>{n.r(e);var r=n(201),i=n(455),o=n.n(i);new r.tC(o(),{id:"ppcp",context:"cart"})},234:(t,e,n)=>{n.r(e);var r=n(201),i=n(455),o=n.n(i);if((0,n(907).isPluginConnected)()){var a=new r.Oq(o(),{id:"ppcp",context:"checkout"});setInterval((function(){a.createButton()}),2e3)}},476:(t,e,n)=>{n.r(e);var r=n(201),i=n(567),o=n.n(i),a=n(455),c=n.n(a);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=f(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function h(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(u,t);var e,n,i,a,c=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(i);if(a){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return h(this,t)});function u(){return l(this,u),c.apply(this,arguments)}return e=u,n=[{key:"updatedCheckout",value:function(){r.ZC.prototype.initialize.apply(this,arguments),this.paymentMethodSelected()}},{key:"paymentMethodSelected",value:function(){}},{key:"hidePaymentButton",value:function(){this.displayPlaceOrderButton(),this.displayPaymentReadyMessage();var t=p(y(u.prototype),"getButtonContainer",this).call(this);t&&o()(t).hide()}},{key:"getButtonContainer",value:function(){var t;if(null!==(t=this.settings)&&void 0!==t&&t.expressElement){var e=document.querySelector(this.settings.expressElement);if(e)return e}return document.getElementById("wc-ppcp-express-button")}},{key:"onInit",value:function(t,e,n){this.cart.trigger("expressCheckoutButtonOnInit")}},{key:"onClick",value:function(t,e){o()('[name="terms"]').prop("checked",!0).trigger("change"),o()('[name="payment_method"][value="'.concat(this.id,'"]')).prop("checked",!0).trigger("click")}},{key:"getFunding",value:function(){var t=[];return this.isFundingActive("paypal")&&this.isSectionEnabled("paypal","express_checkout")&&t.push(paypal.FUNDING.PAYPAL),this.isFundingActive("paylater")&&this.isSectionEnabled("paylater","express_checkout")&&t.push(paypal.FUNDING.PAYLATER),this.isFundingActive("venmo")&&this.isSectionEnabled("venmo","express_checkout")&&t.push(paypal.FUNDING.VENMO),this.isFundingActive("card")&&this.isSectionEnabled("credit_card","express_checkout")&&t.push(paypal.FUNDING.CARD),t}},{key:"createButton",value:function(){var t;p(y(u.prototype),"createButton",this).call(this),null===(t=this.$button)||void 0===t||t.show(),this.addExpressClasses()}},{key:"addExpressClasses",value:function(){if(this.$button){var t=Object.keys(this.buttons).length;this.$button.addClass("button-count_".concat(t))}}},{key:"getPaymentType",value:function(){return"express"}},{key:"isCheckoutReviewRequired",value:function(t){return!0}}],n&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(r.Oq))(c(),{id:"ppcp",context:"checkout"})},417:(t,e,n)=>{n.r(e);var r=n(201),i=n(455),o=n.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function l(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(o,t);var e,n,r,i=(n=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=s(n);if(r){var i=s(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return l(this,t)});function o(){return c(this,o),i.apply(this,arguments)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(r.K3))(o(),{id:"ppcp",context:"cart"})},17:(t,e,n)=>{n.r(e);var r=n(201),i=n(719),o=n.n(i),a=n(455),c=n.n(a);new r.o4(new(o()),c(),{id:"ppcp",context:"product"})}}]);



}
catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://www.hopchicago.com/wp-content/plugins/pymntpl-paypal-woocommerce/build/js/frontend-commons.js\n- Error message: "+ e.message);}

jQuery(document).ready(function(){"use strict";citadelaCollapsibleFooterWidgets();citadelaWoocommerceCart();citadelaMobileSettings();citadelaProTriggers()});jQuery(window).resize(function(){citadelaCollapsibleFooterWidgets();citadelaClearStickyHeaderClasses()});function citadelaProTriggers(){jQuery('body.sticky-header-enabled header#masthead').on('ctdl_sticky_header_toggled',function(e){citadelaCloseAllTopItemsSubmenus();citadelaMainMenuBurger()});jQuery('body').on('ctdl_device_design_swap',function(e,device){var $body=jQuery('body');citadelaMobileSettings();if($body.find('header#masthead').hasClass('is-sticky')||($body.hasClass('header-scrolled')&&$body.hasClass(`sticky-header-${device}-full`))){citadelaRestartStickyHeader()}
if($body.hasClass('sticky-header-enabled')){var $header=jQuery('body').find('header#masthead');var $custom_header_logo=$header.find('.custom-header-logo');var $default_logo=$header.find('.default-logo');if($body.hasClass(`sticky-header-${device}-full`)){if($header.hasClass('is-sticky')){citadelaSwitchLogo($custom_header_logo,$default_logo)}else{citadelaSwitchLogo($default_logo,$custom_header_logo)}}else{citadelaSwitchLogo($default_logo,$custom_header_logo)}}})}
function citadelaRestartStickyHeader(){var $body=jQuery('body');$body.find('header#masthead').removeClass('is-sticky');$body.find('.sticky-header-wrapper').css('height','');setTimeout(function(){citadelaShowStickyHeader($body.find('.sticky-header-wrapper'))},300)}
function citadelaMobileSettings(){var $body=jQuery('body');var $logo_wrapper=jQuery('header#masthead .logo-wrapper');var $site_title=jQuery('header#masthead .site-title');var $logo_wrapper_maxWidth=$logo_wrapper.data('mobile-max-width');var $site_title_fontSize=$site_title.data('mobile-font-size');var isResponsive=$body.hasClass('mobile-screen-width');if(isResponsive){if($logo_wrapper_maxWidth){$logo_wrapper.css('max-width',$logo_wrapper_maxWidth.mobile)}
if($site_title_fontSize){$site_title.css('font-size',$site_title_fontSize.mobile)}}else{if($logo_wrapper_maxWidth){$logo_wrapper.css('max-width',$logo_wrapper_maxWidth.desktop)}
if($site_title_fontSize){$site_title.css('font-size',$site_title_fontSize.desktop)}}}
function citadelaClearStickyHeaderClasses(){var $body=jQuery('body');var isResponsive=$body.hasClass('mobile-screen-width');if(isResponsive){if(!$body.hasClass('sticky-header-mobile-full')){$body.find('header.is-sticky').removeClass('is-sticky');$body.find('.sticky-header-wrapper').css('height','')}}else{if(!$body.hasClass('sticky-header-desktop-full')){$body.find('header.is-sticky').removeClass('is-sticky');$body.find('.sticky-header-wrapper').css('height','')}}}
function citadelaHideStickyHeader($wrapper){var $body=jQuery('body');var $header=$wrapper.find('#masthead');if(($body.hasClass('mobile-screen-width')&&$body.hasClass('sticky-header-mobile-full'))||(!$body.hasClass('mobile-screen-width')&&$body.hasClass('sticky-header-desktop-full'))){$wrapper.css('height','');$wrapper.find('#masthead').removeClass('is-sticky');citadelaSwitchLogo($header.find('.default-logo'),$header.find('.custom-header-logo'));$wrapper.find('#masthead').trigger('ctdl_sticky_header_toggled')}}
function citadelaShowStickyHeader($wrapper){var $body=jQuery('body');var $header=$wrapper.find('#masthead');if(($body.hasClass('mobile-screen-width')&&$body.hasClass('sticky-header-mobile-full'))||(!$body.hasClass('mobile-screen-width')&&$body.hasClass('sticky-header-desktop-full'))){if(!$body.hasClass('custom-header-over-content')){$wrapper.css('height',$header.attr('data-offset')+"px")}
if(!$header.hasClass('is-sticky')){$header.css('visibility','hidden').addClass('is-sticky');citadelaSwitchLogo($header.find('.custom-header-logo'),$header.find('.default-logo'));$header.trigger('ctdl_sticky_header_toggled');$header.hide().css('visibility','').delay(1).slideDown()}}}
function citadelaSwitchLogo(from,to,cb=!1){if(from.length&&to.length){from.fadeOut(0,()=>{to.fadeIn(0,()=>{if(cb)cb()})});}}
function citadelaWoocommerceCart(){if(!jQuery('.citadela-woocommerce-minicart').length)return;var $cart=jQuery('.citadela-woocommerce-minicart');$cart.find('.cart-header').on('click',function(e){$mainMenuUl=jQuery('#masthead').find('.citadela-menu-container').find('ul.citadela-menu');$mainMenuUl.find('.menu-item.opened, .menu-item-wrapper.opened, .sub-menu.opened').each(function(){jQuery(this).removeClass('opened')});var $body=jQuery('body');var isResponsive=$body.hasClass('responsive-menu');if($cart.hasClass('opened')){$cart.removeClass('opened');$body.removeClass('cart-opened')}else{$cart.addClass('opened');if(isResponsive){$body.addClass('cart-opened')}}});jQuery(document.body).on('added_to_cart removed_from_cart wc_fragments_refreshed',function(e){var $count=parseInt(jQuery('.citadela-woocommerce-minicart .cart-count span').html());if(typeof $count==='number'){var $cart=jQuery('.citadela-woocommerce-minicart');if($count===0){$cart.addClass('is-empty')}else{$cart.removeClass('is-empty')}
citadelaMainMenuBurger()}})}
function citadelaWidgetTitles(){var $sidebarWidgets=jQuery('aside#secondary').find('.widget');var $footerWidgets=jQuery('#footer-widgets').find('.widget');var $widgets=jQuery.merge($sidebarWidgets,$footerWidgets);var $widget;if($widgets.length){$widgets.each(function(){$widget=jQuery(this);if(citadelaIsEmptyWidgetTitle($widget)){$widget.find('div.widget-title').addClass('no-title')}})}}
function citadelaCollapsibleFooterWidgets(){if(!jQuery('body').hasClass('footer-collapsible-widgets-enabled')){return}
var $footer=jQuery('footer#colophon');var $footerWidgetsButton=$footer.find('.footer-widgets-button');var $footerWidgetsArea=$footer.find('#footer-widgets');if(citadela_isResponsive(600)){if(!jQuery('body').hasClass('footer-collapsible-widgets')&&jQuery('body').hasClass('footer-widgets-default-opened')){$footerWidgetsButton.addClass('opened').removeClass('hidden');$footerWidgetsArea.addClass('collapsible-widgets opened')}else{$footerWidgetsButton.removeClass('hidden');$footerWidgetsArea.addClass('collapsible-widgets')}
jQuery('body').addClass('footer-collapsible-widgets')}else{$footerWidgetsButton.addClass('hidden').removeClass('opened');$footerWidgetsArea.removeClass('collapsible-widgets opened');jQuery('body').removeClass('footer-collapsible-widgets')}
$footerWidgetsButton.off();$footerWidgetsButton.on('click',function(e){if($footerWidgetsButton.hasClass('opened')){$footerWidgetsButton.removeClass('opened');$footerWidgetsArea.removeClass('opened')}else{$footerWidgetsButton.addClass('opened');$footerWidgetsArea.addClass('opened')}})}
function citadelaCollapsibleSidebarsWidgets(){var $sidebar=jQuery('aside#secondary');var $widgets=$sidebar.find('.widget');if($widgets.length){$widgets.each(function(){$widget=jQuery(this);if(citadela_isResponsive(1024)){jQuery('body').addClass('sidebar-collapsible-widgets');citadelaApplyCollapsibleSidebarWidget($widget,$sidebar)}else{jQuery('body').removeClass('sidebar-collapsible-widgets');citadelaDisableCollapsibleSidebarWidget($widget,$sidebar)}})}}
function citadelaApplyCollapsibleSidebarWidget($widget,$sidebar){if(!$widget.hasClass('collapsible-widget')){$widgetTitle=$widget.find('div.widget-title');if(!$widgetTitle.hasClass('no-title')){if(($sidebar.hasClass('left-widget-area')&&jQuery('body').hasClass('left-widgets-default-opened'))||($sidebar.hasClass('right-widget-area')&&jQuery('body').hasClass('right-widgets-default-opened'))){$widget.addClass('opened')}else{$widget.find('div.widget-container').hide()}
$widgetTitle.on('click',function(e){e.preventDefault();var $clickedWidget=jQuery(this).parent('.widget');var $clickedWidgetContainer=$clickedWidget.find('.widget-container');$clickedWidget.toggleClass('opened');if($clickedWidget.hasClass('opened')){$clickedWidgetContainer.slideDown()}else{$clickedWidgetContainer.slideUp()}})}}
$widget.addClass('collapsible-widget')};function citadelaDisableCollapsibleSidebarWidget($widget,$sidebar){if($widget.hasClass('collapsible-widget')){$widget.removeClass('collapsible-widget opened');$widget.find('div.widget-container').show();$widgetTitle=$widget.find('div.widget-title');$widgetTitle.off()}}
function citadelaIsEmptyWidgetTitle($widget){var titleContent=$widget.find('div.widget-title').html();if(titleContent===""||titleContent==="<!-- citadela-no-widget-title -->"){return!0}
return!1};



}
catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://www.hopchicago.com/wp-content/plugins/citadela-pro/assets/js/script.js\n- Error message: "+ e.message);}

"use strict";function cmplz_create_element(e,t){e=document.createElement(e);return e.innerHtml=t,e}function cmplz_add_event(e,t,c){document.addEventListener(e,e=>{e.target.closest(t)&&c(e)})}function cmplz_is_hidden(e){return null===e.offsetParent}function cmplz_html_decode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function cmplzLoadConsentAreaContent(e,i){document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(t=>{let c=t.getAttribute("data-category"),n=t.getAttribute("data-service");var o=t.getAttribute("data-post_id"),a=t.getAttribute("data-block_id");if(e===c||i===n){let e=new XMLHttpRequest;e.open("GET",complianz.url+"consent-area/"+o+"/"+a,!0),e.setRequestHeader("Content-type","application/json"),e.send(),t.classList.remove("cmplz-placeholder"),e.onload=function(){t.innerHTML=JSON.parse(e.response),t.querySelectorAll("script").forEach(e=>{cmplz_run_script(e.innerHTML,c,n,"inline",e)})}}})}document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(e=>{e.addEventListener("click",e=>{let t=e.target;(t=t.classList.contains("cmplz-consent-area")?t:e.target.closest(".cmplz-consent-area.cmplz-placeholder"))&&(cmplz_set_service_consent(e=t.getAttribute("data-service"),!0),cmplzLoadConsentAreaContent(!1,e),cmplz_enable_category(null,e),cmplz_set_banner_status("dismissed"))}),document.addEventListener("cmplz_enable_category",function(e){cmplzLoadConsentAreaContent(e.detail.category,e.detail.service)})}),document.addEventListener("cmplz_manage_consent_container_loaded",function(e){var t,c=window.location.href;-1!=c.indexOf("#")&&(t=-1!=c.lastIndexOf("?")?c.lastIndexOf("?"):void 0,c=c.substring(c.indexOf("#")+1,t),t=document.getElementById(c))&&(c=t.getBoundingClientRect().top+window.pageYOffset-200,window.scrollTo({top:c,behavior:"smooth"}))}),complianz.locale=complianz.locale+"&token="+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),c}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}();var cmplz_banner,cmplz_manage_consent_button,cmplzResizeTimer,cmplz_banner_container=document.getElementById("cmplz-cookiebanner-container"),cmplz_waiting_inline_scripts=[],cmplz_waiting_scripts=[],cmplz_fired_scripts=[],cmplz_placeholder_class_index=0,cmplz_all_scripts_hook_fired=!1,cmplz_consent_stored_once=!1,cmplz_fired_category_events=["functional"],cmplz_fired_service_events=[],cmplz_categories=["functional","preferences","statistics","marketing"];window.cmplz_get_cookie=function(t){if("undefined"!=typeof document){t=complianz.prefix+t;var c=document.cookie.split(";");for(let e=0;e<c.length;e++){var n=c[e].trim();if(n.startsWith(t+"="))return n.substring(t.length+1)}}return""},window.cmplz_set_cookie=function(e,t,c){var n,o,a,i;"undefined"!=typeof document&&(c=void 0===c||c,n="https:"===window.location.protocol?";secure":"",(o=new Date).setTime(o.getTime()+24*complianz.cookie_expiry*60*60*1e3),o=";expires="+o.toGMTString(),a=0<(a=cmplz_get_cookie_domain()).length?";domain="+a:"",c=c?complianz.prefix:"",i=cmplz_get_cookie_path(),document.cookie=""+c+e+`=${t};SameSite=Lax${n}${o}${a};path=`+i)},window.cmplz_in_array=function(e,t){return t.includes(e)},window.cmplz_highest_accepted_category=function(){var t=cmplz_accepted_categories(),c=["marketing","statistics","preferences"];for(let e=0;e<c.length;e++)if(cmplz_in_array(c[e],t))return c[e];return"functional"};const cmplz_set_category_as_body_class=()=>{const c=document.body.classList;for(let e=c.length-1;0<=e;e--)c[e].startsWith("cmplz-")&&"cmplz-document"!==c[e]&&c.remove(c[e]);var e=cmplz_accepted_categories(),e=(Object.values(e).forEach(e=>{"string"==typeof e&&c.add("cmplz-"+e)}),cmplz_get_all_service_consents()),e=(Object.entries(e).forEach(([e,t])=>{t&&c.add("cmplz-"+e)}),c.add("cmplz-"+complianz.region,"cmplz-"+complianz.consenttype),new CustomEvent("cmplz_set_category_as_bodyclass"));document.dispatchEvent(e)},cmplz_append_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(e)),t.appendChild(c)},cmplz_load_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=e,t.appendChild(c)};function cmplz_run_script(t,c,n,e,o){var a=document.createElement("script");if("inline"!==e?a.src=t:("string"!=typeof t&&(t=t.innerHTML),a.innerHTML=[t,"cmplzScriptLoaded();"].join("\n")),!cmplz_in_array(t,cmplz_fired_scripts)){cmplzCopyAttributes(o,a);try{"inline"!==e?a.onload=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)}:window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)},document.head.appendChild(a)}catch(e){throw cmplz_run_after_all_scripts(c,n),"Something went wrong "+e+" while loading "+t}}}function cmplz_maybe_run_waiting_scripts(e,t,c,n){var o=cmplz_get_waiting_script(cmplz_waiting_scripts,e),o=(o&&cmplz_run_script(o,t,c,"src",n),cmplz_get_waiting_script(cmplz_waiting_inline_scripts,e));o&&cmplz_run_script(o,t,c,"inline",n)}const cmplzLazyLoader=()=>{var e=document.querySelectorAll(".cmplz-blocked-content-container");const t=new IntersectionObserver((e,n)=>{e.forEach(e=>{var t,c;e.isIntersecting&&((t=(e=e.target).getAttribute("data-placeholder-image"))&&(c=e.getAttribute("data-placeholder_class_index"),cmplz_append_css(".cmplz-placeholder-"+c+" {background-image: url("+t+") !important;}"),cmplz_set_blocked_content_container_aspect_ratio(e,t,c)),n.unobserve(e))})});e.forEach(e=>{t.observe(e)})};function cmplz_set_blocked_content_container(){document.querySelectorAll(".cmplz-image").forEach(e=>{var t,c,n,o;e.classList.contains("cmplz-processed")||(e.classList.add("cmplz-processed"),t=e.getAttribute("data-service"),c=e.getAttribute("data-category"),(n=e.parentElement).classList.add("cmplz-blocked-content-container"),o=n.getAttribute("data-placeholder_class_index"),"lazy"===e.getAttribute("loading")&&(e.removeAttribute("loading"),e.setAttribute("data-deferlazy",1)),null==o&&(cmplz_placeholder_class_index++,n.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),n.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(n,c,t)))}),document.querySelectorAll(".cmplz-placeholder-element").forEach(t=>{if(!t.classList.contains("cmplz-processed")){t.classList.add("cmplz-processed");var c=t.getAttribute("data-service"),n=t.getAttribute("data-category");let e;null===(e=t.classList.contains("cmplz-iframe")?("lazy"===t.getAttribute("loading")&&(t.removeAttribute("loading"),t.setAttribute("data-deferlazy",1)),t.parentElement):t).getAttribute("data-placeholder_class_index")&&(cmplz_placeholder_class_index++,e.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),e.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(e,n,c),n=t.getAttribute("data-placeholder-image"))&&void 0!==n&&n.length&&e.setAttribute("data-placeholder-image",n)}}),cmplzLazyLoader(),cmplz_has_consent("statistics")&&cmplz_enable_category("statistics"),cmplz_has_consent("marketing")&&cmplz_enable_category("marketing")}function cmplz_insert_placeholder_text(e,n,o){if(!e.querySelector(".cmplz-blocked-content-notice")){let t=complianz.placeholdertext;n=n||"marketing";let c;if(void 0!==t){if(1==complianz.clean_cookies){let e=o?o.replace("-"," "):"";e=e.charAt(0).toUpperCase()+e.slice(1),t=t.replace("{service}",e),(c=cmplz_create_element("div",t)).innerHTML=t,c.classList.add("cmplz-blocked-content-notice");var a=c.querySelector("button"),a=(a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{service}",e)),complianz.page_links[complianz.region]),i=c.querySelector(".cmplz-links a");a&&a.hasOwnProperty("cookie-statement")&&(i.setAttribute("href",a["cookie-statement"].url),"{title}"===i.innerText)&&(i.innerText=a["cookie-statement"].title)}else{i=cmplz_create_element("button",""),a=complianz.categories.hasOwnProperty(n)?complianz.categories[n]:"marketing";i.innerText=t.replace("{category}",a),i.classList.add("cmplz-blocked-content-notice","cmplz-accept-category","cmplz-accept-"+n),i.setAttribute("data-service",o),i.setAttribute("data-category",n),i.setAttribute("aria-label",complianz.aria_label.replace("{category}",n)),c=i}("VIDEO"!==e.tagName?e:e.parentElement).appendChild(c)}}}function cmplz_set_blocked_content_container_aspect_ratio(t,c,n){var e;null!=t&&((e=new Image).addEventListener("load",function(){var e=this.naturalWidth||1,e=this.naturalHeight*(t.clientWidth/e),e=-1===c.indexOf("placeholder.jpg")?"height:"+e+"px;":"";cmplz_append_css(".cmplz-placeholder-"+n+" {"+e+"}")}),e.src=c)}function cmplz_has_blocked_scripts(){return 0<document.querySelectorAll("script[data-category], script[data-service]").length}function cmplz_enable_category(o,a){1==complianz.tm_categories&&""!==o&&cmplz_run_tm_event(o);var t={},t=(t.category=o,t.categories=cmplz_accepted_categories(),t.region=complianz.region,new CustomEvent("cmplz_before_category",{detail:t}));if(document.dispatchEvent(t),a=void 0!==a?a:"do_not_match","functional"!==(o=""===o?"do_not_match":o)){"marketing"===o&&cmplz_set_integrations_cookies();let e;e="do_not_match"!==a?'.cmplz-blocked-content-notice [data-service="'+a+'"]':1!=complianz.clean_cookies?".cmplz-blocked-content-notice.cmplz-accept-"+o:'.cmplz-blocked-content-notice [data-category="'+o+'"]',document.querySelectorAll(e).forEach(e=>{var t=e.getAttribute("data-service");e.parentNode.classList.contains("cmplz-blocked-content-notice")&&(e=e.parentNode),cmplz_is_service_denied(t)||e.parentNode.removeChild(e)}),document.querySelectorAll('[data-category="'+o+'"], [data-service="'+a+'"]').forEach(t=>{var e=t.getAttribute("data-service");if(!cmplz_is_service_denied(e)&&"functional"!==t.getAttribute("data-category")&&!t.classList.contains("cmplz-activated")){var e=t.tagName;if("LINK"===e){t.classList.add("cmplz-activated");var c=t.getAttribute("data-href");cmplz_load_css(c,o)}else if("IMG"===e){t.classList.add("cmplz-activated");c=t.getAttribute("data-src-cmplz");t.setAttribute("src",c),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),cmplz_remove_placeholder(t)}else if("IFRAME"===e){t.classList.add("cmplz-activated");let e=t.getAttribute("data-src-cmplz");c=t.getAttribute("data-cmplz-target")?t.getAttribute("data-cmplz-target"):"src";"1"===cmplz_get_url_parameter(t.getAttribute(c),"autoplay")&&(e+="&autoplay=1"),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),t.addEventListener("load",()=>{cmplz_remove_placeholder(t)}),t.setAttribute(c,e)}else t.classList.contains("cmplz-placeholder-element")&&(t.classList.add("cmplz-activated"),e=t.getAttribute("data-placeholder_class_index"),t.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+e))}});t=document.querySelectorAll('script[data-category="'+o+'"], script[data-service="'+a+'"]');t.forEach(e=>{var t=e.getAttribute("data-waitfor"),c=e.getAttribute("data-cmplz-src");t&&(c?cmplz_waiting_scripts[t]=c:0<e.innerText.length&&(cmplz_waiting_inline_scripts[t]=e)),e.parentElement&&e.parentElement.removeChild(e)}),t.forEach(e=>{var t,c,n=e.getAttribute("type");!e.classList.contains("cmplz-activated")&&n&&"text/javascript"!==n&&(e.classList.add("cmplz-activated"),(n=e.getAttribute("data-cmplz-src"))?(e.removeAttribute("type"),cmplz_is_waiting_script(cmplz_waiting_scripts,n)||(e.getAttribute("data-post_scribe_id")?(t="#"+e.getAttribute("data-post_scribe_id"),(c=document.querySelector(t))&&(c.innerHtml(""),postscribe(t,"<script src="+n+"><\/script>"))):cmplz_run_script(n,o,a,"src",e))):0<e.innerText.length&&(cmplz_is_waiting_script(cmplz_waiting_inline_scripts,e.innerText)||cmplz_run_script(e.innerText,o,a,"inline",e)))}),cmplz_run_after_all_scripts(o,a)}}function cmplz_remove_placeholder(e){var t,c=e.closest(".cmplz-blocked-content-container");c&&(t=c.getAttribute("data-placeholder_class_index"),c.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+t)),e.classList.remove("cmplz-iframe-styles","cmplz-iframe","video-wrap")}function cmplz_get_waiting_script(e,t){for(var c in e){var n;if(e.hasOwnProperty(c))if(-1!==t.indexOf(c))return n=e[c],delete e[c],n}return!1}function cmplz_array_is_empty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function cmplz_is_waiting_script(t,c){for(var n in t)if(t.hasOwnProperty(n)){let e=t[n];if("string"!=typeof e&&(e=e.innerText),-1!==c.indexOf(e)||-1!==e.indexOf(c))return!0}return!1}function cmplz_run_after_all_scripts(e,t){var c="do_not_match"!==t&&!cmplz_in_array(t,cmplz_fired_service_events),n="do_not_match"!==e&&!cmplz_in_array(e,cmplz_fired_category_events);(n||c)&&(n&&cmplz_fired_category_events.push(e),c&&cmplz_fired_service_events.push(t),(n={}).category=e,n.service=t,n.categories=cmplz_accepted_categories(),n.services=cmplz_get_all_service_consents(),n.region=complianz.region,c=new CustomEvent("cmplz_enable_category",{detail:n}),document.dispatchEvent(c)),!cmplz_all_scripts_hook_fired&&cmplz_array_is_empty(cmplz_waiting_inline_scripts)&&cmplz_array_is_empty(cmplz_waiting_scripts)&&(n=new CustomEvent("cmplz_run_after_all_scripts",{detail:e,service:t}),document.dispatchEvent(n),cmplz_all_scripts_hook_fired=!0)}window.addEventListener("resize",function(e){clearTimeout(cmplzResizeTimer),cmplzResizeTimer=setTimeout(cmplz_set_blocked_content_container,500)},!0),1==complianz.block_ajax_content&&setInterval(function(){cmplz_set_blocked_content_container()},2e3);var cmplz_fired_events=[];function cmplz_run_tm_event(e){-1===cmplz_fired_events.indexOf(e)&&(cmplz_fired_events.push(e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"cmplz_event_"+e}),e=new CustomEvent("cmplz_tag_manager_event",{detail:e}),document.dispatchEvent(e))}function cmplz_fire_before_categories_consent(e){var t={},e=(t.categories=e,t.region=complianz.region,new CustomEvent("cmplz_before_categories_consent",{detail:t}));document.dispatchEvent(e)}function cmplz_check_cookie_policy_id(){var e=cmplz_get_cookie("policy_id");e&&parseInt(complianz.current_policy_id)!==parseInt(e)&&(cmplz_deny_all(),cmplz_set_banner_status("show"),cmplz_clear_cookies("cmplz"))}function cmplz_do_not_track(){var e="doNotTrack"in navigator&&"1"===navigator.doNotTrack,t="globalPrivacyControl"in navigator&&navigator.globalPrivacyControl;return!(!complianz.do_not_track_enabled||!t&&!e)}function cmplz_get_services_on_page(){let c=[];return document.querySelectorAll("[data-service]").forEach(e=>{var t=e.getAttribute("data-service"),e=e.getAttribute("data-category");-1==c.indexOf(t)&&c.push({category:e,service:t})}),c}function cmplz_is_bot(){var e=new RegExp("(googlebot/|Googlebot-Mobile|Google-InspectionTool|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),t=navigator.userAgent;return e.test(t)}function cmplz_is_speedbot(){var e=navigator.userAgent;return new RegExp("(GTmetrix|pingdom|pingbot|Lighthouse)","i").test(e)}function cmplz_exists_service_consent(){var e,t=cmplz_get_cookie("consented_services");try{for(const c in e=JSON.parse(t))if(e.hasOwnProperty(c)&&1==e[c])return!0}catch(e){}return!1}function cmplz_set_service_consent(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}n[e]=t,cmplz_set_cookie("consented_services",JSON.stringify(n));c={},c.service=e,c.value=t,c.region=complianz.region,cmplz_all_scripts_hook_fired=!1,e=new CustomEvent("cmplz_status_change_service",{detail:c});document.dispatchEvent(e)}function cmplz_clear_all_service_consents(){cmplz_set_cookie("consented_services","")}function cmplz_get_all_service_consents(){var e=cmplz_get_cookie("consented_services");let t;try{t=JSON.parse(e)}catch(e){t={}}return t}function cmplz_get_cookie_path(){return void 0!==complianz.cookie_path&&""!==complianz.cookie_path?complianz.cookie_path:"/"}function cmplz_get_cookie_domain(){return 1==complianz.set_cookies_on_root&&3<complianz.cookie_domain.length&&!complianz.cookie_domain.includes("localhost")?complianz.cookie_domain:""}function cmplz_reload_browser_compatible(){var e;-1<navigator.userAgent.toLowerCase().indexOf("firefox")?((e=new URL(window.location.href)).searchParams.set("cmplz-force-reload",Date.now().toString()),window.location.href=e.toString()):window.location.reload()}window.cmplz_accept_all=function(){for(var e in cmplz_clear_all_service_consents(),cmplz_fire_before_categories_consent(cmplz_categories),cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"allow");cmplz_sync_category_checkboxes()},window.cmplz_deny_all=function(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"deny");let t=!1;"functional"===cmplz_highest_accepted_category()&&!cmplz_exists_service_consent()||(t=!0),cmplz_clear_cookies("cmplz_service")&&(t=!0),cmplz_clear_all_service_consents(),cmplz_integrations_revoke(),cmplz_fire_categories_event(),cmplz_track_status();var c=new CustomEvent("cmplz_revoke",{detail:t});document.dispatchEvent(c),!complianz.tcf_active&&t&&cmplz_reload_browser_compatible()},window.conditionally_show_banner=function(){complianz=cmplz_merge_object(complianz,cmplz_user_data),cmplz_maybe_auto_redirect(),cmplz_set_blocked_content_container(),window.wp_consent_type=complianz.consenttype;var e,t,c,n=new CustomEvent("wp_consent_type_defined"),o=(document.dispatchEvent(n),n=new CustomEvent("cmplz_before_cookiebanner"),document.dispatchEvent(n),1==complianz.forceEnableStats&&"optin"===complianz.consenttype&&cmplz_set_consent("statistics","allow"),cmplz_categories.reverse()),a=[];for(e in o)o.hasOwnProperty(e)&&(t=cmplz_categories[e],cmplz_has_consent(t))&&a.push(t);for(c in cmplz_fire_before_categories_consent(a),a)o.hasOwnProperty(c)&&cmplz_enable_category(a[c]);if(cmplz_exists_service_consent()){cmplz_enable_category("","general");var i,l,r,s=cmplz_get_services_on_page();for(i in s)s.hasOwnProperty(i)&&(l=s[i].service,r=s[i].category,cmplz_has_service_consent(l,r))&&(document.querySelectorAll('.cmplz-accept-service[data-service="'+l+'"]').forEach(e=>{e.checked=!0}),cmplz_enable_category("",l))}cmplz_sync_category_checkboxes(),cmplz_integrations_init(),cmplz_check_cookie_policy_id(),cmplz_set_up_auto_dismiss(),cmplz_load_manage_consent_container(),n=new CustomEvent("cmplz_cookie_banner_data",{detail:complianz}),document.dispatchEvent(n),""===cmplz_get_cookie("saved_categories")&&("optin"!==complianz.consenttype&&"optout"!==complianz.consenttype?cmplz_track_status("no_warning"):cmplz_do_not_track()&&cmplz_track_status("do_not_track")),cmplz_set_category_as_body_class(),cmplz_fire_categories_event(),cmplz_do_not_track()?(console.log("global privacy control or do not track detected: no banner."),cmplz_track_status("do_not_track")):("optin"===complianz.consenttype?(complianz.forceEnableStats&&cmplz_enable_category("statistics"),console.log("opt-in"),show_cookie_banner):"optout"===complianz.consenttype?(console.log("opt-out"),show_cookie_banner):(console.log("other consent type, no cookie warning"),cmplz_accept_all))()},window.show_cookie_banner=function(){let e=complianz.disable_cookiebanner||cmplz_is_speedbot(),t=!1;(document.querySelector("#cmplz-manage-consent-container")||document.querySelector(".cmplz-dropdown-cookiepolicy"))&&(t=!0);var c=document.getElementById("cmplz-cookiebanner-container"),c=(c&&document.body.prepend(c),document.createElement("link"));let n=complianz.page_links[complianz.region];(cmplz_banner=document.querySelector(".cmplz-cookiebanner.banner-"+complianz.user_banner_id+"."+complianz.consenttype))||(e=!0),cmplz_manage_consent_button=document.querySelector("#cmplz-manage-consent .cmplz-manage-consent.manage-consent-"+complianz.user_banner_id);var o=complianz.css_file.replace("{type}",complianz.consenttype).replace("{banner_id}",complianz.user_banner_id),o=(-1!==complianz.css_file.indexOf("cookiebanner/css/defaults/banner")&&console.log("Fallback default css file used. Please re-save banner settings, or check file writing permissions in uploads directory"),c.href=o,c.type="text/css",c.rel="stylesheet",c.onload=function(){e||(cmplz_banner.classList.remove("cmplz-hidden"),cmplz_manage_consent_button.classList.remove("cmplz-hidden"))},document.getElementsByTagName("head")[0].appendChild(c),cmplz_banner&&!e&&(cmplz_banner.querySelectorAll(".cmplz-links a:not(.cmplz-external), .cmplz-buttons a:not(.cmplz-external)").forEach(e=>{var t,c=e;for(t in c.classList.add("cmplz-hidden"),n)n.hasOwnProperty(t)&&c.classList.contains(t)&&(c.setAttribute("href",n[t].url+c.getAttribute("data-relative_url")),"{title}"===c.innerText&&(c.innerText=cmplz_html_decode(n[t].title)),c.classList.remove("cmplz-hidden"))}),cmplz_set_banner_status(),t)&&(cmplz_banner.classList.remove("cmplz-show"),cmplz_banner.classList.add("cmplz-dismissed"),cmplz_manage_consent_button.classList.remove("cmplz-dismissed"),cmplz_manage_consent_button.classList.add("cmplz-show")),new CustomEvent("cmplz_cookie_warning_loaded",{detail:complianz.region}));document.dispatchEvent(o)},window.cmplz_get_banner_status=function(){return cmplz_get_cookie("banner-status")},window.cmplz_set_banner_status=function(e){let t=cmplz_get_cookie("banner-status");(e=void 0!==e?e:t)!==t&&cmplz_set_cookie("banner-status",e),0===e.length&&(e="show"),t="show"===e?"dismissed":"show",cmplz_banner&&0<e.length&&(cmplz_banner.classList.remove("cmplz-"+t),cmplz_banner.classList.add("cmplz-"+e),cmplz_manage_consent_button)&&(cmplz_manage_consent_button.classList.add("cmplz-"+t),cmplz_manage_consent_button.classList.remove("cmplz-"+e)),cmplz_banner_container&&complianz.soft_cookiewall&&(cmplz_banner_container.classList.remove("cmplz-"+t),cmplz_banner_container.classList.add("cmplz-"+e,"cmplz-soft-cookiewall"));e=new CustomEvent("cmplz_banner_status",{detail:e});document.dispatchEvent(e),cmplz_start_clean()},window.cmplz_has_consent=function(e){if(cmplz_is_bot())return!0;if("functional"===e)return!0;let t,c;return t=cmplz_do_not_track()?(c=cmplz_get_cookie(e),"allow"===c):(c=cmplz_get_cookie(e),("optout"===complianz.consenttype||"other"===complianz.consenttype)&&""===c||"allow"===c)},window.cmplz_is_service_denied=function(e){var t=cmplz_get_cookie("consented_services");let c;try{c=JSON.parse(t)}catch(e){c={}}return!!c.hasOwnProperty(e)&&!c[e]},window.cmplz_has_service_consent=function(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}return n.hasOwnProperty(e)?n[e]:cmplz_has_consent(t)},window.cmplz_set_consent=function(e,t){cmplz_set_accepted_cookie_policy_id(),t="functional"===e?"allow":t;var c,n=cmplz_get_cookie(e);let o="allow"===t;document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=o}),n!==t&&(cmplz_set_cookie(e,t),"allow"===t&&cmplz_enable_category(e),cmplz_wp_set_consent(e,t),"statistics"===e&&cmplz_wp_set_consent("statistics-anonymous","allow"),(c=new Object).category=e,c.value=t,c.region=complianz.region,c.categories=cmplz_accepted_categories(),cmplz_all_scripts_hook_fired=!1,c=new CustomEvent("cmplz_status_change",{detail:c}),document.dispatchEvent(c),"marketing"===e)&&"deny"===t&&"allow"===n&&(cmplz_integrations_revoke(),setTimeout(function(){cmplz_reload_browser_compatible()},500))};var cmplz_id_cookie,cmplz_id_session,cmplz_id,cmplz_user_data=[];if("undefined"!=typeof Storage&&sessionStorage.cmplz_user_data&&(cmplz_user_data=JSON.parse(sessionStorage.cmplz_user_data)),1!=complianz.geoip||0!=cmplz_user_data.length&&cmplz_user_data.version===complianz.version&&cmplz_user_data.banner_version===complianz.banner_version)conditionally_show_banner();else{let e=new XMLHttpRequest,t=cmplz_get_url_parameter(window.location.href,"cmplz_user_region");t=t?"&cmplz_user_region="+t:"",e.open("GET",complianz.url+"banner?"+complianz.locale+t,!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_user_data=JSON.parse(e.response),sessionStorage.cmplz_user_data=JSON.stringify(cmplz_user_data),conditionally_show_banner()}}function cmplz_track_status_end(){cmplz_consent_stored_once||cmplz_track_status()}function cmplz_set_up_auto_dismiss(){if("optout"===complianz.consenttype){if(1==complianz.dismiss_on_scroll){let t=function(e){window.pageYOffset>Math.floor(400)&&(cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status(),window.removeEventListener("scroll",t),this.onWindowScroll=null)};window.addEventListener("scroll",t)}var e=parseInt(complianz.dismiss_timeout);0<e&&window.setTimeout(function(){cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()},Math.floor(e))}}function cmplz_fire_categories_event(){var e=new Object,e=(e.category=cmplz_highest_accepted_category(),e.categories=cmplz_accepted_categories(),e.region=complianz.region,new CustomEvent("cmplz_fire_categories",{detail:e}));document.dispatchEvent(e)}function cmplz_track_status(e){let t=[];e=void 0!==e&&e;var c=new CustomEvent("cmplz_track_status",{detail:e});document.dispatchEvent(c),t=e?[e]:cmplz_accepted_categories(),cmplz_set_category_as_body_class();let n,o;try{n=JSON.parse(cmplz_get_cookie("saved_categories"))}catch(e){n={}}try{o=JSON.parse(cmplz_get_cookie("saved_services"))}catch(e){o={}}var c=cmplz_get_all_service_consents();cmplz_equals(n,t)&&cmplz_equals(o,c)||1!=complianz.store_consent||cmplz_is_bot()||cmplz_is_speedbot()||(cmplz_set_cookie("saved_categories",JSON.stringify(t)),cmplz_set_cookie("saved_services",JSON.stringify(c)),cmplz_consent_stored_once=!0,(e=new XMLHttpRequest).open("POST",complianz.url+"track",!0),c={consented_categories:t,consented_services:c,consenttype:window.wp_consent_type},e.setRequestHeader("Content-type","application/json"),e.send(JSON.stringify(c)))}function cmplz_accepted_categories(){let e=cmplz_categories,n=[];for(var t in e)e.hasOwnProperty(t)&&(t=e[t],cmplz_has_consent(t))&&n.push(t);return e=e.filter(function(e,t,c){return cmplz_in_array(e,n)})}function cmplz_sync_category_checkboxes(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],cmplz_has_consent(e)||"functional"===e?document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!0}):document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!1})),document.querySelectorAll(".cmplz-accept-service").forEach(e=>{var t=e.getAttribute("data-service"),c=e.getAttribute("data-category");cmplz_has_service_consent(t,c)?e.checked=!0:cmplz_is_service_denied(t)?e.checked=!1:(c=e.getAttribute("data-category"),e.checked=!!cmplz_has_consent(c))})}function cmplz_merge_object(e,t){var c,n,o={};for(c in t)t.hasOwnProperty(c)&&(o[c]=t[c]);for(n in e)t.hasOwnProperty(n)&&void 0!==t[n]||e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function cmplz_clear_cookies(t){if("undefined"==typeof document)return!1;let a=!1,i="https:"===window.location.protocol?";secure":"",l="expires="+(new Date).toGMTString(),r=location.pathname.replace(/^\/|\/$/g,"").split("/");return document.cookie.split("; ").forEach(function(e){let n=e.split(";")[0].split("=")[0];if(-1!==n.indexOf(t)){a=!0;let c=window.location.hostname.split(".");var o=1<c.length;for(r.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+i+";"+l+";domain=."+c.join(".")+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+i+";"+l+";domain=."+c.join(".")+";path="+e+"/"});0<c.length;){let t="."+c.join(".");c.shift(),o&&1===c.length&&c.shift(),r.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+i+";"+l+";domain="+t+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+i+";"+l+";domain="+t+";path="+e+"/"})}}}),cmplz_set_accepted_cookie_policy_id(),a}function cmplz_set_accepted_cookie_policy_id(){cmplz_set_cookie("policy_id",complianz.current_policy_id)}function cmplz_integrations_init(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&"1"===t[e][1]&&cmplz_set_cookie(e,t[e][1],!1)}function cmplz_integrations_revoke(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&(cmplz_set_cookie(e,t[e][1],!1),0==t[e][1])&&cmplz_clear_cookies(e)}function cmplz_set_integrations_cookies(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&cmplz_set_cookie(e,t[e][0],!1)}function cmplz_get_url_parameter(e,t){if(e&&void 0!==e&&-1!==e.indexOf("?")){e=e.split("?")[1];if(e){var c=e.split("&");for(let e=0;e<c.length;e++){var n=c[e].split("=");if(n[0]===t)return void 0===n[1]||decodeURIComponent(n[1])}}}return!1}function cmplz_maybe_auto_redirect(){var e=cmplz_get_url_parameter(window.location.href,"cmplz_region_redirect"),t=cmplz_get_url_parameter(window.location.href,"cmplz-region");e&&!t&&(e=window.location.href.split("#")[0]+"&cmplz-region="+complianz.region,t=window.location.hash,window.location.href=e+t)}function cmplz_wp_set_consent(e,t){"function"==typeof wp_set_consent&&wp_set_consent(e,t)}1==complianz.store_consent&&(cmplz_id_cookie=cmplz_get_cookie("id"),cmplz_id=cmplz_id_session="","undefined"!=typeof Storage&&sessionStorage.cmplz_id&&(cmplz_id_session=JSON.parse(sessionStorage.cmplz_id)),0==cmplz_id_cookie.length&&0<cmplz_id_session.length&&(cmplz_id=cmplz_id_session,cmplz_set_cookie("id",cmplz_id)),0<cmplz_id_cookie.length&&0==cmplz_id_session.length&&(cmplz_id=cmplz_id_cookie),"undefined"!=typeof Storage)&&(sessionStorage.cmplz_id=JSON.stringify(cmplz_id)),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&cmplz_track_status_end()}),window.addEventListener("pagehide",cmplz_track_status_end,!1),window.addEventListener("beforeunload",cmplz_track_status_end,!1),document.addEventListener("cmplz_consent_action",function(e){cmplz_set_consent(e.detail.category,"allow"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept",function(e){e.preventDefault(),setTimeout(()=>{cmplz_accept_all(),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()},0)}),cmplz_add_event("click",".cmplz-accept-category, .cmplz-accept-marketing",function(e){e.preventDefault();var e=e.target,t=e.getAttribute("data-service"),e=e.getAttribute("data-category")||"marketing";1==complianz.clean_cookies&&void 0!==t&&t?(cmplz_set_service_consent(t,!0),cmplz_enable_category("","general"),cmplz_enable_category("",t)):cmplz_set_consent(e,"allow"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept-service",function(e){var e=e.target;"INPUT"!==e.tagName&&(void 0!==(e=e.getAttribute("data-service"))&&(cmplz_set_service_consent(e,!0),cmplz_enable_category("","general"),cmplz_enable_category("",e)),cmplz_fire_categories_event(),cmplz_track_status())}),cmplz_add_event("change",".cmplz-accept-service",function(e){var t=e.target,c=t.tagName,n=t.getAttribute("data-service");void 0!==n&&("INPUT"===c?(cmplz_set_banner_status("dismissed"),t.checked?(cmplz_set_service_consent(n,!0),cmplz_enable_category("",n)):(cmplz_set_service_consent(n,!1),setTimeout(function(){cmplz_reload_browser_compatible()},500))):(e.preventDefault(),cmplz_set_service_consent(n,!0),cmplz_enable_category("","general"),cmplz_enable_category("",n),setTimeout(function(){cmplz_reload_browser_compatible()},500))),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-save-preferences",function(e){var t,c,n,o,a,e=e.target,i=(cmplz_banner=e.closest(".cmplz-cookiebanner"),[]);for(t in cmplz_categories)cmplz_categories.hasOwnProperty(t)&&(c=cmplz_categories[t],n=cmplz_banner.querySelector("input.cmplz-"+c))&&n.checked&&i.push(c);for(o in cmplz_fire_before_categories_consent(i),cmplz_categories)cmplz_categories.hasOwnProperty(o)&&(a=cmplz_categories[o],i.includes(a)?cmplz_set_consent(a,"allow"):cmplz_set_consent(a,"deny"));cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-close",function(e){cmplz_set_banner_status("dismissed")}),cmplz_add_event("click",".cmplz-view-preferences",function(e){e=e.target;(cmplz_banner=e.closest(".cmplz-cookiebanner")).querySelector(".cmplz-categories").classList.contains("cmplz-fade-in")?(cmplz_banner.classList.remove("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.remove("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="block",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="none"):(cmplz_banner.classList.add("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.add("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="none",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="block")}),cmplz_add_event("change",".cmplz-manage-consent-container .cmplz-category",function(e){for(var t in cmplz_categories){var c;cmplz_categories.hasOwnProperty(t)&&(t=cmplz_categories[t],c=document.querySelector(".cmplz-manage-consent-container input.cmplz-"+t))&&(c.checked?cmplz_set_consent(t,"allow"):cmplz_set_consent(t,"deny"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())}}),cmplz_add_event("click",".cmplz-deny",function(e){e.preventDefault(),cmplz_set_banner_status("dismissed"),cmplz_deny_all()}),cmplz_add_event("click","button.cmplz-manage-settings",function(e){e.preventDefault();var e=document.querySelector(".cmplz-cookiebanner .cmplz-categories"),t=document.querySelector(".cmplz-save-settings"),c=document.querySelector("button.cmplz-manage-settings");cmplz_is_hidden(e)?(t.style.display="block",c.style.display="none",e.style.display="block"):(t.style.display="none",c.style.display="block",e.style.display="none")}),cmplz_add_event("click","button.cmplz-manage-consent",function(e){e.preventDefault(),cmplz_set_banner_status("show")});var cmplzCleanCookieInterval,cmplz_cookie_data=[];function cmplz_start_clean(){if(1==complianz.clean_cookies)if((cmplz_cookie_data="undefined"!=typeof Storage?JSON.parse(sessionStorage.getItem("cmplz_cookie_data")):cmplz_cookie_data)&&0!==cmplz_cookie_data.length)cmplz_setup_clean_interval();else{let e=new XMLHttpRequest;e.open("GET",complianz.url+"cookie_data",!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_cookie_data=JSON.parse(e.response),sessionStorage.setItem("cmplz_cookie_data",JSON.stringify(cmplz_cookie_data)),cmplz_setup_clean_interval()}}}function cmplz_do_cleanup(){for(const t of["preferences","statistics","marketing"])if(!cmplz_has_consent(t)&&cmplz_cookie_data.hasOwnProperty(t)){var e=cmplz_cookie_data[t];for(const c in e)if(!cmplz_has_service_consent(c,t))for(const n of e[c])cmplz_clear_cookies(n),cmplz_clear_storage(n)}}function cmplz_setup_clean_interval(){!cmplz_cookie_data||cmplzCleanCookieInterval||(cmplz_do_cleanup(),cmplzCleanCookieInterval=setInterval(cmplz_do_cleanup,1e3))}function cmplz_clear_storage(e){"undefined"!=typeof Storage&&(localStorage.getItem(e)&&localStorage.removeItem(e),sessionStorage.getItem(e))&&sessionStorage.removeItem(e)}function cmplz_load_manage_consent_container(){let c=document.querySelector(".cmplz-manage-consent-container");if(c){let t=new XMLHttpRequest;t.open("GET",complianz.url+"manage_consent_html?"+complianz.locale,!0),t.setRequestHeader("Content-type","application/json"),t.send(),t.onload=function(){var e=JSON.parse(t.response);c.insertAdjacentHTML("beforeend",e),cmplz_sync_category_checkboxes();document.querySelector("#cmplz-manage-consent-container-nojavascript").style.display="none",c.style.display="block";e=new CustomEvent("cmplz_manage_consent_container_loaded");document.dispatchEvent(e)}}}function cmplz_equals(c,n){if(Array.isArray(c)||(c=Object.keys(c),n=Object.keys(n)),!c||!n)return!1;if(c.length!==n.length)return!1;for(let e=0,t=c.length;e<t;e++)if(c[e]instanceof Array&&n[e]instanceof Array){if(!cmplz_equals(c[e],n[e]))return!1}else if(c[e]!==n[e])return!1;return!0}function cmplzCopyAttributes(e,t){const c=["type","data-service","data-category","async"];Array.from(e.attributes).forEach(e=>{"data-script-type"===e.nodeName&&"module"===e.nodeValue?(t.setAttribute("type","module"),t.removeAttribute("data-script-type")):c.includes(e.nodeName)||t.setAttribute(e.nodeName,e.nodeValue)})}cmplz_add_event("keypress",".cmplz-banner-slider label",function(e){32==(e.keyCode||e.which)&&document.activeElement.click()}),cmplz_add_event("keypress",".cmplz-cookiebanner .cmplz-header .cmplz-close",function(e){13==(e.keyCode||e.which)&&document.activeElement.click()});var cmplz_has_wp_video=document.querySelector(".cmplz-wp-video-shortcode"),cmplz_times_checked=0;void 0!==window.jQuery&&jQuery(document).ready(function(r){if(cmplz_has_wp_video){document.addEventListener("cmplz_enable_category",function(e){t()});let e=setInterval(function(){cmplz_times_checked+=1,document.querySelector(".cmplz-wp-video-shortcode")&&cmplz_times_checked<100?t():clearInterval(e)},500)}function t(){if(document.querySelector(".cmplz-wp-video-shortcode")){var e,t,n,o=cmplz_accepted_categories(),a=cmplz_get_all_service_consents(),i=[];for(e in o)if(o.hasOwnProperty(e)){var l=o[e];if("functional"===l)break;i.push('.cmplz-wp-video-shortcode[data-category="'+l+'"]')}for(t in a)a.hasOwnProperty(t)&&i.push('.cmplz-wp-video-shortcode[data-service="'+t+'"]');n=i.join(",");let c=!1;0<n.length&&document.querySelectorAll(n).forEach(e=>{c=!0,e.setAttribute("controls","controls"),e.classList.add("wp-video-shortcode","cmplz-processed"),e.classList.remove("cmplz-wp-video-shortcode"),e.closest(".cmplz-wp-video").classList.remove("cmplz-wp-video");var t=e.closest(".wp-video").querySelector(".cmplz-blocked-content-notice");t&&t.parentElement.removeChild(t),e.classList.remove("cmplz-blocked-content-container")}),c&&(window.wp.mediaelement?window.wp.mediaelement.initialize():(n={videoWidth:"100%",videoHeight:"100%",enableAutosize:!0},r(".wp-video-shortcode").mediaelementplayer(n)))}}function c(e){e=r(e);"function"==typeof e.parent().fitVids&&e.parent().fitVids()}document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)}),document.addEventListener("cmplz_enable_category",function(e){document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)})})});



}
catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://www.hopchicago.com/wp-content/plugins/complianz-gdpr/cookiebanner/js/complianz.min.js\n- Error message: "+ e.message);}
