(function () {(function(u,c){typeof exports=="object"&&typeof module!="undefined"?module.exports=c():typeof define=="function"&&define.amd?define(c):(u=typeof globalThis!="undefined"?globalThis:u||self,u._M_=c())})(this,function(){"use strict";var zt=Object.defineProperty,kt=Object.defineProperties;var Lt=Object.getOwnPropertyDescriptors;var Ae=Object.getOwnPropertySymbols;var Pt=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable;var Se=u=>{throw TypeError(u)};var se=(u,c,p)=>c in u?zt(u,c,{enumerable:!0,configurable:!0,writable:!0,value:p}):u[c]=p,C=(u,c)=>{for(var p in c||(c={}))Pt.call(c,p)&&se(u,p,c[p]);if(Ae)for(var p of Ae(c))Kt.call(c,p)&&se(u,p,c[p]);return u},Y=(u,c)=>kt(u,Lt(c));var B=(u,c,p)=>se(u,typeof c!="symbol"?c+"":c,p),oe=(u,c,p)=>c.has(u)||Se("Cannot "+p);var s=(u,c,p)=>(oe(u,c,"read from private field"),p?p.call(u):c.get(u)),S=(u,c,p)=>c.has(u)?Se("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(u):c.set(u,p),N=(u,c,p,D)=>(oe(u,c,"write to private field"),D?D.call(u,p):c.set(u,p),p),v=(u,c,p)=>(oe(u,c,"access private method"),p);var b=(u,c,p)=>new Promise((D,H)=>{var W=y=>{try{k(p.next(y))}catch(I){H(I)}},U=y=>{try{k(p.throw(y))}catch(I){H(I)}},k=y=>y.done?D(y.value):Promise.resolve(y.value).then(W,U);k((p=p.apply(u,c)).next())});var m,A,d,O,V,M,T,f,Ue,Ne,J,_e,Oe,ae,de,ce,Re,Z,z,Ce;function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}/*! load-script2. MIT License. Feross Aboukhadijeh */var c,p;function D(){return p||(p=1,c=function(e,i,n){return new Promise((r,o)=>{const a=document.createElement("script");a.async=!0,a.src=e;for(const[l,g]of Object.entries(i||{}))a.setAttribute(l,g);a.onload=()=>{a.onerror=a.onload=null,r(a)},a.onerror=()=>{a.onerror=a.onload=null,o(new Error(`Failed to load ${e}`))},(n||document.head||document.getElementsByTagName("head")[0]).appendChild(a)})}),c}var H=D();const W=u(H),U=localStorage;function k(t,e,i){Be(t,y(t)+1,e,i)}function y(t,e){t=`missena.${t}`;const i=U.getItem(t);if(!i)return 0;const n=JSON.parse(i);return typeof n.expiry!="number"||new Date().getTime()>n.expiry||e&&e!=n.referer?(U.removeItem(t),0):typeof n.value=="number"?n.value:0}function I(...t){return["missena","capper"].concat(t).join(".")}function Be(t,e,i,n){t=`missena.${t}`;const r=new Date().getTime()+i*1e3;U.setItem(t,JSON.stringify({value:e,expiry:r,referer:n}))}function De(t,e){t=`missena.${t}`;const i=U.getItem(t);let n=new Date().getTime()+e*1e3,r=JSON.parse(i!=null?i:JSON.stringify({value:0,expiry:n}));(typeof r.expiry!="number"||typeof r.value!="number"||new Date().getTime()>r.expiry)&&(U.removeItem(t),r={value:0,expiry:n}),r.value+=1,U.setItem(t,JSON.stringify(r))}var q=(t=>(t.BANNER="BANNER",t.NATIVE="NATIVE",t.VIDEO="VIDEO",t))(q||{}),x=(t=>(t.STICKY="sticky",t.PRESTITIAL="prestitial",t.POSTITIAL="postitial",t.HEADER="header",t.FOOTER="footer",t.SKINCORNER="skincorner",t.FOOTERMAX="footermax",t))(x||{}),w=(t=>(t.STICKY_BANNER="sticky-banner",t.STICKY_NATIVE="sticky-native",t.STICKY_VIDEO="sticky-video",t.PRESTITIAL_BANNER="prestitial-banner",t.PRESTITIAL_NATIVE="prestitial-native",t.PRESTITIAL_VIDEO="prestitial-video",t.POSTITIAL_BANNER="postitial-banner",t.POSTITIAL_NATIVE="postitial-native",t.POSTITIAL_VIDEO="postitial-video",t.HEADER_BANNER="header-banner",t.HEADER_NATIVE="header-native",t.HEADER_VIDEO="header-video",t.FOOTER_BANNER="footer-banner",t.FOOTER_NATIVE="footer-native",t.FOOTER_VIDEO="footer-video",t.SKINCORNER_BANNER="skincorner-banner",t.SKINCORNER_NATIVE="skincorner-native",t.FOOTERMAX_BANNER="footermax-banner",t.FOOTERMAX_NATIVE="footermax-native",t.FOOTERMAX_VIDEO="footermax-video",t))(w||{}),L=(t=>(t.LOCAL="local",t.STAGING="staging",t.PRODUCTION="production",t.EDGE="edge",t))(L||{}),ue=(t=>(t.AMP="amp",t.Bot="bot",t.Desktop="desktop",t.Mobile="mobile",t.Tablet="tablet",t.Webview="webview",t))(ue||{}),_=(t=>(t.Adyoulike="adyoulike",t.Bidule="bidule",t.CriteoCDB="criteo-cdb",t.CriteoNative="criteo-native",t.CriteoPrebidBanner="criteo-prebid-banner",t.CriteoPrebidNative="criteo-prebid-native",t.CriteoPrebidVideo="criteo-prebid-video",t.ImproveDigitalNative="improvedigital-native",t.MagniteBanner="magnite-banner",t.MagniteNative="magnite-native",t.MagniteVideo="magnite-video",t.Outbrain="outbrain",t.PubmaticNative="pubmatic-native",t.RichAudienceBanner="richaudience-banner",t.RichAudienceVideo="richaudience-video",t.SmartBanner="smart-banner",t.SmartNative="smart-native",t.SmartVideo="smart-video",t.SmilewantedBanner="smilewanted-banner",t.SmilewantedVideo="smilewanted-video",t.WmgPubmaticNative="wmg-pubmatic-native",t.XandrBanner="xandr-banner",t.XandrNative="xandr-native",t.XandrVideo="xandr-video",t))(_||{});_.CriteoPrebidNative+"",_.CriteoNative+"";const Ve={[w.STICKY_BANNER]:{desktopZoom:1.3,zoomAreaMin:100*85,zoomAreaDefault:150*125,zoomAreaFull:300*250*.5625,behavior:"M|L",showFullSize:!1,position:{mobile:{right:"0px",bottom:"148px"},desktop:{right:"0px",bottom:"0px"}}},[w.STICKY_NATIVE]:{behavior:{onClick:"redirect",onSwipe:"popup",countdown:3},position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}},bubbleBkgColor:"#fff",bubbleHitbox:90,bubbleSize:80,countdown:6.5,crossVariant:"bottom_left",headerBkgColor:"#1d242b",notification:1,previewBkgColor:"#0362E3",previewTimeout:8,showMenu:!0},[w.STICKY_VIDEO]:{position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}},bubbleSize:80,bubbleHitbox:90,crossVariant:"bottom_left",swipeToFullscreen:!0,behavior:{}},[w.PRESTITIAL_BANNER]:{desktopZoom:1.3,zoomAreaMin:100*85,zoomAreaDefault:150*125,zoomAreaFull:300*250*.5625,countdown:5e3,position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}}},[w.PRESTITIAL_NATIVE]:{bubbleHitbox:90,bubbleSize:80,previewTimeout:8,bubbleBkgColor:"#fff",headerBkgColor:"#1d242b",previewBkgColor:"#0362E3",crossVariant:"top_right_big",minimizeIcon:"close_fullscreen",position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}},behavior:{onClick:"redirect",onSwipe:"popup",countdown:3},countdown:5,showCountdown:!1},[w.PRESTITIAL_VIDEO]:{bubbleSize:80,bubbleHitbox:90,previewTimeout:8,swipeToFullscreen:!0,crossVariant:"top_right_big",position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}},behavior:{},variant:"rotated"},[w.POSTITIAL_BANNER]:{position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}}},[w.POSTITIAL_NATIVE]:{position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}}},[w.POSTITIAL_VIDEO]:{position:{desktop:{bottom:"0px",right:"0px"},mobile:{bottom:"148px",right:"0px"}}},[w.HEADER_BANNER]:{width:320,height:121,offset:56,zIndex:2147483647},[w.HEADER_NATIVE]:{width:320,height:121,offset:56,bgColor:"#fff",zIndex:2147483647},[w.HEADER_VIDEO]:{width:320,height:121,offset:56,zIndex:2147483647},[w.FOOTER_BANNER]:{width:320,height:100,offset:0,zIndex:2147483647},[w.FOOTER_NATIVE]:{width:320,height:100,offset:0,bgColor:"#fff",zIndex:2147483647},[w.FOOTER_VIDEO]:{width:320,height:100,offset:0,zIndex:2147483647},[w.FOOTERMAX_BANNER]:{width:320,height:90,offset:0,zIndex:2147483647},[w.FOOTERMAX_NATIVE]:{width:320,height:90,offset:0,zIndex:2147483647},[w.FOOTERMAX_VIDEO]:{width:320,height:90,offset:0,zIndex:2147483647},[w.SKINCORNER_BANNER]:{adapter:"",selector:""},[w.SKINCORNER_NATIVE]:{adapter:"",selector:""}};w.STICKY_BANNER+"",w.PRESTITIAL_BANNER+"",w.POSTITIAL_BANNER+"",w.HEADER_BANNER+"",w.FOOTER_BANNER+"",w.SKINCORNER_BANNER+"";/*! load-script2. MIT License. Feross Aboukhadijeh */var Q,fe;function Me(){return fe||(fe=1,Q=function(e,i,n){return new Promise((r,o)=>{const a=document.createElement("script");a.async=!0,a.src=e;for(const[l,g]of Object.entries(i||{}))a.setAttribute(l,g);a.onload=()=>{a.onerror=a.onload=null,r(a)},a.onerror=()=>{a.onerror=a.onload=null,o(new Error(`Failed to load ${e}`))},(n||document.head||document.getElementsByTagName("head")[0]).appendChild(a)})}),Q}var ze=Me();const ke=u(ze),j=()=>{};function Le(t,e){t.window.postMessage({source:"msna",evt:e})}function he(t,e){Le(t,{bid:e})}function Pe(t,e){const i={amp:e.device===ue.AMP,ik:e.idempotencyKey,t:e.apiKey};try{const n=new URL(t);return Object.entries(i).forEach(([r,o])=>{o===!0?n.searchParams.set(r,"1"):o&&n.searchParams.set(r,o)}),n.toString()}catch(n){return""}}function ee(t="%cmissena-debug:",e="color:#FFF; background-color:red; padding:3px;border-radius:3px;"){const i=P();try{const n=i.localStorage.getItem("__missena_debug")||i.hasOwnProperty("displayMissenaInfo"),r=i.displayMissenaInfo||j;return n?function(){if(arguments.length==3){r(...arguments);return}console.log(t,e,...arguments)}:j}catch(n){return j}}function P(){try{return window.Cypress?window:(window.top.__doNotExist__,window.top)}catch(t){return window}}/*! * uuidv4 function posted by Rasmus Schultz (mindplay-dk) * on https://gist.github.com/jed/982883 */for(var E=[],K=0;K<256;K++)E[K]=(K<16?"0":"")+K.toString(16);function Ke(){var t=crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,E[t[0]]+E[t[1]]+E[t[2]]+E[t[3]]+"-"+E[t[4]]+E[t[5]]+"-"+E[t[6]]+E[t[7]]+"-"+E[t[8]]+E[t[9]]+"-"+E[t[10]]+E[t[11]]+E[t[12]]+E[t[13]]+E[t[14]]+E[t[15]]}function pe(t,e){var i;typeof t.renderers[e.format]=="function"?((i=t.log)==null||i.call(t,"Renderer finished loading. Rendering: ",t,e),t.renderers[e.format](e),t.shownAds.push(e.meta.requestId||"undefined")):requestAnimationFrame(()=>pe(t,e))}function Fe(t,e){return b(this,null,function*(){var r,o,a,h;(r=t.log)==null||r.call(t,"renderSlot",e);const i=t.window.document,n=i.head||i.getElementsByTagName("head")[0];if(t.shownAds=(o=t.shownAds)!=null?o:[],e.meta.requestId=(a=e.meta.requestId)!=null?a:Ke(),e.settings=C(C({},Ve[e.format]),e.settings),!t.shownAds.includes(e.meta.requestId)){if(typeof t.renderers[e.format]=="function"){(h=t.log)==null||h.call(t,"Renderer already loaded. Rendering: ",t,e),t.renderers[e.format](e),t.shownAds.push(e.meta.requestId);return}ke(`${t.baseUrl}/renderer-${e.format}.js`,{},n).then(()=>{pe(t,e)})}})}function $e(t){var e;try{return((e=t.window._pbjsGlobals)!=null?e:[]).reduce((i,n)=>{var r,o;return i||((o=(r=t.window[n])==null?void 0:r.installedModules)==null?void 0:o.includes("fledgeForGpt"))},!1)}catch(i){return!1}}const F=ee("%cmissena-capper:");function le(t,e,i,n=void 0){const o=P().document;function a(h){var g,R,xe;(((R=(g=h==null?void 0:h.detail)==null?void 0:g.event)==null?void 0:R.name)||"").startsWith(e)&&(F("missena.event: ",(xe=h==null?void 0:h.detail)==null?void 0:xe.event),o.removeEventListener("missena.event",a),e.includes("postitial")?De(I(e,t),i):k(I(e,t),i,n))}o.addEventListener("missena.event",a),F("mounted listener for ",e)}const He="remove-bubble";function We(t,e,i){return e?y(I(He,t),i)==0:!0}const me="display-bubble",qe=500,Xe=1;function Ge(t,e){return e?(e.duration=e.duration||qe,e.max=e.max||Xe,le(t,me,e.duration),y(I(me,t))!n.purpose.consents[l])?(F("gdprApplies, NOT ALLOWED!"),!0):o==x.STICKY&&!(Ge(i,e==null?void 0:e.display)&&We(i,e==null?void 0:e.close,r))?(F("sticky"),!1):o==x.POSTITIAL&&!Je(i,e==null?void 0:e.postitial)?(F("postitial"),!1):!0:!0}const ve={enableTIDs:!0,gvlMapping:{missena:687,smilewanted:639},consentManagement:{gdpr:{cmpApi:"iab",timeout:8e3,defaultGdprScope:!0},usp:{timeout:100}},bidderTimeout:2e3,fledgeForGpt:{enabled:!0},userSync:{userIds:[{name:"criteo"},{name:"sharedId",storage:{type:"cookie",name:"_sharedid",expires:365}},{name:"id5Id",params:{partner:1363},storage:{type:"html5",name:"id5id",expires:90,refreshInSeconds:28800}},{name:"identityLink",params:{pid:"13964",notUse3P:!0},storage:{type:"cookie",name:"idl_env",expires:15,refreshInSeconds:1800}}],filterSettings:{iframe:{bidders:"*",filter:"include"},image:{bidders:"*",filter:"include"}},aliasSyncEnabled:!0}};var ge=4294967295;function je(t,e,i){var n=i/4294967296,r=i;t.setUint32(e,n),t.setUint32(e+4,r)}function Ee(t,e,i){var n=Math.floor(i/4294967296),r=i;t.setUint32(e,n),t.setUint32(e+4,r)}function et(t,e){var i=t.getInt32(e),n=t.getUint32(e+4);return i*4294967296+n}var te,ie,ne,X=(typeof process=="undefined"||((te=process==null?void 0:process.env)===null||te===void 0?void 0:te.TEXT_ENCODING)!=="never")&&typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined";function ye(t){for(var e=t.length,i=0,n=0;n=55296&&r<=56319&&n>6&31|192;else{if(a>=55296&&a<=56319&&o>18&7|240,e[r++]=a>>12&63|128,e[r++]=a>>6&63|128):(e[r++]=a>>12&15|224,e[r++]=a>>6&63|128)}else{e[r++]=a;continue}e[r++]=a&63|128}}var $=X?new TextEncoder:void 0,it=X?typeof process!="undefined"&&((ie=process==null?void 0:process.env)===null||ie===void 0?void 0:ie.TEXT_ENCODING)!=="force"?200:0:ge;function nt(t,e,i){e.set($.encode(t),i)}function rt(t,e,i){$.encodeInto(t,e.subarray(i))}var st=$!=null&&$.encodeInto?rt:nt;X&&new TextDecoder,X&&typeof process!="undefined"&&((ne=process==null?void 0:process.env)===null||ne===void 0||ne.TEXT_DECODER);var G=function(){function t(e,i){this.type=e,this.data=i}return t}(),ot=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}(),at=function(t){ot(e,t);function e(i){var n=t.call(this,i)||this,r=Object.create(e.prototype);return Object.setPrototypeOf(n,r),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:e.name}),n}return e}(Error),dt=-1,ct=4294967296-1,ut=17179869184-1;function ft(t){var e=t.sec,i=t.nsec;if(e>=0&&i>=0&&e<=ut)if(i===0&&e<=ct){var n=new Uint8Array(4),r=new DataView(n.buffer);return r.setUint32(0,e),n}else{var o=e/4294967296,a=e&4294967295,n=new Uint8Array(8),r=new DataView(n.buffer);return r.setUint32(0,i<<2|o&3),r.setUint32(4,a),n}else{var n=new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,i),Ee(r,4,e),n}}function ht(t){var e=t.getTime(),i=Math.floor(e/1e3),n=(e-i*1e3)*1e6,r=Math.floor(n/1e9);return{sec:i+r,nsec:n-r*1e9}}function pt(t){if(t instanceof Date){var e=ht(t);return ft(e)}else return null}function lt(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:{var i=e.getUint32(0),n=0;return{sec:i,nsec:n}}case 8:{var r=e.getUint32(0),o=e.getUint32(4),i=(r&3)*4294967296+o,n=r>>>2;return{sec:i,nsec:n}}case 12:{var i=et(e,4),n=e.getUint32(0);return{sec:i,nsec:n}}default:throw new at("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(t.length))}}function mt(t){var e=lt(t);return new Date(e.sec*1e3+e.nsec/1e6)}var wt={type:dt,encode:pt,decode:mt},vt=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(wt)}return t.prototype.register=function(e){var i=e.type,n=e.encode,r=e.decode;if(i>=0)this.encoders[i]=n,this.decoders[i]=r;else{var o=1+i;this.builtInEncoders[o]=n,this.builtInDecoders[o]=r}},t.prototype.tryToEncode=function(e,i){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(i));e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.encodeObject(e,i)},t.prototype.ensureBufferSizeToWrite=function(e){var i=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},t.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error("Too long string: ".concat(e," bytes in UTF-8"))},t.prototype.encodeString=function(e){var i=5,n=e.length;if(n>it){var r=ye(e);this.ensureBufferSizeToWrite(i+r),this.writeStringHeader(r),st(e,this.bytes,this.pos),this.pos+=r}else{var r=ye(e);this.ensureBufferSizeToWrite(i+r),this.writeStringHeader(r),tt(e,this.bytes,this.pos),this.pos+=r}},t.prototype.encodeObject=function(e,i){var n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,i);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,i);else throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)))},t.prototype.encodeBinary=function(e){var i=e.byteLength;if(i<256)this.writeU8(196),this.writeU8(i);else if(i<65536)this.writeU8(197),this.writeU16(i);else if(i<4294967296)this.writeU8(198),this.writeU32(i);else throw new Error("Too large binary: ".concat(i));var n=gt(e);this.writeU8a(n)},t.prototype.encodeArray=function(e,i){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error("Too large array: ".concat(n));for(var r=0,o=e;r1&&(i=1),i=Math.round(i*100)/100,!(Math.random()>i)&&(this.queue.push({event:yield this.enrich(e,i),url:Pe(this.url,this.ctx)}),this.window.document.dispatchEvent(new CustomEvent(this.eventNameSpace,{detail:{event:e}})),this.next()))})}next(){const e=this.queue.shift();if(!e)return;const i=It(Y(C({},e.event),{from:this.application})),n=new Blob([i],{type:"application/msgpack"});navigator.sendBeacon(e.url,n)}sample(e){return b(this,null,function*(){})}}const At=ee("%cmissena-mosquito:");function St(t,e){var n;const i=t.native;return i.kind=q.NATIVE,i.commission={type:"cpm",currency:(n=t.currency)!=null?n:"EUR",value:t.cpm},i.ids=e,i}function Ut(t,e,i={}){var r;const n={type:"cpm",currency:(r=e.currency)!=null?r:"EUR",value:e.cpm};switch(e.mediaType){case"video":return{commission:n,kind:q.VIDEO,vastImpUrl:e.vastImpUrl,vastUrl:e.vastUrl,vastXml:e.vastXml,ids:i};case"native":return St(e,i);case"banner":return{kind:q.BANNER,ad:e.ad,width:e.width,height:e.height,commission:n,ids:i}}}function Nt(t){return t.replace(/[^\.]+(\.*)/,`${new Date().getTime()}$1`)}function be(t,e){const i=P();if(!i.__tcfapi){e();return}i.__tcfapi("addEventListener",2,function(n,r){!r||!["tcloaded","useractioncomplete"].includes(n==null?void 0:n.eventStatus)||(i.__tcfapi("removeEventListener",2,()=>{},n.listenerId),t(n))})}class _t extends xt{adsuccess(e){this.log({name:"adsuccess",parameters:{provider:e}})}bidsuccess(e){this.log({name:"bidsuccess",parameters:e})}consent(){be(e=>{At({missing_purpose:!e.purpose.consents[1],missing_vendor:!e.vendor.consents[687],tcData:e}),this.log({name:"consent",parameters:{applies:e.gdprApplies,missing_purpose:!e.purpose.consents[1],missing_vendor:!e.vendor.consents[687],string:e.tcString}})},()=>{this.log({name:"consent",parameters:{applies:!1}})})}debug(e){this.log({name:"log",parameters:{label:e}})}timeout(e){e!="missena"&&Math.random()>=.99&&this.log({name:"timeout",parameters:{bidder:e}})}}function Ot(t){try{return window.top[t]}catch(e){return window[t]}}function Te(t){return t.environment==L.EDGE||t.environment==L.PRODUCTION}const Rt={banner:{sizes:[[300,250]]}};function Ie(t,e,i,n={}){const r=`msna-${e}`,o=new URLSearchParams(t.window.location.search).get("bidule_sample");return{[_.Bidule]:{code:r,bids:[{bidder:"missena",params:{placement:e,apiKey:t.apiKey,baseUrl:Te(t)?"":t.bidderUrl,custom:{providerName:_.Bidule},sample:o,isInternal:!0}}],mediaTypes:Rt}}[i]}function Ct(t,e){var n;const i=(n=e.publisher.blockedProviders)!=null?n:[];return e.formats.reduce((r,o)=>{const a=o.name.split("-")[0],h=o.providers.reduce((l,g)=>{if(i.includes(g.name))return l;const R=Ie(t,a,g.name,g.settings);return R?[...l,R]:l},[]);return[...r,...h]},[])}function Bt(t,e){return t.find(n=>{var r;return n.code==e.adUnitCode&&((r=n.bids[0])==null?void 0:r.bidder)==e.bidder&&n.mediaTypes.hasOwnProperty(e.mediaType)}).bids[0].params.custom}function Dt(t,e,i){return e.formats.reduce((n,r)=>{const o=r.name.split("-")[0],a=r.providers.reduce((h,l)=>{if(!i.includes(l.name))return h;const g=Ie(t,o,l.name,l.settings);return g?[...h,g]:h},[]);return[...n,...a]},[])}const re={except:Ct,findCustomData:Bt,only:Dt};class Vt{constructor(e){S(this,f);S(this,m);S(this,A);S(this,d);S(this,O);S(this,V);S(this,M);S(this,T);var r;const i=ee(),n=P();n.__MISSENA__=Y(C({renderers:{},referer:n.location.href},(r=n.__MISSENA__)!=null?r:{}),{log:i,window:n}),N(this,m,e),N(this,A,`msna-${s(this,m).placement}`),N(this,d,n.__MISSENA__),N(this,O,i),N(this,V,n.document.head||n.document.getElementsByTagName("head")[0]),N(this,T,n),e.formats.push({mediaType:"banner",name:`${e.placement}-banner`,providers:[{name:_.Bidule}]}),i(e)}run(){s(this,T).__msna_loaded||(s(this,T).__msna_loaded==!0,be(v(this,f,ae).bind(this),v(this,f,ae).bind(this)))}}m=new WeakMap,A=new WeakMap,d=new WeakMap,O=new WeakMap,V=new WeakMap,M=new WeakMap,T=new WeakMap,f=new WeakSet,Ue=function(){const e=new URLSearchParams(s(this,T).location.search).getAll("msna_provider");return e.length==0?re.except(s(this,d),s(this,m)):re.only(s(this,d),s(this,m),e)},Ne=function(e){return b(this,null,function*(){const{error:i,pbjs:n}=yield v(this,f,Re).call(this);if(s(this,m).settings.disable_prebid){v(this,f,ce).call(this);return}if(i){console.error("[missena] error while loading prebid:",i.message),v(this,f,z).call(this).debug("mosquito.pbjs.failed");return}n.processQueue(),n.bidderSettings={missena:{storageAllowed:!0}},e&&delete ve.consentManagement,n.setConfig(Y(C({},ve),{floors:{data:{default:s(this,m).publisher.floor,currency:s(this,m).publisher.floorCurrency,schema:{fields:["mediaType"]}}}}));const r=!Te(s(this,d))||n.getConfig().debug;let o={};s(this,m).publisher.apiKey==="PA-98473564"&&(o={s2sConfig:{accountId:"1",enabled:!0,bidders:["missena"],timeout:1e3,endpoint:"https://prebid.missena.io/openrtb2/auction",syncEndpoint:"https://prebid.missena.io/cookie_sync"}}),n.setConfig(C({debug:r},o));const a=v(this,f,Ue).call(this);n.removeAdUnit(s(this,A)),n.addAdUnits(a),s(this,O).call(this,"Added adUnits",a),n.enableAnalytics([{provider:"atsAnalytics",options:{pid:"13964"}}]),n.onEvent("bidTimeout",h=>{h.filter(l=>l.adUnitCode==s(this,A)).forEach(l=>v(this,f,z).call(this).timeout(l.bidder))}),s(this,d).settings.delayFirstDisplay?setTimeout(()=>{v(this,f,J).call(this,n)},s(this,d).settings.delayFirstDisplay*1e3):v(this,f,J).call(this,n)})},J=function(e){return b(this,null,function*(){e.requestBids({adUnitCodes:[s(this,A)],bidsBackHandler:()=>b(this,null,function*(){const i=e.getUserIdsAsEids(),n=e.getHighestCpmBids(s(this,A))[0];if(!n){v(this,f,ce).call(this),s(this,d).settings.delayedDisplay&&he(s(this,d),!1);return}const r=re.findCustomData(e.adUnits,n);if(s(this,O).call(this,"winner, ids & provider",{ids:i,customData:r,winner:n}),r.providerName==_.Bidule){const o=`msna_mosquito_${s(this,m).placement}`,a=document.createElement("iframe");a.frameBorder="0",a.name=o;const h=document.querySelector(`[name='${o}']`);h?h.replaceWith(a):document.body.appendChild(a);const l=a.contentWindow.document;if(s(this,d).settings.delayedDisplay){s(this,d).showDelayedAd=()=>e.renderAd(l,n.adId),he(s(this,d),!0);return}else e.renderAd(l,n.adId);return}if(s(this,d).settings.delayedDisplay){s(this,d).showDelayedAd=()=>v(this,f,de).call(this,n,r.providerName,n.adUnitCode.substring(5),i),s(this,d).window.postMessage({source:"msna",bid:!0});return}else v(this,f,de).call(this,n,r.providerName,n.adUnitCode.substring(5),i)})}),s(this,d).settings.auctionRefresh&&[x.STICKY,x.SKINCORNER,x.HEADER,x.FOOTER,x.FOOTERMAX].includes(s(this,m).placement)&&setTimeout(()=>{s(this,d).settings.auctionRefresh&&v(this,f,J).call(this,e)},s(this,m).settings.auctionRefresh*1e3)})},_e=function(){const e=v(this,f,Z).bind(this),i=s(this,T);if(i.msnaHandleHistory)return;i.msnaHandleHistory=!0;function n(r){return function(){var o=r.apply(this,arguments);return i.dispatchEvent(new Event("contentchange")),o}}i.history.pushState=n(i.history.pushState),i.history.replaceState=n(i.history.replaceState),i.addEventListener("popstate",()=>{i.dispatchEvent(new Event("contentchange"))}),i.addEventListener("contentchange",()=>{e({isClientSide:!0,minDuration:1e3})})},Oe=function(){var i,n;const e=(i=s(this,d).settings.block)!=null?i:{};if(e.type==="domain"){const r=((n=Ot("location"))==null?void 0:n.hostname)||"";return(e.domains||[]).some(o=>o==r)}return e.type==="device"},ae=function(e,i){return b(this,null,function*(){var n;if(Qe({placement:s(this,m).placement,publisher:s(this,m).publisher.apiKey,capping:s(this,m).settings.capping,tcData:i?void 0:e,referer:(n=s(this,m).settings.capping)!=null&&n.closePerPage?s(this,d).referer:void 0})){if(s(this,d).adServerUrl=s(this,m).adServerUrl,s(this,d).apiKey=s(this,m).publisher.apiKey,s(this,d).baseUrl=s(this,m).baseUrl,s(this,d).bidderUrl=s(this,m).bidderUrl,s(this,d).device=s(this,m).device,s(this,d).environment=s(this,m).environment,s(this,d).idempotencyKey=s(this,m).idempotencyKey,s(this,d).sentryEnabled=s(this,m).publisher.sentryEnabled,s(this,d).settings=s(this,m).settings,s(this,d).tcData=e,s(this,d).slots={},s(this,d).stopRefresh=()=>{delete s(this,d).settings.auctionRefresh},v(this,f,_e).call(this),v(this,f,z).call(this).consent(),v(this,f,Oe).call(this)){s(this,O).call(this,"script blocked");return}v(this,f,Ne).call(this,!e)}})},de=function(o,a,h){return b(this,arguments,function*(e,i,n,r=[]){s(this,d).passback=v(this,f,Z).bind(this);const l=`${n}-${e.mediaType||"native"}`,g=v(this,f,Ce).call(this,e.adUnitCode||s(this,A),Ut(s(this,d),e,r),i,e.requestId,l);v(this,f,z).call(this).adsuccess(i),v(this,f,z).call(this).bidsuccess({provider:i,commission:{cpm:e.cpm,currency:e.currency},eids:r.map(R=>R.source)}),Fe(s(this,d),g)})},ce=function(){s(this,T).document.dispatchEvent(new CustomEvent("missena.event",{detail:{event:{name:"passback"}}})),new Function(s(this,m).publisher.passback)()},Re=function(){return b(this,null,function*(){if(s(this,d).window.msnaPbjs)return{pbjs:s(this,d).window.msnaPbjs};try{yield W(`${s(this,m).baseUrl}/prebid.js`,{},s(this,V))}catch(e){return{error:e}}return{pbjs:s(this,d).window.msnaPbjs}})},Z=function(e,i={isClientSide:!1,minDuration:1e4}){var a;const n=s(this,d).slots[e];if(!((n==null?void 0:n.displayedAt)&&Date.now()-n.displayedAt>i.minDuration))return!1;delete n.displayedAt,delete s(this,T).__msna_loaded,delete n.data,(a=n.remove)==null||a.call(n);const o=new URL(s(this,d).adServerUrl);return o.searchParams.set("t",s(this,d).apiKey),i.isClientSide?(o.searchParams.set("cs","1"),o.searchParams.set("ik",Nt(s(this,d).idempotencyKey))):o.searchParams.set("ik",s(this,d).idempotencyKey),W(o.toString(),{},s(this,V)),!0},z=function(){return s(this,M)||N(this,M,new _t({appName:"mosquito",ctx:s(this,d)})),s(this,M)},Ce=function(e,i,n,r,o=w.STICKY_NATIVE){var h,l;const a={adUnitCode:e,data:i,format:o,settings:(h=s(this,m).formats.find(g=>g.name==o))==null?void 0:h.settings,provider:n,meta:{requestId:r},reload:g=>{v(this,f,Z).call(this,e,g)},remove:()=>{},track:()=>{}};return(l=s(this,d).slots[e])==null||l.remove(),s(this,d).slots[e]=a,a};function Mt(t){return b(this,null,function*(){new Vt(t).run()})}return Mt}); _M_({adServerUrl:"https://ad.missena.io/?t=PA-68748653",baseUrl:"https://chat.missena.io",bidderUrl:"https://bid.missena.io",device:"bot",environment:"edge",formats:[{"mediaType":"native","name":"sticky-native","providers":[{"name":"outbrain"}],"renderer":"sticky-native","settings":{"afterDisplay":"","behavior":{"countdown":3,"onClick":"redirect","onSwipe":"popup"},"bubbleBkgColor":"#fff","bubbleHitbox":90,"bubbleSize":80,"countdown":6.5,"crossVariant":"bottom_left","headerBkgColor":"#1d242b","notification":1,"plugins":[],"position":{"desktop":{"bottom":"0px","right":"0px"},"mobile":{"bottom":"148px","right":"0px"}},"previewBkgColor":"#0362E3","previewTimeout":8,"showMenu":true,"triggers":{"desktop":[],"mobile":[],"webview":[]}}}],idempotencyKey:"1758218178.d364fgn0111c73fffk50",now:1758218178000,placement:"sticky",publisher:{"apiKey":"PA-68748653","blockedProviders":[],"floor":0,"floorCurrency":"EUR","passback":"","sentryEnabled":false},settings:{"auctionRefresh":14,"block":{"domains":["https://www.backmarket.fr/fr-fr"],"type":"domain"},"capping":{"postitial":1}},syncopeUrl:"https://sync.missena.io"});})();