PageSourceSearch

https://www.iltalehti.fi/assets/GoogleExtendedAccess.1e7c32ba8.chunk.js

js iltalehti.fi collected 2026-10-01 10:12:37 UTC 3,403 bytes, 2 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[6099],{33817(e,t,n){n.r(t),n.d(t,{default:()=>E});var r=n(5556),i=n.n(r),a=n(96540),s=n(61225),o=n(35609),c=n(93473),u=n(84871),l=n(12089),d=n(72016);function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((n,r)=>{if(document.querySelector(`script[src="${e}"]`))return void n();const i=document.createElement("script");i.src=e,i.async=!0,Object.entries(t).forEach(e=>{let[t,n]=e;i.setAttribute(t,n)});const a=setTimeout(()=>{r(new Error(`Extended Access script loading timed out: ${e}`))},c.wy);i.onload=()=>{clearTimeout(a),n()},i.onerror=()=>{clearTimeout(a),r(new Error(`Failed to load script: ${e}`))},document.body.appendChild(i)})}function m(e){const t={granted:!1};if(!e)return t;const{userData:n}=e;if(!n)return t;const r=(0,l._r)(n),i=n["https://almamedia.net/user_email"],a=n["https://almamedia.net/created_date"],s=new Date(a).getTime(),o={id:i,registrationTimestamp:s,granted:!1};return r?{...o,subscriptionTimestamp:s,granted:!0,grantReason:"SUBSCRIBER"}:o}function w(e,t){let n=e.getState().almaUser;return e.subscribe(()=>{const r=e.getState().almaUser;JSON.stringify(r)!==JSON.stringify(n)&&(n=r,t(r))})}function f(e,t){return o.S?new Promise(n=>{window.GaaMetering.getLoginPromise().then(()=>{e();const r=w(t,e=>{if(e){const t=m(e);r(),n(t)}});setTimeout(()=>{r(),n(m())},c.FM)})}):Promise.resolve()}function p(e){return o.S?new Promise(t=>{const{almaUser:n}=e.getState();if(n&&n.userLoginDone){const e=m(n);return void t(e)}const r=w(e,e=>{if(e&&e.userLoginDone){const n=m(e);r(),t(n)}});setTimeout(()=>{r(),t(m())},c.zO)}):Promise.resolve()}function h(){}var S=n(3638);let b=!1,P=!1,v=!1;function y(e){const t=(0,s.useStore)(),n=(0,S.Ip)(),{userLoginDone:r}=n,i=(0,S.Ll)(),{login:w}=(0,S.sw)(),y=(0,a.useCallback)(async()=>{if(!o.S||!window.GaaMetering)return;const r=m(n),i={...c.tR,handleLoginPromise:f(w,t),registerUserPromise:o.S?new Promise(e=>{window.GaaMetering.getGaaUserPromise().then(t=>{const n=function(e){const t=e.split(".");return JSON.parse(atob(t[1]))}(t.credential),r=function(e){if(!e)return{granted:!1};const t=(new Date).getTime(),{email:n}=e;return{id:n,registrationTimestamp:t,granted:!1}}(n),{email:i}=n;(0,l.f0)(i,"Google Extended Access"),e(r)})}):Promise.resolve(),userState:r,publisherEntitlementPromise:p(t),unlockArticle:()=>{!function(e,t){const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;const t=new URLSearchParams(e),n=t.get("gaa_at"),r=t.get("gaa_ts"),i=t.get("gaa_n"),a=t.get("gaa_sig");return n&&r&&i&&a?t:null}();t&&e&&n&&t.dispatch((0,u.b)({articleId:e,extendedAccessParams:n}))}(e,t)},showPaywall:h};await window.GaaMetering.init(i)},[p,w,t,n,e]),T=(0,a.useCallback)(async()=>{try{return await g(c.b7.gsi,{defer:!0}),await g(c.b7.swg,{"subscriptions-control":"manual"}),await g(c.b7.swgGaa),!0}catch(e){return!1}},[]);(0,a.useEffect)(()=>{(async()=>{if(!b){if(!await T())return;b=!0}P||(await y(),P=!0),v||(o.S&&(window.SWG=window.SWG||[],window.SWG.push(e=>{e.getEventManager().then(e=>{e.registerEventListener(e=>{const{eventType:t}=e;if(c.H7[t]){const{eventName:e,...n}=c.H7[t];(0,d.Rx)(e,n)}})})})),v=!0)})()},[r,i,T,y])}function T(e){let{articleId:t}=e;return y(t),null}T.propTypes={articleId:i().string.isRequired};const E=T}}]);
2//# sourceMappingURL=GoogleExtendedAccess.1e7c32ba8.chunk.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.