(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return o(e,i)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=o;var l,h,u=Array.isArray(i);return u!==Array.isArray(e)?o(i,c):u?c.arrayMerge(e,i,c):(h={},(l=c).isMergeableObject(e)&&r(e).forEach(function(t){h[t]=o(e[t],l)}),r(i).forEach(function(t){(!s(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(s(e,t)&&l.isMergeableObject(i[t])?h[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,l)(e[t],i[t],l):h[t]=o(i[t],l))}),h)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,i),r.exports}(()=>{i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t}})(),(()=>{i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=i(857),t=i.n(e);class o{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let i=o.toUpperCamelCase(e,t);return o.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>o.ucFirst(e.toLowerCase())).join(""):o.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=t.replace(/^data(|-)/,""),s=o.toLowerCamelCase(r,"-");if(!n.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[s];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return a}return o.parsePrimitive(a)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let o=e.querySelector(t)||!1;if(i&&!1===o)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return o}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let o=e.querySelectorAll(t);if(0===o.length&&(o=!1),i&&!1===o)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return o}}class r{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(o),o}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this,n=e.split("."),r=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=r;r=function(i){o.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class s{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let i=o.toDashCase(this._pluginName),r=n.getDataAttribute(this.el,"data-".concat(i,"-config"),!1),s=n.getAttribute(this.el,"data-".concat(i,"-options"),!1),a=[this.constructor.options,this.options,e];r&&a.push(window.PluginConfigManager.get(this._pluginName,r));try{s&&a.push(JSON.parse(s))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(i,'-options" could not be parsed to json: ').concat(e.message))}return t().all(a.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},i=!1){if(!n.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}let a=window.PluginManager;a.register("ConsentCookiescriptMediameets",class extends s{init(){this.consentCategory=this.el.dataset.cookiescriptConsentCategory,this.addListeners()}addListeners(){window.addEventListener("CookieScriptLoaded",()=>{this.cookieScript=window.CookieScript,this.checkConsentbeforeInit(this.consentCategory)}),window.addEventListener("CookieScriptAccept",()=>{this.checkConsentbeforeInit(this.consentCategory)}),window.addEventListener("CookieScriptAcceptAll",()=>{this.startFacebookPixel()}),window.addEventListener("CookieScriptReject",()=>{this.stopFacebookPixel()})}checkConsentbeforeInit(e){let t=this.cookieScript.instance.currentState();null!=t.categories?t.categories.includes(e)?this.startFacebookPixel():this.stopFacebookPixel():console.error("No Cookies or Consent given. Check CookieScript for given Cookies and Categories.")}startFacebookPixel(){let e=window.PluginManager.getPluginInstances("mediameetsFacebookPixel");"object"==typeof e&&e.forEach(function(e){"function"==typeof e.start&&e.start()})}stopFacebookPixel(){let e=window.PluginManager.getPluginInstances("mediameetsFacebookPixel");"object"==typeof e&&e.forEach(function(e){"function"==typeof e.start&&e.stop()})}},"[data-cookiescript-mediameets]"),a.register("ConsentCookiebotMediameets",class extends s{init(){this.consentCategory=this.el.dataset.cookiebotConsentCategory,this.addListeners()}addListeners(){window.addEventListener("CookiebotOnConsentReady",()=>{this.checkConsentState(),this.checkConsentbeforeInit(this.consentCategory)}),window.addEventListener("CookiebotOnLoad",()=>{this.cookieBot=window.cookieBot,this.checkConsentState(),this.checkConsentbeforeInit(this.consentCategory)}),window.addEventListener("CookiebotOnAccept",()=>{this.checkConsentState(),this.checkConsentbeforeInit(this.consentCategory)}),window.addEventListener("CookiebotOnDecline",()=>{this.stopFacebookPixel()})}checkConsentState(){this.cookieBot.consent.necessary?this.consentState.push("necessary"):this.cookieBot.consent.preferences?this.consentState.push("preferences"):this.cookieBot.consent.statistics?this.consentState.push("statistics"):this.cookieBot.consent.marketing&&this.consentState.push("marketing")}checkConsentbeforeInit(e){null!=this.consentState?this.consentState.includes(e)?this.startFacebookPixel():this.stopFacebookPixel():console.error("No Cookies or Consent given. Check CookieScript for given Cookies and Categories.")}startFacebookPixel(){let e=window.pluginManager.getPluginInstances("mediameetsFacebookPixel");"object"==typeof e&&e.forEach(function(e){"function"==typeof e.start&&e.start()})}stopFacebookPixel(){let e=window.pluginManager.getPluginInstances("mediameetsFacebookPixel");"object"==typeof e&&e.forEach(function(e){"function"==typeof e.start&&e.stop()})}constructor(...e){super(...e),this.consentState=[]}},"[data-cookiebot-mediameets]")})()})();