PageSourceSearch

https://tada.global/assets/Report-Df7ZyC4I.js

js tada.global collected 2026-10-01 13:03:35 UTC 3,387 bytes, 70 lines download raw bytes

1import{a as l,j as t}from"./vendor-animation-DTPlXSoL.js";import{u as E,J as c,M as N,p as u,T as R}from"./index-9p81SGta.js";import{M as m,B as b}from"./MobileModal-B1HRWtM0.js";import{M as O}from"./MobileWebViewContainer-BHq3iZk_.js";import{u as k}from"./router-DfYNQ2LD.js";import{p as y}from"./api-CC22UPSO.js";import{r as T}from"./resolveServerHost-jke9TOHz.js";import{s as v,g as H,b as z}from"./hooks-DUZcCwwZ.js";import{u as I}from"./useTranslation-hL3tbTlu.js";import"./vendor-react-_LCK3pSB.js";import"./vendor-charts-DP8Vi2ZD.js";import"./format-D2jweW-G.js";import"./contact-HkEyNVOk.js";const S=u.div`
2  padding: 20px 24px;
3  height: calc(100% - ${N}px - 33px - 80px);
4  box-sizing: border-box;
5
6  overflow-y: scroll;
7
8  > p {
9    margin: 0;
10  }
11
12  > .help_center__report__label {
13    font-size: 14px;
14    color: #747678;
15    margin-bottom: 8px;
16  }
17
18  > .help_center__report__input {
19    &::placeholder {
20      color: rgba(12, 12, 12, 0.3);
21    }
22
23    padding: 12px 16px;
24    margin-bottom: 8px;
25
26    width: 100%;
27    height: 284px;
28    resize: none;
29
30    border: 1px solid #dfe1e3;
31    border-radius: 6px;
32
33    box-sizing: border-box;
34
35    font-size: 14px;
36  }
37
38  > .help_center__report__length {
39    text-align: right;
40    font-size: 12px;
41    color: #747678;
42  }
43`,w=u.div`
44  display: flex;
45  align-items: center;
46  justify-content: center;
47  gap: 12px;
48
49  height: 80px;
50
51  > button {
52    width: 157.5px;
53    height: 48px;
54
55    border-radius: 6px;
56
57    color: #000;
58
59    box-sizing: border-box;
60  }
61
62  > .help_center_report__button_cancel {
63    border: 1px solid #dfe1e3;
64  }
65
66  > .help_center_report__button_submit {
67    background: linear-gradient(135deg, #ffd74f 0%, #ffc400 100%);
68    ${({$submitDisabled:e})=>e&&"opacity: 45%;"}
69  }
70`;function Y(){const{t:e}=I(),h=E(),i=k(),g=i.topicName??"",[r,x]=l.useState(""),[f,p]=l.useState(!1),[_,M]=l.useState({cancelModal:!1,submitModal:!1}),n=o=>{const s=`${o}Modal`;M(a=>({...a,[s]:!a[s]}))},j=async()=>{p(!0);try{const o=H(),s=Object.keys(o).length?o:i,a=s.region??i.topicRegion??"",C=T(a);await y(`${C}/cssvc/v1/report/submit`,{description:r,topicId:Number(h.id),...z(s)},void 0,R.faq),n("submit")}catch{}finally{p(!1)}},d=o=>{n(o),v()};return t.jsxs(O,{headerSize:33,title:g,isLoading:f,children:[t.jsx(m,{isOpen:_.cancelModal,title:e("report.title_cancel_modal"),content:e("report.content_cancel_modal"),cancelText:e("report.button_cancel_no"),okText:e("button_cancel"),toggle:()=>n("cancel"),onOk:()=>d("cancel")}),t.jsx(m,{isOpen:_.submitModal,isCancelVisible:!1,title:e("report.title_submit_modal"),content:e("report.content_submit_modal"),toggle:()=>n("submit"),onOk:()=>d("submit")}),t.jsxs(S,{children:[t.jsx("p",{className:"help_center__report__label",children:e("report.label_report_an_issue")}),t.jsx("textarea",{className:"help_center__report__input",placeholder:e("report.label_describe_issue"),value:r,onChange:o=>{o.target.value.length>500||x(o.target.value)}}),t.jsxs("p",{className:"help_center__report__length",children:[r.length," / 500 (",e("report.label_minimum_character",{minLength:c}),")"]})]}),t.jsxs(w,{$submitDisabled:r.length<c,children:[t.jsx(b,{className:"help_center_report__button_cancel",onClick:()=>n("cancel"),children:e("button_cancel")}),t.jsx(b,{className:"help_center_report__button_submit",disabled:r.length<c,onClick:j,children:e("signup.submit")})]})]})}export{Y as default};

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.