1var _sentryDebugIds,_sentryDebugIdIdentifier;void 0===_sentryDebugIds&&(_sentryDebugIds={});try{var stack=(new Error).stack;stack&&(_sentryDebugIds[stack]="3a1640a2-45f2-477b-8575-e283facbd47e",_sentryDebugIdIdentifier="sentry-dbid-3a1640a2-45f2-477b-8575-e283facbd47e")}catch(e){} 2var SENTRY_RELEASE;SENTRY_RELEASE={name: "Ravit", version: "4.3.0"}; 3__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return Q}});var t=r(d[0]),s=r(d[1]),n=r(d[2]),c=r(d[3]),o=e(r(d[4]));r(d[5]);var l=e(r(d[6])),u=e(r(d[7])),f=e(r(d[8])),h=r(d[9]),p=r(d[10]),b=r(d[11]),C=r(d[12]),M=r(d[13]),y=r(d[14]),x=r(d[15]),E=r(d[16]),S=r(d[17]),A=r(d[18]),k=r(d[19]),_=r(d[20]),v=r(d[21]),I=r(d[22]),T=r(d[23]),j=r(d[24]),P=r(d[25]),U=r(d[26]),L=r(d[27]),R=r(d[28]);const F=l.default.hairlineWidth,G=e=>{const t=e?.matching?.updated;return t?_.Utils.getMoment(t).format("YYYY-MM-DD"):""},N=(e,t)=>{const s=G(e),n=G(t);return!!s&&!!n&&s!==n},D=(e,t)=>e&&(_.Utils.isGpsOn(e)||_.Utils.hasAgent(e))&&t?102:82,w=(e,t)=>{let s=0;return e.map((n,c)=>{const o=D(n,t),l={length:o,offset:s,index:c},u=e[c+1];return s+=o+(N(n,u)?F:0),l})},O=(e,t,s)=>{const n=e[e.length-1];return{length:s,offset:n?n.offset+n.length+s*(t-n.index-1):s*t,index:t}};function Q(){const e=(0,t.useGuardedRouter)(),l=(0,n.useLocalSearchParams)(),F=(0,s.useIsFocused)(),G=(0,s.useNavigationState)(e=>"matching"===e.routes[e.index]?.name),Q=(0,k.useAppDispatch)(),B=(0,c.useRef)(null),z=(0,c.useRef)(0),H=(0,c.useRef)(!1),$=(0,c.useRef)(!1),V=(0,c.useRef)(null),W=(0,k.useAppSelector)(I.AppSelectors.selectUser),q=(0,k.useAppSelector)(e=>e.app),J=(0,k.useAppSelector)(e=>e.session),K=(0,k.useAppSelector)(v.AccountSelectors.selectLaunch),X=(0,k.useAppSelector)(I.AppSelectors.selectReadMatchingIds),Z=(0,k.useAppSelector)(e=>e.app.draftMessages),ee=(0,k.useAppSelector)(e=>e.app.dialog),te=(0,k.useAppSelector)(e=>e.message.matchingForceUpdate),se=Array.isArray(l.tab)?l.tab[0]:l.tab,[ae,ne]=(0,c.useState)(!1),[re,ie]=(0,c.useState)(0),ce=(0,c.useRef)(!1),oe=(0,j.useGetMessageMatchingInfiniteQuery)(j.MESSAGE_MATCHING_QUERY_ARG,{skip:!F}),[le,ue]=(0,j.useLazyGetLatestMessageMatchingQuery)(),ge=oe.data,de=oe.isLoading||oe.isFetching,fe=de&&!oe.isFetchingNextPage,he=oe.error,pe=ue.isFetching;(0,c.useEffect)(()=>{if(F&&"undefined"!=typeof window)return"1"===se?(Q((0,L.updateSelectedMatchingTabIndex)(1)),void e.replace("/(private)/(tabs)/(matching)/messaging")):void("0"===se&&(Q((0,L.updateSelectedMatchingTabIndex)(0)),e.replace("/(private)/(tabs)/(matching)/matching")))},[Q,F,e,se]);const me=(0,c.useMemo)(()=>(0,j.getUniqueMessageListItems)(ge?.pages),[ge?.pages]),be=(0,c.useMemo)(()=>w(me,!1),[me]),Ce=ge?.pages?.[0]?.count||0,Me=F&&G,ye=(0,c.useCallback)(()=>"MatchingTab",[]),xe=(0,c.useCallback)((e,t)=>{const s=be[t]||O(be,t,D(void 0,!1));return Object.assign({},s,{offset:s.offset+re})},[be,re]),Ee=(0,c.useCallback)(e=>{const t=e.nativeEvent.layout.height;ie(e=>e===t?e:t)},[]),Se=(0,c.useCallback)(()=>{z.current<=0||(V.current=z.current)},[]),Ae=(0,c.useCallback)(()=>{const e=V.current;!e||e<=0||(V.current=null,z.current=e,B.current?.scrollToOffset({offset:e,animated:!1}))},[]),ke=(0,c.useCallback)(()=>{z.current=0,B.current?.scrollToOffset({offset:0,animated:!1})},[]);(0,A.useMaterialTopTabPress)(ke);const ve=(0,c.useCallback)(()=>{e.push("my_profile")},[e]),Ie=(0,c.useCallback)(()=>{e.push("/(private)/(purchase)/purchase_subscription")},[e]),Te=(0,c.useCallback)(()=>{e.push("/(private)/verification")},[e]),je=(0,c.useCallback)(t=>{_.Utils.onCampaignBannerPress(e,t,q)},[e,q]),Pe=(0,c.useCallback)(e=>{if("MatchingNoUser"===e)ve()},[ve]),Ue=(0,c.useCallback)((t,s,n)=>{const c=t.matching?.id||0,o=t.matching_user?.identifier||t.target_user?.user_identifier||"";e.push(`/(private)/message/${c}/${o}`),Q((0,T.updateReadMatchingIds)({id:t.matching.id})),Q((0,L.updateScrollTo)({screenName:ye(),position:z.current}))},[e,Q,ye]),Le=(0,c.useCallback)(()=>{!Me||de||oe.isUninitialized||(Q((0,P.resetMessageMatchingForceUpdate)()),Se(),oe.refetch({refetchCachedPages:!1}))},[Q,oe,Me,de,Se]),Re=(0,c.useCallback)(async()=>
3{if(ge?.pages?.length){Q((0,P.resetMessageMatchingForceUpdate)());try{const e=await le(j.MESSAGE_MATCHING_QUERY_ARG,!1).unwrap(),t=Array.from((0,j.getMessageListIds)([e]));Se(),Q(j.messageApi.util.updateQueryData("getMessageMatching",j.MESSAGE_MATCHING_QUERY_ARG,t=>{(0,j.replaceMessageListFirstPage)(t,e)})),t.length>0&&Q(j.messageApi.util.updateQueryData("getMessageMessaging",j.MESSAGE_MESSAGING_QUERY_ARG,e=>{(0,j.removeMessageListItemsByIds)(e,t)}))}catch{}}},[Q,le,ge?.pages,Se]),Fe=(0,c.useCallback)(e=>{const t=ge?.pages?.[ge.pages.length-1]?.next;!Me||oe.isUninitialized||de||oe.isFetchingNextPage||$.current||he||!t||e.distanceFromEnd<0||($.current=!0,oe.fetchNextPage())},[oe,Me,ge,he,de]),Ge=(0,c.useCallback)(e=>{z.current=e.nativeEvent.contentOffset.y},[]),Ne=(0,c.useCallback)(()=>{ne(!1),setTimeout(()=>{Q((0,T.showMatchingLeadDate)(_.Utils.getToday()))},100)},[Q]),De=(0,c.useCallback)(()=>{const e=Ce>0?`${Ce}\u4eba\u306e\u304a\u76f8\u624b\u3068\u30de\u30c3\u30c1\u30f3\u30b0\u3057\u3066\u3044\u307e\u3059`:"";if(0===me.length)return(0,R.jsx)(f.default,{});let t;const s=_.Utils.getCampaignTopBanner(K,W);return!_.Utils.isPaymentUser(W)&&s&&s.additional_image2&&["purchase","first_matching","comeback","coupon"].includes(s.banner_type)&&(t=(0,R.jsx)(E.ListItemSearchHeader,{banner:s,onTopBannerPress:()=>je(s)})),(0,R.jsxs)(f.default,{onLayout:Ee,children:[t,(0,R.jsx)(f.default,{style:{flex:1,flexDirection:"row",alignSelf:"center",margin:12},children:(0,R.jsx)(u.default,{style:{fontSize:12,color:h.Colors.light.grey0},children:e})})]})},[me.length,Ce,K,W,Ee,je]),we=(0,c.useCallback)(()=>{const e="MatchingNoUser";return de?(0,R.jsx)(f.default,{}):ge?(0,R.jsx)(M.Empty,{type:e,onPress:()=>Pe(e)}):(0,R.jsx)(M.Empty,{type:"ServerError",onPress:Le})},[de,ge,Pe,Le]),Oe=(0,c.useCallback)(()=>oe.isFetchingNextPage?(0,R.jsx)(f.default,{style:Y.footerLoader,children:(0,R.jsx)(p.ActivityIndicator,{size:"large"})}):null,[oe.isFetchingNextPage]),Qe=(0,c.useCallback)(({leadingItem:e,trailingItem:t})=>
3N(e,t)?(0,R.jsx)(f.default,{style:Y.divider}):null,[]),Ye=(0,c.useCallback)(({item:e,index:t})=>{const s=e.matching.id,n=_.Utils.hasDraftMessage(s,Z);return(0,R.jsx)(x.ListItemMatching,{item:e,readMatchingIds:X,hasDraftMessage:n,showDate:!1,session:J,user:W,onPress:()=>Ue(e,t,W)})},[X,Z,J,W,Ue]);(0,c.useEffect)(()=>{oe.isFetchingNextPage||($.current=!1)},[oe.isFetchingNextPage]),(0,c.useLayoutEffect)(()=>{de||Ae()},[ge?.pages,de,Ae]),(0,c.useEffect)(()=>{ce.current||!ge&&!he||(ce.current=!0)},[ge,he]),(0,c.useEffect)(()=>{J.scrollTo&&J.scrollTo.screenName===ye()&&J.scrollTo.position>0&&B.current?.scrollToOffset({offset:J.scrollTo.position,animated:!1})},[ye,J.scrollTo]),(0,c.useEffect)(()=>()=>{Q((0,L.updateScrollTo)({screenName:ye(),position:z.current}))},[Q,ye]),(0,c.useEffect)(()=>{H.current&&!Me&&Q((0,U.clearBadge)(S.AppConfig.badge.new_matching)),H.current=Me},[Q,Me]),(0,c.useEffect)(()=>()=>{H.current&&Q((0,U.clearBadge)(S.AppConfig.badge.new_matching))},[Q]),(0,c.useEffect)(()=>{Me&&te&&(ge?ce.current&&!de&&!pe&&ge?.pages?.length&&Re():Q((0,P.resetMessageMatchingForceUpdate)()))},[Q,Me,pe,ge,de,te,Re]),(0,c.useEffect)(()=>{if(!de&&ge&&me.length>0){_.Utils.getToday()!==ee?.matchingLeadDate&&Me&&ne(!0)}},[ge,de,me.length,ee,Me]),(0,c.useEffect)(()=>{he&&me.length>0&&C.Toast.error(he)},[he,me.length]);const Be=!ce.current&&de&&!ge&&!he,ze=Be||me.length?void 0:{height:"100%"};return(0,R.jsxs)(f.default,{style:Y.container,children:[(0,R.jsx)(o.default,{ref:B,onScroll:Ge,scrollEventThrottle:16,getItemLayout:xe,data:me,style:{backgroundColor:h.Colors.light.white},keyExtractor:e=>e.matching.id+"",contentContainerStyle:ze,ListHeaderComponent:De,ListEmptyComponent:we,ListFooterComponent:Oe,renderItem:Ye,ItemSeparatorComponent:Qe,refreshControl:(0,R.jsx)(b.RefreshControl,{refreshing:fe,onRefresh:Le}),onEndReachedThreshold:.5,onEndReached:Fe}),Be?(0,R.jsx)(f.default,{style:Y.loadingContainer,children:(0,R.jsx)(p.ActivityIndicator,{size:"large"})}):null,(0,R.jsx)(y.DialogMessage,{show:ae&&Me,user:W,count:Ce,data:me,campaignBanners:K?.data?.campaign_banners,type:"matching",onPurchasePlanPress:()=>{Ne(),Ie()},onAgeVerificationPress:()=>{Ne(),Te()},onLaterPress:Ne})]})}const Y=l.default.create({container:{flex:1,backgroundColor:h.Colors.light.backgroundEmpty},divider:{height:l.default.hairlineWidth,backgroundColor:h.Colors.light.listDivider},footerLoader:{paddingVertical:20,alignItems:"center"},loadingContainer:Object.assign({},l.default.absoluteFillObject,{justifyContent:"center",alignItems:"center",backgroundColor:h.Colors.light.white})})},697,[762,16,785,12,248,121,143,130,250,763,773,774,797,775,809,810,811,800,779,770,793,780,781,812,813,814,801,771,6]);
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.