Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@schibsted/data-controller

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schibsted/data-controller - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0

2

dist/data-controller-sdk.cjs.js

@@ -1,2 +0,2 @@

"use strict";function t(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function e(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}Object.defineProperty(exports,"__esModule",{value:!0});function a(){var t=localStorage.getItem("sch-data-controller");if(t)try{return JSON.parse(t,(function(t,e){return"lastViewed"===t||"lastCobranding"===t?new Date(e):e}))}catch(t){return}}function n(t){localStorage.setItem("sch-data-controller",JSON.stringify(t))}function r(t,e,a){if(e>t)return!1;var n=Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5);return!(n<a)&&(n>1||t.getHours()>=6)}var c=[/\bHermes\b/i,/(ios|android).*(aftonbladet|vg|rnd|bt|fvn|aftenposten|svd)/i];function o(t){return c.some((function(e){return t.match(e)}))||null!=window.hermesJwe}var l=function(t){return'<span class="sch-datacontroller--optional-mobile">'.concat(t,"</span>")},i=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{no:{text:"".concat(l("[BRAND] er en del av Schibsted.")," Schibsted er ansvarlig for dine data på denne siden."),shortText:"[BRAND] er en del av ",link:t?"Les mer":"Les mer her",url:"https://info.privacy.schibsted.com/no/schibsted-norge-personvernerklaering/"},sv:{text:"".concat(l("[BRAND] är en del av Schibsted.")," Schibsted är ansvarig för dina data på denna sida."),shortText:"[BRAND] är en del av ",link:t?"Läs mer":"Läs mer här",url:"https://info.privacy.schibsted.com/se/schibsted-sverige-personuppgiftspolicy/"},fi:{text:"".concat(l("[BRAND] on osa Schibsted-konsernia.")," Schibsted vastaa tietojesi hallinnasta tällä sivustolla."),shortText:"[BRAND] on osa Schibsted-konsernia",link:"Lue lisää",url:"https://info.privacy.schibsted.com/fi/"},en_SE:{text:"".concat(l("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-sverige-english/"},en_NO:{text:"".concat(l("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-norge-english/"},en_FI:{text:"".concat(l("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/fi/"}}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e="sch-datacontroller__logo".concat(t?" sch-datacontroller__logo--inline":" sch-datacontroller--optional-mobile");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 103 19" class="'.concat(e,'">\n <title>Schibsted</title>\n <rect width="103" height="19" fill="#fff"/>\n <path d="M10.609 9.222c.17 0 .312.087.413.213.154.194.253.4.324.544.677 1.362.831 3.009.33 4.49-.804 2.371-2.994 4.128-5.63 4.128-3.18 0-5.214-2.144-5.851-4.19a.101.101 0 01.068-.126l2.887-.884a.101.101 0 01.127.066c.138.442.86 1.929 2.802 1.929 1.466 0 2.678-1.251 2.678-2.794 0-.654-.097-1.08-.294-1.516a.76.76 0 01-.078-.283.44.44 0 01.446-.46.44.44 0 01.36.182c.02.027.058.084.076.113.015.023.043.038.069.022.025-.015.024-.043.01-.072l-.05-.105a.49.49 0 01.436-.711.49.49 0 01.407.233l.095.153c.015.025.042.039.07.023.025-.013.025-.041.011-.07l-.085-.17a.554.554 0 01-.07-.253c0-.269.182-.462.449-.462zm9.01-2.885c2.916 0 4.666 1.66 5.306 3.448a.1.1 0 01-.028.107l-.034.02-2.63.903a.1.1 0 01-.125-.055c-.358-.813-1.084-1.538-2.419-1.538-1.602 0-2.945 1.149-2.945 3.236s1.366 3.26 2.969 3.26c1.544 0 2.344-.98 2.632-1.848a.103.103 0 01.09-.07l.04.004 2.567.851a.1.1 0 01.065.123c-.55 1.893-2.356 3.8-5.394 3.8-3.417 0-6.104-2.58-6.104-6.12 0-3.565 2.64-6.12 6.01-6.12zm44.256 0c2.75 0 3.977 1.45 4.391 2.653a.099.099 0 01-.027.104l-.032.02-2.335.9a.1.1 0 01-.132-.061c-.186-.61-.71-1.247-1.841-1.247-.825 0-1.485.492-1.485 1.149 0 .52.362.83.918.968l.143.03 1.65.352c2.285.47 3.44 1.886 3.44 3.575 0 1.875-1.461 3.798-4.501 3.798-3.409 0-4.634-2.15-4.82-3.474a.098.098 0 01.044-.095l.034-.015 2.488-.542a.099.099 0 01.12.083c.114.872.797 1.652 2.11 1.652 1.037 0 1.532-.54 1.532-1.15 0-.481-.308-.842-1.077-1.04l-.172-.04-1.532-.352c-2.238-.492-3.252-1.874-3.252-3.492 0-2.064 1.838-3.776 4.336-3.776zm19.976 0c3.582 0 5.727 2.275 5.727 5.98 0 .345-.028.703-.041.87a.1.1 0 01-.063.085l-.037.007h-8.201c.07 1.524 1.366 2.626 2.922 2.626 1.144 0 1.883-.446 2.331-1.135a.102.102 0 01.09-.046l.035.008 2.35 1.016a.1.1 0 01.049.139c-.833 1.537-2.505 2.692-4.879 2.692-3.181 0-5.986-2.275-5.986-6.168 0-3.682 2.734-6.074 5.703-6.074zM102.9 1.248a.1.1 0 01.093.061l.008.04v16.778a.1.1 0 01-.061.092l-.04.008h-2.84a.1.1 0 01-.093-.061l-.008-.039-.006-1.237c-.518.915-1.697 1.618-3.252 1.618-3.3 0-5.656-2.58-5.656-6.074 0-3.377 2.286-6.026 5.562-6.026 1.916 0 2.862.75 3.229 1.35l.046.08v-6.49a.1.1 0 01.062-.092l.039-.008h2.917zm-53.91 0a.1.1 0 01.092.061l.008.04v6.606c.518-.82 1.79-1.57 3.511-1.57 3.393 0 5.35 2.602 5.35 6.026 0 3.494-2.169 6.097-5.468 6.097-1.518 0-2.698-.631-3.339-1.535l-.101-.153v1.307a.1.1 0 01-.062.092l-.039.008h-2.839a.1.1 0 01-.092-.061l-.008-.04V1.349a.1.1 0 01.061-.092l.04-.008h2.885zm25.414 1.994a.1.1 0 01.093.06l.008.04v3.347h2.232a.1.1 0 01.093.061l.008.039v2.567a.1.1 0 01-.062.092l-.04.008h-2.231v4.831c0 1.008.47 1.337 1.366 1.337.307 0 .644-.031.848-.068a.1.1 0 01.112.064l.007.035v2.385c0 .043-.027.08-.067.096-.3.114-.849.255-1.7.255-2.19 0-3.585-1.252-3.673-3.352l-.004-.213v-5.37h-1.997a.1.1 0 01-.093-.061l-.007-.039V6.789a.1.1 0 01.061-.092l.04-.008H71.4l.004-3.347a.1.1 0 01.062-.093l.039-.007h2.898zM43.202 6.689a.1.1 0 01.093.061l.008.039v11.338a.1.1 0 01-.062.092l-.039.008h-2.933a.1.1 0 01-.093-.061l-.008-.04V6.79a.1.1 0 01.062-.092l.039-.008h2.933zm-13.28-5.44a.1.1 0 01.093.06l.008.04V7.65c.754-.89 2.027-1.266 3.135-1.266 2.861 0 4.233 1.925 4.309 4.357l.003.216v7.17a.1.1 0 01-.061.092l-.04.008h-2.933a.1.1 0 01-.092-.061l-.008-.04v-6.63c0-1.29-.637-2.345-2.145-2.346-1.373 0-2.116.93-2.165 2.14l-.003.16v6.677a.1.1 0 01-.061.092l-.04.008H26.99a.1.1 0 01-.093-.061l-.008-.04V1.349a.1.1 0 01.062-.092l.039-.008h2.933zM51.94 9.15c-1.579 0-2.924 1.173-2.924 3.283 0 2.087 1.345 3.308 2.924 3.308 1.603 0 2.875-1.197 2.875-3.308 0-2.11-1.272-3.283-2.875-3.283zm45.137.023c-1.602 0-2.875 1.197-2.875 3.26 0 2.064 1.226 3.308 2.875 3.308 1.603 0 2.888-1.244 2.888-3.331 0-2.064-1.285-3.237-2.888-3.237zM5.985 11.41a.28.28 0 110 .557.28.28 0 110-.557zm-1.125-.17h.065c.068.008.144.032.209.055a.308.308 0 01.168.142c.074.136.03.31-.098.397a.345.345 0 01-.22.048.911.911 0 01-.163-.03c-.171-.047-.277-.21-.233-.382a.313.313 0 01.337-.23zm-1.378-.587l.081.012c.088.023.173.073.253.114l.219.11a.35.35 0 01.187.247.351.351 0 01-.366.409 1.023 1.023 0 01-.289-.071 1.326 1.326 0 01-.244-.122c-.236-.147-.28-.464-.071-.625a.36.36 0 01.311-.062zM83.899 8.87c-1.559 0-2.446 1.12-2.58 2.142l-.013.133h5.185c-.047-1.15-.802-2.275-2.592-2.275zM5.985 10.215a.28.28 0 110 .557.28.28 0 110-.557zm-3.962-.667c.12.004.207.067.287.148.088.09.18.171.274.255.076.066.138.114.207.187a.358.358 0 01.073.373.361.361 0 01-.268.222.464.464 0 01-.33-.07 1.832 1.832 0 01-.276-.208 2.171 2.171 0 01-.258-.266.396.396 0 01-.052-.44.372.372 0 01.343-.201zm2.58.386l.078.005c.058.011.13.04.194.063l.209.075c.088.031.152.063.2.135.12.179.021.43-.189.479a.636.636 0 01-.289-.014 1.673 1.673 0 01-.275-.096c-.257-.11-.317-.384-.138-.556a.33.33 0 01.288-.086zm2.263-.795c.097-.04.198-.027.305.003.143.04.198.068.314.122.182.083.333.177.498.29.07.049.151.115.21.176.145.15.143.38-.005.511-.132.116-.318.099-.465-.006a5.933 5.933 0 00-.35-.232 3.98 3.98 0 00-.433-.23c-.114-.056-.222-.108-.259-.24a.32.32 0 01.185-.394zm-3.873-.241l.078.002c.121.017.196.097.284.17.136.115.237.194.382.3.097.069.179.122.241.228a.341.341 0 01-.028.395.356.356 0 01-.358.114.81.81 0 01-.21-.081 2.453 2.453 0 01-.607-.462c-.12-.122-.168-.31-.09-.462a.38.38 0 01.386-.202zM8.3 8.48l.08.01a.81.81 0 01.209.081c.206.105.419.27.607.462.12.122.168.31.09.463a.38.38 0 01-.386.201c-.121-.016-.196-.096-.284-.17a6.056 6.056 0 00-.382-.299c-.096-.07-.179-.123-.241-.229a.341.341 0 01.029-.395.356.356 0 01.358-.114zm-2.314.54a.28.28 0 110 .557.28.28 0 110-.557zm-2.202-.664c.131-.116.317-.099.464.006.124.088.228.157.35.232.157.096.249.143.433.23.115.056.222.108.26.24a.32.32 0 01-.186.394c-.096.04-.198.027-.304-.003-.144-.04-.198-.068-.315-.122a3.196 3.196 0 01-.498-.29 1.482 1.482 0 01-.21-.176c-.145-.15-.143-.38.006-.511zM5.924 0c3.181 0 5.215 2.144 5.852 4.19a.101.101 0 01-.068.126L8.821 5.2a.101.101 0 01-.127-.066 2.873 2.873 0 00-2.802-1.928c-1.465 0-2.678 1.25-2.678 2.793 0 .654.097 1.08.294 1.516a.76.76 0 01.078.284.44.44 0 01-.445.46.44.44 0 01-.385-.218l-.052-.077c-.015-.024-.043-.038-.069-.023-.024.015-.024.044-.01.072l.05.105a.49.49 0 01-.436.711.49.49 0 01-.406-.233l-.096-.153c-.015-.025-.042-.039-.07-.023-.024.013-.025.042-.01.07.02.043.062.127.084.17.04.077.071.16.071.253 0 .269-.182.462-.45.462a.525.525 0 01-.412-.213c-.155-.194-.254-.4-.325-.544-.677-1.362-.83-3.009-.33-4.49C1.1 1.759 3.29 0 5.926 0zm3.45 7.864a.464.464 0 01.331.071c.114.07.18.123.276.207.09.079.174.164.258.267.109.133.123.299.052.439a.372.372 0 01-.343.201c-.12-.004-.207-.066-.286-.147a5.183 5.183 0 00-.275-.256c-.075-.066-.138-.114-.207-.187a.358.358 0 01-.073-.373.361.361 0 01.268-.222zm-2.498.042a.636.636 0 01.289.015c.121.03.191.06.276.095.256.11.316.385.138.556a.33.33 0 01-.29.086c-.057-.011-.13-.04-.192-.063l-.21-.075c-.088-.03-.152-.062-.2-.135a.316.316 0 01.189-.479zm-.89-.081a.28.28 0 110 .558.28.28 0 110-.558zm2.13-.773c.094.007.19.034.288.071.09.034.162.072.244.123.236.146.28.463.071.624a.36.36 0 01-.311.063c-.088-.024-.172-.074-.253-.115a32.94 32.94 0 00-.077-.038l-.141-.071a.35.35 0 01-.188-.248.351.351 0 01.366-.409zm-1.129-.337a.911.911 0 01.163.03c.171.047.277.21.233.382a.313.313 0 01-.336.23 1.02 1.02 0 01-.21-.054.308.308 0 01-.168-.143.306.306 0 01.098-.397.345.345 0 01.22-.048zM5.986 6.63a.28.28 0 110 .558.28.28 0 110-.558zM41.739.967c.963.007 1.778.751 1.901 1.702.147 1.136-.748 2.144-1.916 2.144-1.06 0-1.933-.868-1.933-1.9 0-1.083.88-1.954 1.948-1.946z" fill="#000" fill-rule="evenodd"/>\n </svg>')},d=function(t){var e=t.brand,a=t.texts,n=t.closeButton,r=t.modifier,c=a.text.replace("[BRAND]",e),o=["sch-datacontroller","sch-datacontroller--cobranded"];return r&&o.push("sch-datacontroller--".concat(r)),'<div class="'.concat(o.join(" "),'">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n ').concat(s(),'\n <span class="sch-datacontroller__text">\n ').concat(c,' <a class="sch-datacontroller__read-more" href="').concat(a.url,'">').concat(a.link,"</a>\n </span>\n </div>\n ").concat(n?'<button class="sch-datacontroller__btn-close sch-datacontroller__btn" type="button">'.concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="sch-datacontroller__btn-close-icon">\n <title>Close</title>\n <path d="M9.06 8l1.47 1.47a.75.75 0 01-1.06 1.06L7.999 9.06l-1.473 1.47a.75.75 0 01-1.06-1.06l1.472-1.471L5.47 6.53a.75.75 0 011.06-1.06L8 6.939l1.47-1.47a.75.75 0 011.06 1.062L9.06 7.999zM8 15A7 7 0 118 1a7 7 0 010 14zm0-1.5a5.5 5.5 0 100-11 5.5 5.5 0 000 11z"/>\n</svg>',"</button>"):"","\n </div>\n</div>")};function h(t){var e=document.createElement("div");return e.innerHTML=t,e.children[0]}function u(t,e,a){var c,o=new Date;if(!a||r(o,a.lastViewed,1)){var l,u,v,f=!a||r(o,a.lastCobranding,7),p={brand:e.brandName,texts:i(e.minimizeText)[e.language],modifier:e.layout},b=f?d(p):(u=(l=p).brand,v=l.texts.shortText.replace("[BRAND]",u),'<div class="sch-datacontroller sch-datacontroller--subheader sch-datacontroller--minimal">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n <span class="sch-datacontroller__text sch-datacontroller__text--inline">\n '.concat(v,"\n </span>\n ").concat(s(!0),"\n </div>\n </div>\n</div>")),m=null!==(c=null==a?void 0:a.lastCobranding)&&void 0!==c?c:o;t.appendChild(h(b)),n({layout:"subheader",lastViewed:o,lastCobranding:f?o:m})}}function v(t,e,a){var c,o=new Date;if(!a||r(o,a.lastViewed,1)){var l=h(d({brand:e.brandName,texts:i(e.minimizeText)[e.language],modifier:e.layout,closeButton:!0}));null===(c=l.querySelector(".sch-datacontroller__btn-close"))||void 0===c||c.addEventListener("click",(function(){return l.remove()})),t.appendChild(l),"number"==typeof e.hideAfter&&0!==e.hideAfter&&setTimeout((function(){l.remove()}),e.hideAfter),n({layout:"footer",lastViewed:o})}}function f(t,e){t.appendChild(h(d({brand:e.brandName,texts:i(e.minimizeText)[e.language],modifier:"permanent"})))}exports.init=function(n){var r=function(a){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){t(a,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(r,t))}))}return a}({layout:"subheader",language:"en_SE",hideAfter:0,minimizeText:!1},n);return{render:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.permanent,c=void 0!==n&&n;if(t&&!o(navigator.userAgent))if(c)f(t,r);else{var l=a();"subheader"===r.layout?u(t,r,"subheader"===(null==l?void 0:l.layout)?l:void 0):v(t,r,"footer"===(null==l?void 0:l.layout)?l:void 0)}}}};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function t(t){localStorage.setItem("sch-data-controller",JSON.stringify(t))}function e(t,e,a){if(e>t)return!1;const n=Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5);return!(n<a)&&(n>1||t.getHours()>=6)}const a=[/\bHermes\b/i,/(ios|android).*(aftonbladet|vg|rnd|bt|fvn|aftenposten|svd)/i];const n=t=>'<span class="sch-datacontroller--optional-mobile">'.concat(t,"</span>"),c=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{no:{text:"".concat(n("[BRAND] er en del av Schibsted.")," Schibsted er ansvarlig for dine data på denne siden."),shortText:"[BRAND] er en del av ",link:t?"Les mer":"Les mer her",url:"https://info.privacy.schibsted.com/no/schibsted-norge-personvernerklaering/"},sv:{text:"".concat(n("[BRAND] är en del av Schibsted.")," Schibsted är ansvarig för dina data på denna sida."),shortText:"[BRAND] är en del av ",link:t?"Läs mer":"Läs mer här",url:"https://info.privacy.schibsted.com/se/schibsted-sverige-personuppgiftspolicy/"},fi:{text:"".concat(n("[BRAND] on osa Schibsted-konsernia.")," Schibsted vastaa tietojesi hallinnasta tällä sivustolla."),shortText:"[BRAND] on osa Schibsted-konsernia",link:"Lue lisää",url:"https://info.privacy.schibsted.com/fi/"},da:{text:"".concat(n("[BRAND] er en del af Schibsted.")," Schibsted er ansvarlig for dine data på denne side."),shortText:"[BRAND] er en del af ",link:"Læs mere",url:"https://info.privacy.schibsted.com/dk/persondata-og-cookiepolitik/"},en_SE:{text:"".concat(n("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-sverige-english/"},en_NO:{text:"".concat(n("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-norge-english/"},en_FI:{text:"".concat(n("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/fi/"},en_DK:{text:"".concat(n("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/dk/"}}},o=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e="sch-datacontroller__logo".concat(t?" sch-datacontroller__logo--inline":" sch-datacontroller--optional-mobile");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 103 19" class="'.concat(e,'">\n <title>Schibsted</title>\n <rect width="103" height="19" fill="#fff"/>\n <path d="M10.609 9.222c.17 0 .312.087.413.213.154.194.253.4.324.544.677 1.362.831 3.009.33 4.49-.804 2.371-2.994 4.128-5.63 4.128-3.18 0-5.214-2.144-5.851-4.19a.101.101 0 01.068-.126l2.887-.884a.101.101 0 01.127.066c.138.442.86 1.929 2.802 1.929 1.466 0 2.678-1.251 2.678-2.794 0-.654-.097-1.08-.294-1.516a.76.76 0 01-.078-.283.44.44 0 01.446-.46.44.44 0 01.36.182c.02.027.058.084.076.113.015.023.043.038.069.022.025-.015.024-.043.01-.072l-.05-.105a.49.49 0 01.436-.711.49.49 0 01.407.233l.095.153c.015.025.042.039.07.023.025-.013.025-.041.011-.07l-.085-.17a.554.554 0 01-.07-.253c0-.269.182-.462.449-.462zm9.01-2.885c2.916 0 4.666 1.66 5.306 3.448a.1.1 0 01-.028.107l-.034.02-2.63.903a.1.1 0 01-.125-.055c-.358-.813-1.084-1.538-2.419-1.538-1.602 0-2.945 1.149-2.945 3.236s1.366 3.26 2.969 3.26c1.544 0 2.344-.98 2.632-1.848a.103.103 0 01.09-.07l.04.004 2.567.851a.1.1 0 01.065.123c-.55 1.893-2.356 3.8-5.394 3.8-3.417 0-6.104-2.58-6.104-6.12 0-3.565 2.64-6.12 6.01-6.12zm44.256 0c2.75 0 3.977 1.45 4.391 2.653a.099.099 0 01-.027.104l-.032.02-2.335.9a.1.1 0 01-.132-.061c-.186-.61-.71-1.247-1.841-1.247-.825 0-1.485.492-1.485 1.149 0 .52.362.83.918.968l.143.03 1.65.352c2.285.47 3.44 1.886 3.44 3.575 0 1.875-1.461 3.798-4.501 3.798-3.409 0-4.634-2.15-4.82-3.474a.098.098 0 01.044-.095l.034-.015 2.488-.542a.099.099 0 01.12.083c.114.872.797 1.652 2.11 1.652 1.037 0 1.532-.54 1.532-1.15 0-.481-.308-.842-1.077-1.04l-.172-.04-1.532-.352c-2.238-.492-3.252-1.874-3.252-3.492 0-2.064 1.838-3.776 4.336-3.776zm19.976 0c3.582 0 5.727 2.275 5.727 5.98 0 .345-.028.703-.041.87a.1.1 0 01-.063.085l-.037.007h-8.201c.07 1.524 1.366 2.626 2.922 2.626 1.144 0 1.883-.446 2.331-1.135a.102.102 0 01.09-.046l.035.008 2.35 1.016a.1.1 0 01.049.139c-.833 1.537-2.505 2.692-4.879 2.692-3.181 0-5.986-2.275-5.986-6.168 0-3.682 2.734-6.074 5.703-6.074zM102.9 1.248a.1.1 0 01.093.061l.008.04v16.778a.1.1 0 01-.061.092l-.04.008h-2.84a.1.1 0 01-.093-.061l-.008-.039-.006-1.237c-.518.915-1.697 1.618-3.252 1.618-3.3 0-5.656-2.58-5.656-6.074 0-3.377 2.286-6.026 5.562-6.026 1.916 0 2.862.75 3.229 1.35l.046.08v-6.49a.1.1 0 01.062-.092l.039-.008h2.917zm-53.91 0a.1.1 0 01.092.061l.008.04v6.606c.518-.82 1.79-1.57 3.511-1.57 3.393 0 5.35 2.602 5.35 6.026 0 3.494-2.169 6.097-5.468 6.097-1.518 0-2.698-.631-3.339-1.535l-.101-.153v1.307a.1.1 0 01-.062.092l-.039.008h-2.839a.1.1 0 01-.092-.061l-.008-.04V1.349a.1.1 0 01.061-.092l.04-.008h2.885zm25.414 1.994a.1.1 0 01.093.06l.008.04v3.347h2.232a.1.1 0 01.093.061l.008.039v2.567a.1.1 0 01-.062.092l-.04.008h-2.231v4.831c0 1.008.47 1.337 1.366 1.337.307 0 .644-.031.848-.068a.1.1 0 01.112.064l.007.035v2.385c0 .043-.027.08-.067.096-.3.114-.849.255-1.7.255-2.19 0-3.585-1.252-3.673-3.352l-.004-.213v-5.37h-1.997a.1.1 0 01-.093-.061l-.007-.039V6.789a.1.1 0 01.061-.092l.04-.008H71.4l.004-3.347a.1.1 0 01.062-.093l.039-.007h2.898zM43.202 6.689a.1.1 0 01.093.061l.008.039v11.338a.1.1 0 01-.062.092l-.039.008h-2.933a.1.1 0 01-.093-.061l-.008-.04V6.79a.1.1 0 01.062-.092l.039-.008h2.933zm-13.28-5.44a.1.1 0 01.093.06l.008.04V7.65c.754-.89 2.027-1.266 3.135-1.266 2.861 0 4.233 1.925 4.309 4.357l.003.216v7.17a.1.1 0 01-.061.092l-.04.008h-2.933a.1.1 0 01-.092-.061l-.008-.04v-6.63c0-1.29-.637-2.345-2.145-2.346-1.373 0-2.116.93-2.165 2.14l-.003.16v6.677a.1.1 0 01-.061.092l-.04.008H26.99a.1.1 0 01-.093-.061l-.008-.04V1.349a.1.1 0 01.062-.092l.039-.008h2.933zM51.94 9.15c-1.579 0-2.924 1.173-2.924 3.283 0 2.087 1.345 3.308 2.924 3.308 1.603 0 2.875-1.197 2.875-3.308 0-2.11-1.272-3.283-2.875-3.283zm45.137.023c-1.602 0-2.875 1.197-2.875 3.26 0 2.064 1.226 3.308 2.875 3.308 1.603 0 2.888-1.244 2.888-3.331 0-2.064-1.285-3.237-2.888-3.237zM5.985 11.41a.28.28 0 110 .557.28.28 0 110-.557zm-1.125-.17h.065c.068.008.144.032.209.055a.308.308 0 01.168.142c.074.136.03.31-.098.397a.345.345 0 01-.22.048.911.911 0 01-.163-.03c-.171-.047-.277-.21-.233-.382a.313.313 0 01.337-.23zm-1.378-.587l.081.012c.088.023.173.073.253.114l.219.11a.35.35 0 01.187.247.351.351 0 01-.366.409 1.023 1.023 0 01-.289-.071 1.326 1.326 0 01-.244-.122c-.236-.147-.28-.464-.071-.625a.36.36 0 01.311-.062zM83.899 8.87c-1.559 0-2.446 1.12-2.58 2.142l-.013.133h5.185c-.047-1.15-.802-2.275-2.592-2.275zM5.985 10.215a.28.28 0 110 .557.28.28 0 110-.557zm-3.962-.667c.12.004.207.067.287.148.088.09.18.171.274.255.076.066.138.114.207.187a.358.358 0 01.073.373.361.361 0 01-.268.222.464.464 0 01-.33-.07 1.832 1.832 0 01-.276-.208 2.171 2.171 0 01-.258-.266.396.396 0 01-.052-.44.372.372 0 01.343-.201zm2.58.386l.078.005c.058.011.13.04.194.063l.209.075c.088.031.152.063.2.135.12.179.021.43-.189.479a.636.636 0 01-.289-.014 1.673 1.673 0 01-.275-.096c-.257-.11-.317-.384-.138-.556a.33.33 0 01.288-.086zm2.263-.795c.097-.04.198-.027.305.003.143.04.198.068.314.122.182.083.333.177.498.29.07.049.151.115.21.176.145.15.143.38-.005.511-.132.116-.318.099-.465-.006a5.933 5.933 0 00-.35-.232 3.98 3.98 0 00-.433-.23c-.114-.056-.222-.108-.259-.24a.32.32 0 01.185-.394zm-3.873-.241l.078.002c.121.017.196.097.284.17.136.115.237.194.382.3.097.069.179.122.241.228a.341.341 0 01-.028.395.356.356 0 01-.358.114.81.81 0 01-.21-.081 2.453 2.453 0 01-.607-.462c-.12-.122-.168-.31-.09-.462a.38.38 0 01.386-.202zM8.3 8.48l.08.01a.81.81 0 01.209.081c.206.105.419.27.607.462.12.122.168.31.09.463a.38.38 0 01-.386.201c-.121-.016-.196-.096-.284-.17a6.056 6.056 0 00-.382-.299c-.096-.07-.179-.123-.241-.229a.341.341 0 01.029-.395.356.356 0 01.358-.114zm-2.314.54a.28.28 0 110 .557.28.28 0 110-.557zm-2.202-.664c.131-.116.317-.099.464.006.124.088.228.157.35.232.157.096.249.143.433.23.115.056.222.108.26.24a.32.32 0 01-.186.394c-.096.04-.198.027-.304-.003-.144-.04-.198-.068-.315-.122a3.196 3.196 0 01-.498-.29 1.482 1.482 0 01-.21-.176c-.145-.15-.143-.38.006-.511zM5.924 0c3.181 0 5.215 2.144 5.852 4.19a.101.101 0 01-.068.126L8.821 5.2a.101.101 0 01-.127-.066 2.873 2.873 0 00-2.802-1.928c-1.465 0-2.678 1.25-2.678 2.793 0 .654.097 1.08.294 1.516a.76.76 0 01.078.284.44.44 0 01-.445.46.44.44 0 01-.385-.218l-.052-.077c-.015-.024-.043-.038-.069-.023-.024.015-.024.044-.01.072l.05.105a.49.49 0 01-.436.711.49.49 0 01-.406-.233l-.096-.153c-.015-.025-.042-.039-.07-.023-.024.013-.025.042-.01.07.02.043.062.127.084.17.04.077.071.16.071.253 0 .269-.182.462-.45.462a.525.525 0 01-.412-.213c-.155-.194-.254-.4-.325-.544-.677-1.362-.83-3.009-.33-4.49C1.1 1.759 3.29 0 5.926 0zm3.45 7.864a.464.464 0 01.331.071c.114.07.18.123.276.207.09.079.174.164.258.267.109.133.123.299.052.439a.372.372 0 01-.343.201c-.12-.004-.207-.066-.286-.147a5.183 5.183 0 00-.275-.256c-.075-.066-.138-.114-.207-.187a.358.358 0 01-.073-.373.361.361 0 01.268-.222zm-2.498.042a.636.636 0 01.289.015c.121.03.191.06.276.095.256.11.316.385.138.556a.33.33 0 01-.29.086c-.057-.011-.13-.04-.192-.063l-.21-.075c-.088-.03-.152-.062-.2-.135a.316.316 0 01.189-.479zm-.89-.081a.28.28 0 110 .558.28.28 0 110-.558zm2.13-.773c.094.007.19.034.288.071.09.034.162.072.244.123.236.146.28.463.071.624a.36.36 0 01-.311.063c-.088-.024-.172-.074-.253-.115a32.94 32.94 0 00-.077-.038l-.141-.071a.35.35 0 01-.188-.248.351.351 0 01.366-.409zm-1.129-.337a.911.911 0 01.163.03c.171.047.277.21.233.382a.313.313 0 01-.336.23 1.02 1.02 0 01-.21-.054.308.308 0 01-.168-.143.306.306 0 01.098-.397.345.345 0 01.22-.048zM5.986 6.63a.28.28 0 110 .558.28.28 0 110-.558zM41.739.967c.963.007 1.778.751 1.901 1.702.147 1.136-.748 2.144-1.916 2.144-1.06 0-1.933-.868-1.933-1.9 0-1.083.88-1.954 1.948-1.946z" fill="#000" fill-rule="evenodd"/>\n </svg>')},l=t=>{let{brand:e,texts:a,closeButton:n,modifier:c}=t;const l=a.text.replace("[BRAND]",e),r=["sch-datacontroller","sch-datacontroller--cobranded"];return c&&r.push("sch-datacontroller--".concat(c)),'<div class="'.concat(r.join(" "),'">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n ').concat(o(),'\n <span class="sch-datacontroller__text">\n ').concat(l,' <a class="sch-datacontroller__read-more" href="').concat(a.url,'">').concat(a.link,"</a>\n </span>\n </div>\n ").concat(n?'<button class="sch-datacontroller__btn-close sch-datacontroller__btn" type="button">'.concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="sch-datacontroller__btn-close-icon">\n <title>Close</title>\n <path d="M9.06 8l1.47 1.47a.75.75 0 01-1.06 1.06L7.999 9.06l-1.473 1.47a.75.75 0 01-1.06-1.06l1.472-1.471L5.47 6.53a.75.75 0 011.06-1.06L8 6.939l1.47-1.47a.75.75 0 011.06 1.062L9.06 7.999zM8 15A7 7 0 118 1a7 7 0 010 14zm0-1.5a5.5 5.5 0 100-11 5.5 5.5 0 000 11z"/>\n</svg>',"</button>"):"","\n </div>\n</div>")};function r(t){const e=document.createElement("div");return e.innerHTML=t,e.children[0]}function s(a,n,s){var i;const d=new Date;if(!(!s||e(d,s.lastViewed,1)))return;const h=!s||e(d,s.lastCobranding,7),u={brand:n.brandName,texts:c(n.minimizeText)[n.language],modifier:n.layout},v=h?l(u):(t=>{let{brand:e,texts:a}=t;const n=a.shortText.replace("[BRAND]",e);return'<div class="sch-datacontroller sch-datacontroller--subheader sch-datacontroller--minimal">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n <span class="sch-datacontroller__text sch-datacontroller__text--inline">\n '.concat(n,"\n </span>\n ").concat(o(!0),"\n </div>\n </div>\n</div>")})(u),m=null!==(i=null==s?void 0:s.lastCobranding)&&void 0!==i?i:d;a.appendChild(r(v)),t({layout:"subheader",lastViewed:d,lastCobranding:h?d:m})}exports.init=function(n){const o={layout:"subheader",language:"en_SE",hideAfter:0,minimizeText:!1,...n};return{render(n){let{permanent:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n||(d=navigator.userAgent,a.some((t=>d.match(t)))||null!=window.hermesJwe))return;var d;if(i)return void function(t,e){t.appendChild(r(l({brand:e.brandName,texts:c(e.minimizeText)[e.language],modifier:"permanent"})))}(n,o);const h=function(){const t=localStorage.getItem("sch-data-controller");if(t)try{return JSON.parse(t,((t,e)=>"lastViewed"===t||"lastCobranding"===t?new Date(e):e))}catch(t){return}}();"subheader"===o.layout?s(n,o,"subheader"===(null==h?void 0:h.layout)?h:void 0):function(a,n,o){var s;const i=new Date;if(o&&!e(i,o.lastViewed,1))return;const d=r(l({brand:n.brandName,texts:c(n.minimizeText)[n.language],modifier:n.layout,closeButton:!0}));null===(s=d.querySelector(".sch-datacontroller__btn-close"))||void 0===s||s.addEventListener("click",(()=>d.remove())),a.appendChild(d),"number"==typeof n.hideAfter&&0!==n.hideAfter&&setTimeout((()=>{d.remove()}),n.hideAfter),t({layout:"footer",lastViewed:i})}(n,o,"footer"===(null==h?void 0:h.layout)?h:void 0)}}};
//# sourceMappingURL=data-controller-sdk.cjs.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).CNP=e.CNP||{},e.CNP.DataControllerSDK={}))}(this,(function(e){"use strict";function t(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function a(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}var n="sch-data-controller";function r(){var e=localStorage.getItem(n);if(e)try{return JSON.parse(e,(function(e,t){return"lastViewed"===e||"lastCobranding"===e?new Date(t):t}))}catch(e){return}}function o(e){localStorage.setItem(n,JSON.stringify(e))}function c(e,t,a){if(t>e)return!1;var n=Math.floor((Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())-Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))/864e5);return!(n<a)&&(n>1||e.getHours()>=6)}var l=[/\bHermes\b/i,/(ios|android).*(aftonbladet|vg|rnd|bt|fvn|aftenposten|svd)/i];function i(e){return l.some((function(t){return e.match(t)}))||null!=window.hermesJwe}var s=function(e){return'<span class="sch-datacontroller--optional-mobile">'.concat(e,"</span>")},d=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{no:{text:"".concat(s("[BRAND] er en del av Schibsted.")," Schibsted er ansvarlig for dine data på denne siden."),shortText:"[BRAND] er en del av ",link:e?"Les mer":"Les mer her",url:"https://info.privacy.schibsted.com/no/schibsted-norge-personvernerklaering/"},sv:{text:"".concat(s("[BRAND] är en del av Schibsted.")," Schibsted är ansvarig för dina data på denna sida."),shortText:"[BRAND] är en del av ",link:e?"Läs mer":"Läs mer här",url:"https://info.privacy.schibsted.com/se/schibsted-sverige-personuppgiftspolicy/"},fi:{text:"".concat(s("[BRAND] on osa Schibsted-konsernia.")," Schibsted vastaa tietojesi hallinnasta tällä sivustolla."),shortText:"[BRAND] on osa Schibsted-konsernia",link:"Lue lisää",url:"https://info.privacy.schibsted.com/fi/"},en_SE:{text:"".concat(s("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-sverige-english/"},en_NO:{text:"".concat(s("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-norge-english/"},en_FI:{text:"".concat(s("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/fi/"}}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t="sch-datacontroller__logo".concat(e?" sch-datacontroller__logo--inline":" sch-datacontroller--optional-mobile");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 103 19" class="'.concat(t,'">\n <title>Schibsted</title>\n <rect width="103" height="19" fill="#fff"/>\n <path d="M10.609 9.222c.17 0 .312.087.413.213.154.194.253.4.324.544.677 1.362.831 3.009.33 4.49-.804 2.371-2.994 4.128-5.63 4.128-3.18 0-5.214-2.144-5.851-4.19a.101.101 0 01.068-.126l2.887-.884a.101.101 0 01.127.066c.138.442.86 1.929 2.802 1.929 1.466 0 2.678-1.251 2.678-2.794 0-.654-.097-1.08-.294-1.516a.76.76 0 01-.078-.283.44.44 0 01.446-.46.44.44 0 01.36.182c.02.027.058.084.076.113.015.023.043.038.069.022.025-.015.024-.043.01-.072l-.05-.105a.49.49 0 01.436-.711.49.49 0 01.407.233l.095.153c.015.025.042.039.07.023.025-.013.025-.041.011-.07l-.085-.17a.554.554 0 01-.07-.253c0-.269.182-.462.449-.462zm9.01-2.885c2.916 0 4.666 1.66 5.306 3.448a.1.1 0 01-.028.107l-.034.02-2.63.903a.1.1 0 01-.125-.055c-.358-.813-1.084-1.538-2.419-1.538-1.602 0-2.945 1.149-2.945 3.236s1.366 3.26 2.969 3.26c1.544 0 2.344-.98 2.632-1.848a.103.103 0 01.09-.07l.04.004 2.567.851a.1.1 0 01.065.123c-.55 1.893-2.356 3.8-5.394 3.8-3.417 0-6.104-2.58-6.104-6.12 0-3.565 2.64-6.12 6.01-6.12zm44.256 0c2.75 0 3.977 1.45 4.391 2.653a.099.099 0 01-.027.104l-.032.02-2.335.9a.1.1 0 01-.132-.061c-.186-.61-.71-1.247-1.841-1.247-.825 0-1.485.492-1.485 1.149 0 .52.362.83.918.968l.143.03 1.65.352c2.285.47 3.44 1.886 3.44 3.575 0 1.875-1.461 3.798-4.501 3.798-3.409 0-4.634-2.15-4.82-3.474a.098.098 0 01.044-.095l.034-.015 2.488-.542a.099.099 0 01.12.083c.114.872.797 1.652 2.11 1.652 1.037 0 1.532-.54 1.532-1.15 0-.481-.308-.842-1.077-1.04l-.172-.04-1.532-.352c-2.238-.492-3.252-1.874-3.252-3.492 0-2.064 1.838-3.776 4.336-3.776zm19.976 0c3.582 0 5.727 2.275 5.727 5.98 0 .345-.028.703-.041.87a.1.1 0 01-.063.085l-.037.007h-8.201c.07 1.524 1.366 2.626 2.922 2.626 1.144 0 1.883-.446 2.331-1.135a.102.102 0 01.09-.046l.035.008 2.35 1.016a.1.1 0 01.049.139c-.833 1.537-2.505 2.692-4.879 2.692-3.181 0-5.986-2.275-5.986-6.168 0-3.682 2.734-6.074 5.703-6.074zM102.9 1.248a.1.1 0 01.093.061l.008.04v16.778a.1.1 0 01-.061.092l-.04.008h-2.84a.1.1 0 01-.093-.061l-.008-.039-.006-1.237c-.518.915-1.697 1.618-3.252 1.618-3.3 0-5.656-2.58-5.656-6.074 0-3.377 2.286-6.026 5.562-6.026 1.916 0 2.862.75 3.229 1.35l.046.08v-6.49a.1.1 0 01.062-.092l.039-.008h2.917zm-53.91 0a.1.1 0 01.092.061l.008.04v6.606c.518-.82 1.79-1.57 3.511-1.57 3.393 0 5.35 2.602 5.35 6.026 0 3.494-2.169 6.097-5.468 6.097-1.518 0-2.698-.631-3.339-1.535l-.101-.153v1.307a.1.1 0 01-.062.092l-.039.008h-2.839a.1.1 0 01-.092-.061l-.008-.04V1.349a.1.1 0 01.061-.092l.04-.008h2.885zm25.414 1.994a.1.1 0 01.093.06l.008.04v3.347h2.232a.1.1 0 01.093.061l.008.039v2.567a.1.1 0 01-.062.092l-.04.008h-2.231v4.831c0 1.008.47 1.337 1.366 1.337.307 0 .644-.031.848-.068a.1.1 0 01.112.064l.007.035v2.385c0 .043-.027.08-.067.096-.3.114-.849.255-1.7.255-2.19 0-3.585-1.252-3.673-3.352l-.004-.213v-5.37h-1.997a.1.1 0 01-.093-.061l-.007-.039V6.789a.1.1 0 01.061-.092l.04-.008H71.4l.004-3.347a.1.1 0 01.062-.093l.039-.007h2.898zM43.202 6.689a.1.1 0 01.093.061l.008.039v11.338a.1.1 0 01-.062.092l-.039.008h-2.933a.1.1 0 01-.093-.061l-.008-.04V6.79a.1.1 0 01.062-.092l.039-.008h2.933zm-13.28-5.44a.1.1 0 01.093.06l.008.04V7.65c.754-.89 2.027-1.266 3.135-1.266 2.861 0 4.233 1.925 4.309 4.357l.003.216v7.17a.1.1 0 01-.061.092l-.04.008h-2.933a.1.1 0 01-.092-.061l-.008-.04v-6.63c0-1.29-.637-2.345-2.145-2.346-1.373 0-2.116.93-2.165 2.14l-.003.16v6.677a.1.1 0 01-.061.092l-.04.008H26.99a.1.1 0 01-.093-.061l-.008-.04V1.349a.1.1 0 01.062-.092l.039-.008h2.933zM51.94 9.15c-1.579 0-2.924 1.173-2.924 3.283 0 2.087 1.345 3.308 2.924 3.308 1.603 0 2.875-1.197 2.875-3.308 0-2.11-1.272-3.283-2.875-3.283zm45.137.023c-1.602 0-2.875 1.197-2.875 3.26 0 2.064 1.226 3.308 2.875 3.308 1.603 0 2.888-1.244 2.888-3.331 0-2.064-1.285-3.237-2.888-3.237zM5.985 11.41a.28.28 0 110 .557.28.28 0 110-.557zm-1.125-.17h.065c.068.008.144.032.209.055a.308.308 0 01.168.142c.074.136.03.31-.098.397a.345.345 0 01-.22.048.911.911 0 01-.163-.03c-.171-.047-.277-.21-.233-.382a.313.313 0 01.337-.23zm-1.378-.587l.081.012c.088.023.173.073.253.114l.219.11a.35.35 0 01.187.247.351.351 0 01-.366.409 1.023 1.023 0 01-.289-.071 1.326 1.326 0 01-.244-.122c-.236-.147-.28-.464-.071-.625a.36.36 0 01.311-.062zM83.899 8.87c-1.559 0-2.446 1.12-2.58 2.142l-.013.133h5.185c-.047-1.15-.802-2.275-2.592-2.275zM5.985 10.215a.28.28 0 110 .557.28.28 0 110-.557zm-3.962-.667c.12.004.207.067.287.148.088.09.18.171.274.255.076.066.138.114.207.187a.358.358 0 01.073.373.361.361 0 01-.268.222.464.464 0 01-.33-.07 1.832 1.832 0 01-.276-.208 2.171 2.171 0 01-.258-.266.396.396 0 01-.052-.44.372.372 0 01.343-.201zm2.58.386l.078.005c.058.011.13.04.194.063l.209.075c.088.031.152.063.2.135.12.179.021.43-.189.479a.636.636 0 01-.289-.014 1.673 1.673 0 01-.275-.096c-.257-.11-.317-.384-.138-.556a.33.33 0 01.288-.086zm2.263-.795c.097-.04.198-.027.305.003.143.04.198.068.314.122.182.083.333.177.498.29.07.049.151.115.21.176.145.15.143.38-.005.511-.132.116-.318.099-.465-.006a5.933 5.933 0 00-.35-.232 3.98 3.98 0 00-.433-.23c-.114-.056-.222-.108-.259-.24a.32.32 0 01.185-.394zm-3.873-.241l.078.002c.121.017.196.097.284.17.136.115.237.194.382.3.097.069.179.122.241.228a.341.341 0 01-.028.395.356.356 0 01-.358.114.81.81 0 01-.21-.081 2.453 2.453 0 01-.607-.462c-.12-.122-.168-.31-.09-.462a.38.38 0 01.386-.202zM8.3 8.48l.08.01a.81.81 0 01.209.081c.206.105.419.27.607.462.12.122.168.31.09.463a.38.38 0 01-.386.201c-.121-.016-.196-.096-.284-.17a6.056 6.056 0 00-.382-.299c-.096-.07-.179-.123-.241-.229a.341.341 0 01.029-.395.356.356 0 01.358-.114zm-2.314.54a.28.28 0 110 .557.28.28 0 110-.557zm-2.202-.664c.131-.116.317-.099.464.006.124.088.228.157.35.232.157.096.249.143.433.23.115.056.222.108.26.24a.32.32 0 01-.186.394c-.096.04-.198.027-.304-.003-.144-.04-.198-.068-.315-.122a3.196 3.196 0 01-.498-.29 1.482 1.482 0 01-.21-.176c-.145-.15-.143-.38.006-.511zM5.924 0c3.181 0 5.215 2.144 5.852 4.19a.101.101 0 01-.068.126L8.821 5.2a.101.101 0 01-.127-.066 2.873 2.873 0 00-2.802-1.928c-1.465 0-2.678 1.25-2.678 2.793 0 .654.097 1.08.294 1.516a.76.76 0 01.078.284.44.44 0 01-.445.46.44.44 0 01-.385-.218l-.052-.077c-.015-.024-.043-.038-.069-.023-.024.015-.024.044-.01.072l.05.105a.49.49 0 01-.436.711.49.49 0 01-.406-.233l-.096-.153c-.015-.025-.042-.039-.07-.023-.024.013-.025.042-.01.07.02.043.062.127.084.17.04.077.071.16.071.253 0 .269-.182.462-.45.462a.525.525 0 01-.412-.213c-.155-.194-.254-.4-.325-.544-.677-1.362-.83-3.009-.33-4.49C1.1 1.759 3.29 0 5.926 0zm3.45 7.864a.464.464 0 01.331.071c.114.07.18.123.276.207.09.079.174.164.258.267.109.133.123.299.052.439a.372.372 0 01-.343.201c-.12-.004-.207-.066-.286-.147a5.183 5.183 0 00-.275-.256c-.075-.066-.138-.114-.207-.187a.358.358 0 01-.073-.373.361.361 0 01.268-.222zm-2.498.042a.636.636 0 01.289.015c.121.03.191.06.276.095.256.11.316.385.138.556a.33.33 0 01-.29.086c-.057-.011-.13-.04-.192-.063l-.21-.075c-.088-.03-.152-.062-.2-.135a.316.316 0 01.189-.479zm-.89-.081a.28.28 0 110 .558.28.28 0 110-.558zm2.13-.773c.094.007.19.034.288.071.09.034.162.072.244.123.236.146.28.463.071.624a.36.36 0 01-.311.063c-.088-.024-.172-.074-.253-.115a32.94 32.94 0 00-.077-.038l-.141-.071a.35.35 0 01-.188-.248.351.351 0 01.366-.409zm-1.129-.337a.911.911 0 01.163.03c.171.047.277.21.233.382a.313.313 0 01-.336.23 1.02 1.02 0 01-.21-.054.308.308 0 01-.168-.143.306.306 0 01.098-.397.345.345 0 01.22-.048zM5.986 6.63a.28.28 0 110 .558.28.28 0 110-.558zM41.739.967c.963.007 1.778.751 1.901 1.702.147 1.136-.748 2.144-1.916 2.144-1.06 0-1.933-.868-1.933-1.9 0-1.083.88-1.954 1.948-1.946z" fill="#000" fill-rule="evenodd"/>\n </svg>')},u=function(e){var t=e.brand,a=e.texts,n=e.closeButton,r=e.modifier,o=a.text.replace("[BRAND]",t),c=["sch-datacontroller","sch-datacontroller--cobranded"];return r&&c.push("sch-datacontroller--".concat(r)),'<div class="'.concat(c.join(" "),'">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n ').concat(h(),'\n <span class="sch-datacontroller__text">\n ').concat(o,' <a class="sch-datacontroller__read-more" href="').concat(a.url,'">').concat(a.link,"</a>\n </span>\n </div>\n ").concat(n?'<button class="sch-datacontroller__btn-close sch-datacontroller__btn" type="button">'.concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="sch-datacontroller__btn-close-icon">\n <title>Close</title>\n <path d="M9.06 8l1.47 1.47a.75.75 0 01-1.06 1.06L7.999 9.06l-1.473 1.47a.75.75 0 01-1.06-1.06l1.472-1.471L5.47 6.53a.75.75 0 011.06-1.06L8 6.939l1.47-1.47a.75.75 0 011.06 1.062L9.06 7.999zM8 15A7 7 0 118 1a7 7 0 010 14zm0-1.5a5.5 5.5 0 100-11 5.5 5.5 0 000 11z"/>\n</svg>',"</button>"):"","\n </div>\n</div>")};function f(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]}function v(e,t,a){var n,r=new Date;if(!a||c(r,a.lastViewed,1)){var l,i,s,v=!a||c(r,a.lastCobranding,7),p={brand:t.brandName,texts:d(t.minimizeText)[t.language],modifier:t.layout},b=v?u(p):(i=(l=p).brand,s=l.texts.shortText.replace("[BRAND]",i),'<div class="sch-datacontroller sch-datacontroller--subheader sch-datacontroller--minimal">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n <span class="sch-datacontroller__text sch-datacontroller__text--inline">\n '.concat(s,"\n </span>\n ").concat(h(!0),"\n </div>\n </div>\n</div>")),m=null!==(n=null==a?void 0:a.lastCobranding)&&void 0!==n?n:r;e.appendChild(f(b)),o({layout:"subheader",lastViewed:r,lastCobranding:v?r:m})}}function p(e,t,a){var n,r=new Date;if(!a||c(r,a.lastViewed,1)){var l=f(u({brand:t.brandName,texts:d(t.minimizeText)[t.language],modifier:t.layout,closeButton:!0}));null===(n=l.querySelector(".sch-datacontroller__btn-close"))||void 0===n||n.addEventListener("click",(function(){return l.remove()})),e.appendChild(l),"number"==typeof t.hideAfter&&0!==t.hideAfter&&setTimeout((function(){l.remove()}),t.hideAfter),o({layout:"footer",lastViewed:r})}}function b(e,t){e.appendChild(f(u({brand:t.brandName,texts:d(t.minimizeText)[t.language],modifier:"permanent"})))}e.init=function(e){var n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach((function(a){t(e,a,r[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({layout:"subheader",language:"en_SE",hideAfter:0,minimizeText:!1},e);return{render:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.permanent,o=void 0!==a&&a;if(e&&!i(navigator.userAgent))if(o)b(e,n);else{var c=r();"subheader"===n.layout?v(e,n,"subheader"===(null==c?void 0:c.layout)?c:void 0):p(e,n,"footer"===(null==c?void 0:c.layout)?c:void 0)}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).CNP=t.CNP||{},t.CNP.DataControllerSDK={}))}(this,(function(t){"use strict";const e="sch-data-controller";function a(t){localStorage.setItem(e,JSON.stringify(t))}function n(t,e,a){if(e>t)return!1;const n=Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5);return!(n<a)&&(n>1||t.getHours()>=6)}const o=[/\bHermes\b/i,/(ios|android).*(aftonbladet|vg|rnd|bt|fvn|aftenposten|svd)/i];const c=t=>'<span class="sch-datacontroller--optional-mobile">'.concat(t,"</span>"),l=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{no:{text:"".concat(c("[BRAND] er en del av Schibsted.")," Schibsted er ansvarlig for dine data på denne siden."),shortText:"[BRAND] er en del av ",link:t?"Les mer":"Les mer her",url:"https://info.privacy.schibsted.com/no/schibsted-norge-personvernerklaering/"},sv:{text:"".concat(c("[BRAND] är en del av Schibsted.")," Schibsted är ansvarig för dina data på denna sida."),shortText:"[BRAND] är en del av ",link:t?"Läs mer":"Läs mer här",url:"https://info.privacy.schibsted.com/se/schibsted-sverige-personuppgiftspolicy/"},fi:{text:"".concat(c("[BRAND] on osa Schibsted-konsernia.")," Schibsted vastaa tietojesi hallinnasta tällä sivustolla."),shortText:"[BRAND] on osa Schibsted-konsernia",link:"Lue lisää",url:"https://info.privacy.schibsted.com/fi/"},da:{text:"".concat(c("[BRAND] er en del af Schibsted.")," Schibsted er ansvarlig for dine data på denne side."),shortText:"[BRAND] er en del af ",link:"Læs mere",url:"https://info.privacy.schibsted.com/dk/persondata-og-cookiepolitik/"},en_SE:{text:"".concat(c("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-sverige-english/"},en_NO:{text:"".concat(c("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/your-privacy-controls-schibsted-norge-english/"},en_FI:{text:"".concat(c("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/fi/"},en_DK:{text:"".concat(c("[BRAND] is a part of Schibsted.")," Schibsted is responsible for your data on this site."),shortText:"[BRAND] is a part of ",link:"Read more",url:"https://info.privacy.schibsted.com/dk/"}}},s=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e="sch-datacontroller__logo".concat(t?" sch-datacontroller__logo--inline":" sch-datacontroller--optional-mobile");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 103 19" class="'.concat(e,'">\n <title>Schibsted</title>\n <rect width="103" height="19" fill="#fff"/>\n <path d="M10.609 9.222c.17 0 .312.087.413.213.154.194.253.4.324.544.677 1.362.831 3.009.33 4.49-.804 2.371-2.994 4.128-5.63 4.128-3.18 0-5.214-2.144-5.851-4.19a.101.101 0 01.068-.126l2.887-.884a.101.101 0 01.127.066c.138.442.86 1.929 2.802 1.929 1.466 0 2.678-1.251 2.678-2.794 0-.654-.097-1.08-.294-1.516a.76.76 0 01-.078-.283.44.44 0 01.446-.46.44.44 0 01.36.182c.02.027.058.084.076.113.015.023.043.038.069.022.025-.015.024-.043.01-.072l-.05-.105a.49.49 0 01.436-.711.49.49 0 01.407.233l.095.153c.015.025.042.039.07.023.025-.013.025-.041.011-.07l-.085-.17a.554.554 0 01-.07-.253c0-.269.182-.462.449-.462zm9.01-2.885c2.916 0 4.666 1.66 5.306 3.448a.1.1 0 01-.028.107l-.034.02-2.63.903a.1.1 0 01-.125-.055c-.358-.813-1.084-1.538-2.419-1.538-1.602 0-2.945 1.149-2.945 3.236s1.366 3.26 2.969 3.26c1.544 0 2.344-.98 2.632-1.848a.103.103 0 01.09-.07l.04.004 2.567.851a.1.1 0 01.065.123c-.55 1.893-2.356 3.8-5.394 3.8-3.417 0-6.104-2.58-6.104-6.12 0-3.565 2.64-6.12 6.01-6.12zm44.256 0c2.75 0 3.977 1.45 4.391 2.653a.099.099 0 01-.027.104l-.032.02-2.335.9a.1.1 0 01-.132-.061c-.186-.61-.71-1.247-1.841-1.247-.825 0-1.485.492-1.485 1.149 0 .52.362.83.918.968l.143.03 1.65.352c2.285.47 3.44 1.886 3.44 3.575 0 1.875-1.461 3.798-4.501 3.798-3.409 0-4.634-2.15-4.82-3.474a.098.098 0 01.044-.095l.034-.015 2.488-.542a.099.099 0 01.12.083c.114.872.797 1.652 2.11 1.652 1.037 0 1.532-.54 1.532-1.15 0-.481-.308-.842-1.077-1.04l-.172-.04-1.532-.352c-2.238-.492-3.252-1.874-3.252-3.492 0-2.064 1.838-3.776 4.336-3.776zm19.976 0c3.582 0 5.727 2.275 5.727 5.98 0 .345-.028.703-.041.87a.1.1 0 01-.063.085l-.037.007h-8.201c.07 1.524 1.366 2.626 2.922 2.626 1.144 0 1.883-.446 2.331-1.135a.102.102 0 01.09-.046l.035.008 2.35 1.016a.1.1 0 01.049.139c-.833 1.537-2.505 2.692-4.879 2.692-3.181 0-5.986-2.275-5.986-6.168 0-3.682 2.734-6.074 5.703-6.074zM102.9 1.248a.1.1 0 01.093.061l.008.04v16.778a.1.1 0 01-.061.092l-.04.008h-2.84a.1.1 0 01-.093-.061l-.008-.039-.006-1.237c-.518.915-1.697 1.618-3.252 1.618-3.3 0-5.656-2.58-5.656-6.074 0-3.377 2.286-6.026 5.562-6.026 1.916 0 2.862.75 3.229 1.35l.046.08v-6.49a.1.1 0 01.062-.092l.039-.008h2.917zm-53.91 0a.1.1 0 01.092.061l.008.04v6.606c.518-.82 1.79-1.57 3.511-1.57 3.393 0 5.35 2.602 5.35 6.026 0 3.494-2.169 6.097-5.468 6.097-1.518 0-2.698-.631-3.339-1.535l-.101-.153v1.307a.1.1 0 01-.062.092l-.039.008h-2.839a.1.1 0 01-.092-.061l-.008-.04V1.349a.1.1 0 01.061-.092l.04-.008h2.885zm25.414 1.994a.1.1 0 01.093.06l.008.04v3.347h2.232a.1.1 0 01.093.061l.008.039v2.567a.1.1 0 01-.062.092l-.04.008h-2.231v4.831c0 1.008.47 1.337 1.366 1.337.307 0 .644-.031.848-.068a.1.1 0 01.112.064l.007.035v2.385c0 .043-.027.08-.067.096-.3.114-.849.255-1.7.255-2.19 0-3.585-1.252-3.673-3.352l-.004-.213v-5.37h-1.997a.1.1 0 01-.093-.061l-.007-.039V6.789a.1.1 0 01.061-.092l.04-.008H71.4l.004-3.347a.1.1 0 01.062-.093l.039-.007h2.898zM43.202 6.689a.1.1 0 01.093.061l.008.039v11.338a.1.1 0 01-.062.092l-.039.008h-2.933a.1.1 0 01-.093-.061l-.008-.04V6.79a.1.1 0 01.062-.092l.039-.008h2.933zm-13.28-5.44a.1.1 0 01.093.06l.008.04V7.65c.754-.89 2.027-1.266 3.135-1.266 2.861 0 4.233 1.925 4.309 4.357l.003.216v7.17a.1.1 0 01-.061.092l-.04.008h-2.933a.1.1 0 01-.092-.061l-.008-.04v-6.63c0-1.29-.637-2.345-2.145-2.346-1.373 0-2.116.93-2.165 2.14l-.003.16v6.677a.1.1 0 01-.061.092l-.04.008H26.99a.1.1 0 01-.093-.061l-.008-.04V1.349a.1.1 0 01.062-.092l.039-.008h2.933zM51.94 9.15c-1.579 0-2.924 1.173-2.924 3.283 0 2.087 1.345 3.308 2.924 3.308 1.603 0 2.875-1.197 2.875-3.308 0-2.11-1.272-3.283-2.875-3.283zm45.137.023c-1.602 0-2.875 1.197-2.875 3.26 0 2.064 1.226 3.308 2.875 3.308 1.603 0 2.888-1.244 2.888-3.331 0-2.064-1.285-3.237-2.888-3.237zM5.985 11.41a.28.28 0 110 .557.28.28 0 110-.557zm-1.125-.17h.065c.068.008.144.032.209.055a.308.308 0 01.168.142c.074.136.03.31-.098.397a.345.345 0 01-.22.048.911.911 0 01-.163-.03c-.171-.047-.277-.21-.233-.382a.313.313 0 01.337-.23zm-1.378-.587l.081.012c.088.023.173.073.253.114l.219.11a.35.35 0 01.187.247.351.351 0 01-.366.409 1.023 1.023 0 01-.289-.071 1.326 1.326 0 01-.244-.122c-.236-.147-.28-.464-.071-.625a.36.36 0 01.311-.062zM83.899 8.87c-1.559 0-2.446 1.12-2.58 2.142l-.013.133h5.185c-.047-1.15-.802-2.275-2.592-2.275zM5.985 10.215a.28.28 0 110 .557.28.28 0 110-.557zm-3.962-.667c.12.004.207.067.287.148.088.09.18.171.274.255.076.066.138.114.207.187a.358.358 0 01.073.373.361.361 0 01-.268.222.464.464 0 01-.33-.07 1.832 1.832 0 01-.276-.208 2.171 2.171 0 01-.258-.266.396.396 0 01-.052-.44.372.372 0 01.343-.201zm2.58.386l.078.005c.058.011.13.04.194.063l.209.075c.088.031.152.063.2.135.12.179.021.43-.189.479a.636.636 0 01-.289-.014 1.673 1.673 0 01-.275-.096c-.257-.11-.317-.384-.138-.556a.33.33 0 01.288-.086zm2.263-.795c.097-.04.198-.027.305.003.143.04.198.068.314.122.182.083.333.177.498.29.07.049.151.115.21.176.145.15.143.38-.005.511-.132.116-.318.099-.465-.006a5.933 5.933 0 00-.35-.232 3.98 3.98 0 00-.433-.23c-.114-.056-.222-.108-.259-.24a.32.32 0 01.185-.394zm-3.873-.241l.078.002c.121.017.196.097.284.17.136.115.237.194.382.3.097.069.179.122.241.228a.341.341 0 01-.028.395.356.356 0 01-.358.114.81.81 0 01-.21-.081 2.453 2.453 0 01-.607-.462c-.12-.122-.168-.31-.09-.462a.38.38 0 01.386-.202zM8.3 8.48l.08.01a.81.81 0 01.209.081c.206.105.419.27.607.462.12.122.168.31.09.463a.38.38 0 01-.386.201c-.121-.016-.196-.096-.284-.17a6.056 6.056 0 00-.382-.299c-.096-.07-.179-.123-.241-.229a.341.341 0 01.029-.395.356.356 0 01.358-.114zm-2.314.54a.28.28 0 110 .557.28.28 0 110-.557zm-2.202-.664c.131-.116.317-.099.464.006.124.088.228.157.35.232.157.096.249.143.433.23.115.056.222.108.26.24a.32.32 0 01-.186.394c-.096.04-.198.027-.304-.003-.144-.04-.198-.068-.315-.122a3.196 3.196 0 01-.498-.29 1.482 1.482 0 01-.21-.176c-.145-.15-.143-.38.006-.511zM5.924 0c3.181 0 5.215 2.144 5.852 4.19a.101.101 0 01-.068.126L8.821 5.2a.101.101 0 01-.127-.066 2.873 2.873 0 00-2.802-1.928c-1.465 0-2.678 1.25-2.678 2.793 0 .654.097 1.08.294 1.516a.76.76 0 01.078.284.44.44 0 01-.445.46.44.44 0 01-.385-.218l-.052-.077c-.015-.024-.043-.038-.069-.023-.024.015-.024.044-.01.072l.05.105a.49.49 0 01-.436.711.49.49 0 01-.406-.233l-.096-.153c-.015-.025-.042-.039-.07-.023-.024.013-.025.042-.01.07.02.043.062.127.084.17.04.077.071.16.071.253 0 .269-.182.462-.45.462a.525.525 0 01-.412-.213c-.155-.194-.254-.4-.325-.544-.677-1.362-.83-3.009-.33-4.49C1.1 1.759 3.29 0 5.926 0zm3.45 7.864a.464.464 0 01.331.071c.114.07.18.123.276.207.09.079.174.164.258.267.109.133.123.299.052.439a.372.372 0 01-.343.201c-.12-.004-.207-.066-.286-.147a5.183 5.183 0 00-.275-.256c-.075-.066-.138-.114-.207-.187a.358.358 0 01-.073-.373.361.361 0 01.268-.222zm-2.498.042a.636.636 0 01.289.015c.121.03.191.06.276.095.256.11.316.385.138.556a.33.33 0 01-.29.086c-.057-.011-.13-.04-.192-.063l-.21-.075c-.088-.03-.152-.062-.2-.135a.316.316 0 01.189-.479zm-.89-.081a.28.28 0 110 .558.28.28 0 110-.558zm2.13-.773c.094.007.19.034.288.071.09.034.162.072.244.123.236.146.28.463.071.624a.36.36 0 01-.311.063c-.088-.024-.172-.074-.253-.115a32.94 32.94 0 00-.077-.038l-.141-.071a.35.35 0 01-.188-.248.351.351 0 01.366-.409zm-1.129-.337a.911.911 0 01.163.03c.171.047.277.21.233.382a.313.313 0 01-.336.23 1.02 1.02 0 01-.21-.054.308.308 0 01-.168-.143.306.306 0 01.098-.397.345.345 0 01.22-.048zM5.986 6.63a.28.28 0 110 .558.28.28 0 110-.558zM41.739.967c.963.007 1.778.751 1.901 1.702.147 1.136-.748 2.144-1.916 2.144-1.06 0-1.933-.868-1.933-1.9 0-1.083.88-1.954 1.948-1.946z" fill="#000" fill-rule="evenodd"/>\n </svg>')},r=t=>{let{brand:e,texts:a,closeButton:n,modifier:o}=t;const c=a.text.replace("[BRAND]",e),l=["sch-datacontroller","sch-datacontroller--cobranded"];return o&&l.push("sch-datacontroller--".concat(o)),'<div class="'.concat(l.join(" "),'">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n ').concat(s(),'\n <span class="sch-datacontroller__text">\n ').concat(c,' <a class="sch-datacontroller__read-more" href="').concat(a.url,'">').concat(a.link,"</a>\n </span>\n </div>\n ").concat(n?'<button class="sch-datacontroller__btn-close sch-datacontroller__btn" type="button">'.concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="sch-datacontroller__btn-close-icon">\n <title>Close</title>\n <path d="M9.06 8l1.47 1.47a.75.75 0 01-1.06 1.06L7.999 9.06l-1.473 1.47a.75.75 0 01-1.06-1.06l1.472-1.471L5.47 6.53a.75.75 0 011.06-1.06L8 6.939l1.47-1.47a.75.75 0 011.06 1.062L9.06 7.999zM8 15A7 7 0 118 1a7 7 0 010 14zm0-1.5a5.5 5.5 0 100-11 5.5 5.5 0 000 11z"/>\n</svg>',"</button>"):"","\n </div>\n</div>")};function i(t){const e=document.createElement("div");return e.innerHTML=t,e.children[0]}function d(t,e,o){var c;const d=new Date;if(!(!o||n(d,o.lastViewed,1)))return;const h=!o||n(d,o.lastCobranding,7),u={brand:e.brandName,texts:l(e.minimizeText)[e.language],modifier:e.layout},f=h?r(u):(t=>{let{brand:e,texts:a}=t;const n=a.shortText.replace("[BRAND]",e);return'<div class="sch-datacontroller sch-datacontroller--subheader sch-datacontroller--minimal">\n <div class="sch-datacontroller__wrapper">\n <div class="sch-datacontroller__content">\n <span class="sch-datacontroller__text sch-datacontroller__text--inline">\n '.concat(n,"\n </span>\n ").concat(s(!0),"\n </div>\n </div>\n</div>")})(u),v=null!==(c=null==o?void 0:o.lastCobranding)&&void 0!==c?c:d;t.appendChild(i(f)),a({layout:"subheader",lastViewed:d,lastCobranding:h?d:v})}t.init=function(t){const c={layout:"subheader",language:"en_SE",hideAfter:0,minimizeText:!1,...t};return{render(t){let{permanent:s=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||(h=navigator.userAgent,o.some((t=>h.match(t)))||null!=window.hermesJwe))return;var h;if(s)return void function(t,e){t.appendChild(i(r({brand:e.brandName,texts:l(e.minimizeText)[e.language],modifier:"permanent"})))}(t,c);const u=function(){const t=localStorage.getItem(e);if(t)try{return JSON.parse(t,((t,e)=>"lastViewed"===t||"lastCobranding"===t?new Date(e):e))}catch(t){return}}();"subheader"===c.layout?d(t,c,"subheader"===(null==u?void 0:u.layout)?u:void 0):function(t,e,o){var c;const s=new Date;if(o&&!n(s,o.lastViewed,1))return;const d=i(r({brand:e.brandName,texts:l(e.minimizeText)[e.language],modifier:e.layout,closeButton:!0}));null===(c=d.querySelector(".sch-datacontroller__btn-close"))||void 0===c||c.addEventListener("click",(()=>d.remove())),t.appendChild(d),"number"==typeof e.hideAfter&&0!==e.hideAfter&&setTimeout((()=>{d.remove()}),e.hideAfter),a({layout:"footer",lastViewed:s})}(t,c,"footer"===(null==u?void 0:u.layout)?u:void 0)}}},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=data-controller-sdk.umd.js.map
{
"name": "@schibsted/data-controller",
"version": "3.4.0",
"version": "3.5.0",
"repository": {
"url": "git@github.schibsted.io:smp-distribution/data-controller-sdk.git"
},
"license": "UNLICENSED",
"main": "dist/data-controller-sdk.cjs.js",
"unpkg": "dist/data-controller-sdk.umd.js",
"module": "dist/data-controller-sdk.mjs",
"unpkg": "dist/data-controller-sdk.umd.js",
"main": "dist/data-controller-sdk.cjs.js",
"files": [
"dist"
],
"scripts": {
"build": "NODE_ENV=production gulp build",
"dev": "vite",
"build": "NODE_ENV=production gulp build",
"lint": "eslint --ext .js,.ts --quiet .",
"prettier": "prettier --check .",
"test": "jest"
},
"files": [
"dist"
],
"repository": {
"url": "git@github.schibsted.io:smp-distribution/data-controller-sdk.git"
},
"dependencies": {},

@@ -51,6 +54,6 @@ "devDependencies": {

"semantic-release": "^17.1.1",
"sort-package-json": "^1.57.0",
"typescript": "^4.0.2",
"vite": "^1.0.0-rc.1"
},
"license": "UNLICENSED"
}
}

@@ -56,5 +56,9 @@ # Schibsted Data Controller SDK

**hideAfter** is an optional parameter that gives an opportunity to define time in milliseconds after which the data controller stripe will be hidden. Works for the 'footer' layout. The default value is 0.
**minimizeText** is an optional parameter that determines link text length. If it is set to true, then the link text in 'no' and 'sv' language is 'Les mer' and 'Läs mer'. The default value is false.
**hideAfter** is an optional parameter that gives an opportunity to define time in milliseconds
after which the data controller stripe will be hidden. Works for the 'footer' layout. The default
value is 0.
**minimizeText** is an optional parameter that determines link text length. If it is set to true,
then the link text in 'no' and 'sv' language is 'Les mer' and 'Läs mer'. The default value is false.
Once you have a configured instance, you can call the `render` method to render it to a node:

@@ -72,3 +76,4 @@

You can also force the element to show up. This can, for example, be useful if displaying the element in a static footer on the site:
You can also force the element to show up. This can, for example, be useful if displaying the
element in a static footer on the site:

@@ -80,4 +85,6 @@ ```js

## Styling
The DataController markup follows BEM conventions, and the classes used are documented below. To use
the default styles shipped with this SDK, remember to link it on the page, or import it in your asset pipeline.
the default styles shipped with this SDK, remember to link it on the page, or import it in your
asset pipeline.

@@ -87,7 +94,10 @@ ```js

```
```html
<link rel="stylesheet" href="https://unpkg.com/@schibsted/data-controller/dist/styles.css">
<link rel="stylesheet" href="https://unpkg.com/@schibsted/data-controller/dist/styles.css" />
```
To override the default styles, just override using normal CSS rules. To avoid specificity issues you can either have rules with higher precidence than the single class selectors used in the default styles, or ensure that your overrides are defined after the default styling.
To override the default styles, just override using normal CSS rules. To avoid specificity issues
you can either have rules with higher precidence than the single class selectors used in the default
styles, or ensure that your overrides are defined after the default styling.

@@ -98,18 +108,25 @@ ### Blocks

**modifiers**:
- `.sch-datacontroller--subheader`: Set when using the `subheader`-layout
- `.sch-datacontroller--footer`: Set when using the `footer`-layout
- `.sch-datacontroller--permanent`: Set when `permanent` is supplied as rendering options
- `.sch-datacontroller--cobranded`: Set when the content contains both logotype and text and a read more link
- `.sch-datacontroller--minimal`: Set when the content is just the brandname and logotype inlined.
**modifiers**:
- `.sch-datacontroller--subheader`: Set when using the `subheader`-layout
- `.sch-datacontroller--footer`: Set when using the `footer`-layout
- `.sch-datacontroller--permanent`: Set when `permanent` is supplied as rendering options
- `.sch-datacontroller--cobranded`: Set when the content contains both logotype and text and a read
more link
- `.sch-datacontroller--minimal`: Set when the content is just the brandname and logotype inlined.
#### Elements
- `.sch-datacontroller__wrapper`: Wrapper inside the top-level node. Contains all other markup. This can be used to inset the contents to fit a certain width, while allowing the overall markup to take up the full width of the page
- `.sch-datacontroller__wrapper`: Wrapper inside the top-level node. Contains all other markup. This
can be used to inset the contents to fit a certain width, while allowing the overall markup to
take up the full width of the page
- `.sch-datacontroller__content`: Contains the Schibsted logo, texts and links, but **not** the close button when using the `footer`-layout
- `.sch-datacontroller__content`: Contains the Schibsted logo, texts and links, but **not** the
close button when using the `footer`-layout
- `.sch-datacontroller__text`: Contains all text, including links to read more. You can use this class to change the font family, or font size etc.
- `.sch-datacontroller__text`: Contains all text, including links to read more. You can use this
class to change the font family, or font size etc.
**modifiers**
- `.sch-datacontroller__text--inline`: Set when the logotype is inlined in the text

@@ -120,6 +137,9 @@

**modifiers**
- `.sch-datacontroller__logo--inline`: Set when the logotype is part of the text, as a child of `.sch-datacontroller__text`
- `.sch-datacontroller__read-more`: Set on the link to display more information about the data collected
- `.sch-datacontroller__logo--inline`: Set when the logotype is part of the text, as a child of
`.sch-datacontroller__text`
- `.sch-datacontroller__read-more`: Set on the link to display more information about the data
collected
- `.sch-datacontroller__btn`: Set on all `<button>`-elements

@@ -126,0 +146,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc