1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[15224,39051,61432,94289],{419015:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(959235),o=n(689196);let l={SET_USER_DATA:"SET_USER_DATA",SET_PREMIUM_ORDER:"SET_PREMIUM_ORDER",SET_IS_VALIDATED:"SET_IS_VALIDATED",UPDATE_USER_DATA:"UPDATE_USER_DATA",USER_LOGOUT:"USER_LOGOUT",ADD_RECOMMEND_AUTHOR_LIST:"ADD_RECOMMEND_AUTHOR_LIST",ADD_RECOMMEND_PUBLICATION_LIST:"ADD_RECOMMEND_PUBLICATION_LIST",DELETE_RECOMMEND_AUTHOR_LIST:"DELETE_RECOMMEND_AUTHOR_LIST",DELETE_RECOMMEND_PUBLICATION_LIST:"DELETE_RECOMMEND_PUBLICATION_LIST",CLEAR_RECOMMEND_AUTHOR_LIST:"CLEAR_RECOMMEND_AUTHOR_LIST",CLEAR_RECOMMEND_PUBLICATION_LIST:"CLEAR_RECOMMEND_PUBLICATION_LIST",SHOW_WELCOME_GIFT_RECEIVED_ALERT:"SHOW_WELCOME_GIFT_RECEIVED_ALERT",SWITCH_USER_HAS_PUBLICATIONS:"SWITCH_USER_HAS_PUBLICATIONS",SET_WELCOME_GIFT_STATUS:"SET_WELCOME_GIFT_STATUS",SET_IS_CHANGE_PWD_MODAL_SHOW:"SET_IS_CHANGE_PWD_MODAL_SHOW",SET_HIDE_ADULT_ALERT:"SET_HIDE_ADULT_ALERT",SET_CHATROOM_HINT:"SET_CHATROOM_HINT",SET_XMAS_HINT:"SET_XMAS_HINT",SET_POLL_HINT:"SET_POLL_HINT",SET_COMMENT_SORT_HINT:"SET_COMMENT_SORT_HINT",SET_IS_PHONE_VERIFIED:"SET_IS_PHONE_VERIFIED",setUserData:e=>{let{name:t="",avatarUrl:n="",fullname:i="",username:s="",_id:a="",level:u="",email:c="",receiveEmail:p="",permissionWrite:h=!1,recommendStatus:d=0,recommendSelection:E=[],premiumDate:_="",mailVerification:f=0,mailAuthor:T=!1,mailAuthorOpp:m=!1,mailFollow:S=0,mailMember:g=!1,mailSubscribe:L=0,welcomeGift:D=0,createdAt:A=null,updatedAt:y=null,welcomeGiftReceivedAt:v=!1,headerColor:R="",isPremium:I=!1,intro:O="",likerId:M="",walletAddress:C="",permissionAuthorization:w=0,socialLinks:P={},socialLinkPosition:H=[],addLikerButtonByDefault:N=!1,permissionDonate:U=!1,reply:b="",hideAdultAlert:x,salons:Y=[],isVAFHolder:W=!1,hasSalonPermission:B=!1,interestedCatalogIDs:k=[],salonBurgerHint:F=!1,homePageEventHint:V=!1,chatroomHint:j=!1,cardEventHint:G=!1,createButtonTooltipHint:$=!1,pollHomeHint:X,pollCreateHint:Z,pollToolbarHint:q,commentSortHint:z=!1,isPhoneVerified:J=!1,canPublishContent:K=!1}=e;return{type:l.SET_USER_DATA,payload:{name:t,avatarUrl:n,fullname:i,username:s,userId:a,level:u,email:c,premiumDate:_,receiveEmail:p,permissionWrite:h,recommendStatus:d,recommendSelection:E,mailVerification:f,mailAuthor:T,mailAuthorOpp:m,mailFollow:S,mailMember:g,mailSubscribe:L,welcomeGift:D,createdAt:A,updatedAt:y,welcomeGiftReceivedAt:v,headerColor:R||r.PL[r.ZV.WHITE],isPremium:I,intro:O,likerId:M,walletAddress:C,socialLinks:P,socialLinkPosition:H,hasPremiumPermission:(0,o.di)({premiumDate:_,level:u,isVAFHolder:W}),permissionAuthorization:w,addLikerButtonByDefault:N,permissionDonate:U,reply:b,hideAdultAlert:x,salons:Y,userHasSalon:Y?.length>0,isVAFHolder:W,hasSalonPermission:B,interestedCatalogIDs:k,salonBurgerHint:F,homePageEventHint:V,chatroomHint:j,cardEventHint:G,createButtonTooltipHint:$,pollHomeHint:X,pollCreateHint:Z,pollToolbarHint:q,commentSortHint:z,isPhoneVerified:J,canPublishContent:K}}},setPremiumOrder:e=>{let{premiumOrder:t=!1}=e;return{type:l.SET_PREMIUM_ORDER,payload:{premiumOrder:t}}},setIsValidated:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:l.SET_IS_VALIDATED,payload:{isValidated:e}}},updateUserData:e=>({type:l.UPDATE_USER_DATA,payload:e}),addRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:l.ADD_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},deleteRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:l.DELETE_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},clearRecommendAuthorList:()=>({type:l.CLEAR_RECOMMEND_AUTHOR_LIST}),addRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:l.ADD_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},deleteRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:l.DELETE_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},clearRecommendPublicationList:()=>({type:l.CLEAR_RECOMMEND_PUBLICATION_LIST}),showWelcomeGiftAlert:()=>({type:l.SHOW_WELCOME_GIFT_RECEIVED_ALERT}),switchUserHasPublications:e=>({type:l.SWITCH_USER_HAS_PUBLICATIONS,payload:{hasPublications:e}}),setWelcomeGiftStatus:e=>({type:l.SET_WELCOME_GIFT_STATUS,payload:e}),setIsChangePasswordModalShow:e=>({type:l.SET_IS_CHANGE_PWD_MODAL_SHOW,payload:e}),setHideAdultAlert:e=>({type:l.SET_HIDE_ADULT_ALERT,payload:e}),setChatroomHint:e=>({type:l.SET_CHATROOM_HINT,payload:e}),setXmasHint:e=>{let{hasClosedPopup:t,hasClosedTooltip:n}=e;return{type:l.SET_XMAS_HINT,payload:{hasClosedPopup:t,hasClosedTooltip:n}}},setPollHint:e=>{let{pollHomeHint:t,pollCreateHint:n,pollToolbarHint:r}=e;return{type:l.SET_POLL_HINT,payload:{pollHomeHint:t,pollCreateHint:n,pollToolbarHint:r}}},setCommentSortHint:e=>{let{commentSortHint:t}=e;return{type:l.SET_COMMENT_SORT_HINT,payload:{commentSortHint:t}}},setPhoneVerified:e=>{let{isPhoneVerified:t}=e;return{type:l.SET_IS_PHONE_VERIFIED,payload:{isPhoneVerified:t}}}},i=l},444690:(e,t,n)=>{n.d(t,{BN:()=>d,ER:()=>E,Ej:()=>f,UE:()=>m,UU:()=>_,cY:()=>h,jD:()=>T,we:()=>p});var r=n(860611),o=n(621462),l=n(447993),i="undefined"!=typeof document?o.useLayoutEffect:function(){};function s(e,t){let n,r,o;
1if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!s(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!s(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function a(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=a(e);return Math.round(t*n)/n}function c(e){let t=o.useRef(e);return i(()=>{t.current=e}),t}function p(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:p=[],platform:h,elements:{reference:d,floating:E}={},transform:_=!0,whileElementsMounted:f,open:T}=e,[m,S]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,L]=o.useState(p);s(g,p)||L(p);let[D,A]=o.useState(null),[y,v]=o.useState(null),R=o.useCallback(e=>{e!==C.current&&(C.current=e,A(e))},[]),I=o.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),O=d||D,M=E||y,C=o.useRef(null),w=o.useRef(null),P=o.useRef(m),H=null!=f,N=c(f),U=c(h),b=c(T),x=o.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:g};U.current&&(e.platform=U.current),(0,r.rD)(C.current,w.current,e).then(e=>{let t={...e,isPositioned:!1!==b.current};Y.current&&!s(P.current,t)&&(P.current=t,l.flushSync(()=>{S(t)}))})},[g,t,n,U,b]);i(()=>{!1===T&&P.current.isPositioned&&(P.current.isPositioned=!1,S(e=>({...e,isPositioned:!1})))},[T]);let Y=o.useRef(!1);i(()=>(Y.current=!0,()=>{Y.current=!1}),[]),i(()=>{if(O&&(C.current=O),M&&(w.current=M),O&&M){if(N.current)return N.current(O,M,x);x()}},[O,M,x,N,H]);let W=o.useMemo(()=>({reference:C,floating:w,setReference:R,setFloating:I}),[R,I]),B=o.useMemo(()=>({reference:O,floating:M}),[O,M]),k=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!B.floating)return e;let t=u(B.floating,m.x),r=u(B.floating,m.y);return _?{...e,transform:"translate("+t+"px, "+r+"px)",...a(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,_,B.floating,m.x,m.y]);return o.useMemo(()=>({...m,update:x,refs:W,elements:B,floatingStyles:k}),[m,x,W,B,k])}let h=(e,t)=>{let n=(0,r.cY)(e);return{name:n.name,fn:n.fn,options:[e,t]}},d=(e,t)=>{let n=(0,r.BN)(e);return{name:n.name,fn:n.fn,options:[e,t]}},E=(e,t)=>({fn:(0,r.ER)(e).fn,options:[e,t]}),_=(e,t)=>{let n=(0,r.UU)(e);return{name:n.name,fn:n.fn,options:[e,t]}},f=(e,t)=>{let n=(0,r.Ej)(e);return{name:n.name,fn:n.fn,options:[e,t]}},T=(e,t)=>{let n=(0,r.jD)(e);return{name:n.name,fn:n.fn,options:[e,t]}},m=(e,t)=>{let n=(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:o}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.UE)({element:n.current,padding:o}).fn(t):{}:n?(0,r.UE)({element:n,padding:o}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}}},604834:(e,t,n)=>{n.d(t,{i:()=>l});var r=n(621462),o=n(512550);function l({onZoomChange:e,...t}){let[n,l]=r.useState(!1),i=r.useCallback((t,{event:n})=>{l(t),e?.(t,{event:n})},[e]);return r.createElement(o.x,{...t,isZoomed:n,onZoomChange:i})}},689196:(e,t,n)=>{n.d(t,{$N:()=>_,JK:()=>u,VG:()=>h,aZ:()=>p,di:()=>c,gb:()=>i.A,jz:()=>d,l8:()=>E});var r=n(552683),o=n(990688),l=n(64472),i=n(35758);let{serverUrl:s}=l.config,a=r.Ay.animateScroll,u=()=>{let{locales:e}=l.config,t=sessionStorage.getItem("country");return e.includes(t)?t:"TW"},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{level:"",isVAFHolder:!1,premiumDate:""};return!!e&&!!(e?.level==="10"||e?.isVAFHolder||e?.premiumDate&&(0,o.default)(new Date,new Date(e.premiumDate)))},p=e=>{e?document.body.style.overflow="hidden":document.body.style.overflow="auto"},h=e=>{a.scrollTo(e)},d=e=>{let{firstAddress:t=6,lastAddress:n=6,idAddress:r=""}=e;return r?`${r.slice(0,t)}...${r.slice(-1*n)}`:""},E=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return e?e<=100?2*e:1.5*e:200}},690934:(e,t,n)=>{n.d(t,{r:()=>s});var r=n(823798),o=n(621462),l=n(761139),i=n(877165);let s=e=>function(t){let n=(0,o.useRef)(null),[s]=(0,i.A)(),a=(0,l.useAmp)();return(0,o.useEffect)(()=>{n.current=!0;let e=async()=>{await s()};return a||e(),()=>{n.current=!1}},[s,a]),(0,r.jsx)(e,{...t})}},877165:(e,t,n)=>{n.d(t,{A:()=>m,Q:()=>T});var r=n(621462),o=n(448561),l=n(368794),i=n.n(l),s=n(563140),a=n(457140),u=n(64472),c=n(419015),p=n(805292),h=n(624750);let{serverUrl:d}=u.config,{setUserData:E,setPremiumOrder:_,setIsValidated:f}=c.A,T=()=>{let{data:e}=(0,s.Ay)("/secure/validate");
1return{data:e,salonId:e?.data?.salons?.[0]?._id}},m=()=>{let e=(0,o.wA)();return[(0,r.useCallback)(async()=>{let t=(0,a.qj)();if(t)try{let{result:n}=await (0,h.A)({url:`${d}/secure/validate?timestamp=${Date.now()}`,headers:(0,a.rh)(t),signal:(e=>{let t=new AbortController;return setTimeout(()=>t.abort(),e),t.signal})(1e4)}),r=n?.token,o=n?.data;localStorage.setItem("id_token",r),p.gV(o),i().set("id_token",r,{expires:8,secure:u.config.isProduction,SameSite:"Lax"}),i().set("userId",o?._id,{expires:8,secure:u.config.isProduction,SameSite:"Lax"}),e(E(o)),e(_(o))}catch(e){console.error(e),e?.error==="permission denied"&&(i().remove("id_token",{expires:8,secure:u.config.isProduction,SameSite:"Lax"}),localStorage.removeItem("id_token"))}return e(f(!0)),!0},[e])]}},909131:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(621462),o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i={Pixel:"Pixel",Percent:"Percent"},s={unit:i.Percent,value:.8};function a(e){return"number"==typeof e?{unit:i.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:i.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:i.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),s):(console.warn("scrollThreshold should be string or number"),s)}let u=function(e){function t(){this.constructor=n}function n(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){!n.lastScrollTop&&(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){if(n.dragging)e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),!(n.currentY-n.startY>1.5*n.maxPullDownDistance)&&n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)"))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=(function(e,t,n,r){var o,l=!1,i=0;function s(){o&&clearTimeout(o)}function a(){var a=this,u=Date.now()-i,c=arguments;function p(){i=Date.now(),n.apply(a,c)}l||(r&&!o&&p(),s(),void 0===r&&u>e?p():!0!==t&&(o=setTimeout(r?function(){o=void 0}:p,void 0===r?e-u:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),a.cancel=function(){s(),l=!0},a})(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return o(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),n.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
1if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},n.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},n.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},n.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?l(l({},t),{prevDataLength:e.dataLength}):null},n.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=a(t);return r.unit===i.Pixel?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},n.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=a(t);return r.unit===i.Pixel?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},n.prototype.render=function(){var e=this,t=l({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return r.createElement("div",{style:o,className:"infinite-scroll-component__outerdiv"},r.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&r.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},r.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},n}(r.Component)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.