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

6 lines
44 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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]="4b318a17-aa4a-530c-8daa-5a1b183d28e9")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[39],{987:(e,i,t)=>{t.d(i,{Cq:()=>l,GU:()=>n,X_:()=>r,aQ:()=>o});const n=1080,r=1080,l=320,o=320},739:(e,i,t)=>{t.d(i,{Mo:()=>P,gR:()=>C,p2:()=>v,W3:()=>z,Xw:()=>L,xj:()=>h,x7:()=>V,P8:()=>M,VL:()=>U,F9:()=>D,KD:()=>q});var n=t(6),r=t(4),l=t(75),o=t(16),a=t(5),s=t(15),d=t(7),c=t(33),g=t(70),u=t(759);const y="CoinPricingModal";var p=t(767),f=t(761),m=t(727),_=t(41),S=t(735);const P=(0,n.PH)(`${y}/coinPricingModalInit`),h=(0,n.PH)(`${y}/coinPricingV2ModalInit`),I=(0,n.oM)({initialState:{purchaseContext:void 0,purchaseId:null,selectedCoinPricingItem:null,selectedCoinPricingItemV2:null,trackingProductId:null,trackingSource:"profile",trackingUuid:null},name:y,reducers:{coinPricingModalSetCoinPricingItem(e,i){const{coinPricingItem:t}=i.payload;e.selectedCoinPricingItem=t},coinPricingModalSetCoinPricingItemV2(e,i){const{context:t,coinPricingItemV2:n}=i.payload;e.selectedCoinPricingItemV2=n,e.purchaseContext=t},coinPricingModalSetPurchaseId(e,i){const{purchaseId:t}=i.payload;e.purchaseId=t},coinPricingModalSetTrackingProductId(e,i){const{trackingProductId:t}=i.payload;e.trackingProductId=t},coinPricingModalSetTrackingSource(e,i){const{trackingSource:t}=i.payload;e.trackingSource=t},coinPricingModalSetTrackingUuid(e,i){const{trackingUuid:t}=i.payload;e.trackingUuid=t}}}),{coinPricingModalSetCoinPricingItem:C,coinPricingModalSetCoinPricingItemV2:v,coinPricingModalSetPurchaseId:b,coinPricingModalSetTrackingProductId:E,coinPricingModalSetTrackingSource:z,coinPricingModalSetTrackingUuid:L}=I.actions;function*F(){let e=yield(0,r.Ys)(o.XM);if(!e){if(!(yield(0,r.RE)(o.cM)))return void(yield(0,r.gz)((0,s.J5)("/")));e=yield(0,r.Ys)(o.XM)}if(e?.profile){const i=e.profile.marketplace.country.code.toLowerCase()||"sg",t=l.Dw[i].currencyCode||"SGD",n=l.Dw[i].walletType||"Stripe";yield(0,r.RE)(p.PM,(0,p.Ud)({currency:t,walletType:n}));let o=null;const a=["list_success","sell_form","profile_mark_active","profile_extend"];let s=yield(0,r.Ys)(G),d=yield(0,r.Ys)(q);const g=yield(0,r.Ys)(T);d||(o=yield(0,r.Ys)(S.P_),s="shoutout"===(yield(0,r.Ys)(G))?"shoutout":"promote",d=yield(0,r.Ys)(S.J6),yield(0,r.gz)(L({trackingUuid:d})));const{balance:u}=yield(0,r.Ys)(m.Ws);yield(0,r.gz)((0,c.Vh)({name:"coins_bundle_page_viewed",properties:{ad_type:a.includes(s)?"listing-fee":o,current_coin_balance:u,source:s,uuid:d,...a.includes(s)&&g?{product_id:g}:void 0},type:"screen"})),yield(0,r.gz)((0,_.S6)([{eAction:"coins_page_viewed",event:"sellergetCoins",pageType:"coinspage"}])),"shoutout"===s&&(yield(0,r.gz)(z({trackingSource:"profile"})))}}function*R(){yield(0,r.RE)(f.PM);let e=null;const i=["list_success","sell_form","profile_mark_active","profile_extend"];let t=yield(0,r.Ys)(G);const n=yield(0,r.Ys)(u.i4);let l=yield(0,r.Ys)(q);const o=yield(0,r.Ys)(T);"chat_quota_info_page"===t&&n&&(l=n),l||(e=yield(0,r.Ys)(S.P_),t="shoutout"===(yield(0,r.Ys)(G))?"shoutout":"promote",l=yield(0,r.Ys)(S.J6),yield(0,r.gz)(L({trackingUuid:l})));const{balance:a}=yield(0,r.Ys)(m.Ws);yield(0,r.gz)((0,c.Vh)({name:"coins_bundle_page_viewed",properties:{ad_type:i.includes(t)?"listing-fee":e,current_coin_balance:a,source:t,uuid:l,...i.includes(t)&&o?{product_id:o}:void 0},type:"screen"})),"shoutout"===t&&(yield(0,r.gz)(z({trackingSource:"profile"})))}function*w(e){const{coinPricingItem:i,index:t}=e.payload,n=(0,g.z)(8);yield(0,r.gz)(b({purchaseId:n}));const l=yield(0,r.Ys)(q);yield(0,r.gz)((0,c.Vh)({name:"coins_bundle_tapped",properties:{button_type:"purchase",coin_bundle_id:i.extra.coinAmount,coin_bundle_index:t,displayed_price:i.unitPrice,purchase_id:n,uuid:l},type:"action"}))}function*k(e){const{coinPricingItemV2:i,index:t}=e.payload,n=(0,g.z)(8);yield(0,r.gz)(b({purchaseId:n}));const l=yield(0,r.Ys)(q),o=parseInt(i?.title?.template?i.title.template.replace(" {{ICON_COIN}}",""):"0",10);yield(0,r.gz)((0,c.Vh)({name:"coins_bundle_tapped",properties:{button_type:"purchase",coin_bundle_id:o,coin_bundle_index:t,displayed_price:i?.purchaseButton?.text?.template??"",purchase_id:n,uuid:l},type:"action"}))}function M(e){return e[y].purchaseId}function U(e){return e[y].selectedCoinPricingItem}function D(e){return e[y].selectedCoinPricingItemV2}function T(e){return e[y].trackingProductId}function G(e){return e[y].trackingSource}function q(e){return e[y].trackingUuid}function V(e){return e[y].purchaseContext}I.reducer,a.Z.register(y,I.reducer),d.Z.register(y,(function*(){yield(0,r.Fm)(h.type,R),yield(0,r.Fm)(P.type,F),yield(0,r.Fm)(C.type,w),yield(0,r.Fm)(v.type,k)}))},735:(e,i,t)=>{t.d(i,{Zj:()=>u,Bn:()=>y,vq:()=>p,UP:()=>_,D0:()=>S,P_:()=>P,gC:()=>h,J6:()=>I,oh:()=>f});var n=t(6),r=t(4);const l="ListingPromotionsList";var o=t(739),a=t(727),s=t(5),d=t(7),c=t(33);const g=(0,n.oM)({initialState:{listingCard:null,listingId:null,sellerToolsTrackingAdType:null,sellerToolsTrackingSource:null,sellerToolsTrackingUuid:null},name:l,reducers:{listingIdSet(e,i){const{listingId:t}=i.payload;e.listingId=t},listingPromotionsListInit(e,i){const{sellerToolsTrackingSource:t,sellerToolsTrackingUuid:n}=i.payload;"listingId"in i.payload?(e.listingId=i.payload.listingId,e.listingCard=void 0):"listingCard"in i.payload&&(e.listingId=`${i.payload.listingCard.listingID}`,e.listingCard=i.payload.listingCard),e.sellerToolsTrackingSource=t,e.sellerToolsTrackingUuid=n},listingPromotionsListSetAdType(e,i){e.sellerToolsTrackingAdType=i.payload.adType},sellerToolsTrackingUuidSet(e,i){e.sellerToolsTrackingUuid=i.payload.sellerToolsTrackingUuid}}}),{listingIdSet:u,listingPromotionsListInit:y,listingPromotionsListSetAdType:p,sellerToolsTrackingUuidSet:f}=g.actions;function*m(e){const{sellerToolsTrackingSource:i,sellerToolsTrackingUuid:t}=e.payload;let n="";"listingId"in e.payload?n=e.payload.listingId:"listingCard"in e.payload&&(n=`${e.payload.listingCard.listingID}`),yield(0,r.gz)((0,o.Xw)({trackingUuid:null})),yield(0,r.RE)(a.F6);const l=yield(0,r.Ys)((e=>(0,a.Ws)(e)?.balance??null));"listing_insight"!==i&&(yield(0,r.gz)((0,c.Vh)({name:"promote_page_viewed",properties:{current_coin_balance:l,product_id:n,source:i,uuid:t},type:"screen"})))}function _(e){return e[l].listingCard}function S(e){return e[l].listingId}function P(e){return e[l].sellerToolsTrackingAdType}function h(e){return e[l].sellerToolsTrackingSource}function I(e){return e[l].sellerToolsTrackingUuid}g.reducer,s.Z.register(l,g.reducer),d.Z.register(l,(function*(){yield(0,r.Fm)(y.type,m)}))},829:(e,i,t)=>{t.d(i,{Gx:()=>l,Kq:()=>o,WD:()=>r});var n=t(18);const r=102,l="https://support.carousell.com/hc/en-us/articles/360038048973--Singapore-Why-do-I-have-to-verify-my-identity-",o=[{image:"https://mweb-cdn.karousell.com/build/sign-in-via-singpass-1ef74fee57.svg",text:n.ZP`1. Log in via Singpass`},{image:"https://mweb-cdn.karousell.com/build/verify-personal-data-fcd1ca2901.svg",text:n.ZP`2. Verify your Personal Data`},{image:"https://mweb-cdn.karousell.com/build/identified-carouseller-d638b8d681.svg",text:n.ZP`3. Identified Carouseller`}]},794:(e,i,t)=>{t.d(i,{CF:()=>F,HU:()=>w,JK:()=>Y,Jb:()=>O,Mv:()=>z,SD:()=>R,Th:()=>G,U0:()=>A,WN:()=>D,hv:()=>T,jH:()=>q,jU:()=>k,kP:()=>$,kQ:()=>b,mC:()=>v,pB:()=>B,pT:()=>x,pu:()=>M,rZ:()=>V,z9:()=>U});var n=t(6),r=t(4),l=t(16),o=t(11),a=t(12),s=t(21),d=t(39),c=t(5),g=t(102),u=t(18),y=t(103),p=t(73),f=t(829),m=t(176),_=t(773),S=t(108),P=t(789);const h=(0,n.oM)({initialState:{identityVerificationStatus:null,markAsActiveVerificationFlags:null,mobileVerificationStatus:null,sgIdAuthUrl:null,sgIdDetails:null},name:P.q5,reducers:{clearRedirectionDataForIdentityVerification(e){e.redirectionData=void 0},clearSgIdDetails(e){e.sgIdDetails=null},setIdentityVerificationStatus(e,i){e.identityVerificationStatus=i.payload},setListingIdForMarkAsActiveMobileVerify(e,i){e.listingIdForMarkAsActiveMobileVerify=i.payload},setMarkAsActiveVerificationFlags(e,i){e.markAsActiveVerificationFlags=i.payload},setMobileVerificationStatus(e,i){e.mobileVerificationStatus=i.payload},setRedirectionDataForIdentityVerification(e,i){e.redirectionData=i.payload},setSgIdAuthUrl(e,i){e.sgIdAuthUrl=i.payload},setSgIdDetails(e,i){e.sgIdDetails=i.payload},setShowBackButtonButtonInMobileVerification(e,i){e.showBackButtonInMobileVerification=i.payload}}}),{reducer:I,actions:{setSgIdAuthUrl:C,setIdentityVerificationStatus:v,setMobileVerificationStatus:b,setSgIdDetails:E,setRedirectionDataForIdentityVerification:z,clearRedirectionDataForIdentityVerification:L,clearSgIdDetails:F,setMarkAsActiveVerificationFlags:R,setListingIdForMarkAsActiveMobileVerify:w,setShowBackButtonButtonInMobileVerification:k}}=h;function*M(e){const i=yield(0,r.Ys)(s.l$);yield(0,r.gz)(e.pending());try{const{data:{url:i}}=yield(0,r.RE)(o.BP,"user-settings",S.x.GET,{path:"/2.0/id-verification/get-authorise-url/"});yield(0,r.gz)(C(i)),yield(0,r.gz)(e.success())}catch(t){yield(0,r.gz)(e.error(t)),yield(0,r.gz)((0,m.E)({message:i(u.ZP`Something went wrong. Please try again`)}))}}function*U(e){yield(0,r.gz)(e.pending());try{const i=yield(0,r.Ys)(O);if(i){const{form:t,errorData:n}=yield(0,r.RE)(y.S,(0,g.sb)(),{authCode:i.authCode,state:i.sessionId});if(n?.errorMessage)return void(yield(0,r.gz)(e.error({errorCode:n.errorType,usefulError:"error from getSgIdUserInfo",userError:n.errorMessage})));yield(0,r.gz)(E(t)),yield(0,r.gz)(e.success())}}catch(i){yield(0,r.gz)(e.error(null))}finally{yield(0,r.gz)(L())}}function*D(e){const i=yield(0,r.Ys)(s.l$);yield(0,r.gz)(e.pending());try{const{verified:i}=yield(0,r.RE)(y.S,(0,g.Qv)(),{});yield(0,r.gz)(e.success()),i&&(yield(0,r.gz)(v("SUCCESS")),yield(0,r.gz)((0,d.qf)()));const t=yield(0,r.Ys)(l.XM);t&&(yield(0,r.RE)(_.Ai,t.username))}catch(t){yield(0,r.gz)(e.error(t)),yield(0,r.gz)((0,m.E)({message:i(u.ZP`Something went wrong. Please try again`)}))}}function*T(e,i){const t=yield(0,r.Ys)((e=>(0,a.c6)(e,{experimentId:"sg-rental-id-verification"}))),n=yield(0,r.Ys)((e=>(0,a.c6)(e,{experimentId:"mark-as-active-mobile-verification"})));if(!t&&!n)return;const o=yield(0,r.Ys)(l.XM);if(yield(0,r.gz)(e.pending()),o)try{const{personalDetailsVerificationRequired:l,mobileRequired:o}=yield(0,r.RE)(y.S,(0,g.uS)({listing_id:i}));l&&(yield(0,r.gz)(v(l.kycRequired?"PENDING":"SUCCESS")),yield(0,r.gz)(b(l.mobileRequired?"PENDING":"SUCCESS"))),yield(0,r.gz)(R({mobileRequired:!!n&&o,personalDetailsVerificationRequired:t?l:null})),yield(0,r.gz)(e.success())}catch(i){yield(0,r.gz)(R(null)),yield(0,r.gz)(e.error(i))}}c.Z.register(h.name,I);const G=e=>e[h.name].identityVerificationStatus,q=e=>e[h.name].mobileVerificationStatus,V=e=>e[h.name].sgIdDetails,x=e=>e[h.name].sgIdAuthUrl,O=e=>e[h.name].redirectionData,A=e=>e[h.name].markAsActiveVerificationFlags,$=e=>e[h.name].listingIdForMarkAsActiveMobileVerify,B=e=>e[h.name].showBackButtonInMobileVerification,Y=(e,i)=>{const t=(0,a.c6)(e,{experimentId:"sg-rental-id-verification"}),n=(0,p.TR)(e,{collectionID:i,sort:"alphabetical"})||[];return n[0]?.id===f.WD&&t}},745:(e,i,t)=>{t.d(i,{sm:()=>g,QK:()=>u,gg:()=>f});var n=t(6),r=t(4),l=t(355);const o="ActionSheet";var a=t(39),s=t(5),d=t(7);const c=(0,n.oM)({initialState:{activeID:null},name:o,reducers:{actionSheetClose(e){e.activeID=null},actionSheetShow(e,i){e.activeID=i.payload.actionSheetID}}}),{actionSheetClose:g,actionSheetShow:u}=c.actions;function*y(){0===(yield(0,r.Ys)(a.ow))&&(yield(0,r.gz)((0,l.Kw)()))}function*p(){0===(yield(0,r.Ys)(a.ow))&&(yield(0,r.gz)((0,l.z5)()))}function f(e){return e[o].activeID}c.reducer,s.Z.register(o,c.reducer),d.Z.register(o,(function*(){yield(0,r.ib)(g.type,p),yield(0,r.ib)(u.type,y)}))},759:(e,i,t)=>{t.d(i,{Yy:()=>g,Ay:()=>u,pJ:()=>y,r8:()=>p,i4:()=>f});var n=t(6),r=t(4),l=t(102),o=t(103);const a="ChatReplyQuota";var s=t(5);const d=(0,n.oM)({initialState:{chatReplyQuota:[],refreshTime:null,trackingUuid:null},name:a,reducers:{chatReplyQuotaSetTrackingUuid(e,i){e.trackingUuid=i.payload},chatReplyQuotaSuccess(e,i){e.chatReplyQuota=i.payload.chatReplyQuota,e.refreshTime=i.payload.refreshTime}}}),{chatReplyQuotaSuccess:c,chatReplyQuotaSetTrackingUuid:g}=(d.reducer,d.actions);function*u(e){try{yield(0,r.gz)(e.pending());const i=yield(0,r.RE)(o.S,(0,l.vI)(),{}),{quotas:t,refreshTime:n}=i;yield(0,r.gz)(c({chatReplyQuota:t,refreshTime:n})),yield(0,r.gz)(e.success())}catch(i){yield(0,r.gz)(e.error(i))}}s.Z.register(a,d.reducer);const y=e=>e[a].chatReplyQuota,p=e=>e[a].refreshTime?.seconds,f=e=>e[a].trackingUuid},767:(e,i,t)=>{t.d(i,{Ud:()=>s,PM:()=>y,Gt:()=>p,Vw:()=>f});var n=t(6),r=t(4);const l="CoinPricing";var o=t(11),a=t(5);const s=(0,n.PH)(`${l}/coinPricingGetRequest`),d=(0,n.oM)({initialState:{coinPricingItems:[],coinPricingLoading:!1},name:l,reducers:{coinPricingGetFailure(e,i){e.coinPricingLoading=!1},coinPricingGetPending(e){e.coinPricingLoading=!0},coinPricingGetSuccess(e,i){const{coinPricingItems:t=[]}=i.payload;e.coinPricingItems=t,e.coinPricingLoading=!1}}}),{coinPricingGetFailure:c,coinPricingGetPending:g,coinPricingGetSuccess:u}=d.actions;function*y(e){const{currency:i,walletType:t}=e.payload;yield(0,r.gz)(g());try{const{data:e}=yield(0,r.RE)(o.v_,"wallet",{data:{currency:i,walletType:t},path:"/pricing_coin/"}),{items:n}=e;yield(0,r.gz)(u({coinPricingItems:n}))}catch(e){yield(0,r.gz)(c({err:e}))}}function p(e){return e[l].coinPricingItems}function f(e){return e[l].coinPricingLoading}d.reducer,a.Z.register(l,d.reducer)},761:(e,i,t)=>{t.d(i,{PM:()=>u,Em:()=>p,yR:()=>y});var n=t(6),r=t(4);const l="CoinPricingV2";var o=t(11),a=t(5);const s=(0,n.oM)({initialState:{coinPricingItemsV2:[],coinPricingLoadingV2:!1},name:l,reducers:{coinPricingGetFailure(e){e.coinPricingLoadingV2=!1},coinPricingGetPending(e){e.coinPricingLoadingV2=!0},coinPricingGetSuccess(e,i){e.coinPricingLoadingV2=!1,e.coinPricingItemsV2=i.payload.data}}}),{coinPricingGetFailure:d,coinPricingGetPending:c,coinPricingGetSuccess:g}=s.actions;function*u(){yield(0,r.gz)(c());try{const{data:e}=yield(0,r.RE)(o.U2,"coin-bundle",{}),{respData:{coinBundles:i}}=e;yield(0,r.gz)(g({data:i}))}catch(e){yield(0,r.gz)(d())}}function y(e){return e[l].coinPricingItemsV2}function p(e){return e[l].coinPricingLoadingV2}s.reducer,a.Z.register(l,s.reducer)},727:(e,i,t)=>{t.d(i,{F6:()=>u,Ws:()=>y,nU:()=>p});var n=t(6),r=t(4);const l="CoinWallet";var o=t(11),a=t(5);const s=(0,n.oM)({initialState:{coinWalletBalance:null,coinWalletBalanceLoading:!1},name:l,reducers:{coinWalletBalanceGetFailure(e,i){e.coinWalletBalanceLoading=!1},coinWalletBalanceGetPending(e){e.coinWalletBalanceLoading=!0},coinWalletBalanceGetSuccess(e,i){const{coinWalletBalance:t}=i.payload;e.coinWalletBalance=t,e.coinWalletBalanceLoading=!1}}}),{coinWalletBalanceGetFailure:d,coinWalletBalanceGetPending:c,coinWalletBalanceGetSuccess:g}=s.actions;function*u(){yield(0,r.gz)(c());try{const{data:e}=yield(0,r.RE)(o.v_,"wallet",{data:{currency:"CC",walletType:"StoredValue"},path:"/get_wallet_balance/"}),{balance:i,...t}=e,n={...t,balance:parseInt(i,10)};yield(0,r.gz)(g({coinWalletBalance:n}))}catch(e){yield(0,r.gz)(d({err:e}))}}function y(e){return e[l].coinWalletBalance}function p(e){return e[l].coinWalletBalanceLoading}s.reducer,a.Z.register(l,s.reducer)},986:(e,i,t)=>{t.d(i,{fT:()=>m,Fs:()=>S});var n=t(435),r=t(6),l=t(67);const o="ImageQuality";var a=t(11),s=t(5),d=t(406),c=t(987),g=t(108),u=t(917);const y=(0,r.oM)({initialState:{imageQualityConfigs:void 0},name:o,reducers:{getImageQualityConfigSuccess(e,i){const{data:t}=i.payload;e.imageQualityConfigs=t}}}),{getImageQualityConfigSuccess:p}=(y.reducer,y.actions);function*f(e){yield(0,n.gz)(e.pending());try{const i=yield(0,n.RE)(a.BP,"storage",g.x.GET,{path:"/carousell-static/shared/image-quality-config.json"});yield(0,n.gz)(p(i)),yield(0,n.gz)(e.success())}catch(i){yield(0,n.gz)(e.error(i))}}function*m(){(yield(0,n.Ys)(_))||(yield(0,n.rM)(f,(0,d.Kh)("imageQualityConfigRequest")))}function _(e){return e[o].imageQualityConfigs}s.Z.register(o,y.reducer);const S=(0,l.P1)([_,(e,i)=>i],((e,i)=>{const t=e?.category_config?.[i];if(t){const i=e.image_quality_config[t];let n;switch((0,u.q_)()){case"Chrome":case"Firefox":case"Edge":n=i.jpeg_quality?.web?.chrome;break;case"Safari":n=i.jpeg_quality?.web?.safari}if(i)return{imageMaxLongerSide:i.image_max_longer_side,quality:n}}return{imageMaxLongerSide:c.X_}}))},1197:(e,i,t)=>{t.d(i,{mQ:()=>D,n7:()=>P,Vs:()=>I,ts:()=>x});var n=t(6),r=t(4);const l="ListingFee";var o=t(8),a=t(16),s=t(727),d=t(73),c=t(11),g=t(106),u=t(24),y=t(39),p=t(5),f=t(15),m=t(7),_=t(33),S=t(17);const P=(0,n.PH)(`${l}/listingFeeRenewRequest`),h=(0,n.PH)(`${l}/listingFeeRenewPending`),I=(0,n.PH)(`${l}/listingFeeRenewSuccess`),C=(0,n.PH)(`${l}/listingFeeBuyRequest`),v=(0,n.PH)(`${l}/listingFeeModalClientLoadRequest`),b=(0,n.oM)({initialState:{availablePurchases:[],buyPending:!1,getDetailsPending:!1,listingCard:null,listingFeeModalPending:!1},name:l,reducers:{listingFeeBuyFailure(e){e.buyPending=!1},listingFeeBuyPending(e){e.buyPending=!0},listingFeeBuySuccess(e){e.buyPending=!1},listingFeeGetDetailsFailure(e){e.getDetailsPending=!1},listingFeeGetDetailsPending(e){e.getDetailsPending=!0},listingFeeGetDetailsSuccess(e,i){e.availablePurchases=i.payload.availablePurchases,e.getDetailsPending=!1},listingFeeModalClientLoadFailure(e){e.listingFeeModalPending=!1},listingFeeModalClientLoadPending(e){e.listingFeeModalPending=!0},listingFeeModalClientLoadSuccess(e){e.listingFeeModalPending=!1},listingFeeRenewFailure(e,i){i.payload.err instanceof Error||"ListingFeeExceededQuotaError"!==i.payload.err.type||(e.listingCard=i.payload.err.listingCard)}}}),{listingFeeBuyFailure:E,listingFeeBuyPending:z,listingFeeBuySuccess:L,listingFeeGetDetailsFailure:F,listingFeeGetDetailsPending:R,listingFeeGetDetailsSuccess:w,listingFeeModalClientLoadFailure:k,listingFeeModalClientLoadPending:M,listingFeeModalClientLoadSuccess:U,listingFeeRenewFailure:D}=b.actions;function*T(e){const{payload:{listingCard:i,mode:t}}=e;yield(0,r.gz)(h());try{const{data:e={}}=yield(0,r.RE)(c.v_,"listing-renew",{data:{product_id:i.listingID},path:"/3.1/listing-renew/",useForm:!0}),{status:n}=e,l="markAsActive"===t&&"L"===n,o="extend"===t&&e.expiry_date&&i.expiresAt&&new Date(e.expiry_date)>new Date(1e3*i.expiresAt.seconds.low);if(l||o){yield(0,r.gz)(I());const e=yield(0,r.Ys)(a.XM);yield(0,r.gz)((0,f.oT)((0,S.J$)(e.username)))}else yield(0,r.gz)(D({err:{listingCard:i,type:"ListingFeeExceededQuotaError"}})),yield(0,r.rM)(s.F6),yield(0,r.rM)(G,i.listingID),yield(0,r.gz)((0,y.Gu)("LISTING_AUTO_RENEW"))}catch(e){yield(0,r.gz)(D({err:e}))}}function*G(e){yield(0,r.gz)(R());try{const{data:i}=yield(0,r.RE)(c.v_,"listing-fee-details",{data:{listingId:e}}),{availablePurchases:t}=i;yield(0,r.gz)(w({availablePurchases:t}))}catch(e){yield(0,r.gz)(F())}}function*q(e){yield(0,r.gz)(z());try{const{payload:{catalogId:i,listingFeeId:t,listingId:n,lmId:l,trackingUuid:o}}=e;yield(0,r.RE)(c.v_,"listing-fee-buy",{data:{catalogId:i,listingFeeId:t,listingId:n,lmId:l}});const s=yield(0,r.Ys)(a.XM);s?(yield(0,r.gz)((0,_.Vh)({name:"listing_fees_publish_successful",properties:{product_id:`${n}`,...o?{uuid:o}:null},type:"action"})),yield(0,r.gz)(L()),yield(0,r.gz)((0,y.qf)()),yield(0,r.gz)((0,f.oT)((0,S.J$)(s.username)))):yield(0,r.gz)(E())}catch(e){yield(0,r.gz)(E())}}function*V(e){const{listingId:i}=e.payload,{country_code:t}=yield(0,r.Ys)(u.S$);yield(0,r.gz)(M()),((yield(0,r.Ys)(o.Y6))||(yield(0,r.RE)(d.e,t)))&&(yield(0,r.RE)(g.qy,parseInt(i,10)))?yield(0,r.gz)(U()):yield(0,r.gz)(k())}function x(e){const i=e[l].availablePurchases;return i?.length?i[0]:null}b.reducer,p.Z.register(l,b.reducer),m.Z.register(l,(function*(){yield(0,r.Fm)(P.type,T),yield(0,r.Fm)(C.type,q),yield(0,r.Fm)(v.type,V)}))},903:(e,i,t)=>{t.d(i,{Pv:()=>$,En:()=>O,WY:()=>V,Lg:()=>E,m:()=>I,FO:()=>R,NK:()=>h,T0:()=>Q,HK:()=>Y,QH:()=>N,_$:()=>W,Cp:()=>H,hw:()=>Z,Ui:()=>B,ht:()=>j,OZ:()=>P,Gz:()=>U});var n=t(6),r=t(4),l=t(11),o=t(5),a=t(7),s=t(102),d=t(70),c=t(745),g=t(8),u=t(103),y=t(51),p=t(986),f=t(39),m=t(179),_=t(108);const S="Sell",P=(0,n.PH)(`${S}/sellGetFieldsetRequest`),h=(0,n.PH)(`${S}/priceSuggestionGetRequest`),I=(0,n.PH)(`${S}/itemOverallConditionGetRequest`),C=(0,n.oM)({initialState:{bpOnboardingInfo:void 0,getFieldsetError:null,getFieldsetPending:!1,itemOverallConditionPending:!1,priceSuggestion:null,priceSuggestionError:!1,priceSuggestionPending:!1,sellerEarningsInfo:void 0},name:S,reducers:{getBPOnboardingInfoSuccess(e,i){e.bpOnboardingInfo=i.payload.bpOnboardingInfo},getSellerEarningInfoSuccess(e,i){e.sellerEarningsInfo=i.payload.sellerEarningsInfo},itemOverallConditionClear(e){e.itemOverallCondition=void 0,e.itemOverallConditionPending=!1},itemOverallConditionGetFailure(e){e.itemOverallCondition=void 0,e.itemOverallConditionPending=!1},itemOverallConditionGetPending(e){e.itemOverallCondition=void 0,e.itemOverallConditionPending=!0},itemOverallConditionGetSuccess(e,i){e.itemOverallCondition=i.payload.condition,e.itemOverallConditionPending=!1},priceSuggestionClear(e){e.priceSuggestion=null,e.priceSuggestionError=!1,e.priceSuggestionPending=!1},priceSuggestionGetFailure(e){e.priceSuggestion=null,e.priceSuggestionError=!0,e.priceSuggestionPending=!1},priceSuggestionGetPending(e){e.priceSuggestion=null,e.priceSuggestionError=!1,e.priceSuggestionPending=!0},priceSuggestionGetSuccess(e,i){e.priceSuggestion=i.payload.priceSuggestion,e.priceSuggestionError=!1,e.priceSuggestionPending=!1},sellGetFieldsetFailure(e,i){e.getFieldsetError=i.payload.err,e.getFieldsetPending=!1},sellGetFieldsetPending(e){e.getFieldsetError=null,e.getFieldsetPending=!0},sellGetFieldsetSuccess(e){e.getFieldsetPending=!1},setAPEligibilityData(e,i){e.apEligibilityData=i.payload.data}}}),{getSellerEarningInfoSuccess:v,getBPOnboardingInfoSuccess:b,itemOverallConditionClear:E,itemOverallConditionGetFailure:z,itemOverallConditionGetPending:L,itemOverallConditionGetSuccess:F,priceSuggestionClear:R,priceSuggestionGetFailure:w,priceSuggestionGetPending:k,priceSuggestionGetSuccess:M,setAPEligibilityData:U,sellGetFieldsetFailure:D,sellGetFieldsetPending:T,sellGetFieldsetSuccess:G}=C.actions;function*q(e){const{ccId:i,journey:t,journeyVariant:n="",listingFormFields:l={},queryParams:o}=e.payload;yield(0,r.gz)(T());try{yield(0,r.rM)(p.fT);const e=yield(0,r.Ys)(m.OC),a=(0,d.z)(8),s={...o,basic_details_id:a,journey_id:e};(n||l.sell_form_variant)&&(s.journey_variant=n||l.sell_form_variant),yield(0,r.RE)(y.zm,`${i}`,t,l,s),yield(0,r.gz)(G()),yield(0,r.rM)(m.sd,{name:"list_form_loaded",properties:{basic_details_id:a},type:"action"})}catch(e){yield(0,r.gz)(D({err:{type:"SimpleError"}}))}}function*V(e,i,t){yield(0,r.gz)(e.pending());try{const n=yield(0,r.RE)(u.S,(0,s._5)(),void 0,{category_id:i,listing_price:t});yield(0,r.gz)(v({sellerEarningsInfo:n})),yield(0,r.gz)(e.success())}catch(i){yield(0,r.gz)(e.error(i))}}function*x(e){const{payload:{categoryId:i,layeredCondition:t,title:n}}=e;yield(0,r.gz)(k());const o=yield(0,r.Ys)(m.OC);try{const{data:e}=yield(0,r.RE)(l.U2,"sell-suggestions",{path:"/2.0/price-suggestions/",query:{category_id:i,journey_id:o,layered_condition:t,title:n}}),a={listings:e?.listings,priceRange:e?.price_range,suggestedPrice:e?.suggested_price};yield(0,r.gz)(M({priceSuggestion:a}))}catch(e){yield(0,r.gz)(w())}}function*O(e,i,t){yield(0,r.gz)(e.pending());try{const n=yield(0,r.RE)(u.S,(0,s.bw)(),void 0,{...i?{category_id:i}:null,...t?{source:t}:null});yield(0,r.gz)(b({bpOnboardingInfo:n})),yield(0,r.gz)(e.success())}catch(i){yield(0,r.gz)(e.error(i))}}function*A(e){yield(0,r.gz)(L());try{const i=yield(0,r.RE)(u.S,(0,s.se)(),e.payload);yield(0,r.gz)(F({condition:i}))}catch(e){yield(0,r.gz)(z())}}function*$(e,i,t){const n=(yield(0,r.RE)(l.BP,"api",_.x.POST,{data:e,path:"/1.0/cgproduct/validate",query:{journey:i},useForm:!0})).data;return n.is_ap_eligible||(yield(0,r.gz)(U({data:n})),n.reload_fieldset_required&&(yield(0,r.gz)(P({ccId:Number(e.collection_id),journey:i,listingFormFields:e,queryParams:{...t?{listing_id:t}:{},prefill_reload_reason:"post_validation"}}))),(yield(0,r.Ys)(g.Y6))?yield(0,r.gz)((0,f.Gu)("SELL_AP_INELIGIBLE_PRODUCT_INFO")):yield(0,r.gz)((0,c.QK)({actionSheetID:"SELL_AP_INELIGIBLE_PRODUCT_INFO"}))),n}function B(e){return e[S].priceSuggestion}function Y(e){return e[S].bpOnboardingInfo}function N(e){return e[S].itemOverallCondition}function W(e){return e[S].itemOverallConditionPending}function Q(e){return e[S].apEligibilityData}function j(e){return e[S].sellerEarningsInfo}function H(e){return e[S].getFieldsetError}function Z(e){return e[S].getFieldsetPending}C.reducer,o.Z.register(S,C.reducer),a.Z.register(S,(function*(){yield(0,r.Fm)(P.type,q),yield(0,r.Fm)(h.type,x),yield(0,r.A7)(I.type,A)}))},2435:(e,i,t)=>{t.d(i,{e:()=>o});var n=t(4),r=t(11),l=t(112);function*o(e,i,t,r=5){const o=Object.keys(e).map(Number),s=[],d=[];for(let i=0;i<o.length;i++){const t=o[i],n=e[t];s[t]={content:(0,l.kD)(n),fieldName:`photo_${t}`},d[t]=0}function c(e,i){d[e]=i;let r=0;for(let e=0;e<o.length;e++){const i=o[e];r+=d[i]}const l=r/o.length;return(0,n.gz)(t(l))}const g=[],u=[];for(let e=0;e<o.length;e++){const t=o[e],l=s[t];if(u.push({effect:(0,n.RE)(a,l.content,"image/jpeg",l.fieldName,i,c.bind(null,t)),key:t}),u.length>=r||e===o.length-1){const e=yield(0,n.$6)(u.map((e=>e.effect)));u.forEach(((i,t)=>g[i.key]=e[t])),u.length=0}}return g}function*a(e,i,t,l,o){yield o(0);const a=yield(0,n.RE)(r.gz,"upload2",{data:{entityName:l,filename:t,mimeType:i},files:[{content:e,fieldName:t}]});return yield o(1),a.encrypted_url}},938:(e,i,t)=>{t.d(i,{_6:()=>be,Nv:()=>de,r$:()=>Ce,LJ:()=>ve,Ob:()=>fe,_C:()=>me,gq:()=>_e,hk:()=>Se,k_:()=>Pe,bK:()=>he,tt:()=>Ie,fq:()=>K,z3:()=>Q,lW:()=>j,zs:()=>re,eR:()=>H,mj:()=>ae,CC:()=>se});var n=t(6),r=t(4),l=t(987),o=t(16),a=t(11),s=t(401),d=t(12),c=t(24),g=t(39),u=t(5),y=t(15),p=t(406),f=t(7),m=t(189),_=t(102),S=t(71),P=t(70),h=t(17);function I(e,i,t){const n={name:e,type:i};return t&&(n.properties=t),{payload:{track:n},type:"Track/trackBatchedEvent"}}function C(e){return I("sell_form_submit_pressed","action",e)}var v=t(718),b=t(607),E=t(103),z=t(184),L=t(41),F=t(986),R=t(106),w=t(110),k=t(195),M=t(1197),U=t(735),D=t(794),T=t(115),G=t(903),q=t(179),V=t(2435),x=t(773),O=t(108),A=t(76),$=t(394);const B=3e3;async function Y(e){if(!window.navigator||!window.navigator.geolocation)return null;try{if(e.checkPermissions){if(!window.navigator.permissions)return null;if("granted"!==(await window.navigator.permissions.query({name:"geolocation"})).state)return null}return(await new Promise(((e,i)=>{window.navigator.geolocation.getCurrentPosition(e,i,{timeout:B})}))).coords}catch(e){return Sentry.withScope((i=>{i.setExtra("Utils","Geolocation"),Sentry.captureException(e)})),null}}var N=t(988);const W="PageSell",Q=(0,n.PH)(`${W}/sellCreateListingRequest`),j=(0,n.PH)(`${W}/sellRestoreListingRequest`),H=(0,n.PH)(`${W}/sellSuggestionsGetRequest`),Z=(0,n.oM)({initialState:{createListingError:null,createListingPending:!1,createListingUploadProgress:null,createdListingCard:null,isInvalidMarketplace:!1,listingMobileVerificationRequired:null,listingPersonalDetailsVerificationRequired:null,postListingPages:null,suggestions:null},name:W,reducers:{pageSellUpdateInvalidMarketplace(e,i){e.isInvalidMarketplace=i.payload.isInvalidMarketplace},sellClearCreatedListing(e){e.createdListingCard=null},sellClearListingPending(e){e.createListingPending=!1},sellCreateListingFailure(e,i){const{err:t}=i.payload;"CreateListingDuplicateError"!==t.type&&"CreateListingExceededListingQuotaError"!==t.type||(e.createdListingCard=t.createdListingCard),e.createListingError=t,e.createListingPending=!1,e.createListingUploadProgress=null},sellCreateListingPending(e){e.createListingError=null,e.createListingPending=!0,e.listingMobileVerificationRequired=null,e.listingPersonalDetailsVerificationRequired=null},sellCreateListingSuccess(e,i){e.createListingPending=!1,e.createListingUploadProgress=null,e.createdListingCard=i.payload.createdListingCard,e.listingMobileVerificationRequired=i.payload.listingMobileVerificationRequired,e.listingPersonalDetailsVerificationRequired=i.payload.listingPersonalDetailsVerificationRequired,e.suggestions=null},sellCreateListingUploadProgress:{prepare:e=>({payload:{progress:e}}),reducer:(e,i)=>{e.createListingUploadProgress=i.payload.progress}},sellPostListingPagesGetSuccess(e,i){e.postListingPages=i.payload.postListingResponse.pages},sellSuggestionsClear(e){e.suggestions=null},sellSuggestionsGetPending(e){e.suggestions=null},sellSuggestionsGetSuccess(e,i){e.suggestions=i.payload.suggestions},sellUpdateListingMobileVerificationRequired(e,i){e.listingMobileVerificationRequired=i.payload.listingMobileVerificationRequired},sellUpdateListingPersonalDetailsVerificationRequired(e,i){e.listingPersonalDetailsVerificationRequired=i.payload.listingPersonalDetailsVerificationRequired}}}),{sellPostListingPagesGetSuccess:X,sellClearCreatedListing:K,sellCreateListingFailure:J,sellClearListingPending:ee,sellCreateListingPending:ie,sellCreateListingSuccess:te,sellCreateListingUploadProgress:ne,sellSuggestionsClear:re,sellSuggestionsGetPending:le,sellSuggestionsGetSuccess:oe,sellUpdateListingMobileVerificationRequired:ae,sellUpdateListingPersonalDetailsVerificationRequired:se,pageSellUpdateInvalidMarketplace:de}=Z.actions;function*ce(e){const{caroupay:i,ccId:t,journeyId:n,listingCard:l,listingDraftId:o,me:a,photoFiles:s,selectedCollection:c,trackingProperties:g}=e;if("treatment"===(yield(0,r.Ys)(d.Oe,{experimentId:"ss-333-web-carousell-coin"}))){const e="list_success_screen";yield(0,r.gz)((0,U.Bn)({listingCard:l,sellerToolsTrackingSource:e,sellerToolsTrackingUuid:(0,P.z)(8)}))}null!=o&&(yield(0,r.RE)(k.td,(0,k.tX)({draftIds:new Set([o])}))),yield(0,r.gz)((0,L.S6)([{browseCategoryId:`${t}`},{productId:`${l.listingID}`}]));const u=!(0,S.wf)("FIRST_LIST_COMPLETE",String(a.id));u&&((0,$.wu)({event:"listing",eventAction:"first-list",eventCategory:"Seller",eventLabel:`${t}-${a.id}`}),yield(0,r.gz)((0,L.S6)([{event:"listing",eventAction:"first-list",eventCategory:"Seller",eventLabel:`${t}`}])),(0,S._4)("FIRST_LIST_COMPLETE",!0,String(a.id)));let y={};if(c&&"collection"===c.type){const[e,i,t]=[...c.ancestorNames,c.name];y={sellCategory:i,sellParentCategory:e,sellSubcategory:t}}(0,$.wu)({event:"listing",eventAction:"list-item",eventCategory:"Seller",eventLabel:`${t}-${a.id}`});const p=yield(0,r.RE)(A.d1,"list",parseInt(t,10));yield(0,r.gz)((0,L.S6)([{...p?{eAlias:p}:{},event:"listing",eventAction:"list-item",eventCategory:"Seller",eventLabel:`${t}`},{CarousellProtection:"true"===i?"yes":"no",FirstListing:u?"yes":"no",eAction:"list-item",eCategory:"Seller",eLabel:"successfully listed",event:"sellListingSuccess",listingId:`${l.listingID}`,pageType:"promotepage",sellCCId:t,"userType-Seller":"yes",...y}])),yield(0,r.gz)(C({...g,category_id:t,draft_id:o||void 0,journey_id:n,photo_count:s.length,product_id:String(l.listingID),response:"200: success"})),yield(0,r.gz)((0,z.bQ)({data:{name:"LIST",properties:{"BP Enabled":`${l.smart_attributes?.is_bp_enabled??""}`,Category:`${y.sellCategory?y.sellCategory:""}`,"Category ID":`${c&&"collection"===c.type?c.id:""}`,"Deal Method":`${l.smart_attributes?.deal_options??""}`,Instantbuy:l.smart_attributes?.is_mall?"true":"false",Price:l.price,"Product ID":`${l.listingID}`,"Product Title":l.title,Status:l.status}}}))}function*ge(e){const{payload:{listingDraftId:i,photoFiles:t,selectedCollection:n,sellData:c,trackingProperties:u,shouldCheckAPEligibility:y,journey:f}}=e;yield(0,r.gz)(ie());const _=String(c.caroupay),S=yield(0,r.Ys)(o.XM),P=yield(0,r.Ys)(q.OC);var h;if(S)try{const e=c.collection_id?c.collection_id.toString():"";if(y){const i=yield(0,r.RE)(G.Pv,c,f);if(!i.is_ap_eligible)return yield(0,r.gz)((0,b.dA)({cc_id:e,error_description:i.bottom_sheet?.description,journey_id:P})),void(yield(0,r.gz)(ee()))}const o=yield(0,r.RE)(Y,{checkPermissions:!0});(0,m.ai)(c),(0,m.fj)(c);const h={idempotency_key:P,...c,...o?{gps_latitude:o.latitude,gps_longitude:o.longitude}:null},I={"build-no":"2"};let v;v=(yield(0,r.Ys)(d.c6,{experimentId:"sx-3259-image-quality-configurability"}))?yield(0,r.Ys)((i=>(0,F.Fs)(i,e))):{imageMaxLongerSide:l.X_};const E=[];for(const e of t){const i=yield(0,r.RE)(N.Og,e,{maxHeight:v.imageMaxLongerSide,maxWidth:v.imageMaxLongerSide,orientation:!0});E.push(i.toDataURL("image/jpeg",v.quality))}let z;yield(0,r.gz)((0,s.Ob)({dialogId:"SELL_UPLOAD_PROGRESS"}));try{const e=yield(0,r.RE)(V.e,E,"listings_photo",ne),i={};e.forEach(((e,t)=>{i[`photo_${t}`]=`encrypted_url_${e}`})),z=yield(0,r.RE)(a.v_,"create-listing",{data:{...h,...i,use_media_encrypted_urls:!0},files:[],headers:I,path:"/3.1/listings/",useForm:!0})}finally{yield(0,r.gz)((0,s.z6)())}const L=z.data,k="true"===L?.is_advance_promise_enabled?.toString()?{cgproduct_id:L.cgproduct_id,cgproduct_variant_id:L.cgproduct_variant_id}:{},U=!!L?.flags?.require_mobile_verification,T=!!L?.flags?.personal_details_verification_required&&(L.flags.personal_details_verification_required.kyc_required||L.flags.personal_details_verification_required.mobile_required);T&&(yield(0,r.rM)(x.Ai,S.username),yield(0,r.gz)((0,D.mC)(L?.flags?.personal_details_verification_required?.kyc_required?"PENDING":"SUCCESS")),yield(0,r.gz)((0,D.kQ)(L?.flags?.personal_details_verification_required?.mobile_required?"PENDING":"SUCCESS")));const q=be(L,`${S.id}`,S.profile.image_url,S.username);yield(0,r.gz)((0,R.gq)({listingCards:[q]}));const O=(0,w.Bg)(q);if(yield(0,r.Ys)(d.c6,{experimentId:"sell-4057-bp-post-listing-flow"})){yield(0,r.RE)(pe,(0,p.Kh)("postListingPagesGet"),"post_listing",S.id,L.id);const e=yield(0,r.Ys)(ve);"error"!==(yield(0,r.Ys)(p.Ig,"postListingPagesGet"))&&e&&e.length>0&&(yield(0,r.gz)((0,g.Gu)("POST_LISTING_SLIDES")))}"H"===O.status||"I"===O.status||"L"===O.status?(yield(0,r.gz)(te({createdListingCard:O,listingMobileVerificationRequired:U,listingPersonalDetailsVerificationRequired:T})),yield(0,r.RE)(ce,{caroupay:_,ccId:e,journeyId:P,listingCard:O,listingDraftId:i,me:S,photoFiles:t,selectedCollection:n,trackingProperties:{...u,...k}})):"E"===O.status||"T"===O.status?(yield(0,r.gz)((0,M.n7)({listingCard:O,mode:"markAsActive"})),(yield(0,r.qn)([M.Vs.type,M.mQ.type])).type===M.Vs.type?(yield(0,r.gz)(te({createdListingCard:O,listingMobileVerificationRequired:U,listingPersonalDetailsVerificationRequired:T})),yield(0,r.RE)(ce,{caroupay:_,ccId:e,journeyId:P,listingCard:O,listingDraftId:i,me:S,photoFiles:t,selectedCollection:n,trackingProperties:{...u,...k}})):(yield(0,r.gz)(J({err:{createdListingCard:O,type:"CreateListingExceededListingQuotaError"}})),yield(0,r.gz)(C({...u,...k,category_id:e,draft_id:i||void 0,journey_id:P,photo_count:t.length,product_id:String(L.id),response:`200: ${O.status}`})))):(Sentry.captureMessage(`Unknown status: ${O.status}`),yield(0,r.gz)(J({err:{message:`Unknown status: ${O.status}`,type:"SimpleError"}})))}catch(e){if(yield(0,r.gz)(C({...u,draft_id:i||void 0,journey_id:P,response:`${e.statusCode}: ${e.type}`})),403===e.statusCode)return e.data?(yield(0,r.gz)(J({err:{fields:e.data.fields,type:"CustomErrorMessage"}})),void(yield(0,r.gz)((0,s.Ob)({dialogId:"SELL_CUSTOM_MESSAGE"})))):void(yield(0,r.gz)(J({err:{type:"SimpleError"}})));if(e.data?.fields||e.data?.non_fields)yield(0,r.gz)(J({err:{fields:e.data.fields,non_fields:e.data.non_fields,type:"FieldsetValidationError"}}));else if(409===e.statusCode){const{data:i}=e,t=be(i,`${S.id}`,S.profile.image_url,S.username);yield(0,r.gz)((0,R.gq)({listingCards:[t]}));const n=(0,w.Bg)(t);yield(0,r.gz)(J({err:{createdListingCard:n,type:"CreateListingDuplicateError"}})),yield(0,r.gz)((h={journey_id:P,old_product_id:`${i.id}`,old_product_status:i.status},I("view_duplicate_detected","action",h)))}else yield(0,r.gz)(J({err:{type:"SimpleError"}}));void 0===e.statusCode&&void 0===e.type&&Sentry.captureException(e)}}function*ue(e){const{payload:{listingId:i}}=e;try{const{body:e}=yield(0,r.RE)(T.B,`/service/api/2.5/product/${i}/restore/`,{method:"POST"}),{id:t,title:n}=e,l=(0,h.Wm)(n,t);yield(0,r.gz)((0,y.J5)(l))}catch(e){}}function*ye(e){const{payload:{listingDraftId:i,photoFile:t}}=e;yield(0,r.gz)(le());try{const{country_code:e}=yield(0,r.Ys)(c.S$),n=yield(0,r.RE)(N.Og,t,{maxHeight:l.Cq,maxWidth:l.aQ,orientation:!0}),o=yield(0,r.RE)(N._c,n,"image/jpeg"),{body:{data:s},metaData:d}=yield(0,r.RE)(a.pd,"sell-suggestions",O.x.POST,{data:{country_code:e},files:[{content:o,fieldName:"file"}],path:"/2.0/listings/",useForm:!0});yield(0,r.gz)(oe({suggestions:{categoryIds:s.CategoryIds?s.CategoryIds.map((e=>Number(e))):[],ccIds:s.Categories.map((e=>Number(e.cc_id))),requestId:d["x-request-id"]}}));const g=yield(0,r.Ys)(q.OC),u=s.CategoryIds.map((e=>({suggestions:e})));yield(0,r.gz)((0,v.wT)({draft_id:i,journey_id:g,model:u}))}catch(e){}}function*pe(e,i,t,n){yield(0,r.gz)(e.pending());try{const l=yield(0,r.RE)(E.S,(0,_.sl)(),void 0,{flag_key:i,listing_id:n.toString(),user_id:t.toString()});yield(0,r.gz)(X({postListingResponse:l})),yield(0,r.gz)(e.success())}catch(i){yield(0,r.gz)(e.error(i))}}function fe(e){return e[W].createListingError}function me(e){return e[W].createListingPending}function _e(e){return e[W].createListingUploadProgress}function Se(e){return e[W].createdListingCard}function Pe(e){return e[W].listingMobileVerificationRequired}function he(e){return e[W].listingPersonalDetailsVerificationRequired}function Ie(e){return e[W].suggestions}function Ce(e){return e[W].isInvalidMarketplace}function ve(e){return e[W].postListingPages}function be(e,i,t,n){const{currency_symbol:r,id:l,like_status:o,likes_count:a,photos:s,price_formatted:d,smart_attributes:c,status:g,price:u,title:y,detail_page_type:p}=e;return{aboveFold:[],belowFold:[{component:"header_1",stringContent:`${y}`},{component:"header_2",stringContent:`${r}${d}`}],countryCollectionId:"ccId",detail_page_type:p,id:`${l}`,likeStatus:o,likesCount:a,media:s.map((e=>{return{photoItem:{progressiveLowRange:1,progressiveMediumRange:2,progressiveUrl:i=e.image_url,url:i}};var i})),photoUrls:s.map((e=>e.image_url)),photos:s.map((e=>({thumbnailProgressiveUrl:e.image_url}))),price:u,seller:{id:i,profilePicture:t,username:n},smart_attributes:c,status:g,title:y}}Z.reducer,u.Z.register(W,Z.reducer),f.Z.register(W,(function*(){yield(0,r.Fm)(Q.type,ge),yield(0,r.Fm)(j.type,ue),yield(0,r.Fm)(H.type,ye)}))},773:(e,i,t)=>{t.d(i,{g:()=>I,Ai:()=>P,m3:()=>m,Wr:()=>_,tM:()=>C,ME:()=>v});var n=t(6),r=t(4),l=t(102),o=t(16),a=t(103),s=t(11),d=t(794),c=t(5);const g="Profile",u=(0,n.oM)({initialState:{profileGetError:null,profiles:{}},name:g,reducers:{profileGetFailure(e,i){e.profileGetError=i.payload.err},profileGetPending(e){e.profileGetError=null},profileGetSuccess(e,i){const{profile:t}=i.payload;e.profiles={...e.profiles,[t.username]:t}},profileUpdateCoverPhoto(e,i){const{username:t,photo:n}=i.payload,r=e.profiles[t];if(!r)return e;const l={...r.cover_image,image_url:n};e.profiles={[t]:{...r,cover_image:l}}},profileUpdateIsFollowed(e,i){const{followed:t,username:n}=i.payload,r=e.profiles[n];r&&(e.profiles={[n]:{...r,is_followed:t}})}}}),{profileGetFailure:y,profileGetPending:p,profileGetSuccess:f,profileUpdateCoverPhoto:m,profileUpdateIsFollowed:_}=u.actions;function*S(){if(yield(0,r.Ys)(o.XM))try{const{kycRequired:e}=yield(0,r.RE)(a.S,(0,l.Je)());yield(0,r.gz)((0,o.BT)({kycRequired:e}))}catch(e){}}function*P(e,i){yield(0,r.gz)(p());try{const{data:t}=yield(0,r.RE)(s.U2,"profile",{query:{username:e}}),n=t.fieldset_data.profile_info,l=t.fieldset_data.promo_cards,{badge_icon_path:o,biography:a,city:c,verified_by:g}=n;if(yield(0,r.gz)(f({profile:{...n,badge_icon_path:o?.web&&o.web.length>0?o.web:null,biography:a&&a.length>0?a:null,isHighTrafficProfile:t.isHighTrafficProfile,location:c,promoCards:l,verifications:g}})),n?.is_me){const e=g?.includes("mobile"),t=g?.includes("identity");if(yield(0,r.rM)(S),yield(0,r.gz)((0,d.kQ)(e?"SUCCESS":"PENDING")),yield(0,r.gz)((0,d.mC)(t?"SUCCESS":"PENDING")),i)return[e,t]}}catch(e){yield(0,r.gz)(y({err:e}))}}let h;function*I(e){const i=yield(0,r.Ys)(b);return i[e]?i[e]:(null==h&&(h=yield(0,r.rM)(P,e)),h&&(yield(0,r.v_)(h)),h=null,(yield(0,r.Ys)(b))[e])}function C(e,i){return e[g].profiles[i.username]}function v(e){return e[g].profileGetError}function b(e){return e[g].profiles}u.reducer,c.Z.register(g,u.reducer)},988:(e,i,t)=>{function n(e,i){return new Promise(((t,n)=>{const r=new Image,a=document.createElement("canvas"),s=a.getContext("2d");r.onerror=function(){n(new Error("Error loading image"))},r.onload=function(){const d=r.naturalWidth??r.width,c=r.naturalHeight??r.height;let g=0,u=0,y=d,p=c;const f=i?.maxHeight,m=i?.maxWidth;let _=d,S=c;const P=i?.aspectRatio;if(P&&f&&m){let e=m,i=f;d/c>P?(e=c*P,i=c):(e=d,i=d/P),f&&(i=f,S=i),m&&(e=m,_=e);const t=y/p-e/i;t<0?(p=i*y/e,g=(c-p)/2):t>0&&(y=e*p/i,u=(d-y)/2)}else{const e=m?Math.min(m,d):d,i=f?Math.min(f,c):c,t=Math.min(e/d,i/c);t<1&&(_*=t,S*=t)}if(a.width=_,a.height=S,s){const n=!window.CSS||window.CSS.supports&&!window.CSS.supports("image-orientation","from-image");!0===i?.orientation&&n?"string"==typeof e?fetch(e).then((e=>e.blob())).then((e=>{o(e,(e=>{l(a,s,_,S,e,r,u,g,y,p),t(a)}))})):o(e,(e=>{l(a,s,_,S,e,r,u,g,y,p),t(a)})):(s.drawImage(r,u,g,y,p,0,0,_,S),t(a))}else n(new Error("Error loading image"))},r.src=e instanceof Blob?URL.createObjectURL(e):e}))}function r(e,i,t){return new Promise(((n,r)=>{e.toBlob((e=>{e?n(e):r(new Error("Failed to load blob from canvas"))}),i,t)}))}t.d(i,{I4:()=>s,Og:()=>n,_c:()=>r,ae:()=>a});const l=(e,i,t,n,r,l,o,a,s,d)=>{if(r>0)switch(4<r&&r<9?(e.width=n,e.height=t):(e.width=t,e.height=n),r){case 2:i.transform(-1,0,0,1,t,0);break;case 3:i.transform(-1,0,0,-1,t,n);break;case 4:i.transform(1,0,0,-1,0,n);break;case 5:i.transform(0,1,1,0,0,0);break;case 6:i.transform(0,1,-1,0,n,0);break;case 7:i.transform(0,-1,-1,0,n,t);break;case 8:i.transform(0,-1,1,0,0,t)}i.drawImage(l,o,a,s,d,0,0,t,n)},o=(e,i)=>{const t=new FileReader;t.onload=e=>{if(!e.target)return;const t=e.target,n=new DataView(t.result);function r(e,i,t){const n=[];for(let r=0;r<t&&i+r<e.byteLength;r++)n.push(e.getUint8(i+r));return n.map((e=>String.fromCharCode(e))).join("")}if("‰PNG\r\n\n"===r(n,0,8)){const e=n.byteLength;let t=8;for(;t<e;){const e=n.getUint32(t,!1),l=r(n,t+4,4);if("eXIf"===l){if(1700284774!==n.getUint32(t+4,!1)){if(18761===n.getUint16(t+=8,!1))continue;return i(-1)}t+=4;const e=18761===n.getUint16(t+=4,!1);t+=n.getUint32(t+4,e);const r=n.getUint16(t,e);t+=2;for(let l=0;l<r;l++)if(274===n.getUint16(t+12*l,e))return i(n.getUint16(t+12*l+8,e))}else{if("IEND"===l)break;t+=e+4+4+4}}}if(65496===n.getUint16(0,!1)){const e=n.byteLength;let t=2;for(;t<e;){if(n.getUint16(t+2,!1)<=8)return i(-1);const e=n.getUint16(t,!1);if(t+=2,65505===e){if(1165519206!==n.getUint32(t+=2,!1))return i(-1);const e=18761===n.getUint16(t+=6,!1);t+=n.getUint32(t+4,e);const r=n.getUint16(t,e);t+=2;for(let l=0;l<r;l++)if(274===n.getUint16(t+12*l,e))return i(n.getUint16(t+12*l+8,e))}else{if(65280!=(65280&e))break;t+=n.getUint16(t,!1)}}}return i(-1)},t.readAsArrayBuffer(e)};async function a(e){return new Promise(((i,t)=>{const n=new FileReader;n.onload=()=>{const e=n.result;"string"==typeof e?s(e).then((()=>{i(e)})).catch((e=>{t(new Error("Error reading image file"))})):t(new Error("Unreachable"))},n.onerror=()=>{t(new Error("Error reading image file"))},n.readAsDataURL(e)}))}function s(e){return new Promise(((i,t)=>{const n=new Image;n.src=e,n.onload=()=>{i({aspectRatio:parseFloat((n.width/n.height).toFixed(2)),height:n.height,width:n.width})},n.onerror=()=>{t(new Error("Error loading image"))}}))}},917:(e,i,t)=>{function n(){const e=navigator.userAgent||navigator.vendor||window.opera;if(null==e)return"Unknown";let i=e.indexOf("Chrome")>-1;if(e.indexOf("MSIE")>-1||e.indexOf("Trident/7.0; rv")>-1)return"IE";if(e.indexOf("Edg")>-1)return"Edge";if(e.indexOf("Firefox")>-1)return"Firefox";let t=e.indexOf("Safari")>-1;if(i&&t&&(t=!1),t)return"Safari";const n=e.indexOf("OP")>-1;return i&&n&&(i=!1),n?"Opera":i?"Chrome":"Unknown"}function r(){if(window&&window.matchMedia){const e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||window.devicePixelRatio>1}return!1}t.d(i,{fv:()=>r,q_:()=>n})}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/872d9a325b1c9576132523bfac3e739f6f67875f/bce58e61c56bd151.min.js.map
//# debugId=4b318a17-aa4a-530c-8daa-5a1b183d28e9