PageSourceSearch

https://gramsales.com/build/assets/language-switcher-mAElB2IB.js

js gramsales.com collected 2026-10-02 01:30:59 UTC 2,040 bytes, 1 lines download raw bytes

1import{r as x,j as n,c as g}from"./app-BOjN0y3y.js";import{a as w}from"./index-BldILJ6A.js";function f(d){const e=g.c(5),{code:s,className:c}=d,l=c===void 0?"":c,o=`https://flagcdn.com/w40/${s}.png`,r=`https://flagcdn.com/w80/${s}.png 2x`,i=`inline-block h-4 w-5 rounded-sm object-cover ${l}`;let t;return e[0]!==s||e[1]!==o||e[2]!==r||e[3]!==i?(t=n.jsx("img",{src:o,srcSet:r,alt:s,className:i}),e[0]=s,e[1]=o,e[2]=r,e[3]=i,e[4]=t):t=e[4],t}function b({className:d=""}){const{locale:e,availableLocales:s,localeFlags:c}=w(),[l,o]=x.useState(!1),r=x.useRef(null);x.useEffect(()=>{function t(a){r.current&&!r.current.contains(a.target)&&o(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]);function i(t){if(t===e){o(!1);return}document.cookie=`locale=${t};path=/;max-age=${3600*24*365};samesite=lax`;const a=window.location.pathname,m=e!=="en"?`/${e}`:"",p=t!=="en"?`/${t}`:"";let u;m&&a.startsWith(m)?u=a.slice(m.length)||"/":u=a;const h=p+u;window.location.href=h||"/"}return n.jsxs("div",{ref:r,className:`relative ${d}`,children:[n.jsxs("button",{onClick:()=>o(!l),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-sm transition hover:bg-primary/10",children:[n.jsx(f,{code:c[e]}),n.jsx("span",{className:"hidden text-xs font-medium text-muted-foreground sm:inline",children:s[e]}),n.jsx("svg",{className:"h-3 w-3 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})]}),l&&n.jsx("div",{className:"absolute end-0 top-full z-50 mt-1 min-w-[140px] overflow-hidden rounded-lg border border-border bg-card py-1 shadow-lg",children:Object.entries(s).map(([t,a])=>n.jsxs("button",{onClick:()=>i(t),className:`flex w-full items-center gap-2.5 px-3 py-2 text-sm transition hover:bg-primary/10 ${t===e?"font-medium text-primary":"text-muted-foreground"}`,children:[n.jsx(f,{code:c[t]}),n.jsx("span",{children:a})]},t))})]})}export{b as L};

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.