PageSourceSearch

https://movieloci.com/_next/static/chunks/4536.f6e5514fad468f48.js

js movieloci.com collected 2026-10-02 05:12:48 UTC 52,745 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4536],{1433:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(5155);let n=(0,a(7909).default)(()=>Promise.all([a.e(122),a.e(5600),a.e(8399),a.e(6988)]).then(a.bind(a,6988)),{loadableGenerated:{webpack:()=>[6988]},ssr:!1,loading:()=>(0,r.jsx)("div",{className:"flex h-[300px] w-full items-center justify-center rounded-md border border-gray-200 bg-gray-50 text-sm text-gray-400","aria-label":"Nač\xedt\xe1n\xed mapy…",children:"Nač\xedt\xe1n\xed mapy…"})})},3741:(e,t,a)=>{a.d(t,{default:()=>d});var r=a(5155),n=a(2115),s=a(63),l=a(8955),i=a(926);let o=(0,i.createServerReference)("601929c899602a91182bd80e9285316b49a94b74d9",i.callServer,void 0,i.findSourceMapURL,"moderateCommentAction");var c=a(9436);function d(e){let{commentId:t,status:a,onSuccess:i}=e,d=(0,l.c)("Moderation"),u=(0,l.c)("Comments"),x=(0,s.useRouter)(),[p,h]=(0,n.useTransition)(),[m,g]=(0,n.useState)(null),b="inline-flex cursor-pointer items-center justify-center gap-1 rounded-md border border-red-300 bg-white px-2.5 py-1 text-[11px] font-semibold text-red-700 transition hover:border-red-500 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50";function f(){confirm(u("confirmDelete"))&&(g(null),h(async()=>{(await (0,c.J)(t)).ok?i?i():x.refresh():g(u("deleteError"))}))}function y(e){g(null),h(async()=>{let a=await o(t,e);if(a.ok)i?i():x.refresh();else{var r,n;g(null!=(n=null!=(r=a.detail)?r:a.error)?n:"unknown")}})}return(0,r.jsxs)("div",{className:"flex flex-col items-stretch gap-1",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:"PENDING"===a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>y("approve"),disabled:p,className:"inline-flex cursor-pointer items-center justify-center gap-1 rounded-md border border-accent bg-accent px-2.5 py-1 text-[11px] font-semibold text-gray-900 transition hover:bg-accent-dark disabled:cursor-not-allowed disabled:opacity-50",children:[(0,r.jsx)("span",{children:"✓"}),d(p?"working":"approveLabel")]}),(0,r.jsxs)("button",{type:"button",onClick:()=>y("reject"),disabled:p,className:"inline-flex cursor-pointer items-center justify-center gap-1 rounded-md border border-red-500 bg-red-500 px-2.5 py-1 text-[11px] font-semibold text-white transition hover:bg-red-600 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,r.jsx)("span",{children:"✗"}),d(p?"working":"rejectLabel")]}),(0,r.jsxs)("button",{type:"button",onClick:f,disabled:p,className:b,title:u("delete"),children:["\uD83D\uDDD1 ",u("delete")]})]}):"APPROVED"===a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"rounded-md border border-accent bg-accent/20 px-2 py-0.5 text-[11px] font-semibold text-gray-800",children:["✓ ",d("statusApproved")]}),(0,r.jsxs)("button",{type:"button",onClick:()=>y("reject"),disabled:p,className:"inline-flex cursor-pointer items-center justify-center gap-1 rounded-md border border-red-300 bg-white px-2.5 py-1 text-[11px] font-semibold text-red-700 transition hover:border-red-500 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50",children:["✗ ",d("rejectLabel")]}),(0,r.jsxs)("button",{type:"button",onClick:f,disabled:p,className:b,title:u("delete"),children:["\uD83D\uDDD1 ",u("delete")]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"rounded-md border border-red-300 bg-red-50 px-2 py-0.5 text-[11px] font-semibold text-red-700",children:["✗ ",d("statusRejected")]}),(0,r.jsxs)("button",{type:"button",onClick:()=>y("approve"),disabled:p,className:"inline-flex cursor-pointer items-center justify-center gap-1 rounded-md border border-accent bg-accent/10 px-2.5 py-1 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-50",children:["✓ ",d("approveLabel")]}),(0,r.jsxs)("button",{type:"button",onClick:f,disabled:p,className:b,title:u("delete"),children:["\uD83D\uDDD1 ",u("delete")]})]})}),m&&(0,r.jsx)("p",{className:"text-[11px] text-red-600",children:m})]})}},4536:(e,t,a)=>{a.r(t),a.d(t,{default:()=>eg});var r=a(5155),n=a(2115),s=a(7650),l=a(2619),i=a.n(l),o=a(8070),c=a(3185);let d=(0,c.A)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]),u=(0,c.A)("square-split-horizontal",[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2
1-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);var x=a(4788),p=a(3410),h=a(1395),m=a(3692),g=a(7244),b=a(8129),f=a(7230),y=a(2717),j=a(1475);let v=(0,c.A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),N=(0,c.A)("calendar-plus",[["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5",key:"1glfrc"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}]]),w=(0,c.A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),k=(0,c.A)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);var S=a(6681),A=a(6809),C=a(8955),D=a(2185),L=a(2237),R=a(7283),I=a(592),P=a(6321),M=a(8347),E=a(9148),U=a(8172),T=a(3741),F=a(9337),H=a(8687);function z(e){let t=(0,H.F)(e).replace(/\s+/g," ").trim();return t.length>120?t.slice(0,120)+"…":t}function V(e){var t,a,s,l,o,c,d;let{snapshotId:u,locale:x}=e,p=(0,C.c)("Comments"),{data:h}=(0,M.wV)(),[m,g]=(0,n.useState)(null),[b,f]=(0,n.useState)(!1),[y,j]=(0,n.useState)(!1),[v,N]=(0,n.useState)(""),[w,k]=(0,n.useState)(null),[S,A]=(0,n.use
1State)(!1),[L,R]=(0,n.useState)(null),I=x.toUpperCase(),P=!!(null==h||null==(t=h.user)?void 0:t.id),V=(0,H.F)(v).length;async function O(){let e=await fetch("/api/snapshots/".concat(u,"/comments?lang=").concat(I));if(e.ok){var t;let a=await e.json();g(null!=(t=a.comments)?t:[]),f(!!a.canDelete),j(!!a.canModerate)}}async function _(e){if(e.preventDefault(),k(null),V<3)return void k(p("tooShort"));A(!0);let t=await (0,E.G)({targetType:"SNAPSHOT",targetId:u,text:v,parentId:L});if(A(!1),t.error)return void k(p(t.error));N(""),R(null),await O()}(0,n.useEffect)(()=>{O()},[u,I]);let B=new Map((null!=m?m:[]).map(e=>[e.id,e])),Z=L&&null!=(l=B.get(L))?l:null,q=Z?null!=(d=null!=(c=null!=(o=null==(a=Z.author)?void 0:a.login)?o:null==(s=Z.author)?void 0:s.name)?c:Z.guestName)?d:"Anonym":null;return(0,r.jsxs)("div",{className:"border-t border-gray-100 bg-gray-50 p-6",children:[(0,r.jsxs)("h3",{className:"mb-3 text-base font-semibold text-gray-900",children:[p("commentsTitle")," ",m&&(0,r.jsxs)("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),P?(0,r.jsxs)("form",{onSubmit:_,className:"mb-4 space-y-2",children:[Z&&(0,r.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-accent/40 bg-accent/10 px-3 py-2 text-[11px]",children:[(0,r.jsxs)("span",{className:"shrink-0 font-semibold text-gray-700",children:["↩ ",p("replyingTo",{name:null!=q?q:"?"}),":"]}),(0,r.jsx)("span",{className:"line-clamp-2 italic text-gray-600",children:z(Z.text)}),(0,r.jsx)("button",{type:"button",onClick:()=>R(null),className:"ml-auto shrink-0 text-gray-500 hover:text-red-600",title:p("cancelReply"),"aria-label":p("cancelReply"),children:"✕"})]}),(0,r.jsx)(F.default,{value:v,onChange:N,rows:2,headings:!1,preview:!1,placeholder:L?p("placeholderReply"):p("placeholder"),ariaLabel:L?p("placeholderReply"):p("placeholder")}),w&&(0,r.jsx)("p",{className:"rounded-md bg-red-50 px-3 py-2 text-xs text-red-700",children:w}),(0,r.jsx)("button",{type:"submit",disabled:S||V<3,className:"cursor-pointer rounded-md bg-accent px-4 py-1.5 text-sm font-semibold text-white shadow-sm transition hover:bg-accent-dark disabled:cursor-not-allowed disabled:opacity-50",children:S?"...":L?p("submitReply"):p("submit")})]}):(0,r.jsxs)("div",{className:"mb-4 rounded-md bg-white px-3 py-2 text-center text-xs text-gray-600",children:[p("signInToComment")," ",(0,r.jsx)(i(),{href:"/auth/signin",className:"font-semibold text-accent-dark hover:underline",children:p("signInLink")})]}),null===m?(0,r.jsx)("p",{className:"text-center text-xs text-gray-400",children:"..."}):0===m.length?(0,r.jsx)("p",{className:"text-center text-xs text-gray-400",children:p("noComments")}):(0,r.jsx)("div",{className:"space-y-3",children:m.map(e=>{var t,a,n,s,l,o,c;let d=null!=(o=null!=(l=null!=(s=null==(t=e.author)?void 0:t.login)?s:null==(a=e.author)?void 0:a.name)?l:e.guestName)?o:"Anonym",u=d.charAt(0).toUpperCase(),h="PENDING"===e.audit,m="REJECTED"===e.audit;return(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("div",{className:"shrink-0",children:(null==(n=e.author)?void 0:n.avatarImage)?(0,r.jsx)(i(),{href:"/uzivatel/".concat(e.author.id),children:(0,r.jsx)("img",{src:(0,D.V)(e.author.avatarImage,{variant:"thumb"}),alt:d,className:"h-8 w-8 rounded-full object-cover"})}):e.author?(0,r.jsx)(i(),{href:"/uzivatel/".concat(e.author.id),className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent text-xs font-bold text-gray-900",children:u}):(0,r.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-gray-200 text-xs font-bold text-gray-500",children:u})}),(0,r.jsxs)("div",{className:["relative flex-1 rounded-md bg-white p-2",h?"border-2 border-orange-400 pr-24":m?"border-2 border-red-500 pr-24":""].join(" "),children:[(h||m)&&(0,r.jsxs)("span",{className:["pointer-events-none absolute right-1.5 top-1.5 inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-white shadow",m?"bg-red-600":"bg-orange-500"].join(" "),children:["⏳ ",p(m?"rejectedBadge":"pendingBadge")]}),(0,r.jsxs)("div",{className:"mb-0.5 flex items-baseline gap-2 text-[11px]",children:[e.author?(0,r.jsx)(i(),{href:"/uzivatel/".concat(e.author.id),className:"font-semibold text-gray-800 hover:text-accent-dark",children:d}):(0,r.jsx)("span",{className:"font-semibold text-gray-500",children:d}),(0,r.jsx)("span",{className:"text-gray-400",children:(c=e.createdAt,new Intl.DateTimeFormat("cs"===x?"cs-CZ":"fr"===x?"fr-FR":"en-US",{day:"numeric",month:"short",year:"numeric"}).format(new Date(c)))}),b&&(0,r.jsx)("span",{className:"ml-auto",children:(0,r.jsx)(U.default,{commentId:e.id,onDeleted:()=>O()})})]}),e.parentId&&(()=>{var t,a,n,s,l;let i=B.get(e.parentId),o=i?null!=(l=null!=(s=null!=(n=null==(t=i.author)?void 0:t.login)?n:null==(a=i.author)?void 0:a.name)?s:i.guestName)?l:"Anonym":p("deletedComment"),c=i?z(i.text):p("deletedComment");return(0,r.jsxs)("div",{className:"mb-1 flex items-start gap-1 rounded border-l-2 border-accent/40 bg-gray-50 px-2 py-1 text-[10px] text-gray-600",children:[(0,r.jsxs)("span",{className:"shrink-0 font-semibold text-gray-700",children:["↩ ",p("replyTo",{name:o}),":"]}),(0,r.jsx)("span",{className:"line-clamp-1 italic",children:c})]})})(),(0,r.jsx)("div",{className:"prose prose-sm max-w-none text-xs text-gray-700 [&_a]:text-accent-dark [&_a]:underline ".concat(y&&(h||m)?"comment-reveal-links":""),dangerouslySetInnerHTML:{__html:e.text}}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[P&&(0,r.jsxs)("button",{type:"button",onClick:()=>R(e.id),className:"text-[10px] font-semibold text-accent-dark hover:underline",children:["↩ ",p("reply")]}),y&&e.audit&&(0,r.jsx)("span",{className:"ml-auto",children:(0,r.jsx)(T.default,{commentId:e.id,status:e.audit,onSuccess:()=>O()})})]})]})]},e.id)})})]})}var O=a(63),_=a(1433),B=a(6293),Z=a(5492),q=a(926);let G=(0,q.createServerReference)("40322789b1358fc98068ec85bc0ffa02fa4a91080f",q.callServer,void 0,q.findSourceMapURL,"addLocationToSnapshotAction"),J=(0,q.createServerReference)("40052ad7d41491009b39e9bf780ac8b78b04887f4e",q.callServer,void 0,q.findSourceMapURL,"addPhotoToSnapshotAction");function W(e){let{snapshotId:t,locale:a,onClose:s,onSuccess:l,canModerate:i=!1}=e,o=(0,C.c)("SnapshotAddons"),c=(0,O.useRouter)(),[d,u]=(0,n.use
1State)(null),[x,p]=(0,n.useState)(null),[h,m]=(0,n.useState)(null),[g,b]=(0,n.useTransition)(),[f,y]=(0,n.useState)(!1),[j,v]=(0,n.useState)(null),[N,w]=(0,n.useState)(null),[k,S]=(0,n.useState)(""),[A,D]=(0,n.useState)(!1);return(0,n.useEffect)(()=>()=>{N&&URL.revokeObjectURL(N)},[N]),(0,r.jsxs)("form",{onSubmit:function(e){if(e.preventDefault(),p(null),m(null),!d)return void p(o("locationRequired"));if(f&&!j)return void p(o("photoRequired"));let a=new FormData;a.set("snapshotId",String(t)),a.set("locationAddress",d.address),a.set("locationLat",String(d.lat)),a.set("locationLng",String(d.lng)),d.countryCode&&a.set("locationCountryCode",d.countryCode),null!=d.existingId&&a.set("locationExistingId",String(d.existingId)),b(async()=>{try{var e,r,n,i,d,u;let x=await G(a);if(!x.ok)return void p(null!=(r=null!=(e=x.detail)?e:x.error)?r:"unknown");let h=null;if(f&&j){let e=new FormData;if(e.set("snapshotId",String(t)),e.set("photo",await (0,Z.j)(j)),k.trim().length>0&&e.set("shotAt",k),!(h=await J(e)).ok){p(/image_too_large|pixel limit/i.test(null!=(i=null!=(n=h.detail)?n:h.error)?i:"")?o("imageTooLarge"):"shotAtInvalid"===h.error?o("shotAtInvalid"):null!=(u=null!=(d=h.detail)?d:h.error)?u:"unknown"),c.refresh();return}}if(f&&A&&(null==h?void 0:h.photoId))return void c.push("/upravit-fotografii/".concat(h.photoId,"/zarovnat"));m(x.pending?o("savedPending"):o("saved")),c.refresh(),null==l||l(),setTimeout(()=>s(),1200)}catch(e){p(o("uploadFailedReupload"))}})},className:"rounded-md border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h4",{className:"mb-3 text-sm font-bold text-gray-900",children:o("addLocationHeading")}),(0,r.jsx)(_.A,{value:d,onChange:u,locale:a,canModerate:i}),(0,r.jsxs)("label",{className:"mt-3 flex cursor-pointer items-start gap-2 rounded-md border border-gray-200 bg-gray-50/60 p-2 text-xs text-gray-700",children:[(0,r.jsx)("input",{type:"checkbox",checked:f,onChange:e=>y(e.target.checked),className:"mt-0.5 h-4 w-4 accent-accent"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:o("alsoHavePhoto")}),(0,r.jsx)("span",{className:"block text-[11px] text-gray-500",children:o("alsoHavePhotoHint")})]})]}),f&&(0,r.jsxs)("div",{className:"mt-3 space-y-3 rounded-md border border-gray-200 bg-gray-50/40 p-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-semibold text-gray-700",children:o("photo")}),(0,r.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{var t,a,r;return r=null!=(a=null==(t=e.target.files)?void 0:t[0])?a:null,void(N&&URL.revokeObjectURL(N),v(r),w(r?URL.createObjectURL(r):null),r&&(0,B.b)(r).then(e=>e&&S(t=>t||e)))},className:"block w-full text-xs text-gray-600 file:mr-3 file:cursor-pointer file:rounded-md file:border-0 file:bg-accent file:px-3 file:py-1.5 file:text-xs file:font-semibold file:text-gray-900 hover:file:bg-accent-dark"}),N&&(0,r.jsx)("img",{src:N,alt:"",className:"mt-2 max-h-48 rounded-md border border-gray-200 object-contain"}),(0,r.jsx)("p",{className:"mt-1 text-[11px] text-gray-500",children:o("photoHint")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-semibold text-gray-700",children:o("shotAt")}),(0,r.jsx)("input",{type:"date",value:k,onChange:e=>S(e.target.value),className:"w-44 rounded-md border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-accent focus:ring-1 focus:ring-accent"}),(0,r.jsx)("p",{className:"mt-1 text-[11px] text-gray-500",children:o("shotAtHint")})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-2 rounded-md border border-gray-200 bg-white p-2 text-xs text-gray-700",children:[(0,r.jsx)("input",{type:"checkbox",checked:A,onChange:e=>D(e.target.checked),className:"mt-0.5 h-4 w-4 accent-accent"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:o("openAlignEditor")}),(0,r.jsx)("span",{className:"block text-[11px] text-gray-500",children:o("openAlignEditorHint")})]})]})]}),x&&(0,r.jsx)("p",{className:"mt-2 rounded-md bg-red-50 px-3 py-2 text-xs text-red-700",children:x}),h&&(0,r.jsxs)("p",{className:"mt-2 rounded-md bg-accent/20 px-3 py-2 text-xs text-gray-800",children:["✓ ",h]}),(0,r.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:s,className:"cursor-pointer rounded-md border border-gray-200 bg-white px-4 py-1.5 text-xs font-semibold text-gray-700 hover:border-gray-400",children:o("cancel")}),(0,r.jsx)("button",{type:"submit",disabled:g||!d,className:"cursor-pointer rounded-md bg-accent px-4 py-1.5 text-xs font-semibold text-gray-900 hover:bg-accent-dark disabled:cursor-not-allowed disabled:opacity-50",children:g?o("saving"):o("save")})]})]})}function $(e){let{snapshotId:t,onClose:a,onSuccess:s}=e,l=(0,C.c)("SnapshotAddons"),i=(0,O.useRouter)(),[o,c]=(0,n.use
1State)(null),[d,u]=(0,n.useState)(null),[x,p]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[g,b]=(0,n.useState)(!1),[f,y]=(0,n.useState)(null),[j,v]=(0,n.useState)(null),[N,w]=(0,n.useTransition)(),k=(0,n.useRef)(null);return(0,n.useEffect)(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),(0,r.jsxs)("form",{onSubmit:function(e){if(e.preventDefault(),y(null),v(null),!o)return void y(l("photoRequired"));w(async()=>{try{let d=await (0,Z.j)(o),u=new FormData;u.set("snapshotId",String(t)),u.set("photo",d),x.trim().length>0&&u.set("shotAt",x),h.trim().length>0&&u.set("photoDescription",h);let p=await J(u);if(p.ok){if(g&&p.photoId)return void i.push("/upravit-fotografii/".concat(p.photoId,"/zarovnat"));v(p.pending?l("savedPending"):l("saved")),i.refresh(),null==s||s(),setTimeout(()=>a(),1200)}else{var e,r,n,c;y(/image_too_large|pixel limit/i.test(null!=(r=null!=(e=p.detail)?e:p.error)?r:"")?l("imageTooLarge"):"shotAtInvalid"===p.error?l("shotAtInvalid"):null!=(c=null!=(n=p.detail)?n:p.error)?c:"unknown")}}catch(e){y(l("uploadFailedReupload"))}})},className:"rounded-md border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h4",{className:"mb-3 text-sm font-bold text-gray-900",children:l("addPhotoHeading")}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-semibold text-gray-700",children:l("photo")}),(0,r.jsx)("input",{ref:k,type:"file",accept:"image/*",onChange:e=>{var t,a,r;return r=null!=(a=null==(t=e.target.files)?void 0:t[0])?a:null,void(d&&URL.revokeObjectURL(d),c(r),u(r?URL.createObjectURL(r):null),r&&(0,B.b)(r).then(e=>e&&p(t=>t||e)))},className:"block w-full text-xs text-gray-600 file:mr-3 file:cursor-pointer file:rounded-md file:border-0 file:bg-accent file:px-3 file:py-1.5 file:text-xs file:font-semibold file:text-gray-900 hover:file:bg-accent-dark"}),d&&(0,r.jsx)("img",{src:d,alt:"",className:"mt-2 max-h-48 rounded-md border border-gray-200 object-contain"}),(0,r.jsx)("p",{className:"mt-1 text-[11px] text-gray-500",children:l("photoHint")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-semibold text-gray-700",children:l("photoDescription")}),(0,r.jsx)("textarea",{value:h,onChange:e=>m(e.target.value),rows:3,maxLength:5e3,className:"w-full rounded-md border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-accent focus:ring-1 focus:ring-accent"}),(0,r.jsx)("p",{className:"mt-1 text-[11px] text-gray-500",children:l("photoDescriptionHint")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-semibold text-gray-700",children:l("shotAt")}),(0,r.jsx)("input",{type:"date",value:x,onChange:e=>p(e.target.value),className:"w-44 rounded-md border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-accent focus:ring-1 focus:ring-accent"}),(0,r.jsx)("p",{className:"mt-1 text-[11px] text-gray-500",children:l("shotAtHint")})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-2 rounded-md border border-gray-200 bg-gray-50/60 p-2 text-xs text-gray-700",children:[(0,r.jsx)("input",{type:"checkbox",checked:g,onChange:e=>b(e.target.checked),className:"mt-0.5 h-4 w-4 accent-accent"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:l("openAlignEditor")}),(0,r.jsx)("span",{className:"block text-[11px] text-gray-500",children:l("openAlignEditorHint")})]})]})]}),f&&(0,r.jsx)("p",{className:"mt-3 rounded-md bg-red-50 px-3 py-2 text-xs text-red-700",children:f}),j&&(0,r.jsxs)("p",{className:"mt-3 rounded-md bg-accent/20 px-3 py-2 text-xs text-gray-800",children:["✓ ",j]}),(0,r.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:a,className:"cursor-pointer rounded-md border border-gray-200 bg-white px-4 py-1.5 text-xs font-semibold text-gray-700 hover:border-gray-400",children:l("cancel")}),(0,r.jsx)("button",{type:"submit",disabled:N||!o,className:"cursor-pointer rounded-md bg-accent px-4 py-1.5 text-xs font-semibold text-gray-900 hover:bg-accent-dark disabled:cursor-not-allowed disabled:opacity-50",children:N?l("saving"):l("save")})]})]})}var K=a(9409);function Y(e){var t;let{snapshotId:a,locale:s,hasLocation:l,initialAddon:i=null,canModerateSnapshot:o=!1,searchAnnounced:c=!1,canAnnounceSearch:d=!1}=e,u=(0,C.c)("SnapshotAddons"),{data:x}
1=(0,M.wV)(),[p,h]=(0,n.useState)(i&&("location"!==i||!l)?i:null),m=(0,n.useRef)(null);return((0,n.useEffect)(()=>{i&&requestAnimationFrame(()=>{var e;null==(e=m.current)||e.scrollIntoView({behavior:"smooth",block:"start"})})},[i]),null==x||null==(t=x.user)?void 0:t.id)?(0,r.jsxs)("div",{ref:m,className:"bg-gray-50/60 px-6 pb-6",children:[null===p&&(0,r.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[!l&&(0,r.jsxs)("button",{type:"button",onClick:()=>h("location"),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)("span",{children:"\uD83D\uDCCD"}),u("knowLocation")]}),(0,r.jsxs)("button",{type:"button",onClick:()=>h("photo"),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)("span",{children:"\uD83D\uDCF8"}),u("havePhoto")]}),(o||d)&&!l&&(0,r.jsx)(K.A,{snapshotId:a,initiallyAnnounced:c,variant:"compact"})]}),"location"===p&&(0,r.jsx)(W,{snapshotId:a,locale:s,onClose:()=>h(null),canModerate:o}),"photo"===p&&(0,r.jsx)($,{snapshotId:a,onClose:()=>h(null)})]}):null}let Q=(0,q.createServerReference)("40f95bcfaa985cc9a31c5702f3050152f57fff4168",q.callServer,void 0,q.findSourceMapURL,"getSnapshotAuditHistory");function X(e){let{snapshotId:t,locale:a}=e,s=(0,C.c)("Moderation"),[l,i]=(0,n.useState)(null),[o,c]=(0,n.useState)(!0),[d,u]=(0,n.use
1State)(!1),[x,p]=(0,n.useState)(null);if((0,n.useEffect)(()=>{c(!0),u(!1),p(null),Q(t).then(e=>{if("noPermission"===e.error||"notAuthenticated"===e.error)u(!0),i(null);else{var t;i(null!=(t=e.entries)?t:[])}c(!1)}).catch(e=>{console.error("getSnapshotAuditHistory failed:",e),p(e instanceof Error?e.message:String(e)),i([]),c(!1)})},[t]),d)return null;let h=new Intl.DateTimeFormat("cs"===a?"cs-CZ":"fr"===a?"fr-FR":"en-US",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"});return(0,r.jsxs)("section",{className:"mt-6 rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,r.jsx)("h3",{className:"mb-3 text-sm font-semibold text-gray-700",children:s("auditHistoryTitle")}),o&&(0,r.jsx)("p",{className:"text-xs text-gray-500",children:s("working")}),x&&(0,r.jsx)("p",{className:"rounded bg-red-50 px-2 py-1 text-[11px] text-red-700",children:x}),!o&&l&&0===l.length&&(0,r.jsx)("p",{className:"text-xs text-gray-500",children:s("auditHistoryEmpty")}),!o&&l&&l.length>0&&(0,r.jsx)("ul",{className:"space-y-2",children:l.map(e=>{var t,a;let n=null!=(a=null!=(t=e.moderator.login)?t:e.moderator.name)?a:"user".concat(e.moderator.id),s="APPROVED"===e.decision;return(0,r.jsxs)("li",{className:["rounded border-l-4 bg-white p-2 text-xs",s?"border-l-accent":"border-l-red-500"].join(" "),children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-1.5 text-gray-700",children:[(0,r.jsx)("span",{className:["inline-flex h-4 w-4 items-center justify-center rounded-full text-[10px] font-bold",s?"bg-accent text-gray-900":"bg-red-500 text-white"].join(" "),"aria-hidden":!0,children:s?"✓":"✕"}),(0,r.jsx)("span",{className:"font-semibold",children:n}),(0,r.jsxs)("span",{className:"text-gray-500",children:["\xb7 ",function(e){switch(e){case"SNAPSHOT":return"Z\xe1běr";case"PHOTO":return"Fotografie";case"LOCATION":return"Adresa";default:return e}}(e.entityType)]}),(0,r.jsxs)("span",{className:"text-gray-400",children:["\xb7 ",h.format(new Date(e.createdAt))]})]}),e.text&&(0,r.jsxs)("blockquote",{className:"mt-1 whitespace-pre-line text-[12px] leading-relaxed text-gray-800",children:["„",e.text,'"']})]},"".concat(e.source,"-").concat(e.id))})})]})}let ee=(0,q.createServerReference)("60a44b5f7fc32965d801275bdbb4d239321c616030",q.callServer,void 0,q.findSourceMapURL,"setDefaultPhotoAction");function et(e){let{photoId:t,isDefault:a,onSuccess:s}=e,l=(0,C.c)("PhotoAdmin"),i=(0,O.useRouter)(),[o,c]=(0,n.useTransition)(),[d,u]=(0,n.use
1State)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:function(){u(null),c(async()=>{let e=await ee(t,a);if(e.ok)null==s||s(),i.refresh();else{var r,n;u(null!=(n=null!=(r=e.detail)?r:e.error)?n:"unknown")}})},disabled:o,"aria-pressed":a,title:a?l("unsetPrimaryHint"):void 0,className:a?"inline-flex cursor-pointer items-center gap-1 rounded bg-accent/30 px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide text-gray-800 transition hover:bg-accent/60 disabled:cursor-not-allowed disabled:opacity-50":"inline-flex cursor-pointer items-center gap-1 rounded border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,r.jsx)("span",{children:"★"}),l(o?"working":a?"isPrimary":"setPrimary")]}),d&&(0,r.jsx)("span",{className:"ml-1 text-[11px] text-red-700",children:d})]})}var ea=a(9157);function er(e){let{photoId:t,onSuccess:a}=e,s=(0,C.c)("PhotoAdmin"),l=(0,O.useRouter)(),[i,o]=(0,n.useTransition)(),[c,d]=(0,n.useState)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:function(){confirm(s("confirmDelete"))&&(d(null),o(async()=>{let e=await (0,ea.G)(t);if(e.ok)null==a||a(),l.refresh();else{var r,n;d(null!=(n=null!=(r=e.detail)?r:e.error)?n:"unknown")}}))},disabled:i,className:"inline-flex cursor-pointer items-center gap-1 rounded border border-red-300 bg-white px-2 py-0.5 text-[11px] font-semibold text-red-700 transition hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50",title:s("delete"),children:[(0,r.jsx)("span",{children:"\uD83D\uDDD1"}),i?s("working"):s("delete")]}),c&&(0,r.jsx)("span",{className:"ml-1 text-[11px] text-red-700",children:c})]})}let en=(0,q.createServerReference)("7046d9a5daf52fcdbcd51498386860bca35f3ed006",q.callServer,void 0,q.findSourceMapURL,"moderatePhotoAction");var es=a(412);function el(e){let{photoId:t,status:a,className:s="",onSuccess:l}=e,i=(0,C.c)("Moderation"),o=(0,O.useRouter)(),[c,d]=(0,n.useTransition)(),[u,x]=(0,n.useState)(null),p="inline-flex cursor-pointer items-center rounded-md border border-accent bg-accent px-2 py-0.5 text-[11px] font-semibold text-gray-900 transition hover:bg-accent-dark disabled:cursor-not-allowed disabled:opacity-50",h="inline-flex cursor-pointer items-center rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-50",m="inline-flex cursor-pointer items-center rounded-md border border-red-300 bg-white px-2 py-0.5 text-[11px] font-semibold text-red-700 transition hover:border-red-500 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50",g=()=>{null==l||l(),o.refresh()};function b(e){x(null),d(async()=>{var a,r;let n=await en(t,e);n.ok?g():x(null!=(r=null!=(a=n.detail)?a:n.error)?r:"unknown")})}return(0,r.jsxs)("span",{className:"inline-flex flex-col items-stretch gap-1 ".concat(s),children:[(0,r.jsx)("span",{className:"inline-flex flex-wrap items-center gap-1",children:"PENDING"===a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>b("approve"),disabled:c,className:p,children:c?i("working"):i("approveLabel")}),(0,r.jsx)(es.A,{decision:"approve",action:e=>en(t,"approve",e),onSuccess:g,entityHint:"fotce",trigger:(e,t)=>(0,r.jsxs)("button",{type:"button",onClick:e,disabled:t||c,className:h,children:["\uD83D\uDCAC ",i("approveWithMessage")]})}),(0,r.jsx)("button",{type:"button",onClick:()=>b("reject"),disabled:c,className:"inline-flex cursor-pointer items-center rounded-md border border-red-500 bg-red-500 px-2 py-0.5 text-[11px] font-semibold text-white transition hover:bg-red-600 disabled:cursor-not-allowed disabled:opacity-50",children:c?i("working"):i("rejectLabel")}),(0,r.jsx)(es.A,{decision:"reject",action:e=>en(t,"reject",e),onSuccess:g,entityHint:"fotce",trigger:(e,t)=>(0,r.jsxs)("button",{type:"button",onClick:e,disabled:t||c,className:m,children:["\uD83D\uDCAC ",i("rejectWithMessage")]})})]}):"APPROVED"===a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>
1b("reject"),disabled:c,className:m,children:c?i("working"):i("deactivate")}),(0,r.jsx)(es.A,{decision:"reject",action:e=>en(t,"reject",e),onSuccess:g,entityHint:"fotce",trigger:(e,t)=>(0,r.jsxs)("button",{type:"button",onClick:e,disabled:t||c,className:m,children:["\uD83D\uDCAC ",i("deactivateWithMessage")]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>b("approve"),disabled:c,className:p,children:c?i("working"):i("activate")}),(0,r.jsx)(es.A,{decision:"approve",action:e=>en(t,"approve",e),onSuccess:g,entityHint:"fotce",trigger:(e,t)=>(0,r.jsxs)("button",{type:"button",onClick:e,disabled:t||c,className:h,children:["\uD83D\uDCAC ",i("activateWithMessage")]})})]})}),u&&(0,r.jsx)("span",{className:"rounded bg-red-50 px-1.5 py-0.5 text-[10px] text-red-700",children:u})]})}var ei=a(4940),eo=a(6265),ec=a(8724),ed=a(2735),eu=a(5617),ex=a(5205),ep=a(7553);function eh(){if("undefined"==typeof document)return null;let e=document.cookie.match(/(?:^|;\s*)snapshotCompareView=(slider|side)/);return e?e[1]:null}function em(e){document.cookie="".concat("snapshotCompareView","=").concat(e,";path=/;max-age=31536000;samesite=lax")}function eg(e){var t,a;let{open:l,onClose:c,id:M,name:E,description:U,time:T,locationName:F,locationId:H,locationAudit:z,countryName:O,lat:_,lng:B,frameImage:Z,photoImage:q,photoDescription:G,allPhotos:J=[],author:W,discoverer:$,actors:K=[],scrollToComments:Q=!1,initialAddon:ee=null,editHref:ea,canSetDefaultPhoto:en=!1,snapshotAuditStatus:es,canModerateSnapshot:eg=!1,searchAnnounced:eb=!1,canAnnounceSearch:ef=!1,viewerId:ey=null}=e,ej=(0,n.useRef)(null),ev=(0,n.useRef)(!1),[eN,ew]=(0,n.useState)(!1);(0,n.useEffect)(()=>ew(!0),[]),(0,n.useEffect)(()=>{if(!l)return;function e(e){"Escape"===e.key&&c()}document.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=t}},[l,c]);let ek=(0,A.Ym)(),eS=(0,C.c)("Film"),eA=(0,C.c)("SnapshotForm"),[eC,eD]=(0,n.useState)(0),[eL,eR]=(0,n.useState)(()=>{var e;return null!=(e=eh())?e:"slider"}),eI=(0,n.useRef)(!1);(0,n.useEffect)(()=>{let e=eh();if(e&&eR(e),null==ey)return;let t=!1;return(0,ep.J)().then(a=>{let r=a.compareView;t||!r||eI.current||(r!==e&&em(r),eR(r))}),()=>{t=!0}},[ey]);let[eP,eM]=(0,n.useState)(()=>window.matchMedia("(min-width: 768px)").matches);if((0,n.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>eM(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,n.useEffect)(()=>{l&&eD(0)},[l]),(0,n.useEffect)(()=>{if(!l||!Q)return;let e=setTimeout(()=>{var e;null==(e=ej.current)||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[l,Q]),!l||!eN)return null;let eE=T?T.startsWith("00:")?T.slice(3):T:null,eU=null==_||null==B?null:"".concat(_.toFixed(5),", ").concat(B.toFixed(5)),eT=(()=>{let e=new URLSearchParams;null!=_&&null!=B&&(e.set("lat",String(_)),e.set("lng",String(B)),e.set("zoom","18.5")),null!=H&&e.set("location",String(H));let t=e.toString();return t.length>0?"/mapa?".concat(t):"/mapa"})(),eF=J[eC],eH=(null==eF?void 0:eF.audit)!=null&&"APPROVED"!==eF.audit,ez=null!=(t=null==eF?void 0:eF.image)?t:q,eV="side"===eL&&!!Z&&!!ez&&eP,eO=eF?eF.description:G,e_=null!=(a=null==eF?void 0:eF.author)?a:null,eB=en||null==ey?void 0:J.find(e=>{var t;return(null==(t=e.author)?void 0:t.id)===ey&&null!=e.audit&&"APPROVED"!==e.audit}),eZ="cs"===ek?"cs-CZ":"fr"===ek?"fr-FR":"en-US";function eq(e){return e?new Date(e).toLocaleDateString(eZ):null}let eG=eq(null==eF?void 0:eF.shotAt);return(0,s.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm",onPointerDown:e=>{ev.current=e.target===e.currentTarget},onClick:e=>{ev.current&&e.target===e.currentTarget&&c(),ev.current=!1},role:"dialog","aria-modal":"true","aria-label":null!=E?E:"Detail z\xe1běru",children:(0,r.jsxs)("div",{className:"relative flex max-h-[95vh] w-full flex-col overflow-hidden rounded-xl bg-white shadow-2xl ".concat(eV?"max-w-[98vw]":"max-w-5xl"),onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"absolute right-3 top-3 z-10 flex items-center gap-2",children:[eH&&(0,r.jsxs)("span",{className:"flex h-9 items-center gap-1.5 rounded-full bg-red-600 px-3 text-xs font-bold uppercase tracking-wider text-white shadow-md",children:[(0,r.jsx)(o.A,{className:"h-4 w-4","aria-hidden":!0}),"ček\xe1"]}),Z&&ez&&eP&&(0,r.jsx)("button",{type:"button",onClick:()=>{let e="slider"===eL?"side":"slider";eI.current=!0,eR(e),em(e),null!=ey&&(0,ep.H)("compareView",e)},"aria-pressed":"side"===eL,"aria-label":"slider"===eL?"Zobrazit z\xe1běr a fotku vedle sebe":"Zobrazit posuvn\xedk z\xe1běr/fotka",title:"slider"===eL?"Zobrazit vedle sebe":"Zobrazit posuvn\xedk",className:"flex h-9 w-9 cursor-pointer items-center justify-center rounded-full bg-white/90 text-gray-700 shadow-md backdrop-blur transition hover:bg-white hover:text-black",children:"slider"===eL?(0,r.jsx)(d,{className:"h-5 w-5","aria-hidden":!0}):(0,r.jsx)(u,{className:"h-5 w-5","aria-hidden":!0})}),(0,r.jsx)(P.A,{kind:"snapshot",targetId:M,className:"h-9 w-9 justify-center bg-white/90 shadow-md backdrop-blur hover:bg-white"}),(0,r.jsx)("button",{type:"button",onClick:c,"aria-label":"Zavř\xedt",className:"flex h-9 w-9 cursor-pointer items-center justify-center rounded-full bg-white/90 text-gray-700 shadow-md backdrop-blur transition hover:bg-white hover:text-black",children:(0,r.jsx)(x.A,{className:"h-5 w-5","aria-hidden":!0})})]}),(0,r.jsxs)("div",{className:"overflow-y-auto",children:[(()=>{if(Z&&ez){var e;return(0,r.jsx)("div",{className:eH?"relative ring-2 ring-inset ring-red-500":"relative",children:eV?(0,r.jsxs)("div",{className:"grid aspect-[32/9] w-full grid-cols-2 gap-px bg-gray-900",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("img",{src:(0,D.V)(
1Z),alt:"Z\xe1běr: ".concat(null!=E?E:""),className:"h-full w-full object-contain",draggable:!1}),(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 top-2 rounded bg-black/70 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-white",children:"Z\xe1běr"}),eE&&(0,r.jsxs)("span",{className:"pointer-events-none absolute bottom-2 left-2 rounded bg-black/70 px-1.5 py-0.5 font-mono text-[10px] text-white",children:["⏱ ",eE]})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("img",{src:(0,D.V)(ez),alt:"Foto: ".concat(null!=F?F:""),className:"h-full w-full object-contain",draggable:!1}),(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 top-2 rounded bg-accent/90 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-white",children:"Foto"})]})]}):(0,r.jsx)(I.A,{beforeSrc:(0,D.V)(Z),afterSrc:(0,D.V)(ez),beforeAlt:"Z\xe1běr: ".concat(null!=E?E:""),afterAlt:"Foto: ".concat(null!=F?F:""),beforeLabel:"",afterLabel:"",timeLabel:eE,frameAspect:null!=(e=Z.ratio)?e:null},"slider-".concat(eC))})}return(0,r.jsxs)("div",{className:"relative aspect-video bg-gray-900 ".concat(eH?"ring-2 ring-inset ring-red-500":""),children:[(Z||ez)&&(0,r.jsx)("img",{src:(0,D.V)(null!=Z?Z:ez),alt:null!=E?E:"",className:"h-full w-full object-contain"}),eE&&(0,r.jsxs)("span",{className:"absolute bottom-3 left-3 inline-flex items-center gap-1 rounded bg-black/70 px-2 py-1 font-mono text-xs text-white",children:[(0,r.jsx)(p.A,{className:"h-3 w-3","aria-hidden":!0}),eE]})]})})(),J.length>1&&(0,r.jsx)("div",{className:"border-b border-gray-100 bg-gray-50 p-3",children:(0,r.jsx)("div",{className:"flex gap-2 overflow-x-auto",children:J.map((e,t)=>{var a;let n=null!=e.audit&&"APPROVED"!==e.audit,s=t===eC?"ring-2 ring-accent":n?"ring-2 ring-red-500 opacity-70 hover:opacity-100":"opacity-70 hover:opacity-100";return(0,r.jsxs)("button",{type:"button",onClick:()=>eD(t),className:"relative shrink-0 overflow-hidden rounded transition ".concat(s),title:null!=(a=e.description)?a:void 0,children:[(0,r.jsx)("img",{src:(0,D.V)(e.image,{variant:"thumb"}),alt:"",className:"h-16 w-24 cursor-pointer object-cover",loading:"lazy"}),e.isDefault&&(0,r.jsx)("span",{className:"pointer-events-none absolute left-0.5 top-0.5 rounded bg-accent/90 px-1 py-0.5 text-[9px] font-bold uppercase text-white",children:"★"}),n&&(0,r.jsx)("span",{className:"pointer-events-none absolute right-0.5 top-0.5 rounded bg-red-600 p-0.5 text-white",children:(0,r.jsx)(o.A,{className:"h-2.5 w-2.5","aria-hidden":!0})})]},e.id)})})}),(0,r.jsxs)("div",{className:"space-y-3 p-6",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[E?(0,r.jsx)("h2",{className:"flex-1 text-2xl font-bold text-gray-900",children:E}):(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsx)("div",{className:"mt-1 shrink-0",children:(0,r.jsx)(ei.A,{snapshotId:M,size:"md"})})]}),U&&(0,r.jsxs)("div",{className:"flex gap-1.5 text-sm leading-relaxed text-gray-700",children:[(0,r.jsx)(h.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-gray-500","aria-hidden":!0}),(0,r.jsx)("div",{className:"snapshot-description flex-1",dangerouslySetInnerHTML:{__html:(0,L.u)((0,R.hc)(U),K)}})]}),(F||eU)&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-gray-700",children:[F&&(0,r.jsxs)(i(),{href:eT,className:"flex min-w-0 items-center gap-1.5 hover:text-accent-dark",children:[(0,r.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-accent-dark","aria-hidden":!0}),(0,r.jsxs)("span",{className:"truncate",children:[F,O&&", ".concat(O)]})]}),eU&&(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",children:[(0,r.jsxs)(i(),{href:eT,className:"flex items-center gap-1.5 hover:text-accent-dark",children:[(0,r.jsx)(g.A,{className:"h-3.5 w-3.5 text-accent-dark","aria-hidden":!0}),(0,r.jsx)("span",{children:eU})]}),(0,r.jsx)(ec.A,{value:eU,size:"md"}),eg&&null!=_&&null!=B&&(0,r.jsx)(eo.A,{lat:_,lng:B,snapshotId:M,size:"md"})]})]}),eg&&null!=H&&null!=z&&"APPROVED"!==z&&(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)(eu.A,{locationId:H,snapshotId:M,status:z,variant:"default"})}),(W||$)&&(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500",children:W&&$&&$.id===W.id?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(b.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:eS("creditAddedAnd")}),(0,r.jsx)(f.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:eS("creditDiscoveredBy")}),(0,r.jsx)(i(),{href:"/uzivatel/".concat(W.id),className:"text-gray-700 hover:text-accent-dark",children:W.name})]}):(0,r.jsxs)(r.Fragment,{children:[W&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(b.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:eS("creditAddedBy")}),(0,r.jsx)(i(),{href:"/uzivatel/".concat(W.id),className:"text-gray-700 hover:text-accent-dark",children:W.name})]}),$&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(f.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:eS("creditDiscoveredBy")}),(0,r.jsx)(i(),{href:"/uzivatel/".concat($.id),className:"text-gray-700 hover:text-accent-dark",children:$.name})]})]})}),K.length>0&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 border-t border-gray-100 pt-3",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-gray-400",children:[(0,r.jsx)(y.A,{className:"h-3 w-3","aria-hidden":!0}),eS("actorsInScene")]}),K.map(e=>(0,r.jsx)(i(),{href:(0,S.i)(e.id,e.name),className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-200",children:e.name},e.id))]}),(eg&&es||en||ea)&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[eg&&es&&(0,r.jsx)(ed.A,{snapshotId:M,status:es,variant:"compact"}),en&&(0,r.jsx)(ex.A,{snapshotId:M,variant:"compact"}),ea&&(0,r.jsxs)(i(),{href:ea,className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)(b.A,{className:"h-3 w-3","aria-hidden":!0}),eA("editLink")]})]}),(eO||e_||eG||en&&eF)&&(0,r.jsx)("h3",{className:"border-t border-gray-100 pt-4 text-base font-semibold text-gray-900",children:eS("photoSectionHeading")}),eO&&(0,r.jsxs)("div",{className:"flex gap-1.5 text-sm leading-relaxed text-gray-700",children:[(0,r.jsx)(j.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-gray-500","aria-hidden":!0}),(0,r.jsx)("div",{className:"flex-1",dangerouslySetInnerHTML:{__html:(0,L.u)((0,R.hc)(eO),K)}})]}),en&&J.length>0?(0,r.jsx)("div",{className:"-mx-2 flex flex-col",children:J.map((e,t)=>{var a;let n=t===eC,s=eq(e.shotAt),l=(a=e.createdAt)?new Date(a).toLocaleStr
1ing(eZ,{day:"numeric",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):null;return(0,r.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>eD(t),onKeyDown:e=>{e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),eD(t))},className:"flex cursor-pointer flex-wrap items-center gap-x-3 gap-y-1 rounded px-2 py-1 text-left text-xs text-gray-500 transition ".concat(n?"bg-gray-200/70":"hover:bg-gray-100"),children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(j.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:"foto"}),e.author?(0,r.jsx)(i(),{href:"/uzivatel/".concat(e.author.id),onClick:e=>e.stopPropagation(),className:"text-gray-700 hover:text-accent-dark",children:e.author.name}):(0,r.jsx)("span",{className:"text-gray-400",children:"—"})]}),s&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",title:eS("photoShotAtLabel"),children:[(0,r.jsx)(v,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),s]}),l&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",title:eS("photoCreatedAtLabel"),children:[(0,r.jsx)(N,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),l]}),e.auditedBy&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",title:eS("photoAuditedByLabel"),children:[(0,r.jsx)(w,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)(i(),{href:"/uzivatel/".concat(e.auditedBy.id),onClick:e=>e.stopPropagation(),className:"text-gray-700 hover:text-accent-dark",children:e.auditedBy.name})]}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-2",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(et,{photoId:e.id,isDefault:e.isDefault,onSuccess:()=>eD(0)}),e.audit&&(0,r.jsx)(el,{photoId:e.id,status:e.audit}),(0,r.jsx)(er,{photoId:e.id,onSuccess:()=>eD(0)}),(0,r.jsxs)(i(),{href:"/upravit-fotografii/".concat(e.id,"/zarovnat"),onClick:e=>e.stopPropagation(),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)(k,{className:"h-3 w-3","aria-hidden":!0}),eA("alignLink")]}),(0,r.jsxs)(i(),{href:"/upravit-fotografii/".concat(e.id),onClick:e=>e.stopPropagation(),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)(b.A,{className:"h-3 w-3","aria-hidden":!0}),eA("editLink")]})]})]},e.id)})}):(e_||eG||eB)&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(e_||eG)&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500",children:[e_&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(j.A,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),(0,r.jsx)("span",{className:"text-gray-400",children:"foto"}),(0,r.jsx)(i(),{href:"/uzivatel/".concat(e_.id),className:"text-gray-700 hover:text-accent-dark",children:e_.name})]}),eG&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(v,{className:"h-3 w-3 text-gray-400","aria-hidden":!0}),eG]})]}),eB&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsxs)(i(),{href:"/upravit-fotografii/".concat(eB.id),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)(b.A,{className:"h-3 w-3","aria-hidden":!0}),eA("editLink")]}),(0,r.jsxs)(i(),{href:"/upravit-fotografii/".concat(eB.id,"/zarovnat"),className:"inline-flex cursor-pointer items-center gap-1 rounded-md border border-accent bg-accent/10 px-2 py-0.5 text-[11px] font-semibold text-gray-800 transition hover:bg-accent hover:text-gray-900",children:[(0,r.jsx)(k,{className:"h-3 w-3","aria-hidden":!0}),eA("alignLink")]}),(0,r.jsx)(er,{photoId:eB.id,onSuccess:()=>eD(0)})]})]})]}),(0,r.jsx)(Y,{snapshotId:M,locale:ek,hasLocation:null!=F,initialAddon:ee,canModerateSnapshot:eg,searchAnnounced:eb,canAnnounceSearch:ef}),(0,r.jsx)("div",{ref:ej,children:(0,r.jsx)(V,{snapshotId:M,locale:ek})}),(0,r.jsx)(X,{snapshotId:M,locale:ek})]})]})}),document.body)}},5492:(e,t,a)=>{async function r(e,t,a){let r=Math.sqrt(12e6/(t*a)),n=Math.max(1,Math.round(t*r)),s=Math.max(1,Math.round(a*r));try{let t=await createImageBitmap(e),a=document.createElement("canvas");a.width=n,a.height=s;let r=a.getContext("2d");if(!r)return t.close(),null;r.drawImage(t,0,0,n,s),t.close();let l=await new Promise(e=>
1a.toBlob(e,"image/jpeg",.9));if(!l)return null;let i=e.name.replace(/\.[^.]+$/,"");return new File([l],"".concat(i,".jpg"),{type:"image/jpeg",lastModified:e.lastModified})}catch(e){return null}}async function n(e){if(/jpe?g/i.test(e.type)||/\.jpe?g$/i.test(e.name)){let t;try{t=new Uint8Array(await e.arrayBuffer())}catch(t){return e}if(t.length<4||255!==t[0]||216!==t[1])return e;let a=function(e){if(e.length<4||255!==e[0]||216!==e[1])return null;let t=2;for(;t+9<e.length&&255===e[t];){let a=e[t+1];if(218===a||217===a)break;if(a>=208&&a<=215||1===a){t+=2;continue}let r=e[t+2]<<8|e[t+3];if(r<2)break;if(a>=192&&a<=207&&196!==a&&200!==a&&204!==a){let a=e[t+5]<<8|e[t+6],r=e[t+7]<<8|e[t+8];return r>0&&a>0?{width:r,height:a}:null}t+=2+r}return null}(t);if(a&&a.width*a.height>4e7){let t=await r(e,a.width,a.height);if(t)return t}return function(e,t){let a=[e.subarray(0,2)],r=2;try{for(;r+1<e.length;){if(255!==e[r])return t;let n=e[r+1];if(218===n){a.push(e.subarray(r));break}if(217===n||n>=208&&n<=215||1===n){a.push(e.subarray(r,r+2)),r+=2;continue}if(r+3>=e.length)return t;let s=e[r+2]<<8|e[r+3],l=r+2+s;if(s<2||l>e.length)return t;225!==n&&254!==n&&a.push(e.subarray(r,l)),r=l}}catch(e){return t}let n=a.reduce((e,t)=>e+t.length,0);if(n===e.length)return t;let s=new Uint8Array(n),l=0;for(let e of a)s.set(e,l),l+=e.length;return new File([s],t.name,{type:"image/jpeg",lastModified:t.lastModified})}(t,e)}if(e.type.startsWith("image/"))try{let t=await createImageBitmap(e),{width:a,height:n}=t;if(t.close(),a*n>4e7){let t=await r(e,a,n);if(t)return t}}catch(e){}return e}a.d(t,{j:()=>n})},6293:(e,t,a)=>{a.d(t,{b:()=>r});async function r(e){try{if(!/^image\/jpe?g$/i.test(e.type))return null;let t=await e.slice(0,131072).arrayBuffer(),a=new DataView(t);if(a.byteLength<4||65496!==a.getUint16(0))return null;let r=2;for(;r+4<=a.byteLength&&255===a.getUint8(r);){let e=a.getUint16(r);if(65498===e)break;let t=a.getUint16(r+2);if(65505===e){let e=r+4;if(e+14>a.byteLength||0x45786966!==a.getUint32(e)){r+=2+t;continue}let n=e+6,s=18761===a.getUint16(n),l=e=>a.getUint16(e,s),i=e=>a.getUint32(e,s),o=(e,t)=>{if(e+2>a.byteLength)return null;let r=l(e);for(let n=0;n<r;n++){let r=e+2+12*n;if(r+12>a.byteLength)break;if(l(r)===t)return r}return null},c=e=>{let t=i(e+4),r=t>4?n+i(e+8):e+8,s="";for(let e=0;e<t-1&&r+e<a.byteLength;e++)s+=String.fromCharCode(a.getUint8(r+e));return s},d=n+i(n+4),u=null,x=o(d,34665);if(x&&(u=o(n+i(x+8),36867)),null==u&&(u=o(d,306)),null==u)return null;let p=c(u).match(/^(\d{4}):(\d{2}):(\d{2})/);if(!p)return null;let h=+p[1],m=+p[2],g=+p[3];if(m<1||m>12||g<1||g>31||h<1900||h>2100)return null;return"".concat(p[1],"-").concat(p[2],"-").concat(p[3])}
1r+=2+t}return null}catch(e){return null}}},7553:(e,t,a)=>{a.d(t,{J:()=>l,H:()=>i});let r={snapshotView:["grid","timeline"],compareView:["slider","side"]};function n(e){if("object"!=typeof e||null===e||Array.isArray(e))return{};let t={};for(let[a,n]of Object.entries(r)){let r=e[a];"string"==typeof r&&n.includes(r)&&(t[a]=r)}return t}let s=null;function l(){return null!=s||(s=fetch("/api/ui-prefs",{credentials:"same-origin"}).then(e=>e.ok?e.json():{}).then(n).catch(()=>({}))),s}function i(e,t){s=(null!=s?s:Promise.resolve({})).then(a=>({...a,[e]:t})),fetch("/api/ui-prefs",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,value:t})}).catch(()=>{})}},8172:(e,t,a)=>{a.d(t,{default:()=>o});var r=a(5155),n=a(2115),s=a(63),l=a(8955),i=a(9436);function o(e){let{commentId:t,onDeleted:a}=e,o=(0,l.c)("Comments"),c=(0,s.useRouter)(),[d,u]=(0,n.useTransition)(),[x,p]=(0,n.useState)(null);return(0,r.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:function(){confirm(o("confirmDelete"))&&(p(null),u(async()=>{(await (0,i.J)(t)).ok?a?a():c.refresh():p(o("deleteError"))}))},disabled:d,className:"cursor-pointer rounded p-1 text-gray-400 transition hover:bg-red-50 hover:text-red-600 disabled:opacity-50",title:o("delete"),"aria-label":o("delete"),children:"\uD83D\uDDD1"}),x&&(0,r.jsx)("span",{className:"text-[11px] text-red-600",children:x})]})}},8687:(e,t,a)=>{a.d(t,{F:()=>r});function r(e){return e?e.replace(/\r\n/g,"\n").replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>\s*<p[^>]*>/gi,"\n\n").replace(/<\/?p[^>]*>/gi,"").replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\n{3,}/g,"\n\n").trim():""}},9148:(e,t,a)=>{a.d(t,{G:()=>n});var r=a(926);let n=(0,r.createServerReference)("40dcea26c51d91d476042338c8801f52205d565064",r.callServer,void 0,r.findSourceMapURL,"postComment")},9157:(e,t,a)=>{a.d(t,{G:()=>n});var r=a(926);let n=(0,r.createServerReference)("40bd9cc0cbe3711fad17e4882992111405de86a5d4",r.callServer,void 0,r.findSourceMapURL,"deletePhotoAction")},9436:(e,t,a)=>{a.d(t,{J:()=>n});var r=a(926);let n=(0,r.createServerReference)("407c28f7c21eefc8ae09b22dbd36befa8305da269b",r.callServer,void 0,r.findSourceMapURL,"deleteCommentAction")}}]);

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.