"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[128],{28683:function(e,n,t){t.d(n,{C5:function(){return r},DA:function(){return l},EQ:function(){return f},Ew:function(){return g},RQ:function(){return T},dS:function(){return v},gd:function(){return p},ih:function(){return m}});var r,a=t(98788),i=t(45680),o=t(16189),c=t(97815);!function(e){e.activate="activate",e.midpoint1="midpoint1",e.midpoint2="midpoint2",e.midpoint3="midpoint3",e.complete="complete"}(r||(r={}));var u=new Map([["videoStartTrackers",r.activate],["videoFirstQuartileTrackers",r.midpoint1],["videoMidpointTrackers",r.midpoint2],["videoThirdQuartileTrackers",r.midpoint3],["videoCompleteTrackers",r.complete]]),s="imdb-promoted-ad-trackers",d=(0,o.createLogger)()("AutorotateHero-AdTracker"),l=function(e){return Object.keys(e).reduce((function(n,t){var r=e[t],a=u.get(t),i=r&&a&&r.map((function(e){return{track:e,when:a}}));return i&&i.forEach((function(e){return n.push(e)})),n}),[])},f=function(e){return new Promise((function(n){if(window.Image){var t=new Image;t.src=e,t.onload=function(){return n()},t.onerror=function(){return n()}}else n()}))},g=function(){var e=(0,a.Z)((function(e){return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return e.length?[4,Promise.all(e.map((function(e){return f(e)})))]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}));return function(n){return e.apply(this,arguments)}}(),m=function(e){(null===e||void 0===e?void 0:e.formattedVideoTrackers)&&window.sessionStorage&&window.sessionStorage.setItem(s,JSON.stringify(e.formattedVideoTrackers))},v=function(e){"undefined"!==typeof document&&document.location&&document.location.assign(e)},p=function(e){if("string"===typeof e)try{return JSON.parse(e)}catch(n){return void d.error("There was a problem decoding promotedVideoAd JSON",n)}else if(e&&e.id)return e};function T(){var e=(0,c.G)(s);if(e){(0,c.VV)(s);try{return JSON.parse(e)}catch(n){d.error("Error parsing trackers",n)}}}},59411:function(e,n,t){t.d(n,{I:function(){return I},Q:function(){return R}});var r=t(70865),a=t(92228),i=t(52322),o=t(14865),c=t(2784),u=t(73857),s=t(19596),d=t(75217),l=t(45103),f=t(91842),g=t(35355),m=t(85285),v=t(9263),p=t(72471),T=t(11869),_=t(19471),E=t(42886);function h(){var e=(0,a.Z)(["\n height: ",";\n"]);return h=function(){return e},e}function b(){var e=(0,a.Z)(["\n width: ",";\n margin-left: ",";\n vertical-align: top;\n margin-right: ",";\n height: ",";\n"]);return b=function(){return e},e}function U(){var e=(0,a.Z)(["\n margin-left: -",";\n"]);return U=function(){return e},e}var S=function(e){var n=e.associatedConstId,t=e.entityType,r=e.initialAggregateData,a=e.initialUserData,o=e.className,s=e.testIdSuffix,d=(0,u.Z)(),l=(0,g.nu)();(0,E.Z)({associatedConstId:n,entityType:t,initialAggregateData:r,initialUserData:a});var f=(0,v.i9)(n,m.ly.EMOJI),h=(0,v.i9)(n,m.ly.INTERESTING),b=(0,T.VB)(n),U=(0,v.AE)(n,l),S=c.useMemo((function(){return(0,_.lu)(h,b,t,d)}),[h,b,t,d]),I=c.useMemo((function(){return(0,_.Nf)(f,b,t,d)}),[f,b,t,d]);return U===p.e.FETCHING?(0,i.jsx)(O,{className:o}):U!==p.e.ERROR&&f&&h?(0,i.jsx)(y,{likeAriaLabel:S.accessibilityLabel,likeCount:S.label,likeActive:S.active,reactionAriaLabel:I.accessibilityLabel,reactionCount:I.label,reactionActive:I.active,primaryReaction:I.primaryReaction,secondaryReaction:I.secondaryReaction,className:o,"data-testid":"".concat(m.z7.REACTION_SUMMARY).concat(s)}):null},O=function(e){return(0,i.jsx)(A,{className:e.className,type:"dot"})},I=function(e){return o.isBrowser?(0,i.jsx)(S,(0,r.Z)({},e)):(0,i.jsx)(O,(0,r.Z)({},e))},R=function(e){return(0,i.jsx)(M,{children:(0,i.jsx)(I,(0,r.Z)({},e))})},y=(0,s.styled)(d.A)(h(),f.spacing.l),A=(0,s.styled)(l.Loader)(b(),f.spacing.m,f.spacing.xxs,f.spacing.xs,f.spacing.l),M=s.styled.div(U(),f.spacing.xxs)},85285:function(e,n,t){t.d(n,{$N:function(){return p},Ev:function(){return S},G5:function(){return U},N2:function(){return h},PO:function(){return v},bq:function(){return _},cC:function(){return E},kL:function(){return T},ly:function(){return m},z7:function(){return b}});var r,a,i,o,c,u=t(47842),s=t(70865),d=t(16630),l=t.n(d),f=t(76510),g=t(49442),m={INTERESTING:"INTERESTING",EMOJI:"EMOJI"},v={THUMBS_UP:"interesting.thumbsup",THUMBS_DOWN:"interesting.thumbsdown",EXCITED:"emoji.excited",LIGHTBULB:"emoji.lightbulb",CLAP:"emoji.clappinghands",HEART:"emoji.heart",LAUGH:"emoji.laugh"},p=new(l())([v.THUMBS_DOWN,v.THUMBS_UP]),T=(r={},(0,u.Z)(r,v.THUMBS_DOWN,v.THUMBS_UP),(0,u.Z)(r,v.THUMBS_UP,v.THUMBS_DOWN),r),_=(a={},(0,u.Z)(a,v.EXCITED,g.o5.STAR_EYES),(0,u.Z)(a,v.LIGHTBULB,g.o5.LIGHT_BULB),(0,u.Z)(a,v.CLAP,g.o5.CLAP),(0,u.Z)(a,v.HEART,g.o5.HEART),(0,u.Z)(a,v.LAUGH,g.o5.LAUGH),a),E=(0,s.Z)((i={},(0,u.Z)(i,v.THUMBS_DOWN,"thumbs-down"),(0,u.Z)(i,v.THUMBS_UP,"thumbs-up"),i),_),h=(0,f.vU)((o={SELECTOR_EMOJI_DROPDOWN_BUTTON:{defaultMessage:"Open reactions menu",id:"feature_reactions_selector_open_menu"}},(0,u.Z)(o,g.o5.STAR_EYES,{defaultMessage:"an excited face with star eyes",id:"feature_reactions_stareyes_descriptor"}),(0,u.Z)(o,g.o5.CLAP,{defaultMessage:"clapping hands",id:"feature_reactions_clap_descriptor"}),(0,u.Z)(o,g.o5.HEART,{defaultMessage:"a heart",id:"feature_reactions_heart_descriptor"}),(0,u.Z)(o,g.o5.LAUGH,{defaultMessage:"a joyful laughing face",id:"feature_reactions_laugh_descriptor"}),(0,u.Z)(o,g.o5.LIGHT_BULB,{defaultMessage:"a light bulb",id:"feature_reactions_lightbulb_descriptor"}),(0,u.Z)(o,"SELECTOR_FLYOUT_EMOJI",{id:"feature_reactions_selector_video_emoji_flyout_reaction",defaultMessage:"React {reactionName} to video {entityName} to use an emoji showing {emojiDescription}."}),o)),b={REACTION_SELECTOR_SPACER:"reaction-selector-wrapper-spacing",REACTION_SELECTOR:"reaction-selector",REACTION_SUMMARY:"reaction-summary"},U={CHIP:"chip",BUTTON:"button",MENU:"menu",ACTIVE:"active",INACTIVE:"inactive"},S={REACTION_AFFIX:"rx",SIGNED_OUT_PREFIX:"tmp",REACTION_UPDATE_STATE:{ADD:"add",DELETE:"del"},REACTION_MENU_OPEN:"react-open",REACTION_IDS_PREFIX:(c={},(0,u.Z)(c,v.THUMBS_UP,"tmup"),(0,u.Z)(c,v.THUMBS_DOWN,"tmdn"),(0,u.Z)(c,v.EXCITED,"stry"),(0,u.Z)(c,v.LIGHTBULB,"litblb"),(0,u.Z)(c,v.CLAP,"clp"),(0,u.Z)(c,v.HEART,"hrt"),(0,u.Z)(c,v.LAUGH,"lagh"),c)}},19471:function(e,n,t){t.d(n,{BO:function(){return Z},Fh:function(){return w},Nc:function(){return V},Nf:function(){return H},lu:function(){return B},pY:function(){return G},pp:function(){return x},uF:function(){return k}});var r=t(47842),a=t(70865),i=t(96670),o=t(66383),c=t(16630),u=t.n(c),s=t(58036),d=t(85285),l=t(72471),f=t(87993),g="Unexpected Reaction Label Information",m="feature_reactions",v="".concat(m,"_summary"),p="".concat(m,"_selector"),T="user_only",_="user_and_others",E="others",h="none",b="emoji",U="emoji_one",S="emoji_two",O="likes",I="dislikes",R="selected",y="unselected",A="count",M="empty",C=function(e,n){return n.formatNumber(e,{notation:"compact",compactDisplay:"short"})},N=function(e,n,t,r,a){return a.formatMessage({id:"".concat(p,"_").concat(t,"_").concat(O,"_").concat(e?R:y,"_").concat(n?A:M),defaultMessage:g},{entityName:r,likeCount:n})},P=function(e,n,t){return t.formatMessage({id:"".concat(p,"_").concat(n,"_").concat(I,"_").concat(e?R:y,"_").concat(M),defaultMessage:g})},L=function(e,n,t,r){var a=h,i=e;return n?a=--i?_:T:i&&(a=E),r.formatMessage({id:"".concat(v,"_").concat(t,"_").concat(O,"_").concat(a),defaultMessage:g},{likeCount:i})},D=function(e,n,t,r,a,i){var o=h,c=b,u=e;return e&&(n?(u--,i&&u--,o=u?_:T):o=E,c=i?S:U),r.formatMessage({id:"".concat(v,"_").concat(t,"_").concat(c,"_").concat(o),defaultMessage:g},{reactionCount:u,primaryReaction:a,secondaryReaction:i})},B=function(e,n,t,r){if(!e||!n)return{label:"0",active:!1,accessibilityLabel:L(0,!1,t,r)};var a,i=e.reactions[d.PO.THUMBS_UP],o=n.includes(d.PO.THUMBS_UP),c=null!==(a=null===i||void 0===i?void 0:i.count)&&void 0!==a?a:0;return{accessibilityLabel:L(c,o,t,r),label:C(c,r),active:o}},H=function(e,n,t,r){var a,i;if(!e||!n)return{active:!1,label:"0",accessibilityLabel:D(0,!1,t,r)};var o,c,s,l,f,g,m,v=(o=e,Object.keys(o.reactions).map((function(e){return{count:o.reactions[e].count,reaction:e,text:o.reactions[e].text}})).sort((function(e,n){return n.count-e.count}))),p=Array.from(new(u())(n).difference(d.$N)),T=p.length>0;T?(c=p[0],s=p[1]):(c=(null===(l=v[0])||void 0===l?void 0:l.count)?null===(f=v[0])||void 0===f?void 0:f.reaction:void 0,s=(null===(g=v[1])||void 0===g?void 0:g.count)?null===(m=v[1])||void 0===m?void 0:m.reaction:void 0);var _=D(e.total,T,t,r,c?null===(a=e.reactions[c])||void 0===a?void 0:a.text:void 0,s?null===(i=e.reactions[s])||void 0===i?void 0:i.text:void 0);return{active:T,label:C(e.total,r),accessibilityLabel:_,primaryReaction:c?d.bq[c]:void 0,secondaryReaction:s?d.bq[s]:void 0}},Z=function(e,n,t,r,a,i){var o,c;if(!e||!n)return{thumbUpCount:"0",thumbUpId:d.PO.THUMBS_UP,thumbDownId:d.PO.THUMBS_DOWN,thumbUpAriaLabel:N(!1,0,t,i||"",r),thumbDownAriaLabel:P(!1,t,r),thumbUpTestId:(0,f.O)(d.PO.THUMBS_UP,!1,"button",a),thumbDownTestId:(0,f.O)(d.PO.THUMBS_DOWN,!1,"button",a)};var u,l=null!==(c=null===(o=e.reactions[d.PO.THUMBS_UP])||void 0===o?void 0:o.count)&&void 0!==c?c:0,g=C(l,r);return n.includes(d.PO.THUMBS_UP)?u=s.ReactionSelectorThumbState.THUMBS_UP:n.includes(d.PO.THUMBS_DOWN)&&(u=s.ReactionSelectorThumbState.THUMBS_DOWN),{thumbUpCount:g,userThumbState:u,thumbUpId:d.PO.THUMBS_UP,thumbDownId:d.PO.THUMBS_DOWN,thumbUpAriaLabel:N(u===s.ReactionSelectorThumbState.THUMBS_UP,l,t,i||"",r),thumbDownAriaLabel:P(u===s.ReactionSelectorThumbState.THUMBS_DOWN,t,r),thumbUpTestId:(0,f.O)(d.PO.THUMBS_UP,n.includes(d.PO.THUMBS_UP),"button",a),thumbDownTestId:(0,f.O)(d.PO.THUMBS_DOWN,n.includes(d.PO.THUMBS_DOWN),"button",a)}},w=function(e,n,t,r,a,i){if(!e||!n)return[];var c=[];return Object.entries(e.reactions).forEach((function(e){var u=(0,o.Z)(e,2),s=u[0],l=u[1],m=n.includes(s),v={name:d.bq[s],label:l.text},T=function(e,n,t,r,a,i){return i.formatMessage({id:"".concat(p,"_").concat(n,"_").concat(b,"_").concat(e?R:y,"_").concat(a?A:M),defaultMessage:g},{reactionName:t,entityName:r,reactionCount:a})}(m,t,v.label||"",i||"",l.count,r),_=function(e,n,t,r){var a=r.formatMessage(d.N2[t]);return r.formatMessage(d.N2.SELECTOR_FLYOUT_EMOJI,{reactionName:e,entityName:n,emojiDescription:a})}(v.label||"",i||"",v.name,r);c.push({reaction:v,reactionId:s,hasUserReacted:m,reactionAriaLabel:T,reactionAriaDescriptor:_,reactionCount:C(l.count,r),reactionChipTestId:(0,f.O)(s,m,"chip",a),reactionButtonTestId:(0,f.O)(s,m,"button",a)})})),c},V=function(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){return(0,i.Z)((0,a.Z)({},e),(0,r.Z)({},n.reaction.reactionId,n))}),{})},x=function(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){return(0,i.Z)((0,a.Z)({},e),(0,r.Z)({},n.groupId,{totalCount:n.aggregateCount,summary:n.reactionSummaries.reduce((function(e,n){return(0,i.Z)((0,a.Z)({},e),(0,r.Z)({},n.reaction.reactionId,{count:n.count,text:n.reaction.text}))}),{})}))}),{})},k=function(e){return!e||e===l.e.ERROR},G=function(e){return!e}},87993:function(e,n,t){t.d(n,{F:function(){return i},O:function(){return a}});var r=t(85285),a=function(e,n,t,a){return"".concat(r.z7.REACTION_SELECTOR,"-").concat(a,"-").concat(r.cC[e],"-").concat(t,"-").concat(n?r.G5.ACTIVE:r.G5.INACTIVE)},i=function(e){return"".concat(r.z7.REACTION_SELECTOR,"-").concat(e,"-").concat(r.G5.MENU,"-").concat(r.G5.BUTTON)}},42886:function(e,n,t){t.d(n,{Z:function(){return D}});var r=t(2784),a=t(14865),i=t(947),o=t.n(i),c=t(26806),u=t(94177),s=t(25140),d=t(66655),l=t(35355),f=t(2366),g=t(98621),m=t(15316),v=t(72471),p=t(11869),T=t(19471),_="video",E=t(92228),h=t(16630),b=t.n(h),U=t(30382),S=t.n(U);function O(){var e=(0,E.Z)(["\n fragment SharedVideoUserReactions on Video {\n id\n userReactions {\n entityId\n lastUpdated\n reaction {\n language {\n id\n text\n }\n reactionId\n text\n id\n }\n }\n }\n"]);return O=function(){return e},e}function I(){var e=(0,E.Z)(["\n fragment SharedVideoReactions on Video {\n id\n reactionsSummary {\n reactionSummaryGroups {\n aggregateCount\n displayCount {\n value\n language\n }\n groupId\n reactionSummaries {\n reaction {\n language {\n id\n text\n }\n reactionId\n text\n id\n }\n count\n displayCount {\n value\n language\n }\n }\n selectionType\n }\n }\n }\n"]);return I=function(){return e},e}function R(){var e=(0,E.Z)(["\n query ReactionsForVideo(\n $aggregateVideoConsts: [ID!]!\n $userVideoConsts: [ID!]!\n ) {\n aggregateVideos: videos(ids: $aggregateVideoConsts) {\n ...SharedVideoReactions\n }\n\n userVideos: videos(ids: $userVideoConsts) {\n ...SharedVideoUserReactions\n }\n }\n ","\n ","\n"]);return R=function(){return e},e}var y=S()(O()),A=S()(I()),M={query:S()(R(),y,A),createQueryVariablesMap:function(e){var n=[],t=[];return e.forEach((function(e,r){e.needAggregate&&n.push(r),e.needUser&&t.push(r)})),{aggregateVideoConsts:n,userVideoConsts:t}},parseResponseDataToState:function(e,n,t,r,a){if(n.aggregateVideoConsts.length){var i,o=new(b())(n.aggregateVideoConsts),c={};null===e||void 0===e||null===(i=e.aggregateVideos)||void 0===i||i.forEach((function(e){var n;e&&(c[e.id]=(0,T.pp)(null===(n=e.reactionsSummary)||void 0===n?void 0:n.reactionSummaryGroups)||{},o.delete(e.id))})),r.setBulkAggregateReactions(c),o.size&&r.setFetchedStatus(Array.from(o),v.e.ERROR)}if(n.userVideoConsts.length){var u,s=new(b())(n.userVideoConsts),d={};null===e||void 0===e||null===(u=e.userVideos)||void 0===u||u.forEach((function(e){e&&(d[e.id]=(0,T.Nc)(null===e||void 0===e?void 0:e.userReactions)||{},s.delete(e.id))})),a.initializeBulkUserReactions(d),s.size&&a.setFetchedStatus(Array.from(s),v.e.ERROR)}}},C=(0,u.nN)(),N=C.source,P=C.next;a.isBrowser&&(0,u.zG)(N,(0,u.f3)((0,u.FG)(100)),(0,u.qn)(50),(0,u.Ld)((function(e){var n=e[0],t=n.client,r=n.context,a=n.aggregateStoreHandlers,i=n.userStoreHandlers,c=e.reduce((function(e,n){return n.requestInfo.forEach((function(t,r){var a,i=t.entityType;if(e.has(i)||e.set(i,{reactionRequests:new Map,batchInfo:n.batchInfo}),null===(a=e.get(i))||void 0===a?void 0:a.reactionRequests.has(r)){var o,c,u,s,d=null!==(s=null===(o=e.get(i))||void 0===o||null===(c=o.reactionRequests)||void 0===c?void 0:c.get(r))&&void 0!==s?s:{needUser:!0,needAggregate:!0};null===(u=e.get(i))||void 0===u||u.reactionRequests.set(r,{entityType:i,needUser:d.needUser&&t.needUser,needAggregate:d.needAggregate&&t.needAggregate})}else{var l;null===(l=e.get(i))||void 0===l||l.reactionRequests.set(r,t)}})),e}),new Map),u=[],s=[];c.forEach((function(e){s.push(e.batchInfo.parseResponseDataToState),u.push({query:e.batchInfo.query,variables:e.batchInfo.createQueryVariablesMap(e.reactionRequests)})}));var d=o()("BatchedReactions").add(u[0].query,u[0].variables);u.slice(1).reduce((function(e,n){return e.add(n.query,n.variables)}),d),t.query(d.document,d.variables,r).toPromise().then((function(e){s.forEach((function(n){return n(e.data,d.variables||{},e.error,a,i)}))}))})));var L=function(e,n){var t=(0,s.B)().context,a=(0,c.m8)(),i=function(e){if(e===_)return M;throw new Error("Reactions attempting to be batched for an unexpected entity")}(n),o=(0,r.useMemo)((function(){return(0,d.Z)({serverSideCacheable:!1,personalized:!0},t)}),[t]),u=(0,m.l)(),E=(0,p.og)(),h=function(e,n){var t=(0,l.nu)(),r=(0,g.hg)({weblabID:f.lh.IMDB_REACTIONS_ON_VIDEO_831329,treatments:{T1:!0}}),a=(0,m.l)().setFetchedStatus,i=(0,p.og)().setFetchedStatus,o=(0,m.B8)(),c=(0,p.Di)();return e.forEach((function(u,s){u.needAggregate=u.needAggregate&&r&&(0,T.pY)(o.current[s]),u.needUser=u.needUser&&r&&t&&(0,T.pY)(c.current[s]),(!u.needUser&&!u.needAggregate||u.entityType!==n)&&e.delete(s),u.needAggregate&&a(s,v.e.FETCHING),u.needUser&&i(s,v.e.FETCHING)})),e}(e,n);h.size&&P({client:a,context:o,batchInfo:i,aggregateStoreHandlers:u,userStoreHandlers:E,requestInfo:h})},D=function(e){var n=e.associatedConstId,t=e.entityType,a=e.initialAggregateData,i=e.initialUserData,o=(0,p.og)().initializeUserReactions,c=(0,m.l)().setAggregateReactions,u=(0,p.KY)(n),s=!(0,T.uF)(u)||!!i;r.useEffect((function(){(0,T.uF)(u)&&i&&o(n,i)}),[i]);var d=(0,m.if)(n),l=!(0,T.uF)(d)||!!a;r.useEffect((function(){(0,T.uF)(d)&&a&&c(n,a)}),[a]),L(new Map([[n,{needUser:!s,needAggregate:!l,entityType:t}]]),t)}},97299:function(e,n,t){t.d(n,{Y:function(){return r}});t(2784),t(15907),t(81186),new Set;var r=function(e,n){var t;return null===(t=window.mediaOrchestrator)||void 0===t?void 0:t.subscribe(e,n).remove}},20753:function(e,n,t){t.d(n,{Je:function(){return o},LU:function(){return c},XW:function(){return i},mB:function(){return r},sd:function(){return a}});var r,a,i="W7zSm81+mmIsg7F+fyHRKhF3ggLkTqtGMhvI92kbqf/ysE99",o="imdbnext-vp-jw-",c="imdbnext-vp-container";!function(e){e.playerReadyMessage="VIDEO_PLAYER--READY",e.playerPlaybackStartedMessage="VIDEO_PLAYER--PLAYBACK_STARTED",e.playerPlaybackStoppedMessage="VIDEO_PLAYER--PLAYBACK_STOPPED",e.playerPlaybackCompletedMessage="VIDEO_PLAYER--PLAYBACK_COMPLETED",e.signalPlayMessage="VIDEO_PLAYER--PLAY",e.signalPauseMessage="VIDEO_PLAYER--PAUSE",e.signalStopMessage="VIDEO_PLAYER--STOP"}(r||(r={})),function(e){e.Trailer="amzn1.imdb.video.contenttype.trailer",e.Clip="amzn1.imdb.video.contenttype.clip"}(a||(a={}))},81186:function(e,n,t){t(14865),t(15907)}}]);