(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["12442"],{231886:function(e){e.exports=function(e,t,l){return e==e&&(void 0!==l&&(e=e<=l?e:l),void 0!==t&&(e=e>=t?e:t)),e}},886299:function(e,t,l){var n=l(231886),a=l(724521);e.exports=function(e,t,l){return void 0===l&&(l=t,t=void 0),void 0!==l&&(l=(l=a(l))==l?l:0),void 0!==t&&(t=(t=a(t))==t?t:0),n(a(e),t,l)}},72986:function(e,t,l){"use strict";l.d(t,{u2:function(){return s},vr:function(){return d}});var n=l(320165);l(101199);var a=l(356426),i=l(39711),o=l(237727),r=l(599961);let s=60576,d=e=>{let{originalLink:t,reportDesc:l,reportDescPlaceholder:s,images:d,onOriginalLinkChange:u,onReportDescChange:c,onImagesChange:v}=e;return(0,n.jsxs)("div",{id:"incut-d2c-root-cmqospijk00314tji7ln7dgpl",className:r.default.plagiarismFields,"data-reference-id":"2958:1816",children:[(0,n.jsx)(a._,{text:"被抄袭的原创作品链接",required:!0}),(0,n.jsx)(i.K,{className:r.default.plagiarismTextArea,maxLength:500,placeholder:"请提供可公开访问的原始链接,并确认发布时间早于被举报内容",minHeight:78,value:t||"",onChange:u}),(0,n.jsx)(a._,{text:"举报描述"}),(0,n.jsx)(i.K,{maxLength:200,placeholder:s,minHeight:75,value:l||"",onChange:c}),(0,n.jsxs)("div",{className:r.default.plagiarismTips,children:["1.如果你是原创作者本人",(0,n.jsx)("br",{}),"请上传首发作品截图、首发账号个人主页截图",(0,n.jsx)("br",{}),"2.如果你是原创作者授权的代理人",(0,n.jsx)("br",{}),"请上传授权书(含授权人签字或盖章)、原创作者首发作品截图、原创作者账号个人主页截图"]}),(0,n.jsx)("div",{className:r.default.uploadContainer,children:(0,n.jsx)(o.U,{value:d||[],onChange:v})}),(0,n.jsx)("div",{className:r.default.uploadTips,children:"每张小于 10M,支持JPG、PNG格式,最多上传4张"})]})}},935372:function(e,t,l){"use strict";l.d(t,{n:function(){return e9},m:function(){return e6}});var n=l("320165"),a=l("101199"),i=l("890710"),o=l("499059");l("490629");var r=l("227630"),s=l("477667"),d=l("687875"),u=l("250532"),c=l("913029"),v=l("469935"),p=l.n(v),f=l("277837");let{ArrowUp:h,ArrowDown:m,W:g,S:_,Escape:x,N:w}=d.bf,j=e=>{let{children:t,title:l,visible:i,onCancel:o}=e,r=a.useCallback(()=>{o&&o(!1)},[]),d=a.useRef(null),v=e=>{e.stopPropagation()};return a.useEffect(()=>{let e="report/ui/Modal";return(0,u.o)({disableKey:[m,h,g,_,x,w].map(e=>e.code),pauseGlobalShortcut:!0},e),()=>{(0,u.m)(e)}},[]),a.useEffect(()=>{let{current:e}=d;if(e)return e.setAttribute("tabindex","0"),e.addEventListener("DOMMouseScroll",v),e.onwheel=e=>e.preventDefault(),e.focus(),()=>{e.removeEventListener("DOMMouseScroll",v)}},[i]),i?(0,n.jsx)("div",{className:c.default.mask,ref:d,onWheel:v,children:(0,n.jsxs)("div",{className:p()(c.default.modalContainer,e.className),"data-e2e":"report-container",children:[(0,n.jsx)("div",{className:c.default.close,onClick:r,"data-e2e":"report-container-close",children:(0,n.jsx)(f.n,{width:36,height:36,src:s.Z})}),l&&(0,n.jsx)("div",{className:c.default.title,children:l}),(0,n.jsx)("div",{className:c.default.content,children:t})]})}):null};var y=l("629686");l("374954");var b=l("90837"),C=l("624508"),N=new C.h({report_web:{eventName:"report_web",params:{report_type:"",object_id:"",enter_method:""}}}),L=l("974976"),I=l("216554");let S=e=>{let{selected:t,disable:l,label:i,className:o,onClick:r,value:s}=e,d=a.useCallback(()=>{r&&r(s,!t)},[s,t,r]);return(0,n.jsxs)("div",{className:p()(I.default.radioContainer,o),children:[(0,n.jsx)("div",{onClick:d,className:p()(I.default.radio,{[I.default.selected]:t,[I.default.disable]:l})}),i&&(0,n.jsx)("span",{className:I.default.label,children:i})]})};var k=l("794706");let M=e=>{let{notResize:t=!1,value:l,onChange:i,placeholder:o,maxLength:r,width:s,className:d,minHeight:u}=e,c=a.useRef(null),[v,f]=a.useState(),h=a.useCallback(e=>{let t=e.target.value;t.length<=r&&i(t)},[i]);return(0,n.jsxs)("div",{style:{width:s},className:p()(k.default.textareaContainer,d),children:[(0,n.jsx)("textarea",{value:l,ref:c,style:{minHeight:u,height:v},onChange:h,onKeyDown:e=>e.stopPropagation(),placeholder:o,className:k.default.textarea}),void 0!==r&&(0,n.jsxs)("div",{className:p()(k.default.count,{[k.default.overflow]:l.length>r}),children:[l.length,"/",r]})]})};var E=l("428584");function R(e){let{size:t="normal",type:l="primary",children:a,autoFixed:i=!0,className:o,width:r,style:s,theme:d="solid",disabled:u=!1,onClick:c=function(){}}=e;return(0,n.jsx)("button",{type:"button",disabled:u,onClick:c,className:p()(E.default.button,E.default[t],E.default[l],E.default[d],{[E.default.fixed]:!i},o),style:(0,y._)({width:r&&`${r}px`},s),children:a})}var A=e=>{let{reasons:t,type:l,object_id:i,isLive:o=!1,onLiveReport:r=()=>void 0,logParams:s,toast:d}=e,[u,c]=a.useState(""),[v,p]=a.useState(""),f=a.useMemo(()=>{let e={};for(let l=0;l{p(e)},[]),m=a.useCallback(()=>{!o&&(N.sendLog("report_web",(0,y._)({report_type:l,object_id:i},s)),null==e||e.onClose()),o&&(r(v,u),null==e||e.onClose()),d?d("提交成功",null==e?void 0:e.toastParent):L.F.info("提交成功",null==e?void 0:e.toastParent)},[v,u,r]);return(0,n.jsxs)("div",{className:b.default.reportContainer,"data-e2e":"report-container",children:[(0,n.jsxs)("div",{className:b.default.reasonList,children:[(0,n.jsx)("div",{className:b.default.col,children:(f[0]||[]).map(e=>(0,n.jsx)(S,{selected:v===e.value,label:e.label,value:e.value,className:b.default.reasonItem,onClick:h},e.value))}),(0,n.jsx)("div",{className:b.default.col,children:(f[1]||[]).map(e=>(0,n.jsx)(S,{selected:v===e.value,label:e.label,value:e.value,className:b.default.reasonItem,onClick:h},e.value))}),(0,n.jsx)("div",{className:b.default.col,children:(f[2]||[]).map(e=>(0,n.jsx)(S,{selected:v===e.value,label:e.label,value:e.value,className:b.default.reasonItem,onClick:h},e.value))})]}),(0,n.jsx)(M,{notResize:!0,maxLength:140,placeholder:"请详细描述举报原因,便于平台判断违规情况",minHeight:75,value:u,onChange:e=>c(e),className:b.default.reportDesc}),(0,n.jsx)(R,{className:b.default.submit,onClick:m,disabled:!v,children:"提交"})]})};let T=["色情低俗","违法犯罪","造谣传谣","垃圾广告","售卖假货","非原创内容","未成年人相关","其他"],P=["色情低俗","违法犯罪","造谣传谣","垃圾广告","骚扰","人身攻击","时政不实信息"],U=["色情低俗","违法犯罪","造谣传谣","垃圾广告","骚扰","人身攻击","时政不实信息"],O=["色情低俗","违法犯罪","造谣传谣","垃圾广告","售卖假货","未成年相关","头像、昵称、签名、背景图违规"],D=["违法违禁","淫秽色情","抽烟饮酒","欺诈/售假","未成年人相关","危险行为","录像/盗播","声音违规","诱导刷礼","引导线下转账","侮辱谩骂","其他"];var z=e=>{let[t,l]=(0,a.useState)(!0),[s,d]=a.useState(r.default.zoomIn),u=a.useCallback(()=>{d(r.default.zoomOut),setTimeout(()=>{var t;l(!1),i.unmountComponentAtNode(e.portalRef),e.portalRef.remove(),null===(t=e.onClose)||void 0===t||t.call(e)},300)},[t]);return(0,a.useEffect)(()=>()=>{o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!1)},[]),(0,n.jsx)(j,{title:e.title,visible:t,className:s,onCancel:u,children:(0,n.jsx)(A,{toast:null==e?void 0:e.toast,toastParent:e.toastParent,reasons:function(e){switch(e){case"video":return T.map(e=>({label:e,value:e}));case"comment":return P.map(e=>({label:e,value:e}));case"user":return O.map(e=>({label:e,value:e}));case"live":return D.map(e=>({label:e,value:e}));case"danmaku":return U.map(e=>({label:e,value:e}));default:return[]}}(e.type),onClose:u,object_id:e.object_id,type:e.type,isLive:!0,onLiveReport:e.onLiveReport,logParams:e.logParams})})},F=l("402748");l("706056"),l("362051");var B=l("254127"),W=l("557329");let{ArrowUp:G,ArrowDown:Z,W:q,S:V,Escape:H,N:$}=d.bf,J=e=>{let{visible:t,children:l,title:i,footer:o,className:r,footerClassName:d,onCancel:c,showClose:v=!0}=e,h=a.useRef(),m=e=>{e.stopPropagation()};return(a.useEffect(()=>{let e="report/ui/Modal";return(0,u.o)({disableKey:[Z,G,q,V,H,$].map(e=>e.code),pauseGlobalShortcut:!0},e),()=>{(0,u.m)(e)}},[]),(0,a.useEffect)(()=>{var e,t,l;return null===(e=h.current)||void 0===e||e.setAttribute("tabindex","0"),null===(t=h.current)||void 0===t||t.addEventListener("DOMMouseScroll",m),null===(l=h.current)||void 0===l||l.focus(),()=>{var e;null===(e=h.current)||void 0===e||e.removeEventListener("DOMMouseScroll",m)}},[t]),t)?(0,n.jsx)("div",{className:W.default.mask,ref:h,onWheel:m,children:(0,n.jsxs)("div",{className:p()(W.default.modalContainer,r),"data-e2e":"report-container",children:[v&&(0,n.jsx)("div",{className:W.default.close,onClick:()=>{"function"==typeof c&&c(!1)},"data-e2e":"report-container-close",children:(0,n.jsx)(f.n,{width:36,height:36,src:s.Z})}),i&&(0,n.jsx)("div",{className:W.default.title,children:i}),(0,n.jsx)("div",{className:W.default.content,children:l}),(0,n.jsx)("div",{className:p()(W.default.footer,d),children:o})]})}):null};var K=l("549419");function Q(e){let{children:t,className:l,width:a,style:i,disabled:o=!1,onClick:r=function(){}}=e;return(0,n.jsx)("button",{type:"button",disabled:o,onClick:r,className:p()(K.default.button,l),style:(0,y._)({width:a&&`${a}px`},i),children:t})}var X=l("356426"),Y=l("61061");let ee=e=>{let{label:t,value:l,checked:a,disabled:i,className:o,style:r,onCheck:s}=e;return(0,n.jsxs)("div",{className:p()(Y.default.container,o),style:r,children:[(0,n.jsx)("div",{onClick:()=>{"function"==typeof s&&s(l)},className:p()(Y.default.radio,{[Y.default.checked]:a,[Y.default.disabled]:i})}),t&&(0,n.jsx)("span",{className:Y.default.label,children:t})]})};var et=l("664186");let el=e=>{let{className:t,column:l=1,optionList:i,value:o,onChange:r}=e,s=(0,a.useMemo)(()=>({width:`${100/l}%`}),[l]);return Array.isArray(i)?(0,n.jsx)("div",{className:p()(et.default.container,t),children:i.map(e=>(0,n.jsx)(ee,{className:et.default.radio,style:s,label:e.label,value:e.value,checked:o===e.value,onCheck:r},e.value))}):null};var en=l("39711"),ea=l("237727"),ei=l("863822"),eo=l("661540");let er=e=>{let{value:t,className:l,onClick:a}=e;return(0,n.jsxs)("div",{className:p()(ei.default.container,l),onClick:a,children:[(0,n.jsx)("div",{className:ei.default.text,children:t}),(0,n.jsx)(f.n,{className:ei.default.icon,src:eo.Z,width:24,height:24})]})};var es=l("600767");let ed=e=>{let{objectId:t,schemaType:l=1}=e,[i,o]=(0,a.useState)();return(0,a.useEffect)(()=>{let n=`schema_type=${l}&object_id=${t}`;(0,es.ep)(e.objectId,{schema:n}).then(e=>{!e||(null==e?void 0:e.statusCode)?L.F.info("服务器打瞌睡了,请稍后再试"):o(null==e?void 0:e.qrcodeUrl)})},[t,l]),(0,n.jsx)("img",{className:e.className,src:i})};var eu=l("392188");let ec=(0,a.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,F._)((0,y._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M20.566 9.364a1.929 1.929 0 0 1 2.727 2.727l-5.637 5.637 5.637 5.637a1.928 1.928 0 1 1-2.727 2.727l-6.985-6.985-.016-.015a1.929 1.929 0 0 1 0-2.728l7-7z",fill:"#0A0C20"})})));var ev=e=>{let{visible:t,defaultValue:l=[],onCancel:i,onOk:o}=e,[r,s]=(0,a.useState)(l),{ReportEntry:d}=window;return d?(0,n.jsx)(J,{title:(0,n.jsxs)("div",{className:eu.default.title,children:[(0,n.jsx)(f.n,{className:eu.default.icon,src:ec,width:24,height:24,onClick:()=>i()}),(0,n.jsx)("div",{children:"选择聊天证据"})]}),visible:t,showClose:!1,onCancel:()=>i(),footer:(0,n.jsx)(Q,{style:{width:"100%"},onClick:()=>o(r),disabled:!r.length,children:"确定"}),children:(0,n.jsx)("div",{className:eu.default.messageContainer,children:(0,n.jsx)(d,{onMessageSelect:e=>s(e),selectedMessage:r})})}):null},ep=l("599961");l("679308");var ef=l("987826"),eh=l("911429"),em={VIDEO:101,101:"VIDEO",COMMENT:102,102:"COMMENT",USER:103,103:"USER",IMAGE:126,126:"IMAGE",IM:106,106:"IM",IM_GROUP:115,115:"IM_GROUP"};let{APP_ID:eg,CLIENT_APP_ID:e_}=ef,ex={157:101,161:126};function ew(e){return 60448===e||113===e}let ej=[{label:"侵犯权益",value:"侵犯权益",piracy:!0,children:[{label:"侵犯我/我的组织的权益",value:"侵犯我/我的组织的权益"},{label:"侵犯他人权益",value:"侵犯他人权益",needInfringementExtra:!0,infringementTypeOptions:[{label:"不当使用肖像",value:60579,description:"肖像被丑化污损、或未经他人授权使用"},{label:"损害个人名誉",value:60582,description:"捏造事实或侮辱、诋毁他人"},{label:"损害企业商誉",value:60583,description:"捏造、传播企业负面信息、虚假信息,影响企业信誉、破坏企业形象"},{label:"不当改编作品",value:60585,description:"未经授权搬运/抄袭他人原创内容"},{label:"冒充身份",value:60581,description:"身份信息、账号资料被他人仿冒"},{label:"假冒商标",value:60586,description:"未经许可使用与他人注册商标相同或近似标识"},{label:"假冒专利",value:60587,description:"未经许可实施他人专利技术、使用他人专利方法"},{label:"侵犯未成年权益",value:60558,description:"未成年人被不当使用肖像、侮辱诽谤等"},{label:"不属于以上类型",value:60588,description:""}]}]}];function ey(e){let t=new Map,l=e=>{var n;t.set(e.value,e),null===(n=e.children)||void 0===n||n.forEach(l)};return e.forEach(l),t}function eb(e){var t,l,n,a,i,o;return null!==(o=null!==(i=null!==(a=null!==(n=null!==(l=null!==(t=null==e?void 0:e.label)&&void 0!==t?t:null==e?void 0:e.text)&&void 0!==l?l:null==e?void 0:e.reason_str)&&void 0!==n?n:null==e?void 0:e.serial_str)&&void 0!==a?a:null==e?void 0:e.name)&&void 0!==i?i:null==e?void 0:e.category_name)&&void 0!==o?o:null==e?void 0:e.reason}function eC(e){if(Array.isArray(e))return e;if("string"==typeof e)try{let t=JSON.parse(e);return Array.isArray(t)?t:void 0}catch(e){return}}let eN=e=>{var t;let{jumpTextClassName:l,showJumpText:a,selectedReportLabel:i,selectedSubReportLabel:o,needInfringementExtra:r,subLabel:s,infringementOwner:d,infringementType:u,onSubLabelChange:c,onInfringementOwnerChange:v,onInfringementTypeChange:p}=e;return(null==i?void 0:null===(t=i.children)||void 0===t?void 0:t.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择侵权类型",required:!0}),(0,n.jsx)(el,{column:2,optionList:i.children,value:s,onChange:c}),!!r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"你认为该内容侵犯了谁的权益",required:!0}),(0,n.jsx)(en.K,{maxLength:140,minHeight:68,placeholder:"请输入被侵权个人/企业/机构名称",value:d||"",onChange:v}),(0,n.jsx)(X._,{text:"侵权类型",required:!0}),(0,n.jsx)(el,{column:3,optionList:(null==o?void 0:o.infringementTypeOptions)||[],value:u,onChange:p})]}),a&&(0,n.jsx)("div",{className:l,children:"侵权问题需要详细举证,提交后进入批量侵权举报页面"})]}):null};var eL=l("72986");let eI=e=>{var t,l,i,o,r,s,d,u,c;let{reportScene:v,reasonList:p,reasonMap:f,onChange:h}=e,[m,g]=(0,a.useState)(),[_,x]=(0,a.useState)(),[w,j]=(0,a.useState)(),[y,b]=(0,a.useState)(),[C,N]=(0,a.useState)(),[L,I]=(0,a.useState)(),S=function(e){var t,l,n,i,o,r,s,d;let{reasonMap:u,primary:c,label:v}=e,[p,f]=(0,a.useState)(),[h,m]=(0,a.useState)(),[g,_]=(0,a.useState)();let x=(t=u,l=c,n=v,null===(o=t.get(l))||void 0===o?void 0:null===(i=o.report_labels)||void 0===i?void 0:i.find(e=>e.value===n));let w=(r=x,s=p,null==r?void 0:null===(d=r.children)||void 0===d?void 0:d.find(e=>e.value===s)),j=null==w?void 0:w.needInfringementExtra;return{subLabel:p,infringementOwner:h,infringementType:g,selectedReportLabel:x,selectedSubReportLabel:w,needInfringementExtra:j,resetInfringementState:()=>{f(void 0),m(void 0),_(void 0)},handleSubLabelChange:e=>{f(e),m(void 0),_(void 0)},setInfringementOwner:m,setInfringementType:_}}({reasonMap:f,primary:m,label:w}),{subLabel:k,infringementOwner:M,infringementType:E,selectedReportLabel:R,selectedSubReportLabel:A,needInfringementExtra:T,resetInfringementState:P}=S;let U=(d=f,ew(u=m)||(null===(c=d.get(u))||void 0===c?void 0:c.piracy)),O=124===m,D=!!T,z=U||(null==R?void 0:R.piracy)&&!D,F=m===eL.u2,B=(null===(t=f.get(m))||void 0===t?void 0:t.textAreaDesc)||"请详细描述举报原因,便于平台判断违规情况";return(0,a.useEffect)(()=>{let e=F?!!C:function(e){let{isJumpQinquan:t,isPrimaryJumpQinquan:l,label:n,subLabel:a,needInfringementExtra:i,infringementOwner:o,infringementType:r,reportDesc:s,reportScene:d,secondary:u,primary:c}=e;return!!l||(i?!!(a&&o&&r&&(null==s?void 0:s.trim())):t?a:124===c?!!n:d===em.USER?u:c&&!t)}({isJumpQinquan:z,isPrimaryJumpQinquan:U,label:w,subLabel:k,needInfringementExtra:T,infringementOwner:M,infringementType:E,reportDesc:y,reportScene:v,secondary:_,primary:m});h({reasonCode:_||m,reportLabels:k||w,reportDesc:y,originalLink:C,imgList:L,infringementOwner:M,infringementType:E,validate:e})},[m,_,w,k,y,C,L,M,E,T,z,U,F]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"举报原因",required:!0}),(0,n.jsx)(el,{column:3,optionList:p,value:m,onChange:e=>{g(e),x(void 0),j(void 0),N(void 0),P()}}),F?(0,n.jsx)(eL.vr,{originalLink:C,reportDesc:y,reportDescPlaceholder:B,images:L,onOriginalLinkChange:N,onReportDescChange:b,onImagesChange:I}):U?(0,n.jsx)("div",{className:ep.default.jumpText,children:"侵权问题需要详细举证,提交后进入批量侵权举报页面"}):(0,n.jsxs)(n.Fragment,{children:[(null===(i=f.get(m))||void 0===i?void 0:null===(l=i.children)||void 0===l?void 0:l.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型",required:v===em.USER}),(0,n.jsx)(el,{column:3,optionList:null===(o=f.get(m))||void 0===o?void 0:o.children,value:_,onChange:x})]}),(null===(s=f.get(m))||void 0===s?void 0:null===(r=s.report_labels)||void 0===r?void 0:r.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型",required:O}),(0,n.jsx)(el,{column:3,optionList:f.get(m).report_labels,value:w,onChange:e=>{j(e),P()}})]}),(0,n.jsx)(eN,{jumpTextClassName:ep.default.jumpText,showJumpText:!!((null==R?void 0:R.piracy)&&!T),selectedReportLabel:R,selectedSubReportLabel:A,needInfringementExtra:T,subLabel:k,infringementOwner:M,infringementType:E,onSubLabelChange:S.handleSubLabelChange,onInfringementOwnerChange:S.setInfringementOwner,onInfringementTypeChange:S.setInfringementType}),(!(null==R?void 0:R.piracy)||T)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"举报描述",required:!!T}),(0,n.jsx)(en.K,{maxLength:200,placeholder:B,minHeight:75,value:y,onChange:b}),(0,n.jsxs)("div",{className:ep.default.uploadContainer,children:[(0,n.jsx)(ea.U,{value:L,onChange:I}),(0,n.jsx)("div",{className:ep.default.uploadTips,children:"每张小于 10M,支持JPG、PNG格式,最多上传4张"})]})]})]})]})},eS=e=>{var t,l,i,o,r;let{reasonList:s,reasonMap:d,onChange:u}=e,[c,v]=(0,a.useState)(),[p,f]=(0,a.useState)(),[h,m]=(0,a.useState)(),[g,_]=(0,a.useState)(),[x,w]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=c&&(null==g?void 0:g.length);u({reasonCode:p||c,reportLabels:h,chatList:g,validate:e})},[c,p,h,g]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"举报原因",required:!0}),(0,n.jsx)(el,{column:3,optionList:s,value:c,onChange:e=>{v(e),f(void 0),m(void 0)}}),(null===(l=d.get(c))||void 0===l?void 0:null===(t=l.children)||void 0===t?void 0:t.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型"}),(0,n.jsx)(el,{column:3,optionList:null===(i=d.get(c))||void 0===i?void 0:i.children,value:p,onChange:f})]}),(null===(r=d.get(c))||void 0===r?void 0:null===(o=r.report_labels)||void 0===o?void 0:o.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型"}),(0,n.jsx)(el,{column:3,optionList:d.get(c).report_labels,value:h,onChange:m})]}),(0,n.jsx)(X._,{text:"聊天证据",required:!0}),(0,n.jsx)(er,{value:(null==g?void 0:g.length)?`已添加${g.length}条聊天证据`:"添加聊天证据",onClick:()=>w(!0)}),(0,n.jsx)(ev,{visible:x,defaultValue:g,onCancel:()=>w(!1),onOk:e=>{_(e),w(!1)}})]})},ek=e=>{var t,l,i,o,r;let{videoId:s,reasonList:d,reasonMap:u,onChange:c}=e,[v,p]=(0,a.useState)(),[f,h]=(0,a.useState)(),[m,g]=(0,a.useState)();return(0,a.useEffect)(()=>{let e=v&&60466!==v;c({reasonCode:f||v,reportLabels:m,validate:e})},[v,f,m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"举报原因",required:!0}),(0,n.jsx)(el,{column:3,optionList:d,value:v,onChange:e=>{p(e),h(void 0),g(void 0)}}),60466===v?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ep.default.infringement,children:["侵权问题需要详细举证,可扫描下方抖音码前往",(0,n.jsx)("br",{}),"「抖音APP」进行侵权举报"]}),(0,n.jsx)(ed,{className:ep.default.douyinCode,objectId:s})]}):(0,n.jsxs)(n.Fragment,{children:[(null===(l=u.get(v))||void 0===l?void 0:null===(t=l.children)||void 0===t?void 0:t.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型"}),(0,n.jsx)(el,{column:3,optionList:null===(i=u.get(v))||void 0===i?void 0:i.children,value:f,onChange:h})]}),(null===(r=u.get(v))||void 0===r?void 0:null===(o=r.report_labels)||void 0===o?void 0:o.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X._,{text:"请选择具体的类型"}),(0,n.jsx)(el,{column:3,optionList:u.get(v).report_labels,value:m,onChange:g})]})]})]})};var eM=e=>{let{reportScene:t,reasonData:l,dataSource:a,onValuesChange:i}=e,{video_id:o}=a,{reasonList:r=[],reasonMap:s=new Map}=l;return(0,n.jsxs)("div",{children:[[em.VIDEO,em.IMAGE,em.USER].includes(t)&&(0,n.jsx)(eI,{reportScene:t,reasonList:r,reasonMap:s,onChange:i}),[em.IM,em.IM_GROUP].includes(t)&&(0,n.jsx)(eS,{reasonList:r,reasonMap:s,onChange:i}),[em.COMMENT].includes(t)&&(0,n.jsx)(ek,{videoId:o,reasonList:r,reasonMap:s,onChange:i})]})},eE=l("395677"),eR=l("414061"),eA=l("837095"),eT=new C.h({enter_report_edit_page:{eventName:"enter_report_edit_page",params:{object_type:"",object_id:"",enter_from:""}},report_submit:{eventName:"report_submit",params:{object_type:"",object_id:"",enter_from:"",follow_status:"",reason_type:"",report_labels:""}},report_comment:{eventName:"report_comment",params:{comment_panel_position:"",comment_category:"",object_type:"",object_id:"",comment_id:"",enter_from:"",follow_status:"",reason_type:"",report_labels:""}}}),eP=l("395823"),eU=l("121998"),eO=e=>{var t,l,r;let{pipelineId:s,dataSource:d,logParams:u,onReport:c,toast:v}=e,{object_id:f,owner_id:h,owner_sec_id:m,user_id:g,comment_with_emoji:_,enter_from:x,con_short_id:w,type:j}=d,[b,C]=(0,a.useState)(!0),[N,I]=a.useState(B.default.zoomIn),[S,k]=(0,a.useState)(),[M,E]=(0,a.useState)(),R=function(e,t,l){var n,a;if(!l)return;let i=(null==e?void 0:null===(a=e.reasonMap)||void 0===a?void 0:null===(n=a.get(t))||void 0===n?void 0:n.report_labels)||[],o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;for(let a of e){let e=t||(null==a?void 0:a.piracy);if((null==a?void 0:a.value)===l)return{label:a.label,parentLabel:n,piracy:e,needInfringementExtra:a.needInfringementExtra,infringementTypeOptions:a.infringementTypeOptions};let i=o((null==a?void 0:a.children)||[],e,null==a?void 0:a.label);if(i)return i}};return o(i)}(null==S?void 0:S.reasonData,null==M?void 0:M.reasonCode,null==M?void 0:M.reportLabels),A=M&&(ew(M.reasonCode)||(null==S?void 0:null===(r=S.reasonData)||void 0===r?void 0:null===(l=r.reasonMap)||void 0===l?void 0:null===(t=l.get(M.reasonCode))||void 0===t?void 0:t.piracy)||(null==R?void 0:R.piracy)&&!(null==R?void 0:R.needInfringementExtra)),T=a.useCallback(()=>{I(B.default.zoomOut),setTimeout(()=>{var t;C(!1),i.unmountComponentAtNode(e.portalRef),e.portalRef.remove(),null===(t=e.onClose)||void 0===t||t.call(e)},300)},[e.onClose]);(0,a.useEffect)(()=>{let e=eR.listen(eR.EVENT.hideModal,T);return()=>{e()}},[T]),(0,a.useEffect)(()=>()=>{o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!1)},[]),(0,eE.O)({onChange:e=>{let{isFullscreen:t}=e;t&&T()}});let P=(e,t)=>v?null==v?void 0:v(e,t):L.F.info(e,t),U=async()=>{var e,t,l;let n,a,i,o;let r=await (0,eP.b)(m),{reasonCode:s,reportLabels:d,reportDesc:v,originalLink:p,imgList:_,chatList:b,infringementOwner:C,infringementType:N}=M,{reportScene:L,reasonData:I}=S;if(A){let e="";if("video"===j){if(f){let t=window.location.href;e=eU.stringifyUrl({url:t,query:{modal_id:f}})}}else"user"===j&&m&&(e=`https://www.douyin.com/user/${m}`);let t=eU.stringifyUrl({url:"https://www.douyin.com/qinquan/report?enter_from=pc_douyin",query:{item_info:e}});window.open(t,"_blank"),T();return}d&&(n=(null==R?void 0:R.needInfringementExtra)?null==R?void 0:R.parentLabel:null==R?void 0:R.label),(null==_?void 0:_.length)&&(a=null==_?void 0:_.map(e=>e.Uri).join(","),o=_.map(e=>({_type:"normal_image_info",uri:e.Uri,tpl:"_tos_raw"}))),(null==b?void 0:b.length)&&(i=b.join(","));let k=60576===s,E=k?(0,y._)({original_item_external_url:p,source:x},o?{customized_image_uri_list:o}:{}):(0,y._)({follow_status:null==r?void 0:r.follow_status,con_short_id:w,im_message_list:i,source:x},o?{customized_image_uri_list:o}:{}),U=124===s&&(null==R?void 0:R.label)==="侵犯他人权益",O=null==R?void 0:null===(e=R.infringementTypeOptions)||void 0===e?void 0:e.find(e=>e.value===N),D=(0,F._)((0,y._)((0,F._)((0,y._)({app_id:6383,object_id:f,owner_id:h,user_id:g,reported_id:g},k?{enter_from:x}:{}),{report_type:L,reason:s,reason_text:null==I?void 0:null===(l=I.reasonMap)||void 0===l?void 0:null===(t=l.get(s))||void 0===t?void 0:t.label,report_labels:n,report_desc:v,uri:a,image_uri_list:a}),U?{infringed_subject:C,infringed_reason:N,infringed_reason_str:null==O?void 0:O.label}:{}),{msg_list:[em.IM,em.IM_GROUP].includes(L)?i:void 0,report_data:JSON.stringify(E)});(0,eh.v_)("/aweme/v1/report/submit/",{},D).then(e=>{switch(!0){case 2159===e.status_code:P("你已举报过该内容,请稍后再试");break;case 0===e.status_code:eT.sendLog("report_submit",(0,y._)({object_type:S.reportScene,object_id:f,enter_from:x,follow_status:null==r?void 0:r.follow_status,reason_type:s,report_labels:n},u)),(null==S?void 0:S.reportScene)===102&&eT.sendLog("report_comment",(0,y._)({object_type:S.reportScene,object_id:f,enter_from:x,follow_status:null==r?void 0:r.follow_status,reason_type:s,report_labels:n},u)),P("提交成功,我们将尽快受理");break;default:P("提交失败,请稍后再试")}T(),null==c||c(0===e.status_code)}).catch(()=>P("服务器打瞌睡了,请稍后再试"))};return((0,a.useEffect)(()=>{(function(e,t){let l=e?ex[e]:void 0;return l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,l=arguments.length>2?arguments[2]:void 0;return(0,eh.U2)("/aweme/v1/report/reason/",{aid:eg,report_type:e,scene:t,object_id:l},{},"").then(t=>{if((null==t?void 0:t.status_code)&&0!==t.status_code)return Promise.reject(t);let l=function e(t){return Array.isArray(t)?t.map(t=>{var l,n,a,i,o,r,s;let d=eb(t),u=function(e){var t,l,n,a,i,o;let r=Number(null!==(o=null!==(i=null!==(a=null!==(n=null!==(l=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:null==e?void 0:e.reason_type)&&void 0!==l?l:null==e?void 0:e.reason_code)&&void 0!==n?n:null==e?void 0:e.code)&&void 0!==a?a:null==e?void 0:e.serial_id)&&void 0!==i?i:null==e?void 0:e.category)&&void 0!==o?o:null==e?void 0:e.reason);return Number.isNaN(r)?void 0:r}(t);if(!d||void 0===u)return null;let c=e(null!==(o=null!==(i=null!==(a=null==t?void 0:t.children)&&void 0!==a?a:null==t?void 0:null===(n=t.next_reasons)||void 0===n?void 0:null===(l=n[0])||void 0===l?void 0:l.list)&&void 0!==i?i:null==t?void 0:t.reason_list)&&void 0!==o?o:null==t?void 0:t.sub_reasons);let v=Array.isArray(s=null==t?void 0:t.report_labels)?s.map(e=>{var t,l,n,a;if("string"==typeof e)return{label:e,value:e};let i=eb(e),o=null!==(n=null!==(l=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:null==e?void 0:e.code)&&void 0!==l?l:null==e?void 0:e.name)&&void 0!==n?n:null==e?void 0:e.label;return i&&void 0!==o?{label:i,value:o,textAreaDesc:null!==(a=null==e?void 0:e.text_area_desc)&&void 0!==a?a:null==e?void 0:e.textAreaDesc}:null}).filter(e=>!!e):[],p=function(e,t){let l=new Map(t.map(e=>[e.value,e]));return[...e.map(e=>{let t=l.get(e.value);return t?(l.delete(e.value),(0,F._)((0,y._)({},e),{piracy:e.piracy||t.piracy,children:e.children||t.children,needInfringementExtra:e.needInfringementExtra||t.needInfringementExtra,infringementTypeOptions:e.infringementTypeOptions||t.infringementTypeOptions,report_labels:e.report_labels||t.report_labels})):e}),...l.values()]}(v,124===u?ej:[]);return{label:d,value:u,textAreaDesc:null!==(r=null==t?void 0:t.text_area_desc)&&void 0!==r?r:null==t?void 0:t.textAreaDesc,piracy:null==t?void 0:t.piracy,children:c.length?c:void 0,report_labels:p.length?p:void 0}}).filter(e=>!!e):[]}(function(e){var t,l;let n=null!==(t=null==e?void 0:e.data)&&void 0!==t?t:e;return null!==(l=[eC(null==e?void 0:e.records),null==e?void 0:e.reason_list,null==e?void 0:e.reasons,null==e?void 0:e.report_reasons,null==e?void 0:e.category_list,eC(null==n?void 0:n.records),null==n?void 0:n.reason_list,null==n?void 0:n.reasons,null==n?void 0:n.report_reasons,null==n?void 0:n.category_list,Array.isArray(n)?n:void 0].find(e=>Array.isArray(e)))&&void 0!==l?l:[]}(t));return{reportScene:e,reasonData:{reasonList:l,reasonMap:ey(l)}}})}(l,1,t):function(e){return fetch(`https://lf-mortise.douyinstatic.com/obj/mortise-online/online/${e}_3364`).then(e=>e.json()).then(e=>{var t;let{reportScene:l,reasonCode:n}=e.pluginData;let a=Array.isArray(t=n)?t[0].list.map(e=>{let{reason_code:t,next_reasons:l,report_labels:n}=e.data;return{label:e.text,value:t,children:Array.isArray(l)?l[0].list.map(e=>({label:e.text,value:e.data.reason_code})):void 0,report_labels:Array.isArray(n)?n.map(e=>({label:e.name,value:e.code})):void 0}}):[];return{reportScene:l,reasonData:{reasonList:a,reasonMap:ey(a)}}})}(e)})(s,f).then(e=>{(0,eA.Z)(g),eT.sendLog("enter_report_edit_page",(0,y._)({object_type:e.reportScene,object_id:f,enter_from:x},u)),1===_&&e.reasonData.reasonList.push({label:"表情包侵权",value:60466}),k(e)}).catch(()=>P("服务器打瞌睡了,请稍后再试",null==e?void 0:e.toastParent))},[]),S&&d)?(0,n.jsx)(J,{title:e.title,visible:b,className:p()(N,A?B.default.jumpText:""),footerClassName:A?B.default.jumpTextFooter:"",onCancel:T,footer:(0,n.jsx)(Q,{className:B.default.submit,onClick:U,disabled:!(null==M?void 0:M.validate),children:"提交"}),children:(0,n.jsx)(eM,{dataSource:d,reportScene:S.reportScene,reasonData:S.reasonData,onValuesChange:E})}):null};l("313036"),l("414931");var eD=l("732992"),ez=l("636435"),eF=l("77758");let eB=e=>{let{value:t="",onChange:l,placeholder:a}=e;return(0,n.jsx)("input",{className:eF.default.container,placeholder:a,value:t,onChange:e=>l(e.target.value)})};var eW=l("387098");function eG(e){let{className:t,text:l,textClassName:a}=e;return(0,n.jsxs)("div",{className:p()(eW.default.container,t,"HideInLynxClassName"),children:[(0,n.jsx)("div",{className:eW.default.loading}),l&&(0,n.jsx)("div",{className:p()(eW.default.text,a),children:l})]})}var eZ=l("325508"),eq=l("115855"),eV=l("55016");let eH=(0,a.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,F._)((0,y._)({width:4,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M0 0a8 8 0 0 0 2.168 5.476l1.174 1.25a2 2 0 0 1 0 2.738l-1.174 1.25A8 8 0 0 0 0 16.19V0z",fill:"#323442"})})));var e$=l("385987"),eJ=l("708372"),eK={left:"top",right:"top",top:"left",bottom:"left"};let eQ=e=>{let{type:t="left",text:l,offsetArrow:o,offsetContainer:r,className:s,children:d,onTipClick:u,renderContent:c,clickHidden:v=!1,target:h,offsetWidth:m=0}=e,[g,_]=(0,a.useState)({width:0,height:0}),[x,w]=(0,a.useState)(t),[j,b]=(0,a.useState)(!1),[C,N]=(0,a.useState)({}),L=(0,a.useRef)(null),I=(0,a.useRef)(),S=(0,a.useRef)(null),k=(0,a.useMemo)(()=>(0,e$.h)(h),[h]),M=(0,a.useMemo)(()=>(0,eJ.d)(k,"HTMLBodyElement"),[k]),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=window.innerWidth,i=window.innerHeight;return{left:e<0?e:0,top:t<0?t:0,right:e+l>a?a-e-l:0,bottom:t+n>i?i-t-n:0}},R=function(){clearTimeout(S.current),S.current=setTimeout(()=>{b(!1)},200)},A=(0,a.useCallback)(()=>{if(!L.current)return{};let e=I.current.getBoundingClientRect(),{width:l,height:n}=e,a=M?e.x:0,i=M?e.y:0,o=(g.width-l)/2,s=(g.height-n)/2;if(["left","right"].includes(t)){switch(t){case"left":a-=g.width+10;break;case"right":a+=l+10}"number"==typeof r?i+=r:i+=-s}else if(["top","bottom"].includes(t)){switch(t){case"top":i-=g.height+10;break;case"bottom":i+=n+10}"number"==typeof r?a+=r:a+=-o}if(M){let{top:e,left:o,right:r,bottom:s}=E(a,i,g.width,g.height);w(t),["left","right"].includes(t)?(e&&(i-=e),s&&(i+=s),o&&!r&&(a+=g.width+20+l,w("right")),r&&!o&&(a-=g.width+20+l,w("left"))):["top","bottom"].includes(t)&&(o&&(a-=o+m),r&&(a+=r-m),e&&!s&&(i+=g.height+20+n,w("bottom")),s&&!e&&(i-=g.height+20+n,w("top")))}return(0,F._)((0,y._)({},C),{left:`${a}px`,top:`${i}px`})},[C,g,r,t,M]),T=(0,a.useCallback)(()=>{let e=a.Children.only(d);return a.cloneElement(e,{onMouseEnter:t=>{var l,n;clearTimeout(S.current),b(!0),I.current=t.target,N(A()),null==e||null===(n=e.props)||void 0===n||null===(l=n.onMouseEnter)||void 0===l||l.call(n,t)},onMouseLeave:()=>{R()}})},[A,d]);(0,a.useEffect)(()=>{let e=e=>{if(!!j)N(A())};return document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("scroll",e,!0)}},[A,j]),(0,a.useLayoutEffect)(()=>{if(!!L.current)_(L.current.getBoundingClientRect())},[j]),(0,a.useLayoutEffect)(()=>{I.current&&N(A())},[g]);let P=(0,a.useMemo)(()=>(0,n.jsxs)("div",{ref:L,style:(0,y._)({position:M?"fixed":"absolute"},C),onMouseEnter:e=>{clearTimeout(S.current)},onMouseLeave:()=>{R()},className:p()(eV.default.tooltip,eV.default[t],s),onClick:e=>{null==u||u(e),v&&b(!1)},children:[(0,n.jsx)(f.n,{width:4,height:17,src:eH,style:{[eK[x]]:`${o}%`},className:p()(eV.default.icon,eV.default[x]),viewBox:"0 0 4 17"}),(0,n.jsx)("span",{className:"",children:c||l})]}),[x,s,v,o,u,c,l,C,t,M]);return(0,n.jsxs)(n.Fragment,{children:[j&&i.createPortal(P,k),T()]})};function eX(e){return(0,n.jsxs)("svg",{className:e.className,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M6.31015 4.19993C6.30457 3.81502 6.61505 3.5 7 3.5C7.38495 3.5 7.69543 3.81502 7.68984 4.19993L7.63803 7.77116C7.63297 8.11992 7.3488 8.4 7 8.4C6.6512 8.4 6.36703 8.11992 6.36197 7.77116L6.31015 4.19993Z"}),(0,n.jsx)("path",{d:"M7 10.64C7.42526 10.64 7.77 10.2953 7.77 9.87C7.77 9.44474 7.42526 9.1 7 9.1C6.57474 9.1 6.23 9.44474 6.23 9.87C6.23 10.2953 6.57474 10.64 7 10.64Z"}),(0,n.jsx)("path",{d:"M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM7 12.95C3.71391 12.95 1.05 10.2861 1.05 7C1.05 3.71391 3.71391 1.05 7 1.05C10.2861 1.05 12.95 3.71391 12.95 7C12.95 10.2861 10.2861 12.95 7 12.95Z"})]})}function eY(e){let{text:t,tooltip:l}=e,i=(0,a.useRef)();return(0,n.jsxs)("div",{className:eq.default.categoryTextContainer,children:[(0,n.jsx)("div",{className:eq.default.categoryText,children:t}),l&&(0,n.jsx)(eQ,{text:l,type:"right",target:i.current,children:(0,n.jsx)("div",{className:eq.default.iconContainer,ref:i,children:(0,n.jsx)(eX,{className:eq.default.alertCircle})})})]})}function e0(e){let{dataList:t=[],value:l,onChange:a}=e;return(0,n.jsx)("div",{className:eq.default.dataItemList,children:t.map(e=>(0,n.jsx)(ee,{className:eq.default.dataItem,style:e.label.length>=7?{width:"calc(100% - 40px)"}:void 0,label:e.label,checked:(null==l?void 0:l.value)===e.value,value:e.value,onCheck:()=>a(e)},e.value))})}function e1(e){let{dataList:t=[],value:l,onChange:a}=e;return(0,n.jsx)("div",{className:eq.default.container,children:t.map(e=>{let{name:t,tooltip:i,children:o=[]}=e;return(0,n.jsxs)("div",{className:eq.default.categoryItemList,children:[t&&(0,n.jsx)(eY,{text:t,tooltip:i}),(0,n.jsx)(e0,{dataList:o,value:l,onChange:a})]},t)})})}function e2(){return(0,n.jsxs)("svg",{className:eD.default.svg,viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M6.12852 1.14357C5.95738 0.680906 5.51668 0.351562 5 0.351562C4.48332 0.351562 4.04262 0.680906 3.87148 1.14357C2.4282 1.62362 1.38595 2.9984 1.38595 4.62081V5.837C1.38595 6.52216 1.19579 7.19354 0.837147 7.77455L0.11565 8.94342C-0.19778 9.45119 0.162759 10.1098 0.754132 10.1098H9.24587C9.83724 10.1098 10.1978 9.45119 9.88435 8.94342L9.16285 7.77455C8.80421 7.19354 8.61405 6.52216 8.61405 5.837V4.62081C8.61405 2.9984 7.5718 1.62361 6.12852 1.14357Z"}),(0,n.jsx)("path",{d:"M5 12.3969C4.07376 12.3969 3.27772 11.8324 2.92917 11.0247H7.07083C6.72228 11.8324 5.92624 12.3969 5 12.3969Z"})]})}let e3=e=>{var t,l,i,o;let{dataSource:r,onChange:s}=e,[d,u]=(0,a.useState)(),[c,v]=(0,a.useState)(),[p,f]=(0,a.useState)(),[h,m]=(0,a.useState)(),[g,_]=(0,a.useState)(),[x,w]=(0,a.useState)(),j=(0,a.useRef)(),y=(0,a.useRef)(),b=(0,a.useMemo)(()=>{let e={};return r.forEach(t=>{let{label:l,tips:n}=t;e[l]?e[l].children=e[l].children.concat(t):e[l]={name:l,tooltip:n,children:[t]}}),Object.values(e).map(e=>{let{name:t,tooltip:l,children:n}=e;return{name:t,tooltip:l,children:n.map(e=>{let{text:t,reason_type_id:l,sub_reason_list:n=[],toast:a}=e;return{label:t,value:l,children:n.map(e=>({label:e.text,value:e.reason_type_id})),extra:a}})}})},[r]);return(0,a.useEffect)(()=>{switch(!0){case(null==d?void 0:d.value)===void 0:case(null==d?void 0:d.value)===18&&!(null==x?void 0:x.length):case(null==d?void 0:d.value)===18&&!p:case(null==x?void 0:x.includes(1))&&!h:s({verified:!1});break;default:s({reasonData:d,subReasonData:c,desc:p,info:h,images:g,codes:x,verified:!0})}},[d,c,p,h,g,x,s]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:eD.default.titleBar,children:[(0,n.jsx)(e2,{}),(0,n.jsx)("div",{className:eD.default.title,children:"您的举报我们将尽快受理,核实后我们将第一时间告知受理结果,请尽量提交完整的举报描述及材料。"})]}),(0,n.jsx)(X._,{text:"举报原因",required:!0}),(0,n.jsx)(e1,{dataList:b,onChange:e=>{if(e.value!==(null==d?void 0:d.value))setTimeout(()=>{var t,l,n,a;(null==e?void 0:e.value)===18?null===(l=y.current)||void 0===l||null===(t=l.scrollIntoView)||void 0===t||t.call(l,{behavior:"smooth",block:"nearest"}):null===(a=j.current)||void 0===a||null===(n=a.scrollIntoView)||void 0===n||n.call(a,{behavior:"smooth",block:"nearest"})},0),v(void 0),w(void 0),u(e)},value:d}),(null==d?void 0:d.value)!==18&&(null==d?void 0:null===(t=d.children)||void 0===t?void 0:t.length)>0&&(0,n.jsxs)("div",{ref:j,children:[(0,n.jsx)(X._,{text:"请选择具体的举报类型(选填)"}),(0,n.jsx)(e0,{dataList:null==d?void 0:d.children,onChange:v,value:c})]}),(null==d?void 0:d.value)===18&&(null==d?void 0:null===(l=d.children)||void 0===l?void 0:l.length)>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:eD.default.divider}),(0,n.jsxs)("div",{className:eD.default.description,ref:y,children:["权利人请通过广告投诉平台",(0,n.jsxs)("a",{className:eD.default.link,href:"https://phoniex.toutiao.com/phoniex/index",target:"_blank",rel:"noreferrer",children:[" ","https://phoniex.toutiao.com/phoniex/index"," "]}),"进行投诉,同时上传具体材料(权利人身份证明、侵权内容及权利证明等)"]}),(0,n.jsx)(X._,{text:"举报类型(多选)",required:(null==d?void 0:d.value)===18}),(0,n.jsx)(ez.C,{optionList:null==d?void 0:d.children,value:x,onChange:w}),(0,n.jsx)(X._,{text:(null==x?void 0:null===(i=x.includes)||void 0===i?void 0:i.call(x,1))?"原作者信息":"原作者信息(选填)",required:null==x?void 0:null===(o=x.includes)||void 0===o?void 0:o.call(x,1)}),(0,n.jsx)(eB,{placeholder:"原创作者抖音名称、作品链接或其他信息",value:h,onChange:m})]}),(0,n.jsx)(X._,{text:(null==d?void 0:d.value)===18?"举报描述":"举报描述(选填)",required:(null==d?void 0:d.value)===18}),(0,n.jsx)(en.K,{maxLength:200,placeholder:"请详细描述举报原因,便于平台判断违规情况",minHeight:75,value:p,onChange:f}),(0,n.jsxs)("div",{className:eD.default.uploadContainer,children:[(0,n.jsx)(ea.U,{value:g,onChange:_}),(0,n.jsx)("div",{className:eD.default.uploadTips,children:"每张小于 10M,支持JPG、PNG格式,最多上传4张"})]})]})};var e5=e=>{let{title:t,onClose:l,portalRef:r,toastParent:s,extraInfo:d,onReportSuccess:u}=e,[c,v]=(0,a.useState)(!0),[p,f]=a.useState(eD.default.zoomIn),[h,m]=(0,a.useState)(),[g,_]=(0,a.useState)(),x=a.useCallback(()=>{f(eD.default.zoomOut),setTimeout(()=>{v(!1),i.unmountComponentAtNode(r),r.remove(),null==l||l()},300)},[l]);(0,a.useEffect)(()=>()=>{o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!1)},[]),(0,a.useEffect)(()=>{let e=eR.listen(eR.EVENT.hideModal,x);return()=>{null==e||e()}},[x]);let w=(0,a.useCallback)(e=>{L.F.info(e,s)},[s]),j=async()=>{let{user_id:e,log_extra:t,creative_id:l}=d,{reasonData:n,subReasonData:a,desc:i,info:o,images:r=[],codes:s=[]}=g,c={creative_id:l,log_extra:t,data:{user_id:e,report_type_id:n.value,report_type_name:n.label,report_pictures:r.map(e=>e.Uri).toString(),report_description:i,sub_reason_id:18===n.value?void 0:null==a?void 0:a.value,sub_reason_name:18===n.value?void 0:null==a?void 0:a.label,report_author_info:18===n.value?o:void 0,report_right_type:18===n.value?s.toString():void 0}};(0,eZ.GA)(c).then(e=>{0===e.code?(w("操作成功,将严格审查广告内容"),null==u||u(),x()):w("服务器打瞌睡了,请稍后再试")}).catch(()=>w("服务器打瞌睡了,请稍后再试"))};return(0,eE.O)({onChange:e=>{let{isFullscreen:t}=e;t&&x()}}),(0,a.useEffect)(()=>{(0,eZ.iL)().then(e=>{(0,eA.Z)(null==d?void 0:d.user_id),m(e.data)}).catch(()=>w("服务器打瞌睡了,请稍后再试"))},[]),(0,n.jsx)(J,{title:t,visible:c,className:p,onCancel:x,footer:(0,n.jsx)(Q,{className:eD.default.submit,onClick:j,disabled:!(null==g?void 0:g.verified),children:"提交"}),children:h?(0,n.jsx)(e3,{dataSource:h,onChange:_}):(0,n.jsx)(eG,{text:"加载中"})})};let e6=(e,t)=>{if(o.Le.getConfig(o.gI.IsAlreadyExsitReportModal))return;let{loginDispatch:l,userInfo:n,abtestData:a}=e;if((null==n?void 0:n.uid)||e.user_id||(null==e?void 0:e.isLive)||(null==e?void 0:e.isOrigin))(null==n?void 0:n.uid)&&(e.user_id=null==n?void 0:n.uid),e7(e,t);else{var i;(null===(i=window)||void 0===i?void 0:i.showAccount)&&window.showAccount({enterMethod:"report",success:n=>{l({type:"updateUserInfo"}),e.user_id=null==n?void 0:n.user_id,e7(e,t)}})}},e7=(e,t)=>{var l,a;if("object"!=typeof e)return;let r=()=>{o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!1),"function"==typeof e.onClose&&e.onClose()},s=(null==e?void 0:e.type)==="live",d=document.createElement("div"),u=document.getElementById("root"),c=(()=>{var e;if(t)return t;if(!s)return document.fullscreenElement||u;let l=document.getElementById("slideMode")||document.getElementsByClassName("xgplayer-fullscreen-parent")[0]||document.getElementsByClassName("isCssFullScreen")[0]||document.fullscreenElement,n=document.querySelector(".modal-video-container");return l?l:(null===(e=o.Le.getConfig(o.gI.IsPageFullScreen))||void 0===e?void 0:e.type)?u:n?n:u})();if(!!c)if(c.appendChild(d),e.isOrigin)o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!0),null==e||null===(l=e.onShow)||void 0===l||l.call(e),i.render((0,n.jsx)(z,{toastParent:c,portalRef:d,title:e.title,type:e.type,object_id:e.object_id,logParams:e.logParams,onClose:r,onLiveReport:e.onLiveReport||(()=>void 0),toast:null==e?void 0:e.toast}),d);else{let{title:t,logParams:l,pipeline_id:s,object_id:u,owner_id:v,user_id:p,comment_with_emoji:f=0,enter_from:h,con_short_id:m,video_id:g,onReport:_,toast:x,owner_sec_id:w,type:j}=e;o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!0),null==e||null===(a=e.onShow)||void 0===a||a.call(e),i.render((0,n.jsx)(eO,{toastParent:c,portalRef:d,title:t,onClose:r,logParams:l,pipelineId:s,dataSource:{object_id:u,owner_id:v,user_id:p,comment_with_emoji:f,enter_from:h,con_short_id:m,video_id:g,owner_sec_id:w,type:j},onReport:_,toast:x}),d)}},e9=(e,t)=>{if(o.Le.getConfig(o.gI.IsAlreadyExsitReportModal))return;let{loginDispatch:l,user_id:n,abtestData:a}=e;if(n)e4(e,t);else{var i;(null===(i=window)||void 0===i?void 0:i.showAccount)&&window.showAccount({enterMethod:"report",success:n=>{var a;l({type:"updateUserInfo"}),null==e||null===(a=e.onLoginSuccess)||void 0===a||a.call(e),e.user_id=null==n?void 0:n.user_id,e4(e,t)}})}},e4=(e,t)=>{let{creative_id:l,log_extra:a,user_id:r,title:s,onClose:d,onShow:u,onReportSuccess:c}=e,v=document.createElement("div"),p=document.getElementById("root");if(t)p=t,null==t||t.appendChild(v);else{var f;let e=document.getElementById("slideMode")||document.getElementsByClassName("xgplayer-fullscreen-parent")[0]||document.getElementsByClassName("isCssFullScreen")[0],t=document.querySelector(".modal-video-container");if((null===(f=o.Le.getConfig(o.gI.IsPageFullScreen))||void 0===f?void 0:f.type)||e)e&&(p=e),p.appendChild(v);else if(t)p=t,t.appendChild(v);else{let e=document.getElementById("root");null==e||e.appendChild(v)}}o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!0),null==u||u(),i.render((0,n.jsx)(e5,{toastParent:p,portalRef:v,title:s,onClose:()=>{o.Le.setConfig(o.gI.IsAlreadyExsitReportModal,!1),"function"==typeof d&&d()},extraInfo:{creative_id:l,log_extra:a,user_id:r},onReportSuccess:c}),v)}},636435:function(e,t,l){"use strict";l.d(t,{C:function(){return d}}),l("490629");var n=l("320165");l("101199");var a=l("461523"),i=l("765593"),o=l("469935"),r=l.n(o);let s=e=>{let{label:t,className:l,onSelect:a,value:o,style:s,selected:d}=e;return(0,n.jsxs)("div",{className:r()(i.default.container,l),style:s,children:[(0,n.jsx)("div",{className:d?i.default.selected:i.default.icon,onClick:()=>a(o)}),t&&(0,n.jsx)("span",{className:i.default.label,children:t})]})},d=e=>{let{optionList:t,value:l=[],onChange:i}=e,o=new Set(l),r=e=>{o.has(e)?o.delete(e):o.add(e),i([...o.values()])};return Array.isArray(t)?(0,n.jsx)("div",{className:a.default.container,children:t.map(e=>(0,n.jsx)(s,{className:a.default.radio,style:e.label.length>=7?{width:"calc(100% - 40px)"}:void 0,label:e.label,value:e.value,selected:o.has(e.value),onSelect:r},e.value))}):null}},237727:function(e,t,l){"use strict";l.d(t,{U:function(){return h}});var n=l(629686),a=l(402748);l(490629),l(706056),l(656562),l(992871);var i=l(320165),o=l(101199),r=l(277837),s=l(565850),d=l(167993),u=l(837095),c=l(974976);let v="image/png,image/jpeg,image/jpg";function p(e){let{currentLength:t,maxLength:l,onUpload:n}=e,a=(0,o.useRef)(),u=(0,o.useCallback)(()=>{var e;(null===(e=a.current)||void 0===e?void 0:e.value)&&(a.current.value="")},[]);return t===l?null:(0,i.jsxs)("div",{className:d.default.wrap,children:[(0,i.jsx)("input",{className:d.default.input,type:"file",accept:v,multiple:!0,onChange:e=>n(e,u),ref:a}),(0,i.jsx)("div",{className:d.default.buttonContainer,children:(0,i.jsxs)("div",{className:d.default.buttonContent,children:[(0,i.jsx)(r.n,{width:24,height:24,src:s.Z}),(0,i.jsx)("div",{className:d.default.counter,children:`${t}/${l}`})]})})]})}function f(e){let{dataList:t=[],onChange:l}=e,n=e=>{let n=[...t];n.splice(e,1),"function"==typeof l&&l(n)};return(0,i.jsx)(i.Fragment,{children:t.map((e,t)=>(0,i.jsxs)("div",{className:d.default.cover,children:[(0,i.jsx)("div",{className:d.default.close,onClick:()=>n(t)}),(0,i.jsx)("img",{className:d.default.image,src:e.Url})]},e.Uri))})}function h(e){let t=(0,u.Z)(),{maxLength:l=4,value:o=[],onChange:r}=e;return(0,i.jsxs)("div",{className:d.default.container,children:[(0,i.jsx)(f,{dataList:o,onChange:r}),(0,i.jsx)(p,{onUpload:(e,i)=>{let{files:s}=e.target;if(s.length>l){c.F.info(`当前上传图片数量大于 ${l}`);return}for(let e=0;e10485760){c.F.info("当前上传图片尺寸大于10M");return}if(!v.includes(s[e].type)){c.F.info("当前上传图片是不支持的类型");return}}if(!t){c.F.info("图片上传服务不可用,请稍后再试");return}t.uploadFile(s).then(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r([...o,...e.map((e,t)=>(0,a._)((0,n._)({},e),{Url:window.URL.createObjectURL(s[t])}))]),"function"==typeof i&&i()}).catch(()=>c.F.info("图片上传失败,请重试"))},currentLength:o.length,maxLength:l})]})}},356426:function(e,t,l){"use strict";l.d(t,{_:function(){return r}});var n=l(320165);l(101199);var a=l(656837),i=l(469935),o=l.n(i);let r=e=>{let{text:t,required:l=!1,className:i}=e;return(0,n.jsxs)("div",{className:o()(a.default.container,i),children:[(0,n.jsx)("div",{className:a.default.text,children:t}),l&&(0,n.jsx)("div",{className:a.default.icon,children:"*"})]})}},277837:function(e,t,l){"use strict";l.d(t,{n:function(){return d}});var n=l(629686),a=l(320165),i=l(101199),o=l(867910),r=l(469935),s=l.n(r);let d=i.memo(e=>{let{src:t,width:l=18,height:i=18,color:r,viewBox:d,className:u="",onClick:c=()=>void 0,style:v={}}=e,p=r?(0,n._)({fill:r},v):(0,n._)({},v);return(0,a.jsx)(t,(0,n._)({className:s()(r?"":o.default.svg,u),width:l,height:i,viewBox:d||"0 0 36 36",onClick:c},p))})},39711:function(e,t,l){"use strict";l.d(t,{K:function(){return s}});var n=l(320165),a=l(101199),i=l(469935),o=l.n(i),r=l(818439);let s=e=>{let{value:t="",onChange:l,placeholder:i,maxLength:s,width:d,className:u,minHeight:c}=e,v=a.useRef(null),p=a.useCallback(e=>{let t=e.target.value;t.length<=s&&l(t)},[l]);return(0,n.jsxs)("div",{style:{width:d},className:o()(r.default.textareaContainer,u),children:[(0,n.jsx)("textarea",{value:t,ref:v,style:{minHeight:c},onChange:p,onKeyDown:e=>e.stopPropagation(),placeholder:i,className:r.default.textarea}),void 0!==s&&(0,n.jsxs)("div",{className:o()(r.default.count,{[r.default.overflow]:t.length>s}),children:[t.length,"/",s]})]})}},974976:function(e,t,l){"use strict";l.d(t,{F:function(){return x}});var n,a=l(480333),i=l(629686),o=l(402748);l(374954),l(490629);var r=l(320165),s=l(469935),d=l.n(s),u=l(101199),c=l(890710),v=l(880327),p=l(497329);let f=null,h=null,m=null,g=null,_={text:"",duration:3e3};class x extends(n=u.Component){static create(e){if(f)return e&&e(f);m=document.body,!document.querySelector("#toastContainer")&&((g=document.createElement("div")).className=p.default.toastWrapper,g.id="toastContainer"),m.appendChild(g),c.render((0,r.jsx)(x,{ref:t=>{f=t,e&&e(f)}}),g)}static info(e,t){let l=(0,i._)({},_);"string"==typeof e?(l.text=e,l.root=t):"object"==typeof e&&null!==e&&(l=(0,i._)((0,o._)((0,i._)({},_),{root:t}),e));let n=document.fullscreenElement||document.getElementsByClassName("xgplayer-fullscreen-parent")[0];(0,v.r)()&&n&&(l.root=n),this.textList.push(l),this.create(e=>{!h&&e&&e.handleShowToast()})}handleShowToast(){h&&(clearTimeout(h),h=null);let e=x.textList.shift();this.setState({showToast:!0,options:e}),h=setTimeout(()=>{x.textList.length?this.handleCloseToast(()=>{setTimeout(this.handleShowToast.bind(this),50)}):(this.handleCloseToast(),this.destroy()),h=null},e.duration)}handleCloseToast(e){this.setState({showToast:!1},()=>e&&e())}destroy(){m.removeChild(g),f=null}render(){let{showToast:e,options:t}=this.state,l=e&&t&&(0,r.jsx)("div",{className:d()(p.default.toast,t.className,{[p.default.parentToastWrapper]:t.root||(0,v.r)()}),children:t.text});return(0,r.jsx)(u.Fragment,{children:t&&t.root?c.createPortal(l,t.root):l})}constructor(...e){super(...e),(0,a._)(this,"state",{showToast:!1})}}(0,a._)(x,"textList",[])},837095:function(e,t,l){"use strict";let n;var a=l(480333);l(679308);var i=l(911429),o=l(330620),r=l.n(o);class s{initUploader(e,t){let{token:l,service_id:n,origin:a,template:i}=e,o=JSON.parse(l);this.bytedUploader=new(r())({userId:t,appId:1128,stsToken:o,imageConfig:{serviceId:n}}),this.uploaderOptions={stsToken:o,serviceId:n,origin:a,template:i}}uploadFile(e){let t=this.bytedUploader.addImageFile({file:Array.from(e).map(e=>new Blob([e])),stsToken:this.uploaderOptions.stsToken});return this.bytedUploader.start(t),new Promise((e,t)=>{this.bytedUploader.on("complete",t=>{e(t.uploadResult)}),this.bytedUploader.on("error",e=>{t(e.extra)})})}constructor(e){(0,a._)(this,"bytedUploader",null),(0,a._)(this,"uploaderOptions",null),(0,i.U2)("/aweme/v1/report/upload/auth/",{}).then(t=>{let{token:l,service_id:n,origin:a,template:i,status_code:o}=t;if(0===o)this.initUploader({token:l,service_id:n,origin:a,template:i},e.userId)})}}t.Z=function(e){return!n&&(n=new s({userId:e})),n}},85083:function(e,t,l){"use strict";l.d(t,{Z:function(){return y}}),l("490629");var n=l("320165"),a=l("101199"),i=l("469935"),o=l.n(i),r=l("118616"),s=l("840763");l("679308");var d="LiyoZn2Z",u="bo6KZyb1";let c=a.forwardRef((e,t)=>{let{onReady:l,onEnded:i,previewUrlList:r,isHorizontal:s,className:c,playStartSec:v,playEndSec:p}=e,f=(0,a.useRef)(),h=(0,a.useRef)(),m=(0,a.useRef)(),g=(0,a.useRef)(),_=()=>v>0?v:0;(0,a.useEffect)(()=>(!function e(){m.current=requestAnimationFrame(()=>{f.current&&h.current&&(h.current.style.width=`${f.current.currentTime/f.current.duration*100}%`),e()})}(),()=>cancelAnimationFrame(m.current)),[]);let x=(0,a.useRef)(!1),w=(0,a.useRef)();return(0,a.useImperativeHandle)(t,()=>({async pause(){if(!f.current.paused){var e;w.current&&(await w.current,w.current=void 0),null===(e=f.current)||void 0===e||e.pause()}},play(){if(x.current&&f.current.paused){var e;w.current=null===(e=f.current)||void 0===e?void 0:e.play()}},onCanPlay:()=>x.current}),[]),(0,n.jsx)("div",{className:o()(d,c),children:(0,n.jsx)("video",{ref:e=>{f.current=e},onPlay:()=>{f.current.currentTime=_()},onPlaying:()=>{l(),g.current=!1},onTimeUpdate:()=>{f.current.currentTime/f.current.duration>=.98&&!g.current&&(null==i||i(),g.current=!0),p>0&&f.current.currentTime>p&&(g.current=!0,f.current.currentTime=_(),null==i||i())},className:u,style:{objectFit:s?"cover":"contain"},loop:!0,muted:!0,autoPlay:!0,disablePictureInPicture:!0,onCanPlay:()=>{x.current=!0},preload:"none",children:r.map((e,t)=>(0,n.jsx)("source",{src:e},`${e}_${t}`))})})});var v="VSiatET5",p={pic:"tgOoMMdB",cover:"vqTs4QkE",logoBig:"QfLhrPFY",hovered:"sGpsiT1k",hidden:"dJTsk_JS"},f=l("629686"),h=l("402748");let m=(0,a.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,h._)((0,f._)({width:79,height:90,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M66.76 18.041c-4.847-3.161-8.347-8.218-9.44-14.113A21.521 21.521 0 0 1 56.955 0H41.482l-.027 62.007c-.258 6.942-5.975 12.516-12.98 12.516-2.176 0-4.227-.544-6.033-1.494-4.138-2.18-6.974-6.519-6.974-11.513 0-7.17 5.837-13.007 13.007-13.007 1.338 0 2.622.223 3.84.602V33.318a28.646 28.646 0 0 0-3.84-.277C12.775 33.041 0 45.816 0 61.521c0 9.635 4.816 18.16 12.16 23.316A28.316 28.316 0 0 0 28.48 90c15.704 0 28.479-12.775 28.479-28.48V30.076a36.79 36.79 0 0 0 21.528 6.92V21.523a21.42 21.42 0 0 1-11.727-3.482z",fill:"#fff",fillOpacity:".8"})})));var g=e=>{let{coverUrl:t="",hovered:l=!1,videoUrlList:i=[],canHidden:r=!0}=e,[s,d]=(0,a.useState)(!1);return(0,n.jsxs)("div",{className:o()(p.pic,{[p.hovered]:r&&l}),children:[(0,n.jsx)(m,{width:79,height:90,className:o()(p.logoBig,{[p.hidden]:s})}),t&&(0,n.jsx)("img",{className:o()(p.cover,{[p.hidden]:!s}),src:t,onLoad:()=>{d(!0)}}),!t&&(null==i?void 0:i.length)>0&&(0,n.jsx)("video",{className:o()(p.cover,{[p.hidden]:!s}),onCanPlay:()=>{d(!0)},muted:!0,children:null==i?void 0:i.map((e,t)=>(0,n.jsx)("source",{src:e,type:"video/mp4"},`${e}_${t}`))})]})},_=e=>{let{className:t,cardData:l,isHover:i}=e,{type:r,coverUrl:d,videoUrlList:u,vWidth:p,vHeight:f,playEndSec:h,playStartSec:m}=l,[_,x]=(0,a.useState)(!1),w=(0,a.useCallback)(()=>{x(!0)},[i]),j=(0,a.useRef)();return(0,n.jsxs)("div",{className:o()(v,t),children:[r!==s._.Image&&(null==u?void 0:u.length)>0&&i&&(0,n.jsx)(c,{ref:j,previewUrlList:u,isHorizontal:p>=f,onReady:w,ratio:f/p,playStartSec:m,playEndSec:h}),(0,n.jsx)(g,{hovered:i,coverUrl:d,videoUrlList:u,canHidden:_})]})};let x=(0,a.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,h._)((0,f._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsx)("g",{filter:"url(#wallpaperImageIcon_svg__filter0_d_6103_233002)",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 11h6a.5.5 0 0 0 .5-.5V9.173L9.213 6.652a1 1 0 0 0-1.632 0L4.5 11zM2 3.5A1.5 1.5 0 0 1 3.5 2h7A1.5 1.5 0 0 1 12 3.5v7a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 2 10.5v-7zm2.75.5a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5z",fill:"#fff"})}),(0,n.jsx)("defs",{children:(0,n.jsxs)("filter",{id:"wallpaperImageIcon_svg__filter0_d_6103_233002",x:"-.583",y:"-.583",width:15.167,height:15.167,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,n.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,n.jsx)("feOffset",{}),(0,n.jsx)("feGaussianBlur",{stdDeviation:".292"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_6103_233002"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_6103_233002",result:"shape"})]})})]}))),w=(0,a.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,h._)((0,f._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsx)("g",{filter:"url(#wallpaperVideoIcon_svg__filter0_d_6103_233023)",children:(0,n.jsxs)("g",{fill:"#fff",children:[(0,n.jsx)("mask",{id:"wallpaperVideoIcon_svg__a",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5v7A1.5 1.5 0 0 0 3.5 12h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 10.5 2h-7zm6 5.433a.5.5 0 0 0 0-.866L5.75 4.402a.5.5 0 0 0-.75.433v4.33a.5.5 0 0 0 .75.433L9.5 7.433z"})}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5v7A1.5 1.5 0 0 0 3.5 12h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 10.5 2h-7zm6 5.433a.5.5 0 0 0 0-.866L5.75 4.402a.5.5 0 0 0-.75.433v4.33a.5.5 0 0 0 .75.433L9.5 7.433z"}),(0,n.jsx)("path",{d:"M9.5 6.567l-.5.866.5-.866zm0 .866L9 6.567l.5.866zM5.75 4.402l.5-.866-.5.866zM5 4.835h1-1zm0 4.33H4h1zm.75.433l.5.866-.5-.866zM3 3.5a.5.5 0 0 1 .5-.5V1A2.5 2.5 0 0 0 1 3.5h2zm0 7v-7H1v7h2zm.5.5a.5.5 0 0 1-.5-.5H1A2.5 2.5 0 0 0 3.5 13v-2zm7 0h-7v2h7v-2zm.5-.5a.5.5 0 0 1-.5.5v2a2.5 2.5 0 0 0 2.5-2.5h-2zm0-7v7h2v-7h-2zm-.5-.5a.5.5 0 0 1 .5.5h2A2.5 2.5 0 0 0 10.5 1v2zm-7 0h7V1h-7v2zM9 7.433a.5.5 0 0 1 0-.866l1 1.732c1-.577 1-2.02 0-2.598L9 7.433zM5.25 5.268L9 7.433l1-1.732-3.75-2.165-1 1.732zM6 4.835a.5.5 0 0 1-.75.433l1-1.732A1.5 1.5 0 0 0 4 4.835h2zm0 4.33v-4.33H4v4.33h2zm-.75-.433a.5.5 0 0 1 .75.433H4a1.5 1.5 0 0 0 2.25 1.3l-1-1.733zM9 6.567L5.25 8.732l1 1.732L10 8.3 9 6.567z",mask:"url(#wallpaperVideoIcon_svg__a)"})]})}),(0,n.jsx)("defs",{children:(0,n.jsxs)("filter",{id:"wallpaperVideoIcon_svg__filter0_d_6103_233023",x:"-.583",y:"-.583",width:15.167,height:15.167,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,n.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,n.jsx)("feOffset",{}),(0,n.jsx)("feGaussianBlur",{stdDeviation:".292"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_6103_233023"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_6103_233023",result:"shape"})]})})]})));var j={cardContainer:"XBTYS9hv",pic:"FsQLgVBR",labelWrap:"ndoPZv3w",hotMark:"GuCgkU0Z",latestMark:"wVo1nz4X",imageLabel:"CpSGa1ve",infoBar:"fuQn3DUe",authorName:"bS5IsjAm"},y=e=>{let{cardData:t,showLabel:l,children:i,className:d,onClick:u,onMouseEnter:c}=e,{author:v=""}=t,[p,f]=(0,a.useState)(!1);return(0,n.jsxs)("div",{className:o()(j.cardContainer,d),onClick:u,onMouseEnter:()=>{f(!0),null==c||c()},onMouseLeave:()=>{f(!1)},children:[(0,n.jsxs)("div",{className:j.pic,children:[l&&(0,n.jsxs)("div",{className:j.labelWrap,children:[(null==t?void 0:t.labelId)==="2"&&(0,n.jsx)("div",{className:j.latestMark,children:"新"}),(null==t?void 0:t.labelId)==="1"&&(0,n.jsx)("div",{className:j.hotMark,children:"热"}),(0,n.jsxs)("div",{className:j.imageLabel,children:[(0,n.jsx)(r.Z,{width:14,height:14,viewBox:"0 0 14 14",src:(null==t?void 0:t.type)===s._.Image?x:w}),(null==t?void 0:t.type)===s._.Image?"静态":"动态"]})]}),(0,n.jsx)(_,{cardData:t,isHover:p})]}),l&&v&&(0,n.jsx)("div",{className:o()(j.infoBar),children:(0,n.jsxs)("div",{className:j.authorName,children:["@",v]})}),i]})}},673664:function(e,t,l){"use strict";let n;l.d(t,{K:function(){return B}});var a=l("629686"),i=l("402748");l("490629");var o=l("320165"),r=l("101199"),s=l("469935"),d=l.n(s),u=l("87679"),c=l("340754"),v=l("513894"),p=l("618759"),f=l("103680"),h=l("601034"),m=l("499059"),g=l("537056"),_=l("749113"),x=l("324160"),w={wallpaperModalContainer2:"GP3GssaE",wallpaperModalContainer:"PRq2EoPv",hasGuide:"cDhPsLx5",wallpaperItem:"yef5z8AI",wallpaperCard:"IXI7lvxC",textWrap:"ckX9XBUF",text:"bkNOInpW",moreWrap:"UQzKkXMn",show:"_I4JnMbF",hide:"Lg9gOpLV",container:"d4R_VqyS",navui:"Qfo394uk",overflow:"sItwfyDW"},j=l("362198"),y=l("48795"),b=l("147597"),C="urcPuACP",N="qUtB9IDQ",L="pHoq8Eqt",I="C5d4Klgr",S="JwGAerjf",k=l("316213");function M(e){let{onClose:t,onClick:l,onShow:n}=e;return(0,r.useEffect)(()=>{n()},[]),(0,o.jsxs)("div",{className:C,children:[(0,o.jsx)("div",{className:N,children:_.a.t("download_client_side_wallpaper",{},"下载客户端 使用壁纸")}),(0,o.jsxs)("div",{className:L,children:[(0,o.jsxs)(y.Button,{theme:"solid",size:"small",className:I,onClick:l,children:[(0,o.jsx)(k.z,{svg:(0,o.jsx)(c.Z,{style:{fontSize:"20px"}}),style:{width:"12px",marginRight:"4px"}}),_.a.t("download_client_side_wallpaper",{},"下载")]}),(0,o.jsx)(k.z,{svg:(0,o.jsx)(b.Z,{className:S}),onClick:t})]})]})}var E=l("85083"),R=l("913285");l("117232"),l("679308"),l("374954");var A=l("426038"),T=l("290520"),P=l("181633"),U=l("409250"),O=l("547352"),D=l("414061"),z=l("443213"),F=l("589297");function B(e){let{isLogin:t}=(0,u.Pc)(),l=function(e){let[t,l]=(0,r.useState)(!0),[a,i]=(0,r.useState)([]),{triggerDownloadClient:o}=(0,F.o)({channelId:x.g.Wallpaper}),[s,d]=(0,r.useState)(!1),u=(0,r.useRef)(),c=()=>U.Q.getItem({sKey:A.CookieKeys.WallpaperGuide})||{showTime:0,closeTime:0,showCount:0,cursor1:0,cursor2:0},v=(e,t)=>{let l=c();l[e]=t,U.Q.setItem(A.CookieKeys.WallpaperGuide,l)},p=()=>(0,P.cG)().then(e=>{if(e){var t;return null==e||null===(t=e.sort)||void 0===t||t.call(e,(e,t)=>(t.createTimestamp||0)-(e.createTimestamp||0)),e}return[]}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return(0,P.gE)({cursor:e,count:t,sort_type:T.KM.Time,video_type_select:1}).then(t=>{let i=[...l,...(null==t?void 0:t.wallpaper_list)||[]];return(i=i.filter(e=>{var t,l,n,a,i,o,r,s;return((null==e?!void 0:null===(l=e.aweme)||void 0===l?!void 0:null===(t=l.video)||void 0===t?!void 0:!t.width)||(null==e?!void 0:null===(a=e.aweme)||void 0===a?!void 0:null===(n=a.video)||void 0===n?!void 0:!n.height)||!((null==e?void 0:null===(o=e.aweme)||void 0===o?void 0:null===(i=o.video)||void 0===i?void 0:i.height)>(null==e?void 0:null===(s=e.aweme)||void 0===s?void 0:null===(r=s.video)||void 0===r?void 0:r.width)))&&!0}),a>=3)?(v("cursor1",(null==t?void 0:t.has_more)?t.cursor:0),i):!(i.length>=n)&&(null==t?void 0:t.has_more)?f(t.cursor,n-i.length,i,n,a+1):(v("cursor1",(null==t?void 0:t.has_more)?t.cursor:0),0!==i.length||!(e>100)||(null==t?void 0:t.has_more))?i:f(0,n-i.length,i,n,a+1)})},h=()=>{v("closeTime",Date.now()),l(!1)};return(0,r.useEffect)(()=>{let e=c().cursor2||0,{cursor1:t=0,hoverTime:l}=c();return(!l&&d(!0),null==n?void 0:n.length)?(i(n),()=>{}):(Promise.all([f(t,6),p()]).then(t=>{var l;let[a,o]=t,r=[];null==a||null===(l=a.forEach)||void 0===l||l.call(a,(t,l)=>{r.push((0,z.R)(t)),(l+1)%3==0&&(o[e]&&r.push(o[e]),e+=1)}),(null==o?void 0:o.length)&&v("cursor2",e<(null==o?void 0:o.length)?e:0),i(n=r.filter(e=>!!e))}),()=>{clearTimeout(u.current)})},[]),(0,r.useEffect)(()=>{let e=D.listen(D.EVENT.CloseWallpaperGuide,()=>{h()});return()=>{null==e||e()}},[]),{wallpaperList:a,isFirstHover:s,onHover:()=>{let{hoverTime:e}=c();clearTimeout(u.current),!e&&(v("hoverTime",Date.now()),u.current=setTimeout(()=>{d(!1)},3e3))},onShowGuide:()=>{let{showTime:e=0,showCount:t=0}=c();Date.now()-e>2592e5&&(v("showTime",Date.now()),v("showCount",t+1))},onCloseGuide:h,isShowGuide:()=>{if(!t)return!1;let{showTime:e=0,closeTime:l=0,showCount:n=0}=c();return!(n>5)&&(!!(l2592e5)||!1)},onDownload:o,onHoverEnd:()=>{clearTimeout(u.current),d(!1)}}}(null==e||e.abTestData),{wallpaperList:s}=l,y=(0,p.DT)(),[b,C]=(0,r.useState)(!1),[N,L]=(0,r.useState)(!1),I=l.isShowGuide()&&!y&&N,S=t=>{if(y&&t){var n;f.invoke("OPEN_WALLPAPER_WINDOW",{insertWallpaperList:[(0,i._)((0,a._)({},t),{autoClick:!0})]}),null==e||null===(n=e.onClick)||void 0===n||n.call(e)}else l.onDownload(),j.Z.sendLog("add_to_desktop_click",{enter_from:(0,h.yW)(),type:"wallpaper_hover_button",channel_id:x.g.Wallpaper,ug_channel_id:m.Le.getConfig(m.gI.WebUgChannelId)||""}),l.onCloseGuide()},B=()=>{!y&&j.Z.sendLog("add_to_desktop_show",{enter_from:(0,h.yW)(),type:"wallpaper_hover_button",channel_id:x.g.Wallpaper,ug_channel_id:m.Le.getConfig(m.gI.WebUgChannelId)||""}),l.onHover()},W=async()=>{!y&&t&&await (0,g.Y)()?L(!1):L(!0)};return(0,r.useEffect)(()=>{(null==s?void 0:s.length)&&(j.Z.sendLog("wallpaper_board_show"),j.Z.sendLog("view_more_wallpaper_show"))},[null==s?void 0:s.length]),(0,r.useEffect)(()=>{I&&j.Z.sendLog("add_to_desktop_show",{enter_from:(0,h.yW)(),type:"wallpaper_board_toast",channel_id:x.g.Wallpaper,ug_channel_id:m.Le.getConfig(m.gI.WebUgChannelId)||""})},[I]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{C(!0)},200);return()=>{clearTimeout(e)}},[]),(0,r.useEffect)(()=>{W()},[t]),(0,o.jsxs)("div",{className:d()(w.container,b&&w.overflow,w.navui,null==e?void 0:e.className),children:[I&&(0,o.jsx)(R.k,{componentName:"wallpaper-guide",children:(0,o.jsx)(M,{onClose:e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),l.onCloseGuide(),j.Z.sendLog("add_to_desktop_close",{type:"wallpaper_board_toast"})},onClick:e=>{j.Z.sendLog("add_to_desktop_click",{enter_from:(0,h.yW)(),type:"wallpaper_board_toast",channel_id:x.g.Wallpaper,ug_channel_id:m.Le.getConfig(m.gI.WebUgChannelId)||""}),null==e||e.preventDefault(),null==e||e.stopPropagation(),l.onCloseGuide(),l.onDownload()},onShow:l.onShowGuide})}),(0,o.jsx)(R.k,{componentName:"wallpaper-modal",children:(0,o.jsx)("div",{id:"wallpaper-modal",className:d()(w.wallpaperModalContainer,I&&w.hasGuide,w.show,!(null==s?void 0:s.length)&&w.hide),children:(0,o.jsxs)("div",{className:w.wallpaperModalContainer2,children:[s.map(e=>(0,o.jsx)("div",{className:w.wallpaperItem,onClick:t=>{S(e),t.preventDefault(),t.stopPropagation()},onMouseEnter:B,onMouseLeave:l.onHoverEnd,children:(0,o.jsx)(E.Z,{cardData:e,className:w.wallpaperCard,children:!y&&(0,o.jsxs)("div",{className:d()(w.textWrap),children:[(0,o.jsx)(k.z,{svg:(0,o.jsx)(c.Z,{style:{fontSize:"20px",marginRight:"-3px"}})}),(0,o.jsx)("div",{className:d()(w.text),children:_.a.t("download_client_side_wallpaper",{},"下载客户端 使用壁纸")})]})})},e.id)),(0,o.jsxs)("div",{className:w.moreWrap,onClick:t=>{var l,n,a;null==t||null===(l=t.preventDefault)||void 0===l||l.call(t),null==t||null===(n=t.stopPropagation)||void 0===n||n.call(t),y?f.invoke("OPEN_WALLPAPER_WINDOW",{enter_from:"navigation_bar",enter_method:"wallpaper_board"}):window.open("https://www.douyin.com/wallpaper/","_blank"),null==e||null===(a=e.onClick)||void 0===a||a.call(e),j.Z.sendLog("view_more_wallpaper_click")},children:[(0,o.jsx)("div",{children:_.a.t("more_wallpaper",{},"查看更多电脑桌面壁纸")}),(0,o.jsx)(k.z,{svg:(0,o.jsx)(v.Z,{})})]})]})})})]})}},443213:function(e,t,l){"use strict";l.d(t,{R:function(){return c}});var n=l(629686);l(228983),l(759943),l(490629);var a=l(855357),i=l(840763),o=l(618759),r=l(732199);let s=e=>{try{var t;return(null==e?void 0:null===(t=e.split("?")[0])||void 0===t?void 0:t.split(".").pop())||"png"}catch(e){}return"png"},d=e=>(0,o.DT)()?e:(0,r.C7)(e),u=e=>{var t,l,n,o,r,u,c,v,p,f,h,m,g,_,x,w,j,y,b,C,N,L;let I=null==e?void 0:e.aweme_type,S=I===a.e.Note?i._.Image:i._.Video,k={id:null==e?void 0:e.aweme_id,type:S,awemeType:I,author:null==e?void 0:null===(t=e.author)||void 0===t?void 0:t.nickname,authorUid:null==e?void 0:null===(l=e.author)||void 0===l?void 0:l.uid,authorSecUid:null==e?void 0:null===(n=e.author)||void 0===n?void 0:n.sec_uid,dynamicCoverUrl:d((null==e?void 0:null===(u=e.video)||void 0===u?void 0:null===(r=u.dynamic_cover)||void 0===r?void 0:null===(o=r.url_list)||void 0===o?void 0:o[0])||""),coverUrl:d((null==e?void 0:null===(p=e.video)||void 0===p?void 0:null===(v=p.cover)||void 0===v?void 0:null===(c=v.url_list)||void 0===c?void 0:c[0])||""),downloadUrl:[],videoUrlList:((null==e?void 0:null===(h=e.video)||void 0===h?void 0:null===(f=h.play_addr)||void 0===f?void 0:f.url_list)||[]).map(e=>d(e)),vWidth:(null==e?void 0:null===(g=e.video)||void 0===g?void 0:null===(m=g.download_addr)||void 0===m?void 0:m.width)||0,vHeight:(null==e?void 0:null===(x=e.video)||void 0===x?void 0:null===(_=x.download_addr)||void 0===_?void 0:_.height)||0,carouselImages:[]};return S===i._.Image?(k.downloadUrl=((null==e?void 0:e.images)||[]).map((e,t)=>{var l;let n=null==e?void 0:null===(l=e.download_url_list)||void 0===l?void 0:l[0];return{url:d(n),width:e.width,height:e.height,fileName:`image${t}.${s(n)}`}}),k.carouselImages=[...k.downloadUrl],k.vWidth=(null===(w=k.carouselImages[0])||void 0===w?void 0:w.width)||0,k.vHeight=(null===(j=k.carouselImages[0])||void 0===j?void 0:j.height)||0):k.downloadUrl=[{url:d((null==e?void 0:null===(C=e.video)||void 0===C?void 0:null===(b=C.download_addr)||void 0===b?void 0:null===(y=b.url_list)||void 0===y?void 0:y[0])||""),fileName:"video.mp4",hash:null==e?void 0:null===(L=e.video)||void 0===L?void 0:null===(N=L.download_addr)||void 0===N?void 0:N.file_hash}],k},c=e=>{var t,l;return(0,n._)({tagId:e.tag_id,tagName:e.tag_name,labelId:e.label_id,labelName:e.label_name,hotVal:e.hot_val,playStartSec:e.play_start_sec{this.emitter.off(e,t)}}once(e,t){return this.emitter.once(e,t),()=>{this.emitter.off(e,t)}}emit(e,t){this.emitter.emit(e,t)}constructor(){(0,v._)(this,"emitter",void 0),this.emitter=new(f())}}var m=l("314857"),g=l("20353"),_=l("581999");let x=(0,o.createContext)(null),w=()=>(0,o.useContext)(x),j=[5,1,2,3,4],y=[1,5,2,3,4],b={enabled:!1,opacity:80,fontSize:1,region:0,speed:1},C={playbackRate:1,definition:"__auto__",autoPlayNext:!1,paidContent:!1,wideScreen:!1,fullScreen:!1,playing:!1,loading:!1,working:!1,volume:50,muted:!1,pip:!1},N={modal:!1,input:"",settings:b},{sectionStorage:L}=(0,m.y)("player",{definition:C.definition,definitionLastTime:0,volume:C.volume/100,danmaku:b,nextautoplay:"0",miniwin:"0",isMute:0},{playbackratio:1}),I={shown:!1,played:0,total:0,rate:0,sent:0},S=e=>{var t,l;let{children:r}=e,d=(0,o.useMemo)(()=>new g.k(C),[]),v=(0,o.useMemo)(()=>new g.k(N),[]),p=(0,o.useMemo)(()=>new g.k,[]),f=(0,o.useMemo)(()=>new g.k,[]),m=(0,o.useMemo)(()=>new h,[]),w=(0,o.useRef)((0,n._)({},I)),S=(0,_.useUserInfoContext)(),k=null!==(l=null==S?void 0:S.isLogin)&&void 0!==l?l:null==S?void 0:null===(t=S.userInfo)||void 0===t?void 0:t.isLogin,M=(0,o.useMemo)(()=>({danmakuPlayResultRef:w,emitter:m,control:d,userlog:f,channel:p,danmaku:v}),[]);return(0,o.useLayoutEffect)(()=>{k&&L.definitionLastTime+864e5>Date.now()&&d.dispatch("definition",L.definition),d.dispatch("playbackRate",L.playbackratio),d.dispatch("autoPlayNext","1"===String(L.nextautoplay)),d.dispatch("volume",u()(Math.round(100*L.volume),0,100)),d.dispatch("muted",1===L.isMute),d.dispatch("pip","1"===L.miniwin);let e=d.subscribe("playbackRate",e=>{L.playbackratio=e}),t=d.subscribe("autoPlayNext",e=>{L.nextautoplay=e?"1":"0"}),l=d.subscribe("definition",e=>{L.definition="__auto__"!==e?e:void 0,L.definitionLastTime=Date.now()}),n=d.subscribe("volume",e=>{L.volume=u()(e/100,0,1)}),a=d.subscribe("muted",e=>{L.isMute=e?1:0}),i=d.subscribe("pip",e=>{L.miniwin=e?"1":"0"});return()=>{e(),t(),l(),n(),a(),i()}},[]),(0,o.useLayoutEffect)(()=>{if(k){v.dispatch("settings",(0,n._)({},v.getValue("settings"),L.danmaku)),(0,c.Ri)({hardware_concurrency:navigator.hardwareConcurrency}).then(e=>{var t;if(null===(t=e.confList)||void 0===t?void 0:t.length){let[{speed:t,region:l,isOpen:i,opacity:o,fontSize:r}]=e.confList;v.dispatch("settings",(0,a._)((0,n._)({},v.getValue("settings")),{fontSize:j.findIndex(e=>e===r),region:y.findIndex(e=>e===l),enabled:i,speed:t-1,opacity:o}))}});let e=s()(e=>{let{enabled:t,region:l,speed:n,opacity:a,fontSize:i}=e;(0,c.RB)({isOpen:t,opacity:a,speed:n+1,region:y[l],fontSize:j[i]})},500);return v.subscribe("settings",t=>e(L.danmaku=t))}v.dispatch("settings",(0,a._)((0,n._)({},b),{enabled:!0}))},[k]),(0,i.jsx)(x.Provider,{value:M,children:r})}},314857:function(e,t,l){"use strict";l.d(t,{y:function(){return o}});var n=l(629686);l(76375),l(490629),l(362051);var a=l(383833),i=l.n(a);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(0,n._)({},t,l),r=e=>{if(e in t)return window.localStorage;if(e in l)return window.sessionStorage;throw Error("never")},s=Object.create((0,n._)({},a));for(let[t,l]of Object.entries(a)){let n=`${i()(e)}_${i()(t)}`;Object.defineProperty(s,t,{enumerable:!0,get(){try{let e=r(t).getItem(n);if(e){let t=JSON.parse(e);if(typeof t==typeof l)return t}return l}catch(e){return l}},set(e){if(void 0===e)return r(t).removeItem(n);r(t).setItem(n,JSON.stringify(e))}})}return{sectionStorage:s,getSubsection:(t,l,n)=>o(`${e}_${t}`,l,n)}}},87679:function(e,t,l){"use strict";l.d(t,{Pc:function(){return u},hg:function(){return d},yw:function(){return s}}),l(679308);var n=l(935372),a=l(601034),i=l(124916),o=l(581999),r=l(746517);let s=0,d=0,u=()=>{let{userInfo:e,dispatch:t}=(0,o.useUserInfoContext)(),l=(0,i.ns)();return{dispatch:t,userInfo:e,isLogin:e.isLogin,requestLogin:(e,n)=>(s=1,new Promise(a=>{null==l||l.channel.dispatch("popover",{}),(0,r.default)({headerText:e,enterMethod:n,success(){null==t||t({type:"updateUserInfo"}),a(!0)},onClose(){s=0,a(!1)}})})),reportDanmaku:i=>(null==l||l.channel.dispatch("popover",{}),d=1,new Promise(l=>{var o,r;(0,n.m)({title:"举报弹幕",type:"danmaku",object_id:i,owner_id:(null==e?void 0:null===(o=e.info)||void 0===o?void 0:o.uid)||"",owner_sec_id:(null==e?void 0:null===(r=e.info)||void 0===r?void 0:r.secUid)||"",onClose:()=>{d=0,l()},logParams:{enter_method:"list"},loginDispatch:t,userInfo:null==e?void 0:e.info,pipeline_id:"",enter_from:(0,a.yW)(),isOrigin:!0},document.fullscreenElement||document.body)}))}}},325508:function(e,t,l){"use strict";l.d(t,{DK:function(){return v},GA:function(){return u},iL:function(){return c},j$:function(){return d}});var n=l(629686),a=l(402748);l(679308);var i=l(810069),o=l(30995),r=l(911429);let{COMMON_SEARCH_PARAMS:s}=o||{};async function d(e){var t;let{creative_id:l,dislike_id:o="4:3",log_extra:d,is_positive:u=0,dislike_ad_type:c,reason_id:v}=e;return await (0,r.v_)("/aweme/v1/web/ad/dislike/",(0,a._)((0,n._)({},s),{web_id:null===(t=(0,i.Es)())||void 0===t?void 0:t.user_unique_id}),{creative_id:l,dislike_id:1===u?"4:41":o,log_extra:d,is_positive:u,dislike_ad_type:c,reason_id:v},{isDataUseJson:!0,headers:{"Content-Type":"application/json; charset=UTF-8"}})}async function u(e){var t;let{creative_id:l,log_extra:o,data:d={}}=e;return await (0,r.v_)("/aweme/v1/web/ad/report/feedback/",(0,a._)((0,n._)({},s),{web_id:null===(t=(0,i.Es)())||void 0===t?void 0:t.user_unique_id}),{origin:"aweme_pc_web",data:(0,n._)({content_type:"ad",report_from:"creative",report_type_id:"0",report_type_name:"其他",platform:"webapp",version:"17.4.0",aid:6383,extra:{cid:l,log_extra:o}},d)},{isDataUseJson:!0,headers:{"Content-Type":"application/json; charset=UTF-8"}})}async function c(){var e;return await (0,r.U2)("/aweme/v1/web/ad/report/",(0,a._)((0,n._)({},s),{web_id:null===(e=(0,i.Es)())||void 0===e?void 0:e.user_unique_id,origin:"aweme_pc_web",report_ad_type:0,aid:6383,content_type:"ad",report_from:"creative",report_type_id:"0",report_type_name:"其他",platform:"webapp",version:"17.4.0"}))}async function v(e){var t;return await (0,r.U2)("/aweme/v1/web/login/ad/free/",(0,n._)((0,a._)((0,n._)({},s),{web_id:null===(t=(0,i.Es)())||void 0===t?void 0:t.user_unique_id,origin:"aweme_pc_web",aid:6383}),e))}},123622:function(e,t,l){"use strict";l.d(t,{FW:function(){return b},JV:function(){return j},N6:function(){return w},RB:function(){return x},Ri:function(){return _},YO:function(){return C},ob:function(){return y}});var n=l(629686),a=l(402748);l(362051),l(679308);var i=l(30995),o=l(732199),r=l(911429),s=l(987826),d=l(759894),u=l(601034);let{COMMON_SEARCH_PARAMS:c}=i||{};function v(e){let{conf_list:t,status_code:l,log_pb:n}=e;return{statusCode:l,confList:null==t?void 0:t.map(e=>{let{speed:t,region:l,switch:n,conf_end_type:a,opacity:i,font_size:o,from_default:r,simplified_mode_switch:s}=e||{};return{speed:t-1,region:l,isOpen:n,confEndType:a,opacity:i,fontSize:o,fromDefault:r,simplifiedModeSwitch:s||!1}}),logPb:n&&JSON.stringify(n)}}function p(e){let{danmaku_list:t,status_code:l,log_pb:n,total:a,http_code:i}=e;return{statusCode:l,danmakuList:null==t?void 0:t.map(e=>({text:e.text,status:e.status,danmakuId:e.danmaku_id,itemId:e.item_id,userId:e.user_id,offsetTime:e.offset_time,diggType:e.digg_type,diggCount:e.digg_count,showDigg:e.show_digg,score:null==e?void 0:e.score})),total:a,logPb:n&&JSON.stringify(n),httpCode:i}}function f(e){let{danmaku_list:t,status_code:l,log_pb:n,total:a,has_more:i}=e;return{statusCode:l,danmakuList:null==t?void 0:t.map(e=>({text:e.text,status:e.status,danmakuId:e.danmaku_id,itemId:e.item_id,userId:e.user_id,offsetTime:e.offset_time,diggType:e.digg_type,diggCount:e.digg_count,showDigg:e.show_digg})),hasMore:i,logPb:n&&JSON.stringify(n)}}function h(e){let{danmaku_id:t,status_code:l,log_pb:n,isVerifyPassportError:a}=e;return{statusCode:l,danmakuId:t,logPb:n&&JSON.stringify(n),isVerifyPassportError:a}}function m(e){let{status_code:t,log_pb:l}=e;return{statusCode:null!=t?t:-1,logPb:l&&JSON.stringify(l)}}function g(e){let{status_code:t,log_pb:l}=e;return{statusCode:null!=t?t:-1,logPb:l&&JSON.stringify(l)}}async function _(e){let{ctx:t,hardware_concurrency:l}=e,i=await (0,r.U2)("/aweme/v1/web/danmaku/conf/get/",(0,a._)((0,n._)({},c),{conf_end_type:4,hardware_concurrency:l}),t?{timeout:1e3}:{},void 0,t);return(0,o.RL)(i,v)}async function x(e){let{opacity:t,fontSize:l,speed:i,region:o,isOpen:s,simplifiedModeSwitch:d=!1}=e,u=await (0,r.v_)("/aweme/v1/web/danmaku/conf/set/",(0,n._)((0,a._)((0,n._)({},c),{conf_end_type:4,opacity:t,font_size:l,speed:i+1,region:o,simplified_mode_switch:d}),null!=s?{switch:s}:{}));return{statusCode:null==u?void 0:u.status_code}}async function w(e){let{awemeId:t="",startTime:l=0,endTime:i=0,authenticationToken:d="",duration:u=0,hasTotal:v,total:f}=e||{},h=await (0,r.U2)("/aweme/v1/web/danmaku/get_v2/",(0,a._)((0,n._)({},c),{app_name:s.APPNAME,format:"json",group_id:t,item_id:t,start_time:l,end_time:i,authentication_token:d,duration:u,has_total:v,total:f}));return(0,o.RL)(h,p)}async function j(e){let{awemeId:t="",offset:l=0,count:i=0}=e,d=await (0,r.U2)("/aweme/v1/web/danmaku/list/",(0,a._)((0,n._)({},c),{app_name:s.APPNAME,format:"json",group_id:t,item_id:t,offset:l,count:i}));return(0,o.RL)(d,f)}async function y(e){let{danmakuId:t="",awemeId:l="",type:i=0}=e,s=await (0,r.U2)("/aweme/v1/web/danmaku/digg/",(0,a._)((0,n._)({},c),{danmaku_id:t,aweme_id:l,action_type:i,enter_from:(0,d.vM)(),previous_page:(0,u.yW)()}));return(0,o.RL)(s,m)}async function b(e){let{item_id:t="",offset_time:l=0,text:i="",user_id:s=""}=e,v=await (0,r.v_)("/aweme/v1/web/danmaku/post_v2/",(0,a._)((0,n._)({},c),{item_id:t,offset_time:l,text:i,user_id:s,enter_from:(0,d.vM)(),previous_page:(0,u.yW)()}));return(0,o.RL)(v,h)}async function C(e){let{userType:t,danmakuId:l=""}=e,i=await (0,r.v_)("/aweme/v1/web/danmaku/delete_v2/",(0,a._)((0,n._)({},c),{app_name:s.APPNAME,format:"json",user_type:t,danmaku_id:l}));return(0,o.RL)(i,g)}},513894:function(e,t,l){"use strict";l(932651);var n=l(101199);function a(){return(a=Object.assign||function(e){for(var t=1;t(0,i.jsx)("svg",(0,a._)((0,n._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{d:"M16.292 9.364a1.929 1.929 0 1 0-2.727 2.727l5.637 5.637-5.637 5.637a1.928 1.928 0 1 0 2.727 2.727l6.985-6.985.016-.015a1.929 1.929 0 0 0 0-2.728l-7-7z",fill:"#0A0C20"})})));t.Z=r}}]);