PageSourceSearch

https://4cd.ru/build/assets/RepostCard-CvUhIbey.js

js 4cd.ru collected 2026-10-05 00:10:18 UTC 8,158 bytes, 1 lines download raw bytes

1import{j as N,o as s,f as o,a as t,k as w,c as i,w as c,b as $,u as g,n as j,t as a,y as _,q as B,i as C,g as n,F as S,d as y,e as M}from"./app-8CjosSoj.js";import{v as T}from"./moon-stars-linear-D0t8qcDK.js";import{i as z}from"./useDarkMode-CD12HP_q.js";import{_ as A}from"./Link-O9_VRuKw.js";const L={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F(e,l){return s(),o("svg",L,l[0]||(l[0]=[t("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M3.275 15.296C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296C4.972 6.5 7.818 4 12 4s7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704Z"}),t("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z"})],-1)]))}const we=N({name:"solar-eye-linear",render:F}),I={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function P(e,l){return s(),o("svg",I,l[0]||(l[0]=[t("path",{fill:"currentColor",d:"M117.18 188.74a12 12 0 0 1 0 17l-5.12 5.12A58.26 58.26 0 0 1 70.6 228a58.62 58.62 0 0 1-41.46-100.08l34.75-34.75a58.64 58.64 0 0 1 98.56 28.11a12 12 0 1 1-23.37 5.44a34.65 34.65 0 0 0-58.22-16.58l-34.75 34.75A34.62 34.62 0 0 0 70.57 204a34.4 34.4 0 0 0 24.49-10.14l5.11-5.12a12 12 0 0 1 17.01 0M226.83 45.17a58.65 58.65 0 0 0-82.93 0l-5.11 5.11a12 12 0 0 0 17 17l5.12-5.12a34.63 34.63 0 1 1 49 49l-34.81 34.7A34.4 34.4 0 0 1 150.61 156a34.63 34.63 0 0 1-33.69-26.72a12 12 0 0 0-23.38 5.44A58.64 58.64 0 0 0 150.56 180h.05a58.28 58.28 0 0 0 41.47-17.17l34.75-34.75a58.62 58.62 0 0 0 0-82.91"},null,-1)]))}const V=N({name:"ph-link-bold",render:P}),ve={__name:"CopyStoryLink",props:{story:String,iconSize:{type:String,default:"w-4 h-4"}},setup(e){const l=w().props.translations["Link copied!"],d=w().props.translations["Link not copied! Please use HTTPS secure connection!"],b=m=>route("story.show",{story:m}),x=m=>{window.isSecureContext&&navigator.clipboard?(navigator.clipboard.writeText(m),_.success(l,{theme:z.value?"dark":"light"})):_.warning(d,{theme:z.value?"dark":"light"})};return(m,f)=>{const r=T;return s(),i(r,{class:"flex items-center gap-1.5 cursor-pointer",onClick:f[0]||(f[0]=k=>x(b(e.story)))},{default:c(()=>[$(g(V),{class:j(e.iconSize)},null,8,["class"]),t("span",null,a(m.__("Copy link")),1)]),_:1})}}},D={class:"relative px-4 pt-2 sm:px-5"},O={class:"border rounded-xl dark:bg-deeper"},W={class:"block px-3 sm:px-5 pt-3 pb-2"},R={class:"flex items-start w-full gap-3"},U={class:"relative h-10"},Z=["src","alt"],q={key:1,src:"/images/default-avatar.png",class:"shrink-0 h-10 w-10 bg-muted base-transition rounded-full dark:bg-deeper dark:hover:shadow-lg dark:hover:shadow-primary/10",alt:"avatar",loading:"lazy"},E=["src","alt"],H={class:"flex flex-col"},G={class:"flex items-center gap-x-2"},J=["src","alt","title"],K={key:1,class:"text-sm font-medium text-foreground"},Q={class:"flex items-center gap-x-2"},X=["time"],Y={class:"relative px-3 sm:px-5 pt-1 pb-3"},ee={class:"text-foreground flex flex-col gap-1 break-all"},te={class:"text-lg sm:text-xl font-semibold block"},se={key:0},re={key:0,class:"w-full flex items-center justify-center relative my-2 rounded-xl border border-border"},oe={class:"w-full max-h-[600px] object-contain rounded-xl",controls:"",preload:"",muted:""},ae=["src"],le={key:1,class:"w-full block relative my-2 rounded-xl"},ne={class:"relative flex justify-center w-full overflow-hidden rounded-xl"},ie=["src"],de=["src","alt"],ue={key:2,class:"aspect-w-16 aspect-h-9 my-2"},ce=["src"],me={key:3,class:"absolute top-0 right-0 bg-[#0000001a] backdrop-blur-[100px] z-10 w-full h-full flex flex-col items-center justify-center"},he={class:"text-lg font-semibold drop-shadow text-white mb-4"},fe={class:"flex flex-col sm:flex-row gap-4 sm:items-center"},ye=["href"],pe={__name:"RepostCard",props:{story:Object},setup(e){var f;const l=e,d=w().props.auth.user,b=B(d.preference_settings==null?l.story.isNSFW:!!((f=l.story)!=null&&f.isNSFW&&d.preference_settings.blur_nsfw==!0)),x=C(()=>l.story.media_url.url!=null&&b.value===!0),m=C(()=>d.preference_settings==null?!1:!!d.preference_settings.open_posts_new_tab);return(r,k)=>{var v,p;const u=A;return s(),o("div",D,[t("div",O,[t("div",W,[t("div",R,[t("div",U,[e.story.user?(s(),i(u,{key:0,href:r.route("user.show",e.story.user),class:"shrink-0"},{default:c(()=>{var h;return[t("img",{src:e.story.user.avatar_url,class:"h-10 w-10 bg-muted base-transition rounded-full dark:hover:shadow-lg dark:hover:shadow-
1primary/10",alt:(h=e.story.user)==null?void 0:h.username,loading:"lazy"},null,8,Z)]}),_:1},8,["href"])):(s(),o("img",q)),e.story.community?(s(),i(u,{key:2,href:r.route("community.show",e.story.community.slug),class:"shrink-0 bg-deeper shadow absolute -bottom-0.5 -right-1.5 border border-transparent hover:border-primary base-transition rounded-full"},{default:c(()=>{var h;return[t("img",{src:e.story.community.avatar_url,class:"w-5 h-5 object-cover rounded-full",alt:(h=e.story.community)==null?void 0:h.name,loading:"lazy"},null,8,E)]}),_:1},8,["href"])):n("",!0)]),t("div",H,[t("div",G,[e.story.user?(s(),o(S,{key:0},[e.story.user.display_name?(s(),i(u,{key:0,href:r.route("user.show",e.story.user),class:"text-sm font-medium text-foreground hover:text-foreground/90"},{default:c(()=>[y(a(e.story.user.display_name),1)]),_:1},8,["href"])):(s(),i(u,{key:1,href:r.route("user.show",e.story.user),class:"text-sm font-medium text-foreground hover:text-foreground/90"},{default:c(()=>[y(a(e.story.user.username),1)]),_:1},8,["href"])),e.story.user.primary_badge?(s(),o("img",{key:2,src:e.story.user.primary_badge.image,alt:e.story.user.primary_badge.name,title:e.story.user.primary_badge.name,class:"h-4 w-4 shrink-0",loading:"lazy"},null,8,J)):n("",!0)],64)):(s(),o("div",K,a(r.__("Account deleted")),1))]),t("div",Q,[e.story.community?(s(),i(u,{key:0,href:r.route("community.show",e.story.community.slug),class:"text-xs font-medium text-foreground hover:text-foreground/90"},{default:c(()=>[y(a(e.story.community.name),1)]),_:1},8,["href"])):n("",!0),t("span",{class:"text-xs text-endpoint",time:(v=e.story.created_at)==null?void 0:v.datetime},a((p=e.story.created_at)==null?void 0:p.human),9,X)])])])]),t("div",Y,[t("div",ee,[t("div",te,a(e.story.title),1),e.story.first_paragraph?(s(),o("p",se,a(e.story.first_paragraph),1)):n("",!0),e.story.media_url?(s(),o(S,{key:1},[e.story.media_url.type==="video"?(s(),o("div",re,[t("video",oe,[t("source",{src:e.story.media_url.url},null,8,ae)])])):n("",!0),e.story.media_url.type==="image"?(s(),o("div",le,[t("div",ne,[t("img",{role:"presentation",src:e.story.media_url.url,class:"absolute left-0 top-0 w-full h-full blur-2xl",alt:"",loading:"lazy"},null,8,ie),t("img",{src:e.story.media_url.url,alt:e.story.title,class:"self-center max-h-[500px] z-0",loading:"lazy"},null,8,de)])])):n("",!0),e.story.media_url.type==="embed"?(s(),o("div",ue,[t("iframe",{src:e.story.media_url.url,class:"rounded-xl",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,ce)])):n("",!0),g(x)?(s(),o("div",me,[t("p",he,a(r.__("Sensitive content")),1),t("div",fe,[t("button",{onClick:k[0]||(k[0]=M(h=>b.value=!1,["prevent"])),class:"bg-background px-4 py-2 rounded-xl border border-border text-background-foreground font-semibold shadow-lg"},a(r.__("Show")),1),g(d)?(s(),i(u,{key:0,href:r.route("user.settings.show",g(d)),"preserve-scroll":"",class:"bg-background px-4 py-2 rounded-xl border border-border text-background-foreground font-semibold shadow-lg"},{default:c(()=>[y(a(r.__("Change settings")),1)]),_:1},8,["href"])):(s(),i(u,{key:1,href:r.route("login"),"preserve-scroll":"",class:"bg-background px-4 py-2 rounded-xl border border-border text-background-foreground font-semibold shadow-lg"},{default:c(()=>[y(a(r.__("Change settings")),1)]),_:1},8,["href"]))])])):n("",!0)],64)):n("",!0)]),g(m)?(s(),o("a",{key:0,href:r.route("story.show",e.story.slug),target:"_blank",class:"absolute inset-0","aria-label":"Open"},null,8,ye)):(s(),i(u,{key:1,href:r.route("story.show",e.story.slug),class:"absolute inset-0","aria-label":"Open"},null,8,["href"]))])])])}}};export{we as I,ve as _,pe 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.