1import{r as l,j as t}from"./vendor-react-CxPMMIsh.js";import{u}from"./vendor-i18n-JarRYShB.js";import{X as f}from"./vendor-icons-CRqowDKK.js";const b={isMobile:!1,isIOS:!1,isAndroid:!1,isMobileSafari:!1};function x(){if(typeof window>"u"||typeof navigator>"u")return b;const n=navigator.userAgent||"",e=/iPhone|iPad|iPod/i.test(n),i=/Android/i.test(n),r=e||i||/Mobile/i.test(n),o=e&&/Safari/i.test(n)&&!/CriOS|FxiOS|EdgiOS|OPiOS|GSA/i.test(n);return{isMobile:r,isIOS:e,isAndroid:i,isMobileSafari:o}}const c="kept-app-open-banner-dismissed-at",g=7*24*60*60*1e3;function y({url:n}){const{t:e}=u(),[i,r]=l.useState(!1);if(l.useEffect(()=>{if(x().isMobile){try{const a=window.localStorage.getItem(c);if(a){const d=Number(a);if(Number.isFinite(d)&&Date.now()-d<g)return}}catch{}r(!0)}},[]),!i)return null;const o=n||(typeof window<"u"?window.location.href:"/"),m=()=>{try{window.localStorage.setItem(c,String(Date.now()))}catch{}r(!1)},p=()=>{window.location.href=o};return t.jsx("div",{role:"region","aria-label":e("mobile.m5.appOpenBanner.title"),className:"md:hidden fixed bottom-3 left-3 right-3 z-50 rounded-lg border border-border bg-card shadow-lg",children:t.jsxs("div",{className:"flex items-center gap-3 p-3",children:[t.jsx("img",{src:"/icon-192.png",alt:"","aria-hidden":!0,className:"h-10 w-10 rounded-lg",onError:s=>{s.currentTarget.style.display="none"}}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:e("mobile.m5.appOpenBanner.title")}),t.jsx("div",{className:"truncate text-xs text-muted-foreground",children:e("mobile.m5.appOpenBanner.body")})]}),t.jsx("button",{type:"button",onClick:p,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90",children:e("mobile.m5.appOpenBanner.open")}),t.jsx("button",{type:"button",onClick:m,"aria-label":e("mobile.m5.appOpenBanner.dismissAria"),className:"rounded-md p-1 text-muted-foreground hover:text-foreground",children:t.jsx(f,{className:"h-4 w-4","aria-hidden":!0})})]})})}export{y as A};
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.