"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5959],{78176:function(n,t,e){e.d(t,{x:function(){return h}});var a=e(70865),r=e(96670),i=e(26297),o=e(92228),c=e(52322),u=e(72779),s=e.n(u),l=e(2784),d=e(73857),f=e(19596),g=e(45103),m=e(46315),p=e(91842),_=e(93130);function R(){var n=(0,o.Z)(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n color: inherit;\n overflow: hidden;\n max-height: 1em;\n"]);return R=function(){return n},n}function v(){var n=(0,o.Z)(["\n &.rank-flat {\n font-size: 0.75em;\n margin-right: 0.1em;\n }\n\n &.rank-flat--light {\n ","\n }\n\n &.rank-flat--dark {\n ","\n }\n\n &.rank-up {\n ","\n }\n\n &.rank-down {\n ","\n }\n\n &.rank-up,\n &.rank-down {\n font-size: 1.5em;\n margin-right: -0.1em;\n margin-left: -0.1em;\n }\n"]);return v=function(){return n},n}var h=function(n){var t=n.difference,e=n.direction,o=(0,i.Z)(n,["difference","direction"]),u=(0,d.Z)(),f=(0,l.useContext)(m.Theme),g="dash",p=s()("rank-flat","rank-flat--".concat(f.palette.name)),R=u.formatMessage({id:"rank_meter_no_change",defaultMessage:"No rank change"});switch(e){case _.UQ.Up:g="arrow-drop-up",p="rank-up",R=u.formatMessage({id:"rank_meter_upward_rank_change",defaultMessage:"Moved up {difference} in ranking"},{difference:t});break;case _.UQ.Down:g="arrow-drop-down",p="rank-down",R=u.formatMessage({id:"rank_meter_downward_rank_change",defaultMessage:"Moved down {difference} in ranking"},{difference:t})}return(0,c.jsxs)(b,(0,r.Z)((0,a.Z)({},o),{"aria-label":R,children:[(0,c.jsx)(T,{name:g,type:"inline",className:p}),t]}))},b=f.default.span.withConfig({componentId:"sc-8e746061-0"})(R()),T=(0,f.default)(g.Icon).withConfig({componentId:"sc-8e746061-1"})(v(),(0,p.setPropertyToColorVar)("color","ipt-on-base-textSecondary-color"),(0,p.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color"),(0,p.setPropertyToColorVar)("color","ipt-on-base-accent4-color"),(0,p.setPropertyToColorVar)("color","ipt-on-base-accent3-color"))},80749:function(n,t,e){e.d(t,{Nf:function(){return b},z7:function(){return R}});var a=e(47842),r=e(92228),i=e(52322),o=e(64210),c=e(72779),u=e.n(c),s=(e(2784),e(73857)),l=e(19596),d=e(45103),f=e(91842),g=e(61436),m=e(25699);function p(){var n=(0,r.Z)(["\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n gap: ",";\n\n ."," {\n padding: 0;\n min-width: 0;\n }\n\n ."," {\n "," {\n display: none;\n }\n }\n"]);return p=function(){return n},n}function _(){var n=(0,r.Z)(["\n font-size: inherit;\n height: fit-content;\n padding: 0;\n text-align: start;\n"]);return _=function(){return n},n}var R={CONTAINER:"ratingGroup--container",IMDB_RATING:"ratingGroup--imdb-rating",OTHER_USER_RATING:"ratingGroup--other-user-rating",PLACEHOLDER:"ratingGroup--placeholder",USER_RATING:"ratingGroup--user-rating"},v="hide-vote-count",h="standalone-star",b=function(n){var t=n.canRate,e=n.className,r=n.hideMaxIMDbRating,o=n.hideVoteCountOnSmallBreakpoints,c=n.otherUserRating,l=n.titleId,f=n.ratingsSummary,p=n.rateButtonLabel,_=n.refMarker,b=n.showPlaceholderStarIfApplicable,x=n.titleText,L=(0,s.Z)(),M=((0,d.useRatingsContext)(l)||{}).rating,P=(0,g.P)(M,"user"),S=(0,g.P)(null===f||void 0===f?void 0:f.aggregateRating,"imdb"),C=(0,g.P)(c,"user"),N=L.formatMessage({id:"common_ariaLabels_notRatable",defaultMessage:"This title is currently not ratable"}),k=L.formatMessage({id:"common_ariaLabels_IMDbRating",defaultMessage:"IMDb rating: {rating}"},{rating:S||""}),U=L.formatMessage({id:"common_ariaLabels_other_user_rating",defaultMessage:"User rating: {value}"},{value:c}),E=L.formatMessage({id:"common_ariaLabels_ratingButtonRated",defaultMessage:"Your rating: {rating}"},{rating:P||""}),w=L.formatMessage({id:"common_ariaLabels_ratingButtonUnrated",defaultMessage:"Rate {titleName}"},{titleName:x}),y=L.formatMessage({id:"common_ratingPrompt_rate",defaultMessage:"Rate"}),O=(null===f||void 0===f?void 0:f.voteCount)?L.formatNumber(null===f||void 0===f?void 0:f.voteCount,{notation:"compact",compactDisplay:"short"}):void 0,A=b&&!S&&!(t&&x);return(0,i.jsxs)(T,{className:e,"data-testid":R.CONTAINER,children:[S&&(0,i.jsx)(d.RatingStar,{"data-testid":R.IMDB_RATING,ariaLabel:k,className:R.IMDB_RATING,formattedRating:S,maxRating:r?void 0:10,formattedVoteCount:O,voteCountClassName:o?v:""}),c&&(0,i.jsx)(d.RatingStar,{ariaLabel:U,className:R.OTHER_USER_RATING,"data-testid":R.OTHER_USER_RATING,formattedRating:C,type:"otherUser"}),t&&x&&(0,i.jsx)(m.T,{title:{id:l,titleText:x,canRate:t},refPrefix:(null===_||void 0===_?void 0:_.prefix)||"",refSuffix:(null===_||void 0===_?void 0:_.suffix)||"",ratingTriggerComponent:function(n){var t=n.onUserRatingClick;return(0,i.jsx)(I,{ariaLabelRated:E,ariaLabelUnrated:w,formattedRating:P,className:u()(R.USER_RATING,(0,a.Z)({},h,!S)),onClick:t,rateLabel:"string"===typeof p?p:y})}}),A&&(0,i.jsx)(d.RatingStar,{"data-testid":R.PLACEHOLDER,ariaLabel:N,className:u()(R.PLACEHOLDER,h),type:"placeholder"})]})},T=l.default.div.withConfig({componentId:"sc-e2dbc1a3-0"})(p(),o.spacing.xs,h,v,f.mediaQueries.breakpoints.below.m),I=(0,l.default)(d.RateButton).withConfig({componentId:"sc-e2dbc1a3-1"})(_())},25699:function(n,t,e){e.d(t,{T:function(){return h}});var a=e(98788),r=e(45680),i=e(52322),o=e(2784),c=e(45103),u=e(89363),s=e(31619),l=e(92281),d=e(90551),f=e(13813),g=e(95460),m=e(11992),p=e(26688),_=e(77637),R=(0,e(76510).vU)({ratingButtonRatedAriaLabel:{id:"common_ariaLabels_ratingButtonRated",defaultMessage:"Your rating: {rating}"},ratingButtonUnratedAriaLabel:{id:"common_ariaLabels_ratingButtonUnrated",defaultMessage:"Rate {titleName}"},ratingPromptHeaderLabel:{id:"common_ratingPrompt_header",defaultMessage:"Rate this"},ratingPromptRateLabel:{id:"common_ratingPrompt_rate",defaultMessage:"Rate"},ratingPromptRemoveRatingLabel:{id:"common_ratingPrompt_removeRating",defaultMessage:"Remove rating"},ratingPromptErrorLabel:{id:"common_ratingPrompt_error",defaultMessage:"Can't rate title. Try again later."},ratingPromptAriaLabelPrefix:{id:"common_ratingPrompt_ariaLabelPrefix",defaultMessage:"Rating"}}),v="urate",h=function(n){var t=n.title,e=t.id,h=t.titleText,b=t.canRate,T=n.ratingTriggerComponent,I=n.refPrefix,x=n.refSuffix,L=(0,o.useState)(!1),M=L[0],P=L[1],S=(0,d.n)(),C=(0,c.useRatingsContext)(e)||{},N=C.rating,k=C.updateRating,U=C.deleteRating,E=(0,_.z)("rt",{prefix:I,suffix:x}),w="".concat(I.replace(/_/g,"-").substring(0,30-v.length)).concat(v),y=(0,f.F)((0,f.y)()),O=(0,l.vY)({titleId:e,refTag:E,currentRating:N}),A=O.updateTitleRating,H=O.deleteTitleRating,B=O.tempRateUpdateLogRef,Z=(0,s.N)(R.ratingPromptHeaderLabel),D=(0,s.N)(R.ratingPromptRateLabel),G=(0,s.N)(R.ratingPromptRemoveRatingLabel),j=(0,s.N)(R.ratingPromptAriaLabelPrefix);return(0,i.jsxs)(i.Fragment,{children:[T({onUserRatingClick:function(){b&&((0,g.ar)(y,w,m.qB.POP_UP),P(!0))}}),b&&(0,i.jsx)(c.RatingPrompt,{isOpen:M,tconst:e,title:h,headerLabel:Z,rateLabel:D,ariaLabelPrefix:j,shouldUseNewRatingFlow:!0,secondaryButtonText:G,secondaryButtonType:u.uu.RemoveRating,onPrimaryButtonClicked:function(){var n=(0,a.Z)((function(n,t){return(0,r.__generator)(this,(function(e){switch(e.label){case 0:return n?S?(P(!1),null===k||void 0===k||k(n,E,(function(){return A(n,t)})),[3,3]):[3,1]:(P(!1),[2]);case 1:return[4,B(n,t)];case 2:e.sent(),(0,p.O)(n,t,E,y),e.label=3;case 3:return[2]}}))}));return function(t,e){return n.apply(this,arguments)}}(),onSecondaryButtonClicked:function(){var n=(0,a.Z)((function(n,t){return(0,r.__generator)(this,(function(n){return P(!1),null===U||void 0===U||U(E,(function(){return H(t)})),[2]}))}));return function(t,e){return n.apply(this,arguments)}}(),onCloseClicked:function(n){P(!1)}})]})}},30966:function(n,t,e){e.d(t,{A:function(){return o}});var a=e(70865),r=e(52322),i=(e(2784),e(76510)),o=function(n){return(0,r.jsx)(i.BK,(0,a.Z)({},n))}},97026:function(n,t,e){var a;function r(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.DEFAULT;if(n<=0)return t===a.HOURS_MINUTES_EXPLICIT?"0min":t===a.HOURS_MINUTES_EXPLICIT_SHORT?"0m":t===a.ISO_8601?"PT0S":"0:00";var e=Math.floor(n/3600),r=Math.floor(n%3600/60),o=Math.floor(n%60);if(t===a.HOURS_MINUTES_EXPLICIT||t===a.HOURS_MINUTES_EXPLICIT_SHORT)return n<60&&n>0&&(r=1),e>0&&r<=0?"".concat(e,"h"):"".concat(e>0?e+"h "+r:r).concat(t===a.HOURS_MINUTES_EXPLICIT_SHORT?"m":"min");if(t===a.ISO_8601){var c=e?"".concat(e,"H"):"",u=r?"".concat(r,"M"):"",s=o?"".concat(o,"S"):"";return"PT".concat(c).concat(u).concat(s)}return"".concat(e>0?e+":"+i(r):r,":").concat(i(o))}function i(n){return n<=0||!Number.isInteger(n)?"00":n>9?"".concat(n):"0"+"".concat(n)}e.d(t,{A:function(){return a},L:function(){return r}}),function(n){n.DEFAULT="default",n.HOURS_MINUTES_EXPLICIT="hours_minutes_explicit",n.HOURS_MINUTES_EXPLICIT_SHORT="hours_minutes_explicit_short",n.ISO_8601="iso_8601"}(a||(a={}))},35635:function(n,t,e){function a(n,t){if(n){var e=null===n||void 0===n?void 0:n.year,a=(null===n||void 0===n?void 0:n.endYear)||void 0,r=t&&!a,i="";return e&&a?i=e===a?e.toString():"".concat(e,"\u2013").concat(a):e&&r?i="".concat(e,"\u2013 "):e&&(i="".concat(e)),i}}e.d(t,{y:function(){return a}})},91793:function(n,t,e){e.d(t,{S:function(){return o}});var a=e(92228),r=e(19596);function i(){var n=(0,a.Z)(["\n @supports (-webkit-line-clamp: ",") {\n display: -webkit-box;\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n"]);return i=function(){return n},n}var o=function(n){return(0,r.css)(i(),n,n)}}}]);