"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1127],{86702:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(24643),o=i(40099),r=i(84987);const s={id:"logo-dark-c4561408",use:"logo-dark-c4561408-usage",viewBox:"0 0 118 42",content:''};function a(e){const t=(0,o.useContext)(r.X);return(0,o.useLayoutEffect)((()=>(t.add(s),()=>{t.remove("logo-dark-c4561408")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#logo-dark-c4561408"},void 0)}),void 0)}},93678:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(24643),o=i(40099),r=i(84987);const s={id:"logo-light-0ca3c974",use:"logo-light-0ca3c974-usage",viewBox:"0 0 118 30",content:''};function a(e){const t=(0,o.useContext)(r.X);return(0,o.useLayoutEffect)((()=>(t.add(s),()=>{t.remove("logo-light-0ca3c974")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#logo-light-0ca3c974"},void 0)}),void 0)}},77734:(e,t,i)=>{i.d(t,{GC:()=>O,xX:()=>k,Ak:()=>w,VB:()=>b});var n,o=i(58632),r=i(64162),s=i(4126),a=i(93995),l=i(23999),c=i(26324),d=i(62564),u=i(8536),v=i(98812),p=i(95719),h=i(57431),m=i(16469),g=i(50970),_=i(7672),f=i(55099);!function(e){e[e.Int=1]="Int",e[e.Bool=2]="Bool",e[e.String=3]="String"}(n||(n={}));let y=class{constructor(e){this.fetch=e}postScheduleRecord(e){return this.fetch.post("/api/v1/post_schedule/ack/",{query:Object.assign(Object.assign({},e),{tt_csrf_token:this.fetch.csrfToken})})}updateRedDot(e){return this.fetch.post("/api/reddot/report",{query:Object.assign({},e)})}queryLongVideoTooltipVisibility(e){return this.fetch.post("/tiktok/popup/display/v1/",{query:Object.assign({},e)})}updateLongVideoToolTipVisibility(e){return this.fetch.post("/tiktok/popup/report/v1/",{query:Object.assign({},e)})}};y=(0,o.__decorate)([(0,_._)(),(0,o.__metadata)("design:paramtypes",[f.p])],y);const b="upload-long-video",w="series-tip",k="upload-podcast";var P;!function(e){e[e.Schedule=0]="Schedule",e[e.LongVideo=1]="LongVideo",e[e.Podcast=2]="Podcast"}(P||(P={}));let O=class extends r.E{constructor(e,t){var i,n,o,r,s;super(),this.defaultState={tooltipPriority:2,uploadTooltipType:0,maxPublishVideoDuration:-60,redDot:null!==(s=null===(r=null===(o=null===(n=null===(i=this.home)||void 0===i?void 0:i.state)||void 0===n?void 0:n.appContext)||void 0===o?void 0:o.user)||void 0===r?void 0:r.redDot)&&void 0!==s?s:[]},this.service=e,this.home=t}setUploadLongVideoTooltip(e,{hasLongVideoPermission:t,uploadProfileMaxPublishVideoDuration:i,hasPosted1MinPlusVideo:n}){const o=window.location.pathname.includes("/upload");if(t&&n&&!m.bc.getItem(b)&&!o&&i>0)return e.tooltipPriority=4,e.uploadTooltipType=1,void(e.maxPublishVideoDuration=i)}triggerUploadLongVideoTooltip(e){var t,i;if(!window.location.pathname.includes("/upload")){const n=(0,h.x)();e.tooltipPriority=4,e.uploadTooltipType=1,e.maxPublishVideoDuration=null!==(i=null===(t=n.user)||void 0===t?void 0:t.longVideoMinutes)&&void 0!==i?i:0}}setTooltipPriority(e,t){e.tooltipPriority=t}deleteTypeRedDot(e,t){const i=[...e.redDot],n=i.indexOf(t);i.splice(n,1),e.redDot=i}checkLongVideoTooltipStatus(e){return e.pipe((0,d.T)((()=>{var e,t,i,n,o,r,s,a,l,c,d;const u=(0,h.x)(),v=null!==(t=null===(e=u.user)||void 0===e?void 0:e.longVideoMinutes)&&void 0!==t?t:0,p=(()=>{var e,t,i,n;const o=(0,h.x)();return Boolean(null===(n=null===(i=null===(t=null===(e=null==o?void 0:o.abTestVersion)||void 0===e?void 0:e.abTestApp)||void 0===t?void 0:t.parameters)||void 0===i?void 0:i.tiktok)||void 0===n?void 0:n.long_video_popup_display_optimization)})();if(!p){const e=Boolean((null===(i=u.user)||void 0===i?void 0:i.longVideoMinutes)&&(null===(n=u.user)||void 0===n?void 0:n.longVideoMinutes)>1),t=null===(o=u.abTestVersion)||void 0===o?void 0:o.parameters,s=Boolean(null===(r=t.tiktok)||void 0===r?void 0:r.has_posted_1minplus);return this.getActions().setUploadLongVideoTooltip({hasLongVideoPermission:e,uploadProfileMaxPublishVideoDuration:v,hasPosted1MinPlusVideo:s})}const m=parseInt(null!==(l=null===(a=null===(s=null==u?void 0:u.user)||void 0===s?void 0:s.longVideoPopupDisplayedStatus)||void 0===a?void 0:a.display_history)&&void 0!==l?l:"-1",10),g=parseInt(null!==(d=localStorage.getItem(`longvideo_popup_already_displayed_local_${null===(c=null==u?void 0:u.user)||void 0===c?void 0:c.uid}`))&&void 0!==d?d:"-1",10);let _=null,f=!1;return-1===m&&-1!==g?(f=!0,_=g):_=m,_this.service.queryLongVideoTooltipVisibility({permission_type:e.permission_type}).pipe((0,v.H)((t=>{const i=t;return i&&0===i.status_code&&i.need_to_display?(0,l.of)(this.getActions().triggerUploadLongVideoTooltip(),this.getActions().updateLongVideoTooltip({permission_type:e.permission_type})):(0,l.of)(this.noop())}))))))}updateLongVideoTooltip(e){return e.pipe((0,u.Z)((e=>this.service.updateLongVideoToolTipVisibility({permission_type:e.permission_type}).pipe((0,d.T)((t=>{var i;if(t&&0===t.status_code){const t=(0,h.x)();try{localStorage.setItem(`longvideo_popup_already_displayed_local_${null===(i=null==t?void 0:t.user)||void 0===i?void 0:i.uid}`,`${e.permission_type}`)}catch(e){}}return this.noop()}))))))}postScheduleRecord(e){return e.pipe((0,u.Z)((e=>this.service.postScheduleRecord(e).pipe((0,d.T)((()=>this.noop()))))))}updateRedDot(e){return e.pipe((0,u.Z)((({redirect:e,type:t,isElectronApp:i=!1})=>this.service.updateRedDot({type:t}).pipe((0,p.M)((()=>{e&&(i?window.open(e,"_blank"):location.href=e)})),(0,d.T)((()=>this.getActions().deleteTypeRedDot(t)))))))}};(0,o.__decorate)([(0,s.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"setUploadLongVideoTooltip",null),(0,o.__decorate)([(0,s.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"triggerUploadLongVideoTooltip",null),(0,o.__decorate)([(0,s.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"setTooltipPriority",null),(0,o.__decorate)([(0,s.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"deleteTypeRedDot",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"checkLongVideoTooltipStatus",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"queryLongVideoTooltip",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"updateLongVideoTooltip",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"postScheduleRecord",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],O.prototype,"updateRedDot",null),O=(0,o.__decorate)([(0,a.n)("Header"),(0,o.__metadata)("design:paramtypes",[y,g.L])],O)},21683:(e,t,i)=>{i.d(t,{Db:()=>L,L2:()=>C,YS:()=>E,oY:()=>T,r7:()=>A});var n=i(41271),o=i(40099),r=i(47172),s=i(58305),a=i(45297),l=i(95358),c=i(34012),d=i(88920),u=i(96689),v=i(25616),p=i(49057),h=i(71281),m=i(54888),g=i(75792),_=i(8615),f=i(39505);const y=5e3,b=5,w="auto_show";var k;!function(e){e.Sidebar="sidebar",e.Footer="footer"}(k||(k={}));const P=[{title:"terms",key:"terms-of-service",href:""},{title:"privacy",key:"privacy-policy-row",href:""},{title:"accessibility",key:"accessibility",href:""},{title:"copyright",key:"copyright-policy",href:""}],O="accessibility",S="copyright-policy";function E(){const{pathname:e}=(0,r.useLocation)();return!!e.startsWith("/coin")}function x(){const e=(0,s._S)(a._),{count:t,date:i}=e?JSON.parse(e):{date:"",count:0};return{todayShowed:(new Date).toDateString()===new Date(Number(i)).toDateString(),count:t}}function T(){const{pathname:e}=(0,r.useLocation)(),t=(0,l.Fj)(e)||(0,l.Tc)(e);return(0,c.Ig)()&&t}function A(e=0){const t=(0,o.useRef)(0),i=(0,o.useRef)(0),n=(0,o.useRef)(0),r=(0,o.useRef)(!1),[l,c]=(0,o.useState)(!1),{tooltipPriority:d,handlePopoverEnd:u,handlePopoverInitial:v}=(0,f.N)(2);(0,o.useEffect)((()=>{2===d&&r.current&&(c(!0),n.current=window.setTimeout((()=>{c(!1),u(),r.current=!1}),y))}),[d]);const p=(0,o.useCallback)((e=>{e!==w?c(!0):2===d&&(c(!0),n.current=window.setTimeout((()=>{c(!1),u(),r.current=!1}),y)),window.clearTimeout(i.current),window.clearTimeout(t.current);const{todayShowed:o,count:l}=x();!o&&l{const{todayShowed:e,count:t}=x();if(r.current=!e&&t{v(),p(w)}),e)}else u();return()=>{window.clearTimeout(i.current),window.clearTimeout(n.current)}}),[]);const h=(0,o.useCallback)((()=>{t.current=window.setTimeout((()=>{c(!1)}),e)}),[e]),m=(0,o.useCallback)((()=>{(0,s.AP)(a._,JSON.stringify({date:(new Date).getTime(),count:b+1}))}),[]);return{active:l,handleMouseEnter:p,handleMouseLeave:h,handleEndAutoShow:m}}function C(e){const t=new Date,i={redirect_url:"undefined"==typeof window?"":window.location.href,loginPath:g.tH.linkPhoneOrEmail,isLinkPhoneOrEmail:!0},n=(0,d.ZO)(),r=(0,u.K)(i);(0,o.useEffect)((()=>{const i=function(){const e=(0,s._S)(a.gM),t=new Date;if(e){const i=new Date(parseInt(e,10));if((i.getDate()===t.getDate()||i.getDate()===t.getDate()-1)&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear())return!0}return!1}();if(!i&&e&&n)try{r(),_._.handleLinkPhoneOrEmailPopupShow({enterMethod:"periodic"}),(0,s.AP)(a.gM,t.getTime().toString())}catch(e){console.log("show link phone pop up failed")}}),[e,n])}function j(e){var t;return e?Object.assign(Object.assign({},e),{children:null!==(t=null==e?void 0:e.children.filter((({placements:e=[]})=>0===e.length||e.includes("sidebar"))))&&void 0!==t?t:[]}):void 0}function L(){var e,t;const i=(0,v.s)(),{language:r="en"}=null!==(e=(0,p.W)((()=>["language"]),[]))&&void 0!==e?e:{},s=null!==(t=(0,h.TQ)("enable_privacy_center"))&&void 0!==t&&t,{navList:a=[],$legalList:l}=(0,n.P)(m.$,{selector:e=>{var t,n;return{$legalList:null===(t=e.bizContext)||void 0===t?void 0:t.navList.find((({title:e})=>e===i("Legal"))),navList:null===(n=e.bizContext)||void 0===n?void 0:n.navList}},dependencies:[]}),c=P.find((e=>"privacy"===e.title));c&&(c.title=s?"Privacy Policy":"privacy");const{pageList:d,programList:u,legalList:g}=(0,o.useMemo)((()=>{const e=[{title:i("help"),key:"help-center",href:`https://support.tiktok.com/${r}`},{title:i("safety"),key:"safety-center",href:`https://www.tiktok.com/safety?lang=${r}`},...P.reduce(((e,t)=>{var n,o,a;const c=(null!==(n=null==l?void 0:l.children)&&void 0!==n?n:[]).map((({key:e})=>e)).indexOf(t.key);return t.key===O&&e.push({title:"Accessibility",key:"accessibility",href:`https://www.tiktok.com/accessibility/${r}`}),t.key===S&&(s&&e.push({title:i("privacyCenter_webFooter_resourcesPrivacy_navLink"),key:"privacy-center",href:`https://www.tiktok.com/privacy/overview/${r}?enter_method=webapp_desktop`}),e.push({title:"Creator Academy",key:"create-portal",href:"https://www.tiktok.com/creator-academy"}),e.push({title:i("Community Guidelines"),key:"community-guidelines",href:`https://www.tiktok.com/community-guidelines?lang=${r}`})),c>=0&&e.push(Object.assign(Object.assign({},t),{title:i(t.title),href:null!==(a=null===(o=null==l?void 0:l.children)||void 0===o?void 0:o[c].href)&&void 0!==a?a:""})),e}),[])],t=j(a[0]),n=j(a[1]);return{pageList:t?{title:i("hca_web_Company",void 0,t.title),children:t.children}:void 0,programList:n?{title:i("hca_web_Program",void 0,n.title),children:n.children}:void 0,legalList:l?{title:i("hca_web_TermsAndPolicies",void 0,"Terms & Policies"),children:e}:void 0}}),[l,r,a,i]);return{pageList:d,programList:u,legalList:g}}},39505:(e,t,i)=>{var n;i.d(t,{N:()=>l}),function(e){e[e.None=0]="None",e[e.PromotePopupTip=1]="PromotePopupTip",e[e.DesktopDownloadTip=2]="DesktopDownloadTip",e[e.LoginTip=3]="LoginTip",e[e.Upload=4]="Upload",e[e.Inbox=5]="Inbox",e[e.Series=6]="Series",e[e.DarkMode=7]="DarkMode",e[e.EditProfile=8]="EditProfile",e[e.LiveCreatorTooltip=9]="LiveCreatorTooltip",e[e.LiveChatTooltip=10]="LiveChatTooltip"}(n||(n={}));const o=new class{constructor(){this.priorityKeys=[],this.endPriorityKeys=[]}start(e){this.endPriorityKeys.filter((t=>t!==e))}end(e){if(!this.endPriorityKeys.includes(e)){this.endPriorityKeys.push(e);const t=this.priorityKeys.find((e=>!this.endPriorityKeys.includes(e)));if(t)return t}return null}remove(e){this.priorityKeys.filter((t=>t!==e))}add(e){this.priorityKeys.includes(e)||(this.priorityKeys=[...this.priorityKeys,e].sort(((e,t)=>e-t)))}clean(){this.priorityKeys=[],this.endPriorityKeys=[]}};var r=i(46682),s=i(40099),a=i(77734);function l(e){const[{tooltipPriority:t,maxPublishVideoDuration:i},n]=(0,r.S)(a.GC),l=(0,s.useRef)(!1),c=(0,s.useCallback)((()=>{if(e!==t)o.remove(e);else{const t=o.end(e);t&&n.setTooltipPriority(t)}}),[t]),d=(0,s.useCallback)((()=>{o.start(e)}),[]);return l.current||(o.add(e),l.current=!0),(0,s.useEffect)((()=>()=>{o.clean()}),[]),{tooltipPriority:t,maxPublishVideoDuration:i,handlePopoverInitial:d,handlePopoverEnd:c}}},7892:(e,t,i)=>{i.d(t,{p:()=>s});var n=i(71111),o=i(80798),r=i(26378);function s(e,...t){return(0,o.U)(e,(()=>{const i=(0,n.atom)(...t),o=(0,r.Lr)(e);return i.debugLabel=o.id,i}))}},23124:(e,t,i)=>{i.d(t,{$:()=>r});var n=i(40099),o=i(80798);function r(e){return t=>(0,o.U)(e,(()=>(0,n.createContext)(t)))}},80798:(e,t,i)=>{i.d(t,{U:()=>s});let n=!1;var o=i(26378);const r=new Map;function s(e,t){const i="function"==typeof t?t:()=>t;return n?function(e,t){const{scope:i,id:n}=e;let o;if(r.has(i)?o=r.get(i):(o=new Map,r.set(i,o)),o.has(n))return o.get(n);{const e=t();return o.set(n,e),e}}((0,o.Lr)(e),i):i()}},26378:(e,t,i)=>{i.d(t,{Lr:()=>a});const n="__default_scope__",o="__default_version__",r="@",s="~";function a(e){return"string"==typeof e?function(e){const t=e.indexOf(r),i=e.lastIndexOf(s);let a=e,l=n,c=o;return-1!==t&&(a=e.slice(0,t),i>t?(l=e.slice(t,i),c=e.slice(i)):l=e.slice(t)),{id:a,scope:l,version:c}}(e):{id:e[0],scope:null!==(t=e[1])&&void 0!==t?t:n,version:null!==(i=e[2])&&void 0!==i?i:o};var t,i}},82041:()=>{"undefined"!=typeof window&&(window.TTAP_APPPARSE_STARTTIME=Date.now())},66994:(e,t,i)=>{i.d(t,{YH:()=>l,eK:()=>r,no:()=>a,s0:()=>s});var n=i(11060),o=i(95358);const r=()=>{const{pathname:e}=(0,n.zy)(),t=(0,o.cj)(e);return t?{isUserPage:t,pageType:1}:{isUserPage:t}},s=()=>{const{pathname:e}=(0,n.zy)();return{isDetailPage:(0,o.Iy)(e)||(0,o.nq)(e)||(0,o.Ke)(e)||(0,o.cj)(e)||(0,o.LC)(e)||(0,o.Fj)(e)||(0,o.vb)(e)||(0,o.Ds)(e)||(0,o.eD)(e)}},a=()=>{const{pathname:e}=(0,n.zy)();return{isSearchPage:(0,o.a1)(e)||(0,o.ZG)(e)||(0,o.ie)(e)||(0,o.q$)(e)||(0,o.N6)(e)}},l=()=>{const{pathname:e}=(0,n.zy)();return{isFeedbackPage:(0,o.hh)(e)}}},77682:(e,t,i)=>{i.d(t,{A:()=>o});const n={},o={has:function(e){return void 0!==n[e]},push:function(e,t){n[e]=t},get:function(e){return n[e]},pop:function(e){const t=n[e];return delete n[e],t},clear:function(e){delete n[e]},clearAll:function(){for(const e of Object.getOwnPropertyNames(n))delete n[e]}}},9244:(e,t,i)=>{i.d(t,{A:()=>a,x:()=>l});var n=i(40099),o=i(11060),r=i(77682);const s={};function a(){const e=(0,o.W6)();(0,n.useEffect)((()=>e.block(((e,t)=>{for(const i of Object.values(s))if(i.getShouldSaveState(e.pathname,t)){const e=i.getStateToSave();r.A.push(i.key,e)}else if(i.getShouldRestoreState(e.pathname,t)){if(r.A.has(i.key)){const e=r.A.get(i.key);i.restoreState(e)}}else i.getShouldClearCache(e.pathname,t)&&r.A.clear(i.key)}))),[e])}function l(e){(0,n.useEffect)((()=>(s[e.key]=e,()=>{delete s[e.key]})))}},38283:(e,t,i)=>{i.d(t,{Nb:()=>g,VV:()=>h,cF:()=>m});var n=i(40099),o=i(11060),r=i(88920),s=i(95358),a=i(29909),l=i(60072),c=i(93341),d=i(32125),u=i(77682),v=i(9244);const p="foryou",h=(0,n.memo)((function(){const{list:e,browserList:t,preloadList:i,cursor:u}=(0,a.Lu)((e=>{var t;return{list:e.list,browserList:e.browserList,preloadList:null!==(t=e.preloadList)&&void 0!==t?t:[],cursor:e.cursor}}),d.bN),h=(0,c.VP)(),m=(0,l.F3)((t=>t[e[h]]),d.bN),{pathname:g}=(0,o.zy)(),{cacheRange:_,shouldCacheIndex:f}=(0,r.pC)(),{enableFYPSideNavPreloadAndCache:y,cacheRange:b,cacheAfter:w}=(0,r.oJ)(),{enableFYPCache:k,cacheRange:P,cacheAfter:O}=(0,r.Vs)(),S=k||y,E=(0,n.useCallback)(((e,t)=>"PUSH"===t&&!(null==m?void 0:m.ad_info)&&!(null==m?void 0:m.liveRoomInfo)&&(S&&(0,s.tO)(g)||(0,s.tO)(g)&&(0,s.cj)(e))),[null==m?void 0:m.ad_info,null==m?void 0:m.liveRoomInfo,g,S]),x=(0,n.useCallback)(((e,t)=>S&&(0,s.tO)(e)||"POP"===t&&(0,s.cj)(g)&&(0,s.tO)(e)),[g,S]),T=(0,n.useCallback)(((e,t)=>{if(!S)return"PUSH"===t&&!E(e,t);const i=(0,s.tO)(g),n=(0,s.tO)(e),o=E(e,t);return"PUSH"===t&&i&&!n&&!o}),[g,E,S]),A=(0,n.useCallback)((()=>{let n,o=h;if(P)n=e.slice(h,h+P);else if(O){const t=e.slice(h+1,h+3);n=t.length>0?t:[e[h]]}else if(b)n=e.slice(h,h+b);else if(w)n=hr.has(e))),preloadList:i.filter((e=>r.has(e.id))),cursor:u,lastPlayedIndex:f?o:0}}),[_,b,P,w,O,h,u,t,i,e,f]),C=(0,n.useCallback)((e=>{e.ready=!0}),[]);return(0,v.x)({key:p,getShouldSaveState:E,getShouldRestoreState:x,getShouldClearCache:T,getStateToSave:A,restoreState:C}),null}));function m(){const e=(0,a.sL)(),t=(0,c.nr)(),{isFyfProfileUjEnabled:i}=(0,r.pC)(),{enableFYPSideNavPreloadAndCache:o}=(0,r.oJ)(),{enableFYPCache:s}=(0,r.Vs)(),l=(0,n.useCallback)((()=>{var i;if(null===(i=u.A.get(p))||void 0===i?void 0:i.ready){const i=u.A.get(p);return e.setRecommendListById(i),setTimeout((()=>{const e=document.querySelector(`[data-scroll-index="${i.lastPlayedIndex}"]`);null==e||e.scrollIntoView({behavior:"instant"}),t.updateVideo({currentVideo:{id:i.list[i.lastPlayedIndex],index:i.lastPlayedIndex,mode:0},playProgress:0,pageType:5})}),0),!0}return!1}),[e,t]);return i||o||s?l:()=>!1}function g(){var e,t;return null!==(t=null===(e=u.A.get(p))||void 0===e?void 0:e.ready)&&void 0!==t&&t}},27871:(e,t,i)=>{i.d(t,{SI:()=>r,T:()=>o,Y5:()=>n,dv:()=>s});const n=["Webapp"],o=new Map,r=0,s=2},57644:(e,t,i)=>{i(82041),i(14713);var n=i(91334),o=i(69616),r=i(82290),s=i(48211),a=i(24643),l=i(18499),c=(i(7073),i(47236)),d=i(94999),u=i(20146),v=i(57432),p=i.n(v),h=i(17995),m=i(1569),g=i(40099),_=i(90535),f=i(11654),y=i(99661),b=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const w=(0,g.createContext)({onLocationChange:p()});var k=i(77966),P=i(60421),O=i(37209),S=i(56070),E=i(51660),x=i(64356),T=i(87181),A=i(88874),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function j(e,t){return C(this,void 0,void 0,(function*(){try{if(!(0,A.YI)(x.rv)){const i={};yield Promise.all(t.map((t=>(0,O.gW)(t,e).then((e=>{i[t]=e}))))),(0,A.A7)(x.rv,i)}}catch(e){console.error(`[Fetch Error]: translation data fetch failed: ${e}`)}}))}const L="webapp.browserRedirect-context";function I(){const e=(0,A.YI)(L);if(e){const t=d.l.getInstance(f.V$);try{window.history.replaceState(window.history.state,"",e.browserRedirectUrl),t.emitEvent("seo.browser-redirect.succeed",{count:1},{})}catch(e){t.emitEvent("seo.browser-redirect.error",{count:1},{})}}}var N=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function M(e){var t;return N(this,void 0,void 0,(function*(){Object.getPrototypeOf(d.l).constructor.prototype.createChild=e=>(d.l.addProviders(e),d.l);const i=(0,m.S)(),{beforeStart:n=p(),defaultNS:o,nss:r,customInitBiz:s,slardarOption:a,appName:l,missingKeyHandler:v,asyncSlardarPre:g=!1}=e;yield(0,P._)(),(0,u.a)(),(0,h.sF)(i);const w=(0,E.qm)();let C;yield Promise.all([(0,y.eE)(w),j(w,r),I(),s?Promise.resolve():(0,_.a)(l),(0,T.Zi)(),n(),(0,c.ai)(),(0,O.Dy)(w,o,v)]),function(e){const t=(0,A.YI)(x.rv);t?(0,O.EK)(t,e):console.error("[Error]: No translation data to be added")}(w),d.l.addProvider({provide:x.hp,useValue:k.Ay.t});try{const e=e=>N(this,void 0,void 0,(function*(){C=yield function(e){return b(this,void 0,void 0,(function*(){const t=yield function(e){return b(this,void 0,void 0,(function*(){return"function"==typeof e?yield e():e}))}(e),i=(0,y.xq)(),n=yield(0,_.h)(),o=d.l.getInstance(f.V$);return f.V$.start(o,Object.assign({appContext:i,bizContext:n,initLocation:window.location.pathname},t))}))}(e),(0,S.J)(null==C?void 0:C.slardar)}));if(a)if(g)if(window.SlardarClient)yield e(a);else{const t=document.querySelector('script[src*="slardar.web.pre.js"]');t&&(yield new Promise((i=>{t.onload=()=>N(this,void 0,void 0,(function*(){yield e(a),i()}))})))}else yield e(a)}catch(e){console.error(e)}return{slardarUtils:C,jotaiStore:i,rootProps:{jotaiStore:i,disableInlineSlardar:void 0!==a,slardarContext:{onLocationChange:null!==(t=null==C?void 0:C.handleLocationChange)&&void 0!==t?t:p()}}}}))}var R=i(15605),D=i(67518),U=i(23721);function F(e){const{jotaiStore:t,disableInlineSlardar:i,slardarContext:n,children:o,csr:r}=e,s=(0,g.useMemo)((()=>{const e=null!=o?o:(0,a.jsx)(g.Fragment,{});return(0,h.ZB)(e,t?{jotaiStore:t}:void 0)}),[o,t]);if(r)return(0,a.jsx)(w.Provider,{value:n,children:(0,a.jsx)(U.ug.Provider,{value:{enable:!i,enableInlineScript:!1},children:(0,a.jsx)(s,{})})});{const e=(0,R.A)({key:"tiktok"});return(0,a.jsx)(w.Provider,{value:n,children:(0,a.jsx)(U.ug.Provider,{value:{enable:!i},children:(0,a.jsx)(D.C,{value:e,children:(0,a.jsx)(s,{})})})})}}var V=i(2787),B=i(81396),q=i.n(B),z=i(84987);class H{constructor(){this.sprites=new Map,this.domParser=new DOMParser;const e=document.querySelector("#svg-sprite-container");e?this.$root=e:(this.$root=this.domParser.parseFromString(``,"image/svg+xml").childNodes[0],document.body.prepend(this.$root)),this.restore()}add({id:e,content:t}){if(this.sprites.has(e)){const{initialCount:t=0,count:i,content:n}=this.sprites.get(e);return t>0?void this.sprites.set(e,{initialCount:t-1,count:i,content:n}):void this.sprites.set(e,{count:i+1,content:n})}this.sprites.set(e,{count:1,content:t});const i=this.domParser.parseFromString(t,"text/xml");i.firstChild&&this.$root.appendChild(i.firstChild)}remove(e){if(!this.sprites.has(e))return;const{count:t,content:i}=this.sprites.get(e);if(t>1)return void this.sprites.set(e,{count:t-1,content:i});this.sprites.delete(e);const n=this.$root.querySelector(`#${e}`);n&&n.remove()}serialize(){return this.$root.innerHTML}restore(){this.$root.hasChildNodes()&&this.$root.childNodes.forEach((e=>{var t,i;if("symbol"!==e.tagName)return;const n=null!==(t=e.getAttribute("id"))&&void 0!==t?t:"",o=Number(null!==(i=e.getAttribute("data-count"))&&void 0!==i?i:"0");this.sprites.set(n,{initialCount:o,count:o,content:e.outerHTML})}))}}H.defaultConfig=[["xmlns","http://www.w3.org/2000/svg"],["xmlns:xlink","http://www.w3.org/1999/xlink"],["style","position: absolute; width: 0; height: 0"],["aria-hidden","true"],["id","svg-sprite-container"]];var Y=i(47172),W=i(58632),$=i(82231);const G={MT_Analytics:null,WebApp_Login:null,MT_Reflow:null,Webapp:null,poi_web:null,Webapp_recharge_referral:null,kick_user_frontier:null},K={MT_Analytics:null,WebApp_Login:null,MT_Reflow:null,Webapp:null,poi_web:null,Webapp_recharge_referral:null,kick_user_frontier:null},Z=({children:e,t,initialNamespaces:i,translations:n=G})=>{const[o,r,s]=(0,$.Dh)(x.rv,n),l=(0,g.useRef)(o),[c]=(0,g.useState)((0,E.qm)()),d=(0,g.useCallback)((e=>Boolean(e&&l.current[e])),[]),u=(0,g.useCallback)(((e,t)=>(0,W.__awaiter)(void 0,void 0,void 0,(function*(){try{if(!l.current[e]){K[e]||(K[e]=(0,O.gW)(e,t));const i=yield K[e];k.Ay.addResourceBundle(c,e,i,!0,!0),l.current=Object.assign(Object.assign({},l.current),{[e]:i})}return!0}catch(e){return console.error("[I18nContext] load starling error",e),!1}}))),[r]),v=(0,g.useMemo)((()=>null!=t?t:k.Ay.t),[t]),p=(0,g.useMemo)((()=>({t:v,hasLoaded:d,loadStarling:u,initialNamespaces:i,lang:c})),[d,i,c,u,v]);return(0,O.EK)(o,c),(0,a.jsxs)(x.Ss.Provider,{value:p,children:[e,(0,a.jsx)(s,{data:o})]})};var J=i(72241),X=i(28591),Q=i(63615);function ee(e,t={}){return{Component:e,props:t}}function te(e){const{children:t,provisions:i}=e,n=(0,a.jsx)(g.Fragment,{children:t});return[...i].reverse().reduce(((e,{Component:t,props:i})=>(0,a.jsx)(t,Object.assign(Object.assign({},i),{children:e}))),n)}var ie=i(62186),ne=i(71615),oe=i(29546);function re(){window.location.reload()}function se(){return(0,a.jsx)(ne.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"})}const ae=(0,ie.default)("div",{target:"e7iph6u0"})({height:"100vh",display:"flex",flexDirection:"column"},"label:DivContainer;");function le(){const{t:e}=(0,g.useContext)(x.Ss);return(0,a.jsx)(ae,{children:(0,a.jsx)(oe.W,{isFullScreen:!0,onButtonClick:re,iconElem:se,title:e("Page not available",{},"Page not available"),desc:e("server_error_sub",{},"Sorry about that! Please try again later."),buttonText:e("try_again_btn",{},"Try again")})})}var ce=i(22980),de=i(89933);const ue=i.n(de)()("webapp-launcher").extend("provider");function ve(e){ue("SigiProvider Rendered");const{children:t}=e,i=(0,Y.useHistory)();return(0,a.jsx)(ce.j,{history:i,children:t})}var pe=i(96428);function he(e){return ue("FeedModeProvider Rendered"),(0,a.jsx)(pe.vK,{children:e.children})}var me=i(21355),ge=i(67823),_e=i(13392),fe=i(16891),ye=i(68252),be=i(88920),we=i(66909),ke=i(37434),Pe=i(54888),Oe=i(95358),Se=i(84506),Ee=i(45297),xe=i(35267),Te=i(83658),Ae=i(23294),Ce=i(58305),je=i(90341);const Le=({children:e})=>{var t;ue("AppThemingProvider Rendered");const{isInProductHoldout:i}=(0,be.Vv)(),{baseExpId:n,isInAutoDarkModeControl:o,isInAutoDarkModeTreatment:r,isInAutoDarkModeExperiment:s}=(0,be.WE)(),l=(0,Te.OC)(),{isInBasicTreatment:c,isInVerification:d}=(0,be.Pl)(),{hasFypLoadingOpt1:u}=(0,be.JB)(),v=(0,we.TJ)(),p=(0,je.J3)(),{isInTreatment:h}=(0,Ae.w)("default_auto_scroll"),{appContext:m}=null!==(t=(0,ke.Us)())&&void 0!==t?t:{},{user:_,region:f}=null!=m?m:{},{isMobile:y,hashedIP:b,vgeo:w}=(0,_e.Ph)(Pe.$,{selector:e=>{var t,i,n;return{isMobile:null===(t=e.bizContext)||void 0===t?void 0:t.isMobile,hashedIP:null===(i=e.bizContext)||void 0===i?void 0:i.hashedIP,vgeo:null===(n=e.bizContext)||void 0===n?void 0:n.vgeo}},dependencies:[]}),{pathname:k,search:P}=(0,Y.useLocation)(),O=(0,Oe.bc)(k,P)&&!y,S=(0,Oe.$p)(k)&&!y,E=(0,Oe.xj)(k),x=(0,Se.sy)(),[T,A]=(0,g.useState)((0,xe.MJ)(Ee.n9)||"light"),C=e=>{A(e),ge.A.set(Ee.n9,e,Ee.Ah)},[j,L]=(0,g.useState)(S),I=e=>{L(e),ge.A.set(Ee.tS,e?"dark":"light",Ee.Ah)};(0,g.useEffect)((()=>{const e=(()=>{var e,t,a,c,d;if(S)return!0;if(!O)return"1"===(0,xe.MJ)(Ee.HF)&&ge.A.set(Ee.HF,"0",Ee.Ah),C("light"),s&&l.disqualifyForInference(n,"app_init","launcher","not_dark_mode_page"),!1;if("1"===(0,xe.MJ)(Ee.HF)&&(s&&l.disqualifyForInference(n,"app_init","launcher","manually_set"),"dark"===T||"light"===T))return"dark"===T;let u=!1;try{u=null===(e=(0,me.A)())||void 0===e?void 0:e.dark;const i=null===(a=null===(t=Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===a?void 0:a.timeZone;fe.f.event("auto_dark_mode_timezone_info",{info_msg:`Local Time Zone: ${i}`})}catch(e){console.error("Error: Unable to determine theme from timezone. Falling back to local time-based method.",e);const t=null===(d=null===(c=Intl.DateTimeFormat())||void 0===c?void 0:c.resolvedOptions())||void 0===d?void 0:d.timeZone;fe.f.event("auto_dark_mode_timezone_error",{error_msg:`Local Time Zone: ${t}`});const i=(new Date).getHours();u=i<6||i>=18}const v=(0,xe.MJ)(Ee.tS);if(E)return s&&l.disqualifyForInference(n,"app_init","launcher","basic_dark_mode_page"),v?(C("dark"===v?"dark":"light"),"dark"===v):(C(E?"dark":"light"),E);if(i)return C("system"),x;if(!s)return C("auto"),!!x||u;try{l.maybeTriggerInference({projectName:n,vgeo:w,user:_,enterMethod:"app_init",pageName:"launcher"})}catch(e){console.error("Error. Unable to trigger inference for auto dark mode: ",e)}return o?(C("system"),x):r?(C("auto"),!!x||u):(C("dark"===v?"dark":"light"),"dark"===v)})();I(e)}),[O,E,x,T,o]),(0,g.useEffect)((()=>{""===(0,Ce._S)("auto_scroll")&&p.setAutoScroll(h)}),[h,p]),(0,g.useEffect)((()=>{var e,t,i,n;!u&&(e=void 0,t=void 0,n=function*(){(c||d)&&(yield v.maybeGenerateAndReportGlobalWidInfo({isLanding:!0,enterMethod:"app_launch",hashedIP:null!=b?b:"",region:null!=f?f:""})),d&&(0,ye.uh)(void 0,!!_)&&(yield v.maybeGenerateAndReportGlobalWidInfo({isLanding:!0,enterMethod:"post_guest_mode",hashedIP:null!=b?b:"",region:null!=f?f:""})),(c||d)&&v.setLandingPageETSentFlag({hasReportedOnLanding:!0})},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())})))}),[_,c,d,v,ye.uh]);const N=(0,g.useMemo)((()=>({value:j,toggle:I,currentThemeOption:T,setCurrentThemeOption:C})),[j,T]);return(0,a.jsx)(J.xm.Provider,{value:N,children:e})};var Ie=i(73580);class Ne extends g.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){const{onCatchError:i}=this.props;i(e,t)}render(){const{hasError:e}=this.state;return e?(0,a.jsx)(D.a,{theme:J.pz,children:(0,a.jsx)(le,{})}):this.props.children}}function Me(){const e=(0,Y.useRouteError)();if(e)throw e;return null}const Re=e=>{const{children:t,initialNamespaces:i,errorStateComponent:n,t:o}=e,[r]=(0,$.Dh)(Q.Ow),{onLocationChange:s}=(0,g.useContext)(w),l=(0,Y.useHistory)();(0,g.useEffect)((()=>l.listen((e=>s(e)))),[l,s]);const c=(0,g.useMemo)((()=>({lang:r.language,initialNamespaces:i,t:o,clusterRegion:null==r?void 0:r.clusterRegion})),[r.language,i,o,null==r?void 0:r.clusterRegion]),d=(0,g.useMemo)((()=>[ee(X.vd),ee(Z,c),ee(ve),ee(he),ee(Le)]),[c]);return r?(0,a.jsx)(te,{provisions:d,children:t}):(0,a.jsx)(D.a,{theme:J.pz,children:null!=n?n:(0,a.jsx)(le,{})})},De=e=>{var t;const{supportRoutes:i,children:n,Outlet:o,routerProps:r}=e,s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{(null===history||void 0===history?void 0:history.scrollRestoration)&&(history.scrollRestoration="manual")}));const c=(0,g.useCallback)((e=>{try{l.captureMessage(e,"fatal",{fromLauncher:"1"})}catch(e){console.error("Error occurs when reporting error:",e)}}),[l]),d=(0,g.useMemo)((()=>(null==r?void 0:r.routes)&&o?[{id:"@tiktok/fe-shared_RootLayout",element:(0,a.jsx)(Re,Object.assign(Object.assign({},s),{children:(0,a.jsx)(o,{})})),children:r.routes,errorElement:(0,a.jsx)(Me,{})}]:null),[null==r?void 0:r.routes,o,s]);return r&&d?(0,a.jsx)(g.StrictMode,{children:(0,a.jsx)(Ne,{onCatchError:c,children:(0,a.jsx)(Y.CompatRouter,Object.assign(Object.assign({},r),{historyPaths:null!==(t=r.historyPaths)&&void 0!==t?t:i,routes:d}))})}):(0,a.jsx)(g.StrictMode,{children:(0,a.jsx)(Ne,{onCatchError:c,children:(0,a.jsx)(Y.CompatRouter,{historyPaths:i,children:(0,a.jsx)(Re,Object.assign(Object.assign({},s),{children:n}))})})})};var Ue=i(97086),Fe=i(82715),Ve=i(69589),Be=i(40046),qe=i(49057),ze=i(15942),He=i(33849),Ye=i(21683),We=i(9244),$e=i(38283);const Ge=(0,g.memo)((function(){const{isFyfProfileUjEnabled:e}=(0,be.pC)(),{enableFYPSideNavPreloadAndCache:t}=(0,be.oJ)(),{enableFYPCache:i}=(0,be.Vs)(),n=e||t||i;return(0,We.A)(),(0,V.Y)(V.FK,{children:n&&(0,V.Y)($e.VV,{})})}));var Ke=i(81659),Ze=i(11060),Je=i(34012),Xe=i(63950),Qe=i(58542);const et=(0,ie.default)(Xe.N$,{target:"e1x8fefz0"})({maxWidth:"unset",justifyContent:"flex-start"},"label:StyledDivBodyContainerV2;"),tt=(0,ie.default)(Xe.N$,{target:"e1x8fefz1"})({width:"100%"},"label:StyledDivBodyContainerV3;"),it=(0,g.memo)((e=>{const{pathname:t}=(0,Ze.zy)(),i=(0,Je.Ig)(),{isInNavPhase3:n}=(0,be.Oj)();let o=Xe.N$;return(0,Oe.pz)(t)&&(o=et),i&&(o=tt),(0,V.Y)(o,Object.assign(Object.assign({},e),{backgroundColor:n?Qe.Tj4.UIPageFlat1:void 0}))}));var nt=i(81054),ot=i(84651),rt=i(11328),st=i(72153);const at=(0,ie.default)("div",{target:"e4gdqxf0"})((({theme:{colors:e}})=>[{display:"flex",justifyContent:"space-around",boxShadow:`0px 1px 1px ${e.ShadowPrimary}`,height:st.uF,width:"100%",top:0,position:"fixed",alignItems:"center",background:e.BGPrimary,zIndex:3e3}]),"label:DivSkeletonHeaderContainer;"),lt=(0,ie.default)("div",{target:"e4gdqxf1"})({width:"100%",display:"flex",height:"100%",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},(({expand:e})=>e?{}:{maxWidth:st.hj}),(({theme:{direction:e}})=>(0,st.mp)({direction:e,paddingStart:"20px",paddingEnd:"24px"})),"label:DivSkeletonHeaderWrapper;"),ct=(0,ie.default)(lt,{target:"e4gdqxf2"})([{maxWidth:"100%"},({theme:{direction:e}})=>(0,st.mp)({direction:e,paddingStart:"16px",paddingEnd:"24px"})],"label:StyledDivSkeletonHeaderWrapperV2;");var dt=i(86702),ut=i(93678);const vt=(0,ie.default)("a",{target:"e1u8yrdb0"})({fontSize:0},"label:ALogo;");vt.defaultProps=Object.assign(Object.assign({},vt.defaultProps),{"data-e2e":"tiktok-logo"});const pt=(0,g.memo)((function({isDark:e}){const t=(0,g.useMemo)((()=>e?(0,a.jsx)(ut.A,{height:42,width:118}):(0,a.jsx)(dt.A,{height:42,width:118})),[e]);return(0,a.jsx)(vt,{to:Fe.OZ.home,style:{position:"relative"},children:t})}));var ht=i(81825);const mt=(0,ie.default)("div",{target:"e1jlaln00"})((({theme:{colors:e}})=>({display:"flex",flexDirection:"row",alignItems:"center",padding:"12px 16px",background:e.BGInput,borderRadius:"92px",position:"relative",overflow:"hidden",zIndex:1,margin:0})),"label:DivContainer;"),gt=(0,ie.default)("div",{target:"e1jlaln01"})({width:"292px",height:"22px"},"label:DivInputPlaceholder;"),_t=(0,ie.default)("span",{target:"e1jlaln02"})((({theme:{colors:e}})=>({width:"1px",height:"28px",margin:"-3px 0",background:e.LineSecondary})),"label:SpanSpliter;"),ft=(0,ie.default)(ht.A,{target:"e1jlaln04"})({display:"block",margin:"-1px 0",marginInlineStart:"12px"},"label:StyledMagnifyingGlass;"),yt=function(){const{colors:e}=(0,D.u)();return(0,a.jsxs)(mt,{children:[(0,a.jsx)(gt,{}),(0,a.jsx)(_t,{}),(0,a.jsx)(ft,{fill:e.TextQuaternary,width:24,height:24})]})};var bt=i(12731);const wt=(0,nt.Ay)({resolved:{},chunkName:()=>"header.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5956),i.e(6489),i.e(4563),i.e(8873),i.e(2396),i.e(8785),i.e(5934),i.e(9280),i.e(6283),i.e(8239),i.e(1952),i.e(2047),i.e(7284),i.e(2610),i.e(190),i.e(9433),i.e(13)]).then(i.bind(i,30647)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>30647},Object.assign({fallback:(0,V.Y)((()=>{const{isDark:e}=(0,D.u)(),t=(0,Ye.oY)(),{showFullSideNav:i}=(0,be.Oj)();return t||i?null:(0,V.Y)(at,{children:(0,V.FD)(ct,{children:[(0,V.Y)(pt,{isDark:e}),(0,V.Y)(yt,{}),(0,V.Y)(rt.EA.Avatar,{style:{width:32,height:32}})]})})}),{})},ot.KE)),kt=(0,nt.Ay)({resolved:{},chunkName:()=>"sideNav.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5956),i.e(7978),i.e(6489),i.e(4563),i.e(8873),i.e(2396),i.e(8785),i.e(5934),i.e(9835),i.e(9280),i.e(6283),i.e(1648),i.e(8345),i.e(8239),i.e(1952),i.e(2047),i.e(4687),i.e(1357),i.e(9687),i.e(9438),i.e(8956),i.e(7284),i.e(2610),i.e(2377),i.e(9433),i.e(8073),i.e(2206)]).then(i.bind(i,48174)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>48174},Object.assign({fallback:(0,V.Y)((()=>(0,V.FD)(bt.Ws,{children:[(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{}),(0,V.Y)(bt.Hj,{})]})),{})},ot.KE)),Pt=(0,nt.Ay)({resolved:{},chunkName:()=>"bottomSideEffect.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5956),i.e(2402),i.e(7978),i.e(6489),i.e(4563),i.e(8873),i.e(2396),i.e(1648),i.e(1531),i.e(7599),i.e(3031),i.e(7104),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(190),i.e(2458),i.e(5229)]).then(i.bind(i,66110)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>66110},Object.assign({},ot.KE)),Ot=(0,nt.Ay)({resolved:{},chunkName:()=>"headSideEffect.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(6489),i.e(4563),i.e(8430),i.e(1636)]).then(i.bind(i,74976)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>74976},Object.assign({},ot.KE)),St=(0,nt.Ay)({resolved:{},chunkName:()=>"notificationSideEffect.island",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(9280),i.e(2610),i.e(3569)]).then(i.bind(i,93677)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>93677},Object.assign({},ot.KE));var Et=i(33805);const xt={id:"tiktok-icon-e4e3456a",use:"tiktok-icon-e4e3456a-usage",viewBox:"0 0 88 88",content:''};var Tt=i(46682),At=i(99789),Ct=i.n(At),jt=i(98855),Lt=i(57431),It=i(70873);const Nt=(0,ie.default)("div",{target:"eyhjz840"})({height:"100vh",display:"flex",flexDirection:"column"},"label:DivErrorBoundaryContainer;");class Mt extends g.Component{constructor(){super(...arguments),this.state={isNetOffline:!1,hasError:!1},this.handleOnlineStatusChange=()=>{this.setState({isNetOffline:!navigator.onLine})}}get iconElem(){const{hasError:e}=this.state;return e?(0,a.jsx)(ne.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"}):(0,a.jsx)(It.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"})}get text(){const{hasError:e}=this.state;return e?{title:"Page not available",desc:"server_error_sub",button:"try_again_btn"}:{title:"network_error_title",desc:"network_error_sub",button:"try_again_btn"}}componentDidMount(){window.addEventListener("online",this.handleOnlineStatusChange),window.addEventListener("offline",this.handleOnlineStatusChange)}componentWillUnmount(){window.removeEventListener("online",this.handleOnlineStatusChange),window.removeEventListener("offline",this.handleOnlineStatusChange)}handleRetry(){window.location.reload()}componentDidCatch(e,t){const{onCatchError:i}=this.props;i(e,t),this.setState({hasError:!0})}render(){const{isNetOffline:e,hasError:t}=this.state,{children:i,isMobile:n}=this.props,{t:o}=this.context;if(e||t){const{title:e,desc:t,button:i}=this.text;return n?(0,a.jsx)(Nt,{children:(0,a.jsx)(oe.W,{brightness:0,isFullScreen:!0,iconElem:this.iconElem,title:o(e),desc:o(t),buttonText:o(i),onButtonClick:this.handleRetry})}):(0,a.jsx)(oe.W,{isFullScreen:!0,onButtonClick:this.handleRetry,iconElem:this.iconElem,title:o(e),desc:o(t),buttonText:o(i)})}return i}}Mt.contextType=x.Ss;var Rt=i(7672),Dt=i(55099);let Ut=class{constructor(e){this.fetch=e}reportRenderError(e){return this.fetch.get("/node-webapp/page/error",{query:{page:e},baseUrlType:2})}};Ut=(0,W.__decorate)([(0,Rt._)(),(0,W.__metadata)("design:paramtypes",[Dt.p])],Ut);var Ft=i(2584),Vt=i(20157);function Bt(e){ue("GlobalModalProvider Rendered");const{GlobalModalProvider:t,value:i}=(0,Vt.li)();return(0,a.jsx)(t,{value:i,children:e.children})}var qt=i(89311);function zt(e){ue("TUXProvider Rendered");const{isRTL:t}=(0,qt.m)(),{value:i}=(0,g.useContext)(J.xm);return(0,a.jsx)(Qe.juU,{colorSchemePreference:i?"dark":"light",textDirection:t?"rtl":"ltr",zIndexConfig:J.pz.zIndex,children:e.children})}var Ht=i(75431);function Yt(e){ue("ThemeProvider Rendered");const{isMobile:t,children:i,extraGlobalStyles:n}=e,o=(0,g.useMemo)((()=>(0,Lt.x)()),[]),{value:r}=(0,g.useContext)(J.xm),s=(0,g.useMemo)((()=>(0,J.O4)({isDark:r,isMobile:t,lang:null==o?void 0:o.language})),[r,t,null==o?void 0:o.language]);return(0,a.jsxs)(D.a,{theme:s,children:[(0,a.jsx)(Ht.mL,{styles:{".link-a11y-focus":{"&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${s.colors.Negative}`},"&.auto-outline-style:focus-visible":{outline:`2px auto ${s.colors.Negative} !important`}}}}),n?(0,a.jsx)(Ht.mL,{styles:n(s)}):null,i]})}var Wt=i(79149);function $t(e){const{isMobile:t,delayFonts:i=!1}=e,{value:n}=(0,g.useContext)(J.xm),{isRTL:o}=(0,qt.m)(),r=(0,g.useMemo)((()=>(0,Lt.x)()),[]),s=(0,Wt.YR)({isDark:n,lang:null==r?void 0:r.language,isMobile:t,withFonts:!i}),l=(0,Qe.N9v)({colorSchemePreference:n?"dark":"light",textDirection:o?"rtl":"ltr"});return(0,a.jsx)(Ht.mL,Object.assign({styles:s},l))}function Gt({children:e,isMobile:t,path2PidFunc:i,delayFonts:n=!1,delayIdcRequestTime:o=0,disableBoundary:r=!1}){const[s]=(0,Tt.S)(Pe.$,{selector:e=>({bizContext:e.bizContext&&Ct()(e.bizContext,"statusCode"),bizInitialized:e.initialized}),dependencies:[]}),{pathname:l}=(0,Y.useLocation)(),c=(0,Ie.Nj)(jt.o),d=(0,g.useMemo)((()=>(0,Lt.x)()),[]),u=(0,g.useRef)(null);(0,g.useEffect)((()=>{var e;{const{user:t,isTTwidDecryptedFail:i,wid:n}=d;i&&fe.f.sendEvent("check_ttwid_error",{error_msg:"isTTwidDecryptedFail from server"}),!(null===(e=s.bizContext)||void 0===e?void 0:e.isBot)&&c.checkTTwid(),t&&(o?u.current=window.setTimeout((()=>{c.initTargetIdcRequest().subscribe()}),o):c.initTargetIdcRequest().subscribe());const r="ttwid",a=(0,ye._S)(r,"");return a&&a!==n&&fe.f.sendEvent("check_ttwid_error",{error_msg:"appcontext ttwid is different from local storage"}),(0,ye.AP)(r,n),()=>{u.current&&window.clearTimeout(u.current)}}}),[]),(e=>{(0,g.useEffect)((()=>{if(e){const e=new AbortController;let t,i,n=!1;const o=50,r={touchstart:e=>{i=void 0,t=e.targetTouches[0].clientY},touchmove:e=>{i=e.targetTouches[0].clientY},touchend:()=>{if(n||(Ft.O.handleCommonTap(),n=!0),!t||!i)return;const r=t-i;(r>o||r<-o)&&(Ft.O.handleCommonScroll(),e.abort())}};return Object.keys(r).forEach((t=>{window.addEventListener(t,r[t],{signal:e.signal,capture:!0})})),()=>{e.abort(),Object.keys(r).forEach((e=>{window.removeEventListener(e,r[e])}))}}const t={click:()=>{Ft.O.handleCommonClick()},scroll:()=>{Ft.O.handleCommonScroll()},mousemove:()=>{Ft.O.handleCommonMousemove()}};return Object.keys(t).forEach((e=>{window.addEventListener(e,t[e],{once:!0,capture:!0})})),()=>{Object.keys(t).forEach((e=>{window.removeEventListener(e,t[e])}))}}),[])})(t);const v=(0,Ie.Nj)(f.V$),p=(0,Ie.Nj)(Ut),h=(0,g.useMemo)((()=>i(l)),[l]),m=(0,g.useCallback)(((e,t)=>{try{p.reportRenderError(h);const{componentStack:i}=t;e.message=`Page render Error: ${e.message}`,v.captureMessage(e,"fatal",{page:h,errorType:"page_render"},{version:g.version,componentStack:i}),console.info("Error occurs in render time:",e),console.info("Error occurs in component:",i)}catch(e){console.error("Error occurs when reporting error:",e)}}),[p,h,v]),_=(0,g.useMemo)((()=>[ee(Bt),ee(zt),ee(Yt,{isMobile:t}),ee(Mt,{onCatchError:m,isMobile:t})]),[t]);return r?(0,a.jsxs)(te,{provisions:_,children:[(0,a.jsx)($t,{isMobile:t,withFonts:!n}),e]}):(0,a.jsx)(te,{provisions:_,children:(0,a.jsxs)(Mt,{onCatchError:m,isMobile:t,children:[(0,a.jsx)($t,{isMobile:t,withFonts:!n}),e]})})}var Kt=i(34832),Zt=i(28658);const Jt=(0,V.Y)((function(e){const t=(0,g.useContext)(z.X);return(0,g.useLayoutEffect)((()=>(t.add(xt),()=>{t.remove("tiktok-icon-e4e3456a")})),[]),(0,a.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,a.jsx)("use",{xlinkHref:"#tiktok-icon-e4e3456a"},void 0)}),void 0)}),{style:{margin:"auto",width:"77px",height:"88px"}});function Xt(){return(0,V.Y)("link",{rel:"stylesheet",href:Kt})}function Qt(){return(0,V.Y)("link",{rel:"stylesheet",href:Zt})}const ei=({children:e})=>(0,V.FD)(Gt,{isMobile:!1,loading:Jt,path2PidFunc:Et.oN,children:[(0,V.Y)(Xt,{}),(0,V.Y)(Qt,{}),e]});var ti=i(4474),ii=i(50970),ni=i(60484),oi=i(33063),ri=i(39896),si=i(48831),ai=i(73815),li=i(66780),ci=i(41271),di=i(97071);const ui=i.p+"9ba6b3da175369e04c8c.css";var vi=i(93341);const pi=(0,nt.Ay)({resolved:{},chunkName:()=>"stories-player",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8956),i.e(9971),i.e(7722),i.e(7959),i.e(5697),i.e(6120)]).then(i.bind(i,86558)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>86558}),hi=()=>{const{isInTiktokStoriesExperiment:e}=(0,be.lY)(),{appContext:t}=(0,ci.P)(ii.L,{selector:({appContext:e})=>({appContext:e}),dependencies:[]}),i=(0,Je.Ig)(),{user:n}=(0,ni.L$)(t),o=(0,Ze.zy)(),r=(0,g.useMemo)((()=>(0,ti.parse)(o.search)),[o.search]),s=(0,g.useRef)(!0),{setIsPopupPriorityReady:a,clearReadyListOnRouteChange:l}=(0,oi._y)(),[c,d]=(0,g.useState)(!1);r.show_promote||c||(a(1),d(!0)),(0,ri.Du)(!1);const{handlePopupHide:u,handlePopupShow:v}=(0,ze.H)();(0,g.useEffect)((()=>{s.current?s.current=!1:l()}),[l,o]),(0,di.AR)(n);const p=(0,vi.nr)(),{shouldResetResolution:h,allowSelectResolution:m,useStoredResolution:_}=(0,be.lZ)();let f;try{f="undefined"!=typeof window?localStorage.getItem("resolution_auto"):void 0}catch(e){f=void 0}if(h&&f){try{localStorage.removeItem("resolution")}catch(e){}p.setDefaultResolution("auto")}else _&&m&&p.setDefaultResolution(null!=f?f:"auto");return(0,V.FD)(V.FK,{children:[(0,V.Y)(X.mg,{children:(0,V.Y)("link",{rel:"stylesheet",as:"style",href:ui})}),(0,V.Y)(si.K,{}),(0,V.Y)(ai.r,{}),!i&&(0,V.Y)(li.H,{onShow:v,onHide:u}),e&&(0,V.Y)(pi,{})]})},mi=[Fe.OZ.setting,Fe.OZ.settingBlockList,Fe.OZ.feedback,Fe.OZ.feedbackReport,Fe.OZ.feedbackHistory,Fe.OZ.upload,Fe.OZ.download,...Fe.OZ.downloadWithLang,Fe.OZ.downloadVideo,...Fe.OZ.downloadVideoWithLang],gi=({children:e})=>{const t=(0,Ye.oY)(),{bodyContainerMaxWidth:i}=(0,Ke.vV)(),{popupHeight:n}=(0,ze.H)(),{isInAppNotificationEnabled:o}=(0,be.mf)(),{isFyfProfileUjEnabled:r}=(0,be.pC)(),{enableFYPSideNavPreloadAndCache:s}=(0,be.oJ)(),{enableFYPCache:a}=(0,be.Vs)(),l=r||s||a,c=(()=>{const e=(0,Ye.oY)(),t=(0,be.rl)(),i=[...mi];return t||i.push(Fe.OZ.messages),(0,Ze.W5)(i)||e})();return(0,V.FD)(ei,{children:[(0,V.Y)(He.J,{}),(0,V.Y)(Ot,{}),o&&(0,V.Y)(St,{}),l&&(0,V.Y)(Ge,{}),(0,V.Y)(wt,{}),(0,V.FD)(it,{isHideSideComponent:t,extraTop:n,maxWidth:i,children:[!c&&(0,V.Y)(kt,{}),e]}),(0,V.Y)(hi,{}),(0,V.Y)(Pt,{})]})};var _i=i(141),fi=i(25314);const yi=(0,c.Ay)({resolved:{},chunkName:()=>"following",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(2396),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(853),i.e(914),i.e(8956),i.e(9971),i.e(7722),i.e(2484),i.e(7366),i.e(1532),i.e(7289),i.e(4856)]).then(i.bind(i,56164)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>56164}),bi=(0,c.Ay)({resolved:{},chunkName:()=>"friends",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(2396),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(853),i.e(914),i.e(8956),i.e(9971),i.e(7722),i.e(2484),i.e(7366),i.e(1532),i.e(7289),i.e(6814)]).then(i.bind(i,9694)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>9694}),wi=(0,c.Ay)({resolved:{},chunkName:()=>"search",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(8796),i.e(187)]).then(i.bind(i,24411)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>24411}),ki=(0,nt.Ay)({resolved:{},chunkName:()=>"user",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2318),i.e(1618),i.e(7181),i.e(3392),i.e(241),i.e(4336),i.e(1427),i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6244),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(8785),i.e(5934),i.e(3446),i.e(3290),i.e(8474),i.e(3557),i.e(8177),i.e(1274),i.e(9937),i.e(2618),i.e(2142),i.e(1683),i.e(6514),i.e(5308),i.e(8605),i.e(2486),i.e(1605),i.e(4875),i.e(1493),i.e(3593),i.e(9920),i.e(1924),i.e(825),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8956),i.e(8796),i.e(7284),i.e(7899),i.e(9462),i.e(6806)]).then(i.bind(i,60396)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>60396}),Pi=(0,c.Ay)({resolved:{},chunkName:()=>"challenge",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8796),i.e(8410)]).then(i.bind(i,27100)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>27100}),Oi=(0,c.Ay)({resolved:{},chunkName:()=>"kep",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(2036),i.e(6224),i.e(6495),i.e(9037),i.e(8581)]).then(i.bind(i,21233)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>21233});var Si=i(36488);const Ei=(0,c.Ay)({resolved:{},chunkName:()=>"kap",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(6489),i.e(4563),i.e(8873),i.e(4747),i.e(9185),i.e(3328),i.e(2036),i.e(6495),i.e(7273)]).then(i.bind(i,9526)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>9526}),xi=(0,Si.F)(Ei),Ti=(0,c.Ay)({resolved:{},chunkName:()=>"video",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(2396),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(8956),i.e(9971),i.e(7722),i.e(2484),i.e(7366),i.e(1532),i.e(7289),i.e(6180)]).then(i.bind(i,62178)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>62178}),Ai=(0,c.Ay)({resolved:{},chunkName:()=>"playlist",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(914),i.e(5079),i.e(3279),i.e(8033)]).then(i.bind(i,40242)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>40242}),Ci=(0,c.Ay)({resolved:{},chunkName:()=>"music",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8796),i.e(5692)]).then(i.bind(i,56396)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>56396}),ji=(0,c.Ay)({resolved:{},chunkName:()=>"effect",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(5080),i.e(7912),i.e(8345),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8796),i.e(5244)]).then(i.bind(i,71631)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>71631}),Li=(0,nt.Ay)({resolved:{},chunkName:()=>"foryou.islands",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(2396),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(853),i.e(8956),i.e(9971),i.e(7722),i.e(2484),i.e(7366),i.e(1532),i.e(7289),i.e(7733)]).then(i.bind(i,51649)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>51649},{}),Ii=(0,c.Ay)({resolved:{},chunkName:()=>"topics",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(2396),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(853),i.e(8956),i.e(9971),i.e(7722),i.e(2484),i.e(7366),i.e(1532),i.e(7289),i.e(3034),i.e(1263)]).then(i.bind(i,25143)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>25143},{resolveComponent:e=>e.Topics}),Ni=(0,c.Ay)({resolved:{},chunkName:()=>"question",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8796),i.e(1621)]).then(i.bind(i,33776)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>33776}),Mi=(0,c.Ay)({resolved:{},chunkName:()=>"messages",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(4488),i.e(8564),i.e(5956),i.e(6489),i.e(4563),i.e(8873),i.e(2396),i.e(8785),i.e(5934),i.e(4747),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(8956),i.e(7284),i.e(8073),i.e(5871)]).then(i.bind(i,57240)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>57240}),Ri=(0,c.Ay)({resolved:{},chunkName:()=>"discover",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(6489),i.e(4563),i.e(8873),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(8842)]).then(i.bind(i,80212)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>80212}),Di=(0,c.Ay)({resolved:{},chunkName:()=>"channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5956),i.e(6489),i.e(4563),i.e(8873),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(2036),i.e(6224),i.e(8188)]).then(i.bind(i,96733)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>96733}),Ui=(0,c.Ay)({resolved:{},chunkName:()=>"find",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(2036),i.e(6224),i.e(6495),i.e(9037),i.e(446)]).then(i.bind(i,86473)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>86473}),Fi=(0,c.Ay)({resolved:{},chunkName:()=>"setting",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2318),i.e(1618),i.e(7181),i.e(3392),i.e(241),i.e(4336),i.e(1427),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(6244),i.e(2939),i.e(5198),i.e(6489),i.e(4563),i.e(8873),i.e(3446),i.e(3290),i.e(8474),i.e(3557),i.e(8177),i.e(1274),i.e(9937),i.e(2618),i.e(2142),i.e(1683),i.e(6514),i.e(5308),i.e(8605),i.e(2486),i.e(1605),i.e(4875),i.e(1493),i.e(3593),i.e(9920),i.e(7586),i.e(7300),i.e(9075),i.e(1126),i.e(4871),i.e(8704),i.e(2297),i.e(8063),i.e(1028),i.e(9659),i.e(7569),i.e(8068),i.e(2513),i.e(4186),i.e(4394),i.e(8478),i.e(4555),i.e(3840),i.e(4747),i.e(7899),i.e(2932),i.e(8430),i.e(417)]).then(i.bind(i,53114)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>53114}),Vi=(0,c.Ay)({resolved:{},chunkName:()=>"upload",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(4563),i.e(8873),i.e(8764),i.e(6455),i.e(4747),i.e(190),i.e(2458),i.e(1188)]).then(i.bind(i,68013)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>68013}),Bi=(0,c.Ay)({resolved:{},chunkName:()=>"faq",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(4563),i.e(8873),i.e(4747),i.e(6988),i.e(6609)]).then(i.bind(i,10554)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>10554}),qi=(0,c.Ay)({resolved:{},chunkName:()=>"report",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(6489),i.e(4563),i.e(8873),i.e(170),i.e(4747),i.e(6988),i.e(3857)]).then(i.bind(i,34961)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>34961}),zi=(0,c.Ay)({resolved:{},chunkName:()=>"poi",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(5079),i.e(8161)]).then(i.bind(i,25577)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>25577}),Hi=(0,c.Ay)({resolved:{},chunkName:()=>"poi-category",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(6489),i.e(4563),i.e(8873),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(2036),i.e(6224),i.e(130),i.e(7870)]).then(i.bind(i,51500)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>51500}),Yi=(0,c.Ay)({resolved:{},chunkName:()=>"travel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(5079),i.e(5611)]).then(i.bind(i,5703)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>5703}),Wi=(0,c.Ay)({resolved:{},chunkName:()=>"collection",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(914),i.e(5079),i.e(1171)]).then(i.bind(i,73102)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>73102}),$i=(0,c.Ay)({resolved:{},chunkName:()=>"explore",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(895),i.e(2780),i.e(921),i.e(8564),i.e(7716),i.e(5817),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(993),i.e(1415),i.e(3328),i.e(6001),i.e(853),i.e(914),i.e(5079),i.e(8796),i.e(9604)]).then(i.bind(i,27113)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>27113}),Gi=(0,c.Ay)({resolved:{},chunkName:()=>"video-playlist",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8564),i.e(5956),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(2396),i.e(5201),i.e(4978),i.e(8987),i.e(9655),i.e(2128),i.e(5921),i.e(9624),i.e(4747),i.e(9185),i.e(6790),i.e(3205),i.e(2786),i.e(8877),i.e(7656),i.e(914),i.e(5079),i.e(1037),i.e(3279),i.e(3519)]).then(i.bind(i,88942)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>88942}),Ki=(0,c.Ay)({resolved:{},chunkName:()=>"download",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(862),i.e(6713),i.e(8990),i.e(1059),i.e(7454),i.e(4747),i.e(5467)]).then(i.bind(i,97419)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>97419}),Zi=(0,c.Ay)({resolved:{},chunkName:()=>"download-video",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(921),i.e(2402),i.e(6489),i.e(4563),i.e(8873),i.e(415),i.e(9017),i.e(5979),i.e(862),i.e(6713),i.e(8990),i.e(1059),i.e(7454),i.e(4127),i.e(4747),i.e(9185),i.e(3328),i.e(2036),i.e(6495),i.e(7273),i.e(6629)]).then(i.bind(i,61215)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>61215}),Ji=(0,c.Ay)({resolved:{},chunkName:()=>"oauth-spotify",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(2780),i.e(8361)]).then(i.bind(i,37014)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>37014});function Xi({location:e}){const t=(0,g.useMemo)((()=>({pathname:e.pathname.replace(/\/\/+/g,"/"),search:e.search})),[e.pathname,e.search]);return(0,V.Y)(Ze.rd,{to:t})}const Qi=()=>(0,V.FD)(Ze.dO,{children:[(0,V.Y)(Ze.qh,{path:"(.*//+.*)",exact:!0,strict:!0,component:Xi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.following,component:yi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.friends,component:bi}),(0,V.Y)(Ze.qh,{path:Fe.OZ.searchHome,component:wi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.user,component:ki}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.challenge,component:Pi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.expansion,component:Oi}),(0,V.Y)(Ze.qh,{exact:!0,path:[Fe.OZ.trendingDetail,Fe.OZ.trendingDetailWithinDiscover],component:xi}),(0,V.Y)(Ze.qh,{exact:!0,path:[Fe.OZ.video,Fe.OZ.photo],component:Ti}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.musicPlaylist,component:Ai}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.music,component:Ci}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.effect,component:ji}),(0,V.Y)(Ze.qh,{exact:!0,path:_i.qk,component:Li}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.topics,component:Ii}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.question,component:Ni}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.messages,component:Mi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.discover,component:Ri}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.channel,component:Di}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.find,component:Ui}),(0,V.Y)(Ze.qh,{path:Fe.OZ.setting,component:Fi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.upload,component:Vi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.feedbackReport,component:qi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.feedbackHistory,component:qi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.feedback,component:Bi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.poi,component:zi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.travelCategory,component:Hi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.travel,component:Yi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.collection,component:Wi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.explore,component:$i}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.videoPlaylist,component:Gi}),(0,V.Y)(Ze.qh,{exact:!0,path:[Fe.OZ.download,...Fe.OZ.downloadWithLang],component:Ki}),(0,V.Y)(Ze.qh,{exact:!0,path:[Fe.OZ.downloadVideo,...Fe.OZ.downloadVideoWithLang],component:Zi}),(0,V.Y)(Ze.qh,{exact:!0,path:Fe.OZ.oauthSpotify,component:Ji}),(0,V.Y)(Ze.qh,{path:"*",component:fi.a})]});function en(){window.location.reload()}const tn=()=>{var e;const t=(0,qe.W)((()=>["user"]),[]),{t:i}=(0,g.useContext)(x.Ss);return(null===(e=null==t?void 0:t.user)||void 0===e?void 0:e.ftcUser)?(0,V.Y)(D.a,{theme:J.pz,children:(0,V.Y)(oe.W,{isFullScreen:!0,onButtonClick:en,iconElem:(0,V.Y)(ne.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"}),title:i("Page not available"),desc:i("server_error_sub"),buttonText:i("try_again_btn")})}):(0,V.Y)(gi,{children:(0,V.Y)(Qi,{})})};var nn=i(15203);const on=q()(Object.values(Fe.OZ)),rn=new H,sn=[Fe.eU.find,Fe.eU.expansion,Fe.eU.channel],an=[Fe.OZ.find,Fe.OZ.channel,Fe.OZ.expansion],ln=[Fe.eU.download,Fe.eU.downloadWithLang],cn=[Fe.OZ.download,...Fe.OZ.downloadWithLang],dn=on.filter((e=>!an.includes(e)));var un=i(94337),vn=i(31780),pn=i(64590),hn=i(7789),mn=i(34099),gn=i(14974),_n=i.n(gn);const fn="__$UNIVERSAL_DATA$__";const yn={video:"video_detail",photo:"graphic_detail",user:"others_homepage",music:"single_song",effect:"effect_detail",challenge:"challenge",home:"homepage_hot",foryou:"homepage_hot",foryouWithLang:"homepage_hot",following:"homepage_follow",friends:"friends_page",topics:"topic",expansion:"discover_kw",searchHome:"general_search",searchUser:"search_user",searchVideo:"search_video",discover:"discovery",setting:"setting",settingBlockList:"setting",settingDownLoadYourData:"setting",settingKeywordFiltering:"setting",settingAdPrivacyPersonalizedAds:"setting",settingAdPrivacyPersonalizedAdsInferredByTikTokTopics:"setting",settingAdPrivacyPersonalizedAdsYourChoicesTopics:"setting",settingAdPrivacyPersonalizedAdsAllTopics:"setting",settingAdvertiserSettings:"setting",settingDisconnectAdvertisers:"setting",settingDisconnectAdvertisersDetails:"setting",feedback:"feedback",feedbackHistory:"feedback_history",feedbackReport:"feedback_report",find:"find",question:"qa_detail",musicPlaylist:"music_playlist",poi:"place",poiCategory:"place",travel:"place",travelCategory:"place",collection:"collection",messages:"messages",channel:"channel",profile:"personal_homepage",inbox:"homepage_message",explore:"explore_page",videoPlaylist:"playlist",searchReminder:"search_reminder",searchLive:"search_live",upload:"upload",settingDailyScreenTimeEdit:"setting",settingTimeBreakEdit:"setting",settingSleepReminderEdit:"setting",download:"download",downloadWithLang:"download",downloadVideo:"download_video",downloadVideoWithLang:"download_video",trendingDetail:"discover_pro",trendingDetailWithinDiscover:"discover_pro",oauthSpotify:"oauth_spotify"};var bn=i(97487),wn=i(62302),kn=i(10598),Pn=i(68881),On=i(38838),Sn=i(97895),En=i(13326),xn=i.n(En),Tn=i(16469),An=i(87715),Cn=i(47888),jn=i(14576),Ln=i(99374),In=i(44349),Nn=i(29909),Mn=i(89049),Rn=i(5109),Dn=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Un=3;function Fn({user:e,wid:t}){const{cacheUid:i,cacheWid:n,itemList:o,pageName:r="unknown",log_pb:s}=Tn.lL.getStorage();Tn.lL.removeAll();const{status:a,validItemList:l}=(0,An.Mc)({itemList:o,cacheUid:i,cacheWid:n,wid:t,uid:null==e?void 0:e.uid});[0,4,8].includes(a)&&function(e,t){var i,n,o,r,s,a;(0,Nn.HG)().setListFromCache({itemList:e,statusCode:0,log_pb:t}),function(e){if(e){const t=document.createElement("link");t.rel="prefetch",t.href=e,document.head.appendChild(t)}}(null!==(o=null===(n=null===(i=e[0])||void 0===i?void 0:i.video)||void 0===n?void 0:n.originCover)&&void 0!==o?o:null===(a=null===(s=null===(r=e[0])||void 0===r?void 0:r.video)||void 0===s?void 0:s.zoomCover)||void 0===a?void 0:a[720])}(l,s),0===a&&function(e){const t=(0,Nn.HG)();d.l.getInstance(jn.j).checkItemValidation({itemIds:e.map((e=>e.id)).join(",")}).subscribe({next({statusCode:i,availabities:n=[]}){if(0===i){let i=0;n.forEach((({id:e,available:n})=>{n||(i++,t.setDeleteVideo(e))})),0!==i&&(0,Cn.Ao)(e.length,i)}},error(e){console.error("Error Occur when deleting invalid video",e)}})}(l),3===a&&function(e=[]){var t,i,n,o,r,s,a;Dn(this,void 0,void 0,(function*(){const l=null===(t=e[0])||void 0===t?void 0:t.id;if(!l)return;const c=(0,E.qm)(),[d,u]=yield Promise.all([(0,kn.x)(),(0,wn.zI)()]),v=(0,Nn.HG)(),p=(null===(i=u.abTestVersion)||void 0===i?void 0:i.versionName)?null===(o=null===(n=u.abTestVersion)||void 0===n?void 0:n.versionName)||void 0===o?void 0:o.split(","):[];try{const e=null!==(s=yield(0,Rn.d1)({itemId:l,language:c,coverFormat:null===(r=d.videoCoverSettings)||void 0===r?void 0:r.format,clientABVersions:p}))&&void 0!==s?s:{statusCode:-1},t=e.statusCode,i=null===(a=e.itemInfo)||void 0===a?void 0:a.itemStruct;0===t&&i&&v.setListFromCache({itemList:[i],statusCode:0})}catch(e){console.error("Error Occur when updating item detail",e)}}))}(o),(0,Cn.Pv)(a,r)}function Vn(e,t){return Dn(this,void 0,void 0,(function*(){if(Tn.lL.getItem("itemList"))return;const i=(0,E.qm)(),n=d.l.getInstance(jn.j),[{videoCoverSettings:o},{abTestVersion:r}]=yield Promise.all([(0,kn.x)(),(0,wn.zI)(i)]),s=(0,Ln.mx)(r,e);n.getFeedCacheList({count:Un,language:i,coverFormat:null==o?void 0:o.format,isNonPersonalized:s,vv_count_fyp:parseInt((0,Ce._S)(Mn.Bu,"0"),10)||0,vv_count:parseInt((0,Ce._S)(Mn.$H,"0"),10)||0,cpu_core_number:"undefined"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:0,dark_mode:"dark"===(0,xe.MJ)(Ee.n9)&&"1"===(0,xe.MJ)(Ee.HF),time_of_day:(new Date).getHours(),day_of_week:(new Date).getDay(),clientABVersions:null==r?void 0:r.versionName}).subscribe({next({statusCode:i,itemList:n=[],log_pb:o}){var r;if(0===i){const i=null===(r=n.slice)||void 0===r?void 0:r.call(n,0,Un);Tn.lL.setItem("itemList",i),Tn.lL.setItem("log_pb",o),function(e,t){Tn.lL.setItem("cacheUid",e),Tn.lL.setItem("cacheWid",t);const i=(0,Fe.kv)(window.location.pathname);Tn.lL.setItem("pageName",null==i?void 0:i.name)}(e,t),function(e){try{xn().remove(In.n2,{domain:"www.tiktok.com"});const t=JSON.stringify({expireTimestamp:(0,An._1)(e),itemIds:e.map((e=>e.id))});xn().set(In.n2,t,{secure:!0,expires:5,domain:"www.tiktok.com"})}catch(e){console.warn(`[Cookie] Set Feed Cache Cookie Error: ${e}`)}}(i)}else(0,Cn.dG)(i);(0,Cn.bA)(i)},error(){(0,Cn.dG)(10111),(0,Cn.bA)(10111)}})}))}function Bn(){return e=this,t=void 0,n=function*(){if(function(){const e=document.querySelector("#app");return"1"===(null==e?void 0:e.dataset.csr)}()&&function(){const e=(0,Fe.kv)(window.location.pathname);return["foryou","foryouWithLang","home"].includes(null==e?void 0:e.name)}()){const e=(0,E.qm)(),{user:t,wid:i}=yield(0,wn.zI)(e);try{Fn({user:t,wid:i}),function(e,t){setTimeout((()=>{"requestIdleCallback"in window?window.requestIdleCallback((()=>Vn(e,t))):Vn(e,t)}),3e3)}(null==t?void 0:t.uid,i)}catch(e){console.warn("[Error]feed cache logic error:",e)}}},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}var qn=i(82331),zn=i(46311),Hn=i(27871),Yn=i(4685),Wn=i(52572),$n=i(24220),Gn=i(90118);const Kn={video:"video_detail",photo:"graphic_detail",user:"others_homepage",music:"single_song",effect:"effect_detail",challenge:"challenge",home:"homepage_hot",foryou:"homepage_hot",foryouWithLang:"homepage_hot",following:"homepage_follow",friends:"friends_page",topics:"topic",expansion:"discover_kw",searchHome:"general_search",searchUser:"search_user",searchVideo:"search_video",discover:"discovery",setting:"setting",settingBlockList:"setting",settingDownLoadYourData:"setting",settingKeywordFiltering:"setting",settingAdPrivacyPersonalizedAds:"setting",settingAdPrivacyPersonalizedAdsInferredByTikTokTopics:"setting",settingAdPrivacyPersonalizedAdsYourChoicesTopics:"setting",settingAdPrivacyPersonalizedAdsAllTopics:"setting",settingAdvertiserSettings:"setting",settingDisconnectAdvertisers:"setting",settingDisconnectAdvertisersDetails:"setting",feedback:"feedback",feedbackHistory:"feedback_history",feedbackReport:"feedback_report",find:"find",question:"qa_detail",musicPlaylist:"music_playlist",poi:"place",poiCategory:"place",travel:"place",travelCategory:"place",collection:"collection",messages:"messages",channel:"channel",profile:"personal_homepage",inbox:"homepage_message",explore:"explore_page",videoPlaylist:"playlist",searchReminder:"search_reminder",searchLive:"search_live",upload:"upload",settingDailyScreenTimeEdit:"setting",settingTimeBreakEdit:"setting",settingSleepReminderEdit:"setting",download:"download",downloadWithLang:"download",downloadVideo:"download_video",downloadVideoWithLang:"download_video",trendingDetail:"discover_pro",trendingDetailWithinDiscover:"discover_pro",oauthSpotify:"oauth_spotify"};new Map;var Zn=i(71281),Jn=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const{startFn:Xn,endFn:Qn}=function(){let e,t;return{startFn(){e=(0,hn.V)()},endFn(){t=(0,hn.V)(),(0,n.OA)({duration:t-e})}}}(),eo=(0,o.d)(),to=(0,A.YI)(Q.Ow);!function(e,t){const{beforeRender:i,afterRender:n}=t;let o;(()=>{return r=this,s=void 0,d=function*(){const r=yield M(t);o=r.slardarUtils;const{rootProps:s,jotaiStore:c}=r;yield null==i?void 0:i({jotaiStore:c,slardarUtils:o}),null==o||o.slardar.reportRenderStart();const d=document.querySelector("#app"),u="1"===(null==d?void 0:d.dataset.csr),v=(0,a.jsx)(F,Object.assign(Object.assign({},s),{csr:u,children:(0,a.jsx)(e,{})}));u?(0,l.render)(v,d):(0,l.hydrate)(v,d),null==o||o.slardar.reportRenderEnd(),yield null==n?void 0:n()},new((c=void 0)||(c=Promise))((function(e,t){function i(e){try{o(d.next(e))}catch(e){t(e)}}function n(e){try{o(d.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof c?o:new c((function(e){e(o)}))).then(i,n)}o((d=d.apply(r,s||[])).next())}));var r,s,c,d})().catch((e=>{var t,i;console.error(e),null===(i=null===(t=null==o?void 0:o.slardar)||void 0===t?void 0:t.captureMessage)||void 0===i||i.call(t,e,"fatal",{fromLauncher:"1"})}))}((()=>{var e;const t=(0,Ue.fU)()?"/":window.location.pathname;let i=dn;const n=null===(e=(0,Fe.jN)(t))||void 0===e?void 0:e.name;n&&sn.includes(n)&&(i=an),n&&ln.includes(n)&&(i=cn);let r=tn;const s=(0,o.d)();if(s){const e=window.__registerSEOAddon__;e&&(r=e(r,{isFromGoogle:"google"===(0,nn.q)(),isFromSearchEngine:s}))}return(0,V.Y)(Ve.QueryProvider,{apiConfigs:(0,Be.H$)(),children:(0,V.Y)(De,{supportRoutes:i,children:(0,V.Y)(z.d,{context:rn,children:(0,V.Y)(r,{})})})})}),{appName:"desktop",beforeStart:()=>Jn(void 0,void 0,void 0,(function*(){var e;let t="v0";to&&((0,Lt.D)(to),t=null!==(e=(0,Zn.d)("page_loading_tiny_changes"))&&void 0!==e?e:"v0"),"v2"===t||"v4"===t?"requestIdleCallback"in window?window.requestIdleCallback((()=>{(0,r.t6)()})):(0,r.t6)():yield(0,r.t6)()})),nss:Hn.Y5,slardarOption:{bid:s.Gu,extractPid:Ke.wI,disableToggleLoginSlardar:!0,ttapOption:{isSpa:!0,includeApiUrl:["/api/recommend/item_list/","/api/item/detail/","/api/following/item_list/","/api/user/detail/","/api/post/item_list/","/api/music/item_list/","/api/topic/item_list/","/node/report/inbox/list/","/node/report/inbox/detail/","/api/explore/item_list/"]}},beforeRender:({slardarUtils:e})=>Jn(void 0,void 0,void 0,(function*(){var t;Xn(),function(){var e,t,i,n;const o=(0,mn.V)(),r=(0,y.xq)(),s=function(e,t){var i,n,o,r;if(!window[fn]){let e={};try{e=JSON.parse(null!==(n=null===(i=document.getElementById("__UNIVERSAL_DATA_FOR_REHYDRATION__"))||void 0===i?void 0:i.textContent)&&void 0!==n?n:"{}")}catch(e){console.error("error while parsing rehydration data")}window[fn]=e}return null!==(r=null===(o=window[fn][null!=t?t:"__DEFAULT_SCOPE__"])||void 0===o?void 0:o[e])&&void 0!==r?r:null}("webapp.biz-context"),a=_n()(null==s?void 0:s.solariaPortrait,(e=>Number(e))),{user:l,wid:c,region:d,odinId:u,webIdCreatedTime:v,language:p,abTestVersion:h}=r,m=(0,Fe.kv)(window.location.pathname),g=null===(t=null===(e=null==h?void 0:h.parameters)||void 0===e?void 0:e.page_loading_tiny_changes)||void 0===t?void 0:t.vid,_="v3"===g||"v4"===g;fe.f.config({initConfig:{channel_domain:o.tea,ab_channel_domain:o.libraWebSDK,channel_type:null!==(i=o.teaChannelType)&&void 0!==i?i:"tcpy",channel:o.teaChannel,id:1988,reportTime:_?200:void 0,autotrack:{custom:"tea",text:!0,svg:!0}},commonHeaderConfig:{region:d,user_id:null!==(n=null==l?void 0:l.uid)&&void 0!==n?n:u,user_is_login:Boolean(l),user_unique_id:c,device_id:c,user_type:12,"header.custom":Object.assign(Object.assign({session_id:fe.f.getSessionId(c),webid_created_time:v,app_language:p,page_name:m?yn[m.name]:""},a),fe.f.initDimensionalData)}}),pn.l.init({sender:(e,t)=>{fe.f.event(e,t,!1)},device:"pc",pageName:m?yn[m.name]:""})}(),(0,n.jT)(),yield function(){var e,t,i,n,o,r,s,a,l,c,u,v,p,h,m,g,_,y;return m=this,g=void 0,y=function*(){const m=(0,Fe.CA)(window.location.pathname),g=null==m?void 0:m.name,_=d.l.getInstance(f.V$);if(g===Fe.eU.user){const s=(0,E.qm)(),[a,l]=yield Promise.all([(0,wn.zI)(s),(0,kn.x)(s)]),c=new URLSearchParams(location.search);if("v2"===(null===(i=null===(t=null===(e=null==a?void 0:a.abTestVersion)||void 0===e?void 0:e.parameters)||void 0===t?void 0:t.foryou_prefetch)||void 0===i?void 0:i.vid)||"v2"===c.get("foryou_prefetch"))return;const d=(0,A.YI)(bn.gA.userDetail);if(d){const{secUid:e=""}=null!==(o=null===(n=d.userInfo)||void 0===n?void 0:n.user)&&void 0!==o?o:{};(0,Pn.dz)(e),(0,Pn.bg)(e,null===(r=l.videoCoverSettings)||void 0===r?void 0:r.format)}}if(g===Fe.eU.poi){const{id:e}=null!==(s=null==m?void 0:m.matchedParams)&&void 0!==s?s:{id:""};if(e){const t=yield(0,kn.x)((0,E.qm)());(0,Pn.hX)(e,t.isBot?121:120)}}if(g===Fe.eU.travel){const{id:e}=null!==(a=null==m?void 0:m.matchedParams)&&void 0!==a?a:{id:""};if(e){const t=Object.values(On.Wk).slice(0,3).map((e=>e.idlType)),i=(0,E.qm)(),[n,o,r]=yield Promise.all([(0,wn.zI)(i),(0,kn.x)(i),(0,Sn.e)()]),s={appId:n.appId,region:n.region,coverFormat:null===(l=o.videoCoverSettings)||void 0===l?void 0:l.format,clientAbVersionIds:r};(0,Pn.UM)({poiId:e},s,t)}}if(g===Fe.eU.travelCategory){const{id:e,category:t}=null!==(c=null==m?void 0:m.matchedParams)&&void 0!==c?c:{id:"",category:""};if(e&&t){const i=(0,On.xG)(t).idlType,n=Array(3).fill(null).map(((e,i)=>On.Wk[t].subTitles[i].idlType)),o=(0,E.qm)(),[r,s,a]=yield Promise.all([(0,wn.zI)(o),(0,kn.x)(o),(0,Sn.e)()]),l={appId:r.appId,region:r.region,coverFormat:null===(u=s.videoCoverSettings)||void 0===u?void 0:u.format,clientAbVersionIds:a};(0,Pn.UM)({poiId:e,subCategoryType:i},l,n)}}if(g===Fe.eU.video){const e=(0,A.YI)(bn.gA.videoDetail);if(_.emitEvent("prefetch_data",{video_detail:1},{}),e){const t=null===(h=null===(p=null===(v=null==e?void 0:e.itemInfo)||void 0===v?void 0:v.itemStruct)||void 0===p?void 0:p.video)||void 0===h?void 0:h.originCover;if(_.emitEvent("prefetch_data",{video_detail:1},{status:"success"}),t){const e=Date.now(),i=new Image;i.src=t,i.onload=()=>{_.reportCustomRequest({name:"prefetch_image",startTime:e,endTime:Date.now()})}}}}},new((_=void 0)||(_=Promise))((function(e,t){function i(e){try{o(y.next(e))}catch(e){t(e)}}function n(e){try{o(y.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof _?o:new _((function(e){e(o)}))).then(i,n)}o((y=y.apply(m,g||[])).next())}))}(),Object.keys(bn.gA).forEach((e=>(0,bn.iq)(e))),(0,n.AW)(),(0,n.LY)(),(()=>{try{const e=(0,Fe.kv)(window.location.pathname);(()=>{try{const t=performance.now();try{const e=new $n.r({decodeImgUrl:""}).scoreSync({ignoreCachedImg:!0}).performance;if(e&&"object"==typeof e&&"score"in e){let t=e.score;"number"==typeof t&&(t=parseFloat(t.toFixed(2)),(0,Yn.lu)().updateHardwareScore(t),fe.f.config({commonHeaderConfig:{"header.custom":{hardware_score:t}}}))}}catch(t){Wn.z.handleDeviceScoreError({type:"hardware",page_name:e?Kn[e.name]:""})}const i=performance.now();Wn.z.handleDeviceScoreTIme({duration:Math.ceil(i-t),type:"hardware",page_name:e?Kn[e.name]:""});const n=performance.now();try{const{score:e}=(0,Gn.rr)();if("number"==typeof e){const t=parseFloat(e.toFixed(2));(0,Yn.lu)().updateTotalDeviceScore(e),fe.f.config({commonHeaderConfig:{"header.custom":{total_score:t}}})}}catch(t){Wn.z.handleDeviceScoreError({type:"total",page_name:e?Kn[e.name]:""})}const o=performance.now();Wn.z.handleDeviceScoreTIme({duration:Math.ceil(o-n),type:"total",page_name:e?Kn[e.name]:""})}catch(e){console.error("Error in retrieveScore:",e)}})()}catch(e){console.error("Error in setDeviceScore",e)}})(),yield Bn(),yield(0,qn.s)(),un.Mh.inject(),eo&&(window.__registerSEOAddon__=(yield Promise.all([i.e(2780,"high"),i.e(921,"high"),i.e(4563,"high"),i.e(7581,"high")]).then(i.bind(i,96387))).registerSEOAddon),(null===(t=null==e?void 0:e.slardar)||void 0===t?void 0:t._slardar)&&vn.Wk.init({slardarContainer:e.slardar._slardar,shouldReportJSError:{pageCrash:!0,cuj:!0}})})),afterRender:()=>{Qn(),function(){const e=d.l.getInstance(f.V$);zn.P.on("consume_prefetch_data",((t,i,n)=>{e.emitEvent("consume_prefetch_data",{now:t},{status:i,from:n})})),zn.P.on("consume_prefetch_data_error",((t,i)=>{e.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"fail",from:i})}))}()}})},70281:(e,t,i)=>{i.d(t,{$:()=>c});var n=i(72153),o=i(11060),r=i(82715),s=i(71281),a=i(97086),l=i(35267);const c=()=>{var e;try{const t="v0"!==(null!==(e=(0,s.d)("nav_phase_3"))&&void 0!==e?e:"v0"),i="v1"===(0,s.d)("enable_dm_side_nav"),c=(0,a.fU)()?(0,l.yK)().request.path:window.location.pathname;return(0,o.B6)(c,{path:[r.OZ.setting,r.OZ.settingBlockList,r.OZ.feedback,r.OZ.feedbackReport,r.OZ.feedbackHistory,r.OZ.upload,...i?[]:[r.OZ.messages]],exact:!0})?n.uF:t?0:n.uF}catch(e){return n.uF}}},81659:(e,t,i)=>{i.d(t,{xG:()=>j,wI:()=>M,xS:()=>D,zd:()=>I,cf:()=>R,vV:()=>L,YB:()=>U,nI:()=>F,G4:()=>V});var n=i(40099),o=i(11060),r=i(72241),s=i(46682),a=i(82715),l=i(88920),c=i(60484),d=i(49057),u=i(48615),v=i(71281),p=i(71777),h=i(66994),m=i(31209),g=i(7892);const _={windowHeight:"undefined"!=typeof window?window.innerHeight:0,windowWidth:"undefined"!=typeof window?window.innerWidth:0},f=(0,g.p)("windowAtom@tiktok/webapp-desktop",_);f.debugLabel="windowAtom";const{useServiceState:y,useServiceDispatchers:b,useAtomService:w,getStaticApi:k}=(0,m.i)(f,((e,t)=>({updateWindowSize(){t(f,(e=>Object.assign(Object.assign({},e),{windowHeight:window.innerHeight,windowWidth:window.innerWidth})))}})));var P=i(18222),O=i(16891),S=i(43201),E=i(2387),x=i.n(E),T=i(33543),A=i(99661),C=i(93341);const j=240,L=()=>{const{isInNavPhase3:e}=(0,l.Oj)(),{isFeedbackPage:t}=(0,h.YH)(),i=!t,n=e?16*Number.parseFloat(T.pJ):j;return{sideNavWidth:i?n:void 0,bodyContainerMaxWidth:i?"100%":void 0}},I=e=>{const{value:t}=(0,n.useContext)(r.xm);return(0,r.O4)({isDark:t,lang:e}).colors.Negative},N={video:"video_detail",photo:"graphic_detail",user:["others_homepage","personal_homepage"],music:"single_song",effect:"effect_detail",challenge:"challenge",channel:"channel",find:"find",home:"homepage_hot",foryouWithLang:"homepage_hot",foryou:"homepage_hot",following:"homepage_follow",friends:"friends_page",topics:["topic"],expansion:"discover_kw",searchHome:"general_search",searchUser:"search_user",searchVideo:"search_video",searchLive:"search_live",searchReminder:"general_search",discover:"discovery",setting:"setting",feedback:"feedback",feedbackHistory:"feedback_history",feedbackReport:"feedback_report",upload:"upload",question:"qa_detail",musicPlaylist:"music_playlist",messages:"messages",settingBlockList:"setting",settingDownLoadYourData:"setting",settingKeywordFiltering:"setting",settingDailyScreenTimeEdit:"setting",settingTimeBreakEdit:"setting",settingSleepReminderEdit:"setting",settingAdPrivacyPersonalizedAds:"setting",settingAdPrivacyPersonalizedAdsInferredByTikTokTopics:"setting",settingAdPrivacyPersonalizedAdsYourChoicesTopics:"setting",settingAdPrivacyPersonalizedAdsAllTopics:"setting",settingAdvertiserSettings:"setting",settingDisconnectAdvertisers:"setting",settingDisconnectAdvertisersDetails:"setting",profile:"personal_homepage",inbox:"homepage_message",explore:"explore_page",videoPlaylist:"playlist",poi:"place",poiCategory:"place",travel:"place",travelCategory:"place_category",collection:"collection",download:"download",downloadWithLang:"download",downloadVideo:"download_video",downloadVideoWithLang:"download_video",trendingDetail:"discover_pro",trendingDetailWithinDiscover:"discover_pro",oauthSpotify:"oauth_spotify"},M=(e,t)=>{var i;const n=(0,a.kv)(e),o=t?t.user:null===(i=(0,A.xq)())||void 0===i?void 0:i.user;if(n){const t=N[n.name];if(!Array.isArray(t))return t;if("user"===n.name){const i=null==e?void 0:e.slice(2),n=null==i?void 0:i.toLowerCase();return o&&(Boolean(n&&(null==n?void 0:n.match(o.uniqueId)))||Boolean(i&&(null==i?void 0:i.match(o.secUid))))?t[1]:t[0]}if("topics"===n.name){const i=null==e?void 0:e.slice(8);return`${t[0]}_${i}`.toLowerCase()}return"unknown"}return"unknown"},R=()=>{const e=(0,n.useRef)(null),{pathname:t}=(0,o.zy)(),{user:i}=(0,c.L$)((0,d.W)((()=>["user"]),[]));if(e.current)return e.current;const r=M(t,{user:i});return e.current=r,r},D=()=>{var e,t,i;const{user:o}=(0,c.L$)((0,d.W)((()=>["user"]),[])),[r,a]=(0,s.S)(P.J),{privacyAccountPromptConfig:l,restrictionSetting:u,effectedCount:v}=r,{variant:p,showNewPrompt:h,selectPrivateByDefault:m}=l,g=5===(null===(i=null===(t=null===(e=null==u?void 0:u.privacy_restriction)||void 0===e?void 0:e.account)||void 0===t?void 0:t.private_account)||void 0===i?void 0:i.tips_type);return(0,n.useEffect)((()=>{Boolean(o)&&(a.getComplianceSetting({user:o}),a.getRestrictionAndEffectedCountSettings())}),[a,o]),{privacyAccountPromptVariant:p,showNewPrompt:h,selectPrivateByDefault:m,isUKU18:g,effectedCountSetting:v}},U=()=>{var e,t;const{user:i}=(0,c.L$)((0,d.W)((()=>["user"]),[])),{bizContext:o}=(0,u.y)(),{abTestVersion:r}=null!==(e=(0,d.W)((()=>["abTestVersion"]),[]))&&void 0!==e?e:{},s=null!==(t=(0,v.qt)(r,"webapp_switch_account"))&&void 0!==t?t:"v1";(0,n.useEffect)((()=>{var e,t;const n=JSON.parse(null!==(e=localStorage.getItem("multi-account-info"))&&void 0!==e?e:'{"data":[]}').data;i&&"v1"!==s&&i.hasIMPermission&&localStorage.setItem("multi-account-info",JSON.stringify({data:[...n.filter((e=>e.secUid!==i.secUid)),{secUid:i.secUid,uniqueId:i.uniqueId,nickName:i.nickName,avatarUrl:i.avatarUri[0],lastActiveTime:Date.now(),userRegion:null!==(t=null==o?void 0:o.idc)&&void 0!==t?t:""}].sort(((e,t)=>e.lastActiveTimet.lastActiveTime?-1:0))}))}),[null==o?void 0:o.idc,s,i])};function F(){const e=(0,n.useCallback)((()=>{O.f.event("enter_picture_in_picture")}),[]);(0,n.useEffect)((()=>(window.addEventListener("enterpictureinpicture",e),()=>{window.removeEventListener("enterpictureinpicture",e)})),[e])}const V=()=>{const e=(0,C.RT)(),[{windowHeight:t,windowWidth:i},o]=w(),r=(0,p.Dy)(),s=(0,n.useCallback)(x()((()=>{(0,S.T)({windowObj:window,playMode:e,width_before:i,height_before:t}),o.updateWindowSize()}),1e3),[t,i,e,o,r]);(0,n.useEffect)((()=>(window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)})),[s])}},12731:(e,t,i)=>{i.d(t,{Hj:()=>c,V$:()=>s,Ws:()=>l,is:()=>a});var n=i(62186),o=i(72153),r=i(17784);const s=(0,n.default)("div",{target:"e8agtid0"})({},"label:DivSideNavContainer;"),a=(0,n.default)("div",{target:"e8agtid1"})((({status:e,theme:{colors:t}})=>(0,o.jJ)({max:767,style:[{position:"fixed",inset:o.uF-1+"px 0 0",zIndex:99,backgroundColor:t.ConstBGInverse2,opacity:e===r.ns||e===r._K?1:0},e===r.ns||e===r.ze?{transition:"all 0.3s"}:null,e===r.kp?{pointerEvents:"none"}:null]})),"label:DivSideNavMask;"),l=(0,n.default)("div",{target:"e8agtid2"})({position:"relative",height:"100%",width:240,flex:"0 0 240px",display:"flex",flexDirection:"column","@media screen and (max-width: 1071px)":{width:72,flex:"0 0 72px"},padding:"16px",maxHeight:`calc(100vh - ${o.uF}px)`,overflow:"hidden"},"label:DivSkeletonSideNavContainer;"),c=(0,n.default)("div",{target:"e8agtid3"})((({theme:{colors:e}})=>({width:"100%",padding:"16px",background:e.BGPlaceholderDefault,borderRadius:"4px",height:32,margin:"16px 0 0 0",opacity:.8})),"label:SkeletonItem;")},63950:(e,t,i)=>{i.d(t,{H6:()=>c,K6:()=>l,N$:()=>a});var n=i(75431),o=i(62186),r=i(72153),s=i(70281);const a=(0,o.default)("div",{target:"e1irlpdw0"})((({extraTop:e=0,maxWidth:t,isHideSideComponent:i,width:n,theme:{colors:o},backgroundColor:a=o.BGPrimary})=>({marginTop:i?0:(0,s.$)()+e,display:"flex",width:null!=n?n:"100vw",maxWidth:null!=t?t:r.hj,justifyContent:"space-between",alignSelf:"center",flex:"1 1 auto",backgroundColor:a})),"label:DivBodyContainer;"),l=(0,o.default)("div",{target:"e1irlpdw1"})({".jotai-devtools-trigger-button":{position:"fixed",borderRadius:"50%",borderWidth:0,width:"4rem",height:"4rem"}},"label:DivJotaiDevtoolsWrapper;"),c=e=>n.AH`
*[role='button'],
*[role='link'],
*[role='switch'],
*[tabindex],
button[aria-label],
button[aria-labelledby],
button[aria-pressed],
button[aria-expanded],
button[role='tab'],
a[aria-label] {
&:focus {
outline: none;
}
&:focus-visible {
outline: 2px solid ${e};
}
}
,
*[role='button'],
button[aria-label],
button[aria-labelledby],
button[aria-pressed],
button[aria-expanded] {
&:focus-visible {
outline-offset: 1px;
}
}
,
li[role='option'] {
&:focus-visible {
outline-style: auto;
}
}
`},41719:(e,t,i)=>{i.d(t,{c:()=>n});const n={CONVERT_TO_PUBLIC_ACCOUNT:"convert_to_public_account",CONVERT_TO_PRIVATE_ACCOUNT:"convert_to_private_account"}},5109:(e,t,i)=>{i.d(t,{V2:()=>l,d1:()=>a});var n=i(97895),o=i(39785),r=i(97487),s=i(56070);const a=(0,o.M)({csr:function(e){return t=this,i=void 0,a=function*(){const t=(0,r.Ni)("videoDetail");if(t)return t;const i=yield(0,n.e)();return e.clientABVersions=i,s.h.get("/api/item/detail/",{query:e,baseUrlType:2})},new((o=void 0)||(o=Promise))((function(e,n){function r(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a.throw(e))}catch(e){n(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,s)}l((a=a.apply(t,i||[])).next())}));var t,i,o,a}}),l=(0,o.M)({csr:function(e){}});(0,o.M)({csr:function(e){}})},91334:(e,t,i)=>{i.d(t,{AW:()=>c,LY:()=>d,OA:()=>a,jT:()=>s,mc:()=>l});var n=i(64590),o=i(7789),r=i(92439);function s(e){const{customParams:t,option:i}=null!=e?e:{},r=Object.assign({timer_from_ttfb:(0,o.V)()-(0,o.MZ)()},t);n.l.send("arm_browser_render",r,i)}function a({duration:e,customParams:t,option:i}){const o=Object.assign({timer_render:e},t);n.l.send("arm_render_finish",o,i)}function l(e){const{customParams:t,option:i}=null!=e?e:{};n.l.send("arm_core_content_ready",Object.assign({},t),i)}function c(e){const{customParams:t,option:i}=null!=e?e:{};(0,r.fK)((({name:e,value:o})=>{if("LCP"===e){const e=Object.assign({timer_lcp:Math.ceil(o)},t);n.l.send("arm_lcp",e,i)}else console.warn("Do not get LCP metric in onLCP callback")}))}function d(e){const{customParams:t,option:i}=null!=e?e:{};window.addEventListener("beforeunload",(function e(){n.l.send("arm_bounce",Object.assign({},t),i),window.removeEventListener("beforeunload",e)}))}},64590:(e,t,i)=>{i.d(t,{l:()=>s});var n=i(80798),o=i(7789);class r{constructor(){this.allowRepeat=!1,this.eventAlreadySent={},this.stop=!1}init({pageName:e,device:t,sender:i,sendConfig:n}){this.sender=i,this.path=window.location.pathname,this.pageName=e,this.device=t,n&&this.handleConfigGlobal(n)}config({sender:e}){this.sender=e}getCommonParams(e,t){var i,n,r,s;return{page_name:null!==(n=null!==(i=this.pageName)&&void 0!==i?i:e)&&void 0!==n?n:"",last_event:null!==(r=this.lastEvent)&&void 0!==r?r:"",duration:(0,o.V)(),device:null!==(s=this.device)&&void 0!==s?s:"",userAgent:null!=t?t:window.navigator.userAgent}}send(e,t,i){this.sender?(((null==i?void 0:i.forceSend)||this.allowSend(e))&&this.sender(e,Object.assign(Object.assign({},t),this.getCommonParams())),this.updateStatus(e),this.lastEvent=e):console.error("Send ARM events before initialized")}handleConfigGlobal(e){const{allowRepeat:t}=e;this.allowRepeat=t}allowSend(e){const{stop:t,path:i,allowRepeat:n,eventAlreadySent:o}=this,r=window.location.pathname;return!(t||r!==i||!n&&o[e])}updateStatus(e){const t=window.location.pathname;this.stop=this.stop||t!==this.path,this.eventAlreadySent[e]=!0}}const s=(0,n.U)("ArmLogger@tiktok/arm-logger",(()=>new r))},7789:(e,t,i)=>{i.d(t,{MZ:()=>n,V:()=>o}),i(92439);const n=()=>{var e,t,i;const n=null===(t=null===(e=window.performance)||void 0===e?void 0:e.getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];return Math.ceil(null!==(i=null==n?void 0:n.responseStart)&&void 0!==i?i:0)},o=()=>Math.ceil(performance.now())},87181:(e,t,i)=>{i.d(t,{Zi:()=>u,$U:()=>c,BJ:()=>p,Bl:()=>l,D9:()=>v,yw:()=>d});var n,o,r=i(58632);!function(e){e.ROW="https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/secsdk/secsdk-lastest.umd.js",e.TTP="https://lf16-cdn-tos.tiktokcdn-us.com/obj/static-tx/secsdk/secsdk-lastest.umd.js"}(n||(n={})),function(e){e.Acrawler="acrawler",e.SecSdkSG="secsdk_sg",e.SecSdkVA="secsdk_va",e.SecSdkTTP="secsdk_ttp"}(o||(o={}));const s={acrawler:"https://lf16-tiktok-web.tiktokcdn-us.com/obj/tiktok-web-tx/webmssdk/2.0.0.221/webmssdk.js",secsdk_sg:"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/secsdk/secsdk-lastest.umd.js",secsdk_va:"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/secsdk/secsdk-lastest.umd.js",secsdk_ttp:"https://lf16-cdn-tos.tiktokcdn-us.com/obj/static-tx/secsdk/secsdk-lastest.umd.js"};i(24643);const a="script-manager";function l(e){var t,i,n;let o={imports:{}};try{o=JSON.parse(null!==(i=null===(t=document.querySelector(`#${a}`))||void 0===t?void 0:t.innerHTML)&&void 0!==i?i:"")}catch(e){console.error("[Init failed]: sdk config is invalid")}return null!==(n=o.imports[e])&&void 0!==n?n:""}function c(e){return(0,r.__awaiter)(this,void 0,void 0,(function*(){const{moduleId:t}=e,i=l(t),n=document.createElement("script");return n.src=i,n.async=!0,new Promise(((e,t)=>{var o;i?(n.parentNode&&(null===(o=document.parentNode)||void 0===o||o.removeChild(n)),document.body.appendChild(n),n.addEventListener("load",(()=>{e(!0)})),n.addEventListener("error",(()=>{t(new Error("load script failed"))}))):t(new Error("empty script src"))}))}))}function d(e){const{moduleId:t}=e,i=l(t),n=document.querySelector(`script[src="${i}"]`);return Boolean(n)}function u(e="/node-webapp/api/importmap"){return(0,r.__awaiter)(this,void 0,void 0,(function*(){if(document.querySelector(`#${a}`))return;let t={imports:{}};const i=document.createElement("script");i.type="application/json",i.id=a;try{const i=yield window.fetch.call(null,e,{method:"Get",redirect:"error"}),{imports:n}=yield i.json();t={imports:n}}catch(e){t={imports:s}}i.innerText=JSON.stringify(t),document.head.appendChild(i)}))}function v(e){let t="secsdk_sg";switch(e){case"MALI_VA":t="secsdk_va";break;case"TTP":t="secsdk_ttp";break;default:t="secsdk_sg"}return t}function p(){return"acrawler"}},81054:(e,t,i)=>{i.d(t,{Ay:()=>E,PD:()=>S});var n=i(47236);class o{isTriggered(e){return this._triggeredEvents.has(e)}emit(e){const t=this._activeListeners.get(e);t&&t.forEach((e=>e())),this._activeListeners.delete(e),this._triggeredEvents.add(e)}on(e,t){var i;if(this.isTriggered(e))t();else{const n=null!==(i=this._activeListeners.get(e))&&void 0!==i?i:new Set;n.add(t),this._activeListeners.set(e,n)}return{dispose:()=>this.off(e,t)}}off(e,t){const i=this._activeListeners.get(e);null==i||i.delete(t)}resetEvent(e){this._triggeredEvents.delete(e)}waitFor(e){return t=this,i=void 0,o=function*(){return new Promise((t=>{this.on(e,t)}))},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}constructor(){this._triggeredEvents=new Set,this._activeListeners=new Map}}class r extends Error{constructor(e){super(null!=e?e:"Lazy load component timeout.")}}var s=i(40099);const a=Symbol.for("visible_render_strategy"),l=e=>{const{id:t,emitter:i}=e;return(0,s.useEffect)((()=>{if(i.isTriggered(a))return;const e=document.getElementById(t);if(!e)return;const n=new IntersectionObserver((e=>{for(const t of e)if(t.isIntersecting){n.disconnect(),i.emit(a);break}}));return n.observe(e),()=>{n.disconnect()}}),[t,i]),null};var c=i(24643);function d(e,t,i={}){if(i.dependencyScripts)try{!function(e,t="preload"){for(const i of e){const e=document.createElement("link");e.href=i,e.rel=t,e.as="script",document.head.appendChild(e)}}(i.dependencyScripts)}catch(e){console.error("Link script error:",e)}return i=>{{const{intersectionId:n}=i,o=n?(0,c.jsx)(l,{id:n,emitter:t}):null;return(0,c.jsxs)(s.Fragment,{children:[o,(0,c.jsx)(e,Object.assign({},i))]})}}}i(28591);var u=i(57290),v=i.n(u),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const h=new Map;var m=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function g(e){return m(this,void 0,void 0,(function*(){for(const t of e)"function"==typeof t?yield t():yield t}))}function _(e,t){return()=>m(this,void 0,void 0,(function*(){yield e.waitFor(t)}))}function f(e){return()=>m(this,void 0,void 0,(function*(){let t;return new Promise((i=>{t=setTimeout((()=>{i()}),e)})).finally((()=>clearTimeout(t)))}))}var y=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const b=()=>new Promise((()=>{})),w=()=>Promise.resolve();function k(e,t,i,n){return o=>y(this,void 0,void 0,(function*(){if(null==(s=o)?void 0:s.__chunkExtractor)return i(o);var s;let l,c=w,d=b;const u=[],{timeout:k,raceTime:P,delayTime:O,renderEvent:S,renderStrategy:E}=Object.assign(Object.assign({},null==n?void 0:n.defaultProps),o);"number"==typeof k&&(c=function(e){return()=>m(this,void 0,void 0,(function*(){let t;return new Promise(((i,n)=>{t=setTimeout((()=>{n(new r("Load lazy component timeout."))}),e)})).finally((()=>clearTimeout(t)))}))}(k)),"number"==typeof P&&(d=f(P)),"number"==typeof O&&u.push(f(O)),(null==n?void 0:n.dependencyScripts)&&Array.isArray(n.dependencyScripts)&&u.push(function(e){return()=>p(this,void 0,void 0,(function*(){try{yield Promise.all(e.map((e=>function(e){return p(this,void 0,void 0,(function*(){if(h.has(e))return h.get(e);const t=new Promise(((t,i)=>{v()(e,(n=>{n?(h.delete(e),i(n)):t()}))}));return h.set(e,t),t}))}(e))))}catch(e){console.error("Load script error:",e)}}))}(n.dependencyScripts));const x=E;"idle"===x?u.push(function(){return()=>m(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{requestIdleCallback((()=>{e()}))}))}))}()):"visible"===x?u.push(_(t,a)):"custom"===x&&S&&u.push(_(e,S));const T=Promise.race([d(),g(u)]),A=g([T,()=>y(this,void 0,void 0,(function*(){l=yield i(o)}))]);if(yield Promise.all([A,c()]),!(null==l?void 0:l.default))throw new Error("Default of module should be component.");return l}))}const P=new o,O=new Set([P]),S={emit(e){O.forEach((t=>t.emit(e)))},resetEvent(e){O.forEach((t=>t.resetEvent(e)))}},E=function(e,t){const i=new o;let r;O.add(i);let s=e;if("function"!=typeof e){s=e.importAsync;const n=k(P,i,s,t);r=Object.assign(Object.assign({},e),{importAsync:n})}else r=k(P,i,e,t);return function(e,t,i,n){const o=()=>{t({}).catch((e=>{console.error("Load resource error",{error:e?e.message:e})}))};"preload"!==e?"custom"===e&&n&&i.on(n,(()=>{o()})):o()}(null==t?void 0:t.resourceStrategy,s,P,null==t?void 0:t.loadEvent),d((0,n.Ay)(r,t),i,t)}},31780:(e,t,i)=>{var n,o,r,s,a,l,c,d;i.d(t,{V7:()=>U,PY:()=>c,tH:()=>D,Wk:()=>N,Q_:()=>I,Gy:()=>F}),(o=n||(n={})).CUSTOM="CUSTOM",o.ACTUAL_FMP="ACTUAL_FMP",(s=r||(r={})).ABORT="ABORT",s.CRASH="CRASH",(l=a||(a={})).normal="normal",l.noRecord="noRecord",l.noInternet="noInternet",l.error="error",(d=c||(c={})).START="START",d.IN_PROGRESS="IN_PROGRESS",d.FAILURE="FAILURE",d.FINISH="FINISH",d.ABORT="ABORT";const u=()=>"undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType?{}:[...window.performance.getEntriesByType("mark").filter((e=>e.name.startsWith("pns_privacy_product_mark"))),...window.performance.getEntriesByType("measure").filter((e=>e.name.startsWith("pns_privacy_product_duration")))].map((e=>({duration:e.duration,entryType:e.entryType,name:e.name,startTime:e.startTime}))).reduce(((e,t)=>(e[t.name]="mark"===t.entryType?Math.floor(t.startTime):Math.floor(t.duration),e)),{}),v=()=>{if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.measure||"function"!=typeof window.performance.getEntriesByName)return-1;window.performance.measure("DCL","fetchStart","domContentLoadedEventEnd");const e=window.performance.getEntriesByName("DCL");return e.length>0?e[0].duration:-1},p=(e,t,i)=>{((e,t)=>{if(!t)return;const i={method:e,params:t};if("undefined"!=typeof NativeModules){var n,o;const e=null===(o=NativeModules)||void 0===o||null===(n=o.hybridMonitor)||void 0===n?void 0:n.request;return void(null==e||e(i,(()=>{})))}const r=(()=>{var e;let t="unknown";var i;const n=null!==(i=null===(e=navigator)||void 0===e?void 0:e.userAgent)&&void 0!==i?i:"";return/android|Android/i.test(n)&&(t="Android"),/iPhone|iPad|iPod|iOS/i.test(n)&&(t="iOS"),{os:t,isAndroid:"Android"===t,isIOS:"iOS"===t}})();var s,a,l,c,d;if(r.isIOS)null===(d=window)||void 0===d||null===(c=d.webkit)||void 0===c||null===(l=c.messageHandlers)||void 0===l||null===(a=l.bdhmRequest)||void 0===a||null===(s=a.postMessage)||void 0===s||s.call(a,i);else if(r.isAndroid){var u,v,p;null===(p=window)||void 0===p||null===(v=p.iesJsBridgeTransferMonitor)||void 0===v||null===(u=v.request)||void 0===u||u.call(v,JSON.stringify(i))}})("timing.mark",{key:e,value:void 0===t?Date.now():t,description:i||""})},h=(e,t="")=>"undefined"==typeof location||"undefined"==typeof URLSearchParams?"":new URLSearchParams(location.search).get(e)||t,m=()=>{var e,t;return{scm_version:"undefined"==typeof window?"":null!==(t=null===(e=window.gfdatav1)||void 0===e?void 0:e.ver)&&void 0!==t?t:"",path:"undefined"==typeof location?"":location.pathname,enter_from:h("enter_from"),host:"undefined"==typeof location?"":location.host}};function g(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _(e){for(var t=1;t=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}const y={pageCrash:!1,cuj:!1};class b{constructor(){this.slardarWindowGlobalName="",this.slardarHybridGlobalName="",this._shouldReportJSError={pageCrash:!1,cuj:!1},this.initSlardar=e=>{try{const{slardarContainer:t,slardarWindowGlobalName:i,slardarHybridGlobalName:n,sparkMonitor:o,reportActualFMP:r,shouldReportJSError:s}=null!=e?e:{};"string"==typeof i&&(this.slardarWindowGlobalName=i),"string"==typeof n&&(this.slardarHybridGlobalName=n),"function"==typeof r&&(this.reportTTAPActualFMP=r),void 0!==o&&(this.sparkMonitor=o),void 0!==t&&"function"==typeof t.sendEvent&&"function"==typeof t.reportActualFMP&&(this.slardarContainer=t),this._shouldReportJSError=_({},y,null!=s?s:{})}catch(e){}},this.initJSB=e=>{this.jsbBridge=e},this.sendEvent=e=>{try{var t,i;if(this.slardarWindowGlobalName&&"function"==typeof(null===(t=window)||void 0===t?void 0:t[this.slardarWindowGlobalName])&&window[this.slardarWindowGlobalName]("sendEvent",null!=e?e:{}),this.slardarHybridGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[this.slardarHybridGlobalName])){const t=null!=e?e:{},{name:i="",categories:n}=t,o=f(t,["name","categories"]);window[this.slardarHybridGlobalName]("emit","custom",_({eventName:i,level:0,category:n},o))}this.slardarContainer&&this.slardarContainer.sendEvent(e)}catch(e){}},this._sendError=(e,t)=>{if(this._shouldReportJSError)try{var i,n;if(this.slardarWindowGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[this.slardarWindowGlobalName])&&window[this.slardarWindowGlobalName]("captureException",e,t),this.slardarHybridGlobalName&&"function"==typeof(null===(n=window)||void 0===n?void 0:n[this.slardarHybridGlobalName])){const i=null!=t?t:{},{name:n=""}=i,o=f(i,["name"]);window[this.slardarHybridGlobalName]("captureException",e,_({eventName:n,level:0},o))}this.slardarContainer&&"function"==typeof this.slardarContainer.captureException&&this.slardarContainer.captureException(e,t)}catch(e){}},this.sendPageCrashError=(e,t)=>{this._shouldReportJSError.pageCrash&&this._sendError(e,t)},this.sendCUJError=(e,t)=>{this._shouldReportJSError.cuj&&this._sendError(e,t)},this.teaReport=e=>{var t,i;"undefined"!=typeof window&&"function"==typeof(null===(t=window)||void 0===t?void 0:t.collectEvent)&&(null===(i=window)||void 0===i||i.collectEvent(e.name,_({},e.metrics,e.categories,m()))),this.jsbBridge&&this.jsbBridge.x.reportAppLog({eventName:e.name,params:_({},e.metrics,e.categories,m())})},this.resetTeaModule=()=>{this.jsbBridge=void 0},this.resetSlardarModule=()=>{this.slardarContainer=void 0,this.slardarWindowGlobalName="",this.slardarHybridGlobalName="",this.sparkMonitor=void 0,this.reportTTAPActualFMP=void 0}}}var w,k,P;(P=k||(k={})).FBJS="pns_privacy_product_mark_fbjs",P.AFMP="pns_privacy_product_mark_afmp";const O=(null===(w=performance.timing)||void 0===w?void 0:w.navigationStart)||performance.timeOrigin;function S(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function E(e){for(var t=1;t{var e,t,i,n;if(this._hasReportedFBJS)return;this._hasReportedFBJS=!0;const o=Date.now();window.TTAP_APPPARSE_STARTTIME=o,"function"==typeof(null===(e=this._trackingContext.sparkMonitor)||void 0===e?void 0:e.mark)?this._trackingContext.sparkMonitor.mark("fbjs"):this._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(t=window)||void 0===t?void 0:t[this._trackingContext.slardarHybridGlobalName])&&p("fbjs"),null===(n=performance)||void 0===n||null===(i=n.mark)||void 0===i||i.call(n,"pns_privacy_product_mark_fbjs"),this._trackingContext.sendEvent({name:k.FBJS,metrics:{cost_ms:o-O},categories:E({},m())})},this.reportActualFMP=(e=a.normal)=>{var t,i,n,o;if(this._hasReportedActualFMP)return;this._hasReportedActualFMP=!0;const r=[a.normal,a.noRecord].includes(e),s=Date.now();var l,c,d,h,g,_;if(null===(i=performance)||void 0===i||null===(t=i.mark)||void 0===t||t.call(i,"pns_privacy_product_mark_afmp"),r)if("function"==typeof(null===(l=this._trackingContext.sparkMonitor)||void 0===l?void 0:l.mark)?this._trackingContext.sparkMonitor.mark("fmp"):this._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(c=window)||void 0===c?void 0:c[this._trackingContext.slardarHybridGlobalName])&&p("fmp"),"function"==typeof(null===(d=this._trackingContext)||void 0===d?void 0:d.reportTTAPActualFMP))this._trackingContext.reportTTAPActualFMP();else if(this._trackingContext.slardarWindowGlobalName&&"function"==typeof(null===(h=window)||void 0===h?void 0:h[this._trackingContext.slardarWindowGlobalName])){var f;(null===(f=window)||void 0===f?void 0:f[this._trackingContext.slardarWindowGlobalName])("sendCustomPerfMetric",{name:"actual_fmp",value:s-O})}this._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(n=window)||void 0===n?void 0:n[this._trackingContext.slardarHybridGlobalName])&&(null===(_=window)||void 0===_||null===(g=_[this._trackingContext.slardarHybridGlobalName])||void 0===g||g.call(_,"sendCustomPerfMetric",{name:"actual_fmp",value:s-O})),this._trackingContext.sendEvent({name:k.AFMP,metrics:x(E({costMs:s-O},u()),{pns_privacy_product_mark_dcl:v()}),categories:E({isSuccess:r?"1":"0",scene:e},m())}),this._trackingContext.teaReport({name:k.AFMP,metrics:x(E({costMs:s-O},u()),{pns_privacy_product_mark_dcl:v()}),categories:{isSuccess:r?"1":"0",scene:e}}),"function"==typeof(null===(o=this._trackingContext.slardarContainer)||void 0===o?void 0:o.reportActualFMP)&&this._trackingContext.slardarContainer.reportActualFMP()},this._trackingContext=e}}const A=()=>{var e,t,i;return(null===(t=performance)||void 0===t||null===(e=t.timing)||void 0===e?void 0:e.navigationStart)||(null===(i=performance)||void 0===i?void 0:i.timeOrigin)},C=()=>{window._bound_error_time||(window._bound_error_time=!0,(()=>{var e;if(null===(e=console)||void 0===e?void 0:e.error){const e=console.error;console.error=(t,...i)=>{(e=>{let t=0;try{performance.mark("error"),t=performance.measure("navigationStart_to_error","navigationStart","error").duration,performance.clearMarks("error"),performance.clearMeasures("navigationStart_to_error")}catch(e){t=Date.now()-A()}"object"==typeof e&&(e._triggerTime=t)})(t),e.apply(void 0,[t,...i])}}})())};class j{resetForSPA(){this._hasReportedPageReady=!1,this._hasReportedPageCrash=!1,this._hasReportedUserDrop=!1,this._pageReadyTimestamp=-1,this._cuj={}}constructor(e){this._hasReportedPageReady=!1,this._hasReportedPageCrash=!1,this._hasReportedUserDrop=!1,this._pageReadyTimestamp=-1,this._cuj={},this.reportPageReady=()=>{if(this._hasReportedPageReady||this._hasReportedUserDrop||this._hasReportedPageCrash)return;this._hasReportedPageReady=!0;let e=0;try{performance.mark("pageReady"),e=performance.measure("navigationStart_to_pageReady","navigationStart","pageReady").duration}catch(t){e=Date.now()-A()}this._pageReadyTimestamp=e,this._trackingContext.sendEvent({name:"page_ready",metrics:{time:e}})},this.reportUserDrop=()=>{if(this._hasReportedPageReady||this._hasReportedUserDrop)return;this._hasReportedUserDrop=!0;let e=0;try{performance.mark("userDrop"),e=performance.measure("navigationStart_to_userDrop","navigationStart","userDrop").duration}catch(t){e=Date.now()-A()}this._trackingContext.sendEvent({name:"user_drop",metrics:{time:e},categories:{reason:this._hasReportedPageCrash?r.CRASH:r.ABORT}})},this.reportPageCrash=(e,t=!1,i)=>{var n,o,r;if(this._hasReportedUserDrop||this._hasReportedPageCrash)return;this._hasReportedPageCrash=!0;const{name:s="",message:a,stack:l,_triggerTime:c=0}=null!=e?e:{};let d=0;if(!d)try{performance.mark("pageCrashReporting"),d=performance.measure("navigationStart_to_pageCrashReporting","navigationStart","pageCrashReporting").duration}catch(e){d=Date.now()-A()}const u=t?c:d,v=u{var n,o;const r=`cuj_${e}_${c.START}`,s=`cuj_${e}_${t}`.replace(/\s/g,"_");let a=0,l=0;try{performance.mark(s),a=performance.measure(`navigationStart_to_${s}`,"navigationStart",s).duration,l=performance.measure(`${r}_to_${s}`,r,s).duration}catch(i){if(a=Date.now()-A(),t===c.START)this._cuj[e]={[c.START]:Date.now()},l=0;else{if(!this._cuj[e])return;var d;this._cuj[e][t]=Date.now(),l=this._cuj[e][t]-(null!==(d=this._cuj[e][c.START])&&void 0!==d?d:0)}}const{error:u,detail:v,stepName:p}=null!=i?i:{};var h;const m="string"==typeof u?u:null!==(h=null==u?void 0:u.toString())&&void 0!==h?h:"";var g;const _=v||(null!==(g=null==u?void 0:u.stack)&&void 0!==g?g:"");var f,y;this._trackingContext.sendEvent({name:"pns_cuj",metrics:{timestamp:a,duration:l},categories:{status:t,name:e,stepName:p,error:null!==(f=null==m||null===(n=m.substring)||void 0===n?void 0:n.call(m,0,256))&&void 0!==f?f:"",detail:null!==(y=null==_||null===(o=_.substring)||void 0===o?void 0:o.call(_,0,256))&&void 0!==y?y:""}}),t===c.FAILURE&&u&&this._trackingContext.sendCUJError(u,{stepName:p,cujName:e,status:t,name:"pns_cuj"})},this._trackingContext=e}}const L={},I=(e="")=>{let t=!1;class i{resetForSPA(){this._stabilityTracker.resetForSPA(),this._perfTracker.resetForSPA()}reset(){this.resetForSPA(),t=!1,this._trackingContext.resetSlardarModule(),this._trackingContext.resetTeaModule()}isInitialized(){return t}constructor(e=""){let o;return this._pageReadyTiming=n.ACTUAL_FMP,this.init=e=>{try{if(t)return;t=!0;const{slardarContainer:i,slardarWindowGlobalName:o,slardarHybridGlobalName:r,sparkMonitor:s,reportActualFMP:a,pageReadyTiming:l=n.CUSTOM,jsbBridge:c,shouldReportJSError:d={},shouldRegisterUserDrop:u=!0}=null!=e?e:{};this._pageReadyTiming=l,this._trackingContext.initSlardar({slardarContainer:i,slardarWindowGlobalName:o,slardarHybridGlobalName:r,sparkMonitor:s,reportActualFMP:a,shouldReportJSError:d}),c&&this._trackingContext.initJSB(c),C(),u&&this._registerUserDropEvent()}catch(e){}},this._registerUserDropEvent=()=>{window.addEventListener("beforeunload",this.reportUserDrop,!0)},this.reportPageReady=e=>{this._stabilityTracker.reportPageReady(),this._pageReadyTiming===n.ACTUAL_FMP&&this._perfTracker.reportActualFMP(e)},this.reportUserDrop=()=>{this._stabilityTracker.reportUserDrop()},this.reportPageCrash=(e,t=!1,i)=>{this._stabilityTracker.reportPageCrash(e,t,i)},this.reportFBJS=()=>{this._perfTracker.reportFBJS()},this.reportActualFMP=e=>{this._perfTracker.reportActualFMP(e)},this.reportCUJ=(e,t,i)=>{this._stabilityTracker.reportCUJ(e,t,i)},e?(L[e]=this,o=this):(i._instance||(i._instance=this),o=i._instance),this._trackingContext=new b,this._perfTracker=new T(this._trackingContext),this._stabilityTracker=new j(this._trackingContext),o}}return e?(L[e]||(L[e]=new i(e)),L[e]):new i},N=I();var M=i(24643),R=i(40099);class D extends R.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){!1!==this.props.shouldReport&&N.reportPageCrash(e,!0,t.componentStack),this.props.onError&&this.props.onError(e,t)}render(){var e;return this.state.hasError?null!==(e=this.props.fallback)&&void 0!==e?e:(0,M.jsx)("div",{}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}const U=({children:e,cujName:t,shouldReportPageCrush:i=!1,fallback:n})=>{const o=(0,R.useCallback)((e=>{t&&N.reportCUJ(t,c.FAILURE,{error:e})}),[t]);return(0,M.jsx)(D,{shouldReport:i,fallback:n,onError:o,children:e})},F=()=>{(0,R.useEffect)((()=>{setTimeout((()=>{N.reportPageReady()}),0)}),[])}},47172:(e,t,i)=>{i.d(t,{CompatRouter:()=>_,CustomRouterContext:()=>s,Link:()=>u,Prompt:()=>v,getRouterState:()=>b,matchPath:()=>d,useHistory:()=>a,useLocation:()=>l,useRouteError:()=>f,useRouteMatch:()=>c});var n=i(40099),o=i(11060),r=i(99179);const s=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(s),t=(0,o.W6)();var i;return null!==(i=null==e?void 0:e.history)&&void 0!==i?i:t}function l(){const e=(0,n.useContext)(s),t=(0,o.zy)();var i;return null!==(i=null==e?void 0:e.location)&&void 0!==i?i:t}(0,n.createContext)(null);const c=o.W5,d=o.B6,u=r.N_,v=o.XG;var p=i(24643),h=i(26475),m=i(79948),g=i.n(m);const _=({createRouter:e,historyPaths:t,children:i})=>{if(e)throw new Error("Can't pass createRouter in react-router v5.");const n=function(e,t){const i=(0,h.zR)(t);function n(t){return(n,o)=>{const{pathname:r,href:s}=function(e){if("string"==typeof e){const t=new URL(e,window.location.origin);return{pathname:t.pathname,href:t.href}}const{pathname:t="",search:i="",hash:n=""}=e;return{pathname:t,href:`${t}${i}${n}`}}(n);!function(e,t){return t.some((t=>g()(t).test(e)))}(r,e)?t?window.location.replace(s):window.location.assign(s):t?i.replace(n,o):i.push(n,o)}}return Object.create(i,{push:{enumerable:!0,value:n(!1)},replace:{enumerable:!0,value:n(!0)}})}(null!=t?t:[]);return(0,p.jsx)(o.Ix,{history:n,children:i})},f=()=>{throw new Error("useRouteError is not supported in react-router v5")},y="state";function b(){const e=window.history.state;return null==e?void 0:e[y]}},14713:(e,t,i)=>{i(37685),console.info("Reflect is polyfilled, using `@abraham/reflection`.")},88004:(e,t,i)=>{i.d(t,{LoggingModule:()=>P,MonitorModule:()=>y,ServiceModule:()=>L});var n=i(31780),o=i(60012);const r="0.0.0",s="pns_sdk_common_modules";var a,l,c,d;function u(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}(l=a||(a={})).US_EAST="US-East",l.US_EASTRED="US-EastRed",l.SINGAPORE_CENTRAL="Singapore-Central",l.EU_TTP="EU-TTP",l.EU_TTP2="EU-TTP2",l.US_TTP="US-TTP",l.US_TTP2="US-TTP2",(d=c||(c={})).PRODUCTION="production",d.DEV="dev",d.BOE="boe";class v{constructor(e,t){this.sendEvent=e=>{this._client&&this._client.sendEvent&&this._client.sendEvent(e)},this.reportActualFMP=()=>{};const{slardar:i}=null!=e?e:{},{region:n=a.US_EAST,bid:l=s,mode:d=c.PRODUCTION,consumerBid:v,version:p=r}=null!=t?t:{};this._client=(0,o.kT)();let h={};switch(n){case a.US_EASTRED:case a.EU_TTP:case a.EU_TTP2:h={domain:"https://mon-i18n.tiktokv.com",pluginPathPrefix:"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/slardar/fe/sdk-web/plugins"};break;case a.US_TTP:case a.US_TTP2:h={domain:"https://mon16-normal-useast5.tiktokv.us",pluginPathPrefix:"https://lf16-cdn-tos.tiktokcdn-us.com/obj/static-tx/slardar/fe/sdk-web/plugins"};break;case a.US_EAST:case a.SINGAPORE_CENTRAL:default:h={domain:"https://mon.tiktokv.com",pluginPathPrefix:"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/slardar/fe/sdk-web/plugins"}}var m,g;this._client&&(this._client("init",(m=function(e){for(var t=1;t{if(this._isInitialized)return;this._isInitialized=!0;const{bid:i=s,version:o=r}=null!=t?t:{};this._name=`${i}_${o}_${Date.now()}`,this._trackingModule=this._useSingleton?n.Wk:(0,n.Q_)(this._name),this._tea=((e,t)=>{let i=null;if(!1!==(null==e?void 0:e.tea))try{const{tea:n}=null!=e?e:{},{appId:o,region:l,debug:c}=null!=t?t:{},d=(e=>{let t={};switch(e){case a.US_EASTRED:t={channel:"in",channel_type:"tcpy",channel_domain:"https://mcs-i18n.tiktok.com"};break;case a.EU_TTP:t={channel:"ie",channel_type:"ttp",channel_domain:"https://mcs-ie.tiktokw.eu"};break;case a.EU_TTP2:t={channel:"ie2",channel_type:"ttp",channel_domain:"https://mcs-ie2.tiktokw.eu"};break;case a.US_TTP:t={channel_type:"ttp",channel_domain:"https://mcs.tiktokv.us"};break;case a.US_TTP2:t={channel_type:"ttp",channel_domain:"https://mcs.tiktokw.us"};break;case a.SINGAPORE_CENTRAL:t={channel:"sg",channel_type:"tcpy",channel_domain:"https://mcs-sg.tiktokv.com"};break;case a.US_EAST:t={channel:"va",channel_type:"tcpy",channel_domain:"https://mcs-va.tiktokv.com"}}return t})(l),u=m({},d,null!=n?n:{});(e=>!(!e||!e.channel_type||!e.channel&&!e.channel_domain))(u)&&(i=new p.Collector(`${s}_${r}_${Date.now()}`),i.init(m({app_id:null!=o?o:1988,log:c},u)),i.start())}catch(e){}return i})(e,t),this._teaEventNameFormatter=null==e?void 0:e.teaEventNameFormatter,this._slardar=((e,t)=>{let i=null;if(!1!==(null==e?void 0:e.slardar))try{i=new v(e,t)}catch(e){}return i})(e,t),this._slardar&&this._trackingModule.init({slardarContainer:this._slardar})},this.reportCUJ=(e,t,i)=>{if(e)try{var n,o;this._trackingModule.reportCUJ(e,t,i),this._tea&&this._tea.event(null!==(o=null===(n=this._teaEventNameFormatter)||void 0===n?void 0:n.call(this,e))&&void 0!==o?o:e,function(e){for(var t=1;t{P.info("[ServiceModule]: init"),this._domain=e.domain||"https://www.tiktok.com",this._commonParams=e.commonParams||{}},this.sendRequest=(e,t,i,n)=>{const o=C.test(e)?e:`${this._domain}${e}`,r=new URL(o),s=Array.from(r.searchParams.entries()).reduce(((e,t)=>{const[i,n]=t;return void 0===n&&""===n||(e[i]=n),e}),{}),a=null!=n?n:{},{params:l,timeout:c}=a,d=function(e,t){if(null==e)return{};var i,n,o=function(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}(a,["params","timeout"]);let u=A({},this._commonParams,s,null!=l?l:{});"GET"===t&&i&&"object"==typeof i&&(u=A({},u,i));const v=new URLSearchParams((e=>{if(!e)return"";const t=new URLSearchParams;return Object.entries(e).forEach((([e,i])=>{Array.isArray(i)?i.forEach((i=>{t.append(e,i)})):null!=i&&t.append(e,i)})),t.toString()})(u)),p=new URL(`${r.origin}${r.pathname}?${v.toString()}`),h=S()({},d,{method:t,timeout:null!=c?c:0,data:i});return P.info("[ServiceModule]: sendRequest start",h),x()(p.href,h).then((e=>(P.info("[ServiceModule]: sendRequest finish",e),e))).catch((e=>{throw P.error("[ServiceModule]: sendRequest error",e),e}))},this.destruct=()=>{P.info("[ServiceModule]: destruct")},j._instance||(j._instance=this),j._instance}}var L=new j},54775:(e,t,i)=>{i.d(t,{juU:()=>L});var n=function(){return"undefined"==typeof window||"undefined"==typeof document},o=n()||!document.documentElement.classList.contains("Android")&&!Boolean(/(?:Android);?[\s/]+([\d.]+)?/.exec(navigator.userAgent))?"iOS":"Android",r=i(23475),s=i.n(r),a=i(71984),l=i.n(a),c=i(86649),d=i.n(c),u=i(88028),v=i.n(u),p=i(22799),h=i.n(p),m=i(55587),g=i.n(m),_=i(35692),f=i(65328),y=i(85609),b=i(34770),w=i.n(b),k=i(58041),P=i.n(k),O=i(40099),S=i(73791),E=function(){if(!n())return function(){if(n())return!1;var e=navigator.userAgent.match(/isDarkMode\/([01])/);return e?"1"===e[1]:Boolean(window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches}()?"dark":"light"}(),x=["children","margin","padding","width","height","maxWidth","minWidth","maxHeight","minHeight"],T=["children","margin","padding","width","height","maxWidth","minWidth","maxHeight","minHeight"];function A(e,t){var i=w()(e);if(s()){var n=s()(e);t&&(n=l()(n).call(n,(function(t){return d()(e,t).enumerable}))),i.push.apply(i,n)}return i}function C(e){for(var t=1;t{i.d(t,{P:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M8 8.5A3.5 3.5 0 0 0 4.5 12v24A3.5 3.5 0 0 0 8 39.5h31a3.5 3.5 0 0 0 3.5-3.5V12A3.5 3.5 0 0 0 39 8.5H8ZM7.5 12c0-.28.22-.5.5-.5h31c.28 0 .5.22.5.5v14l-7.6-5.7a1.5 1.5 0 0 0-1.85.04L10.46 36.5H8a.5.5 0 0 1-.5-.5V12Zm23.54 11.4 8.46 6.35V36a.5.5 0 0 1-.5.5H15.18l15.86-13.1ZM17 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}))}))},64454:(e,t,i)=>{i.d(t,{A:()=>s,Z:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M24.71 32.03a1 1 0 0 1-1.58 0L14.4 20.6a1 1 0 0 1 .8-1.61h17.54a1 1 0 0 1 .79 1.61l-8.82 11.42Z"}))}var a=(0,o.r)(s)},32567:(e,t,i)=>{i.d(t,{S:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M14 25a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM27 22a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM34 25a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 3C11.7 3 1.5 10.91 1.5 21.5c0 10.07 9.19 17.18 20.5 17.93V44a2 2 0 0 0 2.72 1.86 44.05 44.05 0 0 0 14.3-9.2c4.19-4.1 7.48-9.34 7.48-15.16C46.5 10.91 36.3 3 24 3ZM5.5 21.5C5.5 13.86 13.1 7 24 7s18.5 6.86 18.5 14.5c0 4.3-2.46 8.56-6.28 12.3-3 2.95-6.7 5.41-10.22 7.14V35.5h-2c-10.99 0-18.5-6.43-18.5-14Z"}))}))},15928:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M22 24a2 2 0 0 0 .85 1.64l9.19 6.43a1 1 0 0 0 1.39-.25l1.15-1.64a1 1 0 0 0-.25-1.39l-7.9-5.53a1 1 0 0 1-.43-.82V13a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v11Z"}),r.createElement("path",{d:"M24 2a22 22 0 1 0 0 44 22 22 0 0 0 0-44ZM6 24a18 18 0 1 1 36 0 18 18 0 0 1-36 0Z"}))}(0,o.r)(s)},93037:(e,t,i)=>{i.d(t,{i:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 46a22 22 0 1 0 0-44 22 22 0 0 0 0 44Zm-1.15-20.36A2 2 0 0 1 22 24V13a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9.44a1 1 0 0 0 .43.82l7.9 5.53a1 1 0 0 1 .24 1.4l-1.14 1.63a1 1 0 0 1-1.4.25l-9.18-6.43Z"}))}))},28261:(e,t,i)=>{i.d(t,{A:()=>s,i:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({},e,{viewBox:"0 0 48 48",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("circle",{cx:24,cy:24,r:22,fill:"#fff"}),r.createElement("path",{d:"M24 46a22 22 0 1 0 0-44 22 22 0 0 0 0 44Zm10.4-30.67c.59.38.76 1.16.4 1.75l-11 17.58a2.51 2.51 0 0 1-4.04.34l-7.33-8.39c-.47-.5-.41-1.33.11-1.78l1.92-1.67c.51-.45 1.3-.4 1.77.13l5.1 5.82 9.2-14.71c.35-.6 1.13-.77 1.73-.4l2.13 1.33Z",fill:"#0BE09B"}))}var a=(0,o.r)(s)},89162:(e,t,i)=>{i.d(t,{b:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({},e,{viewBox:"0 0 48 48",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.46 9.6 5.29 32.4c-1.81 3.15-2.72 4.73-2.59 6.02a4 4 0 0 0 1.63 2.82c1.05.76 2.87.76 6.5.76h26.33c3.64 0 5.46 0 6.51-.76a4 4 0 0 0 1.63-2.82c.13-1.3-.77-2.87-2.6-6.02L29.55 9.6c-1.82-3.15-2.73-4.73-3.91-5.25a4 4 0 0 0-3.26 0c-1.18.52-2.1 2.1-3.91 5.25Zm7.33 8.26c0-.56 0-.84-.11-1.05a1 1 0 0 0-.44-.44c-.21-.11-.5-.11-1.05-.11h-.39c-.56 0-.84 0-1.05.1a1 1 0 0 0-.44.45c-.1.21-.1.49-.1 1.05v9.21c0 .56 0 .84.1 1.06a1 1 0 0 0 .44.43c.21.11.5.11 1.05.11h.39c.56 0 .84 0 1.05-.1a1 1 0 0 0 .44-.44c.1-.22.1-.5.1-1.06v-9.21Zm-3.47 17.6c.44.46 1 .68 1.68.68a2.28 2.28 0 0 0 2.35-2.32A2.28 2.28 0 0 0 24 31.46a2.28 2.28 0 0 0-2.36 2.36c0 .65.23 1.2.68 1.65Z",fill:"#FF4C3A"}),r.createElement("path",{d:"M24.19 16.26h-.39c-.56 0-.84 0-1.05.1a1 1 0 0 0-.44.45c-.1.21-.1.49-.1 1.05v9.21c0 .56 0 .84.1 1.06a1 1 0 0 0 .44.43c.21.11.5.11 1.05.11h.39c.56 0 .84 0 1.05-.1a1 1 0 0 0 .44-.44c.1-.22.1-.5.1-1.06v-9.21c0-.56 0-.84-.1-1.05a1 1 0 0 0-.44-.44c-.21-.11-.5-.11-1.05-.11ZM22.32 35.47c.44.45 1 .67 1.68.67a2.28 2.28 0 0 0 2.35-2.32A2.28 2.28 0 0 0 24 31.46a2.28 2.28 0 0 0-2.36 2.36c0 .65.23 1.2.68 1.65Z",fill:"#fff"}))}))},86223:(e,t,i)=>{i.d(t,{Q:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M24 46a22 22 0 1 1 0-44 22 22 0 0 1 0 44Zm2.07-32.97a1 1 0 0 0-1-1h-2.15a1 1 0 0 0-1 1V26.4a1 1 0 0 0 1 1h2.15a1 1 0 0 0 1-1V13.03ZM22.02 35.4c.55.52 1.2.78 1.97.78.8 0 1.45-.26 1.98-.78.54-.52.81-1.17.81-1.94 0-.8-.27-1.45-.81-1.97a2.62 2.62 0 0 0-1.98-.82c-.77 0-1.42.27-1.97.82a2.67 2.67 0 0 0-.78 1.97c0 .77.26 1.42.78 1.94Z"}))}))},59131:(e,t,i)=>{i.d(t,{A:()=>s,O:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{opacity:.9,d:"M18.46 9.6c1.82-3.15 2.73-4.72 3.91-5.25a4 4 0 0 1 3.26 0c1.18.53 2.1 2.1 3.91 5.25l13.17 22.8c1.82 3.15 2.72 4.73 2.59 6.02a4 4 0 0 1-1.63 2.82c-1.05.76-2.87.76-6.5.76H10.83c-3.64 0-5.46 0-6.51-.76a4 4 0 0 1-1.63-2.82c-.13-1.3.78-2.87 2.6-6.02L18.45 9.6Zm7.33 8.26c0-.56 0-.84-.11-1.05a1 1 0 0 0-.44-.44c-.21-.1-.5-.1-1.05-.1h-.39c-.56 0-.84 0-1.05.1a1 1 0 0 0-.44.44c-.1.21-.1.5-.1 1.05v9.21c0 .56 0 .84.1 1.06a1 1 0 0 0 .44.43c.21.11.5.11 1.05.11h.39c.56 0 .84 0 1.05-.1a1 1 0 0 0 .44-.44c.1-.22.1-.5.1-1.06v-9.2Zm-3.47 17.6c.44.46 1 .68 1.68.68a2.28 2.28 0 0 0 2.35-2.32A2.28 2.28 0 0 0 24 31.46a2.28 2.28 0 0 0-2.36 2.36c0 .65.23 1.2.68 1.65Z"}))}var a=(0,o.r)(s)},81079:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M41.4 23.71a.9.9 0 0 1 0 .58c-.63 1.92-2.2 4.89-4.82 7.51A17.35 17.35 0 0 1 24 37.11c-5.42 0-9.55-2.28-12.58-5.3a20.44 20.44 0 0 1-4.82-7.52.9.9 0 0 1 0-.58c.63-1.92 2.2-4.89 4.82-7.51A17.35 17.35 0 0 1 24 10.89c5.42 0 9.55 2.28 12.58 5.3a20.44 20.44 0 0 1 4.82 7.52ZM24 41c13.83 0 20.82-11.7 21.96-16.81a.85.85 0 0 0 0-.38C44.82 18.71 37.83 7 24 7S3.18 18.7 2.04 23.81a.85.85 0 0 0 0 .38C3.18 29.29 10.17 41 24 41Z"}),r.createElement("path",{d:"M24 27.21a3.21 3.21 0 1 1 0-6.42 3.21 3.21 0 0 1 0 6.42Zm0 4.29a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z"}))}(0,o.r)(s)},91379:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M24 26c-4.3 0-8.1-1.33-10.8-3.4-2.38-1.81-3.83-4.13-4.14-6.6-.07-.55-.5-1-1.06-1H6c-.55 0-1 .45-.96 1 .32 3.92 2.54 7.34 5.72 9.78.46.35.94.68 1.45 1L9.5 31.46a1 1 0 0 0 .37 1.37l1.73 1a1 1 0 0 0 1.36-.37l2.84-4.92c1.92.73 4.01 1.2 6.2 1.38V35a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-5.08a22.8 22.8 0 0 0 6.89-1.65l2.61 4.52a1 1 0 0 0 1.37.37l1.73-1a1 1 0 0 0 .36-1.37l-2.55-4.42c.28-.19.56-.38.83-.59 3.18-2.44 5.4-5.86 5.72-9.78.04-.55-.4-1-.96-1h-2c-.55 0-1 .45-1.06 1-.31 2.47-1.76 4.79-4.13 6.6A17.88 17.88 0 0 1 24 26Z"}))}(0,o.r)(s)},41664:(e,t,i)=>{i.d(t,{A:()=>s,N:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M24 6a18 18 0 1 0 0 36 18 18 0 0 0 0-36ZM2 24a22 22 0 1 1 44 0 22 22 0 0 1-44 0Zm25-8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm-4 6a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V23a1 1 0 0 0-1-1h-2Z"}))}var a=(0,o.r)(s)},81678:(e,t,i)=>{i.d(t,{g:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 72 72",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"m54.02 4.5-3 18H63l-.5 3H50.52L47.27 45h11.98l-.5 3H46.77l-3.25 19.5h-3.04L43.73 48H24.27l-3.25 19.5h-3.04L21.23 48H9.25l.5-3h11.98l3.25-19.5H13l.5-3h11.98l3-18h3.04l-3 18h19.46l3-18h3.04Zm-6.54 21H28.02L24.77 45h19.46l3.25-19.5Z"}))}))},87992:(e,t,i)=>{i.d(t,{j:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M8.64 38.54a9 9 0 0 1 0-12.73l4.77-4.77a1 1 0 0 0 0-1.41l-1.42-1.42a1 1 0 0 0-1.4 0L5.8 23a13 13 0 0 0 18.38 18.38l4.78-4.77a1 1 0 0 0 0-1.42l-1.42-1.41a1 1 0 0 0-1.41 0l-4.78 4.77a9 9 0 0 1-12.72 0ZM22.25 12.2l3.71-3.71a8.5 8.5 0 0 1 12.02 0l.7.7a8.5 8.5 0 0 1 0 12.03l-3.7 3.71a1 1 0 0 0 0 1.41l1.41 1.42a1 1 0 0 0 1.41 0l3.72-3.71a12.5 12.5 0 0 0 0-17.68l-.71-.7a12.5 12.5 0 0 0-17.68 0l-3.71 3.7a1 1 0 0 0 0 1.42l1.41 1.41a1 1 0 0 0 1.42 0Z"}),r.createElement("path",{d:"M15.7 28.64a1 1 0 0 0 0 1.42l1.42 1.41a1 1 0 0 0 1.42 0L30.9 19.1a1 1 0 0 0 0-1.42l-1.41-1.41a1 1 0 0 0-1.42 0L15.71 28.64Z"}))}))},54977:(e,t,i)=>{i.d(t,{G:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M35 10.76a1 1 0 0 0-1.22-.98l-15.99 3.64a1 1 0 0 0-.78.97V38c.03 2.17-2.2 4.43-5.4 5.28-3.56.96-6.96-.2-7.6-2.57-.63-2.37 1.74-5.07 5.3-6.02a9.2 9.2 0 0 1 3.7-.25V14.39a5 5 0 0 1 3.9-4.87l15.98-3.64A5 5 0 0 1 39 10.76v22.36c.08 2.2-2.17 4.5-5.4 5.36-3.56.95-6.96-.2-7.6-2.57-.63-2.38 1.74-5.08 5.3-6.03a9.2 9.2 0 0 1 3.7-.25V10.76Z"}))}))},63581:(e,t,i)=>{i.d(t,{Y:()=>s});var n=i(18047),o=i(52837),r=i(40099),s=(0,o.r)((function(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M24 3a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 4a6 6 0 1 0 0 12.00A6 6 0 0 0 24 7Zm0 19c10.3 0 16.67 6.99 17 17 .02.55-.43 1-1 1h-2c-.54 0-.98-.45-1-1-.3-7.84-4.9-13-13-13s-12.7 5.16-13 13c-.02.55-.46 1-1.02 1h-2c-.55 0-1-.45-.98-1 .33-10.01 6.7-17 17-17Z"}))}))},62216:(e,t,i)=>{i.d(t,{A:()=>s,T:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43 6.08c.7.45 1.06.67 1.25.98.16.27.23.59.2.9-.03.36-.26.72-.7 1.43L23.06 42.14a3.5 3.5 0 0 1-5.63.39L4.89 27.62c-.54-.64-.81-.96-.9-1.32a1.5 1.5 0 0 1 .09-.92c.14-.33.46-.6 1.1-1.14l1.69-1.42c.64-.54.96-.81 1.31-.9.3-.06.63-.04.92.09.34.14.6.46 1.15 1.1l9.46 11.25 18.11-28.7c.45-.72.68-1.07.99-1.26.27-.16.59-.23.9-.2.36.03.71.25 1.43.7L43 6.08Z"}))}var a=(0,o.r)(s)},62541:(e,t,i)=>{i.d(t,{A:()=>s,q:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M2 15a6 6 0 0 1 6-6h22a6 6 0 0 1 6 6v4.21l9.18-6.28A1.8 1.8 0 0 1 48 14.4V33.6a1.8 1.8 0 0 1-2.82 1.48L36 28.8V33a6 6 0 0 1-6 6H8a6 6 0 0 1-6-6V15Zm6-2a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h22a2 2 0 0 0 2-2V15a2 2 0 0 0-2-2H8Zm28.08 11L44 29.42V18.58L36.08 24Z"}))}var a=(0,o.r)(s)},30543:(e,t,i)=>{i.d(t,{A:()=>s,g:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M38.7 12.12a1 1 0 0 0 0-1.41l-1.4-1.42a1 1 0 0 0-1.42 0L24 21.17 12.12 9.3a1 1 0 0 0-1.41 0l-1.42 1.42a1 1 0 0 0 0 1.41L21.17 24 9.3 35.88a1 1 0 0 0 0 1.41l1.42 1.42a1 1 0 0 0 1.41 0L24 26.83 35.88 38.7a1 1 0 0 0 1.41 0l1.42-1.42a1 1 0 0 0 0-1.41L26.83 24 38.7 12.12Z"}))}var a=(0,o.r)(s)},21380:(e,t,i)=>{i.d(t,{A:()=>s,h:()=>a});var n=i(18047),o=i(52837),r=i(40099);function s(e){return r.createElement("svg",(0,n._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),r.createElement("path",{d:"M33.2 36.02a1 1 0 0 0 1.4 0l1.42-1.42a1 1 0 0 0 0-1.4l-9.2-9.2 9.2-9.2a1 1 0 0 0 0-1.4l-1.41-1.42a1 1 0 0 0-1.42 0L24 21.17l-9.2-9.2a1 1 0 0 0-1.4 0l-1.42 1.42a1 1 0 0 0 0 1.42l9.2 9.19-9.2 9.2a1 1 0 0 0 0 1.4l1.41 1.42a1 1 0 0 0 1.42 0l9.19-9.2 9.2 9.2Z"}))}var a=(0,o.r)(s)},18047:(e,t,i)=>{function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tn})},52837:(e,t,i)=>{i.d(t,{r:()=>o});var n=i(40099);function o(e){return function(t){var i=t.color,o=t.size,r=t.circleBackground,s={"data-testid":t.testId};if(void 0!==i&&(s.className="text-color-".concat(i)),void 0!==o&&(s.fontSize="".concat(o,"px")),void 0!==r){var a=r.backgroundColor,l=r.circleSize,c="".concat(l,"px"),d={width:c,height:c};return n.createElement("div",{className:"inline-flex items-center justify-center rounded-full background-color-".concat(a),style:d},n.createElement(e,s))}return n.createElement(e,s)}}},73537:(e,t,i)=>{i.d(t,{Uc:()=>b,Vq:()=>f,J:()=>h,GP:()=>Ue,IC:()=>de,Fd:()=>Fe});var n=i(84448),o=i(24643),r=i(40099),s=i(58542),a=i(62186);const l=(0,a.default)("div",{target:"e1mpj5ji0"})({width:"100vw",left:0,position:"fixed",display:"flex",justifyContent:"center",boxShadow:"0 2px 8px rgba(0, 0, 0, .06)",":after":{content:'""',background:"rgba(33, 33, 33, .08)",position:"absolute",left:"0",bottom:"0",width:"100%",height:"1px",transform:"scaleY(0.5)"}},"label:DivBannerContainer;"),c=(0,a.default)("div",{target:"e1mpj5ji1"})({padding:"12px 12px 12px 16px",display:"flex",justifyContent:"space-between",gap:"8px"},"label:DivBannerWrapper;"),d=(0,a.default)("div",{target:"e1mpj5ji2"})({display:"flex",alignItems:"center",gap:"16px"},"label:DivLeftContainer;"),u=(0,a.default)("div",{target:"e1mpj5ji3"})({display:"flex",alignItems:"flex-start",gap:"24px"},"label:DivRightContainer;"),v=(0,a.default)("div",{target:"e1mpj5ji4"})({alignSelf:"center",lineHeight:"18px"},"label:DivContentWrapper;"),p=(0,a.default)("div",{target:"e1mpj5ji5"})({margin:"9px 0"},"label:DivButton;");var h,m,g,_,f,y,b,w,k,P;(m=h||(h={})).EXTERNAL="external",m.INTERNAL="internal",m.SUB_POPUP="sub_popup",(_=g||(g={})).POP="pop",_.PC_BANNER="pc_banner",_.MOBILE_BANNER="mobile_banner",_.WEBVIEW="webview",(y=f||(f={})).TEXT="text",y.LINK="link",y.BUTTON="button",(w=b||(b={})).LINK_INTERNAL="link_internal",w.LINK_EXTERNAL="link_external",w.SUB_POP_UP="sub_pop_up",w.UPDATE_CONSENT="update_consent",w.FETCH_CMPL_SETTING="fetch_cmpl_setting",w.UPGRADE="upgrade",(P=k||(k={})).FULLSCREEN="fullscreen",P.POP="pop",P.BOTTOM="bottom";class O{registerBlockCells(e,t){this._renderMapping[e]=t}cellByType(e){return this._renderMapping[e]}registerVisibility(e,t){this._visibilityMap[e]=t}close(e){this._visibilityMap[e](!1)}handleAction(e,t,i){if(null==i||i.onAction(e),e.dismiss&&(this.close(t.business),null==i||i.onDismiss()),e.actionType===b.LINK_EXTERNAL||e.actionType===b.LINK_INTERNAL){if(!(e.link&&e.link.length>0))return"Action: Link url invalid.";window.open(e.link,e.actionType===b.LINK_EXTERNAL?"_blank":"_self")}}constructor(){return this._renderMapping={},this._visibilityMap={},O._instance||(O._instance=this),O._instance}}var S,E=new O;class x{onDisplay(){var e,t;null===(t=this._customizedCallback)||void 0===t||null===(e=t.onDisplay)||void 0===e||e.call(t,this._meta),this._logger.onDisplay()}onDismiss(){var e,t;null===(t=this._customizedCallback)||void 0===t||null===(e=t.onDismiss)||void 0===e||e.call(t,this._meta),this._logger.onDismiss()}onAction(e){var t,i;null===(i=this._customizedCallback)||void 0===i||null===(t=i.onAction)||void 0===t||t.call(i,this._meta,e),this._logger.onAction(e)}onError(e){var t,i;null===(i=this._customizedCallback)||void 0===i||null===(t=i.onError)||void 0===t||t.call(i,this._meta,e),this._logger.onError(e)}constructor(e,t,i,n){this._meta=e,this._block=t,this._customizedCallback=n,this._logger=i}}(S||(S={})).INTERACT="interact";const T={interact:"pns_communication_service_popup_execute"};var A=new(i(88004).MonitorModule)(!0),C=i(31780);function j(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function L(e){for(var t=1;t{const{content:t,open:i,colorScheme:n,config:a,eventReport:m,meta:g,callback:_}=e;if(!i)return null;const y=(0,r.useMemo)((()=>new D(g,B,m)),[g,m]),b=(0,r.useMemo)((()=>new x(g,B,y,_)),[g,y,_]);(0,r.useEffect)((()=>{b.onDisplay()}),[]);const{buttons:w,icon:k,iconDark:P,body:O,title:S,eventInfo:T}=t,A=(0,r.useRef)(null),C=(0,r.useCallback)((e=>{var t;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),null===(t=A.current)||void 0===t||t.click())}),[]),j="dark"===n?P:k;var L,I;return(0,o.jsx)(l,{role:"alert",style:{top:null!==(L=null==a?void 0:a.topOffset)&&void 0!==L?L:"0",zIndex:null!==(I=null==a?void 0:a.zIndex)&&void 0!==I?I:999,backgroundColor:"var(--ui-sheet-backdrop-1)"},children:(0,o.jsxs)(c,{children:[(0,o.jsxs)(d,{children:[j&&(0,o.jsx)("img",{alt:"icon",src:j.url,height:j.height,width:j.width}),(0,o.jsxs)(v,{children:[S&&(0,o.jsx)(s.Fm,{as:"h4",size:15,color:"UIShapeText1OnNeutral",weight:"medium",children:S}),(0,o.jsx)(s.Fm,{as:"p",size:15,color:"UIShapeText1OnNeutral",children:null==O?void 0:O.map((e=>{return e.type===f.TEXT?e.text:(0,o.jsx)(s.QKx,{color:"UIShapeText1OnNeutral",label:e.text,href:null!==(t=e.link)&&void 0!==t?t:"",target:e.linkType===h.EXTERNAL?"_blank":"_self",onClick:t=>{var i;e.action?(t.preventDefault(),E.handleAction(e.action,g,b)):(null==m||m(le,V(F({},T),{button_info:e.text})),null===(i=e.onClick)||void 0===i||i.call(e))},weight:"medium"},e.text);var t}))})]})]}),(0,o.jsx)(u,{children:null==w?void 0:w.map((e=>e.isCloseStyle?(0,o.jsx)("div",{onClick:()=>{var t;e.action?E.handleAction(e.action,g,b):(null==m||m(le,V(F({},T),{button_info:e.text})),null===(t=e.onClick)||void 0===t||t.call(e))},onKeyDown:C,ref:A,tabIndex:0,role:"button",children:(0,o.jsx)(s.gn,{size:"24px",style:{cursor:"pointer"},color:"BrandTikTokBackground"})},e.text):(0,o.jsx)(p,{children:(0,o.jsx)(s.I05,{label:e.text,shape:"borderless",variant:"primary",onClick:()=>{var t;e.action?E.handleAction(e.action,g,b):(null==m||m(le,V(F({},T),{button_info:e.text})),null===(t=e.onClick)||void 0===t||t.call(e))}})},e.text)))})]})})},z=(0,a.default)("div",{target:"e1krb51j0"})((({theme:{colors:e}})=>({width:"100vw",left:"0",marginTop:"1px",position:"fixed",boxShadow:"0 2px 8px rgba(0, 0, 0, .06)",display:"flex",justifyContent:"center",":after":{content:'""',background:"rgba(33, 33, 33, .08)",position:"absolute",left:"0",bottom:"0",width:"100%",height:"1px",transform:"scaleY(0.5)"}})),"label:DivBannerContainer;"),H=(0,a.default)("div",{target:"e1krb51j1"})({width:1150,maxWidth:1150,padding:"16px 24px",display:"flex",justifyContent:"space-between",gap:"24px"},"label:DivBannerWrapper;"),Y=(0,a.default)("div",{target:"e1krb51j2"})({display:"flex",alignItems:"center",gap:"16px"},"label:DivLeftContainer;"),W=(0,a.default)("div",{target:"e1krb51j3"})([{display:"flex",alignItems:"center",gap:"24px"}],"label:DivRightContainer;"),$=(0,a.default)("div",{target:"e1krb51j4"})({alignSelf:"center"},"label:DivContentWrapper;"),G=(0,a.default)("div",{target:"e1krb51j5"})({margin:"9px 0"},"label:DivButton;");function K(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Z(e){for(var t=1;t{const{content:t,open:i,colorScheme:n,config:a,eventReport:l,meta:c,callback:d}=e;if(!i)return null;const u=(0,r.useMemo)((()=>new D(c,X,l)),[c,l]),v=(0,r.useMemo)((()=>new x(c,X,u,d)),[c,u,d]);(0,r.useEffect)((()=>{v.onDisplay()}),[]);const{buttons:p,icon:m,iconDark:g,body:_,title:y,eventInfo:b}=t,w=(0,r.useRef)(null),k=(0,r.useCallback)((e=>{var t;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),null===(t=w.current)||void 0===t||t.click())}),[]),P="dark"===n?g:m;var O,S;return(0,o.jsx)(z,{role:"alert",style:{top:null!==(O=null==a?void 0:a.topOffset)&&void 0!==O?O:"59px",zIndex:null!==(S=null==a?void 0:a.zIndex)&&void 0!==S?S:999,backgroundColor:"var(--brand-tiktok-background)"},children:(0,o.jsxs)(H,{children:[(0,o.jsxs)(Y,{children:[P&&(0,o.jsx)("img",{alt:"icon",src:P.url,height:P.height,width:P.width}),(0,o.jsxs)($,{children:[y&&(0,o.jsx)(s.Fm,{as:"h4",color:"UIText1",size:16,weight:"medium",children:y}),_&&(0,o.jsx)(s.Fm,{as:"p",size:16,weight:"medium",color:"UIText2",children:_.map((e=>{return e.type===f.TEXT?e.text:(0,o.jsx)(s.QKx,{color:"UIText1Display",label:e.text,href:null!==(t=e.link)&&void 0!==t?t:"",target:e.linkType===h.EXTERNAL?"_blank":"_self",onClick:t=>{var i;e.action?(t.preventDefault(),E.handleAction(e.action,c,v)):(null==l||l(le,J(Z({},b),{button_info:e.text})),null===(i=e.onClick)||void 0===i||i.call(e))},weight:"medium"},e.text);var t}))})]})]}),(0,o.jsx)(W,{children:null==p?void 0:p.map((e=>e.isCloseStyle?(0,o.jsx)("div",{onClick:()=>{var t;e.action?E.handleAction(e.action,c,v):(null==l||l(le,J(Z({},b),{button_info:e.text})),null===(t=e.onClick)||void 0===t||t.call(e))},onKeyDown:k,ref:w,tabIndex:0,role:"button",children:(0,o.jsx)(s.gn,{size:"24px",style:{cursor:"pointer"}})},e.text):(0,o.jsx)(G,{children:(0,o.jsx)(s.I05,{label:e.text,shape:"borderless",variant:"primary",onClick:()=>{var t;e.action?E.handleAction(e.action,c,v):(null==l||l(le,J(Z({},b),{button_info:e.text})),null===(t=e.onClick)||void 0===t||t.call(e))}})},e.text)))})]})})},ee=(0,a.default)("div",{target:"e140os950"})({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"8px",padding:"0 24px"},"label:ButtonContainer;"),te=(0,a.default)("img",{target:"e140os951"})({display:"block",margin:"8px auto"},"label:Img;");function ie(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ne(e){for(var t=1;t{var t;const{icon:i,iconDark:n,buttons:a,body:l,title:c,eventInfo:d}=e.content,{meta:u,callback:v,eventReport:p}=e,m="dark"===e.colorScheme?n:i,g=(0,r.useMemo)((()=>new D(u,re,p)),[u,p]),_=(0,r.useMemo)((()=>new x(u,re,g,v)),[u,g,v]);var y;return(0,r.useEffect)((()=>{_.onDisplay()}),[]),(0,o.jsxs)(s.nOL,{open:e.open,onOpenChange:()=>{},style:{padding:"32px 0",zIndex:null!==(y=null===(t=e.config)||void 0===t?void 0:t.zIndex)&&void 0!==y?y:9999},children:[m&&(0,o.jsx)(te,{src:m.url,height:m.height,width:m.width}),c&&(0,o.jsx)(s.Fm,{as:"h2",align:"center",size:20,weight:"bold",style:{wordBreak:"break-word",lineHeight:"24px",padding:"0 20px"},children:c}),(null==l?void 0:l.length)&&(0,o.jsx)(s.Fm,{as:"p",size:15,align:"center",style:{lineHeight:"18px",padding:"7px 24px 24px",whiteSpace:"pre-wrap"},children:l.map((t=>{return t.type===f.TEXT?t.text:(0,o.jsx)(s.QKx,{color:"UIText1Display",weight:"medium",label:t.text,href:null!==(i=t.link)&&void 0!==i?i:"",target:t.linkType===h.EXTERNAL?"_blank":"_self",onClick:i=>{var n,o;t.action?(i.preventDefault(),E.handleAction(t.action,u,_)):(null===(n=e.eventReport)||void 0===n||n.call(e,le,oe(ne({},d),{button_info:t.text})),null===(o=t.onClick)||void 0===o||o.call(t))}},t.text);var i}))}),(null==a?void 0:a.length)&&(0,o.jsx)(ee,{children:a.map((t=>(0,o.jsx)(s.I05,{style:t.isBold?{fontWeight:"bold"}:{},label:t.text,variant:t.isHighlight?"primary":"secondary",onClick:()=>{var i,n;t.action?E.handleAction(t.action,u,_):(null===(i=e.eventReport)||void 0===i||i.call(e,le,oe(ne({},d),{button_info:t.text})),null===(n=t.onClick)||void 0===n||n.call(t))}},t.text)))})]})};var ae=i(28658);const le="qa_tns_general_dialog_click";function ce(){return(0,o.jsx)("link",{rel:"stylesheet",href:ae})}const de=e=>{const[t,i]=(0,r.useState)(null),{eventReport:a,noFetchDataAtInit:l,SDKConfig:c,visible:d,onReadyToClose:u,onReadyToShow:v,colorScheme:p,textDirection:h,componentConfig:m}=e;if((0,r.useEffect)((()=>(n.default.init(c),l||n.default.fetchPopupData().catch(null),n.default.addEventListener(n.LifeCycleEventName.popupDataReady,(()=>{n.default.getPopupData()&&(i(n.default.getPopupData()),v())})),n.default.addEventListener(n.LifeCycleEventName.afterNavigateToNextPopup,(()=>{i(n.default.getPopupData())})),n.default.addEventListener(n.LifeCycleEventName.allPopupsCompleted,(()=>{u()})),()=>{n.default.destruct()})),[]),(0,r.useEffect)((()=>{d&&t&&a&&a("tns_general_dialog_show",t.eventInfo)}),[d]),!t)return null;const g={business:"",popup_id:"",policyVersion:""},{popupType:_}=t,f=function(e,t){if(null==e)return{};var i,n,o=function(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}(t,["popupType"]);let y;switch(_){case n.PopupType.MOBILE_BANNER:y=(0,o.jsx)(q,{colorScheme:p,content:f,open:d,config:null==m?void 0:m.mBanner,meta:g,eventReport:a});break;case n.PopupType.PC_BANNER:y=(0,o.jsx)(Q,{colorScheme:p,content:f,open:d,config:null==m?void 0:m.pcBanner,meta:g,eventReport:a});break;case n.PopupType.POP:default:y=(0,o.jsx)(se,{colorScheme:p,content:f,open:d,config:null==m?void 0:m.popup,meta:g,eventReport:a})}return(0,o.jsxs)(s.juU,{colorSchemePreference:p,textDirection:h,children:[(0,o.jsx)(ce,{}),y]})},ue=(0,a.default)("div",{target:"euhfx3x0"})((({theme:e})=>({width:"100vw",height:"100vh",overflow:"auto",padding:"32px 16px",zIndex:"9999",position:"fixed",top:0,left:0})),"label:FullScreenView;"),ve=(0,a.default)("div",{target:"euhfx3x1"})({display:"flex",flexDirection:"column"},"label:ContainerView;"),pe=(0,a.default)("div",{target:"euhfx3x2"})({padding:0,width:"100%"},"label:TopContainerView;"),he=(0,a.default)("div",{target:"euhfx3x3"})({padding:0,alignSelf:"flex-end",width:"100%"},"label:BottomContainerView;"),me=(0,a.default)("div",{target:"euhfx3x4"})({flexGrow:1,overflowY:"auto",padding:0},"label:ScrolledContainerView;"),ge=(0,a.default)("div",{target:"euhfx3x5"})({display:"flex",gap:"16px"},"label:ButtonGroup;"),_e=(0,a.default)("div",{target:"euhfx3x6"})({flex:1},"label:ButtonItem;"),fe={subtext:"UIText2",description:"UIText3"},ye={center:"center",right:"end"},be={"H1-Regular":{size:24,weight:"normal"},"H1-Medium":{size:24,weight:"medium"},"H1-Bold":{size:24,weight:"bold"},"H2-Regular":{size:20,weight:"normal"},"H2-Medium":{size:20,weight:"medium"},"H2-Bold":{size:20,weight:"bold"},"H3-Regular":{size:17,weight:"normal"},"H3-Medium":{size:17,weight:"medium"},"H3-Bold":{size:17,weight:"bold"},"H4-Regular":{size:15,weight:"normal"},"H4-Medium":{size:15,weight:"medium"},"H4-Bold":{size:15,weight:"bold"},"P1-Regular":{size:14,weight:"normal"},"P1-Medium":{size:14,weight:"medium"},"P1-Bold":{size:14,weight:"bold"},"P2-Regular":{size:13,weight:"normal"},"P2-Medium":{size:13,weight:"medium"},"P2-Bold":{size:13,weight:"bold"},"P3-Regular":{size:12,weight:"normal"},"P3-Medium":{size:12,weight:"medium"},"P3-Bold":{size:12,weight:"bold"},"SmallText1-Regular":{size:11,weight:"normal"},"SmallText1-Medium":{size:11,weight:"medium"},"SmallText1-Bold":{size:11,weight:"bold"},"SmallText2-Regular":{size:10,weight:"normal"},"SmallText2-Medium":{size:10,weight:"medium"},"SmallText2-Bold":{size:10,weight:"bold"},"Headline-Regular":{size:16,weight:"normal"},"Headline-Medium":{size:16,weight:"medium"},"Headline-Bold":{size:16,weight:"bold"},"Longform-Regular":{size:16,weight:"normal"},"Longform-Medium":{size:16,weight:"medium"},"Longform-Bold":{size:16,weight:"bold"},"LargeTitle-Regular":{size:32,weight:"normal"},"LargeTitle-Medium":{size:32,weight:"medium"},"LargeTitle-Bold":{size:32,weight:"bold"}},we=e=>{const{meta:t,content:i,callback:n}=e;var a;const l=null!==(a=fe[i.subtype])&&void 0!==a?a:"UIText1";var c,d;const u=null!==(d=be[null!==(c=i.font)&&void 0!==c?c:"P2-REGULAR"])&&void 0!==d?d:{size:13,weight:"normal"};var v,p;const h=null!==(p=ye[null!==(v=i.align)&&void 0!==v?v:"left"])&&void 0!==p?p:"start",m=(0,r.useMemo)((()=>function(e){const t=e.bodyLinks;if(!e.text||0===e.text.length)throw new Error("TextBlock content is empty.");if(!t||0===t.length)return[{type:"text",name:e.text}];const i=[],n=/%s/g,o=e.text;let r=0;return t.forEach((({name:e,action:t})=>{const s=n.exec(o);if(!s)throw new Error("TextBlock link text can not match.");i.push({type:"text",name:o.slice(r,s.index)});const a={type:"link",name:e,action:t};i.push(a),r=Number(s.index)+s[0].length})),i.push({type:"text",name:o.slice(r)}),i}(i)),[i,n]),g=(0,r.useCallback)((e=>{if(e.action){const i=E.handleAction(e.action,t,n);i&&n.onError(i)}else n.onError("TextBlock link action is empty.")}),[n,t]);return(0,o.jsx)(s.Fm,{align:h,size:u.size,color:l,weight:u.weight,as:"div",children:m.length>0?m.map(((e,t)=>"text"===e.type?e.name:(0,o.jsx)(s.QKx,{color:"UIText1Display",weight:"medium",label:e.name,href:"",target:"_blank",onClick:t=>{t.preventDefault(),g(e)}},t))):""})},ke={primary:"primary",secondary:"secondary",borderless:"secondary",destructive:"primary"},Pe={primary:"default",secondary:"default",borderless:"borderless",destructive:"borderless"},Oe=e=>{const{meta:t,buttonElement:i,callback:n}=e,a=i.action;var l;const c=null!==(l=i.text)&&void 0!==l?l:"";if(!a)throw new Error("ButtonBlock no action found.");if(!c.length)throw new Error("ButtonBlock title is empty.");const d=i.subtype;var u;const v=null!==(u=ke[d])&&void 0!==u?u:"primary";var p;const h=null!==(p=Pe[d])&&void 0!==p?p:"default",m=(0,r.useCallback)((()=>{const e=E.handleAction(a,t,n);e&&n.onError(e)}),[n,t,a]);var g;return(0,o.jsx)(s.I05,{label:c,variant:v,shape:h,style:{width:"100%"},onClick:m},null!==(g=i.groupId)&&void 0!==g?g:"")};E.registerBlockCells("info",(e=>{var t;const{colorScheme:i,meta:n,block:r,callback:s}=e,a=null===(t=r.elements)||void 0===t?void 0:t.get("content");if(!a)throw new Error("InfoBlock content is empty.");const l="dark"===i?a.iconUrlDark:a.iconUrl;var c;const d=null!==(c=a.iconStyle)&&void 0!==c?c:124,u=a.subtype;return["text","subtext","description"].includes(u)?(0,o.jsx)(we,{meta:n,content:a,callback:s}):"divider"===u?(0,o.jsx)("hr",{}):"image"===u?(0,o.jsx)("div",{style:{display:"flex",alignItems:"center",padding:0},children:(0,o.jsx)("img",{src:l,height:d,width:"100%"})}):null})),E.registerBlockCells("action",(e=>{const{meta:t,block:i,callback:n}=e,r=Array.from(i.elements||new Map);if(!r.some((([e])=>["action_right","action_center","action_left"].includes(e))))throw new Error("ActionBlock no button found.");return(0,o.jsx)(ge,{children:r.map((([e,i])=>(0,o.jsx)(_e,{children:(0,o.jsx)(Oe,{meta:t,buttonElement:i,callback:n})},e)))})}));const Se=e=>{const{position:t,colorScheme:i,meta:n,blocks:r,callback:s}=e,a={top:pe,middle:me,bottom:he}[t];return(0,o.jsx)(a,{children:r.map(((e,t)=>{const r=E.cellByType(e.type);if(!r)throw new Error(`No block cell registered for type: ${e.type}`);const a=e.format;var l,c,d,u;const v=`${null!==(l=a.paddingTop)&&void 0!==l?l:0}px ${null!==(c=a.paddingRight)&&void 0!==c?c:0}px \n ${null!==(d=a.paddingBottom)&&void 0!==d?d:0}px ${null!==(u=a.paddingLeft)&&void 0!==u?u:0}px`;var p,h,m,g;const _=`${null!==(p=a.marginTop)&&void 0!==p?p:0}px ${null!==(h=a.marginRight)&&void 0!==h?h:0}px \n ${null!==(m=a.marginBottom)&&void 0!==m?m:0}px ${null!==(g=a.marginLeft)&&void 0!==g?g:0}px`;return(0,o.jsx)("div",{style:{padding:v,margin:_},children:(0,o.jsx)(r,{colorScheme:i,meta:n,block:e,callback:s})},t)}))})},Ee=e=>{const{blockData:t,metaData:i}=e;if("dialog"===t.style)return null;const n=(0,r.useCallback)((()=>{E.close(i.business)}),[]),a=t.upperLeftBack?(0,o.jsx)(s.PH3,{icon:(0,o.jsx)(s.WZi,{}),onClick:n}):null,l=t.upperLeftBack?(0,o.jsx)(s.PH3,{icon:(0,o.jsx)(s.gn,{}),onClick:n}):null;return(0,o.jsx)(s.Gil,{title:"",hideSeparator:!0,leading:a,style:{},trailing:l,hideBackground:!0})},xe=e=>{const{colorScheme:t,metaData:i,blockData:n,blockCallback:a}=e,l=n.style===k.FULLSCREEN?"100vh":"80vh",c=n.style===k.FULLSCREEN?"100%":"",d=n.style;(0,r.useEffect)((()=>{a.onDisplay()}),[]);const u=(0,o.jsxs)(ve,{style:{maxHeight:l,height:c},children:[(0,o.jsx)(Ee,{metaData:i,blockData:n,callback:a}),(0,o.jsx)(Se,{position:"top",colorScheme:t,meta:i,blocks:n.topPinnedBlocks,callback:a}),(0,o.jsx)(Se,{position:"middle",colorScheme:t,meta:i,blocks:n.blocks,callback:a}),(0,o.jsx)(Se,{position:"bottom",colorScheme:t,meta:i,blocks:n.bottomPinnedBlocks,callback:a})]});return(()=>{switch(d){case k.BOTTOM:return(0,o.jsx)(s.jdl,{open:!0,onOpenChange:()=>{},style:{padding:"32px 16px",zIndex:9999},children:u});case k.FULLSCREEN:return(0,o.jsx)(ue,{style:{visibility:"visible",backgroundColor:"var(--brand-tiktok-background)"},children:u});case k.POP:default:return(0,o.jsx)(s.nOL,{open:!0,onOpenChange:()=>{},style:{padding:"32px 16px",zIndex:9999},children:u})}})()},Te=e=>{const{eventReport:t,colorScheme:i,blockData:n,metaData:s,callback:a}=e,l=(0,r.useMemo)((()=>new D(s,n,t)),[s,n,t]),c=(0,r.useMemo)((()=>new x(s,n,l,a)),[s,n,l,a]);return(0,o.jsx)(C.tH,{shouldReport:!1,onError:e=>c.onError(e.toString()),children:(0,o.jsx)(xe,{colorScheme:i,metaData:s,blockData:n,blockCallback:c})})};function Ae(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ce(e){for(var t=1;t((0,r.useMemo)((()=>{var i,n,o;A.init(Ce({teaEventNameFormatter:e=>T[e]},e),(n=Ce({bid:null!==(i=null==t?void 0:t.bid)&&void 0!==i?i:"pns_communication_service",version:"1.0.0",appId:1988},t),o=null!=(o={region:null==t?void 0:t.deploymentRegion})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t}(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})),n))}),[]),(0,o.jsx)(C.V7,{cujName:S.INTERACT,children:i}));function Le(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){for(var t=1;t{const{pnsPopupConfig:t,eventReport:i,colorScheme:n,textDirection:a}=e;return(0,r.useEffect)((()=>{null==i||i("pns_web_popup_request",{type:"popup"})}),[]),t.blockData?(0,o.jsxs)(s.juU,{colorSchemePreference:n,textDirection:a,children:[(0,o.jsx)(Ne,{}),(0,o.jsx)(Te,{eventReport:i,colorScheme:n,blockData:t.blockData,metaData:t.metaData,callback:t.callback})]}):null},Re=e=>{const{pnsPopupConfig:t,eventReport:i,colorScheme:n,textDirection:a,componentConfig:l}=e;let c,d=null,u=null;var v;if(t.popupData)switch(u=function(e,t){if(null==e)return{};var i,n,o=function(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}(v=t.popupData,["popupType"]),({popupType:c}=v),c){case g.MOBILE_BANNER:d=(0,o.jsx)(q,{colorScheme:n,content:u,open:!0,config:null==l?void 0:l.mBanner,meta:t.metaData,eventReport:i,callback:t.callback});break;case g.PC_BANNER:d=(0,o.jsx)(Q,{colorScheme:n,content:u,open:!0,config:null==l?void 0:l.pcBanner,meta:t.metaData,eventReport:i,callback:t.callback});break;case g.POP:default:d=(0,o.jsx)(se,{colorScheme:n,content:u,open:!0,config:null==l?void 0:l.popup,meta:t.metaData,eventReport:i,callback:t.callback})}return(0,r.useEffect)((()=>{null==i||i("pns_web_popup_request",{type:c})}),[]),(0,o.jsxs)(s.juU,{colorSchemePreference:n,textDirection:a,children:[(0,o.jsx)(Ne,{}),d]})},De=e=>{const{pnsPopupConfig:t}=e,[i,n]=(0,r.useState)(!0);if((0,r.useEffect)((()=>{E.registerVisibility(t.metaData.business,n)}),[]),!i)return null;let s=null;return t.blockData&&(s=(0,o.jsx)(Me,Ie({},e))),t.popupData&&(s=(0,o.jsx)(Re,Ie({},e))),s},Ue=e=>(0,o.jsx)(je,{monitorConfig:e.monitorConfig,children:(0,o.jsx)(De,Ie({},e))}),Fe=n.default.fetchPopupData},84448:(e,t,i)=>{var n,o,r,s,a,l,c,d,u,v;i.d(t,{LifeCycleEventName:()=>f,POPUP_API_V1:()=>h,PopupType:()=>n,default:()=>ee}),(o=n||(n={})).POP="pop",o.PC_BANNER="pc_banner",o.MOBILE_BANNER="mobile_banner",o.WEBVIEW="webview",(s=r||(r={})).V1="v1",s.V2="v2",s.CUSTOMIZED="customized",(l=a||(a={})).TEXT="text",l.LINK="link",l.BUTTON="button",(d=c||(c={})).EXTERNAL="external",d.INTERNAL="internal",d.SUB_POPUP="sub_popup",(v=u||(u={})).INFO="info",v.WARN="warn",v.ERROR="error";const p="/tiktok/popup/dispatch/v1",h="/api/policy/notice/",m=p,g="/tiktok/popup/callback/v1",_=g;var f,y;(y=f||(f={})).initError="initError",y.beforeFetchData="beforeFetchData",y.afterFetchData="afterFetchData",y.fetchDataError="fetchDataError",y.popupDataReady="popupDataReady",y.processDataError="processDataError",y.beforeSendCallback="beforeSendCallback",y.afterSendCallback="afterSendCallback",y.sendCallbackError="sendCallbackError",y.beforeNavigateToNextPopup="beforeNavigateToNextPopup",y.afterNavigateToNextPopup="afterNavigateToNextPopup",y.allPopupsCompleted="allPopupsCompleted",y.beforeDestruct="beforeDestruct";var b,w,k,P,O,S,E,x,T,A,C,j,L=i(88004);function I(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function N(e){for(var t=1;t{var v;const p=s.exec(d);if(!p)return;const h=N({type:(null==i?void 0:i.link)?a.LINK:a.BUTTON,text:t},(null==i?void 0:i.link)&&{link:V({link:i.link,lang:e}),linkType:i.link_type===O.LINK_TYPE_ENUM_EXTERNAL?c.EXTERNAL:c.INTERNAL},(null==i||null===(v=i.actions)||void 0===v?void 0:v.includes(T.ACTION_TYPE_ENUM_CALLBACK))&&{callback:r(n,o,i,!1)});l.push({type:a.TEXT,text:d.slice(u,p.index)}),l.push(h),u=Number(p.index)+p[0].length})),l.push({type:a.TEXT,text:d.slice(u)}),l}function D({rawButtons:e,popupMeta:t,style:i,callback:n}){if(!e)return;const o=[];return e.forEach((({text:e,is_bold:r,is_highlight:s,action:a})=>{const l={text:e,isBold:Boolean(r),isHighlight:Boolean(s),callback:n(t,i,a,!0)};o.push(l)})),o}function U(e){switch(e){case k.POPUP_STYLE_ENUM_PC_BANNER:return n.PC_BANNER;case k.POPUP_STYLE_ENUM_MOBILE_BANNER:return n.MOBILE_BANNER;case k.POPUP_STYLE_ENUM_WEBVIEW:return n.WEBVIEW;case k.POPUP_STYLE_ENUM_POP:default:return n.POP}}(w=b||(b={})).CALLBACK="callback",w.H5="h5",(P=k||(k={}))[P.POPUP_STYLE_ENUM_BOTTOM=0]="POPUP_STYLE_ENUM_BOTTOM",P[P.POPUP_STYLE_ENUM_POP=1]="POPUP_STYLE_ENUM_POP",P[P.POPUP_STYLE_ENUM_FULLSCREEN=2]="POPUP_STYLE_ENUM_FULLSCREEN",P[P.POPUP_STYLE_ENUM_WEBVIEW=3]="POPUP_STYLE_ENUM_WEBVIEW",P[P.POPUP_STYLE_ENUM_PC_BANNER=4]="POPUP_STYLE_ENUM_PC_BANNER",P[P.POPUP_STYLE_ENUM_MOBILE_BANNER=5]="POPUP_STYLE_ENUM_MOBILE_BANNER",(S=O||(O={}))[S.LINK_TYPE_ENUM_INTERNAL=0]="LINK_TYPE_ENUM_INTERNAL",S[S.LINK_TYPE_ENUM_EXTERNAL=1]="LINK_TYPE_ENUM_EXTERNAL",S[S.LINK_TYPE_ENUM_SUB_POPUP=2]="LINK_TYPE_ENUM_SUB_POPUP",S[S.LINK_TYPE_UPGRADE=3]="LINK_TYPE_UPGRADE",(x=E||(E={}))[x.POPUP_OPERATION_ENUM_LEGACY_0=0]="POPUP_OPERATION_ENUM_LEGACY_0",x[x.POPUP_OPERATION_ENUM_LEGACY_1=1]="POPUP_OPERATION_ENUM_LEGACY_1",x[x.POPUP_OPERATION_ENUM_LEGACY_2=2]="POPUP_OPERATION_ENUM_LEGACY_2",x[x.POPUP_OPERATION_ENUM_LEGACY_3=3]="POPUP_OPERATION_ENUM_LEGACY_3",x[x.POPUP_OPERATION_ENUM_LEGACY_4_AGREE=4]="POPUP_OPERATION_ENUM_LEGACY_4_AGREE",x[x.POPUP_OPERATION_ENUM_LEGACY_5_REMIND_ME_LATER=5]="POPUP_OPERATION_ENUM_LEGACY_5_REMIND_ME_LATER",x[x.POPUP_OPERATION_ENUM_LEGACY_7_LEARN_MORE=6]="POPUP_OPERATION_ENUM_LEGACY_7_LEARN_MORE",x[x.POPUP_OPERATION_ENUM_LEGACY_8_CONFIRM=7]="POPUP_OPERATION_ENUM_LEGACY_8_CONFIRM",x[x.POPUP_OPERATION_ENUM_LEGACY_9_NOT_NOW=8]="POPUP_OPERATION_ENUM_LEGACY_9_NOT_NOW",x[x.POPUP_OPERATION_ENUM_LEGACY_10_DOWNLOAD_YOUR_DATA=9]="POPUP_OPERATION_ENUM_LEGACY_10_DOWNLOAD_YOUR_DATA",x[x.POPUP_OPERATION_ENUM_LEGACY_11_SUBMIT_APPEAL=10]="POPUP_OPERATION_ENUM_LEGACY_11_SUBMIT_APPEAL",x[x.POPUP_OPERATION_ENUM_LEGACY_20_DOWNLOAD_YOUR_DATA=11]="POPUP_OPERATION_ENUM_LEGACY_20_DOWNLOAD_YOUR_DATA",x[x.POPUP_OPERATION_ENUM_LEGACY_100_GOT_IT=12]="POPUP_OPERATION_ENUM_LEGACY_100_GOT_IT",x[x.POPUP_OPERATION_ENUM_LEGACY_101_LEARN_MORE=13]="POPUP_OPERATION_ENUM_LEGACY_101_LEARN_MORE",x[x.POPUP_OPERATION_ENUM_LEGACY_200_LEARN_MORE=14]="POPUP_OPERATION_ENUM_LEGACY_200_LEARN_MORE",(A=T||(T={}))[A.ACTION_TYPE_ENUM_CALLBACK=0]="ACTION_TYPE_ENUM_CALLBACK",A[A.ACTION_TYPE_ENUM_UPDATE_CONSENT=1]="ACTION_TYPE_ENUM_UPDATE_CONSENT",A[A.ACTION_TYPE_ENUM_FETCH_COMPLIANCE_SETTING=2]="ACTION_TYPE_ENUM_FETCH_COMPLIANCE_SETTING",(j=C||(C={}))[j.POPUP_CALLBACK_TYPE_ENUM_UNKNOWN=0]="POPUP_CALLBACK_TYPE_ENUM_UNKNOWN",j[j.POPUP_CALLBACK_TYPE_ENUM_USER_ID=1]="POPUP_CALLBACK_TYPE_ENUM_USER_ID",j[j.POPUP_CALLBACK_TYPE_ENUM_DEVICE_ID=2]="POPUP_CALLBACK_TYPE_ENUM_DEVICE_ID";const F="${locale}";function V({link:e,lang:t}){return e.replace(F,t)}function B({lang:e,body:t,bodyLinks:i,popupMeta:n,callback:o}){if(!t)return;if(!i||0===i.length)return[{type:a.TEXT,text:t}];const r=[],s=t;let l=0;const d=/%s/g;return i.forEach((({name:t,link:i="",operation:u,dismiss:v,approve:p,new_web_tab:h,extra:m,link_type:g})=>{const _=d.exec(s);if(!_)return;const f=V({link:i,lang:e}),y=Boolean(p||v),w=g===b.CALLBACK||p,k={type:i?a.LINK:a.BUTTON,text:t,link:f,linkType:h?c.EXTERNAL:c.INTERNAL,onClick:o(y,!!w,M(N({},n),{extra:m,operation:null==u?void 0:u.toString()}))};r.push({type:a.TEXT,text:s.slice(l,_.index)}),r.push(k),l=Number(_.index)+_[0].length})),r.push({type:a.TEXT,text:s.slice(l)}),r}function q({lang:e,first_button_highlight:t,rawButtons:i,popupMeta:n,callback:o}){if(0===i.length)return;const r=[];return i.forEach((({text:i,is_bold:s,link_type:a,link:l,extra:d,approve:u,operation:v,dismiss:p,dismiss_all:h,new_web_tab:m,is_close_style:g},_)=>{const f=Boolean(u||p||h),y=a===b.CALLBACK||u,w={text:i,isCloseStyle:g,isBold:Boolean(s),isHighlight:0===_&&t,link:l?V({link:l,lang:e}):void 0,linkType:m?c.EXTERNAL:c.INTERNAL,onClick:o(f,!!y,M(N({},n),{extra:d,operation:null==v?void 0:v.toString()}),l?{link:V({link:l,lang:e}),linkType:m?c.EXTERNAL:c.INTERNAL}:void 0)};r.push(w)})),r}function z(e){if(e)return{url:e,width:"auto",height:"48px"}}function H(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function Y(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class W{init(e,t){L.LoggingModule.info("[PopupModule]: init",e),this._lang=e.lang,this._popupApi=e.apiPath||m,this._callbackApi=e.callbackApiPath||_,this._scene=e.scene||0,this._dataProcessor=e.dataProcessor||r.V2,this._customizedProcessor=e.customizeDataProcessor,this._navigateToNextPopup=t.navigateToNextPopup,this._completeAllPopups=t.completeAllPopups,this._beforeSendCallback=t.beforeSendCallback,this._afterSendCallback=t.afterSendCallback,this._adjustAPIConfig()}_adjustAPIConfig(){this._popupApi===p?(this._callbackApi=g,this._dataProcessor=r.V2):this._popupApi===h&&(this._callbackApi="/api/policy/notice/approve/",this._dataProcessor=r.V1)}fetch(e){return L.LoggingModule.info("[PopupModule]: fetch ",this._popupApi),L.ServiceModule.sendRequest(this._popupApi,"GET",function(e){for(var t=1;t{if(!e)return;const t={business:e.business,policy_version:e.policy_version,style:e.style,scene:this._scene},i={eventInfo:{style:e.style,business:e.business},popupType:e.style,title:e.title,icon:z(e.icon_url),iconDark:z(e.icon_url_dark),body:B({lang:this._lang,body:e.body,bodyLinks:e.body_link_list,popupMeta:t,callback:this.callbackFunctionV1}),buttons:q({lang:this._lang,first_button_highlight:Boolean(e.first_button_highlight),rawButtons:e.actions||[],popupMeta:t,callback:this.callbackFunctionV1})};n.push(i)})),n}_processV2Data(e){const t="string"==typeof e?JSON.parse(e):e;return L.LoggingModule.info("[PopupModule]: process V2 response",t),t.popup_responses.map((e=>{const t=e.popup_ui,i=e.popup_meta;return{eventInfo:{style:t.style,business:i.business},popupType:U(t.style),icon:z(t.icon_url),iconDark:z(t.icon_url_dark),title:t.title,buttons:D({rawButtons:t.buttons,popupMeta:i,style:t.style,callback:this.callbackFunctionV2}),body:R({lang:this._lang,body:t.body,bodyLinks:t.body_links,popupMeta:e.popup_meta,style:t.style,callback:this.callbackFunctionV2})}}))}_processCustomizedData(e){if(L.LoggingModule.info("[PopupModule]: process customized response"),!e||!this._customizedProcessor)return[];try{return this._customizedProcessor(e)}catch(e){L.LoggingModule.error("[PopupModule]: process customized response fail",e)}return[]}destruct(){L.LoggingModule.info("[PopupModule]: destruct")}constructor(){this.callbackFunctionV1=(e,t,i,n)=>()=>{t&&this._sendCallback(i).then((()=>{L.LoggingModule.info("[PopupModule]: send callback finished")})).catch((e=>{L.LoggingModule.error("[PopupModule]: send callback fail",e)})),n&&(n.linkType===c.EXTERNAL?window.open(n.link):window.location.href=n.link),e&&this._navigateToNextPopup()},this.callbackFunctionV2=(e,t,i,n)=>()=>{if((null==i?void 0:i.actions)&&i.actions.includes(T.ACTION_TYPE_ENUM_CALLBACK)&&this._sendCallback({business:e.business,version:e.version,style:t,extra:i.extra,operation:i.operation}).then((()=>{L.LoggingModule.info("[PopupModule]: send callback finished")})).catch((e=>{L.LoggingModule.error("[PopupModule]: send callback fail",e)})),n&&(null==i?void 0:i.link)){const e=V({link:i.link,lang:this._lang});i.link_type===O.LINK_TYPE_ENUM_EXTERNAL?window.open(e):window.location.href=e}(null==i?void 0:i.dismiss_all)?this._completeAllPopups():(null==i?void 0:i.dismiss)&&this._navigateToNextPopup()};var e,t,i=this;return this._sendCallback=(e=function*(e){i._beforeSendCallback();try{const t="object"==typeof e?new URLSearchParams(e):e;yield L.ServiceModule.sendRequest(i._callbackApi,"POST",t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),i._afterSendCallback(!0)}catch(e){i._afterSendCallback(!1,e)}},t=function(){var t=this,i=arguments;return new Promise((function(n,o){var r=e.apply(t,i);function s(e){H(r,n,o,s,a,"next",e)}function a(e){H(r,n,o,s,a,"throw",e)}s(void 0)}))},function(e){return t.apply(this,arguments)}),W._instance||(W._instance=this),W._instance}}var $=new W;class G{init(e){L.LoggingModule.info("[LifeCycleModule]: init"),L.LoggingModule.info("[LifeCycleModule]: init Popup module"),$.init(e,{navigateToNextPopup:this.navigateToNextPopup,completeAllPopups:this.completeAllPopups,beforeSendCallback:this.beforeSendCallback,afterSendCallback:this.afterSendCallback}),this._currentEvent=new Set}addEventListener(e,t){L.LoggingModule.info("[LifeCycleModule]: add event listener to ",e);const i=this._eventListeners.get(e)||[];this._eventListeners.set(e,[...i,t])}removeEventListener(e,t){L.LoggingModule.info("[LifeCycleModule]: remove event listener from ",e);const i=this._eventListeners.get(e);if(!i)return;const n=i.filter((e=>e!==t));this._eventListeners.set(e,n)}removeAllEventListeners(e){L.LoggingModule.info("[LifeCycleModule]: remove all event listeners from ",e),this._eventListeners.set(e,[])}fetchPopupData(e){return L.LoggingModule.info("[LifeCycleModule]: fetch popup data"),this.dispatchEvent(f.beforeFetchData),$.fetch(e).then((e=>{this.dispatchEvent(f.afterFetchData),L.LoggingModule.info("[LifeCycleModule]: fetch popup data done, start processing response"),this.processData(e)})).catch((e=>{L.LoggingModule.error("[LifeCycleModule]: fetch failure - ",e),this.dispatchEvent(f.fetchDataError)}))}processData(e){try{const t=$.processData(e);(null==t?void 0:t.length)?(L.LoggingModule.info("[LifeCycleModule]: process response done, popup data ready"),this._currentPopupIndex=0,this._popupData=t,this.dispatchEvent(f.popupDataReady)):L.LoggingModule.info("[LifeCycleModule]: process popup response done, no popup data")}catch(e){L.LoggingModule.error("[LifeCycleModule]: process popup response error - ",e)}}hasPopupData(){return L.LoggingModule.info("[LifeCycleModule]: has popup data"),this._popupData.length>0}getAllPopupData(){return L.LoggingModule.info("[LifeCycleModule]: get all popup data"),this._popupData}getCurrentPopupData(){return L.LoggingModule.info("[LifeCycleModule]: get current popup data"),this._popupData[this._currentPopupIndex]}hasNextPopup(){L.LoggingModule.info("[LifeCycleModule]: has next popup");const e=this._popupData.length,t=this._currentPopupIndex+1;return 0!==this._popupData.length&&t{if(L.LoggingModule.info("[LifeCycleModule]: dispatch start - ",e),this._currentEvent.has(e))return void L.LoggingModule.error("[LifeCycleModule]: Dispatch is already in process",{currentEvent:[...this._currentEvent],upcomingEvent:e});this._currentEvent.add(e);const t=this._eventListeners.get(e);t&&t.forEach((t=>{try{t()}catch(t){L.LoggingModule.warn(`[LifeCycleModule]: error executing listener for event: ${e}`,t)}})),this._currentEvent.delete(e),L.LoggingModule.info("[LifeCycleModule]: dispatch finish - ",e)},this.beforeSendCallback=()=>{L.LoggingModule.info("[LifeCycleModule]: before sendCallback"),this.dispatchEvent(f.beforeSendCallback)},this.afterSendCallback=(e,t)=>{e?(L.LoggingModule.info("[LifeCycleModule]: after sendCallback"),this.dispatchEvent(f.afterSendCallback)):(L.LoggingModule.error("[LifeCycleModule]: send callback failure",t),this.dispatchEvent(f.sendCallbackError))},this.navigateToNextPopup=()=>{L.LoggingModule.info("[LifeCycleModule]: navigate to next popup"),this._currentPopupIndex+1{L.LoggingModule.info("[LifeCycleModule]: complete all popup"),this._currentPopupIndex=this._popupData.length},G._instance||(G._instance=this),G._instance}}var K=new G;function Z(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function J(e){for(var t=1;t{i.d(t,{X:()=>s});var n=i(39858),o=i.n(n),r=i(97208);const s=o()((()=>{if((0,r.fU)())return!1;const e=window.navigator.userAgent;if(!/iPad|iPhone|iPod/.test(e))return!!(null===window||void 0===window?void 0:window.MediaSource)&&((null===window||void 0===window?void 0:window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"'))||(null===window||void 0===window?void 0:window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"'))||(null===window||void 0===window?void 0:window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"'))||(null===window||void 0===window?void 0:window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"')));try{const e=document.createElement("video");return[e.canPlayType('video/mp4; codecs="hvc1.1.L0.0"'),e.canPlayType('video/mp4;codecs="hev1.1.6.L120.90"'),e.canPlayType('video/mp4;codecs="hev1.2.4.L120.90"'),e.canPlayType('video/mp4;codecs="hev1.3.E.L120.90"'),e.canPlayType('video/mp4;codecs="hev1.4.10.L120.90"')].some((e=>"probably"===e||"maybe"===e))}catch(e){return!1}}))},67353:(e,t,i)=>{i.d(t,{AX:()=>m,y8:()=>g,hd:()=>h,p$:()=>v,bt:()=>p});var n=i(44137),o=i(58935),r=i(28334);i(40099),new o.Vb;const s=new r.A;var a,l=i(57206),c=i(97208);const d=()=>s.shouldUseHEVC,u={isSupportBase:null!==(a=d())&&void 0!==a&&a,isHevcSupportRobustness:"unknown",date:new Date};let v={isSupportBase:(0,n.X)()?1:0,isHevcSupportRobustness:"unKnown",project:"unkowon"};const p=new class{constructor(){this.canPlayHevc=!1,this.forceNotHevc=!1,this.h264DropedRate=0,this.h265DropedRate=0,this.minDif=10,this.minFrames=60,this.maxDropedRate=10,this.robustnessTestResult=!1,this.updateHevcInfo(),this.hevcTest={open:!1,qualityType:20,closePreload:!1}}updateHevcInfo(){(0,c.fU)()||(u&&d()?this.forceNotHevc?this.canPlayHevc=!1:this.canPlayHevc="supported"===u.isHevcSupportRobustness:this.canPlayHevc=!1)}useHevc(e){try{return"desktop"===e?(this.updateHevcInfo(),this.canPlayHevc):"mobile"===e&&!(!(0,n.X)()||this.forceNotHevc)}catch(e){return!1}}setDropRate(e,t,i){if(tthis.minDif||this.h265DropedRate>this.maxDropedRate)&&(this.canPlayHevc=!1,this.forceNotHevc=!0)}},h=(e,t=!1)=>{try{const i="webapp-mobile"===e?1:2;l.a.hevcDeviceDetect(t,i)}catch(e){}},m=e=>{try{const t="is unsupported",{message:i="",errorCode:n=1,errorMessage:o=""}=e,r=i||o;return!!r.includes(t)&&(l.a.focusDisableHevc({hevcMsg:r,hevcCode:n}),!0)}catch(e){return!1}},g=e=>{if(!e)return!1;const{videoWidth:t,videoHeight:i}=e;return 0===t&&0===i&&(l.a.focusDisableHevc({hevcMsg:"width and height is 0",hevcCode:2}),!0)}},97208:(e,t,i)=>{i.d(t,{Tb:()=>r,fU:()=>o,xk:()=>s});let n=-1;function o(){return"undefined"==typeof window||"undefined"==typeof document}function r(e,...t){o()||(n<0&&(n=location.search.includes("ttplayer_debug=1")?1:0),n&&console.log(`[MultiMedia1][${e}]`,...t))}function s(){return n>0}},75248:(e,t,i)=>{i.d(t,{Hd:()=>r,Jz:()=>s,R4:()=>d,S4:()=>a,VN:()=>u,e5:()=>l,i3:()=>c,ol:()=>v});var n=i(7892),o=i(31209);const r=(0,n.p)("basicPlayerAtom@tiktok/webapp-atoms",{mute:!0,playing:!0,volume:0,canAutoPlay:!0,playProgress:null}),{useServiceState:s,useServiceDispatchers:a,useAtomService:l}=(0,o.i)(r,((e,t)=>({setMute(e){t(r,(t=>Object.assign(Object.assign({},t),{mute:e})))},setVolume(e){t(r,(t=>Object.assign(Object.assign({},t),{volume:Math.min(Math.max(0,e),1)})))},setPlaying(e){t(r,(t=>Object.assign(Object.assign({},t),{playing:e})))},setCanAutoPlay(e){t(r,(t=>Object.assign(Object.assign({},t),{canAutoPlay:e})))},getStaticBasicPlayerState:()=>e(r)}))),c=()=>s((e=>e.mute)),d=()=>s((e=>e.volume)),u=()=>s((e=>e.playing)),v=()=>s((e=>e.playProgress))},93341:(e,t,i)=>{i.d(t,{$V:()=>_,GF:()=>S,LM:()=>k,MY:()=>y,PU:()=>R,R3:()=>C,RT:()=>E,Ul:()=>O,VP:()=>P,fD:()=>L,gu:()=>j,hM:()=>x,ik:()=>N,nU:()=>T,nr:()=>b,w:()=>A,x1:()=>I,yA:()=>f,yG:()=>M});var n=i(94999),o=i(68252),r=i(38739),s=i(7892),a=i(31209),l=i(32125),c=i(97086),d=i(18499),u=i(90341),v=i(75248);const p="w_g_vv",h="w_g_fyp_vv",m=1e6,g={prevVideo:null,currentVideo:null,playType:"hover",globalVvCount:0,fypVvCount:0,justWatchedVideo:null,predictedPreloadConfig:{},defaultResolution:void 0,multiInstanceActualResolutions:{},autoResolution:!0},_=()=>{var e,t;const i=Object.assign({},g);if((0,c.fU)())return i;try{i.globalVvCount=Number(null!==(e=localStorage.getItem(p))&&void 0!==e?e:"0"),i.fypVvCount=Number(null!==(t=localStorage.getItem(h))&&void 0!==t?t:"0")}catch(e){console.warn("getLocalStorage failed for key: webapp_vv_count")}return i},f=(0,s.p)("videoPlayerAtom@tiktok/webapp-atoms",_()),{useServiceState:y,useServiceDispatchers:b,useAtomService:w,getStaticApi:k}=(0,a.i)(f,((e,t)=>({setAutoResolution(e){t(f,(t=>Object.assign(Object.assign({},t),{autoResolution:e})))},setDefaultResolution(e){t(f,(t=>Object.assign(Object.assign({},t),{defaultResolution:e,autoResolution:"auto"===e})))},setDefaultResolutionAndUpdateLocalStorage(e){this.setDefaultResolution(e);try{localStorage.setItem("resolution_auto",e)}catch(e){console.warn("setLocalStorage failed for key: resolution")}},setMultiInstanceActualResolution(e,i){t(f,(t=>{let n=Object.assign({},t.multiInstanceActualResolutions);n[e]=i;let o=[...t.recentVideoIndexes||[]];return o.includes(e)||(o=[e,...o]),o.length>4&&(o=o.slice(0,4)),n=Object.fromEntries(Object.entries(n).filter((([e])=>o.includes(Number(e))))),Object.assign(Object.assign({},t),{multiInstanceActualResolutions:n,recentVideoIndexes:o})}))},updateVideo(e){const{needResetReport:i=!0,currentVideo:{index:o},teaParams:{isThreeColumnAuto:s=!1,isVideoDetail:a=!1,enterMethod:l="",backendSourceEventTracking:p=""}={}}=e,h=n.l.getInstance(r.Gs);h.setIsThreeColumnAuto(s),h.setEnterMethod(l),h.setBackendSourceEventTracking(p),h.setIsVideoDetail(a),!(0,c.fU)()&&window.videoChangedCallback&&window.videoChangedCallback(o),i&&h.reset(),(0,d.unstable_batchedUpdates)((()=>{var i;t(f,(t=>Object.assign(Object.assign({},t),{prevVideo:t.currentVideo,currentVideo:e.currentVideo,playType:e.playType}))),t(v.Hd,(t=>Object.assign(Object.assign({},t),{playProgress:e.playProgress}))),t(u.vl,(e=>Object.assign(Object.assign({},e),{isPlayerError:!1}))),!(null==(i=e.currentVideo)?void 0:i.id)||void 0===(null==i?void 0:i.mode)||0!==(null==i?void 0:i.mode)&&2!==(null==i?void 0:i.mode)&&9!==(null==i?void 0:i.mode)&&4!==(null==i?void 0:i.mode)||t(f,(e=>Object.assign(Object.assign({},e),{justWatchedVideo:i})))}))},updateVideoFocusTime(e){n.l.getInstance(r.Gs).updateVideoFocusTime(e.blurTime)},updateGlobalVVCount(i){const{globalVvCount:n=0,fypVvCount:r=0}=e(f);let s=n;n<=m&&1!==i&&(s=n+1,(0,o.AP)(p,String(s)),t(f,(e=>Object.assign(Object.assign({},e),{globalVvCount:s})))),r<=m&&0===i&&((0,o.AP)(h,String(r+1)),t(f,(e=>Object.assign(Object.assign({},e),{fypVvCount:r+1}))))},updatePredictedPreloadConfig(e){t(f,(t=>Object.assign(Object.assign({},t),{predictedPreloadConfig:e})))},getStaticPlayerState:()=>e(f)}))),P=()=>y((e=>{var t,i;return Number(null!==(i=null===(t=e.currentVideo)||void 0===t?void 0:t.index)&&void 0!==i?i:0)})),O=()=>y((e=>e.currentVideo)),S=()=>y((e=>{var t;return null===(t=e.currentVideo)||void 0===t?void 0:t.id})),E=()=>y((e=>{var t,i;return null!==(i=null===(t=e.currentVideo)||void 0===t?void 0:t.mode)&&void 0!==i?i:null}),l.bN),x=()=>y((e=>e.defaultResolution)),T=e=>y((t=>{var i;return(null===(i=null==t?void 0:t.currentVideo)||void 0===i?void 0:i.index)===e}),l.bN),A=(e,t,i)=>y((n=>{var o,r,s;return(null===(o=null==n?void 0:n.currentVideo)||void 0===o?void 0:o.index)===e&&(null===(r=null==n?void 0:n.currentVideo)||void 0===r?void 0:r.mode)===t&&(null===(s=null==n?void 0:n.currentVideo)||void 0===s?void 0:s.id)===i}),l.bN),C=(e,t)=>y((i=>{var n,o;return(null===(n=null==i?void 0:i.currentVideo)||void 0===n?void 0:n.index)===e-1&&(null===(o=null==i?void 0:i.currentVideo)||void 0===o?void 0:o.mode)===t}),l.bN),j=e=>y((t=>{var i;return null===(i=t.multiInstanceActualResolutions)||void 0===i?void 0:i[e]}),l.bN),L=()=>y((e=>e.autoResolution),l.bN),I=(e,t)=>y((i=>{var n,o;return(null===(n=null==i?void 0:i.currentVideo)||void 0===n?void 0:n.index)===e+1&&(null===(o=null==i?void 0:i.currentVideo)||void 0===o?void 0:o.mode)===t}),l.bN),N=e=>y((t=>{var i;return(null===(i=null==t?void 0:t.currentVideo)||void 0===i?void 0:i.index)===e-1}),l.bN),M=e=>y((t=>{var i;return(null===(i=null==t?void 0:t.currentVideo)||void 0===i?void 0:i.index)===e+1}),l.bN),R=()=>{var e;return null!==(e=y((e=>e.predictedPreloadConfig)))&&void 0!==e?e:{}}},90341:(e,t,i)=>{i.d(t,{J3:()=>c,Sx:()=>p,eu:()=>h,ms:()=>v,vl:()=>a});var n=i(7892),o=i(31209),r=i(97086);const s={isPlayerError:!1,showUnmuteTooltip:!1,isAutoScroll:!1},a=(0,n.p)("videoPlayerViewAtom@tiktok/webapp-atoms",(()=>{var e;const t=Object.assign({},s);if((0,r.fU)())return t;try{const i=null!==(e=localStorage.getItem("auto_scroll"))&&void 0!==e?e:"0";t.isAutoScroll="1"===i}catch(e){console.warn("getLocalStorage failed for key: auto_scroll")}return t})());a.debugLabel="videoPlayerViewAtom";const{useServiceState:l,useServiceDispatchers:c,useAtomService:d,getStaticApi:u}=(0,o.i)(a,((e,t)=>({setAutoScroll(e){t(a,(t=>Object.assign(Object.assign({},t),{isAutoScroll:e})))},setAutoScrollAndUpdateLocalStorage(e){this.setAutoScroll(e);try{localStorage.setItem("auto_scroll",e?"1":"0")}catch(e){console.warn("setLocalStorage failed for key: auto_scroll")}},toggleAutoScroll(){this.setAutoScrollAndUpdateLocalStorage(!e(a).isAutoScroll)},updateShowUnmuteTooltip(e){t(a,(t=>Object.assign(Object.assign({},t),{showUnmuteTooltip:e})))},setPlayerError(){t(a,(e=>Object.assign(Object.assign({},e),{isPlayerError:!0})))},getStaticPlayerUIState:()=>e(a)}))),v=()=>{var e;return null!==(e=l((e=>e.isPlayerError)))&&void 0!==e&&e},p=()=>{var e;return null!==(e=l((e=>e.showUnmuteTooltip)))&&void 0!==e&&e},h=()=>{var e;return null!==(e=l((e=>e.isAutoScroll)))&&void 0!==e&&e}},56013:(e,t,i)=>{i.d(t,{ZC:()=>v,d7:()=>h,mo:()=>u});var n=i(88874),o=i(65450),r=i(7892),s=i(14374),a=i(31209),l=i(39785),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const d=(0,l.M)({csr:()=>c(void 0,void 0,void 0,(function*(){var e;const t=null!==(e=(0,n.YI)(o.X))&&void 0!==e?e:{pageId:"-1",vidList:[],parameters:{}};return Promise.resolve(t)}))}),u=(0,s._)((0,r.p)("seoAbtestAtom@tiktok/webapp-atoms",{}),{rehydrationKey:"seo.abtest.state"}),{useAtomService:v,useServiceDispatchers:p,useServiceState:h}=(0,a.i)(u,((e,t)=>({setAbtest(i){return c(this,void 0,void 0,(function*(){const n=e(u),{canonical:o}=n;if(i!==o)return t(u,{canonical:i,abtest:yield d()})}))}})))},34777:(e,t,i)=>{i.d(t,{pZ:()=>a,qA:()=>s});var n=i(39785),o=i(15203),r=i(91498);const s=(0,n.M)({csr:()=>(0,o.q)()}),a=(0,n.M)({csr:()=>(0,r.o7)()})},9472:(e,t,i)=>{i.d(t,{b:()=>o});var n=i(7892);const o=(0,i(14374)._)((0,n.p)("seoMetaStateAtom@tiktok/webapp-atoms",{metaParams:{},jsonldList:[],disableAlternateLink:!1,generateAlternateWithCanonical:!1,enableAlternateHreflang:!1,alternateHreflangList:[]}),{rehydrationKey:"seo.meta.state"})},7089:(e,t,i)=>{i.d(t,{kV:()=>v,hG:()=>d,VR:()=>u});var n=i(14374),o=i(31209),r=i(7892),s=i(56070),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},l=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const c=(0,n._)((0,r.p)("businessAtom@tiktok/webapp-atoms",{businessPermission:{comment:!1,message:!1},businessAccountInfoResponse:{statusCode:1,statusMsg:"",data:void 0}}),{rehydrationKey:"webapp.business"}),{useAtomService:d,useServiceState:u,useServiceDispatchers:v,getStaticApi:p}=(0,o.i)(c,((e,t)=>({setBusinessPermission(e){t(c,(t=>Object.assign(Object.assign({},t),{businessPermission:e})))},setBusinessAccountInfoResponse(e){t(c,(t=>Object.assign(Object.assign({},t),{businessAccountInfoResponse:e})))},getBusinessPermissionList(){var e;return l(this,void 0,void 0,(function*(){const t=yield function(){return a(this,void 0,void 0,(function*(){return s.h.get("/api/ba/business/suite/permission/list/",{query:{permissionList:"001004,001005"},baseUrlType:2})}))}(),i=null!==(e=null==t?void 0:t.permissionList)&&void 0!==e?e:[];this.setBusinessPermission({message:i.indexOf("001004")>-1,comment:i.indexOf("001005")>-1})}))},getBusinessAccountInfoResponse(){return l(this,void 0,void 0,(function*(){const e=yield function(){return a(this,void 0,void 0,(function*(){return s.h.get("/api/ba/business/suite/bs/account/info/",{query:{scene:"dm"},baseUrlType:2})}))}();this.setBusinessAccountInfoResponse(e)}))}})))},4685:(e,t,i)=>{i.d(t,{fL:()=>a,lu:()=>l});var n=i(31209);const o=(0,i(7892).p)("deviceScoreAtom@tiktok/webapp-atoms",{hardwareScore:-1,totalDeviceScore:-1}),{useAtomService:r,useServiceDispatchers:s,useServiceState:a,getStaticApi:l}=(0,n.i)(o,((e,t)=>({updateHardwareScore(e){t(o,(t=>Object.assign(Object.assign({},t),{hardwareScore:e})))},updateTotalDeviceScore(e){t(o,(t=>Object.assign(Object.assign({},t),{totalDeviceScore:e})))}})))},16680:(e,t,i)=>{i.d(t,{CP:()=>O,JF:()=>y,b1:()=>P,MR:()=>w,mZ:()=>k});var n=i(57432),o=i.n(n),r=i(4474),s=i(18499),a=i(64431),l=i(57431),c=i(16891),d=i(31974),u=i(18829),v=i(54888),p=i(7892),h=i(14374),m=i(31209);const g={isOpen:!1,url:"",isRedirectToProfilePage:!1,closeable:!1,isBannerActive:!1,bannerEnabled:!1,content:{title:"",desc:"",btnOpenText:""},iframeStyle:{},handleDownload:o(),handleLogin:o(),closeCallback:o(),loginModalShow:!1,maskCloseable:!1,userId:"",groupId:"",enterMethod:void 0,pageType:5,modalType:"",hasCheckedPeriodicLogin:!1,hasCheckedPredictionLogin:!1,hasCheckedGuestMode:!1,showLoginOnLoad:!1,isLoginOnLoadClosed:!1,redirectToHomePage:!1,isGuestMode:!1,isGuestModeUI:!1};function _(){return-1!==(window.location.pathname+window.location.search).indexOf("recharge")}function f(e){if(e)return["click_like","click_comment","click_follow","share_button","click_like_comment","click_reply_comment","click_dislike","click_favorite"].includes(e)?"engagement":"default"}const y=(0,h._)((0,p.p)("loginAtom@tiktok/webapp-atoms",g),{rehydrationKey:"webapp.login"});let b;const{useAtomService:w,useServiceState:k,useServiceDispatchers:P,getStaticApi:O}=(0,m.i)(y,((e,t)=>({setCloseable(e){t(y,(t=>Object.assign(Object.assign({},t),{closeable:e})))},setUrl(e){t(y,(t=>Object.assign(Object.assign({},t),{url:e})))},setLoginPath(e){t(y,(t=>Object.assign(Object.assign({},t),{loginPath:e})))},setCloseCallback(e){e&&t(y,(t=>Object.assign(Object.assign({},t),{closeCallback:e})))},setIsOpen(e){t(y,(t=>Object.assign(Object.assign({},t),{isOpen:e})))},setContent(e){e&&t(y,(t=>Object.assign(Object.assign({},t),{content:e})))},setHandleDownload(e){e&&t(y,(t=>Object.assign(Object.assign({},t),{handleDownload:e})))},setHandleLogin(e){e&&t(y,(t=>Object.assign(Object.assign({},t),{handleLogin:e})))},setIframeStyle(e){t(y,(t=>Object.assign(Object.assign({},t),{iframeStyle:e})))},setModalType(e){t(y,(t=>Object.assign(Object.assign({},t),{modalType:e})))},setLoginModalShow(e){var i,n;if(t(y,(t=>Object.assign(Object.assign({},t),{loginModalShow:e}))),!e&&window.byted_acrawler){const{vgeo:e}=(0,a.c)();null===(n=(i=window.byted_acrawler).setUserMode)||void 0===n||n.call(i,(0,u.n)({isVA:"VGeo-US"===e,isLogin:!1,isFTC:!1,isHighRisk:!1}))}},setMaskCloseable(e){t(y,(t=>Object.assign(Object.assign({},t),{maskCloseable:e})))},setPageType(e){t(y,(t=>Object.assign(Object.assign({},t),{pageType:e})))},setUserId(e){t(y,(t=>Object.assign(Object.assign({},t),{userId:e})))},setGroupId(e){t(y,(t=>Object.assign(Object.assign({},t),{groupId:e})))},setLastGroupId(e){t(y,(t=>Object.assign(Object.assign({},t),{lastGroupId:e})))},setEnterMethod(e){t(y,(t=>Object.assign(Object.assign({},t),{enterMethod:e})))},setModalImage(e){t(y,(t=>Object.assign(Object.assign({},t),{modalImage:e})))},setPopupType(e){t(y,(t=>Object.assign(Object.assign({},t),{popupType:e})))},setIsRedirectToProfilePage(e){t(y,(t=>Object.assign(Object.assign({},t),{isRedirectToProfilePage:e})))},setIsGuestMode(e){t(y,(t=>Object.assign(Object.assign({},t),{isGuestMode:e})))},setIsGuestModeUI(e){t(y,(t=>Object.assign(Object.assign({},t),{isGuestModeUI:e})))},setPredictionPayload(e){t(y,(t=>Object.assign(Object.assign({},t),{predictionPayload:e})))},setIsLinkPhoneOrEmail(e){t(y,(t=>Object.assign(Object.assign({},t),{isLinkPhoneOrEmail:e})))},openModal(i){var n,o;const{url:a,isRedirectToProfilePage:d=!1,loginPath:u,isSignup:p,closeable:h=!0,query:m={},iframeStyle:g={},content:b,handleDownload:w,handleLogin:k,closeCallback:P,maskCloseable:O=!1,userId:S,enterMethod:E,bizActionSource:x,pageType:T=999,popupType:A,groupId:C,lastGroupId:j,isGuestMode:L,isGuestModeUI:I,predictionPayload:N,isLinkPhoneOrEmail:M}=i,{language:R}=(0,l.x)(),{bizContext:D}=e(v.A),U=null!=u?u:"/"+(p?"signup":"login"),F=null!=a?a:(0,r.stringifyUrl)({url:U,query:Object.assign({lang:R,is_modal:1,hide_close_btn:1,event_name:p?"enter_sign_up":null,type:_()?"recharge":"",enter_from:c.f.commonParams.page_name},m)},{skipNull:!0}),V=null!=E?E:m.enter_method,B=null!=C?C:m.group_id,q=null!=j?j:m.last_group_id,z=null!==(o=null!==(n=m.type)&&void 0!==n?n:_()?"recharge":"")&&void 0!==o?o:"";F.match(/\/login|\/signup|\/link-phone-or-email/)&&!(null==D?void 0:D.isMobile)?(0,s.unstable_batchedUpdates)((()=>{t(y,(e=>Object.assign(Object.assign({},e),{url:F,isRedirectToProfilePage:d,modalType:z,closeable:h,popupType:A,enterMethod:V,modalImage:f(V),closeCallback:null!=P?P:e.closeCallback,groupId:B,lastGroupId:q,isGuestMode:null!=L&&L,isGuestModeUI:null!=I&&I,predictionPayload:null!=N?N:"",isLinkPhoneOrEmail:null!=M&&M,bizActionSource:x}))),this.setLoginModalShow(!0)})):t(y,(e=>Object.assign(Object.assign({},e),{url:F,isRedirectToProfilePage:d,closeable:h,isOpen:!0,content:null!=b?b:e.content,handleDownload:null!=w?w:e.handleDownload,handleLogin:null!=k?k:e.handleLogin,iframeStyle:g,maskCloseable:O,closeCallback:null!=P?P:e.closeCallback,userId:S,enterMethod:V,pageType:T,popupType:A,groupId:B,lastGroupId:q,isLinkPhoneOrEmail:null!=M&&M,bizActionSource:x})))},setCheckPeriodicLogin(e){t(y,(e=>Object.assign(Object.assign({},e),{hasCheckedPeriodicLogin:!0}))),t(y,(t=>Object.assign(Object.assign({},t),{showLoginOnLoad:t.showLoginOnLoad||e.showLoginOnLoad})))},setCheckPredictionLogin(e){t(y,(e=>Object.assign(Object.assign({},e),{hasCheckedPredictionLogin:!0}))),t(y,(t=>Object.assign(Object.assign({},t),{showLoginOnLoad:t.showLoginOnLoad||e.showLoginOnLoad})))},setCheckGuestModeLogin(e){t(y,(e=>Object.assign(Object.assign({},e),{hasCheckedGuestMode:!0}))),t(y,(t=>Object.assign(Object.assign({},t),{showLoginOnLoad:t.showLoginOnLoad||e.showLoginOnLoad})))},setIsLoginOnLoadClosed(e){t(y,(t=>Object.assign(Object.assign({},t),{isLoginOnLoadClosed:e.isLoginOnLoadClosed})))},setClearShowLoginOnLoad(){t(y,(e=>Object.assign(Object.assign({},e),{hasCheckedPeriodicLogin:!1}))),t(y,(e=>Object.assign(Object.assign({},e),{hasCheckedPredictionLogin:!1}))),t(y,(e=>Object.assign(Object.assign({},e),{showLoginOnLoad:!1})))},closeModal(i){const{enter_method:n,disableReport:r}=i;if(r)return;b||(b=d.$F.getInstance()),b.loginNotifyClose({enter_method:n});const{closeCallback:s=o()}=e(y);s(),t(y,(e=>Object.assign(Object.assign({},e),{isOpen:!1,url:"",groupId:void 0})))},setIsBannerActive(e){t(y,(t=>Object.assign(Object.assign({},t),{isBannerActive:e})))}})))},10287:(e,t,i)=>{i.d(t,{xt:()=>M,SE:()=>I,TP:()=>L});var n=i(70952),o=i.n(n);const r=["like","favorite","click_comment","post_comment","follow","share","download","head","finish","cover","repost"],s=["play","pause","wait","unmount"];var a,l;(l=a||(a={})).Interested="i",l.NotInterested="n",l.Neutral="v";const c="nb_classifier",d=["k_fyp","k_foryou","k_foryoupage","k_parati","k_fy","k_fypage","k_foryourpage","k_fpy","k_4u","k_fouryou","k_fypviral","k_fouryoupage","k_for","k_foru","k_fup","k_typ","k_4upage","k_viral","k_viralvideo","k_viraltiktok","k_goviral","k_videoviral","k_tiktokviral","k_viralvideos","k_viral_video","k_popular","k_trending","k_trendingvideo","k_new","k_trendingtiktok","k_tiktok","k_tiktokviral","k_vairal","k_trend","k_explore","k_explorepage","k_video"];var u=i(21578),v=i(71828);const p=/[^\s#]+#|#[^\s#]+/g,h=(e,t=!1,i=!1)=>{const n=((e,t=!1,i=!1)=>{const n=(e=>{var t;if(!e.textExtra)return[...new Set(null===(t=e.desc.match(p))||void 0===t?void 0:t.map((e=>e.replace("#","").toLowerCase())))].filter(Boolean).map((e=>`k_${e}`));const{textExtra:i}=e;return i.map((e=>{var t,i;return null===(i=null===(t=e.hashtagName)||void 0===t?void 0:t.toLowerCase())||void 0===i?void 0:i.trim()})).filter(Boolean).map((e=>`k_${e}`))})(e),o=(e=>{const t=e.music;if(!t)return;const{id:i,private:n,original:o}=t;return!i||n||o?void 0:`m_${i}`})(e),r=t?(e=>{const{duration:t}=e.video;return t>0&&t<=7?"d_0-7":t>7&&t<=10?"d_7-10":t>10&&t<=12?"d_10-12":t>12&&t<=14?"d_12-14":t>14&&t<=16?"d_14-16":t>16&&t<=20?"d_16-20":t>20&&t<=26?"d_20-26":t>26&&t<=36?"d_26-36":t>36&&t<=51?"d_36-51":t>51&&t<=62?"d_51-62":t>62&&t<=88?"d_62-88":t>88&&t<=143?"d_88-143":t>143?"d_>143":void 0})(e):(e=>{const{duration:t}=e.video;return t>0&&t<=12?"d_0-12":t>12&&t<=23?"d_12-23":t>23&&t<=60?"d_23-60":t>60?"d_>60":void 0})(e),s=(e=>{var t;const{desc:i,textExtra:n}=e;if(!i)return;if(!n)return(0,u.o0)(i);const o=null===(t=[...n].sort(((e,t)=>e.start-t.start)).filter((e=>e.hashtagId))[0])||void 0===t?void 0:t.start,r=i.substring(0,o);return r?(0,u.o0)(r):(0,u.o0)(i)})(e),a=[...n,`h_${(new Date).getHours()}`];return o&&a.push(o),r&&a.push(r),s&&a.push(`l_${s}`),i&&e.diversificationId&&a.push(`c_${e.diversificationId}`),a})(e,t,i),o=e.authorId;return o&&n.push(`a_${o}`),n};var m=i(14374),g=i(31209),_=i(7892),f=i(2408),y=i(57431),b=i(83663),w=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function k(){return w(this,void 0,void 0,(function*(){return yield(0,b.P2)("nb",1,{upgrade(e){e.createObjectStore(c,{keyPath:"id"})}})}))}function P(e){return w(this,void 0,void 0,(function*(){const{id:t,classifier:i,db:n}=e;try{yield n.put(c,{id:t,classifier:i}),v.F.handleStorageWrite({is_success:1})}catch(e){throw v.F.handleStorageWrite({is_success:0,fail_error_msg:`${e}`}),e}}))}var O=i(16891),S=i(71281);const E=(e,t)=>!/^(m_|a_|k_)/.test(e)||/^(k_fyp|k_parati|k_fy)/.test(e)||d.includes(e)||1===e.length||-1!==e.indexOf(t);var x=i(58305),T=i(40040),A=i(84908),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const j=(0,m._)((0,_.p)("mlModelAtom@tiktok/webapp-atoms",{uid:"",item:void 0,classifier:void 0,play_time:0,show_interested:-1,docBuffer:[],is_preview:!1,finish_play:!1,suggestedItemList:[],isSuggestedItemListReady:!("undefined"!=typeof window&&(null===window||void 0===window?void 0:window.indexedDB)),isMlModelReady:!1}),{rehydrationKey:"webapp.mlModel"}),{useAtomService:L,useServiceDispatchers:I,useServiceState:N,getStaticApi:M}=(0,g.i)(j,((e,t)=>({initMlModel(){var i,n,r,s,a;return C(this,void 0,void 0,(function*(){if("undefined"==typeof window||!(null===window||void 0===window?void 0:window.indexedDB))return void v.F.handleStorageLoad({is_success:0,fail_error_msg:"no indexedDB"});const{user:l,odinId:d}=(0,y.x)(),u=null!==(n=null!==(i=null==l?void 0:l.uid)&&void 0!==i?i:d)&&void 0!==n?n:"",p=null!==(r=null==l?void 0:l.secUid)&&void 0!==r?r:"",h=null!==(s=(0,S.d)("enable_ml_model"))&&void 0!==s?s:"v1",m="v0"!==(null!==(a=(0,S.d)("enable_ml_model_suggest_content"))&&void 0!==a?a:"v0"),g=e(f.WH);if("v1"===h||l&&!l.hasIMPermission||(0,f.PJ)(g))v.F.handleStorageLoad({is_success:0,fail_error_msg:"no allowed"});else try{const e=yield k(),{classifier:i}=(yield function(e){var t;return w(this,void 0,void 0,(function*(){const{uid:i,db:n,secUid:o}=e;try{const e=yield n.get(c,i);if(!e&&o){const{classifier:e}=null!==(t=yield n.get(c,o))&&void 0!==t?t:{};e&&(yield P({db:n,id:i,classifier:e}),yield n.delete(c,o))}return v.F.handleStorageLoad({is_success:1}),e}catch(e){throw v.F.handleStorageLoad({is_success:0,fail_error_msg:`${e}`}),e}}))}({db:e,uid:u,secUid:p}))||{},n=new(o());i&&n.restore(i),t(j,(e=>Object.assign(Object.assign({},e),{uid:u,secUid:p,classifier:n,isSuggestedItemListReady:!m,isMlModelReady:!0})))}catch(e){throw v.F.handleStorageLoad({is_success:0,fail_error_msg:`${e}`}),e}}))},trainAndUpdateClassifier(){return C(this,void 0,void 0,(function*(){const{docBuffer:i,classifier:n,uid:o}=e(j);if(i.length<3&&n||!n)return;const r=yield k();try{const e=(e=>{const{documents:t=[],classifier:i,maxDocsCount:n=4e3,evictDocsCount:o=1e3}=e;if(0===t.length)return i;const r=[],s=[];t.forEach((({id:e,action:t})=>{r.push(t),s.push(e)}));const a={video_interactions:r.join(","),interaction_video_ids:s.join(",")};try{v.F.handleTrainRequest(a),t.forEach((({value:e,label:t})=>{i.addDocument(e,t)}));const{docs:e}=i;let r=!1;if(e.length>n){const t=e.slice(e.length-n+o);for(const{label:e,value:n}of t)i.addDocument(n,e);r=!0}i.train(),v.F.handleTrainReturn(Object.assign({is_success:1,is_slicing:r?1:0,docs_count:i.docs.length},a))}catch(e){v.F.handleTrainReturn(Object.assign({is_success:0,fail_error_msg:e.message},a)),console.error(`${e.message} - ${e.stack}`)}return i})({documents:i,classifier:n});yield P({db:r,classifier:e,id:o}),t(j,(t=>Object.assign(Object.assign({},t),{classifier:e,docBuffer:[]})))}catch(e){}}))},addTrainData(i){var n,o,l;return C(this,void 0,void 0,(function*(){const c=e(j),{classifier:d}=c;if(!d)return;const{item:u,action:v,isPreview:p}=i;if(!u||u.video.id===(null===(n=c.item)||void 0===n?void 0:n.video.id)&&c.finish_play&&"finish"===v)return;if("play"===v){if(u.video.id===(null===(o=c.item)||void 0===o?void 0:o.video.id))return void t(j,(e=>Object.assign(Object.assign({},e),{startPlayTimestamp:Date.now(),is_preview:!!p})));const e={item:u,finish_play:!1,show_interested:-1,play_time:0,is_preview:!!p,startPlayTimestamp:Date.now()};if(c.item&&!c.is_preview&&-1===c.show_interested){const t=c.item.video.duration<=5||c.item.video.duration>5&&c.play_time<5e3;e.docBuffer=[...c.docBuffer,{id:c.item.video.id,action:t?"skip":"play",value:h(c.item),label:t?a.NotInterested:a.Neutral}]}return t(j,(t=>Object.assign(Object.assign({},t),e))),void(yield this.trainAndUpdateClassifier())}if(s.includes(v)){const e=c.play_time+(c.startPlayTimestamp?Date.now()-c.startPlayTimestamp:0);return void t(j,(t=>Object.assign(Object.assign({},t),{play_time:e})))}const m={},g=h(u),_=r.includes(v)?1:0;m.docBuffer=[...c.docBuffer,{id:u.video.id,action:v,value:g,label:_?a.Interested:a.NotInterested}],u.video.id===(null===(l=c.item)||void 0===l?void 0:l.video.id)&&(m.show_interested=_),"finish"===v&&(m.finish_play=!0),t(j,(e=>Object.assign(Object.assign({},e),m))),yield this.trainAndUpdateClassifier()}))},getSuggestedForyouList(){var i;return C(this,void 0,void 0,(function*(){const{classifier:n,uid:o}=e(j),r="1"===(0,x._S)(T.Is);if(!n||!r&&!o)return void t(j,(e=>Object.assign(Object.assign({},e),{isSuggestedItemListReady:!0})));const s=((e,t)=>{var i;let n=0;const o=[],{docs:r}=e,s=new Set,a=1e4,{author:l=a}=null!==(i=(0,S.d)("ml_model_suggest_content_threshold"))&&void 0!==i?i:{};for(let e=0;e{var i,n,o,r,s,a,l,d,u,v,p,h,m,g,_,f;const y=null!==(n=null===(i=c.i)||void 0===i?void 0:i[e[0]])&&void 0!==n?n:0,b=null!==(r=null===(o=c.i)||void 0===o?void 0:o[t[0]])&&void 0!==r?r:0;if(y!==b)return b-y;const w=(null!==(a=null===(s=c.i)||void 0===s?void 0:s[e[0]])&&void 0!==a?a:0)+(null!==(d=null===(l=c.v)||void 0===l?void 0:l[e[0]])&&void 0!==d?d:0)-(null!==(v=null===(u=c.n)||void 0===u?void 0:u[e[0]])&&void 0!==v?v:0),k=(null!==(h=null===(p=c.i)||void 0===p?void 0:p[t[0]])&&void 0!==h?h:0)+(null!==(g=null===(m=c.v)||void 0===m?void 0:m[t[0]])&&void 0!==g?g:0)-(null!==(f=null===(_=c.n)||void 0===_?void 0:_[t[0]])&&void 0!==f?f:0);return w!==k?k-w:t[0]-e[0]})),((e,t)=>{const i={i:{},v:{},n:{}},n={i:{},v:{},n:{}},o={i:{},v:{},n:{}},r={a_:i,k_:n,m_:o};e.forEach((([e,i])=>{var n,o,s,a,l,c,d,u,v;const p=r[i.substring(0,2)],h=(null!==(o=null===(n=t.i)||void 0===n?void 0:n[e])&&void 0!==o?o:1)-1,m=(null!==(a=null===(s=t.v)||void 0===s?void 0:s[e])&&void 0!==a?a:1)-1,g=(null!==(c=null===(l=t.n)||void 0===l?void 0:l[e])&&void 0!==c?c:1)-1;p.i[h]=(null!==(d=p.i[h])&&void 0!==d?d:0)+1,p.v[m]=(null!==(u=p.v[m])&&void 0!==u?u:0)+1,p.n[g]=(null!==(v=p.n[g])&&void 0!==v?v:0)+1})),O.f.sendEvent("frontend_rec_author_distribution",{distribution:JSON.stringify(i)}),O.f.sendEvent("frontend_rec_tag_distribution",{distribution:JSON.stringify(n)}),O.f.sendEvent("frontend_rec_music_distribution",{distribution:JSON.stringify(o)})})(o,c);const d=[];let u=0,v=0,p=0;return o.forEach((([e,t])=>{var i,n;const o=(null!==(n=null===(i=c.i)||void 0===i?void 0:i[e])&&void 0!==n?n:1)-1;t.startsWith("a_")&&(o>=l&&u<10&&(d.push(t),u++),o>=1&&v++,o>=2&&p++)})),v>=1&&O.f.sendEvent("frontend_rec_suggested_content_should_show",{threshold:1,count:v}),p>=1&&O.f.sendEvent("frontend_rec_suggested_content_should_show",{threshold:2,count:p}),d})(n,o);if(0===s.length)return void t(j,(e=>Object.assign(Object.assign({},e),{isSuggestedItemListReady:!0})));if("v0"===(null!==(i=(0,S.d)("enable_ml_model_suggest_content"))&&void 0!==i?i:"v0"))return;const a=(yield Promise.all(s.map((e=>C(this,void 0,void 0,(function*(){var t,i;const n=e.split("_").slice(-1)[0];if(e.startsWith("a_")){const e=yield(0,A.Gp)().getUserDetail({userId:n});if(0!==e.statusCode)return;return{type:"author",title:null!==(i=null===(t=e.userInfo)||void 0===t?void 0:t.user.uniqueId)&&void 0!==i?i:""}}})))))).filter((e=>!!e));O.f.sendEvent("frontend_rec_suggested_content",{items:JSON.stringify(a),count:a.length}),t(j,(e=>Object.assign(Object.assign({},e),{suggestedItemList:a,isSuggestedItemListReady:!0})))}))}})))},89558:(e,t,i)=>{i.d(t,{Fc:()=>s,Lq:()=>a,MW:()=>r,W$:()=>n,eh:()=>o,oG:()=>l});const n="non_personalized_feeds_web",o="personalized_search_disabled_list",r="personalized_feed_disabled_list",s="personalized_feed_disabled_not_login",a="personalized_feed_ppf_disabled_list",l="webapp_popup_personalization_toast"},2408:(e,t,i)=>{i.d(t,{HY:()=>m,JW:()=>g,PJ:()=>u,Qi:()=>_,WH:()=>h,nH:()=>f});var n=i(14374),o=i(31209),r=i(7892),s=i(57431),a=i(99374),l=i(88874),c=i(63615),d=i(97086);const u=e=>{const{isFeedPersonalized:t}=e;return!t},v={isSearchPersonalized:!0,isFeedPersonalized:!0,isSearchConfigInitialized:!1,isFeedConfigInitialized:!1,isManageModalOpen:!1,isExplanationModalOpen:!1,isShowingToast:!1},p={isSearchPersonalized:!1,isFeedPersonalized:!1,isSearchConfigInitialized:!1,isFeedConfigInitialized:!1,isManageModalOpen:!1,isExplanationModalOpen:!1,isShowingToast:!1},h=(0,n._)((0,r.p)("personalizationAtom@tiktok/webapp-atoms",(()=>{const e=function(){if((0,d.fU)())return"";const e=(0,l.YI)(c.Ow),{user:{uid:t=""}={}}=e||{};return t}();return(0,a.mx)(void 0,e)?p:v})()),{rehydrationKey:"webapp.personalization"}),{useAtomService:m,useServiceState:g,useServiceDispatchers:_,getStaticApi:f}=(0,o.i)(h,((e,t)=>({setIsShowingToast(e){t(h,(t=>Object.assign(Object.assign({},t),{isShowingToast:e})))},setIsManageModalOpen(e){t(h,(t=>Object.assign(Object.assign({},t),{isManageModalOpen:e})))},setIsExplanationModalOpen(e){t(h,(t=>Object.assign(Object.assign({},t),{isExplanationModalOpen:e})))},setIsSearchPersonalized(e){t(h,(t=>Object.assign(Object.assign({},t),{isSearchPersonalized:e})))},setIsFeedPersonalized(e){t(h,(t=>Object.assign(Object.assign({},t),{isFeedPersonalized:e})))},setSearchConfigInitialized(e){t(h,(t=>Object.assign(Object.assign({},t),{isSearchConfigInitialized:e})))},setFeedConfigInitialized(e){t(h,(t=>Object.assign(Object.assign({},t),{isFeedConfigInitialized:e})))},init(i){var n,o,r,l,c,d;return r=this,l=void 0,d=function*(){const{isFeed:r}=i,l=(0,s.x)(),{isSearchConfigInitialized:c,isFeedConfigInitialized:d}=e(h);if(c&&!r||d&&r)return;const u=null!==(o=null===(n=l.user)||void 0===n?void 0:n.uid)&&void 0!==o?o:"",v=(0,a.eI)(u,r);t(h,r?e=>Object.assign(Object.assign({},e),{isFeedPersonalized:!v,isFeedConfigInitialized:!0}):e=>Object.assign(Object.assign({},e),{isSearchPersonalized:!v,isSearchConfigInitialized:!0}))},new((c=void 0)||(c=Promise))((function(e,t){function i(e){try{o(d.next(e))}catch(e){t(e)}}function n(e){try{o(d.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof c?o:new c((function(e){e(o)}))).then(i,n)}o((d=d.apply(r,l||[])).next())}))}})))},99374:(e,t,i)=>{i.d(t,{Sw:()=>a,eI:()=>r,i1:()=>s,mx:()=>l});var n=i(35267),o=i(89558);const r=(e,t,i,r)=>{if(!e)return!!t&&"1"===(0,n.MJ)(o.Fc);const s=r?o.Lq:t?o.MW:o.eh,a=(0,n.MJ)(s);if(a)try{const t=i?decodeURIComponent(a):a;return JSON.parse(t).includes(e)}catch(e){return console.warn("getIsNonPersonalized get JSON failed"),!1}return!1},s=(e,t)=>((e,t)=>{var i;let n=!1;if(e){const e=null!==(i=null==t?void 0:t.uid)&&void 0!==i?i:"";n=r(e,!0,!0)}return n})("v2"===t,e),a=(e="")=>r(e,void 0,void 0,!0),l=(e,t="")=>{var i;const n="v2"===(null===(i=null==e?void 0:e.parameters[o.W$])||void 0===i?void 0:i.vid),s=a(t);let l=!1;return(n||s)&&(l=r(t,!0,!1)),l}},92651:(e,t,i)=>{var n;i.d(t,{L:()=>n,z:()=>o}),function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}(n||(n={}));const o={hardware_score_avg:{levels:[{threshold:6.5,target:n.Low},{threshold:7.6,target:n.Medium},{threshold:10,target:n.High}],default:{threshold:10,target:n.High}},network_score_avg:{levels:[{threshold:6,target:n.Low},{threshold:8.5,target:n.Medium},{threshold:10,target:n.High}],default:{threshold:10,target:n.High}}}},43387:(e,t,i)=>{i.d(t,{tR:()=>k,u4:()=>b,BX:()=>w});var n=i(14374),o=i(31209),r=i(7892),s=i(54888),a=i(3770),l=i(16891),c=i(14974),d=i.n(c),u=i(57431),v=i(60484),p=i(4474),h=i(92651);const m=({currentPortraitValue:e,portraitStrategy:t,defaultStrategy:i,enable:n,portraitKey:o})=>{var r;const s=null===(r=(0,p.parse)(location.search))||void 0===r?void 0:r[o];if(!s&&(!n||!e||isNaN(e)))return i;const a=s?Number(s):e,{levels:l=[]}=(0,v.L$)(t);for(let e=0;eNumber(a))return t}return i},g=(e,t)=>{const i={target:h.L.High},{target:n}=m({currentPortraitValue:Number(null!=e?e:0),portraitStrategy:h.z[t],defaultStrategy:i,enable:!0,portraitKey:t});return n},_={rawValue:"0",target:0,type:"device"},f=(0,n._)((0,r.p)("portraitHubAtom@tiktok/webapp-atoms",{vv_avg_per_day:_,ff_duration_avg:_,network_score_avg:_,hardware_score_avg:_}),{rehydrationKey:"webapp.portraitHub"}),{useAtomService:y,useServiceDispatchers:b,useServiceState:w,getStaticApi:k}=(0,o.i)(f,((e,t)=>({initPortraitHub(){var i;const{bizContext:n}=e(s.A),{vv_avg_per_day:o,ff_duration_avg:r,network_score_avg:c,hardware_score_avg:v}=null!==(i=null==n?void 0:n.solariaPortrait)&&void 0!==i?i:{},p=(e=>{var t,i,n,o,r;const{abTestVersion:s}=(0,u.x)(),a=null!==(n=null===(i=null===(t=null==s?void 0:s.parameters)||void 0===t?void 0:t.vv_avg_per_day_portrait)||void 0===i?void 0:i.vid)&&void 0!==n?n:{vid:"v0"},l=null===(o=null==s?void 0:s.parameters.change_list_length_new)||void 0===o?void 0:o.vid,c="v0"!==(null!==(r=null==a?void 0:a.vid)&&void 0!==r?r:"v0"),d={target:Number(l)},{target:v}=m({currentPortraitValue:Number(null!=e?e:0),portraitStrategy:a,defaultStrategy:d,enable:c,portraitKey:"vv_avg_per_day"});return v})(o),_=(e=>{var t,i,n,o;const{abTestVersion:r}=(0,u.x)(),s=null!==(n=null===(i=null===(t=null==r?void 0:r.parameters)||void 0===t?void 0:t.ff_avg_duration_portrait)||void 0===i?void 0:i.vid)&&void 0!==n?n:{vid:"v0"},a="v0"!==(null!==(o=null==s?void 0:s.vid)&&void 0!==o?o:"v0"),l={target:h.L.High},{target:c}=m({currentPortraitValue:Number(null!=e?e:0),portraitStrategy:s,defaultStrategy:l,enable:a,portraitKey:"ff_duration_avg"});return c})(r),y={vv_avg_per_day:{rawValue:o,target:p,type:"user"},ff_duration_avg:{rawValue:r,target:_,type:"device"},network_score_avg:{rawValue:c,target:g(c,"network_score_avg"),type:"device"},hardware_score_avg:{rawValue:v,target:g(v,"hardware_score_avg"),type:"device"}};t(f,(e=>Object.assign(Object.assign({},e),y)));const b=(e=>{var t,i,n,o,r,s,a,l;const c=Object.keys(e),{webIdCreatedTime:d=0}=(0,u.x)(),v=Date.now()/1e3-d<86400;let p=0,h=0,m=0;for(let t=0;tNumber(e)));l.f.config({commonHeaderConfig:{"header.custom":Object.assign({},w)}})},getPortraitTarget:t=>e(f)[t].target})))},44841:(e,t,i)=>{i.d(t,{i:()=>n});const n={[-1]:-1,0:0,1:1,2:2,4:3}},84908:(e,t,i)=>{i.d(t,{Gp:()=>S,JY:()=>O,eI:()=>E,nW:()=>x,p9:()=>P});var n=i(11983),o=i(37745),r=i(22248),s=i(14374),a=i(31209),l=i(7892),c=i(97792),d=i(8046),u=i(69589),v=i(40046),p=i(44841),h=i(97487),m=i(56070),g=i(26325),_=i(39785),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const y=(0,_.M)({csr:function(e){return f(this,void 0,void 0,(function*(){return(0,h.Ni)("userDetail")||m.h.get("/api/user/detail/",{query:e,baseUrlType:2})}))}});var b=i(79123),w=i(41548),k=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const P=(0,s._)((0,l.p)("userAtom@tiktok/webapp-atoms",{users:{},stats:{}}),{rehydrationKey:"webapp.user"}),{useAtomService:O,getStaticApi:S,useServiceDispatchers:E,useServiceState:x}=(0,a.i)(P,((e,t)=>({multiSetUser(i){const n=e(P),o={};i.forEach((e=>{o[e.uniqueId]=(0,b.HF)(n.users[e.uniqueId],e)})),t(P,Object.assign(Object.assign({},n),{users:Object.assign(Object.assign({},n.users),o)}))},setUser(e,i=!0){t(P,(t=>Object.assign(Object.assign({},t),{users:Object.assign(Object.assign({},t.users),{[e.uniqueId]:(0,b.HF)(t.users[e.uniqueId],e,i)})})))},setUserRelation({uniqueId:i,relation:n,shouldUpdateFollowed:r,shouldUpdateFollower:s}){var a;const l=e(P),c=l.users[i];if(!c)return;const d=Object.assign(Object.assign({},c),{relation:n});r&&(d.extraInfo=Object.assign(Object.assign({},d.extraInfo),{followed:(0,o.z)(n,null===(a=d.extraInfo)||void 0===a?void 0:a.followed)})),s&&(d.extraInfo=Object.assign(Object.assign({},d.extraInfo),{followerStatus:(0,o.L)(n)})),t(P,Object.assign(Object.assign({},l),{users:Object.assign(Object.assign({},l.users),{[i]:d})}))},setUserStats(e){const{uniqueId:i,stats:n,statsV2:o}=e;t(P,(e=>Object.assign(Object.assign({},e),{stats:Object.assign(Object.assign({},e.stats),{[i]:(0,b.XY)({stats:n,statsV2:o})})})))},multiSetUserStats(i){const n=e(P),o=i.reduce(((e,{uniqueId:t,stats:i,statsV2:n})=>(e[t]=(0,b.XY)({stats:i,statsV2:n}),e)),Object.assign({},n.stats));t(P,Object.assign(Object.assign({},n),{stats:o}))},getUserDetail(e){return k(this,void 0,void 0,(function*(){try{const t=yield y(e);return 0!==t.statusCode&&10222!==t.statusCode||!t.userInfo?console.warn("Get user detail failed for getting wrong response"):(this.setUser(Object.assign(Object.assign({uniqueIdModifyTime:0},t.userInfo.user),{extraInfo:{statusCode:t.statusCode}})),this.setUserStats({stats:Object.assign(Object.assign({},t.userInfo.stats),{needFix:!1}),statsV2:t.userInfo.statsV2,uniqueId:t.userInfo.user.uniqueId})),t}catch(e){return{statusCode:-1}}}))},postCommitFollowUser(t){return k(this,void 0,void 0,(function*(){try{const i=e(P).users[t.uniqueId];if(!i)return;const o=(0,w.T)(),{id:s,secUid:a="",relation:l=-1}=i,h=(0,b.gN)(l),_={type:1===h?1:0,action_type:1===h?1:0,user_id:s,sec_user_id:a,from:18,channel_id:0,from_pre:0},{uniqueId:y,useFollowV2:k,resetWebappQuery:O,group_id:S,enter_method:E="click_direct_btn",action_position:x}=t,T=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{i.d(t,{A7:()=>f,HF:()=>g,XY:()=>b,gN:()=>y});var n,o=i(37745),r=i(79479),s=i.n(r),a=i(98885),l=i.n(a),c=i(6226),d=i.n(c);!function(e){e[e.FollowNormal=0]="FollowNormal",e[e.FollowPrivate=1]="FollowPrivate",e[e.FollowFollower=2]="FollowFollower",e[e.Unfollow=3]="Unfollow"}(n||(n={}));const u=["roomId"],v=["uniqueId","avatarThumb","avatarMedium","avatarLarger","nickname","signature"],p="uniqueIdModifyTime",h="nickNameModifyTime",m="ttSeller";function g(e,t,i){var n,r;if(!e)return t;const a=null!==(n=t.relation)&&void 0!==n?n:e.relation,c=d()({},e,t,{extraInfo:{followed:(0,o.z)(a,null===(r=e.extraInfo)||void 0===r?void 0:r.followed)}},((e,t,n)=>"canExpPlaylist"===n?e||t:!u.includes(n)&&l()(t)?e:(i||!v.includes(n)||s()(e)&&!s()(t))&&(n!==p&&n!==m&&n!==h||t)?void 0:e));return i&&void 0===t.roomId&&c.roomId&&(c.roomId=void 0),c}function _({relation:e,handleIsUnfollow:t,handleIsFollow:i}){switch(e){case 0:case-1:case 4:case 5:case 6:return t();default:return i()}}function f({current:e,targetUser:t}){const i=function(e){var t;return _({relation:null!==(t=e.relation)&&void 0!==t?t:-1,handleIsUnfollow:()=>{var t;return e.privateAccount?1:(null===(t=e.extraInfo)||void 0===t?void 0:t.followed)||6===e.relation?2:0},handleIsFollow:()=>3})}(t);switch(i){case 3:return 0;case 0:return _({relation:e,handleIsFollow:()=>e,handleIsUnfollow:()=>1});case 1:return _({relation:e,handleIsFollow:()=>e,handleIsUnfollow:()=>3});case 2:return _({relation:e,handleIsFollow:()=>e,handleIsUnfollow:()=>2});default:return _({relation:e,handleIsFollow:()=>e,handleIsUnfollow:()=>-1})}}function y(e){return _({relation:e,handleIsUnfollow:()=>1,handleIsFollow:()=>0})}function b({stats:e,statsV2:t}){var i,n,o,r,s,a,l,c,d,u,v,p,h,m;return{followingCount:BigInt(null!==(n=null!==(i=null==t?void 0:t.followingCount)&&void 0!==i?i:null==e?void 0:e.followingCount)&&void 0!==n?n:0),followerCount:BigInt(null!==(r=null!==(o=null==t?void 0:t.followerCount)&&void 0!==o?o:null==e?void 0:e.followerCount)&&void 0!==r?r:0),heartCount:BigInt(null!==(a=null!==(s=null==t?void 0:t.heartCount)&&void 0!==s?s:null==e?void 0:e.heartCount)&&void 0!==a?a:0),videoCount:BigInt(null!==(c=null!==(l=null==t?void 0:t.videoCount)&&void 0!==l?l:null==e?void 0:e.videoCount)&&void 0!==c?c:0),diggCount:BigInt(null!==(u=null!==(d=null==t?void 0:t.diggCount)&&void 0!==d?d:null==e?void 0:e.diggCount)&&void 0!==u?u:0),heart:BigInt(null!==(p=null!==(v=null==t?void 0:t.heart)&&void 0!==v?v:null==e?void 0:e.heart)&&void 0!==p?p:0),friendCount:BigInt(null!==(m=null!==(h=null==t?void 0:t.friendCount)&&void 0!==h?h:null==e?void 0:e.friendCount)&&void 0!==m?m:0)}}},41548:(e,t,i)=>{i.d(t,{T:()=>o});var n=i(77966);const o=(0,i(39785).M)({csr:()=>n.Ay.t})},38771:(e,t,i)=>{i.d(t,{Q3:()=>h,dv:()=>g,hy:()=>p,jD:()=>d,uI:()=>m});var n=i(14374),o=i(31209),r=i(32125),s=i(7892),a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o({setVideoInfo(e){var{itemId:i}=e,n=a(e,["itemId"]);t(d,(e=>{var t;return{[i]:Object.assign(Object.assign(Object.assign({},l),"video"===(null===(t=e[i])||void 0===t?void 0:t.contentType)&&e[i]),n)}}))},setPhotoInfo(e){var{itemId:i}=e,n=a(e,["itemId"]);t(d,(e=>{var t;return{[i]:Object.assign(Object.assign(Object.assign({},c),"photo"===(null===(t=e[i])||void 0===t?void 0:t.contentType)&&e[i]),n)}}))}}))),m=e=>v((t=>e in t&&t[e]&&"video"===t[e].contentType?t[e]:l),r.bN),g=e=>v((t=>e in t&&t[e]&&"photo"===t[e].contentType?t[e]:c),r.bN)},41735:(e,t,i)=>{i.d(t,{Jw:()=>_,QH:()=>g,T8:()=>m,u7:()=>f});var n=i(97895),o=i(57431),r=i(39785),s=i(56070),a=i(54888),l=i(7892),c=i(14374),d=i(31209),u=i(89049),v=i(91286),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const h=(0,r.M)({csr:e=>p(void 0,void 0,void 0,(function*(){const t=yield(0,n.e)();return s.h.get("/api/challenge/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:t.join(",")}),baseUrlType:2})}))}),m=(0,c._)((0,l.p)("challengeListAtom@tiktok/webapp-atoms",u.hA),{rehydrationKey:"desktop.challengePage.challengeList"}),{useAtomService:g,useServiceDispatchers:_,useServiceState:f}=(0,d.i)(m,((e,t)=>({getChallengeList(i){var n;return p(this,void 0,void 0,(function*(){try{const{cursor:r="0"}=e(m),{challengeID:s}=i,{language:l}=(0,o.x)(),{bizContext:c}=e(a.A);t(m,(e=>Object.assign(Object.assign({},e),{loading:!0})));const d=yield h({challengeID:s,language:l,cursor:r,aid:u.xE,count:u.vu,coverFormat:null===(n=null==c?void 0:c.videoCoverSettings)||void 0===n?void 0:n.format});(0,v.Tj)(e,t,m,"challenge",d)}catch(e){(0,v.e_)(t,m)}}))},resetChallengeList(){t(m,u.hA)}})))},79217:(e,t,i)=>{i.d(t,{WX:()=>m,ek:()=>p,lE:()=>g,pp:()=>h});var n=i(57431),o=i(39785),r=i(56070),s=i(7892),a=i(14374),l=i(31209),c=i(89049),d=i(91286),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const v=(0,o.M)({csr:e=>u(void 0,void 0,void 0,(function*(){return r.h.get("/api/collection/item_list/",{query:e,baseUrlType:2})}))}),p=(0,a._)((0,s.p)("collectionListAtom@tiktok/webapp-atoms",c.hA),{rehydrationKey:"desktop.collectionPage.collectionList"}),{useAtomService:h,useServiceDispatchers:m,useServiceState:g}=(0,l.i)(p,((e,t)=>({getCollectionList(i){return u(this,void 0,void 0,(function*(){try{const{collectionId:o}=i,r=e(p),{cursor:s="0"}=r,{language:a,abTestVersion:l}=(0,n.x)();t(p,(e=>Object.assign(Object.assign({},e),{loading:!0})));const u=yield v({collectionId:o,language:a,cursor:s,aid:c.xE,count:c.vu,sourceType:113,clientABVersions:null==l?void 0:l.versionName});(0,d.Tj)(e,t,p,"collection",u)}catch(e){(0,d.e_)(t,p)}}))},resetCollectionList(){t(p,Object.assign({},c.hA))},addItems(e,i){t(p,(t=>{const{list:n,browserList:o}=(0,d.kf)(t,e,{itemListKey:"collection",addToHead:i});return Object.assign(Object.assign({},t),{list:n,browserList:o})}))},deleteItems(e){(0,d.UJ)(t,p,e)}})))},89049:(e,t,i)=>{i.d(t,{$H:()=>l,Bu:()=>a,HF:()=>d,Kq:()=>s,hA:()=>n,n9:()=>c,vu:()=>r,xE:()=>o});const n={statusCode:0,hasMore:!0,cursor:"0",loading:!0,preloadList:[],browserList:[],list:[],items:[]},o=1988,r=30,s=15,a="w_g_fyp_vv",l="w_g_vv",c="tiktok_webapp_theme_source",d="tiktok_webapp_theme_manual"},39415:(e,t,i)=>{i.d(t,{BX:()=>p,DK:()=>u,ag:()=>h,sK:()=>v});var n=i(57431),o=i(56070),r=i(7892),s=i(14374),a=i(31209),l=i(89049),c=i(91286),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const u=(0,s._)((0,r.p)("creatorTabListAtom@tiktok/webapp-atoms",l.hA),{rehydrationKey:"desktop.creatorTabPage.creatorTabList"}),{useAtomService:v,useServiceDispatchers:p,useServiceState:h}=(0,a.i)(u,((e,t)=>({getCreatorTabList(i){return d(this,void 0,void 0,(function*(){try{const{secUid:r,createTime:s,fetchType:a}=i,{language:v}=(0,n.x)();t(u,(e=>Object.assign(Object.assign({},e),{loading:!0})));const p={aid:l.xE,count:l.Kq,cursor:String(s),secUid:r,type:a,language:v},h=yield(e=>d(void 0,void 0,void 0,(function*(){return o.h.get("/api/creator/item_list/",{query:e,baseUrlType:2})})))(p),m={secUid:r,addToHead:2===a};(0,c.Tj)(e,t,u,"creator_tab",h,m),t(u,(e=>{var t,i;return Object.assign(Object.assign({},e),{hasMorePrevious:null!==(t=h.hasMorePrevious)&&void 0!==t&&t,hasMoreLatest:null!==(i=h.hasMoreLatest)&&void 0!==i&&i})}))}catch(e){(0,c.e_)(t,u)}}))},resetCreatorTabList(){t(u,l.hA)}})))},91286:(e,t,i)=>{i.d(t,{Qw:()=>b,bp:()=>P,e_:()=>S,Tj:()=>E,Fx:()=>x,UJ:()=>T,kf:()=>O,X9:()=>y,Jl:()=>w});var n=i(57431),o=i(45537),r=i.n(o),s=i(300),a=i.n(s),l=i(59952),c=i(84908),d=i(18499),u=i(60072),v=i(39785),p=i(57432),h=i.n(p),m=i(65852);const g=(0,v.M)({csr:h()});var _=i(86421);const f="live_",y=e=>!!e&&e.includes(f),b=e=>`${f}${e}`,w=e=>2===(null==e?void 0:e.containerType),k=e=>(null!=e?e:[]).filter((e=>2!==e.containerType)).map((e=>{var t,i,n,o;return{url:null!==(i=null===(t=e.video)||void 0===t?void 0:t.playAddr)&&void 0!==i?i:"",id:null!==(o=null===(n=e.video)||void 0===n?void 0:n.id)&&void 0!==o?o:""}})),P=({list:e})=>e.reduce(((e,{id:t,showNotPass:i,takeDown:n})=>(!i&&6!==n&&t&&e.push(t),e)),[]),O=(e,t,i)=>{const{itemListKey:n,addToHead:o}=i,{list:s,browserList:l}=e,c=a()(t,"id").filter((e=>!s.includes(e.id))),d="topic"===n||"messages"===n;if("foryou"===n){const e=t.length,i=e-c.length;i&&(0,_.Jk)(i,s.length,e)}if(o)return{list:c.map((({id:e})=>e)).concat(s),browserList:[...P({list:c}),...l]};{const e=r()(s,c.map((({id:e})=>e)));return{list:d?s.concat(t.map((({id:e})=>e))):e,browserList:d?l.concat(P({list:t})):r()(l,P({list:t}))}}},S=(e,t)=>{e(t,(e=>Object.assign(Object.assign({},e),{loading:!1,statusCode:-1})))},E=(e,t,i,o,r,s)=>{var a,v,p,h;const _=e(i),{list:f,hasLocateItem:y}=_,{photoSensitiveVideosSetting:P}=e(l.x),{statusCode:S,hasMore:E=!0,itemList:x=[],cursor:T,log_pb:A,has_locate_item_id:C}=r,j=((e,t)=>{let i=(null!=e?e:[]).slice();const{user:o}=(0,n.x)(),{itemListKey:r,photoSensitiveVideosSetting:s,secUid:a}=t;return 1!==(null==o?void 0:o.photoSensitiveVideosSetting)&&(o||1!==s)||"user-post"===r&&(null==o?void 0:o.secUid)===a||!("video"!==r||i.length>1)||(i=i.filter((e=>2===e.containerType||4!==e.maskType))),i=i.map((e=>{var t;return w(e)&&(e.id=b(null===(t=e.liveRoomInfo)||void 0===t?void 0:t.roomID)),e})),i})(x,{itemListKey:o,photoSensitiveVideosSetting:P,secUid:null==s?void 0:s.secUid}),{list:L,browserList:I}=O(_,j,{itemListKey:o,addToHead:null==s?void 0:s.addToHead});(({currentList:e,itemList:t,statusCode:i,disableReportMore:n=!1,isPlayList:o=!1})=>{e.length&&!n&&m.L.handleListMore({is_success:t.length?1:0,error_code:i,popup_type:o?"playlist":void 0})})({currentList:f,itemList:j,statusCode:S,disableReportMore:null!==(a=null==s?void 0:s.disableReportMore)&&void 0!==a&&a,isPlayList:null!==(v=null==s?void 0:s.isPlayList)&&void 0!==v&&v}),g(null===(p=j[0])||void 0===p?void 0:p.video,o);const N=(e=>{const t=e.filter((e=>Boolean(e.author))).map((({author:e})=>e)),i=e.filter((e=>{var t;return Boolean(null===(t=e.liveRoomInfo)||void 0===t?void 0:t.ownerInfo)})).map((e=>Object.assign(Object.assign({},e.liveRoomInfo.ownerInfo),{roomId:e.liveRoomInfo.roomID})));return t.concat(i)})(j),M=((e,t)=>e.map((e=>Object.assign(Object.assign({},e),{logId:t}))))(j,null==A?void 0:A.impr_id),R={statusCode:S,hasMore:E,cursor:T,list:L,loading:!1,browserList:I,preloadList:[...null!==(h=_.preloadList)&&void 0!==h?h:[],...k(j)],items:M,hasLocateItem:!!y||C};(0,d.unstable_batchedUpdates)((()=>{(0,c.Gp)().multiSetUser(N),(0,u.ud)().multiSetItem(M),t(i,R)}))},x=(e,t,i)=>{e(t,(e=>Object.assign(Object.assign({},e),{list:e.list.filter((e=>e!==i)),browserList:e.browserList.filter((e=>e!==i))})))},T=(e,t,i)=>{const n=new Set(i);e(t,(e=>Object.assign(Object.assign({},e),{list:e.list.filter((e=>!n.has(e))),browserList:e.browserList.filter((e=>!n.has(e)))})))}},35043:(e,t,i)=>{var n,o;i.d(t,{FB:()=>s,r8:()=>r}),function(e){e.ForYou="foryou",e.Challenge="challenge",e.ChallengeNew="challenge_new",e.Channel="channel",e.Find="find",e.Following="following",e.Video="video",e.Music="music",e.MusicNew="music_new",e.User="user",e.UserPost="user-post",e.UserPostPublic="user-post-public",e.UserRepost="user-repost",e.UserLiked="user-liked",e.SearchTop="search_top",e.SearchVideo="search_video",e.SearchLive="search_live",e.Question="question",e.Playlist="playlist",e.Topic="topic",e.LiveEvent="live_event",e.VideoPlaylist="video_playlist",e.CreateVideoPlaylist="create_video_playlist",e.Sticker="sticker",e.Effect="effect",e.Messages="messages",e.Discover="discover",e.Poi="poi",e.PoiCategory="poi_category",e.Collection="collection",e.Explore="explore",e.Favorites="favorites",e.KeywordExpansion="keyword-expansion",e.CreatorTab="creator_tab",e.Friends="friends",e.TrendingTopics="trending_topics"}(n||(n={})),function(e){e.HIGH="high",e.MEDIUM="medium",e.LOW="low"}(o||(o={}));const r={5:"foryou",11:"following",20:"friends",113:"topic",0:"video"},s={foryou:5,following:11,friends:20,topic:113,video:0,effect:129,user:1,"user-post":1,"user-post-public":1,"user-repost":1,"user-liked":1,explore:19,challenge:3,channel:122,collection:121,discover:103,find:124,live_event:114,messages:13,music:4,playlist:108,poi:18,poi_category:125,question:16,sticker:6}},72370:(e,t,i)=>{i.d(t,{H:()=>n});const n=8},79995:(e,t,i)=>{i.d(t,{IO:()=>h,Ql:()=>g,ZX:()=>m,dQ:()=>p});var n=i(57431),o=i(7892),r=i(14374),s=i(31209),a=i(89049),l=i(91286),c=i(51660),d=i(27666),u=i(72370),v=i(31241);const p=(0,r._)((0,o.p)("exploreListAtom@tiktok/webapp-atoms",a.hA),{rehydrationKey:"desktop.explorePage.exploreList"}),{useAtomService:h,useServiceDispatchers:m,useServiceState:g}=(0,s.i)(p,((e,t)=>({getExploreList(i){var o,r,s,h,m;return r=this,s=void 0,m=function*(){try{const{categoryType:r}=i,{language:s,abTestVersion:h}=(0,n.x)(),{list:m}=e(p),g=!(null==m?void 0:m.length)&&(0,v.mU)();t(p,(e=>Object.assign(Object.assign({},e),{loading:!0})));const _=yield(0,d.e)({language:(0,c.uk)(s),aid:a.xE,count:u.H,categoryType:r,clientABVersions:null==h?void 0:h.versionName,isNonPersonalized:(0,v.XN)(),enable_cache:g});(0,l.Tj)(e,t,p,"explore",_),g&&(0,v.zZ)(null!==(o=_.itemList)&&void 0!==o?o:[])}catch(e){(0,l.e_)(t,p)}},new((h=void 0)||(h=Promise))((function(e,t){function i(e){try{o(m.next(e))}catch(e){t(e)}}function n(e){try{o(m.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof h?o:new h((function(e){e(o)}))).then(i,n)}o((m=m.apply(r,s||[])).next())}))},resetExploreList(){t(p,a.hA)}})))},27666:(e,t,i)=>{i.d(t,{$:()=>l,e:()=>c});var n=i(39785),o=i(68881),r=i(56070),s=i(46311),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const l=e=>a(void 0,void 0,void 0,(function*(){return r.h.get("/api/record/impression/action/",{query:e,baseUrlType:2})})),c=(0,n.M)({csr:e=>a(void 0,void 0,void 0,(function*(){const t=(0,o.DV)("exploreItemList");return t?(s.P.emit("consume_prefetch_data",performance.now(),"unknown","exploreItemList"),t.catch((()=>(s.P.emit("consume_prefetch_data",performance.now(),"fail","exploreItemList"),r.h.get("/api/explore/item_list/",{query:e,baseUrlType:2}))))):r.h.get("/api/explore/item_list/",{query:e,baseUrlType:2})}))})},31241:(e,t,i)=>{i.d(t,{XN:()=>u,mU:()=>p,zZ:()=>h});var n=i(57431),o=i(71281),r=i(97086),s=i(58305),a=i(99374),l=i(27666),c=i(89049),d=i(51660);const u=()=>{var e;const{user:t}=(0,n.x)();let i;switch((0,o.d)("pc_non_personalized_explore")){case"v0":i=!0;break;case"v1":i=(0,a.eI)(null!==(e=null==t?void 0:t.uid)&&void 0!==e?e:"",!0,(0,r.fU)())}return i},v="ENABLED_EXPLORE_CDN_CACHE_TIME",p=()=>{const e="v1"===(0,o.d)("webapp_explore_cache");return Boolean(!(0,r.fU)()&&e&&(()=>{const e=Number((0,s._S)(v,"0"));return Date.now()/1e3-(e||0)>86400&&((0,s.AP)(v,String(Date.now()/1e3||0)),!0)})())},h=e=>{try{const{language:t,abTestVersion:i}=(0,n.x)();(0,l.$)({aid:c.xE,language:(0,d.uk)(t),itemIds:e.map((e=>e.id)).join(","),clientABVersions:null==i?void 0:i.versionName,isNonPersonalized:u(),isForYouFeedImpression:!1})}catch(e){console.error("Record Impression Action failed in /api/explore/item_list with CDN Cache",e)}}},61918:(e,t,i)=>{i.d(t,{Cg:()=>u,D3:()=>a});var n=i(7892),o=i(14374),r=i(31209),s=i(89049);const a=(0,o._)((0,n.p)("messageListAtom@tiktok/webapp-atoms",s.hA),{rehydrationKey:"desktop.messagePage.messageList"}),{useAtomService:l,useServiceDispatchers:c,useServiceState:d,getStaticApi:u}=(0,r.i)(a,((e,t)=>({setItemListById(e){const{list:i,statusCode:n=0,hasMore:o=!0,cursor:r,level:s}=e;t(a,(e=>Object.assign(Object.assign({},e),{list:i,browserList:i,statusCode:n,hasMore:o,cursor:r,level:s})))},getBrowserList:()=>e(a).browserList})))},43227:(e,t,i)=>{i.d(t,{Ag:()=>g,DC:()=>_,l6:()=>m,pT:()=>f});var n=i(97895),o=i(57431),r=i(39785),s=i(56070),a=i(54888),l=i(7892),c=i(14374),d=i(31209),u=i(89049),v=i(91286),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const h=(0,r.M)({csr:e=>p(void 0,void 0,void 0,(function*(){const t=yield(0,n.e)();return s.h.get("/api/music/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:t.join(",")}),baseUrlType:2})}))}),m=(0,c._)((0,l.p)("musicListAtom@tiktok/webapp-atoms",u.hA),{rehydrationKey:"desktop.musicPage.musicList"}),{useAtomService:g,useServiceDispatchers:_,useServiceState:f}=(0,d.i)(m,((e,t)=>({getMusicList(i){var n;return p(this,void 0,void 0,(function*(){const r=e(m);try{const{musicID:s}=i,{cursor:l="0"}=r,{language:c}=(0,o.x)(),{bizContext:d}=e(a.A);t(m,(e=>Object.assign(Object.assign({},e),{loading:!0})));const p=yield h({musicID:s,language:c,cursor:l,aid:u.xE,count:u.vu,coverFormat:null===(n=null==d?void 0:d.videoCoverSettings)||void 0===n?void 0:n.format});(0,v.Tj)(e,t,m,"music",p)}catch(e){(0,v.e_)(t,m)}}))},resetMusicList(){t(m,u.hA)}})))},29909:(e,t,i)=>{i.d(t,{HG:()=>L,e4:()=>T,sL:()=>C,NY:()=>A,Lu:()=>j});var n=i(57431),o=i(51660),r=i(54888),s=i(97086),a=i(58305),l=i(97071),c=i(8046),d=i(14107),u=i(7892),v=i(14374),p=i(31209),h=i(35267),m=i(89049),g=i(91286),_=i(2408),f=i(79238),y=i(39785),b=i(68881),w=i(56070),k=i(46311),P=i(97895),O=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const S=(0,y.M)({csr:e=>O(void 0,void 0,void 0,(function*(){const t=(0,b.t$)("recommendItemList");if(t)return t;const i=(0,b.DV)("recommendItemList"),n=yield(0,P.e)();return i?(k.P.emit("consume_prefetch_data",performance.now(),"unknown","recommendItemList"),i.catch((()=>(k.P.emit("consume_prefetch_data",performance.now(),"fail","recommendItemList"),w.h.get("/api/recommend/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:n.join(",")}),baseUrlType:2}))))):w.h.get("/api/recommend/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:n.join(",")}),baseUrlType:2})}))});var E=i(96563),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const T=(0,v._)((0,u.p)("recommendListAtom@tiktok/webapp-atoms",m.hA),{rehydrationKey:"desktop.forYouPage.recommendList"}),{useAtomService:A,useServiceDispatchers:C,useServiceState:j,getStaticApi:L}=(0,p.i)(T,((e,t)=>({getRecommendList(i,u=!1){var v,p,y,b,k;return x(this,void 0,void 0,(function*(){const P=u?E.Hx:T,x=u?"video":"foryou";try{const E=e(P),{bizContext:T}=e(r.A),{language:C,abTestVersion:j}=(0,n.x)(),{itemId:L,watchLiveLastTime:I,device_type:N,fromPage:M,pullType:R=2,ttamParams:D={},isNonPersonalized:U=!1,playModeForTea:F="one_column",fypFeederItemId:V,fetchCount:B,enableCDNCache:q}=i,z=(0,s.fU)()?U:(0,_.PJ)(e(_.WH)),H=(0,o.uk)(C);let Y=30;const W=null!=B?B:null===(v=null==j?void 0:j.parameters.change_list_length_new)||void 0===v?void 0:v.vid;W&&(Y=Number(W));const $=Object.assign(Object.assign({isNonPersonalized:z,aid:m.xE,count:1===R?6:Y,insertedItemID:L,language:H,clientABVersions:null==j?void 0:j.versionName,pullType:R,watchLiveLastTime:I,device_type:N},D),{coverFormat:null===(p=null==T?void 0:T.videoCoverSettings)||void 0===p?void 0:p.format,itemID:V,vv_count_fyp:parseInt((0,a._S)(m.Bu,"0"),10)||0}),G=function(e,t,i){var r,s,l;const{language:c="en",abTestVersion:d}=null!==(r=(0,n.x)())&&void 0!==r?r:{},{itemId:u,watchLiveLastTime:v,device_type:p,pullType:g=2,ttamParams:_={},fypFeederItemId:f,fetchCount:y,enableCDNCache:b}=e,w=(0,o.uk)(c);let k=30;const P=null!=y?y:null===(s=null==d?void 0:d.parameters.change_list_length_new)||void 0===s?void 0:s.vid;return P&&(k=Number(P)),Object.assign(Object.assign({isNonPersonalized:i,aid:m.xE,count:1===g?6:k,insertedItemID:u,language:w,clientABVersions:null==d?void 0:d.versionName,pullType:g,watchLiveLastTime:v,device_type:p},_),{coverFormat:null===(l=null==t?void 0:t.videoCoverSettings)||void 0===l?void 0:l.format,itemID:f,vv_count_fyp:parseInt((0,a._S)(m.Bu,"0"),10)||0,vv_count:parseInt((0,a._S)(m.$H,"0"),10)||0,cpu_core_number:"undefined"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:0,dark_mode:"dark"===(0,h.MJ)(m.n9)&&"1"===(0,h.MJ)(m.HF),time_of_day:(new Date).getHours(),day_of_week:(new Date).getDay(),enable_cache:Boolean(b),user_is_login:!b&&void 0})}(i,T,z);console.debug("[getRecommendList]","originParams",$,"expParams",G,JSON.stringify(G)===JSON.stringify($));const K="v2"!==(null===(b=null===(y=null==j?void 0:j.parameters)||void 0===y?void 0:y.foryou_prefetch)||void 0===b?void 0:b.vid)?$:G;M&&Object.assign(K,{from_page:M}),t(P,(e=>Object.assign(Object.assign({},e),{loading:!0})));const Z=yield S(K),J=function(e,t){const{adsOffset:i=0,itemList:n}=t,o=Number(i),r=null==n?void 0:n[o];if(!(null==r?void 0:r.isTT4BAds))return t;const s=o>=e?o-e:0;return null==n||n.splice(o,1),null==n||n.splice(s,0,r),t.itemList=n,t}(E.list.length,Z),X=null!==(k=J.itemList)&&void 0!==k?k:[];X.forEach((e=>{var t;if(e.ad_info){const t=(0,l.n5)({ad_info:e.ad_info,play_mode:F});c.pg.handleReceive(t)}d.j.handleVideoReceive({item_id:e.id,group_id:null===(t=null==e?void 0:e.video)||void 0===t?void 0:t.id})})),u||t(f.R,J),(0,g.Tj)(e,t,P,x,J);try{q&&(A={aid:m.xE,language:H,itemIds:X.map((e=>e.id)).join(","),clientABVersions:null==j?void 0:j.versionName,isNonPersonalized:z,isForYouFeedImpression:!0},O(void 0,void 0,void 0,(function*(){return w.h.get("/api/record/impression/action/",{query:A,baseUrlType:2})})))}catch(e){console.error("Record Impression Action failed in /api/recommend/item_list with CDN Cache",e)}}catch(e){(0,h.mH)().warn("getRecommendList err",e),(0,g.e_)(t,P)}var A}))},setDeleteVideo(e){(0,g.Fx)(t,T,e)},setListFromCache(i){(0,g.Tj)(e,t,T,"foryou",i,{disableReportMore:!0})},getFeedCacheList(){var t;return x(this,void 0,void 0,(function*(){try{const{bizContext:s}=e(r.A),{language:l,abTestVersion:c}=(0,n.x)(),d=(0,_.PJ)(e(_.WH)),u={count:3,language:(0,o.uk)(l),coverFormat:null===(t=null==s?void 0:s.videoCoverSettings)||void 0===t?void 0:t.format,isNonPersonalized:d,vv_count_fyp:parseInt((0,a._S)(m.Bu,"0"),10)||0,clientABVersions:null==c?void 0:c.versionName};return yield(i=u,O(void 0,void 0,void 0,(function*(){return w.h.get("/api/preload/item_list/",{query:i,baseUrlType:2})})))}catch(e){return null}var i}))},resetRecommendList(e){t(T,Object.assign(Object.assign({},m.hA),e))},setRecommendListById(e){const{list:i,browserList:n,preloadList:o}=e;t(T,(e=>Object.assign(Object.assign({},e),{list:i,browserList:null!=n?n:i,preloadList:o})))}})))},79238:(e,t,i)=>{i.d(t,{R:()=>s,Z:()=>a});var n=i(14374),o=i(31209),r=i(7892);const s=(0,n._)((0,r.p)("recommendListResponseAtom@tiktok/webapp-atoms",{statusCode:0}),{rehydrationKey:"desktop.forYouPage.recommendListResponse"}),{useServiceState:a}=(0,o.i)(s,(()=>({})))},96563:(e,t,i)=>{i.d(t,{AM:()=>f,Hx:()=>_,ND:()=>y,OU:()=>w,mY:()=>b});var n=i(51660),o=i(97895),r=i(57431),s=i(56070),a=i(54888),l=i(7892),c=i(14374),d=i(31209),u=i(2408),v=i(89049),p=i(91286),h=i(34308),m=i(60072),g=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const _=(0,c._)((0,l.p)("relatedListAtom@tiktok/webapp-atoms",v.hA),{rehydrationKey:"desktop.videoPage.relatedList"}),{useAtomService:f,useServiceDispatchers:y,useServiceState:b,getStaticApi:w}=(0,d.i)(_,((e,t)=>({getRelatedList(i){var l,c,d,f,y,b;return g(this,void 0,void 0,(function*(){try{const{loading:k,hasMore:P,cursor:O="0"}=e(_);if(k)return;const{itemId:S,secUid:E}=i,{language:x,abTestVersion:T,user:A}=(0,r.x)(),{bizContext:C}=e(a.A),j=(0,n.uk)(x),L=null===(l=null==C?void 0:C.videoCoverSettings)||void 0===l?void 0:l.format,I=(0,u.PJ)(e(u.WH)),N=null!==(d=null===(c=e(m.Pu)[S])||void 0===c?void 0:c.CategoryType)&&void 0!==d?d:0,M=null!==(y=null===(f=null==T?void 0:T.parameters.video_detail_yml_creator)||void 0===f?void 0:f.vid)&&void 0!==y?y:"v0",R="v0"!==M&&!A,D="v2"===M;let U;t(_,(e=>Object.assign(Object.assign({},e),{loading:!0}))),R&&E&&P?(U=yield(0,h.Ob)({aid:v.xE,count:16,cursor:O,secUid:E,language:j,coverFormat:L}),U.itemList=null===(b=U.itemList)||void 0===b?void 0:b.filter((e=>(D||!e.isPinnedItem)&&!e.imagePost)),U.hasMore=!!(U.itemList&&U.itemList.length>3)&&U.hasMore):U=yield(w={aid:v.xE,count:16,itemID:S,language:j,coverFormat:L,isNonPersonalized:I,clientABVersions:null==T?void 0:T.versionName,cursor:O,CategoryType:N},g(void 0,void 0,void 0,(function*(){const e=yield(0,o.e)();return s.h.get("/api/related/item_list/",{query:Object.assign(Object.assign({},w),{clientABVersions:e.join(",")}),baseUrlType:2})}))),(0,p.Tj)(e,t,_,"video",U)}catch(e){(0,p.e_)(t,_)}var w}))},resetRelatedList(){t(_,v.hA)}})))},92032:(e,t,i)=>{i.d(t,{Ag:()=>m,Ds:()=>_,jf:()=>g});var n=i(7892),o=i(31209),r=i(99765),s=i(93751),a=i(58351),l=i(57717),c=i(44630),d=i(89049),u=i(91286);const v=(0,n.p)("atomsMapForItemListKey@tiktok/webapp-atoms",{"user-post":s.HP,"user-repost":a.O0,"user-liked":r.MQ,favorites:l.h9}),p=(0,n.p)("userItemListAtom@tiktok/webapp-atoms",(e=>({"user-post":e(s.HP),"user-repost":e(a.O0),"user-liked":e(r.MQ),favorites:e(l.h9)})),(()=>{})),{useAtomService:h,useServiceDispatchers:m,useServiceState:g,getStaticApi:_}=(0,o.i)(p,((e,t)=>({setLoading(i,n){(0,c.yI)(i)&&t(e(v)[i],(e=>Object.assign(Object.assign({},e),{loading:n})))},getItemList(e,t){return i=this,n=void 0,c=function*(){switch(e){case"user-post":default:return(0,s.s5)().getItemList(t);case"user-repost":return(0,a.rg)().getItemList(t);case"user-liked":return(0,r.vz)().getItemList(t);case"favorites":return(0,l.k6)().getItemList(t)}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{a(c.next(e))}catch(e){t(e)}}function s(e){try{a(c.throw(e))}catch(e){t(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,s)}a((c=c.apply(i,n||[])).next())}));var i,n,o,c},setDeleteVideo(i){for(const[n,o]of Object.entries(e(v)))"user-post"===n?(0,s.s5)().setDeleteVideoForUserPostAtom(i):(0,u.Fx)(t,o,i)},resetItemList(i){(0,c.yI)(i)&&t(e(v)[i],d.hA)},resetAllLists(e=!1){(0,s.s5)().resetAllLists(e),(0,a.rg)().resetItemList(e),t(r.MQ,d.hA),t(l.h9,d.hA)}})))},57717:(e,t,i)=>{i.d(t,{h9:()=>v,iK:()=>m,k6:()=>g});var n=i(56070),o=i(7892),r=i(14374),s=i(31209),a=i(89049),l=i(91286),c=i(44630),d=i(97895),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const v=(0,r._)((0,o.p)("userFavoriteListAtom@tiktok/webapp-atoms",a.hA),{rehydrationKey:"desktop.userPage.userFavoriteList"}),{useAtomService:p,useServiceDispatchers:h,useServiceState:m,getStaticApi:g}=(0,s.i)(v,((e,t)=>({setLoading(e){t(v,(t=>Object.assign(Object.assign({},t),{loading:e})))},getItemList(i){return u(this,void 0,void 0,(function*(){try{t(v,(e=>Object.assign(Object.assign({},e),{loading:!0})));const o=(0,c.bv)(e,v,i),r=yield(e=>u(void 0,void 0,void 0,(function*(){const t=yield(0,d.e)();return n.h.get("/api/user/collect/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:t.join(",")}),baseUrlType:2})})))(o);(0,l.Tj)(e,t,v,"favorites",r,{secUid:i.secUid}),t(v,(e=>{var t;return Object.assign(Object.assign({},e),{total:String(null!==(t=r.total)&&void 0!==t?t:0)})}))}catch(e){(0,l.e_)(t,v)}}))},resetItemList(){t(v,a.hA)}})))},99765:(e,t,i)=>{i.d(t,{MQ:()=>v,cI:()=>h,vz:()=>g});var n=i(56070),o=i(7892),r=i(14374),s=i(31209),a=i(89049),l=i(91286),c=i(44630),d=i(97895),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const v=(0,r._)((0,o.p)("userLikedListAtom@tiktok/webapp-atoms",a.hA),{rehydrationKey:"desktop.userPage.userLikedList"}),{useAtomService:p,useServiceDispatchers:h,useServiceState:m,getStaticApi:g}=(0,s.i)(v,((e,t)=>({setLoading(e){t(v,(t=>Object.assign(Object.assign({},t),{loading:e})))},getItemList(i){return u(this,void 0,void 0,(function*(){try{t(v,(e=>Object.assign(Object.assign({},e),{loading:!0})));const o=(0,c.bv)(e,v,i),r=yield(e=>u(void 0,void 0,void 0,(function*(){const t=yield(0,d.e)();return n.h.get("/api/favorite/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:t.join(",")}),baseUrlType:2})})))(o);(0,l.Tj)(e,t,v,"user-liked",r,{secUid:i.secUid})}catch(e){(0,l.e_)(t,v)}}))},resetItemList(){t(v,a.hA)}})))},34308:(e,t,i)=>{i.d(t,{Ku:()=>_,Ob:()=>g,Tx:()=>w,Ym:()=>m,gT:()=>y});var n=i(7892),o=i(14374),r=i(31209),s=i(89049),a=i(91286),l=i(44630),c=i(39785),d=i(68881),u=i(56070),v=i(46311),p=i(97895),h=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const m=(0,o._)((0,n.p)("userPostListLatestAtom@tiktok/webapp-atoms",s.hA),{rehydrationKey:"desktop.userPage.userPostListLatest"}),g=(0,c.M)({csr:e=>h(void 0,void 0,void 0,(function*(){const t=(0,d.t$)("userPostList");if(t)return t;const i=yield(0,p.e)(),n=(0,d.DV)("userPostList");return n?(v.P.emit("consume_prefetch_data",performance.now(),"unknown","userPostList"),n.catch((()=>(v.P.emit("consume_prefetch_data",performance.now(),"fail","userPostList"),u.h.get("/api/post/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:i.join(",")}),baseUrlType:2}))))):u.h.get("/api/post/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:i.join(",")}),baseUrlType:2})}))}),_=e=>{const{useAtomService:t,useServiceDispatchers:i,useServiceState:n,getStaticApi:o}=(0,r.i)(e,((t,i)=>({setLoading(t){i(e,(e=>Object.assign(Object.assign({},e),{loading:t})))},getItemList(n){var o;return h(this,void 0,void 0,(function*(){try{i(e,(e=>Object.assign(Object.assign({},e),{loading:!0})));const{secUid:r,userId:s,count:c,postItemListRequestType:u,filterPhotoContent:v,locateItemID:p,needPinnedItemIds:h=!0}=n,m=(0,l.bv)(t,e,Object.assign({secUid:r,userId:s,count:null!=c?c:d.M4,postItemListRequestType:u,needPinnedItemIds:h},p&&{locateItemID:p})),_=g(m);i(e,(e=>Object.assign(Object.assign({},e),{prevPromise:_})));const f=yield _;if(t(e).prevPromise!==_)return;v&&(f.itemList=null===(o=f.itemList)||void 0===o?void 0:o.filter((e=>!e.imagePost))),(0,a.Tj)(t,i,e,"user-post",f,{secUid:r})}catch(t){console.log("in utils, error getItemList!"),(0,a.e_)(i,e)}}))},resetItemList(){i(e,s.hA)}})));return{useAtomService:t,useServiceDispatchers:i,useServiceState:n,getStaticApi:o}},{useAtomService:f,useServiceDispatchers:y,useServiceState:b,getStaticApi:w}=_(m)},93751:(e,t,i)=>{i.d(t,{s5:()=>x,BS:()=>S,ch:()=>O,I4:()=>E,eW:()=>w,yR:()=>k,HP:()=>P});var n=i(7892),o=i(31209),r=i(89049),s=i(44630),a=i(34308);const l=(0,n.p)("userPostListPopularAtom@tiktok/webapp-atoms",r.hA),{useAtomService:c,useServiceDispatchers:d,useServiceState:u,getStaticApi:v}=(0,a.Ku)(l),p=(0,n.p)("userPostListOldestAtom@tiktok/webapp-atoms",r.hA),{useAtomService:h,useServiceDispatchers:m,useServiceState:g,getStaticApi:_}=(0,a.Ku)(p);var f=i(91286);const y=(0,n.p)("atomsMapForPostItemListRequestType@tiktok/webapp-atoms",{0:a.Ym,1:l,2:p}),b=(0,n.p)("sortTypeAtom@tiktok/webapp-atoms",0),{useAtomService:w,useServiceState:k}=(0,o.i)(b,((e,t)=>({setUserPostSortType(e){t(b,e)}}))),P=(0,n.p)("userPostListAtom@tiktok/webapp-atoms",(e=>{const t=e(b),i=e(y)[t];return e(i)}),(()=>{})),{useAtomService:O,useServiceDispatchers:S,useServiceState:E,getStaticApi:x}=(0,o.i)(P,((e,t)=>({setLoading(i){(0,s.K8)(e(b))&&t(e(y)[e(b)],(e=>Object.assign(Object.assign({},e),{loading:i})))},getItemList(t){return i=this,n=void 0,r=function*(){switch(e(b)){case 0:default:return t.postItemListRequestType=0,(0,a.Tx)().getItemList(t);case 1:return t.postItemListRequestType=1,v().getItemList(t);case 2:return t.postItemListRequestType=2,_().getItemList(t)}},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r},resetItemList(){(0,s.K8)(e(b))&&t(e(y)[e(b)],r.hA)},resetAllLists(e=!1){t(b,0),t(a.Ym,e?e=>Object.assign({prevPromise:e.prevPromise},r.hA):r.hA),t(l,e?e=>Object.assign({prevPromise:e.prevPromise},r.hA):r.hA),t(p,e?e=>Object.assign({prevPromise:e.prevPromise},r.hA):r.hA)},setDeleteVideoForUserPostAtom(i){for(const n of Object.values(e(y)))(0,f.Fx)(t,n,i)}})))},58351:(e,t,i)=>{i.d(t,{O0:()=>h,rg:()=>f,to:()=>_,zu:()=>m});var n=i(56070),o=i(7892),r=i(14374),s=i(31209),a=i(39785),l=i(89049),c=i(91286),d=i(44630),u=i(97895),v=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const p=(0,a.M)({csr:e=>v(void 0,void 0,void 0,(function*(){const t=yield(0,u.e)();return n.h.get("/api/repost/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:t.join(",")}),baseUrlType:2})}))}),h=(0,r._)((0,o.p)("userRepostListAtom@tiktok/webapp-atoms",l.hA),{rehydrationKey:"userPage.userRepostList"}),{useAtomService:m,useServiceDispatchers:g,useServiceState:_,getStaticApi:f}=(0,s.i)(h,((e,t)=>({setLoading(e){t(h,(t=>Object.assign(Object.assign({},t),{loading:e})))},getItemList(i){return v(this,void 0,void 0,(function*(){try{t(h,(e=>Object.assign(Object.assign({},e),{loading:!0})));const n=(0,d.bv)(e,h,i),o=p(n);t(h,(e=>Object.assign(Object.assign({},e),{prevPromise:o})));const r=yield o;if(e(h).prevPromise!==o)return;(0,c.Tj)(e,t,h,"user-repost",r,{secUid:i.secUid})}catch(e){(0,c.e_)(t,h)}}))},resetItemList(e=!1){t(h,e?e=>Object.assign({prevPromise:e.prevPromise},l.hA):l.hA)}})))},44630:(e,t,i)=>{i.d(t,{K8:()=>u,bv:()=>c,yI:()=>d});var n=i(57431),o=i(54888),r=i(89049);const s=30,a=["user-post","user-repost","user-liked","favorites"],l=[0,1,2];function c(e,t,i){var a;const{secUid:l,userId:c,count:d,postItemListRequestType:u,locateItemID:v,needPinnedItemIds:p=!0}=i,h=e(t),{cursor:m="0"}=h,{language:g,region:_}=(0,n.x)(),{bizContext:f}=e(o.A);return Object.assign({secUid:l,aid:r.xE,count:null!=d?d:s,cursor:m,region:_,language:g,userId:c,coverFormat:null===(a=null==f?void 0:f.videoCoverSettings)||void 0===a?void 0:a.format,post_item_list_request_type:null!=u?u:0,needPinnedItemIds:p},v&&{locate_item_id:v})}function d(e){return void 0!==a.find((t=>t===e))}function u(e){return void 0!==l.find((t=>t===e))}},92597:(e,t,i)=>{i.d(t,{D:()=>_}),i(57432);var n=i(71281),o=i(41735),r=i(79217),s=i(39415),a=i(79995),l=i(43227),c=i(29909),d=i(96563),u=i(61918),v=i(93751),p=i(58351),h=i(99765),m=i(57717);const g=new Map([["foryou",c.e4],["music",l.l6],["explore",a.dQ],["challenge",o.T8],["creator_tab",s.DK],["user-post",v.HP],["user-repost",p.O0],["user-liked",h.MQ],["favorites",m.h9],["messages",u.D3],["video",d.Hx]]),_=e=>{var t;if(!e)return;const i="v0"!==(null!==(t=(0,n.d)("webapp_collection_profile"))&&void 0!==t?t:"v0");return"collection"===e&&i?r.ek:g.get(e)}},60072:(e,t,i)=>{i.d(t,{ud:()=>I,Pu:()=>j,l8:()=>L,mG:()=>N,F3:()=>M,GB:()=>R});var n=i(71510),o=i.n(n),r=i(99789),s=i.n(r),a=i(18499),l=i(57431),c=i(40040),d=i(16891),u=i(6986),v=i(97071),p=i(24154),h=i(25342),m=i(67974),g=i(11983),_=i(53764),f=i(14374),y=i(31209),b=i(32125),w=i(7892),k=i(91286),P=i(84908),O=i(10287),S=i(41548),E=i(77170),x=i(56070),T=i(26325),A=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const j=(0,f._)((0,w.p)("itemAtom@tiktok/webapp-atoms",{}),{rehydrationKey:"webapp.item"}),{useAtomService:L,getStaticApi:I,useServiceDispatchers:N,useServiceState:M}=(0,y.i)(j,((e,t)=>({setItem(e){const{id:i}=e;t(j,(t=>Object.assign(Object.assign({},t),{[i]:(0,E.t)(e,t[i])})))},multiSetItem(i){const n=e(j),o=Object.assign({},n);i.forEach((e=>{const{id:t}=e;o[t]=(0,E.t)(e,n[t])})),t(j,o)},updateItem(i){e(j)[i.id]&&t(j,(e=>Object.assign(Object.assign({},e),{[i.id]:o()(e[i.id],i)})))},setLike(i){const{id:n,liked:o,count:r}=i,s=e(j)[n];s&&(s.stats&&(s.stats=Object.assign(Object.assign({},s.stats),{diggCount:r})),s.statsV2&&(s.statsV2=Object.assign(Object.assign({},s.statsV2),{diggCount:r.toString()})),t(j,(e=>Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},s),{digged:o})}))))},setCollect(i){const{id:n,collected:o,count:r}=i,s=e(j)[n];s&&(s.stats&&(s.stats=Object.assign(Object.assign({},s.stats),{collectCount:r})),s.statsV2&&(s.statsV2=Object.assign(Object.assign({},s.statsV2),{collectCount:r.toString()})),t(j,(e=>Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},s),{collected:o})}))))},setCommentCount(i){const{id:n,commentCount:o}=i,r=e(j)[n];r&&(r.stats&&(r.stats=Object.assign(Object.assign({},r.stats),{commentCount:o})),r.statsV2&&(r.statsV2=Object.assign(Object.assign({},r.statsV2),{commentCount:o.toString()})),t(j,(e=>Object.assign(Object.assign({},e),{[n]:Object.assign({},r)}))))},setResolutionList(t){const{resolutionList:i,id:n}=t,o=e(j)[n];if(!o)return;const r=["auto",...i.filter((e=>"auto"!==e))];o.resolutionList=r},prependRepost(i){const{id:n,reposted:o,currentUser:r,count:s}=i,a=e(j)[n];a&&(a.statsV2&&(a.statsV2=Object.assign(Object.assign({},a.statsV2),{repostCount:s.toString()})),t(j,(e=>{var t,i,s,l,c;const d=[...null!==(i=null===(t=e[n])||void 0===t?void 0:t.repostList)&&void 0!==i?i:[]];if(o)d.unshift(Object.assign(Object.assign({},r),{id:r.uid,avatarThumb:null!==(s=r.avatarUri[0])&&void 0!==s?s:"",avatarMedium:null!==(l=r.avatarUri[0])&&void 0!==l?l:"",avatarLarger:null!==(c=r.avatarUri[0])&&void 0!==c?c:"",nickname:r.nickName,relation:0}));else{const e=d.findIndex((e=>e.secUid===r.secUid));d.splice(e,1)}return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},a),{repostList:d})})})))},reduceOrIncreaseCommentCount(i){const{id:n,isReduce:o,min:r=0}=i,s=e(j),a=s[n];if(a){if(a.stats){const e=o?Math.max(r,a.stats.commentCount-1):a.stats.commentCount+1;a.stats=Object.assign(Object.assign({},a.stats),{commentCount:e})}if(a.statsV2){let e=o?BigInt(a.statsV2.commentCount)-BigInt(1):BigInt(a.statsV2.commentCount)+BigInt(1);eBoolean(e.author))).map((({author:e})=>e)),n=e.filter((e=>{var t;return Boolean((null===(t=null==e?void 0:e.liveRoomInfo)||void 0===t?void 0:t.ownerInfo)&&(0,k.Jl)(e))})).map((e=>Object.assign(Object.assign({},e.liveRoomInfo.ownerInfo),{roomId:e.liveRoomInfo.roomID}))),o=e.map((e=>Object.assign(Object.assign({},e),{logId:t}))),r=(0,P.Gp)();(0,a.unstable_batchedUpdates)((()=>{r.multiSetUser(i.concat(n)),this.multiSetItem(o)}))},postCollectVideo(t){var i,n,o,r;return C(this,void 0,void 0,(function*(){const s=e(j),a=e(P.p9),{itemId:l}=t,d=s[l],v=a.users[null!==(i=null==d?void 0:d.author)&&void 0!==i?i:""],{collected:p=!1,stats:h}=d,m=Number(null!==(n=null==h?void 0:h.collectCount)&&void 0!==n?n:0),g=p?2:1,_={aid:c.xE,itemId:l,action:g,secUid:null!==(o=null==v?void 0:v.secUid)&&void 0!==o?o:""};this.setCollect({id:l,collected:!p,count:p?Math.max(0,m-1):m+1});try{const e=yield function(e){return A(this,void 0,void 0,(function*(){return x.h.post("/api/item/collect/",{query:e,baseUrlType:2,headers:{[T.nk]:x.h.csrfToken}})}))}(_);u.W.handleFavoriteResult({group_id:l,author_id:null!==(r=null==v?void 0:v.id)&&void 0!==r?r:""},g);const{statusCode:t}=e;return 0!==t?void setTimeout((()=>{this.setCollect({id:l,collected:p,count:m})}),3e3):(1===g&&(yield this.addMlModelTrainData({id:l,action:"favorite"})),e)}catch(e){}}))},postLikeVideo(t){var i,n,o,r,s;return C(this,void 0,void 0,(function*(){const a=e(j),c=e(P.p9),d=a[t.id],u=c.users[null!==(i=null==d?void 0:d.author)&&void 0!==i?i:""],{user:h}=(0,l.x)(),{digged:m,stats:_,poi:f,imagePost:y,subVideoMeta:b,ad_info:w,repostList:k}=d,{id:O,forceLike:E,enter_method:C="click",channel_id:L}=t,I=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);oe.secUid!==(null==h?void 0:h.secUid))),type:E?1:m?0:1};if(!E||!m)try{let e;this.setLike({id:O,liked:!m,count:m?Math.max(0,N-1):N+1});try{e=yield function(e){return A(this,void 0,void 0,(function*(){return x.h.post("/api/commit/item/digg/",{query:e,baseUrlType:2,headers:{[T.nk]:x.h.csrfToken}})}))}(M)}catch(t){e={status_code:-1}}const{status_code:t,status_msg:i,log_pb:n={},is_digg:a}=e;if(2150===t||2210===t){const e=(0,S.T)();i&&g.F.open({content:e(i),duration:3,widthType:"half"})}let l={};w&&(l=(0,v.n5)({ad_info:w,play_mode:null!==(o=I.play_mode)&&void 0!==o?o:"one_column"})),p.z.handleLikeVideoResult(Object.assign(Object.assign(Object.assign({},I),l),{group_id:d.id,author_id:null!==(r=null==u?void 0:u.id)&&void 0!==r?r:"",log_pb:n,enter_method:C,poi_id:null==f?void 0:f.id,aweme_type:y?150:0,pic_cnt:null===(s=null==y?void 0:y.images)||void 0===s?void 0:s.length,is_sub_only_video:b?1:0}),M.type),0!==t||a===M.type?setTimeout((()=>this.setLike({id:d.id,liked:m,count:N})),3e3):1===M.type&&this.addMlModelTrainData({id:d.id,action:"like"})}catch(e){}}))},postRepostVideo(t){var i,n;return C(this,void 0,void 0,(function*(){const o=(0,S.T)(),r=e(j)[t.id],{user:s}=(0,l.x)();if(!r||!s)return;const{statsV2:a,repostList:c}=r,{id:u,playMode:v,playlistId:p}=t,h=(null!==(i=null==c?void 0:c.findIndex((e=>e.secUid===s.secUid)))&&void 0!==i?i:-1)>=0,m=Number(null!==(n=null==a?void 0:a.repostCount)&&void 0!==n?n:0),f=!h;try{this.prependRepost({id:u,reposted:f,currentUser:s,count:h?Math.max(0,m-1):m+1});const e={page_name:d.f.commonParams.page_name,group_id:u,play_mode:v,playlist_id:p};let t;try{const i={item_id:u};f?(d.f.sendEvent("click_repost",e),({status_code:t}=yield function(e){return A(this,void 0,void 0,(function*(){return x.h.post("/tiktok/v1/upvote/publish",{query:e,baseUrlType:2})}))}(i))):(d.f.sendEvent("click_repost_remove",e),({status_code:t}=yield function(e){return A(this,void 0,void 0,(function*(){return x.h.post("/tiktok/v1/upvote/delete",{query:e,baseUrlType:2})}))}(i)))}catch(e){t=-1}g.F.destroy();let i=f?"pcWeb_reposted_toast":"pcWeb_repostRemoved_toast";0!==t?(i="Sorry, something wrong with the server, please try again.",setTimeout((()=>this.prependRepost({id:u,reposted:h,currentUser:s,count:m})),3e3)):f?(d.f.sendEvent("repost_success",e),this.addMlModelTrainData({id:r.id,action:"repost"})):d.f.sendEvent("repost_remove_success",e),g.F.open({content:o(i),duration:3,widthType:"half",getContainer:_.M,getContainerPosition:"fixed"})}catch(e){}}))},addMlModelTrainData(t){var i;return C(this,void 0,void 0,(function*(){const{id:n,action:o,isPreview:r}=t,s=e(j);if(n&&s[n]&&!(null===(i=s[n])||void 0===i?void 0:i.liveRoomInfo))return(0,O.xt)().addTrainData({item:s[n],action:o,isPreview:r})}))},postDislikeVideo(t){return C(this,void 0,void 0,(function*(){const i=e(j),{id:n,author_id:o,play_mode:r}=t,s=i[n],a=null==s?void 0:s.ad_info;let l={};a&&(l=(0,v.n5)({ad_info:a,play_mode:r}),l.refer=h.Hq.Button),m.V.handleClickDislike(Object.assign({group_id:n,author_id:o,play_mode:r},l));const c=(0,S.T)();g.F.open({content:c("webapp_forYoufeed_videoRemoved_toast"),duration:3,widthType:"half",getContainer:_.M,getContainerPosition:"fixed"});const d={item_id:n,item_author_id:o};try{try{yield function(e){return A(this,void 0,void 0,(function*(){return x.h.post("/api/dislike/item/",{query:e,baseUrlType:2,headers:{[T.nk]:x.h.csrfToken}})}))}(d)}catch(e){}this.addMlModelTrainData({id:t.id,action:"dislike"})}catch(e){}}))},checkItemValidation(e){return C(this,void 0,void 0,(function*(){const t={itemIds:e};try{return yield function(e){return A(this,void 0,void 0,(function*(){return x.h.get("/api/item/availability/",{query:e,baseUrlType:2})}))}(t)}catch(e){}}))},setItemPrivateState(i){const{id:n,visibility:o}=i,r=e(j),s=r[n];if(!s)return;const a=Object.assign(Object.assign({},s),{forFriend:"3"===o,secret:"2"===o});t(j,Object.assign(Object.assign({},r),{[n]:a}))},setDeleteVideo(e){t(j,(t=>s()(t,e)))},getStaticItem:t=>e(j)[t]}))),R=e=>M((t=>(0,E.D)(t[e])),b.bN)},77170:(e,t,i)=>{i.d(t,{D:()=>o,t:()=>n});const n=(e,t)=>{var i,n,o,r,s,a,l,c,d,u,v,p,h,m,g;const _=null!==(n=null===(i=e.anchors)||void 0===i?void 0:i.filter((e=>54===e.type)))&&void 0!==n?n:[],f=null!==(r=null===(o=e.anchors)||void 0===o?void 0:o.filter((e=>28===e.type)))&&void 0!==r?r:[];return Object.assign(Object.assign({},e),{video:e.video,nickname:null===(s=e.author)||void 0===s?void 0:s.nickname,author:null===(a=e.author)||void 0===a?void 0:a.uniqueId,authorId:null===(l=e.author)||void 0===l?void 0:l.id,authorSecId:null===(c=e.author)||void 0===c?void 0:c.secUid,avatarThumb:null===(d=e.author)||void 0===d?void 0:d.avatarThumb,downloadSetting:null===(u=e.author)||void 0===u?void 0:u.downloadSetting,authorPrivate:null===(v=e.author)||void 0===v?void 0:v.privateAccount,stateControlledMedia:null===(p=e.author)||void 0===p?void 0:p.stateControlledMedia,capcutAnchorsOriginal:_,capcutAnchors:(null===(h=e.poi)||void 0===h?void 0:h.id)?[]:_,effectAnchors:f,videoSuggestWordsList:null!==(m=e.videoSuggestWordsList)&&void 0!==m?m:null==t?void 0:t.videoSuggestWordsList,keywordTags:null!==(g=e.keywordTags)&&void 0!==g?g:null==t?void 0:t.keywordTags})},o=e=>{var t,i,n,o,r,s,a,l,c,d,u;if(!e)return{diggCount:BigInt(0),shareCount:BigInt(0),commentCount:BigInt(0),playCount:BigInt(0),collectCount:BigInt(0),repostCount:BigInt(0),isReposted:!1};const{stats:v,statsV2:p}=e;return{diggCount:BigInt(null!==(i=null!==(t=null==p?void 0:p.diggCount)&&void 0!==t?t:null==v?void 0:v.diggCount)&&void 0!==i?i:0),shareCount:BigInt(null!==(o=null!==(n=null==p?void 0:p.shareCount)&&void 0!==n?n:null==v?void 0:v.shareCount)&&void 0!==o?o:0),commentCount:BigInt(null!==(s=null!==(r=null==p?void 0:p.commentCount)&&void 0!==r?r:null==v?void 0:v.commentCount)&&void 0!==s?s:0),playCount:BigInt(null!==(l=null!==(a=null==p?void 0:p.playCount)&&void 0!==a?a:null==v?void 0:v.playCount)&&void 0!==l?l:0),collectCount:BigInt(null!==(d=null!==(c=null==p?void 0:p.collectCount)&&void 0!==c?c:null==v?void 0:v.collectCount)&&void 0!==d?d:0),repostCount:BigInt(null!==(u=null==p?void 0:p.repostCount)&&void 0!==u?u:0),isReposted:Number(null==p?void 0:p.repostCount)>0}}},46311:(e,t,i)=>{i.d(t,{P:()=>n});const n=new class{constructor(){this.listeners={}}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}emit(e,...t){const i=this.listeners[e];i&&i.forEach((e=>{e(...t)}))}off(e,t){const i=this.listeners[e];i&&(this.listeners[e]=i.filter((e=>e!==t)))}}},84669:(e,t,i)=>{i.d(t,{D:()=>n});const n=["ar","ur","he-IL"]},93987:(e,t,i)=>{var n;i.d(t,{Y:()=>n}),function(e){e.PlayerChange="player_change",e.PlayerDestroy="player_destroy",e.PlayerMounted="player_mounted",e.OneColumnRerender="one_column_rerender",e.BrowseModeRerender="browse_mode_rerender",e.VideoRequest="video_request",e.VideoCanPlay="video_can_play",e.VideoFirstFrame="video_first_frame"}(n||(n={}))},62302:(e,t,i)=>{i.d(t,{zI:()=>l});var n=i(4474),o=i(63615),r=i(88874);const s="/node-webapp/api/common-app-context";let a;function l(e){const t=(0,r.YI)(o.Ow);return t?Promise.resolve(Object.assign(Object.assign({},t),{statusCode:0})):a||(a=fetch((0,n.stringifyUrl)({url:s,query:{lang:e}})).then((e=>e.json())),a)}},10598:(e,t,i)=>{i.d(t,{x:()=>l});var n=i(4474);const o="webapp.biz-context";var r=i(88874);const s="/node-webapp/api/biz-context";let a;function l(e,t){const i=(0,r.YI)(o);return i?Promise.resolve(Object.assign(Object.assign({},i),{statusCode:0})):a||(a=fetch((0,n.stringifyUrl)({url:s,query:{lang:e,app_name:t}})).then((e=>e.json())),a)}},68881:(e,t,i)=>{i.d(t,{M4:()=>w,DV:()=>S,t$:()=>P,UM:()=>A,hX:()=>T,dz:()=>E,bg:()=>x});var n=i(58632),o=i(237),r=i(12904),s=i(74631),a=i(26325),l=i(18829),c=i(58156);const d="content-type",u=["/api/update/profile/","/api/commit/follow/user","/api/comment/publish"],v=["application/pdf"],p={"Singapore-Central":"sg","US-East":"va","US-EastRed":"in","US-TTP":"ttp","US-TTP2":"ttp2","EU-TTP":"ie","EU-TTP2":"no1a"};function h({url:e,response:t,appContext:i,bizContext:m,options:g,config:_,retryFn:f=()=>(0,n.__awaiter)(this,void 0,void 0,(function*(){}))},y){var b,w,k,P,O,S,E,x,T,A,C,j;return(0,n.__awaiter)(this,void 0,void 0,(function*(){if(null===(b=null==y?void 0:y.emitEvent)||void 0===b||b.call(y,"request_status",{now:performance.now()},{statusCode:"unknown"}),t.status>=400)return(0,o.Gy)(t,e),null===(w=null==y?void 0:y.emitEvent)||void 0===w||w.call(y,"request_status",{now:performance.now()},{statusCode:`${t.status}`}),Promise.reject(t);{const n=t.headers.get(d);if(null==n?void 0:n.includes("application/json"))try{let n=t.headers.has(r.Si)?JSON.parse(null!==(k=t.headers.get(r.Si))&&void 0!==k?k:"{}"):yield t.json();const o=t.headers.has(r.Si);null===(P=null==y?void 0:y.emitEvent)||void 0===P||P.call(y,"request_status",{now:performance.now()},{statusCode:`${t.status}`,needVerify:`${o}`}),o&&(null===(O=null==y?void 0:y.context)||void 0===O||O.call(y,{firstScreenRequest:"abort",verify:"1"}));const d=function(e,t,i){var n,o,s;const l=e.status_code||e.code,d=l===r.CQ,v=l===r.Zu;if(u.some((e=>t.includes(e)))&&(d||v)){const e=(0,c.v)(i);return{code:"10000",from:"shark_admin",type:"verify",version:1,region:null!==(s=null!==(n=p[e])&&void 0!==n?n:r.sG[null!==(o=a.si.kind)&&void 0!==o?o:""])&&void 0!==s?s:"va",subtype:d?"slide":"text",verify_event:"",detail:{},fp:-1}}return e}(n,e,null==m?void 0:m.idc),v="TTP"===(null==i?void 0:i.clusterRegion),b=(null==m?void 0:m.idc)?(0,c.v)(m.idc):null==m?void 0:m.vregion,w=yield s.MX.checkVerify(d,null!==(S=null==i?void 0:i.wid)&&void 0!==S?S:"0",v,a.si.captcha,{lang:null==i?void 0:i.language,userMode:(0,l.n)({isVA:"US-TTP"===b||"US-TTP2"===b,isLogin:Boolean(null==i?void 0:i.user),isFTC:null!==(x=null===(E=null==i?void 0:i.user)||void 0===E?void 0:E.ftcUser)&&void 0!==x&&x,isHighRisk:!1,isEU:(null==b?void 0:b.startsWith("EU-TTP"))||"US-EAST-RED"===b})});return 0===w?((null==g?void 0:g.onJsonResponse)&&(n=g.onJsonResponse({response:t,config:_,json:n})),null===(T=null==y?void 0:y.emitEvent)||void 0===T||T.call(y,"request_status",{now:performance.now()},{statusCode:`${t.status}`,status:"success"}),n):2===w?f().then((t=>h({url:e,response:t,appContext:i,bizContext:m,options:g,config:_,retryFn:f},y))):{statusCode:-1}}catch(e){return null===(A=null==y?void 0:y.emitEvent)||void 0===A||A.call(y,"request_status",{now:performance.now()},{statusCode:`${t.status}`,status:"fail",needVerify:`${t.headers.has(r.Si)}`,isRiskControlBlock:`${"0, 0"===t.headers.get("content-length")&&"Janus-Mini(fast)"===t.headers.get("x-janus-mini-api-forward")}`,errorMessage:null==e?void 0:e.message}),null===(C=null==y?void 0:y.context)||void 0===C||C.call(y,{firstScreenRequest:"abort"}),Promise.reject(t)}else{if(null===(j=t.headers.get(d))||void 0===j?void 0:j.includes("text/"))return t.text();if(-1!==v.indexOf(String(n)))return t.blob();if(null==n?void 0:n.includes("application/x-protobuf"))return t.arrayBuffer()}return t.text()}}))}var m=i(51660),g=i(57432),_=i.n(g),f=i(56070),y=i(97895);const b=1988,w=35,k={recommendItemList:void 0,userPlayList:void 0,userPostList:void 0,poiDetail:void 0,poiCategory0:void 0,poiCategory1:void 0,poiCategory2:void 0,relatedKeywords:void 0,kapRelatedKeywords:void 0,kapProductList:void 0,linkerStrategy:void 0,exploreItemList:void 0,trendingMediaVideoList:void 0,trendingPublicVideoList:void 0};function P(e){const t=k[e];return t&&(k[e]=void 0),t}const O="$PREFETCH_CACHE";function S(e){var t,i,n,o;const r=null!==(t=window[O])&&void 0!==t?t:{};let s;return window[O]=r,(null===(i=r[e])||void 0===i?void 0:i.used)||(s=null===(o=null===(n=r[e])||void 0===n?void 0:n.request)||void 0===o?void 0:o.then((e=>h(e).catch((e=>{if(e instanceof Response){const t={status:e.status,url:e.url,logId:e.headers.get("x-tt-logid"),bdturingVerify:e.headers.get("bdturing-verify")};throw new Error(JSON.stringify(t))}throw e}))))),r[e]={used:!0,result:s},s}function E(e){const t={secUid:e,cursor:"0",count:20};k.userPlayList=f.h.get("/api/user/playlist/",{query:t,baseUrlType:2})}function x(e,t){const i=(0,m.qm)(),n={secUid:e,aid:b,count:w,cursor:"0",language:i,coverFormat:t};k.userPostList=f.h.get("/api/post/item_list/",{query:Object.assign(Object.assign({},n),{clientABVersions:(0,y.v)().join(",")}),baseUrlType:2})}function T(e,t){const i=(0,m.qm)(),n=Object.assign({poiId:e,language:i},t&&{sourceType:t});k.poiDetail=f.h.get("/api/poi/detail/",{query:n,baseUrlType:2})}function A({poiId:e,subCategoryType:t},i,n){const o={poiId:e,language:(0,m.qm)()};k.poiDetail=f.h.get("/api/poi/detail/",{query:o,baseUrlType:2});const r=Object.assign({poiId:e,count:15,offset:0,trafficType:0},i);n.forEach(((e,i)=>{const n=0===i?1:0,o=`poiCategory${i}`,s=f.h.get("/api/seo/poi/item_list/",{query:t?Object.assign(Object.assign({},r),{subCategoryType:t,subTitleType:e}):Object.assign(Object.assign({},r),{subCategoryType:e}),baseUrlType:2});s.then((e=>{var t,i;(null!==(i=null===(t=e.itemList)||void 0===t?void 0:t.slice(0,n).map((e=>{var t,i;return null!==(i=null===(t=e.video.zoomCover)||void 0===t?void 0:t[720])&&void 0!==i?i:e.video.cover})))&&void 0!==i?i:[]).forEach((e=>{(new Image).src=e}))})).catch(_()),k[o]=s}))}},97487:(e,t,i)=>{i.d(t,{Ni:()=>a,gA:()=>o,iq:()=>s});var n=i(88874);const o={userDetail:"webapp.user-detail",videoDetail:"webapp.video-detail",linkerStrategy:"webapp.linker-strategy",kapDetail:"webapp.kap-detail",kapLinkerStrategy:"webapp.kap.strategy",foryouFirstVideo:"webapp.foryou.video",kapCoinLinkerStrategy:"webapp.kap.coin.strategy",walletRechargeShowGetCoinsEntrance:"wallet.recharge.show-get-coins-entrance",reflowVideoStrategy:"webapp.reflow.video.strategy",reflowVideoUiStrategy:"webapp.reflow.video.uiStrategy",reflowVideoDetail:"webapp.reflow.video.detail",reflowVideoOperationSettings:"webapp.reflow.video.operationSettings",reflowGlobalQueryData:"webapp.reflow.global.queryData",reflowGlobalShareUser:"webapp.reflow.global.shareUser",reflowGlobalStrategy:"webapp.reflow.global.strategy",reflowGlobalUiStrategy:"webapp.reflow.global.uiStrategy",reflowVersionUiStrategy:"webapp.reflow.version.uiStrategy",kapPageStrategy:"webapp.kap.pageStrategy",ssrVersion:"webapp.sharing.ssrVersion",smartuiPreview:"webapp.smartui.preview"},r={};function s(e){const t=(0,n.YI)(o[e]);t&&(r[e]=t)}function a(e){const t=r[e];return t&&(r[e]=void 0),t}},5441:(e,t,i)=>{i.d(t,{B:()=>s});var n=i(40099),o=i(60484),r=i(49057);const s=()=>{const{userAgent:e}=(0,o.L$)((0,r.W)((()=>["userAgent"]),[])),t=(null==e?void 0:e.includes("tiktok"))&&(null==e?void 0:e.includes("TTElectron")),i=t&&(null==e?void 0:e.includes("osName/Mac")),s=t&&!i,[a,l]=(0,n.useState)(t),[c,d]=(0,n.useState)(i),[u,v]=(0,n.useState)(s);return(0,n.useEffect)((()=>{const{isElectron:e,osVersion:t=""}=(0,o.L$)(window.TTE_ENV),i=t.includes("Mac OS");l(e),d(e&&i),v(e&&!i)}),[]),{isElectronApp:a,isMacElectronApp:c,isWinElectronApp:u}}},25616:(e,t,i)=>{i.d(t,{s:()=>h,Y:()=>m});var n=i(40099),o=i(51660);const r="473824";var s=i(84323),a=i(93991),l=i.n(a),c=i(60484),d=i(49057),u=i(48615);function v(e){let t=[];if(e){const i=e;t=l()(i)?i:[i]}return t.includes(r)}var p=i(64356);const h=(e="Webapp")=>{const{isSharing:t,isCoinLite:i,isCoinPro:o}=function(){const{region:e}=(0,c.L$)((0,d.W)((()=>["region"]),[])),{coinLiteConfig:t,isIOS:i,queryData:n}=(0,c.L$)((0,u.U)((()=>["coinLiteConfig","isIOS","queryData"]),[])),{share_app_id:o,_r:r}=null!=n?n:{},a="1"===r,l=function(e){var t,i;const{share_app_id:n,region:o,os:r="android",coinLiteConfig:a}=e,l=null!==(i=null===(t=null==a?void 0:a.coinLiteRegion)||void 0===t?void 0:t[r])&&void 0!==i?i:s.tt,c=!!o&&l.map((e=>{var t;return null===(t=null==e?void 0:e.toUpperCase)||void 0===t?void 0:t.call(e)})).includes(o);return v(n)&&c}({share_app_id:o,region:e,os:i?"ios":"android",coinLiteConfig:t}),p=function(e){var t,i;const{share_app_id:n,region:o,os:r="android",coinLiteConfig:a}=e,l=null!==(i=null===(t=null==a?void 0:a.coinProRegion)||void 0===t?void 0:t[r])&&void 0!==i?i:s.G,c=!!o&&l.map((e=>{var t;return null===(t=null==e?void 0:e.toUpperCase)||void 0===t?void 0:t.call(e)})).includes(o);return v(n)&&c}({share_app_id:o,region:e,os:i?"ios":"android",coinLiteConfig:t});return{isSharing:a,isCoinLite:l,isCoinPro:p,isCoin:l||p}}(),{t:r}=(0,n.useContext)(p.Ss);let a=r;return t&&i?a=function(e,t=[]){return function(i,n,o){return t.includes(i)?e(i,n,o):e(i,n,o).replace(/(TikTok( Lite)?\b)/g,(function(e,t,i){return i?e:`${t} Lite`}))}}(r):t&&o&&(a=function(e,t=[]){return function(i,n,o){return t.includes(i)?e(i,n,o):e(i,n,o).replace(/(TikTok( Pro)?\b)/g,(function(e,t,i){return i?e:`${t} Pro`}))}}(r)),m([e],t),(0,n.useCallback)(((t,i,n)=>void 0===t||"string"==typeof t&&!t.length?n:a(t,Object.assign({ns:e},i),n)),[e,a])};function m(e,t=!1){t&&(0,o.qm)();const{loadStarling:i,hasLoaded:r}=(0,n.useContext)(p.Ss),[s,a]=(0,n.useState)((null!=e?e:[]).reduce(((e,t)=>e&&r(t)),!0));return(0,n.useEffect)((()=>{e&&Promise.all(e.map((e=>{if(r(e))return!0;const t=(0,o.qm)();return i(e,t)}))).then((e=>{a(e.reduce(((e,t)=>e&&t),!0))}))}),[]),s}},37209:(e,t,i)=>{i.d(t,{gW:()=>g,EK:()=>_,xt:()=>f,Dy:()=>v});var n=i(58632),o=i(35357),r=i.n(o),s=i(53385),a=i(77966),l=i(4929),c=i(34099);const d={isPhoenix:"object"==typeof window&&"www.tiktok.in"===window.location.host,textReplace:"undefined"==typeof window?null:new(i(17283).A)({condition:{APPID:"8660"},tccUrl:"https://sf-tcc-config.tiktokcdn.com/obj/tcc-config-web-alisg/tcc-v2-data-webcast.starling.proxy-default"}),loadTcc(){return this.isPhoenix?this.textReplace.getWithCache("webapp-phoenix-tcc"):Promise.resolve()},getPlugin:e=>({type:"postProcessor",name:"text-replace-plugin",process:(t,i)=>d.textReplace.processSync(t,e,i)}),getProcessName(){return this.isPhoenix?["text-replace-plugin"]:void 0}};var u=i(84669);function v(e,t,i){const n=[];return new Promise(((o,r)=>{d.loadTcc().then((s=>{(d.isPhoenix?a.Ay.use(d.getPlugin(s)):a.Ay).init({debug:!1,fallbackLng:["en"],initImmediate:!0,defaultNS:null!=t?t:"Webapp",postProcess:d.getProcessName(),saveMissing:!0,missingKeyHandler:(e,t,o,r)=>{n.includes(o)||(console.warn("[i18n] missing key",e,t,o,r),n.push(o)),i&&i(e,t,o,r)}},(e=>{e?r(e):o()})),a.Ay.setLang(e)}))}))}const p=["Webapp_recharge_referral"],h=["kick_user_frontier"];function m(e){return p.includes(e)?l.Uy:h.includes(e)?l.AY:l.Lq}function g(e,t,i=!1){return(0,n.__awaiter)(this,void 0,void 0,(function*(){const{starling:n,tea:o}=(0,c.V)();return new s.A({namespace:e,api_key:m(e),locale:t,zoneHost:n,timeout:1e4,TEAChannelDomain:o,lazyUpdate:i}).load()}))}const _=r()(((e,t)=>{Object.entries(e).forEach((([e,i])=>{a.Ay.addResourceBundle(t,e,i,!0,!0)}))})),f=e=>u.D.includes(e)},95358:(e,t,i)=>{i.d(t,{xj:()=>me,$p:()=>ve,bc:()=>pe,Pz:()=>he,sn:()=>A,Ke:()=>U,sM:()=>Q,Ds:()=>F,nq:()=>D,eD:()=>te,hh:()=>ae,gq:()=>j,tO:()=>T,K8:()=>L,Iz:()=>x,pz:()=>B,U0:()=>K,j:()=>Z,RR:()=>J,p5:()=>X,qd:()=>N,mQ:()=>ne,Tc:()=>G,Iy:()=>R,vb:()=>ie,LC:()=>$,ZG:()=>Y,N6:()=>W,a1:()=>q,ie:()=>z,q$:()=>H,b8:()=>le,FJ:()=>oe,P_:()=>C,cj:()=>V,Fj:()=>I,M5:()=>de,yw:()=>ge,G2:()=>h,pH:()=>m,WD:()=>b,AT:()=>g,fJ:()=>f,zp:()=>E});var n=i(7013),o=i.n(n);const r={},s=1e4;let a=0;function l(e,t=[]){let i;i="string"==typeof t||Array.isArray(t)?{path:t}:t;const{path:n,exact:l=!1,strict:c=!1,sensitive:d=!1}=i,u=Array.isArray(n)?[...n]:[n];return u.length?u.reduce(((t,i)=>{if(!i&&""!==i)return null;if(t)return t;const{regexp:n,keys:u}=function(e,t){const i=`${t.end}${t.strict}${t.sensitive}`,n=r[i]||(r[i]={});if(n[e])return n[e];const l=[],c={regexp:o()(e,l,t),keys:l};return a(e[t.name]=h[i],e)),{})}}),null):null}var c=i(82715),d=i(9047),u=i(8227),v=i(97497),p=i(94810);const{getPureLivePath:h,getPureMusicPath:m,getPureTagPath:g,getPureStickerPath:_,getPureUserPath:f,getPureVideoPath:y,getPureQuestionPath:b}=p.h,{getPureUniqueId:w,hasIllegalText:k,isPureNumber:P,isRealUniqueId:O,purifyMusicName:S,purifyPlainText:E}=p.A;function x(e){const t=e.replace(/\/$/,"");return e===c.OZ.home||c.OZ.foryouWithLang.includes(t)}function T(e){return e.replace(/\/$/,"")===c.OZ.foryou||x(e)}function A(e){if(T(e))return"fyp";if(e.match("/following"))return"following";if(e.match("/friends"))return"friend";if(e.match("/setting"))return"setting";if(e.match("/search"))return"search";if(e.match("/message"))return"message";if(e.match("/video"))return"video";if(e.match("/@"))return e.match("/live")?"":"user";if(e.match("/report"))return"report";if(e.match("/music"))return"music";if(e.match("/effect"))return"effect";if(e.match("/tag"))return"hashtag";if(e.match(/\/discover\/.+/))return"expansion";if(e.match("/discover"))return"discover";if(e.match("/live"))return"";if(C(e)){const t=l(e,{path:c.OZ.topics,exact:!0});return`topics_${null==t?void 0:t.params.name}`}return e.match("/profile")?"profile":e.match("/inbox")?"inbox":e.match("/feedback")?"feedback":""}function C(e){return Boolean(l(e,{path:c.OZ.topics,exact:!0}))}function j(e){return e===c.OZ.following}function L(e){return e===c.OZ.friends}function I(e){return/^\/@[^/]*\/video\/\d+/.test(e)||/^\/@[^/]*\/photo\/\d+/.test(e)}function N(e){return/^\/@.+\/live/.test(e)}function M(e){return/^\/@.+\/playlist\/.+/.test(e)}function R(e){return/^\/music\/.+/.test(e)}function D(e){return/^\/effect\/.+/.test(e)}function U(e){return/^\/tag\/.+/.test(e)}function F(e){return/^\/@.*\/collection\/.+/.test(e)}function V(e){return!/^\/@.+\/live/.test(e)&&!/^\/@.*\/video\/\d+/.test(e)&&/^\/@.+/.test(e)&&!/^\/@.*\/collection\/.+/.test(e)}function B(e){var t;return"expansion"===(null===(t=(0,d.fq)(e))||void 0===t?void 0:t.name)}function q(e){return e===c.OZ.searchHome}function z(e){return e===c.OZ.searchUser}function H(e){return e===c.OZ.searchVideo}function Y(e){return e===c.OZ.searchLive}function W(e){return e===c.OZ.searchReminder}function $(e){return/^\/question\/.+/.test(e)}function G(e){return/^\/messages/.test(e)}function K(e){return!!l(e,{path:[u.vI.liveDiscover,u.vI.liveFollowing,u.vI.liveGaming,u.vI.liveSingleGaming,u.vI.liveEventAggregation,u.vI.liveLifestyle,u.vI.liveCategory,u.vI.liveCategoryGaming,u.vI.liveCategoryLifestyle,u.vI.liveCategorySingleGaming,u.vI.liveCategorySingleLifeStyle,u.vI.liveCategorySingleAction],exact:!0})}function Z(e){return/live\/event\/\d/.test(e)}function J(e){return/live\/event/.test(e)}function X(e){return e.startsWith("/live")||N(e)}function Q(e){return e.startsWith("/coin")}function ee(e){return Boolean(l(e,{path:c.OZ.discover,exact:!0}))}function te(e){return Boolean(l(e,{path:c.OZ.explore,exact:!0}))}function ie(e){return/^\/place\/.+/.test(e)||/^\/travel\/.+/.test(e)}function ne(e){return/^\/login/.test(e)}function oe(e){return/^\/signup/.test(e)}function re(e){var t;return(null===(t=(0,c.jN)(e))||void 0===t?void 0:t.name)===c.eU.channel}function se(e){var t;return(null===(t=(0,c.jN)(e))||void 0===t?void 0:t.name)===c.eU.videoPlaylist}function ae(e){return e.startsWith("/feedback")}function le(e){return e.startsWith(c.OZ.setting)}const ce={5:T,11:j,20:L,0:I,4:R,129:D,3:U,121:F,1:V,106:z,107:H,123:Y,105:q,16:$,113:C,13:G,103:ee,104:B,122:re,108:se,18:ie};function de(e){var t;return null!==(t=Object.keys(ce).find((t=>ce[t](e))))&&void 0!==t?t:5}const ue=e=>"business"===new URLSearchParams(e).get("scene");function ve(e){var t,i;return["download","downloadWithLang","downloadVideo","downloadVideoWithLang"].includes(null!==(i=null===(t=(0,c.jN)(e))||void 0===t?void 0:t.name)&&void 0!==i?i:"")}function pe(e,t){return(!t||!ue(t))&&(U(e)||C(e)||j(e)||L(e)||T(e)||R(e)||D(e)||I(e)||V(e)&&!M(e)||ee(e)||q(e)||z(e)||H(e)||Y(e)||W(e)||$(e)||ie(e)||F(e)||te(e)||re(e)||function(e){var t;return(null===(t=(0,c.jN)(e))||void 0===t?void 0:t.name)===c.eU.find}(e)||se(e)||function(e){return e.startsWith("/404")}(e)||ae(e)||G(e)||le(e)||B(e)||function(e){return e.startsWith("/upload")}(e)||K(e)||N(e)||function(e){return e.startsWith("/live/popout/")}(e)||Z(e))}function he(e,t){return(!t||!ue(t))&&(T(e)||V(e)&&!M(e)||I(e)||F(e)||j(e)||L(e)||te(e)||G(e)||R(e)||Boolean(e.match("/profile"))||q(e)||z(e)||H(e)||Y(e)||W(e)||le(e)||U(e)||re(e)||B(e)||ee(e))}function me(e){return K(e)||N(e)||Z(e)}function ge({uniqueId:e,secUid:t,itemId:i,isPhoto:n}){const o=p.A.getPureUniqueId({uniqueId:e,secUid:t});return o&&i?n?v.Lj.photo({uniqueId:o,id:i}):v.Lj.video({uniqueId:o,id:i}):""}},56070:(e,t,i)=>{i.d(t,{h:()=>R,J:()=>L});var n=i(58632),o=i(80798),r=i(4474),s=i(31578),a=i(26325),l=i(32970),c=i(12904),d=i(74631),u=i(58156),v=i(5902),p=i(237),h=i(18829);const m="content-type",g=["application/pdf"],_=["/api/update/profile/","/api/commit/follow/user","/api/comment/publish"],f="webapp-session-referer",y="device_id",b={"Singapore-Central":"sg","US-East":"va","US-EastRed":"in","US-TTP":"ttp","US-TTP2":"ttp2","EU-TTP":"ie","EU-TTP2":"no1a"};class w{constructor(e){this.verify=d.MX,this.isPageVisible=!0,this.isFocus=!0,this.handleAppContext=e=>(0,n.__awaiter)(this,void 0,void 0,(function*(){return this.appContext||(this.appContext=yield this.options.getAppContextAsync()),e})),this.handleBizContext=e=>(0,n.__awaiter)(this,void 0,void 0,(function*(){this.bizContext||e.ignoreBizContext||(this.bizContext=yield this.options.getBizContextAsync());const{ignoreBizContext:t}=e;return(0,n.__rest)(e,["ignoreBizContext"])})),this.handleQuery=e=>(0,n.__awaiter)(this,void 0,void 0,(function*(){var t,i,n,o,r,s,l,c;const d=this.getRiskParams(null!==(t=e.riskParamsType)&&void 0!==t?t:0),u={},v=null===(i=this.bizContext)||void 0===i?void 0:i.canUseQuery,{type:p}=null!==(o=null===(n=this.appContext)||void 0===n?void 0:n.env)&&void 0!==o?o:{type:""},h=null===(r=this.appContext)||void 0===r?void 0:r.odinId,m="ppe"===p||"boe"===p,g=null!==(l=new URLSearchParams(null===(s=window.location)||void 0===s?void 0:s.search).get(y))&&void 0!==l?l:void 0;(v||m)&&g&&(u[y]=g);const _={WebIdLastTime:null===(c=this.appContext)||void 0===c?void 0:c.webIdCreatedTime};h&&(_.odinId=h);const f=(0,a.F0)(),b=f.to?f.dispatchParams:{},w=yield this.options.getExtraParams(e);return e.query=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),e.query),w),b),u),_),e})),this.handleURL=e=>{var t;let{url:i}=e;const n=null!==(t=e.query)&&void 0!==t?t:{};return i.startsWith("http:")||i.startsWith("https:")||(i=`${(0,a.$_)(e.baseUrlType)}${i}`),i=(0,r.stringifyUrl)({url:i,query:n}),e.url=i,e},this.options=e,"undefined"!=typeof window&&((0,v.Gz)(this.handleVisibilityChange.bind(this,!1),this.handleVisibilityChange.bind(this,!0)),this.bindFocusChange())}init(e){return(0,n.__awaiter)(this,void 0,void 0,(function*(){const t=yield this.options.getAppContextAsync(e);this.appContext=t}))}get csrfToken(){var e,t;return this.appContext,null!==(t=null===(e=this.appContext)||void 0===e?void 0:e.csrfToken)&&void 0!==t?t:""}get(e,t){return this.runFetch(e,Object.assign(Object.assign({},t),{method:"GET"}))}post(e,t={}){var{omitContentType:i=!1}=t,o=(0,n.__rest)(t,["omitContentType"]);const r=new Headers(o.headers);return r.get(m)||i||r.set(m,"application/x-www-form-urlencoded"),o.body||(o.body=""),o.headers=r,this.runFetch(e,Object.assign(Object.assign({},o),{method:"POST"}))}delete(e,t={}){var{omitContentType:i=!1}=t,o=(0,n.__rest)(t,["omitContentType"]);return this.runFetch(e,Object.assign(Object.assign({},o),{method:"DELETE"}))}getRiskParams(e){if(!this.appContext)return{};if(2===e)return{};if((0,v.Hd)(f)||(0,v.J2)(f,document.referrer),1===e)return Object.assign({},(0,l.Y)());const t={};(0,c.Yp)()&&(t.security_verification_aid="1459");const i=navigator.userAgent;return Object.assign(Object.assign({},(0,l.w)(Object.assign(Object.assign({},this.appContext),{isMobile:(0,s.Ny)(i),os:(0,s.R0)(i)}),this.isPageVisible,this.isFocus)),t)}runFetch(e,t){var i,o,r,{credentials:s="include"}=t,a=(0,n.__rest)(t,["credentials"]);return(0,n.__awaiter)(this,void 0,void 0,(function*(){let t=Object.assign({url:e,credentials:s},a);t=yield Promise.all([this.options.beforeHandleQuery(t),this.handleAppContext(t),this.handleBizContext(t)]).then((([,,e])=>this.handleQuery(e))).then((e=>this.handleURL(e)));const{url:l}=t,c=(0,n.__rest)(t,["url"]),d=new Set(["query","riskParamsType","baseUrlType","requireSecSdk"]),u=Object.keys(c).reduce(((e,t)=>(d.has(t)||(e[t]=c[t]),e)),{});return u.credentials=s,null===(o=(i=this.options).beforeFetch)||void 0===o||o.call(i,l,null!==(r=a.method)&&void 0!==r?r:"GET"),this.fetchData(l,u)}))}fetchData(e,t){var i,o,r,s,l,d,v,_,f,y,b,w,k,P,O,S,E,x,T,A,C,j;return(0,n.__awaiter)(this,void 0,void 0,(function*(){let n;try{n=yield window.fetch.call(null,e,t)}catch(e){return Promise.reject(e)}if(n){if(n.status>=400)return(0,p.Gy)(n,e),Promise.reject(n);{const p=n.headers.get(m);if(null==p?void 0:p.includes("application/json"))try{let p=n.headers.has(c.Si)?JSON.parse(null!==(i=n.headers.get(c.Si))&&void 0!==i?i:"{}"):yield n.json();const m=this._getVerifyJson(p,e),g="TTP"===(null===(o=this.appContext)||void 0===o?void 0:o.clusterRegion),x=(null===(r=this.bizContext)||void 0===r?void 0:r.idc)?(0,u.v)(this.bizContext.idc):null===(s=this.bizContext)||void 0===s?void 0:s.vregion;n.headers.has(c.Si)&&(null===(l=this.options)||void 0===l?void 0:l.reportFn)&&(null===(f=null===(_=null===(v=(d=this.options).reportFn)||void 0===v?void 0:v.call(d))||void 0===_?void 0:_.context)||void 0===f||f.call(_,{firstScreenRequest:"abort",verify:"1"}));const T=yield this.verify.checkVerify(m,null!==(b=null===(y=this.appContext)||void 0===y?void 0:y.wid)&&void 0!==b?b:"0",g,a.si.captcha,{lang:null===(w=this.appContext)||void 0===w?void 0:w.language,userMode:(0,h.n)({isVA:"US-TTP"===x||"US-TTP2"===x,isLogin:Boolean(null===(k=this.appContext)||void 0===k?void 0:k.user),isFTC:null!==(S=null===(O=null===(P=this.appContext)||void 0===P?void 0:P.user)||void 0===O?void 0:O.ftcUser)&&void 0!==S&&S,isHighRisk:!1,isEU:(null==x?void 0:x.startsWith("EU-TTP"))||"US-EAST-RED"===x})});return 0===T?((null===(E=this.options)||void 0===E?void 0:E.onJsonResponse)&&(p=this.options.onJsonResponse({response:n,config:t,json:p})),p):2===T?this.fetchData(e,t):{statusCode:-1}}catch(e){return null===(C=null===(A=null===(T=null===(x=this.options)||void 0===x?void 0:x.reportFn)||void 0===T?void 0:T.call(x))||void 0===A?void 0:A.context)||void 0===C||C.call(A,{firstScreenRequest:"abort"}),Promise.reject(n)}else{if(null===(j=n.headers.get(m))||void 0===j?void 0:j.includes("text/"))return n.text();if(-1!==g.indexOf(String(p)))return n.blob();if(null==p?void 0:p.includes("application/x-protobuf"))return n.arrayBuffer()}return n.text()}}}))}_getVerifyJson(e,t){var i,n,o,r;const s=e.status_code||e.code,l=s===c.CQ,d=s===c.Zu;if(_.some((e=>t.includes(e)))&&(l||d)){const{idc:e}=null!==(i=this.bizContext)&&void 0!==i?i:{},t=(0,u.v)(e);return{code:"10000",from:"shark_admin",type:"verify",version:1,region:null!==(r=null!==(n=b[t])&&void 0!==n?n:c.sG[null!==(o=a.si.kind)&&void 0!==o?o:""])&&void 0!==r?r:"va",subtype:l?"slide":"text",verify_event:"",detail:{},fp:-1}}return e}handleVisibilityChange(e){this.isPageVisible=e}bindFocusChange(){const e=()=>{this.isFocus=!0},t=()=>{this.isFocus=!1};return window.addEventListener("focus",e),window.addEventListener("blur",t),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",t)}}}var k=i(16891),P=i(90535),O=i(62302),S=i(95358),E=i(9796),x=i(41857);const T=new Set,A=[];let C;const j=()=>{var e;if(C&&A.length){for(const t of A){const{name:i,api:o}=t,r=(0,n.__rest)(t,["name","api"]);try{null===(e=null==C?void 0:C.emitEvent)||void 0===e||e.call(C,"sdkLoad",r,{name:i,api:o})}catch(e){console.error("flushSdkLog error",e)}}A.splice(0,A.length)}};function L(e){C=e,j()}function I(e){return(0,n.__awaiter)(this,void 0,void 0,(function*(){if(E.Qf.loaded)return;const{url:t,method:i,needSign:n}=e;let o=Boolean(x.U8.some((e=>Boolean(t.match(new RegExp(e)))))||t.startsWith("/")&&!t.startsWith("//")&&"GET"===i&&!x.zv.some((e=>Boolean(t.match(new RegExp(e))))));if(o=o&&!n,!o&&(yield E.Qf.load(),e.requireSecSdk&&!E.Qf.sdks[1].initialized))throw new Error("secsdk load error")}))}function N(e){return(0,n.__awaiter)(this,void 0,void 0,(function*(){if(E.er.loaded)return;const{url:t,method:i}=e;"POST"===i&&x.VF.some((e=>Boolean(t.match(new RegExp(e)))))&&(yield E.er.load())}))}function M(e){return(0,n.__awaiter)(this,void 0,void 0,(function*(){const{url:t}=e,i=E.Fs.some((e=>Boolean(t.match(new RegExp(e)))));!E.ZC.loaded&&i&&(yield E.ZC.load())}))}const R=(0,o.U)("fetch@tiktok/webapp-common",(()=>new w({getBizContextAsync:P.h,getAppContextAsync:O.zI,getExtraParams:e=>(0,n.__awaiter)(void 0,void 0,void 0,(function*(){var t,i,n;const o=yield(0,P.h)();let r={};return(null===(t=null==o?void 0:o.liveCommonConfig)||void 0===t?void 0:t.regionEntry)&&[4,5,9].includes(null!==(i=e.baseUrlType)&&void 0!==i?i:0)&&(r={channel:"local_test",carrier_region:null!==(n=localStorage.getItem("LIVE_OFFICE_REGION"))&&void 0!==n?n:"TW"}),Object.assign(Object.assign({},r),{from_page:(0,S.sn)(location.pathname)})})),beforeHandleQuery:e=>(0,n.__awaiter)(void 0,void 0,void 0,(function*(){yield Promise.all([I(e),N(e),M(e)]).catch((e=>{throw e}));try{[E.ZC,E.Qf,E.er].forEach((t=>{t.time&&t.time.forEach((t=>(e=>{try{T.has(e.name)||(T.add(e.name),A.push(e)),j()}catch(e){console.error("sdkLogger error",e)}})(Object.assign(Object.assign({},t),{api:e.url}))))}))}catch(e){console.error("sdkLogger error",e)}return e})),beforeFetch:(e,t)=>{k.f.sendEvent("api_request",{api_path:e,method:t})},onJsonResponse:e=>(0,n.__awaiter)(void 0,void 0,void 0,(function*(){const{response:t,json:i}=e,n=t.headers.get("x-tt-logid");return i.__headers={url:t.url,log_id:n},i})),reportFn:()=>C})))},55099:(e,t,i)=>{i.d(t,{p:()=>d});var n=i(58632),o=i(7672),r=i(71510),s=i.n(r),a=i(26324),l=i(56070);function c(e){return(t,i)=>new a.c((n=>{var o;const r="AbortController"in window?new AbortController:{signal:{aborted:!1},abort(){this.signal.aborted=!0}};return l.h[e](t,s()(i,{signal:null!==(o=null==i?void 0:i.signal)&&void 0!==o?o:r.signal})).then((e=>{n.next(e),n.complete()})).catch((e=>{n.error(e)})),()=>{r.signal.aborted||r.abort()}}))}let d=class{constructor(){this.get=c("get"),this.post=c("post"),this.delete=c("delete")}get csrfToken(){return l.h.csrfToken}};d=(0,n.__decorate)([(0,o._)()],d)},9796:(e,t,i)=>{i.d(t,{er:()=>y,Qf:()=>f,ZC:()=>P,Fs:()=>k});var n=i(58632),o=i(51660),r=i(87181),s=i(62302),a=i(41857),l=i(58156),c=i(90535);class d{constructor(){this.initialized=!1,this.duration=0,this.startTime=0,this.initTime=0,this.finishTime=0,this.name=""}load(){if(this.initialized)return Promise.resolve();if(this.promise)return this.promise;const{promise:e,cleanup:t}=function(){let e;return{promise:new Promise((t=>{e=window.setTimeout((()=>{t(null)}),1e4)})),cleanup:()=>{clearTimeout(e)}}}();return this.promise=Promise.race([e.then((()=>{this.promise=void 0})),this.loadSDK()]).then((()=>{t()})).catch((()=>{t(),this.promise=void 0})),this.promise}}class u{constructor(e){this.promise=null,this.keyword=e}get(e){return this.promise||(void 0===this.hasScript&&(this.hasScript=(0,r.yw)(e)),this.hasScript?this.promise=(t=this.keyword,new Promise((e=>{const i=()=>{window.requestAnimationFrame((()=>{window[t]?e(null):i()}))};i()}))):this.promise=(0,r.$U)(e).catch((e=>{throw this.promise=null,e}))),this.promise;var t}}var v=i(18829);const p=new u("byted_acrawler"),h={"Singapore-Central":"sg-tiktok","US-East":"va-tiktok","US-EastRed":"gcp-tiktok","US-TTP":"ttp","US-TTP2":"ttp2","EU-TTP":"eu-ttp","EU-TTP2":"eu-ttp2"},m="MSSDK_INITIALIZED",g=new u("secsdk"),_={"Singapore-Central":"sg","US-East":"va","US-EastRed":"va","US-TTP":"oci","US-TTP2":"oci","EU-TTP":"eu","EU-TTP2":"eu"},f={sdks:[new class extends d{constructor(e,t){super(),this.name="acrawlersdk",this.getContextProps=e,this.configs=t}loadSDK(){return this.startTime=performance.now(),Promise.all([this.getContextProps(),p.get({moduleId:(0,r.BJ)()})]).then((([{appId:e,user:t,wid:i,idc:n,vregion:o=""}])=>{var r;if(window[m])return void(this.initialized=!0);window[m]=!0,this.initialized=!0;const s=1233===e,a=void 0!==n?(0,l.v)(n):o,c=null!==(r=h[a])&&void 0!==r?r:s?"va-tiktok":"sg-tiktok",d="useast2b"===n?"https://mssdk16-normal-useastred.tiktokw.eu":"";this.initTime=performance.now(),this.configs.forEach((e=>{var n;window.byted_acrawler.init({aid:e.aid,dfp:e.dfp,boe:e.boe,intercept:e.intercept,enablePathList:e.enablePathList,region:c,apiHost:d,mode:(0,v.n)({isVA:s,isLogin:Boolean(t),isFTC:null!==(n=null==t?void 0:t.ftcUser)&&void 0!==n&&n,isHighRisk:e.isHighRisk}),isSDK:e.isSDK,custom:{ttwid:i}})})),this.finishTime=performance.now(),this.duration=this.finishTime-this.startTime}))}}((()=>Promise.all([(0,s.zI)((0,o.qm)()),(0,c.h)()]).then((([{appId:e,user:t,wid:i},{idc:n,vregion:o}])=>({appId:e,user:t,idc:n,wid:i,vregion:o})))),a.TA),new class extends d{constructor(e){super(),this.name="secsdk",this.getContextProps=e}loadSDK(){return this.startTime=performance.now(),this.getContextProps().then((({clusterRegion:e})=>{const t=(0,r.D9)(e);return g.get({moduleId:t})})).then((()=>{this.initialized||(this.initialized=!0,this.initTime=performance.now(),window.secsdk.csrf.setProtectedHost(a.sh),this.finishTime=performance.now(),this.duration=this.finishTime-this.startTime)}))}}((()=>(0,s.zI)((0,o.qm)())))],load:()=>Promise.all(f.sdks.map((e=>e.load()))),get loaded(){return this.sdks.reduce(((e,{initialized:t})=>e&&t),!0)},get time(){if(this.loaded)return this.sdks.map((({duration:e,name:t,initTime:i,finishTime:n,startTime:o})=>({duration:e,name:t,initTime:i,startTime:o,finishTime:n})))}},y={sdks:[new class extends d{constructor(e){super(),this.loadSDK=()=>(0,n.__awaiter)(this,void 0,void 0,(function*(){if(this.startTime=performance.now(),this.initialized)return;const{csrf:e}=yield i.e(5832).then(i.t.bind(i,55167,23));this.initTime=performance.now(),e.setProtectedHost(this.config),this.finishTime=performance.now(),this.duration=this.finishTime-this.startTime,this.initialized=!0})),this.name="cthulhusdk",this.config=e}}(a.kM)],load:()=>Promise.all(y.sdks.map((e=>e.load()))),get loaded(){return this.sdks.every((({initialized:e})=>e))},get time(){if(this.loaded)return this.sdks.map((({duration:e,name:t,initTime:i,finishTime:n,startTime:o})=>({duration:e,name:t,initTime:i,startTime:o,finishTime:n})))}},b=["/passport/web/"],w=["/v1/message/send","/api/update/profile","/api/v1/item/create/bulk","/api/v1/web/project/post","/api/commit/follow/user","/api/commit/item/digg","/api/comment/publish","/api/comment/digg","/api/item/collect","/api/aweme/delete","/tiktok/region/change/precheck/get/v1","/webcast/room/enter","/webcast/room/chat","/webcast/room/share","/webcast/gift/send","/webcast/sub/contract/create","/webcast/wallet_api/diamond_buy_external","/webcast/wallet_api_tiktok/withdraw/v2","/webcast/wallet_api/diamond_exchange/","/webcast/user/relation/update","/passport/web/"],k=b.concat(w),P={sdks:[new class extends d{constructor(e,t){super(),this.getContextProps=e,this.name="ztisdk",this.configs=t}loadSDK(){return this.startTime=performance.now(),this.getContextProps().then((({appId:e,user:t,wid:o,vregion:r="",idc:s})=>(0,n.__awaiter)(this,void 0,void 0,(function*(){var n;if(this.initialized)return;const a=void 0!==s?(0,l.v)(s):r,c=null!==(n=_[a])&&void 0!==n?n:"va",{SecureSDK:d}=yield Promise.all([i.e(8978),i.e(7586)]).then(i.bind(i,56134));this.initTime=performance.now(),yield d.init(c),d.setRegion(c),d.setConfig(Object.assign({aid:e,scene:"tt_fetch",certType:"header",signVersion:2},this.configs)),d.setLoginStatus(Boolean(t)),d.setWebId(o,e),d.setDisableCrossStorage(!0),d.setDisableStorageSignData(!1),d.setType({initType:"pubKey",signType:"pubKey"}),d.setStorageType("local"),d.start(),this.finishTime=performance.now(),this.duration=this.finishTime-this.startTime,this.initialized=!0}))))}}((()=>Promise.all([(0,s.zI)((0,o.qm)()),(0,c.h)()]).then((([{appId:e,user:t,wid:i,abTestVersion:n},{vregion:o,idc:r}])=>({appId:e,user:t,wid:i,vregion:o,abTestVersion:n,idc:r})))),{providerPathList:b,consumerPathList:w})],load:()=>Promise.all(P.sdks.map((e=>e.load()))),get loaded(){return this.sdks.every((({initialized:e})=>e))},get time(){if(this.loaded)return this.sdks.map((({duration:e,name:t,initTime:i,finishTime:n,startTime:o})=>({duration:e,name:t,initTime:i,startTime:o,finishTime:n})))}}},41857:(e,t,i)=>{i.d(t,{TA:()=>v,U8:()=>s,VF:()=>g,kM:()=>_,sh:()=>u,zv:()=>r});var n=i(22113),o=i.n(n);const r=["/node/share/","/share/item/list","/discover/render/undefined","/share/item/explore/list","/api/comment/list/","/api/comment/list/reply/","/api/commit/follow/user/","/api/commit/item/digg/","/aweme/v1/upload/image2/","/api/notice/multi/","/api/notice/count/","/api/notice/digg/list/","/api/user/following/request/list/","/api/commit/follow/request/approve/","/api/commit/follow/request/reject/","/api/comment/digg/","/api/comment/publish/","/api/comment/delete/","/api/sticker/item_list/","/api/user/contact/list/","/api/at/default/list/","/api/comment/search/user/","/web/aweme/v1/search/challengesug","/web/aweme/v1/discover/search/","/api/v1/item/create/","/api/ba/business/suite/permission/list","/api/search/user/full/","/api/search/user/preview/","/api/search/item/full/","/api/search/general/full/","/api/music/detail/","/api/challenge/detail/","/api/user/detail/","/api/user/list/","/api/item/detail/","/api/question/detail/","/api/question/item_list/","/api/discover/challenge/","/api/discover/user/","/api/discover/music/","/api/challenge/item_list/","/api/music/item_list/","/api/post/item_list/","/api/favorite/item_list/","/api/following/item_list/","/api/recommend/item_list/","api/preload/item_list","/api/recommend/user/","/api/recommend/embed_videos/","/api/live/detail/","/api/im/multi_user/","/api/user/get/animation/","/api/user/settings/","/aweme/v1/music/list/","/aweme/v1/adult/verify/get/accepted/id/types/","/api/mix/detail","/api/mix/item_list","/api/uniqueid/check/","/api/user/playlist/","/api/reflow/item/detail/","/api/reflow/user/detail/","/api/reflow/recommend/item_list/","/api/reflow/challenge/item_list/","/api/reflow/post/item_list/","/api/reflow/sticker/item_list/","/api/reflow/playlist/item_list/","/api/reflow/survey/detail/","/api/reflow/repost/item_list/","/api/impression/write/","/api/user/set/animation/","/api/aweme/set/react_duet_stitch/","/api/aweme/modify/visibility/","/api/aweme/delete/","/api/schedule/aweme/delete/","/passport/web/login_name/update/","/api/update/profile/","/api/commit/follow/request/approve/","/api/commit/follow/request/reject/","/api/commit/follow/user/","/tiktok/v1/username/save_async/","/api/ba/business/suite/account/off","/api/ba/business/suite/account/quitcheck","/api/playlist/create_with_items/","/api/playlist/update/","/api/playlist/modify_items/","/api/item/collect","/node/report/reasons","/aweme/v1/aweme/feedback/","/aweme/v2/aweme/feedback/","/webcast.*","/v1/message/send","/v2/conversation/create","/v1/voip/call","/v1/conversation/add_participants","/1/conversation/remove_participants","/v1/conversation/update_participant","/v1/conversation/set_setting_info","/v1/conversation/get_setting_info","/v1/conversation/upsert_core_ext_info","/v1/conversation/upsert_settings_ext","/v1/conversation/dissolve","/v1/message/mark","/v1/message/batch_unmark","/v1/message/set_property","/api-live/event/list","/api-live/event/related-videos","/api-live/event/detail","/api-live/share/live","/api-live/user/room","/node-a/send/download_link","/api/uniqueid/check/","/api/v3/register/user/info/sync/","/api/policy/notice/approve/","/api/private_banner/ack/","/api/privacy/agreement/record/agree/v1","/api/v3/register/verification/age/","/api/register/check/login/name/","/api/user/detail/self/","/passport/web/","/shorten/","/api/seo/kap/product_list/","/bi/notification/reporter/record","/api/repost/item_list"],s=["/passport/web/account/info/"],a=[/^\/webcast\/diamond/,/^\/webcast\/wallet_api\/(?!fs\/)/,/^\/webcast\/recharge/,/^\/webcast\/wallet_api_tiktok\/notifycenter/,/^\/webcast\/wallet_api_tiktok\/payment/,/^\/webcast\/wallet_api_tiktok\/periodic_payout_onboarding/,/^\/webcast\/wallet_api_tiktok\/payout_onboarding_confirm/,/^\/webcast\/wallet_api_tiktok\/payment_instrument_bind_url/],l=["/webcast/api/money/kyc/v1/info/detail","/webcast/api/money/kyc/v1/upload_file","/webcast/api/compliance/kyc/v1/submission","/webcast/room/chat/","/webcast/room/create_info/","/webcast/room/enter/","/webcast/room/leave/","/webcast/room/live_podcast/","/webcast/room/ping/audience/","/webcast/user/relation/update/","/webcast/room/emote_chat/","/webcast/room/share/",...a,"/webcast/wallet_api_tiktok/payment/initialize_payment","/webcast/wallet_api_tiktok/payment/initialize_agreement","/webcast/wallet_api_tiktok/payment/payment_methods/primary/set","/webcast/wallet_api_tiktok/payment/payment_methods/delete","/webcast/wallet_api_tiktok/payment/payment_methods/link","/webcast/wallet_api_tiktok/income_plus/tax/get_tax/","/webcast/wallet_api_tiktok/income_plus/tax/create_tax/","/webcast/wallet_api_tiktok/income_plus/tax/update_tax/","/webcast/wallet_api_tiktok/income_plus/agreement/","/webcast/wallet_api_tiktok/payout_onboarding_confirm/"],c=[...a,"/webcast/wallet_api_tiktok/periodic_payout_onboarding/","/webcast/wallet_api_tiktok/payment_instrument_bind_url/","/webcast/wallet_api_tiktok/payment/payment_methods","/webcast/wallet_api_tiktok/notifycenter/notices/","/webcast/wallet_api_tiktok/income_plus/get_user_region_info/","/webcast/wallet_api_tiktok/income_plus/account_steps/","/webcast/wallet_api_tiktok/income_plus/user/"],d=["/api/private_banner/ack/","/cloudpush/update_sender_token/","/cloudpush/app_notice_status/","/api/user/set/settings/","/api/reddot/report","/api/comment/digg/","/api/comment/publish/","/api/comment/delete/","/api/aweme/delete/","/api/schedule/aweme/delete/","/api/privacy/user/private_account/update/v1","/api/privacy/user/settings/update/v1","/api/im_setting/update/v1","/api/privacy/agreement/record/agree/v1","/api/commit/follow/request/approve/","/api/commit/follow/request/reject/","/api/commit/follow/user/","/api/impression/write/","/api/user/set/animation/","/api/aweme/set/react_duet_stitch/","/api/aweme/modify/visibility/","/passport/web/login_name/update/","/api/update/profile/","/api/upload/image/","/tiktok/v1/username/save_async/","/api/commit/ads/action/","/tiktok/v1/kids/commit/item/digg/","/api/im/stranger/unlimit/"],u={"webcast.tiktok.com":{POST:l,GET:c},"webcast-t.tiktok.com":{POST:l,GET:c},"webcast-m.tiktok.com":{POST:l,GET:c},"webcast.us.tiktok.com":{POST:["/webcast/room/chat/","/webcast/room/create_info/","/webcast/room/enter/","/webcast/room/leave/","/webcast/room/live_podcast/","/webcast/room/ping/audience/","/webcast/user/relation/update/","/webcast/room/emote_chat/","/webcast/room/share/",...a],GET:c},"www.tiktok.com":{POST:d},"us.tiktok.com":{POST:d},"m.tiktok.com":{POST:d},"t.tiktok.com":{POST:d}},v=[{aid:1988,dfp:!1,boe:!1,intercept:!0,enablePathList:r,isHighRisk:!1,isSDK:!1},{aid:368462,dfp:!1,boe:!1,intercept:!0,enablePathList:["/payment/v1/"],isHighRisk:!1,isSDK:!1}],p=["/api/aweme/modify/visibility/","/api/ba/business/suite/account/off","/api/ba/business/suite/account/quitcheck","/api/playlist/create_with_items/","/api/schedule/aweme/delete/","/api/update/profile/","/api/user/set/settings/","/api/collection/create/","/api/collection/move_items/","/api/collection/modify_items/","/api/collection/modify_info/","/api/collection/delete/","/api/dislike/item/"],h=["/webcast/gift/send/"],m=["/webcast/gift/send/"],g=o()([...p,...h,...m]),_={"www.tiktok.com":{POST:p},"webcast.tiktok.com":{POST:h},"webcast-t.tiktok.com":{POST:h},"webcast-m.tiktok.com":{POST:h},"webcast.us.tiktok.com":{POST:m}}},10646:(e,t,i)=>{i.d(t,{Qq:()=>c,v7:()=>l,w1:()=>a});var n=i(58305);const o=()=>'""',r=()=>{},s=()=>{};class a{constructor(e,t){this.key=e,this.type=t,this.storageObject=null,this.getter=o,this.setter=r,this.remove=s,this.getter="local"===t?n._S:n.Hd,this.setter="local"===t?n.AP:n.J2,this.remove="local"===t?n.sc:n.X}get storage(){return this.storageObject||(this.storageObject=this.tryParseJson(this.getter(this.key,"{}"))),this.storageObject}getStorage(){return this.storage}setItem(e,t){this.storage[e]=t,this.setter(this.key,JSON.stringify(this.storage))}getItem(e){return this.storage[e]}removeItem(e){this.storage[e]=void 0,this.setter(this.key,JSON.stringify(this.storage))}removeAll(){this.storageObject=null,this.remove(this.key)}tryParseJson(e){try{return JSON.parse(e)}catch(e){return{}}}}const l=new a("webapp-common-config","local"),c=new a("webapp-common-config","session")},32862:(e,t,i)=>{i.d(t,{GA:()=>d,HL:()=>c,OW:()=>l});var n=i(16891),o=i(11732),r=i(71281),s=i(58305);const a="AB_TEST_PREFIX_";function l(e,t){const i=n.f.getVar(e,t);return"val"in i?i.val:{}}function c(e,t){const i=n.f.getVar(e,t);return"vid"in i?i.vid:""}function d(e){var t,i;const{useDefaultValue:n,value:c}=(0,r.kX)(e),d="undefined"!=typeof window;if(n)return l(e,{}).vid;if(c){const n=null!==(i=null===(t=o.JO.find((t=>t.name===e)))||void 0===t?void 0:t.vid)&&void 0!==i?i:[];return n.includes(c)?(d&&(0,s.J2)(`${a}${e}`,c),c):((0,r.c3)(d,e,n),l(e,{}).vid)}return d&&(0,s.Hd)(`${a}${e}`)?(0,s.Hd)(`${a}${e}`):l(e,{}).vid}},71281:(e,t,i)=>{i.d(t,{TQ:()=>k,V7:()=>v,_F:()=>y,c3:()=>w,d:()=>O,kX:()=>b,qt:()=>P,tU:()=>h});var n=i(4474),o=i(47172),r=i(11732),s=i(11983),a=i(35267),l=i(57431),c=i(49057),d=i(48615),u=i(60484);function v(e,t){var i,n;return null===(n=null===(i=null==e?void 0:e.parameters)||void 0===i?void 0:i[t])||void 0===n?void 0:n.vid}const p=()=>"undefined"!=typeof window,h=()=>p()&&window.location.host.startsWith("localhost")||"1"===String(void 0);let m=!1;const g="AB_TEST_PREFIX_",_="FEATURE_FLAG_TEST_PREFIX",f=["0","1"],y=()=>{const{env:e}=(0,u.L$)((0,c.W)((()=>["env"]),[])),{type:t}=(0,u.L$)(e),{canUseQuery:i=!1}=(0,u.L$)((0,d.U)((()=>["canUseQuery"]),[])),n="ppe"===t||"boe"===t||h();return{isDebugEnv:n||i,isDebugPanelEnable:n}};function b(e){const{search:t}=(0,o.useLocation)(),i=(0,u.L$)((0,n.parse)(t)),{isDebugEnv:r}=y();let s=i[e];return Array.isArray(s)&&(s=s[s.length-1]),{searchObj:i,useDefaultValue:!r,value:s}}function w(e,t,i){e&&!m&&(m=!0,s.F.open({content:`feature flag value you provided for ${t} is not valid, valid value are: ${JSON.stringify(i)}`,duration:5,widthType:"padding"}))}function k(e){var t;const{useDefaultValue:i,value:n}=b(e),o=p(),r=(0,d.U)((()=>["config"]),[]),s=null===(t=null==r?void 0:r.config)||void 0===t?void 0:t.featureFlags,a=null==s?void 0:s[e];return i?a:n?f.includes(n)?(o&&sessionStorage.setItem(`${_}${e}`,n),Boolean(Number(n))):(w(o,e,f),a):o&&sessionStorage.getItem(`${_}${e}`)?Boolean(Number(sessionStorage.getItem(`${_}${e}`))):a}function P(e,t){var i,n;const{useDefaultValue:o,value:s}=b(t),a=p();if(o)return v(e,t);if(s){const o=null!==(n=null===(i=r.JO.find((e=>e.name===t)))||void 0===i?void 0:i.vid)&&void 0!==n?n:[];return o.includes(s)?(a&&sessionStorage.setItem(`${g}${t}`,s),s):(w(a,t,o),v(e,t))}return a&&sessionStorage.getItem(`${g}${t}`)?sessionStorage.getItem(`${g}${t}`):v(e,t)}function O(e){const{query:t}=(0,a.xw)(),{abTestVersion:i,env:n}=(0,l.x)(),o=p(),r="ppe"===(null==n?void 0:n.type)||"boe"===(null==n?void 0:n.type)||h();return o&&sessionStorage.getItem(`${g}${e}`)?sessionStorage.getItem(`${g}${e}`):r&&t[e]?t[e]:v(i,e)}},22248:(e,t,i)=>{i.d(t,{G:()=>o,d:()=>n});const n=e=>null,o=(e,t,i)=>{}},60484:(e,t,i)=>{i.d(t,{D1:()=>h,L$:()=>o});const n=Object.freeze({});function o(e){return null!=e?e:n}function r(e,t=1){return Math.round(Number(`${e}e${t}`))/Math.pow(10,t)}const s=1e3,a="K",l="k",c=1e3*s,d="M",u=1e3*c,v="B",p=BigInt(4294967296);function h(e=0,t){const{isLowerThousandUnit:i=!1}=null!=t?t:{};let n,o=Number(e);return o<0&&(o=Number(p+BigInt(e))),n=o<1e4?o.toString():o{i.d(t,{AP:()=>y,Gu:()=>S,Gz:()=>a,Hd:()=>w,J2:()=>k,Lm:()=>c,Qy:()=>O,UP:()=>s,X:()=>P,Zn:()=>m,_S:()=>f,a6:()=>g,aP:()=>d,aV:()=>_,dG:()=>E,hY:()=>v,jf:()=>l,mS:()=>u,nr:()=>r,sc:()=>b,wo:()=>x,y5:()=>h});var n=i(57432),o=i.n(n);function r(){return navigator.vendor&&-1!==navigator.vendor.indexOf("Apple")&&navigator.userAgent&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS")}function s(){return!!navigator.userAgent&&(-1!==navigator.userAgent.indexOf("Edge")||-1!==navigator.userAgent.indexOf("Edg/"))}function a(e=o(),t=o()){let i,n;function r(){i&&document[i]?e():t()}return"hidden"in document?(i="hidden",n="visibilitychange"):"msHidden"in document?(i="msHidden",n="msvisibilitychange"):"webkitHidden"in document&&(i="webkitHidden",n="webkitvisibilitychange"),"addEventListener"in document&&i&&n?(document.addEventListener(n,r,!1),document.removeEventListener.bind(document,n,r,!1)):o()}function l(e,t){let i={top:0,bottom:0,left:0,right:0};try{i=e.getBoundingClientRect()}catch(e){}let{top:n,bottom:o}=i;const{height:r}=i;return n-=t,o-=t,n=Math.abs(n),o<=0||n>=r?0:Number((o/r).toFixed(2))}function c(){return window.innerHeight{const r=v(),s=Date.now(),a=null!=o?o:window,l=()=>{const o=Date.now()-s;if(o>=t)return n?a.scrollTo({top:e,behavior:"smooth"}):a.scrollTo(0,e),void(null==i||i());const c=r+o/t*(e-r);n?a.scrollTo({top:c,behavior:"smooth"}):a.scrollTo(0,c),requestAnimationFrame(l)};l()};function v(){const e=document.documentElement||document.body.parentNode||document.body;return void 0!==window.pageYOffset?window.pageYOffset:e.scrollTop}const p="webapp-scroll_invoke_by_click";function h(){return w(p)}function m(){P(p)}function g(e=0,t=100,i=window){const n=v(),o=Date.now(),r=()=>{k(p,"done"),i.removeEventListener("scrollend",r)};k(p,"start"),i.addEventListener("scrollend",r),function r(){const s=Date.now()-o;if(s>=t)return void i.scrollTo({top:e,behavior:"smooth"});const a=(t-s)/t*(e-n)+n;i.scrollTo({top:a,behavior:"smooth"}),requestAnimationFrame(r)}()}function _(e=0,t=100,i=window){if(!("scrollTop"in i)||!("style"in i))return g(e,t,i);const n=i.scrollTop,o=Date.now();i.style.scrollSnapType="none";const r=()=>{k(p,"done"),i.removeEventListener("scrollend",r)};k(p,"start"),i.addEventListener("scrollend",r),function r(){const s=Date.now()-o;if(s>=t)return i.scrollTo({top:e,behavior:"instant"}),void("style"in i&&(i.style.scrollSnapType=""));const a=s/t*(e-n)+n;i.scrollTo({top:a,behavior:"instant"}),requestAnimationFrame(r)}()}function f(e,t=""){var i;try{return null!==(i=localStorage.getItem(e))&&void 0!==i?i:t}catch(e){return t}}function y(e,t){try{localStorage.setItem(e,t)}catch(e){}}function b(e){try{localStorage.removeItem(e)}catch(e){}}function w(e,t=""){var i;try{return null!==(i=sessionStorage.getItem(e))&&void 0!==i?i:t}catch(e){return t}}function k(e,t){try{sessionStorage.setItem(e,t)}catch(e){}}function P(e){try{sessionStorage.removeItem(e)}catch(e){}}function O(e){const t=w(e);return P(e),t}const S=e=>{e.preventDefault(),e.stopPropagation()},E=e=>{e.stopPropagation()},x=e=>{e.preventDefault()}},97086:(e,t,i)=>{function n(){return"undefined"==typeof window||"undefined"==typeof document}function o(){var e;if(n())return!1;const t=document.querySelector("#app");return"1"===(null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.downgrade)}function r(){return!n()&&null!==document.querySelector('script[data-chunk="ssg"]')}function s(){return/Windows/i.test(window.navigator.userAgent)}function a(e){var t,i;return!n()&&!!e&&"1"!==(null===(i=null===(t=document.querySelector("#app"))||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.downgrade)}i.d(t,{$y:()=>r,Yh:()=>s,_8:()=>a,fU:()=>n,qk:()=>o})},53764:(e,t,i)=>{i.d(t,{M:()=>o,e:()=>n});const n=function(e){if(!e)return{fullscreenEnabled:"fullscreenEnabled",fullscreenElement:"fullscreenElement",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",fullscreenchange:"fullscreenchange",fullscreenerror:"fullscreenerror"};const t={w3:{fullscreenEnabled:"fullscreenEnabled",fullscreenElement:"fullscreenElement",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",fullscreenchange:"fullscreenchange",fullscreenerror:"fullscreenerror"},webkit:{fullscreenEnabled:"webkitFullscreenEnabled",fullscreenElement:"webkitCurrentFullScreenElement",requestFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"},moz:{fullscreenEnabled:"mozFullScreenEnabled",fullscreenElement:"mozFullScreenElement",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen",fullscreenchange:"mozfullscreenchange",fullscreenerror:"mozfullscreenerror"},ms:{fullscreenEnabled:"msFullscreenEnabled",fullscreenElement:"msFullscreenElement",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen",fullscreenchange:"MSFullscreenChange",fullscreenerror:"MSFullscreenError"}};for(const i of Object.values(t))if(i.fullscreenEnabled in e)return i;return{fullscreenEnabled:"fullscreenEnabled",fullscreenElement:"fullscreenElement",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",fullscreenchange:"fullscreenchange",fullscreenerror:"fullscreenerror"}}("undefined"==typeof document?void 0:document),o=()=>{var e;return"undefined"!=typeof document?null!==(e=document[null==n?void 0:n.fullscreenElement])&&void 0!==e?e:document.body:null}},35323:(e,t,i)=>{i.d(t,{uQ:()=>o,xt:()=>a});var n=i(93987);function o(e){return performance.mark(e)}function r(e){const{start:t,end:i}=e;try{return performance.measure(`${t}-${i}`,t,i)}catch(e){}}function s(e){return e<0?0:e}function a(){var e,t;const i=[n.Y.PlayerDestroy,n.Y.PlayerMounted,n.Y.OneColumnRerender,n.Y.BrowseModeRerender,n.Y.VideoRequest,n.Y.VideoFirstFrame].map((e=>{var t,i;return s(null!==(i=null===(t=r({start:n.Y.PlayerChange,end:e}))||void 0===t?void 0:t.duration)&&void 0!==i?i:0)})),[o,a,l,c,d,u]=i;return{destroy_time:o,mounted_time:a,one_column_rerender_time:l,browse_mode_rerender_time:c,video_request_time:d,video_first_frame_time:u,player_first_frame_time:s(null!==(t=null===(e=r({start:n.Y.VideoRequest,end:n.Y.VideoFirstFrame}))||void 0===e?void 0:e.duration)&&void 0!==t?t:0)}}},37745:(e,t,i)=>{function n(e,t){return 2===e||6===e||5!==e&&t}function o(e,t){return 2===e||6===e?1:5===e?0:t}i.d(t,{L:()=>o,z:()=>n})},49057:(e,t,i)=>{i.d(t,{W:()=>a});var n=i(32877),o=i.n(n),r=i(40099),s=i(57431);function a(e,t){const i=(0,s.x)();return(0,r.useMemo)((()=>i?o()(i,...e()):i),t)}},90535:(e,t,i)=>{i.d(t,{a:()=>v,h:()=>p});var n=i(58632),o=i(1055),r=i(94999),s=i(9685),a=i(17354),l=i(62564),c=i(51660),d=i(10598),u=i(54888);function v(e){var t,i;return(0,n.__awaiter)(this,void 0,void 0,(function*(){if(null===(i=null===(t=window[o.H2])||void 0===t?void 0:t.BizContext)||void 0===i?void 0:i.initialized)return;const n=(0,c.qm)(),l=r.l.getInstance(u.$),v=yield(0,d.x)(n,e);l.store.dispatch(l.getActions().setBizContext(v)),l.store.dispatch(l.getActions().setInitialized(!0)),yield(0,s._)(l.state$.pipe((0,a.p)((e=>!!e.initialized))))}))}function p(){return(0,n.__awaiter)(this,void 0,void 0,(function*(){const e=r.l.getInstance(u.$);return(0,s._)(e.state$.pipe((0,a.p)((e=>!!e.bizContext)),(0,l.T)((e=>e.bizContext))))}))}},48615:(e,t,i)=>{i.d(t,{U:()=>l,y:()=>a});var n=i(13392),o=i(32877),r=i.n(o),s=i(54888);function a(){return(0,n.Ph)(s.$)}function l(e,t){return(0,n.Ph)(s.$,{selector:t=>{const{bizContext:i}=t;return i?r()(i,...e()):i},dependencies:t})}},54888:(e,t,i)=>{i.d(t,{$:()=>k,A:()=>P});var n=i(58632),o=i(80798),r=i(64162),s=i(4126),a=i(93995),l=i(46657),c=i(63700),d=i(23999),u=i(26324),v=i(24451),p=i(35572),h=i(8536),m=i(74690),g=i(80339),_=i(7672),f=i(4474),y=i(68628);let b=class{getBizContext(e,t){return(0,y.H)(fetch((0,f.stringifyUrl)({url:"/node-webapp/api/biz-context",query:{lang:e,app_name:t}})).then((e=>e.json())))}};b=(0,n.__decorate)([(0,_._)()],b);var w=i(34360);let k=class extends r.E{constructor(e){super(),this.service=e,this.defaultState={bizContext:null,initialized:!1}}setBizContext(e,t){var{statusCode:i}=t,o=(0,n.__rest)(t,["statusCode"]);return 0!==i?e:Object.assign(Object.assign({},e),{bizContext:o})}setInitialized(e,t){return Object.assign(Object.assign({},e),{initialized:t})}init(e){return e.pipe((0,v.E)(this.state$),(0,p.p)((([{lang:e,app_name:t},{initialized:i}])=>i?l.w:this.service.getBizContext(e,t).pipe((0,h.Z)((e=>(0,c.h)((0,d.of)(this.getActions().setBizContext(e))))),(0,m.Z)(this.getActions().setInitialized(!1)),(0,g.q)(this.getActions().setInitialized(!0),this.terminate())))))}};(0,n.__decorate)([(0,s.HI)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Object]),(0,n.__metadata)("design:returntype",Object)],k.prototype,"setBizContext",null),(0,n.__decorate)([(0,s.HI)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",Object)],k.prototype,"setInitialized",null),(0,n.__decorate)([(0,s.Mj)({payloadGetter:1}),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[u.c]),(0,n.__metadata)("design:returntype",void 0)],k.prototype,"init",null),k=(0,n.__decorate)([(0,a.n)("BizContext"),(0,n.__metadata)("design:paramtypes",[b])],k);const P=(0,o.U)("readBizContextModuleAtom@tiktok/webapp-common",(()=>(0,w.y)(k)))},83658:(e,t,i)=>{i.d(t,{OC:()=>k,h$:()=>P});var n,o=i(58632),r=i(70322),s=i(71111),a=i(31209),l=i(40407),c=i(40040),d=i(56203);!function(e){e[e.S=1]="S",e[e.T=2]="T",e[e.X=3]="X",e[e.R=4]="R"}(n||(n={}));const u={s:n.S,t:n.T,x:n.X,r:n.R},v=e=>{var t;return null!==(t=u[e.toLowerCase()])&&void 0!==t?t:null},p="/node-webapp/api/inference",h="last_inference";var m=i(4474),g=i(58305);const _=(e,t)=>{if(e.length!==t.length)throw new Error("Array and mask must be of the same length.");return e.filter(((e,i)=>"1"===t[i]))},f=e=>{var t,i,n;const o=atob(e),r=[];for(let e=0;ee.json()));return 0===o.statusCode&&Array.isArray(o.result)?o.result:(console.error(`Unable to get causal inference: ${o.statusCode}`),[-1])}catch(e){return console.error("Error fetching inference result:",e),[-1]}}))}var b;!function(e){e.Base="base",e.Model="model"}(b||(b={}));const w=(0,s.atom)({});w.debugLabel="spaExperimentAtom";const{useServiceDispatchers:k,useServiceState:P}=(0,a.i)(w,((e,t)=>({getAbTestVidWithQuerySPA({projectName:i,isInSpaExperiment:n,expVid:o,wid:r,globalModelInfo:s,vgeo:a,user:l,disableAutoTrigger:c=!1}){const d=e(w);if(null==d?void 0:d[i])return;let u=b.Base,v=o,p=[],h=1,m=[];if(n){const{projectLevelModelInfo:e}=((e,t)=>{let i={};if("string"==typeof e)try{i=JSON.parse(e)}catch(e){console.error("Error: Failed to parse uplift model info.",e)}else"object"==typeof e&&null!==e&&(i=e);return{projectLevelModelInfo:null==i?void 0:i[t]}})(null!=s?s:{},i)||{},{inference_effective_duration:t,inference_disabled_vgeo_list:n}=e||{},{type:r,default_vid:a,treatment_list:l}=(null==e?void 0:e[o])||{};r&&(u=r),a&&(v=a),Array.isArray(l)&&(p=l),t&&(h=t),Array.isArray(n)&&(m=n)}t(w,(e=>Object.assign(Object.assign({},e),{[i]:{projectName:i,vid:v,wid:r,experimentType:u,inferenceCount:0,treatmentList:p,inferenceEffectiveDuration:h,inferenceDisabledVGeoList:m}}))),c||this.maybeTriggerInference({projectName:i,vgeo:a,user:l})},maybeTriggerInference({projectName:i,vgeo:n="",user:s,enterMethod:a="",pageName:u=""}){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const p=e(w)[i];if(!p)return void console.log("Error. Unable to find the experiment: ",i);const{wid:m,experimentType:k,vid:P,inferenceCount:O,treatmentList:S,inferenceEffectiveDuration:E,inferenceDisabledVGeoList:x}=p;let T=(0,l.ZC)(m,c.uV,d.gb);if(S&&S[0]){const e=Number(S[0].feature_number||0);e&&e>0&&(null==T?void 0:T.length)>0&&(T=null==T?void 0:T.slice(0,e))}if(k===b.Base)r.w.handleInferenceTrigger({enter_method:a,page_name:u,model_name:`${i}_${P}`,full_payload:null==T?void 0:T.toString(),payload:null==T?void 0:T.toString(),threshold_exceed:-1,inference_result:-1});else if(k===b.Model&&0===O&&((e,t="",i=!1)=>!!i||!e.includes(t))(x,n,!!s)){const{isCacheValid:e,cachedVid:n}=((e,t=1,i,n="",o="")=>{try{const s=(0,g._S)(h)||"{}",a=JSON.parse(s)[e],l=null==a?void 0:a.timestamp,c=null==a?void 0:a.vid;if(!c||!l)return{isCacheValid:!1};const d=24*t*60*60*1e3;return Date.now()-parseInt(l,10)<=d?(r.w.handleInferenceDisqualify({enter_method:i,model_name:n,reason:"inference_cached",page_name:o}),{isCacheValid:!0,cachedVid:c}):{isCacheValid:!1}}catch(e){return console.error("Error in getValidInferenceCache:",e),{isCacheValid:!1}}})(i,E,a,`${i}_${P}`,u);if(e&&n)return void t(w,(e=>Object.assign(Object.assign({},e),{[i]:Object.assign(Object.assign({},p),{vid:n,inferenceCount:O+1})})));const{isSuccessful:s,resultVid:b}=(yield function(e,t,i,n=[],s,a){var u;return(0,o.__awaiter)(this,void 0,void 0,(function*(){let o={vid:t,inference_result:-1/0},p=!0;for(const e of n){const{treatment_vid:t,model_name:n="",model_type:h="",feature_number:m=0,prediction_threshold:g=0,feature_mask:b=""}=null!=e?e:{},w=(0,l.ZC)(i||"",c.uV,d.gb);if(0===w.length){r.w.handleInferenceDisqualify({enter_method:s,model_name:n,reason:"failed_to_generate_payload",page_name:a});continue}let k=[],P=[];try{const e=(null===(u=f(b||""))||void 0===u?void 0:u.slice(0,m))||[];P=_(w,e);const t=v(h);if(0===P.length||!n||!t)throw new Error(`Missing key parameters, unable to call inference API! maskedPayload.length: ${P.length}, modelName: ${n}, modelType: ${t}`);k=yield y(P,n,t)}catch(e){console.error("Unable to call inference API!",e),r.w.handleInferenceTrigger({enter_method:s,page_name:a,model_name:n,full_payload:w.toString(),payload:P.toString(),threshold_exceed:0,inference_result:-1});continue}const[O]=k,S=void 0!==O&&-1!==O,E=!!S&&O>g;r.w.handleInferenceTrigger({enter_method:s,page_name:a,model_name:n,full_payload:w.toString(),payload:P.toString(),threshold_exceed:E?1:0,inference_result:O}),S?E&&O>o.inference_result&&(o={vid:t,inference_result:O}):p=!1}return p&&((e,t)=>{const i=h,n=(0,g._S)(i)||"{}",o=JSON.parse(n);o[e]={timestamp:Date.now().toString(),vid:t},(0,g.AP)(i,JSON.stringify(o))})(e,o.vid),{isSuccessful:p,resultVid:o.vid}}))}(i,P,m,S,a,u))||{};t(w,(e=>Object.assign(Object.assign({},e),{[i]:Object.assign(Object.assign({},p),{vid:b||p.vid,inferenceCount:s?O+1:O})})))}}))},disqualifyForInference:(e,t,i,n)=>{r.w.handleInferenceDisqualify({enter_method:t,model_name:e,reason:n,page_name:i})}})))},23294:(e,t,i)=>{i.d(t,{S:()=>u,w:()=>d});var n=i(40099),o=i(32125),r=i(83658),s=i(49057),a=i(48615),l=i(60484),c=i(71281);const d=e=>{var t;const{abTestVersion:i}=(0,l.L$)((0,s.W)((()=>["abTestVersion"]),[])),o=null!==(t=u(i,e))&&void 0!==t?t:"v0",{isInExperiment:r,isInControl:a,isInTreatment:c}=(0,n.useMemo)((()=>({isInControl:"v0"===o,isInTreatment:"v1"===o,isInExperiment:"v0"===o||"v1"===o})),[o]);return{baseExpId:e,isInControl:a,isInTreatment:c,isInExperiment:r}};function u(e,t,i,n){const{wid:d,user:u}=(0,l.L$)((0,s.W)((()=>["wid","user"]),[])),{upliftModelInfo:v={},vgeo:p=""}=(0,l.L$)((0,a.U)((()=>["upliftModelInfo","vgeo"]),[])),h=null!=n?n:`${t}_spa`,m=(0,c.qt)(e,t),g=(0,c.qt)(e,h),_=(0,r.OC)();g?_.getAbTestVidWithQuerySPA({projectName:t,isInSpaExperiment:!0,expVid:g,wid:d,globalModelInfo:v,vgeo:p,user:u,disableAutoTrigger:i}):m&&_.getAbTestVidWithQuerySPA({projectName:t,isInSpaExperiment:!1,expVid:m,wid:d,globalModelInfo:v,vgeo:p,user:u,disableAutoTrigger:i});const{vid:f}=(0,l.L$)((0,r.h$)((e=>e[t]),o.bN));return f}},59952:(e,t,i)=>{i.d(t,{w:()=>f,x:()=>y});var n=i(58632),o=i(64162),r=i(4126),s=i(93995),a=i(35572),l=i(23999),c=i(62564),d=i(26324),u=i(34360),v=i(80798),p=i(10646),h=i(7672),m=i(26325),g=i(55099);let _=class{constructor(e){this.fetch=e}postUserSetting(e){return this.fetch.post("/api/user/set/settings/",{query:Object.assign(Object.assign({},e),{tt_csrf_token:this.fetch.csrfToken}),headers:{[m.nk]:this.fetch.csrfToken},baseUrlType:2})}};_=(0,n.__decorate)([(0,h._)(),(0,n.__metadata)("design:paramtypes",[g.p])],_);let f=class extends o.E{constructor(e){super(),this.service=e,this.defaultState={photoSensitiveVideosSetting:p.v7.getItem("photo_sensitive_video_setting"),hideMaskTempVideoId:"",loginStatePhotoSensitiveVideosSetting:void 0,hasClosedVideoMask:!1}}setSkipPhotoSensitiveAction(e,t){const{skipPhotoSensitiveVideo:i,login:n=!1}=t,o=i?1:2;e.photoSensitiveVideosSetting=o,n&&(e.loginStatePhotoSensitiveVideosSetting=o)}setHideMaskTempVideoId(e,t){e.hideMaskTempVideoId=t}setHasClosedMask(e,t){e.hasClosedVideoMask=t}setPhotoSensitiveVideosSetting(e,t){e.photoSensitiveVideosSetting=t}setLoginStatePhotoSensitiveVideosSetting(e,t){e.loginStatePhotoSensitiveVideosSetting=t}setSkipPhotoSensitive(e){return e.pipe((0,a.p)((({skip:e,hasLogin:t})=>{const i=e?1:2;return p.v7.setItem("photo_sensitive_video_setting",i),t?this.service.postUserSetting({field:"photosensitive_videos_setting",value:i}).pipe((0,c.T)((({status_code:t})=>0===t?this.getActions().setSkipPhotoSensitiveAction({skipPhotoSensitiveVideo:e,login:!0}):this.noop()))):(0,l.of)(this.getActions().setSkipPhotoSensitiveAction({skipPhotoSensitiveVideo:e}))})))}};(0,n.__decorate)([(0,r.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Object]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setSkipPhotoSensitiveAction",null),(0,n.__decorate)([(0,r.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,String]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setHideMaskTempVideoId",null),(0,n.__decorate)([(0,r.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Boolean]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setHasClosedMask",null),(0,n.__decorate)([(0,r.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setPhotoSensitiveVideosSetting",null),(0,n.__decorate)([(0,r.h5)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[Object,Number]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setLoginStatePhotoSensitiveVideosSetting",null),(0,n.__decorate)([(0,r.Mj)(),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[d.c]),(0,n.__metadata)("design:returntype",void 0)],f.prototype,"setSkipPhotoSensitive",null),f=(0,n.__decorate)([(0,s.n)("VideoMaskModule"),(0,n.__metadata)("design:paramtypes",[_])],f);const y=(0,v.U)("videoMaskModuleAtom@tiktok/fe-shared",(()=>(0,u.y)(f)))},26325:(e,t,i)=>{i.d(t,{$_:()=>c,F0:()=>d,Ty:()=>a,nk:()=>s,si:()=>n});const n=(0,i(34099).V)();var o,r;!function(e){e[e.Default=0]="Default",e[e.Simple=1]="Simple",e[e.None=2]="None"}(o||(o={})),function(e){e[e.None=0]="None",e[e.AWEME=1]="AWEME",e[e.FixedWww=2]="FixedWww",e[e.AutoMOrT=3]="AutoMOrT",e[e.Webcast=4]="Webcast",e[e.AutoWebcastMOrT=5]="AutoWebcastMOrT",e[e.AWEMEV1=6]="AWEMEV1",e[e.CommentTest=8]="CommentTest",e[e.WebcastT=9]="WebcastT",e[e.Now=10]="Now"}(r||(r={}));const s="tt-csrf-token",a={FORM_ENCODE:"application/x-www-form-urlencoded; charset=UTF-8",JSON:"application/json; charset=UTF-8"},l=()=>{var e,t,i;try{const n=document.getElementById("__REGION__DATA__INJECTED__");return null===(i=null===(t=JSON.parse(null!==(e=null==n?void 0:n.textContent)&&void 0!==e?e:"{}").__DATA__)||void 0===t?void 0:t.region_data_domains)||void 0===i?void 0:i.WEBAPP_WEBCAST_API}catch(e){return}};function c(e=0){var t,i,o,r,s,a,c,d;switch(e){case 9:{let e="https://webcast.tiktok.com";return"us"===n.kind&&(e="https://webcast.us.tiktok.com"),e}case 2:return null!==(t=n.rootApi)&&void 0!==t?t:"https://www.tiktok.com";case 3:return null!==(i=n.mTApi)&&void 0!==i?i:"";case 6:return null!==(o=n.rootApi)&&void 0!==o?o:"";case 4:return null!==(s=null!==(r=l())&&void 0!==r?r:n.webcastRootApi)&&void 0!==s?s:"https://webcast.tiktok.com";case 5:return null!==(a=n.webcastApi)&&void 0!==a?a:"";case 0:return null!==(c=n.rootApi)&&void 0!==c?c:"";case 8:return null!==(d=n.rootApi)&&void 0!==d?d:"";case 10:return"https://now.tiktok.com";default:return""}}function d(){var e,t;try{const i=JSON.parse(null!==(t=null===(e=window.document.getElementById("__SCHEDULE_INFO__"))||void 0===e?void 0:e.textContent)&&void 0!==t?t:"{}");if(i.to)return i}catch(e){console.warn(e)}return{from:"",to:"",dispatchParams:{}}}},237:(e,t,i)=>{i.d(t,{Rh:()=>l,gk:()=>c,LZ:()=>u,Gy:()=>v});class n{constructor(){this.events={}}on(e,t,i={}){var n;let o=t;return i.once&&(o=function(e){let t,i=!1;return n=>(i||(t=e.apply(this,n),i=!0),t)}(t)),this.events[e]?null===(n=this.events[e])||void 0===n||n.push(o):this.events[e]=[o],()=>{var i;this.events[e]=null===(i=this.events[e])||void 0===i?void 0:i.filter((e=>t!==e))}}emit(e,...t){const i=this.events[e]||[];for(const e of i)e(...t)}clear(e){this.events[e]=[]}}const o=503,r="X-TT-System-Error",s="23",a="/api/v3/register/verification/age",l="sig_api_geoblocked",c="sig_signup_api_geoblocked";class d{constructor(){this.emitter=new n}static getInstance(){return d.instance||(d.instance=new d),d.instance}on(...e){return this.emitter.on(...e)}emit(e,t){this.emitter.emit(e,t)}clear(e){this.emitter.clear(e)}}const u=d.getInstance();function v(e,t){const i=function(e){if(!e||e.status!==o||!e.headers)return!1;const t=e.headers.get?e.headers.get(r):e.headers[r.toLowerCase()];return!(!t||t!==s)}(e);if(i)if(function(e){return e.includes(a)}(t)){const e=function(e){const t=e.split("?")[0],i=t.indexOf(a);return{domain:t.substring(0,i),path:t.substring(i)}}(t);u.emit(c,e)}else u.emit(l)}},32970:(e,t,i)=>{i.d(t,{Y:()=>s,w:()=>r});const n=(e,t)=>{try{return sessionStorage.getItem(e)||t}catch(e){return console.warn("sessionStorage get failed"),t}};function o(e,t=""){var i;try{return null!==(i=localStorage.getItem(e))&&void 0!==i?i:t}catch(e){return t}}const r=(e,t,i)=>{var r,s,a;const l=document.cookie.match(/s_v_web_id=(\w+)/);try{const c="v1"===(null===(a=null===(s=null===(r=e.abTestVersion)||void 0===r?void 0:r.parameters)||void 0===s?void 0:s.webapp_odin_id_fe_reverse)||void 0===a?void 0:a.vid),d=!!(e||{}).user,u=Object.assign(Object.assign({aid:"1988",app_name:"tiktok_web",channel:"tiktok_web",device_platform:(e||{}).isMobile?"web_mobile":"web_pc",device_id:(e||{}).wid,region:(e||{}).region,priority_region:((e||{}).user||{}).region||"",os:(e||{}).os,referer:document.referrer,root_referer:n("webapp-session-referer"),cookie_enabled:navigator.cookieEnabled,screen_width:screen.width,screen_height:screen.height,browser_language:navigator.language,browser_platform:navigator.platform,browser_name:navigator.appCodeName,browser_version:navigator.appVersion,browser_online:navigator.onLine,verifyFp:(l||"")[1],app_language:(e||{}).language,webcast_language:(e||{}).language,tz_name:Intl.DateTimeFormat().resolvedOptions().timeZone,is_page_visible:t,focus_state:i,is_fullscreen:window.matchMedia("(display-mode: fullscreen)").matches,history_len:window.history.length},c?{}:{user_is_login:d}),{data_collection_enabled:d||"1"===o("guest-mode-flag","0")});return"ageVerify"===n("enter_method")&&(u.security_verification_aid="1459"),u}catch(e){}return{}},s=()=>({cookie_enabled:navigator.cookieEnabled,screen_width:screen.width,screen_height:screen.height,browser_language:navigator.language,browser_platform:navigator.platform,browser_name:navigator.appCodeName,browser_version:navigator.appVersion,browser_online:navigator.onLine,timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone})},12904:(e,t,i)=>{i.d(t,{CQ:()=>s,Si:()=>c,Yp:()=>r,Zu:()=>a,sG:()=>l});var n,o=i(5902);!function(e){e[e.Unknown=0]="Unknown",e[e.WebLoggedIn=513]="WebLoggedIn",e[e.WebUSNotLoggedIn=514]="WebUSNotLoggedIn",e[e.WebUSNotLoggedInHighRisk=515]="WebUSNotLoggedInHighRisk",e[e.WebNonUSNotLoggedIn=516]="WebNonUSNotLoggedIn",e[e.WebUnder13=517]="WebUnder13",e[e.WebEUNotLoggedIn=518]="WebEUNotLoggedIn",e[e.WebEUNotLoggedInHighRisk=519]="WebEUNotLoggedInHighRisk"}(n||(n={}));const r=()=>"ageVerify"===(0,o.Hd)("enter_method"),s=3058,a=3059,l={m:"va",t:"sg",us:"ttp",boe:"boe","":void 0},c="bdturing-verify"},18829:(e,t,i)=>{i.d(t,{n:()=>n});const n=({isVA:e,isLogin:t,isFTC:i,isHighRisk:n,isEU:o=!1})=>i?517:t?513:o&&n?519:o&&!n?518:e&&n?515:e&&!n?514:516},5902:(e,t,i)=>{i.d(t,{Gz:()=>o,Hd:()=>r,J2:()=>s});const n=()=>{};function o(e=n,t=n){let i,o;function r(){i&&document[i]?e():t()}return"hidden"in document?(i="hidden",o="visibilitychange"):"msHidden"in document?(i="msHidden",o="msvisibilitychange"):"webkitHidden"in document&&(i="webkitHidden",o="webkitvisibilitychange"),"addEventListener"in document&&i&&o?(document.addEventListener(o,r,!1),document.removeEventListener.bind(document,o,r,!1)):n}function r(e,t=""){var i;try{return null!==(i=sessionStorage.getItem(e))&&void 0!==i?i:t}catch(e){return t}}function s(e,t){try{sessionStorage.setItem(e,t)}catch(e){}}},58156:(e,t,i)=>{i.d(t,{v:()=>o});const n={useast1a:"US-East",useast2a:"US-EastRed",useast5:"US-TTP",useast8:"US-TTP2",sg1:"Singapore-Central",my:"Singapore-Central",my2:"Singapore-Central",ie:"EU-TTP",no1a:"EU-TTP2"};function o(e){var t;return void 0!==e&&null!==(t=n[e])&&void 0!==t?t:"UNKNOWN"}},74631:(e,t,i)=>{i.d(t,{MX:()=>s});var n=i(58632);const o=1e4;var r;!function(e){e[e.Pass=0]="Pass",e[e.Reject=1]="Reject",e[e.Retry=2]="Retry"}(r||(r={}));const s=new class{constructor(){this.domId="tiktok-verify-ele",this.captcha=null,this.verifyElement=null,this.open=!1,this.rejectPass=!1,this.checkVerify=(e,t,i,r,s)=>(0,n.__awaiter)(this,void 0,void 0,(function*(){var n;if("object"!=typeof e)return e;const{statusCode:a,code:l}=null!=e?e:{};if(a===o||l===String(o)){const a=l===String(o)?e:e.verifyConfig,c=r&&i&&!a.region.startsWith("ttp")?"ttp":a.region,d=yield this.loadCaptcha(c,t);if(-1===a.fp){const e=yield null===(n=this.captcha)||void 0===n?void 0:n.getFp();a.fp=e}return d?this.open?(yield this.updateState(),this.rejectPass?1:2):yield this.goVerify(a,r,null==s?void 0:s.lang,null==s?void 0:s.userMode):1}return 0})),this.destroy=()=>{var e;null===(e=this.captcha)||void 0===e||e.close(),this.verifyElement&&(document.body.removeChild(this.verifyElement),this.verifyElement=null)}}init(){this.verifyElement||(this.verifyElement=document.createElement("div"),this.verifyElement.setAttribute("id",this.domId),document.body.appendChild(this.verifyElement))}goVerify(e,t,i,n){return this.init(),new Promise((o=>{this.openVerify((()=>{this.closeVerify(),o(2)}),(()=>{this.closeVerify(!0),o(1)}),e,t,i,n)}))}closeVerify(e=!1){var t;this.open=!1,this.rejectPass=e,null===(t=this.captcha)||void 0===t||t.close()}openVerify(e,t,i,n,o,r){var s;const a={ele:this.domId,lang:null!=o?o:"en",successCb:e,showMode:"mask",closeCb:t,errorCb:()=>{},fpCookieOption:{domain:".tiktok.com",sameSite:"None",secure:!0}};n&&(a.host=n),this.open=!0,this.rejectPass=!0,null===(s=this.captcha)||void 0===s||s.render({userMode:r,verify_data:i,captchaOptions:a})}updateState(){return new Promise((e=>{if(!this.open)return void e();const t=setInterval((()=>{this.open||(clearInterval(t),e())}),800)}))}loadCaptcha(e,t){return(0,n.__awaiter)(this,void 0,void 0,(function*(){if(!this.captcha){let n;switch(e){case"boe":case"sg":n=i.e(4336).then(i.bind(i,41002));break;case"va":n=i.e(241).then(i.bind(i,24097));break;case"ie":n=i.e(3392).then(i.bind(i,78494));break;case"no1a":n=i.e(7181).then(i.bind(i,61521));break;case"gcp":case"in":n=i.e(1427).then(i.bind(i,17819));break;case"ttp":n=i.e(2318).then(i.bind(i,10906));break;case"ttp2":n=i.e(5112).then(i.bind(i,40906));break;case"useastred":n=i.e(1618).then(i.bind(i,13530));break;default:return!1}const o=yield n;this.captcha=o,o.init({commonOptions:{aid:1988,did:t||"0",iid:"0"},captchaOptions:{fpCookieOption:{domain:".tiktok.com",sameSite:"None",secure:!0}}})}return!0}))}}},11732:(e,t,i)=>{var n,o,r,s,a,l,c;i.d(t,{JO:()=>d,$v:()=>u}),function(e){e[e.UNDEFINED=0]="UNDEFINED",e[e.CREATE=1]="CREATE",e[e.LIVING=2]="LIVING",e[e.STOP=3]="STOP"}(n||(n={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.PREPARE=1]="PREPARE",e[e.ONLINE=2]="ONLINE",e[e.PAUSE=3]="PAUSE",e[e.OFFLINE=4]="OFFLINE",e[e.SUSPENDED=-1]="SUSPENDED",e[e.LIVE_AND_LEAVE=-2]="LIVE_AND_LEAVE",e[e.PAID_EVENT=-3]="PAID_EVENT",e[e.SUBSCRIBER_ONLY=-4]="SUBSCRIBER_ONLY",e[e.UNAVAILABLE=-5]="UNAVAILABLE",e[e.REGIONAL_UNAVAILABLE=-6]="REGIONAL_UNAVAILABLE",e[e.Blocked=-7]="Blocked",e[e.USER_RM_BLOCK=-8]="USER_RM_BLOCK",e[e.PARENT_RM_BLOCK=-9]="PARENT_RM_BLOCK",e[e.KickOut=-10]="KickOut",e[e.E_COMMERCE_BLOCK=-11]="E_COMMERCE_BLOCK",e[e.E_COMMERCE_USER_RM=-12]="E_COMMERCE_USER_RM",e[e.E_COMMERCE_PARENT_RM=-13]="E_COMMERCE_PARENT_RM"}(o||(o={})),function(e){e.Live="tiktok_live_view_window"}(r||(r={})),function(e){e[e.TRILL=1180]="TRILL",e[e.MUSICALLY=1233]="MUSICALLY"}(s||(s={})),function(e){e.TRILL="t",e.MUSICALLY="m",e.LITE="lite"}(a||(a={})),function(e){e[e.Normal=0]="Normal",e[e.SmartPlayer=1]="SmartPlayer"}(l||(l={})),function(e){e[e.UNSET=0]="UNSET",e[e.CLOSE=1]="CLOSE",e[e.OPEN=2]="OPEN"}(c||(c={}));const d=[{name:"use_container_exp",vid:["v0","v1","v2","v3"]},{name:"share_button_part1_test",vid:["v1","v2","v3","v4"]},{name:"expose_recharge_entry_pc",vid:["v1","v2","v3"]},{name:"live_studio_download_type",vid:["v1","v2"]},{name:"live_studio_entry",vid:["v1","v2","v3"]},{name:"live_discover_draw_hover",vid:["v0","v1"]},{name:"live_www_host",vid:["v0","v1"]},{name:"live_room_container_upgrade",vid:["v0","v1"]},{name:"live_discover_enter_shortcut",vid:["v0","v1"]},{name:"live_shortcuts_all",vid:["v0","v1"]},{name:"live_shortcuts_video",vid:["v0","v1"]},{name:"live_seamless_enter_room",vid:["v1","v2"]},{name:"live_player_h265",vid:["v0","v1","v2","v3"]},{name:"live_player_switch_button",vid:["v1","v2"]},{name:"live_loading_icon",vid:["v1","v2"]},{name:"live_player_mute_text",vid:["v1","v2"]},{name:"live_player_handler",vid:["v1","v2","v3"]},{name:"live_player_icon",vid:["v1","v2"]},{name:"live_detail_non_logged_in_entry",vid:["v1","v2","v3"]},{name:"live_dynamic_bg",vid:["v1","v2"]},{name:"live_player_enable_1080p",vid:["v1","v2"]},{name:"live_auto_definition_tips",vid:["v1","v2","v3"]},{name:"live_room_age_restriction",vid:["v1","v2","v3"]},{name:"live_feed_preload",vid:["v0","v1"]},{name:"live_feed_style",vid:["v1","v2","v3"]},{name:"live_feed_auto_play_3",vid:["v1","v2","v3"]},{name:"live_player_e2e_low_delay_preload_time_test",vid:["v1","v2","v3"]},{name:"show_player_stats_entry",vid:["v1","v2"]},{name:"live_lcp_perf_optimize",vid:["v1","v2","v3","v4"]},{name:"live_report_reason_api",vid:["v1","v2"]},{name:"live_report_comment_reason_api",vid:["v1","v2"]},{name:"live_recharge_by_amount",vid:["v0","v1","v2"]},{name:"live_recharge_login",vid:["v1","v2"]},{name:"exchange_retention_popup",vid:["v1","v2"]},{name:"live_recharge_homescreen",vid:["v0","v1","v2"]},{name:"live_wallet_performance_packup",vid:["v0","v1"]},{name:"live_subscription_cashier",vid:["v1","v2"]},{name:"show_recharge_advantage",vid:["v1","v2"]},{name:"live_stack_insert_context",vid:["v1","v2"]},{name:"live_csr_insert_context",vid:["v1","v2"]},{name:"live_room_csr",vid:["v1","v2"]},{name:"webapp_fyp_live_opt",vid:["v0","v1"]},{name:"live_survey_open",vid:["v0","v1"]},{name:"live_volume_balance",vid:["v0","v1","v2"]},{name:"live_abr_rt_bitrate",vid:["v0","v1"]},{name:"live_webcodecs_rate",vid:["v0","v1"]},{name:"live_abr_preload_stream",vid:["v0","v1","v2"]},{name:"live_abr_bb4live_optimize",vid:["v0","v1"]},{name:"live_mse_in_worker",vid:["v0","v1"]},{name:"live_gift_logged_out_control",vid:["v0","v1","v2"]},{name:"live_abr_memo",vid:["v0","v1"]},{name:"live_stage_definition",vid:["v0","v1"]},{name:"live_recharge_path_shortening_home_screen",vid:["v0","v1","v2"]},{name:"live_recharge_get_coins_entrance_for_you_page",vid:["v0","v1","v2"]},{name:"enable_ec_lcc",vid:["v0","v1"]},{name:"live_chat_message_cache_opt",vid:["v0","v1"]},{name:"live_screen_radio_opt_display_bottom",vid:["v0","v1"]},{name:"live_quick_chat_expand",vid:["v0","v1"]},{name:"live_chat_refresh_rate_opt",vid:["v0","v1","v2"]},{name:"live_chat_like_btn_animate_downgrade",vid:["v0","v1"]},{name:"live_chat_other_animate_downgrade",vid:["v0","v1"]},{name:"live_discover_animate_downgrade",vid:["v0","v1"]},{name:"webapp_live_nav_avatar",vid:["v0","v1"]},{name:"live_nav_entrance",vid:["v0","v1","v2"]},{name:"live_new_sidenav",vid:["v0","v1"]},{name:"live_detail_endlive_auto_feed",vid:["v0","v1","v2"]},{name:"live_recharge_one_tap_polling_optimize",vid:["v1","v2","v3"]},{name:"live_recharge_supply_entrances_for_us_mobile",vid:["v0","v1","v2"]},{name:"live_recharge_supply_entrances_for_us",vid:["v0","v1"]},{name:"live_previewcard_opt",vid:["v0","v1"]},{name:"live_chat_refactor_phase1",vid:["v0","v1"]},{name:"one_tap_ios_deep_link",vid:["v0","v1","v2","v3"]},{name:"live_recharge_mobile_non_login_redesign_trigger_point",vid:["v1","v2","v3"]},{name:"webapp_live_avator_animation",vid:["v0","v1"]},{name:"fyp_live_card_open_direct",vid:["v0","v1"]},{name:"live_disable_header_skeleton",vid:["v0","v1"]},{name:"live_non_logged_in_time_restriction_pc",vid:["v0","v1"]},{name:"live_non_logged_in_time_restriction_mobile",vid:["v0","v1"]},{name:"live_un_logged_in_time_restriction_pc",vid:["0","30","45","60"]},{name:"live_room_preview_card_opt",vid:["v0","v1"]},{name:"webapp_live_explore_card",vid:["v0","v1"]},{name:"live_feed_refresh",vid:["v0","v1"]},{name:"live_discover_feed_preload",vid:["v0","v1"]},{name:"live_side_channel",vid:["v0","v1"]},{name:"fyp_live_preview_guide",vid:["v0","v1","v2"]},{name:"live_room_preload_stream",vid:["v0","v1"]},{name:"live_new_mse_player",vid:["v0","v1"]},{name:"video_feed_mode_url_test",vid:["v1","v2"]},{name:"browser_device_id",vid:["v1"]},{name:"volume_normalize",vid:["v1","v2","v3","v4"]},{name:"xgplayer_preload_config",vid:["v1","v2","v3","v4"]},{name:"hevc_desktop_server",vid:["v1","v2","v3"]},{name:"hevc_mobile_server",vid:["v1","v2","v3"]},{name:"video_serverpush",vid:["v1","v2"]},{name:"mobile_vodkit",vid:["v1","v2","v3","v4"]},{name:"web_player_refactor",vid:["v1","v2"]},{name:"xg_volume_test",vid:["v1","v2","v3","v4","v5"]},{name:"feed_scroll_opt",vid:["v0","v1"]},{name:"multiple_ins_model",vid:["v0","v2"]},{name:"multiple_ins_new",vid:["v0","v1","v2","v3","v4"]},{name:"video_bitrate_adapt",vid:["v1","v2","v3"]},{name:"explore_trending_topics",vid:["v0","v1"]},{name:"islands_arch_phase1",vid:["v0","v1"]},{name:"islands_arch_phase2",vid:["v0","v1","v2"]},{name:"islands_arch_video_detail",vid:["v0","v1"]},{name:"islands_arch_explore",vid:["v0","v1","v2"]},{name:"bundle_size_reverse",vid:["v0","v1"]},{name:"remove_tooltip",vid:["v0","v1","v2","v3","v4","v5"]},{name:"optimize_bot_ssr_count",vid:["v1","v2","v3","v4"]},{name:"sharing_reverse_recommend",vid:["v1","v2","v3","v4","v5","v6"]},{name:"sharing_use_jump_best_practice",vid:["v0","v1","v2"]},{name:"sharing_android_skeleton_jump_optimization",vid:["v0","v1"]},{name:"sharing_android_auto_awaken_perf",vid:["v0","v1"]},{name:"sharing_ios_auto_awaken",vid:["v0","v1"]},{name:"reflow_video_s2s",vid:["v1","v2","v3"]},{name:"mobile_s2s",vid:["v1","v2"]},{name:"s2s_afdp",vid:["v0","v1"]},{name:"yml_ui_optimize",vid:["v0","v1","v2","v3"]},{name:"islands_arch_user_profile",vid:["v0","v1","v2"]},{name:"islands_arch_rest_page",vid:["v0","v1"]},{name:"feed_scroll_opt_data_collection",vid:["v0","v2"]},{name:"explore_ui_change",vid:["v0","v1","v2","v3","v4"]},{name:"mobile_search_test",vid:["v1","v2"]},{name:"pumbaa_enable_test",vid:["v1","v2"]},{name:"tt4b_ads",vid:["v1","v2"]},{name:"foryou_prefetch",vid:["v1","v2"]},{name:"studio_web_eh_entrance_v3",vid:["v1","v2","v3","v4"]},{name:"tteh_effect_anchor_v1",vid:["v1","v2"]},{name:"periodic_login_popup_interval",vid:["v1","v2","v3","v4","v5"]},{name:"enable_slardar_image",vid:["v1","v2"]},{name:"explore_shunt_test",vid:["v1","v2","v3"]},{name:"new_redirect",vid:["v0","v1"]},{name:"search_video",vid:["v1","v2","v3","v4"]},{name:"fyp_clips",vid:["v0","v1","v2"]},{name:"video_reflow_onelink_preconnect",vid:["v1","v2"]},{name:"video_reflow_android_auto_awaken",vid:["v1","v2","v3"]},{name:"video_reflow_awaken_fb",vid:["v1","v2"]},{name:"video_reflow_awaken_delay",vid:["v0","v1","v2","v3","v4"]},{name:"sharing_video_remove_rem",vid:["v1","v2"]},{name:"sharing_hashtag_pns",vid:["v1","v2"]},{name:"video_reflow_csr_skeleton_enhance",vid:["v0","v1","v2","v3"]},{name:"video_reflow_mpa_optimization",vid:["v0","v1"]},{name:"video_reflow_skeleton_ui",vid:["v0","v1"]},{name:"video_reflow_downgrade",vid:["v1","v2"]},{name:"video_reflow_refactor_server_recommend_list",vid:["v0","v1"]},{name:"video_reflow_coin_install_reverse",vid:["v0","v1"]},{name:"video_reflow_recommend_vertical_list",vid:["v0","v1","v2"]},{name:"video_reflow_recommend_sort_type",vid:["0","1","2"]},{name:"video_reflow_preload_install",vid:["v0","v1"]},{name:"video_reflow_onelink_retargeting",vid:["v0","v1","v2"]},{name:"video_reflow_gp_referer",vid:["v0","v1"]},{name:"video_reflow_facebook_af_dp",vid:["v0","v2","v3"]},{name:"webapp_vdc_scedule",vid:["v1","v2"]},{name:"search_add_live",vid:["v1","v2"]},{name:"page_loading_tiny_changes",vid:["v0","v1","v2","v3","v4"]},{name:"device_score_fetch",vid:["v0","v1","v2"]},{name:"search_transfer_history",vid:["v1","v2"]},{name:"search_transfer_guesssearch",vid:["v1","v2"]},{name:"search_top_author_card",vid:["v0","v1","v2"]},{name:"search_yml_guess_count",vid:["v0","v1","v2","v3"]},{name:"sharing_video_use_smart",vid:["v0","v1","v2"]},{name:"sharing_short_dl",vid:["v0","v1"]},{name:"sharing_redirect_page_strategy",vid:["v0","v1"]},{name:"sharing_video_first",vid:["v0","v1","v2","v3","v4","v5"]},{name:"sharing_video_first_use_campaign",vid:["v0","v1"]},{name:"sharing_skeleton_lite",vid:["v0","v1"]},{name:"search_bar_style_opt",vid:["v1","v2","v3"]},{name:"search_remove_related_search",vid:["v0","v1","v2"]},{name:"search_add_non_personalized_switch",vid:["v1","v2"]},{name:"search_mobile_add_search_recommendations",vid:["v1","v2"]},{name:"feed_data_cache",vid:["v1","v2","v3","v4"]},{name:"webapp_browser_mode_new_tab",vid:["v1","v2"]},{name:"qr_sso_popup",vid:["v1","v2","v3","v4","v5"]},{name:"desktop_ui_opt",vid:["v1","v2","v3","v4"]},{name:"non_personalized_feeds_web",vid:["v1","v2"]},{name:"desktop_ui_reply",vid:["v1","v2","v3","v4","v5","v6"]},{name:"desktop_avatar_nick_name",vid:["v1","v2"]},{name:"search_entry_search_bar",vid:["v1","v2"]},{name:"search_entry_comment_top",vid:["v1","v2"]},{name:"use_inbox_notice_count_api",vid:["v1","v2"]},{name:"autoscroll_reposition",vid:["v0","v1"]},{name:"banner_ad_enable",vid:["v0"]},{name:"sidenav_test",vid:["v1","v2"]},{name:"enable_dm_side_nav",vid:["v0","v1","v2","v3"]},{name:"creator_center_connect",vid:["v1","v2","v3"]},{name:"creator_center_connect_global",vid:["v1","v2","v3"]},{name:"webapp_auto_refresh",vid:["v1","v2","v3"]},{name:"change_list_length_new",vid:["30","20","15"]},{name:"preload_with_left",vid:["0","2","3","4","5"]},{name:"browser_mode_video_controller",vid:["v1","v2"]},{name:"one_column_player_size",vid:["v1","v2","v3","v4","v5"]},{name:"sign_up_webapp_region_change",vid:["v1","v2"]},{name:"video_detail_search_bar",vid:["v1","v2"]},{name:"search_entry_comment_word",vid:["v1","v2"]},{name:"confirm_logout",vid:["v1","v2"]},{name:"creator_center_reverse",vid:["v1","v2"]},{name:"desktop_app_test",vid:["v1","v2"]},{name:"browser_login_redirect",vid:["v1","v2"]},{name:"webapp_switch_account",vid:["v1","v2","v3","v4"]},{name:"search_report",vid:["v1","v2"]},{name:"search_keep_sug_show",vid:["v1","v2"]},{name:"webapp_login_email_phone",vid:["v1","v2"]},{name:"use_follow_v2",vid:["v1","v2"]},{name:"search_server",vid:{}},{name:"add_kap_entry",vid:["v1","v2"]},{name:"enable_ml_model",vid:["v1","v2","v3","v4","v5","v6"]},{name:"enable_ml_model_suggest_content",vid:["v0","v1"]},{name:"mobile_csr_test",vid:["v1","v2"]},{name:"webapp_login_prediction",vid:["v1","v2","v3","v4","v5","v6","v7","v8","v9","v10"]},{name:"login_modal_ui_revamp",vid:["v1","v2","v3","v4"]},{name:"browser_mode_encourage_login",vid:["v1","v2","v3"]},{name:"project_ace_control",vid:["v0","v1"]},{name:"soft_bank_test",vid:["v1","v2"]},{name:"enable_ads",vid:["v1","v2"]},{name:"enable_about_this_ad",vid:["v1","v2"]},{name:"digital_wellbeing_web",vid:["v0","v1"]},{name:"scheduled_breaks_teens",vid:["v0","v1"]},{name:"stm_web_revamp",vid:["v0","v1"]},{name:"fix_tea_session",vid:["v1","v2","v3"]},{name:"enable_profile_pinned_video",vid:["v1","v2","v3"]},{name:"enable_fb_sdk",vid:["v1","v2"]},{name:"live_preview_web",vid:["v1","v2","v3"]},{name:"live_preview_web_son",vid:["v1","v2","v3"]},{name:"live_login_reflow_btn",vid:["v1","v2"]},{name:"comment_self_send_optimize",vid:["v0","v1"]},{name:"mobile_consumption_limit_logged_in",vid:["v1","v2","v3","v4","v5"]},{name:"mobile_consumption_limit_non_logged_in",vid:["v1","v2","v3","v4","v5","v6","v7","v8"]},{name:"add_profile_left_bar",vid:["v0","v1","v2","v3"]},{name:"explore_all_tab",vid:["v0","v1","v2","v3","v4","v5"]},{name:"report_item_tag",vid:["v1","v2"]},{name:"login_option_order_by_metrics",vid:["v1","v2","v3"]},{name:"friends_tab",vid:["v0","v1"]},{name:"remove_bottom_banner",vid:["v1","v2","v3","v4","v5"]},{name:"webapp_login_prediction_full",vid:["v1","v2"]},{name:"webapp_login_prediction_reverse",vid:["v1","v2"]},{name:"video_detail_reflow_card",vid:["v0","v1"]},{name:"show_aigc_label_web",vid:["v0","v1"]},{name:"webapp_feature_expansion",vid:["v0","v1"]},{name:"webapp_login_causal_inference",vid:["v1","v2","v3","v4","v5","v6","v7","v8","v9","v10","v11","v12","v13","v14","v15","v16","v17","v18","v19","v20","v21","v22","v23","v24","v25","v26","v27","v28","v29","v30"]},{name:"non_logged_in_comments",vid:["v1","v2","v3","v4"]},{name:"s2s",vid:["v0","v1"]},{name:"kap_prefetch",vid:["v1","v2"]},{name:"kap_jumper_opt",vid:["v1","v2"]},{name:"auto_scroll",vid:["v1","v3"]},{name:"tiktok",vid:[]},{name:"mobile_consumption_limit_login",vid:["v1","v2","v3"]},{name:"preview_cover",vid:["v0","v1"]},{name:"default_auto_scroll",vid:["v0","v1"]},{name:"search_preview_ui_change",vid:["v0","v1","v2","v3"]},{name:"seo_preview_ui_change",vid:["v0","v1"]},{name:"use_profile_avatar",vid:["v1","v2"]},{name:"perf_blur_background",vid:["v0","v1","v2","v3"]},{name:"page_init_refactor",vid:["v0","v1"]},{name:"browser_mode_multi",vid:["v0","v1"]},{name:"webapp_login_causal_inference_validation",vid:["v1","v2","v3","v4","v5"]},{name:"webapp_login_causal_inference_data_collection",vid:["v1","v2","v3","v4","v5"]},{name:"webapp_causal_inference_dark_mode_data_collection",vid:["v1","v2","v3"]},{name:"webapp_causal_inference_auto_mute_data_collection",vid:["v1","v2","v3"]},{name:"webapp_causal_inference_auto_scroll_data_collection",vid:["v1","v2","v3"]},{name:"webapp_causal_inference_auto_scroll_validation",vid:["v1","v2","v3"]},{name:"webapp_causal_inference_landing_page",vid:["v0","v1"]},{name:"webapp_causal_inference_dark_mode_validation",vid:["v1","v2","v3","v4","v5"]},{name:"webapp_causal_inference_periodic_popup_validation",vid:["v1","v2","v3","v4","v5","v6","v7"]},{name:"webapp_causal_inference_auto_mute_validation",vid:["v1","v2","v3","v4","v5"]},{name:"last_login_method",vid:["v1","v2","v3"]},{name:"webapp_moderation",vid:["v0","v1"]},{name:"mobile_swiping_gesture",vid:["v0","v1"]},{name:"should_recom_reduce_icon_risk",vid:["v0","v1"]},{name:"browser_content_logic",vid:["v1","v2","v3","v4"]},{name:"mobile_predictive_data",vid:["v0","v1","v2","v3","v4","v5","v6","v7","v8","v9","v10","v11","v12","v13","v14","v15","v16","v17","v18","v19","v20","v21","v22","v23","v24","v25","v26","v27","v28","v29"]},{name:"mobile_fps_logger",vid:["v0","v1"]},{name:"delay_guest",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_fyp",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_others_homepage",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_videos",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_discover",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_explore",vid:["0","1","2","3","5","8","10"]},{name:"delay_guest_other",vid:["0","1","2","3","5","8","10"]},{name:"webapp_auto_dark_mode",vid:["v0","v1","v2","v3"]},{name:"top_right_qr",vid:["v0","v1","v2","v3"]},{name:"webapp_dynamic_bottom_right",vid:["v0","v1","v2"]},{name:"browser_fingerprint_basic",vid:["v0","v1"]},{name:"browser_fingerprint_verify",vid:["v0","v1"]},{name:"top_right_button",vid:["v0","v1","v2","v3","v4"]},{name:"seo_top_tool_bar",vid:["v0","v1"]},{name:"top_right_button_group",vid:["v0","v1","v2","v3","v4"]},{name:"top_right_button_group_all",vid:["v0","v1"]},{name:"keyboard_shortcut",vid:["v0","v1","v2"]},{name:"webapp_odin_id_fe_reverse",vid:["v0","v1"]},{name:"pc_non_personalized_suggested_account",vid:["v0","v1"]},{name:"pc_non_personalized_explore",vid:["v0","v1"]},{name:"mobile_non_personalized_suggest_account",vid:["v0","v1"]},{name:"video_detail_page_video_play",vid:["v1","v2"]},{name:"mobile_replace_signup_with_login",vid:["v0","v1"]},{name:"use_aligned_copies",vid:["v0","v1","v2"]},{name:"pns_communication_service_sdk",vid:["v0","v1"]},{name:"desktop_web_survey_new",vid:["v0","v1"]},{name:"desktop_web_survey_old",vid:["v0","v1"]},{name:"promote_qr_code",vid:["v0","v1"]},{name:"mobile_remove_music_info",vid:["v0","v1"]},{name:"mobile_enable_xg",vid:["v0","v1"]},{name:"enable_mini_player",vid:["v0","v1","v2","v3","v4","v5","v6"]},{name:"enable_upload_refactor",vid:["v0","v1"]},{name:"enable_language_expansion",vid:["v0","v1","v2"]},{name:"enable_message_refactor",vid:["v0","v1"]},{name:"guest_mode_redesign",vid:["v0","v1","v2","v3"]},{name:"sharing_aso",vid:["v1","v2","v3"]},{name:"webapp_repost_label",vid:["v0","v1"]},{name:"webapp_repost_tab",vid:["v0","v1"]},{name:"webapp_repost_action",vid:["v0","v1","v2","v3","v4"]},{name:"webapp_repost_notice",vid:["v0","v1"]},{name:"webapp_creator_post_sort",vid:["v0","v1","v2","v3","v4","v5"]},{name:"webapp_creator_just_watched",vid:["v0","v1","v2","v3","v4"]},{name:"guide_user_to_next_video",vid:["v0","v1","v2"]},{name:"creator_to_fyp",vid:["v0","v1","v2"]},{name:"video_detail_end_card",vid:["v0","v1","v2","v3"]},{name:"detail_to_explore",vid:["v0","v1","v2","v3","v4"]},{name:"three_column_gif",vid:["v0","v1"]},{name:"creator_header_height",vid:["v0","v1","v2","v3"]},{name:"webapp_jotai_detail",vid:["v0","v1"]},{name:"video_detail_yml_ui",vid:["v1","v2","v3","v4"]},{name:"webapp_mobile_web2app_cta_guide",vid:["v0","v1","v2","v3","v4"]},{name:"video_detail_auto_pip_opt",vid:["v0","v1","v2","v3","v4","v5","v6"]},{name:"fyp_redesign",vid:["v0","v1"]},{name:"video_detail_yml_creator",vid:["v0","v1","v2"]},{name:"video_detail_author_card",vid:["v0","v1","v2","v3"]},{name:"video_detail_nav_opt",vid:["v0","v1","v2","v3"]},{name:"video_detail_nav_shortcut",vid:["v0","v1","v2","v3","v4"]},{name:"playback_refactor_desktop",vid:["v0","v1"]},{name:"playback_refactor_mobile",vid:["v0","v1"]},{name:"tt_player_hevc_ignore_env",vid:["v0","v1"]},{name:"tt_player_hevc_local",vid:["v0","v1"]},{name:"tt_player_reuse",vid:["v0","v1"]},{name:"video_details_player_redesign_engagement",vid:["v0","v1","v2","v3"]},{name:"video_details_player_redesign_player",vid:["v0","v1","v2","v3"]},{name:"web_on_device_ml",vid:["v1","v2","v3","v4"]},{name:"use_navigation_refactor",vid:["v0","v1","v2","v3","v4","v5"]},{name:"use_left_navigation_refactor",vid:["v0","v1","v2","v3"]},{name:"video_detail_responsive_ui",vid:["v0","v1","v2"]},{name:"webapp_explore_nav_order",vid:["v0","v1","v2"]},{name:"webapp_explore_video_info",vid:["v0","v1","v2","v3","v4","v5","v6"]},{name:"explore_category_ranking",vid:["v0","v1","v2"]},{name:"webapp_collection_profile",vid:["v0","v1"]},{name:"webapp_collection_adder",vid:["v0","v1","v2","v3"]},{name:"webapp_inapp_notice",vid:["v0","v1","v2","v3","v4"]},{name:"webapp_node_opt",vid:["v0","v1"]},{name:"fyf_profile_uj",vid:["v0","v1","v2","v3"]},{name:"side_nav_preload_cache",vid:["v0","v1","v2","v3","v4"]},{name:"side_nav_cache",vid:["v0","v1","v2","v3","v4","v5"]},{name:"immersive_player",vid:["v0","v1","v2","v3","v4"]},{name:"new_guest_mode_hot",vid:["v0","v1"]},{name:"new_guest_mode_other",vid:["v0","v1"]},{name:"kep_skeleton_cta",vid:["v1","v2","v3"]},{name:"kep_streaming",vid:["v0","v1","v2"]},{name:"user_ssg",vid:["v0","v1","v2"]},{name:"vanilla_js_kep",vid:["v0","v1","v2"]},{name:"kep_cta_style",vid:["v0","v1","v2","v3"]},{name:"fyp_comments_panel",vid:["v0","v1","v2","v3"]},{name:"web_dm_test_force_http",vid:["v1","v2"]},{name:"reduce_user_item_list",vid:["v0","v1","v2","v3","v4","v5"]},{name:"web_dm_enable_debug",vid:["v1","v2"]},{name:"web_dm_multimedia_msg",vid:["v1","v2"]},{name:"web_dm_sticker_msg_display",vid:["v1","v2"]},{name:"web_dm_combo",vid:["v1","v2","v3"]},{name:"web_dm_group_chat",vid:["v1","v2"]},{name:"web_dm_decrease_lcp",vid:["v1","v2"]},{name:"foryou_opt",vid:["v0","v1","v2"]},{name:"web_dm_share_panel_fix",vid:["v1","v2"]},{name:"web_dm_icon_click_check",vid:["v1","v2"]},{name:"web_dm_quote_message",vid:["v1","v2","v3"]},{name:"web_dm_message_reaction",vid:["v1","v2"]},{name:"web_dm_list_load_optimize",vid:["v1","v2"]},{name:"webapp_query_comments_popover",vid:["v0","v1"]},{name:"user_cta_optimization_user_phase2",vid:["v0","v1","v2"]},{name:"kep_coin_app",vid:["v0","v1","v2","v3"]},{name:"fyp_hide_music_info",vid:["v0","v1","v2"]},{name:"detail_page_comments_redesign",vid:["v0","v1","v2"]},{name:"enable_autoscroll_moremenu",vid:["v0","v1"]},{name:"enable_video_detail_moremenu_refactor",vid:["v0","v1","v2","v3"]},{name:"kep_reverse_cta_fix",vid:["v0","v1"]},{name:"detail_page_comments_right_side",vid:["v0","v1","v2","v3","v4"]},{name:"fyp_on_detail",vid:["v0","v1","v2"]},{name:"webapp_fyp_cache",vid:["v0","v1"]},{name:"webapp_explore_cache",vid:["v0","v1"]},{name:"aggregation_page_cta_enhancement",vid:["v0","v1","v2"]},{name:"user_page_redesign",vid:["v0","v1"]},{name:"kep_pop_up_auto_dismiss",vid:["v0","v1","v2","v3"]},{name:"kep_returning_popup",vid:["v0","v1","v2"]},{name:"revamp_share_menu",vid:["v0","v1","v2","v3","v4","v5"]},{name:"remove_disclaimer",vid:["v0","v1"]},{name:"player_error_optimize",vid:["v0","v1","v2","v3"]},{name:"video_closed_caption",vid:["v0","v1","v2","v3","v4"]},{name:"video_closed_caption_v2",vid:["v0","v1"]},{name:"video_resolution",vid:["v0","v1","v2","v3"]},{name:"video_resolution_auto",vid:["v0","v1","v2"]},{name:"for_you_page_cta_enhancement",vid:["v0","v1","v2","v3","v4","v5"]},{name:"nav_phase_3",vid:["v0","v1","v2","v3"]},{name:"live_manager_entrance",vid:["v0","v1"]},{name:"image_fetch_priority",vid:["v0","v1"]},{name:"km_webapp_stm",vid:["v0","v1"]},{name:"km_default_limit",vid:["v0","v1"]},{name:"kep_video_skeleton_cta",vid:["v0","v1","v2"]},{name:"feed_change_optimize_image",vid:["v0","v1","v2"]},{name:"feed_change_optimize_ff",vid:["v0","v1","v2"]},{name:"solaria_portrait_service",vid:["v0","v1"]},{name:"enable_post_translation",vid:["v0","v1","v2","v3"]},{name:"global_web_footer",vid:["v0","v1"]},{name:"user_bundle_opt",vid:["v0","v1","v2"]},{name:"kep_click_opt_phase1",vid:["v0","v1","v2","v3"]},{name:"kep_click_opt_phase2",vid:["v0","v1","v2","v3"]},{name:"mobile_android_jump_optimization",vid:["v0","v1","v2"]},{name:"seo_jump_optimization",vid:["v0","v1"]},{name:"guest_mode_interest",vid:["v0","v1","v2"]},{name:"dual_user",vid:["v0","v1","v2","v3"]},{name:"react_upgrade_experiment",vid:["v0","v1"]},{name:"desktop_faas_render",vid:["v1","v2"]},{name:"ui_layout_alignment",vid:["v1","v2","v3"]},{name:"seo_smart_awaken",vid:["v0","v1","v2"]},{name:"live_public_screen_skeleton",vid:["v0","v1"]},{name:"long_video_popup_display_optimization",vid:["false","true"]},{name:"video_reflow_poi_anchor",vid:["v0","v1"]},{name:"search_add_related_search",vid:["v1","v2"]},{name:"should_highlight_hashtag",vid:["v1","v2"]},{name:"download_page_apk",vid:["v1","v2"]},{name:"hashtag_to_top_search",vid:["v1","v2"]},{name:"it_or_us",vid:["v1","v2"]},{name:"seo_non_us_lite_copy",vid:["v0","v1"]},{name:"fyp_up_down",vid:["v0","v1"]},{name:"video_auto_play_optimize",vid:["v0","v1"]},{name:"mobile_fyp_pwa",vid:["v0","v1","v2","v3"]},{name:"grid_to_fyp",vid:["v0","v1","v2","v3","v4"]},{name:"app_style_share",vid:["v0","v1"]},{name:"all_one_tap_login",vid:["v0","v1"]},{name:"media_card_redesign",vid:["v0","v1"]},{name:"feature_access_control_v2",vid:["v0","v1"]},{name:"kep_exp_migration",vid:["v0","v1","v2"]},{name:"organic_video_streaming",vid:["v0","v1","v2","v3"]},{name:"sharing_video_streaming",vid:["v0","v1","v2","v3","v4"]},{name:"enable_setting_side_nav",vid:["v0","v1"]},{name:"community_notes_starling",vid:["v0","v1"]},{name:"cds_grid_layout",vid:["v0","v1"]},{name:"tt_player_openmse",vid:["v0","v1"]},{name:"enable_creator_comments",vid:["v0","v1"]},{name:"mobile_micro_frontends",vid:["v0","v1"]},{name:"tiktok_stories",vid:["v0","v1","v2"]},{name:"webapp_perf_page_switch",vid:["v0","v1"]},{name:"fyp_resume_progress",vid:["v0","v1"]},{name:"login_passkey",vid:["v0","v1","v2","v3","v4"]},{name:"video_cta_text",vid:["v0","v1","v2"]},{name:"cthun_predict_buffer",vid:["v0","v1","v2","v3"]}],u=["ram_lite_use_ssa_copy","desktop_app","desktop_ui_opt_debug","add_recipe_card","enable_privacy_center","collapse_seo_header","collapse_seo_header_mobile","desktop_app_survey","shape_loggedin_disabled","hashtag_viewcount","should_show_effect_detail_page","find_migrate_video_list_api","kep_remove_desc_keywords","kep_remove_meta_desc_keywords","user_canonical_url","hashtag_canonical_url","music_canonical_url","find_card_refactor","kep_new_grid","enable_kep_ecommerce_search","slardar_sg_domain","live_manager_entrance","feedback_project_u_switch","feedback_project_u_faq_whitelist","feedback_project_u_submit_entry_switch","feedback_project_u_submit_page_switch","live_react_v18"]},95584:(e,t,i)=>{var n;i.d(t,{Y:()=>n}),function(e){let t;!function(e){e.WebSite="WebSite",e.ItemList="ItemList",e.VideoObject="VideoObject",e.SocialMediaPosting="SocialMediaPosting",e.WebPage="WebPage",e.Page="Page",e.CollectionPage="CollectionPage",e.BreadcrumbList="BreadcrumbList",e.Person="Person",e.ProfilePage="ProfilePage",e.MusicRecording="MusicRecording",e.QAPage="QAPage",e.Event="Event",e.ListItem="ListItem",e.Thing="Thing",e.Product="Product"}(t=e.JsonldType||(e.JsonldType={}))}(n||(n={}))},13761:(e,t,i)=>{var n;i.d(t,{k:()=>n}),function(e){let t;!function(e){e[e.META_PATH=1]="META_PATH",e[e.META_EXP=2]="META_EXP",e[e.META_PAGE=3]="META_PAGE",e[e.JSONLD_PATH=4]="JSONLD_PATH",e[e.JSONLD_EXP=5]="JSONLD_EXP",e[e.JSONLD_PAGE=6]="JSONLD_PAGE"}(t=e.SERPProcessType||(e.SERPProcessType={}))}(n||(n={}))},33440:(e,t,i)=>{var n;i.d(t,{r:()=>n}),function(e){e.APP_INFO={M_PACKAGE:"com.zhiliaoapp.musically",T_PACKAGE:"com.ss.android.ugc.trill",M_STORE:"835599320",T_STORE:"1235601864",M_NAME:"musical.ly",T_NAME:"TIKTOK",M_FACEBOOK_ID:"597615686992125",T_FACEBOOK_ID:"1862952583919182"},e.TTNOW_INFO={NAME:"TIKTOK.NOW",STORE_ID:"1641062073",PACKAGE:"com.ss.android.ugc.now",FACEBOOK_ID:"1243781563051427"},e.COIN_LITE_INFO={PACKAGE:"com.ss.android.ugc.tiktok.lite",STORE:"6447160980",NAME:"TikTok Lite",FACEBOOK_ID:"171444425350301"},e.COIN_PRO_INFO={PACKAGE:"com.ss.android.ugc.tiktok.pro",STORE:"6741796873",NAME:"TikTok Pro",FACEBOOK_ID:"171444425350301"}}(n||(n={}))},42721:(e,t,i)=>{i.d(t,{ET:()=>o,FR:()=>n});const n="webapp.a-b",o="b_c"},35248:(e,t,i)=>{i.d(t,{$m:()=>n,_v:()=>o});const n=["AT","BE","BG","HR","CY","CZ","DE","DK","EE","EL","FI","FR","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","NO","IS","LI"],o=n.concat(["GB","CH"]);var r,s;!function(e){e.DEFAULT="DEFAULT",e.SG="ALL_SG",e.VA="MALI_VA",e.TTP="TTP",e.BOE="BOE"}(r||(r={})),function(e){e.DEFAULT="DEFAULT",e.BOE="BOE",e.US_BOE="US_BOE",e.SG="ALL_SG",e.VA="MALI_VA",e.TTP="TTP",e.EU_TTP="EU_TTP",e.US_TTP="US_TTP",e.US_TTP2="US_TTP2"}(s||(s={}))},84323:(e,t,i)=>{i.d(t,{G:()=>s,UH:()=>o,q7:()=>n,tt:()=>r});const n=["AT","BE","BG","HR","CY","CZ","DE","DK","EE","EL","FI","FR","GB","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","NO","IS","LI"],o=["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","MG","ML","MU","MW","MZ","NA","NE","NG","RW","SC","SD","SL","SN","SO","SS","ST","SZ","TD","TG","TZ","UG","ZM","ZW"],r=["JP","KR"],s=["ES","DE","PT"]},4929:(e,t,i)=>{i.d(t,{AY:()=>r,Lq:()=>n,Nm:()=>u,TZ:()=>c,Uy:()=>o,WU:()=>v,d4:()=>a,wX:()=>d});const n="5dc26cf008d511e9b571e1bc0c9e23b5",o="3f4a780066b911eba8eda5a15496ac5a",r="c5156440043611eab3e269e42dc9b378",s={az:{displayName:"Azərbaycan",alias:[]},"id-ID":{displayName:"Bahasa Indonesia",alias:["id","id-id","in-id","in"]},"ms-MY":{displayName:"Bahasa Melayu",alias:["ms","ms-bn","ms-my"]},"jv-ID":{displayName:"Basa Jawa",alias:["jv","jv-jv"]},ca:{displayName:"Català",alias:[]},"ceb-PH":{displayName:"Cebuano",alias:["ceb","ceb-ph"]},"cs-CZ":{displayName:"Čeština",alias:["cs","cs-cz"]},da:{displayName:"Dansk",alias:[]},"de-DE":{displayName:"Deutsch",alias:["de","de-at","de-ch","de-de","de-li","de-lu"]},et:{displayName:"Eesti",alias:[]},"en-GB":{displayName:"English (UK)",alias:["en-pk","en-bd","en-bt","en-bn","en-kh","en-la","en-mm","en-np","en-lk","af","en-au","en-nz","en-sg","en-ag","en-ai","en-bb","en-bm","en-bs","en-bw","en-bz","en-dm","en-fj","en-gd","en-gh","en-gm","en-gy","en-in","en-ie","en-jm","en-rw","en-kn","en-ky","en-lc","si-lk","en-ms","en-my","en-mt","en-mu","en-mw","en-na","en-ng","ne-np","en-nr","en-pg","en-sb","en-za","en-sc","en-sl","en-tc","en-to","en-tt","en-vc","en-vg","en-vu","en-zm","en-zw","en-sz","en-hk","en-mo"]},en:{displayName:"English (US)",alias:[]},es:{displayName:"Español",alias:["es-es","es-gq","es-ad"]},"es-419":{displayName:"Español (Latinoamérica)",alias:["es"]},"fil-PH":{displayName:"Filipino",alias:["fil","tl-ph","tl","fil-ph"]},fr:{displayName:"Français",alias:["fr-be","fr-ch","fr-fr","fr-lu","fr-mc"]},"fr-CA":{displayName:"Français (Canada)",alias:["fr-ca"]},ga:{displayName:"Gaeilge",alias:[]},hr:{displayName:"Hrvatski",alias:[]},is:{displayName:"Íslenska",alias:[]},"it-IT":{displayName:"Italiano",alias:["it","it-ch","it-it"]},sw:{displayName:"Kiswahili",alias:[]},lv:{displayName:"Latviešu",alias:[]},lt:{displayName:"Lietuvių",alias:[]},"hu-HU":{displayName:"Magyar",alias:["hu","hu-hu"]},"nl-NL":{displayName:"Nederlands",alias:["nl","nl-be","nl-nl"]},nb:{displayName:"norsk (bokmål)",alias:[]},uz:{displayName:"Oʻzbek",alias:[]},"pl-PL":{displayName:"Polski",alias:["pl","pl-pl"]},pt:{displayName:"Português",alias:["pu"]},"pt-BR":{displayName:"Português (Brasil)",alias:["pt_BR","pt-br"]},"ro-RO":{displayName:"Română",alias:["ro","ro-ro"]},sq:{displayName:"Shqip",alias:[]},sk:{displayName:"Slovenčina",alias:[]},sl:{displayName:"Slovenščina",alias:[]},"fi-FI":{displayName:"Suomi",alias:["fi","fi-fi"]},"sv-SE":{displayName:"Svenska",alias:["sv","sv-se"]},"vi-VN":{displayName:"Tiếng Việt",alias:["vi","vi-vn"]},"tr-TR":{displayName:"Türkçe",alias:["tr","tr-tr"]},"el-GR":{displayName:"Ελληνικά",alias:["el","el-gr"]},bg:{displayName:"Български",alias:[]},kk:{displayName:"Қазақша",alias:[]},"ru-RU":{displayName:"Русский",alias:["ru","ru-ru"]},"uk-UA":{displayName:"Українська",alias:["uk","uk-ua"]},"he-IL":{displayName:"עברית",alias:["he","he-il","iw"]},ur:{displayName:"اردو",alias:[]},ar:{displayName:"العربية",alias:["ar-ae","ar-bh","ar-dz","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sy","ar-tn","ar-ye"]},"hi-IN":{displayName:"हिंदी",alias:["hi","hi-in"]},"bn-IN":{displayName:"বাংলা",alias:["bn","bn-in"]},"th-TH":{displayName:"ภาษาไทย",alias:["th","th-th"]},"my-MM":{displayName:"မြန်မာ",alias:["my","my","my-mm"]},"km-KH":{displayName:"ខ្មែរ",alias:["km","km-kh"]},"ja-JP":{displayName:"日本語",alias:["ja","ja-jpan","ja-jp"]},"zh-Hant-TW":{displayName:"中文 (繁體)",alias:["zh","zh_Hant","zh_TW","zh-tw","zh-hk","zh-Hant","zh-hant-tw"]},"zh-Hans":{displayName:"中文 (简体)",alias:["zh-hans","zh_hans","zh_Hans","zh-cn","zh-sg"]},"ko-KR":{displayName:"한국어",alias:["ko","ko-kr","ko-kore"]}},a=["az","ca","da","et","en-GB","es-419","fr-CA","ga","hr","is","sw","lv","lt","nb","uz","pt","sq","sk","sl","bg","kk"],l=Object.entries(s).map((([e,{alias:t}])=>[e,...t])),c=new Map(l.reduce(((e,t)=>{const i=t[0];return t.forEach((t=>{e.push([t.toLocaleLowerCase(),i])})),e}),[])),d=Object.entries(s).map((([e,{displayName:t}])=>({label:t,value:e}))),u="en",v="tiktok_webapp_lang"},81861:(e,t,i)=>{i.d(t,{i:()=>n});const n="tea_sid"},10828:(e,t,i)=>{i.d(t,{C:()=>n,U:()=>o});const n="https://www.tiktok.com",o="https://sf-static.tiktokcdn.com/obj/eden-sg/uhtyvueh7nulogpoguhm/tiktok-icon2.png"},65450:(e,t,i)=>{i.d(t,{X:()=>n});const n="seo.abtest"},16272:(e,t,i)=>{i.d(t,{c:()=>n});const n=[{routeName:"expansion",pageType:104},{routeName:"messages",pageType:13},{routeName:"searchUser",pageType:106},{routeName:"videoPlaylist",pageType:108},{routeName:"searchLive",pageType:123},{routeName:"following",pageType:11},{routeName:"challenge",pageType:3},{routeName:"poi",pageType:18},{routeName:"collection",pageType:121},{routeName:"searchHome",pageType:105},{routeName:"effect",pageType:129},{routeName:"searchVideo",pageType:107},{routeName:"music",pageType:4},{routeName:"friends",pageType:20}]},63615:(e,t,i)=>{i.d(t,{Ow:()=>o}),i(24643);var n=i(23124);const o="webapp.app-context";(0,n.$)("AppContext@tiktok/isomorphic")(null)},64356:(e,t,i)=>{i.d(t,{Ss:()=>a,hp:()=>l,rv:()=>c}),i(24643);var n=i(14285),o=i(16378),r=i.n(o),s=i(80798);const a=(0,i(23124).$)("I18nContextV2@tiktok/isomorphic")({t:(e,t,i)=>i&&"string"==typeof i?i:e,hasLoaded:r(),loadStarling:r(),initialNamespaces:[],lang:""}),l=(0,s.U)("I18nInjectionToken@tiktok/isomorphic",(()=>new n.n("i18n"))),c="webapp.i18n-translation"},84987:(e,t,i)=>{i.d(t,{X:()=>s,d:()=>a});var n=i(24643),o=i(57432),r=i.n(o);const s=(0,i(23124).$)("SVGSpriteContext@tiktok/isomorphic")({sprites:new Map,add:r(),remove:()=>!1,serialize:()=>""}),a=function({context:e,children:t}){return(0,n.jsx)(s.Provider,{value:e,children:t})}},51660:(e,t,i)=>{i.d(t,{Z0:()=>d,uk:()=>a,x_:()=>c,qm:()=>u}),i(4474);var n=i(35267),o=i(4929);const r=/(facebookexternalhit|whatsapp|twitterbot|developers\.snap\.com\/robots|Linespider|LinkedInBot|Discordbot|TelegramBot|LarkBot|vk\.com\/dev\/Share)|redditbot/i;var s;!function(e){e.WebApp="Webapp",e.Analytics="MT_Analytics",e.Reflow="MT_Reflow",e.Login="WebApp_Login",e.POI="poi_web",e.RechargeReferral="Webapp_recharge_referral",e.KickUserFrontier="kick_user_frontier"}(s||(s={}));const a=(e="")=>"zh-Hans"===e?e:e.split("-")[0].replace("zh","zh-Hant")||e||o.Nm;function l(e){let t;return t=Array.isArray(e)?e[e.length-1]:null!=e?e:"",t}function c(e){const t=l(e).toLocaleLowerCase();return!!t&&o.TZ.has(t)}function d(e){var t,i;const n=l(e).toLocaleLowerCase();if(c(n))return null!==(t=o.TZ.get(n))&&void 0!==t?t:o.Nm;const r=a(n).toLowerCase();return null!==(i=o.TZ.get(r))&&void 0!==i?i:o.Nm}function u(e){var t,i;const{pathname:s,query:a}=(0,n.xw)(),{userAgent:l,acceptLanguage:u}=(0,n.T6)();let v=(null!=e?e:s).split("/")[1];if(function(e){return Boolean(e.startsWith("/download"))||Boolean(e.startsWith("/download-video"))}(null!=e?e:s)&&(v=(null!=e?e:s).split("/")[2]),v&&c(v))return d(v);const{lang:p,langCountry:h,language:m,sharer_language:g}=a,_=[h,p,m];r.test(l)&&_.push(g);for(const e of _)if(e&&c(e))return d(e);const f=(0,n.MJ)(o.WU);if(f&&c(f))return d(f);const y=null===(t=l.match(/ByteFullLocale\/([\w\-_]+)/))||void 0===t?void 0:t[1];if(y&&c(y))return d(y);const b=null===(i=l.match(/ByteLocale\/([\w\-_]+)/))||void 0===i?void 0:i[1];if(b&&c(b))return d(b);for(const e of u)if(e&&c(e))return d(e);return g&&c(g)?d(g):/yandex\.com\/bots/i.test(l)?d("ru-RU"):o.Nm}},31578:(e,t,i)=>{i.d(t,{KJ:()=>u,Ny:()=>v,R0:()=>c,qu:()=>d});const n=/\(i[^;]+;( U;)? CPU.+Mac OS X/,o=/Android|android|Adr/,r=/X11/,s=/\(Macintosh; Intel /,a=/Win\d{2}|Windows/,l=1e3;function c(e){return e.length>l?"unknown":o.test(e)?"android":r.test(e)?"linux":n.test(e)?"ios":s.test(e)?"mac":a.test(e)?"windows":"unknown"}function d(e){return!(e.length>l)&&n.test(e)}function u(e){return o.test(e)}function v(e){return d(e)||u(e)}},13474:(e,t,i)=>{i.d(t,{PR:()=>c,Nw:()=>l});var n=i(98885),o=i.n(n);function r({uniqueId:e,secUid:t}){return function(e=""){return e&&!function(e="",t=!0){return t?/^[0-9]*$/.test(e):/^[0-9]+$/.test(e)}(e)&&!function(e=""){return e&&/[^a-zA-Z0-9\_\.]/.test(e)}(e)&&e.length<=25}(e)?e:t}const s=({uniqueId:e,secUid:t,videoId:i},n="/")=>{const o=r({uniqueId:e,secUid:t});return o&&i?`/@${o}/video/${i}`:n},a=({uniqueId:e,secUid:t,videoId:i},n="/")=>{const o=r({uniqueId:e,secUid:t});return o&&i?`/@${o}/photo/${i}`:n};function l(e,t){var i,n,r;const{defaultPath:c=""}=null!=t?t:{};if(o()(e))return c;if(null===(i=e.author)||void 0===i?void 0:i.uniqueId){const i=e;return l({uniqueId:null===(n=i.author)||void 0===n?void 0:n.uniqueId,secUid:null===(r=i.author)||void 0===r?void 0:r.secUid,videoId:i.id,isPhotomode:void 0!==i.imagePost},t)}const{uniqueId:d="",secUid:u,videoId:v,isPhotomode:p}=e;return p?a({uniqueId:d,videoId:v,secUid:u}):s({uniqueId:d,videoId:v,secUid:u})}function c(e){if(!e)return"";const{nlpLanguage:t}=e;return`/${null!=t?t:"en"}/trending/detail/${e.uniqueWord}`}},7971:(e,t,i)=>{function n(e){let t=0;return e&&e.forEach((e=>{var i,n;t+=null!==(n=null===(i=null==e?void 0:e.stats)||void 0===i?void 0:i.playCount)&&void 0!==n?n:0})),t}function o(e,t){return r(e)}function r(e){const t=["in","on","with","by","for","at","about","under","of","to","into","from","within","throughout","inside","outside","without","beside","behind","around","over","among","and","or"];return s(e).replace(/-/g," ").toLocaleLowerCase().split(" ").map((e=>"tiktok"===e?"TikTok":t.indexOf(e)>=0?e:e.charAt(0).toUpperCase()+e.slice(1))).join(" ")}function s(e){return e?e.replace(/\x20/g,"-").toLocaleLowerCase():""}function a(e){switch(!0){case e<727:return 4;case e>=727&&e<927:return 6;case e>=927&&e<1295:return 8;case e>=1295&&e<1495:return 10;case e>=1495&&e<1695:return 12;case e>=1695&&e<1895:return 14;default:return 16}}function l(e){var t;return e&&e.length<=0?"":null!==(t=null==e?void 0:e.slice(0,6).map((e=>r(e))).join(", "))&&void 0!==t?t:""}function c(e){return e.length<=0?[]:e.map((e=>{const{pageType:t,keyword:i}=e;switch(t){case 1:return{keyword:i,linkPath:`/channel/${i}`};case 2:return{keyword:i,linkPath:`/find/${i}`};case 0:return{keyword:i,linkPath:`/discover/${i}`};default:return{keyword:i,linkPath:""}}}))}i.d(t,{K6:()=>u,Kk:()=>c,Mh:()=>a,Of:()=>s,Sq:()=>r,XH:()=>v,Zo:()=>n,gW:()=>l,pS:()=>d,zh:()=>o});const d=e=>""===e?e:e.replace(new RegExp("[\\ufff0-\\uffff]","g"),"").replace(/-/g," "),u=e=>e+Date.now().toString(),v=()=>{const e=new Date,t=e.getDay(),i=new Date(e),n=0===t?6:t-1;i.setDate(e.getDate()-n);const o=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;return{today:o(e),monday:o(i),ISOMonday:i.toISOString()}}},19559:(e,t,i)=>{function n(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}i.d(t,{a:()=>n})},57431:(e,t,i)=>{i.d(t,{D:()=>s,x:()=>r});const n=(0,i(80798).U)("GLOBAL_STORE@tiktok/isomorphic",(()=>new Map)),o="WEBAPP_APP_CONTEXT",r=()=>{const e=n.get(o);return e||console.error("Consume appContext before init"),e},s=e=>{n.get(o)&&console.warn("AppContext will be overwritten"),n.set(o,e)}},97895:(e,t,i)=>{i.d(t,{e:()=>c,v:()=>l});var n=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const o="__UNIVERSAL_DATA_FOR_REHYDRATION__",r="__$UNIVERSAL_DATA$__",s="__DEFAULT_SCOPE__";function a(e,t){var i,n,a,l;if(!window[r]){let e={};try{e=JSON.parse(null!==(n=null===(i=document.getElementById(o))||void 0===i?void 0:i.textContent)&&void 0!==n?n:"{}")}catch(e){console.error("error while parsing rehydration data")}window[r]=e}return null!==(l=null===(a=window[r][null!=t?t:s])||void 0===a?void 0:a[e])&&void 0!==l?l:null}function l(){var e,t,i,n,o;const r=a("webapp.app-context"),s=null==r?void 0:r.abTestVersion,l=a("seo.abtest"),c=[...Object.keys(null!==(t=null===(e=null==s?void 0:s.parameters)||void 0===e?void 0:e.clientABVersions)&&void 0!==t?t:{}),...Object.keys(null!==(n=null===(i=null==l?void 0:l.parameters)||void 0===i?void 0:i.clientABVersions)&&void 0!==n?n:{}),...null!==(o=null==l?void 0:l.vidList)&&void 0!==o?o:[]];return Array.from(new Set(c))}function c(){return n(this,void 0,void 0,(function*(){return l()}))}},34099:(e,t,i)=>{i.d(t,{V:()=>r});const n={kind:"m",captcha:"",imApi:"https://im-api-va.tiktok.com",imFrontier:"wss://im-ws-va.tiktok.com/ws/v2",mTApi:"https://m.tiktok.com",rootApi:"https://www.tiktok.com",secSDK:"",slardar:"mon.tiktokv.com",starling:"https://starling-va.tiktokv.com",tea:"https://mcs-va.tiktokv.com",teaChannel:"va",teaChannelType:"tcpy",libraWebSDK:"https://libraweb-va.tiktok.com",webcastApi:"https://webcast.tiktok.com",webcastRootApi:"https://webcast.tiktok.com",tcc:"https://sf-tcc-config.tiktokcdn.com/obj/tcc-config-web-maliva/",locationApi:"https://location-va.tiktokv.com"};let o=null;const r=()=>{var e,t;if(o)return o;try{const i=JSON.parse(null!==(t=null===(e=document.querySelector("#api-domains"))||void 0===e?void 0:e.innerHTML)&&void 0!==t?t:"");return i?(o=i,i):n}catch(e){return n}}},64431:(e,t,i)=>{i.d(t,{c:()=>r});const n={vregion:"Singapore-Central",vgeo:"VGeo-ROW"};let o=null;const r=()=>{var e,t;if(o)return o;try{const i=JSON.parse(null!==(t=null===(e=document.querySelector("#service-region"))||void 0===e?void 0:e.innerHTML)&&void 0!==t?t:"");return i?(o=i,i):n}catch(e){return n}}},33543:(e,t,i)=>{i.d(t,{$O:()=>s,Fd:()=>a,dK:()=>o,dl:()=>r,in:()=>l,nk:()=>d,pJ:()=>n,xV:()=>c});const n="15rem",o="4.5rem",r="20rem",s="24rem",a=400,l="4.5rem",c="--side-nav-width",d=`var(${c})`;var u;!function(e){e.Suggest="suggest",e.Recommend="recommend",e.Follow="follow",e.HotLive="hotLive",e.ContinueAndWatch="continueAndWatch",e.RecommendInRoomPlayer="RecommendInRoomPlayer",e.RecommendInFeed="recommendInFeed",e.FeedCommon="feedCommon",e.FollowInFeed="followInFeed",e.GameInFeed="gameInFeed",e.EventInFeed="eventInFeed",e.LifestyleInFeed="lifestyleInFeed"}(u||(u={}))},99661:(e,t,i)=>{i.d(t,{eE:()=>p,xq:()=>h});var n=i(94999),o=i(62302),r=i(50970),s=i(63615),a=i(57431),l=i(88874),c=i(89558),d=i(2408),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},v=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function p(e){return v(this,void 0,void 0,(function*(){try{let t=(0,l.YI)(s.Ow);if(!t){const i=yield(0,o.zI)(e);if(0!==(null==i?void 0:i.statusCode))throw new Error("AppContext API response statusCode is not 0");t=i,(0,l.A7)(s.Ow,i)}(0,a.D)(t),yield function(e){return v(this,void 0,void 0,(function*(){const t=n.l.getInstance(r.L),i=t.getActions().init({appContext:e});t.store.dispatch(i),function(e){var t,i,n,o;u(this,void 0,void 0,(function*(){"v2"===(null===(i=null===(t=e.abTestVersion)||void 0===t?void 0:t.parameters.search_add_non_personalized_switch)||void 0===i?void 0:i.vid)&&(yield(0,d.nH)().init({})),"v2"===(null===(o=null===(n=e.abTestVersion)||void 0===n?void 0:n.parameters[c.W$])||void 0===o?void 0:o.vid)&&(yield(0,d.nH)().init({isFeed:!0}))}))}(e),yield new Promise((e=>{t.state$.subscribe((t=>{t.initialized&&e()}))}))}))}(t)}catch(e){console.error(`[Fetch Base App Context Error]: ${e}`)}}))}function h(){return(0,l.YI)(s.Ow)}},94337:(e,t,i)=>{i.d(t,{Mh:()=>c,VU:()=>d,le:()=>u});var n=i(58632),o=i(7672),r=i(340),s=i(11654),a=i(67805),l=i(4474);const c=(0,s.Yr)("@tiktok/login");let d=class{constructor(e){this.service=e,this.defaultMetrics={count:1},this.currentMethod=null,this.setCurrentRequestMethod=e=>{this.currentMethod=e},this.handleRequestResultReport=e=>{if(!this.currentMethod)return;const{error_code:t=0,function_type:i}=e,o=(0,n.__rest)(e,["error_code","function_type"]);this.service.emitEvent(this.currentMethod,this.defaultMetrics,Object.assign(Object.assign({error_code:String(t)},o),{function_type:i||this.getFunctionType(this.currentMethod,e)}))},this.handleThirdGetToken=e=>{this.currentMethod="thirdGetToken",this.handleRequestResultReport(e)},this.QRCodeShortenFail=e=>{this.service.emitEvent("qrcode_shorten_fail",this.defaultMetrics,e)},this.handleUserRegionEscape=e=>{this.service.emitEvent("userRegionEscape",this.defaultMetrics,e)},this.oneTapLoginSuccessPopupShow=()=>{const e=a.nf.getTrackingInfo();this.service.emitEvent("oneTapLoginSuccessPopupShow",this.defaultMetrics,Object.assign({},e))},this.oneTapLoginSuccessPopupClick=e=>{const t=a.nf.getTrackingInfo();this.service.emitEvent("oneTapLoginSuccessPopupClick",this.defaultMetrics,Object.assign({type:e},t))}}emitOnce(e,t){this.service.emitEvent(e,this.defaultMetrics,t)}sendLoginClickToNotifyDurationPerfMetric(e){this.service.sendCustomPerfMetric("login_click_to_notify_duration",e)}getFunctionType(e,t){switch(e){case"sendPhoneCode":case"smsLogin":case"passwordLogin":case"thirdLogin":case"getQrCodeUrl":case"checkQrconnect":case"getOauthConfig":case"cancelDeleteAccount":case"thirdGetToken":return"login";case"notLoginSendCode":case"smsVerify":case"verifyPwdWithoutLogin":case"thirdVerify":return"verify";case"validateMobileCodeForLogin":case"validateEmailCodeForLogin":case"validateMobileCodeForReset":case"verifySendEmailCode":case"sendEmailCodeForLogin":case"emailCodeLogin":return"twostep";case"sendPhoneCodeWithType":return String(t.type).match(/13|12/)?"twostep":"reset";case"sendPhoneCodeForResetPwd":case"sendEmailCodeForResetPwd":case"resetPwdLoginByEmail":case"changePwdByMobile":return"reset";case"sendEmailCodeForForceResetPwd":case"sendPhoneCodeForForceResetPwd":case"validatePhoneCodeForForceReset":case"validateEmailCodeForForceReset":case"forceResetPwdByMobileTicket":case"forceResetPwdByEmailTicket":return"forcereset";case"sendEmailCodeForSignup":case"smsLoginContinue":case"usernameRegister":case"setAccount":case"emailRegister":return"signup";case"oidcPrepare":case"oidcLogin":case"checkOneTapState":case"getOneTapToken":return"onetap";default:return"ttp"}}};d=(0,n.__decorate)([(0,o._)(),(0,n.__param)(0,(0,r.y)(c.INJECTION_TOKEN)),(0,n.__metadata)("design:paramtypes",[s.V$])],d);let u=class{constructor(e){this.service=e,this.defaultMetrics={count:1},this.uiStyle="full_screen",this.enterMethod="login",this.enterFrom="login",this.platform="unknown",this.setUiStyle=e=>{this.uiStyle=e}}setPlatform(e){this.platform=e}setEnterMethod(e){this.enterMethod=e}setEnterFrom(){const e=(0,l.parse)(location.search);this.enterFrom=e.enter_from||"unknown"}loginNotify(){const e=a.nf.getTrackingInfo();this.service.emitEvent("login_notify",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom},e))}clickLoginOption(e={}){const{isSignUp:t}=e,i=a.nf.getTrackingInfo();this.service.emitEvent("click_login_button",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom,is_register:t?"1":"0"},i))}loginSubmit(e={}){const{signUp:t,forgetPwd:i}=e,n=a.nf.getTrackingInfo();this.service.emitEvent("login_submit",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom,platform:this.platform,is_register:t?"1":"0",is_forget_password:i?"1":"0"},n))}loginSuccess(e={}){var t;const i=null!==(t=e.e2eInfo)&&void 0!==t?t:a.nf.getTrackingInfo(),{signUp:n,forgetPwd:o}=e;this.service.emitEvent("login_success",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom,platform:this.platform,is_register:n?"1":"0",is_forget_password:o?"1":"0"},i))}loginFailure(e){const t=a.nf.getTrackingInfo(),{signUp:i,errorCode:n,errorMsg:o,forgetPwd:r}=e;this.service.emitEvent("login_failure",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom,platform:this.platform,is_register:i?"1":"0",error_code:String(n),is_forget_password:r?"1":"0",error_message:null!=o?o:""},t))}logout(e){var t;this.service.emitEvent("monitor_logout",this.defaultMetrics,{ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom,status:String(e.status),error_code:String(e.error_code),error_desc:null!==(t=e.error_desc)&&void 0!==t?t:""})}logoutSubmit(e={}){this.service.emitEvent("logout_submit",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom},e))}logoutCancel(e={}){this.service.emitEvent("logout_cancel",this.defaultMetrics,Object.assign({ui_style:this.uiStyle,enter_method:this.enterMethod,enter_from:this.enterFrom},e))}};u=(0,n.__decorate)([(0,o._)(),(0,n.__param)(0,(0,r.y)(c.INJECTION_TOKEN)),(0,n.__metadata)("design:paramtypes",[s.V$])],u)},35267:(e,t,i)=>{i.d(t,{MJ:()=>a,T6:()=>r,mH:()=>c,xw:()=>s,yK:()=>l});var n=i(67823),o=i(4474);function r(){return{userAgent:window.navigator.userAgent||"",acceptLanguage:window.navigator.languages||[],referrer:document.referrer||""}}function s(){return{hostname:window.location.hostname||"",pathname:window.location.pathname||"",query:(0,o.parse)(window.location.search)}}function a(e){return n.A.get(e)}function l(){throw new Error("this function only works on server side")}function c(){return console}},39785:(e,t,i)=>{function n({csr:e}){return e}i.d(t,{M:()=>n})},40438:(e,t,i)=>{i.d(t,{L:()=>o});var n=i(94999);const o=()=>n.l},53966:(e,t,i)=>{i.d(t,{E:()=>s});var n=i(64162),o=i(1055);function r(e=""){return o.p8+e}class s extends n.E{constructor(){super(...arguments),this.terminate=e=>({type:r(e),payload:null,store:this.store})}}},34593:(e,t,i)=>{i.d(t,{L:()=>r});var n=i(94999);const o=new WeakMap,r=e=>{if("undefined"!=typeof window){if(!o.has(e)){const t=n.l.getInstance(e);if(!t)return void console.error(`Instance has not mounted for Class: ${e.constructor.name}`);o.set(e,t)}return o.get(e)}console.warn("[Warning]: Unexpctedly get injectable instance in SSR runtime, will return null instead.")}},46682:(e,t,i)=>{i.d(t,{S:()=>r,w:()=>s});var n=i(73580),o=i(41271);function r(e,t){return[(0,o.P)(e,t),s(e)]}function s(e){return(0,n.Nj)(e).dispatchers}},41271:(e,t,i)=>{i.d(t,{P:()=>v});var n=i(73580),o=i(71111),r=i(40099),s=i(28103),a=i(1475),l=i(95719);function c(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;const o=Object.prototype.hasOwnProperty;for(const n of i)if(!o.call(t,n)||e[n]!==t[n])return!1;return!0}var d=i(7570);const u=(0,o.atom)(null);function v(e,t){const i=e.jotaiAtom,v="jotaiAtom"in e;e.jotaiAtom&&(e.jotaiAtom.__SIGI_MODULE__=e);const{store:p}=(0,n.Nj)(e),h=function(e,t,i,n=c){const o=i||[],d=(0,r.useRef)(),u=(0,r.useRef)(),v=(0,r.useRef)();n(u.current,o)||(v.current=null!=t?t:s.D,d.current=v.current(e.state)),u.current=o;const p=function(){const[,e]=(0,r.useReducer)((e=>e+1),0);return e}(),h=(0,r.useCallback)((e=>{const t=v.current(e);n(d.current,t)||(d.current=t,p())}),[]),m=(0,r.useCallback)((()=>e.state$.pipe((0,a.i)(1),(0,l.M)(h)).subscribe()),[e,h]),g=(0,r.useMemo)((()=>m()),[m]);return(0,r.useEffect)((()=>{const e=g.closed?m():g;return()=>{e.unsubscribe()}}),[g,m]),d.current}(p,null==t?void 0:t.selector,null==t?void 0:t.dependencies,null==t?void 0:t.equalFn),m=function(e,t){const i=(0,o.useStore)(t),{equalityFn:n=Object.is,selector:r}=null!=t?t:{},s=null!=r?r:e=>e,a=()=>i.get(e);return(0,d.useSyncExternalStoreWithSelector)((t=>i.sub(e,t)),a,a,s,n)}(null!=i?i:u,{selector:e=>{var i;return e?null!==(i=null==t?void 0:t.selector(e))&&void 0!==i?i:e:null},equalityFn:c});return v?m:h}},66476:(e,t,i)=>{i.d(t,{$9:()=>a,DA:()=>o,LH:()=>r,cc:()=>s,xD:()=>n});const n="__UNIVERSAL_DATA_FOR_REHYDRATION__",o="__$UNIVERSAL_DATA$__",r="__DEFAULT_SCOPE__",s=Symbol("i"),a=Symbol("s")},82231:(e,t,i)=>{i.d(t,{Dh:()=>a});var n=i(71510),o=i.n(n),r=i(40099),s=i(66476);function a(e,t,i){let n="",a="";"string"==typeof e?n=e:(n=e.key,a=e.scope);const[l,c]=(0,r.useState)((()=>{var e,r,l,c;if(!window[s.DA]||window[s.DA][s.cc]){let t={};try{t=JSON.parse(null!==(r=null===(e=document.getElementById(s.xD))||void 0===e?void 0:e.textContent)&&void 0!==r?r:"{}")}catch(e){console.error("error while parsing rehydration data")}window[s.DA]=window[s.DA]||{},window[s.DA][s.cc]=!1,window[s.DA][s.$9]=!0,window[s.DA]=o()(window[s.DA],t)}const d=window[s.DA],u=a||s.LH,v=null!==(c=null===(l=d[u])||void 0===l?void 0:l[n])&&void 0!==c?c:void 0;if(void 0===v)return t;if(null==i?void 0:i.volatile){const e=`${n}_volatile`;d[u][e]=v,d[u][n]=void 0}return v}));return[l,c,()=>null]}},88874:(e,t,i)=>{i.d(t,{YI:()=>o,A7:()=>r}),i(40099);var n=i(66476);function o(e,t){var i,o,r,s;if(!window[n.DA]){let e={};try{e=JSON.parse(null!==(o=null===(i=document.getElementById(n.xD))||void 0===i?void 0:i.textContent)&&void 0!==o?o:"{}")}catch(e){console.error("error while parsing rehydration data")}window[n.DA]=e}return null!==(s=null===(r=window[n.DA][null!=t?t:n.LH])||void 0===r?void 0:r[e])&&void 0!==s?s:null}function r(e,t){var i,o;if(null===(i=window[n.DA])||void 0===i?void 0:i[n.$9])throw new Error("set universal data is not allowed after ReactDom kicked in");let r="",s="";"string"==typeof e?r=e:(r=e.key,s=null!==(o=e.scope)&&void 0!==o?o:""),window[n.DA]=window[n.DA]||{[n.cc]:!0},function(e,t,i){let n=e,o=0;for(;n&&o{i.d(t,{i:()=>d});var n=i(80798),o=i(40438),r=i(71111),s=i(40099),a=i(17995),l=i(98796);const c=(0,n.U)("internalAtomToServiceCache@webapp-vendors",(()=>new WeakMap));function d(e,t){const i=(t,...i)=>{var n;if("__SIGI_MODULE__"in e&&"init"in e){const r=(0,o.L)(),{store:s}=null!==(n=r.getInstance(e.__SIGI_MODULE__))&&void 0!==n?n:{};if(s){let n=i[0];"function"==typeof n&&(n=n(t.get(e))),s.state$.next(n)}}},n=(t,i)=>{const{equalityFn:n=Object.is}="function"==typeof i?{equalityFn:i}:null!=i?i:{};return(0,l.X)(e,{selector:t,equalityFn:n})},d=()=>{const n=(0,r.useStore)(),o=(0,s.useCallback)(((t,...o)=>{if(!("write"in e))throw new Error("not writable atom");return i(n,...o),n.set(t,...o)}),[n]),a=(0,s.useCallback)((e=>n.get(e)),[n]);return(0,s.useMemo)((()=>{const e={},i=t(a,o);for(const t of Object.keys(i))e[t]=i[t].bind(i);return e}),[a,o])},u=new WeakMap;return v=e,p={useServiceState:n,useServiceDispatchers:d,useAtomService:(e,t)=>[n(e,t),d()],getStaticApi:n=>{const o=null!=n?n:(0,a.LM)();let r=u.get(o);if(r)return r;const{get:s,set:l,sub:c}=o,d=t(s,((e,...t)=>(i(o,...t),l(e,...t))));return r=Object.assign({},d,{get:s,set:l,sub:t=>c(e,t)}),u.set(o,r),r}},c.has(v)?c.get(v):(c.set(v,p),p);var v,p}},17995:(e,t,i)=>{i.d(t,{J7:()=>v,LM:()=>h,ZB:()=>g,sF:()=>m});var n=i(58632),o=i(24643),r=i(14285),s=i(340),a=i(94999),l=i(80798),c=i(40438),d=i(71111),u=i(1569);const v=(0,l.U)("JotaiStoreInjectionToken@webapp-vendors",(()=>new r.n("jotaiStore")));let p=class{constructor(e){this.jotaiStore=e}getJotaiStore(){return this.jotaiStore}};function h(){return(0,c.L)().getInstance({provide:v,useExisting:v})}function m(e){v.__IS_STORE_SET__||(a.l.addProvider({provide:v,useValue:e}),a.l.addProvider({useClass:p,provide:p}),v.__IS_STORE_SET__=!0)}function g(e,t){const{jotaiStore:i}=null!=t?t:{},n=null!=i?i:(0,u.S)();return m(n),()=>(0,o.jsx)(d.Provider,Object.assign({store:n},{children:e}))}p=(0,n.__decorate)([(0,n.__param)(0,(0,s.y)(v)),(0,n.__metadata)("design:paramtypes",[Object])],p)},44241:(e,t,i)=>{i.d(t,{S:()=>o,d:()=>n});const n=Symbol("BASE_DATA_ATOM_KEY"),o=Symbol("HYDRATION_TOGGLE_PROP")},28086:(e,t,i)=>{i.d(t,{z:()=>v,I:()=>p});var n=i(58632),o=i(82231),r=i(71111),s=i(57432),a=i.n(s),l=i(40099),c=i(50296),d=i(44241),u=i(32125);function v(e){const t=(0,r.atom)(e.initState),i=(0,r.atom)((e=>e(t)),((i,o,...r)=>(0,n.__awaiter)(this,void 0,void 0,(function*(){let n;return n="action"in e?yield e.action({prevState:i(t),get:i},...r):yield e.fetchAction(i(t),...r),o(t,n),n}))));return i[d.d]=t,i[d.S]=e.rehydrationDataKey,i}function p(e,t){const{resetStateBeforeDispatch:i=!1,skipFirstClientDispatch:s=!0}=null!=t?t:{},v=e[d.S],p=e[d.d],[h,m,g]=v?(0,o.Dh)(v,null,{volatile:!0}):[null,a(),()=>null];!function(e){const t=(0,r.useStore)(void 0);(0,c.S)(t,e)}(h&&s?[[p,h]]:[]);const[_,f]=(0,r.useAtom)(e),y=(0,r.useSetAtom)(p),[b,w]=(0,l.useState)((()=>({isFetching:!1,rehydratedFromSSR:Boolean(h)}))),k=(0,l.useRef)(!0);(0,l.useEffect)((()=>()=>{i&&y(p.init)}),[]);const P=(0,l.useCallback)(((...e)=>(0,n.__awaiter)(this,void 0,void 0,(function*(){if(k.current&&s&&b.rehydratedFromSSR)return k.current=!1,_;w({isFetching:!0,rehydratedFromSSR:!1}),i&&y(p.init);const t=yield f(...e);return w({isFetching:!1,rehydratedFromSSR:!1}),t}))),[f]);return[(0,u.xb)(b,_),P,g]}},98796:(e,t,i)=>{i.d(t,{X:()=>s});var n=i(71111),o=i(7570),r=i(32125);function s(e,t){const i=(0,n.useStore)(t),{equalityFn:s=Object.is,selector:a}=null!=t?t:{},l=null!=a?a:e=>e,c=()=>i.get(e),d=(0,o.useSyncExternalStoreWithSelector)((t=>i.sub(e,t)),c,c,l,s);return(0,r.$X)(d)?(0,r.Yx)(d):d}},32125:(e,t,i)=>{i.d(t,{$X:()=>l,Yx:()=>c,bN:()=>a,pj:()=>r,xb:()=>s});var n=i(40099),o=i(44241);function r(e){return e[o.d]}function s(e,t){return Object.assign(Object.assign({},e),{atomState:t})}function a(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,n]of e)if(!Object.is(n,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let n=0;n"function"==typeof(null==e?void 0:e.then),c=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)})},50296:(e,t,i)=>{i.d(t,{L:()=>s,S:()=>r});const n=new WeakMap,o=e=>{let t=n.get(e);return t||(t=new WeakSet,n.set(e,t)),t},r=(e,t)=>{const i=o(e);for(const[n,o]of t)i.has(n)||(i.add(n),e.set(n,o))},s=(e,t,i)=>{const n=o(e);n.has(t)||(n.add(t),e.set(t,i))}},14374:(e,t,i)=>{i.d(t,{_:()=>a});var n=i(66476),o=i(17995),r=i(50296);const s=Symbol("REHYDRATED_FROM_SSR"),a=(e,{rehydrationKey:t})=>{if(!("init"in e))throw new Error("Only primitive atom can be hydrated");{e.rehydrationKey=t;const i=e.read.bind(e),a=function(){var e,t;if(!window[n.DA]){let i={};try{i=JSON.parse(null!==(t=null===(e=document.getElementById(n.xD))||void 0===e?void 0:e.textContent)&&void 0!==t?t:"{}"),window[n.DA]=i}catch(e){console.error("error while parsing rehydration data"),window[n.DA]={}}}return window[n.DA][n.LH]}();(null==a?void 0:a[e.rehydrationKey])&&(e[s]=!0),e.read=(t,n)=>{if(a){const t=a[e.rehydrationKey];if(t){const i=e;(0,r.L)((0,o.LM)(),i,t)}}return i(t,n)}}return e}},64738:(e,t,i)=>{i.d(t,{useAtom:()=>o,useAtomValue:()=>r,useSetAtom:()=>s});var n=i(71111);const o=n.useAtom,r=n.useAtomValue,s=n.useSetAtom},34360:(e,t,i)=>{i.d(t,{y:()=>c});var n=i(40438),o=i(71111),r=i(57432),s=i.n(r),a=i(1475),l=i(17995);function c(e){const t=Symbol("null"),i=(0,o.atom)(t),r=(0,o.atom)((o=>{const a=o(i);if(r.__IS_SUBSCRIBED__||(r.__IS_SUBSCRIBED__=!0,(0,l.LM)().sub(r,s())),a===t){const t=(0,n.L)().getInstance(e),{store:i}=t;return i.state}return a}),((e,t,n)=>{t(i,n)}));return r.onMount=t=>{const i=(0,n.L)().getInstance(e),{store:o}=i,r=()=>{t(o.state)},s=o.state$.pipe((0,a.i)(1)).subscribe(r);return r(),()=>s.unsubscribe()},(0,o.atom)((e=>e(r)),((t,i,o,...r)=>{(0,n.L)().getInstance(e).dispatchers[o](...r)}))}},1569:(e,t,i)=>{i.d(t,{S:()=>s});var n=i(88874),o=i(71111),r=i(50296);const s=()=>{const e=(0,o.createStore)();return Object.assign(Object.assign({},e),{get:t=>{if(t.rehydrationKey){const i=(0,n.YI)(t.rehydrationKey);if(i&&"init"in t){const n=t;(0,r.L)(e,n,i)}}return e.get(t)}})}}},e=>{e.O(0,[8564,5956,3699,1888,8525,5563,3824,6534,1476,4121],(()=>e(e.s=57644))),e.O()}]);