1import{c as e,n as t,t as n}from"./jsx-runtime-DkxrIk4J.js";import{o as r,s as i}from"./styled-components.browser.esm-B8ew7Uy7.js";import{t as a}from"./lib-C7CCqJGq.js";import{c as o}from"./dist-h-T5vN1w.js";import{t as s}from"./FormattedMessageWithHtml-Dp-UCU6p.js";import{t as c}from"./Assets-MtbeU0JK.js";import{t as l}from"./ShoppingCartMessage-BYMLQaTi.js";var u=e(t());r();var d=a({error:{id:`app.loader.error`,defaultMessage:`Oops! Something went wrong and we couldn't process your request. Please, try again later`}}),f=n(),p=({delay:e=500,loadingMessage:t,onTimeoutError:n,timeout:r=60})=>{let i=o(),[a,p]=u.useState(!1),[_,v]=u.useState(!1);(0,u.useEffect)(()=>{let t=setTimeout(()=>p(!0),e);return()=>clearTimeout(t)},[]),(0,u.useEffect)(()=>{if(a){let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}}},[a]),(0,u.useEffect)(()=>{let e=setTimeout(n||(()=>{v(!0)}),r*1e3);return()=>clearTimeout(e)},[n,r]),(0,u.useEffect)(()=>{let e;return _&&(e=setTimeout(()=>{i(-1)},1e4)),()=>e&&clearTimeout(e)},[_,i]);let y=()=>{p(!1),v(!1),i(-1)};return a?(0,f.jsxs)(m,{children:[_&&(0,f.jsx)(h,{children:(0,f.jsx)(s,{...d.error,children:e=>(0,f.jsx)(l,{message:e,onClose:y})})}),!_&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`img`,{src:c.LOADER_SPINNER,alt:``,height:80,width:80}),t&&(0,f.jsx)(g,{children:(0,f.jsx)(s,{...t})})]})]}):null},m=i.div.withConfig({displayName:`Loader__Wrapper`,componentId:`sc-xb5m0i-0`})([`z-index:999;position:fixed;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(255,255,255,0.7);& > div{margin:0 !important;}`]),h=i.div.withConfig({displayName:`Loader__ErrorWrapper`,componentId:`sc-xb5m0i-1`})([`padding-bottom:50px;`]),g=i.span.withConfig({displayName:`Loader__Title`,componentId:`sc-xb5m0i-2`})([`font-family:"Segoe UI",Fallback,sans-serif !important;font-size:14px;`]);export{p as t};
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.