1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[761],{761:(t,e,r)=>{r.r(e),r.d(e,{orderService:()=>s});let a=r(3547).lL.BASE_URL;class o{async request(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="".concat(a).concat(t),o={headers:{"Content-Type":"application/json",...e.headers},...e};try{let t=await fetch(r,o);if(!t.ok)throw{message:(await t.json().catch(()=>({message:"HTTP error! status: ".concat(t.status)}))).message||"HTTP error! status: ".concat(t.status),status:t.status};return await t.json()}catch(t){if(t instanceof Error)throw{message:t.message||"Network error occurred",status:0};throw t}}async createOrder(t){let e=localStorage.getItem("accessToken");if(!e)throw Error("Access token missing. Please login again.");return this.request("/Order",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e?{Authorization:"Bearer ".concat(e)}:{}},body:JSON.stringify(t)})}async getOrderHistory(t){let e=localStorage.getItem("accessToken"),r=await fetch("".concat(a,"/Order/history/").concat(t),{method:"GET",headers:{Accept:"application/json",...e?{Authorization:"Bearer ".concat(e)}:{}}});if(!r.ok)throw Error("Failed to fetch Order History");return r.json()}async getProductsListByOrderId(t){let e=localStorage.getItem("accessToken"),r=await fetch("".concat(a,"/Order/").concat(t,"/products"),{method:"GET",headers:{Accept:"application/json",...e?{Authorization:"Bearer ".concat(e)}:{}}});if(!r.ok)throw Error("Failed to fetch Order History");return r.json()}}let s=new 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.