1import{c as C}from"./createLucideIcon.js";import{r as m,j as e}from"./jsx-runtime.js";import{B as f}from"./button.js";import{D as v,a as S,b,c as R,d as k,f as N,e as w,g as y}from"./dialog.js";import{S as E,a as T,b as A,c as O,e as _,f as L,d as c}from"./select.js";import{T as M}from"./textarea.js";import{u}from"./index6.js";import{t as z}from"./gql-tada.js";import{A as D}from"./auth-context.js";import{u as P}from"./use-translation.js";import{F as U}from"./flag.js";import{u as W}from"./useMutation.js";import{C as H,a as V,b as G,c as K,d as F}from"./carousel.js";import{I as j}from"./images-preview.js";/** 2 * @license lucide-react v0.562.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Y=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ue=C("message-square",Y);function me(t){const[s,n]=m.useState(""),[o,l]=m.useState(""),[a,{loading:i}]=W(q),x=m.useContext(D),r=P(),g=async()=>{try{if(x.isNotLoggedIn){u(r("ãã°ã¤ã³ãã¦ãã ãã","Please log in"));return}if(s===""){u(r("å ±åå 容ã鏿ãã¦ãã ãã","Please select a reason"));return}if(o.length===0){u(r("詳細ãå ¥åãã¦ãã ãã","Please provide details"));return}await a({variables:{input:{workId:t.postId,reason:s,comment:o}}}).then(async d=>{u(r("å ±åãããã¾ããããååãããã¨ããããã¾ãã","Your report has been submitted. Thank you for your cooperation."))})}catch(d){d instanceof Error&&u(d.message)}};return e.jsxs(v,{children:[e.jsx(S,{asChild:!0,children:e.jsxs(f,{className:t.buttonClassName??"flex items-center gap-2",variant:"outline",children:[e.jsx(U,{}),r("åé¡ãå ±åãã","Report an issue")]})}),e.jsxs(b,{children:[e.jsx(R,{children:e.jsx(k,{children:r("åé¡ãå ±åãã","Report an issue")})}),e.jsx("h4",{className:"text-md",children:r("å ±åå 容","Report Reason")}),e.jsxs(E,{onValueChange:d=>n(d),children:[e.jsx(T,{children:e.jsx(A,{placeholder:r("鏿ãã¦ãã ãã","Please select")})}),e.jsx(O,{children:e.jsxs(_,{children:[e.jsx(L,{children:r("鏿ãã¦ãã ãã","Please select")}),e.jsx(c,{value:"AGE_MISMATCH",children:r("対象年齢ãç°ãªãï¼éåº¦ãªæ§ç表ç¾ãªã©ï¼","Age mismatch (e.g., excessive sexual content)")}),e.jsx(c,{value:"TASTE_MISMATCH",children:r("ãã¤ã¹ããç°ãªã","Taste mismatch")}),e.jsx(c,{value:"NO_MOSAIC",children:r("å¿ è¦ãªã¢ã¶ã¤ã¯å å·¥ãããã¦ããªã","Lack of required mosaics")}),e.jsx(c,{value:"PRIVACY_VIOLATION",children:r("ãã©ã¤ãã·ã¼ã¾ãã¯è忍©ã侵害ãã¦ãã","Privacy or image rights violation")}),e.jsx(c,{value:"UNAUTHORIZED_REPOST",children:r("ç¡æè»¢è¼ãã¦ãã","Unauthorized repost")}),e.jsx(c,{value:"COMMERCIAL_CONTENT",children:r("忥ç¨ã®åºåã宣ä¼ãå§èªãç®çã¨ããæ å ±ãå«ã¾ãã¦ãã","Contains commercial content or solicitation")}),e.jsx(c,{value:"EXCESSIVE_GORE",children:r("é度ãªã°ããã¹ã¯è¡¨ç¾ãå«ã¾ãã¦ãã","Contains excessive gore")}),e.jsx(c,{value:"CHILD_PORNOGRAPHY",children:r("å®åã«è¦ããä½åã§ãå ç«¥ãã«ãã¨èªå®ãããæãã®ããå 容ãå«ã¾ãã¦ãã","Contains content that may be classified as child pornography")}),e.jsx(c,{value:"ILLEGAL_CONTENT",children:r("ãµã¤ãã§ç¦æ¢ããã¦ããã³ã³ãã³ãã¸ã®èªå°ãå«ã¾ãã¦ãã","Contains links to prohibited content")}),e.jsx(c,{value:"OTHER",children:r("ãã®ä»","Other")})]})})]}),e.jsx("h4",{className:"text-md",children:r("詳細ï¼ä»»æï¼","Details (Optional)")}),e.jsx(N,{children:r("ç¡æè»¢è¼ããã©ã¤ãã·ã¼ãè忍©ã«ã¤ãã¦ã®å ±åã®å ´åã¯ã転è¼å ã侵害ããã¦ãã人ç©ã®æ å ±ãè¨è¼ãã¦ãã ãã","If reporting for unauthorized reposts, privacy, or image rights violations, please provide details of the original source or the person affected.")}),e.jsx(M,{placeholder:r("åé¡ã®è©³ç´°ãå ¥åãã¦ãã ãã","Please provide details of the issue"),className:"resize-none",onChange:d=>l(d.target.value)}),e.jsx(w,{children:e.jsx(y,{asChild:!0,children:e.jsx(f,{onClick:g,disabled:i,children:r("éä¿¡","Submit")})})})]})]})}
6const q=z(`mutation ReportWork($input: ReportWorkInput!) { 7 reportWork(input: $input) 8 }`);function B({allImageURLs:t,selectedImage:s,currentIndex:n,onSelectImage:o}){const l=(a,i)=>{i.key==="Enter"&&o(a)};return e.jsxs("div",{className:"flex flex-col",children:[t.length>1&&e.jsx("div",{className:"rounded-none bg-zinc-100 text-center dark:bg-zinc-900",children:e.jsxs("p",{className:"m-auto text-center text-sm opacity-50",children:[n+1," / ",t.length]})}),e.jsxs(H,{opts:{dragFree:!0},children:[e.jsx(V,{className:"ml-0",children:t.map((a,i)=>{const r=a===s?"group relative flex h-20 w-full cursor-pointer items-center justify-center overflow-hidden rounded-md border-2 border-clear-bright-blue bg-zinc-100 transition-colors dark:bg-zinc-900":"group relative flex h-20 w-full cursor-pointer items-center justify-center overflow-hidden rounded-md border-2 border-transparent bg-zinc-100 transition-colors hover:border-zinc-300 dark:bg-zinc-900 dark:hover:border-zinc-700";return e.jsx(G,{className:"basis-[6.5rem] pl-1 sm:basis-[7.5rem] md:basis-[8.5rem]",children:e.jsx("button",{type:"button",className:r,onClick:()=>o(a),onKeyUp:g=>l(a,g),children:e.jsx("img",{className:"h-full w-full object-contain",alt:"",src:a,loading:"lazy"},a)})},i)})}),e.jsx(K,{className:"absolute left-0"}),e.jsx(F,{className:"absolute right-0"})]})]})}function he(t){const s=t.workImageURL?[t.workImageURL,...t.subWorkImageURLs]:t.subWorkImageURLs,n=s.length>1,[o,l]=m.useState(0),a=i=>{l(s.indexOf(i)),t.onSelectedImage&&t.onSelectedImage(i)};return m.useEffect(()=>{l(0)},[t.workImageURL]),n?e.jsxs("div",{className:"flex flex-col",children:[e.jsx(j,{thumbnailUrl:s[o],imageURLs:s,currentIndex:o,setCurrentIndex:l,mode:t.mode}),e.jsx(B,{allImageURLs:s,selectedImage:s[o],currentIndex:o,onSelectImage:a})]}):t.workImageURL?e.jsx("div",{className:"relative m-0",children:e.jsx(j,{currentIndex:0,setCurrentIndex:()=>{},thumbnailUrl:t.workImageURL,imageURLs:[t.workImageURL],mode:t.mode})}):null}const h="aipictors:recent-sticker-ids",p=24,I=()=>typeof window<"u",J=()=>{if(!I())return[];try{const t=window.localStorage.getItem(h);if(!t)return[];const s=JSON.parse(t);return Array.isArray(s)?s.filter(n=>typeof n=="string"):[]}catch{return[]}},X=t=>{if(!I())return;const s=JSON.stringify(t.slice(0,p));try{window.localStorage.setItem(h,s)}catch{try{window.localStorage.removeItem(h),window.localStorage.setItem(h,s)}catch{}}},ge=t=>{const s=[t,...J().filter(n=>n!==t)].slice(0,p);return X(s),s},xe=(t,s)=>{if(s.length===0)return t;const n=new Map(s.map((o,l)=>[o,l]));return[...t].sort((o,l)=>{const a=n.get(o.id),i=n.get(l.id);return a===void 0&&i===void 0?0:a===void 0?1:i===void 0?-1:a-i})};export{ue as M,me as R,he as W,ge as a,J as r,xe as s};
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.