PageSourceSearch

https://www.thelocal.no/js/defaultLayout.ac37dd437bc66278.js

js thelocal.no collected 2026-09-24 17:53:43 UTC 32,273 bytes, 3 lines download raw bytes

vendor: 4,921 bytes, lines 1-2
1/*! For license information please see defaultLayout.ac37dd437bc66278.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[475],{6022:(e,t,o)=>{o.r(t),o.d(t,{default:()=>l});var n=o(9669),i=o.n(n);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(){a=function(){return e};var e={},t=Object.prototype,o=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function u(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,o){return e[t]=o}}function l(e,t,o,n){var i=t&&t.prototype instanceof f?t:f,r=Object.create(i.prototype),a=new b(n||[]);return r._invoke=function(e,t,o){var n="suspendedStart";return function(i,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw r;return I()}for(o.method=i,o.arg=r;;){var a=o.delegate;if(a){var c=L(a,o);if(c){if(c===h)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===n)throw n="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n="executing";var s=d(e,t,o);if("normal"===s.type){if(n=o.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(n="completed",o.method="throw",o.arg=s.arg)}}}(e,o,a),r}function d(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function f(){}function p(){}function m(){}var g={};u(g,i,(function(){return this}));var w=Object.getPrototypeOf,y=w&&w(w(E([])));y&&y!==t&&o.call(y,i)&&(g=y);var v=m.prototype=f.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,c,s){var u=d(e[i],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,c,s)}),(function(e){n("throw",e,c,s)})):t.resolve(h).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,s)}))}s(u.arg)}var i;this._invoke=function(e,o){function r(){return new t((function(t,i){n(e,o,t,i)}))}return i=i?i.then(r,r):r()}}function L(e,t){var o=e.iterator[t.method];if(void 0===o){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,L(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=d(o,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=m,u(v,"constructor",m),u(m,"constructor",p),p.displayName=u(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},_(S.prototype),u(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,o,n,i,r){void 0===r&&(r=Promise);var a=new S(l(t,o,n,i),r);return e.isGeneratorFunction(o)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var o in e)t.push(o);return t.reverse(),function o(){for(;t.length;){var n=t.pop();if(n in e)return o.value=n,o.done=!1,o}return o.done=!0,o}},e.values=E,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(P),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(o,n){return a.type="throw",a.arg=e,t.next=o,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var c=o.call(r,"catchLoc"),s=o.call(r,"finallyLoc");if(c&&s){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),P(o),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc===e){var n=o.completion;if("throw"===n.type){var i=n.arg;P(o)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:E(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=void 0),h}},e}function c(e,t,o,n,i,r,a){try{var c=e[r](a),s=c.value}catch(e){return void o(e)}c.done?t(s):Promise.resolve(s).then(n,i)}var s="undefined"!=typeof window?window.tp=window.tp||[]:[];const u={components:{},props:["data"],data:function(){return{navHeader:null,stickySidebar:null,renderedOneTrustSettingsBtn:null,nativeoOneTrustSettingsBtn:null,siteDomain:null,bdFilter:null,sortDirectoriesBtn:null,stickyResizeHandler:null,pianoLifecycleTimer:null,pianoLifecycleInteractionHandler:null,pianoLifecycleScheduled:!1,pianoAccountPollTimer:null,authClickHandler:null,manageCookiesClickHandler:null,pageShowHandler:null,pianoSyncAttempted:!1,pianoSyncStorageKey:"tl-piano-sync-token"}},mounted:function(){var e=this;this.navHeader=document.querySelector(".site-header"),this.stickySidebar=document.querySelectorAll(".article-single__side.sticky--sidebar"),this.renderedOneTrustSettingsBtn=document.querySelector("#ot-sdk-btn"),this.nativeoOneTrustSettingsBtn=document.querySelector(".oneTrustCookieSettings"),this.siteDomain=location.host.substring(location.host.lastIndexOf(".")+1),this.bdFilter=document.querySelector(".bd-filter"),this.sortDirectoriesBtn=document.querySelector(".sort-directories"),null!==this.bdFilter&&null!==this.sortDirectoriesBtn&&(this.bdFilter.addEventListener("change",(function(){e.filterBusinessDirectories(e.bdFilter.value)})),this.sortDirectoriesBtn.addEventListener("click",(function(){e.sortDirectories(e.sortDirectoriesBtn.getAttribute("data-asc"))}))),null!==this.nativeoOneTrustSettingsBtn&&null!==this.renderedOneTrustSettingsBtn&&this.nativeoOneTrustSettingsBtn.addEventListener("click",(function(t){return e.renderedOneTrustSettingsBtn.click(),!1})),this.initStickySidebarOffset(),this.initAuthActionHandlers(),this.initManageCookiesHandler(),this.initPageShowHandler(),this.syncExistingPianoSession(),window.dataLayer=window.dataLayer||[],this.schedulePianoLifecycle()},beforeUnmount:function(){this.teardownStickySidebarOffset(),this.teardownAuthActionHandlers(),this.teardownManageCookiesHandler(),this.teardownPageShowHandler(),this.teardownPianoLifecycleTriggers(),this.pianoAccountPollTimer&&(clearTimeout(this.pianoAccountPollTimer),this.pianoAccountPollTimer=null)},methods:{filterBusinessDirectories:function(e){document.querySelectorAll(".directory").forEach((function(t){e===t.id||"all"===e?t.style.display="":t.style.display="none"}))},sortDirectories:function(e){var t=document.getElementById("directories");
2Array.from(t.querySelectorAll(".directory")).forEach((function(t){var o=t.querySelector(".directory-items");Array.from(o.querySelectorAll(".directory-item")).sort((function(t,o){return"false"===e?t.querySelector("h5").textContent.localeCompare(o.querySelector("h5").textContent):o.querySelector("h5").textContent.localeCompare(t.querySelector("h5").textContent)})).forEach((function(e){return o.appendChild(e)}))})),this.sortDirectoriesBtn.setAttribute("data-asc","false"===e?"true":"false")},schedulePianoLifecycle:function(){var e=this,t=function(){e.pianoLifecycleScheduled||(e.pianoLifecycleScheduled=!0,e.teardownPianoLifecycleTriggers(),window.__TLPerfMarks&&"function"==typeof window.__TLPerfMarks.mark&&window.__TLPerfMarks.mark("tl:thirdparty:piano:lifecycle-scheduled"),s.push(["init",e.initializePianoLifecycle]))},o=window.location.pathname&&window.location.pathname.includes("/members/account"),n=!!document.querySelector("#my-account"),i=!!document.querySelector("#content"),r=window.matchMedia("(max-width: 768px)").matches,a=document.body&&document.body.classList.contains("article--members"),c=document.body&&document.body.classList.contains("article-page"),u=!this.data.auth;if(r)if(u)t();else if(o||n)t();else if(i)t();else if(c)t();else{if(a)return"requestIdleCallback"in window?void(this.pianoLifecycleTimer=window.requestIdleCallback(t,{timeout:1800})):void(this.pianoLifecycleTimer=setTimeout(t,1200));this.pianoLifecycleInteractionHandler=function(){t()},["click","touchstart","keydown","scroll"].forEach((function(t){document.addEventListener(t,e.pianoLifecycleInteractionHandler,{once:!0,passive:!0})})),"requestIdleCallback"in window?this.pianoLifecycleTimer=window.requestIdleCallback(t,{timeout:3600}):this.pianoLifecycleTimer=setTimeout(t,3200)}else t()},teardownPianoLifecycleTriggers:function(){var e=this;this.pianoLifecycleInteractionHandler&&(["click","touchstart","keydown","scroll"].forEach((function(t){document.removeEventListener(t,e.pianoLifecycleInteractionHandler)})),this.pianoLifecycleInteractionHandler=null),this.pianoLifecycleTimer&&("cancelIdleCallback"in window?window.cancelIdleCallback(this.pianoLifecycleTimer):clearTimeout(this.pianoLifecycleTimer),this.pianoLifecycleTimer=null)},syncStickySidebarOffset:function(){if(this.stickySidebar&&0!==this.stickySidebar.length){var e=this.navHeader?Math.max(0,Math.ceil(this.navHeader.getBoundingClientRect().height)):0,t=Math.max(16,e+16);document.documentElement.style.setProperty("--sticky-offset","".concat(t,"px"))}},initStickySidebarOffset:function(){var e=this;this.stickySidebar&&0!==this.stickySidebar.length&&(this.teardownStickySidebarOffset(),this.syncStickySidebarOffset(),this.stickyResizeHandler=function(){e.syncStickySidebarOffset()},window.addEventListener("resize",this.stickyResizeHandler,{passive:!0}),window.addEventListener("orientationchange",this.stickyResizeHandler,{passive:!0}))},teardownStickySidebarOffset:function(){this.stickyResizeHandler&&(window.removeEventListener("resize",this.stickyResizeHandler),window.removeEventListener("orientationchange",this.stickyResizeHandler),this.stickyResizeHandler=null)},thelocalGetURIPart:function(e){switch(e){case"protocol":return window.location.protocol;case"host":return window.location.host;case"pathname":return window.location.pathname;case"search":return window.location.search;default:return window.location.protocol+"//"+window.location.host+"/"+window.location.pathname+window.location.search}},setWithExpiry:function(e,t,o){var n={value:t,expiry:(new Date).getTime()+o};localStorage.setItem(e,JSON.stringify(n))},getWithExpiry:function(e){var t=localStorage.getItem(e);if(!t)return null;var o=JSON.parse(t);return(new Date).getTime()>o.expiry?(localStorage.removeItem(e),null):o.value},setCookie:function(e,t,o){var n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3);var i="expires="+n.toUTCString();document.cookie=e+"="+t+";"+i+";path=/"},getCookie:function(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),n=0;n<o.length;n++){for(var i=o[n];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return!1},deleteCookie:function(e){document.cookie=e+"=;expires=Thu, 18 Dec 2013 12:00:00 UTC;path=/"},deleteCookieAcrossScopes:function(e){for(var t=(window.location.hostname||"").split(".").filter(
2Boolean),o=new Set([""]),n=0;n<t.length;n+=1){var i=".".concat(t.slice(n).join("."));o.add(i)}o.forEach((function(t){var o=t?";domain=".concat(t):"";document.cookie="".concat(e,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/").concat(o)}))},clearCookiePrefixes:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];document.cookie.split(";").forEach((function(o){var n=o.indexOf("="),i=(n>=0?o.slice(0,n):o).trim();i&&t.some((function(e){return i.startsWith(e)}))&&e.deleteCookieAcrossScopes(i)}))},shouldPreserveCmpStateOnLogout:function(e){return!!["OptanonConsent","OptanonAlertBoxClosed","OnetrustActiveGroups","euconsent-v2","addtl_consent","noniabvendorconsent","_cmpRepromptHash","gbc_consent","IABGPP_HDR_GppString","IABGPP_GppSID","cmapi_cookie_privacy","cmapi_cookie_privacy_custom","cmapi_gtm_bl","cmapi_gtm_privacy"].includes(e)||(e.startsWith("__cmp")||e.startsWith("cmapi_"))},clearAllFirstPartyCookies:function(){var e=this;document.cookie.split(";").forEach((function(t){var o=t.indexOf("="),n=(o>=0?t.slice(0,o):t).trim();n&&(e.shouldPreserveCmpStateOnLogout(n)||e.deleteCookieAcrossScopes(n))}))},clearBrowserStorageExceptCmpState:function(){var e=this,t=function(t){try{if(!t||"function"!=typeof t.key||"function"!=typeof t.removeItem)return;for(var o=[],n=0;n<t.length;n+=1){var i=t.key(n);i&&(e.shouldPreserveCmpStateOnLogout(i)||o.push(i))}o.forEach((function(e){return t.removeItem(e)}))}catch(e){console.log(e)}};t(window.localStorage),t(window.sessionStorage)},clearPersistentBrowserState:function(){return(e=a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],window.caches&&"function"==typeof window.caches.keys&&t.push(window.caches.keys().then((function(e){return Promise.allSettled(e.map((function(e){return window.caches.delete(e)})))})).catch((function(){}))),window.indexedDB&&"function"==typeof window.indexedDB.databases&&t.push(window.indexedDB.databases().then((function(e){return Promise.allSettled((e||[]).map((function(e){return e&&e.name})).filter(Boolean).map((function(e){return new Promise((function(t){try{var o=window.indexedDB.deleteDatabase(e);o.onsuccess=function(){return t(!0)},o.onerror=function(){return t(!1)},o.onblocked=function(){return t(!1)}}catch(e){t(!1)}}))})))})).catch((function(){}))),e.next=5,Promise.allSettled(t);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,o=arguments;return new Promise((function(n,i){var r=e.apply(t,o);function a(e){c(r,n,i,a,s,"next",e)}function s(e){c(r,n,i,a,s,"throw",e)}a(void 0)}))})();var e},readStorageNumber:function(e,t){try{return e&&"function"==typeof e.getItem?Number(e.getItem(t)||0):0}catch(e){return 0}},writeStorageValue:function(e,t,o){try{if(!e||"function"!=typeof e.setItem)return;e.setItem(t,o)}catch(e){console.log(e)}},removeStorageValue:function(e,t){try{if(!e||"function"!=typeof e.removeItem)return;e.removeItem(t)}catch(e){console.log(e)}},getForcedPianoLogoutMarkedAt:function(){return Math.max(this.readStorageNumber(window.sessionStorage,"tl-force-piano-logout-at"),this.readStorageNumber(window.localStorage,"tl-force-piano-logout-at"))},markForcedPianoLogout:function(){var e=String(Date.now());this.writeStorageValue(window.sessionStorage,"tl-force-piano-logout-at",e),this.writeStorageValue(window.localStorage,"tl-force-piano-logout-at",e),this.removeStorageValue(window.sessionStorage,"tl-force-piano-logout-ran"),this.removeStorageValue(window.localStorage,"tl-force-piano-logout-ran")},hasRecentForcedLogout:function(){var e=this.getForcedPianoLogoutMarkedAt();return!!e&&(!!(Date.now()-e<3e5)||(this.clearForcedPianoLogout(),!1))},hasForcedPianoLogoutRun:function(){return this.readStorageNumber(window.sessionStorage,"tl-force-piano-logout-ran")>0||this.readStorageNumber(window.localStorage,"tl-force-piano-logout-ran")>0},markForcedPianoLogoutRan:function(){this.writeStorageValue(window.sessionStorage,"tl-force-piano-logout-ran","1"),this.writeStorageValue(window.localStorage,"tl-force-piano-logout-ran","1")},shouldForcePianoLogout:function(){return this.hasRecentForcedLogout()&&!this.hasForcedPianoLogoutRun()},clearForcedPianoLogout:function(){this.removeStorageValue(window.sessionStorage,"tl-force-piano-logout-at"),this.removeStorageValue(window.localStorage,"tl-force-piano-logout-at"),this.removeStorageValue(window.sessionStorage,"tl-force-piano-logout-ran"),this.removeStorageValue(window.localStorage,"tl-force-piano-logout-ran")},ensurePianoIdentityInitialized:function(){try{return!(!s||!s.pianoId)&&
2("function"==typeof s.pianoId.init&&s.pianoId.init(),!0)}catch(e){console.log(e)}return!1},isPianoUserStillAuthenticated:function(){if(this.getCookie("__utp"))return!0;try{if(s&&s.pianoId&&"function"==typeof s.pianoId.isUserValid&&s.pianoId.isUserValid())return!0;if(s&&s.pianoId&&"function"==typeof s.pianoId.getUser)return!!s.pianoId.getUser()}catch(e){console.log(e)}return!1},attemptForcedPianoLogout:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8e3;return new Promise((function(o){var n=Date.now(),i=0,r=!1,a=!1,c=0,u=function(e){r||(r=!0,o(e))};!function o(){if(e.shouldForcePianoLogout()){e.ensurePianoIdentityInitialized()&&(a=!0,c||(c=Date.now()));var r=e.isPianoUserStillAuthenticated(),l=c?Date.now()-c:0,d=a?l>=1200:Date.now()-n>=2500;if(r||!d){var h=Date.now();if(!i||h-i>=1500)try{s&&s.pianoId&&"function"==typeof s.pianoId.logout&&(i=h,s.pianoId.logout((function(){})))}catch(e){console.log(e)}h-n>=t?u(!e.isPianoUserStillAuthenticated()):window.setTimeout(o,250)}else u(!0)}else u(!0)}()}))},finalizeForcedPianoLogout:function(){return this.clearBrowserStorageExceptCmpState(),this.clearAllFirstPartyCookies(),this.clearForcedPianoLogout(),document.body&&(document.body.dataset.auth="false",document.body.classList.remove("logged-in","paid-user")),Promise.resolve()},maybeStartDeferredPianoExperience:function(){if(this.shouldForcePianoLogout())return!1;if(!window.__TL_PIANO_EXPERIENCE_DEFERRED__||window.__TL_PIANO_EXPERIENCE_STARTED__)return!1;try{if(s&&s.experience&&"function"==typeof s.experience.init)return window.__TL_PIANO_EXPERIENCE_DEFERRED__=!1,window.__TL_PIANO_EXPERIENCE_STARTED__=!0,s.experience.init(),!0}catch(e){console.log(e)}return!1},retryPendingPianoLogoutAfterInit:function(){var e=this;this.shouldForcePianoLogout()?window.setTimeout((function(){e.shouldForcePianoLogout()?e.attemptForcedPianoLogout(6e3).then((function(t){e.markForcedPianoLogoutRan(),t&&e.finalizeForcedPianoLogout(),e.maybeStartDeferredPianoExperience()})).catch((function(t){console.log(t),e.markForcedPianoLogoutRan(),e.maybeStartDeferredPianoExperience()})):e.maybeStartDeferredPianoExperience()}),250):this.maybeStartDeferredPianoExperience()},runForcedPianoLogoutBeforeInit:function(e){var t=this;this.shouldForcePianoLogout()?this.attemptForcedPianoLogout().then((function(o){t.markForcedPianoLogoutRan(),o&&t.finalizeForcedPianoLogout(),e()})).catch((function(o){console.log(o),t.markForcedPianoLogoutRan(),e()})):e()},clearAuthClientState:function(){return this.clearBrowserStorageExceptCmpState(),this.markForcedPianoLogout(),sessionStorage.setItem("tl-logout-at",String(Date.now())),this.clearAllFirstPartyCookies(),document.body&&(document.body.dataset.auth="false",document.body.classList.remove("logged-in","paid-user")),document.querySelectorAll(".login-box, #pn-header, #pn-footer, #my-account").forEach((function(e){e.innerHTML=""})),Promise.resolve()},initAuthActionHandlers:function(){var e=this;this.teardownAuthActionHandlers(),this.authClickHandler=function(t){if(t.target.closest(".pn-login")){t.preventDefault();try{s&&s.pianoId&&"function"==typeof s.pianoId.show&&s.pianoId.show({screen:"login",displayMode:"modal"})}catch(e){console.log(e)}}else{t.target.closest(".pn-logout")&&e.handleLogout(t)}},document.addEventListener("click",this.authClickHandler)},initManageCookiesHandler:function(){this.teardownManageCookiesHandler(),this.manageCookiesClickHandler=function(e){e.target.closest(".cmp-manage-cookies")&&(e.preventDefault(),"function"==typeof window.__tcfapi&&window.__tcfapi("displayConsentUi",2,(function(){})))},document.addEventListener("click",this.manageCookiesClickHandler)},teardownManageCookiesHandler:function(){this.manageCookiesClickHandler&&(document.removeEventListener("click",this.manageCookiesClickHandler),this.manageCookiesClickHandler=null)},teardownAuthActionHandlers:function(){this.authClickHandler&&(document.removeEventListener("click",this.authClickHandler),this.authClickHandler=null)},handleLogout:function(e){var t=this;e.preventDefault();var o=!1,n=this.getCookie("__utp")||"",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=e&&e.data&&e.data.redirect_url?e.data.redirect_url:t.data.home_route||"/";window.location.replace(o)},a=function(){o||(o=!0,i().post("".concat(t.data.logout_route),{piano_token:n||null}).then((function(e){t.clearAuthClientState(),r(e)})).catch((function(e){console.log(e),t.clearAuthClientState(),r()})))};try{if(s&&s.pianoId&&"function"==typeof s.pianoId.logout)return s.pianoId.logout(a),void window.setTimeout(a,1500)}catch(e){console.log(e)}a()},initPageShowHandler:function(){this.teardownPageShowHandler(),this.pageShowHandler=function(e){var t=Number(sessionStorage.getItem("tl-logout-at")||0);if(t){var o=Date.now()-t<15e3,n=document.body&&document.body.dataset&&"true"===document.body.dataset.auth;e&&e.persisted&&o?window.location.reload():n||sessionStorage.removeItem("tl-logout-at")}},window.addEventListener("pageshow",this.pageShowHandler)},teardownPageShowHandler:function(){this.pageShowHandler&&(window.removeEventListener("pageshow",this.pageShowHandler),this.pageShowHandler=null)},syncExistingPianoSession:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!(this.data.auth||this.pianoSyncAttempted&&!t||this.hasRecentForcedLogout())){var n=window.location.pathname&&0===window.location.pathname.indexOf("/members/account"),r=this.getCookie("__utp");r&&(t||n||sessionStorage.getItem(this.pianoSyncStorageKey)!==r)&&(this.pianoSyncAttempted=!0,this.recordPianoDiagnostic("pianoSyncRequests"),i().post("".concat(this.data.piano_sync_route),{token:r}).then((function(t){t&&t.data&&"Piano sync success"===t.data.message?(e.recordPianoDiagnostic("pianoSyncSuccesses"),n||(sessionStorage.setItem(e.pianoSyncStorageKey,r),o&&e.reloadAfterPianoEvent())):e.recordPianoDiagnostic("pianoSyncFailures")}
2)).catch((function(t){e.recordPianoDiagnostic("pianoSyncFailures"),console.log("Piano sync error:",t)})))}},waitForPianoAccessToken:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=e&&"string"==typeof e.token?e.token:"",i=this.getCookie("__utp")||n||"";return i||o<=0?Promise.resolve(i):new Promise((function(n){window.setTimeout((function(){t.waitForPianoAccessToken(e,o-1).then(n)}),100)}))},completePianoAuthentication:function(e){var t=e.pianoEvent,o=e.email,n=e.uid,r=e.route,a=e.reloadAfterSuccess,c=void 0!==a&&a;this.waitForPianoAccessToken(t).then((function(e){e?i().post(r,{email:o,uid:n,token:e}).then((function(){c&&window.location.reload()})).catch((function(e){e.response&&401===e.response.status?window.location.reload():console.log("Piano authentication error:",e)})):window.location.reload()}))},recordPianoDiagnostic:function(e){"function"==typeof window.__TL_RECORD_PIANO_DIAGNOSTIC__&&window.__TL_RECORD_PIANO_DIAGNOSTIC__(e)},reloadAfterPianoEvent:function(){this.recordPianoDiagnostic("documentNavigations"),window.location.reload()},shouldReloadAfterPianoLogin:function(e){return"OFFER"!==(e&&"string"==typeof e.source?e.source.toUpperCase():"")},completePianoLogin:function(e){var t=this,o=e&&"object"===r(e)?e:{},n=o.params&&"object"===r(o.params)?o.params:{},a=o.user&&"object"===r(o.user)?o.user:{},c=n.email||a.email,s=n.uid||a.uid||a.sub,u=this.shouldReloadAfterPianoLogin(e);this.waitForPianoAccessToken(o).then((function(e){e&&c&&s?i().post("".concat(t.data.login_route),{email:c,uid:s,token:e}).then((function(){u&&t.reloadAfterPianoEvent()})).catch((function(e){console.log("Piano login error:",e),t.syncExistingPianoSession(!0,u)})):t.syncExistingPianoSession(!0,u)}))},initializePianoLifecycle:function(){var e=this;this.runForcedPianoLogoutBeforeInit((function(){e.registerPianoLifecycleHandlers()}))},registerPianoLifecycleHandlers:function(){var e=this;if(!window.__TL_PIANO_LIFECYCLE_HANDLERS_REGISTERED__){window.__TL_PIANO_LIFECYCLE_HANDLERS_REGISTERED__=!0,window.__TLPerfMarks&&"function"==typeof window.__TLPerfMarks.mark&&window.__TLPerfMarks.mark("tl:thirdparty:piano:lifecycle-start");var t=(this.data.account_path||"/members/account").replace(/\/$/,""),o="#my-account",n="data-tl-piano-account-render-key",r="pending",a=function(){var e=(window.location.pathname||"").replace(/\/$/,"");return e===t||e.startsWith("".concat(t,"/"))||window.location.href.includes("/members/account")},c=function(){var t=(window.location.pathname||"").replace(/\/$/,""),o=e.getCookie("__utp")?"utp1":"utp0",n="";try{if(s&&s.pianoId&&"function"==typeof s.pianoId.getUser){var i=s.pianoId.getUser();i&&(n=i.uid||i.sub||i.userId||i.email||"")}}catch(e){}return!n&&"undefined"!=typeof localStorage&&localStorage.getItem&&(n=localStorage.getItem("piano-uid")||localStorage.getItem("piano_uid")||""),{scope:"".concat(t,"|").concat(o),user:n||r}},u=function(e){return!!e&&(!!e.querySelector("iframe")||e.children.length>0)},l=function(){e.pianoAccountPollTimer&&(clearTimeout(e.pianoAccountPollTimer),e.pianoAccountPollTimer=null)},d=function(e){var t=e.force,i=void 0!==t&&t,c=e.state;if(!a())return!1;var l=document.querySelector(o);if(!l||!s||!s.myaccount||"function"!=typeof s.myaccount.show)return!1;var d=function(e,t){if(!e)return!1;var o=e.split("|"),n=o.pop();return o.join("|")!==t.scope||n!==r&&t.user!==r&&n!==t.user}(l.getAttribute(n),c);if(!i&&!d&&u(l))return!0;(i||d)&&(l.innerHTML=""),l.setAttribute(n,function(e){return"".concat(e.scope,"|").concat(e.user)}(c));try{s.myaccount.show({displayMode:"inline",containerSelector:o,activateTemplateInteraction:!0})}catch(e){return console.log(e),!1}return!0},h=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!window.__TL_MYACCOUNT_BOOT__){l();var n=c(),i=0,r=t,s=!1,h=function t(){if(a()){var c=document.querySelector(o);!r&&s&&u(c)?l():(s&&i%10!=0||(s=d({force:r,state:n})||s,r=!1),i>=150?l():(i+=1,e.pianoAccountPollTimer=setTimeout(t,200)))}else l()};h()}};s.push(["setCustomVariable","currentUrl",this.thelocalGetURIPart("host")]);var f,p=this.thelocalGetURIPart("search");-1!==p.indexOf("newsletter_member")?(this.setWithExpiry("thelocal_member",1,6048e5),localStorage.removeItem("thelocal_subscriber")):-1!==p.indexOf("newsletter_subscriber")&&"1"!==this.getWithExpiry("thelocal_member")&&localStorage.setItem("thelocal_subscriber","1"),this.getWithExpiry("thelocal_member"),"1"==this.getWithExpiry("thelocal_member")&&s.push(["setCustomVariable","thelocal_member",!0]),"1"===localStorage.getItem("thelocal_subscriber")&&s.push(["setCustomVariable","thelocal_subscriber",!0]),s.push(["addHandler","loginSuccess",function(t){window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.checkoutComplete&&window.webkit.messageHandlers.checkoutComplete.postMessage({}),"function"!=typeof window.__TL_COMPLETE_PIANO_LOGIN__?e.completePi
2anoLogin(t):window.__TL_COMPLETE_PIANO_LOGIN__(t)}]),this.syncExistingPianoSession(),s.push(["addHandler","registrationSuccess",function(t){window.__TL_PIANO_ANALYTICS__.track("sign_up",{},"registration"),e.completePianoAuthentication({pianoEvent:t,email:t.user.email,uid:t.user.sub,route:e.data.register_route})}]),s.push(["addHandler","checkoutStateChange",function(t){if("state2"===t.stateName){f=t.term;var o=t.term&&t.term.termId?t.term.termId:"";if(!window.__TL_PIANO_ANALYTICS__.track("piano_checkout_started",{piano_term_id:o},o||"checkout"))return;if(dataLayer.push({event:"addToCart",ecommerce:{currencyCode:"EUR",add:{products:[{name:t.term.name,id:t.term.termId,price:t.term.chargeAmmount,brand:"thelocal.".concat(e.siteDomain),category:t.term.resource.name,variant:t.term.name,quantity:1}]}}}),dataLayer.push({event:"checkout",ecommerce:{checkout:{actionField:{step:1,option:"payment method"},products:[{name:t.term.name,id:t.term.termId,price:t.term.chargeAmmount,brand:"thelocal.".concat(e.siteDomain),category:t.term.resource.name,variant:t.term.name,quantity:1}]}}}),s&&s.pianoId&&"function"==typeof s.pianoId.getUser&&s.pianoId.getUser()){var n=s.pianoId.getUser(),r={aid:s.aid,termId:t.termId,edition:e.siteDomain,email:n.email,firstName:n.firstName?n.firstName:"",lastName:n.lastName?n.lastName:""};i().post("".concat(e.data.piano_abandoned_cart_route),r).then((function(e){console.log(e)})).catch((function(e){console.log(e)}))}}}]),s.push(["addHandler","checkoutComplete",function(t){var o=t&&t.paymentId?t.paymentId:"",n=window.__TL_PIANO_ANALYTICS__.claim("purchase",o||"purchase");n&&dataLayer.push({event:"purchase",edition:window.__EDITION__||e.siteDomain,piano_event_key:n,ecommerce:{currencyCode:"EUR",purchase:{actionField:{id:o,affiliation:"The Local ".concat(e.siteDomain.toUpperCase()),revenue:t.chargeAmount,tax:"",shipping:"",coupon:""},products:[{name:f.name,id:f.termId,price:f.chargeAmmount,brand:"thelocal.".concat(e.siteDomain),category:f.resource.name,variant:f.name,quantity:1,coupon:""}]}}})}]),s.push(["addHandler","checkoutClose",function(t){if("checkoutCompleted"===t.state)e.reloadAfterPianoEvent()}]),s.push(["addHandler","externalCheckoutComplete",function(t){e.reloadAfterPianoEvent()}]),h(!1),window.addEventListener("pageshow",(function(e){e&&e.persisted&&h(!1)})),window.addEventListener("tl:piano-experience-execute",(function(){window.setTimeout((function(){h(!1)}),0)})),window.__TL_PIANO_EXPERIENCE_EXECUTED__&&window.setTimeout((function(){h(!1)}),0),s.push(["addHandler","completeUpgradePurchase",function(t){e.reloadAfterPianoEvent()}]),this.retryPendingPianoLogoutAfterInit(),this.maybeStartDeferredPianoExperience(),window.__TL_PIANO_LIFECYCLE_READY__=!0,window.dispatchEvent(new Event("tl:piano-ready")),window.__TLPerfMarks&&"function"==typeof window.__TLPerfMarks.measure&&(window.__TLPerfMarks.mark("tl:thirdparty:piano:lifecycle-end"),window.__TLPerfMarks.measure("tl:thirdparty:piano:lifecycle","tl:thirdparty:piano:lifecycle-start","tl:thirdparty:piano:lifecycle-end"))}}}};const l=(0,o(3744).Z)(u,[["render",function(e,t,o,n,i,r){return null}]])}}]);
3//# sourceMappingURL=defaultLayout.ac37dd437bc66278.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.