PageSourceSearch

https://www.thestorefront.fr/_next/static/chunks/3530.cadb1ab1e461cbe2.js

js thestorefront.fr collected 2026-10-03 21:36:13 UTC 3,983 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0fd72-2e06-7493-a6a3-2b8443f69922")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3530],{53530:function(e,t,n){"use strict";n.d(t,{fetchSeoPageFromBlob:function(){return m}});var o=n(26678),r=n(24558),a=n.n(r),l=n(98260),s=n(73656);let i=null;function c(){return s.env.UPSTASH_REDIS_REST_URL&&s.env.UPSTASH_REDIS_REST_TOKEN?(i||(i=new l.s({url:s.env.UPSTASH_REDIS_REST_URL,token:s.env.UPSTASH_REDIS_REST_TOKEN})),i):null}var u=n(73656);function f(){return"production"===u.env.VERCEL_ENV?"production":"stage"}var h=n(73656);let $=null,p=0,w=null;async function g(){let e=h.env.BLOB_STORE_URL;if(!e)return"v0";try{let t=await fetch(`${e}/seo-pages/${f()}/version.json`,{cache:"no-store",signal:AbortSignal.timeout(3e3)});if(!t.ok)return"v0";let{version:n}=await t.json();return n||"v0"}catch(e){return console.error("[seo-cache] Failed to read blob version marker:",e),"v0"}}async function S(){return $&&Date.now()-p<6e4?$:(w||(w=g().then(e=>($=e,p=Date.now(),w=null,e))),w)}let _=`seo:${f()}:`;async function y(e){return`${_}${await S()}:${e}:page:`}async function d(e,t){let n=c();if(!n)return null;try{let o=await n.get(`${await y(e)}${t}`);if(o)return o.data}catch(e){console.error("[seo-cache] Redis get error:",e)}return null}async function E(e,t,n){let o=c();if(!o)return 0;let r=t.filter(e=>!!e.lookupKey),a=await y(e),l=0;for(let e=0;e<r.length;e+=50){let t=r.slice(e,e+50),s=o.pipeline();for(let e of t){let t={data:e,timestamp:Date.now(),hash:n};if(JSON.stringify(t).length>95e5){console.warn(`[seo-cache] Skipping oversized cache entry: ${e.lookupKey}`);continue}s.set(`${a}${e.lookupKey}`,t,{ex:86400}),l+=1}try{await s.exec()}catch(e){console.error("[seo-cache] Redis pipeline set error:",e)}}return l}n(65238);var v=n(73656);let b=f();async function R(e,t,n,r){let l=function(e,t,n,o){let r="search"===t&&o?[e,"search",n,`${o}.json`]:[e,t,n+".json"];return a().join("packages","seo-pages","dist","json",...r)}(e,t,n,r),s=[a().join(v.cwd(),l),a().join(v.cwd(),"..","..",l)];for(let e of s)try{let t=await o.promises.readFile(e,"utf8");return JSON.parse(t)}catch{continue}return null}let T=new Map;async function k(e){let t;for(let n=0;n<=2;n++){let o=new AbortController,r=setTimeout(()=>o.abort(),3e4);try{let t=await fetch(e,{headers:{Accept:"application/json"},cache:"no-store",signal:o.signal});return clearTimeout(r),t}catch(e){clearTimeout(r),t=e,n<2&&await new Promise(e=>setTimeout(e,1e3*(n+1)))}}throw t}async function O(e,t,n,o,r){let a="true"===v.env.USE_LOCAL_SEO,l=v.env.BLOB_STORE_URL;if(a||!l){let a=await R(e,t,n,o);if(a)return console.log(`[seo-blob] Using local JSON for ${r} (${a.length} entries)`),{pages:a,hash:"local"};if(!l)throw Error("[seo-blob] BLOB_STORE_URL is not set and no local JSON found")}let s="search"===t&&o?`seo-pages/${b}/${e}/search/${n}/${o}.json`:`seo-pages/${b}/${e}/${t}/${n}.json`,i=`${l}/${s}`;console.log(`[seo-blob] Fetching from: ${i}`);let c=await k(i);if(!c.ok){if(404===c.status)return console.warn(`[seo-blob] Blob not found (404), skipping: ${i}`),{pages:[],hash:"404"};throw Error(`[seo-blob] Failed to fetch ${i}: ${c.status} ${c.statusText}`)}let u=await c.json(),f=c.headers.get("etag")||Date.now().toString();return{pages:u,hash:f}}async function j(e,t,n,o){let r="search"===t&&o?`${e}:${t}:${n}:${o}`:`${e}:${t}:${n}`;if(T.has(r))return T.get(r);let a=O(e,t,n,o,r);T.set(r,a);try{return await a}finally{T.delete(r)}}async function m(e,t,n,o){let r=`/${t}/${n}/${o}`,a=await d(e,r);if(a)return a;let l="search"===t?o.split("/")[0]:void 0,{pages:s,hash:i}=await j(e,t,n,l),c=s.find(e=>e.lookupKey===r)||null;return c?(c.lookupKey&&await E(e,[c],i),c):null}},26678:function(){}}]);
2//# chunkId=01a0fd72-2e06-7493-a6a3-2b8443f69922

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.