import{r as s,j as i}from"./index-2SI3TtYZ.js";import{L as k,J as p,s as h,r as L}from"./LoginPage-yYkKaUvX.js";import{m as $}from"./moreIcon-hyogBtJh.js";const C=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("g",{opacity:.5},s.createElement("path",{d:"M14 6L6.00076 14",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round"}),s.createElement("path",{d:"M6 6L13.9992 14",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round"}))),y=e=>i.jsx("button",{id:e.id,className:"rg-button more",title:"Close",onClick:e.onClick,"aria-label":"close",children:i.jsx(C,{})}),M=e=>{if(e.link!==void 0)return i.jsx(k,{className:"back rg-button",to:e.link,"aria-label":"Link to the previous page",children:i.jsx(p,{})});{const t=()=>{e.onClick&&e.onClick()};return i.jsx("button",{className:"back rg-button",onClick:t,"aria-label":"back",children:i.jsx(p,{})})}};function B(e){const t=a=>typeof window<"u"?window.matchMedia(a).matches:!1,[n,o]=s.useState(t(e));function r(){o(t(e))}return s.useEffect(()=>{const a=window.matchMedia(e);return r(),a.addListener?a.addListener(r):a.addEventListener("change",r),()=>{a.removeListener?a.removeListener(r):a.removeEventListener("change",r)}},[e]),n}const N=()=>{const[e,t]=s.useState(!1);return s.useEffect(()=>{(async()=>await $()?t(!0):t(!1))()}),e},l=()=>"www.redgifs.com",E=()=>"i.redgifs.com",c=e=>{if(!navigator.clipboard){h({title:"Clipboard is not accessible.",variant:"error"});return}return navigator.clipboard.writeText(e).then(()=>{h({title:"Link copied!",variant:"success"})}).catch(()=>{h({title:"Can't copy link",variant:"error"})})},T=e=>`https://${l()}/users/${e}`,R=e=>c(T(e)),A=e=>`https://${l()}/niches/${e}`,j=e=>c(A(e)),d=(e,t)=>`https://${l()}${L.collection(e,t)}`,P=(e,t)=>c(d(e,t)),u=e=>`https://${l()}/watch/${e}`,m=e=>`https://${l()}/ifr/${e}`,F=({id:e,width:t,height:n})=>[``,`

via RedGIFs

`].join(""),U=({id:e,width:t,height:n})=>{const b=`position:relative; padding-bottom:${(100/(t/n)).toFixed(2)}%`,v="position:absolute; top:0; left:0;";return[`
`,``,"
",`

via RedGIFs

`].join("")},W=(e,t,n)=>`${n} collection`,f=e=>e.type!==1?`https://${E()}/i/${e.id}.jpg`:u(e.id),I=(e,t)=>{const n=e.userName??null,o=e.tags||[];return o.length>0&&n?`${o[0]} ${t} by ${n}`:o.length>0?`${o[0]} ${t}`:n?`A porn ${t} by ${n}`:"Please come up with a description..."},S=e=>e.type!==1?"image":"GIF",H=e=>{const t=f(e);return c(t)},g=e=>{window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}`,"_blank")},O=e=>{g(u(e))},D=(e,t)=>{g(d(e,t))},w=(e,t)=>{window.open(`https://www.reddit.com/submit?url=${encodeURIComponent(e)}&title=${t??""}`,"_blank")},Y=e=>{const t=S(e),n=I(e,t),o=f(e);w(o,n)},J=(e,t)=>{w(d(e,t))},Q=1,V=2,Z=[{label:"Latest",value:"recent"},{label:"Views",value:"best"},{label:"Trending",value:"trending"},{label:"Oldest",value:"oldest"}],z=[{value:"all",label:"All"},{value:"g",label:"GIFs"},{value:"i",label:"Images"},{value:"a",label:"Galleries"}],K=[{label:"25 per page",value:"25"},{label:"50 per page",value:"50"},{label:"100 per page",value:"100"}],X=[{label:"All",value:null},{label:"Private",value:"0"},{label:"Public",value:"1"}],q={name:"/name",description:"/description",profile_url:"/profile_url",email:"/email",password:"/password",preferences:"/preferences",social:"/social"},ee=e=>s.createElement("svg",{width:10,height:18,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M9 1L5.47406 3.79569C2.66219 6.0252 1.25626 7.13996 1.03978 8.49867C0.98674 8.83157 0.98674 9.16843 1.03978 9.50133C1.25626 10.86 2.66219 11.9748 5.47406 14.2043L9 17",stroke:"white",strokeWidth:1.5,strokeLinecap:"round"}));export{M as B,y as C,Z as M,q as P,ee as S,Q as T,R as a,B as b,j as c,c as d,P as e,D as f,W as g,F as h,U as i,H as j,Y as k,O as l,C as m,V as n,X as o,K as p,z as q,J as s,N as u}; //# sourceMappingURL=arrowLeftAdornment-jpxA6Zr3.js.map