"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8303],{37184:function(e,n,t){t.d(n,{Kj:function(){return h}});var o=t(92228),r=t(52322),a=t(70314),i=t.n(a),s=t(2784),d=t(19596),l=t(45103),u=t(46315),c=t(91842),p=t(31619);function f(){var e=(0,o.Z)(["\n display: block;\n margin: 0 auto;\n"]);return f=function(){return e},e}function v(){var e=(0,o.Z)(["\n padding-top: 5rem;\n padding-bottom: 1.5rem;\n text-align: center;\n\n &.color-base {\n ","\n }\n\n &.color-baseAlt {\n ","\n }\n"]);return v=function(){return e},e}var g="retry-error",m="retry-error-debug",y="retry",h=function(e){var n=e.className,t=e.name,o=e.error,a=e.errorMessage,d=e.onClickRetry,c=e.canRetry,f="Prod"===i()().publicRuntimeConfig.stage,v=(0,p.N)({id:"error_common_sorryLoadingPage",defaultMessage:"Sorry, there was an error loading the page."}),h=(0,p.N)({id:"common_buttons_retry",defaultMessage:"Try again"}),C=s.useContext(u.Theme),T="color-".concat(C.palette.baseColor);return(0,r.jsxs)("div",{className:n,"data-testid":g,children:[(0,r.jsx)(x,{className:T,children:null!==a&&void 0!==a?a:v}),c&&(0,r.jsx)(b,{"data-testid":y,onColor:"textPrimary",onClick:function(e){return d(e)},children:h}),!f&&(0,r.jsxs)("div",{"data-testid":m,children:[(0,r.jsx)(l.SectionTitle,{children:"Error:"}),(0,r.jsx)(x,{className:T,children:'"'.concat(t,'" failed to load. Reason: "').concat(null===o||void 0===o?void 0:o.message,'" Check console for errors.')})]})]})},b=(0,d.default)(l.SecondaryButton).withConfig({componentId:"sc-d9ec384b-0"})(f()),x=(0,d.default)(l.ErrorMessage).withConfig({componentId:"sc-d9ec384b-1"})(v(),(0,c.setPropertyToColorVar)("color","ipt-on-base-textPrimary-color"),(0,c.setPropertyToColorVar)("color","ipt-on-baseAlt-textPrimary-color"));n.ZP=h},35146:function(e,n,t){t.d(n,{T:function(){return i},w:function(){return s}});var o=t(52322),r=t(2784),a=r.createContext({promptData:{isPromptOpened:!1}}),i=function(e){var n=e.children,t=(0,r.useState)({isPromptOpened:!1}),i={promptData:t[0],setPromptData:t[1]};return(0,o.jsx)(a.Provider,{value:i,children:n})},s=function(){return(0,r.useContext)(a)}},17004:function(e,n,t){t.d(n,{T:function(){return v}});var o=t(52322),r=(t(2784),t(92228)),a=t(19596),i=t(45103),s=t(91842),d=t(31619),l=t(38003);function u(){var e=(0,r.Z)(["\n padding: 0;\n float: left;\n margin-right: ",";\n background-color: ",";\n color: ",";\n\n svg {\n transform: scale(0.75);\n }\n\n &:focus,\n &:hover {\n color: ",";\n }\n"]);return u=function(){return e},e}var c=function(e){var n=e.onClick,t=(0,d.N)(l.KL.feebackOpenPrompt);return(0,o.jsx)(p,{name:"translate",label:t,onClick:n})},p=(0,a.default)(i.IconButton).withConfig({componentId:"sc-5fe4f156-0"})(u(),s.spacing.xxs,(0,s.getColorVarValue)("ipt-accent2-bg"),(0,s.getColorVarValue)("ipt-on-accent2-color"),(0,s.getColorVarValue)("ipt-on-accent2-color")),f=t(35146),v=function(e){var n,t=e.originalText,r=e.translatedText,a=e.children,i=e.refMarker,s=(0,f.w)().setPromptData,d=!!r&&!!t&&(0,o.jsx)(c,{onClick:function(){null===s||void 0===s||s({isPromptOpened:!0,originalText:t,translatedText:r,refMarker:i})}}),l=null!==(n=null!==a&&void 0!==a?a:r)&&void 0!==n?n:t;return(0,o.jsxs)(o.Fragment,{children:[d,l]})}},93198:function(e,n,t){var o=t(52322),r=t(2784),a=t(73857),i=t(45103),s=t(14361);n.Z=function(e){var n=e.className,t=e.label,d=e.query,l=e.queryVariables,u=e.queryContext,c=e.onDataReceived,p=e.onError,f=e.onFetching,v=e.onTrigger,g=e.pathToPageInfo,m=e.autoLoadAll,y=void 0!==m&&m,h=(0,a.Z)(),b=(0,r.useState)(y),x=b[0],C=b[1],T=(0,r.useState)(y),I=T[0],S=T[1];return(0,s.b)({query:d,queryVariables:l,queryContext:u,onDataReceived:function(e,n){c(e,n),n&&(C(!1),S(!1))},onError:function(e,n){C(!1),S(!1),p&&p(e,n)},onFetching:f,pathToPageInfo:g,triggerRequest:I}),(0,o.jsx)(i.SeeMoreButton,{className:n,isLoading:x,onClick:function(e){C(!0),S(!0),v&&v(e)},text:null!==t&&void 0!==t?t:h.formatMessage({id:"common_buttons_see_all",defaultMessage:"See all"})})}},94396:function(e,n,t){t.d(n,{Lr:function(){return y},M_:function(){return h},_B:function(){return p},xn:function(){return g}});var o=t(92228),r=t(30382),a=t.n(r);function i(){var e=(0,o.Z)(["\n fragment EpisodeBottomSheetTitleMetadata on Title {\n id\n releaseYear {\n year\n }\n titleText {\n text\n }\n originalTitleText {\n text\n }\n titleType {\n canHaveEpisodes\n }\n series {\n displayableEpisodeNumber {\n displayableSeason {\n text\n }\n episodeNumber {\n text\n }\n }\n }\n }\n"]);return i=function(){return e},e}function s(){var e=(0,o.Z)(["\n fragment CastEpisodeBottomSheetNav on EpisodeCastConnection {\n displayableYears(first: 100) {\n total\n edges {\n node {\n year\n displayableProperty {\n value {\n plainText\n }\n }\n }\n }\n }\n displayableSeasons(first: 100) {\n total\n edges {\n node {\n season\n displayableProperty {\n value {\n plainText\n }\n }\n }\n }\n }\n }\n"]);return s=function(){return e},e}function d(){var e=(0,o.Z)(['\n query EpisodeBottomSheetCast(\n $titleId: ID!,\n $nameId: ID!,\n $after: ID,\n $episodeCreditsFilter: EpisodeCreditsFilter\n ) {\n name(id: $nameId) {\n credits(\n first: 1\n filter: { \n titles: [$titleId],\n categories: ["','"],\n projectStatus: ["','"]\n }\n ) {\n edges {\n node {\n ... on Cast {\n episodeCredits(\n first: 50, \n after: $after,\n filter: $episodeCreditsFilter\n sort: {by: RELEASE_DATE order: ASC}\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n attributes {\n text\n }\n ... on Cast {\n title {\n ...EpisodeBottomSheetTitleMetadata\n }\n characters {\n name\n }\n }\n }\n }\n }\n nav: episodeCredits(\n first: 0\n ) {\n ...CastEpisodeBottomSheetNav\n }\n }\n }\n }\n }\n }\n }\n ',"\n ","\n"]);return d=function(){return e},e}function l(){var e=(0,o.Z)(["\n fragment CrewEpisodeBottomSheetNav on EpisodeCrewConnection {\n displayableYears(first: 100) {\n total\n edges {\n node {\n year\n displayableProperty {\n value {\n plainText\n }\n }\n }\n }\n }\n displayableSeasons(first: 100) {\n total\n edges {\n node {\n season\n displayableProperty {\n value {\n plainText\n }\n }\n }\n }\n }\n }\n"]);return l=function(){return e},e}function u(){var e=(0,o.Z)(['\n query EpisodeBottomSheetCrew(\n $titleId: ID!,\n $nameId: ID!,\n $after: ID,\n $episodeCreditsFilter: EpisodeCreditsFilter\n ) {\n name(id: $nameId) {\n credits(\n first: 1, \n filter: {\n titles: [$titleId],\n categories: ["','"],\n projectStatus: ["','"]\n }\n ) {\n edges {\n node {\n ... on Crew {\n episodeCredits(\n first: 50, \n after: $after,\n filter: $episodeCreditsFilter\n sort: {by: RELEASE_DATE order: ASC}\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n attributes {\n text\n }\n ... on Crew {\n jobs {\n id\n text\n }\n title {\n ...EpisodeBottomSheetTitleMetadata\n }\n }\n }\n }\n }\n nav: episodeCredits(\n first: 0\n ) {\n ...CrewEpisodeBottomSheetNav\n }\n }\n }\n }\n }\n }\n }\n ',"\n ","\n"]);return u=function(){return e},e}function c(){var e=(0,o.Z)(["\n query DisplayableSeasonAndYear($titleId: ID!, $nameId: ID!) {\n name(id: $nameId) {\n credits(filter: { titles: [$titleId] }, first: 1) {\n edges {\n node {\n ... on Cast {\n episodeCredits(first: 0) {\n displayableSeasons(first: 1) {\n total\n edges {\n node {\n season\n }\n }\n }\n displayableYears(first: 1) {\n total\n edges {\n node {\n year\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"]);return c=function(){return e},e}var p={id:"common_ariaLabel_closePrompt",defaultMessage:"Close Prompt"},f=a()(i()),v=a()(s()),g=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return a()(d(),e,n,f,v)},m=a()(l()),y=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return a()(u(),e,n,f,m)},h=a()(c())},22792:function(e,n,t){t.d(n,{D:function(){return z}});var o=t(70865),r=t(96670),a=t(66383),i=t(92228),s=t(50930),d=t(52322),l=t(2784),u=t(73857),c=t(19596),p=t(45103),f=t(91842),v=t(22414),g=t(25436),m=t(37184),y=t(52982),h=t(13813),b=t(64023),x={id:"common_cast_label_seeCharacterPhotosAndQuotes",defaultMessage:"Character photos & quotes"},C=function(e){var n=e.isCastCredit,t=e.titleId,o=e.nameId,r=e.refTagBase,a=(0,u.Z)();if(!n)return null;var i="/title/".concat(t,"/characters/").concat(o,"?ref_=").concat(r,"_c");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.MenuListItem,{children:(0,d.jsx)(p.TextLink,{href:i,text:a.formatMessage(x)})}),(0,d.jsx)(p.MenuListDivider,{})]})},T=t(47842),I=t(95460),S=t(11992);function E(){var e=(0,i.Z)(["\n margin-bottom: ",";\n"]);return E=function(){return e},e}function _(){var e=(0,i.Z)(["\n ","\n ","\n margin-top: ",";\n margin-bottom: ",";\n margin-left: ",";\n"]);return _=function(){return e},e}var Z=function(e){var n,t,o=e.firstYearOrSeason,r=e.navigationData,a=e.onSeasonChange,i=e.refTagPrefix,s=e.seasonGrouping,l=(0,u.Z)(),c=(0,h.y)(),f=c.pageConst,v=c.pageType,g={id:f,subType:c.subPageType,type:v};if(!r||!a)return null;var m=[],y=null===(n=r.displayableSeasons)||void 0===n?void 0:n.edges,b=null===(t=r.displayableYears)||void 0===t?void 0:t.edges;if(y&&y.length>1)y.forEach((function(e){var n,t;m.push((t={},(0,T.Z)(t,"data-testid","season-tab-".concat(e.node.season)),(0,T.Z)(t,"id",e.node.season),(0,T.Z)(t,"label",j(e.node.season,null!==(n=e.node.displayableProperty.value.plainText)&&void 0!==n?n:e.node.season)),t))}));else{if(!(b&&b.length>1))return null;b.forEach((function(e){var n,t;m.push((t={},(0,T.Z)(t,"data-testid","year-tab-".concat(e.node.year)),(0,T.Z)(t,"id",e.node.year),(0,T.Z)(t,"label",j(e.node.year,null!==(n=e.node.displayableProperty.value.plainText)&&void 0!==n?n:e.node.year)),t))}))}return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(N,{"data-testid":"episodic-navigation-container",children:["none"!==s&&(0,d.jsx)(P,{"data-testid":"episodic-navigation-label",children:l.formatMessage({id:"episodic_credit_bottomsheet_grouping_".concat(s),defaultMessage:"season"===s?"SEASON":"YEAR"})}),(0,d.jsx)(p.Tabs,{defaultValue:o,display:"chip",padding:"s",onChange:function(e,n){(0,I.ar)(g,"tab-select",S.qB.ACTION_ONLY,"".concat(i,"_eps_nav_tab").concat(n?"_".concat(n+1):"")),a(e)},onNextPage:function(){return(0,I.ar)(g,"next-button-click",S.qB.ACTION_ONLY,"".concat(i,"_eps_nav"))},onPreviousPage:function(){return(0,I.ar)(g,"prev-button-click",S.qB.ACTION_ONLY,"".concat(i,"_eps_nav"))},tabs:m})]}),(0,d.jsx)(p.MenuListDivider,{})]})},j=function(e,n){return"unknown"===e?"?":n},N=c.default.div.withConfig({componentId:"sc-3b72857c-0"})(E(),f.spacing.s),P=c.default.div.withConfig({componentId:"sc-3b72857c-1"})(_(),(0,f.setTypographyType)("overline"),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color"),f.spacing.xs,f.spacing.xxs,f.spacing.s),w=t(25140),q=t(65759),M=t(35635),O=t(89254),k=t(93198);function L(){var e=(0,i.Z)(["\n margin-top: ",";\n margin-left: ",";\n"]);return L=function(){return e},e}function D(){var e=(0,i.Z)(["\n ","\n overflow: hidden;\n text-overflow: ellipsis;\n\n .series-title-info-year {\n ","\n white-space: pre;\n }\n"]);return D=function(){return e},e}function Y(){var e=(0,i.Z)(["\n height: 100%;\n min-height: ",";\n padding-bottom: ",";\n padding-top: ",";\n"]);return Y=function(){return e},e}function R(){var e=(0,i.Z)(["\n ","\n ","\n \n &.wrap-content {\n white-space: break-spaces;\n display: block;\n }\n\n &.elide-content {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"]);return R=function(){return e},e}var B=function(e){var n=e.creditEdges,t=e.hasMoreResults,a=e.isCastCredit,i=e.jobCategoryLabel,c=e.nameId,f=e.query,v=e.queryVariables,m=e.queryContext,y=e.refTagBase,b=(0,u.Z)(),x=(0,h.y)(),C=x.pageConst,T=x.pageType,E={id:C,subType:x.subPageType,type:T},_=(0,w.B)().context,Z=(0,l.useState)({creditEdges:n,hasMoreResults:t,queryVariables:v}),j=Z[0],N=Z[1];(0,l.useEffect)((function(){N((0,r.Z)((0,o.Z)({},j),{hasMoreResults:t,creditEdges:n,queryVariables:v}))}),[n,t]);var P=function(e,n){return{className:"episodic-credits-bottomsheet__menu-item",href:"/title/".concat(e,"/?ref_=").concat(y,"_tt_").concat(n+1)}};return(0,d.jsxs)(d.Fragment,{children:[j.creditEdges.map((function(e,n){var t,s,l,u,f,v,m,y,h,x,C,I,S,E=e.node.title,Z=(0,M.y)(E.releaseYear,null===(t=E.titleType)||void 0===t?void 0:t.canHaveEpisodes);(null===(s=E.series)||void 0===s?void 0:s.displayableEpisodeNumber)&&"unknown"!==E.series.displayableEpisodeNumber.displayableSeason.text&&"unknown"!==E.series.displayableEpisodeNumber.episodeNumber.text&&(S=b.formatMessage({id:"common_season_episode_number",defaultMessage:"S{seasonNumber}.E{episodeNumber}"},{seasonNumber:E.series.displayableEpisodeNumber.displayableSeason.text,episodeNumber:E.series.displayableEpisodeNumber.episodeNumber.text}));var j,N,w,k=(0,O.L)(_,null===(l=E.originalTitleText)||void 0===l?void 0:l.text,null===(u=E.titleText)||void 0===u?void 0:u.text),L=null!==(j=null===(f=e.node)||void 0===f?void 0:f.characters)&&void 0!==j?j:[],D=null!==(N=null===(v=e.node)||void 0===v||null===(m=v.jobs)||void 0===m?void 0:m.map((function(e){return e.text})))&&void 0!==N?N:[];!a&&0===D.length&&i&&D.push(i);var Y,R=null!==(w=null===(y=e.node)||void 0===y||null===(h=y.attributes)||void 0===h?void 0:h.map((function(e){return e.text})))&&void 0!==w?w:[],B=(0,q.A)(R,(null!==(Y=null===(x=e.node)||void 0===x?void 0:x.jobs)&&void 0!==Y?Y:[]).map((function(e){return{label:e.text,id:e.id}}))),A="episodic-credits-bottomsheet-row-".concat(E.id),G=!!(null===(C=E.releaseYear)||void 0===C?void 0:C.year)&&(0,d.jsx)("span",{className:"series-title-info-year",children:" (".concat(Z,")")});return(0,d.jsxs)("div",{"data-testid":A,children:[(0,d.jsxs)($,(0,r.Z)((0,o.Z)({},P(E.id,n)),{children:[(0,d.jsx)(V,{children:S?(0,d.jsxs)(p.InlineList,{showDividers:!0,inline:!0,children:[(0,d.jsx)(p.InlineListItem,{children:S}),(0,d.jsxs)(p.InlineListItem,{children:[k,G]})]}):(0,d.jsxs)(d.Fragment,{children:[k,G]})},"series-title-info-".concat(E.id)),!!(L||D.length>0)&&(0,d.jsxs)(F,{className:T===g.PageType.TITLE?"elide-content":"wrap-content",children:[(null===L||void 0===L?void 0:L.length)>0&&(null===(I=null===L||void 0===L?void 0:L.map((function(e){return e.name})))||void 0===I?void 0:I.join(" \xb7 ")),D.length>0&&D.join(", "),B.length>0&&" (".concat(B.join(", "),")")]},"episodic-character-info-".concat(E.id))]}),"series-ep-".concat(c,"-").concat(E.id)),(0,d.jsx)(p.MenuListDivider,{},"episodic-credits-bottomsheet_credit__divider-".concat(n))]},A)})),j.creditEdges.length>0&&j.hasMoreResults&&(0,d.jsx)(A,{children:(0,d.jsx)(k.Z,{className:"episodic-see-more-button",query:f,queryVariables:j.queryVariables,queryContext:m,onDataReceived:function(e,n){var t,i,d,l,u,c,p,f,v,g=a?null===(l=null===(d=null===(t=e.name)||void 0===t||null===(i=t.credits)||void 0===i?void 0:i.edges[0])||void 0===d?void 0:d.node)||void 0===l?void 0:l.episodeCredits:null===(f=null===(p=null===(u=e.name)||void 0===u||null===(c=u.credits)||void 0===c?void 0:c.edges[0])||void 0===p?void 0:p.node)||void 0===f?void 0:f.episodeCredits;N((0,r.Z)((0,o.Z)({},j),{creditEdges:(0,s.Z)(j.creditEdges).concat((0,s.Z)(null!==(v=null===g||void 0===g?void 0:g.edges)&&void 0!==v?v:[])),hasMoreResults:!n}))},onError:function(e,n){return N((0,r.Z)((0,o.Z)({},j),{queryVariables:(0,r.Z)((0,o.Z)({},j.queryVariables),{after:n})}))},onTrigger:function(){return(0,I.ar)(E,"eps-sm",S.qB.ACTION_ONLY,"".concat(y,"_sm"))},pathToPageInfo:"name.credits.edges[0].node.episodeCredits.pageInfo"})})]})},A=c.default.div.withConfig({componentId:"sc-af41dbdc-0"})(L(),f.spacing.xs,f.spacing.m),V=c.default.p.withConfig({componentId:"sc-af41dbdc-1"})(D(),(0,f.setTypographyType)("body"),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color")),$=(0,c.default)(p.MenuListItem).withConfig({componentId:"sc-af41dbdc-2"})(Y(),f.spacing.xxl,f.spacing.xs,f.spacing.xs),F=c.default.span.withConfig({componentId:"sc-af41dbdc-3"})(R(),(0,f.setTypographyType)("bodySmall"),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color")),G=t(94396),H=t(34725);function Q(){var e=(0,i.Z)(["\n .episodic-credits-bottomsheet__panel {\n margin: auto auto 0 auto;\n\n "," {\n max-width: 70%;\n }\n "," {\n /* main pages have a hard content width of 1024px at large and above */\n max-width: 716px;\n }\n }\n"]);return Q=function(){return e},e}function K(){var e=(0,i.Z)(["\n ","\n background: initial;\n display: flex;\n min-height: 7rem;\n justify-content: center;\n padding: 3rem;\n"]);return K=function(){return e},e}var z=function(e){var n,t,i,c=e.titleId,f=e.nameId,x=e.isOpen,T=e.headerProps,I=e.onCloseSelected,S=e.refTagPrefix,E=e.episodeCount,_=e.tenureText,j=e.jobCategory,N=e.seasonOrYearEpisodeData,P=e.releaseFilter,w=(0,h.y)().pageType,q=(0,l.useRef)(null),M=(0,u.Z)(),O=null!==N&&void 0!==N?N:{firstSeasonOrYear:"",seasonGrouping:"none"},k=O.firstSeasonOrYear,L=O.seasonGrouping,D=(0,l.useState)({currentSeasonOrYear:k,edges:[],issueSeasonOrYearRequest:!0,navigationData:null,pageInfo:void 0,scrollLocation:0}),Y=D[0],R=D[1],A=j.id,V=y.k.some((function(e){return e===A})),$=V?(0,G.xn)(A,P):(0,G.Lr)(A,P),F={after:null!==(i=null===(n=Y.pageInfo)||void 0===n?void 0:n.endCursor)&&void 0!==i?i:"",nameId:f,titleId:c,episodeCreditsFilter:(0,H.s)(L,Y.currentSeasonOrYear)},Q={serverSideCacheable:!0,personalized:!1},K=(0,a.Z)((0,b.E)({query:$,variables:F,context:Q,pause:!Y.issueSeasonOrYearRequest}),1)[0],z=K.data,W=K.error,X=K.fetching;(0,l.useEffect)((function(){if(z){var e,n,t,a,i,d,l,u,c,p,f,v,g,m=V?null===(a=null===(t=null===(e=z.name)||void 0===e||null===(n=e.credits)||void 0===n?void 0:n.edges[0])||void 0===t?void 0:t.node)||void 0===a?void 0:a.episodeCredits:null===(u=null===(l=null===(i=z.name)||void 0===i||null===(d=i.credits)||void 0===d?void 0:d.edges[0])||void 0===l?void 0:l.node)||void 0===u?void 0:u.episodeCredits,y=null===(v=null===(f=null===(c=z.name)||void 0===c||null===(p=c.credits)||void 0===p?void 0:p.edges[0])||void 0===f?void 0:f.node)||void 0===v?void 0:v.nav;R((0,r.Z)((0,o.Z)({},Y),{edges:(0,s.Z)(Y.edges).concat((0,s.Z)(null!==(g=null===m||void 0===m?void 0:m.edges)&&void 0!==g?g:[])),issueSeasonOrYearRequest:!1,navigationData:y,pageInfo:null===m||void 0===m?void 0:m.pageInfo}))}else W&&R((0,r.Z)((0,o.Z)({},Y),{issueSeasonOrYearRequest:!1}))}),[z,W]);var ee,ne,te="".concat(S,"_").concat("eps"),oe=w===g.PageType.NAME?"/title/".concat(c,"/?ref_=").concat(te):"/name/".concat(f,"/?ref_=").concat(te),re=E>0?(0,d.jsxs)(p.InlineList,{showDividers:!0,children:[(0,d.jsx)(p.InlineListItem,{children:M.formatMessage({id:"common_cast_numEpisodes",defaultMessage:"{totalEpisodes, plural, one {{totalEpisodes} episode} other {{totalEpisodes} episodes}}"},{totalEpisodes:E})}),(0,d.jsx)(p.InlineListItem,{children:_})]}):(0,d.jsx)(d.Fragment,{children:_}),ae=(0,d.jsx)(p.PromptHeader,(0,r.Z)((0,o.Z)({},T),{subtitle:re,imageHref:"".concat(oe,"_i"),titleHref:"".concat(oe,"_t")}));return(0,d.jsxs)(U,{panelClassName:"episodic-credits-bottomsheet__panel",header:ae,isOpen:x,onCloseClicked:I,closePromptLabel:M.formatMessage(G._B),children:[z&&(0,d.jsx)("div",{ref:q,children:(0,d.jsxs)(p.MenuList,{children:[(0,d.jsx)(C,{isCastCredit:V,titleId:c,nameId:f,refTagBase:te}),(0,d.jsx)(Z,{firstYearOrSeason:k,navigationData:Y.navigationData,onSeasonChange:function(e){e!==Y.currentSeasonOrYear&&R((0,r.Z)((0,o.Z)({},Y),{currentSeasonOrYear:e,issueSeasonOrYearRequest:!0,edges:[],pageInfo:void 0}))},refTagPrefix:S,seasonGrouping:L}),(0,d.jsx)(B,{isCastCredit:V,nameId:f,creditEdges:null!==(ee=Y.edges)&&void 0!==ee?ee:[],jobCategoryLabel:j.label,refTagBase:te,hasMoreResults:null!==(ne=null===(t=Y.pageInfo)||void 0===t?void 0:t.hasNextPage)&&void 0!==ne&&ne,query:$,queryVariables:F,queryContext:Q})]})}),X&&(0,d.jsx)(v.ZP,{height:"feature"}),W&&(0,d.jsx)(J,{children:(0,d.jsx)(m.ZP,{error:W,errorMessage:M.formatMessage({id:"error_common_sorryTryAgain",defaultMessage:"Sorry, there was an error. Please try again."}),name:"EpisodicCreditBottomSheet",canRetry:!0,onClickRetry:function(){R((0,r.Z)((0,o.Z)({},Y),{issueSeasonOrYearRequest:!0}))}})})]})},U=(0,c.default)(p.BottomSheet).withConfig({componentId:"sc-a6ac2e4a-0"})(Q(),f.mediaQueries.breakpoints.only.m,f.mediaQueries.breakpoints.above.l),J=c.default.div.withConfig({componentId:"sc-a6ac2e4a-1"})(K(),(0,f.setTypographyType)("body"))},34725:function(e,n,t){t.d(n,{f:function(){return a},s:function(){return r}});var o=t(93130),r=function(e,n){return"year"===e?"unknown"===n?{episodes:{unknownReleaseDate:o.Mt.UnknownOnly}}:{episodes:{releasedOnOrAfter:{day:1,month:1,year:Number(n)},releasedOnOrBefore:{day:31,month:12,year:Number(n)}}}:"season"===e?{episodes:{includeSeasons:[n]}}:{}},a=function(e){var n,t,o,r,a,i,s,d,l,u,c="none",p="";if(Number(null===e||void 0===e||null===(n=e.episodeCredits)||void 0===n||null===(t=n.displayableSeasons)||void 0===t?void 0:t.total)>1)c="season",p=null!==(u=null===e||void 0===e||null===(a=e.episodeCredits)||void 0===a||null===(i=a.displayableSeasons)||void 0===i||null===(s=i.edges)||void 0===s||null===(d=s[0])||void 0===d||null===(l=d.node)||void 0===l?void 0:l.season)&&void 0!==u?u:"";else if(Number(null===e||void 0===e||null===(o=e.episodeCredits)||void 0===o||null===(r=o.displayableYears)||void 0===r?void 0:r.total)>1){var f,v,g,m,y,h;c="year",p=null!==(h=null===e||void 0===e||null===(f=e.episodeCredits)||void 0===f||null===(v=f.displayableYears)||void 0===v||null===(g=v.edges)||void 0===g||null===(m=g[0])||void 0===m||null===(y=m.node)||void 0===y?void 0:y.year)&&void 0!==h?h:""}return{firstSeasonOrYear:p,seasonGrouping:c}}},52982:function(e,n,t){t.d(n,{k:function(){return o}});var o=["actress","actor","archive_footage","self"]},65759:function(e,n,t){t.d(n,{A:function(){return o}});var o=function(e,n){return e.filter((function(e){return!n.some((function(n){return n.label.toLowerCase()===e.toLowerCase()}))}))}},14361:function(e,n,t){t.d(n,{b:function(){return l}});var o=t(70865),r=t(96670),a=t(66383),i=t(76635),s=t(2784),d=t(64023),l=function(e){var n=e.query,t=e.queryContext,l=e.queryVariables,u=e.maxPagesToFetch,c=e.onDataReceived,p=e.onError,f=e.onFetching,v=e.pathToPageInfo,g=e.triggerRequest,m=(0,s.useState)(!1),y=m[0],h=m[1],b=(0,s.useState)(l),x=b[0],C=b[1],T=(0,s.useState)(0),I=T[0],S=T[1],E=(0,a.Z)((0,d.E)({query:n,variables:x,context:t,pause:!g&&!y}),1)[0],_=E.data,Z=E.error,j=E.fetching;(0,s.useEffect)((function(){C(l)}),[l.after]),(0,s.useEffect)((function(){if(j)f&&f();else if(_){var e,n=null!==(e=(0,i.get)(_,v))&&void 0!==e?e:{},t=n.hasNextPage,a=n.endCursor,s=I+1;t&&!("number"===typeof u&&s===u)?(C((0,r.Z)((0,o.Z)({},x),{after:a})),h(!0)):h(!1),S(s),c(_,!t)}else Z&&(p&&p(Z,x.after),h(!1))}),[_,Z,j])}}}]);