!function(){"use strict";var e,n,t={998:function(e,n,t){t.d(n,{B$:function(){return f},NZ:function(){return i},Uq:function(){return a},a3:function(){return l},d6:function(){return c},hA:function(){return u},j4:function(){return s},pM:function(){return o},zq:function(){return r}});var o={NOTICE:"notice",GENERAL_SETTINGS:"general-settings",PURPOSE_SETTINGS:"purpose-settings",VENDORS_SETTINGS:"vendors-settings",HIDDEN:""},r=258,i="en",l={1:!0,2:!0,3:!0,4:!0,7:!0,9:!0,10:!0},u={2:!0,7:!0,9:!0,10:!0},c={UI_SHOWN:"cmpuishown",LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},a={VISIBLE:"visible",HIDDEN:"hidden",DISABLED:"disabled"},s={STUB:"stub",LOADED:"loaded",ERROR:"error"},f="euconsent-v2"},748:function(e,n,t){t.d(n,{HY:function(){return l.HY},Vx:function(){return I},n4:function(){return V},az:function(){return l.az},ZP:function(){return ie},Gp:function(){return N},Vo:function(){return R},I4:function(){return k},d4:function(){return y},sO:function(){return b},eJ:function(){return h}});var o,r,i,l=t(400),u=0,c=[],a=l.YM.__b,s=l.YM.__r,f=l.YM.diffed,_=l.YM.__c,d=l.YM.unmount;function p(e,n){l.YM.__h&&l.YM.__h(r,e,u||n),u=0;var t=r.__H||(r.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function h(e){return u=1,v(O,e)}function v(e,n,t){var i=p(o++,2);return i.t=e,i.__c||(i.__=[t?t(n):O(void 0,n),function(e){var n=i.t(i.__[0],e);i.__[0]!==n&&(i.__=[n,i.__[1]],i.__c.setState({}))}],i.__c=r),i.__}function y(e,n){var t=p(o++,3);!l.YM.__s&&A(t.__H,n)&&(t.__=e,t.__H=n,r.__H.__h.push(t))}function m(e,n){var t=p(o++,4);!l.YM.__s&&A(t.__H,n)&&(t.__=e,t.__H=n,r.__h.push(t))}function b(e){return u=5,g((function(){return{current:e}}),[])}function g(e,n){var t=p(o++,7);return A(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function k(e,n){return u=8,g((function(){return e}),n)}function C(){for(var e;e=c.shift();)if(e.__P)try{e.__H.__h.forEach(E),e.__H.__h.forEach(w),e.__H.__h=[]}catch(n){e.__H.__h=[],l.YM.__e(n,e.__v)}}l.YM.__b=function(e){r=null,a&&a(e)},l.YM.__r=function(e){s&&s(e),o=0;var n=(r=e.__c).__H;n&&(n.__h.forEach(E),n.__h.forEach(w),n.__h=[])},l.YM.diffed=function(e){f&&f(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==c.push(n)&&i===l.YM.requestAnimationFrame||((i=l.YM.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(o),S&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);S&&(n=requestAnimationFrame(t))})(C)),r=null},l.YM.__c=function(e,n){n.some((function(e){try{e.__h.forEach(E),e.__h=e.__h.filter((function(e){return!e.__||w(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],l.YM.__e(t,e.__v)}})),_&&_(e,n)},l.YM.unmount=function(e){d&&d(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{E(e)}catch(e){n=e}})),n&&l.YM.__e(n,t.__v))};var S="function"==typeof requestAnimationFrame;function E(e){var n=r,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),r=n}function w(e){var n=r;e.__c=e.__(),r=n}function A(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function O(e,n){return"function"==typeof n?n(e):n}function P(e,n){for(var t in n)e[t]=n[t];return e}function T(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var o in n)if("__source"!==o&&e[o]!==n[o])return!0;return!1}function I(e){this.props=e}(I.prototype=new l.wA).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,n){return T(this.props,e)||T(this.state,n)};var L=l.YM.__b;l.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),L&&L(e)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(e){function n(n){var t=P({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=M,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var D=function(e,n){return null==e?null:(0,l.bR)((0,l.bR)(e).map(n))},j={map:D,forEach:D,count:function(e){return e?(0,l.bR)(e).length:0},only:function(e){var n=(0,l.bR)(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:l.bR},U=l.YM.__e;l.YM.__e=function(e,n,t,o){if(e.then)for(var r,i=n;i=i.__;)if((r=i.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);U(e,n,t,o)};var H=l.YM.unmount;function V(){this.__u=0,this.t=null,this.__b=null}function x(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function R(e){var n,t,o;function r(r){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){o=e})),o)throw o;if(!t)throw n;return(0,l.az)(t,r)}return r.displayName="Lazy",r.__f=!0,r}function Y(){this.u=null,this.o=null}l.YM.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),H&&H(e)},(V.prototype=new l.wA).__c=function(e,n){var t=n.__c,o=this;null==o.t&&(o.t=[]),o.t.push(t);var r=x(o.__v),i=!1,l=function(){i||(i=!0,t.__R=null,r?r(u):u())};t.__R=l;var u=function(){if(!--o.__u){if(o.state.__e){var e=o.state.__e;o.__v.__k[0]=function e(n,t,o){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,o)})),n.__c&&n.__c.__P===t&&(n.__e&&o.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=o)),n}(e,e.__c.__P,e.__c.__O)}var n;for(o.setState({__e:o.__b=null});n=o.t.pop();)n.forceUpdate()}},c=!0===n.__h;o.__u++||c||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(l,l)},V.prototype.componentWillUnmount=function(){this.t=[]},V.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,o){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=P({},n)).__c&&(n.__c.__P===o&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,o)}))),n}(this.__b,t,o.__O=o.__P)}this.__b=null}var r=n.__e&&(0,l.az)(l.HY,null,e.fallback);return r&&(r.__h=null),[(0,l.az)(l.HY,null,n.__e?null:e.children),r]};var B=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]>>1,1),n.i.removeChild(e)}}),(0,l.sY)((0,l.az)(F,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Y.prototype=new l.wA).__e=function(e){var n=this,t=x(n.__v),o=n.o.get(e);return o[0]++,function(r){var i=function(){n.props.revealOrder?(o.push(r),B(n,e,o)):r()};t?t(i):i()}},Y.prototype.render=function(e){this.u=null,this.o=new Map;var n=(0,l.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Y.prototype.componentDidUpdate=Y.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){B(e,t,n)}))};var q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,W=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,G="undefined"!=typeof document,$=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};l.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Z=l.YM.event;function J(){}function X(){return this.cancelBubble}function Q(){return this.defaultPrevented}l.YM.event=function(e){return Z&&(e=Z(e)),e.persist=J,e.isPropagationStopped=X,e.isDefaultPrevented=Q,e.nativeEvent=e};var K,ee={configurable:!0,get:function(){return this.class}},ne=l.YM.vnode;l.YM.vnode=function(e){var n=e.type,t=e.props,o=t;if("string"==typeof n){var r=-1===n.indexOf("-");for(var i in o={},t){var u=t[i];G&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==u||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!$(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():r&&W.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===u&&(u=void 0),o[i]=u)}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,l.bR)(t.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==n&&null!=o.defaultValue&&(o.value=(0,l.bR)(t.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),e.props=o,t.class!=t.className&&(ee.enumerable="className"in t,null!=t.className&&(o.class=t.className),Object.defineProperty(o,"className",ee))}e.$$typeof=q,ne&&ne(e)};var te=l.YM.__r;l.YM.__r=function(e){te&&te(e),K=e.__c};var oe={ReactCurrentDispatcher:{current:{readContext:function(e){return K.__n[e.__c].props.value}}}};function re(e){return!!e&&e.$$typeof===q}l.HY;var ie={useState:h,useReducer:v,useEffect:y,useLayoutEffect:m,useRef:b,useImperativeHandle:function(e,n,t){u=6,m((function(){return"function"==typeof e?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0}),null==t?t:t.concat(e))},useMemo:g,useCallback:k,useContext:function(e){var n=r.context[e.__c],t=p(o++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(r)),n.props.value):e.__},useDebugValue:function(e,n){l.YM.useDebugValue&&l.YM.useDebugValue(n?n(e):e)},version:"17.0.2",Children:j,render:function(e,n,t){return null==n.__k&&(n.textContent=""),(0,l.sY)(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return(0,l.ZB)(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&((0,l.sY)(null,e),!0)},createPortal:function(e,n){return(0,l.az)(z,{__v:e,i:n})},createElement:l.az,createContext:l.kr,createFactory:function(e){return l.az.bind(null,e)},cloneElement:function(e){return re(e)?l.Tm.apply(null,arguments):e},createRef:l.Vf,Fragment:l.HY,isValidElement:re,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:l.wA,PureComponent:I,memo:function(e,n){function t(e){var t=this.props.ref,o=t==e.ref;return!o&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!o:T(this.props,e)}function o(n){return this.shouldComponentUpdate=t,(0,l.az)(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o},forwardRef:N,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:l.HY,Suspense:V,SuspenseList:Y,lazy:R,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:oe}},400:function(e,n,t){t.d(n,{HY:function(){return m},Tm:function(){return R},Vf:function(){return y},YM:function(){return r},ZB:function(){return x},az:function(){return h},bR:function(){return A},h:function(){return h},kr:function(){return Y},sY:function(){return V},wA:function(){return b}});var o,r,i,l,u,c,a,s={},f=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(e,n){for(var t in n)e[t]=n[t];return e}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function h(e,n,t){var r,i,l,u={};for(l in n)"key"==l?r=n[l]:"ref"==l?i=n[l]:u[l]=n[l];if(arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(l in e.defaultProps)void 0===u[l]&&(u[l]=e.defaultProps[l]);return v(e,u,r,i,null)}function v(e,n,t,o,l){var u={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++i:l};return null==l&&null!=r.vnode&&r.vnode(u),u}function y(){return{current:null}}function m(e){return e.children}function b(e,n){this.props=e,this.context=n}function g(e,n){if(null==n)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?v(h.type,h.props,h.key,null,h.__v):h)){if(h.__=t,h.__b=t.__b+1,null===(p=C[_])||p&&h.key==p.key&&h.type===p.type)C[_]=void 0;else for(d=0;d2&&(u.children=arguments.length>3?o.call(arguments,2):t),v(e.type,u,r||e.key,i||e.ref,null)}function Y(e,n){var t={__c:n="__cC"+a++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(C)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}o=f.slice,r={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},i=0,b.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof e&&(e=e(d({},t),this.props)),e&&d(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),C(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},b.prototype.render=m,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S.__r=0,a=0}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={id:e,exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=function(e){return Promise.all(Object.keys(r.f).reduce((function(n,t){return r.f[t](e,n),n}),[]))},r.u=function(e){return{143:"app",571:"settings",664:"notice"}[e]+".bundle.js?id="+{143:"46d60d7bb2d22e26f485",571:"6ac4136fc65203aa5a87",664:"09a90b609879d5cf593b"}[e]},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},e={},n="a8c-cmp:",r.l=function(t,o,i,l){if(e[t])e[t].push(o);else{var u,c;if(void 0!==i)for(var a=document.getElementsByTagName("script"),s=0;se.length)&&(n=e.length);for(var t=0,o=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this.segmentType=T.SEGMENT_TYPE_DISCLOSED_VENDORS,this.vendors=n}));function O(e,n){for(var t=0;t=2&&r.slice(1).forEach((function(n){var r=new m(o.decode(n));if(e.getSegmentType(r)===e.SEGMENT_TYPE_DISCLOSED_VENDORS){var i=e.decodeFields(e.DisclosedVendorsFieldMap,r);t.vendor.vendorsDisclosed=i.vendors}})),t}},{key:"getSegmentType",value:function(n){var t;return null!==(t=e.decodeFields(e.SegmentFieldMap,n).segmentType)&&void 0!==t?t:null}},{key:"decodeFields",value:function(n,t){var o={};return n.forEach((function(n){if(n.children)o[n.key]=e.decodeFields(n.children,t);else if(void 0===n.bitLength){var r=n.codec.decode(t.peekToEnd());o[n.key]=r.value,t.advance(r.bitLength)}else o[n.key]=n.codec.decode(t.popBits(n.bitLength))})),o}},{key:"serialize",value:function(n){var t="",r=e.encodeFields(e.coreFieldMap,n);t=o.encode(r);var i=e.encodeFields(e.DisclosedVendorsFieldMap,new A(n.vendor.vendorsDisclosed||{}));return t+="."+o.encode(i)}},{key:"encodeFields",value:function(n,t){var o="";return n.forEach((function(n){n.children?o+=e.encodeFields(n.children,t[n.key]):void 0===n.bitLength?o+=n.codec.encode(t[n.key]):o+=n.codec.encode(t[n.key],n.bitLength)})),o}}],(t=null)&&O(n.prototype,t),r&&O(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();P(T,"SEGMENT_TYPE_CORE",0),P(T,"SEGMENT_TYPE_DISCLOSED_VENDORS",1),P(T,"SEGMENT_TYPE_PUBLISHER_TC",3),T.coreFieldMap=[{key:"version",codec:l,bitLength:6},{key:"created",codec:c,bitLength:36},{key:"lastUpdated",codec:c,bitLength:36},{key:"cmpId",codec:l,bitLength:12},{key:"cmpVersion",codec:l,bitLength:12},{key:"consentScreen",codec:l,bitLength:6},{key:"consentLanguage",codec:_,bitLength:12},{key:"vendorListVersion",codec:l,bitLength:12},{key:"tcfPolicyVersion",codec:l,bitLength:6},{key:"isServiceSpecific",codec:p,bitLength:1},{key:"useNonStandardStacks",codec:p,bitLength:1},{key:"specialFeatureOptins",codec:v,bitLength:12},{key:"purpose",children:[{key:"consents",codec:v,bitLength:24},{key:"legitimateInterests",codec:v,bitLength:24}]},{key:"purposeOneTreatment",codec:p,bitLength:1},{key:"publisherCC",codec:_,bitLength:12},{key:"vendor",children:[{key:"consents",codec:C},{key:"legitimateInterests",codec:C}]},{key:"numPubRestrictions",codec:l,bitLength:12}],T.SegmentFieldMap=[{key:"segmentType",codec:l,bitLength:3}],T.DisclosedVendorsFieldMap=[{key:"segmentType",codec:l,bitLength:3},{key:"vendors",codec:C}];var I=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},L=r(998);function M(e,n){for(var t=0;t1&&void 0!==arguments[1]&&arguments[1],i=(0,n.Vo)((function(){return r.e(143).then(r.bind(r,241))}));(0,e.sY)((0,e.h)(n.n4,null,(0,e.h)(i,{model:this.model,acceptAll:this.acceptAllHandler,rejectAll:this.rejectAllHandler,save:this.saveHandler,fetchGlobalVendorList:this.fetchGlobalVendorListHandler,path:this.config.modulePath,_:this.config._,mode:t,noticeAsModal:this.config.noticeAsModal,generalSettingsEnabled:this.config.generalSettingsEnabled,rejectAllEnabled:this.config.rejectAllEnabled,manualClose:this.config.manualClose,closable:o,closed:this.closeHandler,colorsConfig:this.config.colors})),this.getAppContainer())}},{key:"showUi",value:function(){this.displayStatus!==L.Uq.VISIBLE&&(this.renderApp(this.config.generalSettingsEnabled?L.pM.GENERAL_SETTINGS:L.pM.PURPOSE_SETTINGS,!0),this.bumpStat("wordads_cmp_view","cookie"),this.eventStatus=L.d6.UI_SHOWN,this.displayStatus=L.Uq.VISIBLE,this.notify())}},{key:"closeUi",value:function(){(0,e.sY)(null,this.getAppContainer())}},{key:"bumpStat",value:function(e,n){var t={};t["x_"+e]=n,window._stq=window._stq||[],window._stq.push(["extra",t])}},{key:"setConsentCookie",value:function(e){var n;if(!this.config.skipConsentSave){var t=new XMLHttpRequest;t.open("POST",this.config.ajaxUrl||"/wp-admin/admin-ajax.php",!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),(e=null!==(n=e)&&void 0!==n?n:{}).action="gdpr_set_consent",e.security=this.config.ajaxNonce,e.consent=T.serialize(this.model);var o=Object.keys(e).map((function(n){return n+"="+encodeURIComponent(e[n])})).join("&");t.send(o)}}},{key:"fetchGlobalVendorListHandler",value:function(){var e=this,n=new XMLHttpRequest;return new Promise((function(t,o){n.onreadystatechange=function(){4===n.readyState&&(200===this.status?t(JSON.parse(this.response)):o({status:n.status,statusText:n.statusText}))},n.open("GET",e.config.gvlPath,!0),n.send()}))}},{key:"acceptAllHandler",value:function(){this.model=new j(this.config),this.model.purpose={consents:this.config.defaultPurposes,legitimateInterests:L.hA},this.model.vendor={consents:this.config.vendorsAll,legitimateInterests:this.config.vendorsLegInterest,vendorsDisclosed:this.config.vendorsAll},this.model.nonIABVendor={consents:this.config.nonIABVendorsAll||{}},this.model.analyticsConsent=!0,this.eventStatus=L.d6.USER_ACTION_COMPLETE,this.displayStatus=L.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"accept_all"})}},{key:"rejectAllHandler",value:function(){this.model=new j(this.config),this.model.purpose={consents:{},legitimateInterests:L.hA},this.model.vendor={consents:{},legitimateInterests:this.config.vendorsLegInterest,vendorsDisclosed:this.config.vendorsAll},this.model.nonIABVendor={consents:{}},this.model.analyticsConsent=!1,this.eventStatus=L.d6.USER_ACTION_COMPLETE,this.displayStatus=L.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"reject_all"})}},{key:"saveHandler",value:function(e){this.model=new j(this.config),this.model.useConsentFrom(e),this.model.vendor.vendorsDisclosed=this.config.vendorsAll,this.eventStatus=L.d6.USER_ACTION_COMPLETE,this.displayStatus=L.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"custom"})}},{key:"closeHandler",value:function(){this.displayStatus=L.Uq.HIDDEN}},{key:"getTCData",value:function(){return{tcString:T.serialize(this.model),tcfPolicyVersion:this.model.tcfPolicyVersion,cmpId:this.model.cmpId,cmpVersion:this.model.cmpVersion,gdprApplies:!0,eventStatus:this.eventStatus,cmpStatus:this.cmpStatus,isServiceSpecific:this.model.isServiceSpecific,useNonStandardStacks:this.model.useNonStandardStacks,publisherCC:this.model.publisherCC,purposeOneTreatment:this.model.purposeOneTreatment,purpose:this.model.purpose,vendor:this.model.vendor,specialFeatureOptins:this.model.specialFeatureOptins}}},{key:"getNonIABVendorConsents",value:function(){return{gdprApplies:!0,nonIabVendorConsents:this.model.nonIABVendor.consents}}},{key:"getExtraConsents",value:function(){return{gdprApplies:!0,nonIabVendorConsents:this.model.nonIABVendor.consents,analyticsConsent:this.model.analyticsConsent}}},{key:"notify",value:function(){var e=this.getTCData();this.listeners.forEach((function(n){e.listenerId=n.listenerId,n.callback(e,!0)}))}},{key:"addListener",value:function(e){var n=Math.floor(999999*Math.random()),t={listenerId:n,callback:e};return this.listeners.push(t),n}},{key:"removeListener",value:function(e){this.listeners=this.listeners.filter((function(n){return n.listenerId!==e}))}},{key:"commandHandler",value:function(){var e=arguments.length<=0?void 0:arguments[0],n=arguments.length<=2?void 0:arguments[2],t=arguments.length<=3?void 0:arguments[3];if("ping"===e){var o={gdprApplies:!0,cmpLoaded:!0,cmpStatus:this.cmpStatus,displayStatus:this.displayStatus,apiVersion:"2",cmpVersion:this.model.cmpVersion,cmpId:this.model.cmpId,gvlVersion:this.model.vendorListVersion,tcfPolicyVersion:this.model.tcfPolicyVersion};"function"==typeof n&&n(o,!0)}else if("addEventListener"===e){var r=this.addListener(n);n(H(H({},this.getTCData()),{},{listenerId:r}),!0)}else"removeEventListener"===e?(this.removeListener(t),n(!0)):"getTCData"===e?"function"==typeof n&&n(this.getTCData(),!0):"getNonIABVendorConsents"===e?"function"==typeof n&&n(this.getNonIABVendorConsents(),!0):"getExtraConsents"===e?"function"==typeof n&&n(this.getExtraConsents(),!0):"showUi"===e||"displayConsentUi"===e?this.showUi():"closeUi"===e&&this.closeUi()}}],l&&x(i.prototype,l),u&&x(i,u),Object.defineProperty(i,"prototype",{writable:!1}),t}();new R}()}();; ( function () { 'use strict'; if ( typeof window.wpcom === 'undefined' ) { window.wpcom = {}; } if ( window.wpcom.carousel ) { return; } var prebuilt_widths = jetpackCarouselStrings.widths; var pageviews_stats_args = jetpackCarouselStrings.stats_query_args; var findFirstLargeEnoughWidth = function ( original_w, original_h, dest_w, dest_h ) { var inverse_ratio = original_h / original_w; for ( var i = 0; i < prebuilt_widths.length; ++i ) { if ( prebuilt_widths[ i ] >= dest_w || prebuilt_widths[ i ] * inverse_ratio >= dest_h ) { return prebuilt_widths[ i ]; } } return original_w; }; var removeResizeFromImageURL = function ( url ) { return removeArgFromURL( url, 'resize' ); }; var removeArgFromURL = function ( url, arg ) { var re = new RegExp( '[\\?&]' + arg + '(=[^?&]+)?' ); if ( url.match( re ) ) { return url.replace( re, '' ); } return url; }; var addWidthToImageURL = function ( url, width ) { width = parseInt( width, 10 ); // Give devices with a higher devicePixelRatio higher-res images (Retina display = 2, Android phones = 1.5, etc) if ( 'undefined' !== typeof window.devicePixelRatio && window.devicePixelRatio > 1 ) { width = Math.round( width * window.devicePixelRatio ); } url = addArgToURL( url, 'w', width ); url = addArgToURL( url, 'h', '' ); return url; }; var addArgToURL = function ( url, arg, value ) { var re = new RegExp( arg + '=[^?&]+' ); if ( url.match( re ) ) { return url.replace( re, arg + '=' + value ); } else { var divider = url.indexOf( '?' ) !== -1 ? '&' : '?'; return url + divider + arg + '=' + value; } }; var stat = function ( names ) { if ( typeof names !== 'string' ) { names = names.join( ',' ); } new Image().src = window.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv' + '&x_carousel=' + names + '&baba=' + Math.random(); }; var lastTrackedPostId = null; var pageview = function ( post_id ) { // Prevent duplicate tracking of the same post during slide transitions if ( post_id === lastTrackedPostId ) { return; } lastTrackedPostId = post_id; new Image().src = window.location.protocol + '//pixel.wp.com/g.gif?host=' + encodeURIComponent( window.location.host ) + '&ref=' + encodeURIComponent( document.referrer ) + '&rand=' + Math.random() + '&' + pageviews_stats_args + '&post=' + encodeURIComponent( post_id ); }; var generateImgSrc = function ( srcItem, max ) { var origSize = srcItem.getAttribute( 'data-orig-size' ) || ''; var src = srcItem.getAttribute( 'src' ) || srcItem.getAttribute( 'original' ) || srcItem.getAttribute( 'data-original' ) || srcItem.getAttribute( 'data-lazy-src' ); if ( src.indexOf( 'imgpress' ) !== -1 ) { src = srcItem.getAttribute( 'data-orig-file' ); } // Square/Circle galleries use a resize param that needs to be removed. src = removeResizeFromImageURL( src ); src = addWidthToImageURL( src, findFirstLargeEnoughWidth( origSize.width, origSize.height, max.width, max.height ) ); return src; }; window.wpcom.carousel = { findFirstLargeEnoughWidth: findFirstLargeEnoughWidth, removeResizeFromImageURL: removeResizeFromImageURL, addWidthToImageURL: addWidthToImageURL, stat: stat, pageview: pageview, generateImgSrc: generateImgSrc }; } )(); ;