UNPKG

@jumpgroup/avacy

Version:

oil.js Opt-In Layer for consent management based on the IAB TCF Standard

2 lines 9.02 kB
/*! 2.7.2-SNAPSHOT */ (window.oilJsonp=window.oilJsonp||[]).push([[2,3],{332:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,l=(o=i(22))&&o.__esModule?o:{default:o};e.getGroupList=function(){var t=(0,r.getPoiGroupName)(),e=(0,a.getGlobalOilObject)("oilCachedGroupList");return new l.default(function(i){e||!(0,r.isPoiActive)()?i(e):(0,a.fetchJsonData)((0,r.getPoiListDirectory)()+"/"+t+".json").then(function(t){e=t.companyList,(0,a.setGlobalOilObject)("oilCachedGroupList",e),t.iabVendorWhitelist&&t.iabVendorWhitelist.length&&(0,r.setIabVendorWhitelist)(t.iabVendorWhitelist),t.iabVendorBlacklist&&t.iabVendorBlacklist.length&&(0,r.setIabVendorBlacklist)(t.iabVendorBlacklist),i(e)}).catch(function(e){(0,n.logError)("OIL getGroupList failed and returned error: "+e+'. Group "'+t+'" not found! Please add the JSON file with the correct name.'),i([])})})};var a=i(20),n=i(21),r=i(14)},333:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(357);Object.defineProperty(e,"oilGroupListTemplate",{enumerable:!0,get:function(){return o.oilGroupListTemplate}}),Object.defineProperty(e,"oilThirdPartyListTemplate",{enumerable:!0,get:function(){return o.oilThirdPartyListTemplate}}),Object.defineProperty(e,"renderOilGroupListTemplate",{enumerable:!0,get:function(){return o.renderOilGroupListTemplate}}),Object.defineProperty(e,"renderOilThirdPartyListTemplate",{enumerable:!0,get:function(){return o.renderOilThirdPartyListTemplate}}),Object.defineProperty(e,"listSnippet",{enumerable:!0,get:function(){return o.listSnippet}})},357:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listSnippet=void 0;var o=y(i(89)),l=y(i(56)),a=y(i(55));e.renderOilGroupListTemplate=function(t){(0,d.getGroupList)().then(function(e){t(m(e))})},e.renderOilThirdPartyListTemplate=function(t){(0,u.loadVendorListAndCustomVendorList)().then(function(){(0,d.getGroupList)().then(function(){t(h((0,u.getVendorsToDisplay)()))})})},e.oilGroupListTemplate=m,e.oilThirdPartyListTemplate=h;var n=i(328),r=i(329),s=i(19);i(358);var p=i(20),d=i(332),u=i(80),c=i(331);function y(t){return t&&t.__esModule?t:{default:t}}function m(t){return b(t,(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_POI_GROUP_LIST_HEADING),(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_POI_GROUP_LIST_TEXT))}function h(t){return b(t,(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_THIRD_PARTY_LIST_HEADING),(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_THIRD_PARTY_LIST_TEXT))}var f=e.listSnippet=function(t){return t||(t=[]),'<div class="as-oil-poi-group-list">'+t.map(function(t){return"object"===(void 0===t?"undefined":(0,a.default)(t))?'<div class="as-oil-third-party-list-element">\n <span onclick=\''+s.OIL_GLOBAL_OBJECT_NAME+'._toggleViewElements(this)\'>\n <svg class=\'as-oil-icon-plus\' width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">\n <path d="M5.675 4.328H10v1.344H5.675V10h-1.35V5.672H0V4.328h4.325V0h1.35z" fill="#0068FF" fill-rule="evenodd" fill-opacity=".88"/>\n </svg>\n <svg class=\'as-oil-icon-minus\' style=\'display: none;\' width="10" height="5" viewBox="0 0 10 5" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h10v1.5H0z" fill="#3B7BE2" fill-rule="evenodd" opacity=".88"/>\n </svg>\n <span class=\'as-oil-third-party-name\'>'+t.name+"</span>\n </span>\n <div class='as-oil-third-party-toggle-part' style='display: none;'>\n <p class='as-oil-third-party-link'>"+t.policyUrl+"</p>\n </div>\n </div>":'<div class="as-oil-poi-group-list-element">'+t+"</div>"}).join("")+"</div>"};function g(){var t=(0,p.getGlobalOilObject)("oilCache");t&&(document.documentElement.setAttribute("style",t.documentElementStyle),document.body.setAttribute("style",t.bodyStyle)),(0,p.setGlobalOilObject)("oilCache",void 0)}function b(t,e,i){return"object"===(void 0===t?"undefined":(0,a.default)(t))&&(t=(0,o.default)(t)),function(){if(window.matchMedia&&window.matchMedia("(max-width: 600px)").matches){(0,p.setGlobalOilObject)("oilCache",{documentElementStyle:document.documentElement.getAttribute("style"),bodyStyle:document.body.getAttribute("style"),remove:g});var t="overflow: hidden; position: relative; height: 100%;";document.documentElement.setAttribute("style",t),document.body.setAttribute("style",t),e=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",o="attachEvent"===e?"onmessage":"message",a=window[e],n=window[i],a(o,function t(e){e&&e.data&&-1!==(0,l.default)(e.data).indexOf("oil_")&&(g(),n(o,t,!1))},!1)}var e,i,o,a,n}(),'<div class="as-oil-fixed">\n <div class="as-oil-content-overlay as-oil-poi-group-list-wrapper" data-qa="oil-poi-list">\n <div class="as-oil-l-wrapper-layout-max-width">\n '+(0,c.BackButton)()+'\n <div class="as-oil__heading">\n '+e+'\n </div>\n <p class="as-oil__intro-txt">\n '+i+" \n </p>\n "+f(t)+'\n </div>\n <div class="as-oil-l-row as-oil-l-buttons">\n <div class="as-oil-l-item">\n '+(0,c.YesButton)("as-oil__btn-primary "+s.JS_CLASS_BUTTON_OPTIN,"first_layer")+"\n </div>\n </div>\n </div>\n</div>"}(0,p.setGlobalOilObject)("_toggleViewElements",function(t){var e=t.parentElement,i=e.querySelector(".as-oil-icon-minus"),o=e.querySelector(".as-oil-icon-plus"),l=e.querySelector(".as-oil-third-party-toggle-part");"none"===l.style.display?(l.setAttribute("style","display: block; animation: fadein 0.5s"),o.setAttribute("style","display: none"),i.setAttribute("style","display: inline-block; animation: fadein 0.5s")):(l.setAttribute("style","display: none"),i.setAttribute("style","display: none"),o.setAttribute("style","display: inline-block; animation: fadein 0.5s"))}),(0,p.setGlobalOilObject)("_toggleMoreText",function(t){var e=t.parentElement,i=e.querySelector(".as-oil-cpc__purpose-legal-text"),o=e.querySelector(".as-oil-cpc__purpose-more");"none"===i.style.display?(i.setAttribute("style","display: block; animation: fadein 0.5s"),o.innerText=(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_CPC_READ_LESS)):(i.setAttribute("style","display: none"),o.innerText=(0,n.getLabel)(r.OIL_LABELS.ATTR_LABEL_CPC_READ_MORE))})},358:function(t,e,i){var o=i(359);"string"==typeof o&&(o=[[t.i,o,""]]);var l={hmr:!0,transform:void 0,insertInto:void 0};i(302)(o,l),o.locals&&(t.exports=o.locals)},359:function(t,e,i){(t.exports=i(301)(!1)).push([t.i,"@media (max-width:419px){.as-oil-poi-group-list-wrapper{min-height:300px;z-index:100;padding:16px 12px;border-top-left-radius:4px;border-top-right-radius:4px;background-color:#fafafa;box-shadow:0 -8px 20px 0 rgba(0,0,0,.2)}.as-oil-poi-group-list-wrapper .as-oil__heading,.as-oil-poi-group-list-wrapper .as-oil__intro-txt{text-align:left}}@media (min-width:420px){.as-oil-poi-group-list-wrapper .as-oil-l-row{width:auto}.as-oil-poi-group-list-wrapper .as-oil-l-row .as-oil-l-item{display:flex;justify-content:flex-end}}.as-oil-poi-group-list-wrapper .as-oil-l-wrapper-layout-max-width{display:flex;flex-direction:column}.as-oil-poi-group-list-wrapper .as-oil-poi-group-list{overflow:auto;overflow-y:scroll;min-height:150px;max-height:200px}@media (min-width:420px){.as-oil-poi-group-list-wrapper .as-oil-l-buttons-light{float:right}}@media (max-width:419px){.as-oil-poi-group-list-wrapper .as-oil-l-buttons-light{background:#f9f9f9;padding:8px;bottom:0;left:0}}@media (min-width:420px){.as-oil-poi-group-list-wrapper .as-oil-l-buttons-dark{float:right}}@media (max-width:419px){.as-oil-poi-group-list-wrapper .as-oil-l-buttons-dark{background:#262626;padding:8px;bottom:0;left:0}}.as-oil-third-party-list-element{border-bottom:1px solid #d8d8d8;padding-bottom:8px;margin-bottom:8px}.as-oil-third-party-list-element svg path{fill:#0099f2;fill:var(--avacy_accent_primary)}.as-oil-third-party-list-element .as-oil-third-party-toggle-part{margin-left:16px;width:100%}.as-oil-third-party-list-element .as-oil-third-party-name{font-weight:700;cursor:pointer;font-size:13px;font-size:calc(13px * var(--avacy_font_base_scale))}.as-oil-third-party-list-element .as-oil-third-party-description,.as-oil-third-party-list-element .as-oil-third-party-link,.as-oil-third-party-list-element .as-oil-third-party-purpose{font-size:12px;font-size:calc(12px * var(--avacy_font_base_scale))}.as-oil-third-party-list-element .as-oil-third-party-link{color:#262626;opacity:.5;text-decoration:none}.as-oil-third-party-list-element .as-oil-third-party-category-list{font-size:12px;font-size:calc(12px * var(--avacy_font_base_scale))}.as-oil-third-party-list-element .as-oil-third-party-category-list b,.as-oil-third-party-list-element .as-oil-third-party-category-list strong{font-weight:700}@keyframes fadein{0%{opacity:0}to{opacity:1}}",""])}}]);