1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56762],{20250:(t,e,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/--pending--strapi/api/app/advice",function(){return a(65124)}])},42634:()=>{},65124:(t,e,a)=>{"use strict";a.r(e),a.d(e,{__N_SSP:()=>n,default:()=>l});var r=a(24734),i=a(98405);let s=async t=>await i.A.GET("/app-advices",{locale:t,populate:{image:{populate:{fields:["url"]}},title:{populate:"*"},description:{populate:"*"},link:{fields:["href","label"]}}});var n=!0;async function l(t,e){if("GET"!==t.method)return e.status(405);let a=t.query?.lang??null;if(null===a||void 0===r.Ay[a]||!r.Ay[a].primary)return e.status(500).json({ok:!1});try{let t,{data:r}=await s(a),i=(t=r.map(t=>({title:t.attributes.title.fields[a],description:t.attributes.description.fields[a],image:t.attributes.image.data.attributes.url,link:t.attributes.link,id:t.id})))[Math.floor(Math.random()*t.length)];await e.status(200).json({ok:!0,feature:i})}catch(t){return e.status(500).json({ok:!1})}}},98405:(t,e,a)=>{"use strict";a.d(e,{A:()=>u});var r=a(49620),i=a.n(r);let s=(t="")=>{if("/"!==t.slice(0,1))throw Error(`Error while formatting API path: The path '${t}' must start with a slash`);return`http://localhost:1337/api${t}`},n=async(t,e)=>{try{let a=await fetch(t,e);return await a.json()}catch(t){throw console.error(t),Error(`Please check if your server is running and you set all the required tokens. 2 ${t}`)}},l=async(t,e={})=>{let a=Object.keys(e).length>0?`?${i().stringify(e)}`:"";return n(s(`${t}${a}`),{headers:{"Content-Type":"application/json",Authorization:"Bearer "}})},o=async({endpoint:t,locale:e,slug:a,id:r})=>{let i={locale:e,filters:{}};return"string"==typeof a&&(i.filters.slug={$eq:a}),"string"==typeof r&&(i.filters.id_intl={$eq:r}),(await l(t,i)).data.map(({attributes:t})=>({id:t.slug,...t}))},u={GET:l,POST:async(t,e)=>n(s(t),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "},body:JSON.stringify({data:e})}),fetchCategoriesData:o,getCategoryData:({categoriesData:t,id:e})=>t.find(({id:t})=>t===e)}}},t=>{t.O(0,[49620,90636,46593,38792],()=>t(t.s=20250)),_N_E=t.O()}]);
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.