PageSourceSearch

https://wegotrip.com/_next/static/chunks/5963-2b5f87a12c663b01.js

js wegotrip.com collected 2026-10-01 15:40:11 UTC 28,799 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1b719229-da61-5d39-af08-7ae916e821bb")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5963],{2270:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});let a=["com","org","net","int","edu","gov","mil","ru","eu","us","uk","de","jp","fr","au","br","ca","cn","ae","af","al","am","ar","at","az","bd","be","bg","bh","by","ch","cl","cz","dk","eg","es","fi","gr","hk","hu","id","ie","il","in","ir","it","ke","kg","kr","kz","lk","lt","lv","ma","md","me","mk","mx","my","ng","nl","no","nz","pk","pl","pt","qa","ro","rs","sa","se","sg","si","sk","th","tr","tz","ua","ug","uy","uz","ve","vn","za"],s=e=>{if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(e))return!1;let t=e.split("."),r=t[t.length-1].toLowerCase();return a.includes(r)}},3979:(e,t,r)=>{var a=r(71747);e.exports=r(83611)(a)},4172:()=>{},5024:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>k,FT:()=>v,fg:()=>b,zB:()=>j});var a=r(37876);r(14232);var s=r(54241),i=r(80347),l=r(35968),n=r(84503);r(38544);let o={id:"u5mXiv",message:"rating & review"},c={id:"C5qs2V",message:"ratings & review"},u={id:"69KL/P",message:"ratings & reviews"},d={id:"1wQMo6",message:"Overall rating"};function m(e){let t=e%10,r=e%100;
3return 1===t&&11!==r?"one":t>=2&&t<=4&&(r<12||r>14)?"few":"many"}let p={id:"6jLpaX",message:"rating"},h={id:"pf38PE",message:"ratings"},g={id:"Cfu+5E",message:"ratings"},f={id:"syQu6m",message:"review"},x={id:"NHQw6E",message:"reviews"},_={id:"7oVdOl",message:"reviews"};function j({starsType:e,grade:t,iconSize:r,onClick:s=()=>{},className:i=""}){let o={small:{filled:"star/white",empty:"star/whiteBorder"},medium:{filled:"star/white",empty:"star/whiteBorder"},large:{filled:"star/accent",empty:"star/accentBorder"},gray:{filled:"star/accent",empty:"star/grey"},smallAccent:{filled:"star/accent",empty:"star/accentBorder"},default:{filled:"star/accent",empty:"star/accentBorder"}},c=o[e]?.filled||o.default.filled,u=o[e]?.empty||o.default.empty,d=r?{height:r,width:r}:{},m=(0,a.jsx)(n.I,{name:c,...d}),p=(0,a.jsx)(n.I,{name:u,...d}),h=Array.from({length:5},(e,t)=>t+1);return(0,a.jsx)("div",{className:`Rating__stars ${i}`,children:"small"===e||"medium"===e||"smallAccent"===e?(0,a.jsxs)("div",{className:"Rating__item",children:[(0,a.jsx)("div",{className:"Rating__filled-star",style:{width:`${t>=5?t/5*100:t/5*55}%`},children:m}),(0,a.jsx)("div",{className:"Rating__empty-star",children:p})]}):h.map((e,r)=>(0,a.jsx)("div",{className:"Rating__item",onClick:()=>s(r+1),children:e<=t?m:p},(0,l.A)()))})}let v=({count:e,reviewsCount:t,countType:r,theme:l="main",className:d})=>{let j,v=l&&(0,i.A)(`Rating__count--${l}`),y=(e,t,r,i)=>(0,a.jsx)(s.x6,{...{one:t,few:r,many:i}[m(e)]}),b=null!=t&&void 0!==t,k=()=>{let r,i;return b?(0,a.jsxs)(a.Fragment,{children:[e," ",y(e,p,h,g)," ","\xb7 ",t," ",y(t,f,x,_)]}):(0,a.jsxs)(a.Fragment,{children:[e," ",(r=e%10,i=e%100,1===r&&11!==i?(0,a.jsx)(s.x6,{...o}):[2,3,4].includes(r)&&![12,13,14].includes(i)?(0,a.jsx)(s.x6,{...c}):(0,a.jsx)(s.x6,{...u}))]})};return"large"===r||"large"===r&&"short"!==r?j=(0,a.jsxs)("div",{children:[(0,a.jsx)(n.I,{className:(0,i.A)("Rating__count_icon","main"===l&&"","main"!==l&&"icon-reviews-gray"),name:"reviews/main"}),k()]}):"medium"===r?j=(0,a.jsx)("div",{children:k()}):"medium"!==r&&(j=`(${e})`),(0,a.jsx)("div",{className:(0,i.A)("Rating__count",v,d),children:j})};function y({totalRatings:e,totalReviews:t}){let{i18n:{locale:r}}=(0,s.uB)(),i=(e,t,s,i)=>{let l;if(!e)return null;if("ru"===r){let r=m(e);l="one"===r?t:"few"===r?s:i}else l=1===e?t:i;return(0,a.jsxs)(a.Fragment,{children:[e," ",l]})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{children:[i(e,(0,a.jsx)(s.x6,{...p}),(0,a.jsx)(s.x6,{...h}),(0,a.jsx)(s.x6,{...g}))," "]}),(0,a.jsxs)("span",{children:[i(t,(0,a.jsx)(s.x6,{...f}),(0,a.jsx)(s.x6,{...x}),(0,a.jsx)(s.x6,{..._}))," "]})]})}let b=({overallCount:e})=>{if(!e||!e.avgRating)return null;let t=Math.floor(10*e.avgRating)/10,r=Math.max(e.ratingsDistribution.five_star,e.ratingsDistribution.four_star,e.ratingsDistribution.three_star,e.ratingsDistribution.two_star,e.ratingsDistribution.one_star),i=({starsType:t,count:s})=>{let i=s/e.totalRatings*100,l=`${(r.toString().length+1)*10}px`;return(0,a.jsxs)("div",{className:"OverallRating__bar",children:[(0,a.jsx)("div",{className:"OverallRating__bar-text",style:{width:l},children:s}),(0,a.jsx)("div",{className:"OverallRating__bar-background",children:(0,a.jsx)("div",{className:"OverallRating__bar-fill",style:{width:`${i}%`}})}),(0,a.jsxs)("div",{className:"OverallRating__bar-star",children:[(0,a.jsx)(j,{gradeType:"short",grade:t+.99,starsType:"smallAccent"}),t]})]})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"OverallRating__title",children:(0,a.jsx)(s.x6,{...d})}),(0,a.jsxs)("div",{className:"OverallRating",children:[(0,a.jsxs)("div",{className:"OverallRating__main",children:[(0,a.jsxs)("div",{className:"Rating__stars_overall-container",children:[(0,a.jsx)(j,{className:"Rating__stars_overall",gradeType:"short",grade:e.avgRating,starsType:"small"}),(0,a.jsx)("span",{className:"Rating__grade_overall",children:t})]}),(0,a.jsx)("div",{className:"OverallRating__details",children:(0,a.jsx)(y,{totalRatings:e.totalRatings,totalReviews:e.totalReviews})})]}),(0,a.jsxs)("div",{className:"OverallRating__bars",children:[(0,a.jsx)(i,{starsType:5,count:e.ratingsDistribution.five_star}),(0,a.jsx)(i,{starsType:4,count:e.ratingsDistribution.four_star}),(0,a.jsx)(i,{starsType:3,count:e.ratingsDistribution.three_star}),(0,a.jsx)(i,{starsType:2,count:e.ratingsDistribution.two_star}),(0,a.jsx)(i,{starsType:1,count:e.ratingsDistribution.one_star})]})]})]})},k=({theme:e,grade:t,gradeType:r,starsType:s,size:l,count:n,reviewsCount:o,countType:c,className:u})=>
3{if(!Math.floor(Number(t)))return null;let d="light-main"!==e?Number(t).toFixed(1):Number(t);return"short"===r&&(d=Math.floor(Number(d))),(0,a.jsxs)("div",{className:(0,i.A)("Rating",l&&`Rating--${l}`,e&&`Rating--${e}`,u),children:["large"!==s?(0,a.jsxs)("div",{className:"Rating__stars_container",children:[(0,a.jsx)(j,{size:l,grade:t,starsType:s}),(0,a.jsx)("span",{className:"Rating__grade",children:d})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{size:l,grade:t,starsType:s}),(0,a.jsx)("span",{className:"Rating__grade",children:d})]}),n&&"large"!==s&&c?(0,a.jsx)(v,{size:l,count:n,reviewsCount:o,countType:c,theme:e}):null]})}},7395:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(37876);r(14232);var s=r(80347);function i({margin:e=!1,children:t,theme:r,error:l}){return(0,a.jsx)("div",{className:(0,s.A)("t-15","InputLabel",e&&"InputLabel--margin",r&&`InputLabel--${r}`,l&&"InputLabel--error"),children:t})}function l(e){return function({label:t,labelTheme:r,className:s,WrapperTag:l="div",...n}){return(0,a.jsxs)(l,{className:s,style:{position:"relative"},children:[(0,a.jsx)(i,{margin:!r,theme:r,disabled:n.disabled,error:n.error,children:t}),(0,a.jsx)(e,{...n})]})}}r(35055)},10133:(e,t,r)=>{"use strict";function a(e){return e?e.headers["user-agent"]:navigator.userAgent}function s(e){return"string"==typeof e&&!!e.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile|webOS|Windows Phone|WPDesktop/i)}r.d(t,{$:()=>a,f:()=>s})},18117:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var a=r(37876),s=r(14232),i=r(80347),l=r(95175),n=r(43013);r(31337),r(76016);let o=(0,l.A)(()=>r.e(205).then(r.bind(r,10205)),{ssr:!1});function c({revealed:e}){return e?(0,a.jsxs)("svg",{"aria-hidden":!0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}):(0,a.jsx)("svg",{"aria-hidden":!0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",children:(0,a.jsx)("path",{d:"M3 3l18 18M10.58 10.58a3 3 0 0 0 4.24 4.24M9.88 5.09A9.6 9.6 0 0 1 12 5c6.5 0 10 7 10 7a17.2 17.2 0 0 1-3.29 4.1M6.11 6.11A17.1 17.1 0 0 0 2 12s3.5 7 10 7a9.6 9.6 0 0 0 3.02-.49",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}let u=({type:e="text",inputRef:t,className:r,theme:l,children:u=[],error:d,phone:m,pattern:p,disabled:h,success:g,customInput:f,WrapperTag:x="div",onFocusChange:_,onFocus:j=()=>{},onChange:v=()=>{},onClick:y=()=>{},autoResize:b,...k})=>{let N=(0,n.A)(),[w,A]=(0,s.useState)(!1),[C,R]=(0,s.useState)(!1),D="textarea"===e,I=D?"textarea":"input",S=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(D&&b&&S.current){let e=S.current;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}},[D,b,k.value]);let P="password"===e,E=P&&!m&&!f&&!h,F=P&&C?"text":e,$=(e,t)=>"ru"===N?e:t,O=C?$("Скрыть пароль","Hide password"):$("Показать пароль","Show password");return(0,s.useEffect)(()=>{_&&_(w)},[w,_]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(x,{className:(0,i.A)("Input",h&&"Input--disabled",D&&"Input--multiline",r,l&&`Input--${l}`,w&&"Input--focused",g&&"Input--success",d&&"Input--error",!m&&"Input--outer"),onClick:y,children:[u[0],m?(0,a.jsx)(o,{...k,className:"Input__field",onFocus:()=>A(!0),onChange:v,onBlur:()=>{A(!1)},..."ru"===N?{defaultCountry:"RU"}:{}}):f||(0,a.jsx)(I,{ref:e=>{S.current=e,"function"==typeof t?t(e):t&&(t.current=e)},type:F,disabled:h,className:"Input__field",onFocus:()=>{A(!0),j()},onBlur:()=>A(!1),onChange:e=>((!p||p&&new RegExp(p).test(e.target.value))&&v(e),!1),...k,...P?{onCopy:e=>e.preventDefault(),onCut:e=>e.preventDefault()}:{}}),E&&(0,a.jsx)("button",{type:"button",className:"Input__reveal","aria-label":O,"aria-pressed":C,title:O,onMouseDown:e=>e.preventDefault(),onClick:()=>R(e=>!e),children:(0,a.jsx)(c,{revealed:C})}),u[1]||!Array.isArray(u)&&u]}),k.after]})}},27776:(e,t,r)=>{var a=r(95446),s=r(3979),i=r(47871),l=r(95896),n=r(93007);e.exports=function(e,t,r){var o=n(e)?a:l,c=arguments.length<3;return o(e,i(t,4),r,c,s)}},33641:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var a=r(7766),s=r.n(a);function i(e){return!!(s()(e?.tickets?.[0],"hasTour")||s()(e,"tags.audioguide")||s()(e,"types.audioguide")||2!==e.type)}},35055:()=>{},38544:()=>{},68894:()=>{},76016:()=>{},78586:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(7766),s=r.n(a);function i(e){return!!(2&e.type)||s()(e?.tickets?.[0],"hasTiqets")}},83611:(e,t,r)=>{var a=r(27136);e.exports=function(e,t){return function(r,s){if(null==r)return r;if(!a(r))return e(r,s);for(var i=r.length,l=t?i:-1,n=Object(r);(t?l--:++l<i)&&!1!==s(n[l],l,n););return r}}},87376:(e,t,r)=>{"use strict";function a(e){let t=e||{};return(e,r)=>{JSON.stringify(e)!==JSON.stringify(t)&&(r(),t=e)}}r.d(t,{A:()=>a})},95896:e=>
3{e.exports=function(e,t,r,a,s){return s(e,function(e,s,i){r=a?(a=!1,e):t(r,e,s,i)}),r}},96035:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eh});var a=r(37876),s=r(14232),i=r(2189),l=r(31777),n=r(40123),o=r.n(n),c=r(7766),u=r.n(c),d=r(84533),m=r(78229),p=r(37627),h=r(42037);let g=["Opened","Closed"];var f=r(48851),x=r(76341),_=r(70220),j=r(96117),v=r(80630),y=r(80428),b=r(51888),k=r(83103),N=r(83270),w=r(44065),A=r(94820),C=r(90348),R=r(64996),D=r(5476),I=r(20803),S=r(40679),P=r(17074),E=r(97888),F=r(43013),$=r(62637),O=r(10133);function T(e,t,r){g.forEach(a=>{e[t](`widget:${a.toLowerCase()}`,r[a])})}var z=r(42480);function B(e,t="id-"){let r=e.match(RegExp(`${t}[\\w-]+=\\d+(?:\\.\\d+)?`,"g"));return r?r.reduce((e,r)=>{let[a,s]=r.split("=");return e[a.replace(t,"")]=Number(s),e},{}):null}var L=r(1395),M=r(89755),W=r(78586),H=r(14858),V=r(66198),q=r(36783),Y=r(19115),Z=r(42098),Q=r(27776),G=r.n(Q),J=r(17814),U=r(54241),K=r(87624),X=r(13727),ee=r(25493);r(4172);var et=r(84503),er=r(2270),ea=r(53500),es=r(16994),ei=r(84403);let el=e=>!!e&&(0,er.D)(e),en=e=>{if(!localStorage)return;let{firstName:t,lastName:r,email:a,phone:s}=e;localStorage.setItem("customer.firstName",t),localStorage.setItem("customer.lastName",r),localStorage.setItem("customer.email",a),localStorage.setItem("customer.phone",s)},eo=({user:e,product:t,bookingDetails:r,onSubmit:n,onError:o=()=>{},fromOnDemandForm:c,lang:d})=>{var m,p;let h,g,f=(0,l.d4)(e=>e.user?.user)||{},_=e||f,{i18n:j}=(0,U.uB)(),v=(0,F.A)(),y=(0,l.wA)(),k=(0,b.A)(),N={user_id:_.id,product_id:t.id};(0,s.useEffect)(()=>{"POP"===k.action&&y({type:x.Tu})},[k.action]);let{sellingTools:w}=(0,es.A)(),C=u()(t,"tickets.0.participants"),R=(e=>{if(!localStorage)return null;let t=e.first_name||localStorage.getItem("customer.firstName")||"",r=e.last_name||localStorage.getItem("customer.lastName")||"";return{firstName:t,lastName:r,email:e.email||localStorage.getItem("customer.email")||"",phone:e.phone||localStorage.getItem("customer.phone")||""}})(_),D=(m=r.pricingCategories,p=!C,h=[],g=!1,Object.getOwnPropertyNames(m).forEach(e=>{let t=m[e];g=t>0&&!g;for(let r=0;r<t;r+=1){let t="",a="";(g&&0===r||p)&&(t=[R.firstName,R.lastName].filter(Boolean).join(" "),a=R.phone||""),h.push({contact:{fullName:t,phone:a},pricingCategoryId:e})}}),h),I=(0,H.r)("(max-width: 767px)"),S=!z.f&&I,[P,E]=(0,s.useState)(!1);z.f||P||(E(!0),(0,A.Ay)("track","Checkout Step Viewed",{...(0,A.Tm)(t,{quantity:G()(r.pricingCategories,(e,t)=>e+t,0)}),step:2}),(0,A.Ay)("track","checkout_personal_info_page_view",N));let $=e=>{y({type:x.BQ,data:{message:e.message,actions:[]}}),o(e)};return(0,a.jsx)(K.l1,{enableReinitialize:!0,validateOnBlur:!0,validateOnChange:!0,initialValues:{passengers:D,customer:{...R}},validationSchema:J.Ik().shape({customer:J.Ik().shape({firstName:J.Yj().nullable().required(j._(i.Ru._({id:"eQ1huZ"}))),lastName:J.Yj().nullable().required(j._(i.Ru._({id:"ZURk8I"}))),email:J.Yj().nullable().required(j._(i.Ru._({id:"f0jNfD"}))).test("email",j._(i.Ru._({id:"5tT0+u"})),el),phone:J.Yj().nullable().required(j._(i.Ru._({id:"V1swiJ"}))).test("phone",j._(i.Ru._({id:"zjr1Hd"})),e=>{let t=e?.length===12,r=e?.startsWith("+7");return!r||r&&t}).min(11,j._(i.Ru._({id:"zjr1Hd"}))).max(15,j._(i.Ru._({id:"zjr1Hd"})))}),passengers:J.YO().of(J.Ik().shape({contact:J.Ik().shape({fullName:J.Yj().nullable().required("Please enter {index} traveler name"),phone:J.Yj().nullable().required("Please enter {index} traveler phone")})}))}),onSubmit:e=>{y({type:x.C$,payload:e}),y({type:x.ao}),n(e)},children:({values:e,errors:s,validateForm:l,setFieldValue:n,handleSubmit:o})=>{let u=(e,t)=>{let r=e;return e&&t&&(r+=` ${t}`),r},m=(e,t,r)=>{let a=e?[e]:[];C?a.push(`passengers[0].${r}`):D.forEach((e,t)=>a.push(`passengers[${t}].${r}`)),a.forEach(e=>n(e,t))},p=!!(e.customer.email&&!s.customer)&&el(e.customer.email);return(0,a.jsx)("form",{onSubmit:t=>{t.preventDefault(),t.persist(),l(e).then(r=>{let{customer:a,passengers:s}=r;if(a){let e=["firstName","lastName","email","phone"];for(let t=0;t<e.length;t+=1){let r=e[t];if(a[r])return void $({message:j._(a[r])})}}else if(s){let e=["fullName","phone"];for(let t=0;t<s.length;t+=1){let r=s[t];if(r)for(let a=0;a<e.length;a+=1){let s=e[a],i=r.contact[s];if(i)return void $({message:j._(i,{index:t+1})})}}}else en(e.customer),o(t)})},children:(0,a.jsxs)(ee.A,{lang:d||v,fromOnDemandForm:c,isMobile:S,reverseOrder:S,product:t,bookingDetails:r,pageTitle:(0,a.jsx)(U.x6,{id:"qyHHJm"}),children:[(0,a.jsxs)("div",{className:"PersonalDetails",children:[(0,a.jsxs)("div",{className:"PersonalDetails__title",children:[t.price>0&&(0,a.jsxs)("div",{className:"PersonalDetails__information-item",children:[(0,a.jsx)(et.I,{className:"PersonalDetails__information-item_ikon",
3name:"shield/empty"}),(0,a.jsx)("div",{className:"PersonalDetails__information-item_text",children:(0,a.jsx)(U.x6,{id:"nPkubr"})})]}),S?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"PersonalDetails__title_timer_text",children:(0,a.jsx)(U.x6,{id:"7BJ191"})}),w&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ea.A,{lang:d||v}),(0,a.jsx)(ei.A,{items:[(0,a.jsx)(U.x6,{id:"bYICsV"})],theme:"taxes-included"})]})]}):(0,a.jsxs)("div",{className:"PersonalDetails__title_timer",children:[(0,a.jsx)("span",{children:(0,a.jsx)(U.x6,{id:"7BJ191"})}),w&&(0,a.jsx)(ea.A,{lang:d||v})]})]}),(0,a.jsxs)("div",{className:"row m-16",children:[(0,a.jsx)("div",{className:"col-xs-12 col-md-5 PersonalDetails__input",children:(0,a.jsx)(K.D0,{name:"customer.firstName",children:({field:e,form:t})=>(0,a.jsx)(X.A,{withLabel:!0,label:j._(i.Ru._({id:"V1EGGU"})),placeholder:j._(i.Ru._({id:"PzoAm/"})),...t,field:{...e,onChange:({target:e})=>{let r=e.value;t.setFieldValue("customer.firstName",r),en({...t.values.customer,firstName:r}),m(null,u(r,t.values.customer.lastName),"contact.fullName")}},onFocus:()=>(0,A.Ay)("track","firstName_click_field",N)})})}),(0,a.jsx)("div",{className:"col-xs-12 col-md-7",children:(0,a.jsx)(K.D0,{name:"customer.lastName",children:({field:e,form:t})=>(0,a.jsx)(X.A,{withLabel:!0,label:j._(i.Ru._({id:"1ZaQUH"})),placeholder:j._(i.Ru._({id:"buHlke"})),...t,field:{...e,onChange:({target:e})=>{let r=e.value;t.setFieldValue("customer.lastName",r),en({...t.values.customer,lastName:r}),m(null,u(t.values.customer.firstName,r),"contact.fullName")}},onFocus:()=>(0,A.Ay)("track","lastName_click_field",N)})})})]}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-xs-12 col-md-5 PersonalDetails__input",children:(0,a.jsx)(K.D0,{name:"customer.email",children:({field:e,form:t})=>(0,a.jsx)("div",{children:(0,a.jsx)(X.A,{withLabel:!0,label:j._(i.Ru._({id:"O3oNi5"})),placeholder:j._(i.Ru._({id:"BopPj6"})),field:{...e,onChange:({target:e})=>{let r=e.value.trim();t.setFieldValue("customer.email",r),en({...t.values.customer,email:r})}},caption:p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(U.x6,{id:"VcYIKP"})," ",(0,a.jsx)("strong",{children:t.values.customer.email})]}):null,onFocus:()=>(0,A.Ay)("track","email_click_field",N)})})})}),(0,a.jsx)("div",{className:"col-xs-12 col-md-7",children:(0,a.jsx)(K.D0,{name:"customer.phone",children:({form:e,...t})=>(0,a.jsx)(X.A,{withLabel:!0,type:"tel",label:j._(i.Ru._({id:"zmwvG2"})),placeholder:j._(i.Ru._({id:"nax0aW"})),caption:(0,a.jsx)(U.x6,{id:"1tz2R1"}),...t,form:{...e,setFieldValue:(t,r)=>{e.setFieldValue(t,r),en({...e.values.customer,phone:r}),m(t,r,"contact.phone")}},onFocus:()=>(0,A.Ay)("track","phone_number_click_field",N)})})})]})]}),D.length>0?(0,a.jsxs)("div",{className:C?null:"PersonalDetails__passengers--hidden",children:[(0,a.jsxs)("header",{className:"m-16",children:[(0,a.jsx)("h2",{className:"h-20 m-4",children:(0,a.jsx)(U.x6,{id:"4K3ih5"})}),(0,a.jsx)("div",{className:"t-13",children:(0,a.jsx)(U.x6,{id:"A3+ZuU"})})]}),D.map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"PersonalDetails__traveler-label m-10",children:[(0,a.jsx)(U.x6,{id:"PgEFbA"})," ",t+1," "]}),(0,a.jsxs)("div",{className:"row m-16",children:[(0,a.jsx)("div",{className:"col-xs-12 col-md-5 PersonalDetails__input",children:(0,a.jsx)(K.D0,{withLabel:!0,name:`passengers[${t}].contact.fullName`,placeholder:j._(i.Ru._({id:"0W0FHK"})),component:X.A})}),(0,a.jsx)("div",{className:"col-xs-12 col-md-7",children:(0,a.jsx)(K.D0,{withLabel:!0,type:"tel",name:`passengers[${t}].contact.phone`,placeholder:j._(i.Ru._({id:"zmwvG2"})),component:X.A})})]})]},`${e.pricingCategoryId}-${t+1}`))]}):null]})})}})};function ec(e,t){(0,A.Ay)("track","Checkout Error",{label:e.message,step:t})}let eu=function({step:e}){let{i18n:t}=(0,U.uB)(),r=(0,l.d4)(e=>e.availability.error);return(0,s.useEffect)(()=>{r&&ec({message:t._(r)},e)},[r]),null};function ed({bookingDetails:e,setBookingDetails:t,product:r,productId:a,lang:i,hasTimeslots:l,user:n,productLink:o,dispatch:c,options:u=[],availabilityLoading:d=!1}){let m=(0,b.A)(),p=(0,k.A)(),h=(0,s.useRef)(!0),g=(0,s.useRef)(null);return(0,s.useEffect)(()=>(h.current=!0,()=>{h.current=!1}),[]),(0,s.useEffect)(()=>
3{if(!r)return;let s=new URLSearchParams(p.search),f=e.date||null;if(f||void 0===s.get("date")||(f=s.get("date")),f&&u?.length===0){if(g.current!==f){g.current=f,c((0,_.Tu)({productId:a,date:f,lang:i}));return}if("options"===d)return}let j=e.pricingCategories||null,v=e.prices||null;j||(j=B(p.search),v=B(p.search,"pr-"));let y=!l&&r?.hasPhysicalTicket===!1;y||(v=null);let b=e.time||null;!b&&void 0!==s.get("time")&&l&&(b=s.get("time"));let k=y&&j&&v?Object.entries(j).reduce((e,[t,r])=>e+(Number(v[t])||0)*r,0):0,N=0===r.price&&0===k,w=j&&(N||!l||f&&b),C=f&&u?.length>0?(0,L.ti)(u):(0,L.F2)(r),R=!C.length||(0,M.Ze)(C,j);if(w&&R){if(!h.current)return;t({date:f,time:b,prices:v,pricingCategories:j}),v&&k>0&&c({type:x.EC,total:k}),(0,A.H$)("track","InitiateCheckout",{value:r.price,currency:r.currencyCode}),(0,A.Ay)("track","Checkout Started",{user_id:n.id,product_id:a,currency:r.currencyCode,value:r.price,items:[{...(0,A.zu)(r,j),item_id:a}],products:[{...(0,A.zu)(r,j),product_id:a}]})}else if(!j||!R||!N&&l&&(!f||!b)){if(!h.current)return;m.replace(o)}},[e.date,e.pricingCategories,e.prices,e.time,l,i,p.search,m,r,a,o,t,n.id,c,u,d]),(0,s.useEffect)(()=>{h.current&&r&&r.slug&&e.pricingCategories&&m.replace((0,y.Ay)("checkout",{lang:i,productSlug:r.slug,productId:a,step:"personal"}))},[e.pricingCategories,m,i,r,a]),null}r(68894);let em={booking:1,personal:2,payment:3,verification:4};function ep({product:e,restoredBookingDetails:t={},availability:r,user:n,dispatch:c,mobile:d}){let f=(0,l.wA)(),j=c||f,k=(0,l.d4)(e=>e.products?.selectedProduct),I=(0,l.d4)(e=>e.user),E=(0,l.d4)(e=>e.availability)||{},$=e||k,O=n||I,{payment:B={},discount:L,bookingTotal:M,calculatedPrice:Q,selectedCategories:G,fromOnDemandForm:J,options:U=[],loading:K=!1}=r||E,X=(0,s.useRef)({});(0,s.useEffect)(()=>{$&&(0,A.T_)("add_to_cart",$)},[$]),(0,s.useEffect)(()=>{window.scrollTo(0,0)},[]);let{customerData:ee}=(0,l.d4)(({availability:e})=>({customerData:e?.customerData})),[,et]=(0,s.useState)(!(!z.f&&window.footerHidden));z.f||(window.toggleFooter=et);let er=(0,s.useRef)(!0),[ea,es]=(0,s.useState)(t),ei=(0,s.useCallback)(e=>{er.current&&es(e)},[]),{productId:el,step:en}=(0,N.A)(),eh=(0,F.A)(),eg=(0,b.A)(),ef=!z.f&&(0,H.r)("(min-width: 992px)"),ex=z.f?d:(0,H.r)("(max-width: 767px)"),e_=(0,C.O)(eh,$),ej=!!$&&!!$.tickets&&!!$.tickets.length&&!!$.tickets[0]&&$.tickets[0].hasTimeslots;(0,s.useEffect)(()=>(er.current=!0,()=>{er.current=!1}),[]),(0,s.useEffect)(()=>{"POP"===eg.action&&er.current&&(j({type:x.e5}),eg.push(e_))},[eg,e_,j]),(0,s.useEffect)(()=>{z.f||"payment"!==en||M?.total!=null||B?.price!=null||eg.replace(e_)},[en,M?.total,B?.price,eg,e_]);let ev=u()(L,"codes.0.promotion.code",null),ey=function(e,t=4){let[r,a]=(0,s.use
3State)("loading"),i=(0,s.useRef)(!0),l=(0,s.useRef)(null),n=r=>{i.current&&(!window[e]&&r<=t?l.current=setTimeout(()=>n(r+1),2e3+2*r):window[e]?i.current&&a("loaded"):i.current&&a("error"))};return(0,s.useEffect)(()=>(i.current=!0,z.f||n(0),()=>{i.current=!1,l.current&&(clearTimeout(l.current),l.current=null)}),[]),r}("fcWidget"),eb=(0,s.useCallback)(e=>{$&&(0,A.Ay)("track",`FreshChat ${e}`,{label:"product page",...(0,A.Sk)($)})},[$]);(0,s.useEffect)(()=>{if(!z.f&&window.fcWidget&&$){let e=g.reduce((e,t)=>({...e,[t]:eb.bind(null,t)}),{});return T(window.fcWidget,"on",e),()=>{T(window.fcWidget,"off",e)}}return()=>{}},[ey,eb,$]),(0,s.useEffect)(()=>{$&&!O.loading&&!O.isFetched&&er.current&&j((0,v.im)({}))},[O.loading,O.isFetched,j,$]);let ek=em[en],eN=e=>(e.returnValue="Are you sure you want to close this window?","Are you sure you want to close this window?");(0,s.useEffect)(()=>(window.onbeforeunload=eN,()=>{window.onbeforeunload=null}),[en]),(0,s.useEffect)(()=>{ek===em.verification&&(window.onbeforeunload=null)},[ek]);let ew=async(e,t)=>{let r,a=localStorage?{firstName:localStorage.getItem("customer.firstName")||"",lastName:localStorage.getItem("customer.lastName")||"",email:localStorage.getItem("customer.email")||"",phone:localStorage.getItem("customer.phone")||""}:{},{firstName:s,lastName:i,email:l,phone:n}=e.customer||a,o=(0,D.I5)($?.currencyCode),c=await X.current.executeAsync();if(J){let e=0;Object.values(G).forEach(t=>{e+=t});let t=e;localStorage.setItem("originalPassengerCount",JSON.stringify({total:t})),j({type:x.Q1,payload:{total:t}});let a=Math.ceil(e/5);r=[];for(let e=0;e<a;e+=1)r.push({contact:{fullName:`${s} ${i}`,email:l,phone:n},pricingCategoryId:"1"})}else localStorage.removeItem("originalPassengerCount"),r=e.passengers;let u=M?.total??B?.price??0;j({type:x.VG,payload:{price:u}}),j((0,_.Lb)({yooKassa:(0,P.A)($?.currencyCode),productId:el,promo:ev,paymentMethod:o[o.length-1],date:(0,R.Y)(ea.date),time:ea.time,passengers:r,customer:{fullName:`${s} ${i}`,email:l,phone:n},onCompleted:t,recaptcha:c,params:(0,S.Ud)()})),X.current.reset()},eA=e=>{let{id:t,confirmationCode:r}=e||B;(0,A.H$)("track","FinishCheckout"),eg.push((0,y.Ay)("order",{lang:eh,productId:el,paymentId:t,confirmationCode:r,step:"invite"}))};return(0,s.useEffect)(()=>{"u">typeof document&&(document.cookie=`productId=${el}; path=/`)},[el]),(0,a.jsxs)(V.A,{hideHeader:!0,footer:!1,children:[(0,a.jsx)(q.E,{route:"checkout"}),(0,a.jsx)(Y._,{route:"checkout"}),(0,a.jsx)(eu,{step:ek}),(0,a.jsxs)("div",{className:"Checkout",children:[(0,a.jsxs)(p.A,{children:[(0,a.jsx)("title",{children:$?.title||""}),(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,a.jsx)("meta",{name:"description",content:$?.title?`${$.title} — WeGoTrip checkout`:"WeGoTrip checkout: complete your booking for audio tours and tickets."})]}),(0,a.jsx)(z.A,{children:!$||o()($)?(0,a.jsx)("div",{className:"Checkout__loader"}):(0,a.jsxs)(a.Fragment,{children:[!en&&(0,a.jsx)(ed,{bookingDetails:ea,setBookingDetails:ei,product:$,productId:el,lang:eh,hasTimeslots:ej,user:O,productLink:e_,dispatch:j,options:U,availabilityLoading:K}),(0,a.jsxs)("div",{className:"Checkout__wrapper",children:["personal"===en&&(o()(ea)?(0,a.jsx)(w.A,{to:e_}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eo,{isPaymentPage:!1,fromOnDemandForm:J,isMobile:ex,isDesktop:ef,product:$,bookingDetails:ea,lang:eh,onChange:es,onSubmit:e=>{if($){if((0,W.A)($)&&0===$.price){let e=i.Ru._({id:"NxW1XX"});j({type:x.BQ,data:{lazyMessage:e,actions:[]}});return}ew(e,(e,t)=>{if(!e)return;(0,A.Ay)("track","Contact Info Entered"),(0,A.Ay)("track","Checkout Step Completed",{step:1});let r=t?.price;null!=r&&0===Number(r)?eA(t):eg.push((0,y.Ay)("checkout",{lang:eh,productSlug:$.slug,productId:el,confirmationCode:t.confirmationCode,paymentId:t.id,step:"payment"}))})}},onError:e=>ec(e,1)}),(0,a.jsx)(m.A,{ref:X,sitekey:h._A,size:"invisible"})]})),"payment"===en&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Z.A,{isPaymentPage:!0,fromOnDemandForm:J,calculatedPrice:Q,isMobile:ex,payment:B,isDesktop:ef,product:$,bookingDetails:ea,lang:eh,onError:e=>ec(e,2),onPayment:eA,onFreeSubmit:()=>{(0,A.Ay)("track","Contact Info Entered"),(0,A.Ay)("track","Checkout Step Completed",{step:2}),B?.price!=null&&0===Number(B.price)&&eA(B)},onSubmit:()=>{ew(ee,(e,t)=>{e&&((0,A.Ay)("track","Contact Info Entered"),(0,A.Ay)("track","Checkout Step Completed",{step:2}))})},onFail:()=>e_}),(0,a.jsx)(m.A,{ref:X,sitekey:h._A,size:"invisible"})]})]})]})})]})]})}ep.getInitialProps=(0,$.A)(async({req:e,match:t,store:{dispatch:r,getState:a},scrollToTop:s})=>{let i,l,{productId:n,productSlug:o,paymentId:c,confirmationCode:m}=t.params,p=(0,E.A)(t.params.lang),h=(0,O.f)((0,O.$)(e));s.current=!0;let g=u()(a(),"products.selectedProduct"),_=u()(a(),"currencies.currentCurrency");if(i=_||(g&&g.id===Number(n)?g.currencyCode:await (0,I.j6)(e)),r({type:x.tq,defaultCurrency:i}),!g||g.id!==Number(n))try{await r((0,j.tW)({id:n,lang:p,currency:i}))}catch(e){}let v=u()(a(),"availability.payment",{}),b=v.status,k=(0,P.A)(i)?["id","price","confirmationCode"].every(e=>void 0!==v[e]):v.clientSecret;if(c&&!k&&0!==v.price)try{let e=await f.j.post(`/api/v2/payments/${c}/`,{payload:{confirmationCode:m}}),{promotion:t,discount:a,...s}=e?.data??e??{},o=s.product_ticket?await f.j.post(`/api/v1/products/${n}/availability/?lang=${p}`,{payload:{date:s.travelDate,time:s.time,currency:i},lang:p}):null,u=o?.data??o??[],h=s.reservations?.[0]?.passengers;l={time:s.time,date:s.travelDate?(0,d.A)(s.travelDate):void 0,pricingCategories:Array.isArray(h)?h.reduce((e,{pricingCategoryId:t})=>(e[t]="number"==typeof e[t]?e[t]+1:1,e),{}):void 0},b=s.status,r({type:x.fD,clientSecret:s.clientSecret,discount:{promotion:t,discount:a},confirmationCode:m,payment:s,paymentId:c,options:u})}catch(e){return{redirectTo:(0,y.Ay)("checkout",{lang:p,productSlug:o,productId:n,step:"personal"})}}return"done"===b?{redirectTo:(0,y.Ay)("order",{lang:p,productId:n,paymentId:c,confirmationCode:m,step:"invite"})}:{...l?{restoredBookingDetails:l}:{},mobile:h}});let eh=ep}}]);
4//# sourceMappingURL=5963-2b5f87a12c663b01.js.map
5//# debugId=1b719229-da61-5d39-af08-7ae916e821bb

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.