!function(){"use strict";var t,e,n,o,i,r,a,s={555:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConsentsBlock=void 0;var n=function(){function t(t,e,n){var o;void 0===e&&(e=30),void 0===n&&(n=!1),this.hasStorageConsentTCFv2=!1,this.app=t,this.consentTimeout=e,this.isWaitConsent=n,this.app.requestParams=this.app.requestParams||{},this.topWindow=this.app.getMostTopWindow(),this.actualizeStorageConsentTCFv2(),this.isWaitConsent&&!this.hasStorageConsentTCFv2&&(this.consentTimeout=Number(null===(o=this.app.globalSettings)||void 0===o?void 0:o.widget_consent_wait_time_ms)||300,this.app.requestParams.nocmp=1)}return t.prototype.actualizeStorageConsentTCFv2=function(){var t,e=Number(null===(t=this.app.globalSettings)||void 0===t?void 0:t.widget_consent_outdated_time)||168;try{if(this.app.context.localStorage&&!this.app.isOurIframe){var n=JSON.parse(this.app.context.localStorage.getItem("MG_tcfv2Data")||"{}");(null==n?void 0:n.timestamp)&&(new Date).getTime()-n.timestamp<60*e*60*1e3?this.hasStorageConsentTCFv2=!0:this.app.context.localStorage.removeItem("MG_tcfv2Data")}}catch(t){this.app.log("ConsentsAdapter - localStorage not found.")}},t.prototype.initTCFv2Proxy=function(){if("function"!=typeof this.app.context.__tcfapi){this.isSearchingLocator=!0;for(var t,e=this.app.context,n={};e;){try{if(e.frames.__tcfapiLocator){t=e;break}}catch(t){this.app.log(t,"warn",t)}if(e===this.app.context.top)break;e=e.parent}this.isSearchingLocator=!1,t&&(this.app.context.__tcfapi=function(e,o,i,r){var a=Math.random()+"",s={__tcfapiCall:{command:e,parameter:r,version:o,callId:a}};n[a]=i,t.postMessage(s,"*")},this.app.context.addEventListener("message",function(t){var e={};try{e="string"==typeof t.data?JSON.parse(t.data):t.data}catch(t){this.app.log(t,"warn",t)}var o=e?e.__tcfapiReturn:null;o&&"function"==typeof n[o.callId]&&n[o.callId](o.returnValue,o.success)}.bind(this),!1))}},t.prototype.tcfv2Api=function(t){var e,n=this,o=(new Date).getTime();return new Promise((function(i,r){var a=function(){n.app.tcfv2Enabled=!0,n.app.requestParams.tcfV2=1;try{n.app.context.__tcfapi("addEventListener",2,(function(e,o){if(!o||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus)o&&!e.gdprApplies&&(t&&setTimeout((function(){t()}),0),i()),n.app.log("Consents. TCFv2 API paused.");else{var r=(new Date).getTime();n.app.tcfv2Data=e,n.app.context.localStorage&&(n.app.isOurIframe?n.app.context.localStorage.removeItem("MG_tcfv2Data"):(e.timestamp=r,n.app.context.localStorage.setItem("MG_tcfv2Data",JSON.stringify(e)))),n.app.log("Consents. TCFv2 API done."),n.app.startServicerTime&&n.app.sendConsentLog(r),n.app.waitConsentResolver&&n.app.waitConsentResolver(),t&&setTimeout((function(){t()}),0),i()}}))}catch(e){n.app.log("Consents. TCFv2 API fail."),t&&setTimeout((function(){t()}),0),r(e)}};n.initTCFv2Proxy(),"function"==typeof n.app.context.__tcfapi?a():e=setInterval((function(){if((new Date).getTime()-o>=1e3*n.consentTimeout)return clearInterval(e),n.app.log("Consents. TCFv2 API not found. Limit time end."),t&&setTimeout((function(){t()}),0),void i();n.isSearchingLocator||n.initTCFv2Proxy(),"function"==typeof n.app.context.__tcfapi&&(clearInterval(e),a())}),500)}))},t.prototype.gdprApi=function(t){var e=this;return new Promise((function(n,o){if("function"==typeof e.topWindow.__cmp){e.app.cmpEnabled=!0,e.app.requestParams.tcfV1=1;try{e.topWindow.__cmp("getConsentData",null,(function(o){e.app.consentData=o,e.app.context.localStorage&&(e.app.isOurIframe?e.app.context.localStorage.removeItem("MG_ConsentData"):e.app.context.localStorage.setItem("MG_ConsentData",JSON.stringify(o))),e.app.log("Consents. TCFv1 API done."),t&&setTimeout((function(){t()}),0),n()}))}catch(e){t&&setTimeout((function(){t()}),0),o(e)}}else t&&setTimeout((function(){t()}),0),n()}))},t.prototype.ccpaApi=function(t){var e=this;return new Promise((function(n,o){if("function"==typeof e.topWindow.__uspapi){e.app.uspEnabled=!0;try{e.topWindow.__uspapi("getUSPData",1,(function(o,i){i?(e.app.uspString=o.uspString||"",e.app.context.localStorage&&""!==e.app.uspString&&(e.app.isOurIframe?e.app.context.localStorage.removeItem("MG_uspString"):e.app.context.localStorage.setItem("MG_uspString",e.app.uspString)),e.app.log("Consents. CCPA API done.")):e.app.log("Consents. CCPA API fail."),t&&setTimeout((function(){t()}),0),n()}))}catch(e){t&&setTimeout((function(){t()}),0),o(e)}}else t&&setTimeout((function(){t()}),0),n()}))},t.prototype.getGdprData=function(){var t,e,n,o,i=null;if((this.app.cmpEnabled||this.app.tcfv2Enabled||this.app.isAmp())&&(this.app.isAmp()&&this.app.context.context.initialConsentValue?i={gdpr_consent:this.app.context.context.initialConsentValue,gdpr:1}:(null===(t=this.app)||void 0===t?void 0:t.tcfv2Data)&&void 0!==(null===(e=this.app.tcfv2Data)||void 0===e?void 0:e.tcString)?(i={gdpr_consent:this.app.tcfv2Data.tcString,gdpr:void 0!==this.app.tcfv2Data.gdprApplies?+this.app.tcfv2Data.gdprApplies:""},this.app.consentOrigin="cmp"):(null===(n=this.app)||void 0===n?void 0:n.consentData)&&void 0!==(null===(o=this.app.consentData)||void 0===o?void 0:o.consentData)&&(i={gdpr_consent:this.app.consentData.consentData,gdpr:void 0!==this.app.consentData.gdprApplies?+this.app.consentData.gdprApplies:""})),null===i)try{if(this.app.context.localStorage&&!this.app.isOurIframe){var r=null;null!==(r=JSON.parse(this.app.context.localStorage.getItem("MG_ConsentData")||"null"))&&void 0!==r.consentData&&(i={gdpr_consent:r.consentData,gdpr:void 0!==r.gdprApplies?+r.gdprApplies:""}),null!==(r=JSON.parse(this.app.context.localStorage.getItem("MG_tcfv2Data")||"null"))&&void 0!==r.tcString&&(i={gdpr_consent:r.tcString,gdpr:void 0!==r.gdprApplies?+r.gdprApplies:""},this.app.consentOrigin="storage")}}catch(t){this.app.log("getGdprData -> "+t.message)}return i},t.prototype.getUspData=function(){var t=null;if(this.app.uspEnabled&&""!=this.app.uspString&&void 0!==this.app.uspString)t={us_privacy:this.app.uspString};else try{if(this.app.context.localStorage&&!this.app.isOurIframe){var e=this.app.context.localStorage.getItem("MG_uspString");null!=e&&""!=e&&void 0!==e&&(t={us_privacy:e})}}catch(t){this.app.log("getUspData -> "+t.message)}return t},t.prototype.getConsentData=function(){var t={},e=this.getGdprData(),n=this.getUspData();return null!=e&&Object.keys(e).forEach((function(n){return t[n]=e[n]})),null!=n&&Object.keys(n).forEach((function(e){return t[e]=n[e]})),Object.keys(t).length>0?t:null},t.prototype.fetchConsents=function(){var t=this;return Promise.allSettled([this.tcfv2Api(),this.gdprApi(),this.ccpaApi()]).then((function(){return t.getConsentData()}))},t}();e.ConsentsBlock=n},633:function(t,e,n){var o=n(920);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n(788));e.default=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError((0,i.default)(t)+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);var r=o.length;function a(t,n){if(n&&("object"===(0,i.default)(n)||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(e){a(t,e)}),(function(n){o[t]={status:"rejected",reason:n},0==--r&&e(o)}))}o[t]={status:"fulfilled",value:n},0==--r&&e(o)}for(var s=0;s1e4&&(u=!0,window.clearInterval(window._mgqi_s),window._mgqi_s=window.setInterval((function(){c.mgqWorker()}),100))},this.addInvokeQueue=function(t,e){window._mgq.push([t,e||[]])},this.mgqInit=function(){window._mgq=window._mgq||[],void 0===window._mgqp_s&&(window._mgqp_s=c.mgqWorker,window._mgqt=(new Date).getTime(),c.mgqWorker())}},n=function(t){void 0===window._mgr&&(window._mgr={}),window._mgr[t]=t},o="MgSensorInvoke";if("[object Array]"===Object.prototype.toString.call(MgSensorData)){for(var i={},s=0;s