1"use strict";(("undefined"!=typeof self?self:this).webpackChunkthundr=("undefined"!=typeof self?self:this).webpackChunkthundr||[]).push([[715],{5715:(e,t,i)=>{i.r(t),i.d(t,{default:()=>st});var s=i(7462),o=i(4942),a=i(1934),r=i(8993),n=i.n(r),l=i(890),h=(i(2876),i(8180)),d=i(573),c=i(7159),p=i(3266),u=i(6917),m=i(622),g=i(4297),_=i(7628),v=i(8796);const y={container:"locationSearch2__container__iOvGC",input:"locationSearch2__input__wsSxr",mobileOverlay:"locationSearch2__mobileOverlay__s3exC",pinSpan:"locationSearch2__pinSpan__iUFYg",emptyPin:"locationSearch2__emptyPin__LvO57",placeholder:"locationSearch2__placeholder__ofQPT",extra:"locationSearch2__extra__jCb8L",loader:"locationSearch2__loader__tPoe7",rotate:"locationSearch2__rotate__YiS4W",filled:"locationSearch2__filled__CMzsu",icon:"locationSearch2__icon__dzpsp",filtersIcon:"locationSearch2__filtersIcon__Ym9bm",filtersNum:"locationSearch2__filtersNum__iJrJi",active:"locationSearch2__active__B9Bip",rtlIcon:"locationSearch2__rtlIcon__gGppP",suggestions:"locationSearch2__suggestions__FDI7w large",suggestionsLoading:"locationSearch2__suggestionsLoading__Ny1Tk",noSuggestions:"locationSearch2__noSuggestions__QdAaQ",suggestion:"locationSearch2__suggestion__xYz27",highlighted:"locationSearch2__highlighted__XUZ0q",scrollable:"locationSearch2__scrollable__HiXpY",loading:"locationSearch2__loading__e_yYS",loadingCopy:"locationSearch2__loadingCopy__l4w3t",useLocation:"locationSearch2__useLocation__kBeAv",suggestionIcon:"locationSearch2__suggestionIcon__SoL5s",loadingIcon:"locationSearch2__loadingIcon__QHLxp",geoLoading:"locationSearch2__geoLoading__YJ2TJ",overlayHeader:"locationSearch2__overlayHeader__diye5"};class S extends a.wA{constructor(e){super(e),this.updateCitySuggestions=(0,u.Ds)(this.updateCitySuggestions,300),this.iconClick=this.iconClick.bind(this),this.onInput=this.onInput.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.search=this.search.bind(this),this.focusHandler=this.focusHandler.bind(this),this.loadingClickHandler=this.loadingClickHandler.bind(this),this.state.filled=!1,this.state.citySuggestions=[],this.state.highlightedSuggestion=0,this.updateCitySuggestionsId=0,this.fontStyles={}}componentDidUpdate(e,t){e.geo.loading&&!this.props.geo.loading&&this.setState({value:""})}componentDidMount(){this.props.autofocus&&this.focus()}transformNearbyLocation(e){return{city:e.city,state:e.state,countryCode:e.countryCode||e.country,lat:e.lat,lon:e.lon}}async updateCitySuggestions(){if(!this.$input)return;let e=this.$input.value;if(!e)return;let t=++this.updateCitySuggestionsId,i=[];try{i=await(0,_.AN)({search:e})}catch(e){}if(t!==this.updateCitySuggestionsId)return;let s=i.slice(0,10);if(this.props.nearbyLocations){let t=e.toLowerCase(),i=this.props.nearbyLocations.filter((e=>(e.city||"").toLowerCase().includes(t))).map(this.transformNearbyLocation);s=s.concat(i)}this.setState({citySuggestions:s,highlightedSuggestion:0,suggestionsLoading:!1})}removeLocationQueryParameter(){let e=(0,g.Z)();if(e.location){delete e.location;let t=location.pathname+(0,u.UK)(e)+location.hash;history.replaceState({activePage:l.Z.get().activePage},"",t)}}async search(){let e=this.$input&&this.$input.value;e&&("function"==typeof this.props.onSearch&&this.props.onSearch(e),this.removeLocationQueryParameter(),l.Z.emit("SET_USER_LOCATION",(()=>(0,_.HH)({search:e})),"search",this.props.ticketType),this.reset(),this.blur())}select(e){e.city||(e.city=e.label),"function"==typeof this.props.onSelect&&this.props.onSelect(e),this.removeLocationQueryParameter();let t=this.props.nearbyLocations&&this.props.nearbyLocations.includes(e)?"nearby":"suggestion";l.Z.emit("SET_USER_LOCATION",{...e},t,this.props.ticketType),l.Z.emit("SHOWTIMES_SEARCH_OVERLAY_HIDE"),this.reset(),this.blur()}reset(){this.$input&&(this.$input.value="",this.setState({value:"",filled:!1}))}focus(){this.$input&&this.$input.focus()}blur(){this.$input&&this.$input.blur()}iconClick(){this.reset(),this.focus()}onInput(){let e=this.$input.value;this.setState({value:e});let t=!!e;this.state.filled!==t&&this.setState({filled:t}),this.state.suggestionsLoading||this.setState({suggestionsLoading:!0,highlightedSuggestion:0}),this.updateCitySuggestions()}onMouseDown(){clearTimeout(this.mouseDownTimer),this.mouseDown=!0,this.mouseDownTimer=setTimeout((()=>this.mouseDown=!1),16)}onFocus(){"function"==typeof this.props.onFocus&&this.props.onFocus()}onBlur(){if(!this.props.isMobile&&this.mouseDown)return this.focus();"function"==typeof this.props.onBlur&&this.props.onBlur(),this.reset()}onKeyDown(e){let t=this.state;switch(e.key){case"Down":case"ArrowDown":e.preventDefault();let i=t.highlightedSuggestion+1;i>=t.citySuggestions.length&&(i=0),this.setState({highlightedSuggestion:i});break;case"Up":case"ArrowUp":e.preventDefault();let s=t.highlightedSuggestion-1;s<0&&(s=t.citySuggestions.length-1),this.setState({highlightedSuggestion:s});break;case"Enter":e.preventDefault();let o=t.citySuggestions[t.highlightedSuggestion];o&&this.select(o);break;case"Esc":case"Escape":e.preventDefault(),this.reset()}}loadingClickHandler(){this.setState({loadingClicked:!0})}renderSuggestions(){const e=(0,u.RK)(l.Z.get(),"appData.copy.baseCopy");let t=this.state;if(t.suggestionsLoading&&t.filled)return(0,a.h)("div",{class:y.suggestionsLoading,key:"loading",onMouseDown:this.loadingClickHandler},(0,a.h)("div",{class:y.loadingIcon}),(0,a.h)("div",{class:y.loadingCopy},e.$LOADING_SEARCH_SUGGESTIONS||"Loading..."));let i=t.filled?t.citySuggestions:[];return!t.filled&&this.props.nearbyLocations&&(i=i.concat(this.props.nearbyLocations.map(this.transformNearbyLocation))),!i.length&&this.props.mobileOverlayActive?(0,a.h)("div",{class:y.noSuggestions,key:"empty"},e.$NO_SEARCH_SUGGESTIONS||"No suggestions"):i.map(((e,i)=>{let s=[e.countryCode,e.city,e.state,e.countryCode,e.label].filter((e=>e)).join(),o=e.label;o||(o=[e.city,"US"===e.countryCode&&e.state,e.countryCode].filter((e=>e)).join(", "));let r=(0,m.i)((0,a.h)("span",null,o),e.city,(0,a.h)("strong",null,e.city));return(0,a.h)(c.Z,{class:(0,u.WM)({s:y,suggestion:!0,highlighted:i===t.highlightedSuggestion}),key:s,trigger:()=>this.select(e),onMouseEnter:()=>this.setState({highlightedSuggestion:i}),tabIndex:"-1"},(0,a.h)("span",{class:y.pinSpan},(0,a.h)(v.Z,{class:(0,u.WM)(y.suggestionIcon,y.emptyPin)})),r)}))}renderPlaceholder(){let e=this.props.geo;const{value:t}=this.state,i=(0,u.RK)(l.Z.get(),"appData.copy.baseCopy.$SEARCH_PLACEHOLDER");return e?e.loading?(0,a.h)("div",{class:y.placeholder},(0,a.h)("span",{class:y.extra},t),(0,a.h)("span",{class:y.extra},i||"showtimes")):e.city?(0,a.h)("div",{class:y.placeholder},(0,a.h)("span",{class:y.name},e.city),(0,a.h)("span",{class:y.extra},i||"showtimes")):(0,a.h)("div",{class:y.placeholder}):(0,a.h)("div",{class:y.placeholder})}focusHandler(){this.props.mobileOverlayActive||(this.setState({mobileOverlayActive:!0}),l.Z.emit("SET_HEADER_ACTION",{icon:"back",action:()=>this.setState({mobileOverlayActive:!1})}
1))}render(e){let t=this.state.filled;const i=Object.values(e.selectedFilters).filter((e=>null==e?void 0:e.length)).length-1,s=this.props.geo.loading,{mobileOverlayActive:o}=this.props,r=l.Z.get();this.fontStyles=(0,u.RK)(r,"appData.styling.fontVariables");const n="rtl"===this.fontStyles.textDirection,h=(0,u.RK)(r,"appData.copy.accessibilityCopy",{}),m=(0,u.RK)(r,"appData.copy.baseCopy.$SEARCH","Search"),g=t?h.$CLEAR_SEARCH_ARIA:h.$SEARCH_MAG_GLASS_ARIA,_=(0,u.RK)(r,"appData.copy.baseCopy.$FILTERS")||"Filters",v=(0,a.h)(d.Z,{disabled:e.disabled,ref:e=>this.$input=e,containerClass:(0,u.WM)(e.class,this.fontStyles.showtimesSearch,{s:y,container:!0,filled:t,geoLoading:s}),class:y.input,placeholder:m,inputStyle:this.fontStyles.showtimesSearch,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onMouseDown:this.onMouseDown,ariaLabel:h[e.showtimesAppData.searchInputAriaLabel]||e.showtimesAppData.searchInputAriaLabel||"Search location",role:"search"},this.renderPlaceholder(),(0,a.h)(c.Z,{class:(0,u.WM)(y.icon,n&&y.rtlIcon),trigger:this.iconClick,tabIndex:t?0:-1,ariaLabel:g}),(0,a.h)("div",{className:(0,u.WM)(y.filtersNum,i>0&&y.active)},i),(0,a.h)(c.Z,{class:(0,u.WM)(y.filtersIcon),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},trigger:e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.props.showFilterSelection(e)}},(0,a.h)("span",null,_),(0,a.h)(p.Z,null)),!o&&(0,a.h)("div",{class:y.suggestions},this.renderSuggestions()));return o?(0,a.h)("div",{class:y.mobileOverlay},(0,a.h)("div",{class:(0,u.WM)({s:y,overlayHeader:!0,filled:this.state.filled})},v),(0,a.h)("div",{class:(0,u.WM)(y.filled,y.scrollable)},(0,a.h)("div",{class:y.suggestions,"body-scroll-lock-ignore":!0},this.renderSuggestions()))):v}}var b=i(3695),f=i(6395),T=i(5058),w=i(9811);const C={wrapper:"filterSelection2__wrapper__Dg6lm",open:"filterSelection2__open__WCYYq",container:"filterSelection2__container__pLmbk",shadow:"filterSelection2__shadow__Ubz7j",scroller:"filterSelection2__scroller__kImvh",content:"filterSelection2__content__KIkdB",header:"filterSelection2__header__KIKVD",close:"filterSelection2__close__pe5oe",title:"filterSelection2__title__ndpAn",filters:"filterSelection2__filters___1mRU",empty:"filterSelection2__empty__oRlMg",options:"filterSelection2__options__Qk9aC",option:"filterSelection2__option__K9cdL",active:"filterSelection2__active__mRXSc",name:"filterSelection2__name__Pvu7M",footer:"filterSelection2__footer__pUVSP",submit:"filterSelection2__submit__JWd1e"};class k extends a.wA{constructor(e){super(e),this.today=(0,T.Z)(new Date,"yyyy-MM-dd"),this.onClose=this.onClose.bind(this)}onClose(){this.props.onClose(),l.Z.emit("FILTERS_RESET")}isDefault(){let e=this.props.filters,t=e.selected;if(!t)return!0;let i=e.available&&e.available.date&&e.available.date[0];return Object.keys(t).every((e=>{let s=t[e];return!s||!s.length||"date"===e&&1===s.length&&(s[0]===i||s[0]===this.today)}))}getDisplayedFilters(e){let t=Object.keys(e);return t.sort(((e,t)=>"movie"===e?-1:"movie"===t?1:0)),t.filter((t=>{var i;return"date"!==t&&"exhibitor"!==t&&(null===(i=e[t])||void 0===i?void 0:i.length)})).map((e=>"audioDetails"===e?{filter:e,mergeWith:"format"}:{filter:e}))}getFilterName(e,t){var i,s,o;const a=(null===(i=this.props.appData.copy)||void 0===i||null===(s=i.baseCopy)||void 0===s||null===(o=s.filters)||void 0===o?void 0:o[e])||{},r=a.useLangOptions?this.props.appData.copy.baseCopy.languages:a;return"movie"===e?(0,f.g4)(t):r[t]||t}renderFilters(){var e,t,i,s,o;let{filters:r,appData:n}=this.props;const h=n.styling.fontVariables,d=n.copy.accessibilityCopy,p=n.copy.baseCopy.$FILTERS_NONE_AVAILABLE||"No filters available",m=null===(e=n.pages)||void 0===e||null===(t=e.boltShowtimes)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.hideFilterOptionTime;if(r.loading||!r.available)return;let g=null===(s=this.getDisplayedFilters(r.available))||void 0===s||null===(o=s.map((e=>"string"==typeof e?{filter:e}:e)))||void 0===o?void 0:o.filter((e=>e));if(null==g||!g.length)return(0,a.h)("div",{class:C.empty},p);let _=(()=>{let e={};return t=>{var i,s;return e[t]||(e[t]=(0,f.TP)((null===(i=r.selected)||void 0===i?void 0:i[t])||[],null===(s=r.available)||void 0===s?void 0:s[t]))}})();return g.map((e=>{var t,i,s,o,p;let{filter:v,mergeWith:y}=e;if(y&&g.some((e=>e.filter===y)))return;let S=r.available[v],b=g.filter((e=>(null==e?void 0:e.mergeWith)===v));b.length&&(S=[v,...b.map((e=>e.filter))].flatMap((e=>{var t;return null===(t=r.available[e])||void 0===t?void 0:t.map((t=>({value:t,filter:e})))})));let T="";if("time"===v){if(m)return;T=d.$TIME_SELECTION_ARIA;S=["morning","afternoon","evening","late"].filter((e=>{var t;return null===(t=S)||void 0===t?void 0:t.includes(e)}))}if(!S.length||S.length<=1)return;let w=Object.values(S.reduce(((e,t)=>{"string"==typeof t&&(t={value:t});let i=t.filter||v,s=this.getFilterName(i,t.value),o=_(i).includes(t.value);return e[s]||(e[s]={name:s,active:o,source:[],filter:i}
1),e[s].source.push(t.value),e[s].active=e[s].active||o,e}),{}));"format"===v&&(T=d.$FORMAT_SELECTION_ARIA),"format"!==v&&"movie"!==v||(w=w.sort(((e,t)=>{const i=(0,f.Gg)("format"===v?"format":"movieId");if(i.length){const s=i.indexOf(e.source[0]),o=i.indexOf(t.source[0]);if(s>-1||o>-1)return o-s}return e.name.localeCompare(t.name)}))),w.unshift({active:0===_(v).length,name:(null==n||null===(t=n.copy)||void 0===t||null===(i=t.baseCopy)||void 0===i?void 0:i.$ALL)||"All",source:"all"});const k=(null===(s=n.copy)||void 0===s||null===(o=s.baseCopy)||void 0===o||null===(p=o.filters)||void 0===p?void 0:p[v])||{},I=(null==k?void 0:k._name)||v;return(0,a.h)("div",{class:C.filter,key:v},(0,a.h)("div",{class:(0,u.WM)(C.name,h.filterOverlayFilterTitle)},(0,a.h)("span",null,I)),(0,a.h)("div",{class:C.options},w.map((e=>(0,a.h)(c.Z,{type:"tag",class:(0,u.WM)(C.option,e.active&&C.active,h.filterMenuFilter),active:e.active,trigger:()=>{"all"===e.source?l.Z.emit("FILTER_RESET_SINGLE",v):l.Z.emit("FILTER_TOGGLE",e.filter||v,e.source)},ariaLabel:T.replace("<option>",e.name)},e.name)))))}))}render(e){var t,i,s,o,r,n,l;const{open:h,appData:d,filters:p}=e,m=(null===(t=d.copy)||void 0===t||null===(i=t.baseCopy)||void 0===i?void 0:i.$FILTERS)||"Filters",g=(null===(s=d.copy)||void 0===s||null===(o=s.baseCopy)||void 0===o?void 0:o.$FILTERS_CLOSE)||"Close",_=d.copy.accessibilityCopy||{},v=null===(r=d.styling)||void 0===r?void 0:r.fontVariables,y="rtl"===v.textDirection;let S=(null===(n=d.copy)||void 0===n||null===(l=n.baseCopy)||void 0===l?void 0:l.$VIEW_SHOWTIMES)||"View Showtimes";return p.loading||this.getDisplayedFilters(p.available).length||(S=g),(0,a.h)("div",{class:(0,u.WM)(C.wrapper,h&&C.open)},(0,a.h)("div",{class:C.shadow,onClick:this.onClose}),(0,a.h)("div",{class:C.container},(0,a.h)("div",{class:C.scroller},(0,a.h)("div",{class:C.content},(0,a.h)("div",{class:C.header},(0,a.h)("h4",{class:(0,u.WM)(C.title,v.filterOverlayTitle)},m),(0,a.h)(w.Z,{class:C.close,onClick:this.onClose})),(0,a.h)("div",{class:C.filters},this.renderFilters()),(0,a.h)("div",{class:(0,u.WM)(C.footer,y&&C.rtlFooter)},(0,a.h)(c.Z,{type:"primary",class:(0,u.WM)(C.submit,v.filterMenuViewShowtimes),trigger:e.onSubmit,ariaLabel:_.$VIEW_SHOWTIMES_ARIA},S))))))}}var I=i(6244),E=i(7710),M=i(7536),D=i(7822),R=i(9018),O=i(6659),A=i(1381),B=i(6091),N=i(7042),F=i(9022),$=i(1829),L=i(6363),Z=i(4626),x=i(1289),H=i(5677),P=i(9709),K=i(8438),W=i(6970);const q="quickFilters__container__fvYJK",V="quickFilters__bubbles__y3e7N",G="quickFilters__peekHorizontal__YhAyH",U="quickFilters__peekVertical__vDWXd",z="quickFilters__bubble__Ltdtp",Y="quickFilters__title__T0Lx0",j="quickFilters__scrollBoxContainer__QswuY",J="quickFilters__active__c3gFM",Q="quickFilters__wrappedView__QiyXR",X="quickFilters__sticky__rYRL8";class ee extends a.wA{constructor(e){super(e),(0,o.Z)(this,"updateFilters",((e,t)=>{"all"===t?l.Z.emit("FILTERS_RESET"):l.Z.emit("FILTER_TOGGLE",e,t)})),(0,o.Z)(this,"isActive",((e,t)=>{var i;const s=this.props.filters.selected;let o;if("all"===t)return o=this.checkFiltersEmpty(s),!!o;var a;(o=null==s||null===(i=s[e])||void 0===i?void 0:i.includes(t),"combinedLanguage"===e)&&(o=null==s||null===(a=s[e])||void 0===a?void 0:a.find((e=>((e,t)=>e&&t&&(0,u.vr)(Object.keys(e),Object.keys(t)).every((i=>e[i]===t[i])))(e,t))));return!!o})),(0,o.Z)(this,"renderBubbles",(e=>{var t,i,s,o;const r=(0,f.mU)(this.props.possibleOptions),n={name:(null===(t=this.props)||void 0===t||null===(i=t.appData)||void 0===i||null===(s=i.copy)||void 0===s||null===(o=s.baseCopy)||void 0===o?void 0:o.$ALL)||"All",value:"all"},l=r.reduce(((e,t)=>{var i,s;if("movie"===t.name&&"all"===(null===(i=t.allowedValues)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.toLowerCase())){const e=Object.values(this.props.allMovies||{}).map((e=>e.id));t.allowedValues=this.sortMovies(e)}if("combinedLanguage"===t.name){var o;(null===(o=t.allowedValues)||void 0===o?void 0:o.filter((e=>{let t=!0;return Object.keys(e).forEach((i=>{var s;null!==(s=this.props.filters.available[i])&&void 0!==s&&s.includes(e[i])||(t=!1)})),t}
1))).forEach((t=>{e.push({name:"combinedLanguage",value:t})}))}else{let i=this.props.filters.available[t.name];if(!i)return e;t.allowedValues&&(i=t.allowedValues.filter((e=>-1!==i.indexOf(e))));for(let s=0;s<i.length;s+=1)e.push({name:t.name,value:i[s]})}return e}),[n]),h=null==l?void 0:l.map((e=>{var t,i,s;let{name:o,value:r}=e,n=r;const l=(null===(t=this.props)||void 0===t||null===(i=t.appData)||void 0===i||null===(s=i.copy)||void 0===s?void 0:s.baseCopy)||{},h=l.filters||{},d=l.languages||{};return n="combinedLanguage"===o?(0,W.r)(r):"originalLanguage"===o?l.$ORIGINAL_LANGUAGE:"subtitles"===o?l.$LANGUAGE_SUB:"dubbing"===o?l.$LANGUAGE_DUB:"overVoice"===o?l.$LANGUAGE_OV:"movie"===o?(0,f.g4)(r):"all"===r?o:h[o]&&h[o][r],n=n?n.replace("<lang>",d[r]):r,(0,a.h)("button",{key:`${o}-${r}`,onClick:()=>this.updateFilters(o,r),className:(0,u.WM)(z,this.isActive(o,r)&&J)},n)}));return e&&h.unshift((0,a.h)("div",{className:Y},e)),h.length!==this.state.numBubbles&&this.setState({numBubbles:h.length}),(0,a.h)("div",{className:V,ref:e=>this.$bubbles=e},h)})),this.state={numBubbles:0}}componentDidUpdate(e,t){var i;var s;((null==e||null===(i=e.filters)||void 0===i?void 0:i.selected)!==this.props.filters.selected&&(l.Z.emit("TRACK_FILTERS_CHANGE",this.props.filters.selected),l.Z.emit("SHOWTIMES_REFRESH")),this.props.enablePeeking&&t.numBubbles!==this.state.numBubbles)&&((null===(s=this.$scrollBox)||void 0===s?void 0:s.$scroller.clientWidth)<this.$bubbles.clientWidth&&this.$bubbles.classList.add(G),this.$bubbles.clientHeight>this.$container.clientHeight&&this.$bubbles.classList.add(U))}checkFiltersEmpty(e){let t=!0;const i=Object.keys(e);return i.length<1||(i.forEach((i=>{"date"!==i&&Array.isArray(e[i])&&e[i].length>0&&(t=!1)})),t)}sortMovies(e){const t=(0,f.Gg)("movieId");return e.sort(((e,i)=>{if(t.length){const s=t.indexOf(e),o=t.indexOf(i);if(s>-1||o>-1)return o-s}return(0,f.g4)(e).localeCompare((0,f.g4)(i))}))}render(){const{isRTL:e,isSticky:t,title:i,wrappedView:s}=this.props;return(0,a.h)("div",{className:(0,u.WM)(q,t&&X,s&&Q),ref:e=>this.$container=e},(0,a.h)(K.Z,{class:(0,u.WM)(j),device:"mobile",tabIndex:"0",onKeyDown:this.filtersKeyDown,ref:e=>this.$scrollBox=e,hideScrollerBar:!0,isRTL:e},this.renderBubbles(i)))}}var te=i(8389),ie=i(7259),se=i(4328),oe=i(7201);const ae="recaptcha__wrapper__PzY1U",re="recaptcha__loader__gXFp5",ne="recaptcha__notesText__T1WZp";class le extends a.wA{constructor(e){super(e),this.loadScript=this.loadScript.bind(this),this.renderGrecaptcha=this.renderGrecaptcha.bind(this),this.isReady=this.isReady.bind(this),this.reset=this.reset.bind(this),this.state={ready:this.isReady(),widget:null},this.readyCheck=null,this.state.ready||"undefined"==typeof window||(this.readyCheck=setInterval(this.updateReadyState.bind(this),1e3))}componentDidMount(){this.loadScript("https://www.google.com/recaptcha/api.js","reCaptcha"),this.state.ready&&this.renderGrecaptcha()}componentDidUpdate(e,t){const{onLoad:i}=this.props;i&&this.state.ready&&!t.ready&&this.renderGrecaptcha()}componentWillUnmount(){var e;clearInterval(this.readyCheck),null===(e=this.$captcha)||void 0===e||e.remove(),this.props.onUnmount()}loadScript(e,t){return new Promise(((i,s)=>{let o=document.createElement("script");o.onload=i,o.onerror=s,o.src=e,o.id=t,document.body.appendChild(o)}))}renderGrecaptcha(){this.state.widget=window.grecaptcha.render(this.$captcha,{sitekey:this.props.siteKey,callback:this.props.onSuccess?this.props.onSuccess:void 0,theme:this.props.theme,type:this.props.type,size:this.props.size,tabindex:this.props.tabindex,hl:this.props.hl,badge:this.props.badge,"expired-callback":this.props.onFailed?this.props.onFailed:void 0}),this.props.onLoad&&this.props.onLoad()}updateReadyState(){this.isReady()&&(this.setState({ready:!0}),clearInterval(this.readyCheck))}isReady(){return"undefined"!=typeof window&&void 0!==window.grecaptcha&&"function"==typeof window.grecaptcha.render}reset(){const{ready:e,widget:t}=this.state;e&&null!==t&&window.grecaptcha.reset(t)}render(e){const{type:t}=e;return this.state.ready?"v2-tickbox"===t?(0,a.h)("div",{className:ae},(0,a.h)("div",{ref:e=>this.$captcha=e}),(0,a.h)("div",{className:ne},(0,a.h)("div",null,"reCAPTCHA helps prevent automated form spam. "),(0,a.h)("div",null,"The submit button will be disabled until you complete the CAPTCHA."))):void 0:(0,a.h)("div",{className:ae},(0,a.h)("div",{className:re},"reCAPTCHA"))}}
1const he="field__wrapper___Kkd1",de="field__selected__Qri5u",ce="field__timepicker__GHjRA",pe="field__noBg__MvIoU",ue="field__errorText__Wt0d6",me="field__notesText__rAHgA",ge="field__labelAlike__w6pw6",_e="field__plainText__daoT8",ve="field__paragraph__lsv13",ye="field__value__h0_mt",Se="field__label__s5WVY",be="field__iconRight__USO0W",fe="field__selectWrapper__nn8kU";class Te extends a.wA{constructor(e){super(e),(0,o.Z)(this,"onValueChange",(()=>{const{id:e,onInput:t}=this.props,i=this.$element,s=i.value,o=this.getValidationMessage("select"),a=new RegExp(this.props.regex);s&&a&&a.test(s)?(i.style.color="black",this.clearClues(i)):this.showClues(i,o),null==t||t(e,s)})),(0,o.Z)(this,"getValidationMessage",(e=>{const t=this.props.validationMessage;return t||("input"===e?"Please insert a value":"select"===e?"Please select a value":"Please check this field first")})),(0,o.Z)(this,"onPaste",(e=>{this.setState({errorMessage:"Pasting is not allowed"}),e.preventDefault()})),(0,o.Z)(this,"onTimePickerValueChange",((e,t)=>{var i,s,o,a,r,n,l,h,d;const{id:c,onInput:p}=this.props;switch(t){case"hour":this.$selectHour.style.color="black",this.$selectHour.style.outline="",(null===(i=this.$selectHour)||void 0===i?void 0:i.value)&&(null===(s=this.$selectMinute)||void 0===s?void 0:s.value)&&(null===(o=this.$selectMeridian)||void 0===o?void 0:o.value)&&this.setState({errorMessage:""}),null==p||p(c,{hour:e,minute:this.$selectMinute.value,meridian:this.$selectMeridian.value});break;case"minute":this.$selectMinute.style.color="black",this.$selectMinute.style.outline="",(null===(a=this.$selectHour)||void 0===a?void 0:a.value)&&(null===(r=this.$selectMinute)||void 0===r?void 0:r.value)&&(null===(n=this.$selectMeridian)||void 0===n?void 0:n.value)&&this.setState({errorMessage:""}),null==p||p(c,{hour:this.$selectHour.value,minute:e,meridian:this.$selectMeridian.value});break;case"meridian":this.$selectMeridian.style.color="black",this.$selectMeridian.style.outline="",(null===(l=this.$selectHour)||void 0===l?void 0:l.value)&&(null===(h=this.$selectMinute)||void 0===h?void 0:h.value)&&(null===(d=this.$selectMeridian)||void 0===d?void 0:d.value)&&this.setState({errorMessage:""}),null==p||p(c,{hour:this.$selectHour.value,minute:this.$selectMinute.value,meridian:e})}})),(0,o.Z)(this,"showClues",((e,t)=>{e.style.outline="2px solid red",e.style.outlineOffset="-2px",this.setState({errorMessage:t})})),(0,o.Z)(this,"clearClues",(e=>{e&&(e.style.outline="",this.setState({errorMessage:""}))})),(0,o.Z)(this,"renderTimepicker",(e=>{var t;const{nameHour:i,nameMinutes:s,nameMeridian:o,required:r,value:n,wrapperClass:l}=this.props,{errorMessage:h}=this.state,d=null===(t=this.props)||void 0===t?void 0:t.notes,c=null==n?void 0:n.hour,p=null==n?void 0:n.minute,m=null==n?void 0:n.meridian;return(0,a.h)("div",{id:e,class:(0,u.WM)(he,l&&l)},(0,a.h)("div",{className:ce},(0,a.h)("select",{className:c&&de,required:r,name:i,ref:e=>this.$selectHour=e,onInput:e=>this.onTimePickerValueChange(e.target.value,"hour")},(0,a.h)("option",{value:"",disabled:!0,selected:!c},"Hour"),(0,a.h)("option",{value:"1",selected:"1"===c},"1"),(0,a.h)("option",{value:"2",selected:"2"===c},"2"),(0,a.h)("option",{value:"3",selected:"3"===c},"3"),(0,a.h)("option",{value:"4",selected:"4"===c},"4"),(0,a.h)("option",{value:"5",selected:"5"===c},"5"),(0,a.h)("option",{value:"6",selected:"6"===c},"6"),(0,a.h)("option",{value:"7",selected:"7"===c},"7"),(0,a.h)("option",{value:"8",selected:"8"===c},"8"),(0,a.h)("option",{value:"9",selected:"9"===c},"9"),(0,a.h)("option",{value:"10",selected:"10"===c},"10"),(0,a.h)("option",{value:"11",selected:"11"===c},"11"),(0,a.h)("option",{value:"12",selected:"12"===c},"12")),(0,a.h)("select",{className:p&&de,required:r,name:s,ref:e=>this.$selectMinute=e,onInput:e=>this.onTimePickerValueChange(e.target.value,"minute")},(0,a.h)("option",{value:"",disabled:!0,selected:!p},"Minute"),(0,a.h)("option",{value:"00",selected:"00"===p},"00"),(0,a.h)("option",{value:"15",selected:"15"===p},"15"),(0,a.h)("option",{value:"30",selected:"30"===p},"30"),(0,a.h)("option",{value:"45",selected:"45"===p},"45")),(0,a.h)("select",{className:m&&de,required:r,name:o,ref:e=>this.$selectMeridian=e,onInput:e=>
1this.onTimePickerValueChange(e.target.value,"meridian")},(0,a.h)("option",{disabled:!0,selected:!m,value:""},"AM/PM"),(0,a.h)("option",{selected:"AM"===m,value:"AM"},"AM"),(0,a.h)("option",{selected:"PM"===m,value:"PM"},"PM"))),h&&(0,a.h)("div",{className:ue},h),d&&(0,a.h)("div",{className:me},d))})),(0,o.Z)(this,"renderDatepicker",(()=>{var e;const{id:t,value:i,placeholder:s,required:o,disabled:r,class:n,wrapperClass:l,noBg:h,onInput:d}=this.props,{errorMessage:c}=this.state,p=null===(e=this.props)||void 0===e?void 0:e.notes;return(0,a.h)("div",{className:(0,u.WM)(he,l&&l)},(0,a.h)("input",{id:t,value:i,className:(0,u.WM)(n,i&&de,h&&pe),type:"date",required:o,placeholder:s,disabled:r,ref:e=>this.$element=e,onKeyDown:e=>this.props.onKeyDown&&this.onKeyDown(e,"input"),onPaste:e=>this.onPaste(e),onInput:d&&this.onValueChange}),c&&(0,a.h)("div",{className:ue},c),p&&(0,a.h)("div",{className:me},p))})),this.onKeyDown=(0,u.Ds)(this.onKeyDown.bind(this),500),this.state={errorMessage:""},this.validateSelect=this.validateSelect.bind(this),this.validateInput=this.validateInput.bind(this),this.validateTimepicker=this.validateTimepicker.bind(this)}onKeyDown(e,t){const{id:i,onInput:s}=this.props,o=this.$element.value,a=this.getValidationMessage("input"),r=new RegExp(this.props.regex);if(t){if("number"===t){["-","e","+","E"].some((e=>o.includes(e)))||Number(o)<2||Number(o)>40?(e.preventDefault(),this.showClues(this.$element,a),null==s||s(i,"")):(this.clearClues(this.$element),null==s||s(i,o)),o||(this.$element.value="",this.showClues(this.$element,a))}}else o&&r&&!r.test(o)?this.showClues(this.$element,a):this.clearClues(this.$element),null==s||s(i,o)}validateSelect(){const e=this.getValidationMessage("select");!this.$element.value&&this.props.required&&this.showClues(this.$element,e)}validateTimepicker(){var e,t,i;const s=this.getValidationMessage("timepicker"),o=null===(e=this.$selectMeridian)||void 0===e?void 0:e.value,a=null===(t=this.$selectHour)||void 0===t?void 0:t.value,r=null===(i=this.$selectMinute)||void 0===i?void 0:i.value;!o&&(this.props.required||a||r)&&this.showClues(this.$selectMeridian,s),!a&&(this.props.required||o||r)&&this.showClues(this.$selectHour,s),!r&&(this.props.required||o||a)&&this.showClues(this.$selectMinute,s)}validateInput(){const e=this.getValidationMessage(),t=new RegExp(this.props.regex);!this.$element.value&&this.props.required&&this.showClues(this.$element,e),this.$element.value&&t&&!t.test(this.$element.value)&&this.showClues(this.$element,e)}render(){var e;const{id:t,name:i,options:s,value:o,placeholder:r,type:n,subtype:l,required:h,disabled:d,label:c,class:p,wrapperClass:m,noBg:g,labelAlike:_,onInput:v,plainText:y}=this.props,{errorMessage:S}
1=this.state,b=null===(e=this.props)||void 0===e?void 0:e.notes;return"select"===n?(0,a.h)("div",{class:(0,u.WM)(he,fe,m&&m)},(0,a.h)("select",{id:t,required:h,name:i,ref:e=>this.$element=e,onInput:this.onValueChange,className:o&&de},(0,a.h)("option",{value:"",disabled:!0,selected:!o},r),s.map((e=>{let t=e;if("regal-cinemas"===this.props.formId&&"StateName"===this.props.name){t=/\(([^)]+)\)/.exec(e)[1]}return(0,a.h)("option",{value:t,selected:o===e},e)}))),S&&(0,a.h)("div",{className:ue},S),b&&(0,a.h)("div",{className:me},b)):"datepicker"===n?this.renderDatepicker(t):"timepicker"===n?this.renderTimepicker(t):"textarea"===n?(0,a.h)("div",{className:(0,u.WM)(he,m&&m)},(0,a.h)("textarea",{id:t,ref:e=>this.$element=e,value:o,className:o&&de,type:l,required:h,onPaste:this.onPaste,placeholder:r,disabled:d,name:i,onKeyDown:e=>this.onKeyDown(e,l)}),S&&(0,a.h)("div",{className:ue},S),b&&(0,a.h)("div",{className:me},b)):"paragraph"===n?(0,a.h)("div",{class:(0,u.WM)(he,ve,_&&ge,y&&_e,m&&m)},(0,a.h)("p",null,(0,a.h)("span",{className:Se},c),(0,a.h)("span",{className:ye},o),this.props.icon&&(0,a.h)("span",{className:be},this.props.icon))):(0,a.h)("div",{className:(0,u.WM)(he,m&&m)},(0,a.h)("input",{id:t,name:i,value:o,className:(0,u.WM)(p,o&&de,g&&pe),type:l,required:h,placeholder:r,disabled:d,ref:e=>this.$element=e,onKeyDown:e=>this.props.onKeyDown&&this.onKeyDown(e,l),onPaste:e=>this.onPaste(e),onInput:v&&this.onValueChange}),S&&(0,a.h)("div",{className:ue},S),b&&(0,a.h)("div",{className:me},b))}}const we="form__groupBookingForm__MqUDr",Ce="form__withLabelField__tIEVz",ke="form__flexWidth__rNyjd",Ie="form__visibleFormFields__JftjT",Ee="form__hiddenFormFields__NwDIv",Me="form__visible__VG0oo",De="form__hidden__CfOf2",Re="form__notEditableField___WzpR";var Oe=i(1921);class Ae extends a.wA{constructor(e){super(e),(0,o.Z)(this,"validateCaptcha",(()=>{this.$captcha&&this.$captcha.validateInput()})),(0,o.Z)(this,"onRecaptchaSuccess",(()=>this.props.onChange("captcha",!0))),(0,o.Z)(this,"onRecaptchaFailed",(()=>this.props.onChange("captcha",""))),(0,o.Z)(this,"onRecaptchaLoad",(()=>this.props.onChange("captcha",""))),(0,o.Z)(this,"getFieldObjects",(()=>{const{fields:e,data:t}=this.props;return e.map((e=>{const{stage:i,id:s,placeholder:o,validation:a}=e,r=e.selectOptions?e.selectOptions.split(",").map((e=>e.trim())):void 0,n=()=>
1{if(e.renderCondition)return e.renderCondition.split(",").map((e=>t[e.trim()])).every((e=>{if(e)return e.hour||e.minute||e.meridian?this.props.isValidTime(e):e}))};return{stage:i,id:s,name:e.name,type:e.type,renderCondition:void 0===n()||n(),...e.flexBasis&&{flexBasis:`calc(${e.flexBasis} - 10px)`},...e.flexWidth&&{flexWidth:e.flexWidth},hasLabel:e.hasLabel,...e.notes&&{notes:e.notes},...e.hidden&&{hidden:e.hidden},...!e.hidden&&{label:e.label||o,placeholder:o||"",overwritePlaceholder:e.overwritePlaceholder||"",regex:a.regex,validationMessage:a.message,..."select"===e.type&&{options:r||[`Please add the select options for field id: ${s}`]},..."timepicker"===e.type&&{nameHour:e.nameHour,nameMinutes:e.nameMinutes,nameMeridian:e.nameMeridian},...e.required&&{required:!0}}}}))})),(0,o.Z)(this,"renderFormFields",(e=>{const{onChange:t,formId:i,data:s,currentStage:o}=this.props;return e.map((e=>{const{stage:r,id:n,name:l,type:h,required:d,label:c,regex:p,validationMessage:m,renderCondition:g,hasLabel:_}=e,v=null==e?void 0:e.notes,y=r===o?Me:De,S=null==e?void 0:e.flexBasis,b=null==e?void 0:e.flexWidth,f=(null==e?void 0:e.placeholder)||c,T=null==e?void 0:e.options,w=null==e?void 0:e.nameHour,C=null==e?void 0:e.nameMeridian,k=null==e?void 0:e.nameMinutes;return(0,a.h)("div",{className:(0,u.WM)(_&&Ce,b&&ke),style:{flexBasis:S||""}},g&&_&&(0,a.h)(Te,{type:"paragraph",label:c,labelAlike:!0,wrapperClass:y}),g&&(0,a.h)(Te,{formId:i,ref:e=>this[`$${n}`]=e,id:n,name:l,value:s[n],type:h,options:T,label:c,placeholder:f,onInput:t,nameHour:w,nameMinutes:k,nameMeridian:C,regex:p,validationMessage:m,notes:v,wrapperClass:y,required:d}))}))})),(0,o.Z)(this,"renderConfirmationFields",(e=>{const{data:t,currentStage:i,hasRecaptcha:s,formId:o}=this.props,r=new Date(this.props.data.formDate),n=e.filter((e=>"formDate"!==e.id&&"date"!==e.id&&t[e.id])).map((e=>{const i=t[e.id],s="timepicker"===e.type&&i?`${null==i?void 0:i.hour}:${null==i?void 0:i.minute} ${null==i?void 0:i.meridian}`:i,o=null==e?void 0:e.flexBasis,r=null==e?void 0:e.flexWidth,n=null==e?void 0:e.hasLabel,l=(0,a.h)(Te,{type:"paragraph",value:s||"N/A",wrapperClass:Re,plainText:!0});return(0,a.h)("div",{className:(0,u.WM)(n&&Ce,r&&ke),style:{flexBasis:o||"",marginTop:"0"}},n&&(0,a.h)(Te,{type:"paragraph",label:e.label,labelAlike:!0}),l)}));return(0,a.h)("div",{className:i===this.props.finalStage?Ie:Ee},(0,a.h)("div",{className:Ce},(0,a.h)(Te,{type:"paragraph",label:"Date*",labelAlike:!0}),(0,a.h)(Te,{type:"paragraph",value:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}).format(r),wrapperClass:Re,plainText:!0})),n,this.renderCustomInput(),s&&i===this.props.finalStage&&("amc-theatres"!==o||this.shouldRenderCaptcha)&&this.renderCaptcha())})),this.validateAll=this.validateAll.bind(this),this.renderHiddenFields=this.renderHiddenFields.bind(this),this.renderCaptcha=this.renderCaptcha.bind(this),this.renderCustomInput=this.renderCustomInput.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.state={}}validateAll(){const{currentStage:e}=this.props,t=this.getFieldObjects().filter((t=>t.stage===e));t.forEach((e=>{const{id:t}=e;if(!t)return;const i=this[`$${t}`];"input"===e.type||"textarea"===e.type?i&&i.validateInput():"select"===e.type?i&&i.validateSelect():"timepicker"===e.type&&i&&i.validateTimepicker()}))}renderCaptcha(){return(0,a.h)(le,{type:"v2-tickbox",siteKey:this.props.recaptchaKey,onSuccess:this.onRecaptchaSuccess,onFailed:this.onRecaptchaFailed,onLoad:this.onRecaptchaLoad,onUnmount:this.onRecaptchaFailed})}renderCustomInput(){}componentWillUnmount(){this.props.onChange("captcha","")}renderHiddenFields(){const e=this.props.data.formDate,{selectedTheaterName:t,movieTitle:i}=this.props;return(0,a.h)("div",{id:"hidden-fields"},(0,a.h)("input",{type:"hidden",name:"Theatre",value:t}),(0,a.h)("input",{type:"hidden",name:"Date",value:new Intl.DateTimeFormat("en-US").format(new Date(e))}),(0,a.h)("input",{type:"hidden",name:"Movie",value:i}),(0,a.h)("input",{type:"hidden",name:"SourceName",value:"Powster"}))}componentDidUpdate(e,t){const{formId:i,currentStage:s}=this.props;if(s&&s!==e.currentStage){const t=document.querySelector(`#${i}`);(0,Oe.GZ)(t);const s=this.getFieldObjects().filter((t=>t.stage===e.currentStage));
1s.forEach((e=>{const{id:t}=e;if(!t)return;const i=this[`$${t}`];i&&i.$element&&i.clearClues(i.$element)}))}}onFormSubmit(e){var t,i;this.props.htmlSubmit?null===(t=(i=this.props).setFormSubmitted)||void 0===t||t.call(i):e.preventDefault()}render(){const{formId:e,currentStage:t,htmlSubmit:i,submitUrl:s,submitToNewTab:o}=this.props,r=this.getFieldObjects();let n;return i&&o&&(n="_blank"),(0,a.h)("form",{id:e,className:we,acceptCharset:"utf-8",autoComplete:"on",noValidate:"true",action:i&&s,method:i&&"POST",target:n,onSubmit:this.onFormSubmit},this.renderHiddenFields(),(0,a.h)("div",{ref:e=>this.$formFieldsContainer=e,className:t===this.props.finalStage?Ee:Ie},this.renderFormFields(r)),this.renderConfirmationFields(r))}}class Be extends Ae{constructor(e){super(e),this.shouldRenderCaptcha=!0}onFormSubmit(e){var t,i;this.props.htmlSubmit?null===(t=(i=this.props).setFormSubmitted)||void 0===t||t.call(i):e.preventDefault()}}class Ne extends Ae{renderHiddenFields(){const e=new Date(this.props.data.formDate),{selectedTheaterName:t,movieTitle:i}=this.props;return(0,a.h)("div",{id:"hidden-fields"},(0,a.h)("input",{type:"hidden",name:"Theatre",value:t}),(0,a.h)("input",{type:"hidden",name:"Date",value:new Intl.DateTimeFormat("en-US").format(new Date(e))}),(0,a.h)("input",{type:"hidden",name:"Movie",value:i}),(0,a.h)("input",{type:"hidden",name:"ReferralDetails",value:"Powster"}),(0,a.h)("input",{type:"hidden",name:"LeadSourceDetails",value:"Powster"}),(0,a.h)("input",{type:"hidden",name:"EventProductName",value:"Meeting & Movie"}),(0,a.h)("input",{type:"hidden",name:"Owner",value:"32071894-71e7-e911-a83e-000d3a192483"}),(0,a.h)("input",{type:"hidden",name:"OwnerIsTeam",value:"True"}),(0,a.h)("input",{type:"hidden",name:"EventType",value:"Business Event"}))}}const Fe="form__wrapper__hjiKg",$e="form__container__sPuLG",Le="form__loader__U77HI",Ze="form__captcha__CtOGq",xe="form__disclaimer__J_nGu",He="form__inputContainer__Ww1S7",Pe="form__notesText__v7u2s",Ke="form__filler__AyOQ2";class We extends Ae{constructor(e){super(e),(0,o.Z)(this,"renderJotCaptcha",(()=>{const{formId:e,data:t}=this.props;return(0,a.h)("div",{className:Fe,id:"customJotCaptcha"},(0,a.h)("p",{className:xe},"AMC will never share your personal data. ",(0,a.h)("a",{href:"https://www.amctheatres.com/privacy-policy",target:"_blank",rel:"nofollow"},"Privacy Policy"),"."),(0,a.h)("div",{className:Pe},(0,a.h)("div",null,"By submitting this form I understand this form is only a request. A Special Events Consultant will be in touch within 3-5 business days. Your event is not confirmed until payment has been remitted. You will receive a submission confirmation email. If you don't receive, please check your SPAM or JUNK folders.")),(0,a.h)("div",{className:$e},(0,a.h)("img",{id:"customJotCaptcha_captcha",className:Le}),(0,a.h)("div",{className:He},(0,a.h)(Te,{formId:e,ref:e=>this.$captcha=e,id:"captcha",name:"captcha",value:t.captcha,type:"input",onInput:this.props.onChange,regex:"[^\\n]+",validationMessage:"Please complete the captcha first",wrapperClass:Ze,required:!0}),(0,a.h)("input",{type:"hidden",id:"customJotCaptcha_captcha_id",name:"captcha_id",required:!0}),(0,a.h)("div",{className:Ke}),(0,a.h)("img",{src:"https://cdn.jotfor.ms/images/reload.png",height:20,alt:"Reload",onClick:this.reloadJotCaptcha}))))})),(0,o.Z)(this,"reloadJotCaptcha",(e=>{e.preventDefault(),window.JotForm&&window.JotForm.reloadCaptcha("customJotCaptcha")})),(0,o.Z)(this,"renderHiddenFields",(()=>{const{movieTitle:e,amcName:t}=this.props,i=new Date(this.props.data.formDate);return(0,a.h)("div",{id:"hidden-fields"},(0,a.h)("input",{type:"hidden",name:"formID",value:"222265219027350"}),(0,a.h)("input",{type:"hidden",name:"simple_spc",value:"222265219027350-222265219027350"}),(0,a.h)("input",{type:"hidden",name:"event_id",value:"1659359627399_222265219027350_ISCcuxG"}),(0,a.h)("input",{type:"hidden",id:"JWTContainer",value:""}),(0,a.h)("input",{type:"hidden",id:"cardinalOrderNumber",value:""}),(0,a.h)("input",{type:"hidden",name:"q30_whatIs30",value:t}),(0,a.h)("input",{type:"hidden",name:"q51_whatFilm",value:e}),(0,a.h)("input",{type:"hidden",name:"q9_whatType9",value:"Playing in theatres (Current or Future)"}),(0,a.h)("input",{type:"hidden",name:"q105_whatIs105[month]",value:null==i?void 0:i.getMonth()}),(0,a.h)("input",{type:"hidden",name:"q105_whatIs105[day]",value:null==i?void 0:i.getDay()}),(0,a.h)("input",{type:"hidden",name:"q105_whatIs105[year]",value:null==i?void 0:i.getFullYear()}),(0,a.h)("input",{type:"hidden",name:"q17_whatIs17",value:"Powster"}))})),this.shouldRenderCaptcha=!0}async componentDidMount(){await(0,u.ve)("https://cdn01.jotfor.ms/static/prototype.forms.js?3.3.35637"),await(0,u.ve)("https://cdn02.jotfor.ms/static/jotform.forms.js?3.3.35637")}renderCustomInput(){return this.renderJotCaptcha()}renderCaptcha(){!0===this.shouldRenderCaptcha&&(this.shouldRenderCaptcha=!1,window.JotForm&&window.JotForm.initCaptcha("customJotCaptcha"))}}class qe extends Ae{renderHiddenFields(){const e=this.props.data.formDate,{selectedTheaterName:t,movieTitle:i,selectedTheaterCity:s}=this.props;return(0,a.h)("div",{id:"hidden-fields"},(0,a.h)("input",{type:"hidden",name:"cmEventType",value:"Private Screening"}),(0,a.h)("input",{type:"hidden",name:"cmLeadSource",value:"Partner"}),(0,a.h)("input",{type:"hidden",name:"cmMovieSource",value:i}),(0,a.h)("input",{type:"hidden",name:"cmTheatreName",value:t}),(0,a.h)("input",{type:"hidden",name:"cmTheatreCity",value:s}),(0,a.h)("input",{type:"hidden",name:"cmRequestedEventDate",value:new Intl.DateTimeFormat("en-US").format(new Date(e))}))}}const Ve={eventInquiryContainer:"groupBookingsInquiry__eventInquiryContainer__Tjc4E",stageSelection:"groupBookingsInquiry__stageSelection__WhzAA",stage:"groupBookingsInquiry__stage__lF7zf",currentStage:"groupBookingsInquiry__currentStage__rBRat",pannels:"groupBookingsInquiry__pannels__HQzDl",mainPannel:"groupBookingsInquiry__mainPannel__jNpHK",title:"groupBookingsInquiry__title__WsY3B",description:"groupBookingsInquiry__description__HwqEq",dontForget:"groupBookingsInquiry__dontForget__jYtsy",mainContent:"groupBookingsInquiry__mainContent__aOREE",bottomBar:"groupBookingsInquiry__bottomBar__Qic7P",movieDetails:"groupBookingsInquiry__movieDetails__w9vbZ",icon:"groupBookingsInquiry__icon__v8l08",rtlIcon:"groupBookingsInquiry__rtlIcon__I91s9",header:"groupBookingsInquiry__header__Fy_c5",details:"groupBookingsInquiry__details__VIW3h",movieTitle:"groupBookingsInquiry__movieTitle__DG0nu",theaterName:"groupBookingsInquiry__theaterName__gjvmd",disabledButton:"groupBookingsInquiry__disabledButton__n_H5e",formSubmissionIcon:"groupBookingsInquiry__formSubmissionIcon__oFvd5",secondaryIcon:"groupBookingsInquiry__secondaryIcon__K0Fzp",submissionErrorIcon:"groupBookingsInquiry__submissionErrorIcon__ckiKa",submittedOverlay:"groupBookingsInquiry__submittedOverlay__g3XHg",completeFieldsFirst:"groupBookingsInquiry__completeFieldsFirst___8HwS",outerContainer:"groupBookingsInquiry__outerContainer__Faghv",unsupported:"groupBookingsInquiry__unsupported__ugWkh",filler:"groupBookingsInquiry__filler__V2RQy",noBg:"groupBookingsInquiry__noBg__UjBVc",submitButton:"groupBookingsInquiry__submitButton__uE_0J",spinner:"groupBookingsInquiry__spinner__Q1WM5"};class Ge extends a.wA{constructor(e){var t,i,s,r,n,h,d,c,p,m,g,_,v,y,S,b,T,w,C,k,I,E,M,D;super(e),(0,o.Z)(this,"navigateStages",(e=>{const{formData:t}=this.props,i=t.currentStage||this.initialStage,s=this.currentStageComplete(),o=this.stages.findIndex((e=>e===i));l.Z.emit("GROUP_BOOKINGS_NAVIGATE_STAGES",e||"next"),"previous"!==e?s?this.props.onChange("currentStage",this.stages[o+1]):this.$form.validateAll():this.props.onChange("currentStage",this.stages[o-1])})),(0,o.Z)(this,"handleFormSubmission",(async e=>{e.preventDefault();if(this.currentStageComplete())if(l.Z.emit("GROUP_BOOKINGS_SUBMIT",this.props.selectedTheater),this.setState({submissionLoading:!0}),this.htmlSubmit){var t;let e=null===(t=this.$form)||void 0===t?void 0:t.base;null!=e&&e.requestSubmit?e.requestSubmit():null==e||e.submit(),this.setState({submissionLoading:!1})}else{var i;const e=new FormData(null===(i=this.$form)||void 0===i?void 0:i.base);let t={};for(let i of e.keys())t[i]=e.get(i);const{movieTitle:s,theaterName:o}=this.getMovieTitleAndTheater();t.startTime=`${t.hour}:${t.minute} ${t.meridian}`,t.date=(new Date).toISOString().slice(0,10),t.chainId=this.props.chainId,t.film=s,t.theaterLocation=o,delete t["g-recaptcha-response"],delete t.currentStage;const a=new Headers;a.append("Content-type","application/json");
1const r=new Request(this.submitUrl,{headers:a,body:JSON.stringify(t),method:"POST",mode:"cors"}),n=await fetch(r);this.setState({submissionLoading:!1}),n.ok?200!==n.status&&201!==n.status||this.setFormSubmitted():this.setState({renderFormError:!0})}else this.$form.validateCaptcha()})),(0,o.Z)(this,"renderFormSubmitted",(()=>{var e,t;const i=l.Z.get(),s=(null==i||null===(e=i.appData)||void 0===e||null===(t=e.copy)||void 0===t?void 0:t.baseCopy)||{},o={content:s.$FORM_SUBMITTED_CONFIRMATION||"The theater will be in touch soon!",title:s.$INQUIRY_SENT||"Inquiry Sent",buttonTooltip:s.$BACK_TO_THEATER||"Back to theater listing"};return(0,a.h)(ie.Z,{ref:e=>this.$tooltip=null==e?void 0:e.base,class:Ve.submittedOverlay,data:o,isMobile:!0,isOpen:!0,position:"topRight",onHide:()=>{const e="mobile"===(0,u.RK)(l.Z.get(),"client.deviceSize",{})?"POP_HEADER_ACTION":"POP_SHOWTIMES_BTN_ACTION";l.Z.emit(e),this.props.goBack()},icon:(0,a.h)("div",{className:Ve.formSubmissionIcon},(0,a.h)("svg",{width:"35",height:"33",viewBox:"0 0 35 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.89 30H5C4.33696 30 3.70107 29.7366 3.23223 29.2678C2.76339 28.7989 2.5 28.163 2.5 27.5V11.5H32.5V16.39C33.4386 16.9378 34.2828 17.6334 35 18.45V5C35 3.67392 34.4732 2.40215 33.5355 1.46447C32.5979 0.526784 31.3261 0 30 0L5 0C3.67392 0 2.40215 0.526784 1.46447 1.46447C0.526784 2.40215 0 3.67392 0 5L0 27.5C0 28.8261 0.526784 30.0979 1.46447 31.0355C2.40215 31.9732 3.67392 32.5 5 32.5H21C20.1656 31.7867 19.4529 30.9424 18.89 30ZM10 2.5H30C30.663 2.5 31.2989 2.76339 31.7678 3.23223C32.2366 3.70107 32.5 4.33696 32.5 5V9H2.5V5C2.5 4.33696 2.76339 3.70107 3.23223 3.23223C3.70107 2.76339 4.33696 2.5 5 2.5H10Z",fill:"black","fill-opacity":"0.3"})),(0,a.h)("svg",{className:Ve.secondaryIcon,width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.59958 8.79067L1.19877 6.26339C0.933745 5.98406 0.933745 5.53141 1.19877 5.25274C1.46379 4.97342 1.89382 4.97342 2.15884 5.25274L4.07962 7.27604L9.84069 1.2095C10.1063 0.930168 10.5364 0.930168 10.8008 1.2095C11.0664 1.48882 11.0664 1.94281 10.8008 2.22147L4.55965 8.79067C4.42714 8.93 4.25338 9 4.07962 9C3.90585 9 3.73209 8.93 3.59958 8.79067Z",fill:"black"}),(0,a.h)("path",{d:"M3.59958 8.79067L1.19877 6.26339C0.933745 5.98406 0.933745 5.53141 1.19877 5.25274C1.46379 4.97342 1.89382 4.97342 2.15884 5.25274L4.07962 7.27604L9.84069 1.2095C10.1063 0.930168 10.5364 0.930168 10.8008 1.2095C11.0664 1.48882 11.0664 1.94281 10.8008 2.22147L4.55965 8.79067C4.42714 8.93 4.25338 9 4.07962 9C3.90585 9 3.73209 8.93 3.59958 8.79067",stroke:"black"})))})})),(0,o.Z)(this,"renderFormError",(()=>{var e,t;const i=l.Z.get(),s=(null==i||null===(e=i.appData)||void 0===e||null===(t=e.copy)||void 0===t?void 0:t.baseCopy)||{},o={content:s.$GROUP_BOOKINGS_TRY_AGAIN||"Try going back to listings to resolve the issue (data is not lost).",title:s.$GROUP_BOOKINGS_FORM_ERROR||"Oh no! Looks like you encountered an error.",buttonTooltip:s.$BACK_TO_LISTINGS||"Back to Listings"};return(0,a.h)(ie.Z,{ref:e=>this.$tooltip=null==e?void 0:e.base,class:Ve.submittedOverlay,data:o,isMobile:!0,isOpen:!0,position:"topRight",onHide:()=>{const e="mobile"===(0,u.RK)(l.Z.get(),"client.deviceSize",{})?"POP_HEADER_ACTION":"POP_SHOWTIMES_BTN_ACTION";l.Z.emit(e),this.props.goBack("preserveData")},icon:(0,a.h)("div",{className:Ve.formSubmissionIcon},(0,a.h)(oe.Z,{className:Ve.submissionErrorIcon}))})})),(0,o.Z)(this,"getMovieTitleAndTheater",(()=>{var e;const{selectedTheater:t}=this.props,i=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.movieId","");return{movieTitle:(0,f.g4)(i),chainId:null==t?void 0:t.chainId,theaterName:null==t?void 0:t.name,amcName:null==t||null===(e=t.meta)||void 0===e?void 0:e.amcName}})),(0,o.Z)(this,"renderTheaterIcon",(()=>{const{selectedTheater:e,logoShade:t}=this.props,i=`${(0,u.RK)(this.props,"store.appData.urls.roots.sharedImages")||""}/logos/${t}/${(0,u.RK)(e,"chain.logo")||"default.png"}
1`,s=(0,u.RK)(this.props,"store.appData.copy.accessibilityCopy",{}),o=(null==e?void 0:e.chain)&&(null==e?void 0:e.chain.name.replace(/\..*/,"")),r="rtl"===(0,u.RK)(this.props,"store.appData.styling.fontVariables.textDirection");return(0,a.h)("div",{class:(0,u.WM)(Ve.icon,r&&Ve.rtlIcon)},(0,a.h)("img",{src:i,alt:s.$CINEMA_LOGO_ALT.replace("<chain>",o)}))})),(0,o.Z)(this,"renderMovieInfo",(()=>{const{client:e,formData:t}=this.props,{movieTitle:i,theaterName:s}=this.getMovieTitleAndTheater(),o=t.currentStage||this.initialStage,r=this.stages.indexOf(o),n=this.stageTitles[r];return(0,a.h)("div",null,(0,a.h)("div",{className:Ve.title},!e.isDesktopSize&&"Group Booking -"," ",n),(0,a.h)("div",{className:Ve.movieDetails},(0,a.h)("div",{class:Ve.header},this.renderTheaterIcon(),(0,a.h)("div",{class:Ve.details},(0,a.h)("div",{className:Ve.movieTitle},i),(0,a.h)("div",{className:Ve.theaterName},s)))))})),(0,o.Z)(this,"renderFormDescription",(()=>{const{formData:e}=this.props,t=e.currentStage||this.initialStage;return(0,a.h)("div",null,t!==this.finalStage&&(0,a.h)(se.Z,{class:Ve.description,content:this.descriptionText,markdown:!0}),t===this.finalStage&&(0,a.h)(se.Z,{class:Ve.description,content:this.confirmationText,markdown:!0}))})),(0,o.Z)(this,"renderForm",(()=>{var e,t,i,s,o;const{movieTitle:r,theaterName:n,chainId:h,amcName:d}=this.getMovieTitleAndTheater(),c=null===(e=this.props.selectedTheater)||void 0===e||null===(t=e.address)||void 0===t||null===(i=t.intl)||void 0===i?void 0:i.city,{formData:p}=this.props,u=p.currentStage||this.initialStage,m=l.Z.get(),g=(null==m||null===(s=m.appData)||void 0===s||null===(o=s.copy)||void 0===o?void 0:o.baseCopy)||{};let _={"amc-theatres":We,"regal-cinemas":Ne,"cinemark-theatres":qe,"email-form":Be}[this.groupBookingFormType];return _?(0,a.h)("div",{className:Ve.outerContainer},this.renderFormDescription(),(0,a.h)("div",{className:Ve.mainContent},(0,a.h)(_,{formId:this.chainSlug,ref:e=>this.$form=e,fields:this.fields,data:this.props.formData,currentStage:u,finalStage:this.finalStage,movieTitle:r,chainId:h,selectedTheaterCity:c,selectedTheaterName:n,submitUrl:this.submitUrl,submitToNewTab:this.submitToNewTab,onChange:this.props.onChange,isValidTime:this.isValidTime,hasRecaptcha:this.hasRecaptcha,recaptchaKey:this.recaptchaKey,htmlSubmit:this.htmlSubmit,setFormSubmitted:this.setFormSubmitted,amcName:d}),this.renderBottomNavigationBar())):(0,a.h)(se.Z,{class:Ve.unsupported,content:g.$GROUP_BOOKINGS_UNSUPPORTED||"Group Bookings is not supported yet by this chain/theatre, please come back later.",markdown:!0})})),(0,o.Z)(this,"renderStages",(()=>{const{formData:e}=this.props,t=e.currentStage||this.initialStage;return(0,a.h)("div",{className:Ve.stageSelection},this.stages.map((e=>{const i=this.stages.indexOf(t),s=this.stages.indexOf(e);let o;o=s>i?this.isStageComplete(t):this.isStageComplete(e);const r=e===this.finalStage?this.allStagesComplete({navigationClick:!0}):o;return(0,a.h)("div",{className:(0,u.WM)(Ve.stage,t===e&&Ve.currentStage,r&&Ve.active)},this.stageTitles[s])})))})),(0,o.Z)(this,"isValidTime",(e=>{if(!e)return;const t=["AM","PM"];return e.hour&&e.minute&&e.meridian?Number(e.hour)!==isNaN()&&Number(e.minute)!==isNaN()&&t.includes(e.meridian):void 0})),(0,o.Z)(this,"currentStageComplete",(()=>{const{formData:e}=this.props,t=e.currentStage||this.initialStage;if(t===this.finalStage)return!this.hasRecaptcha||!(null==e||!e.captcha);const i=this.fields.filter((e=>e.stage===t)).map((t=>{const i=e[t.id],s=new RegExp(t.validation.regex).test(i),o=this.isValidTime(i)&&s;return t.required?i&&("timepicker"===t.type?o:s):!i||("timepicker"===t.type?o:s)}));return i.every((e=>!0===e))})),(0,o.Z)(this,"isStageComplete",(e=>{const{formData:t}=this.props;if(e===this.finalStage)return!0;const i=this.fields.filter((t=>t.stage===e)).map((e=>{const i=t[e.id],s=new RegExp(e.validation.regex).test(i),o=this.isValidTime(i)&&s;return e.required?i&&("timepicker"===e.type?o:s):!i||("timepicker"===e.type?o:s)}));return i.every((e=>!0===e))})),(0,o.Z)(this,"allStagesComplete",(e=>{const{formData:t}=this.props,i=null==e?void 0:e.navigationClick,s=this.fields.map((e=>e.required?t[e.id]&&new RegExp(e.validation.regex).test(t[e.id]):!t[e.id]||new RegExp(e.validation.regex).test(t[e.id])));return i?s.every((e=>!0===e)):this.hasRecaptcha?s.every((e=>!0===e))&&t.captcha:s.every((e=>!0===e))})),(0,o.Z)(this,"renderBottomNavigationBar",(()=>{const{client:e,formData:t}=this.props,i=t.currentStage||this.initialStage,s=this.currentStageComplete(),o=this.allStagesComplete(),r=this.fields.findIndex((e=>e.stage===i));return(0,a.h)("div",{className:Ve.bottomBar},0!==r&&(0,a.h)("button",{onClick:()=>this.navigateStages("previous")},e.isDesktopSize?"Previous Page":"Back"),(0,a.h)("div",{className:(0,u.WM)(Ve.filler,Ve.noBg),key:"filler"}),i!==this.finalStage&&(0,a.h)(ie.Z,{ref:e=>this.$completeFieldsTooltip=null==e?void 0:e.base,class:Ve.completeFieldsFirst,data:{content:"Please complete the required fields first"},selfHideMilliseconds:this.invalidNextTimer,showCondition:!s,stageIndex:r,position:"topLeft"},(0,a.h)("button",{id:"nextButton",ref:e=>this.$nextButton=e,class:!s&&Ve.disabledButton,onClick:()=>this.navigateStages()},e.isDesktopSize?"Next Page":"Next")),i===this.finalStage&&(0,a.h)(ie.Z,{ref:e=>this.$completeFieldsTooltip=null==e?void 0:e.base,class:Ve.completeFieldsFirst,data:{content:"Please complete the captcha first"},selfHideMilliseconds:this.invalidNextTimer,showCondition:!s,stageIndex:r,position:"topLeft"},(0,a.h)("button",{form:this.chainSlug,type:"submit",onClick:e=>this.handleFormSubmission(e),disabled:this.state.submissionLoading,className:(0,u.WM)(Ve.submitButton,(!o||this.state.submissionLoading)&&Ve.disabledButton,this.state.submissionLoading&&Ve.spinner)},!this.state.submissionLoading&&"Submit")))}));const R=(0,f.ku)()||{};this.setFormSubmitted=this.setFormSubmitted.bind(this),this.chainSlug=this.props.selectedTheater.chain.slug,this.groupBookingFormType=this.getGroupBookingFormType(),this.hasRecaptcha=null===(t=R.groupBookings)||void 0===t?void 0:t.enableFormRecaptcha,this.recaptchaKey=(null===(i=R.groupBookings)||void 0===i?void 0:i.recaptchaKey)||"6LconT4hAAAAAKKHhv6UlG5RbqAdqXtJvVD3yY0O",this.htmlSubmit=null===(s=R.groupBookings)||void 0===s||null===(r=s.forms)||void 0===r||null===(n=r[`${this.groupBookingFormType}`])||void 0===n?void 0:n.htmlSubmit,this.submitUrl=(null===(h=R.groupBookings)||void 0===h||null===(d=h.forms)||void 0===d||null===(c=d[`${this.groupBookingFormType}`])||void 0===c?void 0:c.submitUrl)||{},this.submitToNewTab=(null===(p=R.groupBookings)||void 0===p||null===(m=p.forms)||void 0===m||null===(g=m[`${this.groupBookingFormType}`])||void 0===g?void 0:g.submitToNewTab)||{};const O=(0,u.FZ)((null===(_=R.groupBookings)||void 0===_||null===(v=_.forms)||void 0===v||null===(y=v[`${this.groupBookingFormType}`])||void 0===y?void 0:y.stages)||{},((e,t)=>({...e,key:t}
1))),A=O.map((e=>e.key)),B=O.map((e=>e.title));this.finalStage=(null===(S=R.groupBookings)||void 0===S||null===(b=S.forms)||void 0===b||null===(T=b[`${this.groupBookingFormType}`])||void 0===T?void 0:T.finalStage)||"Check Your Details";let N={};A.forEach((e=>{var t,i,s,o,a;const r=(null===(t=R.groupBookings)||void 0===t||null===(i=t.forms)||void 0===i||null===(s=i[`${this.groupBookingFormType}`])||void 0===s||null===(o=s.stages)||void 0===o||null===(a=o[e])||void 0===a?void 0:a.fields)||{},n={};Object.keys(r).forEach((t=>{n[t]={...r[t],stage:e}})),N={...N,...n}})),this.fields=(0,u.FZ)(N),this.stages=[...A,this.finalStage],this.stageTitles=[...B,this.finalStage],this.descriptionText=(null===(w=R.groupBookings)||void 0===w||null===(C=w.forms)||void 0===C||null===(k=C[`${this.groupBookingFormType}`])||void 0===k?void 0:k.formDescriptionText)||{},this.confirmationText=(null===(I=R.groupBookings)||void 0===I||null===(E=I.forms)||void 0===E||null===(M=E[`${this.groupBookingFormType}`])||void 0===M?void 0:M.formConfirmationText)||{},this.invalidNextTimer=(null===(D=R.groupBookings)||void 0===D?void 0:D.invalidNextTimer)||"",this.initialStage=this.stages[0]}getGroupBookingFormType(){var e,t,i,s,o,a,r,n,l;const h=(0,f.ku)()||{};var d;if(null!==(e=h.groupBookings)&&void 0!==e&&e.preselectedForm)return null===(d=h.groupBookings)||void 0===d?void 0:d.preselectedForm;const c=(null==h||null===(t=h.groupBookings)||void 0===t?void 0:t.formsForTheater)||{},p=(null==h||null===(i=h.groupBookings)||void 0===i?void 0:i.formsForChain)||{},u=null===(s=this.props)||void 0===s||null===(o=s.selectedTheater)||void 0===o?void 0:o.id;if(u&&c[u])return c[u];return null===(l=p[null===(a=this.props)||void 0===a||null===(r=a.selectedTheater)||void 0===r||null===(n=r.chain)||void 0===n?void 0:n.id])||void 0===l?void 0:l.form}componentDidUpdate(e){var t,i,s,o;(null===(t=this.props.formData)||void 0===t?void 0:t.currentStage)!==(null===(i=e.formData)||void 0===i?void 0:i.currentStage)&&(null===(s=this.base)||void 0===s||null===(o=s.querySelector("[class*=field__wrapper]:not([class*=hidden]) :is(input:not([type=hidden]), select, textarea, button):not([disabled])"))||void 0===o||o.focus())}setFormSubmitted(){this.setState({renderFormSubmitted:!0})}render(){const{client:e}=this.props;if(this.fields)return(0,a.h)("div",{className:Ve.eventInquiryContainer},e.isDesktopSize&&this.renderStages(),(0,a.h)("div",{className:Ve.pannels},(0,a.h)("div",{className:Ve.mainPannel},this.renderMovieInfo(),this.renderForm(),this.state.renderFormSubmitted&&this.renderFormSubmitted(),this.state.renderFormError&&this.renderFormError(),";")))}}var Ue=i(7537),ze=i(7468),Ye=i(4927),je=i(9655),Je=i(7415),Qe=i(3197);const Xe={container:"showtimes2__container__NuyRW",animate:"showtimes2__animate__dl73T",sonyHeader:"showtimes2__sonyHeader__YejUN",showtimesOnlyIframed:"showtimes2__showtimesOnlyIframed__tF4OD",scroller:"showtimes2__scroller__hKnC9",content:"showtimes2__content__VgzEK",location:"showtimes2__location__SmxKI",wrapper:"showtimes2__wrapper__PR4UR",exitContainer:"showtimes2__exitContainer__kdDR6",theaterScroller:"showtimes2__theaterScroller__R09hR",snappy:"showtimes2__snappy__cRxKM",list:"showtimes2__list__irzUk",accomodateBookingTabs:"showtimes2__accomodateBookingTabs__elOTE",eventInquiryContent:"showtimes2__eventInquiryContent__ck7Ty",hideSuggestions:"showtimes2__hideSuggestions__ZcQ1T",movieDetails:"showtimes2__movieDetails__rIvCT",blur:"showtimes2__blur__gTFFB",confirmationOverlay:"showtimes2__confirmationOverlay__kmz6z",scrollDates:"showtimes2__scrollDates__orZ0R",scrollPadding:"showtimes2__scrollPadding__qKKav",mobileSearchOverlay:"showtimes2__mobileSearchOverlay__HXtqr",scrollSearch:"showtimes2__scrollSearch__yIRDM",dualMenu:"showtimes2__dualMenu__m3z7q",mobileGroupBookingsLayout:"showtimes2__mobileGroupBookingsLayout__VuP7l",filters:"showtimes2__filters__yQZIA",hidden:"showtimes2__hidden__OFP9Z",filter:"showtimes2__filter__Yl2rP small",rtlFilter:"showtimes2__rtlFilter__y1apx",modeWrapper:"showtimes2__modeWrapper__XUPM9",spacer:"showtimes2__spacer__ElrbV",filterSelectionContainer:"showtimes2__filterSelectionContainer__PRHsH",filterSelectionActive:"showtimes2__filterSelectionActive__WP84o",mapModeContainer:"showtimes2__mapModeContainer__F1T8L",filterIcon:"showtimes2__filterIcon__gSlUb",mode:"showtimes2__mode__qUzCM",cta:"showtimes2__cta__p3aP6",listIcon:"showtimes2__listIcon__Ktbqo",mapIcon:"showtimes2__mapIcon__PupNC",customMapIcon:"showtimes2__customMapIcon__DPN6d",custom:"showtimes2__custom__d1W44",active:"showtimes2__active__MuZGZ",mapModeVisible:"showtimes2__mapModeVisible__WiirL",icons:"showtimes2__icons__nKixt",listView:"showtimes2__listView__Vv8Zg",mainContentIn:"showtimes2__mainContentIn__OmEqE",theater:"showtimes2__theater__mnJn0",loading:"showtimes2__loading__zweZ6",dummy:"showtimes2__dummy__zaXWq",icon:"showtimes2__icon__idQOL",title:"showtimes2__title__Pliex",screenings:"showtimes2__screenings__hSX4t",screening:"showtimes2__screening__TboQV",mapView:"showtimes2__mapView__Wgbgv",theaterContainer:"showtimes2__theaterContainer__G206T",suggestions:"showtimes2__suggestions__pi1AM",more:"showtimes2__more__Pkz8c",loadingMore:"showtimes2__loadingMore__g4Lt0",moreButton:"showtimes2__moreButton__tpyJE",loadingMoreIcon:"showtimes2__loadingMoreIcon__uZ090",map:"showtimes2__map__fOa9B",mobileMapExpanded:"showtimes2__mobileMapExpanded__cZZfY",stretched:"showtimes2__stretched__IjD2m",mapOverlay:"showtimes2__mapOverlay__JYAbJ",visible:"showtimes2__visible__fz8tp",mapElement:"showtimes2__mapElement__N6HII",directions:"showtimes2__directions__YLEUm",directionsType:"showtimes2__directionsType__qHDlu",mapTheaterExpanded:"showtimes2__mapTheaterExpanded__DkblY",collapseHeader:"showtimes2__collapseHeader__r8OAm",panelFrame:"showtimes2__panelFrame__vitSt","mode-map":"showtimes2__mode-map__BtFOx",listModeContainer:"showtimes2__listModeContainer__sf4oA",animateTheaterExpansion:"showtimes2__animateTheaterExpansion__Q3TNl",attribution:"showtimes2__attribution__sAYs2",showtimesBy:"showtimes2__showtimesBy__SB5kW",logo:"showtimes2__logo__zE1nU",filler:"showtimes2__filler__y_spi",nearbyList:"showtimes2__nearbyList__ZZzXV",nearbyTheater:"showtimes2__nearbyTheater__oGW9G",nearbyName:"showtimes2__nearbyName__GLysZ",nearbyTheaterDummy:"showtimes2__nearbyTheaterDummy__mwmcP",mapMessage:"showtimes2__mapMessage__DC6ig",selectTitleBtnContainer:"showtimes2__selectTitleBtnContainer__Tzv1Q",selectTitleBtn:"showtimes2__selectTitleBtn__JR7f2",noBottomMargin:"showtimes2__noBottomMargin__Tn1VD",desktopSelectTitle:"showtimes2__desktopSelectTitle__bf814",widget:"showtimes2__widget__oYGXg",tabsContainer:"showtimes2__tabsContainer__RUM91",tab:"showtimes2__tab__XS2NG",selected:"showtimes2__selected__FzBcl",mobileContainer:"showtimes2__mobileContainer__PRuaL",mapModeScroll:"showtimes2__mapModeScroll__ZhwTI",displayed:"showtimes2__displayed__JgXh5",sticky:"showtimes2__sticky__TgA9c",stretchedTheaterScroller:"showtimes2__stretchedTheaterScroller__XSlbb"},et={list:"listings_view",expanded:"cinema_view",collapsed:"map_view"};let tt=rt(h.Z),it=rt(B.Z);class st extends a.wA{constructor(e){var t,i,s,r,n,h;super(e),(0,o.Z)(this,"renderFormSubmitted",(()=>(0,a.h)(ie.Z,{ref:e=>this.$tooltip=null==e?void 0:e.base,class:(0,u.WM)(Xe.submittedOverlay,Xe.confirmationOverlay),data:{content:"The theater will be in touch soon!",title:"Inquiry Sent",buttonTooltip:"Back to theater listing"},isMobile:!0,isOpen:!0,position:"topRight",onHide:()=>{(0,g.Z)().groupBookingsSubmitted&&window.history.replaceState("","",window.location.origin+window.location.pathname)},icon:(0,a.h)("div",{class:Xe.formSubmissionIcon},(0,a.h)("svg",{width:"35",height:"33",viewBox:"0 0 35 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.89 30H5C4.33696 30 3.70107 29.7366 3.23223 29.2678C2.76339 28.7989 2.5 28.163 2.5 27.5V11.5H32.5V16.39C33.4386 16.9378 34.2828 17.6334 35 18.45V5C35 3.67392 34.4732 2.40215 33.5355 1.46447C32.5979 0.526784 31.3261 0 30 0L5 0C3.67392 0 2.40215 0.526784 1.46447 1.46447C0.526784 2.40215 0 3.67392 0 5L0 27.5C0 28.8261 0.526784 30.0979 1.46447 31.0355C2.40215 31.9732 3.67392 32.5 5 32.5H21C20.1656 31.7867 19.4529 30.9424 18.89 30ZM10 2.5H30C30.663 2.5 31.2989 2.76339 31.7678 3.23223C32.2366 3.70107 32.5 4.33696 32.5 5V9H2.5V5C2.5 4.33696 2.76339 3.70107 3.23223 3.23223C3.70107 2.76339 4.33696 2.5 5 2.5H10Z",fill:"black","fill-opacity":"0.3"})),(0,a.h)("svg",{class:Xe.secondaryIcon,width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.59958 8.79067L1.19877 6.26339C0.933745 5.98406 0.933745 5.53141 1.19877 5.25274C1.46379 4.97342 1.89382 4.97342 2.15884 5.25274L4.07962 7.27604L9.84069 1.2095C10.1063 0.930168 10.5364 0.930168 10.8008 1.2095C11.0664 1.48882 11.0664 1.94281 10.8008 2.22147L4.55965 8.79067C4.42714 8.93 4.25338 9 4.07962 9C3.90585 9 3.73209 8.93 3.59958 8.79067Z",fill:"black"}),(0,a.h)("path",{d:"M3.59958 8.79067L1.19877 6.26339C0.933745 5.98406 0.933745 5.53141 1.19877 5.25274C1.46379 4.97342 1.89382 4.97342 2.15884 5.25274L4.07962 7.27604L9.84069 1.2095C10.1063 0.930168 10.5364 0.930168 10.8008 1.2095C11.0664 1.48882 11.0664 1.94281 10.8008 2.22147L4.55965 8.79067C4.42714 8.93 4.25338 9 4.07962 9C3.90585 9 3.73209 8.93 3.59958 8.79067",stroke:"black"})))}))),(0,o.Z)(this,"updateGroupBookingsFormData",((e,t)=>
1{this.setState((i=>(i.formData={...i.formData,[e]:t},i)))})),(0,o.Z)(this,"replaceGroupBookingsQueryString",(e=>e.replace(/^[?](booknow|groupbookings)&/,"?").replace(/^[?](booknow|groupbookings)$/,"").replace(/&[?]?(booknow|groupbookings)$/,""))),(0,o.Z)(this,"exitEventInquiry",(e=>{const t=this.state.formData;if("preserveData"===e){const e={...t,currentStage:""};return this.setState({formData:e,mode:"list"}),void l.Z.get().set({groupBookingsShowtimes:!1})}this.setState({formData:this.useGroupBookingsDummyFormData?t:{...this.initialFormData},mode:"list"})})),this.showFilterSelection=this.showFilterSelection.bind(this),this.hideFilterSelection=this.hideFilterSelection.bind(this),this.filtersChange=this.filtersChange.bind(this),this.setListMode=this.setListMode.bind(this),this.setMapMode=this.setMapMode.bind(this),this.setMapModeButton=this.setMapModeButton.bind(this),this.expandCurrentMapTheater=this.expandTheater.bind(this,null),this.selectNearby=this.selectNearby.bind(this),this.selectNearbyFromChain=this.selectNearbyFromChain.bind(this),this.hideShowtimes=this.hideShowtimes.bind(this),this.showMore=this.showMore.bind(this),this.updateMapMarkers=this.updateMapMarkers.bind(this),this.triggerShowtimesBtn=this.triggerShowtimesBtn.bind(this),this.trigger=this.trigger.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onCHTouchStart=this.onCHTouchStart.bind(this),this.onCHTouchMove=this.onCHTouchMove.bind(this),this.scrollerClick=this.scrollerClick.bind(this),this.disableMobileOverlay=this.toggleMobileOverlayActive.bind(this,!1),this.enableMobileOverlay=this.toggleMobileOverlayActive.bind(this,!0),this.toggleMobileOverlayActive=this.toggleMobileOverlayActive.bind(this),this.handleFilterOverlayClick=this.handleFilterOverlayClick.bind(this),this.safariMobileBlur=this.safariMobileBlur.bind(this),this.safariMobileFocus=this.safariMobileFocus.bind(this),this.exitCinemaExpandedView=this.exitCinemaExpandedView.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLimitInterstetial=this.handleLimitInterstetial.bind(this),this.renderSelectTitleButton=this.renderSelectTitleButton.bind(this),this.setGeo=this.setGeo.bind(this),this.stickAndScale=this.stickAndScale.bind(this),this.applyQueryStringMovieFilter=this.applyQueryStringMovieFilter.bind(this),this.setEventInquiry=this.setEventInquiry.bind(this),this.stickedElementsRefs={},this.trackConversion=this.trackConversion.bind(this),this.filtersList=["date","time","format"],this.defaultChainLogo="default.png",this.$theaterElements=[];let d=(0,u.RK)(this.props,"store.appData.pages",{});this.noHome=!Object.keys(d).includes("boltHome"),this.boundingRegions=(0,f.l)(),this.today=(0,T.Z)(new Date,"dd MMM");const c=(0,u.RK)(this.props,"store.appData.doc.mapStyling.mapTiler")||{};this.useMapTiler=c.id&&c.key,this.userCountry=((0,u.RK)(this.props,"store.client.geo.countryCode")||"").toUpperCase(),this.quickFiltersData=this.getPageData().quickFilters||{};const p=null===(t=this.props.store)||void 0===t||null===(i=t.appData)||void 0===i?void 0:i.styling;this.logoShade=(0,u.RK)(this.props,"store.appData.styling.logoShade",null),this.useGroupBookingsDummyFormData=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings.dummyFormData",!1)&&!1;const m=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings.preselectedTab","Book Now"),_=(0,g.Z)(),v=_.groupbookings?"Group Bookings":_.booknow?"Book Now":m,y=new Date((null===(s=l.Z.get().showtimes.filters)||void 0===s||null===(r=s.selected)||void 0===r||null===(n=r.date)||void 0===n?void 0:n[0])||new Date).toISOString().split("T")[0];if("Group Bookings"===v?l.Z.get().set({groupBookingsShowtimes:!0}):l.Z.get().set({groupBookingsShowtimes:!1}),!this.logoShade){var S;const e=(null==p||null===(S=p.variables)||void 0===S?void 0:S.secondaryTextColor)||"#000";this.logoShade=(0,ze.$)(e)<.5?"light":"dark"}this.initialFormData=this.useGroupBookingsDummyFormData?(0,f.sm)(y):{formDate:y},this.state={mode:"list",mapTop:0,mapBottom:0,mapSelectedTheater:null,mapTheaterExpanded:!1,animateTheaterExpansion:!1,mobileOverlayActive:!1,socialInterstitial:null===(h=this.props.store)||void 0===h?void 0:h.limitExceeded,validCountry:"",ttVisible:!0,selectedTab:v,formData:{...this.initialFormData}},l.Z.emit("UPDATE_SHOWTIMES_ACTIVE_TAB",v),l.Z.on("STICK_AND_SCALE",this.stickAndScale)}componentDidMount(){l.Z.on("LIMIT_EXCEEDED",this.handleLimitInterstetial);const e=(0,u.RK)(this.props,"store.client.geo.countryCode","").toUpperCase(),t=!this.boundingRegions||this.boundingRegions.includes(e);if(this.state.validCountry||t)this.setState({validCountry:t}),this.updateShowtimes();else{const t="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";l.Z.emit("WRONG_REGION",e,t)}document.addEventListener("mousedown",this.onMouseDown),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>
1this.resizeMap()))),this.preventClose="#no-clicks-out"==window.location.hash,this.createObservers();(0,g.Z)().groupBookingsSubmitted&&this.setState({groupBookingsSubmitted:!0,formData:{}})}componentWillUnmount(){document.removeEventListener("mousedown",this.onMouseDown),this.resizeObserver&&this.resizeObserver.disconnect(),l.Z.off("LIMIT_EXCEEDED",this.handleLimitInterstetial),l.Z.off("STICK_AND_SCALE",this.stickAndScale)}componentWillReceiveProps(e){if(e.store.showtimes.data!==this.props.store.showtimes.data){let t=null;this.state.mapSelectedTheater&&(t=(0,u.RK)(e,"store.showtimes.data").find((e=>e.id===this.state.mapSelectedTheater.id))),t?this.setState({mapSelectedTheater:t}):this.setState({mapSelectedTheater:(0,u.RK)(e,"store.showtimes.data.0"),mode:"list"})}this.isDesktop()&&this.state.mobileOverlayActive&&this.toggleMobileOverlayActive(!1)}componentDidUpdate(e,t){var i,s;if((null===(i=e.store.client.geo)||void 0===i?void 0:i.countryCode)!==(null===(s=this.props.store.client.geo)||void 0===s?void 0:s.countryCode)){const e=this.props.store.client.geo.countryCode;this.setState({validCountry:!this.boundingRegions||this.boundingRegions.includes(e),userCountry:e})}e.store.showtimes.show&&!this.props.store.showtimes.show&&this.setState({mode:"list"}),!e.store.showtimes.show&&this.props.store.showtimes.show&&this.applyQueryStringMovieFilter();const{mode:o,mapTheaterExpanded:a,selectedDate:r}=this.state,n=o!==t.mode||a!==t.mapTheaterExpanded||r!==t.selectedDate;if(n&&"map"===o&&!1===a&&(this.setHeaderExitCinemaExpanded("map"),this.updateMapMarkers()),n&&"map"===o&&!0===a&&this.setHeaderExitCinemaExpanded("list"),"list"===this.state.mode&&"map"===t.mode){const e="mobile"===(0,u.RK)(l.Z.get(),"client.deviceSize",{})?"POP_HEADER_ACTION":"POP_SHOWTIMES_BTN_ACTION";l.Z.emit(e)}n&&"eventInquiry"===o&&this.setHeaderExitInquiryMode(t.mode);const h=(0,u.RK)(this.props,"store.client.geo")||{},d=(0,u.RK)(e,"store.client.geo")||{},c=h.countryCode,p=d.countryCode,m="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";if(c&&c!==p){const e=!this.boundingRegions||this.boundingRegions.includes(c.toUpperCase());e!==this.state.validCountry&&this.setState({validCountry:e}),e||l.Z.emit("WRONG_REGION",c,m)}(h.lat!==d.lat||h.lon!==d.lon||!e.store.showtimes.loading&&this.props.store.showtimes.loading)&&((0,Oe.GZ)(this.$scroller,0,100),(0,Oe.GZ)(this.$listView,0,100)),this.$bgVideo&&this.state.bgVideo!==t.bgVideo&&(this.$bgVideo.src=this.state.bgVideo),this.state.filterSelection!==t.filterSelection&&this.handleScroll(),this.props.displayed&&e.displayed,this.state.mobileOverlayActive&&!t.mobileOverlayActive&&this.focus();const g=(0,u.RK)(e,"store.showtimes.loading"),_=(0,u.RK)(this.props,"store.showtimes.loading"),v=(0,u.RK)(e,"store.showtimes.error"),y=(0,u.RK)(this.props,"store.showtimes.error");
1if("map"===this.state.mode){const e=(0,u.RK)(this.props,"store.client.geo.lat"),t=(0,u.RK)(this.props,"store.client.geo.lon"),i=(0,u.RK)(this.state,"mapSelectedTheater.lat"),s=(0,u.RK)(this.state,"mapSelectedTheater.lon"),o=s&&i?i:e,a=s&&i?s:t,r=!this.state.mapTheaterExpanded,n={styles:P,center:{lat:+o,lon:+a},zoomControl:r};this.mountGoogleMaps(n),g&&!_&&this.updateMapMarkers()}y&&v!==y&&l.Z.emit("SHOWTIMES_ERROR",m);let S=(0,u.RK)(this.props,"store.showtimes.data"),b=(0,u.RK)(e,"store.showtimes.data");S!==b&&(this.updateMapMarkers(b),S&&!S.length&&l.Z.emit("SHOWTIMES_EMPTY",(0,u.RK)(this.props,"store.client.geo",{}),m)),this.createObservers()}getPageId(){var e,t,i,s,o;if(this.props.pageId)return this.props.pageId;let a=null===(e=this.props.store)||void 0===e?void 0:e.activePage;return"showtimes"===(null===(t=this.props.store)||void 0===t||null===(i=t.appData)||void 0===i||null===(s=i.pages)||void 0===s||null===(o=s[a])||void 0===o?void 0:o.type)?a:"boltShowtimes"}getPageData(){return this.props.showtimesPageData||(0,u.RK)(this.props,`store.appData.pages.${this.getPageId()}.data`)||{}}onStickedElementRef(e,t,i){this.stickedElementsRefs[t]={el:(null==e?void 0:e.base)||e,onlyOnDesktop:i}}getStickedElements(){let{client:e}=l.Z.get();const t=Object.values(this.stickedElementsRefs).filter((t=>{let{el:i,onlyOnDesktop:s}=t;return!!i&&(!s||e.isDesktopSize)&&"absolute"!==getComputedStyle(i).position})).map((e=>{let{el:t}=e;return t}));return t.sort(((e,t)=>e.getBoundingClientRect().y-t.getBoundingClientRect().y)),t}calculateStickedElementsHeight(){return this.getStickedElements().reduce(((e,t)=>e+t.getBoundingClientRect().height),0)}calculateMinDistanceToStick(){if(!this.$container)return 0;let e=this.getStickedElements(),t=this.$container.getBoundingClientRect().top;return Math.min(...e.map((e=>e.getBoundingClientRect().top-t)))}calculateMapPosition(){if(!this.$container)return 0;if(this.state.mapSelectedTheater&&this.state.mapTheaterExpanded)return-1*this.$container.getBoundingClientRect().top;if(!this.$modeSelector)return 0;let e=this.$modeSelector.getBoundingClientRect();return e.height?e.top+e.height-this.$container.getBoundingClientRect().top:this.calculateStickedElementsHeight()}createObservers(){this.$container&&this.$container!==this.$prevContainer&&(this.state.observerTheaters&&this.state.observerTheaters.destroy(),this.setState({observerTheaters:this.createObserverTheaters()}),this.$prevContainer=this.$container)}createObserverTheaters(){return new at(((e,t)=>{var i,s,o;if("list"!==this.state.mode||!this.$scroller)return;const a=this.calculateStickedElementsHeight()+this.$scroller.getBoundingClientRect().top,[r,n]=t.getClosestToY(a),[l]=t.getLastVisible(),h=((null==r||null===(i=r.classList)||void 0===i?void 0:i.value)||"").includes(Xe.theater),d=this.$scroller.scrollHeight-this.$scroller.scrollTop<=this.$scroller.getBoundingClientRect().height;n&&h&&!this.state.dateScrollerSticked&&this.setState({dateScrollerSticked:!0}),n&&h||!this.state.dateScrollerSticked||d||this.setState({dateScrollerSticked:!1}),n&&!this.state.quickFiltersSticky&&null!==(s=this.quickFiltersData)&&void 0!==s&&s.isSticky&&this.setState({quickFiltersSticky:!0}),!n&&this.state.quickFiltersSticky&&null!==(o=this.quickFiltersData)&&void 0!==o&&o.isSticky&&this.setState({quickFiltersSticky:!1}),n&&n.theater?n&&n.theater&&this.setSelectedTheater(n.theater):this.setSelectedTheater(null);n&&n.theater&&l!==r?(0,u.cn)(this.$scroller,Xe.snappy):(0,u.IV)(this.$scroller,Xe.snappy)}),{threshold:.1,repeat:{max:10,every:100}})}onMouseDown(e){const{interactivity:t}=e,{id:i,classList:s}=e.target,o="disney-explicit-consent-prompt"===i||s.contains("close_btn_thick"),a="sonyCreditButton"===i,r=(0,u.RK)(this.props,"store.trailerOverlay.overlayOpen",!1),n=s.contains("mc-closeModal")||s.contains("mc-layout__modalContent");if(!this.props.store.showtimes.show||this.base.contains(e.target)||o||0!==e.button||a||this.preventClose||r||n)return;let l=e.target.closest("input, button, a"),h=this.isDesktop();t||l||!h||this.hideShowtimes()}isDesktop(){return l.Z.get().client.isDesktopSize}onCHTouchStart(e){this.xDown=(e&&e.touches&&e.touches[0]||e).clientX,this.yDown=(e&&e.touches&&e.touches[0]||e).clientY}onCHTouchMove(e){if(!this.xDown||!this.yDown)return;let t=e.touches[0].clientX,i=e.touches[0].clientY,s=this.xDown-t,o=this.yDown-i;Math.sqrt(s*s+o*o)>10&&(Math.abs(o)>Math.abs(s)&&o<=0&&this.hideShowtimes(),this.xDown=null,this.yDown=null)}scrollerClick(e){let t=l.Z.get().client.isDesktopSize;e.target===this.$scroller&&t&&this.hideShowtimes()}focus(){let e=this.state.mobileOverlayActive?this.$overlayLocationSearch:this.$locationSearch;e&&e.focus()}setListMode(){"list"!==this.state.mode&&this.setState({mode:"list"})}handleFilterOverlayClick(e){if(e.target!==this.$filterSelection.base&&!this.$filterSelection.base.contains(e.target)){let e={...(0,u.RK)(this.props,"store.showtimes.filters.selected")||{}};l.Z.emit("REVERT_FILTERS",e),l.Z.emit("POP_SHOWTIMES_BTN_ACTION"),this.setState({filterSelection:!1})}}handleScroll(e){var t;const i=((null==e||null===(t=e.target)||void 0===t?void 0:t.scrollTop)||0)<=window.innerWidth/16*9/2,{ttVisible:s}=this.state;i!==s&&this.setState({ttVisible:i})}toggleMobileOverlayActive(e){"boolean"!=typeof e&&(e=!this.state.mobileOverlayActive),e!==this.state.mobileOverlayActive&&(this.setState({mobileOverlayActive:e}),e?(l.Z.emit("SHOWTIMES_SEARCH_OVERLAY_SHOW"),l.Z.emit("SET_HEADER_ACTION",{icon:"back",action:()=>{this.setState({mobileOverlayActive:!this.state.mobileOverlayActive}),l.Z.emit("SHOWTIMES_SEARCH_OVERLAY_HIDE")},tag:"hideShowtimesSearchOverlay"})):l.Z.emit("REMOVE_HEADER_ACTIONS","hideShowtimesSearchOverlay"))}exitCinemaExpandedView(e){const t=e||this.state.mode;
1this.exitCinemaDetailView(t)}trackConversion(e,t,i,s,o){var a,r;if(!e||!t)return;let n=""===t.format.trim()?"absent":t.format,h=[e.name,(0,u.RK)(e,"chain.name"),t.date,t.time,n,i].join("_");h.split("").length>100&&(h=[e.name.substring(0,50),(0,u.RK)(e,"chain.name"),t.date,t.time,n,i].join("_"));let d=null===(a=t.movie)||void 0===a||null===(r=a.regions)||void 0===r?void 0:r.find((e=>"INTL"===e.country));l.Z.emit("TICKET_CONVERSION",{screening:t,theater:e,date:t.date,time:t.time,format:n,provider:i,conversion:h,source:et[s]||"listings_view",theaterName:e.name,day:(0,T.Z)((0,u.sG)(t.date),"dddd"),url:o,movieTitle:null==d?void 0:d.title,movieSlug:null==d?void 0:d.slug,ticketType:"Group Bookings"===this.state.selectedTab?"groupbookings":"tickets"})}setMapMode(){if("map"===this.state.mode)return;if(!this.$content||!this.$scroller)return;let e=0;if(!this.isDesktop()){e=this.calculateMinDistanceToStick()+this.$scroller.scrollTop,this.$scroller.style.maxHeight=`${this.calculateStickedElementsHeight()}px`}e&&(this.$scroller.scrollTop=e),(()=>{this.setState({mode:"map"})})()}setEventInquiry(){"eventInquiry"!==this.state.mode&&this.setState({mode:"eventInquiry"})}setMapModeButton(){let e=this.state;
1"map"!==e.mode&&(e.mapSelectedTheater&&this.setSelectedTheater(e.mapSelectedTheater),this.setState({mapTheaterExpanded:!1,animateTheaterExpansion:!1}),this.setMapMode(),this.updateMapMarkers())}hideFilterSelection(){let e={...(0,u.RK)(this.props,"store.showtimes.filters.selected")||{}};l.Z.emit("REVERT_FILTERS",e),l.Z.emit("TOGGLE_INTERSTITIAL_OPEN",!1),this.setState({filterSelection:!1})}showFilterSelection(){const e=this.isDesktop();this.setState({filterSelection:!0}),l.Z.emit("TOGGLE_INTERSTITIAL_OPEN",!0),this.$collapseHeader&&this.$content&&this.$filterSelection&&!e&&this.$scroller.scrollTop<156&&(this.$scroller.scrollTop=156)}getDefaultAction(){let e=this.state.mode;return{icon:"back",action:()=>{this.setState({mapTheaterExpanded:"list"!==e&&"map"!==e,mode:e}),this.updateMapOptions({zoomControl:!0})}}}getCurrentShowtimesBtnAction(){const e=(0,u.RK)(l.Z.get(),"showtimes.actions");return e[e.length-1]||this.getDefaultAction()}getCurrentHeaderAction(){const e=(0,u.RK)(l.Z.get(),"header.actions");return e[e.length-1]||this.getDefaultAction()}setHeaderExitInquiryMode(){const e=(0,u.RK)(l.Z.get(),"showtimes.actions",{});if(e[0]&&"back"===e[0].icon)return;const t="mobile"===(0,u.RK)(l.Z.get(),"client.deviceSize",{})?"SET_HEADER_ACTION":"SET_SHOWTIMES_BTN_ACTIONS";l.Z.emit(t,{icon:"close",action:()=>this.exitEventInquiry()})}setHeaderExitCinemaExpanded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=(0,u.RK)(l.Z.get(),"showtimes.actions",{});if(t[0]&&"back"===t[0].icon)return;const i="mobile"===(0,u.RK)(l.Z.get(),"client.deviceSize",{})?"SET_HEADER_ACTION":"SET_SHOWTIMES_BTN_ACTIONS";l.Z.emit(i,{icon:"back",action:()=>this.exitCinemaExpandedView(e)})}triggerShowtimesBtn(){if(!this.state.mapTheaterExpanded)return;l.Z.emit("POP_SHOWTIMES_BTN_ACTION");let e=this.getCurrentShowtimesBtnAction();"function"==typeof e.action?e.action():"string"==typeof e.action&&l.Z.emit(e.action)}trigger(){l.Z.emit("POP_HEADER_ACTION");let e=this.getCurrentHeaderAction();"function"==typeof e.action?e.action():"string"==typeof e.action&&l.Z.emit(e.action)}setSelectedTheater(e){let t=this.props.store.showtimes.theatersDates||{};
1e&&t[e.id],this.setState({selectedTheater:e})}getTheaterScrollerDisplayedDates(){var e;const t=((null===(e=this.state.selectedTheater)||void 0===e?void 0:e.screeningsDates)||[]).map((e=>(0,T.Z)(new Date(e),"yyyy-MM-dd")));let i=[(0,T.Z)(new Date,"yyyy-MM-dd")];return{available:t,selected:(0,u.RK)(this.props.store.showtimes,"filters.selected.date",i)}}getDisplayedDates(){var e,t;let i=[(0,T.Z)(new Date,"yyyy-MM-dd")],s=this.state.selectedTheater,o=this.props.store.showtimes.filters,a=(0,u.RK)(this.props.store.showtimes,"filters.selected.date",i),r=this.props.store.showtimes.theatersDates||{};if(!o||o.loading)return{available:i,selected:a,loading:!0};if(null===(e=o.available)||void 0===e||null===(t=e.date)||void 0===t||!t.length)return{available:i,selected:a};if(!s||!this.state.dateScrollerSticked)return{available:o.available.date,selected:a};let n=r[s.id]&&Array.isArray(r[s.id])?r[s.id]:null;return{available:o.available.date,active:n,loading:!n,selected:a}}expandTheater(e){l.Z.emit("UPDATE_API_KEY"),l.Z.emit("GET_NEARBY_CINEMAS_FROM_CHAIN",e||this.state.mapSelectedTheater),l.Z.emit("IN_CINEMA_DETAIL_VIEW",e);let t=this.state.mode;const i=e||this.state.mapSelectedTheater,s="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";l.Z.emit("SELECT_THEATER",i,t,s),this.setSelectedTheater(i);let o={mapTheaterExpanded:!0,animateTheaterExpansion:"map"===t};e&&(o.mapSelectedTheater=e),this.setState(o),this.setMapMode(),this.updateMapMarkers(),this.updateMapOptions({zoomControl:!1})}expandTheaterEventInquiry(e){const t=e;l.Z.emit("GROUP_BOOKINGS_INQUIRE",t),this.setSelectedTheater(t),this.setEventInquiry()}exitCinemaDetailView(e){this.setState({mapTheaterExpanded:"list"===e||"map"===e,mode:e}),this.updateMapMarkers(),this.updateMapOptions({zoomControl:!0}),l.Z.emit("EXIT_CINEMA_DETAIL_VIEW")}filtersChange(e){this.setState({selectedDate:e}),l.Z.emit("UPDATE_API_KEY"),this.setState({filterSelection:!1});let t=(0,u.RK)(this.props,"store.showtimes.filters.selected")||{},i=(0,u.RK)(this.props,"store.showtimes.filterSnapshot")||{},s=(0,g.Z)(),o=Object.keys(t).map((e=>{if(!s[e]||"string"!=typeof s[e])return;let i=t[e];Array.isArray(i)||(i=[i]);let o=s[e].split(",").map((e=>e.trim())).filter((e=>e&&i.includes(e))).join(",");return o!==s[e]?(s[e]=o||null,!0):void 0}));if(o.some((e=>e))){let e=location.pathname+(0,u.UK)(s)+location.hash;history.replaceState({activePage:l.Z.get().activePage},"",e)}const a=!n()((t.date||[]).sort(),(i.date||[]).sort()),r=!n()((t.time||[]).sort(),(i.time||[]).sort()),h=!n()((t.format||[]).sort(),(i.format||[]).sort());var d;JSON.stringify(t)!==JSON.stringify(i)&&(l.Z.emit("SET_FILTERS_SELECTED_MOVIE_ID",null!==(d=t.movie)&&void 0!==d&&d.length?t.movie:[]),l.Z.emit("SHOWTIMES_REFRESH"),l.Z.emit("TRACK_FILTERS_CHANGE",t));const c="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";a&&(l.Z.emit("FILTER_SELECTED_DAY",t.date[0],c),"groupbookings"===c&&this.updateGroupBookingsFormData("formDate",t.date[0])),r&&l.Z.emit("FILTER_SELECTED_TIME",t.time.join(","),c),h&&l.Z.emit("FILTER_SELECTED_FORMAT",t.format.join(","),c);this.isDesktop()?l.Z.emit("POP_SHOWTIMES_BTN_ACTION"):l.Z.emit("POP_HEADER_ACTION")}renderDummyElements(e){if(this.state.validCountry)return[...Array(e)].map(((e,t)=>(0,a.h)("div",{class:Xe.dummy,key:t},(0,a.h)("div",{class:Xe.titleLine},(0,a.h)("div",{class:Xe.icon}),(0,a.h)("div",{class:Xe.title})),(0,a.h)("div",{class:Xe.screenings},(0,a.h)("div",{class:Xe.screening}),(0,a.h)("div",{class:Xe.screening}),(0,a.h)("div",{class:Xe.screening}),(0,a.h)("div",{class:Xe.screening})))))}filterValue(e,t){if("date"===e){let e=t.split("-"),i=new Date(+e[0],e[1]-1,+e[2]);const s=(0,u.RK)(this.props,"store.appData.copy.baseCopy.$DATETIME_LOCALE");let o=(0,T.Z)(i,"dd MMM",s);if(o===this.today){const e=(0,u.RK)(this.props,"store.appData.copy.baseCopy.$TODAY","today");return e.charAt(0).toUpperCase()+e.slice(1)}return o}return(0,u.RK)(this.props,["store","appData","copy","baseCopy","filters",e,t])||t}mountGoogleMaps(e){if(this.gmap||!this.$mapElement)return;const t=this.useMapTiler?Qe:Je;this.gmap=t.mount(this.$mapElement,e),this.resizeObserver&&this.resizeObserver.observe(this.$mapElement),this.updateMapMarkers()}async resizeMap(){const e=await this.gmap;e.resize&&e.resize()}hideShowtimes(){const e=(0,je.fx)();if(this.noHome||e)return;(this.isDesktop()?this.triggerShowtimesBtn:this.trigger)(),this.setState({filterSelection:!1,mode:"list"}),l.Z.emit("SHOWTIMES_HIDE",!0,!0)}showMore(){l.Z.emit("SHOWTIMES_SHOW_MORE")}async updateMapOptions(e){if(!this.gmap&&"object"==typeof e)return;let t=await this.gmap;t.setOptions&&t.setOptions(e)}
1async updateMapMarkers(e){if(!this.gmap)return;const t=(0,u.RK)(this.props,"store.appData.urls.roots.sharedImages"),i=this.state.mapTheaterExpanded;let s=await this.gmap,o=(0,u.RK)(this.props,"store.showtimes.data")||[];if(!e&&o!==e){this.mapMarkers&&this.mapMarkers.forEach((e=>e.setMap(null))),i&&(o=o.filter((e=>this.state.mapSelectedTheater.id===e.id)));let e="light";(0,u.RK)(this.props,"store.appData.styling.variables.white")===(0,u.RK)(this.props,"store.appData.styling.variables.screeningBtnTxtColor")&&(e="dark");const a=(0,u.RK)(this.props,"store.appData.styling.variables.activeMapMarkerShade",e),r=this.useMapTiler?H.R:x.I;this.mapMarkers=await Promise.all(o.map((e=>{const i=this.state.mapSelectedTheater.id===e.id,o=e.chain.logo||this.defaultChainLogo,n=`${t}/logos/${a}/${o}`,l=`${t}/logos/dark/${o}`;return r({position:{lat:e.lat,lon:e.lon},activeLogoLink:n,inactiveLogoLink:l,onClick:t=>this.updateMapSelectedTheater(e,t),isActive:i},s)})));const n={},{geo:h}=l.Z.get().client;this.state.mapSelectedTheater?(n.lat=(0,u.RK)(this.state,"mapSelectedTheater.lat"),n.lng=(0,u.RK)(this.state,"mapSelectedTheater.lon")):h&&(n.lat=(0,u.RK)(h,"lat"),n.lng=(0,u.RK)(h,"lon")),Object.keys(n).length&&s.setCenter(n)}}selectNearby(e){const t="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";l.Z.emit("SET_USER_LOCATION",e,"nearby",t)}selectNearbyFromChain(e){this.expandTheater(e)}setDirections(e){const{mapSelectedTheater:t}=this.state,i=t.lat,s=t.lon;if(i&&s){const t=`https://www.google.com/maps/dir/?api=1&destination=${i},${s}&travelmode=${e.toLowerCase()}`;l.Z.emit("MAP_REQUEST_DIRECTIONS",e),window.open(t)}}updateMapSelectedTheater(e,t){this.setState({mapSelectedTheater:e}),this.mapMarkers.forEach((e=>{e.isActive&&e.makeInactive()})),t.makeActive(),this.updateMapMarkers()}async setGeo(){const e=await(0,_.vW)(),t="Group Bookings"===this.state.selectedTab?"groupbookings":"tickets";l.Z.emit("GEO_FROM_IP",e,t),this.setState({geoFromIP:e})}handleLimitInterstetial(e){this.state.socialInterstitial!==e&&this.setState({socialInterstitial:e})}applyQueryStringMovieFilter(){const e=(0,g.Z)(location.search);if(!e.m)return;const t=e.m.replace(/\s+/g,"").replace("%20","").split(",");l.Z.emit("SET_FILTERS_SELECTED_MOVIE_ID",t),l.Z.emit("SHOWTIMES_REFRESH"),history.replaceState&&history.replaceState(null,"",location.pathname)}async updateShowtimes(){await this.setGeo(),this.getPageData().useV2?l.Z.emit("SHOWTIMES_REFRESH"):l.Z.emit("FILTERS_REFRESH",{forceShowtimesRefresh:!0}),this.applyQueryStringMovieFilter()}stickAndScale(e){const{onesheetDisabled:t,isWidget:i}=this.props,{isDesktopSize:s}=this.props.store.client,o=(0,Ye.Y9)(this.props.pages);if(s){const i=(t?0:609*window.innerHeight/900)*e;this.$container.style.left=i+"px",this.$container.style.top="0px"}else{const t=64*e;this.$container.style.left="0px",this.$container.style.top=t+"px",this.$content.style.top=(o?0:16-16*e)+"px",this.$container.style.borderRadius=20-20*e+"px",this.$container.style.overflow="hidden"}}renderCurrentFilters(){const{validCountry:e}=this.state,t=(0,u.RK)(this.props,"store.appData.copy.accessibilityCopy",{}),i="rtl"===(0,u.RK)(this.props,"store.appData.styling.fontVariables.textDirection");let s=(0,u.RK)(this.props,"store.showtimes.loading")||!1,o=((0,u.RK)(this.props,"store.showtimes.filters")||{}).selected||{},r=this.filtersList.map((e=>{let r,n,l=o[e]||[];if(r=l.length?l.map((t=>this.filterValue(e,t))).join(", "):(0,u.RK)(this.props,["store","appData","copy","baseCopy","filters",e,"_all"]),r)return"date"===e&&(n=t.$DAY_FILTER_ARIA),"time"===e&&(n=t.$TIME_FILTER_ARIA),"format"===e&&(n=t.$FORMAT_FILTER_ARIA),(0,a.h)(c.Z,{class:(0,u.WM)(Xe.filter,Xe[e],i&&Xe.rtlFilter),trigger:this.showFilterSelection,disabled:s,ariaLabel:n.replace("<option>",r)},r)})),n=!e||this.state.socialInterstitial||this.noFiltersAvailable;return(0,a.h)("div",{class:(0,u.WM)(Xe.filters,n&&Xe.hidden),ref:e=>this.$filters=e,key:"currentFilters"},(0,a.h)(c.Z,{class:(0,u.WM)(Xe.filter,Xe.toggle,i&&Xe.rtlFilter),trigger:this.showFilterSelection,disabled:s,ariaLabel:t.$OPEN_FILTER_OPTIONS_ARIA},(0,a.h)(p.Z,{class:Xe.filterIcon,ariaLabel:t.$OPEN_FILTER_OPTIONS_ARIA})),r,(0,a.h)("div",{class:Xe.spacer}))}renderModeSelector(e){var t,i,s,o,r;const n=(0,u.RK)(this.props,"store.showtimes.loading"),l=(0,u.RK)(this.props,"store.a
1ppData.styling.fontVariables"),{mode:h,mapSelectedTheater:d,mapTheaterExpanded:p}=this.state;let m=(0,u.RK)(this.props,"store.appData.copy",{}),g=(0,a.h)(N.Z,null);if(!n){let e=this.setListMode;p&&d&&(e=void 0);const t=(0,u.RK)(this.props,"store.appData.styling.imageVariables.showtimesMapViewIcon","");g=[(0,a.h)(c.Z,{class:(0,u.WM)({s:Xe,listIcon:!0,active:"list"===h&&!1===n}),trigger:e,ariaLabel:m.accessibilityCopy.$LIST_VIEW_ARIA},(0,a.h)(I.Z,null)),(0,a.h)(c.Z,{class:(0,u.WM)({s:Xe,mapIcon:!0,active:"map"===h,custom:t}),trigger:this.setMapModeButton,ariaLabel:m.accessibilityCopy.$MAP_VIEW_ARIA},t?(0,a.h)("div",{class:Xe.customMapIcon,style:`-webkit-mask: url(${t}) no-repeat center;`}):(0,a.h)(E.Z,null))]}let _=m.baseCopy.$SELECT_A_SHOWTIME;return n?_=m.baseCopy.$LOADING_CINEMAS:((0,u.RK)(this.props,"store.showtimes.data")||[]).length?"map"===h&&(_=m.baseCopy.$SELECT_A_CINEMA):_="",(0,a.h)("div",{class:Xe.modeWrapper},(0,a.h)(it,{isShowtimes:!0,region:null===(t=this.props.store)||void 0===t||null===(i=t.client)||void 0===i||null===(s=i.geo)||void 0===s?void 0:s.countryCode,movies:null===(o=this.props.store)||void 0===o||null===(r=o.showtimes)||void 0===r?void 0:r.movies,intersectionObserver:this.state.observerTheaters,listOrMapMode:h,inListOrMapView:e}),(0,a.h)("div",{class:Xe.mode},(0,a.h)("div",{class:(0,u.WM)(Xe.cta,l.showtimesLoading)},_),(0,a.h)("div",{class:Xe.icons},g)))}renderElements(){const e=this.state;if(!e.validCountry)return;const t=(0,u.RK)(this.props,"store.showtimes.data",[]),i=this.getPageData(),s=(0,u.RK)(this.props,"store.showtimes.more",!1),o=(0,u.RK)(this.props,"store.showtimes.loadingMore")||!1,r=(0,u.RK)(this.props,"store.appData.copy"),n=(0,u.RK)(this.props,"store.client.geo",{}),l=(0,u.RK)(this.props,"store.appData.urls.roots.sharedImages",""),h=(0,u.RK)(this.props,"store.appData.styling.fontVariables"),d=(0,u.RK)(this.props,"store.showtimes.filters"),p=(0,u.RK)(this.props,"store.showtimes.theatersDates",{}),m=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings",{}),_=(0,g.Z)(),v=_.groupbookings?"Group Bookings":_.booknow?"Book Now":null==e?void 0:e.selectedTab,y=t.map(((t,s)=>(0,a.h)(tt,{class:Xe.theater,theater:t,showtimesFilters:d,mode:"list",clientGeo:n,geoFromIP:e.geoFromIP||{},onExpandClick:()=>this.expandTheater(t),eventInquiryTrigger:()=>this.expandTheaterEventInquiry(t),sharedImageRoot:l,logoShade:this.logoShade,copy:r,showtimesAppData:i,key:"theater-"+t.id+s,showFilterSelection:this.showFilterSelection,trackConversion:this.trackConversion,intersectionObserver:this.state.observerTheaters,loading:"loading"===p[t.id],divideScreeningsByAttributes:!0,groupBookings:"Group Bookings"===v?m:{},ticketType:"Group Bookings"===this.state.selectedTab?"groupbookings":"tickets"})));return s&&y.push((0,a.h)("div",{class:Xe.more,key:"more"},(0,a.h)(c.Z,{class:(0,u.WM)(Xe.moreButton,o&&Xe.loadingMore,h.showtimesShowMore),trigger:this.showMore,ariaLabel:r.accessibilityCopy.$MORE_CINEMAS_BTN_ARIA},o?(0,a.h)(N.Z,{class:Xe.loadingMoreIcon}):r.baseCopy.$SHOW_MORE_CINEMAS))),y}renderNearby(e,t,i,s,o,r){const{data:n,loading:l,error:h}=e,d=(0,u.RK)(this.props,"store.appData.styling.fontVariables"),p=(0,u.RK)(this.props,"store.client.geo",{}),m=p&&new Ue.Z({lat:p.lat,lon:p.lon}),g=this.getPageData().theaterDistanceUnit||"km";if(!this.state.validCountry||h||!l&&!n.length)return;let _;return _=l?Array(6).fill((0,a.h)("div",{class:Xe.nearbyTheaterDummy})):n.slice(0,r).map((e=>{const t=m.distanceFrom(e,g,1);return(0,a.h)(c.Z,{class:Xe.nearbyTheater,trigger:()=>o(e),ariaLabel:s.replace("<cinema>",e.name).replace("<city>",e.city),key:e.id},(0,a.h)("span",{class:Xe.nearbyName},e[i]),(0,a.h)("span",{class:Xe.nearbyDistance},`${t}${g}`))})),(0,a.h)("div",{class:Xe.nearby},(0,a.h)("div",{class:(0,u.WM)(Xe.cta,d.moreShowtimes)},t),(0,a.h)("div",{class:Xe.nearbyList},_))}renderNearbyFromChain(){let e=(0,u.RK)(this.props,"store.showtimes.nearby.chain")||{},t=(0,u.RK)(this.props,"store.appData.copy.baseCopy.$MORE_SHOWTIMES_CINEMAS")||"More cinemas from the same chain",i=(0,u.RK)(this.props,"store.appData.copy.accessibilityCopy.$CINEMAS_SAME_CHAIN_BTN_ARIA")||"";return this.renderNearby(e,t,"name",i,this.selectNearbyFromChain,10)}renderNearbyScreeningsLocations(){let e=(0,u.RK)(this.props,"store.showtimes.nearby.locations")||{}
1,t=(0,u.RK)(this.props,"store.appData.copy.baseCopy.$MORE_SHOWTIMES_LOCATIONS")||"More showtimes found in these locations",i=(0,u.RK)(this.props,"store.appData.copy.accessibilityCopy.$OTHER_LOCATIONS_BTN_ARIA")||"";return this.renderNearby(e,t,"city",i,this.selectNearby,void 0)}renderMap(){let e,t=this.state,i=this.renderVisualState(Xe.mapMessage,!0);const s=this.getPageData(),o=(0,u.RK)(this.props,"store.appData.copy"),r=(0,u.RK)(this.props,"store.client.geo",{}),n=(0,u.RK)(this.props,"store.showtimes.loading")||!1,l=this.isDesktop(),d=(0,u.RK)(this.props,"store.appData.urls.roots.sharedImages")||"",p=(0,u.RK)(this.props,"store.showtimes.filters"),m=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings",{}),_=(0,g.Z)(),v=_.groupbookings?"Group Bookings":_.booknow?"Book Now":null==t?void 0:t.selectedTab;t.mapSelectedTheater&&(i=(0,a.h)("div",{class:Xe.theaterContainer,key:"theaterContainer"},(0,a.h)(h.Z,{ref:e=>this.$theater=e,onDateChange:this.filtersChange,displayedDates:this.getTheaterScrollerDisplayedDates(),theater:t.mapSelectedTheater,showtimesFilters:p,filtersChange:this.filtersChange,mode:t.mapTheaterExpanded?"expanded":"collapsed",onExpandClick:()=>this.expandCurrentMapTheater(),eventInquiryTrigger:()=>this.expandTheaterEventInquiry(t.selectedTheater),animateExpansion:t.animateTheaterExpansion,clientGeo:r,geoFromIP:t.geoFromIP,isDesktopSize:l,sharedImageRoot:d,logoShade:this.logoShade,copy:o,showtimesAppData:s,showFilterSelection:this.showFilterSelection,trackConversion:this.trackConversion,loading:n,backAction:this.exitCinemaExpandedView,selectedTheater:t.selectedTheater,showtimesMode:t.mode,divideScreeningsByAttributes:!0,groupBookings:"Group Bookings"===v?m:{},ticketType:"Group Bookings"===this.state.selectedTab?"groupbookings":"tickets"})),e=(0,a.h)("div",{class:Xe.directions,key:"directions"},(0,a.h)(c.Z,{class:(0,u.WM)(Xe.directionsType,Xe.walking),trigger:()=>this.setDirections("WALKING"),ariaLabel:o.accessibilityCopy.$WALKING_BTN_ARIA},(0,a.h)(M.Z,{ariaLabel:o.accessibilityCopy.$WALKING_BTN_ARIA})),(0,a.h)(c.Z,{class:(0,u.WM)(Xe.directionsType,Xe.driving),trigger:()=>this.setDirections("DRIVING"),ariaLabel:o.accessibilityCopy.$CAR_BTN_ARIA},(0,a.h)(D.Z,{ariaLabel:o.accessibilityCopy.$CAR_BTN_ARIA})),(0,a.h)(c.Z,{class:(0,u.WM)(Xe.directionsType,Xe.publicTransports),trigger:()=>this.setDirections("TRANSIT"),ariaLabel:o.accessibilityCopy.$TRANSPORT_BTN_ARIA},(0,a.h)(R.Z,{ariaLabel:o.accessibilityCopy.$TRANSPORT_BTN_ARIA})))),n&&(e=null);let y=t.mapSelectedTheater&&l?this.triggerShowtimesBtn:this.trigger;const S=t.mapTheaterExpanded,b=(0,u.RK)(this.props,"store.appData.styling.variables.tertiaryColor"),f=!t.mapTheaterExpanded&&"list"!==t.mode,T=t.mapTheaterExpanded&&"list"!==t.mode&&!l,w=(0,Ye.Y9)(this.props.pages);return(0,a.h)("div",{class:Xe.mapView,style:{top:this.calculateMapPosition()+"px",bottom:t.mapBottom+"px"}},(0,a.h)("div",{style:{display:f?"flex":""},class:(0,u.WM)(Xe.theaterScroller,f&&Xe.stretchedTheaterScroller,w&&Xe.dualMenu),ref:e=>this.$theaterScroller=e},(0,a.h)(c.Z,{class:(0,u.WM)(Xe.map,S&&Xe.mapDisabled,f&&Xe.stretched,T&&Xe.mobileMapExpanded),trigger:y,key:"map",ariaLabel:o.accessibilityCopy.$MAP_ARIA},(0,a.h)("div",{class:Xe.mapElement,ref:e=>this.$mapElement=e,key:"mapElement"}),e,(0,a.h)("div",{class:(0,u.WM)(Xe.mapOverlay,S&&Xe.visible)})),i,(0,a.h)("div",{class:(0,u.WM)(Xe.suggestions,f&&Xe.hideSuggestions)},this.renderNearbyFromChain(t.mapSelectedTheater)),S&&!this.props.isWidget&&(0,a.h)(F.Z,{data:this.props.store.appData.footer,parent:"showtimes",scrollElem:this.$theaterScroller,fallBackColor:b,key:"footer",store:this.props.store})))}renderProviderInterstitial(){const{mode:e,mapTheaterExpanded:t}=this.state;if(!(0,u.RK)(this.props,"store.showtimes.providerInterstitialOpen",!1))return;const i=(0,u.RK)(this.props,"store.showtimes.selectedTheater",{}),s=(0,u.RK)(this.props,"store.showtimes.selectedScreening",{}),o=(0,u.RK)(this.props,"store.appData.urls.roots.sharedImages"),r=this.isDesktop(),n=(0,u.RK)(this.props,"store.appData.copy");let l=e;return"map"===l&&(l=t?"expanded":"collapsed"),(0,a.h)(O.Z,{selectedTheater:i,selectedScreening:s,sharedImageRoot:o,logoShade:this.logoShade,isDesktopSize:r,copy:n,mode:l,trackConversion:this.trackConversion,key:"provider-interstitial"})}renderVisualState(e,t){var i,s,o,r,n,h,d,c,p;const{data:u,error:m,loading:g,activeVideo:_={},videosLoading:v,videos:y=[]}=(null===(i=this.props.store)||void 0===i?void 0:i.showtimes)||{},S=(null===(s=this.props.store)||void 0===s||null===(o=s.appData)||void 0===o?void 0:o.copy)||{},b=null===(r=this.props.store)||void 0===r||null===(n=r.client)||void 0===n?void 0:n.deviceSize,{noShowtimes:f,preferNoShowtimesMessage:T}=this.getPageData(),{validCountry:w}=this.state,C=((null===(h=this.props)||void 0===h||null===(d=h.store)||void 0===d||null===(c=d.client)||void 0===c||null===(p=c.geo)||void 0===p?void 0:p.countryCode)||"").toLowerCase(),k=null==f?void 0:f.localisations;let I;k&&(I=Object.values(k).find((e=>{if(!e.regions)return!1;return e.regions.toLowerCase().split(",").map((e=>e.trim())).filter((e=>e)).includes(C)})));let E=T&&I;if(!w&&!g&&!E){var M,D;const i=this.props.store.client.geo.city;let s=this.props.store.appData.meta.region,o=s.countryName,r=(s.slug||"").toUpperCase();if((null===(M=this.boundingRegions)||void 0===M?void 0:M.length)>1||(null===(D=this.boundingRegions)||void 0===D?void 0:D[0])!==r){var R;let e=null===(R=this.boundingRegions)||void 0===R?void 0:R.slice().sort(((e,t)=>e===r?-1:t===r?1:0));o=null==e?void 0:e.join(", ")}let n=S.baseCopy.$ERROR_SHOWTIMES_LOCATION_CTA||"Change your search location for new results",l=S.baseCopy.$ERROR_SHOWTIMES_LOCATION||"It looks like youâre in %USER_CITY%, and this page is for users in %APP_REGION%";return(0,a.h)(A.Z,{class:e,deviceSize:b,isMap:t,icon:"calendar-empty",cta:n,message:l.replace("%USER_CITY%",i).replace("%APP_REGION%",o),key:"message-bounding-region"})}if(this.state.socialInterstitial){const i=this.props.store.client.geo.city;let s=S.baseCopy.$SOCIAL_INTERSTITIAL_SHOWTIMES_INSTRUCTION||"It looks like you're located in the %USER_CITY%<br>Click the button below to display showtimes around you";return s=s.replace("%USER_CITY%",i),(0,a.h)(A.Z,{class:e,deviceSize:b,isMap:t,message:s,buttonCopy:S.baseCopy.$SOCIAL_INTERSTITIAL_SHOWTIMES_CTA||"Display Showtimes",buttonTrigger:()=>{l.Z.emit("UPDATE_API_KEY"),l.Z.emit("LIMIT_EXCEEDED",!1),l.Z.emit("SHOWTIMES_REFRESH")},key:"message-error",icon:"location"})}if(m)return(0,a.h)(A.Z,{class:e,deviceSize:b,isMap:t,message:S.baseCopy.$ERROR_SHOWTIMES,cta:S.baseCopy.$ERROR_SHOWTIMES_CTA,buttonCopy:S.baseCopy.$REFRESH||"Refresh",buttonTrigger:()=>l.Z.emit("SHOWTIMES_REFRESH"),key:"message-error",icon:"calendar-empty"});if(!g&&(u&&!u.length||E)){var O,B,N,F,$,L;let i=S.baseCopy.$NO_SHOWTIMES,s=S.baseCopy.$NO_SHOWTIMES_CTA,o={};return null!==(O=I)&&void 0!==O&&O.title&&(i=S.baseCopy[I.title]||I.title),null!==(B=I)&&void 0!==B&&B.text&&(s=S.baseCopy[I.text]||I.text),void 0!==(null===(N=I)||void 0===N||null===(F=N.buttons)||void 0===F?void 0:F.filtersButton)&&(o.filtersButton=I.buttons.filtersButton),null!==($=I)&&void 0!==$&&null!==(L=$.buttons)&&void 0!==L&&L.extraButton&&(o.extraButton=I.buttons.extraButton),(0,a.h)(A.Z,{class:e,deviceSize:b,isMap:t,message:i,cta:s,copy:S,buttonCopy:S.baseCopy.$FILTERS||"Filters",buttonTrigger:this.show
1FilterSelection,noShowtimes:!t&&f,regionButtonsOverride:o,noFiltersAvailable:this.noFiltersAvailable,activeVideo:_,videosLoading:v,showtimesVideos:y,icon:"coming-soon",key:"message-empty"})}}getTTPosition(){let e=this.getPageData().tt||{};return e.titleTreatmentPosition&&(e.titleTreatmentPosition.desktop||e.titleTreatmentPosition.tablet||e.titleTreatmentPosition.mobile)||(e=(0,u.RK)(this.props,"store.appData.pages.boltHome.data.tt",{})),(0,Ye.mt)(e.titleTreatmentPosition)}safariMobileBlur(){(0,u.RK)(this.props.store,"client.isIOS")&&l.Z.emit("SAFARI_MOBILE_LOCATION_SEARCH_BLUR")}safariMobileFocus(){(0,u.RK)(this.props.store,"client.isIOS")&&l.Z.emit("SAFARI_MOBILE_LOCATION_SEARCH_FOCUS")}renderLocationSearch(e){var t,i;const o=this.props,r=o.store.client||{},n=o.store.showtimes||{},h=this.getPageData(),d=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings",{});let c={};e&&(c={mobileOverlayActive:!0,onBlur:()=>l.Z.emit("SAFARI_MOBILE_LOCATION_SEARCH_BLUR")});return(0,a.h)(S,(0,s.Z)({class:(0,u.WM)(Xe.location,d&&!r.isDesktopSize&&Xe.mobileGroupBookingsLayout),ref:t=>this[e?"$overlayLocationSearch":"$locationSearch"]=t,disabled:n.loading,geo:r.geo,showtimesAppData:h,nearbyLocations:null===(t=n.nearby)||void 0===t||null===(i=t.locations)||void 0===i?void 0:i.data,isMobile:!r.isDesktopSize,onFocus:()=>{l.Z.emit("UPDATE_API_KEY"),r.isDesktopSize||(e?this.props.isWidget||l.Z.emit("SAFARI_MOBILE_LOCATION_SEARCH_FOCUS"):this.enableMobileOverlay())},onSelect:()=>{l.Z.emit("LIMIT_EXCEEDED",!1),this.disableMobileOverlay()},onSearch:this.disableMobileOverlay,showFilterSelection:this.showFilterSelection,selectedFilters:n.filters.selected,movieId:null==n?void 0:n.movieFilterId},c,{key:"location-search",ticketType:"Group Bookings"===this.state.selectedTab?"groupbookings":"tickets"}))}renderSelectTitleButton(){const e=(0,u.RK)(this.props,"store.appData.styling.fontVariables"),t=(0,u.RK)(this.props,"store.appData.copy.baseCopy.$MULTIMOVIE_SELECT_TITLE");return(0,a.h)("div",{class:Xe.selectTitleBtnContainer},(0,a.h)(c.Z,{class:(0,u.WM)(Xe.selectTitleBtn,null==e?void 0:e.headerCta),trigger:this.showFilterSelection,type:"floating",ariaLabel:t,key:"selectTitleButton"},t))}renderAttribution(){var e,t,i,s,o,r,n,l;let h=null===(e=this.props.store)||void 0===e?void 0:e.appData,d=this.getPageData(),c=(null==d||null===(t=d.providers)||void 0===t||null===(i=t.deeplink)||void 0===i||null===(s=i.split(","))||void 0===s?void 0:s.map((e=>e.trim())))||[];const p=((null===(o=this.props)||void 0===o||null===(r=o.store)||void 0===r||null===(n=r.client)||void 0===n||null===(l=n.geo)||void 0===l?void 0:l.countryCode)||"").toLowerCase();if(c.includes("cinergy")&&"ch"===p){var m,g,_,v;let e=`${null==h||null===(m=h.urls)||void 0===m||null===(g=m.roots)||void 0===g?void 0:g.sharedImages}/data_providers/${this.logoShade}/cineman_${this.logoShade}.png`,t=null==h||null===(_=h.copy)||void 0===_||null===(v=_.baseCopy)||void 0===v?void 0:v.$SHOWTIMES_BY_CINEMAN;return(0,a.h)("div",{class:(0,u.WM)(Xe.attribution,Xe.cineman)},(0,a.h)("span",{class:Xe.showtimesBy},t),(0,a.h)(te.Z,{href:"https://www.cineman.ch/",target:"_blank",key:"cinergy"},(0,a.h)("img",{class:Xe.logo,src:e,alt:"Cineman Logo",height:"24"})))}}render(e){var t,i,s,o,r,n;const h=(0,je.Ty)();let d=(0,u.RK)(e,"store.showtimes.filters.available")||{};const c=(0,u.RK)(this.props,"store.showtimes.allMovies",{}),p=(null===(t=(this.getPageData().movieId||"").trim().split(",").filter((e=>e)).map((e=>e.trim())))||void 0===t?void 0:t.length)>1;this.noFiltersAvailable=!Object.values(d).some((e=>Array.isArray(e)&&e.length));let m=this.state;const{store:_,isWidget:v,contentDisabled:y}=e;let{showtimes:S,client:f,appData:T}=_;const{copy:w}=T,C=(0,g.Z)(),I=C.groupbookings?"Group Bookings":C.booknow?"Book Now":null==m?void 0:m.selectedTab;let E=this.getPageData();const M=f.isDesktopSize?this.$listView:this.$scroller,D=(0,u.RK)(e,"store.cookies")||{},R=!h&&(0,u.RK)(T,"options.sonyFeatures.sonyHeader",!1),O="rtl"===(0,u.RK)(this.props,"store.appData.styling.fontVariables.textDirection"),A=(0,u.RK)(_,"evidon.bannerOpen"),B=A||(0,u.RK)(D,"pushDown",!1)&&(0,u.RK)(D,"cookieBannerOpen",!1);let N={};if(B||A){let e=A?(0,u.RK)(_,"evidon.height"):(0,u.RK)(D,"height");N.top=e+"px",N.height="calc(var(--windowHeight) - "+e+"px)"}
1const x=(0,u.RK)(this.props,"store.appData.pages.boltShowtimes.data.groupBookings",!1);let H=S.show,P=S.loading,K=void 0===S.loading||S.loading;const W=(0,u.RK)(e,"store.appData.styling.variables.tertiaryColor"),q=(0,Ye.Y9)(this.props.pages);let V;m.mobileOverlayActive&&(V=(0,a.h)("div",{class:Xe.mobileSearchOverlay,key:"mobileOverlay"},this.renderLocationSearch(!0)));let G=[(0,a.h)("div",{style:{top:this.calculateStickedElementsHeight()+"px"},ref:e=>this.$modeSelector=e,class:(0,u.WM)(Xe.mapModeContainer,"map"===m.mode&&!m.mapTheaterExpanded&&Xe.mapModeVisible),key:"map-mode"},this.renderModeSelector("map")),this.renderMap()];const U=f.isDesktopSize&&this.quickFiltersData.visibleDesktop||!f.isDesktopSize&&this.quickFiltersData.visibleMobile,z=f.isDesktopSize&&this.quickFiltersData.wrappedDesktop||!f.isDesktopSize&&this.quickFiltersData.wrappedMobile,Y="all"===(null===(i=this.quickFiltersData)||void 0===i||null===(s=i.displayOptions)||void 0===s||null===(o=s.movie)||void 0===o?void 0:o.trim().toLowerCase()),j=(0,a.h)(ee,{appData:T,isRTL:O,isSticky:this.quickFiltersData.isSticky,filters:S.filters,title:this.quickFiltersData.title,possibleOptions:this.quickFiltersData.displayOptions,allMovies:c,wrappedView:z,enablePeeking:this.quickFiltersData.enablePeekingAnimation});return(0,a.h)("div",{class:(0,u.WM)(Xe.wrapper,v&&Xe.widget),style:N,key:"wrapper"},V||(0,a.h)($.Z,{type:"showtimes",tt:E.tt,bg:E.bg,buttons:E.buttons,visible:v||e.store.showtimes.show&&m.ttVisible,hide:!m.ttVisible,copy:w,appData:T,cookieMode:B,class:(0,u.WM)(Xe.movieDetails,!f.isDesktopSize&&this.state.dateScrollerSticked&&Xe.blur),sonyHeaderEnabled:R,key:"movieDetails",dualViewEnabled:q,isWidget:v}),"eventInquiry"!==this.state.mode?(0,a.h)("div",{class:(0,u.WM)({s:Xe,container:!0,animate:S.animate,sonyHeader:R,showtimesOnlyIframed:h,displayed:H,loading:P,filterSelectionActive:m.filterSelection,animateTheaterExpansion:m.animateTheaterExpansion},Xe["mode-"+m.mode]),ref:e=>this.$container=e,key:"container",style:{pointerEvents:y?"none":"all"}},x&&f.isDesktopSize&&(0,a.h)("div",{class:Xe.tabsContainer},(0,a.h)("div",{class:(0,u.WM)(Xe.tab,"Book Now"===I&&Xe.selected),onClick:()=>{history.replaceState&&history.replaceState(null,"",location.pathname+this.replaceGroupBookingsQueryString(location.search)+location.hash),l.Z.emit("UPDATE_SHOWTIMES_ACTIVE_TAB","Book Now",!0),this.setState({selectedTab:"Book Now"})}},(0,a.h)("span",null,w.baseCopy.$BOOK_NOW_TAB)),(0,a.h)("div",{class:(0,u.WM)(Xe.tab,"Group Bookings"===I&&Xe.selected),onClick:()=>{history.replaceState&&history.replaceState(null,"",location.pathname+this.replaceGroupBookingsQueryString(location.search)+location.hash),l.Z.emit("UPDATE_SHOWTIMES_ACTIVE_TAB","Group Bookings",!0),this.setState({selectedTab:"Group Bookings"})}},(0,a.h)("span",null,w.baseCopy.$GROUP_BOOKINGS_TAB))),(0,a.h)("div",{class:(0,u.WM)(Xe.filterSelectionContainer,!this.state.sameCountry&&Xe.disableFilters),onClick:this.handleFilterOverlayClick,key:"filters"},(0,a.h)(k,{appData:T,client:f,filters:S.filters,onSubmit:this.filtersChange,allShowtimesMovies:c,ref:e=>this.$filterSelection=e,open:m.filterSelection,onClose:this.hideFilterSelection})),this.renderProviderInterstitial(),(0,a.h)("div",{id:"showtimesScroller",class:(0,u.WM)(Xe.scroller,"map"!==m.mode&&Xe.list,this.state.dateScrollerSticked&&Xe.sticked,"map"!==m.mode&&x&&f.isDesktopSize&&Xe.accomodateBookingTabs),style:{scrollPadding:`${this.calculateStickedElementsHeight()}px 0px 0px 0px`},ref:e=>this.$scroller=e,"data-section":"scroller",onClick:this.scrollerClick,onScroll:this.handleScroll,key:"scroller"},"map"!==m.mode&&!h&&(0,a.h)(L.Z,{fallbackClickHandler:v?this.props.exitWidget:this.hideShowtimes,isWidget:v,dualViewEnabled:q}),(0,a.h)("div",{class:Xe.content,ref:e=>this.$content=e,key:"content"},x&&!f.isDesktopSize&&(0,a.h)("div",{class:(0,u.WM)(Xe.tabsContainer,Xe.mobileContainer)},(0,a.h)("div",{class:(0,u.WM)(Xe.tab,"Book Now"===m.selectedTab&&Xe.selected),onClick:()=>{l.Z.emit("UPDATE_SHOWTIMES_ACTIVE_TAB","Book Now",!0),this.setState({selectedTab:"Book Now"})}}
1,(0,a.h)("span",null,w.baseCopy.$BOOK_NOW_TAB)),(0,a.h)("div",{class:(0,u.WM)(Xe.tab,"Group Bookings"===m.selectedTab&&Xe.selected),onClick:()=>{l.Z.emit("UPDATE_SHOWTIMES_ACTIVE_TAB","Group Bookings",!0),this.setState({selectedTab:"Group Bookings"})}},(0,a.h)("span",null,w.baseCopy.$GROUP_BOOKINGS_TAB))),q&&(0,a.h)(Z.Z,{key:"dualMenu",ref:e=>this.onStickedElementRef(e,"dualMenu",!0),isWidget:v&&"showtimes",widgetData:e.widgetData}),(0,a.h)("div",{id:"scrollSearch",class:(0,u.WM)(Xe.scrollSearch,q&&Xe.dualMenu),ref:e=>this.onStickedElementRef(e,"location",!0),onTouchStart:this.onCHTouchStart,onTouchMove:this.onCHTouchMove,key:"header"},this.renderLocationSearch()),(0,a.h)("div",{id:"scrollDates",class:(0,u.WM)(Xe.scrollDates,this.state.dateScrollerSticked&&Xe.sticked),ref:e=>this.onStickedElementRef(e,"filtersDate")},(0,a.h)(b.Z,{ref:e=>this.$filterDate=e,appData:T,showtimesAppData:E,client:f,isSticked:this.state.dateScrollerSticked,displayedDates:this.getDisplayedDates(),scrollElem:M,onChange:this.filtersChange,selectedTheater:this.state.selectedTheater,showtimesMode:this.state.mode,mapMode:m.mapTheaterExpanded?"expanded":"collapsed"}),p&&!Y&&this.renderSelectTitleButton(),U&&this.quickFiltersData.isSticky&&j),U&&!this.quickFiltersData.isSticky&&j,!U&&!p&&(0,a.h)("div",{class:(0,u.WM)(Xe.scrollPadding),ref:e=>this.onStickedElementRef(e,"scrollPadding",!0)}),(0,a.h)("div",{id:"showtimesList",class:Xe.listView,ref:e=>this.$listView=e,key:"list",onScroll:e=>this.props.handleWidgetScroll&&this.props.handleWidgetScroll(e)},(0,a.h)("div",null,(0,a.h)("div",{class:Xe.listModeContainer,key:"selector"},this.renderModeSelector("list")),this.renderVisualState(),K?this.renderDummyElements(8):this.renderElements(),(0,a.h)("div",{class:Xe.suggestions,key:"suggestions"},this.renderNearbyScreeningsLocations())),this.renderAttribution(),(0,a.h)("div",{class:Xe.filler,key:"filler"}
1),!v&&(0,a.h)(F.Z,{data:e.store.appData.footer,parent:"showtimes",scrollElem:M,fallBackColor:W,key:"footer",store:e.store}))),f.isDesktopSize&&G,this.state.groupBookingsSubmitted&&this.renderFormSubmitted()),!f.isDesktopSize&&G):(0,a.h)("div",{class:(0,u.WM)({s:Xe,container:!0,animate:S.animate,sonyHeader:R,showtimesOnlyIframed:h,displayed:H,loading:P,filterSelectionActive:m.filterSelection,animateTheaterExpansion:m.animateTheaterExpansion},Xe["mode-"+m.mode]),ref:e=>this.$container=e,key:"eventInquiry",style:{pointerEvents:y?"none":"all",top:f.isDesktopSize?"":"85px"}},(0,a.h)(Ge,{key:null===(r=this.state.selectedTheater)||void 0===r?void 0:r.id,client:f,chainId:null===(n=this.state.selectedTheater)||void 0===n?void 0:n.chainId,formData:this.state.formData,logoShade:this.logoShade,store:_,selectedTheater:this.state.selectedTheater,onChange:this.updateGroupBookingsFormData,goBack:this.exitEventInquiry})))}}const ot="undefined"!=typeof window?window.IntersectionObserver:class{};class at{constructor(e,t){t.repeat&&(this.repeatMax=t.repeat.max,this.repeatEvery=t.repeat.every,delete t.repeat),this.fn=e,this.onResult=this.onResult.bind(this),this.elementToProps=[],this.observer=new ot(this.onResult,t)}onResult(e,t){this.enchanceOnResult(e,t)}enchanceOnResult(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;window.clearTimeout(this.repeatTimeout),this.fn(e,this),i<this.repeatMax&&(this.repeatTimeout=window.setTimeout((()=>this.enchanceOnResult(e,t,i+1)),this.repeatEvery))}destroy(){this.elementToProps.forEach((e=>this.unobserve(e[0])))}observe(e,t){return this.elementToProps.push([e,t]),this.observer.observe(e)}unobserve(e){return this.elementToProps=this.elementToProps.filter((t=>{let[i]=t;return i!==e})),this.observer.unobserve(e)}getProps(e){return(this.elementToProps.find((t=>{let[i]=t;return i===e}))||[])[1]||{}}getClosestToY(e){const t=this.elementToProps.map((e=>{let t=e[0].getBoundingClientRect();return t.top||top.bottom||(t=Object.assign({},t,{top:1/0})),[...e,t]}));return t.find(((t,i)=>{let[,,s]=t;return s.top<=e}))?t.reduce(((t,i,s)=>{const[,,o]=i,a=o.top+o.height>=e,r=Math.abs(o.top-e);return a&&r<t.distanceToTop&&(t.distanceToTop=r,t.result=i),t}),{distanceToTop:1/0,result:null}).result||[]:[null,null]}getLastVisible(){const e=this.elementToProps.map((e=>{let t=e[0].getBoundingClientRect();return t.top||top.bottom||(t=Object.assign({},t,{top:1/0})),[...e,t]}));return e.find(((e,t)=>{let[,,i]=e;return i.top<1/0}))?e.reduce(((e,t,i)=>{const[,,s]=t,o=s.top;return o<1/0&&o>e.lastTop&&(e.lastTop=o,e.result=t),e}),{lastTop:0,result:null}).result||[]:[null,null]}}function rt(e){class t extends a.wA{constructor(e){super(e),this.$el={}}componentDidMount(){this.props.intersectionObserver&&(this.intersectionObserver=this.props.intersectionObserver,this.observe())}observe(){this.intersectionObserver&&this.$el&&this.$el.base instanceof window.Element&&(this.prevEl=this.$el.base,this.intersectionObserver.observe(this.$el.base,this.props))}unobserve(){this.intersectionObserver&&this.prevEl&&this.intersectionObserver.unobserve(this.prevEl)}componentDidUpdate(e){this.props.intersectionObserver!==this.intersectionObserver?(this.unobserve(),this.intersectionObserver=this.props.intersectionObserver,this.observe()):this.$el.base!==this.prevEl&&(this.unobserve(),this.observe())}componentWillUnmount(){this.unobserve(),this.intersectionObserver=null,l.Z.get().set({groupBookingsShowtimes:!1})}render(){return(0,a.h)(e,(0,s.Z)({ref:e=>this.$el=e},this.props,{intersectionObserver:null}))}}return t}}}]); 2//# sourceMappingURL=715.bolt.js.map?v=f0edd94d02d4e3bbc464
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.