1import{gO as a,gB as n}from"#entry";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"production-273317172"};var s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="52b3cef0-ccdf-4606-81e1-3d02dcfdaa1e",r._sentryDebugIdIdentifier="sentry-dbid-52b3cef0-ccdf-4606-81e1-3d02dcfdaa1e")}catch{}})();const l=()=>{const{LitiumRestApiKey:r}=a().public,{restEndpoint:s}=n();return{fetchWishlistState:async()=>{try{const t=await $fetch(`${s}/wish-list/me`,{credentials:"include",headers:{Authorization:`Bearer ${r}`}});if(!t)throw new Error("Failed to fetch server wishlist state");return t.map(e=>({...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)}))}catch(t){console.error(`Error fetching server wishlist state: ${t}`);return}},updateWishlist:async t=>{try{const e=await $fetch(`${s}/wish-list`,{method:"PUT",credentials:"include",body:t,headers:{Authorization:`Bearer ${r}`}});if(!e)throw new Error("Failed to update wishlist on server");return{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)}}catch(e){console.error(`Error updating wishlist on server: ${e}`);return}},createWishlist:async t=>{try{const e=await $fetch(`${s}/wish-list/`,{method:"POST",credentials:"include",body:{name:t.name,variantIds:t.variantIds},headers:{Authorization:`Bearer ${r}`}});if(!e)throw new Error("Failed to create wishlist on server");return{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)}}catch(e){console.error(`Error creating new wishlist to server wishlist: ${e}`);return}},fetchSharedWishlist:async t=>$fetch(`${s}/wish-list/${t}`,{method:"GET"})}};export{l as u};
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.