PageSourceSearch

https://www.mabra.com/common/js/consent/consent-2.4.3.js

js mabra.com collected 2026-10-02 06:52:25 UTC 9,386 bytes, 3 lines download raw bytes

1//* se-shared-components     2.4.3 //*
2!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/consent/index.js")}({
vendor: 954 bytes, line 2
2"./node_modules/ramda/es/internal/_arity.js":function(e,t,n){function r(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,a){return t.apply(this,arguments)};case 6:return function(e,n,r,o,a,i){return t.apply(this,arguments)};case 7:return function(e,n,r,o,a,i,c){return t.apply(this,arguments)};case 8:return function(e,n,r,o,a,i,c,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,a,i,c,u,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,a,i,c,u,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}n.d(t,"a",(function(){return r}))},
vendor: 266 bytes, line 2
2"./node_modules/ramda/es/internal/_curry1.js":function(e,t,n){n.d(t,"a",(function(){return o}));var r=n("./node_modules/ramda/es/internal/_isPlaceholder.js");function o(e){return function t(n){return 0===arguments.length||Object(r.a)(n)?t:e.apply(this,arguments)}}},
vendor: 533 bytes, line 2
2"./node_modules/ramda/es/internal/_curry2.js":function(e,t,n){n.d(t,"a",(function(){return a}));var r=n("./node_modules/ramda/es/internal/_curry1.js"),o=n("./node_modules/ramda/es/internal/_isPlaceholder.js");function a(e){return function t(n,a){switch(arguments.length){case 0:return t;case 1:return Object(o.a)(n)?t:Object(r.a)((function(t){return e(n,t)}));default:return Object(o.a)(n)&&Object(o.a)(a)?t:Object(o.a)(n)?Object(r.a)((function(t){return e(t,a)})):Object(o.a)(a)?Object(r.a)((function(t){return e(n,t)})):e(n,a)}}}},
vendor: 189 bytes, line 2
2"./node_modules/ramda/es/internal/_isPlaceholder.js":function(e,t,n){function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}n.d(t,"a",(function(){return r}))},
2"./src/consent/index.js":function(e,t,n){function r(e){let t,n,{interval:r=50,timeout:o=1e4,timeoutError:a="timeoutError"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,c=e();const u=e=>i&&"function"==typeof i?i():e;return n=c?Promise.resolve(u(c)):Promise.race([new Promise(((e,n)=>t=setTimeout(n,o,a))),new Promise((n=>{t=setInterval((()=>{let t=e();t&&n(u(t))}),r)}))]).finally((()=>clearInterval(t))),n}function o(){if(window.location.search.includes("debug")){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.log("%cConsent: ","color: purple;","-",...t)}}n.r(t);const a={Targeting:"C0004"},i=[a.Targeting],c=e=>{const t=(window.OnetrustActiveGroups||""||"").split(",").filter((e=>e.length>0));var n,r;return n=e,(r=t).length>=n.length&&[...n].every((e=>r.includes(e)))?t:null};async function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;o("awaitConsentChoice wait for areGroupsLoaded ",e);return await r((()=>{const e=!!window.OnetrustActiveGroups;return e&&o("areGroupsLoaded!!"),e}),{timeout:t},(()=>c(e)))}var s=n("./src/utils/utils.js");const l=Object(s.c)((async function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];try{const e=await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;return await r((()=>c(e)),{timeout:t})}(t);return e}catch(e){if("timeoutError"!==e)throw console.error("[ERROR]: Failed to get consent: ",e),`Failed to get consent for ${t.join(", ")}`;console.warn("Failed to get consent due to timeout")}})),d=()=>new Promise(((e,t)=>{window.__tcfapi("addEventListener",2,((n,r)=>{if(!n)return;const o=n.eventStatus,a=n.gdprApplies,i=n.listenerId;return r?a?"tcloaded"===o||"useractioncomplete"===o?(window.__tcfapi("removeEventListener",2,(function(e){console.log("removeEventListener called: ",e)}),i),void e(n)):void console.log("callback ran but promise not settled"):(window.__tcfapi("removeEventListener",2,(function(e){console.log("removeEventListener called: ",e)}),i),void e(n)):(window.__tcfapi("removeEventListener",2,(function(e){console.log("removeEventListener called: ",e)}),i),void t(new Error("User rejected consent")))}))}));var f=async function(e){let t,{async:n=!1,defer:r=!0,footer:a=!1,referrerpolicy:i,timeout:c=6e4,errorPropagation:u=!1,timeoutError:s="timeoutError",...l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o("timeout",c,e),Promise.race([new Promise(((e,n)=>t=setTimeout(n,c,s))),new Promise(((t,o)=>{const c=document.createElement("script");c.src=e,c.defer=r,c.async=n,i&&(c.referrerPolicy=i),Object.keys(l).map((e=>{const t=l[e];if(void 0===t)throw`Invalid value for ${e}`;return c.dataset[e]=t})),c.onload=()=>t({status:"success",src:e}),c.onerror=t=>o(`Load for ${e} failed: ${t}`),a?void 0!==document.getElementsByTagName("footer")?document.getElementsByTagName("footer")[0].appendChild(c):console.error("footer is not available for applying load script"):document.head.appendChild(c)}))]).catch((e=>{if(u)throw e;console.warn("Loadscript catch error",e)})).finally((()=>{clearInterval(t)}))};const p="interactive",w="complete",m=Object(s.c)((async()=>new Promise((e=>{if(document.readyState===p||document.readyState===w)return e();document.addEventListener("DOMContentLoaded",(()=>e()))}))));var y=n("./node_modules/ramda/es/internal/_arity.js"),v=n("./node_modules/ramda/es/internal/_curry1.js"),h=n("./node_modules/ramda/es/internal/_curry2.js"),g=n("./node_modules/ramda/es/internal/_isPlaceholder.js");function j(e,t,n){return function(){for(var r=[],o=0,a=e,i=0;i<t.length||o<arguments.length;){var c;i<t.length&&(!Object(g.a)(t[i])||o>=arguments.length)?c=t[i]:(c=arguments[o],o+=1),r[i]=c,Object(g.a)(c)||(a-=1),i+=1}return a<=0?n.apply(this,r):Object(y.a)(a,j(e,r,n))}}var b=Object(h.a)((function(e,t){return 1===e?Object(v.a)(t):Object(y.a)(e,j(e,[],t))}));const _=async function(e,t){if(await l(e)){await m();for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];t.apply(null,r)}},O=async function(e,t){const n=await async function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];try{return await u(t)}catch(e){if("timeoutError"!==e)throw console.error("[ERROR]: Failed to get consent: ",e),`Failed to get consent for ${t.join(", ")}`;
2console.warn("Failed to get consent due to timeout")}}(e);if(o("consentGroups",e,n),!t||"function"!=typeof t)return!!n;await m();for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];t.apply(null,[n,...a])};var C=()=>{window.userConsent={loadScript:f,waitFor:r},Object.keys(a).map((e=>{let t=b(3,_)(a[e],f),n=b(2,_)(a[e]),r=b(2,O)(a[e]);window.userConsent[`load${e}Script`]=t,window.userConsent[`applyFor${e}`]=n,window.userConsent[`is${e}Approved`]=r}))};const E=async()=>{await(async()=>(console.log("waitFor tcfApiLoaded ..."),await r((()=>"undefined"!=typeof window&&void 0!==window.__tcfapi),{timeout:6e4,timeoutError:"Timeout: window.__tcfapi not available "}).then((()=>{console.log("tcfApi is loaded")}))))();const e=await d();window.OnetrustActiveGroups=(e=>{var t=e&&e.purpose&&e.purpose.consents||{};return"object"==typeof t&&Object.keys(t).length>0&&t[1]&&t[4]})(e)?"C0004,C0003,C0002":"optout",C(),window.userConsent.loadScript=f};let P=window.allerUserConsent||{};P.queue=P.queue||[];const A=()=>{window.allerUserConsent.queue={},window.allerUserConsent.queue.push=function(e){e()},Object.freeze(window.allerUserConsent)};P=(async()=>await(async()=>(await E().then((()=>{})),null==window.allerUserConsent?(window.allerUserConsent={},A(),window.allerUserConsent):"object"==typeof P&&Array.isArray(window.allerUserConsent.queue)?(window.allerUserConsent.queue.forEach((e=>e())),A(),window.allerUserConsent):void 0))())()},
2"./src/utils/utils.js":function(e,t,n){n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i}));const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};"function"==typeof e&&e()},o=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)),a=()=>window.location.search.includes("debug"),i=e=>{let t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}}
2});
3//# sourceMappingURL=consent.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.