(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1819c270","preloadChunk-CountrySelectBottom"],{"16b3":function(t,e,s){},"2ead6":function(t,e,s){"use strict";var i=function(){var t=this,e=t._self._c;return t.showToggles?e("div",{ref:"togglesInner",staticClass:"toggles"},t._l(t.toggles,(function(s){return e("div",{key:s.id,staticClass:"toggles__item",class:{"toggles__item--active":t.getRegistrationForm===s.code},attrs:{"data-test":"dt-"+s.code},on:{click:function(e){return t.clickToggle(e,s)}}},[e("div",{staticClass:"toggles__icon-wr flex-center"},[e("icon",{staticClass:"toggles__icon",class:"toggles__icon--"+s.icon,attrs:{"icon-name":s.icon}})],1),e("span",{staticClass:"toggles__title"},[t._v(" "+t._s(t.$t(s.name))+" ")])])})),0):t._e()},o=[],n=s("1da1"),a=s("5530"),l=(s("4de4"),s("ca47")),r=s("5d2a"),c=s("7f14"),u={name:"toggles",components:{Icon:r["a"]},mixins:[c["a"]],computed:Object(a["a"])(Object(a["a"])(Object(a["a"])({},Object(l["e"])("profileSettings",["isCanary"])),Object(l["e"])("registrationForm",["getRegistrationForm","getActiveTab"])),{},{allToggles(){return[{id:1,name:"registration.by_email",code:"email",icon:"mail",visible:!0},{id:2,name:"registration.by_phone",code:"phone",icon:"phone",visible:this.isCanary}]},toggles(){return this.allToggles.filter(({visible:t})=>t)},showToggles(){return this.toggles.length>1}}),watch:{getActiveTab(){var t=this;return Object(n["a"])((function*(){yield t.$nextTick(),t.scrollToActiveSelector(".toggles__item--active",t.$refs.togglesInner)}))()}},mounted(){var t=this;return Object(n["a"])((function*(){yield t.$nextTick(),t.scrollToActiveSelector(".toggles__item--active",t.$refs.togglesInner)}))()},methods:Object(a["a"])(Object(a["a"])({},Object(l["d"])("registrationForm",["toggleForm"])),{},{clickToggle(t,e){this.toggleForm(e.code),this.$nextTick().then(()=>{this.scrollToActiveSelector(".toggles__item--active",this.$refs.togglesInner,!0)}),this.$emit("toggle",e.code)}})},d=u,h=(s("49e6"),s("2877")),p=Object(h["a"])(d,i,o,!1,null,"26234f6c",null);e["a"]=p.exports},"49e6":function(t,e,s){"use strict";s("cf8a")},"4ed7":function(t,e,s){},5185:function(t,e,s){"use strict";var i=function(){var t=this,e=t._self._c;return e("validation-provider",{ref:"provider",staticClass:"validation-select",attrs:{name:t.name,rules:t.validationRules,vid:t.vid,tag:t.providerTag},scopedSlots:t._u([{key:"default",fn:function({errors:s}){return[e("custom-select",t._g(t._b({class:t.classSelect,attrs:{error:s[0],value:t.value,label:t.selectLabel,"is-with-scroll-bar":t.isWithScrollBar,"left-icon":t.leftIcon},on:{"close-options":t.closeHandler}},"custom-select",t.$attrs,!1),t.$listeners)),s[0]?e("error-validation",{staticClass:"validation-select__error",attrs:{error:s[0]}}):t._e()]}}])})},o=[],n=s("7bb1"),a=s("2b85"),l=s("91bd"),r={name:"validation-select",components:{ValidationProvider:n["b"],CustomSelect:a["a"],ErrorValidation:l["a"]},inheritAttrs:!1,props:{validationRules:{type:[String,Object],default:""},vid:{type:String,default:""},providerTag:{type:String,default:"div"},classSelect:{type:[String,Object,Array],default:""},name:{type:String,required:!0},value:{type:[Object,String],default:""},label:{type:String,default:""},isWithScrollBar:{type:Boolean,default:!1},leftIcon:{type:String,default:""}},computed:{selectLabel(){return this.value&&this.label}},mounted(){this.$watch(()=>{var t;return null===(t=this.$refs.provider)||void 0===t?void 0:t.errors},t=>{this.$emit("error",{message:t[0]})})},methods:{closeHandler(){this.$refs.provider.validate(this.value)}}},c=r,u=(s("55ee"),s("2877")),d=Object(u["a"])(c,i,o,!1,null,null,null);e["a"]=d.exports},"55ee":function(t,e,s){"use strict";s("4ed7")},"5f6b":function(t,e,s){"use strict";s("caad"),s("14d9"),s("ac1f"),s("2532"),s("5319");var i=s("63ea"),o=s.n(i),n=s("4281");e["a"]={data(){return{lastSendAvailableAnalytics:{},lastSendErrorAnalytics:{},lastSendActivationAnalytics:{},gtmFieldsErrors:{},gtmTouchedFields:[]}},destroyed(){this.lastSendAvailableAnalytics={},this.lastSendErrorAnalytics={},this.lastSendActivationAnalytics={},this.gtmFieldsErrors={}},methods:{sendGtmAvailableAnalytics(t,e=null,s=null){o()(t,this.lastSendAvailableAnalytics)||(this.lastSendAvailableAnalytics=Object.assign({},t),e&&(t.step=e),s&&(t.place=s),this.$analytics.logEvent(Object.assign(Object.assign({},t),{event:n["b"].available})))},sendGtmErrorAnalytics(t,e=null,s=null){o()(t,this.lastSendErrorAnalytics)||(this.lastSendErrorAnalytics=Object.assign({},t),e&&(t.step=e),s&&(t.place=s),this.$analytics.logEvent(Object.assign(Object.assign({},t),{event:n["b"].fieldError})))},sendGtmFieldActivationAnalytics(t,e={step:null,place:null,position:null,once:!0}){o()(t,this.lastSendActivationAnalytics)&&e.once||(this.lastSendActivationAnalytics=Object.assign({},t),e.step&&(t.step=e.step),e.place&&(t.place=e.place),e.position&&(t.position=e.position),this.$analytics.logEvent(Object.assign(Object.assign({},t),{event:n["b"].fieldActivation})))},sendGtmFormSuccessAnalytics(t,e=null,s=null){e&&(t.step=e),s&&(t.place=s),this.$analytics.logEvent(Object.assign(Object.assign({},t),{event:n["b"].formSuccess}))},sendErrorFieldsAnalytics(t,e){var s;const i=null!==(s=null===e||void 0===e?void 0:e.name)&&void 0!==s?s:"";if(!t)return void delete this.gtmFieldsErrors[i];const o=this.gtmFieldsErrors[i];o&&o===t||(this.gtmFieldsErrors[i]=t,this.$analytics.logEvent(Object.assign(Object.assign({},e),{reason:t.replace(/"/g,"'"),event:n["b"].fieldError})))},sendFocusFieldAnalytics(t,e={once:!0}){this.gtmTouchedFields.includes(t.name)&&e.once||(this.gtmTouchedFields.push(t.name),this.sendGtmFieldActivationAnalytics(t,{once:e.once}))},sendFieldActivationAnalytics(t,e,s,i){t&&Object.keys(t).length&&this.sendGtmFieldActivationAnalytics(t,{step:e,place:s,position:i})}}}},"606ce":function(t,e,s){"use strict";s.r(e);s("498a2");var i=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.clickOutside,expression:"clickOutside"}],ref:"countrySelect",staticClass:"country-select",class:{"country-select--opened":t.showOptions,"country-select--selected":!!t.value,"country-select--has-error":!!t.error,"country-select--disabled":!!t.deniedToggleMsg}},[e("div",{staticClass:"country-select__flag"},[e("img",{key:t.selectedValue,staticClass:"country-select__flag-icon",attrs:{src:t.imgSelectedValue,alt:"","aria-hidden":!0},on:{click:function(e){return e.target!==e.currentTarget?null:(e.stopPropagation(),t.toggleSelect.apply(null,arguments))}}})]),e("div",{staticClass:"country-select__selected",class:{"select__selected--error":!!t.error,"country-select__selected--no-results":!t.isOptionsScrollVisible},attrs:{disabled:t.disabled},on:{click:function(e){return e.target!==e.currentTarget?null:(e.stopPropagation(),t.toggleSelect.apply(null,arguments))}}},[!t.showOptions||t.isInBottomSheet?e("span",{staticClass:"country-select__name",attrs:{"data-test":t.dataTest||t.dataTestInput},domProps:{innerHTML:t._s(t.selectedValue||t.placeholder||t.$t("choose"))},on:{click:function(e){return e.target!==e.currentTarget?null:(e.stopPropagation(),t.toggleSelect.apply(null,arguments))}}}):e("input-field",{ref:"searchInput",staticClass:"country-select__search-input",attrs:{id:"search","country-input":"","handle-input-event":"",name:"search",type:"text",placeholder:t.$t("choose_country"),value:t.countrySearch,"data-test-input":t.dataTestSearch},on:{blur:function(e){t.countrySearch=t.countrySearch.trim()},input:t.onInput,paste:t.onPaste}}),e("span",{staticClass:"country-select__arrow",class:t.countrySelectArrowClass,on:{click:function(e){return e.stopPropagation(),t.toggleSelect.apply(null,arguments)}}},[e("icon",{staticClass:"country-select__arrow-icon",attrs:{"icon-name":"chevrone-down"}})],1)],1),e(t.isTag,{ref:"countrySelectBottomSheet",tag:"component",attrs:{"mount-in-portal":"","has-scroll":!1,"max-height":"calc(100% - 60px)","is-full-screen":"","class-name":t.getComponentClassName,"close-on-outside-click":!0},on:{closed:t.bottomSheetCloseHandler}},[t.isInBottomSheet?e("div",{staticClass:"country-select__header"},[e("div",{staticClass:"country-select__label"},[t._v(" "+t._s(t.$t("choose_country"))+" ")]),e("div",{staticClass:"country-select__search-input-wrap"},[e("div",{staticClass:"country-select__search-input-icon-wr flex-center"},[e("icon",{staticClass:"country-select__search-input-icon",attrs:{"icon-name":"search"}})],1),e("input-field",{key:t.selectedValue,ref:"searchInputBottomSheet",staticClass:"country-select__search-input",attrs:{id:"searchBottomSheet","country-input":"","handle-input-event":"",name:"search",type:"text",placeholder:t.placeholder,value:t.countrySearch,"data-test-input":t.dataTestSearch},on:{blur:function(e){t.countrySearch=t.countrySearch.trim()},input:t.onInput,paste:t.onPaste}})],1)]):t._e(),e("transition-expand",{on:{enter:t.enter}},[e("div",{staticClass:"country-select__options-scroll-wr"},[t.isOptionsScrollVisible?e("ul",{ref:"optionsScroll",staticClass:"country-select__options-scroll"},t._l(t.countryList,(function(s){return e("li",{key:s.id,staticClass:"country-select__option",class:t.isActiveOption(s),attrs:{name:s.name.toLowerCase()},on:{click:function(e){return t.selectOption(s,e)}}},[e("img",{staticClass:"country-select__options-image",attrs:{src:s.img,alt:s.name}}),s.name?e("div",{staticClass:"country-select__option-label pointer-event-none",attrs:{"data-test":"country_"+(s.code||s.id)},domProps:{innerHTML:t._s(s.name)}}):t._e()])})),0):t._e()])])],1),t.error?e("div",{staticClass:"input-field__error-wr"},[e("error-validation",{attrs:{error:t.error}})],1):t._e()],1)},o=[],n=s("3835"),a=s("1da1"),l=s("5530"),r=(s("4de4"),s("caad"),s("4e82"),s("2532"),s("2ca0"),s("ca47")),c=s("ef24"),u=s("0d66"),d=s("91bd"),h=s("b686"),p=s("5d2a"),g=s("c235"),v=s("c7b5");const f=0,m="country-select";var y={name:"country-select-bottom",components:{BottomSheet:c["default"],TransitionExpand:u["a"],ErrorValidation:d["a"],InputField:h["a"],Icon:p["a"]},mixins:[g["a"],v["a"]],inheritAttrs:!1,props:{options:{type:Array,default:()=>[]},value:{type:[Object,String],default:""},error:{type:[String,Boolean],default:""},placeholder:{type:String,default:""},paymentArea:Boolean,dataTest:{type:String,default:""},dataTestInput:{type:String,default:""},disabled:Boolean,deniedToggleMsg:{type:String,default:""},filteredCountries:{type:Array,default:()=>[]},useValueFromProp:{type:Boolean,default:!1},notScrollToOption:{type:Boolean,default:!1},dataTestSearch:{type:String,default:""},isBottomSheetOnTablet:{type:Boolean,default:!1}},data(){return{countrySearch:"",showOptions:!1,disabledFetchingCountry:!0,selectedValue:"",isFocus:!1}},computed:Object(l["a"])(Object(l["a"])(Object(l["a"])({},Object(r["e"])("modal",{hasOpenedModals:"hasOpened"})),Object(r["e"])("breakpoints",["isMobile","isMobileOrTablet"])),{},{isInBottomSheet(){return this.isBottomSheetOnTablet?this.isMobileOrTablet:this.isMobile},isTag(){return this.isInBottomSheet?"bottom-sheet":"div"},getComponentClassName(){return this.isInBottomSheet?`${m} ${m}--opened`:m},isOptionsScrollVisible(){return this.showOptions&&this.countryList.length},countrySelectArrowClass(){return this.showOptions?"country-select__arrow-up":"country-select__arrow-down"},imgSelectedValue(){var t;return null===(t=this.options.find(({name:t})=>"object"===typeof this.value?t===this.value.name:t===this.value))||void 0===t?void 0:t.img},countryList(){const t=this.countrySearch.trim().toLowerCase();return this.options.filter(e=>{var s;return null===e||void 0===e||null===(s=e.name)||void 0===s?void 0:s.toLowerCase().includes(t)}).sort((e,s)=>{const i=e.name.toLowerCase().startsWith(t);return i&&s.name.toLowerCase().startsWith(t)?e.name>s.name?1:-1:i?-1:1})},selectedCountry(){return this.countryList.find(t=>t.name===this.selectedValue)}}),watch:{isMobile(){this.showOptions=!1},showOptions(t){if(t)return this.$emit("show-options"),this.$emit("focus"),document.body.addEventListener("keydown",this.keyEvent,!0),void this.$nextTick().then(()=>{this.$refs.searchInput&&!this.isInBottomSheet&&setTimeout(()=>{var t,e;null===(t=this.$refs.searchInput)||void 0===t||null===(e=t.$el)||void 0===e||e.querySelector("input").focus()},100)});this.$emit("close-options"),document.body.removeEventListener("keydown",this.keyEvent,!0)},countryList(){var t;this.showOptions&&!this.useValueFromProp&&(this.selectedValue=(null===(t=this.countryList[0])||void 0===t?void 0:t.name)||"")},isInBottomSheet:{immediate:!0,handler(t){var e;t||(null===(e=this.$refs.countrySelectBottomSheet)||void 0===e||e.close())}},value:{immediate:!0,handler(t){this.selectedValue=(null===t||void 0===t?void 0:t.name)||t||""}}},beforeDestroy(){document.body.removeEventListener("keydown",this.keyEvent,!0)},methods:{clickOutside(){this.isInBottomSheet||(this.showOptions=!1,this.setRegistrationVisible())},selectOption(t,e,s=!0){this.useValueFromProp||(this.selectedValue=(null===t||void 0===t?void 0:t.name)||""),s&&(this.$emit("input",t,e),this.toggleSelect(),this.countrySearch="")},scrollToOption(t,e={block:"end"}){var s=this;return Object(a["a"])((function*(){var i,o;if(s.notScrollToOption)return;yield s.$nextTick();const n=null===(i=s.$refs.optionsScroll)||void 0===i?void 0:i.querySelector(`.country-select__option[name="${t}"]`);if(!n)return;if(s.isInBottomSheet)return void n.scrollIntoView(e);const a=(null===(o=s.$refs.optionsScroll)||void 0===o?void 0:o.getBoundingClientRect())||{},l=n.getBoundingClientRect()||{};l.top&&a.top&&(s.$refs.optionsScroll.scrollTop=l.top-a.top-f)}))()},toggleSelect(){var t,e;this.disabled||(this.deniedToggleMsg?this.showNotify({type:"warn",text:this.deniedToggleMsg}):(this.showOptions=!this.showOptions,this.setRegistrationVisible(this.showOptions),this.isInBottomSheet?this.showOptions?(null===(t=this.$refs.countrySelectBottomSheet)||void 0===t||t.open(),this.$nextTick().then(this.scrollToOption(this.selectedValue.toLowerCase(),{block:"center"}))):null===(e=this.$refs.countrySelectBottomSheet)||void 0===e||e.close():this.$nextTick().then(this.scrollToOption(this.selectedValue.toLowerCase()))))},setRegistrationVisible(t){const e=document.querySelector(".custom-modal--registration")||document.querySelector(".play__iframe--registration");if(!e)return;const s=t?"add":"remove";e.classList[s]("custom-modal--visible")},bottomSheetCloseHandler(){this.showOptions=!1},keyEvent(t){if(!(t.defaultPrevented||t.altKey||t.shiftKey||t.ctrlKey)){switch(t.key){case"Enter":case"Escape":this.selectedCountry&&this.$emit("input",this.selectedCountry,t),this.toggleSelect();break;case"ArrowDown":this.moveList("down",t);break;case"ArrowUp":this.moveList("up",t);break;default:return}t.preventDefault()}},moveList(t,e){const s=this.countryList.findIndex(({name:t})=>t===this.selectedValue),i="down"===t?s+1:s-1,o=this.countryList[i];i>=0&&i<=this.countryList.length&&(this.scrollToOption(o.name.toLowerCase(),{block:"center"}),this.selectOption(o,e,!1))},enter(t){this.scrollToOption(this.selectedValue.toLowerCase(),{block:"center"}),this.$nextTick().then(()=>{t.classList.add("open")})},onInput(t){var e;const s=""===(null===(e=t[0])||void 0===e?void 0:e.trim())?t.substr(1):t;this.countrySearch=s,this.changeSearchCriteria(s)},changeSearchCriteria(t){if(!t)return;const e=Object(n["a"])(this.countryList,1),s=e[0];s&&this.scrollToOption(s.name.toLowerCase())},onPaste(t,e){e.preventDefault(),this.countrySearch=t.trim()},onChange(t){const e=t.target.options.selectedIndex-1,s=this.countryList[e];this.selectOption(s,t)},isActiveOption(t){return t.name===this.selectedValue?"active":""}}},b=y,_=s("2877"),S=Object(_["a"])(b,i,o,!1,null,null,null);e["default"]=S.exports},7030:function(t,e,s){"use strict";s("16b3")},"7f14":function(t,e,s){"use strict";var i=s("5530"),o=s("ca47");const n=.5;e["a"]={computed:Object(i["a"])({},Object(o["e"])("breakpoints",["isMobileOrTablet"])),methods:{scrollToActiveTabOnMobile(t,e,s,i){this.isMobileOrTablet&&this.scrollToActiveTab(null===t||void 0===t?void 0:t.target,e,s,i)},scrollToActiveTab(t,e,s,i){if(!t||!e)return;const o=t.getBoundingClientRect(),n=e.getBoundingClientRect(),a=e.scrollLeft,l=parseInt(window.getComputedStyle(e).paddingLeft)||0;if(!o||!n||!a&&0!==a)return;let r=0;r=0===i?-l:i===s.length-1?o.right:o.left-n.left+a-l,e.scrollTo({left:r,behavior:"smooth"})},scrollToActiveSelector(t,e,s){const i=e;if(!i)return;const o=parseInt(window.getComputedStyle(i).paddingLeft)||0,n=null===i||void 0===i?void 0:i.querySelector(t);if(!n)return;const a=i.getBoundingClientRect(),l=n.getBoundingClientRect();if(!s){const t=l.left-a.left;return void(i.scrollLeft+=t)}const r=l.left-a.left-o;i.scrollLeft+=r},scrollToActiveTabCentered(t,e,s=0){const i=window.innerWidth*n,o=this.$refs[e][0],a=o.offsetLeft,l=o.clientWidth;this.$refs[t].scrollWidth*nthis.$refs.provider.errors,t=>{this.$emit("error",{message:t[0]})})},methods:Object(n["a"])(Object(n["a"])({},Object(a["d"])("modal",["closeModal"])),{},{updateValue(t){this.$emit("input",t.target.checked)},hrefCallback(){this.$emit("callback")},toLink(){this.$router.push(this.href).finally(()=>{this.closeModal()}).catch(()=>({}))}})},u=c,d=(s("7030"),s("2877")),h=Object(d["a"])(u,i,o,!1,null,null,null);e["a"]=h.exports},cf8a:function(t,e,s){}}]);