1class RequestInterceptor{constructor(){this.requestInterceptors=[],this.responseInterceptors=[]}addRequestInterceptor(interceptor){this.requestInterceptors.push(interceptor)}addResponseInterceptor(interceptor){this.responseInterceptors.push(interceptor)}async handleRequest(url,options){let modifiedOptions={...options};for(const interceptor of this.requestInterceptors)modifiedOptions=await interceptor(url,modifiedOptions);return modifiedOptions}async handleResponse(response){let modifiedResponse=response;for(const interceptor of this.responseInterceptors)modifiedResponse=await interceptor(modifiedResponse);return modifiedResponse}async request(method,url,body=null,options={}){try{const modifiedOptions=await this.handleRequest(url,{...options,method,body:body?JSON.stringify(body):null,headers:{"Content-Type":"application/json",...options.headers||{}}});let response=await fetch(url,modifiedOptions);if(!response.ok)throw new Error(`Request failed with status ${response.status}`);return response=await this.handleResponse(response),response.json()}catch(error){throw console.error(`${method} request error:`,error),error}}async get(url,options={}){return this.request("GET",url,null,options)}async post(url,body,options={}){return this.request("POST",url,body,options)}async put(url,body,options={}){return this.request("PUT",url,body,options)}async delete(url,options={}){return this.request("DELETE",url,null,options)}}window.interceptor=new RequestInterceptor,window.interceptor.addRequestInterceptor(async(url,options)=>(options.headers={...options.headers,Authorization:"Bearer token"},options)),window.interceptor.addResponseInterceptor(async response=>response); 2//# sourceMappingURL=/cdn/shop/t/124/assets/request.js.map?v=182924175162802935881769409856
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.