PageSourceSearch

https://basalam.com/charsou-assets/unified/_next/static/chunks/94007-888cc844f62d5538.js

js basalam.com collected 2026-10-02 02:41:02 UTC 60,680 bytes, 1 lines download raw bytes

1function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}!function(){try{var e="u">("undefined"==typeof window?"undefined":_type_of(window))?window:"u">("undefined"==typeof global?"undefined":_type_of(global))?global:"u">("undefined"==typeof globalThis?"undefined":_type_of(globalThis))?globalThis:"u">("undefined"==typeof self?"undefined":_type_of(self))?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6b972d1e-d7a4-4891-979e-640cee1d40e2",e._sentryDebugIdIdentifier="sentry-dbid-6b972d1e-d7a4-4891-979e-640cee1d40e2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37234,49522,66515,94007],{9133:function(e){e.exports={"cart-page-tabs-skeleton":"tGMVCT",item:"ivf7Xw"}},9860:function(e){e.exports={"cart-page":"wPaMgB","cart-page__tabs":"zX8oJw","cart-page__invoice":"_5sw7Rk","cart-page__payable-invoice":"ZJZXWI"}},16051:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});var i=n(11074),a=n(34193),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.IT)(["products-list",e.sort().toString()],function(){return e.length>0?(0,a.$F)(e):Promise.resolve([])},t)}},18437:function(e){e.exports={"select-city-modal__header":"iAu1pR","select-city-modal__close":"r6JBTv","select-city-modal__subheader":"eLNA7a","select-city-modal__subheader-hint":"qj6LST","select-city-modal__subheader-selected-items":"DYI8S3","select-city-modal__search":"sW00RF","select-city-modal__search-close":"bg2AFm","select-city-modal__loading":"q2A7cX","select-city-modal__provinces":"mEmnvL","select-city-modal__provinces-title":"ix_rG_","select-city-modal__provinces-list":"GRE_Bl","select-city-modal__province-item":"vZax_d","select-city-modal__cities":"bjDHmO","select-city-modal__header-gap":"UAYL4c","select-city-modal__cities-action":"x5d_SE","select-city-modal__cities-list":"pCXyvi","select-city-modal__empty":"pYcOzM","select-city-modal__empty-image":"QcYg2o","select-city-modal__empty-title":"VGom_6","select-city-modal__empty-text":"u7qWqo","select-city-modal__city-item":"Y1UMwd","select-city-modal__city-item-label":"AXbZqa","select-city-modal__city-item-label__province-title":"mMuPfV","select-city-modal__body":"g5X2KD","select-city-modal":"NaIJmV"}},22234:function(e){e.exports={"second-cart":"_1nQSYL","second-cart__skeleton-list":"UMIVBJ"}},23880:function(e){e.exports={ip:"AWxO9M",ip__close:"BG5NPY",ip__icon:"iD8rl3",shake:"cXx6fF",ip__title:"exmNmm",ip__subtitle:"O3esZP",ip__action:"UTyfNn","ip__modal-coupon":"CW3r92","ip__modal-coupon-title":"piQJV9","ip__modal-coupon-box":"_4W4bYE","ip__modal-coupon-box-copy":"BPZy1E","ip__modal-direct":"k4rvfB","ip__modal-stores":"W_guMB","ip__modal-stores-dl":"bvmTUV"}}
1,24018:function(e){e.exports={"cart-item":"dyRGAa","cart-item--unavailable":"KsH33b","cart-item__image":"R5ZRYX","cart-item__details":"zSf8qs","cart-item__title":"p_7lnU","cart-item__delete-icon":"Pa9iNX","cart-item__price":"wljqVi","cart-item__discount":"NAUpJB"}},27817:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var i=n(57803),a=n(44258),r=n(11074),s=n(40301),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.IT)(["getProvinces"],s.WZ,(0,a._)((0,i._)({},e),{select:function(e){return(null==e?void 0:e.openapi_raw_data)||[]}}))}},29324:function(e,t,n){"use strict";var i=function(){return(0,a.jsxs)(l(),{className:s()["cart-page-tabs-skeleton"],display:"flex",alignItems:"center",justifyContent:"space-between",py:14,px:24,children:[(0,a.jsx)(l(),{className:s().item,ml:8,children:(0,a.jsx)(d(),{width:"100%",height:20})}),(0,a.jsx)(l(),{className:s().item,mr:8,children:(0,a.jsx)(d(),{width:"100%",height:20})})]})};n.d(t,{A:function(){return i}});var a=n(31827),r=n(9133),s=n.n(r),o=n(46312),l=n.n(o),c=n(54268),d=n.n(c)},30068:function(e,t,n){"use strict";var i=function(e){if(!e)return l;var t,n,i,a=null==e?void 0:e.ads,r=null==e?void 0:e.metadata,u=function(e){var t;return null!=(t=null==a?void 0:a[e])?t:null==r?void 0:r[e]},m="string"==typeof a||"number"==typeof a?a:null,v=null!=(t=null!=(n=u("offerIdStr"))?n:u("offerId"))?t:m;return(0,o._)((0,s._)({offerId:c(v)},d({productAdId:u("productAdId"),productAdIdStr:u("productAdIdStr")})),{adsBadgeLabel:null!=(i=u("adsBadgeLabel"))?i:null})},a=function(e){return i(e).offerId},r=function(e,t){var n;return"s"!==t||"v2"!==(null==e||null==(n=e.ads)?void 0:n.adsBadgeLabel)};n.d(t,{A1:function(){return i},B5:function(){return a},Lw:function(){return r}});var s=n(57803),o=n(44258),l={offerId:null,productAdId:null,adsBadgeLabel:null,productAdIdStr:null},c=function(e){return null==e?null:String(e)},d=function(e){var t=e.productAdId,n=e.productAdIdStr,i=c(null!=n?n:t);return{productAdIdStr:i,productAdId:null!=t?t:i}}},37234:function(e,t,n){"use strict";var i=function(e){var t=e.city;return(0,l.jsxs)("p",{className:m()["select-city-modal__city-item-label"],children:[(0,l.jsx)("span",{children:t.title}),(null==t?void 0:t.provinceTitle)&&(0,l.jsx)("span",{className:m()["select-city-modal__city-item-label__province-title"],children:t.provinceTitle})]})};n.r(t),n.d(t,{default:function(){return W}});var a=n(57803),r=n(44258),s=n(3808),o=n(82322),l=n(31827),c=n(11327),d=n.n(c),u=n(18437),m=n.n(u),v=n(73025),f=n(80105),p=n(27817),_=n(99195),h=n(90894),g=n.n(h),x=n(30283),b=n.n(x),y=n(89570),j=n.n(y),C=(0,_.memo)(function(e){var t=e.type,n=e.city,a=e.selectCity,r=e.selectedIds,s=e.handleCheckbox,o=e.showProductCount,c=e.toggleAllCitiesOfProvince,d=e.isAllCitiesOfProvinceSelected;return"SINGLE"===t?(0,l.jsx)(j().Group,{value:r[0]||-1,onChange:function(e){return a(e)},children:(0,l.jsx)(j(),{value:n.id,label:(0,l.jsx)(i,{city:n})})}):(0,l.jsx)(l.Fragment,{children:n.isAllSelector?(0,l.jsx)(g(),{label:n.title,checked:d(n.parent_id),onChange:function(e){return c(e.target.checked,n.parent_id)}}):(0,l.jsxs)(g(),{onChange:function(e){s(n.id,e.target.checked)},checked:r.includes(n.id),value:n.id,children:[(0,l.jsx)(i,{city:n}),(null==n?void 0:n.count)&&o&&(0,l.jsx)(b(),{color:"black",label:null==n?void 0:n.count,className:m()["select-city-modal__city-item-label"]})]})})}),N=n(46312),I=n.n(N),k=n(90327),P=n.n(k),A=n(41749),w=n.n(A),S=n(43206),T=n.n(S),L=n(23177),E=n.n(L),M=n(82669),O=n.n(M),B=n(2796),U=n.n(B),V=n(49137),G=n.n(V),F=n(25187),z=n.n(F),R=(0,_.forwardRef)(function(e,t){var n=e.children,i=e.style;return(0,l.jsx)("div",{ref:t,style:i,children:n})}),q=[],W=function(e){var t=e.show,n=e.onUpdateShow,i=e.type,c=void 0===i?"SINGLE":i,u=e.showInput,h=e.modalProps,g=void 0===h?null:h,x=e.inputProps,b=void 0===x?null:x,y=e.provincesData,j=void 0===y?[]:y,N=e.onSubmit,k=void 0===N?function(){}:N,A=e.headerComponent,S=void 0===A?null:A,L=e.showProductCount,M=void 0===L||L,B=e.selectedCityIds,V=void 0===B?q:B,F=(0,f.U)(),W=F.ua,D=F.staticsOrigin,Z=(0,_.useRef)(null),H=(0,p.P)({enabled:t||(null==V?void 0:V.length)>0}
1),Q=H.data,X=H.isLoading,K=H.isError,Y=H.refetch,J=(0,_.useRef)(),$=(0,s._)((0,_.useState)(),2),ee=$[0],te=$[1],ne=(0,s._)((0,_.useState)(null),2),ie=ne[0],ae=ne[1],re=(0,s._)((0,_.useState)(V),2),se=re[0],oe=re[1],le=(0,s._)((0,_.useState)(!1),2),ce=le[0],de=le[1],ue=(0,s._)((0,_.useState)(!1),2),me=ue[0],ve=ue[1],fe=(0,s._)((0,_.useState)(!1),2),pe=fe[0],_e=fe[1],he=(0,s._)((0,_.useState)([]),2),ge=he[0],xe=he[1],be=(0,s._)((0,_.useState)(1),2),ye=be[0],je=be[1],Ce=(0,s._)((0,_.useState)(""),2),Ne=Ce[0],Ie=Ce[1],ke=(0,v.d7)(Ne,250),Pe=(0,_.useMemo)(function(){return(0,a._)({type:"text",readonly:!0,placeholder:"نام شهر خود را تایپ کنید",title:"شهر محل سکونت خود را انتخاب کنید"},b)},[b]),Ae=(0,_.useMemo)(function(){return(ke||"").trim().length>0},[ke]),we=(0,_.useCallback)(function(e){var t=Array.isArray(e)?e.map(function(e){return(0,r._)((0,a._)({},e),{children:Array.isArray(null==e?void 0:e.children)?e.children:[]})}):[];return"SINGLE"===c?t:t.map(function(e){return(0,r._)((0,a._)({},e),{children:[{order:null,description:null,isAllSelector:!0,parent_id:e.id,id:"ALL-".concat(e.id),title:"همه شهرهای استان ".concat(e.title)}].concat((0,o._)(e.children))})})},[c]),Se=j.length>0?j:Q,Te=(0,_.useMemo)(function(){return we(Se||[])},[Se,we]),Le=(0,_.useMemo)(function(){return Te.flatMap(function(e){return e.children})},[Te]),Ee=(0,_.useMemo)(function(){var e=function(e){return e.filter(function(e){return e.title.includes(ke)})};return Ae?Te.flatMap(function(t){return e(t.children).map(function(e){return(0,r._)((0,a._)({},e),{provinceTitle:e.title===t.title?"":t.title})})}):(null==ie?void 0:ie.children)?e(ie.children):[]},[ke,ie,Ae,Te]),Me=(0,_.useMemo)(function(){return Ae?Ee:null==ie?void 0:ie.children},[Ae,Ee,ie]),Oe=(0,_.useMemo)(function(){return Le.filter(function(e){return se.includes(e.id)})},[Le,se]),Be=(0,_.useMemo)(function(){return Oe.filter(function(e){return!e.isAllSelector})},[Oe]),Ue=function(){"SINGLE"===c&&ie&&Oe.length>0&&te("".concat(ie.title,"، ").concat(Oe[0].title)),te(Oe.reduce(function(e,t){return t.id==="ALL-".concat(t.parent_id)?e:e+t.title+(Oe.length>1?"، ":"")},""))},Ve=function(){null==n||n(!1),de(!1),oe(V)},Ge=(null==Me?void 0:Me.length)!==ge.length,Fe=(0,_.useCallback)(function(){je(function(e){return e+1}),xe(function(e){return(0,o._)(e).concat((0,o._)(Me.slice(10*ye,10*(ye+1))))})},[Me,ye]),ze=(0,_.useCallback)(function(e){return Te.find(function(t){return t.id===e})},[Te]),Re=(0,_.useCallback)(function(){setTimeout(function(){Ue();var e="SINGLE"===c?Be[0]:Be;if(null==n||n(!1),"SINGLE"===c&&e){var t=ze(e.parent_id);e=(0,r._)((0,a._)({},e),{parent:t})}k(e),de(!1)},0)},[Be,k]),qe=(0,_.useCallback)(function(e){var t=ze(e);return!!t&&t.children.every(function(e){return se.includes(e.id)||e.id==="ALL-".concat(e.parent_id)})},[ze,se]),We=(0,_.useCallback)(function(){"MULTIPLE"===c&&se.length>0?setTimeout(function(){de(!0)},0):setTimeout(function(){Ve()},0)},[c,se]),De=(0,_.useCallback)(function(e,t){oe(t?function(t){return(0,o._)(t).concat([e])}:function(t){return t.filter(function(t){return e!==t})})},[]),Ze=(0,_.useCallback)(function(e,t){var n=ze(t);n&&n.children.forEach(function(t){De(t.id,e)})},[ze,De]);(0,_.useEffect)(function(){xe((null==Me?void 0:Me.slice(0,10))||[]),je(1)},[ie,ke,Me]),(0,_.useEffect)(function(){_e(!1),ve(!1)},[ge]),(0,_.useEffect)(function(){t&&(Ie(""),ae(null))},[t]),(0,_.useEffect)(function(){if("SINGLE"===c&&Ae&&(null==Oe?void 0:Oe.length)){var e=Te.filter(function(e){return Oe[0].parent_id===e.id});ae(function(){return e.length>0?e[0]:null})}(null==V?void 0:V.length)&&!(null==ee?void 0:ee.length)&&Ue()},[Oe]),(0,_.useEffect)(function(){d()(V,se)||oe(V)},[V]);var He=(0,_.useMemo)(function(){return 0===se.length||d()(V,se)},[se,V]),Qe=(0,_.useCallback)(function(){return(0,l.jsx)(I(),{display:"flex",justifyContent:"flex-end",children:(0,l.jsx)(P(),{className:m()["select-city-modal__footer-action"],size:"lg",label:"تایید",color:"primary",onClick:Re,fullWidth:!W.isPc,disabled:He})})},[Re]),Xe=(0,_.useMemo)(function(){return(0,a._)({showClose:!0,title:"انتخاب شهر",fullScreen:!W.isPc,isInternalScroll:!0,footerComponent:Qe(),isFullScreenBordered:!W.isPc,bodyClass:m()["select-city-modal__body"],headerClass:m()["select-city-modal__header"]},g)},[g,Qe,W.isPc]),Ke=function(e){setTimeout(function(){ae(e)},0)},Ye=(0,_.useCallback)(function(e){setTimeout(function(){oe([Number(e)])},0)},[]),Je=function(e){setTimeout(function(){!function(e){oe(function(t){return t.filter(function(t){return t!==e})})}(e)},0)},$e=(0,_.useCallback)(function(){return pe&&(0,l.jsx)(O(),{variant:"circle"})},[pe]),et=(0,_.useMemo)(function(){return{List:R,Footer:$e}},[$e]);return(0,l.jsxs)("div",{children:[void 0!==u&&u&&(0,l.jsx)("span",{onClick:function(){return n(!0)},"aria-hidden":"true",children:(0,l.jsx)(E(),(0,r._)((0,a._)({value:ee},Pe),{suffixIcon:"bi-angle-left"}))}),(0,l.jsxs)(U(),(0,r._)((0,a._)({size:"sm",show:t,className:m()["select-city-modal"],beforeClose:We},Xe),{children:[!!X&&(0,l.jsx)("div",{className:m()["select-city-modal__loading"],children:(0,l.jsx)(O(),{})}),K&&(0,l.jsx)("div",{className:m()["select-city-modal__loading"],children:(0,l.jsx)(P(
1),{label:"تلاش مجدد","center-icon":"bi-refresh-single",onClick:function(){return Y()}})}),Te.length>0&&(0,l.jsxs)(l.Fragment,{children:[!!S&&S,(0,l.jsx)("div",{className:m()["select-city-modal__subheader"],children:0===se.length?(0,l.jsx)("span",{className:m()["select-city-modal__subheader-hint"],children:"SINGLE"===c?"یک شهر انتخاب کن.":"حداقل یک شهر انتخاب کن."}):(0,l.jsx)("div",{className:m()["select-city-modal__subheader-selected-items"],children:"SINGLE"!==c&&Be.map(function(e){return(0,l.jsx)(G(),{size:"lg",label:e.title,onClose:function(){return Je(e.id)}},e.id)})})}),(0,l.jsxs)("div",{className:m()["select-city-modal__search"],children:[(0,l.jsx)(T(),{name:"bi-search",color:"var(--gray-300)"}),(0,l.jsx)("input",{value:Ne,ref:Z,onInput:function(e){Ie(e.target.value),ve(!0)},type:"search",name:"city",placeholder:"جست‌وجو در شهرها",autoComplete:"off"}),!!Ae&&(0,l.jsx)(P(),{variant:"plain",color:"var(--gray-600)",icon:"bi-close",size:"xs",className:m()["select-city-modal__search-close"],onClick:function(){Ie("")}})]}),!ie&&!Ae&&(0,l.jsxs)("div",{className:m()["select-city-modal__provinces"],children:[(0,l.jsx)("span",{className:m()["select-city-modal__provinces-title"],children:"استان‌ها"}),(0,l.jsx)("div",{className:m()["select-city-modal__provinces-list"],children:Te.map(function(e){return(0,l.jsxs)("div",{tabIndex:"0",role:"button",className:m()["select-city-modal__province-item"],onClick:function(){return Ke(e)},onKeyDown:function(){return Ke(e)},"aria-hidden":"true",children:[(0,l.jsx)("span",{children:e.title}),(0,l.jsx)("i",{className:"bi-angle-left"})]},e.id)})})]}),(ie||Ae)&&(0,l.jsxs)("div",{className:m()["select-city-modal__cities"],children:[ie&&!Ae?(0,l.jsx)(I(),{mt:W.isPc?20:16,children:(0,l.jsx)(P(),{label:"برگشت به لیست استان‌ها","side-icon":"bi bi-right",variant:"text",size:"md",icon:"bi-right",className:m()["select-city-modal__cities-action"],onClick:function(){setTimeout(function(){ae(null),Ie("")},0)}})}):null,(0,l.jsx)("div",{ref:J,className:m()["select-city-modal__cities-list"],children:me?(0,l.jsx)(O(),{variant:"circle"}):(null==ge?void 0:ge.length)?(0,l.jsx)(z(),{useWindowScroll:!1,totalCount:(null==ge?void 0:ge.length)||0,data:ge,itemContent:function(e,t){return(0,l.jsx)("div",{className:m()["select-city-modal__city-item"],children:(0,l.jsx)(C,{type:c,city:t,selectCity:Ye,showProductCount:M,selectedIds:se,handleCheckbox:De,toggleAllCitiesOfProvince:Ze,isAllCitiesOfProvinceSelected:qe})},t.id)},endReached:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];!pe&&Ge&&(_e(!0),Fe.apply(void 0,(0,o._)(t)))},components:et,customScrollParent:J.current,atBottomThreshold:5,overscan:{main:5,reverse:5}}):(0,l.jsxs)("div",{className:m()["select-city-modal__empty"],children:[(0,l.jsx)("img",{className:m()["select-city-modal__empty-image"],src:"".concat(D,"/public-83/admin/b28/05-18/2SGa8XCKw2btXkd2Xb5L1K8wry9UF9cdiTLXP5XlmQtWUqQ9yA.png"),alt:""}),(0,l.jsx)("p",{className:m()["select-city-modal__empty-title"],children:"متأسفانه چنین شهری پیدا نکردیم"}),(0,l.jsx)("p",{className:m()["select-city-modal__empty-text"],children:"شاید اسم یا املای دیگه‌ای بنویسی، بتونیم پیداش کنیم."})]})})]})]})]})),(0,l.jsx)(w(),{show:ce,title:"همه تیک‌ها می‌پره!",description:"اگر بری بیرون، همه انتخاب‌هات تیک‌‌شون برداشته می‌شه. مطمئنی می‌خوای بری بیرون؟",confirmLabel:"بله، مطمئنم!",cancelLabel:"نه، بمونیم",modalProps:{hasPopstate:!1,noClose:!1},onClose:function(){return de(!1)},onConfirm:Ve})]})}},44105:function(e){e.exports={cpi__title:"_1hCORv","cpi__order-card":"oovOkE",cpi__item:"_5DisIH","cpi__item-icon":"qCyvhm"}},44862:function(e,t,n){"use strict";n.d(t,{G6:function(){return s},H8:function(){return r},LM:function(){return a},cM:function(){return l},e_:function(){return o},ph:function(){return i}});var i=2,a=3,r="productShippingTooltip",s=Object.freeze({FREE:"free",PAID:"paid"}),o=Object.freeze({PAID:1,FREE:2,FREIGHT_COLLECT:3}),l=Object.freeze({DAY:"روزه",HOUR:"ساعته",MINUTE:"دقیقه"})},45792:function(e){e.exports={"empty-cart":"wovPcr","empty-cart__loading":"oNEMcq","empty-cart__img":"kAI1rK","empty-cart__text":"L_xotb","empty-cart__subtitle":"pfiNkX","empty-cart__btn":"R7PaZ3","empty-cart__list":"G03Y_s","empty-cart__list-title":"xs_Al9"}},49522:function(e,t,n){"use strict";n.d(t,{Kn:function(){return r},Zn:function(){return l},_B:function(){return a},c4:function(){return s},i4:function(){return i},o2:function(){return o},wV:function(){return c}});var i={pdp:"pdp",pgp:"pgp",home:"home",share:"share",vendor:"vendor",hashtag:"hashtag"},a={default:"default",compactGrid:"compact-grid"},r={top_reels:"top-reels",mlt_reels:"mlt-reels",user_reels:"user-reels",owner_reels:"owner-reels",single_reels:"single-reels",search_reels:"search-reels",hashtag_reels:"hashtag-reels",product_reels:"product-reels",related_reels:"related-reels",can_create_reels:"can_create_reels",mixed_discovery:"mixed-page-discovery",products_has_reels:"products-has-reels",search_score_reels:"search-score-reels"},s=[{id:"review",icon:"bi-box",title:"معرفی محصول",requiresProducts:!0,description:"اگه داری توی ویدئوت مستقیم محصولاتت رو معرفی می‌کنی، این دسته رو انتخاب کن."},{id:"business",icon:"bi-vendor",title:"معرفی غرفه",requiresProducts:!1,description:"ویدئوهای مربوط به معرفی غرفه، محل کار و مراحل تولید محصولت توی این دسته قرار می‌گیرن."},{id:"tutorial",title:"آموزشی",icon:"bi-lamp-shine",requiresProducts:!1,description:"برای ویدئوهای آموزشی این دسته رو انتخاب کن. مثلاً اگه قراره نحوه استفاده از محصولت رو به خریدار یاد بدی."}],o={id:"other",title:"سایر",icon:"bi-video-circle",requiresProducts:!1,description:"برای ویدئوهای انگیزشی، مناسبتی و ویدئوهایی که مربوط به محصول و غرفه‌ت نیست، این دسته مناسبه."},l={create_no_products:{message:"در دسته معرفی محصول، باید حداقل یک محصول به ویدئو اضافه کرده باشی."},edit_current_review_no_products:{message:"در دسته معرفی محصول، باید حداقل یک محصول به ویدئو اضافه کرده باشی."},edit_cant_to_other:{message:"فعلا امکان تغییر به نوع سایر Ù
1†Ø¯Ø§Ø±Ù‡. برای داشتن ویدئو در این نوع، یه ویدئوی جدید ثبت کن."},edit_cant_to_tutorial:{message:"فعلا امکان تغییر به نوع آموزشی وجود نداره. برای داشتن ویدئو در این نوع، یه ویدئوی جدید ثبت کن."},edit_cant_to_review:{message:"فعلا امکان تغییر به نوع معرفی محصول وجود نداره. برای داشتن ویدئو در این نوع، یه ویدئوی جدید ثبت کن."},edit_cant_to_business:{message:"فعلا امکان تغییر به نوع معرفی غرفه وجود نداره. برای داشتن ویدئو در این نوع، یه ویدئوی جدید ثبت کن."}},c={message:"فعلاً امکان تغییر نوع ویدئو به معرفی محصول یا معرفی غرفه وجود نداره. برای داشتن ویدئو در این نوع‌ها، یه ویدئوی جدید ثبت کن."}},58882:function(e,t,n){"use strict";var i=function(){var e=(0,w.U)().staticsOrigin,t=(0,d._)((0,I.useState)(!1),2),n=t[0],i=t[1];return(0,m.jsx)("div",{className:P().error,children:(0,m.jsxs)(E(),{children:[(0,m.jsx)("img",{src:"".concat(e,"/public/admin/2gEJ/01-17/cJ6WkvFgnB2nW23i5LFPUHol64T1QjKBqwPKuWi4fzWsT2eyF4.svg"),alt:"خطای ناشناخته",className:P().error__image}),(0,m.jsx)("p",{className:P().error__hint,children:"متأسفانه خطای فنی پیش اومده."}),(0,m.jsx)("div",{className:P().error__actions,children:(0,m.jsx)(T(),{loading:n,label:"تلاش دوباره",onClick:function(){(0,A.Bk)()&&(window.location.reload(),i(!0),setTimeout(function(){i(!1)},3e4))},fullWidth:!0})})]})})},a=function(e){var t=e.active,n=e.onChange,i=e.className,a=e.isLoading,r=e.firstCartItemCount,s=e.secondCartItemsCount,o=(0,w.U)().ua,l=(0,I.useMemo)(function(){return[{title:"سبد خرید",value:"firstCart",count:r||null},{value:"secondCart",title:"سبد خرید بعدی",count:s||null}]},[r,s]);return(0,m.jsx)("div",{className:i,children:a?(0,m.jsx)(Fe.A,{}):(0,m.jsx)(Ge(),{tabs:l,value:t,fullWidth:!o.isPc,onChange:n})})},r=function(e){var t,n=e.cart,i=e.payment,a=e.isLoading,r=e.onUpdate,s=e.kalabargProducts,o=(0,w.U)().ua,l=(0,re.H)().getFeatureValue,c=(0,j.Z2)(["orderCount"]).orderCount,d=(0,dt.z)({},{refetchOnMount:!0}),u=d.data,v=d.refetch,f=d.isLoading,p=null==n?void 0:n.address,_=null==n?void 0:n.vendors,h=i.paymentMethod,g=i.setPaymentType,x=i.otherMethodOptions,b=i.activeProviderOption,y=i.setOtherMethodOptions,C=i.setActiveProviderOption,N=(0,ae.H)(_).invalidVendors,k=(0,I.useMemo)(function(){var e,t={};return null==u||null==(e=u.parcels)||e.forEach(function(e){t[e.vendorId]=e}),t},[u]),P=(0,I.useMemo)(function(){return l("show_recipient_info")||{showRecipientInfo:!1,text:"شماره تماس شما برای غرفه‌دار این محصولات و «شرکت پست ایران» ارسال خواهد شد."}},[l]),A=(0,I.useCallback)(function(){r(!0),v()},[v,r]),S=a||f;return(0,m.jsxs)("div",{className:st().cart,children:[null==n||null==(t=n.vendors)?void 0:t.map(function(e){return(0,m.jsx)(ot.A,{vendor:e,isSingleStepCart:!0,refetch:A,vendors:null==n?void 0:n.vendors,kalabargProducts:s,deficitAmount:N[e.id],isShippingLoading:f,shippingRates:k[e.id]},e.id)}),(0,m.jsxs)("div",{className:st().cart__info,children:[(0,m.jsxs)("div",{className:st().cart__section,children:[(0,m.jsx)("h4",{className:st()["cart__section-title"],children:"آدرس"}),(0,m.jsx)(ct.A,{address:p,onRefetch:A}),(0,m.jsxs)(D(),{pb:16,display:"flex",alignItems:"center",className:st().cart__hint,children:[(0,m.jsx)(xe(),{size:"16",name:"bi-info",className:st()["cart__hint-icon"]}),P.text]})]}),(0,m.jsxs)("div",{className:st().cart__section,children:[(0,m.jsx)("h4",{className:st()["cart__section-title"],children:"روش پرداخت"}),(0,m.jsx)(it.A,{isNewVersion:!0,isSingleStepCart:!0,invoiceId:null==n?void 0:n.id,payableAmount:null==n?void 0:n.payableAmount,className:st().cart__payment,activeMethod:h,activeProviderOption:b,setActiveProviderOption:C,otherMethodOptions:x,setOtherMethodOptions:y,onChange:g})]})]}),(0,m.jsx)(nt.A,{payableAmount:null==n?void 0:n.payableAmount,vendors:null==n?void 0:n.vendors,coupon:null==n?void 0:n.coupon,campaignIds:null==n?void 0:n.campaignIds,isLoading:S,isUnsuccessfulPayment:!1,className:st().cart__coupon}),c<=5&&(0,m.jsx)(lt.A,{hasBorder:!0,isSlider:o.isMobile,slidesOffset:24*!o.isPc,className:st().cart__trust}),(0,m.jsx)(at.A,{isNewVersion:!0,cart:n,defaultOpenIndex:-1,isLoading:S,paymentMethod:h,activeProviderOption:b,isUnsuccessfulPayment:!1,className:st().cart__factor})]})},s=function(){var e,t,n,i,s,f,_,x,y,C,N,k,P,A=(0,w.U)(),S=A.isWebview,T=A.ua,L=T.isMobile,M=T.isPc,O=(0,ee.A)(),B=(0,j.Z2)(["isLoggedIn"]).isLoggedIn,U=(0,re.H)(),V=U.runGBTest,G=U.evaluateGBTest,F=(0,qe._q)(["webviewActiveTab"]).webviewActiveTab,R=(0,I.useRef)(null),q=(0,I.useRef)(!1),W=(0,z.vS)(R),D="next"===(null==(f=O.query)?void 0:f.tab)?"secondCart":"firstCart",Z=(0,Ze.u)(),H=yt();t=(e=(0,re.H)()).getFeatureValue,n=e.isReadyGrowthbook,(0,I.useMemo)(function(){return{value:!!n&&t("cart_aa_test",!1)}},[t,n]);var Q=(0,I.useMemo)(function(){var e;return null==(e=V(Ct,!1))?void 0:e.value},[V]),X=(0,tt.v)({refresh:!0,enabled:!1,sourcePage:Q?Ye.Ex.CHECKOUT:Ye.Ex.BASKET}),K=Me({enabled:B}).data,Y=X.isLoading||B&&X.isPending,J=null==(_=X.data)?void 0:_.vendors,$=!(null==J?void 0:J.length),ne=!($&&!Y)||"secondCart"===D,ie=null!=(i=null==(x=X.data)?void 0:x.itemCount)?i:Z.itemCount,ae
1=B&&!$&&Q,se=null!=(s=null==K||null==(k=K.pages)||null==(N=k[0])||null==(C=N.secondBasket)||null==(y=C.listing)?void 0:y.itemsCount)?s:null,oe=(0,d._)((0,I.useState)(!1),2),ce=oe[0],de=oe[1],ue=(0,ze.u)({isInstantBuy:Q,isCartQueryEnabled:!1}),me=ue.goToBank,ve=ue.doPayment,fe=ue.paymentMethod,pe=ue.setPaymentType,_e=ue.otherMethodOptions,he=ue.activeProviderOption,ge=(0,We.a)({goToBank:me,paymentMethod:fe,setPaymentType:pe}),xe=ge.openGoldSellFlow,be=ge.goldSellFlowProps,ye=(0,et.c)(X.data),je=ye.productsBadges,Ce=ye.kalabargProducts,Ne=ye.isLoading,Ie=(0,I.useCallback)(function(e){!0!==e&&B||X.refetch()},[B,X]),ke=(0,I.useCallback)(function(){if(X.data){var e,t,n,i,a,r=(0,jt.KR)(J);(0,g.publishEvent)("cartView",(0,c._)((0,l._)({},r),{items:(0,jt.nx)(J),value:null==(t=X.data)?void 0:t.totalPrice,addressId:null!=(e=null==(i=X.data)||null==(n=i.address)?void 0:n.id)?e:null,totalProductPrice:null==(a=X.data)?void 0:a.totalPrimaryPrice}))}},[X.data,J]),Pe=(0,I.useCallback)(function(e){"firstCart"===e?(ke(),O.replace("/cart".concat("navigation"===O.query.from?"?from=navigation":""))):O.replace("/cart?tab=next".concat("navigation"===O.query.from?"&from=navigation":""))},[ke,O]),Ae=(0,I.useCallback)(function(){O.push("/cart/shipping")},[]),we=(0,I.useCallback)(function(){fe.type===De.Ay.GOLD?xe():fe.type===De.Ay.KALABARG?(null==Ce?void 0:Ce.length)>0?me():de(!0):me()},[fe.type,null==Ce?void 0:Ce.length,me,xe]),Se=(0,I.useMemo)(function(){return B&&Q?{activeTab:D,isLoading:Y,paymentMethod:fe,type:"payment",otherMethodOptions:_e,activeProviderOption:he,secondCartItemsCount:se,refreshCartParam:!0,onGoNextPage:we,cartInfo:X.data,className:h()["cart-page__invoice"],paymentLoading:ve.isPending||ve.isSuccess||Ne}:{activeTab:D,isLoading:Y,onGoNextPage:Ae,secondCartItemsCount:se,refreshCartParam:!0,cartInfo:X.data}},[Y,D,B,Ae,fe,we,Q,Ne,_e,ve.isPending,ve.isSuccess,X.data,he,se]);return(0,I.useEffect)(function(){B?X.refetch():(0,o._)(function(){return(0,u._)(this,function(e){switch(e.label){case 0:return[4,H.refetch()];case 1:return e.sent(),[4,X.refetch(!0)];case 2:return e.sent(),[2]}})})()},[B]),(0,I.useEffect)(function(){var e,t;X.data&&!q.current&&(q.current=!0,ke(),B&&(null==(t=X.data)||null==(e=t.vendors)?void 0:e.length)>0&&G(Ct))},[X.data]),(0,z.RT)(function(){S&&"/cart"===F&&X.refetch()},[S,F]),(0,I.useEffect)(function(){if(S&&window.WebviewInterfaceVersion===te.L0.PARTIAL_WEBVIEW){var e,t=(0,te.bI)();null==t||null==(e=t.setToolbarVisibility)||e.call(t,!1)}},[S]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(p(),{children:[(0,m.jsx)("title",{children:"سبد خرید | باسلام"}),(0,m.jsx)("meta",{"data-hid":"robots",name:"robots",content:"noindex"})]}),(0,m.jsx)("style",{children:"body { background-color: var(--white) }"}),M&&(0,m.jsx)($e.default,{}),!M&&(0,m.jsx)(Je.default,{active:"CART",ref:R,top:ne&&!Y&&(0,m.jsx)(Re.A,(0,l._)({},Se))}),(0,m.jsxs)("div",{className:(0,v.default)(h()["cart-page"]),children:[(0,m.jsxs)(E(),{fluid:L,children:[(0,m.jsx)("div",{className:h()["cart-page__payable-invoice"],children:(0,m.jsx)(gt,{})}),(0,m.jsx)(a,{active:D,isLoading:Y,className:h()["cart-page__tabs"],firstCartItemCount:ie,secondCartItemsCount:se,onChange:Pe}),(0,m.jsxs)(Qe(),{noGutter:L,children:[(0,m.jsx)(Qe().Col,{xs:{order:1,size:12},lg:{order:0,size:ne&&M?8:12},children:"firstCart"===D?ae?(0,m.jsx)(r,{payment:ue,onUpdate:Ie,isLoading:Y,cart:null==X?void 0:X.data,kalabargProducts:Ce}):(0,m.jsx)(le,{vendors:J,onUpdate:Ie,isLoading:Y,isSingleStepCart:Q,basketId:null==(P=X.data)?void 0:P.id,productsBadges:je}):(0,m.jsx)(Ue,{})}),ne&&M?(0,m.jsx)(Qe().Col,{xs:{order:0,size:12},lg:{order:1,size:4},children:(0,m.jsx)(Ke(),{offsetTop:"16px",className:"cart-invoice-sticky",children:(0,m.jsx)(Re.A,(0,l._)({},Se))})}):null]})]}),!M&&(0,m.jsx)("div",{style:{height:"".concat(W,"px")}}),ce&&(0,m.jsx)(ut.A,{onClose:function(){return de(!1)}}),(0,m.jsx)(b.A,(0,l._)({},be))]})]})};n.d(t,{A:function(){return Nt}});var o=n(3050),l=n(57803),c=n(44258),d=n(3808),u=n(65699),m=n(31827),v=n(34458),f=n(12007),p=n.n(f),_=n(9860),h=n.n(_),g=n(39876),x=n(91616),b=n(95131),y=n(99858),j=n(9953),C=n(64030),N=n.n(C),I=n(99195),k=n(72157),P=n.n(k),A=n(86043),w=n(80105),S=n(90327),T=n.n(S),L=n(15358),E=n.n(L),M=n(766
153),O=n(83413),B=n(24363),U=n(36839),V=n.n(U),G=n(69961),F=n(27514),z=n(73025),R=n(58594),q=n.n(R),W=n(46312),D=n.n(W),Z=n(99107),H=n(20298),Q=n(86451),X=n(64496),K=function(e){var t,n,i,a,r,s,o,l,c,u,f,p,_=e.vendor,h=e.vendors,g=e.onUpdate,x=e.className,b=e.productsBadges,y=e.showAddressModal,C=e.deficitAmount,N=void 0===C?0:C,k=e.isPreparationTimeVisible,P=void 0===k||k,S=(0,w.U)().ua,T=(0,j.Z2)(["isLoggedIn"]).isLoggedIn,L=null==_||null==(t=_.items)?void 0:t.length,E=(0,H.UT)({enabled:T}).data,U=void 0===E?[]:E,R=null==(n=_.deliveryCosts)?void 0:n.base,W=null==(i=_.deliveryCosts)?void 0:i.grand,K=null==(a=_.deliveryCosts)?void 0:a.discount,Y=null==(r=_.basketLimits)?void 0:r.minPrice,J=(0,d._)((0,z.j1)(!1),2),$=J[0],ee=J[1],te=ee.open,ne=ee.close,ie=(0,I.useMemo)(function(){var e;return(null==(e=h.find(function(e){return e.id===_.id}))?void 0:e.arrivalDays)||0},[_.id,h]),ae=(0,I.useMemo)(function(){return _.items.filter(function(e){var t;return!(null==(t=e.errors)?void 0:t.length)})},[_.items]),re=(0,I.useMemo)(function(){return null!=W?W:ae.reduce(function(e,t){return e+t.deliveryCost},0)},[ae,W]),se=(0,I.useMemo)(function(){var e;return null==(e=_.rateSelected)?void 0:e.isFreightCollect},[_]),oe=(0,I.useCallback)(function(e){var t;return null==b||null==(t=b.find(function(t){return t.id===e}))?void 0:t.badges},[b]);return(0,m.jsxs)("div",{className:(0,v.default)(V()["cart-vendor"],x),children:[(0,m.jsxs)("div",{className:V()["cart-vendor__header"],children:[(0,m.jsxs)("div",{className:V()["cart-vendor__vendor"],children:[(0,m.jsxs)(D(),{display:"flex",alignItems:"center",children:[(0,m.jsx)(q(),{size:"28",pro:_.proEnabled,src:null==(l=_.owner)||null==(o=l.avatar)||null==(s=o.resized)?void 0:s.xs,className:V()["cart-vendor__vendor-avatar"]}),(0,m.jsx)(B.A,{href:"/".concat(_.identifier),className:V()["cart-vendor__vendor-link"],children:"غرفه ".concat(_.title)})]}),(0,m.jsxs)("small",{className:V()["cart-vendor__items-count"],children:[L," محصول"]})]}),(0,m.jsxs)("div",{className:V()["cart-vendor__subheader"],children:[(0,m.jsxs)(D(),{gap:40,"align-items":"center","justify-content":"space-between",display:S.isMobile?"block":"flex",children:[U.length>0&&(0,m.jsxs)("div",{className:V()["cart-vendor__subheader-delivery-info"],children:[(0,m.jsxs)("span",{className:V()["cart-vendor__subheader-delivery-info-key"],children:[(0,m.jsx)("i",{className:"bi-delivery-truck"})," هزینه ارسال:"]}),K>0&&!se&&(0,m.jsx)("span",{className:V()["cart-vendor__subheader-delivery-info-value--off"],children:(0,A.f2)(R,{currency:!0,separator:!0})}),(0,m.jsx)("b",{className:(0,v.default)(V()["cart-vendor__subheader-delivery-info-value"],(p={},(0,M._)(p,V()["cart-vendor__subheader-delivery-info-value--red"],!_.rateSelected),(0,M._)(p,V()["cart-vendor__subheader-delivery-info-value--green"],!re&&!se&&_.rateSelected),p)),children:_.rateSelected?(0,X.SW)(re,se):"نامشخص"})]}),(0,m.jsx)("div",{className:V()["cart-vendor__subheader-delivery-info"],children:(null==U?void 0:U.length)>0?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{className:V()["cart-vendor__subheader-delivery-info-key"],children:[(0,m.jsx)("i",{className:"bi-time"})," تخمین زمان تحویل:"]}),(0,m.jsx)("span",{className:(0,v.default)(V()["cart-vendor__subheader-delivery-info-value"],(0,M._)({},V()["cart-vendor__subheader-delivery-info-value--red"],!_.rateSelected)),children:_.rateSelected?(0,X.PS)((null==(c=_.rateSelected)?void 0:c.minEstimateDelivery)||0,(null==(u=_.rateSelected)?void 0:u.maxEstimateDelivery)||0,null==(f=_.rateSelected)?void 0:f.estimateDeliveryUnit):ie?"".concat(ie," روز آینده"):"نامشخص"})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:V()["cart-vendor__subheader-delivery-info-key"],children:"هزینه ارسال و زمان تحویل:"}),(0,m.jsx)("span",{className:V()["cart-vendor__subheader-delivery-info-value"],children:"وابسته به آدرس"}),T&&(0,m.jsxs)("span",{className:V()["cart-vendor__subheader-delivery-info-btn"],onClick:y,children:["وارد کردن آدرس ",(0,m.jsx)("i",{className:"bi-angle-left"})]})]})})]}),N>0&&(0,m.jsx)(Z.A,{onClick:te,deficitAmount:N,minimumPurchaseAmount:Y,className:V()["cart-vendor__subheader-free-shipping-progressbar"]})]}),!N&&(0,m.jsx)(G.A,{vendor:_,vendors:h})]}),$&&(0,m.jsx)(Q.A,{vendor:_,onClose:ne}),_.items.map(function(e){return(0,m.jsx)(F.A,{item:e,vendor:_,onUpdate:g,addresses:U,productBadges:oe(e.product.id),className:V()["cart-vendor__item"],isPreparationTimeVisible:P},e.id)}),_.parcelId&&(0,m.jsx)(O.A,{vendor:_})]})},Y=n(41522),J=n(45792),$=n.n(J),ee=n(58408),te=n(57652),ne=function(e){var t=e.isSecondCart,n=(0,w.U)(),i=n.isWebview,a=n.ua.isPc,r=n.staticsOrigin,s=(0,ee.A)();return(0,m.jsx)("div",{className:$()["empty-cart"],children:t?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("img",{alt:"no item",className:$()["empty-cart__img"],src:"".concat(r,"/public-2/admin/67gZL/04-30/zODlVbCzBSQxemJBFTwtA9dPd8txNdMd43cCvnIiTIKbIrZVBc.SVG")}),(0,m.jsx)("span",{className:$()["empty-cart__text"],children:"سبد خرید بعدیت خالیه"})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("img",{alt:"no item",className:$()["empty-cart__img"],src:"".concat(r,"/public-2/admin/67gZL/04-30/zODlVbCzBSQxemJBFTwtA9dPd8txNdMd43cCvnIiTIKbIrZVBc.SVG")}),(0,m.jsx)("span",{className:$()["empty-cart__text"],children:"سبد خریدت خالیه"}),(0,m.jsx)("div",{className:$()["empty-cart__subtitle"],children:"یه چرخی توی بازار بزن، شاید چیزی خواستی."}),(0,m.jsx)(T(),{label:"بازارگردی",size:a?"md":"xxs",className:$()["empty-cart__btn"],onClick:function(){var e=i&&window.WebviewInterfaceVersion===te.L0.MOSTLY_WEBVIEW,t=i&&!e?"/":"/discovery";"/discovery"===t&&(0,g.publishEvent)("discoveryMoreButtonClick",{location:"cart-empty-state"}),s.push(t)}})]})})},ie=n(94892),ae=n(75162),re=n(40409),se="not_removed",oe=N()(function(){return Promise.resolve().then(n.bind(n,5787
15))},{loadableGenerated:{webpack:function(){return[57875]}},ssr:!1}),le=function(e){var t,n,a,r,s=e.vendors,o=e.onUpdate,l=e.isLoading,c=e.productsBadges,u=e.isSingleStepCart,v=!(null==s?void 0:s.length),f=(0,j.Z2)(["isLoggedIn","currentUser"]).isLoggedIn,p=(0,d._)((0,I.useState)(!1),2),_=p[0],h=p[1],g=(0,H.UT)({enabled:f}).refetch,x=(0,Y.A)({refresh:!0,enabled:!1}),b=x.refetch,y=x.isError,C=(0,ae.H)(s).invalidVendors,N=(n=(t=(0,re.H)()).getFeatureValue,r=void 0===(a=t.isReadyGrowthbook)||a,(0,I.useMemo)(function(){var e=r?n("cart_product_preparation_date",se):se;return{variant:e,isPreparationTimeVisible:"removed"!==e}},[n,r])).isPreparationTimeVisible,k=(0,I.useMemo)(function(){return l?[{id:1,items:[1]},{id:2,items:[1,2]}]:[]},[l]),P=(0,I.useCallback)(function(e){var t,n=null==e||null==(t=e.items)?void 0:t.map(function(e){var t;return null==(t=e.product)?void 0:t.id}).filter(Boolean);return null==c?void 0:c.filter(function(e){return n.includes(e.id)})},[c]),A=(0,I.useCallback)(function(){h(!0)},[]);return y?(0,m.jsx)(i,{}):(0,m.jsxs)("div",{children:[k.map(function(e){return(0,m.jsx)(ie.A,{vendor:e,isGray:u},e.id)}),v&&!l&&(0,m.jsx)(ne,{}),(s||[]).map(function(e){return(0,m.jsx)(K,{showAddressModal:A,vendors:s,vendor:e,onUpdate:o,productsBadges:P(e),deficitAmount:C[e.id],isPreparationTimeVisible:N},e.id)}),_&&(0,m.jsx)(oe,{show:!0,onSuccess:function(){g(),b(),h(!1)},onClose:function(){return h(!1)}})]})},ce=n(94434),de=n.n(ce),ue=n(24018),me=n.n(ue),ve=n(11074),fe=n(15149),pe=n(24878),_e=n(83118),he=n(70050),ge=n(43206),xe=n.n(ge),be=n(57152),ye=n.n(be),je=n(41749),Ce=n.n(je),Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,A.n8)((0,A.f2)(e))},Ie=function(e){var t,n,i=e.item,a=(0,w.U)().ua.isMobile,r=(0,ve.jE)(),s=(0,fe.A)().addToCart,l=(0,_e.V)().dalan.openChatModal,c=(0,_e.V)().authForm.toggleModal,v=(0,j.Z2)(["orderCount","typeOfUser","isLoggedIn"]),f=v.orderCount,p=v.typeOfUser,_=v.isLoggedIn,h=(0,d._)((0,I.useState)(!1),2),b=h[0],y=h[1],C=(0,d._)((0,I.useState)(!1),2),N=C[0],k=C[1],P=(0,z.dh)().showSuccessSnackbar,A=(0,pe.j)(i),S=Math.round(i.primaryPrice-i.price),L=!!i.primaryPrice&&S>0,E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ve.n_)(he.tA,e)}({onError:x.ef,onSuccess:function(){(0,g.publishEvent)("removeFromNextCart",{productId:i.id,productName:i.name,productPrice:i.price,hasVariation:i.hasVariation,productOriginalPrice:i.primaryPrice}),r.invalidateQueries({queryKey:["cart-second-cart"]})}}),M=E.mutate,O=E.isPending,U=function(){k(!1),M(i.id)},V=function(){return(0,o._)(function(){var e,t;return(0,u._)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),y(!0),[4,s({product:i,autoHandleVariation:!0})];case 1:return n.sent(),(0,g.publishEvent)("addToCartFromNextCart",{typeOfUser:p,orderCount:f,price:i.price,productId:i.id,vendorId:null==(e=i.vendor)?void 0:e.id,primaryPrice:i.primaryPrice}),P("محصول با موفقیت به سبد اضافه شد"),U(),[3,4];case 2:return"ATC_ABORT"!==(null==(t=n.sent())?void 0:t.message)&&(0,x.ef)(t),[3,4];case 3:return y(!1),[7];case 4:return[2]}})})()};return(0,m.jsxs)("section",{className:me()["cart-item"],children:[(0,m.jsxs)(D(),{display:"flex",gap:16,p:a?12:24,children:[(0,m.jsx)(B.A,{href:A,"data-from":"cart","data-component":"second-cart","data-meta":null==i||null==(t=i.photo)?void 0:t.url,children:(0,m.jsx)(ye(),{src:null==i||null==(n=i.photo)?void 0:n.url,alt:i.name,className:me()["cart-item__image"]})}),(0,m.jsxs)("section",{className:me()["cart-item__details"],children:[(0,m.jsxs)(D(),{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,m.jsx)(B.A,{href:A,"data-from":"cart","data-component":"second-cart","data-meta":i.name,className:me()["cart-item__title"],children:i.name}),i.stock?!a&&(0,m.jsx)(T(),{size:"sm",color:"secondary",variant:"text",label:"افزودن به سبد خرید",loading:b,onClick:V}):(0,m.jsx)("strong",{className:me()["cart-item--unavailable"],children:"ناموجود"})]}),(0,m.jsxs)(D(),{display:"flex",justifyContent:a?"flex-end":"space-between",children:[!a&&(0,m.jsx)(T(),{size:"sm",variant:"text",className:me()["cart-item__delete-icon"],onClick:function(){return k(!0)},children:(0,m.jsx)(xe(),{size:"24",name:"bi-delete"})}),i.stock?(0,m.jsxs)(D(),{display:a?"block":"flex",gap:8*!a,alignItems:"center",children:[L&&(0,m.jsxs)("span",{className:me()["cart-item__discount"],children:[Ne(S)," تخفیف"]}),(0,m.jsxs)(D(),{display:"flex",alignItems:"center",children:[(0,m.jsx)("strong",{className:me()["cart-item__price"],children:Ne(i.price)}),(0,m.jsx)(xe(),{name:"bi bi-toman"})]})]}):(0,m.jsx)(T(),{square:!0,size:"xs",icon:"bi-chats",variant:"outline",onClick:function(){var e,t,n,a,r,s,o,d,u,m,v,f,p,h,x,b,y,j;_?i&&(l(null==(t=i.vendor)||null==(e=t.owner)?void 0:e.hashId,{attachedProductId:i.id,hasProductForWebview:{id:i.id,price:i.price,rating:null==i?void 0:i.rating,vendorId:null==(n=i.vendor)?void 0:n.id,inventory:null==i?void 0:i.inventory,status:null==(a=i.status)?void 0:a.value,reviewCount:null==i?void 0:i.reviewCount,title:i.title||i.name,primaryPrice:i.primaryPrice,vend
1orTitle:null==(r=i.vendor)?void 0:r.title,hasVariation:i.hasVariation,canAddToCart:null==i?void 0:i.canAddToCart,vendorCityName:null==(o=i.vendor)||null==(s=o.city)?void 0:s.name,vendorIdentifier:null==(d=i.vendor)?void 0:d.identifier,userId:(null==(m=i.vendor)||null==(u=m.user)?void 0:u.id)||(null==(f=i.vendor)||null==(v=f.owner)?void 0:v.id),picture:(null==(p=i.photo)?void 0:p.md)||(null==(h=i.photo)?void 0:h.original)||(null==(x=i.photo)?void 0:x.url)}}),(0,g.publishEvent)("chatOpen",{productId:i.id,receiverIsVendor:!0,comesFrom:"second-cart",receiverVendorId:null==(b=i.vendor)?void 0:b.id,receiverId:null==(j=i.vendor)||null==(y=j.owner)?void 0:y.id})):c()}})]})]})]}),a&&(0,m.jsxs)(D(),{px:8,pb:8,pt:8*!a,display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.stock?(0,m.jsx)(T(),{size:"sm",color:"secondary",variant:"text",icon:"bi-angle-right",label:"افزودن به سبد خرید",loading:b,onClick:V}):(0,m.jsx)("strong",{className:me()["cart-item--unavailable"],children:"ناموجود"}),(0,m.jsx)(T(),{size:"sm",variant:"text",icon:"bi-delete",className:me()["cart-item__delete-icon"],onClick:function(){return k(!0)}})]}),(0,m.jsx)(Ce(),{cancelLabel:"خیر",confirmLabel:"بله",loading:O,confirmIcon:"bi-trash",onConfirm:U,show:N,title:"حذف محصول از سبد بعدی",modalProps:{showHeader:!0},description:"می‌خوای این محصول رو از سبد خرید بعدیت حذف کنی؟",confirmVariant:a?"text":"fill",cancelColor:a?"secondary":"primary",cancelVariant:a?"text":"outline",onCancel:function(){return k(!1)},onClose:function(){return k(!1)}})]})},ke=n(73587),Pe=n.n(ke),Ae=function(){var e=(0,_e.V)().authForm.toggleModal;return(0,m.jsxs)("section",{className:Pe()["not-login"],children:[(0,m.jsx)("span",{children:"برای دیدن سبد خرید دوم لطفا وارد حساب کاربری خود شوید"}),(0,m.jsx)(T(),{label:"ثبت‌نام/ورود",onClick:e})]})},we=n(22234),Se=n.n(we),Te=n(54268),Le=n.n(Te),Ee=function(){return(0,w.U)().ua.isMobile?(0,m.jsxs)("section",{className:me()["cart-item"],children:[(0,m.jsxs)(D(),{display:"flex",gap:16,p:12,children:[(0,m.jsx)(Le(),{width:115,height:80}),(0,m.jsxs)("section",{className:me()["cart-item__details"],children:[(0,m.jsx)(D(),{display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,m.jsx)(Le(),{width:200,height:24})}),(0,m.jsx)(D(),{display:"flex",justifyContent:"flex-end",children:(0,m.jsx)(D(),{display:"block",alignItems:"center",children:(0,m.jsx)(D(),{display:"flex",alignItems:"center",children:(0,m.jsx)(Le(),{width:70,height:24})})})})]})]}),(0,m.jsx)("hr",{className:me()["cart-item__divider"]}),(0,m.jsxs)(D(),{p:8,display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,m.jsx)(Le(),{width:160,height:36}),(0,m.jsx)(Le(),{width:36,height:36})]})]}):(0,m.jsxs)("section",{className:me()["cart-item"],children:[(0,m.jsxs)(D(),{display:"flex",gap:16,p:24,children:[(0,m.jsx)(Le(),{width:140,height:120}),(0,m.jsxs)("section",{className:me()["cart-item__details"],children:[(0,m.jsxs)(D(),{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,m.jsx)(Le(),{width:260,height:24}),(0,m.jsx)(Le(),{width:130,height:36})]}),(0,m.jsxs)(D(),{display:"flex",justifyContent:"space-between",children:[(0,m.jsx)(Le(),{width:36,height:36}),(0,m.jsxs)(D(),{display:"flex",gap:8,alignItems:"center",children:[(0,m.jsx)(Le(),{width:70,height:21}),(0,m.jsx)(D(),{display:"flex",alignItems:"center",children:(0,m.jsx)(Le(),{width:70,height:24})})]})]})]})]}),(0,m.jsx)("hr",{className:me()["cart-item__divider"]})]})},Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ve.qu)((0,l._)({queryKey:["cart-second-cart"],initialPageParam:{offset:0},queryFn:function(e){var t=e.pageParam;return(0,he.QC)({params:{size:10,offset:(null==t?void 0:t.offset)||0}})},getNextPageParam:function(e,t){var n,i,a,r=(null==t?void 0:t.flatMap(function(e){var t,n,i;return null!=(t=null==(i=e.secondBasket)||null==(n=i.listing)?void 0:n.products)?t:[]}).length)||0;return r>=(null!=(n=null==(a=e.secondBasket)||null==(i=a.listing)?void 0:i.itemsCount)?n:0)?void 0:{offset:r}}},e))},Oe=n(25187),Be=n.n(Oe),Ue=function(){var e,t,n,a=(0,I.useRef)(!1),r=(0,j.Z2)(["isLoggedIn"]).isLoggedIn,s=Me({enabled:r}),o=s.data,l=s.isError,c=s.isLoading,d=s.hasNextPage,u=s.fetchNextPage,v=s.isFetchingNextPage,f=(null==o||null==(n=o.pages)||null==(t=n[0])||null==(e=t.secondBasket)?void 0:e.listing)?o:{pages:[{secondBasket:{listing:{products:[],itemsCount:0}}}]},p=(0,I.useMemo)(function(){var e;return null==f||null==(e=f.pages)?void 0:e.flatMap(function(e){var t,n,i;return null!=(t=null==(i=e.secondBasket)||null==(n=i.listing)?void 0:n.products)?t:[]})},[null==f?void 0:f.pages]),_=!(null==p?void 0:p.length),h=(0,I.useCallback)(function(e,t){return(0,m.jsx)(Ie,{item:t,className:Se()["second-cart__item"]},t.id)},[]),x=function(){return de()(3).map(function(e){return(0,m.jsx)(Ee,{vendor:e},e)})},b=(0,I.useCallback)(function(){return v?(0,m.jsx)(x,{}):null},[v]),y=(0,I.useMemo)(function(){return{Footer:b}},[b]),C=(0,I.useCallback)(function(){d&&!v&&u()},[d,v,u]);return(0,I.useEffect)(function(){var e,t,n,i=null==o||null==(e=o.pages)?void 0:e[0];(null==i?void 0:i.result)&&!a.current&&(a.current=!0,(0,g.publishEvent)("nextCartView",{totalCount:(null==(n=i.secondBasket)||null==(t=n.listing)?void 0:t.itemsCount)||0}))},[null==o?void 0:o.pages]),l?(0,m.jsx)(i,{}):(0,m.jsx)("div",{className:Se()["second-cart"],children:r?_&&!c?(0,m.jsx)(D(),{p:24,display:"flex",alignItems:"center",justifyContent:"center",children:(0,m.jsx)(ne,{isSecondCart:!0})}):c?(0,m.jsx)(x,{}):(0,m.jsx)(Be(),{data:p,totalCount:p.length,itemContent:h,components:y,className:Se()["second-cart__list"],endReached:C,atBottomThreshold:100,useWindowScroll:!0}):(0,m.jsx)(Ae,{})})},Ve=n(66347),Ge=n.n(Ve),Fe=n(29324),ze=n(33894),Re=n(96697),qe=n(67016),We=n(20179),De=n(62731),Ze=n(67186),He=n(31559),Qe
1=n.n(He),Xe=n(5408),Ke=n.n(Xe),Ye=n(5942),Je=n(66515),$e=n(56560),et=n(37258),tt=n(41250),nt=n(61493),it=n(4973),at=n(82795),rt=n(61170),st=n.n(rt),ot=n(7673),lt=n(22317),ct=n(78378),dt=n(43004),ut=n(74969),mt=n(44105),vt=n.n(mt),ft=n(61363),pt=n(34870),_t=n(24348),ht=n.n(_t),gt=function(){var e=(0,w.U)(),t=e.ua,n=e.staticsOrigin,i=(0,j.Z2)(["isLoggedIn"]).isLoggedIn,a=(0,pt.xc)({enabled:i,refetchOnMount:!0}).data,r=void 0===a?[]:a,s=(0,I.useMemo)(function(){return r.filter(function(e){return(0,A.CG)().isBefore((0,A.CG)(e.expiredAt))})},[r]);return(null==s?void 0:s.length)?t.isPc?(0,m.jsxs)(D(),{mt:32,mb:24,children:[(0,m.jsxs)(ht(),{variant:"heading-2",className:vt().cpi__title,children:["شما ",s.length," سفارش منتظر پرداخت دارید:"]}),(0,m.jsx)(D(),{mt:24,children:s.map(function(e){return(0,m.jsx)("section",{className:vt()["cpi__order-card"],children:(0,m.jsx)(ft.A,{from:"cart",order:e,activeTab:"payment"})},e.id)})})]}):(0,m.jsx)(B.A,{href:"/account/orders?tab=payment&sort=desc",children:(0,m.jsxs)(D(),{className:vt().cpi__item,children:[(0,m.jsxs)(D(),{display:"flex",alignItems:"center",children:[(0,m.jsx)("section",{className:vt()["cpi__item-icon"],children:(0,m.jsx)(ye(),{ratio:1,src:"".concat(n,"/public-35/admin/b28/09-16/W7cbSVhlTfSZbDLF1a4PWQkA0xLJoFQGc4XekyH1wZyjoDPz8N.png")})}),(0,m.jsxs)(ht(),{variant:"subtitle-sm",children:[null==s?void 0:s.length," سفارش منتظر پرداخت داری"]})]}),(0,m.jsx)(xe(),{size:"24",name:"bi-angle-left"})]})}):null},xt=n(65632),bt=n(16051),yt=function(){var e=(0,d._)((0,I.useState)(function(){return(0,X.OW)()}),2),t=e[0],n=e[1],i=(0,I.useMemo)(function(){return(Array.isArray(t)?t:[]).map(function(e){var t;return null==(t=e.product)?void 0:t.id}).filter(Boolean)},[t]),a=(0,bt.U)(i,{enabled:!1,onSuccess:function(e){var n=[],i=Array.isArray(null==e?void 0:e.products)?e.products:[],a=Array.isArray(t)?t:[];i.forEach(function(e){var t,i;n.some(function(t){return t.id===e.vendor.id})||n.push({items:[],id:e.vendor.id,freeShippingAmount:0,title:e.vendor.title,identifier:e.vendor.identifier,owner:{avatar:{resized:{xs:null==(i=e.vendor.owner)||null==(t=i.avatar)?void 0:t.extraSmall}}}})}),a.forEach(function(e){var t,a,r=e.product,s=e.quantity,o=e.variation,d=e.createdAt,u=i.find(function(e){return e.id===r.id}),m=n.find(function(e){var t;return e.id===(null==u||null==(t=u.vendor)?void 0:t.id)});if(u&&m){var v={quantity:s,createdAt:d,errors:[],id:u.id,variation:null,title:u.title,price:u.price,isFreightCollect:(0,xt.s)(u),vendor:(0,c._)((0,l._)({},m),{items:void 0}),product:{id:u.id,title:u.title,price:u.price,stock:u.inventory,category:null==u?void 0:u.category,photos:[{resized:{sm:null==(t=u.photo)?void 0:t.small}}],primaryPrice:u.primaryPrice||u.price,photo:(0,c._)((0,l._)({},u.photo),{sm:null==(a=u.photo)?void 0:a.small})}};o&&(v.variation=o,v.price=o.price,v.product.stock=o.stock,v.product.price=o.price,v.product.primaryPrice=o.primaryPrice),m.items.push(v)}}),(0,X.v)(n)}});return(0,c._)((0,l._)({},a),{refetch:function(){return n((0,X.OW)()),a.refetch()}})},jt=n(88879),Ct="test_one_step_cart";s.getInitialProps=function(e){var t=e.req,n=e.res,i=e.userId,a=e.isWebview,r=e.queryClient;return(0,o._)(function(){var e,s,o;return(0,u._)(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),t&&i&&a?[4,r.prefetchQuery({queryKey:["cart",i],queryFn:function(){return(0,y.nm)({refresh:!0,sourcePage:Ye.Ex.BASKET},{req:t,res:n}
1)}})]:[2,{}];case 1:return l.sent(),[2,{}];case 2:return e=l.sent(),o=422===(null==(s=(0,x.AI)(e))?void 0:s.statusCode)?404:s.statusCode||500,n&&(n.statusCode=o),[2,{error:{statusCode:o}}];case 3:return[2]}})})()};var Nt=s},61170:function(e){e.exports={cart:"xDBSqo",cart__info:"xFgJ6u",cart__section:"ekaZRE","cart__section-title":"_8SWqv9",cart__payment:"M1eamU",cart__factor:"hYbIp_",cart__coupon:"LKIR3Q",cart__trust:"GRsBKM",cart__hint:"fX2Cvg","cart__hint-icon":"_1auH1X"}},64491:function(e){e.exports={"bottom-navigation":"bL4ZpA","bottom-navigation__nav":"Q_F1dh","bottom-navigation__nav-item":"_5jDyz9","bottom-navigation__nav-item-title":"_7vw_9A","bottom-navigation__nav-item-count":"_8_ftrv","bottom-navigation__nav-item--active":"TP970F"}},66515:function(e,t,n){"use strict";var i=function(){var e=(0,v.U)().staticsOrigin,t=(0,p.H)().runGBTest,n=(0,f.V)().auth.setShouldShowBottomNavInstallApp,i=(0,r._)((0,m.useState)(!1),2),a=i[0],s=i[1],l=(0,m.useMemo)(function(){var e;return null==(e=t("install_app_bottom_navigation_banner"))?void 0:e.value},[t]),_=(0,m.useCallback)(function(){u.Ak.setItem("HAS_BOTTOM_NAV_INSTALL_APP_BANNER_HIDED",!0,43200),n(!1)},[n]),g=(0,m.useCallback)(function(){s(!0),(0,d.publishEvent)("appInstallTopOfNavbarBannerClick",{bannerType:l})},[l]),b=(0,m.useCallback)(function(){s(!1)},[]),j=(0,m.useCallback)(function(e){e(),(0,d.publishEvent)("appInstallTopOfNavbarBannerCodeCopy",{bannerType:l})},[l]),C=(0,m.useCallback)(function(e){(0,d.publishEvent)("appInstallTopOfNavbarBannerButtonClick",{bannerType:l,installSource:e})},[l]);return(0,o.jsxs)("div",{className:c().ip,children:[(0,o.jsx)(h(),{square:!0,size:"xxs",variant:"text",icon:"bi-close",color:"secondary","aria-label":"بستن",className:c().ip__close,onClick:_}),(0,o.jsx)("img",{alt:"باسلام",className:c().ip__icon,src:"".concat(e,"/public-216/admin/j50O7/06-30/9Hy4cRVVfdEjvOxrXzfvfiXQw8ihadmaXKtesNy5akEezGayKp.SVG")}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:c().ip__title,children:"تخفیف‌هایی که ازشون بی‌خبری!"}),(0,o.jsx)("span",{className:c().ip__subtitle,children:"with_coupon"===l?"300 هزار تومان تخفیف خرید اول از اپ باسلام":"با نصب اپ باسلام، زودتر ازشون با خبر شو"})]}),(0,o.jsx)(h(),{size:"xs",label:"نصب",variant:"outline",className:c().ip__action,onClick:g}),(0,o.jsxs)(y(),{show:a,title:"نصب اپلیکیشن باسلام",onClose:b,children:["with_coupon"===l&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:c()["ip__modal-coupon"],children:[(0,o.jsx)("span",{className:c()["ip__modal-coupon-title"],children:"300 هزار تومن تخفیف خرید اولی‌ها"}),(0,o.jsxs)("div",{className:c()["ip__modal-coupon-box"],children:[(0,o.jsx)("span",{className:c()["ip__modal-coupon-box-code"],children:"APPNC"}),(0,o.jsx)(x(),{value:"APPNC",children:function(e){var t=e.copy,n=e.copied;return(0,o.jsx)(h(),{size:"xs",variant:"outline",label:n?"کپی شد":"کپی کد",icon:n?"bi-tick-single":"bi-copy",className:c()["ip__modal-coupon-box-copy"],onClick:function(){return j(t)}})}})]})]}),(0,o.jsxs)("div",{className:c()["ip__modal-coupon"],children:[(0,o.jsx)("span",{className:c()["ip__modal-coupon-title"],children:"200 هزار تومن تخفیف مشتری‌های قدیمی"}),(0,o.jsxs)("div",{className:c()["ip__modal-coupon-box"],children:[(0,o.jsx)("span",{className:c()["ip__modal-coupon-box-code"],children:"APPOC"}),(0,o.jsx)(x(),{value:"APPOC",children:function(e){var t=e.copy,n=e.copied;return(0,o.jsx)(h(),{size:"xs",variant:"outline",label:n?"کپی شد":"کپی کد",icon:n?"bi-tick-single":"bi-copy",className:c()["ip__modal-coupon-box-copy"],onClick:function(){return j(t)}})}})]})]})]}),(0,o.jsx)("a",{target:"_blank",rel:"noopener noreferrer","aria-label":"دانلود مستقیم",className:c()["ip__modal-direct"],href:"".concat(e,"/app/basalam.apk"),onClick:function(){return C("android_direct")},children:(0,o.jsx)("img",{alt:"دانلود مستقیم",src:"".concat(e,"/public-208/admin/j50O7/06-14/qDtCZC96qbJqbsM3g0FIEemNniQE4UkgG9YDac90l4Od0QJ5Cj.SVG")})}),(0,o.jsxs)("div",{className:c()["ip__modal-stores"],children:[(0,o.jsx)("a",{target:"_blank",rel:"noopener noreferrer","aria-label":"دانلود از مایکت",className:c()["ip__modal-stores-dl"],href:"https://myket.ir/app/ir.basalam.app",onClick:function(){return C("android_myket")},children:(0,o.jsx)("img",{alt:"دانلود از مایکت",src:"".concat(e,"/public-208/admin/j50O7/06-14/cM5fJgLnEhtDIELP8PyhJU3oHVrxQIxEQ889w77inG1xkB8KVM.SVG")})}),(0,o.jsx)("a",{target:"_blank",rel:"noopener noreferrer","aria-label":"دانلود از بازار",className:c()["ip__modal-stores-dl"],href:"https://cafebazaar.ir/app/ir.basalam.app",onClick:function(){return C("android_bazaar")},children:(0,o.jsx)("img",{alt:"دانلود از بازار",src:"".concat(e,"/public-208/admin/j50O7/06-14/Vb1QqvPYDhYzSx1mMQctk96unwvOTblVhppoObUT23JgmfUXc3.SVG")})})]})]})]})};n.r(t),n.d(t,{default:function(){return U}});var a=n(3050),r=n(3808),s=n(65699),o=n(31827),l=n(23880),c=n.n(l),d=n(39876),u=n(86043),m=n(99195),v=n(80105),f=n(83118),p=n(40409),_=n(90327),h=n.n(_),g=n(72930),x=n.n(g),b=n(2796),y=n.n(b),j=n(64491),C=n.n(j),N=n(76653),I=n(34458),k=n(68939),P=n.n(k),A=n(9953),w=n(58408),S=n(38476),T=(0,m.memo)(function(e){var t,n,i,r,l=e.icon,c=e.title,u=e.count,m=e.active,v=e.onClick,p=e.eventUrl,_=e.hasPoint,h=e.itemIndex,g=e.path,x=void 0===g?"":g,b=e.activeIcon,y=e.isNeedLogin,j=e.hasProBadge,C=e.isShowCategory;e["data-testId"];var k=(0,w.A)(),T="/"===(null==(r=k.asPath)||null==(i=r.split("?"))||null==(n=i[0])||null==(t=n.split("#"))?void 0:t[0]),L=(0,f.V)().authForm.toggleModal,E=(0,A.Z2)(["orderCount","typeOfUser","isLoggedIn","isLoadingCurrentUser"]),M=E.orderCount,O=E.typeOfUser,B=E.isLoggedIn,U=E.isLoadingCurrentUser;return(0,o.jsxs)("div",{className:(0,I.default)(P()["bottom-navigation-item"],(0,N._)({},P()["bottom-navigation-item--active"],m)),onClick:function(e){return(0,a._)(function(){var t;return(0,s._)(this,function(n){switch(n.label){case 0:return[4,window.scheduler.yield()];case 1:return n.sent(),T&&requestIdleCallback(function(){(0,d.publishEvent)("homeClick",{item:h,componentIndex:0,itemMetaData:c,itemMetaDataType:"title",componentUi:"bottom_navigation",componentName:"bottom-navigation"})}),p&&(0,d.publishEvent)("bottomNavigationClick",{typeOfUser:O,orderCount:M,tabName:c,urlName:p}),y&&!B?(U||L(),[2]):(null==v||v(e),(t=k.pathname===x?null:x)&&((0,S.Vm)({targetUrl:t,meta:k.asPath,component:"bottom-navigation",from:(0,S.h7)(k.asPath,"home")}),C?setTimeout(function(){k.push(t)},300):k.push(t)),[2])}})})()},children:[(0,o.jsxs)("div",{className:(0,I.default)(P()["bottom-navigation-item__icon"],(0,N._)({},P()["bottom-navigation-item__icon--has-point"],_)),children:[(0,o.jsx)("img",{className:P()["bottom-navigation-item__icon-svg"],src:m?b:l,width:24,height:24,alt:c}),j&&(0,o.jsx)("span",{className:P()["bottom-navigation-item__pro-badge"],children:(0,o.jsx)("i",{className:"bi-pro-fill"})})]}),(0,o.jsx)("span",{className:P()["bottom-navigation-item__title"],children:c}),!!u&&!m&&(0,o.jsx)("span",{className:P()["bottom-navigation-item__count"],children:u})]})}),L=n(73025),E=n(81767),M=n(67186),O=n(67016),B=n(2339),U=(0,m.memo)(function(e){var t,n=e.top,l=e.active,c=e.ref,u=(0,w.A)(),f=(0,L.kQ)().emitEvent,_=(0,v.U)().isWebview,h=(0,r._)((0,m.useState)(l),2),g=h[0],x=h[1],b=(0,p.H)().getFeatureValue,y=(0,M.u)().itemCount,j=(0,A.Z2)(["bnpl","currentUser","typeOfUser","orderCount"]),N=j.bnpl,I=j.currentUser,k=j.typeOfUser,P=j.orderCount,S=(0,O._q)(["shouldShowBottomNavInstallApp"]).shouldShowBottomNavInstallApp,U=(0,B.dalanMapGetters)(["unseenMessages"]).unseenMessages,V=(0,m.useMemo)(function(){var e,t;return(null!=(e=null==U?void 0:U.chat)?e:0)+(null!=(t=null==U?void 0:U.notification)?t:0)},[null==U?void 0:U.chat,null==U?void 0:U.notification]),G=(0,r._)((0,m.useState)(!1),2),F=G[0],z=G[1],R=(null==N||null==(t=N.disableReason)?void 0:t.code)===E.nC.OVERDUE_DEBT,q=(0,m.useMemo)(function(){var e;return null==(e=b("chat_config"))?void 0:e.allow_not_login},[b]),W=(0,m.useCallback)(function(){return(0,a._)(function(){return(0,s._)(this,function(e){switch(e.label){case 0:return[4,window.scheduler.yield()];case 1:return e.sent(),x("HOME"),F&&(f("toggle-category-mobile",{isVisible:!1}),z(!1)),[2]}})})()},[F]),D=(0,m.useCallback)(function(){x("CATEGORY"),F||(f("toggle-category-mobile",{isVisible:!0}),z(!0))},[F]),Z=(0,m.useCallback)(function(){x("CART"),F&&(f("toggle-category-mobile",{isVisible:!1}),z(!1))},[F]),H=(0,m.useCallback)(function(){x("CHAT"),F&&(f("toggle-category-mobile",{isVisible:!1}),z(!1)),(0,d.publishEvent)("chatListView",{typeOfUser:k,orderCount:P,unreadChatListItemCount:null==I?void 0:I.unseenMessagesCount})},[F]),Q=(0,m.useCallback)(function(){x("ACCOUNT"),F&&(f("toggle-category-mobile",{isVisible:!1}),z(!1))},[F]);return(0,m.useEffect)(function(){_||(u.prefetch("/"),u.prefetch("/cart"),u.prefetch("/account"),u.prefetch("/account/chats"))},[_,u]),(0,o.jsxs)("div",{id:"bottom-navigation",ref:c,className:C()["bottom-navigation"],children:[l===g&&n,S&&(0,o.jsx)(i,{}),!_&&(0,o.jsxs)("nav",{className:C()["bottom-navigation__nav"],children:[(0,o.jsx)(T,{path:"/",itemIndex:0,title:"خانه",eventUrl:"home",icon:"/charsou-assets/unified/_next/static/media/home.09ac2b44.svg",activeIcon:"/charsou-assets/unified/_next/static/media/home-fill.f41cda05.svg",isShowCategory:F,active:"HOME"===g&&!F,onClick:W}),(0,o.jsx)(T,{itemIndex:1,title:"دسته‌بندی‌ها",eventUrl:"category",icon:"/charsou-assets/unified/_next/static/media/category.31079f85.svg",isShowCategory:F,activeIcon:"/charsou-assets/unified/_next/static/media/category-fill.dbb5dccc.svg",active:F||"CATEGORY"===g,onClick:D}),(0,o.jsx)(T,{path:"/cart",itemIndex:2,eventUrl:"cart",title:"سبد خرید",icon:"/charsou-assets/unified/_next/static/media/cart.ad412bf7.svg",count:y,activeIcon:"/charsou-assets/unified/_next/static/media/cart-fill.e687a7a1.svg",isShowCategory:F,active:"CART"===g&&!F,onClick:Z}),(0,o.jsx)(T,{itemIndex:3,title:"گفت‌وگو‌ها",eventUrl:"chat",count:V,icon:"/charsou-assets/unified/_next/static/media/chat.afc5cfa6.svg",path:"/account/chats",activeIcon:"/charsou-assets/unified/_next/static/media/chat-fill.690b3c78.svg",isShowCategory:F,isNeedLogin:!q,active:"CHAT"===g&&!F,onClick:H}),(0,o.jsx)(T,{itemIndex:4,isNeedLogin:!0,path:"/account",eventUrl:"profile",title:"حساب من",icon:"/charsou-assets/unified/_next/static/media/account.d0596f28.svg",isShowCategory:F,activeIcon:"/charsou-assets/unified/_next/static/media/account-fill.3582af62.svg",hasProBadge:null==I?void 0:I.proEnabled,hasPoint:R,active:"ACCOUNT"===g&&!F,onClick:Q})]})]})})},68939:function(e){e.exports={"bottom-navigation-item":"_B9G_j","bottom-navigation-item__icon":"NnNxOM","bottom-navigation-item__icon--has-point":"ruoP5A","bottom-navigation-item__title":"FPnqyE","bottom-navigation-item__count":"RLQqPM","bottom-navigation-item__icon-svg":"_2l6lcT","bottom-navigation-item__pro-badge":"QOWLow","bottom-navigation-item--active":"sbmTp7"}},72157:function(e){e.exports={error:"YCqEUQ",error__image:"_Norse",error__hint:"zk_x4u",error__actions:"_OkXX4"}},73587:function(e){e.exports={"not-login":"RcSxZT"}}}]);

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.