(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{1441:(e,o,r)=>{Promise.resolve().then(r.bind(r,28731))},28731:(e,o,r)=>{"use strict";r.r(o),r.d(o,{default:()=>n});var t=r(95155),i=r(12115);function n({error:e,reset:o}){let[r,n]=(0,i.useTransition)(),[s,a]=(0,i.useState)(!1),l=window.location.pathname.startsWith("/en")?"en":"ka",c=(0,i.useMemo)(()=>{let o=e?.message?.toLowerCase()||"";return o.includes("not found")&&o.includes("store")?{level:"unavailable",title:"en"===l?"Store Unavailable":"მაღაზია მიუწვდომელია",subtitle:"en"===l?"The store you are looking for is not registered on KOMERO platform":"თქვენს მიერ მოთხოვნილი მაღაზია არ არის რეგისტრირებული KOMERO-ს პლატფორმაზე",color:"#3b82f6"}:o.includes("500")||o.includes("502")||o.includes("503")||o.includes("fetch failed")||o.includes("econnrefused")||o.includes("network error")?{level:"critical",title:"en"===l?"System Failure":"სისტემური ხარვეზი",subtitle:"en"===l?"The application encountered a critical error":"აპლიკაციამ კრიტიკული ხარვეზი დააფიქსირა",color:"#3b82f6"}:o.includes("401")||o.includes("auth")?{level:"auth",title:"en"===l?"Session Expired":"სესია დასრულდა",subtitle:"en"===l?"Please sign in again":"გთხოვთ გაიაროთ ხელახალი ავტორიზაცია",color:"#f59e0b"}:{level:"info",title:"en"===l?"Restoring Session...":"მიმდინარეობს აღდგენა...",subtitle:"en"===l?"Optimizing your experience":"ვამზადებთ სამუშაო გარემოს",color:"#0a0a0a"}},[e,l]),d=()=>{n(()=>{o(),window.location.reload()})};return(0,i.useEffect)(()=>{if("unavailable"===c.level)return;let e=setTimeout(()=>{d()},8e3);return()=>clearTimeout(e)},[o,c.level]),(0,t.jsxs)("html",{lang:l,children:[(0,t.jsx)("head",{children:(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:` body { margin: 0; padding: 0; background-color: #ffffff; color: #0a0a0a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; } @media (prefers-color-scheme: dark) { body { background-color: #000000; color: #f5f5f5; } } .error-container { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; z-index: 9999; background-color: inherit; } .progress-line { position: fixed; top: 0; left: 0; right: 0; height: 3px; background-color: ${c.color}; transform-origin: left; animation: progress-load 8s linear forwards; } .content { text-align: center; max-width: 480px; width: 100%; opacity: 1; animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; } .title { font-size: 24px; font-weight: 300; letter-spacing: 0.05em; color: inherit; text-transform: uppercase; margin: 0 0 8px 0; animation: pulse-opacity 2s ease-in-out infinite; } .subtitle { font-size: 12px; font-weight: 300; letter-spacing: 0.2em; color: #737373; text-transform: uppercase; margin: 0 0 32px 0; } @media (prefers-color-scheme: dark) { .subtitle { color: #a3a3a3; } } .retry-button { background: transparent; border: 1px solid #737373; color: inherit; padding: 10px 24px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; opacity: 0.8; border-radius: 4px; } .retry-button:hover { opacity: 1; background: #0a0a0a; color: #ffffff; border-color: #0a0a0a; } @media (prefers-color-scheme: dark) { .retry-button:hover { background: #f5f5f5; color: #000000; border-color: #f5f5f5; } } .komero-branding { position: fixed; bottom: 32px; left: 0; right: 0; text-align: center; opacity: 1; animation: fade-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; } .komero-logo { font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: #737373; display: flex; align-items: center; justify-content: center; gap: 12px; } .komero-logo span { font-weight: 800; color: inherit; } .komero-dot { width: 4px; height: 4px; background-color: ${c.color}; border-radius: 50%; } .dev-trigger { position: fixed; bottom: 0; right: 0; width: 64px; height: 64px; cursor: default; z-index: 10002; } .dev-console { position: fixed; bottom: 24px; left: 24px; right: 24px; background: #ffffff; border: 1px solid #e5e5e5; padding: 20px; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); font-family: monospace; font-size: 11px; z-index: 10001; text-align: left; color: #000; } @media (prefers-color-scheme: dark) { .dev-console { background: #1a1a1a; border-color: #333; color: #eee; } } @keyframes progress-load { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } @keyframes pulse-opacity { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } } `}})}),(0,t.jsx)("body",{children:(0,t.jsxs)("div",{className:"error-container",children:[(0,t.jsx)("div",{className:"progress-line"}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("h1",{className:"title",children:c.title}),(0,t.jsx)("p",{className:"subtitle",children:c.subtitle}),"unavailable"===c.level?(0,t.jsx)("a",{className:"retry-button",href:"mailto:support@komero.ge",style:{textDecoration:"none",display:"inline-block"},children:"en"===l?"Contact Support":"დაუკავშირდით მხარდაჭერას"}):(0,t.jsx)("button",{className:"retry-button",disabled:r,onClick:d,children:r?"en"===l?"Restoring...":"აღდგენა...":"en"===l?"Restore App":"აპლიკაციის აღდგენა"})]}),(0,t.jsx)("div",{className:"komero-branding",children:(0,t.jsxs)("div",{className:"komero-logo",children:["Powered by ",(0,t.jsx)("span",{children:"KOMERO"}),(0,t.jsx)("div",{className:"komero-dot"})]})}),(0,t.jsx)("div",{className:"dev-trigger",onDoubleClick:()=>a(!s)}),s&&(0,t.jsxs)("div",{className:"dev-console",children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,t.jsx)("span",{style:{fontWeight:"bold"},children:"System Info"}),(0,t.jsx)("button",{style:{background:"none",border:"none",cursor:"pointer",color:"inherit"},onClick:()=>a(!1),children:"✕"})]}),(0,t.jsxs)("p",{children:["Level: ",c.level]}),(0,t.jsxs)("p",{children:["Digest: ",e?.digest||"N/A"]}),(0,t.jsxs)("p",{children:["Message: ",e?.message]})]})]})})]})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=1441)),_N_E=e.O()}]);