"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2050],{25710:function(e,n,t){t.d(n,{r:function(){return d},Z:function(){return m}});var r=t(52322),a=t(2784),o=t(45103),i=t(11998),s=t(32735),c=t(31619),l=t(90551),u=t(26688),d=function(e){var n=e.contributeButton,t=e.contributeUrl,d=e.iframeClassName,m=e.smallBreakpointAction,f=(0,a.useState)(!1),h=f[0],p=f[1],b=function(){return p(!1)},g=function(e){e.stopPropagation()},v=function(e){var n=e.breakpoint,t=e.isLoggedIn,r=e.largeBreakpointAction,a=e.refTagForLoginRedirect,o=e.smallBreakpointAction,i=n.l||n.xl;return function(e){e.preventDefault(),i?t?r(e):(0,u.r)(a):o(e)}}({isLoggedIn:(0,l.n)(),breakpoint:(0,o.useBreakpointsAsConfig)(),smallBreakpointAction:m,largeBreakpointAction:function(e){e.stopPropagation(),e.preventDefault(),p(!0)}}),_=a.cloneElement(n,{"data-testid":"edit-action-button",href:t,onClick:v,onKeyDown:function(e){(0,i.isEnterOrSpaceKey)(e)&&v(e)}}),k=(0,c.N)({id:"common_ariaLabel_closePrompt",defaultMessage:"Close Prompt"});return(0,r.jsxs)(r.Fragment,{children:[_,h&&(0,r.jsx)("div",{onClick:g,onMouseLeave:g,"data-testid":"contribute-iframe-drawer-container",children:(0,r.jsx)(o.Drawer,{isOpen:h,onCloseClicked:b,side:"right",closePromptLabel:k,children:(0,r.jsx)(s.o,{src:t,onCloseMeCallback:b,className:d,"data-testid":"contribute-iframe"})})})]})},m=d},32735:function(e,n,t){t.d(n,{o:function(){return d}});var r=t(92228),a=t(52322),o=t(72779),i=t.n(o),s=t(2784),c=t(19596),l=t(8451);function u(){var e=(0,r.Z)(["\n height: calc(100vh - 6rem);\n width: 100%;\n position: absolute;\n overflow-y: scroll;\n"]);return u=function(){return e},e}var d=function(e){var n=s.useRef(),t=function(t){var r;(null===(r=n.current.contentWindow)||void 0===r?void 0:r.location.href)===l.$R&&e.onCloseMeCallback()};return s.useEffect((function(){return n.current.addEventListener("load",t),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("load",t)}}),[]),(0,a.jsx)(m,{"data-testid":"contribute-iframe",ref:n,src:e.src,className:i()(e.className)})},m=c.default.iframe.withConfig({componentId:"sc-a044defc-0"})(u())},92050:function(e,n,t){t.d(n,{Tz:function(){return te},ZP:function(){return re}});var r=t(70865),a=t(52322),o=t(72779),i=t.n(o),s=t(2784),c=t(45103),l=t(13813),u=t(95460),d=t(11992),m=t(31619),f={id:"shareMenu_ariaLabel_shareOnSocialMedia",defaultMessage:"Share on social media"},h={id:"shareMenu_shareText_checkoutThisLink",defaultMessage:"Check out this link on IMDb!"},p=h,b={id:"shareMenu_copyLink",defaultMessage:"Copy Link"},g={id:"shareMenu_emailLink",defaultMessage:"Email Link"},v=function(e){return"string"===typeof e?e:(0,m.N)(e)},_=t(14865),k=t(92228),L=t(72282),x=t.n(L),y=t(19596),w=t(64846),N=t.n(w),I=t(11998),C=t(20701),S=t(54364),P=t(25710),M=t(8451),T=t(47842),A=t(96670),j=t(66383),B="ref_",Z="ext_shr_em",E="ext_shr_fb",U="ext_shr_tw",R="ext_shr_lnk",D=function(e,n,t,r){return{shareLabelText:e,shareLinkUrl:n,shareIconName:t,shareLinkTarget:r}};function O(){var e=(0,k.Z)(["\n cursor: pointer;\n"]);return O=function(){return e},e}var q,K,H,$={email:"share-em",facebook:"share-fb",twitter:"share-tw",link:"share-lnk"},F={email:"share_em",facebook:"share_fb",twitter:"share_tw",link:"share_lnk"},V="link",z="extra-contribute-action-",Y="contribute-extra-action-",W=y.default.div.withConfig({componentId:"sc-1401a78d-0"})(O()),G=function(e){var n,t=(0,l.y)(),o=t.pageType,s=t.subPageType,f=t.pageConst,h=t.refTagPrefix,p=(0,c.useSnackbar)().sendSnack,k=(0,m.N)({id:"common_linkCopied",defaultMessage:"Link copied"});if(_.isNode)return null;var L=function(n){return function(t){t.stopPropagation(),(0,C.P)($[n.shareIconName]),h&&(0,u.K8)("".concat(h,"_").concat(F[n.shareIconName]),{type:o,subType:s,id:f},$[n.shareIconName],d.qB.ACTION_ONLY),e.interactionHandler(n.shareLinkUrl)&&t.preventDefault(),n.shareIconName===V&&p({primaryText:k,type:"auto"})}},y=function(e){e.stopPropagation()},w=function(e){if(_.isNode)throw new Error("not supported from node");var n=null!==e&&void 0!==e?e:window.location.href,t=new(N())(n,window.location,!0);return delete t.query.ref_,t.set("query",t.query),t.host||t.set("host",window.location.host),t.toString()}(e.url),O=(null===(n=e.shareProps)||void 0===n?void 0:n.suppressDefaultActions)?[]:function(e,n){var t=encodeURIComponent(v(n.emailSubject)),a=encodeURIComponent(v(n.shareBody)),o=(0,j.Z)(e.split("?"),2),i=o[0],s=o[1],c={};if(s){var l=!0,u=!1,d=void 0;try{for(var m,f=s.split("&")[Symbol.iterator]();!(l=(m=f.next()).done);l=!0){var h=m.value,p=(0,j.Z)(h.split("="),2),_=p[0],k=p[1];c[_]=k}}catch(C){u=!0,d=C}finally{try{l||null==f.return||f.return()}finally{if(u)throw d}}}var L=encodeURIComponent(i+"?"+new URLSearchParams((0,A.Z)((0,r.Z)({},c),(0,T.Z)({},B,E))).toString()),x=encodeURIComponent(i+"?"+new URLSearchParams((0,A.Z)((0,r.Z)({},c),(0,T.Z)({},B,U))).toString()),y=encodeURIComponent(i+"?"+new URLSearchParams((0,A.Z)((0,r.Z)({},c),(0,T.Z)({},B,Z))).toString()),w="".concat("https://www.facebook.com/sharer.php","?u=").concat(L),N="".concat("https://twitter.com/intent/tweet","?text=").concat(a," - ").concat(x),I="mailto:?subject=".concat(t,"&body=").concat(a," - ").concat(y);return[D("Facebook",w,"facebook","_blank"),D("Twitter",N,"twitter","_blank"),D(g,I,"email","_blank"),D(b,i+"?"+new URLSearchParams((0,A.Z)((0,r.Z)({},c),(0,T.Z)({},B,R))).toString(),"link","_copy")]}(w,e.shareProps).map((function(e){return"_copy"===e.shareLinkTarget?function(e){return(0,a.jsx)(x(),{text:e.shareLinkUrl,options:{format:"text/plain"},children:(0,a.jsx)(c.ListItem,{className:i()(["sharemenu-listitem","sharemenu-copylink"]),preIconName:V,onClick:function(n){return n&&L(e)(n)},onKeyDown:function(n){return(0,I.isEnterOrSpaceKey)(n)&&n&&L(e)(n)},children:v(e.shareLabelText)})},"copy-to-clipboard")}(e):function(e){return(0,a.jsx)(c.ListItem,{preIconName:e.shareIconName,href:e.shareLinkUrl,target:e.shareLinkTarget,className:"sharemenu-listitem",onClick:function(n){return n&&L(e)(n)},onKeyDown:function(n){return(0,I.isEnterOrSpaceKey)(n)&&n&&L(e)(n)},children:v(e.shareLabelText)},e.shareIconName)}(e)}));if(e.shareProps.extraActions){O.push((0,a.jsx)(c.ListDivider,{},"divider"));var q=0;e.shareProps.extraActions.forEach((function(n,t){n.isContributionAction?(q+=1,O.push(function(e,n,t){var o=e.linkUrl,s={contributeButton:(0,a.jsx)(W,{onMouseLeave:y,"data-testid":z+n,children:(0,a.jsx)(c.ListItem,{className:i()([e.className,"sharemenu-listitem"]),preIconName:e.iconName,postIconName:e.postIconName,children:v(e.label)},e.iconName+"-"+t)}),contributeUrl:(0,S.oq)(o,M.$R,!0),iframeClassName:Y+n,smallBreakpointAction:function(e){window.open((0,S.oq)(o,window.location.href,!0),"_self")}};return(0,a.jsx)(P.Z,(0,r.Z)({},s),t)}(n,q,t))):O.push(function(n,t){var r=n.linkUrl;return(0,a.jsx)(c.ListItem,{className:i()([n.className,"sharemenu-listitem"]),preIconName:n.iconName,postIconName:n.postIconName,href:r,target:n.linkTarget,onClick:function(t){if(n.onSelect)n.onSelect(t);else{t.stopPropagation();var a=!1;n.handler&&n.handler(r)&&(a=!0),e.interactionHandler(r)&&(a=!0),a&&t.preventDefault()}},onKeyDown:function(e){(0,I.isEnterOrSpaceKey)(e)&&n.onSelect&&n.onSelect(e)},children:v(n.label)},n.iconName+"-"+t)}(n,t))}))}return(0,a.jsx)(c.List,{className:"sharemenu-list",children:O})},J=function(e){return(0,a.jsx)(c.BottomSheet,{isOpen:e.menuVisibility,onCloseClicked:function(){return e.interactionHandler()},"data-testid":"share-bottom-sheet",closePromptLabel:(0,m.N)({id:"common_ariaLabel_closePrompt",defaultMessage:"Close Prompt"}),children:(0,a.jsx)(G,(0,r.Z)({},e))})},Q=t(96876),X=function(e){var n=function(){return e.interactionHandler()};return(0,s.useEffect)((function(){return window.addEventListener("click",n),function(){return window.removeEventListener("click",n)}}),[]),(0,a.jsx)(Q.l,{onMouseLeave:n,"data-testid":"share-container",children:(0,a.jsx)(c.SetPalette,{palette:"dark",children:(0,a.jsx)(c.Menu,{menuID:"media-details-share-button",isVisible:e.menuVisibility,mode:"anchored",children:(0,a.jsx)(G,(0,r.Z)({},e))})})})},ee=function(e){var n=(0,c.useBreakpointsAsConfig)();if(!_.isBrowser)return null;var t=n.s||n.xs,o=e.forceBottomSheet||t?J:X;return(0,a.jsx)(o,(0,r.Z)({},e))},ne=function(e){return{shareBody:null!==(q=null===e||void 0===e?void 0:e.shareBody)&&void 0!==q?q:h,emailSubject:null!==(K=null===e||void 0===e?void 0:e.emailSubject)&&void 0!==K?K:p,label:null!==(H=null===e||void 0===e?void 0:e.label)&&void 0!==H?H:f,extraActions:null===e||void 0===e?void 0:e.extraActions,suppressDefaultActions:null===e||void 0===e?void 0:e.suppressDefaultActions}};var te=function(e){var n,t=(0,s.useState)(!1),o=t[0],m=t[1],f=(0,l.y)(),h=f.pageType,p=f.pageConst,b=f.subPageType,g=ne(e.shareProps),_=v(g.label),k={shareProps:g,url:e.url,forceBottomSheet:e.forceBottomSheet,interactionHandler:function(n){return m(!1),!(!n||!e.shareHandler)&&e.shareHandler(n)},menuVisibility:o};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.IconButton,{disabled:e.disabled,name:null!==(n=e.iconButtonName)&&void 0!==n?n:"share",label:_,onClick:function(n){n.stopPropagation();var t=!o;!function(e,n){var t="".concat(n).concat("-menu-open");(0,u.ar)(e,t,d.qB.POP_UP)}({type:h,subType:b,id:p},e.pageActionPrefix),m(t)},className:i()("sharemenu-iconbutton",e.className),onColor:e.onColor}),(0,a.jsx)(ee,(0,r.Z)({},k))]})},re=te},96876:function(e,n,t){t.d(n,{l:function(){return o}});var r=t(92228);function a(){var e=(0,r.Z)(["\n position: relative;\n right: 0;\n top: 0;\n text-align: left;\n z-index: 11;\n"]);return a=function(){return e},e}var o=t(19596).default.div.withConfig({componentId:"sc-eece9490-0"})(a())},8451:function(e,n,t){t.d(n,{$C:function(){return c},$R:function(){return u},KL:function(){return f},_P:function(){return d},yS:function(){return m},z7:function(){return l}});var r=t(92228),a=t(30382),o=t.n(a);function i(){var e=(0,r.Z)(['\n fragment MediaSheetImageMeta on Image {\n copyright\n createdBy\n caption {\n plaidHtml(queryParams: $queryParams)\n }\n titles {\n id\n titleText {\n text\n }\n }\n source {\n attributionUrl\n text\n banner {\n url\n attributionUrl\n }\n }\n names {\n id\n nameText {\n text\n }\n }\n countries {\n text\n }\n languages {\n text\n }\n # On mobile, we need to refetch correctionLink and reportingLink\n # data with isInIframe: false.\n #\n # This refetching is handled by the ContributeActionButton component.\n correctionLink(\n relatedId: $id\n contributionContext: {\n isInIframe: true\n returnUrl: "','"\n business: "consumer"\n }\n ) {\n url\n }\n reportingLink(\n relatedId: $id\n contributionContext: {\n isInIframe: true\n returnUrl: "','"\n business: "consumer"\n }\n ) {\n url\n }\n }\n']);return i=function(){return e},e}function s(){var e=(0,r.Z)(["\n fragment MediaSheetListItemMeta on ListItemNode {\n description {\n originalText {\n plaidHtml(queryParams: $queryParams)\n }\n }\n }\n"]);return s=function(){return e},e}var c={CLOSE:"media-sheet__close",OPEN:"media-sheet__open",EDIT:"media-sheet__edit",REPORT:"media-sheet__report"},l={PARENT:"media-sheet",ATTR_BANNER:"media-sheet__attr-banner",COUNT_DISPLAY:"media-sheet__count-display"},u="https://www.imdb.com/close_me",d=o()(i(),u,u),m=o()(s()),f={closeSheetAriaLabel:{id:"common_buttons_close",defaultMessage:"Close"},openSheetAriaLabel:{id:"common_buttons_open",defaultMessage:"Open"},editAriaLabel:{id:"mediaSheet_ariaLabel_edit",defaultMessage:"Edit tags"},reportAriaLabel:{id:"mediaSheet_ariaLabel_report",defaultMessage:"Report image"},nameLabel:{id:"mediaSheet_label_name",defaultMessage:"People"},titleLabel:{id:"mediaSheet_label_title",defaultMessage:"Titles"},countryLabel:{id:"mediaSheet_label_country",defaultMessage:"Countries"},languageLabel:{id:"mediaSheet_label_language",defaultMessage:"Languages"},photoByAttributionPrefix:{id:"mediaSheet_attribution_photoBy",defaultMessage:"Photo by"},courtesyAttributionPrefix:{id:"mediaSheet_attribution_courtesy",defaultMessage:"Image courtesy"}}}}]);