Files
004_comission/_utils/_comment_backup/louis coding's Reviews on Carousell Hong Kong_files/090d6e4211cb1813.min.js.download
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

6 lines
11 KiB
Plaintext

"use strict";
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78012893-9579-51d2-a672-b29b3633a788")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[12],{797:(e,t,i)=>{i.d(t,{bs:()=>Z,Tn:()=>w,YQ:()=>_,G8:()=>I,nw:()=>q,Ig:()=>S,iI:()=>b,j1:()=>Y,G$:()=>O,Lc:()=>g,hw:()=>f,bJ:()=>G,t6:()=>A,nb:()=>L,D7:()=>re,qJ:()=>ae,ak:()=>ce,EK:()=>ne,CJ:()=>oe,hC:()=>de,uQ:()=>ie,UP:()=>le,fA:()=>se,qC:()=>ue});var o=i(6),n=i(4);const l="LocationFilterSearch";var r=i(16),c=i(11),a=i(12),s=i(118),u=i(24),d=i(5),y=i(7);const p="all",F="recent_search_locations",h="recent_search_locations_property",g=(0,o.PH)(`${l}/locationFilterSearchGetPageInfoRequest`),S=(0,o.PH)(`${l}/locationFilterSearchGetBulkOptionsRequest`),f=(0,o.PH)(`${l}/locationFilterSearchGetQueryResultsRequest`),G=(0,o.PH)(`${l}/locationFilterSearchGetRecentLocationsRequest`),P=(0,o.PH)(`${l}/locationFilterSearchGetRecentLocationsFailure`),_=(0,o.PH)(`${l}/locationFilterSearchAddRecentLocationsRequest`),m=(0,o.PH)(`${l}/locationFilterSearchAddRecentLocationsFailure`),O=(0,o.PH)(`${l}/locationFilterSearchGetListRequest`),R=(0,o.oM)({initialState:{bulkOptions:null,bulkOptionsGetPending:!1,cachedOptions:{},listByAdm:{},listByAdmGetPending:!1,locationFilterOptionsToApply:null,locationFiltersGetError:null,locationFiltersGetMode:null,locationFiltersGetPending:!1,pageInfo:null,pageInfoGetPending:!1,queryResults:null,queryResultsGetPending:!1,recentLocations:null},name:l,reducers:{locationFilterSearchAddRecentLocationsSuccess(e,t){const{recentLocations:i}=t.payload;e.recentLocations=i},locationFilterSearchApply(e,t){const{options:i}=t.payload;e.locationFilterOptionsToApply=i},locationFilterSearchClearBulkOptions(e){e.bulkOptions=null},locationFilterSearchGetBulkOptionsFailure(e){e.bulkOptions=null,e.bulkOptionsGetPending=!1},locationFilterSearchGetBulkOptionsPending(e){e.bulkOptions=null,e.bulkOptionsGetPending=!0},locationFilterSearchGetBulkOptionsSuccess(e,t){const{bulkOptions:i}=t.payload;e.bulkOptions=i,e.bulkOptionsGetPending=!1},locationFilterSearchGetFiltersFailure(e,t){const{error:i}=t.payload;e.locationFiltersGetError=i,e.locationFiltersGetPending=!1},locationFilterSearchGetFiltersPending(e){e.locationFilterOptionsToApply=null,e.locationFiltersGetError=null,e.locationFiltersGetPending=!0},locationFilterSearchGetFiltersRequest(e,t){const{mode:i}=t.payload;e.locationFiltersGetMode=i},locationFilterSearchGetFiltersReset(e){e.locationFilterOptionsToApply=null,e.locationFiltersGetError=null,e.locationFiltersGetPending=!1},locationFilterSearchGetFiltersSuccess(e){e.locationFiltersGetPending=!1},locationFilterSearchGetListFailure(e){e.listByAdmGetPending=!1},locationFilterSearchGetListPending(e){e.listByAdmGetPending=!0},locationFilterSearchGetListSuccess(e,t){const{admIDs:i,ccID:o,locations:n,nextOffset:l}=t.payload,r=ye(i,o),c=e.listByAdm[r]?.locations||[];e.listByAdm[r]={locations:[...c,...n],nextOffset:l},e.listByAdmGetPending=!1},locationFilterSearchGetPageInfoFailure(e){e.pageInfo=null,e.pageInfoGetPending=!1},locationFilterSearchGetPageInfoPending(e){e.pageInfo=null,e.pageInfoGetPending=!0},locationFilterSearchGetPageInfoSuccess(e,t){const{pageInfo:i}=t.payload;e.pageInfo=i,e.pageInfoGetPending=!1},locationFilterSearchGetQueryResultsFailure(e){e.queryResults=null,e.queryResultsGetPending=!1},locationFilterSearchGetQueryResultsPending(e){e.queryResultsGetPending=!0},locationFilterSearchGetQueryResultsSuccess(e,t){const{queryResults:i}=t.payload;e.queryResults=i,e.queryResultsGetPending=!1},locationFilterSearchGetRecentLocationsSuccess(e,t){const{recentLocations:i}=t.payload;e.recentLocations=i},locationFilterSearchSetBulkOptions(e,t){const{bulkOptions:i}=t.payload;e.bulkOptions=i,e.bulkOptionsGetPending=!1},locationFilterSearchUpdateCachedOptions(e,t){const{options:i}=t.payload;e.cachedOptions={...e.cachedOptions,...i.reduce(((e,t)=>({...e,[t.id]:t})),{})}}}}),{locationFilterSearchApply:I,locationFilterSearchUpdateCachedOptions:L,locationFilterSearchGetBulkOptionsPending:k,locationFilterSearchGetBulkOptionsSuccess:E,locationFilterSearchSetBulkOptions:A,locationFilterSearchGetBulkOptionsFailure:z,locationFilterSearchClearBulkOptions:q,locationFilterSearchGetFiltersRequest:b,locationFilterSearchGetFiltersPending:B,locationFilterSearchGetFiltersSuccess:D,locationFilterSearchGetFiltersFailure:$,locationFilterSearchGetFiltersReset:Y,locationFilterSearchGetPageInfoPending:H,locationFilterSearchGetPageInfoSuccess:v,locationFilterSearchGetPageInfoFailure:C,locationFilterSearchGetQueryResultsPending:x,locationFilterSearchGetQueryResultsSuccess:U,locationFilterSearchGetQueryResultsFailure:j,locationFilterSearchAddRecentLocationsSuccess:K,locationFilterSearchGetRecentLocationsSuccess:T,locationFilterSearchGetListSuccess:W,locationFilterSearchGetListPending:Q,locationFilterSearchGetListFailure:M}=R.actions;function*Z(e){const{payload:{ccID:t,locationIDs:i}}=e,o=yield(0,n.Ys)(ce),l=i.filter((e=>!o[e]));if(0===l.length){const e=i.map((e=>o[e]));return yield(0,n.gz)(E({bulkOptions:e})),e}yield(0,n.gz)(k());const{country_id:r}=yield(0,n.Ys)(u.S$);try{const{data:{locations:e}}=yield(0,n.RE)(c.U2,"location-filter-search",{path:"/1.0/filters/bulk",query:{country_id:r,...t?{category_id:t}:null,location_ids:l.join(",")}});yield(0,n.gz)(L(e));const a=[...i.map((e=>o[e])).filter(Boolean),...e];return yield(0,n.gz)(E({bulkOptions:a})),a}catch(e){return yield(0,n.gz)(z()),null}}function*N(e){const{payload:{ccID:t,lat:i,lon:o,marketplaceId:l,mode:r}}=e;yield(0,n.gz)(B());const{country_id:a}=yield(0,n.Ys)(u.S$);try{const{data:{locations:e}}=yield(0,n.RE)(c.U2,"location-filter-search",{path:"/1.0/filters",query:{category_id:t,country_id:a,lat:i,lon:o,marketplace_id:l}});if(i&&o&&e&&0===e.length)yield(0,n.gz)($({error:{message:"UserNotLocatedInMarketplace",type:"SimpleError"}}));else{if(e){const t="current_location_search"===r?"current":"user_marketplace_location_search"===r?"profile":null,i=e.map((e=>({...e,source:t||void 0})));yield(0,n.gz)(L({options:i}))}yield(0,n.gz)(D()),yield(0,n.gz)(I({options:e||[]}))}}catch(e){yield(0,n.gz)($({error:{message:"GetFiltersError",type:"SimpleError"}}))}}function*w(e){const{payload:{ccID:t}}=e;yield(0,n.gz)(H());const{country_id:i}=yield(0,n.Ys)(u.S$);try{const{data:e}=yield(0,n.RE)(c.U2,"location-filter-search",{path:"/1.0/filters/page-info",query:{country_id:i,...t?{category_id:t}:null}});yield(0,n.gz)(v({pageInfo:e}))}catch(e){yield(0,n.gz)(C())}}function*J(e){const{payload:{admIDs:t,ccID:i,query:o}}=e;yield(0,n.gz)(x());const{country_id:l}=yield(0,n.Ys)(u.S$);try{const{data:{groups:e}}=yield(0,n.RE)(c.U2,"location-filter-search",{path:"/1.0/filters/search",query:{adm_ids:t.join(","),country_id:l,...i?{category_id:i}:null,query:o}});yield(0,n.gz)(U({queryResults:e}))}catch(e){yield(0,n.gz)(j())}}function*X(e){if(!(yield(0,n.Ys)(s.Ej)))return void(yield(0,n.gz)(P()));const t=yield(0,n.Ys)(r.XM),i=e.payload.isPropertyCollection?h:F;try{let e;yield(0,n.RE)(V),e=t?yield(0,n.RE)(s.iW,i,`${t.id}`):yield(0,n.RE)(s.iW,i),yield(0,n.gz)(T({recentLocations:e}))}catch(e){yield(0,n.gz)(P())}}function*V(){const e=yield(0,n.Ys)(r.XM),t=yield(0,n.Ys)((e=>(0,a.Oe)(e,{experimentId:"bx-5087-location-filter-exclude-delivery"})));let i;if(i=e?yield(0,n.RE)(s.iW,"recent_search_locations_prev_exp_segment",`${e.id}`):yield(0,n.RE)(s.iW,"recent_search_locations_prev_exp_segment"),i||(i="control"),i!==t){const i=e?{storagePolicy:"authOnly",userId:`${e.id}`}:{storagePolicy:"anon"};yield(0,n.RE)(s.W4,"recent_search_locations_prev_exp_segment",t,i),yield(0,n.RE)(s.W4,F,null,i),yield(0,n.RE)(s.W4,h,null,i)}}function*ee(e){const{payload:{isPropertyCollection:t=!1,locationOptions:i}}=e;if(!i||!i.length)return void(yield(0,n.gz)(m()));if(!(yield(0,n.Ys)(s.Ej)))return void(yield(0,n.gz)(m()));const o=yield(0,n.Ys)(r.XM),l=t?h:F;try{let e,t,r;if(o?(e=yield(0,n.RE)(s.iW,l,`${o.id}`),t={storagePolicy:"authOnly",userId:`${o.id}`}):(e=yield(0,n.RE)(s.iW,l),t={storagePolicy:"anon"}),[...i].sort(((e,t)=>e.id-t.id)),e){const t=i.map((e=>e.id)).join(",");r=[i,...e.filter((e=>{const i=e.map((e=>e.id)).join(",");return t!==i}))]}else r=[i];r.length>3&&r.pop(),yield(0,n.RE)(s.W4,l,r,t),yield(0,n.gz)(K({recentLocations:r}))}catch(e){yield(0,n.gz)(m())}}function*te(e){const{payload:{admIDs:t,ccID:i}}=e,{country_id:o}=yield(0,n.Ys)(u.S$),l=yield(0,n.Ys)((e=>function(e,t){const{admIDs:i,ccID:o}=t,n=e.LocationFilterSearch.listByAdm[ye(i,o)];return n?n.nextOffset:0}(e,{admIDs:t,ccID:i})));if(!(l<0)){yield(0,n.gz)(Q());try{const{data:e}=yield(0,n.RE)(c.U2,"location-filter-search",{path:"/1.0/filters/list",query:{adm_ids:t.join(","),country_id:o,...i?{category_id:i}:null,offset:l}}),{locations:r,offset:a}=e;yield(0,n.gz)(W({admIDs:t,ccID:i,locations:r,nextOffset:a}))}catch(e){yield(0,n.gz)(M())}}}function ie(e){return e.LocationFilterSearch.locationFilterOptionsToApply}function oe(e,t){return t.mode===e.LocationFilterSearch.locationFiltersGetMode&&e.LocationFilterSearch.locationFiltersGetPending}function ne(e){return e.LocationFilterSearch.locationFiltersGetError}function le(e){return e.LocationFilterSearch.pageInfo}function re(e){return e.LocationFilterSearch.bulkOptions}function ce(e){return e.LocationFilterSearch.cachedOptions}function ae(e){return e.LocationFilterSearch.bulkOptionsGetPending}function se(e){return e.LocationFilterSearch.queryResults}function ue(e){return e.LocationFilterSearch.recentLocations}function de(e,t){const{admIDs:i,ccID:o}=t,n=e.LocationFilterSearch.listByAdm[ye(i,o)];return n?n.locations:null}function ye(e,t){return`${e.join(",")}_${t||p}`}R.reducer,d.Z.register(l,R.reducer),y.Z.register(l,(function*(){yield(0,n.Fm)(b.type,N),yield(0,n.Fm)(g.type,w),yield(0,n.Fm)(S.type,Z),yield(0,n.Fm)(f.type,J),yield(0,n.Fm)(G.type,X),yield(0,n.Fm)(_.type,ee),yield(0,n.Fm)(O.type,te)}))},2424:(e,t,i)=>{i.d(t,{BK:()=>c,By:()=>r,PA:()=>a,Rv:()=>s,Yo:()=>l,gp:()=>u,ht:()=>d,mT:()=>n});var o=i(18);function n(e){return{fieldName:"locations",orFilter:{filters:e.reduce(((e,t)=>[...e,...t.filters]),[]).map((({key:e,values:t})=>({fieldName:e,idsOrKeywords:{value:t.map((e=>`${e}`))}})))}}}function l(e){return{location_ids:e.map((e=>e.id)).join(",")}}function r(e){return{locationIds:e.map((e=>e.id))}}function c(e){return{HK:(0,o.ZP)("All of Hong Kong"),PH:(0,o.ZP)("All of the Philippines"),SG:(0,o.ZP)("All of Singapore")}[e]}function a(e){return{HK:(0,o.ZP)("Oops, it seems that your current location is not in Hong Kong."),PH:(0,o.ZP)("Oops, it seems that your current location is not in the Philippines."),SG:(0,o.ZP)("Oops, it seems that your current location is not in Singapore.")}[e]}function s(e){return e.replace(/_location_search$/,"")}function u(e){return!!e&&[73,377,1985,1986,1987,1988,2564,376,1989,1990,1991,1992,1993,378,2041,125,589,590,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2021,2741,2742,2743,2744,2745,2746,2747].indexOf(e)>-1}function d(e,t,i){if(!i)return!0;const o={HK:{GC:{area:!0,district:!0,mtr:!0},PROPERTY:{area:!0,district:!0,mtr:!0,sub_district:!0}},SG:{GC:{mrt:!0,planning_area:!0,sub_zone:!0},PROPERTY:{district:!0,estate:!0,mrt:!0,planning_area:!0,sub_zone:!0}}};if(!o[e])return!0;const n=u(i)?"PROPERTY":"GC";return!!o[e][n][t]}}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/872d9a325b1c9576132523bfac3e739f6f67875f/090d6e4211cb1813.min.js.map
//# debugId=78012893-9579-51d2-a672-b29b3633a788