(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["80286"],{50855:function(e,t,n){"use strict";n.d(t,{O:function(){return v}});var i=n(320165),r=n(101199),l=n(469935),o=n.n(l),a=n(418312),u=n(959360),d=n(651928),s=n(122061),c=n(51262);function f(e){for(var t=1;t{let{player:t,uiLayout:n,renderMicSeat:l,uiLayoutConfig:v,linkerList:h=[],playerType:m=d.$R.xg,layoutCalculateType:p=d.NT.horizontal,containerClassName:g,contentClassName:w,adjustPlayerPosition:y=!0,children:_,regionClassName:C}=e,x=(0,u.O)(t,m);(0,r.useEffect)(()=>{if(!!y){if(a.w1.includes(p)){let{h:e,y:n}=(0,s.tD)(v);t.position({y:n,h:e})}else t.position({y:0,h:1});return()=>{y&&t.position({y:0,h:1})}}},[t,v,p,y]);let L=(0,r.useMemo)(()=>(0,s.fG)(v,p,x),[p,v,x]);return(0,i.jsx)(i.Fragment,{children:n&&v?(0,i.jsx)("div",{className:o()(c.Z.dynamicLayoutContainer,g),children:(0,i.jsxs)("div",{className:o()(w),style:f({},L),children:[(()=>{if(!v||!(null==h?void 0:h.length))return null;let{regions:e}=v,t=(0,s.B9)(n,e,h);return null==t?void 0:t.map((e,r)=>{let{p:a}=e,u=(0,s.ue)(v,e),c=(0,s.XZ)(n,v,e,t),m=h.find(e=>e.p===a)||{p:a,linkType:d.Zd.PLACEHOLDER};return(0,i.jsx)("div",{style:f({},u,c),className:o()(C),children:l&&l(r,m)},r)})})(),_||null]})}):null})}},51262:function(e,t,n){"use strict";n(910461),t.Z={dynamicLayoutContainer:"dynamicLayoutContainer_77b13"}},418312:function(e,t,n){"use strict";n.d(t,{AO:function(){return o},Fq:function(){return a},Hd:function(){return r},Ro:function(){return d},w1:function(){return u}});var i,r,l=n(651928);let o={CUSTOM_CSS_FULLSCREEN_CHANGE:"PREVIEW_ENTERROOM_CSS_FULL",FULLSCREEN_CHANGE:"fullscreen_change",VIDEO_RESIZE:"video_resize"},a={CUSTOM_CSS_FULLSCREEN_CHANGE:"PREVIEW_ENTERROOM_CSS_FULL",FULLSCREEN_CHANGE:"fullscreenchange",VIDEO_RESIZE:"video_resize"},u=[l.NT.horizontal],d=16/9;(i=r||(r={}))[i.VideoChat_DynamicLayout1V6=7]="VideoChat_DynamicLayout1V6",i[i.LinkMicUiLayout_Live_Partner_Dynamic=25]="LinkMicUiLayout_Live_Partner_Dynamic"},959360:function(e,t,n){"use strict";n.d(t,{O:function(){return o}});var i=n(101199),r=n(418312),l=n(651928);let o=(e,t)=>{let[n,o]=(0,i.useState)(r.Ro),a=i.useRef(),u=(0,i.useCallback)(()=>{var t,n;let i=null==e?void 0:null===(t=e.root)||void 0===t?void 0:t.clientWidth,l=null==e?void 0:null===(n=e.root)||void 0===n?void 0:n.clientHeight;return i&&l?i/l:r.Ro},[]),d=i.useCallback(()=>{clearTimeout(a.current),a.current=setTimeout(()=>{o(u())},50)},[]),s=(0,i.useMemo)(()=>t===l.$R.xg?Object.values(r.AO):Object.values(r.Fq),[t]);(0,i.useEffect)(()=>(s.forEach(t=>{null==e||e.on(t,d)}),()=>{s.forEach(t=>{null==e||e.off(t,d)})}),[e,s,d]);let c=i.useCallback(()=>{d()},[]);return i.useEffect(()=>(window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),i.useEffect(()=>{d()},[]),n}},651928:function(e,t,n){"use strict";var i,r,l,o,a,u;n.d(t,{$R:function(){return r},NT:function(){return l},Zd:function(){return i}}),(o=i||(i={}))[o.PLACEHOLDER=-1]="PLACEHOLDER",o[o.VIDEO=1]="VIDEO",o[o.AUDIO=2]="AUDIO",(a=r||(r={}))[a.xg=1]="xg",a[a.ies=2]="ies",(u=l||(l={}))[u.horizontal=1]="horizontal",u[u.portrait=2]="portrait"},122061:function(e,t,n){"use strict";n.d(t,{B9:function(){return d},XZ:function(){return c},fG:function(){return u},tD:function(){return l},ue:function(){return s}});var i=n(418312),r=n(651928);let l=e=>{let{canvas:t,content:n}=e,i=t.h;return{h:n.h/i,y:n.y/i}},o=(e,t=!0)=>`${(100*e).toFixed(4)}${t?"%":""}`,a=e=>{let{content:t}=e,n=t.h*i.Ro;return t.w/n},u=(e,t,n)=>{if(!e)return{};if(t===r.NT.portrait){let t=o(e.content.w/e.canvas.w),n=o(e.content.h/e.canvas.h),i=o(e.content.y/e.canvas.h);return{position:"absolute",width:t,height:n,top:i,left:o(e.content.x/e.canvas.w)}}if(t===r.NT.horizontal){let t=o(a(e)*(i.Ro/n));return{position:"relative",width:t,height:"100%"}}return{}},d=(e,t,n)=>{if([i.Hd.LinkMicUiLayout_Live_Partner_Dynamic,i.Hd.VideoChat_DynamicLayout1V6].includes(e))return(null==n?void 0:n.length)&&!((null==n?void 0:n.length)<=2)?t.slice(0,n.length):t.slice(0,2);return t},s=(e,t,n=!0)=>{let{content:i}=e,{w:r,h:l}=i,{x:a,y:u,w:d,h:s}=t;return{position:"absolute",left:o(a/r,n),top:o(u/l,n),width:o(d/r,n),height:o(s/l,n),display:"flex",justifyContent:"center",alignItems:"center"}},c=(e,t,n,r)=>{let{p:l}=n,o=[],a="";if(e===i.Hd.VideoChat_DynamicLayout1V6&&0===l){if(null==r||r.forEach(e=>{if(0!==e.p){let{width:n,height:i,left:r,top:l}=s(t,e,!1);o.push(`M${r},${l} h${n} v${i} h-${n} z`)}}),o.length){let e=["M0,0 h100 v100 h-100 z",...o].join(" "),t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("fill-rule","evenodd"),t.setAttribute("d",e);let n=`data:image/svg+xml,${t.outerHTML}`;a=`url('${n}')`}}return{maskImage:a}}},147693:function(e,t,n){"use strict";var i=n(954090),r=n(732979),l=n.n(r),o=n(101199),a=n(918956),u=n(475089),d=function(e){if(!e)return 0;var t=l()(e).valueOf()-Date.now();return t<0?0:t};t.Z=function(e){void 0===e&&(e={});var t=e||{},n=t.leftTime,r=t.targetDate,l=t.interval,s=void 0===l?1e3:l,c=t.onEnd,f=(0,o.useMemo)(function(){return(0,u.hj)(n)&&n>0?Date.now()+n:void 0},[n]),v="leftTime"in e?f:r,h=(0,i.CR)((0,o.useState)(function(){return d(v)}),2),m=h[0],p=h[1],g=(0,a.Z)(c);(0,o.useEffect)(function(){if(!v){p(0);return}p(d(v));var e=setInterval(function(){var t,n=d(v);p(n),0===n&&(clearInterval(e),null===(t=g.current)||void 0===t||t.call(g))},s);return function(){return clearInterval(e)}},[v,s]);var w=(0,o.useMemo)(function(){var e;return{days:Math.floor((e=m)/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},[m]);return[m,w]}},73203:function(e,t,n){"use strict";var i=n(954090),r=n(350856),l=n.n(r),o=n(101199),a=n(918956),u=n(287964),d=n(475089),s=n(205859);t.Z=function(e,t){s.Z&&(0,d.mf)(e);var n,r=(0,a.Z)(e),c=null!==(n=null==t?void 0:t.wait)&&void 0!==n?n:1e3,f=(0,o.useMemo)(function(){return l()(function(){for(var e=[],t=0;t=t?e:t)),e}},500982:function(e){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},886299:function(e,t,n){var i=n(231886),r=n(724521);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=r(n))==n?n:0),void 0!==t&&(t=(t=r(t))==t?t:0),i(r(e),t,n)}},156674:function(e,t,n){var i=n(857513),r=n(987132),l=n(867924),o=n(293137),a=n(22186),u=n(500982),d=n(896833),s=n(98795),c=n(945068),f=n(347752),v=i?i.iterator:void 0;e.exports=function(e){if(!e)return[];if(o(e))return a(e)?c(e):r(e);if(v&&e[v])return u(e[v]());var t=l(e);return("[object Map]"==t?d:"[object Set]"==t?s:f)(e)}},846613:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var i=n(101199);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=l&&l>i&&(n=r,i=l)}),n},a=function(e){var t=void 0===e?{}:e,n=t.useBorderBoxSize,a=t.breakpoints,u=t.updateOnBreakpointChange,d=t.shouldUpdate,s=t.onResize,c=t.polyfill,f=(0,i.useState)({currentBreakpoint:"",width:null,height:null}),v=f[0],h=f[1],m=(0,i.useRef)({}),p=(0,i.useRef)(),g=(0,i.useRef)(),w=(0,i.useRef)(!1),y=(0,i.useRef)(),_=l(s),C=l(d),x=(0,i.useCallback)(function(){g.current&&g.current.disconnect()},[]),L=(0,i.useCallback)(function(e){e&&e!==y.current&&(x(),y.current=e,h({currentBreakpoint:"",width:e.clientWidth,height:e.clientHeight})),g.current&&y.current&&g.current.observe(y.current)},[x]);return(0,i.useEffect)(function(){if((!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))&&!c)return function(){return null};var e=null;return g.current=new(c||ResizeObserver)(function(t){var i=t[0];e=requestAnimationFrame(function(){var e=i.contentBoxSize,t=i.borderBoxSize,r=i.contentRect,l=e;n&&(t?l=t:!w.current&&(w.current=!0));var d=(l=Array.isArray(l)?l[0]:l)?l.inlineSize:r.width,s=l?l.blockSize:r.height;if(d!==m.current.width||s!==m.current.height){m.current={width:d,height:s};var c={currentBreakpoint:"",width:d,height:s,entry:i,observe:L,unobserve:x};a?(c.currentBreakpoint=o(a,d),c.currentBreakpoint!==p.current&&(_.current&&_.current(c),p.current=c.currentBreakpoint)):_.current&&_.current(c);var f={currentBreakpoint:c.currentBreakpoint,width:d,height:s,entry:i};if(!C.current||C.current(f)){if(!C.current&&a&&u){h(function(e){return e.currentBreakpoint!==f.currentBreakpoint?f:e});return}h(f)}}})}),L(),function(){x(),e&&cancelAnimationFrame(e)}},[JSON.stringify(a),n,L,x,u]),r({},v,{observe:L,unobserve:x})}},913485:function(e,t,n){"use strict";var i=n(678305),r=n(730084),l=n(697233);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n0&&(o.textContent=r.ZP.format(i))):(l.innerHTML=s,i!==1/0&&i>0&&(o.innerHTML=r.ZP.format(i)))}}},{key:"onReset",value:function(){var e="flex"===this.mode?this.centerCurDom:this.timeDom,t="flex"===this.mode?this.centerDurDom:this.durationDom;this.config.smartRender?(this.state.currentTime=0,this.state.duration=0,e.textContent=r.ZP.format(0),t.textContent=r.ZP.format(0)):(e.innerHTML=r.ZP.format(0),t.innerHTML=r.ZP.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(!!e.controls&&!!e.controls.center){var t=e.controls.center;this.centerCurDom=r.ZP.createDom("xg-icon","00:00",{},"xgplayer-time left"),this.centerDurDom=r.ZP.createDom("xg-icon","00:00",{},"xgplayer-time right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"changeLiveState",value:function(e){e?(r.ZP.hide(this.durationDom),r.ZP.hide(this.timeDom),r.ZP.hide(this.find(".time-separator")),r.ZP.show(this.find(".time-live-tag"))):(r.ZP.hide(this.find(".time-live-tag")),r.ZP.show(this.find(".time-separator")),r.ZP.show(this.durationDom),r.ZP.show(this.timeDom))}},{key:"updateTime",value:function(e){if(this.isActiving=!0,(!!e||0===e)&&!(e>this.duration)){var t="flex"===this.mode?this.centerCurDom:this.timeDom;this.config.smartRender?(this.state.currentTime=e,t.textContent=r.ZP.format(e)):t.innerHTML=r.ZP.format(e)}}},{key:"resetActive",value:function(){var e=this,t=this.player,n=function(){e.isActiving=!1};this.off(i.kL,n),t.isSeeking&&t.video.seeking?this.once(i.kL,n):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'\n 00:00\n /\n 00:00\n '.concat(this.i18n.LIVE_TIP,"\n ")}}],v=[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:l.kd.CONTROLS_LEFT,index:2,disable:!1,smartRender:!1}}}],f&&a(c.prototype,f),v&&a(c,v),Object.defineProperty(c,"prototype",{writable:!1}),m}(l.ZP);t.Z=c},604649:function(e,t,n){"use strict";n.d(t,{Z:function(){return W},Y:function(){return H}});var i=n("629686"),r=n("402748");n("414931"),n("490629"),n("679308"),n("431723"),n("362051");var l=n("320165"),o=n("101199"),a=n("469935"),u=n.n(a),d=n("395677"),s=n("328981"),c=n("618759"),f=n("326367"),v=n("601034"),h=n("409250"),m=n("19277"),p=n("428658"),g=n("795653"),w=n("992378"),y=n("810069"),_=n("499059"),C=n("889429"),x=n("687581"),L=n("414061"),b=n("880327"),E=n("642613"),j=n("103680"),k=n("798357");let S=(0,o.forwardRef)((e,t)=>(0,l.jsxs)("svg",(0,r._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,l.jsx)("path",{d:"M6.667 8.75a.833.833 0 1 1 1.666 0v2.083a.833.833 0 1 1-1.666 0V8.75zM12.5 7.917a.833.833 0 0 0-.833.833v2.083a.833.833 0 1 0 1.666 0V8.75a.833.833 0 0 0-.833-.833z",fill:"#0C0D0F"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 3.125c-.805 0-1.458.653-1.458 1.458v9.792c0 .805.653 1.458 1.458 1.458h4.083c.012 0 .023.005.03.014l1.997 2.162a1.042 1.042 0 0 0 1.53 0l1.996-2.162a.042.042 0 0 1 .03-.014h4.084c.805 0 1.458-.653 1.458-1.458V4.583c0-.805-.653-1.458-1.458-1.458H3.125zm-.208 1.458c0-.115.093-.208.208-.208h13.75c.115 0 .208.093.208.208v9.792a.208.208 0 0 1-.208.208h-4.083c-.36 0-.705.151-.95.416L10 16.995 8.157 15a1.292 1.292 0 0 0-.949-.416H3.125a.208.208 0 0 1-.208-.208V4.583z",fill:"#0C0D0F"})]})));var N=n("426038"),I=n("987826"),P=n("210091"),T=n("675403"),R=n("179414");let D=(0,o.forwardRef)((e,t)=>(0,l.jsxs)("svg",(0,r._)((0,i._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,l.jsx)("circle",{cx:18,cy:18,r:18,fill:"#EFF0F3"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 8.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19zm-1.42 14.175c0 .73.611 1.325 1.363 1.325.753 0 1.363-.594 1.363-1.325s-.612-1.325-1.363-1.325c-.754 0-1.363.594-1.363 1.325zm3.318-4.47c.87-.72 1.438-1.286 1.705-1.703.265-.417.4-.86.397-1.327 0-.845-.361-1.585-1.087-2.22-.726-.637-1.7-.955-2.928-.955-1.165 0-2.108.314-2.826.942-.717.628-1.135 1.493-1.159 2.292-.023.798 1.89.632 1.96.238.074-.417.388-1.091.754-1.397.365-.305.82-.46 1.363-.46.562 0 1.012.148 1.343.441.332.295.5.647.5 1.058 0 .295-.096.566-.283.813-.121.156-.495.485-1.117.988-.622.501-1.038.954-1.246 1.357-.208.402-.312.914-.312 1.538l.003.184.006.321h1.94c-.01-.583.04-.988.148-1.213.109-.228.389-.527.84-.898z",fill:"#2F3035"})]})));var V=n("624508"),O=new V.h({feedbackShow:{eventName:"feedback_show",params:{enter_from:""}},feedbackClick:{eventName:"feedback_click",params:{enter_from:"",player_muted:1,player_volume:0,vtypes:[],system_volume_info:"",player_maxDb:0,has_analyser:0,equalize_volumeState:"",userAB:"",mute_icon_display:"",audio_ctx_state:"",css_droped:0,click_position:"",is_video_in_dom:0,logids:"",vtype:""}},feedbackReport:{eventName:"feedback_report",params:{}},settingPanelClick:{eventName:"setting_panel_click",params:{enter_from:"",menu:"",theme_color:void 0,if_reddot:void 0}}}),M=n("975626"),B=n("176449"),Z=n("396868"),A=n("364770");let z=(0,c.DT)()?I.CLIENT_APP_ID.toString():I.APP_ID.toString(),H=e=>{window.open("https://www.douyin.com/help",(0,f.f)()?"_self":"_blank"),O.sendLog("settingPanelClick",{enter_from:(null==e?void 0:e.enterFrom)||(0,v.yW)(),menu:"常见问题"}),O.sendLog("feedbackClick",{enter_from:(null==e?void 0:e.enterFrom)||(0,v.yW)(),click_position:"help",logids:(0,M.Wf)()})};var W=function(e){let{isXiguaDomain:t,renderIconInSSR:a,version:f="",extra:V,enterFrom:W}=e,[F,q]=(0,o.useState)(!1),$=(0,o.useRef)(!1),[U,K]=(0,o.useState)(""),G=(0,o.useRef)(null),Q=(0,o.useRef)(null),J=(0,o.useRef)(z),X=(0,o.useRef)(""),Y=(0,o.useRef)(document.createElement("div")),ee=(0,o.useRef)(null),et=(0,o.useRef)(null),[en,ei]=(0,o.useState)(!1),{targetResource:er}=(0,T.II)(e=>{let{targetResource:t}=e;return{targetResource:t}});(0,o.useEffect)(()=>{var e;let t=null===(e=localStorage)||void 0===e?void 0:e.getItem("FeedBackFlag");K(t),"1"!==t&&(O.sendLog("feedbackShow",{enter_from:W||(0,v.yW)()}),setTimeout(()=>{var e;null===(e=localStorage)||void 0===e||e.setItem("FeedBackFlag","1"),K("1")},3e3))},[]),(0,o.useEffect)(()=>{if(F){let e=e=>{var t,n,i;if((null===(t=e.data)||void 0===t?void 0:t.action)==="postFeedback"){let t=null===(i=e.data)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.content;ee.current=t}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}},[F]);let{isFullscreen:el}=(0,d.O)(),eo=async()=>{var e,t,l,o,a,u,d,S,T,D,B,A,z;let H=(await n.e("9875").then(n.t.bind(n,25295,23))).default,F=h.Q.getItem({sKey:N.CookieKeys.Theme}),{stuff_detail:U}=er||{},{theme:K}=U||{},et=K&&!K.is_support_light_theme?N.ThemeValues.Dark:(0,m.Dr)(F);X.current=et;let en=h.Q.getItem({sKey:N.CookieKeys.MonitorWebId}),ei=h.Q.getItem({sKey:N.CookieKeys.MonitorDeviceId}),el="";try{let[e,t]=await Promise.allSettled([(0,s.d)(),(0,P.a)()]),n=(0,M.L7)(e,[]),i=(0,M.L7)(t,[]);el=n.concat(i).join(",")}catch(e){}let{device_manufacture:eo="",device_model:ea="",guid:eu="",version:ed=""}=(0,p.rp)(),{os:es,version:ec}=(0,g.fV)(),ef=(0,w.$h)().info,ev=null===(e=(0,y.Es)())||void 0===e?void 0:e.user_unique_id;G.current=new H(document.createElement("div"),{zIndex:I.FEEDBACK_Z_INDEX,appId:J.current,bizId:I.BIDID,webId:ev,appName:I.APPNAME,height:570,extra_params:(0,r._)((0,i._)({},null!=V?V:{}),{MONITOR_WEB_ID:en,MONITOR_DEVICE_ID:ei,abTestVids:el,manufacturer:eo,version:f||(null===(t=window)||void 0===t?void 0:t.version),device_model:ea,guid:eu,clientVersion:ed,os:es,gpuVender:ef,hardwareConcurrency:null!==(B=null===(l=navigator)||void 0===l?void 0:l.hardwareConcurrency)&&void 0!==B?B:-1,env:null===(o=_.Le.getConfig(_.gI.Env))||void 0===o?void 0:o.envService,custom_field_info:{env:null===(a=_.Le.getConfig(_.gI.Env))||void 0===a?void 0:a.envService,os:es,clientVersion:ed,domain:document.domain,version:f||(null===(u=window)||void 0===u?void 0:u.version),browserInfo:(0,C.Lq)(),osVersion:ec},vtype:null===(S=window)||void 0===S?void 0:null===(d=S.player)||void 0===d?void 0:d.vtype}),ext:{headerToggle:!0},sdkUrl:I.SDKURL,theme:et,getFeedbackResult:e=>{if(e){var t,n,l,o,a,u,d,s;let e=null!==(s=_.Le.getConfig(_.gI.FeedBackInfo))&&void 0!==s?s:{},c={page:(0,v.yW)(),web_id:en,devide_id:ei},f=document.querySelectorAll(".xgplayer-error"),h={screenWidth:document.body.clientWidth,screenHeight:document.body.clientHeight,feedVideoCount:document.querySelectorAll('[data-e2e="feed-video"]').length,feedActiveVideoCount:document.querySelectorAll('[data-e2e="feed-active-video"]').length,isVideoError:Array.from(f).map(e=>(null==e?void 0:e.offsetParent)!==null),videoPosition:null===(t=document.querySelector('[data-e2e="feed-active-video"]'))||void 0===t?void 0:t.getBoundingClientRect(),slideListPosition:null===(n=document.querySelector('[data-e2e="slideList"]'))||void 0===n?void 0:n.getBoundingClientRect(),swiperTransfrom:null===(a=document.querySelector('[data-e2e="slideList"]'))||void 0===a?void 0:null===(o=a.firstChild)||void 0===o?void 0:null===(l=o.style)||void 0===l?void 0:l.cssText,calcTransfrom:((null===(d=document.querySelector('[data-e2e="feed-active-video"]'))||void 0===d?void 0:null===(u=d.getBoundingClientRect())||void 0===u?void 0:u.height)+12)*(null==e?void 0:e.activeIndex)};x.oe.event.info({name:x.Mo.SubmitFeedBack,report:(0,i._)({},e,c,h)}),Z.F.info("已经提交反馈");let m=(0,r._)((0,i._)({},(0,M.Y3)()),{enter_from:(0,v.yW)(),content:ee.current});O.sendLog("feedbackReport",m)}},getInterfaceError:e=>{e&&Z.F.info("接口状态异常")},onVisibleChange:async e=>{var t,n,i,r,l,o,a,u,d,s,f,h,m,p,g,w,y,C,x,S,N,I,P,T,D,V,B,Z,A,z,H,F,q,$,U,K,J,X,ee,et,en,ei,er,el;null==L||null===(t=L.emit)||void 0===t||t.call(L,L.EVENT.feedbackVisibleChange,e);let eo=(0,b.r)()&&((0,E.W)()||document.getElementById("slideMode"))||document.getElementsByClassName("xgplayer-fullscreen-parent")[0],ea=null===(n=G.current)||void 0===n?void 0:n._iframeContainer;if(_.Le.setConfig(_.gI.IsShowFeedBackModal,e),e){C=_.Le.getConfig(_.gI.FeedBackInfo);let e={};if((0,c.DT)())try{e=await j.invoke("getVolumeInfo")}catch(t){e="getSystemVolumeInfoError"}let t="",n=0,L=[],b="",E="";try{t=JSON.stringify(_.Le.getConfig(_.gI.AbtestData));let e=(0,k.t)();n=e instanceof Element&&"flex"===getComputedStyle(e).display?0:1,null===(P=window)||void 0===P||null===(I=P.player)||void 0===I||null===(N=I.plugins)||void 0===N||null===(S=N.mp4encryptplayer)||void 0===S||null===(x=S.reportBugPostPlayerLog)||void 0===x||x.call(S),null===(Z=window)||void 0===Z||null===(B=Z.player)||void 0===B||null===(V=B.getPlugin)||void 0===V||null===(D=V.call(B,"VodLoggerPlugin"))||void 0===D||null===(T=D.reportBugPostPlayerLog)||void 0===T||T.call(D),null===(H=window)||void 0===H||null===(z=H.player)||void 0===z||null===(A=z.emit)||void 0===A||A.call(z,"xglog_cache"),L=_.Le.getConfig(_.gI.recentVtypes),b=null===(q=window)||void 0===q?void 0:null===(F=q.player)||void 0===F?void 0:F.vtype,E=window.location.href}catch(e){}let G=null===(l=window.player)||void 0===l?void 0:null===(r=l.root)||void 0===r?void 0:null===(i=r.querySelector)||void 0===i?void 0:i.call(r,".xg-volume-mute"),ee=2;if((null===(o=window.player)||void 0===o?void 0:o.video)&&(ee=Number(!!window.player.video.parentNode)),O.sendLog("settingPanelClick",{enter_from:W||(0,v.yW)(),menu:"意见反馈"}),O.sendLog("feedbackClick",{enter_from:W||(0,v.yW)(),player_muted:Number(null!==(U=null!==($=null===(u=window.player)||void 0===u?void 0:null===(a=u.video)||void 0===a?void 0:a.muted)&&void 0!==$?$:null===(d=window.player)||void 0===d?void 0:d.muted)&&void 0!==U?U:-1),player_volume:null!==(K=null===(f=window.player)||void 0===f?void 0:null===(s=f.video)||void 0===s?void 0:s.volume)&&void 0!==K?K:null===(h=window.player)||void 0===h?void 0:h.volume,system_volume_info:e,player_maxDb:null!==(J=null===(m=window.globalCtx)||void 0===m?void 0:m.maxDb)&&void 0!==J?J:-1,has_analyser:Number(null!==(X=null===(p=window.globalCtx)||void 0===p?void 0:p.hasAnalyser)&&void 0!==X&&X),equalize_volumeState:null===(g=window.player)||void 0===g?void 0:g.equalizeVolumeState,mute_icon_display:G instanceof Element?getComputedStyle(G,null).display:"no_icon",audio_ctx_state:null===(y=window.globalCtx)||void 0===y?void 0:null===(w=y.audioCtx)||void 0===w?void 0:w.state,userAB:t,pageUrl:E,vtypes:L,vtype:b,css_droped:n,click_position:"feedback",is_video_in_dom:ee,logids:(0,M.Wf)()}),!Q.current)return;eo?(ea=eo,Y.current.className=R.default.iframeContainer,Y.current.appendChild(Q.current),eo.appendChild(Y.current)):ea.appendChild(Q.current)}else{if(!G.current)return;eo?null===(ei=Y.current)||void 0===ei||null===(en=ei.remove)||void 0===en||en.call(ei):Y.current&&(null===(el=Y.current)||void 0===el||null===(er=el.remove)||void 0===er||er.call(el)),Q.current=G.current._sdkIframeEle,null===(et=G.current._sdkIframeEle)||void 0===et||null===(ee=et.remove)||void 0===ee||ee.call(et)}}}),q(!0),$.current=!0,Q.current=G.current._sdkIframeEle,null===(D=G.current._sdkIframeEle)||void 0===D||null===(T=D.remove)||void 0===T||T.call(D),"/LynxFeedBack"===location.pathname&&(null===(A=(z=G.current).show)||void 0===A||A.call(z))};return(0,o.useEffect)(()=>{var e,t,n,i;null===(t=G.current)||void 0===t||null===(e=t.hide)||void 0===e||e.call(t),null===(i=Y.current)||void 0===i||null===(n=i.remove)||void 0===n||n.call(i)},[el]),(0,o.useEffect)(()=>{let e=L.listen(L.EVENT.showFeedback,()=>{var e,t;null===(t=G.current)||void 0===t||null===(e=t.show)||void 0===e||e.call(t)});return()=>e()},[]),(0,o.useEffect)(()=>{let e=()=>{if(!!F){try{var e,t;null===(t=G.current)||void 0===t||null===(e=t.destroy)||void 0===e||e.call(t)}catch(e){}eo()}},t=L.listen(L.EVENT.changeTheme,t=>{let{theme:n}=t;X.current&&X.current!==n&&e()}),n=L.listen(L.EVENT.loginShowFeedback,t=>{let{isShow:n=!1}=t,i=n?"538982":z;J.current!==i&&(J.current=i,e()),n&&setTimeout(()=>{var e,t;null===(t=G.current)||void 0===t||null===(e=t.show)||void 0===e||e.call(t)},0)});return()=>{t(),n()}},[F]),(0,o.useEffect)(()=>()=>{try{var e,t;null===(t=G.current)||void 0===t||null===(e=t.destroy)||void 0===e||e.call(t)}catch(e){}},[]),(0,o.useEffect)(()=>(eo(),()=>{}),[]),(0,l.jsxs)("div",{onMouseEnter:()=>{O.sendLog("feedbackShow",{enter_from:W||(0,v.yW)()})},className:u()(R.default.opContainer,R.default.hidebar,{[R.default.showText]:"1"!==U,[R.default.xiguaOpContainer]:t}),children:[t&&(0,l.jsxs)(o.Fragment,{children:[(0,l.jsx)(A.e,{text:"反馈",isXiguaDomain:t,children:(0,l.jsx)("div",{className:R.default.icon,children:(0,l.jsx)(B.Z,{src:S,width:28,height:28,viewBox:"-4 -4 28 28"})})}),(0,l.jsx)("div",{className:R.default.topBar}),(0,l.jsx)("div",{className:R.default.bottomBar})]}),!t&&(0,l.jsxs)("div",{className:R.default.content,children:[(0,l.jsx)("div",{className:R.default.icon,onMouseEnter:()=>{ei(!0)},onMouseLeave:()=>{clearTimeout(et.current),et.current=setTimeout(()=>{ei(!1)},200)},children:(0,l.jsx)(B.Z,{src:D,width:36,height:36,needRenderInSSR:a})}),(0,l.jsxs)("div",{className:u()(R.default.menu,{[R.default.show]:en}),onMouseEnter:()=>clearTimeout(et.current),onMouseLeave:()=>ei(!1),children:[(0,l.jsx)("div",{className:R.default.item,onClick:()=>{ei(!1),H({enterFrom:W})},children:"常见问题"}),(0,l.jsx)("div",{className:R.default.item,onClick:()=>{var e,t;null===(t=G.current)||void 0===t||null===(e=t.show)||void 0===e||e.call(t)},children:"意见反馈"})]})]})]})}},975626:function(e,t,n){"use strict";n.d(t,{L7:function(){return y},Wf:function(){return S},Y3:function(){return k}});var i=n(629686),r=n(402748);n(706056),n(362051),n(490629);var l=n(426038),o=n(499059),a=n(618759),u=n(759894),d=n(992378),s=n(631407),c=n(272726),f=n(709705),v=n(137375),h=n(703259),m=n(108954),p=n(767192),g=n(766511),w=n(902622);let y=(e,t)=>"fulfilled"===e.status?e.value:t,_=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,i=document.createElement("canvas"),r=i.getContext("2d");i.width=e.videoWidth,i.height=e.videoHeight,r.drawImage(e,0,0,i.width,i.height);let{data:l}=null===(t=r.getImageData)||void 0===t?void 0:t.call(r,0,0,i.width,i.height),o=!0;for(let e=0;en||l[e+1]>n||l[e+2]>n){o=!1;break}return o},C=()=>{let e=1===document.querySelectorAll('[data-e2e="feed-active-video"]').length,t=o.Le.getConfig(o.gI.HasLiveContent);return{current_video_type:e?0:t?1:-1,client_type:(0,a.DT)()?1:0}},x=()=>{var e,t,n,i,r,l,o,a,f,g,y,_,C,x,L;if(0===document.querySelectorAll('[data-e2e="feed-active-video"]').length||!window.player)return{};let{player:b}=window,E=b.video,j=null==E?void 0:E.getBoundingClientRect(),{preloadTime:k,preloadSize:S}=(0,m.P)(b);return{group_id:null===(e=b.config)||void 0===e?void 0:e.vid,enter_from:(0,u.vM)(),is_mute:b.muted?1:0,gear_name:null===(t=b.curDefinition)||void 0===t?void 0:t.gearName,decoder_mode:null===(r=b.video)||void 0===r?void 0:null===(i=r.getStats)||void 0===i?void 0:null===(n=i.call(r))||void 0===n?void 0:n.decoderMode,gpu_info:null===(l=(0,d.$h)())||void 0===l?void 0:l.info,equalize_state:null!==(_=b.equalizeVolumeState)&&void 0!==_?_:"",lufs:null!==(C=null==b?void 0:b.lufs)&&void 0!==C?C:w.G7,use_new_mammon_worklet_processor:null!==(x=null==b?void 0:b.useMammonWorkletProcessorV3)&&void 0!==x&&x,hit_new_mammon_worklet_processor:null!==(L=null==b?void 0:b.hitMammonWorkletProcessorV3)&&void 0!==L&&L,cpu_core:null===(o=navigator)||void 0===o?void 0:o.hardwareConcurrency,duration:null===(a=b.config)||void 0===a?void 0:a.duration,video_width:null==E?void 0:E.videoWidth,video_height:null==E?void 0:E.videoHeight,video_ratio:(null==E?void 0:E.videoWidth)/(null==E?void 0:E.videoHeight),video_rect_width:null==j?void 0:j.width,video_rect_height:null==j?void 0:j.height,player_version:b.version,video_quality:null===(f=b.curDefinition)||void 0===f?void 0:f.qualityType,video_size:null===(g=b.curDefinition)||void 0===g?void 0:g.size,definition:null===(y=b.curDefinition)||void 0===y?void 0:y.definition,preload_time:k,preload_size:S,preload_type:(0,v.me)(b)?2:1,player_volume:b.volume,play_order:(0,p.G)(),first_video_after_cold_start:(0,s.R)(0)&&1===(0,p.G)(),is_video_support:Number((0,c.k)().isSupport),is_supported_265:(0,h.VV)()?1:0}},L=()=>{var e,t,n,i,r,l,a,u,d,s,c,f,v,m,p,g;if(0===document.querySelectorAll('[data-e2e="feed-active-video"]').length||!window.player)return{};let{player:w}=window,{lowdecodeVV:y=0,vv:_=0}=null!==(m=null===(t=w.video)||void 0===t?void 0:null===(e=t.getStats)||void 0===e?void 0:e.call(t))&&void 0!==m?m:{};return{drop_frame:null===(n=w.videoFrameInfo)||void 0===n?void 0:n.dropped,total_play_frame:null===(i=w.videoFrameInfo)||void 0===i?void 0:i.total,drop_frame_rate:null===(r=w.videoFrameInfo)||void 0===r?void 0:r.droppedRate,drop_frame_duration:null===(l=w.videoFrameInfo)||void 0===l?void 0:l.droppedDuration,decode_fps:null!==(p=null===(a=w.video)||void 0===a?void 0:a.decodeFps)&&void 0!==p?p:0,has_down_definition:!!w.definitionList.find(e=>{var t;return(null==e?void 0:e.definition)===(null===(t=w.curDefinition)||void 0===t?void 0:t.definition)+1}),current_vtype:w.vtype,internet_speed:o.Le.getConfig(o.gI.NetworkSpeed),reason:o.Le.getConfig(o.gI.SrDegradeCode),codec_format:(null===(u=w.curDefinition)||void 0===u?void 0:u.isH265)===2?"bytevc2":(null===(d=w.curDefinition)||void 0===d?void 0:d.isH265)===1?"bytevc":"h264",video_format:null!==(g=w.playerType)&&void 0!==g?g:"mp4",using_pcdn:(null===(c=w.bandwidth)||void 0===c?void 0:null===(s=c.pcdn)||void 0===s?void 0:s.size)>0?1:0,media_type:null===(f=w.config)||void 0===f?void 0:f.mediaType,definition:null===(v=w.curDefinition)||void 0===v?void 0:v.definition,h265_failure_rate:10===_?y/_:-1,is_265_degrade_web:(0,h.OS)({player:w})}},b=()=>{var e;if(0===document.querySelectorAll('[data-e2e="feed-active-video"]').length||!window.player)return{};let{player:t}=window;return{loading_icon_status:t.hasClass("xgplayer-isloading"),block_count:null===(e=t.config)||void 0===e?void 0:e.blockCount,is_black_screen:!!t.video&&_(t.video),current_position:t.currentTime,buffer_time:(0,g._)(t)}},E=()=>{var e,t,n,i;if(0===document.querySelectorAll('[data-e2e="feed-active-video"]').length||!window.player)return{};let{player:r}=window,l=null===(i=r.plugins)||void 0===i?void 0:null===(n=i.xgVodLogger)||void 0===n?void 0:null===(t=n.getCacheLog)||void 0===t?void 0:null===(e=t.call(n,"oneplay"))||void 0===e?void 0:e[0],o={};return l&&Object.keys(l).forEach(e=>{o[`xg_${e}`]=l[e]}),o},j=()=>{var e,t,n,i,r,l,o,a,u,d,s,c,f,v,h,m,p,g;if(0===document.querySelectorAll('[data-e2e="feed-active-video"]').length||!window.player)return{};let{player:w}=window,y=null===(n=w.plugins)||void 0===n?void 0:null===(t=n.xgVodLogger)||void 0===t?void 0:null===(e=t.getCacheLog)||void 0===e?void 0:e.call(t,"oneerror"),_=(null==y?void 0:null===(i=y.map)||void 0===i?void 0:i.call(y,e=>{var t;return{type:"one_error",local_time:e.local_time,vtype:w.vtype,codec_type:null===(t=w.curDefinition)||void 0===t?void 0:t.isH265,end_type:e.end_type,errc:e.errc,vsc_message:e.vsc_message}}))||[],C=null===(o=w.plugins)||void 0===o?void 0:null===(l=o.xgVodLogger)||void 0===l?void 0:null===(r=l.getCacheLog)||void 0===r?void 0:r.call(l,"oneevent"),x=(null==C?void 0:null===(d=C.filter)||void 0===d?void 0:null===(u=d.call(C,e=>["playCatch","progress_error","degrade"].includes(e.end_type)))||void 0===u?void 0:null===(a=u.map)||void 0===a?void 0:a.call(u,e=>({type:"oneevents",local_time:e.local_time,vtype:e.vtype,codec_type:e.codec_type,end_type:e.end_type,err_msg:e.err_msg,errc:e.errc,first_frame_interval:e.first_frame_interval,initial_type:e.initial_type,media_type:e.media_type,retry_count:e.retry_count})))||[],L=null===(f=w.plugins)||void 0===f?void 0:null===(c=f.xgVodLogger)||void 0===c?void 0:null===(s=c.getCacheLog)||void 0===s?void 0:s.call(c,"onetemp"),b=(null==L?void 0:null===(v=L.map)||void 0===v?void 0:v.call(L,e=>({type:"one_temp",local_time:e.local_time,vtype:e.vtype,codec_type:e.codec_type,end_type:e.end_type,try_err_c:e.try_err_c,accu_errc:e.accu_errc})))||[],E=null===(p=w.plugins)||void 0===p?void 0:null===(m=p.xgVodLogger)||void 0===m?void 0:null===(h=m.getCacheLog)||void 0===h?void 0:h.call(m,"oneopera");return JSON.stringify([..._,...x,...b,...(null==E?void 0:null===(g=E.map)||void 0===g?void 0:g.call(E,e=>({type:"one_temp",local_time:e.local_time,vtype:e.vtype,codec_type:e.codec_type,end_type:e.end_type,opera_type:e.opera_type,buffer_time:e.buffer_time,bu_acu_t:e.bu_acu_t,bc:e.bc})))||[]])},k=()=>(0,r._)((0,i._)({},C(),x(),L(),b(),E()),{events:j()}),S=()=>{let e="";try{let t=(0,f.$o)(l.LocalStorageKeys.logTrace).map(e=>({time:null==e?void 0:e.time,logId:null==e?void 0:e.logId,url:null==e?void 0:e.url}));e=JSON.stringify(t)}catch(t){e=""}return e}},739939:function(e,t,n){"use strict";n.d(t,{e:function(){return p}}),n(490629);var i=n(320165),r=n(183652),l=n.n(r),o=n(101199),a=n(469935),u=n.n(a),d=n(890710),s=n(48795),c=n(477667),f=n(201986),v=n(163896),h=n(396868);let m=e=>{let{portalRef:t,onClose:n}=e,[r,a]=(0,o.useState)([]),[m,p]=(0,o.useState)(""),[g,w]=(0,o.useState)(""),y=()=>{null==n||n(),d.unmountComponentAtNode(t),t.remove()},_=e=>{let t=e.target.value;t.length<=140&&w(t)},C=async()=>{try{var e,t;let n=await l().post("https://ug-seo-demo.bytedance.com/seo_api/backend/v1/kep/report",{url:location.href,domain:location.host,category:m,reason:g});(null==n?void 0:null===(t=n.data)||void 0===t?void 0:null===(e=t.status)||void 0===e?void 0:e.err_code)===0?(h.F.info("举报成功"),y()):h.F.info("网络错误")}catch(e){h.F.info("网络错误")}};return(0,o.useEffect)(()=>{let e=!1;return(async()=>{try{var t,n,i,r;let o=await l().get("https://ug-seo-demo.bytedance.com/seo_api/backend/v1/kep/get_report_cate_list",{params:{domain:location.host}});!e&&(null==o?void 0:null===(n=o.data)||void 0===n?void 0:null===(t=n.status)||void 0===t?void 0:t.err_code)===0&&(null==o?void 0:null===(i=o.data)||void 0===i?void 0:i.category_list)&&a(null===(r=o.data)||void 0===r?void 0:r.category_list)}catch(e){}})(),()=>{e=!1}},[]),(0,i.jsx)(v.T6,{children:(0,i.jsxs)("div",{className:f.default.modal,children:[(0,i.jsxs)("div",{className:f.default.header,children:[(0,i.jsx)("span",{children:"举报"}),(0,i.jsx)(c.Z,{className:f.default.close,onClick:y})]}),(0,i.jsx)("div",{className:f.default.divider}),(0,i.jsxs)("div",{className:f.default.content,children:[(0,i.jsxs)("div",{className:f.default.reportType,children:[(0,i.jsxs)("span",{children:["举报原因",(0,i.jsx)("span",{className:f.default.star,children:"*"})]}),(0,i.jsx)(s.RadioGroup,{className:f.default.reportTypeGroup,defaultValue:m,onChange:e=>{p(e.target.value)},children:r.map((e,t)=>(0,i.jsx)(s.Radio,{value:e,className:f.default.radioLabel,children:(0,i.jsx)("span",{className:f.default.radioText,children:e})},t))})]}),(0,i.jsxs)("div",{className:f.default.reportReason,children:[(0,i.jsx)("span",{children:"举报描述"}),(0,i.jsxs)("div",{className:u()(f.default.textareaWap,f.default.detailReason),children:[(0,i.jsx)("textarea",{onChange:e=>_(e),id:"message-textarea",maxLength:140,className:f.default.textarea,placeholder:"请详细描述举报原因,便于平台判断违规情况"}),(0,i.jsxs)("span",{className:u()(f.default.numLabel,{[f.default.warn]:g.length>=140}),children:[g.length,"/",140]})]})]}),(0,i.jsx)(s.Button,{theme:"solid",disabled:!m,className:f.default.confirmBtn,onClick:C,children:"提交"})]})]})})};function p(){let{onShow:e,onClose:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=document.createElement("div"),l=document.body;n?(l=n,null==n||n.appendChild(r)):null==l||l.appendChild(r),null==e||e(),d.render((0,i.jsx)(m,{portalRef:r,onClose:t}),r)}},181378:function(e,t,n){"use strict";n.r(t),n.d(t,{SiderBar:function(){return eV},default:function(){return eO}}),n("679308"),n("490629"),n("968336"),n("706056");var i=n("320165"),r=n("101199"),l=n("890710"),o=n("469935"),a=n.n(o),u=n("908219"),d=n.n(u),s=n("855436"),c=n("690301"),f=n("395677"),v=n("953851"),h=n("255797"),m=n("31992"),p=n("414061"),g=n("912586"),w=n("995898"),y=n("549912"),_=n("745285"),C=n("929898"),x=n("629686"),L=n("402748");let b=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:36,height:36,fill:"#0A0C20",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 8.36c0 .75.609 1.359 1.36 1.359h10.873a1.36 1.36 0 1 0 0-2.719H12.36C11.61 7 11 7.609 11 8.36zm.422 9.164a1.44 1.44 0 0 0 2.037 2.037l2.973-2.972V27.56a1.44 1.44 0 1 0 2.88 0V16.587l1.277 1.277 1.698 1.697a1.44 1.44 0 0 0 2.037-2.037l-5.238-5.238a1.715 1.715 0 0 0-2.426 0l-5.238 5.238z"})}))),E=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 5.833a.625.625 0 1 0 0 1.25h13.75a.625.625 0 1 0 0-1.25H3.125zm7.317 3.308a.625.625 0 0 0-.884 0l-6.866 6.866a.625.625 0 0 0 .884.884L10 10.467l6.448 6.448a.625.625 0 1 0 .884-.884l-6.89-6.89z",fill:"#0C0D0F"})})));var j=n("460466"),k=n("176449"),S=n("604649");n("240148"),n("759943"),n("313036");var N=n("409250"),I=n("19277"),P=n("601034");let T=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:36,height:36,viewBox:"0 0 22 19",fill:"#2F3035",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.842.797A1 1 0 0 1 7.419.98l.056.092c.74 1.242 2.052 2.047 3.528 2.047 1.475 0 2.786-.804 3.527-2.044l.055-.092A1 1 0 0 1 16.162.8l4.666 4.825c.61.631.61 1.64 0 2.271l-2.22 2.297a1.611 1.611 0 0 1-.24.204v6.255c0 .863-.686 1.624-1.607 1.624H5.245c-.921 0-1.606-.761-1.606-1.624v-6.25c-.087-.06-.17-.13-.246-.21L1.172 7.898a1.637 1.637 0 0 1 0-2.27l4.67-4.83zM3.086 6.762l2.718 2.854v6.496h10.398V9.616l2.712-2.854-3.357-3.472a6.216 6.216 0 0 1-4.554 1.995 6.217 6.217 0 0 1-4.557-1.998l-3.36 3.475z"})}))),R=(0,r.forwardRef)((e,t)=>(0,i.jsxs)("svg",(0,L._)((0,x._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,i.jsx)("path",{d:"M10 .625c.345 0 .625.28.625.625v1.667a.625.625 0 1 1-1.25 0V1.25c0-.345.28-.625.625-.625z",fill:"#000"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.208 10a4.792 4.792 0 1 1 9.584 0 4.792 4.792 0 0 1-9.584 0zM10 6.458a3.542 3.542 0 1 0 0 7.084 3.542 3.542 0 0 0 0-7.084z",fill:"#000"}),(0,i.jsx)("path",{d:"M10.625 17.083a.625.625 0 0 0-1.25 0v1.667a.625.625 0 1 0 1.25 0v-1.667zM19.375 10c0 .345-.28.625-.625.625h-1.667a.625.625 0 0 1 0-1.25h1.667c.345 0 .625.28.625.625zM2.917 10.625a.625.625 0 1 0 0-1.25H1.25a.625.625 0 1 0 0 1.25h1.667zM16.63 16.63a.625.625 0 0 1-.885 0l-1.178-1.18a.625.625 0 1 1 .884-.883l1.178 1.178a.625.625 0 0 1 0 .884zM4.55 5.433a.625.625 0 0 0 .883-.883L4.255 3.37a.625.625 0 1 0-.884.884L4.55 5.433zM3.371 16.63a.625.625 0 0 1 0-.885l1.179-1.178a.625.625 0 1 1 .884.884l-1.179 1.178a.625.625 0 0 1-.884 0zM14.567 4.55a.625.625 0 1 0 .884.883l1.178-1.178a.625.625 0 1 0-.884-.884L14.567 4.55z",fill:"#000"})]})));var D=n("426038"),V=n("572806");let O=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:24,height:28,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{opacity:".7",d:"M20.414 5.613a6.718 6.718 0 0 1-2.886-4.39A6.808 6.808 0 0 1 17.416 0h-4.732l-.008 19.29c-.079 2.16-1.827 3.895-3.969 3.895-.665 0-1.292-.17-1.845-.465a4.06 4.06 0 0 1-2.132-3.582c0-2.23 1.785-4.046 3.977-4.046.41 0 .802.07 1.174.187v-4.913a8.618 8.618 0 0 0-1.174-.087C3.907 10.28 0 14.254 0 19.14a8.898 8.898 0 0 0 3.718 7.255A8.557 8.557 0 0 0 8.708 28c4.803 0 8.71-3.974 8.71-8.86V9.357A11.12 11.12 0 0 0 24 11.51V6.696a6.47 6.47 0 0 1-3.586-1.083z",fill:"#E7E7EC"})}))),M=(0,r.forwardRef)((e,t)=>(0,i.jsxs)("svg",(0,L._)((0,x._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16z",fill:"#FE2C55"}),(0,i.jsx)("path",{d:"M4 7.5a1 1 0 0 0 0 1.415l2.342 2.28a1 1 0 0 0 1.415 0l.008-.008 4.65-4.772A1 1 0 0 0 11 5L7.05 9.073 5.414 7.5A1 1 0 0 0 4 7.5z",fill:"#fff"})]}))),B=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:9,height:9,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{d:"M8.805 1.471A.667.667 0 1 0 7.862.53L4.667 3.724 1.47.529a.667.667 0 1 0-.942.942l3.195 3.196L.529 7.862a.667.667 0 0 0 .942.943l3.196-3.196 3.195 3.196a.667.667 0 1 0 .943-.943L5.609 4.667 8.805 1.47z",fill:"#fff"})})));var Z=n("624508"),A=new Z.h({changeThemeSetting:{eventName:"change_theme_setting",params:{theme:"light",enter_from:""}},themeSettingGuideConfirm:{eventName:"theme_setting_guide_confirm",params:{theme:"light"}},themeSettingGuideShow:{eventName:"theme_setting_guide_show",params:{theme:"light"}}}),z=n("579028"),H=n("167960"),W=n("364770");let F=e=>{var t;(null===(t=document.cookie.match(/theme=(\w+);/g))||void 0===t?void 0:t.length)>1&&N.Q.removeItem(D.CookieKeys.Theme,"/"),N.Q.setItem(D.CookieKeys.Theme,e?D.ThemeValues.Dark:D.ThemeValues.Light,1/0,"/",V.J,"",!0)},q=e=>{let{TipComponent:t,isXiguaDomain:n}=e,l=N.Q.getItem({sKey:D.CookieKeys.Theme}),o=(0,I.Dr)(l)===D.ThemeValues.Dark,[u,d]=(0,r.useState)(o),[s,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{var e,t;let n=document.documentElement;null==n||null===(e=n.setAttribute)||void 0===e||e.call(n,"switch-theme",""),null==n||null===(t=n.setAttribute)||void 0===t||t.call(n,"video-opacity","")},[]),(0,r.useEffect)(()=>{(0,H.L)(u),n&&document.body.style.setProperty("--color-primary","#fe3355"),p.emit(p.EVENT.changeTheme,{theme:u?D.ThemeValues.Dark:D.ThemeValues.Light})},[u]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(t,{type:"left",showTip:s,tipClassName:z.default.tipContainer,content:(0,i.jsx)($,{setShowTip:c,isDark:u,setIsDark:d,setThemeCookie:F}),children:[n&&(0,i.jsx)(W.e,{text:u?"切换浅色外观":"切换深色外观",isXiguaDomain:n,children:(0,i.jsx)("div",{className:a()(z.default.opContainer,{[z.default.xiguaOpContainer]:n}),onClick:()=>{d(e=>(A.sendLog("changeThemeSetting",{theme:e?D.ThemeValues.Light:D.ThemeValues.Dark,enter_from:(0,P.yW)()}),F(!e),!e))},children:(0,i.jsx)(k.Z,{src:R,width:24.7,height:20.3,viewBox:"0 0 22 19",color:"var(--color-text-t2)"})})}),!n&&(0,i.jsx)("div",{className:a()(z.default.opContainer),onClick:()=>{d(e=>(A.sendLog("changeThemeSetting",{theme:e?D.ThemeValues.Light:D.ThemeValues.Dark,enter_from:(0,P.yW)()}),F(!e),!e))},children:(0,i.jsx)(k.Z,{src:T,width:24.7,height:20.3,viewBox:"0 0 22 19"})})]})})},$=e=>{let{isDark:t,setIsDark:n,setShowTip:l,setThemeCookie:o}=e,u=e=>{A.sendLog("themeSettingGuideConfirm",{theme:e?D.ThemeValues.Dark:D.ThemeValues.Light})};return(0,r.useEffect)(()=>{A.sendLog("themeSettingGuideShow",{theme:t?D.ThemeValues.Dark:D.ThemeValues.Light})},[]),(0,i.jsxs)("div",{className:z.default.container,children:[(0,i.jsx)(k.Z,{className:z.default.close,onClick:()=>{u(t),o(t),l(!1)},src:B,width:9,height:9,viewBox:"0 0 9 9"}),(0,i.jsx)("div",{className:z.default.title,children:"背景切换"}),(0,i.jsx)("div",{className:z.default.description,children:"点击「换肤」按钮切换背景色"}),(0,i.jsxs)("div",{className:z.default.changeTheme,children:[(0,i.jsx)("div",{className:z.default.lightTheme,children:(0,i.jsxs)("div",{className:z.default.lightBox,onClick:()=>{u(!1),n(!1),o(!1),p.emit(p.EVENT.changeTheme,{theme:D.ThemeValues.Light}),setTimeout(()=>{l(!1)},2e3)},children:[(0,i.jsx)(k.Z,{className:z.default.vector,src:O,width:24,height:28,viewBox:"0 0 24 28"}),(0,i.jsx)(k.Z,{className:a()(z.default.check,{[z.default.hidden]:t}),src:M,width:16,height:16,viewBox:"0 0 16 16"})]})}),(0,i.jsx)("div",{className:z.default.darkTheme,children:(0,i.jsxs)("div",{className:z.default.darkBox,onClick:()=>{u(!0),n(!0),o(!0),p.emit(p.EVENT.changeTheme,{theme:D.ThemeValues.Dark}),setTimeout(()=>{l(!1)},2e3)},children:[(0,i.jsx)(k.Z,{className:z.default.vector,src:O,width:24,height:28,viewBox:"0 0 24 28"}),(0,i.jsx)(k.Z,{className:a()(z.default.check,{[z.default.hidden]:!t}),src:M,width:16,height:16,viewBox:"0 0 16 16"})]})})]})]})};var U=n("904749"),K=n("913285"),G=n("673043");let Q=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:22,height:19,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.724 1.958c-.774-1.314-2.675-1.314-3.448 0L1.025 15.986C.24 17.319 1.202 19 2.748 19h16.504c1.546 0 2.508-1.68 1.723-3.014L12.724 1.958zM11 7a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1zm1 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z",fill:"#fff"})})));var J=n("739939");function X(e){let{className:t}=e;return(0,i.jsx)("div",{className:a()(t,G.default.opContainer),onClick:()=>{(0,J.e)()},children:(0,i.jsxs)("div",{className:G.default.container,children:[(0,i.jsx)("div",{className:G.default.iconSvg,children:(0,i.jsx)(k.Z,{src:Q,width:"22",height:"19",viewBox:"0 0 22 19"})}),(0,i.jsx)("span",{className:G.default.text,children:"举报"})]})})}var Y=n("87679"),ee=n("639451"),et=n("55938"),en=n("295207"),ei=n("59850"),er=n("280647");let el=()=>{let[e,t]=(0,r.useState)(!1),[n,i]=(0,r.useState)(null),[l,o]=(0,r.useState)(!1),a=(0,ei.Z)(async()=>{var e;let n=et.e.getPipWindow({scene:en.d.ListenVideo})||et.e.getPipWindow({scene:en.d.WebVideo});null==n||null===(e=n.close)||void 0===e||e.call(n),o(!0),t(!0)}),u=(0,ei.Z)(()=>{if(e){var n;let e=et.e.getPipWindow({scene:en.d.ListenVideo})||et.e.getPipWindow({scene:en.d.WebVideo});null==e||null===(n=e.close)||void 0===n||n.call(e),t(!1),i(null),o(!1)}});return(0,r.useEffect)(()=>p.listen(p.EVENT.closeWatchLaterPip,u),[]),(0,er.Z)(()=>{!e&&p.emit(p.EVENT.hiddenJxVideoCardPlaying)},[e]),{openWatchLaterPip:a,closeWatchLaterPip:u,watchLaterPipVisible:e,setWatchLaterModalAwemeInfo:i,watchLaterModalAwemeInfo:n,hideWatchLaterModalByPipInitial:l,setHideWatchLaterModalByPipInitial:o}};var eo=n("48795");let ea=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.jsx)("path",{d:"M21 17.5a1 1 0 0 1 1 1v2h2a1 1 0 0 1 0 2h-2v2l-.005.102A1 1 0 0 1 20 24.5v-2h-2a1 1 0 1 1 0-2h2v-2l.005-.102A1 1 0 0 1 21 17.5zm-8 3a1 1 0 1 1 0 2H8a1 1 0 0 1 0-2h5zM24 14a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h16zm0-6a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h16z",fill:"#fff"})}))),eu=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,L._)((0,x._)({width:4,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.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 ed=n("604467"),es=n("212609"),ec=n("590555"),ef=n("966473"),ev=n("206698"),eh=n("709705"),em=n("795653"),ep=n("365169"),eg=n("897471"),ew=n.n(eg);let ey=e=>{let{currentNumber:t,setCurrentNumber:n,awemeInfoList:i,setAwemeInfoList:l,setWatchLaterModalAwemeInfo:o,setModalAwemeInfo:a,watchLaterList:u=[],setWatchLaterList:d,loadMoreWatchLaterList:s,watchLaterListHasMore:c,watchLaterResetStatus:f,swiper:v}=e,h=(0,ec.d)(t),{isWebMiniWin:m}=(0,ep.Iq)(e=>{let{isWebMiniWin:t}=e;return{isWebMiniWin:t}});(0,r.useEffect)(()=>{let e=e=>{var t,n;let i=(0,em.Q5)()&&(e.metaKey&&"w"===e.key||e.metaKey&&"q"===e.key);if((null===(t=document.activeElement)||void 0===t?void 0:t.tagName)!=="INPUT"&&!i&&(null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.contentEditable)!=="true")null==e||e.preventDefault()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,r.useEffect)(()=>{let e=p.listen(p.EVENT.changeWatchLaterPipVideo,e=>{if(null==e?void 0:e.awemeId){var t;let r=null==i?void 0:null===(t=i.findIndex)||void 0===t?void 0:t.call(i,t=>t.awemeId===e.awemeId);-1!==r&&n(r)}}),r=p.listen(p.EVENT.watchLaterPipNewAddListChange,e=>{let{action:r,awemeInfo:l}=e;if("add"===r&&(null==l?void 0:l.awemeId))d(e=>{(null==e?void 0:e.length)===0&&f();let n=e?[...e]:[];return n.splice(t+1,0,l),ew()(n,"awemeId")});else if("minus"===r&&(null==l?void 0:l.awemeId)){var o;let e=null==i?void 0:null===(o=i.findIndex)||void 0===o?void 0:o.call(i,e=>e.awemeId===l.awemeId);if(-1===e)return;t>e?n(e=>e-1):t===e&&t===i.length-1&&n(e=>0===e?0:e-1),d(e=>{var t,n;if(1!==e.length||!m)return e.filter(e=>e.awemeId!==l.awemeId);return null!==(n=null==e?void 0:null===(t=e.map)||void 0===t?void 0:t.call(e,e=>(0,L._)((0,x._)({},e),{watchLaterPipDeletedItem:!0})))&&void 0!==n?n:[]})}});return()=>{null==e||e(),null==r||r()}},[i,t,m]),(0,r.useEffect)(()=>{if(i.length>0&&(null==h?void 0:h.current)===-1){n(0);let e=i[0];o(e),a(e)}},[i]),(0,er.Z)(()=>{var e,n,r;(null==i?void 0:null===(e=i[t])||void 0===e?void 0:e.awemeId)&&(o(null==i?void 0:i[t]),a(null==i?void 0:i[t]),null==v||null===(n=v.slideTo)||void 0===n||n.call(v,t),p.emit(p.EVENT.updateWatchLaterPipData,{currentAwemeId:null==i?void 0:null===(r=i[t])||void 0===r?void 0:r.awemeId}))},[t,i]),(0,r.useEffect)(()=>{l(u)},[u]),(0,r.useEffect)(()=>{c&&i.length&&t>=0&&i.length-t<=2&&(null==s||s())},[t,i,s,c])};n("228983"),n("76375");var e_=n("708003"),eC=n("855357"),ex=n("442379"),eL=n("499059");let eb=()=>{let[e,t]=(0,r.useState)([]),[n,i]=(0,r.useState)(!0),[l,o]=(0,r.useState)(0),[a,u]=(0,r.useState)(!1),[d,s]=(0,r.useState)(!1),[c,f]=(0,r.useState)(!1),v=(0,ec.d)(a),h=(0,ec.d)(l),m=(0,ec.d)(n),g=(0,ec.d)(d),w=(0,ec.d)(c),{isWebMiniWin:y}=(0,ep.Iq)(e=>{let{isWebMiniWin:t}=e;return{isWebMiniWin:t}}),_=(0,r.useCallback)(async()=>{if(!v.current&&!!m.current){u(!0),v.current=!0,f(!1),w.current=!1;try{let{statusCode:e,data:n=[],cursor:r,hasMore:l}=await (0,ex.F8)({cursor:h.current});0===e?(t(e=>{let t=n.filter(e=>e.awemeType!==eC.e.Lvideo);return ew()([...e,...t],"awemeId")}),o(r),h.current=r,i(l),m.current=l,s(!0),g.current=!0,f(!1),w.current=!1):(f(!0),w.current=!0)}catch(e){f(!0),w.current=!0}u(!1),v.current=!1}},[]),C=(0,r.useCallback)(async e=>{try{let{statusCode:r}=await (0,ex.iH)({awemeIds:[e.awemeId],remove_type:ex.L7.selectItems});if(0===r){var t,n,i;p.emit(p.EVENT.watchLaterPipNewAddListChange,{action:"minus",awemeInfo:e});let r=null!==(n=eL.Le.getConfig(eL.gI.WatchLater))&&void 0!==n?n:{},l=null!==(i=r.list)&&void 0!==i?i:"",o=l?l.split(","):[],a=null==o?void 0:null===(t=o.filter)||void 0===t?void 0:t.call(o,t=>t!==e.awemeId);eL.Le.setConfig(eL.gI.WatchLater,(0,L._)((0,x._)({},r),{list:a.join(",")}))}else throw Error("稍后再看移除失败")}catch(e){e_.F.info("服务异常,请重试")}},[]);(0,r.useEffect)(()=>p.listen(p.EVENT.updateWatchLaterPipData,e=>{let t=eL.Le.getConfig(eL.gI.WatchLaterPipData)||{};eL.Le.setConfig(eL.gI.WatchLaterPipData,(0,x._)({},t,e))}),[]),(0,r.useEffect)(()=>p.listen(p.EVENT.cancelWatchLaterPipItem,e=>{let{awemeInfo:t}=e;C(t)}),[]),(0,r.useEffect)(()=>{p.emit(p.EVENT.updateWatchLaterPipData,{awemeInfoList:e,hasMore:n,isLoading:a,isError:c})},[e,n,a,c]),(0,r.useEffect)(()=>p.listen(p.EVENT.fetchMoreWatchLaterPipData,()=>{_()}),[_]);let b=(0,r.useCallback)(()=>{t([]),i(!0),m.current=!0,o(0),h.current=0,v.current=!1,s(!1),g.current=!1,f(!1),w.current=!1},[]);return(0,r.useEffect)(()=>{if(!y)return p.listen(p.EVENT.watchLaterPipNewAddListChange,e=>{let{action:n,awemeInfo:i}=e;"add"===n&&(null==i?void 0:i.awemeId)?t(e=>((null==e?void 0:e.length)===0&&b(),ew()([i,...e],"awemeId"))):"minus"===n&&(null==i?void 0:i.awemeId)&&t(e=>(1===e.length&&b(),e.filter(e=>e.awemeId!==i.awemeId)))})},[b,y]),(0,r.useEffect)(()=>p.listen(p.EVENT.resetWatchLaterPipData,e=>{let{type:n,selectedItems:i}=e;"selected"===n?t(e=>e.filter(e=>{var t,n;return!(null==i?void 0:null===(n=i.map)||void 0===n?void 0:null===(t=n.call(i,e=>e.awemeId))||void 0===t?void 0:t.includes(e.awemeId))})):"seen"===n&&(b(),_())}),[b,_]),{awemeList:e,loadMore:_,resetStatus:b,hasMore:n,cursor:l,hasMoreRef:m,cursorRef:h,hasFetched:d,hasFetchedRef:g,setAwemeList:t}};var eE=n("746517"),ej=n("771410"),ek=n("783789"),eS=e=>{var t,n,l;let{onClick:o,userContext:a,abTestData:u,watchLaterPipVisible:d,modalAwemeInfo:s,setWatchLaterModalAwemeInfo:c,onClose:f,hideWatchLaterModalByPipInitial:v,setHideWatchLaterModalByPipInitial:h,className:m,isShow:g}=e,{userInfo:w,dispatch:y}=a||{},_=null==w?void 0:w.isLogin,C=(0,ec.d)(_),[L,b]=(0,r.useState)([]),[E,j]=(0,r.useState)(!1),S=(0,r.useRef)();(0,r.useEffect)(()=>(g&&(null==u?void 0:u.jxWatchLaterPip)===2&&!(0,eh.$o)(D.LocalStorageKeys.WatchLaterPipGuidanceTip)&&((0,eh.qQ)(D.LocalStorageKeys.WatchLaterPipGuidanceTip,1),j(!0),S.current=setTimeout(()=>j(!1),1e4)),()=>{S.current&&clearTimeout(S.current)}),[g,u]),(0,r.useEffect)(()=>{g&&ej.Z.report("watch_later_add_show",{enter_from:"discover"})},[g]);let N=(0,ef.x)(()=>{ej.Z.report("watch_later_add_red_dot_show",{enter_from:"discover",red_dot_number:(null==L?void 0:L.length)||0})}),I=null==w?void 0:null===(t=w.info)||void 0===t?void 0:t.uid,{awemeList:T,setAwemeList:R,loadMore:V,hasMore:O,resetStatus:M,hasFetched:B}=eb(),Z=!O&&(null==T?void 0:null===(l=T.filter)||void 0===l?void 0:null===(n=l.call(T,e=>!e.watchLaterPipDeletedItem))||void 0===n?void 0:n.length)===0,A=(0,ec.d)(Z);(0,r.useEffect)(()=>{if(I){let e=(0,eh.$o)(D.LocalStorageKeys.watchLaterPipNewAddList);e&&e[I]?b(e[I]):b([])}else b([])},[I]);let z=(e,t)=>{let n=(0,eh.$o)(D.LocalStorageKeys.watchLaterPipNewAddList)||{};n[e]=t,(0,eh.qQ)(D.LocalStorageKeys.watchLaterPipNewAddList,n)};return(0,r.useEffect)(()=>{if(I)return p.listen(p.EVENT.resetWatchLaterPipData,e=>{let{type:t,selectedItems:n}=e,i=(0,eh.$o)(D.LocalStorageKeys.watchLaterPipNewAddList)||{},r=i[I]||[],l="selected"===t?r.filter(e=>{var t,i;return!(null==n?void 0:null===(i=n.map)||void 0===i?void 0:null===(t=i.call(n,e=>e.awemeId))||void 0===t?void 0:t.includes(e))}):[];i[I]=l,(0,eh.qQ)(D.LocalStorageKeys.watchLaterPipNewAddList,i),b(l)})},[I]),(0,r.useEffect)(()=>{if(I){let e=p.listen(p.EVENT.watchLaterPipNewAddListChange,e=>{let{action:t,awemeInfo:n}=e;if("discover"===(0,P.yW)())"add"===t&&(null==n?void 0:n.awemeId)?b(e=>{if(e.includes(n.awemeId))return e;let t=Array.from(new Set([...e,n.awemeId]));return z(I,[...t]),[...t]}):"minus"===t&&(null==n?void 0:n.awemeId)&&b(e=>{let t=e.filter(e=>e!==n.awemeId);return z(I,t),t})});return()=>{null==e||e()}}},[I]),(0,i.jsxs)("div",{className:m,children:[(0,i.jsx)(eo.Tooltip,{content:Z?"请先添加稍后再看视频吧":void 0,position:"left",style:Z?void 0:{display:"none"},children:(0,i.jsxs)("div",{className:es.default.watchLaterPipEntry,onClick:e=>{if(ej.Z.report("watch_later_add",{enter_from:"discover"}),!(null==C?void 0:C.current)){(0,eE.default)({headerText:"登录后查看稍后再看",enterMethod:"watch_later_pip",success:async()=>{await (null==y?void 0:y({type:"updateUserInfo"})),M(),await V()}});return}if(null==A?!void 0:!A.current)b([]),z(I,[]),null==o||o(e)},id:"watch-later-pip-entry",onMouseEnter:()=>{ej.Z.report("hover_watch_later_add",{enter_from:"discover",text:Z?"请先添加稍后再看视频吧":""}),S.current&&clearTimeout(S.current),j(!1),O&&!B&&V()},style:B?void 0:{cursor:"not-allowed"},children:[(null==u?void 0:u.jxWatchLaterPip)===2&&E&&(0,i.jsxs)("div",{className:es.default.popTip,onClick:e=>{e.stopPropagation(),S.current&&clearTimeout(S.current),j(!1)},children:[(0,i.jsx)(k.Z,{src:eu,viewBox:"0 0 4 17",width:4,height:17,className:es.default.arrow}),"精选支持小窗播放稍后再看啦"]}),(0,i.jsx)(k.Z,{src:ea,width:32,height:32,viewBox:"0 0 32 32"}),L.length>0&&(0,i.jsx)("div",{className:es.default.badge,ref:N,children:L.length>99?"99":L.length})]})}),d&&(0,i.jsx)(ed.default,{isUseChannelFeed:!1,modalAwemeInfo:s,setWatchLaterModalAwemeInfo:c,userContext:a,abtestData:u,modalEnterFrom:ev.a.WatchLaterPip,close:f,anyHooks:ey,scene:ev.a.WatchLaterPip,logParams:(0,x._)({},(0,ek.B)()),hideModalWhenPip:!0,hideModalByPipInitial:v,setHideModalByPipInitial:h,autoOpenPip:!0,watchLaterList:T,setWatchLaterList:R,loadMoreWatchLaterList:V,watchLaterListHasMore:O,watchLaterResetStatus:M,initIndex:0})]})},eN=n("581999"),eI=n("45972"),eP=n("119594");let eT=()=>{let[e,t]=(0,r.useState)([]),n=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let e=p.listen(p.EVENT.flyToWatchLater,e=>{let{startRect:i,awemeInfo:r}=e,l=document.getElementById("watch-later-pip-entry");if(!l)return;let o=l.getBoundingClientRect(),a=i.left+i.width/2,u=i.top+i.height/2,d=o.left+o.width/2,s=o.top+o.height/2,c=n.current++;t(e=>[...e,{id:c,startX:a,startY:u,endX:d,endY:s}]),setTimeout(()=>{t(e=>e.filter(e=>e.id!==c)),p.emit(p.EVENT.watchLaterPipNewAddListChange,{action:"add",awemeInfo:r})},600)});return()=>{null==e||e()}},[]),0===e.length)?null:(0,i.jsx)("div",{className:eP.default.container,children:e.map(e=>(0,i.jsx)(eR,(0,x._)({},e),e.id))})},eR=e=>{let{startX:t,startY:n,endX:l,endY:o}=e,[a,u]=(0,r.useState)({x:t,y:n});return(0,r.useEffect)(()=>{(0,eI.U)(()=>{u({x:l,y:o})})},[l,o]),(0,i.jsx)("div",{className:eP.default.ballWrapper,style:{transform:`translateX(${a.x}px)`},children:(0,i.jsx)("div",{className:eP.default.ballInner,style:{transform:`translateY(${a.y}px)`}})})},eD=(0,s.ZP)(()=>n.e("90551").then(n.bind(n,841274)),{ssr:!1});function eV(e){var t;let{className:n="",showUpIconScrollY:o,children:u,isXiguaDomain:s,renderFeedBackIconInSSR:x,version:L,nowPathName:N,SlardarInstance:I,extra:P,abTestData:T,wrapStyle:R,splashAdStatus:D=c.QB.Normal,miniFeedBackWidth:V}=e,{isLogin:O}=(0,Y.Pc)(),[M,B]=(0,r.useState)(!1),[Z,A]=(0,r.useState)(!1),[z,H]=(0,r.useState)(null),F=(0,r.useRef)(null),[$,G]=(0,r.useState)(!0),{isFullscreen:Q}=(0,f.O)(),J=(0,eN.useUserInfoContext)(),et=null==N?void 0:null===(t=N.startsWith)||void 0===t?void 0:t.call(N,"/jingxuan"),en=(0,r.useCallback)(e=>{B(e),p.emit(p.EVENT.isShowUp,e)},[]),{openWatchLaterPip:ei,closeWatchLaterPip:er,watchLaterPipVisible:eo,watchLaterModalAwemeInfo:ea,setWatchLaterModalAwemeInfo:eu,hideWatchLaterModalByPipInitial:ed,setHideWatchLaterModalByPipInitial:es}=el();(0,r.useEffect)(()=>{var e,t,n;A(!!(null===(n=window)||void 0===n?void 0:null===(t=n.CSS)||void 0===t?void 0:null===(e=t.supports)||void 0===e?void 0:e.call(t,"--testName: 0")));let i=d()(()=>{let{y:e}=(0,g.F)(z||window);e>(o||window.innerHeight)?M||en(!0):M&&en(!1)},300),r=z||document;return r.addEventListener("scroll",i),i(),()=>{r.removeEventListener("scroll",i)}},[o,M,en,Z,z]),(0,r.useEffect)(()=>{B(!1)},[N]),(0,r.useEffect)(()=>{let e=p.listen(p.EVENT.globalScrollEl,e=>{if((0,w.dH)(location.pathname)){let e=document.getElementById("search-content-area"),t=(0,ee.j)(e);t&&H(t)}else if(H(e),location.pathname.startsWith("/jingxuan")&&!location.pathname.includes("/live")){let e=F.current;e&&"hidden"===e.style.visibility&&(e.style.visibility="visible")}});return p.emit(p.EVENT.sideBarShow,!0),()=>{null==e||e()}},[]),(0,r.useEffect)(()=>{let e=()=>{innerWidth<=V?G(!1):G(!0)};return V>0&&(e(),window.addEventListener("resize",e)),()=>window.removeEventListener("resize",e)},[V]);let ec=v.a.useClientDetect(),ef=()=>{var e,t,n,i,r;let l=(0,m.zD)();return!!([h.NavigationMenuItemVal.Recommend,h.NavigationMenuItemVal.Friend].includes(l)&&(null===(e=document)||void 0===e?void 0:e.getElementById("douyin-right-container"))&&(null===(t=document)||void 0===t?void 0:t.querySelector(".xgplayer-playswitch"))||!Q&&[h.NavigationMenuItemVal.Follow].includes(l)&&(null===(r=document)||void 0===r?void 0:null===(i=r.getElementsByClassName("recommend-out-switch-btn"))||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:n.parentElement))||!1},ev=(()=>{let e=(0,m.zD)();if(ef()){if([h.NavigationMenuItemVal.Follow].includes(e)){var t,n,i;return null===(i=document)||void 0===i?void 0:null===(n=i.getElementsByClassName("recommend-out-switch-btn"))||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.parentElement}return document.getElementById("douyin-right-container")}return document.body})();return ev?(0,l.createPortal)((0,i.jsxs)("div",{id:"douyin-sidebar",className:a()(j.default.container,n,{[j.default.xiguaContainer]:s,[j.default.absolute]:ef()}),style:R,ref:F,children:[u,!!T.jxWatchLaterPip&&et&&(0,i.jsx)(eT,{}),!ec&&Z&&s&&(0,i.jsx)(q,{TipComponent:U.C,isXiguaDomain:s}),(0,y.mf)()&&(0,i.jsx)(X,{className:j.default.zhuantiReport}),D===c.QB.Normal&&$&&(0,i.jsxs)(i.Fragment,{children:[0===T.feedbackOnline&&(0,i.jsx)(K.k,{Slardar:I,componentName:"FeedBackDom",children:(0,i.jsx)(S.Z,{isXiguaDomain:s,renderIconInSSR:x,version:L,extra:P})}),1===T.feedbackOnline&&(0,i.jsx)(K.k,{Slardar:I,componentName:"FeedBackOnline",children:(0,i.jsx)(eD,{isLogin:O,version:L,abTestData:T})})]}),!!T.jxWatchLaterPip&&(0,_.ZV)()&&(0,i.jsx)(K.k,{Slardar:I,componentName:"WatchLaterPipEntry",children:(0,i.jsx)(eS,{className:a()({[j.default.hidden]:!et}),isShow:et,abTestData:T,userContext:J,watchLaterPipVisible:eo,modalAwemeInfo:ea,setWatchLaterModalAwemeInfo:eu,hideWatchLaterModalByPipInitial:ed,setHideWatchLaterModalByPipInitial:es,onClick:ei,onClose:er})}),s&&M&&(0,i.jsx)(W.e,{text:"回到顶部",isXiguaDomain:s,children:(0,i.jsx)("div",{className:a()(j.default.opContainer,{[j.default.xiguaOpContainer]:s}),onClick:()=>{(0,C.d)(null!=z?z:window,0,500)},children:(0,i.jsx)(k.Z,{src:E,width:32,height:32,viewBox:"-7 -7 36 36"})})}),!s&&M&&(0,i.jsx)("div",{className:a()(j.default.opContainer,{[j.default.xiguaOpContainer]:s}),onClick:()=>{(0,C.d)(null!=z?z:window,0,500)},children:(0,i.jsx)(k.Z,{src:b,width:32,height:32})})]}),ev):null}var eO=eV},904749:function(e,t,n){"use strict";n.d(t,{C:function(){return v}});var i=n("320165"),r=n("101199"),l=n("469935"),o=n.n(l),a=n("437589"),u=n("403055"),d=n("629686"),s=n("402748");let c=(0,r.forwardRef)((e,t)=>(0,i.jsx)("svg",(0,s._)((0,d._)({width:4,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,i.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 f=n("176449");let v=e=>{let{type:t="left",hoverShow:n=!1,showTip:l,setShowTip:d,content:s,className:v,tipClassName:h,iconClassName:m,otherHide:p=!0,clickHide:g=!0,children:w,svgPointsDisabled:y=!0,hoverEmitAtOnce:_=!1}=e,C=(0,r.useRef)(!1),x=(0,r.useRef)(null),L=(0,r.useCallback)(e=>{x.current&&(clearTimeout(x.current),x.current=null),C.current=e,d(e)},[]);return(0,r.useEffect)(()=>{if(!l||!d||!p)return()=>{};let e=e=>{L(!1)};return document.addEventListener("scroll",e),document.addEventListener("click",e),()=>{document.removeEventListener("scroll",e),document.removeEventListener("click",e)}},[l,n,d,L]),(0,i.jsxs)("div",{className:o()(u.default.tooltipWrapper,v,"dy-tip-container",{[u.default.svgPointsEventAuto]:!y}),onMouseEnter:()=>{n&&d&&!x.current&&(C.current=!0,x.current=setTimeout(()=>{if(x.current=null,!!C.current)d(!0)},_?0:a.o))},onMouseLeave:()=>{n&&d&&L(!1)},onClick:()=>{g&&L(!1)},children:[!!l&&(0,i.jsxs)("div",{className:o()(u.default.tooltip,u.default[t],h),children:[(0,i.jsx)(f.Z,{width:4,height:17,src:c,className:o()(u.default.icon,u.default[t],m),viewBox:"0 0 4 17"}),s]}),w]})}},364770:function(e,t,n){"use strict";n.d(t,{e:function(){return m}});var i=n("629686"),r=n("402748");n("490629"),n("706056");var l=n("320165"),o=n("101199"),a=n("890710"),u=n("793571"),d=n("469935"),s=n.n(d),c=n("674095");let f=(0,o.forwardRef)((e,t)=>(0,l.jsx)("svg",(0,r._)((0,i._)({width:4,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,l.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 v=n("176449"),h={left:"top",right:"top",top:"left",bottom:"left"};let m=e=>{let{type:t="left",text:n,offsetArrow:d,offsetContainer:m,className:p,children:g,delay:w=200,isXiguaDomain:y,onMouseEnter:_}=e,[C,x]=(0,o.useState)({width:0,height:0}),[L,b]=(0,o.useState)(t),[E,j]=(0,o.useState)(!1),[k,S]=(0,o.useState)({}),[N,I]=(0,o.useState)(d),P=(0,o.useRef)(null),T=(0,o.useRef)();(0,o.useRef)(null);let{run:R,cancel:D}=(0,u.Z)(j,w),V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=window.innerWidth,l=window.innerHeight;return{left:e<0?e:0,top:t<0?t:0,right:e+n>r?r-e-n:0,bottom:t+i>l?l-t-i:0}},O=(0,o.useCallback)(()=>{if(!P.current)return{};let{x:e,y:n,width:l,height:o}=T.current.getBoundingClientRect(),a=e,u=n,d=(C.width-l)/2,s=(C.height-o)/2;if(["left","right"].includes(t)){switch(t){case"left":a-=C.width+10;break;case"right":a+=l+10}"number"==typeof m?u+=m:u+=-s}else if(["top","bottom"].includes(t)){switch(t){case"top":u-=C.height+10;break;case"bottom":u+=o+10}"number"==typeof m?a+=m:a+=-d}let{top:c,left:f,right:v,bottom:h}=V(a,u,C.width,C.height);return b(t),["left","right"].includes(t)?(c&&(u-=c),h&&(u+=h),f&&!v&&(a+=C.width+20+l,b("right")),v&&!f&&(a-=C.width+20+l,b("left"))):["top","bottom"].includes(t)&&(f&&(I(f),a-=f),v&&(I(v),a+=v),c&&!h&&(u+=C.height+20+o,b("bottom")),h&&!c&&(u-=C.height+20+o,b("top"))),(0,r._)((0,i._)({},k),{left:`${a}px`,top:`${u}px`})},[k,C]),M=(0,o.useCallback)(()=>{let e=o.Children.only(g);return o.cloneElement(e,{onMouseEnter:e=>{D(),R(!0),T.current||(T.current=e.target),S(O()),null==_||_()},onMouseLeave:()=>{R(!1)}})},[C,g]);return(0,o.useEffect)(()=>{let e=e=>{if(!!E)S(O())};return document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("scroll",e,!0)}},[O]),(0,o.useEffect)(()=>{if(!!P.current)x(P.current.getBoundingClientRect())},[E]),(0,o.useEffect)(()=>{T.current&&S(O())},[C]),(0,l.jsxs)(l.Fragment,{children:[E&&a.createPortal((0,l.jsxs)("div",{ref:P,style:(0,i._)({position:"fixed"},k),onMouseEnter:e=>{D()},onMouseLeave:()=>{R(!1)},className:s()(c.default.tooltip,c.default[t],p,{[c.default.xiguaTooltip]:y}),children:[(0,l.jsx)(v.Z,{width:4,height:17,src:f,style:{[h[L]]:N&&`calc(50% - ${N}px)`},className:s()(c.default.icon,c.default[L]),viewBox:"0 0 4 17"}),(0,l.jsx)("span",{className:"",children:n})]}),document.body),M()]})}},124916:function(e,t,n){"use strict";n.d(t,{si:function(){return S},lI:function(){return k},ns:function(){return _}});var i=n("629686"),r=n("402748");n("490629");var l=n("320165"),o=n("101199"),a=n("350856"),u=n.n(a),d=n("886299"),s=n.n(d),c=n("123622"),f=n("480333");n("112459"),n("759943"),n("706056");var v=n("942155"),h=n.n(v);class m{on(e,t){return this.emitter.on(e,t),()=>{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,f._)(this,"emitter",void 0),this.emitter=new(h())}}var p=n("314857"),g=n("20353"),w=n("581999");let y=(0,o.createContext)(null),_=()=>(0,o.useContext)(y),C=[5,1,2,3,4],x=[1,5,2,3,4],L={enabled:!1,opacity:80,fontSize:1,region:0,speed:1},b={playbackRate:1,definition:"__auto__",autoPlayNext:!1,paidContent:!1,wideScreen:!1,fullScreen:!1,playing:!1,loading:!1,working:!1,volume:50,muted:!1,pip:!1},E={modal:!1,input:"",settings:L},{sectionStorage:j}=(0,p.y)("player",{definition:b.definition,definitionLastTime:0,volume:b.volume/100,danmaku:L,nextautoplay:"0",miniwin:"0",isMute:0},{playbackratio:1}),k={shown:!1,played:0,total:0,rate:0,sent:0},S=e=>{var t,n;let{children:a}=e,d=(0,o.useMemo)(()=>new g.k(b),[]),f=(0,o.useMemo)(()=>new g.k(E),[]),v=(0,o.useMemo)(()=>new g.k,[]),h=(0,o.useMemo)(()=>new g.k,[]),p=(0,o.useMemo)(()=>new m,[]),_=(0,o.useRef)((0,i._)({},k)),S=(0,w.useUserInfoContext)(),N=null!==(n=null==S?void 0:S.isLogin)&&void 0!==n?n:null==S?void 0:null===(t=S.userInfo)||void 0===t?void 0:t.isLogin,I=(0,o.useMemo)(()=>({danmakuPlayResultRef:_,emitter:p,control:d,userlog:h,channel:v,danmaku:f}),[]);return(0,o.useLayoutEffect)(()=>{N&&j.definitionLastTime+864e5>Date.now()&&d.dispatch("definition",j.definition),d.dispatch("playbackRate",j.playbackratio),d.dispatch("autoPlayNext","1"===String(j.nextautoplay)),d.dispatch("volume",s()(Math.round(100*j.volume),0,100)),d.dispatch("muted",1===j.isMute),d.dispatch("pip","1"===j.miniwin);let e=d.subscribe("playbackRate",e=>{j.playbackratio=e}),t=d.subscribe("autoPlayNext",e=>{j.nextautoplay=e?"1":"0"}),n=d.subscribe("definition",e=>{j.definition="__auto__"!==e?e:void 0,j.definitionLastTime=Date.now()}),i=d.subscribe("volume",e=>{j.volume=s()(e/100,0,1)}),r=d.subscribe("muted",e=>{j.isMute=e?1:0}),l=d.subscribe("pip",e=>{j.miniwin=e?"1":"0"});return()=>{e(),t(),n(),i(),r(),l()}},[]),(0,o.useLayoutEffect)(()=>{if(N){f.dispatch("settings",(0,i._)({},f.getValue("settings"),j.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:n,isOpen:l,opacity:o,fontSize:a}]=e.confList;f.dispatch("settings",(0,r._)((0,i._)({},f.getValue("settings")),{fontSize:C.findIndex(e=>e===a),region:x.findIndex(e=>e===n),enabled:l,speed:t-1,opacity:o}))}});let e=u()(e=>{let{enabled:t,region:n,speed:i,opacity:r,fontSize:l}=e;(0,c.RB)({isOpen:t,opacity:r,speed:i+1,region:x[n],fontSize:C[l]})},500);return f.subscribe("settings",t=>e(j.danmaku=t))}f.dispatch("settings",(0,r._)((0,i._)({},L),{enabled:!0}))},[N]),(0,l.jsx)(y.Provider,{value:I,children:a})}},314857:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var i=n(629686);n(76375),n(490629),n(362051);var r=n(383833),l=n.n(r);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,i._)({},t,n),a=e=>{if(e in t)return window.localStorage;if(e in n)return window.sessionStorage;throw Error("never")},u=Object.create((0,i._)({},r));for(let[t,n]of Object.entries(r)){let i=`${l()(e)}_${l()(t)}`;Object.defineProperty(u,t,{enumerable:!0,get(){try{let e=a(t).getItem(i);if(e){let t=JSON.parse(e);if(typeof t==typeof n)return t}return n}catch(e){return n}},set(e){if(void 0===e)return a(t).removeItem(i);a(t).setItem(i,JSON.stringify(e))}})}return{sectionStorage:u,getSubsection:(t,n,i)=>o(`${e}_${t}`,n,i)}}},87679:function(e,t,n){"use strict";n.d(t,{Pc:function(){return s},hg:function(){return d},yw:function(){return u}}),n(679308);var i=n(935372),r=n(601034),l=n(124916),o=n(581999),a=n(746517);let u=0,d=0,s=()=>{let{userInfo:e,dispatch:t}=(0,o.useUserInfoContext)(),n=(0,l.ns)();return{dispatch:t,userInfo:e,isLogin:e.isLogin,requestLogin:(e,i)=>(u=1,new Promise(r=>{null==n||n.channel.dispatch("popover",{}),(0,a.default)({headerText:e,enterMethod:i,success(){null==t||t({type:"updateUserInfo"}),r(!0)},onClose(){u=0,r(!1)}})})),reportDanmaku:l=>(null==n||n.channel.dispatch("popover",{}),d=1,new Promise(n=>{var o,a;(0,i.m)({title:"举报弹幕",type:"danmaku",object_id:l,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===(a=e.info)||void 0===a?void 0:a.secUid)||"",onClose:()=>{d=0,n()},logParams:{enter_method:"list"},loginDispatch:t,userInfo:null==e?void 0:e.info,pipeline_id:"",enter_from:(0,r.yW)(),isOrigin:!0},document.fullscreenElement||document.body)}))}}},577596:function(e,t,n){"use strict";n(932651);var i=n(101199);function r(){return(r=Object.assign||function(e){for(var t=1;t{if("length"===n||"prototype"===n||"arguments"===n||"caller"===n)return;let l=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);if(!!r(l,o)||!i)Object.defineProperty(e,n,o)},r=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},l=(e,t)=>{let n=Object.getPrototypeOf(t);if(n!==Object.getPrototypeOf(e))Object.setPrototypeOf(e,n)},o=(e,t)=>`/* Wrapped ${e}*/ ${t}`,a=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),u=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),d=(e,t,n)=>{let i=""===n?"":`with ${n.trim()}() `,r=o.bind(null,i,t.toString());Object.defineProperty(r,"name",u),Object.defineProperty(e,"toString",{...a,value:r})},s=new WeakMap;function c(e,{cacheKey:t=([e])=>e,cache:n=new Map}={}){let r=new Map,o=function(...i){let l=t(i);if(r.has(l))return r.get(l);let o=(async()=>{try{if(n&&await n.has(l))return await n.get(l);let t=e.apply(this,i),r=await t;try{return r}finally{n&&await n.set(l,r)}}finally{r.delete(l)}})();return r.set(l,o),o};return!function(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))i(e,t,r,n);l(e,t),d(e,t,r)}(o,e,{ignoreNonConfigurable:!0}),s.set(o,n),o}}}]);