1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8254,744],{93766:function(e,t,n){n.d(t,{i:function(){return ModalLazyLoader}});var r=n(85893),i=n(67294),o=n(80226),a=n(82729),l=n(52015);function _templateObject(){let e=(0,a._)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n cursor: wait;\n"]);return _templateObject=function(){return e},e}let c=l.ZP.div.withConfig({componentId:"sc-4bcce21d-0"})(_templateObject()),ModalLazyLoader=()=>{let e=(0,i.useRef)(),[t,n]=(0,i.useState)();return(0,i.useEffect)(()=>(e.current&&clearInterval(e.current),e.current=setTimeout(()=>{n(!0)},800),()=>{clearInterval(e.current)}),[]),(0,r.jsx)(c,{children:t&&(0,r.jsx)(o.m9,{isNotForReload:!0})})}},28065:function(e,t,n){n.d(t,{d:function(){return i}});var r=n(91278);let i={getReviewById:e=>r.W.get("/reviews/".concat(e)),getReviewsList:(e,t)=>r.W.get("/profile/reviews",{params:e,...t}),getActionsReviewsList:(e,t)=>r.W.get("/profile/actions-review",{params:e,...t}),getProductsForReview:e=>r.W.get("/profile/products-for-review",e),postReviewRate:(e,t)=>r.W.post("/reviews/".concat(t,"/rate"),e),setReviewComment:e=>r.W.post("/reviews/".concat(e.reviewUuid,"/comment"),e.body),postCommentRate:(e,t)=>r.W.post("/reviews/comments/".concat(t,"/rate"),e)}},64100:function(e,t,n){n.d(t,{E:function(){return ActionButtons}});var r=n(85893),i=n(10055);let ActionButtons=e=>{let{submitButton:t,registrationButton:n,className:o,children:a}=e;return(0,r.jsxs)("div",{className:o,children:[t&&(0,r.jsx)(i.zx,{...t,children:t.value}),a,n&&(0,r.jsx)(i.zx,{...n,children:n.value})]})}},63057:function(e,t,n){n.d(t,{h:function(){return getErrorInfo}});var r=n(29204);let getErrorInfo=e=>{var t,n;if(!(0,r.IZ)(e))return{isAxios:!1};let i=null===(t=e.response)||void 0===t?void 0:t.status,o=null===(n=e.response)||void 0===n?void 0:n.data.errors,a=null==o?void 0:o[0];return{message:e.message,status:i,errors:o,errorData:a,isAxios:!0}}},86707:function(e,t,n){var r,i;n.d(t,{d:function(){return r}}),(i=r||(r={})).About="about",i.Accept="accept",i.Delivery="delivery",i.Comment="comment",i.ElektronnyeChekiEkologichnoIUdobno="elektronnye-cheki-ekologichno-i-udobno"},88501:function(e,t,n){n.d(t,{J:function(){return ImageWithFallback}});var r=n(85893),i=n(67294),o=n(42896),a=n(82729),l=n(52015);function _templateObject(){let e=(0,a._)(["\n width: 100%;\n height: 100%;\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,a._)(["\n ","\n object-fit: cover;\n -webkit-user-drag: none;\n -khtml-user-drag: none;\n -moz-user-drag: none;\n -o-user-drag: none;\n "]);return _templateObject1=function(){return e},e}let c={ImageWithFallback:l.ZP.img.withConfig({componentId:"sc-e5c2aad2-0"})(_templateObject1(),e=>{let{$hasSize:t}=e;return t?"":(0,l.iv)(_templateObject())})};var s=n(66901),u=n(33588),d=n(74712);let ImageWithFallback=e=>{let{className:t,height:n,width:a,image:l,errorComponent:m=(0,r.jsx)(u.D,{size:d.o.STRETCHED}),onClick:p,disableResize:f=!1,alternativePath:v=!1}=e,[w,h]=(0,i.useState)(!1),b=(0,i.useCallback)(()=>{h(!0)},[]),g=n&&a?{height:n,width:a,$hasSize:!0}:{$hasSize:!1},_=l&&((0,o.JF)(l.path)||f)?l.path:l&&n&&a?s.y.resize(l.path,{sizeX:a,sizeY:n,alternativeId:v?l.alternative:void 0}):l?s.y.resize(l.path,{}):"",j=(0,i.useCallback)(()=>{null==p||p(_)},[p,_]);return l&&_&&!w?(0,r.jsx)(c.ImageWithFallback,{className:t,...g,alt:l.alternative,onClick:j,onError:b,src:_,loading:"lazy",title:l.title}):(0,r.jsx)(r.Fragment,{children:m})}},13265:function(e,t,n){n.d(t,{A:function(){return o},x:function(){return a}});var r=n(18318),i=n(22888);let o={reviews:i.mr,bonusesForReview:i.IZ},a=[r.wS.RedirectPermanent,r.wS.RedirectFound,r.wS.BadRequest,r.wS.NotFound,r.wS.Locked,r.wS.ServerError,r.wS.Timeout,r.bX.NetworkError,r.bX.TimeoutError]},81157:function(e,t,n){n.d(t,{b:function(){return createUrlParamsReview}});let createUrlParamsReview=e=>{let{limitItem:t,pageNumber:n=1}=e,r=new URLSearchParams;return r.set("page","".concat(n)),r.set("limit","".concat(t)),r}},35589:function(e,t,n){n.d(t,{GY:function(){return c},Gr:function(){return p},Kv:function(){return l},PR:function(){return selectIsPersonalCommentOpen},Wp:function(){return u},nN:function(){return m},qe:function(){return a},sF:function(){return s},y6:function(){return d},yY:function(){return o}});var r=n(77236),i=n(96707);let select=e=>e[i.yE],o=(0,r.Yh)([select],e=>e.isReviewsPageInitialized),a=(0,r.Yh)([select],e=>e.updatingReviewsPage),l=(0,r.Yh)([select],e=>e.productReviews);(0,r.Yh)([select],e=>e.currentReviewId);let c=(0,r.Yh)([select],e=>e.productsForReviews),s=(0,r.Yh)([select],e=>e.actionsReviewList),u=(0,r.Yh)([select],e=>e.hasActiveActionsReviews),d=(0,r.Yh)([select],e=>e.hasMoreActionsReview),m=(0,r.Yh)([select],e=>e.hasMoreProductReview),p=(0,r.Yh)([select],e=>e.errorReviews),selectIsPersonalCommentOpen=e=>select(e).isNewCommentOpen},55216:function(e,t,n){n.d(t,{Fp:function(){return getReviewsAction},Ky:function(){return getProductsForReviewAction},bs:function(){return getActionsReviewAction}});var r=n(28065),i=n(69326),o=n(86102),a=n(13265),l=n(96707);let getReviewsAction=e=>{let{urlSearchParams:t,isAdditional:n,isUpdateAfterReviewCreation:c}=e;return async e=>{try{e((0,o.As)(l.R6.type));let s=n?void 0:a.x,u=await e((0,i.w)({api:()=>
1r.d.getReviewsList(t,{ignoreErrorDefaultHandlingCodes:s}),type:l.R6.type})),{productReviews:d,nav:{recordCount:m,pageSize:p,pageNomer:f}}=u.data.data;if(e((0,l.CC)(m-p*f>0)),c)return;e(n?(0,l.dc)(d):(0,l.R6)(d||[]))}catch(e){if(!c)throw e}finally{e((0,o.Se)(l.R6.type))}}},getActionsReviewAction=e=>{let{urlSearchParams:t,isAdditional:n,isUpdateAfterReviewCreation:c}=e;return async e=>{try{e((0,o.As)(l.fj.type));let s=n?void 0:a.x,u=await e((0,i.w)({api:()=>r.d.getActionsReviewsList(t,{ignoreErrorDefaultHandlingCodes:s}),type:l.fj.type})),{products:d,isActiveActions:m,nav:{recordCount:p,pageSize:f,pageNomer:v}}=u.data.data;if(e((0,l._L)(p-f*v>0)),e((0,l.l4)(m&&Array.isArray(d))),c)return;e(n?(0,l.v5)(d):(0,l.fj)(d))}catch(e){if(!c)throw e}finally{e((0,o.Se)(l.fj.type))}}},getProductsForReviewAction=function(){let{isUpdateAfterReviewCreation:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{try{var n;let o=await t((0,i.w)({api:()=>r.d.getProductsForReview({ignoreErrorDefaultHandlingCodes:a.x}),type:l.LL.type})),c=(null===(n=o.data.data)||void 0===n?void 0:n.productsForReviews)||[];(c.length||!e)&&t((0,l.LL)(c))}catch(n){if(!e)throw t((0,l.LL)([])),n}}}},77766:function(e,t,n){n.d(t,{qI:function(){return fetchInitialDataReviewsPageAction},Ov:function(){return postCommentRateAction},IK:function(){return postCommentRateActionDetailed},tl:function(){return postCommentRateActionPersonal},it:function(){return postReviewRateAction},Xr:function(){return postReviewRateActionDetailed},tT:function(){return updateDataBonusPageAction},XG:function(){return updateDataReviewsPageAction}});var r=n(28065),i=n(69326),o=n(59116),a=n(65538),l=n(63057),c=n(81157),s=n(55216);let createPromisePull=function(){let{isUpdateAfterReviewCreation:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},getOnlyReviewsAction=()=>[(0,s.Fp)({urlSearchParams:(0,c.b)({limitItem:10}),isUpdateAfterReviewCreation:e})],getCommonActions=()=>[...getOnlyReviewsAction(),(0,s.Ky)({isUpdateAfterReviewCreation:e})],getOnlyBonusAction=()=>[(0,s.bs)({urlSearchParams:(0,c.b)({limitItem:12}),isUpdateAfterReviewCreation:e})];return{onlyReviews:getOnlyReviewsAction(),onlyBonuses:getOnlyBonusAction(),allRequest:[...getCommonActions(),...getOnlyBonusAction()],withoutBonuses:getCommonActions()}},handleErrorFetchedResults=e=>{let{reviewResult:t,productForReviewResult:n,actionsReviewResult:r}=e;if(!t&&!n&&!r)return null;let i=(null==t?void 0:t.status)==="rejected"&&(null==n?void 0:n.status)==="rejected"&&(null==r?void 0:r.status)==="rejected",o=(null==t?void 0:t.status)==="rejected"&&(null==n?void 0:n.status)==="rejected",a=(null==t?void 0:t.status)==="rejected",l=(null==r?void 0:r.status)==="rejected";return i?{variant:"fullScreenError"}:o?{variant:"allRequestReviewPage"}:l?{variant:"bonusForReviewPage"}:a?{variant:"reviewPage"}:null};var u=n(96707),d=n(83465),m=n.n(d),p=n(15477);let getPositiveUpdatedReviews=(e,t,n)=>e.map(e=>getPositiveUpdatedReview(t,n,e)),getPositiveUpdatedReview=(e,t,n)=>{if(n.uuid===t){let t=m()(n);return e===p.c.LIKE&&(t.likes+=1,t.userRate=p.c.LIKE),e===p.c.DISLIKE&&(t.dislikes+=1,t.userRate=p.c.DISLIKE),e===p.c.CANCEL&&(t.userRate===p.c.LIKE?t.likes-=1:t.dislikes-=1,t.userRate=null),t}return n};var f=n(18165);let fetchInitialDataReviewsPageAction=()=>async e=>{let{allRequest:t}=createPromisePull(),[n,r,i]=await Promise.allSettled(t.map(e)),l=handleErrorFetchedResults({reviewResult:n,productForReviewResult:r,actionsReviewResult:i});e((null==l?void 0:l.variant)==="fullScreenError"?(0,o.$v)({type:a.G.Timeout}):(0,u.By)(l)),e((0,u.IX)(!0))},updateDataReviewsPageAction=e=>{let{reviewUpdatingVariant:t,shouldUpdateError:n}=e;return async e=>{let{allRequest:r,withoutBonuses:i,onlyReviews:l}=createPromisePull({isUpdateAfterReviewCreation:!n}),[c,s,d]=await Promise.allSettled(({allRequest:r,withoutBonuses:i,onlyReviews:l})[t].map(e));if(n){let t=handleErrorFetchedResults({reviewResult:c,productForReviewResult:s,actionsReviewResult:d});e((null==t?void 0:t.variant)==="fullScreenError"?(0,o.$v)({type:a.G.Timeout}):(0,u.By)(t))}else e((0,u.E5)(!1))}},updateDataBonusPageAction=()=>async e=>{let{onlyBonuses:t}=createPromisePull(),[n]=await Promise.allSettled(t.map(e)),r=handleErrorFetchedResults({actionsReviewResult:n});e((0,u.By)(r))},postReviewRateAction=(e,t)=>async(n,o)=>{let{reviewsList:a,additionalReviewsList:l}=o().reviews,c=a.some(e=>{let{uuid:n}=e;return n===t}),s=getPositiveUpdatedReviews(a,e.rate,t),u=getPositiveUpdatedReviews(l,e.rate,t);n(c?(0,f.R6)(s):(0,f.pH)(u));try{await n((0,i.w)({api:()=>r.d.postReviewRate(e,t),type:"postReviewRateAction"}))}catch(e){n(c?(0,f.R6)(a):(0,f.pH)(l))}},postReviewRateActionDetailed=(e,t)=>async(n,o)=>{let a=o().reviews.currentReview,l=getPositiveUpdatedReview(e.rate,t,a),c=getPositiveUpdatedReview("cancel",t,a);n((0,f.Cp)(l));try{await n((0,i.w)({api:()=>r.d.postReviewRate(e,t),type:"postReviewRateAction"}))}catch(e){n((0,f.Cp)(c))}},postCommentRateAction=e=>{let{rate:t,reviewUuid:n,parentId:o}=e;return async(e,a)=>{let{reviewsList:c,additionalReviewsList:s}=a().reviews,u=c.find(e=>{let{uuid:t}=e;return t===o}),d=null==u?void 0:u.comments.some(e=>{let{uuid:t}=e;return t===n}),m=s.find(e=>{let{uuid:t}=e;return t===o}),p=getPositiveUpdatedReviews((null==u?void 0:u.comments)||[],t,n),v=getPositiveUpdatedReviews((null==m?void 0:m.comments)||[],t,n);e(d?(0,f.MH)({list:p,parentId:o}):(0,f.hJ)({list:v,parentId:o}));try{await e((0,i.w)({api:()=>r.d.postCommentRate({rate:t},n),type:"postReviewRateAction"}))}catch(n){let{isAxios:t}=(0,l.h)(n);if(!t)return;e(d?(0,f.MH)({list:u.comments,parentId:o}):(0,f.hJ)({list:m.comments,parentId:o}))}}},postCommentRateActionDetailed=e=>{let{rate:t,reviewUuid:n}=e;return async(e,o)=>{let a=o().reviews.currentReview,l=a.comments.some(e=>{let{uuid:t}=e;return t===n}),c=getPositiveUpdatedReviews(null==a?void 0:a.comments,t,n);l&&e((0,f.Cp)({...a,comments:c}));try{await e((0,i.w)({api:()=>r.d.postCommentRate({rate:t},n),type:"postReviewRateAction"}))}catch(t){l&&e((0,f.Cp)(a))}}},postCommentRateActionPersonal=e=>{let{rate:t,reviewUuid:n,parentId:o}=e;return async(e,a)=>{let{productReviews:l}
1=a()["reviews-page"],c=l.find(e=>{let{uuid:t}=e;return t===o}),s=c.comments.some(e=>{let{uuid:t}=e;return t===n}),d=getPositiveUpdatedReviews(null==c?void 0:c.comments,t,n);s&&e((0,u.EV)({list:d,parentId:o}));try{await e((0,i.w)({api:()=>r.d.postCommentRate({rate:t},n),type:"postReviewRateAction"}))}catch(t){s&&e((0,u.EV)({list:null==c?void 0:c.comments,parentId:o}))}}}},15477:function(e,t,n){var r,i;n.d(t,{c:function(){return r}}),(i=r||(r={})).CANCEL="cancel",i.LIKE="like",i.DISLIKE="dislike"},75513:function(e,t,n){n.d(t,{E:function(){return ReviewCardImages}});var r=n(85893),i=n(26102),o=n(88501),a=n(82729),l=n(52015),c=n(86546),s=n(33588);function _templateObject(){let e=(0,a._)(["\n display: flex;\n flex-direction: row;\n gap: 12px;\n overflow-x: auto;\n margin-top: 12px;\n img {\n border-radius: 4px;\n cursor: pointer;\n }\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,a._)(["\n cursor: pointer;\n border-radius: 4px;\n height: 116px !important;\n width: 116px !important;\n\n @media "," {\n height: 100px !important;\n width: 100px !important;\n min-height: 100px !important;\n min-width: 100px !important;\n }\n "]);return _templateObject1=function(){return e},e}let u={ReviewCardImages:l.ZP.div.withConfig({componentId:"sc-37297a01-0"})(_templateObject()),ReviewCardNoImage:(0,l.ZP)(s.D).withConfig({componentId:"sc-37297a01-1"})(_templateObject1(),c.j$.SCREEN_MOBILE)},ReviewCardImages=e=>{let{attachments:t,onFullScreenModal:n}=e,{isMobile:a}=(0,i.ZP)();return(0,r.jsx)(u.ReviewCardImages,{children:t.map(e=>(0,r.jsx)(o.J,{alternativePath:!0,onClick:n,width:a?100:116,height:a?100:116,image:e,errorComponent:(0,r.jsx)(u.ReviewCardNoImage,{size:"small"})},e.path))})}},92806:function(e,t,n){n.d(t,{e:function(){return ReviewCommentInteraction}});var r=n(85893),i=n(67294),o=n(93967),a=n.n(o),l=n(82580),c=n(11163),s=n(97434),u=n(94153),d=n(89542),m=n(16310),p=n(22888),f=n(52513),v=n(40744),w=n(26102),h=n(10449),b=n(59116),g=n(86707),_=n(39225),j=n(77766),C=n(15477);let useIsProductPage=()=>{let e=(0,c.useRouter)();return e.asPath.includes("product")};var R=n(83174),x=n(82729),O=n(20860),y=n(52015),I=n(86546),P=n(10055),k=n(14655);function _templateObject(){let e=(0,x._)(["\n color: ",";\n background-color: "," !important;\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,x._)(["\n background-color: ",";\n "]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,x._)(["\n flex-direction: row;\n gap: 13px;\n "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,x._)([""]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,x._)([""]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,x._)(["\n width: 55px;\n height: 32px;\n padding: 0;\n justify-content: center;\n\n background-color: ",";\n color: ",";\n svg {\n width: 16px;\n height: 16px;\n }\n\n ","\n ","\n "]);return _templateObject5=function(){return e},e}let A={LikeDislikeContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-8f67d7f8-0"})(_templateObject2()),LikeIcon:(0,y.ZP)(O.XF).withConfig({componentId:"sc-8f67d7f8-1"})(_templateObject3()),DislikeIcon:(0,y.ZP)(O._N).withConfig({componentId:"sc-8f67d7f8-2"})(_templateObject4()),Button:(0,y.ZP)(P.zx).withConfig({componentId:"sc-8f67d7f8-3"})(_templateObject5(),I.$_.additionalGrayBlue30,I.$_.primary60,e=>{let{$rated:t}=e;return t?(0,y.iv)(_templateObject1(),I.$_.primary20):""},e=>{let{$disabled:t}=e;return t?(0,y.iv)(_templateObject(),I.$_.additionalGrayBlue50,I.$_.additionalGrayBlue20):""})};var components_LikeDislikeButtons=e=>{let{review:t,isComment:n,parentId:o}=e,a=(0,f.T)(),[l,c]=(0,i.useState)(!1),{userRate:s,likes:u=0,dislikes:m=0,uuid:p}=t,v=(0,h.b)(),w=!("isOwner"in t)||t.isOwner,b=s===C.c.LIKE,g=s===C.c.DISLIKE,_=w||g||!v||l,x=w||b||!v||l,O=useIsProductPage(),y=(0,f.C)(R.Hk),sendRequest=async e=>{c(!0),y?o?await a((0,j.IK)({rate:e,reviewUuid:p})):await a((0,j.Xr)({rate:e},p)):n?o&&(O?await a((0,j.Ov)({rate:e,reviewUuid:p,parentId:o})):await a((0,j.tl)({rate:e,reviewUuid:p,parentId:o}))):await a((0,j.it)({rate:e},p)),c(!1)};return(0,r.jsxs)(A.LikeDislikeContainer,{children:[(0,r.jsxs)(A.Button,{onClick:e=>{e.stopPropagation();let t=b?C.c.CANCEL:C.c.LIKE;sendRequest(t)},disabled:_,$disabled:_,$rated:b,theme:"ghost",children:[(0,r.jsx)(A.LikeIcon,{}),(0,r.jsx)(d.ZT,{variant:"button-s",children:u})]}),(0,r.jsxs)(A.Button,{onClick:e=>{e.stopPropagation();let t=g?C.c.CANCEL:C.c.DISLIKE;sendRequest(t)},disabled:x,$disabled:x,$rated:g,theme:"ghost",children:[(0,r.jsx)(A.DislikeIcon,{}),(0,r.jsx)(d.ZT,{variant:"button-s",children:m})]})]})},E=n(56029),T=n(71469),S=n(71261),L=n(35589),$=n(96707),B=n(53096),Z=n(25675),N=n.n(Z),D=n(43726),M=n(18357),F=n(10301),H=n(76813),U=n(61022);
1function styled_templateObject(){let e=(0,x._)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 8px;\n text-overflow: wrap;\n overflow-wrap: break-word;\n "]);return styled_templateObject=function(){return e},e}function styled_templateObject1(){let e=(0,x._)(["\n ","\n "]);return styled_templateObject1=function(){return e},e}function styled_templateObject2(){let e=(0,x._)(["\n align-self: start;\n svg {\n ","\n }\n "]);return styled_templateObject2=function(){return e},e}let z={ReviewCardDescription:y.ZP.div.withConfig({componentId:"sc-6e067397-0"})(styled_templateObject()),ReviewCardDescriptionText:(0,y.ZP)(d.ZT).withConfig({componentId:"sc-6e067397-1"})(styled_templateObject1(),e=>{let{$maxRows:t}=e;return t&&(0,I.$$)(t)}),ReviewCardButton:(0,y.ZP)(U.ee).withConfig({componentId:"sc-6e067397-2"})(styled_templateObject2(),e=>{let{$isHidden:t}=e;return t?"transform: rotate(90deg)":"transform: rotate(270deg)"})},G=(0,i.memo)(e=>{var t;let{comment:n,parentId:o,isCartPage:a}=e,{message:l}=n,c=l.trim(),{isMobile:s}=(0,w.ZP)(),u=(0,i.useRef)(null),m=null===(t=u.current)||void 0===t?void 0:t.offsetHeight,[p,f]=(0,i.useState)(!1),[v,h]=(0,i.useState)(0),[b,g]=(0,i.useState)(null),_=s?F.e5:F.WC,j=s?F.B7:F.Yu,C=(0,i.useMemo)(()=>{if(!m)return 0;if(null!==b)return b;let e=Math.floor(m/_),t=0;return e>=j&&(h(j),t+=j*_),g(t),t},[m,b,_,j]),{ref:R,inView:x,entry:O}=(0,M.YD)({threshold:0}),y=(0,i.useCallback)(()=>{f(!p),p||x||null==O||O.target.scrollIntoView()},[p,x,O]);return(0,i.useEffect)(()=>{C>0&&f(!0)},[C]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(H.$,{isHidden:p,minHeight:C,children:(0,r.jsx)(z.ReviewCardDescription,{ref:R,children:(0,r.jsx)(z.ReviewCardDescriptionText,{color:"gray100",ref:u,$maxRows:p?v:void 0,children:c})})}),C>0&&(0,r.jsx)(z.ReviewCardButton,{$isHidden:p,"data-skeleton-item":!0,icon:"right",onClick:y,size:"large",theme:"standalone",children:p?"ÐеÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий":"СкÑÑÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий"}),(0,r.jsxs)(k.k,{gap:8,dir:"column",children:[a&&(0,r.jsx)(d.ZT,{element:"p",variant:"p-medium",color:"gray70",children:"Ðам помог ÑÑÐ¾Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий?"}),(0,r.jsx)(components_LikeDislikeButtons,{review:n,isComment:!0,parentId:o})]})]})});var W=n(33588);function ReviewCommentBlock_styled_templateObject(){let e=(0,x._)(["\n :not(:last-child) {\n padding-bottom: 24px;\n }\n "]);return ReviewCommentBlock_styled_templateObject=function(){return e},e}function ReviewCommentBlock_styled_templateObject1(){let e=(0,x._)(["\n padding-bottom: 24px;\n "]);return ReviewCommentBlock_styled_templateObject1=function(){return e},e}function ReviewCommentBlock_styled_templateObject2(){let e=(0,x._)(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n ","\n\n width: 100%;\n padding-left: ",";\n\n @media "," {\n padding-left: 0;\n }\n "]);return ReviewCommentBlock_styled_templateObject2=function(){return e},e}function styled_templateObject3(){let e=(0,x._)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n "]);return styled_templateObject3=function(){return e},e}function styled_templateObject4(){let e=(0,x._)(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n\n svg {\n width: 16px;\n height: 16px;\n }\n "]);return styled_templateObject4=function(){return e},e}function styled_templateObject5(){let e=(0,x._)(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n overflow-x: auto;\n\n img {\n border-radius: 4px;\n cursor: pointer;\n }\n "]);return styled_templateObject5=function(){return e},e}function _templateObject6(){let e=(0,x._)(["\n border-radius: 4px;\n height: 74px !important;\n width: 74px !important;\n "]);
1return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,x._)(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n "]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,x._)(["\n justify-content: center;\n align-items: center;\n border: 1px solid ",";\n @media "," {\n width: 48px;\n height: 48px;\n }\n @media "," {\n width: 40px;\n height: 40px;\n }\n "]);return _templateObject8=function(){return e},e}let Y={ReviewCommentCardContainer:y.ZP.div.withConfig({componentId:"sc-4f77d74d-0"})(ReviewCommentBlock_styled_templateObject2(),e=>{let{$isOpenNewComment:t}=e;return t?(0,y.iv)(ReviewCommentBlock_styled_templateObject()):(0,y.iv)(ReviewCommentBlock_styled_templateObject1())},e=>{let{$isCartPage:t}=e;return t&&"40px"},I.j$.SCREEN_MOBILE),ReviewCardTitle:y.ZP.div.withConfig({componentId:"sc-4f77d74d-1"})(styled_templateObject3()),ReviewCardRating:y.ZP.div.withConfig({componentId:"sc-4f77d74d-2"})(styled_templateObject4()),ReviewCardImages:y.ZP.div.withConfig({componentId:"sc-4f77d74d-3"})(styled_templateObject5()),ReviewCardNoImage:(0,y.ZP)(W.D).withConfig({componentId:"sc-4f77d74d-4"})(_templateObject6()),ReviewCardDescription:y.ZP.div.withConfig({componentId:"sc-4f77d74d-5"})(_templateObject7()),ImageContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-4f77d74d-6"})(_templateObject8(),I.$_.additionalGrayBlue30,I.j$.SCREEN_DESKTOP,I.j$.SCREEN_MOBILE)},K=(0,i.memo)(e=>{let{comment:t,parentId:n,isCartPage:i,$isOpenNewComment:o}=e,{author:a,dateCreated:l,icon:c}=t,{isDesktop:s}=(0,w.ZP)();return(0,r.jsxs)(Y.ReviewCommentCardContainer,{$isCartPage:i,$isOpenNewComment:o,children:[(0,r.jsxs)(k.k,{justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)(k.k,{gap:12,alignItems:"center",children:[c&&(0,r.jsx)(Y.ImageContainer,{children:(0,r.jsx)(N(),{src:null==c?void 0:c.path,alt:c.alternative,width:s?28:24,height:s?28:24})}),(0,r.jsx)(d.ZT,{variant:"p-strong",color:"gray100",children:a})]}),(0,r.jsx)(d.ZT,{color:"gray60",children:(0,D.xn)(l)})]}),(0,r.jsx)(G,{comment:t,parentId:n,isCartPage:i})]})});var q=n(18165),V=n(79528),X=n(28946),J=n(47521);function ReviewCommentInteraction_styled_templateObject(){let e=(0,x._)(["\n @media "," {\n &.withTopBorder {\n gap: 28px;\n border-top: 1px solid ",";\n padding-top: 24px;\n margin-top: 24px;\n }\n }\n @media "," {\n &.withTopBorder {\n margin-top: 16px;\n gap: 20px;\n }\n }\n "]);return ReviewCommentInteraction_styled_templateObject=function(){return e},e}function ReviewCommentInteraction_styled_templateObject1(){let e=(0,x._)(["\n padding-bottom: 0;\n "]);return ReviewCommentInteraction_styled_templateObject1=function(){return e},e}function ReviewCommentInteraction_styled_templateObject2(){let e=(0,x._)(["\n flex-direction: column;\n width: 100%;\n & > :not(:last-child) {\n border-bottom: ",";\n }\n\n & > div {\n ","\n }\n "]);return ReviewCommentInteraction_styled_templateObject2=function(){return e},e}function ReviewCommentInteraction_styled_templateObject3(){let e=(0,x._)(["\n width: 100%;\n "]);return ReviewCommentInteraction_styled_templateObject3=function(){return e},e}function ReviewCommentInteraction_styled_templateObject4(){let e=(0,x._)(["\n color: ",";\n ","\n "]);return ReviewCommentInteraction_styled_templateObject4=function(){return e},e}function ReviewCommentInteraction_styled_templateObject5(){let e=(0,x._)(["\n &:hover {\n color: ",";\n }\n\n &:focus {\n color: ",";\n }\n\n &:active {\n color: ",";\n }\n "]);
1return ReviewCommentInteraction_styled_templateObject5=function(){return e},e}function styled_templateObject6(){let e=(0,x._)(["\n cursor: pointer;\n ","\n\n @media "," {\n margin-top: ",";\n }\n @media "," {\n margin-top: ",";\n }\n\n margin-bottom: ",";\n "]);return styled_templateObject6=function(){return e},e}function styled_templateObject7(){let e=(0,x._)(["\n width: 16px;\n height: 16px;\n "]);return styled_templateObject7=function(){return e},e}function styled_templateObject8(){let e=(0,x._)(["\n width: 24px;\n height: 24px;\n transform: ",";\n "]);return styled_templateObject8=function(){return e},e}function _templateObject9(){let e=(0,x._)(["\n gap: 8px;\n align-items: center;\n cursor: pointer;\n pointer-events: ",";\n color: ",";\n & > * {\n color: ",";\n }\n "]);return _templateObject9=function(){return e},e}function _templateObject10(){let e=(0,x._)(["\n width: 100%;\n gap: 16px;\n align-self: flex-end;\n order: ",";\n padding-top: ",";\n @media "," {\n padding-top: 28px;\n border-top: 1px solid ",";\n }\n "]);return _templateObject10=function(){return e},e}function _templateObject11(){let e=(0,x._)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 12px;\n @media "," {\n margin-bottom: 12px;\n }\n "]);return _templateObject11=function(){return e},e}function _templateObject12(){let e=(0,x._)(["\n width: 100%;\n gap: 24px;\n align-items: center;\n padding-bottom: ",";\n\n @media "," {\n justify-content: space-between;\n }\n "]);return _templateObject12=function(){return e},e}function _templateObject13(){let e=(0,x._)(["\n width: 100%;\n padding: 24px 0 4px 0;\n gap: 8px;\n border-top: ",";\n "]);return _templateObject13=function(){return e},e}let Q={ReviewCommentListWrapper:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-0"})(ReviewCommentInteraction_styled_templateObject(),I.j$.SCREEN_DESKTOP,I.$_.additionalGrayBlue30,I.j$.SCREEN_MOBILE),ReviewCommentListContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-1"})(ReviewCommentInteraction_styled_templateObject2(),e=>{let{$needStrokeComment:t}=e;return t?"1px solid ".concat(I.$_.additionalGrayBlue30):"none"},e=>{let{$needStrokeComment:t}=e;return t?"":(0,y.iv)(ReviewCommentInteraction_styled_templateObject1())}),ReviewCommentBlockContainer:y.ZP.div.withConfig({componentId:"sc-db7ce00d-2"})(ReviewCommentInteraction_styled_templateObject3()),Link:y.ZP.a.withConfig({componentId:"sc-db7ce00d-3"})(ReviewCommentInteraction_styled_templateObject4(),I.$_.primary60,d.HB["p-medium"]),Typography:(0,y.ZP)(d.ZT).withConfig({componentId:"sc-db7ce00d-4"})(styled_templateObject6(),e=>{let{$disabled:t}=e;return!t&&(0,y.iv)(ReviewCommentInteraction_styled_templateObject5(),I.$_.primary50,I.$_.primary80,I.$_.primary100)},I.j$.SCREEN_DESKTOP,e=>{let{$isProductPage:t}=e;return t&&"32px"},I.j$.SCREEN_MOBILE,e=>{let{$isProductPage:t}=e;return t&&"16px"},e=>{let{$isProductPage:t,$isOpen:n}=e;return t&&n&&"28px"}),ArrowIcon:(0,y.ZP)(O.Wf).withConfig({componentId:"sc-db7ce00d-5"})(styled_templateObject7()),ChevronIcon:(0,y.ZP)(O.Gk).withConfig({componentId:"sc-db7ce00d-6"})(styled_templateObject8(),e=>{let{$isOpen:t}=e;return t?"rotate(180deg)":"none"}),SummaryContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-7"})(_templateObject9(),e=>{let{$disabled:t}=e;
1return t&&"none"},e=>{let{$disabled:t}=e;return t&&"".concat(I.$_.defaultGray50)},e=>{let{$disabled:t}=e;return t&&"".concat(I.$_.defaultGray50)}),NewCommentContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-8"})(_templateObject10(),e=>{let{$isLastElement:t}=e;return t?"2":"0"},e=>{let{$needPaddingTop:t}=e;return t&&"24px"},I.j$.SCREEN_MOBILE,I.$_.additionalGrayBlue30),Form:(0,y.ZP)(l.l0).withConfig({componentId:"sc-db7ce00d-9"})(_templateObject11(),I.j$.SCREEN_MOBILE),CommentInteractionContainer:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-10"})(_templateObject12(),e=>{let{$isNeedPadding:t}=e;return t&&"24px"},I.j$.SCREEN_MOBILE),MobileTextWrapper:(0,y.ZP)(k.k).withConfig({componentId:"sc-db7ce00d-11"})(_templateObject13(),e=>{let{$isOpenNewComment:t}=e;return!t&&" 1px solid ".concat(I.$_.additionalGrayBlue30)})},getCommentVariant=e=>{let{review:t,isPersonalPageComment:n,isMobile:i,redirectToCommentPage:o,changeOpenComment:a,isAuthorized:l,openAuthModal:c,redirectToNewComment:s}=e,{allResponses:u,status:d}=t;return u?{text:(0,r.jsxs)(k.k,{alignItems:"center",gap:4,children:[u," ",(0,D.Ho)(u,p.f0.COMMENT)," ",!n&&i&&(0,r.jsx)(Q.ArrowIcon,{})]}),openComment:o,changeIsOpenComment:a,disabled:!1}:n?d===J.CT.Published?{text:i?"ÐомменÑиÑоваÑÑ":"ÐÐµÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑиев",openComment:l?s:c,changeIsOpenComment:l?a:c,disabled:!1}:{text:i?"ÐомменÑиÑоваÑÑ":"ÐÐµÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑиев",disabled:!0,openComment:()=>{},changeIsOpenComment:()=>{}}:null},ee=(0,m.Ry)().shape({comment:(0,m.Z_)().max(u.U,X.nO.LONG)}),ReviewCommentInteraction=e=>{var t,n;let{commentType:o,isDetailReviewPage:u,review:m,parentId:j}=e,{uuid:C,comments:x,allResponses:O}=m,y=(0,c.useRouter)(),I=(0,f.T)(),A=(0,f.C)(R.eR),Z=(0,f.C)(L.PR),N="personal"===o,D="product"===o,{isMobile:M,isDesktop:F}=(0,w.ZP)(),H=(0,h.b)(),U=u&&(D?A:Z),z=N&&F||U,[G,W]=(0,i.useState)(z),[Y,X]=(0,i.useState)(u||N),J=y.asPath,et=N?"".concat(p.mr,"/").concat(C):"".concat(J,"/review/").concat(C),en=null===(t=(0,f.C)((0,_.Js)(g.d.About)))||void 0===t?void 0:t.link,er=null===(n=(0,f.C)((0,_.Js)(g.d.Comment)))||void 0===n?void 0:n.link,ei=(0,i.useRef)(null),eo=(0,f.C)(R.fj),ea=null==eo?void 0:eo.find(e=>{let{uuid:t}=e;return t===C}),el=(0,i.useCallback)(()=>{I(D?(0,q.Cp)(ea||null):(0,$.DO)(C)),W(!1),M&&!u?y.push(et,void 0,{scroll:!1}):(X(!0),W(!1))},[et,ea,I,u,M,D,y,C]),ec=(0,i.useCallback)(()=>{el(),I(D?(0,q.YJ)(!0):(0,$.Pk)(!0))},[I,D,el]),es=(0,i.useCallback)(()=>{I((0,b.u6)({name:T.f.PRODUCT_SUBSCRIPTION_AUTH.name,params:{type:B.Xq.PRODUCT_AUTH}})),I((0,S.K4)(T.e.AUTH_DIALOG.name,{params:{callback:ec}}))},[I,ec]),eu=(0,i.useCallback)(()=>{W(!0)},[]),redirectToNewComment=e=>{H?ec():(null==e||e.stopPropagation(),es())},{handleIsLoading:ed}=(0,E.t)(),formSubmit=async e=>{let{comment:t}=e;try{ed(!0),await I((0,V.q)({reviewUuid:C,body:{message:t}})),W(!1)}catch(e){console.error("ÐÑибка пÑи оÑпÑавке комменÑаÑиÑ:",e)}finally{ed(!1)}},em=getCommentVariant({review:m,isPersonalPageComment:N,isMobile:M,redirectToCommentPage:el,changeOpenComment:()=>{X(!Y)},isAuthorized:H,openAuthModal:es,redirectToNewComment}),ep=N&&M&&!u&&em,ef=!G&&!Z&&(F||u),ev=N&&F&&em,ew=G&&!(null==em?void 0:em.disabled),eh=Y&&u&&M&&O>0,eb=!N&&em&&(!Y&&M||F),eg=(M&&u||F&&Y)&&!!x.length,e_=!N&&M&&!u;return(0,r.jsxs)(Q.ReviewCommentListWrapper,{className:a()({withTopBorder:N}),dir:"column",alignItems:"flex-start",ref:ei,children:[(0,r.jsxs)(Q.CommentInteractionContainer,{$isNeedPadding:!!(D&&u),children:[(0,r.jsx)(components_LikeDislikeButtons,{review:m}),ep&&(0,r.jsx)(P.zx,{theme:"secondary",onClick:e=>{e.stopPropagation(),null==em||em.openComment()},size:"small",disabled:(null==em?void 0:em.disabled)||!1,children:null==em?void 0:em.text}),ef&&(0,r.jsx)(P.zx,{size:"small",theme:"secondary",onClick:e=>(e.stopPropagation(),H?eu():es()),disabled:G,children:"ÐомменÑиÑоваÑÑ"}),e_&&(0,r.jsx)(P.zx,{theme:"secondary",onClick:redirectToNewComment,size:"small",children:"ÐомменÑиÑоваÑÑ"}),ev&&(0,r.jsxs)(Q.SummaryContainer,{gap:8,onClick:e=>{e.stopPropagation(),null==em||em.changeIsOpenComment()},$disabled:em.disabled,children:[(0,r.jsx)(Q.Typography,{color:"gray100",variant:"p-strong",$disabled:em.disabled,children:em.text}),(0,r.jsx)(Q.ChevronIcon,{$isOpen:Y&&!em.disabled})]})]}),ew&&(0,r.jsx)(Q.NewCommentContainer,{$isLastElement:N,$needPaddingTop:F&&G,children:(0,r.jsx)(l.J9,{onSubmit:formSubmit,initialValues:{comment:""},validationSchema:ee,children:e=>{let{dirty:t}=e;return(0,r.jsxs)(Q.Form,{noValidate:!0,children:[F&&(0,r.jsx)(s.x,{label:"ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий",name:"comment",isStretchable:!0}),M&&G&&(0,r.jsx)(s.x,{label:N&&M?"ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий к оÑзÑÐ²Ñ * ":"ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий *",name:"comment",hasCounter:!0,resizable:!0,focusOnVisible:G}),(0,r.jsxs)(k.k,{gap:M?12:40,dir:M?"column":"row",children:[(0,r.jsxs)("span",{children:[(0,r.jsxs)(d.ZT,{variant:"p-medium",color:"gray60",children:["ÐÐ°Ð¶Ð¸Ð¼Ð°Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ \xabÐÑпÑавиÑÑ\xbb, Ð²Ñ ÑоглаÑаеÑеÑÑ Ñ"," "]}),(0,r.jsx)(Q.Link,{href:er,rel:"noreferrer",target:"_blank",children:"пÑавилами модеÑаÑии оÑзÑвов"})," ",(0,r.jsxs)(d.ZT,{variant:"p-medium",color:"gray60",children:[" ","и даеÑе Ñвое ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ
даннÑÑ
в ÑооÑвеÑÑÑвии c"," "]}),(0,r.jsx)(Q.Link,{href:en,rel:"noreferrer",target:"_blank",children:"ÐолиÑикой конÑиденÑиалÑноÑÑи"})," "]}),(0,r.jsx)(v.R.ModalButtonsContainer,{children:(0,r.jsx)(P.zx,{isStretched:!0,type:"submit",disabled:!t,children:"ÐÑпÑавиÑÑ"})})]})]})}})}),eb&&(0,r.jsx)(Q.Typography,{$isProductPage:!N,$isOpen:!N&&Y,color:"primary60",variant:M?"p":"p-medium",onClick:M?em.openComment:em.changeIsOpenComment,children:em.text}),eh&&(0,r.jsxs)(Q.MobileTextWrapper,{$isDetailReviewPage:u,$isOpenNewComment:G,children:[(0,r.jsx)(Q.Typography,{color:"gray100",variant:"h5",children:"ÐомменÑаÑии"}),(0,r.jsx)(Q.Typography,{color:"gray60",variant:"h5",children:O})]}),eg&&(0,r.jsx)(Q.ReviewCommentListContainer,{gap:M?20:24,$needStrokeComment:u,children:x.map(e=>(0,r.jsx)(K,{comment:e,parentId:j,isCartPage:!N,$isOpenNewComment:G},e.uuid))})]})}},10301:function(e,t,n){n.d(t,{Ak:function(){return r},B4:function(){return o},B7:function(){return d},WC:function(){return s},X4:function(){return a},Yu:function(){return u},e5:function(){return c},fu:function(){return l},hT:function(){return i},iF:function(){return m},rv:function(){return p}});let r={REQUIRED_MESSAGE:"ÐожалÑйÑÑа, введиÑе ÑекÑÑ Ð¾ÑзÑва",REQUIRED_ESTIMATION:"ÐожалÑйÑÑа, поÑÑавÑÑе оÑенкÑ",REQUIRED_NEGATIVE:"ÐожалÑйÑÑа, заполниÑе недоÑÑаÑки",ALERT:"ÐожалÑйÑÑа, оÑÑавлÑйÑе ÑеÑÑнÑй и коÑÑекÑнÑй оÑзÑв. ÐÑо Ð¿Ð¾Ð¼Ð¾Ð¶ÐµÑ Ð´ÑÑгим покÑпаÑелÑм опÑеделиÑÑÑÑ Ñ Ð²ÑбоÑом."},i=3,o=10,a=3,l=[".png",".jpeg",".jpg",".heic"],c=20,s=24,u=3,d=5,m=37,p=8},4439:function(e,t,n){n.d(t,{R:function(){return useReviewCardDescriptionCollapsed}});var r=n(67294),i=n(26102),o=n(10301);let useReviewCardDescriptionCollapsed=e=>{var t,n,a;let{isHidden:l,message:c,positiveReaction:s,negativeReaction:u}=e,{isMobile:d}=(0,i.ZP)(),m=(0,r.useRef)(null),p=(0,r.useRef)(null),f=(0,r.useRef)(null),v=null===(t=m.current)||void 0===t?void 0:t.offsetHeight,w=null===(n=p.current)||void 0===n?void 0:n.offsetHeight,h=null===(a=f.current)||void 0===a?void 0:a.offsetHeight,[b,g]=(0,r.useState)(0),[_,j]=(0,r.useState)(0),[C,R]=(0,r.useState)(0),[x,O]=(0,r.useState)(null),y=d?o.e5:o.WC,I=d?o.B7:o.Yu,P=(0,r.useCallback)(()=>(Number(!!c)*(d?4:3)+2*Number(!!s)+2*Number(!!u))*25.6,[c,s,u,d]),k=P(),A=(0,r.useMemo)(()=>
1{if(c&&void 0===v||s&&void 0===w||u&&void 0===h)return 0;if(null!==x)return x;let e=Math.floor((null!=v?v:0)/y),t=Math.floor((null!=w?w:0)/y),n=Math.floor((null!=h?h:0)/y),r=[e,t>0?1:0,t,n>0?1:0,n],i=[...r],a=0,l=I;for(let e=0;e<r.length;e++)r[e]-l>0?(r[e]-=l,l=0):(l-=r[e],r[e]=0);if(r.find(e=>e>0))for(let e=0;e<i.length&&(r[e]===i[e]||(e%2?(a+=o.iF,(1!==e||c)&&(3!==e||c||s)||(a-=o.rv)):a+=(i[e]-r[e])*y),!(r[e]>0));e++);return g(i[0]-r[0]),j(i[2]-r[2]),R(i[4]-r[4]),O(a),a},[c,v,s,w,u,h,x,y,I]);return{minHeight:null===x?100:A,messageProps:{ref:m,$maxRows:l?b:void 0,maxHeight:b*y||"auto"},positiveReactionProps:{ref:p,$maxRows:l?_:void 0,maxHeight:b*y||"auto"},negativeReactionProps:{ref:f,$maxRows:l?C:void 0,maxHeight:b*y||"auto"},defaultHeight:k}}},83174:function(e,t,n){n.d(t,{Hk:function(){return selectCurrentReview},Kt:function(){return selectIsAllAdditionalReviewsLoaded},Lq:function(){return selectProductReviewsSortType},Pv:function(){return selectIsUserDataLoading},QH:function(){return selectIsCreatingReview},VA:function(){return selectAdditionalReviewsList},c5:function(){return selectIsLoadingProductReviewsList},eR:function(){return selectIsProductCommentOpen},fF:function(){return selectProductReviewRate},fj:function(){return selectProductReviewsList},os:function(){return selectCurrentPageReviews},tD:function(){return selectProductAllReviewsCount}});var r=n(31441),i=n(18165),o=n(33871);let select=e=>e[i.GF],selectProductReviewsSortType=e=>select(e).sortType,selectProductReviewsList=e=>select(e).reviewsList,selectProductReviewRate=e=>select(e).reviewProductRate,selectProductAllReviewsCount=e=>select(e).allReviewsCount,selectIsLoadingProductReviewsList=e=>(0,r.xU)(i.N2.type)(e),selectAdditionalReviewsList=e=>select(e).additionalReviewsList,selectIsAllAdditionalReviewsLoaded=e=>select(e).allAdditionalReviewsLoaded,selectCurrentPageReviews=e=>select(e).currentPage,selectIsCreatingReview=e=>select(e).isCreatingReview,selectCurrentReview=e=>select(e).currentReview,selectIsUserDataLoading=e=>(0,r.xU)(o.lX.type)(e),selectIsProductCommentOpen=e=>select(e).isNewCommentOpen},79528:function(e,t,n){n.d(t,{nE:function(){return createProductReview},q:function(){return createReviewCommentAction},vj:function(){return getAdditionalProductReviews}});var r=n(85893),i=n(91444),o=n(28065),a=n(69326),l=n(71469),c=n(71261),s=n(10301),u=n(18165),d=n(6531),m=n(3586);let ReviewService=class ReviewService{async getProductReviews(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,{response:i}=await (0,m.A_)({path:"/product/".concat(e,"/reviews"),params:{page:t,sortBy:n,limit:r}});return i}async getProductReviewById(e){let{response:t}=await (0,m.A_)({path:"/reviews/".concat(e)});return t}async createProductReview(e,t){let{response:n}=await (0,m.j0)({extraHeaders:{"Content-Type":"multipart/form-data"},body:t,path:"/product/".concat(e,"/review")});return n}};let getAdditionalProductReviews=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"createdAt",r=!(arguments.length>3)||void 0===arguments[3]||arguments[3];return async i=>{var o;let l=await i((0,a.j)({requestCb:()=>new ReviewService().getProductReviews(e,r?t:1,n,r?10:10*t),type:u.N2.type}));i((0,u.Mp)(n)),r||i((0,u.R6)(l.productReviews?l.productReviews.slice(0,s.X4):[])),i((0,u.N2)({data:l.productReviews||[],isPagination:r})),r&&i((0,u.tw)(l.nav.pageNomer+1)),(null===(o=l.productReviews)||void 0===o?void 0:o.length)<s.B4&&i((0,u.ro)(!0))}},createProductReview=(e,t)=>async n=>{n((0,u.s2)(!0));try{let r=await n((0,a.j)({requestCb:()=>new ReviewService().createProductReview(e,t),type:u.N2.type}));return n((0,c.VG)(l.e.REVIEWS_CREATE.name)),null==r?void 0:r.productReview}finally{n((0,u.s2)(!1))}},createReviewCommentAction=e=>async t=>{await t((0,a.w)({api:()=>o.d.setReviewComment(e),type:""})),(0,i.Am)((0,r.jsx)(d.F,{hasIcon:!1,isNeedCloseButton:!0,text:"ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий оÑпÑавлен на модеÑаÑиÑ"}),{className:"notification"})}},97434:function(e,t,n){n.d(t,{x:function(){return FormFieldArea}});var r=n(85893),i=n(67294),o=n(82580),a=n(94153),l=n(42896),c=n(89542),s=n(43726),u=n(2217),d=n(82729),m=n(52015),p=n(24119),f=n(86546);
1function _templateObject(){let e=(0,d._)(["\n ","\n top: ",";\n z-index: ",";\n left: 12px;\n position: absolute;\n transition: color, font-size ",";\n width: calc(100% - 20px);\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,d._)(["\n top: 12px !important;\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,d._)(["\n background-color: ",";\n border-color: transparent;\n "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,d._)(["\n &&& {\n height: unset;\n min-height: calc(","px - 20px);\n }\n "]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,d._)(["\n &&& {\n overflow: hidden;\n }\n "]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,d._)(["\n ","\n ","\n border: 1px solid ",";\n border-radius: 4px;\n height: calc(100% - 24px);\n left: 0;\n position: absolute;\n top: 0;\n transition: all ",";\n width: 100%;\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,d._)(["\n & ~ "," {\n border: 1px solid ",";\n\n ","\n ","\n }\n\n ~ "," {\n ","\n ","\n }\n\n &:focus {\n & ~ "," {\n border: 2px solid ",";\n }\n }\n "]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,d._)(["\n background: transparent;\n height: calc(80% - 4px);
1\n margin-top: 1px;\n "]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,d._)(["\n height: ","px;\n position: relative;\n width: 100%;\n "]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,d._)(["\n ","\n ","\n \n\n border: none;\n height: calc(100% - ",");\n margin: 32px 12px 12px 10px;\n position: relative;\n resize: none;\n width: calc(100% - 20px);\n z-index: 1;\n\n ","\n\n :focus {\n outline: none;\n\n & ~ "," {\n border: 2px solid ",";\n }\n\n & ~ "," {\n ","\n ","\n }\n }\n\n :disabled {\n background-color: transparent;\n color: ",";\n }\n\n ","\n ","\n ","\n "]);return _templateObject9=function(){return e},e}let v=(0,m.ZP)(c.ZT).withConfig({componentId:"sc-d7d2e21e-0"})(_templateObject(),(0,f.$$)(1),e=>{let{$isStretchable:t}=e;return t?"24px":"11px"},e=>{let{$isStretchable:t}=e;return t?"1":"0"},f.sF.ANIMATION),setMaxTopTextAreaLabel=()=>(0,m.iv)(_templateObject1()),w=m.ZP.div.withConfig({componentId:"sc-d7d2e21e-1"})(_templateObject5(),e=>{let{$isDisabled:t}=e;return t?(0,m.iv)(_templateObject2(),f.$_.additionalGrayBlue20):""},e=>{let{$isStretchable:t,$minHeight:n}=e;return t?(0,m.iv)(_templateObject3(),n):""},e=>{let{$isError:t}=e;return t?f.$_.statusError50:f.$_.defaultGray30},f.sF.ANIMATION),h={TextArea:m.ZP.label.withConfig({componentId:"sc-d7d2e21e-2"})(_templateObject8(),e=>{let{$height:t,$isStretchable:n,$minHeight:r}=e;return n?r:t}),TextAreaOriginal:m.ZP.textarea.withConfig({componentId:"sc-d7d2e21e-3"})(_templateObject9(),p.L.fP("lg"),f.kQ.scrollbar,f.kQ.HEADER_HEIGHT,e=>{let{$hasPaddingTop:t}=e;return t&&"padding-top: 12px;"},w,f.$_.primary30,v,p.L.fPMedium(),setMaxTopTextAreaLabel(),f.$_.defaultGray60,e=>{let{$isFilled:t,$isError:n,$isDisabled:r}=e;return t?(0,m.iv)(_templateObject6(),w,f.$_.primary30,n?"border: 1px solid ".concat(f.$_.statusError50,";"):"",r?"border-color: transparent;":"",v,p.L.fPMedium(),setMaxTopTextAreaLabel(),w,f.$_.primary30):""},e=>{let{$haveNotLabel:t}=e;return t?(0,m.iv)(_templateObject7()):""},e=>{let{$isStretchable:t}=e;return t?(0,m.iv)(_templateObject4()):""}),TextAreaFrame:w,TextAreaLabel:v},b=(0,i.forwardRef)((e,t)=>{var n,o;let{errorText:a,captionText:l,disabled:d,onChange:m,labelText:p,hasCounter:f,maxLength:v,height:w,$isStretchable:b,minHeight:g,..._}=e,[j,C]=(0,i.useState)(!!_.value),R=f&&v?v-(null!==(o=null===(n=_.value)||void 0===n?void 0:n.toString().length)&&void 0!==o?o:0):-1,x=(0,i.useCallback)(e=>{let t=e.target;C(!!t.value),m&&m(e)},[m]),O=(0,i.useCallback)(e=>e===v?"ÐакÑимÑм ".concat(e," ").concat((0,s.Ho)(e,["Ñимвол","Ñимвола","Ñимволов"])):"".concat((0,s.Ho)(e,["ÐÑÑалÑÑ","ÐÑÑалоÑÑ","ÐÑÑалоÑÑ"])," ").concat(e," ").concat((0,s.Ho)(e,["Ñимвол","Ñимвола","Ñимволов"])),[v]);return(0,r.jsxs)(h.TextArea,{$height:w,$minHeight:g,$isStretchable:b,children:[(0,r.jsx)(h.TextAreaOriginal,{$minHeight:g,$height:w,..._,$isFilled:j,$haveNotLabel:!p,$isError:!!a,$isDisabled:!!d,maxLength:v,disabled:d,onChange:x,$isStretchable:b,$hasPaddingTop:!p,ref:t}),(0,r.jsx)(h.TextAreaFrame,{$isError:!!a,$isDisabled:!!d,$isStretchable:b,$minHeight:g}),p&&(0,r.jsx)(h.TextAreaLabel,{color:"gray70",variant:"p",$isStretchable:b,children:p}),f&&R>=0&&!a&&!l&&(0,r.jsx)(c.ZT,{color:"gray70",variant:"p-medium",children:O(R)}),(0,r.jsx)(u.k,{captionText:l,disabled:d,errorText:a})]})}),FormFieldArea=e=>{let{hasCounter:t=!0,name:n,label:c,maxLength:s=a.U,placeholder:u,disabled:d,resizable:m=!1,maxHeight:p=246,minHeight:f=92,isStretchable:v,validateInput:w,focusOnVisible:h}=e,[g,_,j]=(0,o.U$)(n),[C,R]=(0,i.useState)(v?92:146),[x,O]=(0,i.useState)(24),[y,I]=(0,i.useState)(f),P=(0,i.useRef)(null),k=(0,i.useCallback)(()=>{if(m&&P.current){var e,t;R((null===(e=P.current)||void 0===e?void 0:e.scrollHeight)+68),(null===(t=P.current)||void 0===t?void 0:t.scrollHeight)+68>(p||146)?(P.current.style.overflowY="scroll",R(p||146)):P.current.style.overflowY="hidden"}},[p,m]),A=(0,i.useCallback)(e=>{let setTextAreaStretchableWithScroll=()=>{v&&P.current&&(O(192),I(260),P.current.style.overflowY="scroll")};if(v&&P.current){var t,n;let r=null===(t=P.current)||void 0===t?void 0:t.scrollHeight,i=r>216;if("deleteAll"===e&&(I(f),O(24)),"delete"===e){if(i)setTextAreaStretchableWithScroll();else{I(f),O(24),P.current.style.overflowY="scroll";let e=Math.abs(Math.floor(((null===(n=P.current)||void 0===n?void 0:n.scrollHeight)-24)/24));if(O(r),e>0){let t=f+24*e;I(Math.max(t,f))}else I(f);P.current.style.overflowY="hidden"}}else if(i)setTextAreaStretchableWithScroll();else if(r>=x+24){let e=Math.floor((r-x)/24);O(r),I(y+24*e),P.current.style.overflowY="hidden"}}},[v,f,y,x]);(0,i.useEffect)(()=>{P&&m&&k()},[k,m]);let E=(0,i.useCallback)(e=>{let{value:t}=e.target,n=(0,l.cH)(t),r=w&&!w(t);
1if(r||n)return;j.setError(void 0);let i=g.value;0===t.length&&v?A("deleteAll"):i>t&&v?A("delete"):A(),j.setValue(t),k()},[k,A,g.value,j,v,w]),T=(0,i.useCallback)(()=>{j.setTouched(!0)},[j]);return(0,i.useEffect)(()=>{h&&P.current&&(P.current.focus(),j.setTouched(!0),setTimeout(()=>{var e;null===(e=P.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},500))},[h,j,P]),(0,r.jsx)(b,{minHeight:y,height:C,autoComplete:"none",errorText:_.touched?_.error:"",labelText:c,name:g.name,value:g.value,hasCounter:t,maxLength:s,onChange:E,onBlur:T,placeholder:u,disabled:d,ref:P,$isStretchable:v})}},94153:function(e,t,n){n.d(t,{U:function(){return r}});let r=2500},40744:function(e,t,n){n.d(t,{R:function(){return s}});var r=n(82729),i=n(89542),o=n(52015),a=n(86546),l=n(64100),c=n(10055);function _templateObject(){let e=(0,r._)(["\n margin-top: 16px;\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,r._)(["\n ","\n "]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,r._)(["\n ","\n "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,r._)(["\n ","\n\n display: flex;\n flex-direction: column;\n gap: 24px;\n "]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,r._)(["\n ","\n "]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,r._)(["\n ","\n "]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,r._)(["\n margin-top: ",";\n\n @media "," {\n margin-top: ",";\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n }\n "]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,r._)(["\n ",";\n width: min-content;\n "]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,r._)(["\n white-space: normal;\n text-align: left;\n "]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,r._)(["\n color: ",";\n margin-top: 14px;\n "]);return _templateObject9=function(){return e},e}function _templateObject10(){let e=(0,r._)(["\n ",";\n "]);return _templateObject10=function(){return e},e}function _templateObject11(){let e=(0,r._)(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n & > .loader-before-btn {\n position: absolute;\n }\n "]);return _templateObject11=function(){return e},e}function _templateObject12(){let e=(0,r._)(["\n ",";\n "]);return _templateObject12=function(){return e},e}function _templateObject13(){let e=(0,r._)(["\n margin-left: 8px;\n cursor: pointer;\n\n &:hover {\n color: ",";\n }\n "]);return _templateObject13=function(){return e},e}function _templateObject14(){let e=(0,r._)(["\n margin-top: 24px;\n "]);return _templateObject14=function(){return e},e}let s={BottomButton:(0,o.ZP)(c.zx).withConfig({componentId:"sc-3d8d5413-0"})(_templateObject()),ChangeButton:(0,o.ZP)(c.zx).withConfig({componentId:"sc-3d8d5413-1"})(_templateObject1(),(0,a.yB)("margin-top",8,12)),FieldNote:(0,o.ZP)(i.ZT).withConfig({componentId:"sc-3d8d5413-2"})(_templateObject2(),a.e6),ModalButtons:(0,o.ZP)(l.E).withConfig({componentId:"sc-3d8d5413-3"})(_templateObject3(),(0,a.yB)("margin-top",20,24)),ModalButtonsContainer:o.ZP.div.withConfig({componentId:"sc-3d8d5413-4"})(_templateObject4(),(0,a.yB)("margin-top",20,24)),ModalContent:o.ZP.div.withConfig({componentId:"sc-3d8d5413-5"})(_templateObject5(),e=>{let{$hasMarginTop:t}=e;return t&&(0,a.yB)("margin-top",12,24)}),ModalField:o.ZP.div.withConfig({componentId:"sc-3d8d5413-6"}
1)(_templateObject6(),e=>{let{$isFirst:t}=e;return!t&&"16px"},a.j$.SCREEN_MOBILE,e=>{let{$isFirst:t}=e;return!t&&"20px"}),ModalHelper:(0,o.ZP)(c.zx).withConfig({componentId:"sc-3d8d5413-7"})(_templateObject7(),a.e6),ModalHelperText:o.ZP.span.withConfig({componentId:"sc-3d8d5413-8"})(_templateObject8()),ModalTitle:o.ZP.div.withConfig({componentId:"sc-3d8d5413-9"})(_templateObject9(),a.$_.defaultGray100),PersonalDataConsent:(0,o.ZP)(i.ZT).withConfig({componentId:"sc-3d8d5413-10"})(_templateObject10(),a.e6),ResetTimerButtonWrapper:o.ZP.div.withConfig({componentId:"sc-3d8d5413-11"})(_templateObject11()),ResetTimerButton:(0,o.ZP)(c.zx).withConfig({componentId:"sc-3d8d5413-12"})(_templateObject12(),a.e6),SubheaderChangeBtn:(0,o.ZP)(i.ZT).withConfig({componentId:"sc-3d8d5413-13"})(_templateObject13(),a.$_.primary50),SubheaderContainer:(0,o.ZP)(i.ZT).withConfig({componentId:"sc-3d8d5413-14"})(_templateObject14())}}}]);
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.