PageSourceSearch

https://bonnegueule.fr/cdn/shop/t/9/assets/__vite-section-loader.cfabd402.js

js bonnegueule.fr collected 2026-10-02 10:04:55 UTC 2,454 bytes, 1 lines download raw bytes

1const g=Object.defineProperty,h=(l,t,e)=>t in l?g(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,S=(l,t,e)=>(h(l,typeof t!="symbol"?t+"":t,e),e);class o{static getFromStorage(t){const e=sessionStorage.getItem(`SectionLoader-${t}`);return e?JSON.parse(e):null}static setToStorage(t,e){return sessionStorage.setItem(`SectionLoader-${t}`,JSON.stringify(e))}static getFromServer({resource:t,opts:e,key:n,sections:c,params:r}){return new Promise(async a=>{let i=Object.entries(r).map(f=>f.join("=")).join("&");i.length&&(i="&"+i);const u=t.replace(new RegExp("^"+window.themeVariables.routes.rootUrl),"").replace(/^\//,""),m=`${window.themeVariables.routes.rootUrlWithoutSlash}/${u}${u.indexOf("?")!==-1?"&":"?"}sections=${c.join(",")}${i}`,d=await(await fetch(m)).json();e.saveToStorage&&o.setToStorage(n,d),a(o.formatResponse(d,e))})}static formatResponse(t,e){const n={};if(e.removeSectionWrapper)for(const r in t){if(!t[r]){n[r]=null;return}const a=document.createElement(e.convertionToNodeTag),i=t[r].replace(/^<div.*?class="shopify-section[^>]*?>/,"").replace(/<\/div>$/,"");e.returnNodes?(a.innerHTML=i,n[r]=[...a.children]):n[r]=i}else if(e.returnNodes)for(const r in t){if(!t[r]){n[r]=null;return}const a=document.createElement(e.convertionToNodeTag);a.innerHTML=t[r],n[r]=[...a.firstElementChild.children]}else Object.assign(n,t);const c=Object.keys(n);return c.length===1?n[c[0]]:e.returnNodes?n:n.join("")}static isInThemeBuilder(){return!!(window.Shopify&&Shopify.designMode)}static load({resource:t,sections:e=[],params:n={},options:c={}}){var d;if(Array.isArray(e)||(e=[e]),typeof t>"u"||!e.length)return;const r={removeSectionWrapper:!0,returnNodes:!1,saveToStorage:!0,cache:!0,requestCache:!0,convertionToNodeTag:"div",...c};o.isInThemeBuilder()&&(r.saveToStorage=!1);const{view:a,...i}=n||{},u=((d=window.Shopify)==null?void 0:d.locale)||"fr",m=window.themeVariables.settings.currentMarket||"default",s=`${u}-${m}_${t}-${e.join("-")}-${Object.values(i||{}).join("-")}`;if(r.cache&&!o.isInThemeBuilder()&&this.loadedSections[s])return this.loadedSections[s];if(r.saveToStorage){const f=o.getFromStorage(s);if(f)return r.requestCache&&setTimeout(()=>{this.loadedSections[s]=o.getFromServer({resource:t,params:n,opts:r,key:s,sections:e})}),o.formatResponse(f,r)}return this.loadedSections[s]=o.getFromServer({resource:t,params:n,opts:r,key:s,sections:e}),this.loadedSections[s]}}S(o,"loadedSections",{});export{o as S,S as _};

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.