"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2720],{5327:(t,e,n)=>{n.d(e,{E1:()=>i,EQ:()=>s,TW:()=>l,fX:()=>u,lp:()=>c,vS:()=>d,wR:()=>o});var r=n(25177);let a="https://api.komero.ge/Brand";async function i(){return(0,r.nr)(`${a}/get-all-brands`)}async function o(t){return(0,r.nr)(`${a}/get-brand-by-${t}`)}async function u(t){return(0,r.nr)(`${a}/update-brand`,{method:"PUT",body:JSON.stringify(t),requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}async function s(t,e,n,i,o,u,s){let c={name:t,origin:e,description:n,images:i,parentId:o||null,...u,translations:s};return(0,r.nr)(`${a}/add-brand`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c),requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}async function c(t){return(0,r.nr)(`${a}/delete-brand-by-${t}`,{method:"PUT",requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}async function d(t,e){return(0,r.nr)(`${a}/delete-image-${e}-by-brand-${t}`,{method:"DELETE",requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}async function l(t,e,n){if(!t)throw Error("brand is required");if(!e||0===e.length)throw Error("at least one file is required");let i=new FormData;return i.append("id",t),e.forEach(t=>{i.append("files",t,t.name)}),void 0!==n&&n>=0&&i.append("coverIndex",n.toString()),(0,r.nr)(`${a}/images`,{method:"POST",body:i,requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}},10383:(t,e,n)=>{n.d(e,{EY:()=>u,L9:()=>o,g3:()=>i});var r=n(25177);let a="https://api.komero.ge/api/FinaSync";async function i(){let t=await (0,r.nr)("https://api.komero.ge/api/FinaAuthentication/authenticate",{method:"POST",body:"",adminAuth:!0});if(!t||!t.token)throw console.error("❌ Fina Authentication failed: Token is null or undefined",t),Error("Authentication failed: No valid token received from Fina");return t}async function o(){let t=await (0,r.nr)(`${a}/sync-all`,{method:"POST",body:"",adminAuth:!0});return{success:t.message?.includes("success")||t.successCount>0,successCount:t.successCount||0,failureCount:t.failureCount||0,processedItems:t.processedItems||0,errors:t.errors||[],addedCount:t.addedCount||0,updatedCount:t.updatedCount||0,unchangedCount:t.unchangedCount||0,productChanges:t.productChanges||[]}}async function u(){return(0,r.nr)(`${a}/status`,{method:"GET",adminAuth:!0})}},22660:(t,e,n)=>{n.d(e,{Ku:()=>s,WE:()=>d});var r=n(95155),a=n(12115),i=n(25734),o=n(42950);let u=(0,a.createContext)({config:null,isLoading:!0,refresh:async()=>!1}),s=()=>(0,a.useContext)(u),c="tenantConfig",d=({children:t,initialConfig:e=null})=>{let[n,s]=(0,a.useState)(e),[d,l]=(0,a.useState)(!e),f=(0,a.useRef)(!0);(0,a.useEffect)(()=>{if(n?.theme){(0,i.s)(n.theme);try{localStorage.setItem(c,JSON.stringify({v:1,data:n}))}catch{}}},[n]),(0,a.useEffect)(()=>{if(window.self===window.top)return;let t=t=>{t.data?.type==="UPDATE_TENANT_CONFIG"&&t.data.config&&s(e=>e?{...e,...t.data.config,ui:{...e.ui??{},...t.data.config.ui??{}},theme:{...e.theme??{},...t.data.config.theme??{}}}:t.data.config)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[]),(0,a.useEffect)(()=>(f.current=!0,(async()=>{if((0,o.Hc)().catch(()=>{}),e)return l(!1);try{let t=localStorage.getItem(c);if(t){let e=JSON.parse(t);e?.v===1&&e?.data?s(e.data):localStorage.removeItem(c)}}catch{}l(!1);try{let t=window.location.host,e=await fetch(`/api/tenant-config?host=${encodeURIComponent(t)}`,{cache:"no-store"});if(e.ok){let t=await e.json();f.current&&s(t)}else console.error("❌ Failed to fetch tenant config:",e.status)}catch(t){console.error("❌ Error fetching tenant config:",t)}finally{f.current&&l(!1)}})(),()=>{f.current=!1}),[e]);let h=async()=>{try{let t=window.location.host,e=await fetch(`/api/tenant-config?host=${encodeURIComponent(t)}`,{cache:"no-store"});if(!e.ok)return!1;let n=await e.json();return f.current&&s(n),!0}catch{return!1}},g=(0,a.useMemo)(()=>({config:n,isLoading:d,refresh:h}),[n,d]);return(0,r.jsx)(u.Provider,{value:g,children:t})}},25016:(t,e,n)=>{n.d(e,{$g:()=>o,Yt:()=>c,ZC:()=>s,cn:()=>i,hU:()=>u});var r=n(2821),a=n(75889);function i(...t){return(0,a.QP)((0,r.$)(t))}function o(t,e="₾"){let n=t.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",");return"GEL"===e||"₾"===e?`${n} ₾`:`${({GEL:"₾",USD:"$",EUR:"€"})[e]||e}${n}`}function u(t,e="GEL"){let n=t.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",");return"GEL"===e||"₾"===e?`${n} ₾`:`${({GEL:"₾",USD:"$",EUR:"€"})[e]||e} ${n}`}function s(t){if(!t)return"/placeholder.png";if(t.startsWith("http://")||t.startsWith("https://"))return t;if(t.startsWith("/assets/")){let e="https://api.komero.ge/".replace(/\/$/,"")||0;return`${e}${t}`}return t}function c(t){return t?t.replace(/\bcolor\s*:\s*[^;}"']+;?/gi,"").replace(/\bbackground-color\s*:\s*[^;}"']+;?/gi,"").replace(/style\s*=\s*["']\s*["']/gi,"").replace(/style\s*=\s*["']\s*;?\s*["']/gi,""):""}},25177:(t,e,n)=>{n.d(e,{Hd:()=>s,ZU:()=>u,nr:()=>c});class r extends Error{constructor(t="Authentication required"){super(t),this.status=401,this.code="AUTH_REQUIRED",this.name="AuthRequiredError"}}let a=null,i=null,o=null;async function u(){return o||(o=fetch("/api/auth/refresh",{method:"POST",credentials:"same-origin"}).then(async t=>{if(t.ok){let e=(await t.json().catch(()=>({}))).token;return e&&(a=e),{refreshed:!0,token:e}}return{refreshed:!1}}).catch(()=>({refreshed:!1})).finally(()=>{o=null}))}function s(t,e=!1){e?i=t:a=t}async function c(t,e={}){let o=(e.method??"GET").toUpperCase(),s=!0===e.requireAuth||!1!==e.requireAuth&&["POST","PUT","PATCH","DELETE"].includes(o),d=new Headers(e.headers),l=null!=e.body&&"GET"!==o&&"HEAD"!==o,f="undefined"!=typeof FormData&&e.body instanceof FormData;!l||f||d.has("Content-Type")||d.set("Content-Type","application/json");let h=e.token??null;if(s&&!h){let t=!!e.adminAuth,o=t?"/api/auth/token?admin=1":"/api/auth/token";if(!(h=t?i:a))if(1){try{let e=await fetch(o,{credentials:"same-origin",cache:"no-store"});h=e.ok?(await e.json())?.token??null:null,t?i=h??null:a=h??null}catch{h=null}if(!h&&!t)try{if(await u()){let e=await fetch(o,{credentials:"same-origin",cache:"no-store"});h=e.ok?(await e.json())?.token??null:null,t?i=h??null:a=h??null}}catch{}}else{let{cookies:e}=await n.e(684).then(n.bind(n,20684));h=(await e()).get(t?"adminAccessToken":"accessToken")?.value??null}if(!h&&e.failIfUnauthenticated)throw new r;h&&d.set("Authorization",h.startsWith("Bearer ")?h:`Bearer ${h}`)}if(!d.has("X-Client-Domain"))if(0){let t="".replace(/^https?:\/\//i,"").replace(/\/+$/,"");d.set("X-Client-Domain",t||"localhost")}else if(1)d.set("X-Client-Domain",window.location.hostname);else try{let{headers:t}=await n.e(684).then(n.bind(n,20684)),e=await t(),r=e.get("x-forwarded-host")??e.get("host");d.set("X-Client-Domain",r??"localhost")}catch{d.set("X-Client-Domain","localhost")}let g={...e,headers:d,credentials:"same-origin"};"no-store"!==e.cache&&(g.next={revalidate:60,...e.next});let m=await fetch(t,g);if(401===m.status&&s&&!e.token&&!e.adminAuth){a=null;try{let{refreshed:e,token:n}=await u();e&&n&&(d.set("Authorization",n.startsWith("Bearer ")?n:`Bearer ${n}`),m=await fetch(t,{...g,headers:d}))}catch{}}let p=m.headers.get("content-type")||"";if(!m.ok){let e=p.includes("application/json")?JSON.stringify(await m.json()):await m.text();throw console.error(`❌ API Error [${o} ${t}]:`,m.status,e),Error(`Error ${m.status}: ${e}`)}let y=p.includes("application/json")?await m.json():await m.text();return t.includes("/Tenant/tenant-configuration"),y}},25734:(t,e,n)=>{n.d(e,{s:()=>r});function r(t){let e=document.documentElement;for(let[n,r]of Object.entries(function(t){let e={},n=(t,n,r=!1)=>{n&&(e[t]=r&&function(t){if(!t||"string"!=typeof t||!t.startsWith("#"))return t;let e=0,n=0,r=0;return 4===t.length?(e=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16),r=parseInt(t[3]+t[3],16)):(7===t.length||9===t.length)&&(e=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16)),`${e} ${n} ${r}`}(n)||n)};n("--brand-primary",t.brand?.primary,!0),n("--brand-primary-dark",t.brand?.primaryDark,!0),n("--brand-surface",t.brand?.surface,!0),n("--brand-surface-dark",t.brand?.surfaceDark,!0),n("--brand-muted",t.brand?.muted,!0),n("--brand-muted-dark",t.brand?.mutedDark,!0),n("--brand-accent",t.brand?.accent,!0),n("--text-light",t.text?.light,!0),n("--text-subtle",t.text?.subtle,!0),n("--text-light-dark",t.text?.lightDark,!0),n("--text-subtle-dark",t.text?.subtleDark,!0);let r=(t,n)=>{null!=n&&""!==n&&(e[t]=n)};if(t.fonts){let e=((t,e="system-ui, -apple-system, sans-serif")=>{if(!t||"string"!=typeof t||t.includes("://")||t.startsWith("//")||t.includes(".css"))return;let n=t.replace(/['"]/g,"");return n.includes(",")?n:`'${n}', ${e}`})(t.fonts.family);e&&(r("--font-primary",e),r("--font-heading",e),r("--font-secondary",e))}return e}(t)))n.startsWith("--")&&e.style.setProperty(n,"number"==typeof r?String(r):r)}},36300:(t,e,n)=>{function r(t){if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e;return[]}catch{return[]}}function a(t){return JSON.stringify(t)}function i(t){if(!t||0===t.length)return!1;let e=t[0];return"object"==typeof e&&null!==e&&"imagePath"in e}function o(t){return t&&0!==t.length?i(t)?[...t].sort((t,e)=>t.displayOrder!==e.displayOrder?t.displayOrder-e.displayOrder:t.isCover&&!e.isCover?-1:!t.isCover&&e.isCover?1:0).map(t=>t.imagePath):t.filter(t=>"string"==typeof t&&t.trim()):[]}function u(t){if(!t||0===t.length)return;if(!i(t))return t.find(t=>"string"==typeof t&&t.trim());let e=t.find(t=>t.isCover);if(e)return e.imagePath;let n=[...t].sort((t,e)=>t.displayOrder-e.displayOrder);return n[0]?.imagePath}n.d(e,{my:()=>u,nV:()=>o,pv:()=>r,vh:()=>a}),n(99274),n(5327)},42950:(t,e,n)=>{n.d(e,{Hc:()=>h,OA:()=>o,_y:()=>f,gC:()=>l,jW:()=>d,pO:()=>m,pq:()=>i,sY:()=>g,v9:()=>c}),n(10383);var r=n(25177),a=n(77321);let i={Fina:1,BOG:11,RequestProduct:12,Flitt:13,BOGInstallment:21,BOGGooglePay:22,GeorgianPost:30,Glovo:31,Wolt:32,Delivo:33,BasicAuth:50,GoogleOAuth:51,FacebookOAuth:52,Invoice:70,Messenger:80,MetaPixel:90},o="https://api.komero.ge/api/integration/check",u="merchantType",s={11:a.dm.BOG,12:a.dm.RequestProduct,13:a.dm.Flitt,21:a.dm.BOGInstallment};async function c(t){if(t===i.Fina)try{return{isEnabled:!1,integration:null}}catch{return{isEnabled:!1,integration:null}}let e=await (0,r.nr)(`${o}?integrationType=${t}`,{method:"GET",requireAuth:!0,failIfUnauthenticated:!0,cache:"no-store"}),n=e?.[0],a=n?{id:"",tenantId:"",integrationType:n.integrationType,integrationTypeName:"",category:"",isEnabled:n.isEnabled,isPrimary:!1,autoSyncOrders:!1,autoSyncPayments:!1,configuration:[]}:null;return{isEnabled:!!a?.isEnabled,integration:a}}async function d(){let t=[i.BOG,i.Flitt,i.BOGInstallment,i.RequestProduct];return(await Promise.all(t.map(async t=>{try{let e=await (0,r.nr)(`${o}?integrationType=${t}`,{method:"GET",requireAuth:!1,cache:"no-store"}),n=e?.[0];if(!n?.isEnabled)return null;return s[t]??null}catch{return null}}))).filter(t=>null!==t)}async function l(){try{let t=await (0,r.nr)(`${o}?integrationType=${i.RequestProduct}`,{method:"GET",requireAuth:!1,cache:"no-store"});return!!t?.[0]?.isEnabled}catch{return!1}}async function f(t){let e;switch(t){case a.dm.BOG:e=i.BOG;break;case a.dm.BOGInstallment:e=i.BOGInstallment;break;default:return}let n=await (0,r.nr)(`${o}?integrationType=${e}`,{method:"GET",requireAuth:!1,cache:"no-store"}),u=n?.[0];if(!u?.isEnabled)return;let s=u.configuration?.PAYMENT_METHODS;return s?.length?s:void 0}async function h(){try{let t=(await c(i.Fina)).isEnabled?"FINA":"CUSTOM";window.localStorage.setItem(u,t)}catch{}}function g(){return"FINA"!==m()}function m(){let t=window.localStorage.getItem(u);return t||"CUSTOM"}},63302:(t,e,n)=>{n.d(e,{AS:()=>i,Ar:()=>m,DD:()=>h,Du:()=>g,Fu:()=>v,GN:()=>A,Ml:()=>s,N5:()=>d,Ui:()=>c,Vd:()=>u,WG:()=>b,XB:()=>p,ak:()=>$,az:()=>o,oe:()=>a,sx:()=>r,v4:()=>f,wJ:()=>y,xS:()=>l,xf:()=>w});let r=(t,e)=>{if("function"!=typeof window.gtag)return void console.warn("GA4 not loaded. Event not tracked:",t);window.gtag?.("event",t,e)},a=(t,e)=>{"function"==typeof window.gtag&&window.gtag?.("event","page_view",{page_path:t,page_title:e})},i=t=>{"function"==typeof window.gtag&&window.gtag?.("event","view_item",{currency:t.currency||"GEL",value:t.value,items:t.items})},o=t=>{"function"==typeof window.gtag&&window.gtag?.("event","view_item_list",{item_list_id:t.item_list_id,item_list_name:t.item_list_name,items:t.items})},u=t=>{"function"==typeof window.gtag&&window.gtag?.("event","select_item",{item_list_id:t.item_list_id,item_list_name:t.item_list_name,items:t.items})},s=t=>{"function"==typeof window.gtag&&window.gtag?.("event","add_to_cart",{currency:t.currency||"GEL",value:t.value,items:t.items})},c=t=>{"function"==typeof window.gtag&&window.gtag?.("event","remove_from_cart",{currency:t.currency||"GEL",value:t.value,items:t.items})},d=t=>{"function"==typeof window.gtag&&window.gtag?.("event","view_cart",{currency:t.currency||"GEL",value:t.value,items:t.items})},l=t=>{"function"==typeof window.gtag&&window.gtag?.("event","begin_checkout",{currency:t.currency||"GEL",value:t.value,coupon:t.coupon,items:t.items})},f=t=>{"function"==typeof window.gtag&&window.gtag?.("event","add_payment_info",{currency:t.currency||"GEL",value:t.value,payment_type:t.payment_type,coupon:t.coupon,items:t.items})},h=t=>{"function"==typeof window.gtag&&window.gtag?.("event","add_shipping_info",{currency:t.currency||"GEL",value:t.value,shipping_tier:t.shipping_tier,coupon:t.coupon,items:t.items})},g=t=>{"function"==typeof window.gtag&&window.gtag?.("event","purchase",{transaction_id:t.transaction_id,affiliation:t.affiliation,currency:t.currency||"GEL",value:t.value,tax:t.tax||0,shipping:t.shipping||0,coupon:t.coupon,items:t.items})},m=t=>{"function"==typeof window.gtag&&window.gtag?.("event","search",{search_term:t})},p=t=>{"function"==typeof window.gtag&&window.gtag?.("event","login",{method:t||"email"})},y=t=>{"function"==typeof window.gtag&&window.gtag?.("event","sign_up",{method:t||"email"})},w=t=>{"function"==typeof window.gtag&&window.gtag?.("event","share",t)},v=t=>{"function"==typeof window.gtag&&window.gtag?.("event","add_to_wishlist",{currency:t.currency||"GEL",value:t.value,items:t.items})},b=t=>({item_id:t.id,item_name:t.name,price:t.price,quantity:t.quantity,item_brand:t.brand,item_category:t.category,discount:t.discount}),$=t=>{let e=(t.discountPrice??0)>0,n=e?t.discountPrice:t.price??0,r=e&&t.price?t.price-t.discountPrice:0;return{item_id:t.id,item_name:t.name,price:n,quantity:t.quantity||1,item_brand:t.brand?.name,item_category:t.category?.name,discount:r>0?r:void 0,index:t.index,item_list_name:t.listName}},A=t=>t.reduce((t,e)=>{let n=e.price||0,r=e.quantity||1;return t+(n-(e.discount||0))*r},0)},77321:(t,e,n)=>{n.d(e,{dm:()=>r,kx:()=>a});var r=function(t){return t[t.BOG=11]="BOG",t[t.RequestProduct=12]="RequestProduct",t[t.BOGInstallment=21]="BOGInstallment",t[t.Flitt=13]="Flitt",t[t.GooglePay=22]="GooglePay",t}({});let a=[{type:11,name:"Bank of Georgia",description:"Pay with card via BOG",isInstallment:!1},{type:21,name:"BOG Installment",description:"Pay in installments via BOG",isInstallment:!0},{type:13,name:"Flitt",description:"Pay with Flitt",isInstallment:!1},{type:22,name:"Google Pay",description:"Pay with Google Pay"}]},88873:(t,e,n)=>{n.d(e,{AS:()=>o,JG:()=>w,M$:()=>s,TZ:()=>p,WY:()=>g,ab:()=>c,dN:()=>v,h4:()=>i,i1:()=>h,m1:()=>l,ob:()=>d,vS:()=>y,vc:()=>m,y9:()=>u,zh:()=>f});var r=n(25177);let a="https://api.komero.ge/Product";function i(t){switch(t){case"price-low":return{sortColumn:"price",sortOrder:"asc"};case"price-high":return{sortColumn:"price",sortOrder:"desc"};case"newest":case"rating":return{sortColumn:"date",sortOrder:"desc"};default:return{sortColumn:"name",sortOrder:"asc"}}}async function o(t=1,e=20){let n=new URLSearchParams({page:t.toString(),pageSize:e.toString()});return(0,r.nr)(`${a}/get-all-products?${n.toString()}`,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function u(t,e,n){let i=new URLSearchParams;e&&i.append("CurrentProductId",e),n&&i.append("TargetFacetValueId",n);let o=i.toString(),u=o?`${a}/get-products-by-${t}?${o}`:`${a}/get-products-by-${t}`;return(0,r.nr)(u,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function s(t){return(0,r.nr)(`${a}/slug/${t}`,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function c(t){let e=new URLSearchParams({id:t});return(0,r.nr)(`${a}/get-products-by-category?${e.toString()}`,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function d(t){if(!t||0===t.length)return[];let e=new URLSearchParams;return t.forEach(t=>e.append("ids",t)),(0,r.nr)(`${a}/get-products-by-ids?${e.toString()}`,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function l(t){return(0,r.nr)("https://api.komero.ge/api/FinaProductRest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function f(t="",e="name",n="asc",i=1,o=10){let u=new URLSearchParams({searchTerm:t,sortColumn:e,sortOrder:n,page:i.toString(),pageSize:o.toString()});return(0,r.nr)(`${a}/get-product-by-searching?${u.toString()}`,{adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function h(t){let e=t.page??1,n=t.pageSize??24,{sortColumn:o,sortOrder:u}=i(t.sortBy??"featured"),s=new URLSearchParams({page:String(e),pageSize:String(n),sortColumn:o,sortOrder:u});return(0,r.nr)(`${a}/get-products-by-filtering?${s.toString()}`,{method:"POST",body:JSON.stringify(t.filter),headers:{"Content-Type":"application/json"},adminAuth:!0,failIfUnauthenticated:!1,requireAuth:!0})}async function g(t){return(0,r.nr)(`${a}/add-product`,{method:"POST",body:JSON.stringify(t),adminAuth:!0,requireAuth:!0,failIfUnauthenticated:!1})}async function m(t){return(0,r.nr)(`${a}/update-product`,{method:"PUT",body:JSON.stringify(t),adminAuth:!0,requireAuth:!0})}async function p(t){return(0,r.nr)(`${a}/delete-product-by-${t}`,{method:"PUT",adminAuth:!0,requireAuth:!0})}async function y(t,e){return(0,r.nr)(`${a}/delete-image-${e}-by-product-${t}`,{method:"DELETE",adminAuth:!0,requireAuth:!0})}async function w(t,e,n){if(!t)throw Error("productId is required");if(!e||0===e.length)throw Error("at least one file is required");let i=new FormData;return i.append("id",t),e.forEach(t=>{i.append("files",t,t.name)}),void 0!==n&&n>=0&&i.append("coverIndex",n.toString()),(0,r.nr)(`${a}/images`,{method:"POST",body:i,requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}async function v(t,e){return(0,r.nr)(`${a}/${t}/set-cover-image/${e}`,{method:"PUT",requireAuth:!0,failIfUnauthenticated:!0,adminAuth:!0})}},96945:(t,e,n)=>{n.d(e,{I:()=>u,g:()=>i});var r=n(25959),a=n(89863);let i=4;function o(t,e){if(t.some(t=>t.id===e.id))return{ok:!1,reason:"duplicate"};if(t.length>=i)return{ok:!1,reason:"full"};let n=t[0]?.category?.id;return n&&e.category?.id&&e.category.id!==n?{ok:!1,reason:"category"}:{ok:!0}}let u=(0,r.v)()((0,a.Zr)((t,e)=>({items:[],addToCompare:e=>t(t=>o(t.items,e).ok?{items:[...t.items,e]}:t),tryAddToCompare:n=>{let r=o(e().items,n);return r.ok&&t(t=>({items:[...t.items,n]})),r},removeFromCompare:e=>t(t=>({items:t.items.filter(t=>t.id!==e)})),clearCompare:()=>t({items:[]}),isInCompare:t=>e().items.some(e=>e.id===t),getCompareCategoryId:()=>e().items[0]?.category?.id??null}),{name:"compare-storage"}))},97003:(t,e,n)=>{n.d(e,{$:()=>c,r:()=>s});var r=n(95155),a=n(12115),i=n(32467),o=n(83101),u=n(25016);let s=(0,o.F)("inline-flex items-center justify-center